/* ==========================================================================
   RAČUNI — uređivač dokumenta (racuni-editor.mjs)
   Gornja traka (sticky, zamagljena) + dva stupca: slagač u numeriranim
   karticama lijevo, A4 papir uživo desno (shadow DOM, vidi
   racun-dokument.mjs). Sve boje su tokeni iz racuni.css -> iCare radi sam;
   papir ostaje bijel. ≤1180px: jedan stupac s prekidačem Uredi | Pregled.
   ========================================================================== */

.rc-ed {
  --rc-ed-bar-h: 68px;
  --rc-ed-top: 0px;
  --rc-ed-canvas: color-mix(in srgb, var(--rc-ink) 3.5%, var(--rc-sunken));
  display: block;
}
.mobile-shell .rc-ed { --rc-ed-top: 54px; }

/* --- Gornja traka --------------------------------------------------------- */
.rc-ed-bar {
  position: sticky;
  top: var(--rc-ed-top);
  z-index: 60;
  margin: 0 calc(var(--main-pad-x, 26px) * -1);
  padding: 0 calc(var(--main-pad-x, 26px) + 70px) 0 var(--main-pad-x, 26px);
  background: color-mix(in srgb, var(--rc-surface) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.5) blur(14px);
  backdrop-filter: saturate(1.5) blur(14px);
  border-bottom: 1px solid var(--rc-line);
}
.rc-ed-bar-in {
  display: flex; align-items: center; gap: 14px;
  min-height: var(--rc-ed-bar-h);
  max-width: 1720px; margin: 0 auto;
}
.rc .rc-ed-back {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 10px 0 8px; margin-left: -8px;
  border-radius: var(--rc-r-sm);
  color: var(--rc-ink-3); font-size: 13px; font-weight: 560; text-decoration: none; white-space: nowrap;
  transition: background-color .12s ease, color .12s ease;
}
.rc .rc-ed-back:hover { background: var(--rc-sunken); color: var(--rc-ink); text-decoration: none; }
.rc .rc-ed-back:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--rc-ring); }
.rc-ed-bar-sep { width: 1px; height: 24px; background: var(--rc-line); flex: 0 0 auto; }
.rc-ed-ident { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 auto; }
.rc-ed-doc-ico {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--rc-accent-soft); color: var(--rc-accent-strong); border: 1px solid var(--rc-accent-line);
  transition: background-color .3s ease, color .3s ease, border-color .3s ease;
}
.rc-ed-doc-ico[data-kind="ponuda"] { background: var(--rc-violet-soft); color: var(--rc-violet); border-color: var(--rc-violet-line); }
.rc-ed-doc-ico[data-kind="storno"] { background: var(--rc-danger-soft); color: var(--rc-danger); border-color: var(--rc-danger-line); }
.rc-ed-doc-ico .rc-i { width: 19px; height: 19px; }
.rc-ed-ident-text { display: grid; gap: 3px; min-width: 0; }
.rc .rc-ed-title {
  display: flex; align-items: baseline; gap: 8px; min-width: 0;
  font-size: 17px; font-weight: 650; letter-spacing: -0.015em; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rc-ed-num { color: var(--rc-ink-2); font-variant-numeric: tabular-nums; font-weight: 600; }
.rc-ed-sub { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.rc-ed-save { display: inline-flex; min-width: 0; }
.rc-ed-save-in { display: inline-flex; align-items: center; gap: 5px; color: var(--rc-ink-3); font-size: 12px; white-space: nowrap; }
.rc-ed-save-in[data-state="saved"] .rc-i { color: var(--rc-ok); }
.rc-ed-save-in[data-state="dirty"] .rc-i { color: var(--rc-warn); width: 12px; height: 12px; fill: currentColor; }
.rc-ed-save-in[data-state="error"] { color: var(--rc-danger); }
.rc-ed-spinner {
  width: 11px; height: 11px; border-radius: 999px;
  border: 1.6px solid var(--rc-line-strong); border-top-color: var(--rc-accent);
  animation: rc-ed-spin .7s linear infinite;
}
@keyframes rc-ed-spin { to { transform: rotate(360deg); } }
.rc-ed-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.rc .rc-ed-actions .rc-btn { height: 36px; }
.rc-ed-more { border: 1px solid var(--rc-line-strong) !important; width: 36px !important; height: 36px !important; }

/* Kratka proslava izdavanja: kvačica se iscrta, ikona pozeleni */
.rc-ed-bar.is-celebrating .rc-ed-doc-ico {
  background: var(--rc-ok-soft); color: var(--rc-ok); border-color: var(--rc-ok-line);
  animation: rc-ed-pop .5s var(--rc-ease);
}
.rc-ed-tick path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: rc-ed-draw .55s .1s var(--rc-ease) forwards; stroke-width: 2.4; }
@keyframes rc-ed-draw { to { stroke-dashoffset: 0; } }
@keyframes rc-ed-pop { 0% { transform: scale(.8); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }

.rc-ed-banner { max-width: 1720px; margin: 14px auto 0; }

/* --- Raspored ------------------------------------------------------------ */
.rc-ed-grid {
  display: grid;
  grid-template-columns: minmax(0, 760px) minmax(420px, 1fr);
  gap: 24px;
  align-items: start;
  max-width: 1720px;
  margin: 0 auto;
  padding-top: 20px;
}
.rc-ed-compose { display: grid; gap: 12px; min-width: 0; }
.rc-ed-side {
  position: sticky;
  top: calc(var(--rc-ed-top) + var(--rc-ed-bar-h) + 16px);
  display: grid; gap: 12px; align-content: start;
  min-width: 0;
  max-height: calc(100vh - var(--rc-ed-top) - var(--rc-ed-bar-h) - 28px);
  overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin;
  padding: 0 2px 4px;
}
.rc-ed-paneswitch { display: none; }
.rc-ed-error { padding-top: 24px; }

/* --- Kartice slagača ------------------------------------------------------- */
.rc-ed-card {
  background: var(--rc-surface);
  border: 1px solid var(--rc-line);
  border-radius: var(--rc-r-lg);
  box-shadow: var(--rc-shadow-1);
  transition: border-color .15s ease, box-shadow .15s ease;
  scroll-margin-top: calc(var(--rc-ed-top) + var(--rc-ed-bar-h) + 16px);
}
.rc-ed-card:focus-within { border-color: var(--rc-line-strong); box-shadow: var(--rc-shadow-2); }
.rc-ed-card-head { display: flex; align-items: center; }
.rc .rc-ed-card-toggle {
  appearance: none;
  display: flex; align-items: center; gap: 12px;
  width: 100%; min-height: 58px; height: auto; padding: 14px 18px 14px 18px;
  border: 0; border-radius: var(--rc-r-lg); background: transparent; box-shadow: none;
  color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.rc .rc-ed-card-toggle:hover:not(:disabled) { background: transparent; }
.rc .rc-ed-card-toggle:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--rc-ring); }
.rc-ed-card .rc-step { width: 24px; height: 24px; flex: 0 0 auto; transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
.rc-ed-card-title { color: var(--rc-ink); font-size: 15px; font-weight: 640; letter-spacing: -0.01em; white-space: nowrap; }
.rc-ed-card-summary {
  flex: 1 1 auto; min-width: 0;
  color: var(--rc-ink-3); font-size: 13px; text-align: right;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0; transition: opacity .15s ease;
}
.rc-ed-card[data-collapsed] .rc-ed-card-summary { opacity: 1; }
.rc-ed-card-summary strong { color: var(--rc-ink); font-weight: 620; }
.rc-ed-card-summary .rc-mono { color: var(--rc-ink-2); }
.rc-ed-card-summary .is-todo { color: var(--rc-accent-strong); font-weight: 560; }
.rc-ed-summary-tag { display: inline-flex; margin-left: 4px; padding: 0 6px; border-radius: 5px; background: var(--rc-sunken); border: 1px solid var(--rc-line); color: var(--rc-ink-3); font-size: 11px; font-weight: 600; }
.rc-ed-chev { color: var(--rc-ink-4); transition: transform .18s var(--rc-ease); flex: 0 0 auto; margin-left: auto; }
.rc-ed-card-summary + .rc-ed-chev { margin-left: 0; }
.rc-ed-card[data-collapsed] .rc-ed-chev { transform: rotate(-90deg); }
.rc-ed-card-body { display: grid; gap: 16px; padding: 2px 20px 20px 54px; min-width: 0; }
.rc-ed-card[data-collapsed] .rc-ed-card-body { display: none; }
.rc-ed-card.rc-ed-flash, .rc-ed-flash { animation: rc-ed-flash 1.3s var(--rc-ease); }
@keyframes rc-ed-flash {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--rc-accent) 45%, transparent); }
  30% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--rc-accent) 22%, transparent); }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.rc-ed-compose-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 6px 0 4px; }

/* Rešetke polja */
.rc .rc-ed-grid-6 { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px 12px; }
.rc .rc-ed-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 12px; }
.rc .rc-ed-col-2 { grid-column: span 2; }
.rc .rc-ed-col-3 { grid-column: span 3; }
.rc .rc-ed-col-4 { grid-column: span 4; }
.rc .rc-ed-col-6 { grid-column: 1 / -1; }
.rc .rc-ed .rc-help.is-empty { display: none; }
.rc .rc-ed .rc-field > .rc-help { margin-top: -1px; }
.rc .rc-ed-mono-input { font-family: var(--rc-mono); font-size: 13.5px; letter-spacing: 0.02em; }
.rc .rc-ed-mono-input::placeholder { font-family: var(--font-sans); letter-spacing: 0; }
.rc .rc-ed-has-error { border-color: var(--rc-danger) !important; }
.rc .rc-ed-static {
  display: flex; align-items: center; gap: 8px;
  min-height: var(--rc-control); padding: 0 12px;
  border: 1px dashed var(--rc-line-strong); border-radius: var(--rc-r);
  color: var(--rc-ink-2); font-size: 13px;
}
.rc .rc-ed-static .rc-i { color: var(--rc-ink-4); }

.rc .rc-ed-linkbtn {
  appearance: none; display: inline-flex; align-items: center; gap: 5px;
  height: auto; min-height: 0; padding: 2px 0; border: 0; background: none; box-shadow: none;
  color: var(--rc-accent-strong); font: inherit; font-size: 12.5px; font-weight: 560; cursor: pointer;
}
.rc .rc-ed-linkbtn:hover { text-decoration: underline; text-underline-offset: 2px; background: none; }
.rc .rc-ed-linkbtn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--rc-ring); border-radius: 4px; }

.rc .rc-ed-disclosure {
  appearance: none; display: flex; align-items: center; gap: 8px; width: 100%;
  min-height: 0; height: auto; padding: 4px 0; border: 0; background: none; box-shadow: none;
  color: var(--rc-ink-2); font: inherit; font-size: 13px; font-weight: 600; text-align: left; cursor: pointer;
}
.rc .rc-ed-disclosure:hover { color: var(--rc-ink); background: none; }
.rc .rc-ed-disclosure:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--rc-ring); border-radius: 6px; }
.rc-ed-disc-chev { color: var(--rc-ink-4); transition: transform .15s var(--rc-ease); }
.rc-ed-disclosure[aria-expanded="true"] .rc-ed-disc-chev { transform: rotate(90deg); }
.rc-ed-disclosure-hint { color: var(--rc-ink-4); font-weight: 450; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

.rc-ed-inline-note {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 9px 12px; border-radius: var(--rc-r);
  background: var(--rc-sunken); border: 1px solid var(--rc-line);
  color: var(--rc-ink-2); font-size: 12.5px;
}
.rc-ed-inline-note .rc-i { margin-top: 2px; color: var(--rc-ink-3); }
.rc-ed-inline-note[data-tone="warn"] { background: var(--rc-warn-soft); border-color: var(--rc-warn-line); color: var(--rc-warn); }
.rc-ed-inline-note[data-tone="warn"] .rc-i { color: currentColor; }

/* --- 1. Vozilo ------------------------------------------------------------ */
.rc-ed-vsearch { display: grid; gap: 10px; }
.rc-ed-search-big { position: relative; }
.rc-ed-search-big > .rc-i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--rc-ink-4); pointer-events: none; width: 18px; height: 18px; }
.rc .rc-ed-search-big .rc-input { height: 50px; min-height: 50px; padding-left: 42px; border-radius: 12px; font-size: 15px; font-weight: 500; }
.rc-ed-vsearch-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rc-ed-novehicle {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border: 1px dashed var(--rc-line-strong); border-radius: 12px;
}
.rc-ed-novehicle > div { flex: 1 1 auto; display: grid; gap: 1px; }
.rc-ed-novehicle strong { color: var(--rc-ink); font-weight: 600; font-size: 13.5px; }
.rc-ed-novehicle small { color: var(--rc-ink-3); font-size: 12.5px; }
.rc-ed-novehicle-ico { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: var(--rc-sunken); color: var(--rc-ink-3); border: 1px solid var(--rc-line); }

.rc-ed-vcard {
  display: grid; grid-template-columns: 128px minmax(0, 1fr) auto; gap: 16px; align-items: center;
  padding: 12px; border: 1px solid var(--rc-line); border-radius: 14px;
  background: linear-gradient(180deg, var(--rc-surface), var(--rc-sunken));
}
.rc-ed-vphoto {
  width: 128px; height: 88px; border-radius: 10px; overflow: hidden;
  background: var(--rc-sunken); border: 1px solid var(--rc-line);
  display: inline-flex; align-items: center; justify-content: center; color: var(--rc-ink-4);
}
.rc-ed-vphoto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rc-ed-vphoto .rc-i { width: 28px; height: 28px; }
.rc-ed-vmain { display: grid; gap: 5px; min-width: 0; }
.rc-ed-vtitle { color: var(--rc-ink); font-size: 15.5px; font-weight: 650; letter-spacing: -0.012em; line-height: 1.25; }
.rc-ed-vvin { display: flex; align-items: center; gap: 4px; color: var(--rc-ink-2); font-size: 12.5px; }
.rc-ed-vvin .rc-mono { letter-spacing: 0.05em; }
.rc-ed-vvin.is-missing { color: var(--rc-warn); gap: 6px; }
.rc-ed-vchips { display: flex; flex-wrap: wrap; gap: 5px; }
.rc-ed-vchips span {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px;
  border-radius: 6px; background: var(--rc-surface); border: 1px solid var(--rc-line);
  color: var(--rc-ink-2); font-size: 12px; font-weight: 520; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.rc-ed-vactions { display: grid; gap: 6px; justify-items: end; align-self: start; }
.rc-ed-sub-toggle { margin-top: -2px; }
.rc-ed-vdata { display: grid; gap: 10px; padding: 14px; border-radius: 12px; background: var(--rc-sunken); border: 1px solid var(--rc-line); }
.rc-ed-vdata .rc-input { background: var(--rc-surface); }
.rc-ed-vdata-help { display: flex; align-items: center; gap: 6px; }

/* Prijedlozi u padajućem izborniku (typeahead) */
.rc .rc-ed-ta-vehicle, .rc .rc-ed-ta-partner { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; }
.rc .rc-ed-ta-main { display: grid; gap: 1px; min-width: 0; flex: 1 1 auto; }
.rc .rc-ed-ta-main strong { color: var(--rc-ink); font-weight: 580; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc .rc-ed-ta-main small { color: var(--rc-ink-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc .rc-ed-ta-side { display: grid; justify-items: end; gap: 3px; flex: 0 0 auto; }
.rc .rc-ed-ta-side strong { color: var(--rc-ink); font-size: 12.5px; font-weight: 600; }

/* --- 2. Kupac --------------------------------------------------------------- */
.rc-ed-buyer-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rc-ed-tipseg { flex: 1 1 360px; }
.rc .rc-ed-tipseg .rc-seg-btn { height: 34px; min-height: 34px; }
.rc-ed-linked {
  display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 4px 0 10px;
  border-radius: 999px; background: var(--rc-accent-soft); border: 1px solid var(--rc-accent-line);
  color: var(--rc-accent-strong); font-size: 12px; font-weight: 600;
}
.rc .rc-ed-linked .rc-icon-btn { color: inherit; }
.rc-ed-subsection { display: grid; gap: 12px; padding: 14px; border-radius: 12px; background: var(--rc-violet-soft); border: 1px solid var(--rc-violet-line); }
.rc-ed-subsection-head { display: flex; align-items: center; gap: 8px; color: var(--rc-violet); font-size: 12.5px; flex-wrap: wrap; }
.rc-ed-subsection-head strong { font-weight: 650; }
.rc-ed-subsection-head span { color: var(--rc-ink-3); }
.rc-ed-subsection .rc-input { background: var(--rc-surface); }

/* --- 3. Stavke ------------------------------------------------------------ */
.rc-ed-lines { display: grid; gap: 10px; }
.rc-ed-lines-empty {
  display: flex; align-items: center; gap: 14px;
  padding: 18px; border: 1.5px dashed var(--rc-line-strong); border-radius: 12px; color: var(--rc-ink-4);
}
.rc-ed-lines-empty > div { display: grid; gap: 2px; }
.rc-ed-lines-empty strong { color: var(--rc-ink-2); font-weight: 600; }
.rc-ed-lines-empty small { color: var(--rc-ink-3); font-size: 12.5px; }

.rc-ed-line {
  position: relative;
  display: grid; gap: 8px;
  padding: 10px 12px 10px 8px;
  border: 1px solid var(--rc-line); border-radius: 12px;
  background: var(--rc-surface);
  transition: border-color .12s ease, box-shadow .12s ease, opacity .14s ease, transform .14s ease;
}
.rc-ed-line:hover { border-color: var(--rc-line-strong); }
.rc-ed-line:focus-within { border-color: var(--rc-accent-line); box-shadow: 0 0 0 3px color-mix(in srgb, var(--rc-accent) 9%, transparent); }
.rc-ed-line.is-ppmv { background: var(--rc-sunken); border-style: dashed; }
.rc-ed-line.is-new { animation: rc-ed-in .24s var(--rc-ease); }
.rc-ed-line.is-leaving { opacity: 0; transform: translateX(8px); }
.rc-ed-line.is-dragging { opacity: .45; }
.rc-ed-line.is-drop-before::before, .rc-ed-line.is-drop-after::after {
  content: ""; position: absolute; left: 8px; right: 8px; height: 2px; border-radius: 2px; background: var(--rc-accent);
}
.rc-ed-line.is-drop-before::before { top: -7px; }
.rc-ed-line.is-drop-after::after { bottom: -7px; }
@keyframes rc-ed-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.rc-ed-line-top { display: grid; grid-template-columns: 24px auto minmax(0, 1fr) 32px; align-items: center; gap: 8px; }
.rc .rc-ed-grip {
  appearance: none; display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 32px; min-height: 32px; padding: 0; border: 0; border-radius: 6px;
  background: transparent; box-shadow: none; color: var(--rc-ink-4); cursor: grab;
}
.rc .rc-ed-grip:hover { background: var(--rc-sunken); color: var(--rc-ink-2); }
.rc .rc-ed-grip:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--rc-ring); }
.rc-ed-line-kind {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px;
  border-radius: 7px; background: var(--rc-sunken); border: 1px solid var(--rc-line);
  color: var(--rc-ink-3); font-size: 11.5px; font-weight: 620; white-space: nowrap;
}
.rc-ed-line-kind[data-kind="vozilo"] { background: var(--rc-accent-soft); border-color: var(--rc-accent-line); color: var(--rc-accent-strong); }
.rc-ed-line-kind[data-kind="ppmv"] { background: var(--rc-surface); }
.rc .rc-ed-line-opis { font-weight: 560; color: var(--rc-ink); }
.rc .rc-ed-line-del { color: var(--rc-ink-4); }
.rc .rc-ed-line-del:hover:not(:disabled) { color: var(--rc-danger); background: var(--rc-danger-soft); border-color: var(--rc-danger-line); }
.rc .rc-ed-line-detail {
  margin-left: 32px; width: calc(100% - 32px);
  min-height: 34px; padding: 7px 11px;
  color: var(--rc-ink-2); font-size: 12.5px; line-height: 1.5; resize: vertical;
}
.rc-ed-ppmv-note { margin-left: 32px; display: flex; align-items: center; gap: 6px; color: var(--rc-ink-3); font-size: 12px; }

.rc-ed-line-nums { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-left: 32px; }
.rc .rc-ed-mini { display: grid; gap: 4px; min-width: 0; font-weight: 400; }
.rc .rc-ed-mini > span, .rc .rc-ed-mini-head { color: var(--rc-ink-3); font-size: 11.5px; font-weight: 560; line-height: 18px; }
.rc .rc-ed-mini-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.rc .rc-ed-mini--qty { flex: 0 0 64px; }
.rc .rc-ed-mini--unit { flex: 0 0 70px; }
.rc .rc-ed-mini--price { flex: 1 1 150px; }
.rc .rc-ed-mini--disc { flex: 0 0 84px; }
.rc .rc-ed-mini--tax { flex: 1 1 150px; }
.rc .rc-ed-mini .rc-input, .rc .rc-ed-mini .rc-select { height: 36px; min-height: 36px; }
.rc .rc-ed-mini--price .rc-input { font-weight: 600; color: var(--rc-ink); }
.rc .rc-ed-unos {
  appearance: none; display: inline-flex; align-items: center; gap: 4px;
  height: 18px; min-height: 18px; padding: 0 6px; border: 1px solid var(--rc-line); border-radius: 999px;
  background: var(--rc-surface); box-shadow: none;
  color: var(--rc-ink-2); font: inherit; font-size: 11px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.rc .rc-ed-unos:hover { border-color: var(--rc-accent-line); color: var(--rc-accent-strong); background: var(--rc-accent-soft); }
.rc .rc-ed-unos:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--rc-ring); }
.rc .rc-ed-unos .rc-i { width: 11px; height: 11px; }
.rc-ed-fixed-tax {
  display: flex; align-items: center; height: 36px; padding: 0 11px;
  border: 1px dashed var(--rc-line-strong); border-radius: var(--rc-r);
  color: var(--rc-ink-3); font-size: 13px; white-space: nowrap;
}
.rc-ed-line-total { display: grid; justify-items: end; gap: 1px; flex: 1 0 128px; margin-left: auto; text-align: right; min-width: 0; }
.rc-ed-line-total > span { color: var(--rc-ink-3); font-size: 11.5px; font-weight: 560; line-height: 18px; }
.rc-ed-line-total strong { color: var(--rc-ink); font-size: 16px; font-weight: 660; letter-spacing: -0.01em; line-height: 22px; }
.rc-ed-line-total small { color: var(--rc-ink-4); font-size: 11px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; min-height: 14px; }
.rc-ed-line-foot { display: flex; align-items: center; gap: 14px; margin-left: 32px; min-height: 22px; flex-wrap: wrap; }
.rc .rc-ed-kpd { display: inline-flex; align-items: center; gap: 6px; color: var(--rc-ink-4); font-size: 11.5px; font-weight: 600; }
.rc .rc-ed-kpd .rc-input { width: 104px; height: 26px; min-height: 26px; padding: 0 8px; font-size: 12px; font-family: var(--rc-mono); box-shadow: none; }
.rc-ed-line-sub { margin-left: auto; color: var(--rc-ink-4); font-size: 11.5px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

.rc-ed-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.rc .rc-ed-quick .rc-chip { height: 28px; min-height: 28px; padding: 0 10px; }
.rc .rc-ed-chip-main { border-style: solid; color: var(--rc-accent-strong); border-color: var(--rc-accent-line); background: var(--rc-accent-soft); }

.rc-ed-totals { display: grid; justify-items: end; gap: 10px; padding-top: 14px; border-top: 1px solid var(--rc-line); }
.rc-ed-totals:empty { display: none; }
.rc-ed-trows { display: grid; width: min(380px, 100%); }
.rc-ed-trow { display: flex; justify-content: space-between; gap: 16px; padding: 4px 0; color: var(--rc-ink-2); font-size: 13px; }
.rc-ed-trow .rc-num { color: var(--rc-ink); font-weight: 520; }
.rc-ed-trow.is-strong { margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--rc-line); color: var(--rc-ink); font-weight: 620; }
.rc-ed-trow.is-strong .rc-num { font-weight: 650; }
.rc-ed-trow.is-paid .rc-num { color: var(--rc-ok); }
.rc-ed-due {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: min(380px, 100%); padding: 12px 14px 12px 16px;
  border-radius: 12px; background: var(--rc-accent-soft); border: 1px solid var(--rc-accent-line);
}
.rc-ed-due-label { display: grid; gap: 1px; color: var(--rc-accent-strong); font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.rc-ed-due-label small { color: var(--rc-ink-3); font-size: 11.5px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.rc-ed-due-value { color: var(--rc-ink); font-size: 24px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }

/* --- 4. Porezni režim -------------------------------------------------------- */
.rc-ed-regimes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rc-ed-regimes[hidden] { display: none; }
.rc .rc-ed-regime {
  appearance: none; position: relative;
  display: grid; gap: 6px; align-content: start;
  height: auto; min-height: 0; padding: 13px 14px;
  border: 1px solid var(--rc-line-strong); border-radius: 12px;
  background: var(--rc-surface); box-shadow: var(--rc-shadow-1);
  color: inherit; font: inherit; text-align: left; cursor: pointer;
  transition: border-color .12s ease, background-color .12s ease, box-shadow .12s ease;
}
.rc .rc-ed-regime:hover:not(:disabled) { border-color: var(--rc-line-hover); background: var(--rc-surface); }
.rc .rc-ed-regime:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--rc-ring); }
.rc .rc-ed-regime.is-active { border-color: var(--rc-accent); background: color-mix(in srgb, var(--rc-accent-soft) 70%, var(--rc-surface)); box-shadow: 0 0 0 1px var(--rc-accent); }
.rc-ed-regime-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rc-ed-regime-top strong { color: var(--rc-ink); font-size: 13.5px; font-weight: 640; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-ed-radio { flex: 0 0 auto; width: 16px; height: 16px; border-radius: 999px; border: 1.5px solid var(--rc-line-strong); background: var(--rc-surface); transition: border .12s ease; }
.rc-ed-regime.is-active .rc-ed-radio { border: 5px solid var(--rc-accent); }
.rc-ed-regime-desc { color: var(--rc-ink-3); font-size: 12px; line-height: 1.45; padding-left: 24px; }
.rc .rc-ed-regime.is-small { padding: 10px 12px; }
.rc .rc-ed-regime.is-small strong { font-size: 13px; font-weight: 580; }
.rc-ed-suggest-tag { display: inline-flex; align-items: center; gap: 3px; margin-left: auto; padding: 0 6px; height: 19px; border-radius: 6px; background: var(--rc-violet-soft); border: 1px solid var(--rc-violet-line); color: var(--rc-violet); font-size: 11px; font-weight: 650; flex: 0 0 auto; }
.rc-ed-suggest-tag .rc-i { width: 11px; height: 11px; }
.rc-ed-suggest {
  display: flex; gap: 10px; padding: 11px 13px;
  border-radius: 12px; background: var(--rc-violet-soft); border: 1px solid var(--rc-violet-line);
  color: var(--rc-violet); font-size: 12.5px;
}
.rc-ed-suggest > .rc-i { margin-top: 1px; }
.rc-ed-suggest strong { color: var(--rc-ink); font-weight: 620; }
.rc-ed-suggest p { color: var(--rc-ink-2); margin-top: 2px; }
.rc-ed-suggest.is-check { background: var(--rc-amber-soft); border-color: var(--rc-amber-line); color: var(--rc-amber); }
.rc-ed-channel { display: flex; gap: 10px; align-items: flex-start; padding: 2px 2px 0; font-size: 12.5px; color: var(--rc-ink-3); }
.rc-ed-channel:empty { display: none; }
.rc-ed-channel > .rc-i { margin-top: 2px; color: var(--rc-ink-4); }
.rc-ed-channel > div { display: grid; gap: 1px; }
.rc-ed-channel strong { color: var(--rc-ink); font-weight: 600; font-size: 13px; }
.rc-ed-notes { border-radius: 12px; border: 1px solid var(--rc-line); background: var(--rc-sunken); padding: 12px 14px; }
.rc-ed-notes-head { display: flex; align-items: center; gap: 6px; color: var(--rc-ink-3); font-size: 11.5px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; margin-bottom: 8px; }
.rc-ed-notes-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.rc-ed-notes-list li { display: grid; grid-template-columns: 14px 1fr; gap: 8px; color: var(--rc-ink-2); font-size: 12.5px; line-height: 1.5; }
.rc-ed-notes-list li .rc-i { margin-top: 3px; color: var(--rc-ink-4); width: 12px; height: 12px; }
.rc-ed-notes-list li.is-empty { color: var(--rc-ink-3); }
.rc-ed-extra { padding-top: 2px; }

/* --- 5. Plaćanje -------------------------------------------------------------- */
.rc .rc-ed-payseg .rc-seg-btn { height: 36px; min-height: 36px; }
.rc-ed-rok { align-items: center; }
.rc .rc-ed-rok-date { position: relative; overflow: hidden; }
.rc .rc-ed-rok-date input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; border: 0; padding: 0; min-height: 0; }
.rc-ed-payinfo { display: grid; gap: 0; padding: 4px 14px; border-radius: 12px; background: var(--rc-sunken); border: 1px solid var(--rc-line); }
.rc-ed-payinfo-row { display: flex; align-items: center; gap: 12px; padding: 7px 0; font-size: 12.5px; }
.rc-ed-payinfo-row + .rc-ed-payinfo-row { border-top: 1px solid var(--rc-line); }
.rc-ed-payinfo-row > span { color: var(--rc-ink-3); flex: 0 0 150px; }
.rc-ed-payinfo-row strong { color: var(--rc-ink); font-weight: 560; min-width: 0; overflow-wrap: anywhere; }
.rc-ed-payinfo-row .rc-icon-btn { margin-left: auto; }
.rc-ed-missing { color: var(--rc-ink-4); font-style: normal; font-weight: 450; font-family: var(--font-sans); }

/* --- 6. Datumi i napomene ------------------------------------------------------ */
.rc-ed-sentences { margin-top: 4px; }
.rc .rc-ed-sentences .rc-chip { height: 26px; min-height: 26px; font-size: 12px; }
.rc .rc-ed-internal .rc-label .rc-i { color: var(--rc-ink-4); }
.rc .rc-ed-internal .rc-textarea {
  background: repeating-linear-gradient(-45deg, transparent 0 8px, color-mix(in srgb, var(--rc-ink) 2.5%, transparent) 8px 9px), var(--rc-sunken);
  border-style: dashed; box-shadow: none; color: var(--rc-ink-2);
}

/* --- Desni stupac: provjera, zarada, papir ---------------------------------------- */
.rc-ed-check {
  border: 1px solid var(--rc-line); border-radius: var(--rc-r-lg);
  background: var(--rc-surface); box-shadow: var(--rc-shadow-1);
  padding: 4px;
}
.rc-ed-check:empty { display: none; }
.rc-ed-check-ok { display: flex; align-items: center; gap: 10px; padding: 9px 10px; }
.rc-ed-check-ok > .rc-i { color: var(--rc-ok); width: 20px; height: 20px; }
.rc-ed-check-ok > div { display: grid; }
.rc-ed-check-ok strong { color: var(--rc-ink); font-size: 13.5px; font-weight: 620; }
.rc-ed-check-ok small { color: var(--rc-ink-3); font-size: 12px; }
.rc-ed-check-head { display: flex; align-items: center; gap: 8px; padding: 9px 10px 5px; font-size: 13px; }
.rc-ed-check-head strong { color: var(--rc-ink); font-weight: 620; }
.rc-ed-check-head span { color: var(--rc-ink-3); font-size: 12px; }
.rc-ed-check-head[data-tone="danger"] > .rc-i { color: var(--rc-danger); }
.rc-ed-check-head[data-tone="warn"] > .rc-i { color: var(--rc-warn); }
.rc-ed-check-list { list-style: none; margin: 0; padding: 0 0 2px; display: grid; gap: 1px; }
.rc .rc-ed-check-item {
  appearance: none; display: grid; grid-template-columns: 16px minmax(0, 1fr) 14px; gap: 8px; align-items: start;
  width: 100%; height: auto; min-height: 0; padding: 7px 10px;
  border: 0; border-radius: 9px; background: transparent; box-shadow: none;
  color: var(--rc-ink-2); font: inherit; font-size: 12.5px; line-height: 1.45; text-align: left; cursor: pointer;
}
.rc .rc-ed-check-item:hover { background: var(--rc-sunken); color: var(--rc-ink); }
.rc .rc-ed-check-item:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--rc-ring); }
.rc .rc-ed-check-item > .rc-i:first-child { margin-top: 2px; }
.rc .rc-ed-check-item[data-tone="danger"] > .rc-i:first-child { color: var(--rc-danger); }
.rc .rc-ed-check-item[data-tone="warn"] > .rc-i:first-child { color: var(--rc-warn); }
.rc .rc-ed-check-go { margin-top: 2px; color: var(--rc-ink-4); opacity: 0; transition: opacity .12s ease; }
.rc .rc-ed-check-item:hover .rc-ed-check-go { opacity: 1; }

.rc-ed-profit {
  border: 1px solid var(--rc-line); border-radius: var(--rc-r-lg);
  background: var(--rc-surface); box-shadow: var(--rc-shadow-1);
  overflow: hidden;
}
.rc-ed-profit[hidden] { display: none; }
.rc .rc-ed-profit-main {
  appearance: none; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  width: 100%; height: auto; min-height: 0; padding: 11px 14px;
  border: 0; background: transparent; box-shadow: none;
  color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.rc .rc-ed-profit-main:hover { background: var(--rc-sunken); }
.rc .rc-ed-profit-main:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--rc-ring); }
.rc-ed-profit-label { display: inline-flex; align-items: center; gap: 6px; color: var(--rc-ink-3); font-size: 12px; font-weight: 600; }
.rc-ed-profit-value { display: inline-flex; align-items: baseline; gap: 8px; }
.rc-ed-profit-value strong { color: var(--rc-ink); font-size: 17px; font-weight: 680; letter-spacing: -0.015em; }
.rc-ed-profit-value span { color: var(--rc-ink-3); font-size: 12.5px; font-weight: 560; }
.rc-ed-profit-value[data-tone="ok"] strong { color: var(--rc-ok); }
.rc-ed-profit-value[data-tone="danger"] strong { color: var(--rc-danger); }
.rc-ed-profit-diff { display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 7px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--rc-sunken); color: var(--rc-ink-2); border: 1px solid var(--rc-line); }
.rc-ed-profit-diff[data-tone="ok"] { background: var(--rc-ok-soft); border-color: var(--rc-ok-line); color: var(--rc-ok); }
.rc-ed-profit-diff[data-tone="warn"] { background: var(--rc-warn-soft); border-color: var(--rc-warn-line); color: var(--rc-warn); }
.rc-ed-profit-main .rc-ed-chev { margin-left: auto; }
.rc-ed-profit-main[aria-expanded="false"] .rc-ed-chev { transform: rotate(-90deg); }
.rc-ed-profit-detail { padding: 0 14px 12px; border-top: 1px solid var(--rc-line); }
.rc-ed-profit-dl { display: grid; gap: 0; margin: 8px 0 0; font-size: 12.5px; }
.rc-ed-profit-dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.rc-ed-profit-dl dt { color: var(--rc-ink-3); }
.rc-ed-profit-dl dd { margin: 0; color: var(--rc-ink); font-weight: 540; white-space: nowrap; }
.rc-ed-profit-dl .is-strong { border-top: 1px solid var(--rc-line); margin-top: 3px; padding-top: 7px; }
.rc-ed-profit-dl .is-strong dt, .rc-ed-profit-dl .is-strong dd { color: var(--rc-ink); font-weight: 650; }
.rc-ed-profit-dl .is-muted dt, .rc-ed-profit-dl .is-muted dd { color: var(--rc-ink-4); font-weight: 450; }
.rc-ed-profit-foot { margin-top: 6px; color: var(--rc-ink-4); font-size: 11.5px; }
.rc-ed-profit-empty { display: flex; align-items: center; gap: 8px; padding: 10px 14px; color: var(--rc-ink-3); font-size: 12.5px; }

.rc-ed-paper-card {
  border: 1px solid var(--rc-line); border-radius: var(--rc-r-lg);
  background: var(--rc-surface); box-shadow: var(--rc-shadow-1);
  overflow: hidden; min-width: 0;
}
.rc-ed-paper-bar { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border-bottom: 1px solid var(--rc-line); }
.rc-ed-paper-title { display: inline-flex; align-items: center; gap: 7px; flex: 1 1 auto; min-width: 0; color: var(--rc-ink-2); font-size: 12.5px; font-weight: 620; white-space: nowrap; }
.rc-ed-paper-title .rc-i { color: var(--rc-ink-4); }
.rc-ed-paper-hint { margin-left: 2px; padding: 0 6px; border-radius: 5px; background: var(--rc-sunken); color: var(--rc-ink-4); font-size: 10.5px; font-weight: 650; letter-spacing: .04em; }
.rc .rc-ed-zoom { padding: 2px; border-radius: 9px; }
.rc .rc-ed-zoom .rc-seg-btn { height: 26px; min-height: 26px; padding: 0 9px; font-size: 12px; border-radius: 7px; }
.rc-ed-paper-scroll {
  position: relative;
  padding: 22px;
  background:
    radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--rc-ink) 7%, transparent) 1px, transparent 0) 0 0 / 14px 14px,
    var(--rc-ed-canvas);
  overflow: hidden;
}
.rc-ed-paper-scroll.is-zoomed { overflow-x: auto; }
.rc-ed-paper-host {
  display: block; margin: 0 auto;
  background: #fff;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(16, 24, 40, .06), var(--rc-shadow-paper);
  overflow: hidden;
}
.rc-ed-paper-scroll.is-zoomed .rc-ed-paper-host { margin: 0; }
.rc-ed-paper-skel { padding: 22px; height: 760px; background: var(--rc-ed-canvas); }

/* --- Izdani dokument: papir glavni + desna traka ------------------------------------- */
.rc-ed-issued {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px; align-items: start;
  max-width: 1500px; margin: 0 auto; padding-top: 20px;
}
.rc-ed-hero { display: grid; gap: 12px; min-width: 0; }
.rc-ed-paper-card.is-hero .rc-ed-paper-scroll { padding: 32px; }
.rc-ed-paper-card.is-hero { box-shadow: var(--rc-shadow-2); }
.rc-ed-rail {
  position: sticky; top: calc(var(--rc-ed-top) + var(--rc-ed-bar-h) + 16px);
  display: grid; gap: 12px; align-content: start;
  max-height: calc(100vh - var(--rc-ed-top) - var(--rc-ed-bar-h) - 28px);
  overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 0 2px 4px;
}
.rc-ed-rail-card {
  display: grid; gap: 10px;
  padding: 14px 16px 16px;
  border: 1px solid var(--rc-line); border-radius: var(--rc-r-lg);
  background: var(--rc-surface); box-shadow: var(--rc-shadow-1);
}
.rc-ed-rail-head { display: flex; align-items: center; gap: 7px; color: var(--rc-ink-3); font-size: 11.5px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; }
.rc-ed-rail-head .rc-i { color: var(--rc-ink-4); }
.rc .rc-ed-rail-link { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; font-size: 12px; letter-spacing: 0; text-transform: none; font-weight: 600; }
.rc-ed-rail-hint { margin-left: auto; color: var(--rc-ink-4); letter-spacing: 0; text-transform: none; font-weight: 500; }
.rc-ed-status-line { display: flex; flex-wrap: wrap; gap: 6px; }
.rc-ed-probni-note { display: flex; gap: 7px; align-items: flex-start; padding: 8px 10px; border-radius: 9px; background: var(--rc-amber-soft); border: 1px solid var(--rc-amber-line); color: var(--rc-amber); font-size: 12.5px; }
.rc-ed-probni-note .rc-i { margin-top: 2px; }
.rc .rc-ed-dl { grid-template-columns: minmax(84px, max-content) 1fr; gap: 6px 14px; font-size: 12.5px; }
.rc-ed-break { overflow-wrap: anywhere; font-size: 11.5px !important; }
.rc-ed-paycard[data-tone="ok"] { border-color: var(--rc-ok-line); }
.rc-ed-paycard[data-tone="danger"] { border-color: var(--rc-danger-line); }
.rc-ed-pay-big { display: grid; gap: 2px; }
.rc-ed-pay-label { color: var(--rc-ink-3); font-size: 12.5px; font-weight: 560; }
.rc-ed-pay-big strong { color: var(--rc-ink); font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.rc-ed-paycard[data-tone="ok"] .rc-ed-pay-big strong { color: var(--rc-ok); }
.rc-ed-paycard[data-tone="muted"] .rc-ed-pay-big strong { color: var(--rc-ink-3); text-decoration: line-through; }
.rc-ed-pay-meta { display: inline-flex; align-items: center; gap: 5px; color: var(--rc-ink-3); font-size: 12.5px; }
.rc-ed-pay-meta.is-overdue { color: var(--rc-danger); font-weight: 600; }
.rc-ed-mini-vehicle { display: flex; align-items: center; gap: 12px; min-width: 0; }
.rc-ed-mini-vehicle > div { display: grid; gap: 2px; min-width: 0; }
.rc-ed-mini-vehicle strong { color: var(--rc-ink); font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.rc-ed-mini-vehicle .rc-mono { color: var(--rc-ink-3); font-size: 11.5px; }
.rc-ed-mini-vehicle small { color: var(--rc-ok); font-size: 12px; font-weight: 560; }
.rc-ed-buyer-card { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.rc-ed-buyer-card > div { display: grid; gap: 1px; min-width: 0; font-size: 12.5px; color: var(--rc-ink-2); }
.rc-ed-buyer-card strong { color: var(--rc-ink); font-size: 13.5px; font-weight: 620; margin-bottom: 2px; overflow-wrap: anywhere; }
.rc-ed-rel { display: grid; gap: 4px; margin: 0 -6px; }
.rc .rc-ed-rel-row { display: flex; align-items: center; gap: 10px; padding: 7px 6px; border-radius: 9px; color: inherit; text-decoration: none; min-width: 0; }
.rc .rc-ed-rel-row:hover { background: var(--rc-sunken); text-decoration: none; }
.rc-ed-rel-ico { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; flex: 0 0 auto; background: var(--rc-accent-soft); color: var(--rc-accent-strong); border: 1px solid var(--rc-accent-line); }
.rc-ed-rel-ico[data-kind="ponuda"] { background: var(--rc-violet-soft); color: var(--rc-violet); border-color: var(--rc-violet-line); }
.rc-ed-rel-ico[data-kind="storno"] { background: var(--rc-danger-soft); color: var(--rc-danger); border-color: var(--rc-danger-line); }
.rc-ed-rel-main { display: grid; min-width: 0; flex: 1 1 auto; }
.rc-ed-rel-main strong { color: var(--rc-ink); font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-ed-rel-main small { color: var(--rc-ink-3); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-ed-rel-amount { color: var(--rc-ink-2); font-size: 12.5px; font-weight: 560; white-space: nowrap; }
.rc .rc-ed-internal-card .rc-textarea { min-height: 64px; font-size: 13px; border-style: dashed; box-shadow: none; background: var(--rc-sunken); }

/* --- Dijalozi uređivača -------------------------------------------------------------- */
.rc-ed-dialog-sum { display: grid; grid-template-columns: 1.6fr 1fr 0.7fr; gap: 1px; border-radius: 12px; overflow: hidden; border: 1px solid var(--rc-line); background: var(--rc-line); }
.rc-ed-dialog-sum > div { display: grid; gap: 2px; padding: 10px 12px; background: var(--rc-sunken); min-width: 0; }
.rc-ed-dialog-sum span { color: var(--rc-ink-3); font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.rc-ed-dialog-sum strong { color: var(--rc-ink); font-size: 14px; font-weight: 640; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-ed-dialog-section { display: grid; gap: 8px; }
.rc-ed-dialog-label { color: var(--rc-ink-3); font-size: 11.5px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; }
.rc-ed-dialog-label.is-danger { color: var(--rc-danger); }
.rc-ed-dialog-label.is-warn { color: var(--rc-warn); }
.rc .rc-dialog .rc-ed-check-list { padding: 4px; border-radius: 12px; border: 1px solid var(--rc-line); }
.rc .rc-dialog .rc-ed-check-go { opacity: 1; }
.rc .rc-effects .rc-effect.rc-check { cursor: pointer; }
.rc .rc-effects .rc-effect.rc-check:hover { background: var(--rc-surface); }
.rc .rc-effects .rc-effect.rc-check input:disabled + .rc-effect-text { opacity: .6; }
.rc-ed-steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--rc-ink-2); font-size: 13.5px; }
.rc-ed-steps strong { color: var(--rc-ink); font-weight: 620; }

/* --- Odzivnost -------------------------------------------------------------------------- */
@media (max-width: 1360px) {
  .rc-ed-grid { grid-template-columns: minmax(0, 1fr) minmax(400px, 0.9fr); gap: 20px; }
  .rc-ed-issued { grid-template-columns: minmax(0, 1fr) 320px; }
}
@media (max-width: 1180px) {
  .rc-ed-grid { grid-template-columns: minmax(0, 1fr); max-width: 860px; }
  .rc-ed-paneswitch { display: block; max-width: 860px; margin: 16px auto 0; }
  .rc-ed-grid { padding-top: 14px; }
  .rc-ed-side { position: static; max-height: none; overflow: visible; padding: 0; }
  .rc-ed[data-pane="edit"] .rc-ed-side .rc-ed-paper-card { display: none; }
  .rc-ed[data-pane="preview"] .rc-ed-compose { display: none; }
  .rc-ed[data-pane="edit"] .rc-ed-side { order: 2; }
  .rc-ed-issued { grid-template-columns: minmax(0, 1fr); max-width: 900px; }
  .rc-ed-rail { position: static; max-height: none; overflow: visible; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .app-shell:not(.mobile-shell) .rc-ed-bar { margin-top: -18px; }
  .rc-ed-bar { padding-right: calc(var(--main-pad-x, 18px) + 60px); }
  .rc-ed-rail { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .rc-ed { --rc-ed-bar-h: 60px; }
  .rc-ed-bar { padding-right: calc(var(--main-pad-x, 18px) + 52px); }
  .rc-ed-bar-in { gap: 8px; }
  .rc-ed-bar-sep, .rc-ed-back span, .rc-ed-doc-ico, .rc-ed-act-secondary, .rc-ed-actions .rc-kbd { display: none !important; }
  .rc .rc-ed-title { font-size: 15px; }
  .rc .rc-ed-actions .rc-btn > span:not(.rc-kbd) { display: inline; }
  .rc-ed-card-body { padding: 0 14px 16px; }
  .rc .rc-ed-card-toggle { padding: 12px 14px; }
  .rc-ed-card-summary { display: none; }
  .rc .rc-ed-grid-6, .rc .rc-ed-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rc .rc-ed-col-4, .rc .rc-ed-col-6, .rc .rc-ed-grid-6 > .rc-ed-col-3 { grid-column: 1 / -1; }
  .rc .rc-ed-col-2 { grid-column: span 1; }
  .rc .rc-ed-grid-4 .rc-span-2 { grid-column: 1 / -1; }
  .rc .rc-ed .rc-input, .rc .rc-ed .rc-select, .rc .rc-ed .rc-seg-btn { min-height: 44px; height: 44px; font-size: 16px; }
  .rc .rc-ed .rc-textarea { font-size: 16px; }
  .rc .rc-ed .rc-ed-kpd .rc-input { height: 34px; min-height: 34px; font-size: 14px; }
  .rc .rc-ed .rc-chip { height: 36px; min-height: 36px; }
  .rc-ed-vcard { grid-template-columns: 96px minmax(0, 1fr); }
  .rc-ed-vphoto { width: 96px; height: 68px; }
  .rc-ed-vactions { grid-column: 1 / -1; display: flex; justify-content: flex-start; }
  .rc-ed-regimes { grid-template-columns: minmax(0, 1fr); }
  .rc-ed-regimes--small { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rc-ed-line { padding: 10px; }
  .rc-ed-line-top { grid-template-columns: 24px minmax(0, 1fr) 36px; }
  .rc-ed-line-kind { display: none; }
  .rc .rc-ed-line-detail, .rc-ed-line-nums, .rc-ed-line-foot, .rc-ed-ppmv-note { margin-left: 0; width: 100%; }
  .rc .rc-ed-mini--price, .rc .rc-ed-mini--tax { flex: 1 1 calc(50% - 5px); }
  .rc .rc-ed-mini--qty, .rc .rc-ed-mini--unit, .rc .rc-ed-mini--disc { flex: 1 1 72px; }
  .rc-ed-line-total { flex: 1 1 100%; flex-direction: row; display: flex; justify-content: space-between; align-items: baseline; padding-top: 4px; border-top: 1px dashed var(--rc-line); }
  .rc-ed-due-value { font-size: 22px; }
  .rc-ed-payinfo-row { flex-wrap: wrap; gap: 2px 12px; }
  .rc-ed-payinfo-row > span { flex: 1 1 100%; }
  .rc-ed-compose-foot { position: sticky; bottom: 0; z-index: 5; margin: 0 -14px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--rc-surface) 92%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--rc-line); }
  .rc-ed-compose-foot .rc-btn { flex: 1 1 0; }
  .rc-ed-paper-scroll { padding: 12px; }
  .rc-ed-paper-card.is-hero .rc-ed-paper-scroll { padding: 12px; }
  .rc-ed-dialog-sum { grid-template-columns: 1fr 1fr; }
  .rc-ed-dialog-sum > div:first-child { grid-column: 1 / -1; }
}
.mobile-shell .rc-ed-bar { margin: 0 -14px; padding: 0 14px; }
.mobile-shell .rc-ed-compose-foot { margin: 0 -14px; }

@media (prefers-reduced-motion: reduce) {
  .rc-ed-line, .rc-ed-card, .rc-ed-chev, .rc-ed-disc-chev { transition: none; }
  .rc-ed-line.is-new, .rc-ed-flash, .rc-ed-bar.is-celebrating .rc-ed-doc-ico { animation: none; }
  .rc-ed-tick path { animation: none; stroke-dashoffset: 0; }
}

/* --- iCare (tamni mod): papir ostaje bijel, platno oko njega tamno --------------------- */
html.icare .rc-ed { --rc-ed-canvas: color-mix(in srgb, #000 30%, var(--rc-sunken)); }
html.icare .rc-ed-paper-host { box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 18px 40px -10px rgba(0, 0, 0, .7); }
html.icare .rc-ed-vcard { background: var(--rc-sunken); }
.rc-ed-inline-note.rc-ed-amber { background: var(--rc-amber-soft); border-color: var(--rc-amber-line); color: var(--rc-amber); }
.rc-ed-inline-note.rc-ed-amber .rc-i { color: currentColor; }
.rc-ed-inline-note.rc-ed-amber strong { color: inherit; font-weight: 650; }

/* Segmenti se smiju suziti (inače rastegnu karticu na uskom ekranu) */
.rc .rc-ed .rc-seg--block .rc-seg-btn { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rc-ed-card, .rc-ed-card-body, .rc-ed-card-head { min-width: 0; }
@media (max-width: 720px) {
  .rc .rc-ed .rc-seg--block .rc-seg-btn { padding: 0 6px; gap: 5px; font-size: 13.5px; }
  .rc .rc-ed-payseg .rc-seg-btn .rc-i { display: none; }
  .rc .rc-ed .rc-label .rc-label-aside { display: none; }
}
@media (max-width: 380px) {
  .rc .rc-ed-tipseg .rc-seg-btn .rc-i { display: none; }
}
.rc .rc-ed-card-toggle { justify-content: flex-start; }
.rc-ed-short { display: none; }
@media (max-width: 720px) {
  .rc-ed-card-summary + .rc-ed-chev { margin-left: auto; }
  .rc-ed-tipseg .rc-ed-long { display: none; }
  .rc-ed-tipseg .rc-ed-short { display: inline; }
  .rc-ed-actions.is-editable .rc-btn--primary { display: none; }
}
.mobile-shell .rc-ed-bar { margin-top: -14px; padding-right: 70px; }
.mobile-shell .rc-ed-sub .rc-ed-save { display: none; }
.rc-ed-card-body { grid-template-columns: minmax(0, 1fr); }
.rc-ed-card-body > * { min-width: 0; }
@media (max-width: 720px) { .rc-ed-disclosure-hint { display: none; } }
.rc .rc-ed-profit-main { justify-content: flex-start; }
@media (max-width: 720px) {
  .rc .rc-ed .rc-ed-zoom .rc-seg-btn { height: 30px; min-height: 30px; font-size: 12.5px; }
  .rc-ed-paper-hint { display: none; }
}
.rc .rc-ed-thumb, .rc-ed-vphoto { position: relative; }
.rc .rc-ed-thumb img, .rc-ed-vphoto img { position: absolute; inset: 0; }
@media (max-width: 720px) {
  .rc-ed-sub .rc-status + .rc-status { display: none; }
  .rc .rc-ed-actions .rc-btn > span:not(.rc-kbd) { display: none; }
  .rc .rc-ed-actions .rc-btn { width: 40px; padding: 0; }
  .rc-ed-sub { flex-wrap: nowrap; }
}
.rc .rc-ed-regime { justify-content: stretch; justify-items: stretch; }
