/* Mehaniq: paleta i slova po brand/BREND.md (O-027), ekrani po docs/dizajn/SPEC-EKRANI.md.
   Tamna tema je osnovna (kao u dizajnu); svetla se bira u "Više" ili prati telefon (Automatski). */
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/barlow-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/barlow-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/barlow-latin-ext-500-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/barlow-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/barlow-latin-ext-600-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/barlow-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/barlow-condensed-latin-ext-700-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/barlow-condensed-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 800; font-display: swap; src: url(/fonts/barlow-condensed-latin-ext-800-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 800; font-display: swap; src: url(/fonts/barlow-condensed-latin-800-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  --mq-yellow: #F5C518;
  --mq-asphalt: #15171A;
  --mq-chalk: #F4F2EE;

  /* tamna tema (osnovna) */
  --mq-bg: #15171A;
  --mq-surface: #22252A;
  --mq-surface2: #1C1E22;
  --mq-text: #FFFFFF;
  --mq-muted: #C9C6BF;
  --mq-dim: #8D8A84;
  --mq-line: #3A3D43;      /* okvir dugmadi i čipova */
  --mq-sep: #2C2F34;       /* razdvajanje redova */
  --mq-card-border: transparent;
  --mq-accent: #F5C518;    /* naglasak na tamnom */
  --mq-on-accent: #15171A;
  --mq-plate-border: #FFFFFF;
  --mq-pill-received: #C9C6BF;
  --mq-ok: #8FD18A;
  --mq-warn: #F5C518;
  --mq-err: #F5C518;
  --mq-avatar-bg: #FFFFFF;
  --mq-avatar-text: #15171A;
  --mq-font: 'Barlow', system-ui, sans-serif;
  --mq-font-head: 'Barlow Condensed', 'Barlow', system-ui, sans-serif;
}
:root[data-theme="light"] {
  --mq-bg: #F4F2EE;
  --mq-surface: #FFFFFF;
  --mq-surface2: #FFFFFF;
  --mq-text: #15171A;
  --mq-muted: #5C5952;
  --mq-dim: #8D8A84;
  --mq-line: #B9B5AD;
  --mq-sep: #E2DFD8;
  --mq-card-border: #D8D4CC;
  --mq-accent: #15171A;    /* žuto samo na tamnom */
  --mq-on-accent: #F4F2EE;
  --mq-plate-border: #15171A;
  --mq-pill-received: #E2DFD8;
  --mq-ok: #2E7D32;
  --mq-warn: #15171A;
  --mq-err: #15171A;
  --mq-avatar-bg: #15171A;
  --mq-avatar-text: #FFFFFF;
}
@media (prefers-color-scheme: light) {
  :root[data-theme="auto"] {
    --mq-bg: #F4F2EE; --mq-surface: #FFFFFF; --mq-surface2: #FFFFFF; --mq-text: #15171A; --mq-muted: #5C5952;
    --mq-line: #B9B5AD; --mq-sep: #E2DFD8; --mq-card-border: #D8D4CC; --mq-accent: #15171A; --mq-on-accent: #F4F2EE;
    --mq-plate-border: #15171A; --mq-pill-received: #E2DFD8; --mq-ok: #2E7D32; --mq-warn: #15171A; --mq-err: #15171A;
    --mq-avatar-bg: #15171A; --mq-avatar-text: #FFFFFF;
  }
}

* { box-sizing: border-box; }
html { background: var(--mq-bg); }
body { margin: 0; font: 500 18px/1.4 var(--mq-font); background: var(--mq-bg); color: var(--mq-text); -webkit-tap-highlight-color: transparent; }
main { max-width: 430px; margin: 0 auto; padding: 0; }
a { color: inherit; }
h1 { margin: 0; font: 800 30px/1.1 var(--mq-font-head); }
h2 { font: 700 22px var(--mq-font-head); margin: 20px 0 10px; }
h3 { font: 700 20px var(--mq-font-head); margin: 18px 0 8px; }
[hidden] { display: none !important; }
button { font-family: inherit; cursor: pointer; }
button:disabled { opacity: .4; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--mq-accent); outline-offset: 2px; }
.icon { display: inline-flex; vertical-align: middle; }
.meta { color: var(--mq-muted); font-size: 15px; margin: 4px 0; }
.warn { color: var(--mq-warn); font-weight: 600; margin: 6px 0; }
.ok-text { color: var(--mq-ok); font-weight: 600; font-size: 15px; }
.footer-note { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--mq-dim); font-size: 13px; margin: 28px 0 8px; }
.footer-note img { width: 14px; height: 14px; }

/* ===== ekrani (SPEC-EKRANI): puna visina, akcije na dnu ===== */
.screen { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; padding-bottom: 0; }
.screen.with-tabs { padding-bottom: 76px; }
.screen-main { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 8px 20px 0; }
.screen-actions { display: flex; flex-direction: column; gap: 10px; padding: 16px 20px 26px; }
.step-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 20px 8px; }
.step-title { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.step-title strong { font-weight: 600; font-size: 18px; line-height: 1.2; }
.step-title span { font-size: 13px; color: var(--mq-muted); }
.circle-btn { flex: none; width: 48px; height: 48px; border-radius: 50%; background: var(--mq-surface); color: var(--mq-text); display: inline-flex; align-items: center; justify-content: center; text-decoration: none; padding: 0; border: 1px solid var(--mq-card-border); }
.circle-spacer { flex: none; width: 48px; }
.head-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.head-left h1 { font-size: 30px; }
.head-left .sub { display: block; font-size: 13px; color: var(--mq-muted); font-weight: 500; font-family: var(--mq-font); }

/* tablica kao tablica: bela, plava traka SRB */
.plate { display: inline-flex; align-items: stretch; background: #FFFFFF; color: #15171A; border: 2px solid var(--mq-plate-border); border-radius: 5px; overflow: hidden; align-self: flex-start; }
.plate-eu { background: #1F4FA8; color: #FFFFFF; font: 600 9px var(--mq-font); padding: 2px 4px; display: flex; align-items: flex-end; }
.plate-no { font: 700 19px var(--mq-font-head); letter-spacing: .5px; color: #15171A; padding: 0 7px; white-space: nowrap; }
.plate-md { border-width: 3px; border-radius: 7px; }
.plate-md .plate-eu { font-size: 11px; padding: 3px 5px; }
.plate-md .plate-no { font-weight: 800; font-size: 28px; letter-spacing: 1px; padding: 0 10px; }
.plate-lg { border-width: 3px; border-radius: 7px; border-color: #15171A; }
.plate-lg .plate-eu { font-size: 12px; padding: 4px 6px; }
.plate-lg .plate-no { font-weight: 800; font-size: 42px; letter-spacing: 1.5px; padding: 0 14px; }
.plate-xl { border-width: 3px; border-radius: 7px; }
.plate-xl .plate-eu { font-size: 12px; padding: 4px 6px; }
.plate-xl .plate-no { font-weight: 800; font-size: 34px; letter-spacing: 1px; padding: 0 12px; }

.status-chip { flex: none; font: 600 14px var(--mq-font); padding: 6px 10px; border-radius: 8px; color: #15171A; }
.st-received { background: var(--mq-pill-received); }
.st-progress { background: var(--mq-yellow); }
.st-done { background: #6FBF73; }

/* dugmad */
.primary-btn, .outline-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; border-radius: 16px; text-decoration: none; font-family: var(--mq-font); }
.primary-btn { min-height: 64px; background: var(--mq-yellow); color: var(--mq-asphalt); border: 0; font-weight: 700; font-size: 19px; }
.outline-btn { min-height: 56px; background: transparent; color: var(--mq-text); border: 2px solid var(--mq-line); font-weight: 600; font-size: 17px; }
.primary-btn.small-h { min-height: 60px; border-radius: 14px; font-size: 18px; }
.link-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 44px; background: none; border: 0; color: inherit; font: 600 16px var(--mq-font); }
.two-btn { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.screen-actions .two-btn { gap: 12px; }
.icon-btn { flex: none; width: 48px; height: 48px; border-radius: 12px; border: 0; background: var(--mq-bg); color: var(--mq-muted); display: inline-flex; align-items: center; justify-content: center; }
.outline-small { display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 16px; border-radius: 12px; border: 1.5px solid var(--mq-line); background: transparent; color: var(--mq-text); font: 600 16px var(--mq-font); }

/* kartice i redovi */
.card { background: var(--mq-surface); border: 1.5px solid var(--mq-card-border); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.card.big { border-radius: 18px; padding: 16px; gap: 12px; }
.card-title { font: 700 22px var(--mq-font-head); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-label { font-size: 13px; color: var(--mq-muted); }
.card-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.plate-card { flex-direction: row; align-items: center; gap: 12px; padding: 12px 16px; }
.summary { padding: 0; gap: 0; }
.summary-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--mq-sep); }
.summary-row:last-child { border-bottom: 0; }
.summary-row .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.summary-row .value { font-size: 19px; font-weight: 600; margin: 0; white-space: pre-line; }
.summary-row .value.list { font-size: 17px; font-weight: 500; }
.summary-row input, .summary-row textarea { width: 100%; margin: 0; font-size: 18px; }
.stat { font: 800 34px/1 var(--mq-font-head); }
.code-chip { align-self: flex-start; font: 700 22px var(--mq-font-head); background: var(--mq-bg); border: 1.5px solid var(--mq-line); border-radius: 8px; padding: 2px 10px; }
.check-line { font-size: 17px; }
details.said { background: var(--mq-surface2); border: 1.5px solid var(--mq-card-border); border-radius: 14px; padding: 12px 16px; font-size: 15px; color: var(--mq-muted); }
details.said summary { cursor: pointer; font-weight: 600; min-height: 28px; }
details.said p { margin: 8px 0 0; }
.reminder { flex: none; display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--mq-muted); min-height: 44px; cursor: pointer; }
.reminder input { width: 24px; height: 24px; accent-color: var(--mq-yellow); margin: 0; }

/* polja */
input, textarea, select { font-family: inherit; color: var(--mq-text); background: var(--mq-surface); border: 2px solid var(--mq-line); border-radius: 10px; }
.field { display: block; margin-top: 14px; font-size: 13px; color: var(--mq-muted); }
.field input, .field select { display: block; width: 100%; min-height: 52px; margin-top: 6px; padding: 0 12px; font-size: 19px; }
textarea { display: block; width: 100%; padding: 10px 12px; font-size: 18px; margin-top: 6px; }

/* lista */
.list-head { display: flex; align-items: baseline; justify-content: space-between; margin-top: 8px; }
.list-head h2 { margin: 0; font: 700 24px var(--mq-font-head); }
.list-head .meta { font-size: 15px; margin: 0; }
.list { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 72px; padding: 14px 16px; background: var(--mq-surface); border: 1.5px solid var(--mq-card-border); border-radius: 16px; color: var(--mq-text); text-decoration: none; width: 100%; text-align: left; font: inherit; }
.row-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; align-items: flex-start; }
.row-main .meta { margin: 0; }
.row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.row-side .meta { margin: 0; font-size: 13px; }
.screen-title { padding: 20px 20px 8px; }
.pad { padding: 0 20px; }

/* početna */
.home-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 20px 12px; }
.home-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.avatar { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--mq-avatar-bg); color: var(--mq-avatar-text); display: flex; align-items: center; justify-content: center; font: 800 20px var(--mq-font-head); }
.home-title { display: flex; flex-direction: column; min-width: 0; }
.home-title strong { font-weight: 600; font-size: 18px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-title span { font-size: 14px; color: var(--mq-muted); }
.flag-btn { flex: none; width: 48px; height: 48px; border-radius: 12px; border: 1.5px solid var(--mq-line); background: transparent; color: var(--mq-muted); display: flex; align-items: center; justify-content: center; text-decoration: none; }
.action { display: flex; align-items: center; gap: 18px; min-height: 112px; padding: 20px 22px; border-radius: 22px; text-decoration: none; }
.action-primary { background: var(--mq-yellow); color: var(--mq-asphalt); }
.action-secondary { background: var(--mq-surface); color: var(--mq-text); border: 2px solid var(--mq-accent); }
.action-icon { flex: none; width: 68px; height: 68px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.action-primary .action-icon { background: var(--mq-asphalt); color: var(--mq-yellow); }
.action-secondary .action-icon { background: var(--mq-accent); color: var(--mq-on-accent); }
:root[data-theme="light"] .action-secondary .action-icon { color: var(--mq-yellow); }
.action-text { display: flex; flex-direction: column; }
.action-text strong { font: 800 38px/1 var(--mq-font-head); }
.action-text span { font-size: 16px; font-weight: 500; }
.action-secondary .action-text span { color: var(--mq-muted); }
.home-main { display: flex; flex-direction: column; gap: 14px; padding: 8px 20px 0; flex: 1; }

/* donji meni */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); max-width: 430px; margin: 0 auto; background: var(--mq-bg); border-top: 1px solid var(--mq-sep); padding: 8px 0 calc(8px + env(safe-area-inset-bottom)); z-index: 5; }
.tabs a { display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 52px; justify-content: center; color: var(--mq-dim); text-decoration: none; font: 600 13px var(--mq-font); }
.tabs a.active { color: var(--mq-accent); }

/* korak 1: tablica (kamera tamna, list svetao) */
.camera-screen { background: #0B0C0E; color: #FFFFFF; }
.camera-screen .step-title span { color: #C9C6BF; }
.camera-stage { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 0 28px; min-height: 220px; overflow: hidden; }
.camera-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; margin: 0; border-radius: 0; background: #000; }
.frame { position: relative; width: min(340px, calc(100% - 40px)); aspect-ratio: 2.4 / 1; }
.frame i { position: absolute; width: 28px; height: 28px; border: 0 solid var(--mq-yellow); }
.frame .tl { left: 0; top: 0; border-left-width: 4px; border-top-width: 4px; border-top-left-radius: 10px; }
.frame .tr { right: 0; top: 0; border-right-width: 4px; border-top-width: 4px; border-top-right-radius: 10px; }
.frame .bl { left: 0; bottom: 0; border-left-width: 4px; border-bottom-width: 4px; border-bottom-left-radius: 10px; }
.frame .br { right: 0; bottom: 0; border-right-width: 4px; border-bottom-width: 4px; border-bottom-right-radius: 10px; }
.camera-hint { position: relative; margin: 0; font-size: 17px; color: #C9C6BF; text-align: center; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.sheet-light { background: #F4F2EE; color: #15171A; border-radius: 26px 26px 0 0; padding: 22px 20px 26px; display: flex; flex-direction: column; gap: 14px; }
.sheet-light .meta, .sheet-light .card-label { color: #5C5952; margin: 0; }
.sheet-light .warn { color: #15171A; background: #FFF3C4; border-radius: 10px; padding: 8px 12px; margin: 0; }
.sheet-light .sheet-info { margin: 0; font-size: 16px; color: #3F3C37; }
.sheet-light input { background: #FFFFFF; color: #15171A; border-color: #B9B5AD; }
.sheet-light .field { color: #5C5952; margin-top: 0; }
.sheet-light .outline-btn { color: #15171A; border-color: #15171A; border-radius: 14px; min-height: 56px; font-weight: 600; }
.sheet-light .primary-btn.dark { background: #15171A; color: #FFFFFF; border-radius: 14px; min-height: 56px; font-weight: 600; font-size: 17px; }
.sheet-light .link-btn { color: #15171A; }
.sheet-light .scan-btn { background: #15171A; color: #FFFFFF; border: 0; border-radius: 14px; min-height: 56px; font-weight: 600; font-size: 17px; width: 100%; }
.sheet-row { display: flex; align-items: center; justify-content: space-between; }
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.choice { min-height: 56px; border-radius: 12px; border: 3px solid var(--mq-yellow); background: #FFFFFF; color: #15171A; font: 700 18px var(--mq-font); }
.pick-list { background: var(--mq-bg); color: var(--mq-text); padding: 0 20px 24px; }
.pick-list h3 { color: var(--mq-text); }

/* korak 2: priča */
.mic-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 18px 20px 10px; }
.mic-ring { width: 176px; height: 176px; border-radius: 50%; border: 2px solid var(--mq-line); display: flex; align-items: center; justify-content: center; }
.mic-ring i { width: 140px; height: 140px; border-radius: 50%; border: 2px solid #5A5023; display: flex; align-items: center; justify-content: center; }
.mic { width: 104px; height: 104px; border-radius: 50%; background: var(--mq-yellow); color: var(--mq-asphalt); border: 0; display: flex; align-items: center; justify-content: center; padding: 0; }
.mic.listening { box-shadow: 0 0 0 8px rgba(245,197,24,.3); }
.speak-state { font: 700 26px var(--mq-font-head); margin: 0; }
.speak-card { margin: 8px 20px 0; background: var(--mq-surface); border: 1.5px solid var(--mq-card-border); border-radius: 18px; padding: 18px; flex: 1; display: flex; flex-direction: column; gap: 10px; min-height: 180px; }
.speak-card .card-label { font-size: 14px; font-weight: 600; }
.speak-card textarea { flex: 1; min-height: 120px; margin: 0; padding: 0; border: 0; background: transparent; font-size: 20px; line-height: 1.5; resize: none; }
.speak-card textarea:focus-visible { outline: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.chip { font-size: 14px; color: var(--mq-muted); border: 1px solid var(--mq-line); border-radius: 999px; padding: 6px 12px; }

/* karton vozila */
.vehicle-head { padding: 8px 20px 14px; display: flex; flex-direction: column; gap: 8px; }
.vehicle-line { font-size: 20px; font-weight: 600; margin: 0; }
.vehicle-sub { font-size: 14px; color: var(--mq-muted); margin: 0; }
.problems { list-style: none; margin: 0; padding: 0; font-size: 16px; display: flex; flex-direction: column; gap: 4px; }
.history { list-style: none; margin: 0; padding: 0; }
.history-row { display: flex; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--mq-sep); }
.history-row:last-child { border-bottom: 0; }
.history-when { flex: none; width: 74px; font-size: 14px; color: var(--mq-muted); display: flex; flex-direction: column; }
.history-what { font-size: 16px; display: flex; flex-direction: column; gap: 2px; }
.history-what .meta { font-size: 14px; margin: 0; }

/* ===== alati za test (prototipi) ===== */
#toolbar { display: flex; align-items: center; gap: 12px; padding: 20px 16px 8px; }
#toolbar h1 { font-size: 28px; }
.tool { padding: 0 16px 24px; }
.back { min-height: 44px; font: 600 16px var(--mq-font); padding: 0 14px; background: transparent; color: var(--mq-accent); border: 2px solid var(--mq-accent); border-radius: 12px; }
.report { margin-left: auto; font: 600 16px var(--mq-font); color: var(--mq-accent); padding: 8px 12px; border: 2px solid var(--mq-accent); border-radius: 10px; text-decoration: none; }
.status { margin: 0 16px 16px; color: var(--mq-muted); font-size: 15px; }
.status.ok { color: var(--mq-ok); }
.status.err { color: var(--mq-err); font-weight: 600; }
.tool button:not(.link):not(.kind), .btn { min-height: 64px; font: 700 20px var(--mq-font-head); letter-spacing: .02em; border: 0; border-radius: 14px; background: var(--mq-accent); color: var(--mq-on-accent); }
.buttons { display: grid; gap: 14px; }
.btn { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.btn.secondary { background: transparent; color: var(--mq-accent); border: 2px solid var(--mq-accent); cursor: pointer; }
.hint { color: var(--mq-muted); }
.result { min-height: 80px; margin-top: 16px; padding: 12px; border: 2px dashed var(--mq-line); border-radius: 12px; }
.result .vin { font: 700 24px/1.3 var(--mq-font-head); letter-spacing: 1px; margin: 0 0 8px; word-break: break-all; }
.result .meta { margin: 4px 0; }
.result .ok { color: var(--mq-ok); margin: 4px 0; }
.result .warn { margin: 4px 0; }
.caps { margin-top: 20px; }
.caps ul { list-style: none; padding: 0; }
.caps .ok { color: var(--mq-ok); }
.caps .err { color: var(--mq-err); }
video { width: 100%; margin-top: 12px; border-radius: 12px; background: #000; }
.shoot { width: 100%; min-height: 96px; margin-top: 16px; font-size: 28px; }
.shoot.recording { background: transparent; color: var(--mq-accent); border: 3px solid var(--mq-accent); }
#plate-canvas, #plate-crop { display: block; max-width: 100%; margin-top: 12px; border-radius: 8px; }
.plate-opts { display: grid; gap: 8px; margin-top: 16px; }
#plate-live { margin-top: 12px; width: 100%; }
.link { background: none; border: 0; min-height: 0; padding: 0 0 0 8px; font: 500 14px var(--mq-font); color: var(--mq-muted); text-decoration: underline; }
#collect-linked { color: var(--mq-ok); margin-top: 16px; }
.steps { padding-left: 20px; margin: 8px 0; font-size: 16px; }
.steps li { margin-bottom: 8px; }
.kinds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.kind { min-height: 56px; font: 700 18px var(--mq-font); background: transparent; color: var(--mq-accent); border: 2px solid var(--mq-accent); border-radius: 12px; }
.kind[aria-pressed="true"] { background: var(--mq-accent); color: var(--mq-on-accent); }
.check { display: flex; align-items: center; gap: 12px; margin-top: 16px; min-height: 48px; }
.check input { width: 28px; height: 28px; accent-color: var(--mq-yellow); }

/* znak u podnožju: žuti na tamnoj, tamni na svetloj temi (brand/BREND.md) */
.znak { display: inline-flex; }
.znak-on-light { display: none; }
:root[data-theme="light"] .znak-on-dark { display: none; }
:root[data-theme="light"] .znak-on-light { display: inline; }
@media (prefers-color-scheme: light) {
  :root[data-theme="auto"] .znak-on-dark { display: none; }
  :root[data-theme="auto"] .znak-on-light { display: inline; }
}

.candidate { display: flex; flex-direction: column; gap: 14px; }
.candidate:empty { display: none; }

/* logo (znak + reč): tamna varijanta na tamnoj, svetla na svetloj temi */
.logo { display: inline-flex; }
.logo img { height: 34px; width: auto; }
.logo-on-light { display: none; }
:root[data-theme="light"] .logo-on-dark { display: none; }
:root[data-theme="light"] .logo-on-light { display: inline; }
@media (prefers-color-scheme: light) {
  :root[data-theme="auto"] .logo-on-dark { display: none; }
  :root[data-theme="auto"] .logo-on-light { display: inline; }
}

/* unutrašnji main puni ceo ekran (inače se centrira i sužava) */
.screen > main { margin: 0; max-width: none; width: 100%; }

/* ===== Prikupljanje slika: jedan ekran bez skrolovanja ===== */
.collect { background: #0B0C0E; color: #FFFFFF; }
.collect .step-title span { color: #C9C6BF; }
.collect-stage { min-height: 0; }
.collect-token { padding: 0 20px; }
.collect-token input { background: #22252A; color: #FFFFFF; border-color: #3A3D43; }
.collect-bar { background: #0B0C0E; padding: 10px 20px 22px; display: flex; flex-direction: column; gap: 8px; }
.collect-counter { margin: 0; font-size: 14px; color: #C9C6BF; text-align: center; }
.collect-bar .warn { margin: 0; text-align: center; font-size: 14px; color: var(--mq-yellow); }
.collect-controls { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.shutter { width: 80px; height: 80px; border-radius: 50%; background: var(--mq-yellow); border: 6px solid #0B0C0E; box-shadow: 0 0 0 3px var(--mq-yellow); padding: 0; }
.shutter:active { transform: scale(.94); }
.aux { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 52px; font: 600 13px var(--mq-font); color: #C9C6BF; }
.aux select { max-width: 100%; min-height: 40px; background: #22252A; color: #FFFFFF; border: 1.5px solid #3A3D43; border-radius: 10px; font-size: 15px; padding: 0 6px; }
.aux-file { border: 1.5px solid #3A3D43; border-radius: 12px; color: #FFFFFF; font-size: 16px; cursor: pointer; }
.fineprint { margin: 0; text-align: center; font-size: 12px; color: #8D8A84; }
.fineprint .link { color: #C9C6BF; }

/* value the speech parser was not sure about */
.summary-row.unsure { box-shadow: inset 3px 0 0 var(--mq-warn, #E8A33D); }
.parse-status { text-align: center; margin: 4px 0 0; }
.app-version { text-align: center; margin: 12px 0 0; font-size: 12px; opacity: 0.7; }

/* Step 2 (speak): text on top, microphone at the bottom within thumb reach (2026-10-08) */
.screen.speak .speak-card { margin: 8px 20px 0; flex: 1; min-height: 0; }
.screen.speak .speak-card textarea { font-size: 22px; min-height: 0; }
.mic-dock { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 20px 0; }
.mic-dock .speak-state { font-size: 22px; text-align: center; min-height: 28px; }
.mic-dock .mic-ring { width: 148px; height: 148px; }
.mic-dock .mic-ring i { width: 118px; height: 118px; }
.mic-dock .mic { width: 92px; height: 92px; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: transform .12s, box-shadow .12s; }
.mic.holding { transform: scale(1.08); box-shadow: 0 0 0 12px rgba(245,197,24,.55); }
.mode-chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.mode-chip { font-size: 13px; padding: 6px 12px; border-radius: 999px; border: 1.5px solid var(--mq-line); opacity: .6; }
.mode-chip.on { opacity: 1; border-color: var(--mq-yellow); color: var(--mq-yellow); font-weight: 600; }

/* Install / activation screen (O-043) */
.gate { max-width: 480px; margin: 0 auto; min-height: 100dvh; padding: 32px 20px; display: flex; flex-direction: column; gap: 14px; }
.gate-logo { margin-bottom: 8px; }
.gate h1 { margin: 0; }
.gate-steps { padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.gate-video { width: 100%; max-height: 50vh; border-radius: 14px; background: #000; object-fit: cover; }

/* Super-admin (O-047) */
.admin { display: flex; flex-direction: column; gap: 12px; padding-bottom: 24px; }
.admin h2 { margin: 8px 0 0; }
.admin .service-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.admin .contact a { color: inherit; }
.admin .giver-row { margin: 6px 0; }
.admin .tone-ok { color: var(--mq-ok, #2E7D32); }
.admin .tone-warn { color: var(--mq-warn, #F5C518); }
.admin .tone-err { color: var(--mq-err, #D32F2F); }
.admin .issued { text-align: center; }
.admin .qr { width: min(320px, 80vw); image-rendering: pixelated; background: #fff; border-radius: 10px; padding: 0; }
.admin .link-text { word-break: break-all; font-size: 11px; opacity: .7; user-select: all; }
