/* =========================================================================
   styles.css — NATIVE mobilni stil „Moj Grad Budva“ (demo-simulacija)
   Ista paleta kao web (--brand #0E6BA8), sistemski font-stack, bez CDN/fontova.
   Koža: phone-frame (desktop) / pun ekran (telefon), app-bar, donja tab-traka +
   FAB, bottom-sheets, snackbar, ugrađeni PIN-keypad, NOTIF sheet, push, splash.
   ========================================================================= */

:root {
  --brand: #0E6BA8;
  --brand-dark: #0A527F;
  --accent: #1AA7A0;
  --bg: #F5F7FA;
  --surface: #FFFFFF;
  --text: #1B2733;
  --text-muted: #5B6B7B;
  --border: #E1E7EE;
  --ok: #1E8E5A;
  --warn: #E08A1E;
  --danger: #D14343;
  --info: #0E6BA8;
  --brand-soft: #E8F1F8;
  --shadow-card: 0 1px 3px rgba(0,0,0,.08);
  --shadow-sheet: 0 -10px 40px rgba(0,0,0,.22);
  --radius: 10px;
  --radius-lg: 14px;
  --appbar-h: 52px;
  --tabbar-h: 60px;
  --status-h: 28px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px; line-height: 1.5; color: var(--text); background: #0A527F;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
h1 { font-size: 22px; } h2 { font-size: 19px; } h3 { font-size: 15px; }
h1, h2, h3 { margin: 0 0 .5em; font-weight: 700; line-height: 1.3; }
p { margin: 0 0 1em; }
.muted { color: var(--text-muted); }
img { display: block; }

/* ===================== IKONE ===================== */
.icon { width: 22px; height: 22px; flex: 0 0 auto; vertical-align: middle; }
.icon-sm { width: 17px; height: 17px; }
.icon-lg { width: 30px; height: 30px; }

/* ===================== DUGMAD ===================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border: 1px solid transparent; border-radius: var(--radius);
  font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none;
  background: var(--surface); color: var(--text);
  transition: background .12s, border-color .12s, color .12s, transform .06s;
  font-family: inherit;
}
.btn:active:not(:disabled) { transform: scale(.985); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--brand); border-color: var(--brand); }
.btn-ghost { background: transparent; color: var(--brand); border-color: transparent; min-height: 38px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; }

/* ===================== PHONE-FRAME / STAGE ===================== */
#frame-stage {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  gap: 40px; padding: 20px;
  background:
    radial-gradient(120% 80% at 80% 0%, rgba(255,255,255,.10), transparent 60%),
    radial-gradient(100% 70% at 10% 100%, rgba(255,255,255,.07), transparent 55%),
    linear-gradient(160deg, #0E6BA8 0%, #0A527F 100%);
}
#mg-phone {
  position: relative; width: 392px; height: 812px; max-height: calc(100vh - 40px);
  background: var(--bg); border-radius: 42px; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 0 0 11px #11161c, 0 0 0 13px #2a2f37, 0 30px 70px rgba(0,0,0,.45);
}
#faux-status {
  flex: 0 0 var(--status-h); height: var(--status-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px; background: var(--brand); color: #fff; font-size: 13px; font-weight: 600;
}
#faux-status .fs-icons { display: inline-flex; align-items: center; gap: 6px; }
#app { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; position: relative; }

/* Bočni opis (samo na širem desktopu) */
#frame-side { width: 260px; color: #fff; }
.side-card { background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.18); border-radius: 16px; padding: 22px; text-align: center; }
.side-card h2 { font-size: 20px; margin-bottom: 4px; }
.side-sub { color: rgba(255,255,255,.82); font-size: 13px; margin-bottom: 18px; }
.side-open { font-weight: 700; margin-bottom: 12px; }
.side-qr { background: #fff; border-radius: 12px; padding: 10px; display: inline-block; }
.side-qr img { width: 150px; height: 150px; }
.side-scan { font-size: 13px; color: rgba(255,255,255,.82); margin-top: 10px; }
.side-url { font-size: 13px; font-weight: 600; margin-top: 4px; letter-spacing: .2px; }

/* Telefon: pun ekran (uska širina ILI PWA standalone) */
@media (max-width: 900px) { #frame-side { display: none; } }
@media (max-width: 560px) {
  #frame-stage { padding: 0; gap: 0; background: var(--bg); }
  #mg-phone {
    width: 100%; height: 100%; max-height: none; border-radius: 0;
    box-shadow: none;
    padding-bottom: env(safe-area-inset-bottom);
    --status-h: 0px;                 /* nema faux statusa → push kreće odmah ispod app-bara (11.2) */
  }
  #faux-status { display: none; }
}
@media (display-mode: standalone) {
  #frame-stage { padding: 0; gap: 0; background: var(--bg); }
  #mg-phone { width: 100%; height: 100%; max-height: none; border-radius: 0; box-shadow: none; padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); --status-h: 0px; /* PWA standalone: bez faux statusa → push ispod app-bara (11.2) */ }
  #faux-status { display: none; }
  #frame-side { display: none; }
}

/* ===================== APP-BAR ===================== */
.app-bar {
  flex: 0 0 var(--appbar-h); height: var(--appbar-h);
  display: flex; align-items: center; gap: 4px; padding: 0 6px;
  background: var(--brand); color: #fff;
}
.ab-grb { display: inline-flex; align-items: center; padding: 0 6px; }
.ab-grb .grb { height: 28px; width: auto; }
.ab-title { font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 2px; }
.ab-spacer { flex: 1 1 auto; }
.ab-btn {
  position: relative; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0; color: #fff; border-radius: 50%; cursor: pointer;
}
.ab-btn:active { background: rgba(255,255,255,.16); }
#appbar-help.on { background: rgba(255,255,255,.24); }
.ab-badge {
  position: absolute; top: 4px; right: 4px; min-width: 17px; height: 17px; padding: 0 4px;
  background: var(--danger); color: #fff; border-radius: 9px; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--brand);
}

/* ===================== SCROLL OBLAST ===================== */
.screen { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
/* Donji safe-padding: centralni 311 FAB viri ~16px iznad tab-trake u sadržaj →
   ostavi prostor da donji CTA/sadržaj/help-oblačić ne padnu pod FAB (11.3). */
.page { padding: 14px 14px 26px; }
.page-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; color: var(--brand); }
.page-head h1 { margin: 0; color: var(--text); }
.dash-greet { margin: 2px 0 14px; }
.detalj-title { margin: 2px 0 12px; font-size: 20px; }
.detalj-sub { margin: 16px 0 8px; font-size: 14px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; }

/* ===================== TAB-TRAKA + FAB ===================== */
.tab-bar {
  flex: 0 0 var(--tabbar-h); display: flex; align-items: stretch;
  background: var(--surface); border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: transparent; border: 0; cursor: pointer; color: var(--text-muted); font-size: 11px; font-weight: 600;
  font-family: inherit; padding: 6px 0 4px;
}
.tab-item.active { color: var(--brand); }
.tab-ic { position: relative; display: inline-flex; }
.tab-ic .icon { width: 23px; height: 23px; }
.tab-lbl { line-height: 1; }
.tab-badge {
  position: absolute; top: -5px; right: -8px; min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--danger); color: #fff; border-radius: 8px; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.tab-badge-dot { background: var(--warn); }
.tab-fab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 3px;
  background: transparent; border: 0; cursor: pointer; color: var(--brand); font-size: 11px; font-weight: 700;
  font-family: inherit; padding-top: 4px; position: relative;
}
.fab-circle {
  width: 52px; height: 52px; margin-top: -16px; border-radius: 50%;
  background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(14,107,168,.45); border: 3px solid var(--surface);
}
.fab-circle .icon { width: 26px; height: 26px; }
.tab-fab.active .fab-circle { background: var(--brand-dark); }

/* ===================== KARTICA / LISTE / REDOVI ===================== */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: 16px; }
.list-card { padding: 4px 0; }
.list { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); width: 100%; text-align: left; }
.list .row:last-child, .list .row-btn:last-child { border-bottom: 0; }
.row-btn { background: transparent; border: 0; border-bottom: 1px solid var(--border); font-family: inherit; font-size: 15px; color: var(--text); cursor: pointer; }
.row-btn:active { background: var(--brand-soft); }
.row-lead { width: 26px; display: inline-flex; justify-content: center; align-items: center; flex: 0 0 auto; }
.row-lead.brand { color: var(--brand); }
.grow { flex: 1 1 auto; min-width: 0; }
.title { font-weight: 600; }
.meta { font-size: 12px; color: var(--text-muted); }
.right { text-align: right; flex: 0 0 auto; }
.amount { font-weight: 700; }
.empty { text-align: center; color: var(--text-muted); padding: 26px 10px; }
.empty .icon { width: 30px; height: 30px; color: var(--border); }
.info-box { background: var(--brand-soft); color: var(--brand-dark); border-radius: var(--radius); padding: 10px 12px; font-size: 13px; display: flex; gap: 8px; align-items: flex-start; }
.info-box .icon { color: var(--brand); }

/* status / čip / tag */
.status-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.dot-info { background: var(--info); } .dot-ok { background: var(--ok); } .dot-warn { background: var(--warn); }
.tag-status { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 6px; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.tag-ok { background: #E6F4EC; color: var(--ok); } .tag-warn { background: #FBF0DF; color: #9a5e07; }
.tag-info { background: #E8F1F8; color: var(--brand); } .tag-sm { font-size: 11px; padding: 1px 6px; }
.soon-pill { font-size: 11px; font-weight: 700; color: var(--text-muted); background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 3px 9px; white-space: nowrap; }

/* ===================== DASHBOARD ===================== */
.dash-grid { display: flex; flex-direction: column; gap: 12px; }
.dash-card { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; cursor: pointer; font-family: inherit; color: var(--text); }
.dash-card:active { background: var(--brand-soft); }
.dc-label { font-size: 13px; color: var(--text-muted); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.dc-big { font-size: 30px; font-weight: 800; line-height: 1.1; margin: 2px 0; }
.dc-big.big-name { font-size: 20px; }
.dc-sub { font-size: 13px; color: var(--text-muted); }
.dc-cta { margin-top: 8px; color: var(--brand); font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.dash-card-mini .dc-cta { margin-top: 2px; }

/* ===================== LOGIN / REGISTRACIJA ===================== */
.login-wrap { flex: 1; overflow-y: auto; display: flex; align-items: flex-start; justify-content: center; padding: 22px 16px 30px; }
.login-card { position: relative; width: 100%; max-width: 360px; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: 24px 20px; text-align: center; }
/* „?“ prekidač pomoći na login/reg kartici (11.5) — gore-desno, na bijeloj podlozi. */
.login-help-btn { position: absolute; top: 10px; right: 10px; color: var(--text-muted); }
.login-help-btn:active { background: var(--brand-soft); }
/* specificnost (1-2-0) nadjačava #appbar-help.on (1-1-0) → vidljiv aktivni pill na bijeloj login/reg kartici (11.5) */
#appbar-help.login-help-btn.on { background: var(--brand-soft); color: var(--brand); }
.login-card h1 { font-size: 21px; margin: 12px 0 2px; }
.login-card .grb-big { height: 64px; width: auto; margin: 0 auto; }
.slogan { color: var(--text-muted); font-size: 14px; margin: 0 0 16px; }
.login-pin { margin: 10px 0; }
.pin-label { font-size: 13px; color: var(--text-muted); font-weight: 600; margin-bottom: 10px; }
.login-or { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: 13px; margin: 18px 0 10px; }
.login-or::before, .login-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.login-register { display: flex; flex-direction: column; gap: 8px; }
.login-register .muted { font-size: 13px; }
.login-lang { display: inline-flex; gap: 6px; margin: 18px auto 0; }
.login-lang button, .lang-switch button {
  min-width: 40px; height: 34px; padding: 0 10px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text-muted); border-radius: 8px; font-weight: 700; font-size: 13px; cursor: pointer; font-family: inherit;
}
.login-lang button.active, .lang-switch button.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.demo-note { display: flex; gap: 8px; align-items: center; justify-content: center; color: var(--text-muted); font-size: 12px; margin-top: 16px; }
.pin-hint { font-size: 12px; color: var(--text-muted); display: flex; gap: 6px; align-items: center; margin: 10px 0 0; }
.pin-hint-center { justify-content: center; text-align: center; }

.reg-card { text-align: left; }
.reg-card h1 { text-align: center; }
.reg-h2 { font-size: 18px; text-align: center; }
.reg-intro { text-align: center; }
.reg-step { text-align: center; font-size: 12px; font-weight: 700; color: var(--brand); background: var(--brand-soft); border-radius: 999px; padding: 4px 12px; width: fit-content; margin: 0 auto 14px; }
.reg-back { margin-top: 10px; }
.reg-methods { margin-bottom: 14px; }
.reg-vid { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 16px; }
.reg-vid-row { display: flex; align-items: center; gap: 10px; }
.reg-vid-row .btn { flex: 0 0 auto; }
.reg-vid-status { font-size: 13px; color: var(--ok); }
.reg-vid-ok { display: inline-flex; align-items: center; gap: 4px; color: var(--ok); font-weight: 600; }
.reg-form { margin-bottom: 8px; }
.reg-done { margin-bottom: 12px; }
.reg-donebody { font-size: 13px; }

/* polja / forme */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.field label.req::after { content: " *"; color: var(--danger); }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 15px; font-family: inherit; color: var(--text); background: var(--surface);
}
.field textarea { min-height: 72px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(14,107,168,.15); }
.field .err { display: none; color: var(--danger); font-size: 12px; margin-top: 5px; }
.field.invalid input { border-color: var(--danger); }
.field.invalid .err { display: block; }
.field-narrow input { max-width: 120px; }
.row2 { display: flex; gap: 10px; }
.row2 .field { flex: 1; }
.prefilled .pf { background: var(--brand-soft); border: 1px solid #cfe0ef; border-radius: var(--radius); padding: 10px 12px; font-size: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.prefilled .ok { color: var(--ok); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 3px; margin-left: auto; }
.file-upload { background: var(--bg); border: 1px dashed var(--border); border-radius: var(--radius); padding: 10px 12px; font-size: 14px; display: flex; align-items: center; gap: 8px; color: var(--text); }
/* Podignut iznad 311 FAB tipa (~16px preko tab-trake) da CTA ostane klikabilan (11.3). */
.sticky-cta { position: sticky; bottom: 26px; margin-top: 14px; box-shadow: 0 6px 20px rgba(14,107,168,.3); }

/* ===================== PLATI ===================== */
.plati-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.plati-choose { font-size: 13px; color: var(--text-muted); }
.plati-balance { font-size: 14px; }
.plati-balance strong { color: var(--brand-dark); }
.obaveza-row { align-items: flex-start; }
.ob-check { position: relative; flex: 0 0 auto; cursor: pointer; padding-top: 2px; }
.ob-check input { position: absolute; opacity: 0; width: 22px; height: 22px; margin: 0; cursor: pointer; }
.ob-check .cbox { width: 22px; height: 22px; border: 2px solid var(--border); border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; color: transparent; }
.ob-check input:checked + .cbox { background: var(--brand); border-color: var(--brand); color: #fff; }
.ob-paid { color: var(--ok); display: inline-flex; }
.obaveza-pay { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.iznos-field { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--border); border-radius: 8px; padding: 2px 8px; background: var(--surface); }
.iznos-lbl { font-size: 11px; color: var(--text-muted); }
.iznos-input { width: 72px; border: 0; font-size: 14px; font-family: inherit; text-align: right; padding: 6px 2px; }
.iznos-input:focus { outline: none; }
.iznos-field .eur { color: var(--text-muted); font-size: 13px; }
.racun-btn { white-space: nowrap; }
.obaveza-row.placeno { opacity: .72; }
.placene-lista { border-top: 1px solid var(--border); }
.plati-summary { display: flex; flex-direction: column; gap: 8px; padding: 14px 14px 4px; }
.izabrano { font-size: 13px; color: var(--text-muted); }
.acc-head { width: 100%; display: flex; align-items: center; gap: 8px; background: transparent; border: 0; font-family: inherit; font-size: 15px; font-weight: 600; color: var(--text); cursor: pointer; padding: 4px 2px; }
.acc-head .icon { transition: transform .15s; }
.acc-head.open .icon { transform: rotate(90deg); }
.acc-body { padding-top: 10px; }
.uplata-blok { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; margin-bottom: 10px; }
.uplata-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.uplata-stavke { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.uplata-stavka { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.uplata-akcije { display: flex; gap: 8px; flex-wrap: wrap; }

/* ===================== SANDUČE / PISMA ===================== */
.sanduce-row.novo .title { font-weight: 700; }
.letter-meta { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-muted); padding-bottom: 12px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.letter-body { white-space: pre-line; font-size: 14px; line-height: 1.6; margin: 12px 0; }
.amount-box { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; font-size: 14px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; }
.amount-box .total { font-weight: 800; font-size: 18px; color: var(--brand-dark); }
.detalj-akcije { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.povratnica-box { background: #FFF8EC; border: 1px solid #F2DCB3; border-radius: var(--radius); padding: 14px; margin: 4px 0 12px; }
.povratnica-box strong { display: inline-flex; align-items: center; gap: 6px; color: #9a5e07; }
.success-box { display: flex; align-items: center; gap: 12px; background: #E6F4EC; border: 1px solid #BFE6CF; border-radius: var(--radius); padding: 14px; color: var(--ok); font-weight: 600; }
.success-box .icon { color: var(--ok); flex: 0 0 auto; }
.success-mark { color: var(--ok); }

/* ===================== ZAHTJEV ===================== */
.segmented { display: flex; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 3px; margin-bottom: 14px; }
.seg { flex: 1; border: 0; background: transparent; font-family: inherit; font-size: 13px; font-weight: 700; color: var(--text-muted); padding: 9px 6px; border-radius: 8px; cursor: pointer; }
.seg.on { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-card); }
.search-box { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: var(--radius); padding: 0 12px; margin-bottom: 12px; color: var(--text-muted); }
.search-box input { flex: 1; border: 0; padding: 11px 0; font-size: 15px; font-family: inherit; background: transparent; }
.search-box input:focus { outline: none; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 6px; -webkit-overflow-scrolling: touch; }
.chip-filter { flex: 0 0 auto; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; white-space: nowrap; }
.chip-filter.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.cat-section { margin-top: 10px; }
.cat-head { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; padding: 6px 2px; }
.svc-row .row-lead { color: var(--brand); }

/* tok / kv */
.detalj-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.status-line { display: inline-flex; align-items: center; gap: 6px; }
.tok { list-style: none; margin: 0; padding: 0; position: relative; }
.tok-step { display: flex; gap: 12px; padding: 0 0 16px 0; position: relative; }
.tok-step::before { content: ""; position: absolute; left: 10px; top: 22px; bottom: -2px; width: 2px; background: var(--border); }
.tok-step:last-child::before { display: none; }
.tok-mark { width: 22px; height: 22px; border-radius: 50%; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; background: var(--surface); border: 2px solid var(--border); color: #fff; z-index: 1; }
.tok-mark.ok { background: var(--ok); border-color: var(--ok); }
.tok-mark.akt { background: var(--brand); border-color: var(--brand); }
.tok-mark.cek { background: var(--surface); }
.tok-naziv { font-weight: 600; font-size: 14px; }
.kv-grid { display: flex; flex-direction: column; gap: 8px; }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.kv-k { color: var(--text-muted); flex: 0 0 auto; }
.kv-v { text-align: right; font-weight: 600; }

/* ===================== PRIJAVA 311 ===================== */
.photo-drop { border: 2px dashed var(--border); border-radius: var(--radius); padding: 26px 14px; text-align: center; color: var(--text-muted); cursor: pointer; background: var(--bg); }
.photo-drop .icon { color: var(--brand); }
.photo-preview img { width: 100%; max-height: 200px; object-fit: cover; border-radius: var(--radius); }
.geo-map { position: relative; height: 180px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: #cfe6f7; }
.geo-map svg { width: 100%; height: 100%; }
.geo-frame { width: 100%; height: 100%; border: 0; }
.map-pin, .map-center-pin { position: absolute; color: var(--brand); pointer-events: none; transform: translate(-50%, -100%); }
.map-pin { display: none; left: 58%; top: 50%; }
.map-center-pin { left: 50%; top: 50%; filter: drop-shadow(0 2px 3px rgba(0,0,0,.4)); }
.map-hint { font-size: 12px; color: var(--text-muted); margin-top: 6px; display: flex; align-items: center; gap: 6px; }

/* ===================== VIŠE ===================== */
.vise-group { margin-bottom: 16px; }
.vise-h { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; padding: 0 4px 6px; }
.vise-row .title { font-weight: 600; }
.vise-badge { background: var(--warn); color: #fff; min-width: 18px; height: 18px; border-radius: 9px; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
.vise-set { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.vise-set-label { display: inline-flex; align-items: center; gap: 8px; color: var(--text-muted); font-weight: 600; font-size: 14px; }

/* ===================== IZDAVANJE / PUNOMOĆNIK ===================== */
.guest-row .title { font-weight: 600; }
.rent-obracun { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 12px; font-size: 14px; }
.rent-total { font-weight: 800; font-size: 20px; color: var(--brand-dark); }
.rent-cat { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.rep-current { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 8px; }
.rep-name { display: flex; align-items: center; gap: 6px; }
.rep-scope { margin: 12px 0; }
.rep-scope-title { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; margin-bottom: 8px; }
.scope-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 14px; }
.scope-box { width: 20px; height: 20px; border: 2px solid var(--border); border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; color: transparent; flex: 0 0 auto; }
.scope-box.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.scope-row.locked { color: var(--text-muted); }

/* vijesti / placeholderi */
.news-card .news-img { border-radius: var(--radius); overflow: hidden; margin-bottom: 10px; }
.news-card .news-img svg { width: 100%; height: 96px; display: block; }

/* ===================== RADIO LISTE (sheet) ===================== */
.radio-list { display: flex; flex-direction: column; gap: 4px; }
.radio-row { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; font-size: 14px; }
.radio-row input { accent-color: var(--brand); width: 18px; height: 18px; }
.method-row { font-weight: 600; }
.cert-sub { margin: 2px 0 4px 18px; display: flex; flex-direction: column; gap: 4px; }
.cert-sub .radio-row { padding: 8px 12px; font-size: 13px; }
.video-note { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--text-muted); background: var(--brand-soft); border-radius: var(--radius); padding: 9px 11px; }
.video-note .icon { color: var(--brand); }
.seg-label { font-size: 13px; font-weight: 600; color: var(--text-muted); margin: 14px 0 8px; }
.stepup-reason { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--text-muted); margin: 0 0 6px; }
.stepup-reason .icon { color: var(--brand); flex: 0 0 auto; }

/* ===================== KEYPAD ===================== */
.pin-dots { display: flex; justify-content: center; gap: 16px; margin: 8px 0 16px; }
.pin-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--brand); background: transparent; }
.pin-dot.on { background: var(--brand); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 280px; margin: 0 auto; }
.key { height: 54px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); font-size: 22px; font-weight: 600; font-family: inherit; color: var(--text); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.key:active { background: var(--brand-soft); }
.key-blank { border: 0; background: transparent; cursor: default; }
.key-del { color: var(--text-muted); }

/* ===================== SPINNER ===================== */
.spinner { width: 30px; height: 30px; border: 3px solid var(--brand-soft); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto; }
.spinner-sm { width: 17px; height: 17px; border-width: 2px; margin: 0; }
.center-col { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px 0; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===================== OVERLAY KONTEJNERI (unutar telefona) ===================== */
#modal-root, #toast-root, #push-root, #help-root { position: absolute; inset: 0; pointer-events: none; }
#help-root { z-index: 60; }
#modal-root { z-index: 80; }
#toast-root { z-index: 100; }
#push-root { z-index: 120; }

/* ===================== BOTTOM-SHEET ===================== */
.sheet-scrim { position: absolute; inset: 0; background: rgba(10,20,30,.45); opacity: 0; transition: opacity .25s; pointer-events: auto; }
#modal-root.on .sheet-scrim { opacity: 1; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; background: var(--surface);
  border-radius: 18px 18px 0 0; box-shadow: var(--shadow-sheet); pointer-events: auto;
  transform: translateY(100%); transition: transform .28s cubic-bezier(.2,.8,.2,1);
  max-height: 92%; display: flex; flex-direction: column; padding-bottom: env(safe-area-inset-bottom);
}
#modal-root.on .sheet { transform: translateY(0); }
.sheet-grab { width: 40px; height: 4px; border-radius: 3px; background: #cdd6df; margin: 8px auto 4px; flex: 0 0 auto; }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 8px 16px; font-weight: 700; font-size: 16px; color: var(--text); }
.sheet-head .icon { color: var(--brand); }
.sheet-x { margin-left: auto; width: 34px; height: 34px; border: 0; background: transparent; color: var(--text-muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.sheet-x:active { background: var(--bg); }
.sheet-body { padding: 6px 16px 12px; overflow-y: auto; }
.sheet-foot { padding: 10px 16px 16px; }
.fee-foot { display: flex; gap: 10px; }
.fee-foot .btn { flex: 1; }
.sheet-h3 { margin: 4px 0 12px; font-size: 16px; }

/* ===================== ALERT (Pogrešan PIN) ===================== */
.alert-scrim { position: absolute; inset: 0; background: rgba(10,20,30,.5); display: flex; align-items: center; justify-content: center; padding: 24px; pointer-events: auto; z-index: 90; }
.alert { background: var(--surface); border-radius: var(--radius-lg); padding: 18px; width: 100%; max-width: 300px; box-shadow: 0 12px 40px rgba(0,0,0,.3); }
.alert-head { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 8px; }
.ic-warn { color: var(--warn); display: inline-flex; }
.alert-body { color: var(--text-muted); font-size: 14px; margin-bottom: 16px; }

/* ===================== NOTIF FULL-SCREEN SHEET ===================== */
.fs-sheet { position: absolute; inset: 0; background: var(--bg); pointer-events: auto; transform: translateX(100%); transition: transform .26s ease; display: flex; flex-direction: column; }
#modal-root.on .fs-sheet { transform: translateX(0); }
.fs-head { flex: 0 0 var(--appbar-h); height: var(--appbar-h); display: flex; align-items: center; gap: 6px; padding: 0 6px; background: var(--brand); color: #fff; }
.fs-head .sheet-x { color: #fff; }
.fs-head .sheet-x:active { background: rgba(255,255,255,.16); }
.fs-head .btn-ghost { color: #fff; margin-left: auto; }
.fs-title { font-weight: 700; font-size: 16px; }
.fs-body { flex: 1; overflow-y: auto; padding: 12px; }
.fs-body .list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.notif-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--border); padding: 14px; font-family: inherit; font-size: 14px; color: var(--text); cursor: pointer; }
.notif-item:last-child { border-bottom: 0; }
.notif-item:active { background: var(--brand-soft); }
.notif-dot { width: 9px; height: 9px; border-radius: 50%; background: transparent; flex: 0 0 auto; }
.notif-dot.on { background: var(--brand); }
.notif-item.unread { background: #F4F9FD; }
.notif-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.notif-text { font-weight: 600; }
.notif-time { font-size: 12px; color: var(--text-muted); }
.notif-empty { padding: 40px 10px; }

/* ===================== PUSH BANER ===================== */
/* Push klizi ISPOD app-bara (11.2) → ne prekriva i ne presreće „?“/zvonce. */
.push { position: absolute; top: calc(var(--status-h) + var(--appbar-h) + 8px); left: 8px; right: 8px; background: rgba(255,255,255,.97); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.25); padding: 10px 12px; pointer-events: auto; transform: translateY(-200%); transition: transform .32s cubic-bezier(.2,.85,.25,1); }
.push.on { transform: translateY(0); }
.push-head { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); }
.push-grb { height: 18px; width: auto; border-radius: 4px; }
.push-app { font-weight: 700; color: var(--text); }
/* Vrijeme „sada“ razmaknuto od ✕ u uglu (11.6). */
.push-time { margin-left: auto; padding-right: 26px; }
.push-text { font-size: 14px; font-weight: 600; margin-top: 4px; cursor: pointer; padding-right: 26px; }
.push-x { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border: 0; background: transparent; color: var(--text-muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }

/* ===================== SNACKBAR ===================== */
.toast-wrap { position: absolute; left: 0; right: 0; bottom: calc(var(--tabbar-h) + 12px); display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 14px; }
.snackbar { display: inline-flex; align-items: center; gap: 8px; background: #1B2733; color: #fff; padding: 11px 16px; border-radius: 10px; font-size: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.3); pointer-events: auto; max-width: 100%; animation: snack-in .22s ease; }
.snackbar .icon { color: #6fd6a0; flex: 0 0 auto; }
.snackbar.out { animation: snack-out .35s forwards; }
@keyframes snack-in { from { transform: translateY(16px); opacity: 0; } }
@keyframes snack-out { to { transform: translateY(16px); opacity: 0; } }

/* ===================== SPLASH ===================== */
.splash { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: linear-gradient(160deg, #0E6BA8, #0A527F); color: #fff; text-align: center; padding: 24px; }
.splash-grb { height: 84px; width: auto; }
.splash-name { font-size: 24px; font-weight: 800; }
.splash-sub { font-size: 14px; color: rgba(255,255,255,.85); margin-top: -6px; }
.splash-spinner { border-color: rgba(255,255,255,.3); border-top-color: #fff; margin-top: 10px; }
.splash-demo { position: absolute; bottom: 28px; left: 0; right: 0; display: flex; gap: 8px; align-items: center; justify-content: center; font-size: 12px; color: rgba(255,255,255,.8); }

/* ===================== PWA HINT ===================== */
.pwa-hint { position: absolute; left: 12px; right: 12px; bottom: calc(var(--tabbar-h) + 14px); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.2); padding: 12px 14px; z-index: 110; pointer-events: auto; transform: translateY(20px); opacity: 0; transition: transform .25s, opacity .25s; }
.pwa-hint.on { transform: translateY(0); opacity: 1; }
.pwa-hint-row { display: flex; align-items: center; gap: 8px; }
.pwa-hint-row .icon { color: var(--brand); }
.pwa-hint-row strong { flex: 1; }
.pwa-x { width: 28px; height: 28px; border: 0; background: transparent; color: var(--text-muted); cursor: pointer; }
.pwa-hint-body { font-size: 13px; color: var(--text-muted); margin-top: 6px; }

/* ===================== REŽIM POMOĆI (sloj iznad) ===================== */
#help-root { pointer-events: none; }
.help-ring { position: fixed; border: 2px solid var(--brand); border-radius: 10px; box-shadow: 0 0 0 4px rgba(14,107,168,.16); pointer-events: none; }
.help-bubble { position: fixed; background: var(--surface); border: 1px solid var(--brand); border-radius: 12px; padding: 9px 12px; box-shadow: 0 8px 24px rgba(0,0,0,.18); font-size: 13px; line-height: 1.4; color: var(--text); pointer-events: none; z-index: 1; }
.help-text { }
.help-arrow { position: absolute; width: 12px; height: 12px; }
.help-bubble[data-arrow="up"] .help-arrow { top: -7px; background: var(--surface); border-left: 1px solid var(--brand); border-top: 1px solid var(--brand); transform: rotate(45deg); }
.help-bubble[data-arrow="left"] .help-arrow { left: -7px; top: 50%; margin-top: -6px; background: var(--surface); border-left: 1px solid var(--brand); border-bottom: 1px solid var(--brand); transform: rotate(45deg); }
.help-conn { position: fixed; height: 2px; background: var(--brand); opacity: .5; pointer-events: none; }
.help-hint { position: fixed; max-width: 220px; background: var(--brand); color: #fff; padding: 10px 13px; border-radius: 12px; font-size: 13px; line-height: 1.35; box-shadow: 0 10px 28px rgba(0,0,0,.3); z-index: 70; pointer-events: none; }
.help-hint-arrow { position: absolute; top: -6px; right: 18px; width: 12px; height: 12px; background: var(--brand); transform: rotate(45deg); }
.help-hint-text { position: relative; }
