/* =====================================================================
   Siterix — dizajn sistem
   ===================================================================== */
:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --surface-3: #e8ebf0;
  --line: #e3e6eb;
  --line-2: #d3d8e0;
  --text: #0e1726;
  --text-2: #3b4757;
  --muted: #6b7788;

  --brand: #ff5b14;
  --brand-2: #e94c08;
  --brand-soft: #fff0e7;
  --brand-ink: #ffffff;

  --ok: #0e9356;   --ok-soft: #e5f5ec;
  --warn: #c98100; --warn-soft: #fff4dc;
  --bad: #dc3b26;  --bad-soft: #fdebe8;
  --info: #2563eb; --info-soft: #e9f0ff;

  --side: #0c121c;
  --side-2: #151d2a;
  --side-text: #a3aebe;
  --side-line: #1f2836;

  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --sh-1: 0 1px 2px rgba(14, 23, 38, .05);
  --sh-2: 0 1px 2px rgba(14, 23, 38, .04), 0 6px 20px rgba(14, 23, 38, .06);
  --sh-3: 0 20px 60px rgba(14, 23, 38, .25);

  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-head: "Space Grotesk", "Inter", system-ui, sans-serif;
  --f-brand: "Avenir Next", "Century Gothic", "Futura", "Inter", sans-serif; /* font iz logotipa */
  --side-w: 248px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0e15; --surface: #111823; --surface-2: #172030; --surface-3: #1e293b;
    --line: #222d3e; --line-2: #2d3a4f; --text: #e9eef6; --text-2: #bcc6d6; --muted: #8592a6;
    --brand-soft: #2a1709; --ok: #34c77f; --ok-soft: #0f2a1d; --warn: #f0b33c; --warn-soft: #2b2110;
    --bad: #ff6b55; --bad-soft: #2e1512; --info: #6b9bff; --info-soft: #14203a;
    --side: #070a10; --side-2: #10161f; --side-line: #18202c;
    --sh-1: none; --sh-2: 0 0 0 1px var(--line); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0e15; --surface: #111823; --surface-2: #172030; --surface-3: #1e293b;
  --line: #222d3e; --line-2: #2d3a4f; --text: #e9eef6; --text-2: #bcc6d6; --muted: #8592a6;
  --brand-soft: #2a1709; --ok: #34c77f; --ok-soft: #0f2a1d; --warn: #f0b33c; --warn-soft: #2b2110;
  --bad: #ff6b55; --bad-soft: #2e1512; --info: #6b9bff; --info-soft: #14203a;
  --side: #070a10; --side-2: #10161f; --side-line: #18202c;
  --sh-1: none; --sh-2: 0 0 0 1px var(--line); color-scheme: dark;
}

/* ---------------------------------------------------------------------
   Osnova
   --------------------------------------------------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14.5px/1.5 var(--f-body); -webkit-font-smoothing: antialiased; }
body.has-modal { overflow: hidden; }
h1, h2, h3 { font-family: var(--f-head); margin: 0; letter-spacing: -.02em; line-height: 1.15; }
h1 { font-size: 28px; font-weight: 700; }
h2 { font-size: 16px; font-weight: 600; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
small { font-size: 12px; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
.ic { width: 18px; height: 18px; flex: none; }
.ic.ok { color: var(--ok); }
.muted { color: var(--muted); }
.block { display: block; }
.center { text-align: center; }
.nw { white-space: nowrap; }
.pos { color: var(--ok); }
.neg { color: var(--bad); }
.sub { color: var(--muted); margin-top: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hint { color: var(--muted); font-size: 12.5px; margin-top: 10px; }
.hint.center { margin: 14px 0 4px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------------------------------------------------------------------
   Gumbi
   --------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text);
  font-weight: 600; font-size: 14px; white-space: nowrap; box-shadow: var(--sh-1);
  transition: background .15s, border-color .15s, transform .06s;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); box-shadow: 0 1px 2px rgba(233, 76, 8, .3), inset 0 1px 0 rgba(255,255,255,.15); }
.btn.primary:hover { background: var(--brand-2); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger-o { color: var(--bad); }
.btn.danger-o:hover { background: var(--bad-soft); border-color: var(--bad); }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; }
.btn.lg { height: 46px; font-size: 15px; }
.btn.xl { height: 54px; font-size: 16px; border-radius: var(--r); }
.btn.full { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); flex: none; }
.icon-btn:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.icon-btn.ghost { border-color: transparent; background: transparent; }
.icon-btn.danger:hover { background: var(--bad-soft); color: var(--bad); }
.icon-btn .ic { width: 17px; height: 17px; }
.link { background: none; border: 0; padding: 0; font-weight: 600; color: var(--brand-2); }
.link:hover { text-decoration: underline; }
.chip-btn { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border-radius: 99px; background: var(--surface-2); border: 0; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.chip-btn .ic { width: 14px; height: 14px; }
.chip-btn:hover { background: var(--surface-3); }

/* ---------------------------------------------------------------------
   Polja
   --------------------------------------------------------------------- */
.form { display: grid; gap: 14px; }
.form.row { grid-template-columns: 1fr auto; align-items: end; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lbl { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
input, select {
  font: inherit; color: var(--text); width: 100%; height: 42px; padding: 0 12px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-sm);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
input::placeholder { color: var(--muted); opacity: .7; }
.log-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.log-row.three { grid-template-columns: repeat(3, 1fr); }

.stepper { display: grid; grid-template-columns: 42px 1fr 42px; border: 1px solid var(--line-2); border-radius: var(--r-sm); overflow: hidden; background: var(--surface); }
.stepper input { border: 0; border-radius: 0; text-align: center; font-family: var(--f-head); font-size: 18px; font-weight: 700; box-shadow: none !important; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.step { border: 0; background: var(--surface-2); display: grid; place-items: center; color: var(--text-2); }
.step:hover { background: var(--surface-3); }

.toggle { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; user-select: none; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle .track { width: 44px; height: 26px; border-radius: 99px; background: var(--surface-3); position: relative; transition: background .2s; flex: none; }
.toggle .track i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.toggle input:checked + .track { background: var(--ok); }
.toggle input:checked + .track i { transform: translateX(18px); }
.toggle input:focus-visible + .track { outline: 2px solid var(--brand); outline-offset: 2px; }

.drop { margin-bottom: 14px; }
.drop-z { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 16px; border: 1.5px dashed var(--line-2); border-radius: var(--r); background: var(--surface-2); cursor: pointer; text-align: center; transition: border-color .15s, background .15s; }
.drop-z:hover, .drop-z.has { border-color: var(--brand); background: var(--brand-soft); }
.drop-z .ic { width: 26px; height: 26px; color: var(--brand); margin-bottom: 4px; }
.drop-z small { color: var(--muted); word-break: break-all; }
.drop-z.sm { padding: 16px; }

.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-3); border-radius: 12px; margin-bottom: 16px; }
.seg button, .seg label span { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 9px; border: 0; background: transparent; font-weight: 600; font-size: 13.5px; color: var(--text-2); cursor: pointer; }
.seg em { font-style: normal; font-size: 11.5px; color: var(--muted); background: var(--surface-2); padding: 1px 7px; border-radius: 99px; }
.seg button.on, .seg input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--sh-1), 0 0 0 1px var(--line); }
.seg label { flex: 1; display: flex; }
.seg label span { flex: 1; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg.wide { display: flex; width: 100%; }
.seg.wide button { flex: 1; }

/* ---------------------------------------------------------------------
   Okvir: bočni meni + sadržaj + donja navigacija
   --------------------------------------------------------------------- */
.logo { width: 34px; height: 34px; flex: none; display: block; }
.side {
  position: fixed; inset: 0 auto 0 0; width: var(--side-w); background: var(--side); color: var(--side-text);
  display: flex; flex-direction: column; padding: 18px 14px; z-index: 20; border-right: 1px solid var(--side-line);
}
.side-brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 22px; }
.side-brand b { display: block; font-family: var(--f-brand); font-weight: 600; font-size: 19px; color: #fff; letter-spacing: -.02em; line-height: 1.1; }
.side-brand small { display: block; color: var(--side-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.nav-i { display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px; border-radius: var(--r-sm); font-weight: 500; color: var(--side-text); transition: background .15s, color .15s; position: relative; }
.nav-i:hover { background: var(--side-2); color: #fff; }
.nav-i.on { background: var(--side-2); color: #fff; }
.nav-i.on::before { content: ""; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.nav-i.on .ic { color: var(--brand); }
.side-foot { margin-top: auto; display: grid; gap: 12px; }
.side-demo { display: grid; grid-template-columns: auto 1fr; gap: 4px 8px; font-size: 12px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--side-2); border: 1px solid var(--side-line); }
.side-demo .ic { width: 15px; height: 15px; color: var(--brand); margin-top: 1px; }
.side-demo .link { grid-column: 2; justify-self: start; font-size: 12px; color: #fff; }
.side .lang { justify-self: start; border-color: var(--side-line); }
.side .lang button { color: var(--side-text); }
.side .lang button.on { background: var(--side-2); color: #fff; }
.me { display: flex; align-items: center; gap: 10px; padding: 12px 8px 0; border-top: 1px solid var(--side-line); }
.me > div { flex: 1; min-width: 0; }
.me b { display: block; color: #fff; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me small { color: var(--side-text); }
.me .icon-btn { color: var(--side-text); }
.me .icon-btn:hover { background: var(--side-2); color: #fff; }

.main { margin-left: var(--side-w); min-height: 100vh; display: flex; flex-direction: column; }
.page { width: 100%; max-width: 1180px; margin: 0 auto; padding: 32px 36px 24px; flex: 1; }
.mtop, .bnav, .demo-strip { display: none; }
.foot { max-width: 1180px; margin: 0 auto; padding: 8px 36px 32px; color: var(--muted); font-size: 12px; width: 100%; }

.lang { display: inline-flex; border: 1px solid var(--line-2); border-radius: 9px; overflow: hidden; }
.lang button { border: 0; background: transparent; padding: 5px 9px; font-size: 11.5px; font-weight: 700; color: var(--muted); letter-spacing: .03em; }
.lang button.on { background: var(--text); color: var(--surface); }

/* ---------------------------------------------------------------------
   Zaglavlje stranice
   --------------------------------------------------------------------- */
.phead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.phead h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.phead-act { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ph-person { display: flex; align-items: center; gap: 16px; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 600; font-size: 13px; margin-bottom: 12px; }
.back:hover { color: var(--text); }
.back .ic { width: 16px; height: 16px; }
.bar-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; text-transform: capitalize; }

.mswitch { display: inline-flex; align-items: center; gap: 4px; height: 40px; padding: 0 2px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-sm); box-shadow: var(--sh-1); }
.mswitch span { min-width: 124px; text-align: center; font-weight: 600; text-transform: capitalize; font-size: 13.5px; }
.mswitch .icon-btn { width: 32px; height: 32px; border: 0; background: transparent; }

/* ---------------------------------------------------------------------
   Kartice, KPI, mreže
   --------------------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-2); padding: 20px; margin-bottom: 18px; min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: start; }
.cols > .card { margin-bottom: 0; }
.cols + * { margin-top: 18px; }
.cols .span2 { grid-column: span 2; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; box-shadow: var(--sh-2); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kpi-ic { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.kpi-ic .ic { width: 16px; height: 16px; }
.kpi-l { font-size: 12.5px; font-weight: 600; color: var(--muted); padding-right: 36px; }
.kpi-v { font-family: var(--f-head); font-size: 25px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 6px; }
.kpi-s { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi.ok .kpi-v { color: var(--ok); }
.kpi.ok .kpi-ic { background: var(--ok-soft); color: var(--ok); }
.kpi.bad .kpi-v { color: var(--bad); }
.kpi.bad .kpi-ic { background: var(--bad-soft); color: var(--bad); }

.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 99px; font-size: 11.5px; font-weight: 600; font-family: var(--f-body); letter-spacing: 0; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.brand { background: var(--brand-soft); color: var(--brand-2); }

.avatar { --h: 20; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; flex: none; font-weight: 700; font-size: 13px; color: hsl(var(--h) 55% 32%); background: hsl(var(--h) 70% 90%); }
.avatar.sm { width: 32px; height: 32px; font-size: 11.5px; }
.avatar.lg { width: 60px; height: 60px; font-size: 20px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .avatar { color: hsl(var(--h) 80% 80%); background: hsl(var(--h) 35% 22%); } }

.meter { height: 6px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 99px; background: var(--text-2); }
.meter.ok i { background: var(--ok); }
.meter.warn i { background: var(--warn); }
.meter.bad i { background: var(--bad); }
.meter.info i { background: var(--info); }

.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px 16px; text-align: center; color: var(--muted); }
.empty > .ic { width: 30px; height: 30px; padding: 12px; box-sizing: content-box; border-radius: 50%; background: var(--surface-2); }

/* ---------------------------------------------------------------------
   Liste
   --------------------------------------------------------------------- */
.plist { display: flex; flex-direction: column; }
.prow { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto; align-items: center; gap: 20px; padding: 13px 10px; margin: 0 -10px; border-radius: var(--r-sm); }
.prow + .prow { border-top: 1px solid var(--line); }
.prow:hover { background: var(--surface-2); }
.prow-main b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow-main small { color: var(--muted); }
.prow-lbl { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.prow-lbl b { color: var(--text); }
.prow-num { text-align: right; }
.prow-num small { display: block; color: var(--muted); }
.prow-num b { font-family: var(--f-head); font-size: 16px; font-variant-numeric: tabular-nums; }

.tlist { display: flex; flex-direction: column; gap: 4px; }
.trow { display: flex; align-items: center; gap: 12px; padding: 8px 10px; margin: 0 -10px; border-radius: var(--r-sm); }
.trow:hover { background: var(--surface-2); }
.trow-m { flex: 1; min-width: 0; }
.trow-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 5px; }
.trow-top b { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow-top span { font-size: 12.5px; color: var(--text-2); font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }

.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 0; }
.feed li + li { border-top: 1px solid var(--line); }
.feed-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.feed-ic .ic { width: 16px; height: 16px; }
.feed p { color: var(--text-2); font-size: 13.5px; }
.feed b { color: var(--text); font-weight: 600; }
.feed time { color: var(--muted); font-size: 12px; white-space: nowrap; }

.mini { list-style: none; margin: 14px 0 0; padding: 0; }
.mini li { display: flex; align-items: center; gap: 10px; padding: 9px 0; font-size: 13.5px; }
.mini li + li { border-top: 1px solid var(--line); }
.mini li span { flex: 1; color: var(--text-2); }
.mini .icon-btn { width: 30px; height: 30px; }

/* ---------------------------------------------------------------------
   Objekti
   --------------------------------------------------------------------- */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.pcard { display: flex; flex-direction: column; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--sh-2); transition: border-color .15s, transform .15s, box-shadow .15s; }
.pcard:hover { border-color: var(--line-2); transform: translateY(-2px); box-shadow: var(--sh-2), 0 12px 28px rgba(14,23,38,.08); }
.pcard-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.pcard-h b { display: block; font-family: var(--f-head); font-size: 17px; letter-spacing: -.01em; }
.pcard-h small { color: var(--muted); }
.pcard-offer span { display: block; font-size: 12px; color: var(--muted); }
.pcard-offer b { font-family: var(--f-head); font-size: 26px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pcard-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.pcard-stats small { display: block; color: var(--muted); font-size: 11.5px; }
.pcard-stats b { font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }

.stack-bar { display: flex; height: 14px; border-radius: 99px; overflow: hidden; background: var(--surface-3); gap: 2px; }
.stack-bar i { display: block; height: 100%; }
.lab { background: var(--info); }
.mat { background: var(--warn); }
.rest { background: var(--ok); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 14px; font-size: 13px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }
.legend b { color: var(--text); font-variant-numeric: tabular-nums; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: -6px -20px 18px; padding: 0 16px; overflow-x: auto; }
.tabs button { display: inline-flex; align-items: center; gap: 7px; height: 46px; padding: 0 12px; border: 0; background: none; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.on { color: var(--text); border-bottom-color: var(--brand); }
.tabs em { font-style: normal; font-size: 11.5px; background: var(--surface-2); padding: 1px 7px; border-radius: 99px; color: var(--muted); }
.tab-act { display: flex; justify-content: flex-end; margin-bottom: 10px; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.gallery figure { margin: 0; position: relative; border-radius: var(--r); overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.g-img { display: block; width: 100%; padding: 0; border: 0; background: none; }
.g-img img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .3s; }
.g-img:hover img { transform: scale(1.03); }
.gallery figcaption { padding: 8px 10px 10px; }
.gallery figcaption b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gallery figcaption small { color: var(--muted); }
.g-del { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(10,14,21,.6); color: #fff; opacity: 0; transition: opacity .15s; }
.g-del .ic { width: 14px; height: 14px; }
.gallery figure:hover .g-del, .g-del:focus-visible { opacity: 1; }
@media (hover: none) { .g-del { opacity: 1; } }

/* ---------------------------------------------------------------------
   Tabele i unosi
   --------------------------------------------------------------------- */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.tbl th { text-align: left; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface); white-space: nowrap; }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tfoot td { font-weight: 700; border-top: 1px solid var(--line-2); border-bottom: 0; background: var(--surface-2); }
.tbl .r { text-align: right; }
.tbl .c { text-align: center; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: var(--surface-2); }
.card.flush .tbl th:first-child, .card.flush .tbl td:first-child { padding-left: 20px; }
.card.flush .tbl th:last-child, .card.flush .tbl td:last-child { padding-right: 20px; }
.who { display: flex; align-items: center; gap: 11px; }
.who b { display: block; font-weight: 600; }
.who small { color: var(--muted); }

.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; align-items: center; }
.filters select { width: auto; min-width: 190px; }
.filter-sum { margin-left: auto; display: flex; align-items: baseline; gap: 10px; color: var(--muted); font-size: 13px; }
.filter-sum b { font-family: var(--f-head); font-size: 20px; color: var(--text); }
.day { padding: 6px 20px; margin-bottom: 12px; }
.day-h { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); }
.day-h b { text-transform: capitalize; }
.day-h span { font-weight: 700; font-variant-numeric: tabular-nums; }

.entries { list-style: none; margin: 0; padding: 0; }
.entries li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto 36px; align-items: center; gap: 12px; padding: 10px 0; }
.entries li + li { border-top: 1px solid var(--line); }
.en-m b { display: block; font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.en-m small { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.en-date { font-size: 12.5px; color: var(--muted); font-weight: 600; min-width: 72px; text-transform: capitalize; }
.en-meal { color: var(--warn); display: grid; }
.en-meal .ic { width: 16px; height: 16px; }
.en-h { font-family: var(--f-head); font-size: 15px; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }

/* ---------------------------------------------------------------------
   Dopust (prsten)
   --------------------------------------------------------------------- */
.leave-ring { --p: 0; width: 132px; height: 132px; margin: 4px auto 10px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--surface-3) 0); }
.leave-ring > div { width: 104px; height: 104px; border-radius: 50%; background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.leave-ring b { font-family: var(--f-head); font-size: 32px; line-height: 1; }
.leave-ring small { color: var(--muted); }
.leave-nums { display: flex; justify-content: center; gap: 24px; font-size: 13px; color: var(--muted); }
.leave-nums b { color: var(--text); }

/* ---------------------------------------------------------------------
   Postavke
   --------------------------------------------------------------------- */
.plan { background: var(--brand-soft); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 2px; margin-bottom: 4px; }
.plan-n { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--brand-2); }
.plan b { font-family: var(--f-head); font-size: 22px; }
.plan small { color: var(--text-2); }
.plan + .hint + .btn { margin-top: 14px; }

/* ---------------------------------------------------------------------
   Radnik
   --------------------------------------------------------------------- */
.hello { margin-bottom: 20px; }
.hello p { color: var(--muted); font-weight: 500; text-transform: capitalize; }
.hello h1 { font-size: 30px; }
.card.log { border-top: 3px solid var(--brand); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.tile input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tile span { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 10px 14px; border: 1.5px solid var(--line-2); border-radius: var(--r); background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.tile span .ic { color: var(--muted); }
.tile b { font-weight: 600; font-size: 14px; line-height: 1.25; }
.tile input:checked + span { border-color: var(--brand); background: var(--brand-soft); }
.tile input:checked + span .ic { color: var(--brand); }
.tile input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.wd { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.wd-bar { width: 100%; max-width: 34px; height: 90px; background: var(--surface-2); border-radius: 8px; display: flex; align-items: flex-end; overflow: hidden; }
.wd-bar i { display: block; width: 100%; background: var(--text-2); border-radius: 8px; min-height: 0; }
.wd.today .wd-bar i { background: var(--brand); }
.wd b { font-size: 13px; font-variant-numeric: tabular-nums; }
.wd small { color: var(--muted); text-transform: capitalize; }
.wd.today small { color: var(--brand-2); font-weight: 700; }
.week-sum { display: flex; justify-content: space-between; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); }
.week-sum b { color: var(--text); font-family: var(--f-head); font-size: 17px; }
.earn { display: flex; flex-direction: column; gap: 2px; margin-bottom: 14px; }
.earn small { color: var(--muted); text-transform: capitalize; }
.earn b { font-family: var(--f-head); font-size: 32px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.earn span { color: var(--text-2); font-size: 13px; }

.hero-num { background: var(--side); color: #fff; border-radius: var(--r-lg); padding: 22px 24px; margin-bottom: 18px; display: flex; flex-direction: column; gap: 4px; position: relative; overflow: hidden; }
.hero-num::after { content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--brand) 45%, transparent), transparent 70%); }
.hero-num small { color: var(--side-text); text-transform: capitalize; }
.hero-num b { font-family: var(--f-head); font-size: 40px; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.hero-num span { color: var(--side-text); font-size: 13px; }

/* ---------------------------------------------------------------------
   Modal, lightbox, obavijesti
   --------------------------------------------------------------------- */
.modal-bg { position: fixed; inset: 0; background: rgba(8, 12, 20, .5); backdrop-filter: blur(3px); z-index: 40; animation: fade .15s; }
.modal { position: fixed; z-index: 41; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(520px, calc(100% - 32px)); max-height: calc(100vh - 48px); overflow: auto; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--sh-3); animation: pop .18s ease-out; }
.modal-h { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px 6px; }
.modal-h h2 { font-size: 19px; }
.modal-b { padding: 10px 20px 22px; }
.modal-b .sub { margin: 0; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -46%) scale(.98); } }

.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(5, 8, 12, .92); display: grid; place-items: center; padding: 20px; animation: fade .15s; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 88vh; border-radius: var(--r); }
.lightbox .icon-btn { position: absolute; top: 16px; right: 16px; }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--r); background: var(--text); color: var(--surface); font-weight: 600; box-shadow: var(--sh-3); transition: opacity .2s, transform .2s; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast .ic { color: var(--ok); }
.toast.err { background: var(--bad); color: #fff; }
.toast.err .ic { color: #fff; }

body.busy::before { content: ""; position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 70; background: linear-gradient(90deg, transparent, var(--brand), transparent); background-size: 40% 100%; background-repeat: no-repeat; animation: busy .9s linear infinite; }
@keyframes busy { from { background-position: -40% 0; } to { background-position: 140% 0; } }
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot .logo { width: 48px; height: 48px; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .4; transform: scale(.94); } }

/* ---------------------------------------------------------------------
   Prijava
   --------------------------------------------------------------------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-art { position: relative; overflow: hidden; background: var(--side); color: #fff; padding: 40px 48px; display: flex; flex-direction: column; }
.auth-grid { position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--side-line) 1px, transparent 1px), linear-gradient(90deg, var(--side-line) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(ellipse at 70% 30%, #000 0%, transparent 70%); }
.auth-art::after { content: ""; position: absolute; width: 520px; height: 520px; right: -160px; bottom: -200px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--brand) 40%, transparent), transparent 65%); pointer-events: none; }
.auth-brand { display: flex; align-items: center; gap: 11px; position: relative; z-index: 1; }
.auth-brand b { font-family: var(--f-brand); font-weight: 600; font-size: 24px; letter-spacing: -.03em; }
.auth-brand.m { display: none; }
.auth-pitch { margin: auto 0; position: relative; z-index: 1; max-width: 460px; }
.auth-pitch h2 { font-size: 40px; font-weight: 700; line-height: 1.08; letter-spacing: -.03em; margin-bottom: 28px; }
.auth-pitch ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.auth-pitch li { display: flex; align-items: center; gap: 14px; color: var(--side-text); font-size: 15px; }
.auth-pitch li .ic { width: 38px; height: 38px; padding: 10px; box-sizing: border-box; border-radius: 11px; background: var(--side-2); border: 1px solid var(--side-line); color: var(--brand); }
.auth-main { display: flex; flex-direction: column; padding: 28px 32px; }
.auth-top { display: flex; justify-content: flex-end; align-items: center; }
.auth-box { width: 100%; max-width: 400px; margin: auto; padding: 24px 0; }
.auth-box h1 { font-size: 32px; }
.auth-box .sub { margin-bottom: 24px; }
.alt { text-align: center; margin-top: 18px; color: var(--muted); }
.demo { margin-top: 28px; padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-2); }
.demo-h { display: flex; gap: 12px; margin-bottom: 14px; }
.demo-h > .ic { color: var(--brand); width: 20px; height: 20px; margin-top: 2px; }
.demo-h p { color: var(--muted); font-size: 13px; }
.demo-roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.demo-roles button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface); font-weight: 600; font-size: 13px; }
.demo-roles button:hover { border-color: var(--brand); background: var(--brand-soft); }
.demo-roles .ic { color: var(--brand); }

/* ---------------------------------------------------------------------
   Tablet i mobitel
   --------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .cols { grid-template-columns: 1fr 1fr; }
  .cols .span2 { grid-column: span 2; }
}

@media (max-width: 900px) {
  .side { display: none; }
  .main { margin-left: 0; }
  .mtop { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 15; padding: 10px 16px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
  .mtop .logo { width: 30px; height: 30px; }
  .mtop-t { flex: 1; min-width: 0; }
  .mtop-t b { display: block; font-family: var(--f-head); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
  .mtop-t small { color: var(--muted); }
  .demo-strip { display: flex; align-items: center; gap: 8px; margin: 12px 16px 0; padding: 8px 12px; border-radius: var(--r-sm); background: var(--brand-soft); color: var(--text-2); font-size: 12px; }
  .demo-strip .ic { color: var(--brand); width: 15px; height: 15px; }
  .demo-strip span { flex: 1; }
  .page { padding: 20px 16px 16px; }
  .foot { padding: 0 16px calc(96px + env(safe-area-inset-bottom)); }
  .bnav { display: grid; grid-template-columns: repeat(var(--n), 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
  .bnav .nav-i { flex-direction: column; justify-content: center; gap: 3px; height: 54px; padding: 0; color: var(--muted); font-size: 11px; font-weight: 600; }
  .bnav .nav-i .ic { width: 21px; height: 21px; }
  .bnav .nav-i:hover { background: transparent; color: var(--text); }
  .bnav .nav-i.on { background: transparent; color: var(--brand-2); }
  .bnav .nav-i.on::before { left: 30%; right: 30%; top: -6px; bottom: auto; width: auto; height: 3px; border-radius: 0 0 3px 3px; }

  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .auth-main { padding: 18px 16px; }
  .auth-top { justify-content: space-between; }
  .auth-brand.m { display: flex; color: var(--text); }
  .auth-box { padding-top: 8vh; }
}

@media (max-width: 640px) {
  h1, .hello h1 { font-size: 24px; }
  .phead { margin-bottom: 18px; align-items: flex-start; }
  .phead-act { width: 100%; }
  .phead-act .btn.primary { flex: 1; }
  .ph-person { gap: 12px; }
  .avatar.lg { width: 52px; height: 52px; font-size: 17px; }
  .kpis { gap: 10px; }
  .kpi { padding: 14px; border-radius: var(--r); }
  .kpi-v { font-size: 20px; }
  .kpi-ic { display: none; }
  .kpi-l { padding-right: 0; }
  .cols { grid-template-columns: 1fr; gap: 14px; }
  .cols .span2 { grid-column: auto; }
  .card { padding: 16px; border-radius: var(--r); margin-bottom: 14px; }
  .tabs { margin: -4px -16px 16px; padding: 0 10px; }
  .day { padding: 4px 16px; }
  .prow { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 14px; }
  .prow-bar { grid-column: 1 / -1; grid-row: 2; }
  .pgrid { grid-template-columns: 1fr; }
  .hide-m { display: none; }
  .log-row.three { grid-template-columns: 1fr 1fr; }
  .log-row.three > :last-child { grid-column: span 2; }
  .filters select { flex: 1; min-width: 0; }
  .filter-sum { width: 100%; margin-left: 0; justify-content: space-between; }
  .entries li { gap: 10px; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .mswitch span { min-width: 108px; }
  .modal { top: auto; bottom: 0; left: 0; transform: none; width: 100%; max-height: 92vh; border-radius: var(--r-lg) var(--r-lg) 0 0; padding-bottom: env(safe-area-inset-bottom); animation: sheet .22s ease-out; }
  .form.row { grid-template-columns: 1fr; }
  .hero-num b { font-size: 34px; }
  .card.flush .tbl th:first-child, .card.flush .tbl td:first-child { padding-left: 14px; }
  .card.flush .tbl th:last-child, .card.flush .tbl td:last-child { padding-right: 14px; }
}
@keyframes sheet { from { transform: translateY(40px); opacity: 0; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------------------------------------------------------------------
   Troškovi / računi
   --------------------------------------------------------------------- */
textarea { font: inherit; color: var(--text); width: 100%; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-sm); resize: vertical; }
textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }

.alert { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 16px; margin-bottom: 18px; border-radius: var(--r); border: 1px solid; font-weight: 600; }
.alert span { flex: 1; }
.alert.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, transparent); color: var(--text); }
.alert.warn > .ic:first-child { color: var(--warn); }
.alert.bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 35%, transparent); color: var(--text); }
.alert.bad > .ic:first-child { color: var(--bad); }
.alert:hover { filter: brightness(.98); }

.badge.warn { background: var(--warn-soft); color: var(--warn); }
.cat { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.cat i { width: 8px; height: 8px; border-radius: 50%; flex: none; }

.thumb { width: 46px; height: 46px; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); flex: none; position: relative; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.pdf { background: #fdecea; color: #c92a2a; border-color: #f8c9c4; }
.thumb.pdf em { position: absolute; bottom: 3px; font-style: normal; font-size: 8.5px; font-weight: 800; letter-spacing: .04em; }
.thumb.pdf .ic { margin-top: -8px; }
.thumb.lg { width: 84px; height: 100px; border-radius: 12px; }
.thumb.lg .ic { width: 30px; height: 30px; margin-top: -14px; }
.thumb.lg em { font-size: 12px; bottom: 12px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .thumb.pdf { background: #3a1513; border-color: #5c211d; color: #ff8a80; } }

.xlist { list-style: none; margin: 0; padding: 0; }
.xlist li + li { border-top: 1px solid var(--line); }
.xrow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; align-items: center; gap: 14px; width: 100%; padding: 11px 10px; margin: 0 -10px; width: calc(100% + 20px); border: 0; background: none; text-align: left; border-radius: var(--r-sm); }
.xrow:hover { background: var(--surface-2); }
.x-main { min-width: 0; }
.x-main b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.x-main small { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.x-main .x-desc { color: var(--text-2); }
.x-amt { text-align: right; }
.x-amt b { display: block; font-family: var(--f-head); font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.x-amt small { color: var(--muted); font-size: 11.5px; white-space: nowrap; }

.seg.flat { margin-bottom: 0; }
.catbar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; gap: 2px; margin-bottom: 12px; }
.catbar i { display: block; height: 100%; }
.catlist { list-style: none; margin: 0; padding: 0; }
.catlist button { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; width: 100%; padding: 8px 8px; margin: 0 -8px; width: calc(100% + 16px); border: 0; background: none; border-radius: 8px; text-align: left; }
.catlist button:hover, .catlist button.on { background: var(--surface-2); }
.catlist b { font-variant-numeric: tabular-nums; font-size: 13.5px; }
.catlist small { color: var(--muted); min-width: 36px; text-align: right; }

.tab-act { align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* obrazac računa */
.modal.wide { width: min(920px, calc(100% - 32px)); }
.xform { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 22px; align-items: start; }
.xform-file { position: sticky; top: 0; }
.drop-z.big { min-height: 380px; justify-content: center; gap: 6px; padding: 18px; }
.drop-z.over { border-color: var(--brand); background: var(--brand-soft); border-style: solid; }
.drop-prev { display: grid; place-items: center; width: 100%; }
.drop-prev > .ic { width: 34px; height: 34px; color: var(--brand); }
.drop-prev img { max-width: 100%; max-height: 270px; border-radius: 10px; box-shadow: var(--sh-2); object-fit: contain; }
.drop-z.big b { margin-top: 8px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface); font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.chip span i { width: 8px; height: 8px; border-radius: 50%; }
.chip input:checked + span { border-color: var(--text); background: var(--text); color: var(--surface); }
.chip input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.calc { align-self: end; height: 42px; display: flex; align-items: center; padding: 0 12px; border-radius: var(--r-sm); background: var(--surface-2); font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xform .toggle { height: 42px; }
.xform:has(input[name="paid"]:checked) .if-unpaid { display: none; }

/* pregled računa */
.xview { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 22px; }
.xprev { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); min-height: 460px; display: grid; place-items: center; overflow: hidden; }
.xprev iframe { width: 100%; height: 100%; min-height: 560px; border: 0; background: #fff; }
.xprev-img { border: 0; padding: 12px; background: none; cursor: zoom-in; display: grid; place-items: center; width: 100%; height: 100%; }
.xprev-img img { max-width: 100%; max-height: 540px; border-radius: 8px; box-shadow: var(--sh-2); }
.xhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.xhead h3 { font-size: 22px; margin: 6px 0 2px; }
.xtotal { display: flex; justify-content: space-between; align-items: baseline; margin: 16px 0; padding: 14px 16px; border-radius: var(--r); background: var(--side); color: #fff; }
.xtotal span { color: var(--side-text); font-size: 13px; }
.xtotal b { font-family: var(--f-head); font-size: 26px; font-variant-numeric: tabular-nums; }
.dl { margin: 0; }
.dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; text-align: right; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.xact { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

.mtop .icon-btn.on { color: var(--brand); }

@media (max-width: 640px) {
  .xrow { grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; }
  .xrow .thumb { grid-row: span 2; }
  .x-cat { display: none; }
  .x-st { grid-column: 2; grid-row: 2; }
  .x-amt { grid-column: 3; grid-row: 1 / span 2; }
  .xform, .xview { grid-template-columns: 1fr; }
  .xform-file { position: static; }
  .drop-z.big { min-height: 150px; }
  .drop-prev img { max-height: 180px; }
  .xprev { min-height: 260px; }
  .xprev iframe { min-height: 420px; }
  .filters .seg { width: 100%; }
  .filters .seg button { flex: 1; }
}

/* ---------------------------------------------------------------------
   Organizacija v3: brzo dodavanje, značke, pretraga, dorade
   --------------------------------------------------------------------- */
:root[data-theme="dark"] .avatar { color: hsl(var(--h) 80% 80%); background: hsl(var(--h) 35% 22%); }
:root[data-theme="dark"] .thumb.pdf { background: #3a1513; border-color: #5c211d; color: #ff8a80; }

/* bočni meni */
.side-nav { flex: 1; overflow-y: auto; }
.side-sep { height: 1px; background: var(--side-line); margin: 10px 8px; }
.nav-i .nbadge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; display: inline-grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 700; background: var(--warn); color: #1b1300; }
.nav-i .nbadge.bad { background: var(--bad); color: #fff; }
.side .me { padding-top: 14px; }
.side .me .lang { border-color: var(--side-line); }
.side .me .lang button { padding: 4px 6px; font-size: 10.5px; color: var(--side-text); }
.side .me .lang button.on { background: var(--side-2); color: #fff; }
.side-foot { gap: 10px; }

/* brzo dodavanje */
.quick { position: relative; }
.quick.side { margin: 0 0 16px; }
.quick-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 42px; border-radius: var(--r-sm); border: 0; background: var(--brand); color: #fff; font-weight: 700; box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--brand) 70%, transparent); transition: background .15s, transform .1s; }
.quick-btn:hover { background: var(--brand-2); }
.quick-btn .ic { width: 18px; height: 18px; transition: transform .2s; }
.quick.open .quick-btn .ic { transform: rotate(45deg); }
.quick-menu { position: absolute; z-index: 35; left: 0; right: -60px; top: calc(100% + 8px); background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-3); padding: 6px; animation: pop2 .14s ease-out; }
.quick-menu button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border: 0; background: none; border-radius: var(--r-sm); text-align: left; }
.quick-menu button:hover, .quick-menu button:focus-visible { background: var(--surface-2); }
.quick-menu b { display: block; font-weight: 600; font-size: 14px; }
.quick-menu small { display: block; color: var(--muted); }
.q-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-2); flex: none; }
.quick.fab { display: none; }
@keyframes pop2 { from { opacity: 0; transform: translateY(-4px); } }

/* zaglavlje stranice */
.icon-btn.lg { width: 40px; height: 40px; box-shadow: var(--sh-1); }
.phead .sub { font-size: 13.5px; }

/* pretraga */
.search { position: relative; display: flex; align-items: center; flex: 1 1 220px; min-width: 180px; }
.search .ic { position: absolute; left: 12px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.search input { padding-left: 36px; }

/* objekt: ure */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 28px; }
.mini-h { font-family: var(--f-body); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 4px 0 10px; }
.entries.compact li { padding: 8px 0; }

/* ekipa: danes na delu */
.av-wrap { position: relative; display: inline-flex; }
.av-wrap .live { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: var(--ok); border: 2px solid var(--surface); }

/* postavke */
.stack-cards { display: grid; gap: 18px; }
.stack-cards > .card { margin: 0; }
.cols.two { grid-template-columns: 1fr 1fr; }
.cols.two > .card { margin: 0; }
.card .seg.wide + .field { margin-top: 4px; }

@media (max-width: 1100px) {
  .split { grid-template-columns: 1fr; gap: 18px; }
}
@media (max-width: 900px) {
  .quick.fab { display: block; position: fixed; right: 16px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 32; }
  .quick.fab .quick-btn { width: 56px; height: 56px; border-radius: 18px; box-shadow: 0 10px 24px -6px color-mix(in srgb, var(--brand) 75%, transparent); }
  .quick.fab .quick-btn span { display: none; }
  .quick.fab .quick-btn .ic { width: 24px; height: 24px; }
  .quick.fab .quick-menu { top: auto; bottom: calc(100% + 10px); left: auto; right: 0; width: min(300px, calc(100vw - 32px)); }
}
@media (max-width: 640px) {
  .cols.two { grid-template-columns: 1fr; }
  .phead-act .icon-btn.lg { flex: none; }
  .search { flex-basis: 100%; }
}
.side { overflow: hidden; }
.side-foot, .side-foot > * { min-width: 0; }
.side-demo span { min-width: 0; }
.field .lang { align-self: flex-start; }
@media (max-width: 900px) {
  .bnav .nav-i { position: relative; }
  .bnav .nav-i .nbadge { position: absolute; top: 4px; left: calc(50% + 6px); margin: 0; min-width: 17px; height: 17px; font-size: 10px; padding: 0 4px; border: 2px solid var(--surface); box-sizing: content-box; }
}
@media (max-width: 900px) { .btn.dup-fab { display: none; } }

/* =====================================================================
   Izdani računi
   ===================================================================== */
.dlist, .clist { list-style: none; margin: 0; padding: 0; }
.dlist li + li, .clist li + li { border-top: 1px solid var(--line); }
.drow, .crow { display: grid; grid-template-columns: auto minmax(0, 1fr) 96px 118px 130px; align-items: center; gap: 14px; width: calc(100% + 20px); margin: 0 -10px; padding: 11px 10px; border: 0; background: none; text-align: left; border-radius: var(--r-sm); color: inherit; }
.crow { grid-template-columns: auto minmax(0, 1fr) 80px 130px; }
.drow:hover, .crow:hover { background: var(--surface-2); }
.d-kind { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--info-soft); color: var(--info); }
.d-kind.k-quote { background: var(--surface-2); color: var(--text-2); }
.d-kind.k-advance { background: var(--warn-soft); color: var(--warn); }
.d-kind.k-credit { background: var(--bad-soft); color: var(--bad); }
.d-kind .ic { width: 17px; height: 17px; }
.d-main { min-width: 0; }
.d-main b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-main small { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-date small, .d-amt small { display: block; color: var(--muted); font-size: 11.5px; }
.d-date span { font-size: 13px; font-variant-numeric: tabular-nums; }
.d-amt { text-align: right; }
.d-amt b { display: block; font-family: var(--f-head); font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.filters.in-card { margin: 0 0 8px; }
.tabs-act { margin-left: auto; display: flex; align-items: center; }
.row-btns { display: inline-flex; gap: 8px; flex-wrap: wrap; }

/* urejevalnik */
.doc-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.doc-right { position: sticky; top: 20px; }
.seg.doc-switch { display: none; }
.doc-form { display: grid; gap: 14px; }
.with-btn { display: flex; gap: 8px; }
.chips.small { margin-top: -6px; }
.chips.small .chip-btn { height: 26px; }
.items-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.items-h .mini-h { margin: 0; }
.toggle.sm { font-size: 13px; }
.toggle.sm .track { width: 38px; height: 22px; }
.toggle.sm .track i { width: 16px; height: 16px; }
.toggle.sm input:checked + .track i { transform: translateX(16px); }
.items { display: grid; gap: 10px; }
.item { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr 1fr; grid-template-areas: "d d d d x" "q u p s t"; gap: 8px 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); position: relative; }
.item:has(select[data-k="tax"]) { grid-template-columns: repeat(6, 1fr); grid-template-areas: "d d d d d x" "q u p s v t"; }
.item .it-desc { grid-area: d; min-height: 42px; resize: none; overflow: hidden; font-weight: 600; background: var(--surface); }
.item label { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.item label span { font-size: 11px; font-weight: 600; color: var(--muted); }
.item label input, .item label select { height: 36px; padding: 0 8px; font-size: 13.5px; }
.item label:nth-of-type(1) { grid-area: q; }
.item label:nth-of-type(2) { grid-area: u; }
.item label:nth-of-type(3) { grid-area: p; }
.item label:nth-of-type(4) { grid-area: s; }
.item label:nth-of-type(5) { grid-area: v; }
.it-total { grid-area: t; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-end; gap: 3px; }
.it-total span { font-size: 11px; font-weight: 600; color: var(--muted); }
.it-total b { height: 36px; display: flex; align-items: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
.it-del { grid-area: x; justify-self: end; align-self: start; }
.items-add { display: flex; flex-wrap: wrap; gap: 8px; }
.doc-totals dl { margin: 0; margin-left: auto; max-width: 320px; }
.doc-totals dl div, .xinfo .dl div { display: flex; justify-content: space-between; padding: 6px 0; font-variant-numeric: tabular-nums; }
.doc-totals dt { color: var(--muted); }
.doc-totals dd { margin: 0; font-weight: 600; }
.doc-totals .grand { border-top: 2px solid var(--text); margin-top: 4px; padding-top: 10px; }
.doc-totals .grand dt { color: var(--text); font-weight: 700; }
.doc-totals .grand dd { font-family: var(--f-head); font-size: 20px; }
.lock-note { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface-2); margin-bottom: 12px; color: var(--text-2); font-size: 13.5px; }
.lock-note .ic { color: var(--muted); margin-top: 2px; }
.more { position: relative; }
.more-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 190px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-3); padding: 6px; animation: pop2 .14s ease-out; }
.more-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: none; border-radius: 8px; font-weight: 600; text-align: left; }
.more-menu button:hover { background: var(--surface-2); }
.more-menu button.danger { color: var(--bad); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }

/* papir A4 — račun */
.paper-wrap { background: var(--surface-3); border-radius: var(--r-lg); padding: 18px; overflow: auto; }
.paper { --acc: #1f2937; position: relative; background: #fff; color: #1f2937; width: 100%; max-width: 794px; margin: 0 auto; aspect-ratio: 210 / 297; padding: 7% 7.5% 5%; box-shadow: 0 2px 6px rgba(0,0,0,.08), 0 12px 32px rgba(0,0,0,.08); font: 400 clamp(8px, 1.12vw, 11.5px)/1.5 "Inter", system-ui, sans-serif; display: flex; flex-direction: column; overflow: hidden; color-scheme: light; }
.paper::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: .55em; background: var(--acc); }
.paper .wm { position: absolute; inset: 0; display: grid; place-items: center; font: 800 clamp(40px, 9vw, 110px)/1 var(--f-head); color: rgba(220, 59, 38, .06); transform: rotate(-24deg); pointer-events: none; letter-spacing: .05em; }

.pp-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 2em; padding-bottom: 2.2em; }
.pp-brand { min-height: 3.6em; display: flex; align-items: center; }
.pp-brand img { display: block; max-height: 5.2em; max-width: 16em; object-fit: contain; }
.pp-brand b { font: 700 1.75em/1.15 var(--f-brand); letter-spacing: -.02em; color: var(--acc); }
.pp-company { display: flex; flex-direction: column; align-items: flex-end; text-align: right; color: #6b7280; gap: .05em; font-size: .92em; }
.pp-company b { color: #1f2937; font-size: 1.12em; font-weight: 700; margin-bottom: .15em; }

.pp-head2 { display: flex; justify-content: space-between; align-items: flex-end; gap: 2em; padding-bottom: 1.4em; border-bottom: 1px solid #e5e7eb; }
.pp-client { display: flex; flex-direction: column; gap: .1em; min-width: 0; }
.pp-client small, .pp-paytext > small { font-size: .78em; text-transform: uppercase; letter-spacing: .1em; color: #9ca3af; font-weight: 700; margin-bottom: .35em; }
.pp-client b { font-size: 1.25em; font-weight: 700; color: #111827; }
.pp-client span { color: #4b5563; }
.pp-missing { color: #dc3b26; font-style: italic; }
.pp-docid { text-align: right; }
.pp-docid h2 { font: 700 2.3em/1 var(--f-head); letter-spacing: -.02em; color: #111827; margin: 0 0 .25em; }
.pp-docid p { margin: 0; color: #6b7280; font-size: 1.05em; }
.pp-docid p b { color: var(--acc); font-weight: 700; font-variant-numeric: tabular-nums; }

.pp-meta2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 0; margin: 0 0 1.8em; border-bottom: 1px solid #e5e7eb; }
.pp-meta2 div { padding: 1em 1em 1em 0; }
.pp-meta2 div + div { padding-left: 1em; border-left: 1px solid #f0f1f3; }
.pp-meta2 dt { font-size: .78em; text-transform: uppercase; letter-spacing: .08em; color: #9ca3af; font-weight: 700; margin-bottom: .2em; }
.pp-meta2 dd { margin: 0; font-weight: 600; color: #111827; font-variant-numeric: tabular-nums; }

.pp-sub { font: 700 1.2em/1.3 var(--f-head); margin: 0 0 .4em; color: #111827; }
.pp-intro { margin: 0 0 1.2em; color: #4b5563; }

.pp-items { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.pp-items th { text-align: left; font-size: .76em; text-transform: uppercase; letter-spacing: .08em; color: #6b7280; font-weight: 700; padding: 0 .6em .7em; border-bottom: 2px solid var(--acc); white-space: nowrap; }
.pp-items td { padding: .8em .6em; border-bottom: 1px solid #f0f1f3; vertical-align: top; color: #374151; }
.pp-items th:first-child, .pp-items td:first-child { padding-left: 0; }
.pp-items th:last-child, .pp-items td:last-child { padding-right: 0; }
.pp-items .r { text-align: right; white-space: nowrap; }
.pp-items .b { font-weight: 600; color: #111827; }
.pp-items .c-n { width: 2em; color: #9ca3af; }
.pp-items .c-d { width: 44%; color: #111827; }

.pp-sum { display: flex; justify-content: space-between; align-items: flex-start; gap: 2em; margin-top: 1.4em; }
.pp-left { flex: 1; }
.pp-note { margin: 0 0 .6em; color: #4b5563; font-size: .95em; }
.pp-totals { margin: 0; min-width: 42%; }
.pp-totals div { display: flex; justify-content: space-between; gap: 2em; padding: .35em 0; font-variant-numeric: tabular-nums; }
.pp-totals dt { color: #6b7280; }
.pp-totals dd { margin: 0; font-weight: 600; color: #111827; }
.pp-totals .grand { margin-top: .5em; padding-top: .8em; border-top: 2px solid var(--acc); align-items: baseline; }
.pp-totals .grand dt { color: #111827; font-weight: 700; }
.pp-totals .grand dd { font: 700 1.6em/1 var(--f-head); color: var(--acc); letter-spacing: -.01em; }

.pp-payment { display: flex; justify-content: space-between; align-items: center; gap: 2em; margin-top: 2em; padding: 1.2em 1.4em; background: #f8f9fb; border-radius: .7em; }
.pp-paytext { display: flex; flex-direction: column; flex: 1; }
.pp-paytext dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .25em 1.6em; }
.pp-paytext dl div { display: contents; }
.pp-paytext dt { color: #6b7280; }
.pp-paytext dd { margin: 0; font-weight: 600; color: #111827; font-variant-numeric: tabular-nums; }
.pp-qrbox { display: flex; flex-direction: column; align-items: center; gap: .4em; }
.pp-qr { width: 7.6em; height: 7.6em; padding: .4em; background: #fff; border-radius: .4em; }
.pp-qr svg { width: 100%; height: 100%; display: block; }
.pp-qrbox small { font-size: .74em; color: #6b7280; text-align: center; max-width: 10em; line-height: 1.3; }

.pp-footer { margin: 1.6em 0 0; color: #4b5563; }
.pp-foot { margin-top: auto; padding-top: 1.2em; border-top: 1px solid #f0f1f3; color: #9ca3af; font-size: .82em; text-align: center; }

/* nastavitve: logotip in barva */
.logo-set { display: flex; gap: 16px; align-items: center; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.logo-set b { display: block; font-weight: 600; }
.logo-set .hint { margin: 2px 0 8px; }
.logo-drop { width: 170px; height: 84px; flex: none; border: 1.5px dashed var(--line-2); border-radius: var(--r); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; background: repeating-conic-gradient(#f3f4f6 0% 25%, #fff 0% 50%) 50% / 14px 14px; color: var(--muted); font-size: 12.5px; text-align: center; padding: 8px; }
.logo-drop:hover, .logo-drop.over { border-color: var(--brand); }
.logo-drop .ic { color: var(--brand); }
.logo-drop b { font-weight: 600; color: var(--text-2); }
.logo-drop.has { border-style: solid; }
.logo-drop img { max-width: 100%; max-height: 100%; object-fit: contain; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sw input[type=radio] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sw i { display: block; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; box-shadow: inset 0 0 0 2px rgba(255,255,255,.6); transition: transform .12s; }
.sw input:checked + i { outline: 2px solid var(--text); outline-offset: 2px; }
.sw input:focus-visible + i { outline: 2px solid var(--brand); outline-offset: 2px; }
.sw.custom input { width: 34px; height: 34px; padding: 0; border: 1px solid var(--line-2); border-radius: 50%; overflow: hidden; cursor: pointer; background: none; }
.sw.custom input::-webkit-color-swatch-wrapper { padding: 0; }
.sw.custom input::-webkit-color-swatch { border: 0; border-radius: 50%; }

@media (max-width: 1250px) {
  .doc-layout { grid-template-columns: 1fr; }
  .seg.doc-switch { display: flex; }
  .doc-layout.v-edit .doc-right { display: none; }
  .doc-layout.v-preview .doc-left { display: none; }
  .doc-right { position: static; }
  .paper { font-size: clamp(7px, 1.6vw, 11.5px); }
}
@media (max-width: 640px) {
  .drow { grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; }
  .drow .d-kind { grid-row: span 2; }
  .drow .d-date { display: none; }
  .drow .d-st { grid-column: 2; grid-row: 2; }
  .drow .d-amt { grid-column: 3; grid-row: 1 / span 2; }
  .crow { grid-template-columns: auto minmax(0, 1fr) auto; }
  .crow .d-date { display: none; }
  .item, .item:has(select[data-k="tax"]) { grid-template-columns: 1fr 1fr 1fr; grid-template-areas: "d d x" "q u p" "s v t"; }
  .item:not(:has(select[data-k="tax"])) { grid-template-areas: "d d x" "q u p" "s t t"; }
  .paper-wrap { padding: 8px; border-radius: var(--r); }
  .paper { font-size: 2.1vw; padding: 6%; }
  .pp-top, .pp-head2, .pp-sum, .pp-payment { gap: 10px; }
  .pp-meta2 { grid-template-columns: 1fr 1fr; }
  .pp-meta2 div:nth-child(3) { border-left: 0; padding-left: 0; }
  .logo-set { flex-direction: column; align-items: flex-start; }
  .phead-act .more { margin-left: auto; }
}

/* tisk: samo dokument */
@media print {
  @page { size: A4; margin: 0; }
  body { background: #fff !important; }
  body * { visibility: hidden !important; }
  .paper, .paper * { visibility: visible !important; }
  .doc-right, .doc-layout .doc-right { display: block !important; }
  .paper { position: fixed; left: 0; top: 0; width: 210mm; max-width: none; height: 297mm; aspect-ratio: auto; margin: 0; box-shadow: none; padding: 16mm 16mm 14mm; font-size: 10.5pt; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .paper .wm { font-size: 120pt; }
  .toast, .modal, .modal-bg { display: none !important; }
}

/* končni račun: izbor avansov */
.adv-pick { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; background: var(--surface); }
.adv-h { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin-bottom: 8px; }
.adv-h .mini-h { margin: 0; }
.adv-h .muted { font-size: 12.5px; }
.adv-pick ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.adv { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px; border: 1.5px solid var(--line-2); border-radius: var(--r-sm); cursor: pointer; transition: border-color .15s, background .15s; }
.adv input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.adv-box { width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--line-2); display: grid; place-items: center; color: transparent; background: var(--surface); }
.adv-box .ic { width: 14px; height: 14px; }
.adv.on { border-color: var(--brand); background: var(--brand-soft); }
.adv.on .adv-box { background: var(--brand); border-color: var(--brand); color: #fff; }
.adv input:focus-visible + .adv-box { outline: 2px solid var(--brand); outline-offset: 2px; }
.adv-m b { display: block; font-weight: 600; }
.adv-m small { color: var(--muted); }
.adv-amt { font-variant-numeric: tabular-nums; white-space: nowrap; }
.doc-totals .ded dt, .doc-totals .ded dd { color: var(--brand-2); }
.pp-totals .sub { border-top: 1px solid #e5e7eb; margin-top: .3em; padding-top: .55em; }
.pp-totals .sub dt { color: #111827; font-weight: 600; }
.pp-totals .ded dt { color: #4b5563; }
.pp-totals .ded dd { color: #4b5563; font-weight: 600; }
.pp-totals .recap { padding-top: .2em; }
.pp-totals .recap dt, .pp-totals .recap dd { font-size: .85em; color: #9ca3af; font-weight: 400; }

/* datumi pod številko računa */
.pp-head2 { align-items: flex-start; margin-bottom: 1.8em; }
.pp-client { padding-top: 3.1em; }
.pp-docmeta { margin: .9em 0 0; display: grid; gap: .2em; }
.pp-docmeta div { display: flex; justify-content: flex-end; gap: 1.4em; }
.pp-docmeta dt { color: #6b7280; }
.pp-docmeta dd { margin: 0; min-width: 6.5em; text-align: right; font-weight: 600; color: #111827; font-variant-numeric: tabular-nums; }

/* končni račun: izbor avansov s seznamom */
.adv-pick select { margin-bottom: 8px; }
.adv-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r-sm); }
.adv-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 6px 6px 6px 12px; font-size: 13.5px; }
.adv-list li + li { border-top: 1px solid var(--line); }
.adv-no { font-weight: 600; font-variant-numeric: tabular-nums; }
.adv-meta { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adv-meta em { color: var(--warn); font-style: normal; }
.adv-val { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--brand-2); font-weight: 600; }
.adv-list .icon-btn { width: 30px; height: 30px; }

/* beta */
em.beta { font-style: normal; font-family: var(--f-body); font-size: 9.5px; font-weight: 800; letter-spacing: .08em; background: var(--brand); color: #fff; padding: 2px 6px; border-radius: 5px; margin-left: 7px; vertical-align: 3px; }
.auth-brand em.beta { vertical-align: 0; }
.side-fb { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: var(--r-sm); border: 1px dashed color-mix(in srgb, var(--brand) 55%, transparent); color: #fff; }
.side-fb:hover { background: var(--side-2); }
.side-fb .ic { color: var(--brand); }
.side-fb b { display: block; font-size: 13px; }
.side-fb small { color: var(--side-text); font-size: 11.5px; }
