.rn-predracun {
  width: min(1240px, calc(100vw - 24px));
  height: calc(100dvh - 32px);
  max-height: 960px;
  padding: 0;
  border: 1px solid #cdd6e2;
  border-radius: 14px;
  background: #f3f5f8;
  color: #233249;
  box-shadow: 0 24px 80px #13233655;
  font:
    14px/1.4 Arial,
    sans-serif;
  overflow: hidden;
}
.rn-predracun[open] {
  display: flex;
  flex-direction: column;
}
.rn-predracun::backdrop {
  background: #14213799;
}
.rn-predracun * {
  box-sizing: border-box;
}
.rn-predracun [hidden] {
  display: none !important;
}
.rn-predracun-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: white;
  border-bottom: 1px solid #dce3ec;
}
.rn-predracun h2 {
  font-size: 19px;
  margin: 0;
}
.rn-predracun button {
  padding: 8px 12px;
  border: 1px solid #cdd6e2;
  border-radius: 6px;
  background: #fff;
  color: #233249;
  font:
    600 13px Arial,
    sans-serif;
  cursor: pointer;
  white-space: nowrap;
}
.rn-predracun button:disabled {
  opacity: 0.45;
  cursor: default;
}
.rn-predracun .rn-predracun-close {
  border: 0;
  font-size: 26px;
  padding: 0 6px;
}
.rn-predracun-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid #dce3ec;
  flex-wrap: wrap;
}
.rn-predracun .rn-predracun-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}
.rn-predracun-formula-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  border-bottom: 1px solid #cdd6e2;
  min-height: 40px;
}
.rn-predracun-address {
  padding: 10px 18px;
  min-width: 75px;
  border-right: 1px solid #dce3ec;
  font-weight: 600;
  text-align: center;
}
.rn-predracun-fx {
  font-style: italic;
  color: #718096;
}
.rn-predracun-formula-bar input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: white;
  color: #233249;
  width: 100%;
  padding: 9px 12px;
  font:
    14px Consolas,
    monospace;
  outline: none;
}
.rn-predracun-viewport {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 18px 26px 36px;
  background: #e8edf3;
}
.rn-predracun-grid {
  margin: 0 auto;
  border-collapse: collapse;
  table-layout: fixed;
  background: white;
  box-shadow: 0 4px 18px #18273818;
}
.rn-predracun-grid th {
  font:
    11px Arial,
    sans-serif;
  background: #f4f6f9;
  color: #718096;
  border: 1px solid #d7dfe8;
  text-align: center;
  height: 23px;
  user-select: none;
}
.rn-predracun-grid thead {
  position: sticky;
  top: -18px;
  z-index: 3;
}
.rn-predracun-grid th.rn-predracun-row-number {
  position: sticky;
  left: -26px;
  z-index: 2;
}
.rn-predracun-grid td {
  position: relative;
  padding: 2px 3px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  vertical-align: middle;
  outline: none;
  border: 1px solid #edf0f4;
  cursor: cell;
}
.rn-predracun-grid td.is-selected {
  outline: 2px solid #2563eb;
  outline-offset: -2px;
  z-index: 1;
}
.rn-predracun-grid td.has-formula::after {
  content: "";
  position: absolute;
  right: 1px;
  top: 1px;
  border-top: 5px solid #5d9b74;
  border-left: 5px solid transparent;
}
.rn-predracun-grid td.has-validation-error {
  box-shadow: inset 0 0 0 2px #dc2626;
}
.rn-predracun-grid td.has-validation-error.is-selected {
  outline-color: #dc2626;
}
.rn-predracun-grid .rn-predracun-logo-cell {
  text-align: center !important;
  overflow: hidden;
}
.rn-predracun-logo {
  height: 45px;
  width: 150px;
  object-fit: contain;
  display: block;
  margin: 2px auto;
}
.rn-predracun-cell-editor {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 24px;
  resize: none;
  border: 2px solid #2563eb;
  outline: 0;
  background: #fffdf0;
  padding: 2px 3px;
  font: inherit;
  z-index: 4;
  color: #172033;
}
.rn-predracun-warning,
.rn-predracun-error {
  padding: 8px 16px;
  white-space: pre-line;
  font-size: 12px;
  max-height: 100px;
  overflow: auto;
}
.rn-predracun-warning {
  background: #fff5d9;
  color: #805913;
}
.rn-predracun-error {
  background: #fff0f0;
  color: #a82e2e;
}
.rn-predracun-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: #fff;
  border-top: 1px solid #cdd6e2;
}
.rn-predracun-footer > div {
  flex: 1;
  min-width: 0;
}
.rn-predracun-totals {
  display: block;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.rn-predracun-status {
  display: block;
  font-size: 12px;
  color: #64748b;
  margin-top: 3px;
}
.rn-predracun-totals.is-matched {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #15803d;
}
.rn-predracun-totals.has-difference {
  color: #935f16;
}
.rn-predracun .rn-predracun-primary {
  background: #2563eb;
  border-color: #2563eb;
  color: white;
}
.rn-predracun-print {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.rn-predracun button:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}
@media (max-width: 700px) {
  .rn-predracun {
    width: calc(100vw - 8px);
    height: calc(100dvh - 8px);
    max-height: none;
    border-radius: 8px;
  }
  .rn-predracun-header {
    padding: 12px;
  }
  .rn-predracun-toolbar {
    padding: 8px;
    gap: 5px;
  }
  .rn-predracun-viewport {
    padding: 12px 8px;
  }
  .rn-predracun-footer {
    flex-wrap: wrap;
    padding: 10px;
  }
  .rn-predracun-footer > div {
    flex-basis: 100%;
  }
  .rn-predracun-grid thead {
    top: -12px;
  }
}
