/* Raspored: alat za teren — gornja traka, popis, donja traka s karticama; nalog prati papirnati obrazac (sive trake po odjeljcima). */
:root {
  --bg: #eef1f3;
  --surface: #ffffff;
  --ink: #1b2731;
  --muted: #5c6a75;
  --line: #d6dde2;
  --band: #e3e8ec;
  --primary: #233a4c;
  --on-primary: #ffffff;
  --primary-soft: #dde6ee;
  --signal: #b8650a;
  --ok: #2b7a4b;
  --warn: #a8620b;
  --crit: #b1362b;
  --pro: #8b2f2a;
  --bar: #2b5d8a;
  --paper: #ffffff;
  --paper-ink: #1b2731;
  --paper-line: #aab6bf;
  --paper-muted: #6f7d88;
  --shadow: 0 1px 2px rgba(20, 35, 48, .06), 0 4px 14px rgba(20, 35, 48, .06);
  --f-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --f-body: "Barlow", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r: 10px;
  --tabh: 64px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1418; --surface: #161f26; --ink: #e4eaee; --muted: #93a2ad; --line: #26333c; --band: #1d2932;
    --primary: #9cc0dc; --on-primary: #0e1418; --primary-soft: #1f3343; --signal: #f0a24a; --ok: #6cc28f;
    --warn: #e6a24a; --crit: #f08a7e; --pro: #e7948c; --bar: #8fbbe3; --shadow: 0 1px 2px rgba(0,0,0,.3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1418; --surface: #161f26; --ink: #e4eaee; --muted: #93a2ad; --line: #26333c; --band: #1d2932;
  --primary: #9cc0dc; --on-primary: #0e1418; --primary-soft: #1f3343; --signal: #f0a24a; --ok: #6cc28f;
  --warn: #e6a24a; --crit: #f08a7e; --pro: #e7948c; --bar: #8fbbe3; --shadow: 0 1px 2px rgba(0,0,0,.3);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 16px; line-height: 1.4;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 0 calc(var(--tabh) + 24px + env(safe-area-inset-bottom, 0px));
}
body.no-tabs { padding-block-end: calc(96px + env(safe-area-inset-bottom, 0px)); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.mono { font-family: var(--f-mono); font-size: .86em; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.wrap { max-width: 720px; margin: 0 auto; }

/* Gornja traka */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--bg); margin: 0 calc(-1 * max(16px, env(safe-area-inset-left, 0px))) 0; padding: 10px max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px)); }
.top-in { max-width: 720px; margin: 0 auto; display: flex; align-items: center; gap: 8px; min-height: 44px; }
.top .tt { flex: 1; min-width: 0; }
.top h1 { font-family: var(--f-display); font-weight: 700; font-size: 26px; line-height: 1.05; margin: 0; letter-spacing: .005em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top p { margin: 1px 0 0; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib { width: 42px; height: 42px; border-radius: 50%; border: 0; background: transparent; display: grid; place-items: center; color: var(--ink); flex: none; }
.ib:active { background: var(--band); }
.ib svg { width: 24px; height: 24px; }

/* Donja traka */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: var(--surface); border-top: 1px solid var(--line);
  padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px)); }
.tabs-in { max-width: 720px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; }
.tab { border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 10px; color: var(--muted); font-size: 12.5px; font-weight: 500; min-height: 50px; }
.tab svg { width: 23px; height: 23px; }
.tab[aria-current="page"] { color: var(--primary); background: var(--primary-soft); font-weight: 600; }

/* Tipke */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 16px; text-decoration: none; color: var(--ink); }
.btn svg { width: 20px; height: 20px; }
.btn.pri { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--crit); border-color: var(--crit); background: transparent; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-row > .btn { flex: 1 1 140px; }

/* Kartice i odjeljci */
.stack { display: flex; flex-direction: column; gap: 14px; }
.card { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); padding: 14px 16px; }
.card h2, .sec-h { font-family: var(--f-display); font-weight: 700; font-size: 19px; text-transform: uppercase; letter-spacing: .04em; margin: 0; }
.card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.card-h .cnt { font-family: var(--f-display); font-size: 18px; color: var(--muted); font-weight: 600; }
.empty { color: var(--muted); font-size: 14.5px; margin: 2px 0; }
.hello { margin: 4px 0 2px; }
.hello .d { color: var(--muted); font-size: 14px; }
.hello h2 { font-family: var(--f-display); font-size: 34px; line-height: 1; margin: 4px 0 0; font-weight: 700; }
.note { font-size: 13.5px; color: var(--muted); }
.note.warn { color: var(--warn); }
.sync { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); padding: 8px 12px; border-radius: 10px; background: var(--band); }
.sync.bad { color: var(--warn); flex-wrap: wrap; justify-content: space-between; }

/* Redovi popisa */
.rows { display: flex; flex-direction: column; }
.row { display: flex; align-items: flex-start; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); text-align: left; background: transparent; border-left: 0; border-right: 0; border-bottom: 0; width: 100%; color: inherit; }
.rows > .row:first-child { border-top: 0; }
.row .rm { flex: 1; min-width: 0; }
.row .rt { font-weight: 600; font-size: 16.5px; line-height: 1.25; overflow-wrap: anywhere; }
.row .rs { color: var(--muted); font-size: 13.5px; margin-top: 1px; overflow-wrap: anywhere; }
.row .re { font-size: 13px; margin-top: 4px; color: var(--muted); }
.row .rr { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.row .chev { color: var(--muted); width: 18px; height: 18px; flex: none; margin-top: 3px; }

/* Oznake */
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.tag { font-size: 11.5px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; background: var(--band); color: var(--muted); }
.tag.pel { color: var(--primary); background: var(--primary-soft); }
.tag.att { color: var(--warn); background: transparent; box-shadow: inset 0 0 0 1px var(--warn); }
.kava { font-family: var(--f-display); font-weight: 700; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; padding: 3px 8px 2px; border-radius: 6px; color: #fff; }
.kava.P { background: var(--pro); color: var(--surface); }
.kava.B { background: var(--bar); color: var(--surface); }
.kava.S { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.pill { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.pill.ok { color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok); }
.pill.warn { color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn); }
.pill.crit { color: var(--crit); box-shadow: inset 0 0 0 1px var(--crit); }
.pill.draft { color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.due { font-family: var(--f-display); font-weight: 700; font-size: 15px; white-space: nowrap; }
.due.late { color: var(--crit); }
.due.soon { color: var(--signal); }

/* Pretraga i filtri */
.searchbar { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 62px); z-index: 15; background: var(--bg); padding: 2px 0 10px; }
.search { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; }
.search svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.search input { border: 0; background: transparent; outline: none; flex: 1; min-width: 0; height: 46px; font-size: 16px; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 13px; font-size: 14px; font-weight: 500; color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.count { font-size: 13px; color: var(--muted); margin: 4px 2px 8px; }
.grp { font-family: var(--f-display); font-weight: 700; font-size: 16px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: 14px 2px 4px; display: flex; justify-content: space-between; }
.grp:first-child { margin-top: 2px; }
.list-card { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); padding: 0 14px; }

/* Detalj objekta */
.obj-head h2 { font-family: var(--f-display); font-size: 30px; line-height: 1.05; margin: 2px 0 2px; font-weight: 700; overflow-wrap: anywhere; }
.obj-head .nk { color: var(--muted); font-size: 14px; }
dl.kv { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 6px 12px; margin: 0; font-size: 15px; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.eq { display: flex; gap: 12px; align-items: flex-start; }
.eq .kind { font-family: var(--f-display); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: 13px; color: var(--muted); width: 58px; flex: none; padding-top: 2px; }
.nums { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; margin-top: 2px; }
.nums b { font-weight: 500; color: var(--muted); font-size: 12.5px; margin-right: 4px; }
.loglist { font-size: 13.5px; }
.loglist li { padding: 6px 0; border-top: 1px solid var(--line); list-style: none; }
.loglist li:first-child { border-top: 0; }
.loglist { padding: 0; margin: 0; }
.loglist .lt { color: var(--muted); font-size: 12.5px; }
.ch-old { text-decoration: line-through; color: var(--muted); }
.quick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }

/* Obrasci */
.form { display: flex; flex-direction: column; gap: 14px; }
.fld { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.fld > label, .lbl { font-size: 13.5px; font-weight: 600; color: var(--muted); }
.inp { width: 100%; min-width: 0; height: 46px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 0 12px; font-size: 16px; }
textarea.inp { height: auto; min-height: 76px; padding: 10px 12px; resize: vertical; }
select.inp { appearance: auto; }
.inp:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 10px; }
@media (max-width: 420px) { .grid3 { grid-template-columns: 1fr 1fr; } .grid3 > :first-child { grid-column: 1 / -1; } }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; min-height: 44px; padding: 0 14px; font-weight: 600; font-size: 15px; }
.seg button[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.err { color: var(--crit); font-size: 14px; font-weight: 600; }

/* Nalog — prati papirnati obrazac */
.sheet { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.sheet .sh-in { padding: 4px 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.band { background: var(--band); font-family: var(--f-display); font-weight: 700; font-size: 15px; letter-spacing: .09em; text-transform: uppercase; padding: 7px 16px 6px; color: var(--ink); }
.cust { padding: 14px 16px 10px; }
.cust .cn { font-family: var(--f-display); font-weight: 700; font-size: 24px; line-height: 1.1; overflow-wrap: anywhere; }
.cust .codes { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; color: var(--muted); margin-top: 4px; }
.cust .codes b { color: var(--ink); font-weight: 500; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.checks.one { grid-template-columns: 1fr; }
.ck { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); text-align: left; font-size: 15.5px; font-weight: 500; }
.ck .bx { width: 22px; height: 22px; border: 2px solid var(--muted); border-radius: 4px; flex: none; display: grid; place-items: center; }
.ck .bx svg { width: 16px; height: 16px; opacity: 0; }
.ck[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-soft); }
.ck[aria-pressed="true"] .bx { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.ck[aria-pressed="true"] .bx svg { opacity: 1; }
.hint { font-size: 13px; color: var(--muted); margin-top: -4px; }
.pad-wrap { display: flex; flex-direction: column; gap: 6px; }
.pad { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; height: 150px; touch-action: none; position: relative; overflow: hidden; }
.pad canvas { width: 100%; height: 100%; display: block; }
.pad::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: 34px; border-bottom: 1px dashed #b9c3ca; pointer-events: none; }
.pad .ph { position: absolute; left: 16px; bottom: 12px; font-size: 12px; color: #8b98a2; pointer-events: none; }
.pad-tools { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.linkbtn { border: 0; background: none; color: var(--primary); font-weight: 600; font-size: 14.5px; padding: 6px 0; }
.actionbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: var(--surface); border-top: 1px solid var(--line);
  padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.actionbar .in { max-width: 720px; margin: 0 auto; display: flex; gap: 8px; }
.actionbar .btn { flex: 1; }

/* Tjedan */
.weeknav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.weeknav .wl { font-family: var(--f-display); font-weight: 700; font-size: 22px; text-align: center; flex: 1; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.stat { background: var(--band); border-radius: 10px; padding: 8px 10px; }
.stat .v { font-family: var(--f-display); font-weight: 700; font-size: 26px; line-height: 1; font-variant-numeric: tabular-nums; }
.stat .k { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.toggle-line { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.toggle-line input { width: 20px; height: 20px; accent-color: var(--primary); }

/* Dijalog i obavijest */
.modal-bg { position: fixed; inset: 0; z-index: 50; background: rgba(10, 16, 20, .45); display: flex; align-items: flex-end; justify-content: center; padding: 16px max(16px, env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.modal { background: var(--surface); border-radius: 16px; padding: 18px; width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 14px; }
.modal p { margin: 0; font-size: 16px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabh) + 22px + env(safe-area-inset-bottom, 0px)); z-index: 60; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 14.5px; max-width: calc(100% - 32px); box-shadow: var(--shadow); }
.toast.err { background: var(--crit); color: #fff; }
@media (prefers-reduced-motion: no-preference) {
  .toast { animation: tin .18s ease-out; }
  @keyframes tin { from { opacity: 0; transform: translate(-50%, 6px); } to { opacity: 1; transform: translate(-50%, 0); } }
}

/* Potpis preko cijelog ekrana — papir ostaje bijel u obje teme */
.pad-fs { position: absolute; top: 6px; right: 6px; z-index: 2; width: 40px; height: 40px; border-radius: 9px; border: 1px solid #d6dde2; background: rgba(255,255,255,.92); color: #233a4c; display: grid; place-items: center; }
.pad-fs svg { width: 20px; height: 20px; }
html.fs-open, html.fs-open body { overflow: hidden; }
.fs { position: fixed; inset: 0; z-index: 70; background: var(--paper); color: var(--paper-ink); touch-action: none; overscroll-behavior: none; }
.fs canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.fs-ui { position: absolute; left: 0; top: 0; transform-origin: 0 0; pointer-events: none; }
.fs-bar { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px)); }
.fs-ui.rot .fs-bar { padding: 14px 18px; }
.fs-t { display: flex; flex-direction: column; min-width: 0; }
.fs-t b { font-family: var(--f-display); font-size: 24px; font-weight: 700; letter-spacing: .01em; }
.fs-t span { font-size: 14px; color: var(--paper-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fs-btns { display: flex; gap: 8px; flex: none; }
.fs-btn { pointer-events: auto; min-height: 46px; padding: 0 20px; border-radius: 10px; border: 1px solid #c6cfd6; background: #fff; color: var(--paper-ink); font-weight: 600; font-size: 16px; }
.fs-btn.pri { background: #233a4c; border-color: #233a4c; color: #fff; }
.fs-line { position: absolute; left: max(28px, env(safe-area-inset-left, 0px)); right: max(28px, env(safe-area-inset-right, 0px)); bottom: 26%; border-bottom: 1.5px dashed var(--paper-line); }
.fs-ui.rot .fs-line { left: 28px; right: 28px; }
.fs-hint { position: absolute; left: 0; right: 0; bottom: calc(26% - 30px); text-align: center; font-size: 13.5px; color: var(--paper-muted); }

/* Fotografije */
.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.thumbs:empty { display: none; }
.thumb { position: relative; aspect-ratio: 1; max-width: 100%; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--band); padding: 0; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb span { position: absolute; left: 4px; bottom: 4px; font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 6px; background: rgba(15, 22, 28, .72); color: #fff; }
.thumb.up { display: grid; place-items: center; }
.thumb.up em { font-style: normal; font-size: 12.5px; color: var(--muted); }
.btn input[type=file] { display: none; }
.servsig { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.servsig img { width: 120px; height: 52px; object-fit: contain; background: var(--paper); border-radius: 6px; flex: none; }
.pv { position: fixed; inset: 0; z-index: 80; background: #0b1013; color: #e9eef1; display: flex; flex-direction: column;
  padding: env(safe-area-inset-top, 0px) max(12px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(12px, env(safe-area-inset-left, 0px)); }
.pv-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; }
.pv-t { display: flex; flex-direction: column; min-width: 0; }
.pv-t b { font-family: var(--f-display); font-size: 22px; }
.pv-t span { font-size: 13px; color: #9fb0bb; }
.pv-img { flex: 1; min-height: 0; display: grid; place-items: center; }
.pv-img img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.pv-tools { display: flex; flex-direction: column; gap: 10px; padding: 12px 0 14px; }
.pv-tools .seg button { background: #18222a; border-color: #2a3842; color: #e9eef1; }
.pv-tools .seg button[aria-pressed="true"] { background: #e9eef1; color: #0b1013; border-color: #e9eef1; }
.pv-tools .btn.danger { color: #f08a7e; border-color: #f08a7e; }

/* Diskretna kamera i traka sa sličicama */
.ib.cam { cursor: pointer; }
.fstrip { padding: 0 16px; }
.fstrip:empty { display: none; }
.fstrip-empty { display: flex; justify-content: flex-end; margin-top: -4px; }
.fstrip-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.fstrip-row { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
.fstrip-row::-webkit-scrollbar { display: none; }
.thumb.sm { width: 76px; height: 76px; flex: none; aspect-ratio: auto; }
.thumb.sm span { font-size: 10px; max-width: calc(100% - 8px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fs-gal { color: var(--primary); font-weight: 600; font-size: 13.5px; cursor: pointer; padding: 4px 0; }
.modal.ps { gap: 12px; max-height: calc(100% - 8px); overflow-y: auto; }
.ps-top { display: flex; gap: 12px; align-items: center; }
.ps-top img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; flex: none; background: var(--band); }
.ps-st { font-size: 14px; color: var(--muted); }
.ps-st.ok { color: var(--ok); font-weight: 600; }
.ps-st.err { color: var(--crit); }
.seg.sm button { min-height: 38px; padding: 0 12px; font-size: 14px; font-weight: 500; }
.pv-in { background: #18222a; border-color: #2a3842; color: #e9eef1; }
.pv-opis { margin: 0; font-size: 15px; color: #d5dee4; }

/* Kvarovi */
.tab { position: relative; }
.tab .badge { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--crit); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.row.kv { position: relative; padding-left: 12px; }
.row.kv::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 4px; border-radius: 2px; background: var(--line); }
.row.kv.crit::before { background: var(--crit); }
.row.kv.warn::before { background: var(--warn); }
.kvn { font-family: var(--f-display); font-weight: 700; font-size: 18px; color: var(--muted); width: 18px; flex: none; text-align: right; font-variant-numeric: tabular-nums; }
.kvopis { color: var(--ink); font-size: 14.5px; }
.kvtext { font-size: 17px; margin: 2px 0 12px; overflow-wrap: anywhere; white-space: pre-wrap; }
.kvcard.crit { box-shadow: var(--shadow), inset 4px 0 0 var(--crit); }
.kvcard.warn { box-shadow: var(--shadow), inset 4px 0 0 var(--warn); }
.sortline { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.seg button.hit-crit[aria-pressed="true"] { background: var(--crit); border-color: var(--crit); color: #fff; }
.seg button.hit-warn[aria-pressed="true"] { background: var(--warn); border-color: var(--warn); color: #fff; }
.objpick { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--surface); align-items: center; }
.kvban { padding: 0 16px 12px; display: flex; flex-direction: column; gap: 6px; }
.kvban .ck { min-height: 52px; padding: 8px 12px; align-items: flex-start; }
.kvban .ck .bx { margin-top: 2px; }
.kvban .pill { display: inline-block; }

/* Telefon */
.telrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.telnum { font-size: 17px; font-weight: 500; flex: 1 1 100%; user-select: all; -webkit-user-select: all; }
.telrow .btn { flex: 1 1 120px; }
.telcall.off { opacity: .45; pointer-events: none; }

/* Neaktivni kupci */
.row.inact .rt { text-decoration: line-through; text-decoration-thickness: 1.5px; color: var(--muted); }
.row.inact .re, .row.inact .kava { opacity: .55; }
.inact-ban { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--band); border-radius: 12px; padding: 12px 14px; }
.inact-ban > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 200px; }
.inact-ban span { font-size: 13.5px; color: var(--muted); }
.btn.deact { color: var(--muted); font-weight: 500; font-size: 15px; }

/* Verzija, broj stranice i greške */
.appfoot { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 14px; padding: 22px 0 6px; font-size: 12.5px; color: var(--muted); text-align: center; }
.appfoot b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.appfoot .linkbtn { font-size: 12.5px; padding: 2px 0; }
.pgno { position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; font-size: 11px; color: var(--paper-muted); }
.pgno-in { margin: 0; font-size: 11.5px; color: var(--muted); text-align: right; }
.row.bug { cursor: default; }
.bugtext { color: var(--ink); font-size: 14.5px; white-space: pre-wrap; }

/* ---------- Firebase verzija (1.11) ---------- */
.sync.off { color: var(--muted); }
img.ld { animation: fotoLd 1.2s ease-in-out infinite; background: var(--band); }
@keyframes fotoLd { 50% { opacity: .45; } }
img.miss { opacity: .35; }
.pdf-ready { border: 1.5px solid var(--ok); }
.imp-bar { height: 8px; border-radius: 4px; background: var(--band); overflow: hidden; }
.imp-bar i { display: block; height: 100%; width: 0; background: var(--primary); transition: width .2s; }
.uid { font-size: 11.5px; word-break: break-all; color: var(--muted); }
.login { min-height: calc(100dvh - 110px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding-block: 28px 0; }
.login-card { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 18px; padding: 26px 20px 20px; }
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.login-logo { width: 58px; height: 58px; color: var(--primary); margin-bottom: 6px; }
.login-brand h1 { font-family: var(--f-display); font-weight: 700; font-size: 30px; line-height: 1.05; margin: 0; letter-spacing: .01em; text-wrap: balance; }
.login-brand p { margin: 0; color: var(--muted); font-size: 14px; }
.login-form { display: flex; flex-direction: column; gap: 14px; }
.login-reset { align-self: center; font-size: 14.5px; }
.login-note, .login-wait { text-align: center; margin: 0; }
