/* Moses – sučelje za odlučivanje pri incidentima s dimom i plinovima.

   Polazište dizajna: radni list prognostičara nad meteorološkom kartom, a ne „aplikacija s karticama“.
   - Boje civilne zaštite: plava (međunarodni znak civilne zaštite: plavi trokut na narančastom) nosi akcije i odabir;
     signalna narančasta je samo za požar, izvor i aktivan događaj. Boje onečišćenja (EAQI, miris, razlika) su podaci
     i nikad se ne koriste kao ukras sučelja.
   - Podloga je hladni papir karte (dan) ili duboka plavo-siva (noćna smjena) – ne krem i ne „skoro crna“.
   - Pismo: Atkinson Hyperlegible Next (Braille Institute) – razlikuje 0/O, 1/l/I i radi pod stresom, na projektoru
     i pri slabom vidu. Jedna obitelj, hijerarhija samo težinom i veličinom; bez verzala i razmaknutih natpisa.
   - Struktura: tanke linije i razmak umjesto kartica; plutaju samo slojevi nad kartom (legenda, izbornici, dijalozi),
     pa samo oni imaju sjenu. Radijus raste s „visinom“: 2 px kontrole, 4 px plutajući slojevi, 6 px dijalozi. */

@font-face { font-family: "Atkinson Hyperlegible Next"; font-weight: 400; font-display: swap;
  src: url(../vendor/fonts/atkinson-hyperlegible-next-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Atkinson Hyperlegible Next"; font-weight: 400; font-display: swap;
  src: url(../vendor/fonts/atkinson-hyperlegible-next-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+2000-206F, U+20AC, U+2122, U+2190-21FF, U+2212, U+2215; }
@font-face { font-family: "Atkinson Hyperlegible Next"; font-weight: 500; font-display: swap;
  src: url(../vendor/fonts/atkinson-hyperlegible-next-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Atkinson Hyperlegible Next"; font-weight: 500; font-display: swap;
  src: url(../vendor/fonts/atkinson-hyperlegible-next-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+2000-206F, U+20AC, U+2122, U+2190-21FF, U+2212, U+2215; }
@font-face { font-family: "Atkinson Hyperlegible Next"; font-weight: 600; font-display: swap;
  src: url(../vendor/fonts/atkinson-hyperlegible-next-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Atkinson Hyperlegible Next"; font-weight: 600; font-display: swap;
  src: url(../vendor/fonts/atkinson-hyperlegible-next-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+2000-206F, U+20AC, U+2122, U+2190-21FF, U+2212, U+2215; }
@font-face { font-family: "Atkinson Hyperlegible Next"; font-weight: 700; font-display: swap;
  src: url(../vendor/fonts/atkinson-hyperlegible-next-latin-ext-700-normal.woff2) format("woff2"); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Atkinson Hyperlegible Next"; font-weight: 700; font-display: swap;
  src: url(../vendor/fonts/atkinson-hyperlegible-next-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+2000-206F, U+20AC, U+2122, U+2190-21FF, U+2212, U+2215; }

:root, [data-theme="dark"] {
  --bg: #16202B;            /* noćna smjena: duboka plavo-siva */
  --panel: #1B2633;
  --raised: #233142;
  --line: #34485D;
  --line-soft: #26374A;
  --text: #E3E9EF;
  --dim: #A6B4C2;
  --faint: #8597A9;
  --act: #8AABF5;           /* plava civilne zaštite – akcije, odabir, fokus */
  --act-ink: #0D1830;
  --act-soft: rgba(138, 171, 245, .14);
  --ember: #FF8C4F;         /* signalna narančasta – požar, izvor, aktivno */
  --ember-ink: #2A1105;
  --ember-soft: rgba(255, 140, 79, .14);
  --isobar: #93B7DA;        /* meteorologija – vjetar, profili */
  --isobar-soft: rgba(147, 183, 218, .13);
  --ok: #5CC69D;
  --warn: #E4B84E;
  --bad: #F27A6F;
  --shadow: 0 1px 2px rgba(4, 10, 18, .35), 0 10px 28px rgba(4, 10, 18, .38);
  --map-bg: #1A2530;
  --r-sm: 2px; --r-md: 4px; --r-lg: 6px;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #E7ECEF;            /* hladni papir karte */
  --panel: #F6F8F9;
  --raised: #FDFEFE;
  --line: #C3CDD5;
  --line-soft: #DCE3E8;
  --text: #14223A;          /* tinta */
  --dim: #4C5C6D;
  --faint: #63717F;
  --act: #1E45A6;
  --act-ink: #FFFFFF;
  --act-soft: rgba(30, 69, 166, .08);
  --ember: #C9450C;
  --ember-ink: #FFFFFF;
  --ember-soft: rgba(201, 69, 12, .09);
  --isobar: #34587F;
  --isobar-soft: rgba(52, 88, 127, .09);
  --ok: #1A7A53;
  --warn: #8F5E00;
  --bad: #B3302A;
  --shadow: 0 1px 2px rgba(20, 34, 58, .10), 0 8px 24px rgba(20, 34, 58, .12);
  --map-bg: #DDE4E8;
  --r-sm: 2px; --r-md: 4px; --r-lg: 6px;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  font-family: "Atkinson Hyperlegible Next", "Segoe UI", system-ui, sans-serif;
  font-size: 13.5px; line-height: 1.5;
  background: var(--bg); color: var(--text);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
}
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--isobar); outline-offset: 2px; }
h2 { font-size: 19px; font-weight: 600; margin: 2px 0 12px; letter-spacing: -.01em; }
h3 { font-size: 13px; font-weight: 600; margin: 22px 0 8px; color: var(--text); }
h3 small, h2 small { font-weight: 400; color: var(--dim); font-size: 12px; display: block; margin-top: 1px; }
.lead { color: var(--dim); margin: -4px 0 14px; max-width: 46ch; }
.fine { color: var(--dim); font-size: 12px; }

/* ---------------- gornja traka ---------------- */
.topbar {
  height: 56px; display: flex; align-items: center; gap: 18px; padding: 0 14px 0 16px;
  background: var(--panel); border-bottom: 1px solid var(--line); position: relative; z-index: 1200;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 250px; }
.brand-mark { width: 40px; height: 28px; }
.bm-src { fill: var(--ember); }
.bm-plume { fill: none; stroke: var(--isobar); stroke-width: 2.4; stroke-linecap: round; }
.bm-plume-2 { opacity: .45; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 700; font-size: 15px; letter-spacing: .04em; }
.brand-sub { font-size: 11px; color: var(--dim); }
.incident-head { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.incident-name {
  background: transparent; border: 1px solid transparent; border-radius: var(--r-sm, 6px); padding: 6px 8px;
  font-size: 17px; font-weight: 600; width: min(420px, 100%); min-width: 0;
}
.incident-name:hover { border-color: var(--line); }
.incident-name:focus { border-color: var(--isobar); outline: none; background: var(--raised); }
.status-pill {
  display: inline-flex; align-items: center; gap: 7px; border-radius: 999px; padding: 4px 11px 4px 9px;
  border: 1px solid var(--line); background: var(--raised); cursor: pointer; font-size: 12px; white-space: nowrap;
}
.status-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
.status-pill[data-status="aktivan"] .dot { box-shadow: 0 0 0 0 rgba(255, 90, 90, .6); animation: pulse 1.8s infinite; }
.status-pill[data-status="pod_kontrolom"] .dot { background: var(--warn); }
.status-pill[data-status="ugasen"] .dot { background: var(--ok); }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(255, 90, 90, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 90, 90, 0); } }
.top-run { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--dim); }
.top-run-bar { width: 120px; height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.top-run-bar span { display: block; height: 100%; width: 0; background: var(--ember); transition: width .4s; }
.top-actions { display: flex; gap: 4px; }
.icon-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 10px; border-radius: var(--r-sm, 6px);
  background: transparent; border: 1px solid transparent; cursor: pointer; color: var(--dim);
}
.icon-btn:hover { color: var(--text); background: var(--raised); border-color: var(--line); }

/* ---------------- raspored ---------------- */
.workspace { display: grid; grid-template-columns: 392px 1fr auto; height: calc(100vh - 56px); }
.flow { background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.steps { list-style: none; margin: 0; padding: 10px 10px 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px; border-bottom: 1px solid var(--line); }
.steps button {
  width: 100%; background: none; border: 0; cursor: pointer; padding: 6px 2px 10px; color: var(--dim);
  display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; font-size: 11px;
}
.steps b {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px;
  border: 1.5px solid var(--line); background: var(--bg); font-weight: 600;
}
.steps button.active { color: var(--text); }
.steps button.active b { border-color: var(--ember); color: var(--ember); }
.steps button.active::after { content: ""; position: absolute; left: 12%; right: 12%; bottom: -1px; height: 2px; background: var(--ember); }
.steps button.done b { background: var(--ok); border-color: var(--ok); color: #06231b; }
.steps button.warn b { border-color: var(--warn); }
.steps .state { display: none; }
.panels { overflow-y: auto; flex: 1; min-height: 0; scrollbar-width: thin; }
.panel { display: none; padding: 16px 18px 40px; }
.panel.active { display: block; }

/* ---------------- forme ---------------- */
label { display: flex; flex-direction: column; gap: 5px; color: var(--dim); font-size: 12px; margin-bottom: 10px; }
input, select {
  background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-sm, 6px); padding: 7px 9px; color: var(--text);
  min-width: 0; width: 100%;
}
input:focus, select:focus { border-color: var(--isobar); outline: none; }
input[type="range"] { padding: 0; accent-color: var(--ember); border: 0; background: none; }
input[type="checkbox"] { width: auto; }
output { color: var(--text); font-weight: 500; }
.field-row { display: grid; gap: 10px; }
.field-row.two { grid-template-columns: 1fr 1fr; }
.field-row.three { grid-template-columns: 1fr 1fr 1fr; }
.with-btn { display: flex; gap: 6px; }
.mini { border: 1px solid var(--line); background: var(--raised); border-radius: var(--r-sm, 6px); width: 34px; cursor: pointer; color: var(--dim); flex: none; }
.mini:hover, .mini.on { color: var(--ember); border-color: var(--ember); }
.inline-num { width: 52px !important; display: inline-block; padding: 2px 6px; margin: 0 4px; }
.inline-num.wide { width: 96px !important; }
.switch { flex-direction: row; align-items: center; gap: 10px; color: var(--text); cursor: pointer; flex-wrap: wrap; }
.switch input[type="checkbox"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch > span { width: 32px; height: 18px; border-radius: 999px; background: var(--line); position: relative; flex: none; transition: background .15s; }
.switch > span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--text); transition: transform .15s; }
.switch input:checked + span { background: var(--ember); }
.switch input:checked + span::after { transform: translateX(14px); background: #fff; }
.switch input:focus-visible + span { outline: 2px solid var(--isobar); outline-offset: 2px; }
.switch.slim { margin: 8px 0 4px; font-size: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: var(--r-sm, 6px); padding: 8px 12px;
  cursor: pointer; border: 1px solid var(--line); background: var(--raised); color: var(--text); width: 100%; margin-bottom: 10px;
}
.btn:hover { border-color: var(--dim); }
.btn.ghost { background: transparent; }
.btn.ghost.on { border-color: var(--ember); color: var(--ember); }
.btn.primary-cool { background: var(--isobar-soft); border-color: var(--isobar); color: var(--isobar); font-weight: 600; }
.btn.fire { background: var(--ember); border-color: var(--ember); color: var(--ember-ink); font-weight: 700; }
.btn.fire:hover { filter: brightness(1.08); }
.btn.big { padding: 13px; font-size: 15px; margin-top: 6px; }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.link { background: none; border: 0; color: var(--bad); cursor: pointer; padding: 0; text-decoration: underline; }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-sm, 6px); overflow: hidden; flex-wrap: wrap; margin-bottom: 10px; }
.seg button { background: transparent; border: 0; border-right: 1px solid var(--line); padding: 6px 10px; cursor: pointer; color: var(--dim); font-size: 12px; }
.seg button:last-child { border-right: 0; }
.seg button.active { background: var(--raised); color: var(--text); box-shadow: inset 0 -2px 0 var(--ember); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip {
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; background: transparent; cursor: pointer;
  color: var(--dim); font-size: 12px; display: inline-flex; align-items: center; gap: 6px;
}
.chip.on { border-color: var(--isobar); color: var(--text); background: var(--isobar-soft); }
.chip.pol.on { border-color: var(--ember); background: var(--ember-soft); }

.choice-list { display: flex; flex-direction: column; gap: 4px; }
.choice {
  display: grid; grid-template-columns: 22px 1fr; gap: 8px; align-items: start; text-align: left; padding: 7px 9px;
  border: 1px solid transparent; border-radius: var(--r-sm, 6px); background: transparent; cursor: pointer; color: var(--dim);
}
.choice:hover { background: var(--raised); }
.choice b { font-weight: 600; color: var(--text); }
.choice .k { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; font-size: 11px; margin-top: 1px; }
.choice.on { border-color: var(--line); background: var(--raised); }
.choice.on .k { border-color: var(--ember); background: var(--ember); color: var(--ember-ink); font-weight: 700; }
.choice small { display: block; color: var(--dim); font-size: 11.5px; }

/* uređivač profila emisije */
.profile-editor { height: 96px; border: 1px solid var(--line); border-radius: var(--r-sm, 6px); background: var(--bg); position: relative; cursor: ns-resize; touch-action: none; }
.profile-editor svg { width: 100%; height: 100%; display: block; }
.profile-editor .bar { fill: var(--ember); opacity: .85; }
.profile-editor .bar.off { fill: var(--faint); opacity: .35; }
.profile-editor text { fill: var(--dim); font-size: 9px; }

/* ---------------- izvori ---------------- */
.tool-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 14px; }
.tool-grid button {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px 8px; border-radius: var(--r-sm, 6px);
  border: 1px solid var(--line); background: var(--raised); cursor: pointer; color: var(--text);
}
.tool-grid button i { font-size: 17px; color: var(--ember); margin-bottom: 3px; }
.tool-grid button small { color: var(--dim); font-size: 10.5px; }
.tool-grid button.on { border-color: var(--ember); background: var(--ember-soft); }
.source-list { display: flex; flex-direction: column; gap: 8px; }
.src {
  border: 1px solid var(--line); border-left: 3px solid var(--ember); border-radius: 0 6px 6px 0; background: var(--bg);
}
.src-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; cursor: pointer; }
.src-head .ic { color: var(--ember); width: 16px; text-align: center; }
.src-head .nm { font-weight: 600; flex: 1; min-width: 0; }
.src-head .sub { color: var(--dim); font-size: 11.5px; }
.src-head button { background: none; border: 0; color: var(--faint); cursor: pointer; padding: 2px 4px; }
.src-head button:hover { color: var(--text); }
.src-body { padding: 4px 10px 10px; border-top: 1px dashed var(--line-soft); display: none; }
.src.open .src-body { display: block; }
.src-calc { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line-soft); border-radius: var(--r-sm, 6px); overflow: hidden; margin-top: 6px; }
.src-calc div { background: var(--panel); padding: 6px 8px; }
.src-calc span { display: block; color: var(--dim); font-size: 11px; }
.src-calc b { font-weight: 600; font-size: 13px; }
.empty { text-align: center; color: var(--dim); padding: 24px 10px; border: 1px dashed var(--line); border-radius: var(--r-sm, 6px); }
.empty i { font-size: 22px; color: var(--faint); }

/* ---------------- područje ---------------- */
.dom-info, .rec-count, .met-meta { color: var(--dim); font-size: 12px; margin-bottom: 8px; }
.met-meta b, .rec-count b, .dom-info b { color: var(--text); font-weight: 500; }
.rec-list { display: flex; flex-direction: column; }
.rec-row { display: grid; grid-template-columns: 18px 1fr auto; gap: 8px; align-items: center; padding: 5px 2px; border-bottom: 1px solid var(--line-soft); }
.rec-row i { color: var(--isobar); text-align: center; }
.rec-row input { padding: 3px 6px; background: transparent; border-color: transparent; }
.rec-row input:hover { border-color: var(--line); }
.rec-row button { background: none; border: 0; color: var(--faint); cursor: pointer; }

/* ---------------- meteo ---------------- */
.chart { margin: 4px -6px 4px; min-height: 40px; }
.chart.small { min-height: 200px; }
.barbs { width: 100%; height: 38px; display: block; }
.barbs path, .barbs line, .barbs circle { stroke: var(--isobar); fill: none; stroke-width: 1.4; stroke-linecap: round; }
.barbs .pennant { fill: var(--isobar); }

/* ---------------- model ---------------- */
.engines { display: flex; flex-direction: column; gap: 6px; }
.engine {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 9px 11px; border: 1px solid var(--line);
  border-radius: var(--r-sm, 6px); background: var(--bg); text-align: left; cursor: pointer; color: var(--text);
}
.engine .fam { color: var(--dim); font-size: 11.5px; grid-column: 1; }
.engine .tag { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-size: 11px; color: var(--dim); }
.engine.on { border-color: var(--ember); box-shadow: inset 3px 0 0 var(--ember); }
.engine.na { opacity: .62; cursor: default; }
.engine.rec .tag { color: var(--ok); }
.advice { margin: 10px 0 0; display: flex; flex-direction: column; gap: 6px; }
.advice p { margin: 0; padding: 7px 10px; border-radius: var(--r-sm, 6px); background: var(--raised); font-size: 12px; display: grid; grid-template-columns: 16px 1fr; gap: 8px; }
.advice p i { margin-top: 2px; }
.advice .ok i { color: var(--ok); } .advice .warn i { color: var(--warn); } .advice .bad i { color: var(--bad); }
.ens-opts { border-left: 2px solid var(--isobar); padding-left: 12px; margin-top: 4px; }

/* ---------------- pokretanje ---------------- */
.checklist { list-style: none; padding: 0; margin: 0 0 10px; }
.checklist li { display: grid; grid-template-columns: 18px 1fr; gap: 8px; padding: 5px 0; color: var(--dim); }
.checklist li.ok i { color: var(--ok); } .checklist li.no i { color: var(--bad); } .checklist li.wn i { color: var(--warn); }
.checklist li b { color: var(--text); font-weight: 500; }
.run-box { margin-top: 10px; }
.run-stage { display: flex; justify-content: space-between; font-weight: 500; margin-bottom: 6px; }
.run-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.run-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--ember), #ffb36b); transition: width .5s; }
.run-meta { display: flex; justify-content: space-between; color: var(--dim); font-size: 12px; margin: 6px 0; }
.console {
  font-family: ui-monospace, "Cascadia Mono", "DejaVu Sans Mono", monospace; font-size: 11px; line-height: 1.5; background: var(--bg);
  border: 1px solid var(--line); border-radius: var(--r-sm, 6px); padding: 8px 10px; height: 260px; overflow: auto; white-space: pre-wrap;
  color: var(--dim); margin: 0;
}
.console .ok { color: var(--ok); } .console .err { color: var(--bad); } .console .stg { color: var(--text); }

/* ---------------- karta ---------------- */
.mapwrap { position: relative; min-width: 0; background: var(--map-bg); }
#map { position: absolute; inset: 0; background: var(--map-bg); }
.leaflet-container { font-family: inherit; }
.leaflet-bottom.leaflet-left { bottom: 92px; }
.leaflet-top.leaflet-left { top: 4px; }
.leaflet-control-zoom a { background: var(--panel) !important; color: var(--text) !important; border-color: var(--line) !important; }
.leaflet-bar { border: 1px solid var(--line) !important; box-shadow: var(--shadow) !important; }
.leaflet-control-attribution { background: rgba(0,0,0,.35) !important; color: #c9d3d9 !important; font-size: 10px; }
.leaflet-control-attribution a { color: #e6eef2 !important; }
[data-theme="light"] .leaflet-control-attribution { background: rgba(255,255,255,.7) !important; color: #3a4a55 !important; }
[data-theme="light"] .leaflet-control-attribution a { color: #1a2a35 !important; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--panel); color: var(--text); box-shadow: var(--shadow); }
.leaflet-popup-content-wrapper { border-radius: var(--r-md, 8px); border: 1px solid var(--line); }
.leaflet-popup-content { margin: 12px 14px; font-size: 12.5px; }
.leaflet-tooltip { background: var(--panel); color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow); }
.map-hint {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 1000; background: var(--panel);
  border: 1px solid var(--ember); color: var(--text); padding: 7px 14px; border-radius: 999px; box-shadow: var(--shadow); font-size: 12.5px;
}
.map-hint kbd { border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; font-family: inherit; font-size: 11px; }
.layer-box { position: absolute; top: 12px; right: 12px; z-index: 1000; }
.layer-box > .icon-btn { background: var(--panel); border-color: var(--line); box-shadow: var(--shadow); color: var(--text); }
.layer-menu { position: absolute; right: 0; top: 38px; width: 230px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md, 8px); padding: 10px 12px; box-shadow: var(--shadow); }
.layer-menu h4 { margin: 2px 0 6px; font-size: 12px; color: var(--dim); font-weight: 500; }
.layer-menu label { flex-direction: row; align-items: center; gap: 8px; color: var(--text); margin: 0; padding: 3px 0; cursor: pointer; }
.layer-menu input { width: auto; accent-color: var(--ember); }
.layer-menu hr { border: 0; border-top: 1px solid var(--line); margin: 8px 0; }

.legend {
  position: absolute; right: 12px; bottom: 96px; z-index: 900; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-md, 8px); padding: 9px 11px; box-shadow: var(--shadow); min-width: 190px; font-size: 12px;
}
.legend h4 { margin: 0 0 6px; font-size: 12px; font-weight: 600; }
.legend .row { display: grid; grid-template-columns: 14px 1fr auto; gap: 8px; align-items: center; padding: 1.5px 0; }
.legend .sw { width: 14px; height: 10px; border-radius: 2px; }
.legend .v { color: var(--dim); }
.legend .note { color: var(--dim); font-size: 11px; margin-top: 5px; max-width: 220px; }

/* izvori na karti */
.src-marker { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--ember); color: #2a1208;
  box-shadow: 0 0 0 4px rgba(255,122,69,.28), 0 4px 10px rgba(0,0,0,.4); font-size: 14px; }
.rec-marker { width: 22px; height: 22px; border-radius: var(--r-sm, 6px); display: grid; place-items: center; background: var(--panel); color: var(--isobar);
  border: 1.5px solid var(--isobar); font-size: 11px; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.rec-marker.hot { border-color: var(--bad); color: var(--bad); }
.max-marker { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #fff; background: #7D2181; box-shadow: 0 0 0 3px rgba(125,33,129,.35); }
.wind-marker svg { overflow: visible; }
.wind-marker path, .wind-marker line { stroke: var(--isobar); stroke-width: 2; fill: none; stroke-linecap: round; }
.wind-marker .pennant { fill: var(--isobar); }
.wind-marker circle { fill: var(--panel); stroke: var(--isobar); stroke-width: 2; }
.plume-path { transition: fill-opacity .25s; }

/* ---------------- vremenska traka ---------------- */
.timeline {
  position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 950; height: 76px; display: grid;
  grid-template-columns: 44px 92px 1fr; align-items: center; gap: 10px; padding: 8px 12px 8px 8px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg, 10px); box-shadow: var(--shadow);
}
.play { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--ember); color: var(--ember-ink); cursor: pointer; font-size: 15px; }
.play:disabled { background: var(--line); color: var(--dim); cursor: default; }
.tl-now { display: flex; flex-direction: column; line-height: 1.15; }
.tl-now b { font-size: 22px; font-weight: 600; }
.tl-now span { color: var(--dim); font-size: 11.5px; }
.tl-strip { position: relative; height: 60px; overflow: hidden; cursor: pointer; }
.tl-strip svg { width: 100%; height: 100%; display: block; }
.tl-strip .col:hover rect.hit { fill: var(--raised); }
.tl-strip rect.hit { fill: transparent; }
.tl-strip rect.cur { fill: var(--isobar-soft); stroke: var(--isobar); stroke-width: 1; }
.tl-strip .barb path, .tl-strip .barb line, .tl-strip .barb circle { stroke: var(--isobar); fill: none; stroke-width: 1.3; stroke-linecap: round; }
.tl-strip .barb .pennant { fill: var(--isobar); }
.tl-strip text { fill: var(--dim); font-size: 10px; text-anchor: middle; }
.tl-strip text.stab { font-weight: 600; font-size: 10.5px; }
.tl-strip .emis { fill: var(--ember); opacity: .55; }

/* ---------------- analiza ---------------- */
.analysis { width: 360px; background: var(--panel); border-left: 1px solid var(--line); overflow-y: auto; padding: 12px 16px 30px; scrollbar-width: thin; }
.an-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.an-head .seg { margin-bottom: 8px; }
.modes { width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(60px, 1fr)); }
.an-sentence { font-size: 15px; line-height: 1.45; margin: 10px 0 12px; }
.an-sentence b { font-weight: 600; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md, 8px); overflow: hidden; margin: 0; }
.kpis div { background: var(--bg); padding: 8px 10px; }
.kpis dt { color: var(--dim); font-size: 11.5px; }
.kpis dd { margin: 2px 0 0; font-size: 17px; font-weight: 600; }
.kpis dd small { font-size: 11px; color: var(--dim); font-weight: 400; }
.rec-table table { width: 100%; border-collapse: collapse; font-size: 12px; }
.rec-table th { text-align: left; color: var(--dim); font-weight: 400; padding: 4px 4px; border-bottom: 1px solid var(--line); }
.rec-table td { padding: 6px 4px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.rec-table tr { cursor: pointer; }
.rec-table tr:hover td { background: var(--raised); }
.rec-table .cbox { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; }
.rec-table svg { width: 70px; height: 20px; display: block; }
.export { display: flex; flex-wrap: wrap; gap: 6px; }
.export a { border: 1px solid var(--line); border-radius: var(--r-sm, 6px); padding: 5px 9px; color: var(--text); text-decoration: none; font-size: 12px; display: inline-flex; gap: 6px; align-items: center; }
.export a:hover { border-color: var(--isobar); }
.export a i { color: var(--isobar); }

/* ---------------- dijalozi i obavijesti ---------------- */
.dlg { border: 1px solid var(--line); border-radius: var(--r-lg, 10px); background: var(--panel); color: var(--text); padding: 0; width: min(760px, 94vw); box-shadow: var(--shadow); }
.dlg.narrow { width: min(460px, 94vw); }
.dlg::backdrop { background: rgba(4, 10, 15, .55); }
.dlg header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.dlg header h2 { margin: 0; font-size: 16px; }
.dlg > label, .dlg > p { margin: 12px 16px; }
.dlg-actions { padding: 0 16px 16px; }
.archive-list { max-height: 70vh; overflow: auto; }
.arch { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 11px 16px; border-bottom: 1px solid var(--line-soft); }
.arch .t { font-weight: 600; }
.arch .m { color: var(--dim); font-size: 12px; }
.arch .a { grid-row: 1 / span 2; grid-column: 2; display: flex; gap: 6px; align-items: center; }
.arch .a button { border: 1px solid var(--line); background: var(--raised); color: var(--text); border-radius: var(--r-sm, 6px); padding: 5px 9px; cursor: pointer; font-size: 12px; }
.arch .a button.del { color: var(--bad); }
.st-done { color: var(--ok); } .st-error, .st-interrupted, .st-cancelled { color: var(--bad); } .st-running { color: var(--warn); }
.toasts { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 3000; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--isobar); border-radius: var(--r-sm, 6px); padding: 9px 14px; box-shadow: var(--shadow); max-width: 520px; }
.toast.err { border-left-color: var(--bad); }
.toast.ok { border-left-color: var(--ok); }

/* ApexCharts u temi */
.apexcharts-tooltip { background: var(--panel) !important; color: var(--text) !important; border-color: var(--line) !important; }
.apexcharts-tooltip-title { background: var(--raised) !important; border-color: var(--line) !important; }
.apexcharts-xaxistooltip { background: var(--panel) !important; color: var(--text) !important; border-color: var(--line) !important; }
.apexcharts-legend-text { color: var(--dim) !important; }

@media (max-width: 1100px) {
  .workspace { grid-template-columns: 340px 1fr; }
  .analysis { position: absolute; right: 0; top: 56px; bottom: 0; z-index: 1100; box-shadow: var(--shadow); }
  .brand { min-width: 0; } .brand-sub { display: none; }
}
@media (max-width: 760px) {
  body { overflow: auto; }
  .workspace { grid-template-columns: 1fr; grid-template-rows: 55vh auto; height: auto; }
  .mapwrap { order: -1; height: 55vh; }
  .flow { border-right: 0; }
  .top-actions span, .brand-text { display: none; }
  .timeline { grid-template-columns: 40px 1fr; height: auto; }
  .tl-now { display: none; }
  .analysis { width: 100%; top: auto; position: relative; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Amego */
.amego-opts { border-left: 2px solid var(--ember); padding-left: 12px; margin-top: 12px; }
textarea { background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-sm, 6px); padding: 7px 9px; color: var(--text);
  font-family: ui-monospace, "Cascadia Mono", "DejaVu Sans Mono", monospace; font-size: 11px; resize: vertical; width: 100%; }
textarea:focus { border-color: var(--isobar); outline: none; }
.legend .puff-row { display: flex; gap: 8px; align-items: center; margin-top: 6px; color: var(--dim); font-size: 11px; flex-wrap: wrap; }
.legend .puff-row i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 3px; }

/* ručni unos meteo */
.manual-box { border-left: 2px solid var(--isobar); padding-left: 12px; margin: 4px 0 12px; }
.manual-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.manual-tools .btn { width: auto; margin: 0; padding: 5px 9px; font-size: 12px; }
.file-btn { position: relative; flex-direction: row; color: var(--text); }
.file-btn input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.manual-table-wrap { overflow: auto; max-height: 340px; border: 1px solid var(--line); border-radius: var(--r-sm, 6px); margin-bottom: 8px; }
.manual-table { border-collapse: collapse; font-size: 11.5px; min-width: 100%; }
.manual-table th { position: sticky; top: 0; background: var(--raised); color: var(--dim); font-weight: 500; padding: 4px 4px; text-align: left; white-space: nowrap; z-index: 1; }
.manual-table td { padding: 1px 2px; border-top: 1px solid var(--line-soft); }
.manual-table td.t { color: var(--dim); white-space: nowrap; padding: 0 6px; }
.manual-table input { width: 52px; padding: 3px 4px; font-size: 11.5px; border-radius: 4px; background: transparent; border-color: transparent; }
.manual-table input:hover { border-color: var(--line); }
.manual-table input:focus { background: var(--raised); border-color: var(--isobar); }
.manual-table tr.filled td.t { color: var(--text); }

/* ---------- PBR (model gorenja čestice) ---------- */
.pbr-box { border: 1px dashed var(--line); border-radius: var(--r-md, 8px); padding: 8px 8px 4px; margin: 4px 0 6px; background: var(--ember-soft); }
.pbr-chart { margin-top: 4px; }
.pbr-svg { width: 100%; height: auto; display: block; }
.pbr-svg text { font-size: 8px; fill: var(--dim);  }
.pbr-svg .pbr-fl { fill: var(--ember); opacity: .75; }
.pbr-svg .pbr-sm { fill: var(--dim); opacity: .35; }
.pbr-svg .pbr-ts { fill: none; stroke: var(--isobar); stroke-width: 1.2; stroke-dasharray: 3 2; }
.pbr-svg .pbr-ax { stroke: var(--line); }
.pbr-sum { font-size: 12px; line-height: 1.45; margin: 4px 0; }
.pbr-sum .fine { display: block; margin-top: 2px; }
.pbr-leg { display: inline-flex; gap: 8px; margin-left: 4px; color: var(--dim); font-size: 11px; flex-wrap: wrap; }
.pbr-leg i { display: inline-block; width: 10px; height: 8px; border-radius: 2px; margin-right: 3px; vertical-align: middle; }
.pbr-leg i.fl { background: var(--ember); } .pbr-leg i.sm { background: var(--dim); opacity: .5; }
.pbr-leg i.ts { background: none; border-top: 2px dashed var(--isobar); height: 0; }
#alpOpts { border-left: 3px solid var(--isobar); padding-left: 8px; margin-bottom: 6px; }
.gral-opts { border-left: 3px solid var(--ember); padding-left: 8px; }

/* ---------- model zgrada ---------- */
.bld-info { font-size: 12.5px; line-height: 1.5; margin: 6px 0 4px; }
.bld-info a { color: var(--isobar); }
.bld-legend { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 11px; color: var(--dim); margin-bottom: 4px; }
.bld-legend i { display: inline-block; width: 12px; height: 9px; border-radius: 2px; margin-right: 4px; vertical-align: middle; opacity: .8; }
.bld-pop { font-size: 12.5px; display: grid; gap: 4px; }
.bld-pop label { display: grid; gap: 2px; margin-top: 4px; }
.bld-pop input { width: 100%; }
.bld-pop .row { display: flex; gap: 6px; margin-top: 4px; }
.bld-pop .btn { padding: 4px 10px; font-size: 12px; }

/* ---------- kontinuirano polje ---------- */
.field-bar { height: 12px; border-radius: 3px; margin: 6px 0 2px; border: 1px solid var(--line); }
.field-ticks { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--dim);  }
.field-dec { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--dim); margin: -4px 0 8px; }
.field-dec select { width: auto; padding: 2px 6px; }
.leaflet-image-layer.field-img { image-rendering: auto; mix-blend-mode: normal; }

/* ===== alati: vremenski okvir, pouzdanost, ansambl, Što-ako ===== */
.budget { margin: 0 0 10px; }
.budget .lbl { display: block; font-size: 12px; color: var(--dim); margin-bottom: 4px; }
.budget .seg { margin-bottom: 4px; }
.budget .fine { margin: 2px 0 0; }
.engine .meta { grid-column: 1; display: flex; gap: 12px; font-size: 11.5px; color: var(--dim); margin-top: 3px; }
.engine .meta .miss { color: var(--bad); }
.engine.slow { opacity: .7; }
.engine.slow .meta span:first-child { color: var(--bad); }
.rel-card { margin: 10px 0 4px; }
.rel-card h3 { margin-top: 4px; }
.gauge { display: flex; gap: 12px; align-items: center; background: var(--raised); border-radius: var(--r-md, 8px); padding: 10px 12px; }
.g-num { font-size: 30px; font-weight: 700; line-height: 1; min-width: 64px; }
.g-num small { font-size: 12px; color: var(--dim); font-weight: 400; }
.g-txt { font-size: 12.5px; flex: 1; }
.g-bar { height: 5px; background: var(--line); border-radius: 3px; margin-top: 6px; overflow: hidden; }
.g-bar span { display: block; height: 100%; border-radius: 3px; }
.g-groups { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.g-groups span { font-size: 11px; padding: 2px 7px; border-radius: 999px; background: var(--raised); border: 1px solid var(--line); }
.g-groups .bad { color: var(--bad); } .g-groups .warn { color: var(--warn); } .g-groups .ok { color: var(--ok); }
.rel-list { list-style: none; padding: 0; margin: 6px 0; display: flex; flex-direction: column; gap: 5px; }
.rel-list li { display: grid; grid-template-columns: 16px 1fr; gap: 8px; font-size: 12px; padding: 6px 8px; border-radius: var(--r-sm, 6px); background: var(--raised); }
.rel-list li i { margin-top: 2px; }
.rel-list li em { font-style: normal; color: var(--dim); float: right; }
.rel-list .ok i { color: var(--ok); } .rel-list .warn i { color: var(--warn); } .rel-list .bad i { color: var(--bad); }
details summary { cursor: pointer; font-size: 12.5px; color: var(--isobar); margin: 6px 0; }
ol.improve { padding-left: 18px; margin: 4px 0; font-size: 12px; display: flex; flex-direction: column; gap: 4px; }
.mem-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.mem-list .mem { display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--r-sm, 6px); font-size: 12.5px; cursor: pointer; flex-direction: row; }
.mem-list .mem span { color: var(--dim); font-size: 11.5px; }
.mem-list .mem.na { opacity: .5; }
.wi-opts { margin-top: 6px; }
.wi-table { width: 100%; border-collapse: collapse; font-size: 12px; margin: 4px 0 6px; }
.wi-table th { text-align: left; color: var(--dim); font-weight: 400; padding: 3px 4px; border-bottom: 1px solid var(--line); }
.wi-table td { padding: 4px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.wi-table tr:not(.on) td { color: var(--dim); }
.wi-table input[type="number"] { width: 62px; padding: 3px 5px; }
.wi-table td.u { color: var(--dim); font-size: 11px; }
.chips.small { margin: 4px 0 2px; }
.chips.small .chip { font-size: 11px; padding: 2px 8px; }

/* ===== panel rezultata: kartice, produkti, zone, lokacije, presjek ===== */
.seg.prods { display: flex; flex-wrap: wrap; }
.seg.prods button { font-size: 11.5px; padding: 5px 8px; }
.seg.prods button.mem { color: var(--faint); }
.seg.prods button.mem.active { color: var(--text); }
.an-tabs { display: flex; flex-wrap: wrap; gap: 0 2px; border-bottom: 1px solid var(--line); margin: 2px 0 10px; }
.an-tabs button { background: transparent; border: 0; padding: 7px 8px; font-size: 12px; color: var(--dim); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.an-tabs button.active { color: var(--text); border-bottom-color: var(--ember); }
.an-pane { display: none; }
.an-pane.active { display: block; }
.zone-info { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.zcard { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: var(--r-md, 8px); background: var(--raised); font-size: 12.5px; border-left: 3px solid var(--bad); }
.zcard.e { border-left-color: var(--warn); }
table.mini { width: 100%; border-collapse: collapse; font-size: 11.5px; margin: 6px 0; }
table.mini th { text-align: left; color: var(--dim); font-weight: 400; padding: 3px 4px; border-bottom: 1px solid var(--line); }
table.mini td { padding: 4px; border-bottom: 1px solid var(--line-soft); }
b.bad, span.bad { color: var(--bad); } b.warn { color: var(--warn); } span.ok { color: var(--ok); }
.loc-list { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.loc-card { padding: 8px 10px; border-radius: var(--r-md, 8px); background: var(--raised); font-size: 12px; border: 1px solid transparent; cursor: pointer; display: flex; flex-direction: column; gap: 3px; }
.loc-card.act { border-color: var(--isobar); }
.lc-head { display: flex; align-items: center; gap: 6px; }
.lc-head .num, .loc-marker { width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; color: #10202a; flex: none; }
.loc-marker { border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.5); }
.lc-name { flex: 1; background: transparent; border: 0; border-bottom: 1px dashed var(--line); color: var(--text); font-weight: 600; padding: 2px 0; font-size: 12.5px; }
.lc-row { display: grid; grid-template-columns: 16px 1fr; gap: 6px; }
.lc-row i { color: var(--dim); margin-top: 2px; }
.icon-btn.sm { width: 22px; height: 22px; font-size: 11px; }
.btn.sm { padding: 4px 8px; font-size: 11.5px; margin-top: 6px; }
.btn.ghost.on { border-color: var(--isobar); color: var(--isobar); }
.heat-wrap { width: 100%; }
canvas.heat { display: block; width: 100%; }
.tr-end { width: 18px; height: 18px; border-radius: 50%; background: #111827; color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; }
.unc-hint { padding-left: 18px; font-size: 12.5px; display: flex; flex-direction: column; gap: 4px; }
.btn-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
ol.rank { padding-left: 18px; font-size: 12.5px; display: flex; flex-direction: column; gap: 4px; margin: 4px 0; }
ul.crit { padding-left: 18px; font-size: 12px; display: flex; flex-direction: column; gap: 4px; }
.pp > div { margin: 3px 0; font-size: 12px; }

/* ===== repozitorij slučajeva i validacija ===== */
.dlg.wide { width: min(1100px, 96vw); }
.cases-wrap { display: grid; grid-template-columns: 330px 1fr; height: min(78vh, 760px); }
.cases-list { border-right: 1px solid var(--line); overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.case-card { text-align: left; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-md, 8px); padding: 9px 10px; cursor: pointer; color: var(--text); display: flex; flex-direction: column; gap: 3px; font: inherit; }
.case-card:hover { border-color: var(--dim); }
.case-card.on { border-color: var(--ember); box-shadow: inset 3px 0 0 var(--ember); }
.case-card .cc-top { display: flex; justify-content: space-between; gap: 6px; font-size: 13px; }
.case-card .cc-meta { font-size: 11.5px; color: var(--dim); }
.case-card .cc-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.case-card .cc-tags span { font-size: 10.5px; padding: 1px 6px; border-radius: 999px; background: var(--raised); color: var(--dim); }
.case-card .cc-tags .m { color: var(--ok); } .case-card .cc-tags .q { color: var(--isobar); }
em.live { font-style: normal; font-size: 10.5px; color: #fff; background: var(--bad); border-radius: 999px; padding: 1px 7px; white-space: nowrap; height: fit-content; }
.case-detail { overflow-y: auto; padding: 4px 20px 20px; font-size: 13px; }
.case-detail h3 { font-size: 17px; margin: 12px 0 4px; }
.case-detail h4 { margin: 14px 0 4px; font-size: 13px; color: var(--dim); text-transform: uppercase; letter-spacing: .04em; }
.case-detail h4 small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.cd-meta { color: var(--dim); font-size: 12px; margin: 0 0 6px; }
dl.facts { display: grid; grid-template-columns: 130px 1fr; gap: 4px 12px; margin: 0; font-size: 12.5px; }
dl.facts dt { color: var(--dim); }
dl.facts dd { margin: 0; }
ol.tl, ul.setup, ul.assume, ul.links, ul.checks { padding-left: 18px; margin: 4px 0; display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; }
ul.assume li { color: var(--warn); }
ul.checks { list-style: none; padding-left: 0; }
ul.checks i { color: var(--isobar); margin-right: 4px; }
.cd-actions { display: flex; gap: 12px; align-items: center; margin-top: 16px; position: sticky; bottom: -20px; background: var(--panel); padding: 10px 0; border-top: 1px solid var(--line); }
.case-bar { display: grid; grid-template-columns: 18px 1fr auto auto; gap: 8px; align-items: center; margin: 6px 12px 0; padding: 7px 10px; border-radius: var(--r-md, 8px); background: var(--isobar-soft); border: 1px solid var(--isobar); font-size: 12px; }
.case-bar > i { color: var(--isobar); }
.an-tabs button.hl { color: var(--isobar); }
table.mini td.ok, table.mini td .ok, .vchecks .ok { color: var(--ok); }
table.mini td.bad, .vchecks .bad { color: var(--bad); }
table.mini.val td, table.mini.stats td { white-space: nowrap; }
ul.vchecks { list-style: none; padding: 0; margin: 4px 0; display: flex; flex-direction: column; gap: 5px; }
ul.vchecks li { display: grid; grid-template-columns: 16px 1fr; gap: 8px; font-size: 12px; padding: 6px 8px; border-radius: var(--r-sm, 6px); background: var(--raised); }
ul.vchecks li i { margin-top: 2px; }
.val-import { margin-top: 12px; }
.val-import textarea { width: 100%; font-family: ui-monospace, monospace; font-size: 11.5px; }
@media (max-width: 760px) { .cases-wrap { grid-template-columns: 1fr; height: auto; } .cases-list { max-height: 30vh; border-right: 0; border-bottom: 1px solid var(--line); } }
.val-wrap { overflow-x: auto; margin: 0 -4px; }
table.mini.val { font-size: 11px; }
table.mini.val td:first-child { white-space: normal; min-width: 92px; }

/* ===== satelitske snimke ===== */
#satToggle { margin-top: 6px; }
.layer-box { display: flex; flex-direction: column; align-items: flex-end; }
.sat-panel { position: absolute; top: 12px; right: 60px; z-index: 1000; width: 330px; max-height: calc(100% - 120px); overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg, 10px); box-shadow: var(--shadow); padding: 10px 12px; font-size: 12.5px; }
.sat-panel header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.sat-panel header i { color: var(--isobar); margin-right: 4px; }
.sat-panel label { margin-bottom: 6px; }
.sat-panel h4 { margin: 10px 0 4px; font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: .04em; }
.sat-panel .with-btn { display: flex; gap: 4px; }
.sat-panel .with-btn input { flex: 1; }
.sat-status { margin: 8px 0 0; font-size: 12px; }
.sat-status.err { color: var(--bad); } .sat-status.warn { color: var(--warn); }
.sat-sugg { display: flex; flex-direction: column; gap: 3px; }
.sat-item { display: grid; grid-template-columns: 82px 1fr 16px; gap: 6px; align-items: center; text-align: left; background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--r-sm, 6px); padding: 5px 7px; cursor: pointer; color: var(--text); font: inherit; font-size: 11.5px; }
.sat-item:hover { border-color: var(--isobar); }
.sat-item .fa-sun { color: var(--warn); } .sat-item .fa-moon { color: var(--isobar); }
.sat-saved { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; }
.case-detail .sat-sugg { max-height: 220px; overflow-y: auto; }
.sat-panel .btn-row { flex-wrap: nowrap; }
.sat-panel .btn-row .btn { width: auto; flex: 0 0 auto; margin: 0; padding: 6px 10px; }
.sat-panel .btn-row .btn.primary-cool { flex: 1 1 auto; }
/* učitavanje rezultata (promjena onečišćivača / produkta) */
.analysis.loading .kpis, .analysis.loading .an-sentence { opacity: .45; transition: opacity .15s; }
.seg button.busy { position: relative; }
.seg button.busy::after { content: ""; position: absolute; left: 15%; right: 15%; bottom: 0; height: 2px; background: var(--isobar); animation: busy 0.9s ease-in-out infinite; }
@keyframes busy { 0% { transform: scaleX(.2); } 50% { transform: scaleX(1); } 100% { transform: scaleX(.2); } }

/* rad uživo */
.live-opts { margin-top: 10px; }
.live-opts summary { cursor: pointer; font-size: 12.5px; color: var(--muted); }
.live-dot { position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: #FF5A5A; animation: pulse 1.6s infinite; }
#btnLive { position: relative; }
.dlg.wide { width: min(1080px, 96vw); }
.live-wrap { display: grid; grid-template-columns: 260px 1fr; gap: 0; min-height: 420px; max-height: 78vh; }
.live-list { border-right: 1px solid var(--line); overflow: auto; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.live-item { text-align: left; background: transparent; border: 1px solid var(--line); border-radius: var(--r-md, 8px); padding: 8px; color: var(--text); display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.live-item.active { border-color: var(--ember, #FF7A45); }
.live-st { font-size: 11.5px; color: var(--muted); }
.live-st.on { color: #50CCAA; }
.live-detail { padding: 12px 16px; overflow: auto; }
@media (max-width: 720px) { .live-wrap { grid-template-columns: 1fr; } .live-list { border-right: 0; border-bottom: 1px solid var(--line); max-height: 180px; } }

/* =====================================================================================================================
   Sustav sučelja (10/2026) – nadjačava starije stilove iznad. Načela u zaglavlju datoteke.
   ===================================================================================================================== */
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: var(--act-soft); }
:focus-visible { outline: 2px solid var(--act); outline-offset: 2px; }
a { color: var(--act); }
h2 { font-size: 19px; font-weight: 700; letter-spacing: 0; line-height: 1.25; margin: 0 0 14px; }
h3 { font-size: 14px; font-weight: 700; margin: 26px 0 8px; }
h3 small, h2 small { font-size: 12.5px; color: var(--dim); font-weight: 400; }
h4 { font-size: 13.5px; font-weight: 700; }
.fine { font-size: 12.5px; color: var(--dim); }
label { font-size: 12.5px; color: var(--dim); }

/* ---- gornja traka: ravna, naziv incidenta je naslov stranice ---- */
.topbar { height: 52px; background: var(--panel); border-bottom: 1px solid var(--line); gap: 16px; }
.brand { min-width: 0; gap: 9px; }
.brand-mark { width: 34px; height: 24px; }
.bm-src { fill: var(--act); }
.bm-plume { stroke: var(--isobar); stroke-width: 2.2; }
.bm-plume-2 { opacity: .55; }
.brand-name { font-size: 16px; font-weight: 700; letter-spacing: 0; }
.brand-sub { font-size: 11.5px; }
.incident-head { padding-left: 14px; border-left: 1px solid var(--line); }
.incident-name { font-size: 18px; font-weight: 700; border-radius: var(--r-sm); padding: 5px 7px; }
.incident-name:focus { border-color: var(--act); }
.status-pill { border: 0; background: transparent; border-radius: var(--r-sm); padding: 4px 8px; font-size: 13px; color: var(--text); gap: 7px; }
.status-pill:hover { background: var(--raised); }
.status-pill .dot { width: 9px; height: 9px; }
.status-pill[data-status="aktivan"] .dot { background: var(--ember); box-shadow: none; animation: none; }
.status-pill[data-status="aktivan"] .txt { color: var(--ember); font-weight: 600; }
.top-run-bar { border-radius: 0; height: 3px; }
.top-run-bar span { background: var(--act); }
.icon-btn { border-radius: var(--r-sm); height: 34px; color: var(--dim); }
.icon-btn:hover { background: var(--raised); border-color: transparent; color: var(--text); }
.live-dot { background: var(--ember); animation: none; box-shadow: 0 0 0 2px var(--panel); }

/* ---- koraci: postaje na liniji (stvarni slijed 1-6) ---- */
.workspace { height: calc(100vh - 52px); grid-template-columns: 384px 1fr auto; }
.steps { padding: 12px 8px 0; gap: 0; position: relative; }
.steps li { position: relative; }
.steps li + li::before { content: ""; position: absolute; top: 17px; left: -50%; width: 100%; height: 2px; background: var(--line); }
.steps li:has(> button.done) + li::before { background: var(--act); }
.steps button { font-size: 12px; padding: 6px 0 11px; gap: 5px; position: relative; z-index: 1; }
.steps b { width: 22px; height: 22px; font-size: 11.5px; border-width: 2px; background: var(--panel); border-color: var(--line); color: var(--dim); }
.steps button.done b { background: var(--act); border-color: var(--act); color: var(--act-ink); }
.steps button.active { color: var(--text); font-weight: 700; }
.steps button.active b { border-color: var(--act); color: var(--act); background: var(--panel); box-shadow: 0 0 0 3px var(--act-soft); }
.steps button.active::after { left: 18%; right: 18%; background: var(--act); }
.steps button.warn b { border-color: var(--warn); color: var(--warn); }
.panel { padding: 18px 20px 48px; }

/* ---- kontrole: niske, jasne, 2 px ---- */
input, select, textarea { border-radius: var(--r-sm); background: var(--raised); }
input:focus, select:focus, textarea:focus { border-color: var(--act); box-shadow: 0 0 0 3px var(--act-soft); }
input[type="range"] { accent-color: var(--act); }
.btn { border-radius: var(--r-sm); padding: 8px 12px; font-weight: 600; }
.btn:hover { border-color: var(--act); color: var(--text); }
.btn.ghost { background: transparent; }
.btn.ghost.on, .mini:hover, .mini.on { border-color: var(--act); color: var(--act); }
.btn.primary-cool { background: var(--act); border-color: var(--act); color: var(--act-ink); }
.btn.primary-cool:hover { filter: brightness(1.06); }
.btn.fire { background: var(--act); border-color: var(--act); color: var(--act-ink); }      /* glavna akcija = plava */
.btn.fire:hover { filter: brightness(1.07); }
.btn.big { font-size: 15px; padding: 12px; }
.link { color: var(--act); }
.mini { border-radius: var(--r-sm); }
.seg { border-radius: var(--r-sm); }
.seg button { font-size: 12.5px; }
.seg button.active { background: var(--act-soft); color: var(--act); box-shadow: inset 0 -2px 0 var(--act); font-weight: 600; }
.chip { border-radius: var(--r-sm); font-size: 12.5px; }
.chip.on { border-color: var(--act); background: var(--act-soft); color: var(--text); }
.chip.pol.on { border-color: var(--act); background: var(--act-soft); }
.switch input:checked + span { background: var(--act); }
.choice { border-radius: var(--r-sm); }
.choice.on { background: var(--act-soft); border-color: transparent; box-shadow: inset 3px 0 0 var(--act); }
.choice.on .k { background: var(--act); border-color: var(--act); color: var(--act-ink); }
details summary { color: var(--act); font-size: 13px; }
.profile-editor { border-radius: var(--r-sm); }
.profile-editor .bar { fill: var(--ember); opacity: .8; }

/* izvori: požar je narančast (signal), alat za crtanje je neutralan */
.tool-grid { gap: 0; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.tool-grid button { border: 0; border-right: 1px solid var(--line); border-radius: 0; background: transparent; }
.tool-grid button:last-child { border-right: 0; }
.tool-grid button i { color: var(--dim); }
.tool-grid button.on { background: var(--act-soft); box-shadow: inset 0 -2px 0 var(--act); }
.tool-grid button.on i { color: var(--act); }
.src { border-radius: 0; border: 0; border-left: 3px solid var(--ember); border-bottom: 1px solid var(--line-soft); background: transparent; }
.src-calc { border-radius: var(--r-sm); }
.empty { border-radius: var(--r-sm); border-style: dashed; }

/* modeli: popis s linijama, ne zid kartica; opis u dvije retka */
.engines { gap: 0; border-top: 1px solid var(--line-soft); }
.engine { border: 0; border-bottom: 1px solid var(--line-soft); border-radius: 0; background: transparent; padding: 10px 10px 10px 13px; }
.engine:hover { background: var(--raised); }
.engine b { font-size: 14px; }
.engine .fam { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12.5px; line-height: 1.45; }
.engine.on { box-shadow: inset 3px 0 0 var(--act); background: var(--act-soft); }
.engine.on .fam { -webkit-line-clamp: unset; display: block; }
.engine.rec .tag { color: var(--ok); font-weight: 600; }
.engine .meta { font-size: 12px; }
.advice p { border-radius: 0; background: transparent; border-left: 2px solid var(--line); padding: 4px 0 4px 10px; font-size: 12.5px; }
.advice .warn { border-left-color: var(--warn); } .advice .bad { border-left-color: var(--bad); } .advice .ok { border-left-color: var(--ok); }
.ens-opts, .amego-opts, .manual-box, #alpOpts, .gral-opts { border-left: 2px solid var(--line); }
.gauge { border-radius: 0; background: transparent; padding: 4px 0; }
.rel-list li, ul.vchecks li { border-radius: 0; background: transparent; padding: 5px 0; border-bottom: 1px solid var(--line-soft); }
.g-groups span { border-radius: var(--r-sm); }
.mem-list .mem { border-radius: var(--r-sm); }

/* pokretanje */
.run-bar { border-radius: 0; height: 4px; }
.run-bar span { background: var(--act); }
.console { border-radius: var(--r-sm); font-size: 11.5px; }

/* traka slučaja: bilješka uz rub, ne obojena kutija */
.case-bar { margin: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: var(--act-soft); padding: 8px 14px; font-size: 12.5px; }

/* ---- karta: plutajući slojevi (jedini sa sjenom) ---- */
.leaflet-bar, .layer-box > .icon-btn { border-radius: var(--r-md) !important; }
.leaflet-control-zoom a:first-child { border-top-left-radius: var(--r-md) !important; border-top-right-radius: var(--r-md) !important; }
.leaflet-control-zoom a:last-child { border-bottom-left-radius: var(--r-md) !important; border-bottom-right-radius: var(--r-md) !important; }
.layer-menu, .legend, .sat-panel, .leaflet-popup-content-wrapper, .leaflet-tooltip { border-radius: var(--r-md); }
.map-hint { border-radius: var(--r-md); border-color: var(--act); }
.legend { bottom: 82px; padding: 10px 12px; font-size: 12.5px; }
.legend h4 { font-size: 13px; }
.legend .sw { border-radius: 0; height: 12px; }
.src-marker { background: var(--ember); color: var(--ember-ink); box-shadow: 0 0 0 3px rgba(255, 255, 255, .85), 0 2px 6px rgba(0, 0, 0, .35); }
.rec-marker { border-radius: var(--r-sm); }

/* vremenska traka: usidrena uz donji rub karte, ne plutajuća kapsula */
.timeline { left: 0; right: 0; bottom: 0; height: 70px; border-radius: 0; border: 0; border-top: 1px solid var(--line); box-shadow: none; padding: 6px 12px 6px 10px; }
.leaflet-bottom.leaflet-left { bottom: 74px; }
.leaflet-bottom.leaflet-right { bottom: 70px; }
.play { width: 38px; height: 38px; border-radius: var(--r-sm); background: var(--act); color: var(--act-ink); }
.tl-now b { font-size: 21px; font-weight: 700; }
.tl-strip rect.cur { fill: var(--act-soft); stroke: var(--act); }
.tl-strip .emis { fill: var(--ember); opacity: .5; }

/* ---- rezultati: rečenica pa brojke u popisu, bez pločica ---- */
.analysis { width: 372px; padding: 14px 18px 32px; }
.an-sentence { font-size: 15.5px; line-height: 1.5; }
.kpis { gap: 0; background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.kpis div { background: transparent; padding: 8px 0 9px; border-bottom: 1px solid var(--line-soft); }
.kpis div:nth-child(odd) { padding-right: 12px; }
.kpis dt { font-size: 12px; }
.kpis dd { font-size: 18px; font-weight: 700; }
.an-tabs button { font-size: 13px; padding: 7px 9px; }
.an-tabs button.active { color: var(--text); border-bottom-color: var(--act); font-weight: 600; }
.an-tabs button.hl { color: var(--act); }
.seg.prods button { font-size: 12.5px; }
.zcard, .loc-card { border-radius: 0; background: transparent; border: 0; border-left: 3px solid var(--bad); border-bottom: 1px solid var(--line-soft); }
.zcard.e { border-left-color: var(--warn); }
.loc-card { border-left-color: var(--line); }
.loc-card.act { border-left-color: var(--act); background: var(--act-soft); }
.export a { border-radius: var(--r-sm); }
.export a:hover { border-color: var(--act); }
.export a i { color: var(--dim); }

/* ---- dijalozi, popisi, obavijesti ---- */
.dlg { border-radius: var(--r-lg); }
.dlg header { padding: 14px 18px; }
.dlg header h2 { font-size: 17px; }
.case-card, .live-item { border-radius: 0; border: 0; border-bottom: 1px solid var(--line-soft); background: transparent; }
.case-card:hover, .live-item:hover { background: var(--raised); }
.case-card.on { box-shadow: inset 3px 0 0 var(--act); background: var(--act-soft); }
.live-item.active { box-shadow: inset 3px 0 0 var(--act); background: var(--act-soft); }
.cases-list, .live-list { gap: 0; padding: 0; }
.case-card .cc-tags span { border-radius: var(--r-sm); }
.case-detail h4, .sat-panel h4 { text-transform: none; letter-spacing: 0; color: var(--text); font-size: 13.5px; }
em.live { background: var(--ember); color: var(--ember-ink); border-radius: var(--r-sm); }
.arch .a button { border-radius: var(--r-sm); }
.sat-item { border-radius: var(--r-sm); }
.toasts { top: 64px; bottom: auto; right: 16px; left: auto; transform: none; align-items: flex-end; }
.toast { border-radius: var(--r-md); font-size: 13px; max-width: 420px; border-left-color: var(--act); }

/* ---- izvedba: izoliraj često osvježavane dijelove (manje prelamanja cijele stranice) ---- */
.flow, .analysis { contain: layout style; }
.timeline, .legend, .layer-menu, .sat-panel { contain: layout paint style; }
.panels, .analysis { overscroll-behavior: contain; }

@media (max-width: 1100px) {
  .workspace { grid-template-columns: 330px 1fr; }
  .incident-head { border-left: 0; padding-left: 0; }
}
@media (max-width: 760px) {
  .topbar { gap: 8px; padding: 0 8px; }
  .incident-name { font-size: 15px; }
  .status-pill .txt { display: none; }
  .top-actions { gap: 0; }
  .icon-btn { padding: 0 8px; }
  .legend { bottom: 76px; right: 8px; max-width: calc(100% - 16px); }
  .legend .note { display: none; }
  .timeline { height: auto; }
}
/* obavijesti: lijevo dolje nad kartom, ne preko panela rezultata ni vremenske trake */
.toasts { top: auto; right: auto; bottom: 84px; left: 400px; align-items: flex-start; }
@media (max-width: 1100px) { .toasts { left: 346px; } }
@media (max-width: 760px) { .toasts { left: 8px; right: 8px; bottom: 12px; } }
/* produkti rezultata: popis izbora, ne mozaik gumba */
.seg.prods { display: flex; flex-direction: column; border: 0; border-top: 1px solid var(--line-soft); border-radius: 0; width: 100%; }
.seg.prods button { text-align: left; border: 0; border-bottom: 1px solid var(--line-soft); padding: 6px 8px; display: flex; gap: 8px; align-items: center; }
.seg.prods button i { width: 14px; color: var(--faint); }
.seg.prods button.active { box-shadow: inset 3px 0 0 var(--act); }
.seg.prods button.active i { color: var(--act); }
/* brojke: proporcionalne u tekstu, tablične samo gdje se poravnavaju */
body { font-variant-numeric: normal; }
.kpis, table, .legend, .timeline, .tl-now, .field-ticks, .manual-table, .console, .run-stage, .run-meta { font-variant-numeric: tabular-nums; }
/* mobitel: jedan stupac (pravilo mora doći nakon novog rasporeda iznad) */
@media (max-width: 760px) {
  .workspace { grid-template-columns: 1fr; grid-template-rows: 58vh auto; height: auto; }
  .analysis { width: 100%; position: relative; top: auto; }
  .brand-text, .top-actions span { display: none; }
  .incident-head { border-left: 0; padding-left: 0; }
}

/* vlastiti ansambl iz arhive */
.arch-pick { width: auto; margin-right: 6px; vertical-align: -2px; accent-color: var(--act); }
.arch-ens { padding: 12px 16px 16px; border-top: 1px solid var(--line); background: var(--act-soft); }
.arch-ens h3 { margin-top: 0; }
.arch-ens-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.arch-w { flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; color: var(--text); margin: 0; }
.arch-w input { width: 80px; }
.mem-w { width: 58px !important; padding: 2px 5px !important; margin-left: 6px; }
/* meteo kutak */
.met-sum { font-size: 14px; line-height: 1.55; margin: 4px 0 6px; }
.met-barbs { height: 36px; }
.stab-row { display: flex; gap: 1px; margin: 2px 0 4px; }
.stab-row span { flex: 1; text-align: center; font-size: 11px; font-weight: 700; color: #102030; padding: 2px 0; min-width: 0; }
.rose-wrap { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.rose-leg { display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.rose-leg i { display: inline-block; width: 12px; height: 10px; margin-right: 6px; vertical-align: -1px; }
#metBox .chart { margin: 4px 0; }

/* Uživo: postaje u domeni */
.live-now { border-bottom: 1px solid var(--line-soft); padding: 0 0 10px; margin-bottom: 10px; }
.live-now-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.live-now-h h3 { margin: 0; }
.live-now-h .field-row { margin: 0; align-items: center; }
label.inline { display: inline-flex; align-items: center; gap: 6px; }
.now-tab td { vertical-align: middle; white-space: nowrap; }
.now-tab td.nowc b { display: inline-block; min-width: 38px; text-align: right; margin-right: 6px; font-variant-numeric: tabular-nums; }
.now-tab td.nowc.over b { color: var(--warn); }
.now-tab td.nowc.alert b { color: var(--bad); }
.now-tab td.nowc.stale { opacity: .55; }
.spark { vertical-align: middle; }
.spark polyline { fill: none; stroke: var(--isobar); stroke-width: 1.4; }
.now-tab td.over .spark polyline { stroke: var(--warn); }
.now-tab td.alert .spark polyline { stroke: var(--bad); }
.spark .sp-lim { stroke: var(--faint); stroke-dasharray: 2 2; stroke-width: 1; }
.now-alert { color: var(--bad); font-weight: 600; margin: 6px 0; }
.live-now { padding: 12px 18px 10px; margin: 0; }
.live-now-h .field-row { display: flex; flex-direction: row; gap: 8px; }
.live-now-h label.inline { flex-direction: row; margin: 0; white-space: nowrap; }
.live-now-h label.inline select { width: auto; margin: 0; }
.live-now-h .btn { width: auto; }

/* Pozadinski run */
.bg-secs .chip input { display: none; }
.bg-secs .chips { margin: 4px 0 8px; }
.bg-emis table.mini { margin: 4px 0 8px; }
.inrow { display: flex; gap: 6px; align-items: center; }
.inrow input { flex: 1; min-width: 0; }
.inrow .btn { width: auto; flex: none; }
#bgGo { margin-top: 8px; }
.bg-secs label.chip { display: inline-flex; width: auto; margin: 0; padding: 4px 10px; font-weight: 400; }

/* Receptorski model */
.src-wrap { display: grid; grid-template-columns: 300px 1fr; gap: 0; min-height: 60vh; }
.src-form { padding: 12px 16px; border-right: 1px solid var(--line-soft); overflow: auto; }
.src-form .chip input { display: none; }
.src-form label.chip { display: inline-flex; width: auto; margin: 0; padding: 4px 10px; font-weight: 400; }
.src-form #srcGo { width: 100%; margin: 8px 0; }
.src-res { padding: 12px 18px; overflow: auto; max-height: 78vh; }
.src-res h3 { margin: 16px 0 4px; }
.src-facs { display: grid; gap: 4px; margin: 8px 0; }
.src-fac { display: grid; grid-template-columns: 12px 1fr auto auto; gap: 8px; align-items: center; }
.src-fac i { width: 12px; height: 12px; border-radius: 2px; display: block; }
.src-fac input { margin: 0; padding: 3px 6px; }
.src-row { display: grid; grid-template-columns: 220px 1fr; gap: 8px; }
.src-tab td { white-space: nowrap; font-variant-numeric: tabular-nums; }
.polar-grid { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.polar-grid figure { margin: 0; }
.polar-grid figcaption { font-size: 12px; color: var(--dim); display: flex; gap: 6px; align-items: center; max-width: 190px; }
.polar-grid figcaption i { width: 10px; height: 10px; border-radius: 2px; flex: none; }
@media (max-width: 760px) {
  .src-wrap { grid-template-columns: 1fr; }
  .src-form { border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .src-row { grid-template-columns: 1fr; }
}

/* =====================================================================================================
   Način rada: Incident | Studija kvalitete zraka
   Studija dobiva vlastiti akcent (verdigris – industrijska patina) umjesto plave civilne zaštite;
   narančasta ostaje rezervirana za požar.
   ===================================================================================================== */
body.mode-study { --act: #4CC9B0; --act-ink: #052019; --act-soft: rgba(76, 201, 176, .14); }
[data-theme="light"] body.mode-study { --act: #0B7A68; --act-ink: #FFFFFF; --act-soft: rgba(11, 122, 104, .09); }
body.mode-study .inc-only, body:not(.mode-study) .study-only { display: none !important; }

.app-mode { position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 3px; flex: none; isolation: isolate; }
.app-mode button { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0;
  background: none; color: var(--dim); font: inherit; font-size: 12.5px; font-weight: 600; padding: 6px 13px; cursor: pointer;
  border-radius: var(--r-md); transition: color .18s ease; }
.app-mode button i { font-size: 13px; }
.app-mode button.active { color: var(--act-ink); }
.app-mode button[data-mode="incident"].active { color: var(--ember-ink); }
.app-mode .am-glide { position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: var(--r-md);
  background: var(--ember); transition: transform .28s cubic-bezier(.3, .8, .3, 1), background-color .28s ease; }
.app-mode[data-mode="study"] .am-glide { transform: translateX(100%); background: var(--act); }
.app-mode button:focus-visible { outline: 2px solid var(--act); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .app-mode .am-glide { transition: none; } }
@media (max-width: 760px) { .app-mode button span { display: none; } .app-mode button { padding: 6px 10px; } }
body.mode-study .status-pill { display: none; }
body.mode-study .brand-mark .bm-src { fill: var(--act); }

/* studija – projekt */
.dur-seg { margin: 6px 0 2px; flex-wrap: wrap; }
.week { margin: 8px 0 4px; display: grid; gap: 2px; font-size: 10.5px; color: var(--dim); }
.wk-row, .wk-axis { display: grid; grid-template-columns: 28px repeat(24, 1fr); gap: 2px; align-items: center; }
.wk-row i { height: 11px; border-radius: 1px; background: var(--line-soft); }
.wk-row i.on { background: var(--act); }
.wk-axis b { font-weight: 400; color: var(--faint); }
.study-out { display: flex; gap: 12px; margin-top: 18px; padding: 12px 14px; border: 1px solid var(--line); border-left: 3px solid var(--act);
  border-radius: var(--r-md); background: var(--act-soft); font-size: 12.5px; line-height: 1.5; }
.study-out > i { color: var(--act); font-size: 18px; margin-top: 2px; }

/* studija – predlošci */
.presets { margin: 4px 0 16px; }
.presets > summary { cursor: pointer; font-weight: 600; padding: 8px 0; list-style: none; display: flex; align-items: center; gap: 8px; }
.presets > summary::-webkit-details-marker { display: none; }
.presets > summary i { color: var(--act); }
.presets > summary small { color: var(--dim); font-weight: 400; }
.presets h4 { margin: 10px 0 6px; font-size: 11.5px; color: var(--faint); font-weight: 600; }
.preset-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.preset { position: relative; display: grid; grid-template-columns: 30px 1fr; grid-template-rows: auto auto auto; column-gap: 9px; row-gap: 3px;
  text-align: left; border: 1px solid var(--line); background: var(--raised); color: var(--text); border-radius: var(--r-md);
  padding: 9px 10px 8px; cursor: pointer; font: inherit; transition: border-color .15s ease, background-color .15s ease, transform .15s ease; }
.preset:hover { border-color: var(--act); background: var(--act-soft); transform: translateY(-1px); }
.preset.on { border-color: var(--act); background: var(--act-soft); box-shadow: inset 0 0 0 1px var(--act); }
.preset .pi { grid-row: 1 / span 3; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%;
  background: var(--act-soft); color: var(--act); font-size: 14px; }
.preset b { font-size: 12.5px; line-height: 1.25; padding-right: 30px; }
.preset .pdesc { font-size: 11px; color: var(--dim); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.preset .ppols { display: flex; flex-wrap: wrap; gap: 3px; }
.preset .ppols em, .src .em-chips em { font-style: normal; font-size: 10px; padding: 1px 5px; border-radius: var(--r-sm); background: var(--bg);
  color: var(--dim); border: 1px solid var(--line-soft); white-space: nowrap; }
.preset .pn { position: absolute; top: 8px; right: 9px; font-size: 10px; color: var(--faint); }
.leaflet-container.placing, .leaflet-container.placing .leaflet-interactive { cursor: crosshair !important; }

/* studija – vrste izvora i kartice */
.tool-grid.kinds { grid-template-columns: repeat(5, 1fr); }
body.mode-study .tool-grid button i { color: var(--act); }
body.mode-study .tool-grid button.on { border-color: var(--act); background: var(--act-soft); }
.tool-grid.kinds small { font-size: 9.5px; line-height: 1.2; }
.src.study .src-head .ic { color: var(--act); }
.src.study .em-chips { display: flex; gap: 3px; flex-wrap: wrap; justify-content: flex-end; max-width: 46%; }
.src.study.open { border-color: var(--act); }
.stack-box { display: grid; grid-template-columns: 128px 1fr; gap: 10px; align-items: end; margin: 6px 0; }
.stack-box .field-row.two { margin: 0; }
.chimney { width: 100%; height: auto; color: var(--faint); overflow: visible; }
.chimney .gnd { stroke: var(--line); stroke-width: 1.5; }
.chimney .stk { fill: var(--raised); stroke: var(--dim); stroke-width: 1.2; }
.chimney .plm { fill: none; stroke: var(--act); stroke-width: 1.6; stroke-dasharray: 3 3; }
.chimney .plf { color: var(--act); }
.chimney .dim { stroke: var(--faint); stroke-width: 1; stroke-dasharray: 2 2; }
.chimney text { font-size: 9.5px; fill: var(--dim); }
.phys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 4px 0 10px; }
.phys > div { background: var(--bg); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 6px 8px; display: flex; flex-direction: column; }
.phys span { font-size: 10.5px; color: var(--faint); }
.phys b { font-size: 14px; font-variant-numeric: tabular-nums; }
.phys small { font-size: 10px; color: var(--dim); }
.em-head { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.em-head h4 { margin: 0; }
.em-head select { width: auto; margin-left: 6px; }
.em-tab { width: 100%; margin: 4px 0; }
.em-tab td { vertical-align: middle; }
.em-tab input { width: 100%; margin: 0; padding: 4px 6px; font-variant-numeric: tabular-nums; }
.add-pol { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.add-pol select { flex: 1; margin: 0; }
.src-marker.study { background: var(--act); color: var(--act-ink); }
.src-marker.study.stack { border-radius: var(--r-md); }

/* rezultati – sukladnost */
.suk-head { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: var(--r-md); border: 1px solid var(--line); margin-bottom: 10px; }
.suk-head > i { font-size: 20px; margin-top: 2px; }
.suk-head.ok > i { color: var(--ok); } .suk-head.bad > i { color: var(--bad); }
.suk-head.bad { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 8%, transparent); }
.suk-head small { display: block; color: var(--dim); margin-top: 3px; }
.suk-list { display: grid; gap: 8px; }
.suk { border: 1px solid var(--line); border-radius: var(--r-md); padding: 9px 10px; background: var(--raised); }
.suk-t { display: flex; align-items: center; gap: 8px; }
.suk-t span { color: var(--dim); font-size: 12px; flex: 1; }
.suk-v { display: flex; align-items: baseline; gap: 6px; margin: 4px 0; font-variant-numeric: tabular-nums; }
.suk-v b { font-size: 19px; }
.suk-v span { color: var(--dim); }
.suk-v em { margin-left: auto; font-style: normal; font-weight: 700; }
.suk.over .suk-v em { color: var(--bad); } .suk.warn .suk-v em { color: var(--warn); } .suk.ok .suk-v em { color: var(--ok); }
.suk-bar { position: relative; height: 6px; border-radius: 3px; background: var(--line-soft); overflow: visible; }
.suk-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--ok); }
.suk.warn .suk-bar i { background: var(--warn); } .suk.over .suk-bar i { background: var(--bad); }
.suk-bar b { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text); opacity: .6; }
.suk-meta { font-size: 11px; color: var(--dim); margin-top: 5px; line-height: 1.4; }
.max-pulse { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--bad); background: color-mix(in srgb, var(--bad) 30%, transparent);
  animation: maxp 1.6s ease-out infinite; }
@keyframes maxp { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--bad) 60%, transparent); } 100% { box-shadow: 0 0 0 16px transparent; } }
@media (prefers-reduced-motion: reduce) { .max-pulse { animation: none; } }

/* polje vjetra */
#windToggle.on { color: var(--act-ink); background: var(--act); border-color: var(--act); }
.wind-menu { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 8px; margin-top: 6px;
  width: 210px; display: grid; gap: 6px; }
.wind-menu .seg { margin: 0; }
.wind-menu .seg button { flex: 1; }
.wind-menu p { margin: 0; }
.wind-canvas { position: absolute; pointer-events: none; }

/* meteogram */
.dlg.xwide { width: min(1320px, 97vw); max-height: 94vh; }
#mgDlg header { gap: 14px; }
#mgDlg header h2 { flex: none; }
#mgDlg header h2 small { font-weight: 400; color: var(--dim); font-size: 12px; margin-left: 6px; }
#mgDlg header .seg { margin: 0 auto 0 0; }
.mg-body { padding: 14px 18px 18px; overflow: auto; max-height: calc(94vh - 60px); }
.mg-kpis { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr) 1.4fr; gap: 8px; margin-bottom: 12px; }
.kpi { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--raised); padding: 8px 11px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kpi span { font-size: 11px; color: var(--faint); }
.kpi b { font-size: 16px; font-variant-numeric: tabular-nums; }
.kpi small { font-size: 11px; color: var(--dim); }
.kpi.wind { flex-direction: row; align-items: center; gap: 10px; }
.kpi.wind canvas { width: 92px; height: 92px; flex: none; }
.kpi.wind > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stab-bar { display: flex; height: 20px; border-radius: var(--r-sm); overflow: hidden; margin: 4px 0 2px; }
.stab-bar i { display: grid; place-items: center; font-style: normal; font-size: 10.5px; font-weight: 700; color: #10202e; }
.mg-panels { display: grid; grid-template-columns: 1fr; gap: 2px; }
.mg-panels section { border-top: 1px solid var(--line-soft); padding-top: 6px; }
.mg-panels h4 { margin: 2px 0 0; font-size: 12.5px; }
.mg-panels h4 small { color: var(--dim); font-weight: 400; margin-left: 6px; }
.mg-barbs { height: 34px; margin-bottom: -6px; color: var(--isobar); }
.mg-barbs svg { display: block; stroke: var(--isobar); }
.mg-stab { display: flex; height: 16px; margin-top: -8px; border-radius: var(--r-sm); overflow: hidden; }
.mg-stab i { flex: 1; display: grid; place-items: center; font-size: 9.5px; font-style: normal; font-weight: 700; color: #10202e; }
.mg-prof { display: grid; grid-template-columns: minmax(320px, 0.9fr) 1.1fr; gap: 22px; }
.mg-hour { display: flex; align-items: center; gap: 8px; }
.mg-hour input { flex: 1; }
.mg-hour-lbl { font-size: 12.5px; margin: 6px 0; }
.mg-prof-svg { font-size: 10.5px; }
.mg-prof-svg text { fill: var(--dim); }
.mg-prof-svg .grid { stroke: var(--line-soft); stroke-dasharray: 2 3; }
.mg-prof-r h4 { margin: 4px 0 6px; font-size: 12.5px; }
.mg-prof-r h4 small { color: var(--dim); font-weight: 400; }
.mg-tab-tools { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; gap: 12px; }
.mg-table-wrap { max-height: calc(94vh - 170px); overflow: auto; border: 1px solid var(--line); border-radius: var(--r-md); }
.mg-table { border-collapse: separate; border-spacing: 0; width: 100%; font-variant-numeric: tabular-nums; font-size: 11.5px; }
.mg-table th { position: sticky; top: 0; background: var(--panel); z-index: 1; white-space: nowrap; }
.mg-table td, .mg-table th { padding: 4px 8px; border-bottom: 1px solid var(--line-soft); text-align: right; }
.mg-table td:first-child, .mg-table th:first-child { text-align: left; position: sticky; left: 0; background: var(--panel); }
.stab-chip { display: inline-block; min-width: 18px; text-align: center; border-radius: var(--r-sm); color: #10202e; font-weight: 700; }
.mg-input { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 10px; }
.mg-input .card { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--raised); padding: 10px 13px; }
.mg-input h4 { margin: 0 0 8px; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.mg-input h4 i { color: var(--act); }
.mg-input dl { display: grid; grid-template-columns: 130px 1fr; gap: 4px 10px; margin: 0; font-size: 12.5px; }
.mg-input dt { color: var(--faint); }
.mg-input dd { margin: 0; }
.mg-vars td { font-size: 12px; vertical-align: top; }
.mg-vars .ok { color: var(--ok); white-space: nowrap; } .mg-vars .wn { color: var(--warn); white-space: nowrap; }
.mg-files { display: flex; flex-wrap: wrap; gap: 6px; }
.met-btns { display: flex; gap: 8px; }
.met-btns .btn { flex: 1; }
.mg-open { width: 100%; margin: 6px 0 4px; }
@media (max-width: 900px) {
  .mg-kpis { grid-template-columns: 1fr 1fr; }
  .mg-prof { grid-template-columns: 1fr; }
  #mgDlg header { flex-wrap: wrap; }
  .preset-grid { grid-template-columns: 1fr; }
  .tool-grid.kinds { grid-template-columns: repeat(3, 1fr); }
}
.preset { width: 100%; min-width: 0; align-content: start; }
.preset b { padding-right: 22px; }
.preset .pn { font-size: 10px; }
.preset .pn i { font-size: 9px; }
.preset .ppols em { font-size: 9.5px; padding: 0 4px; }
.bg-empty { grid-column: 1 / -1; }
.dur-seg { display: flex; }
.dur-seg button { flex: 1 1 auto; padding-left: 6px; padding-right: 6px; white-space: nowrap; }
#stSched { display: grid; grid-template-columns: 1fr 1fr; }
.src.study .em-chips { display: flex; gap: 3px; flex-wrap: wrap; max-width: none; margin-top: 4px; justify-content: flex-start; }
.src.study .src-head { align-items: flex-start; }
.src.study .src-head .ic { margin-top: 3px; }
.stack-box { grid-template-columns: 84px 1fr; gap: 8px; }
.stack-box .field-row.two { gap: 6px 8px; }
.stack-box label { font-size: 11.5px; }
.phys > div { padding: 5px 7px; }
.phys b { font-size: 13px; }
.em-unit { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--dim); }
.em-unit select { margin: 0; padding: 3px 6px; width: auto; }
body.mode-study #modeSwitch [data-mode="arrival"], body.mode-study #modeSwitch [data-mode="clear"] { display: none; }
.mg-body { position: relative; }
.mg-panels section { padding-top: 8px; }
.mg-panels h4 { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.mg-leg { margin-left: auto; display: inline-flex; gap: 12px; font-weight: 400; font-size: 11px; color: var(--dim); align-items: center; }
.mg-leg i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; background: var(--c); margin-right: -6px; vertical-align: middle; }
.mg-leg i.dash { background: repeating-linear-gradient(90deg, var(--c) 0 4px, transparent 4px 7px); }
.mg-leg i.dot { width: 6px; height: 6px; border-radius: 50%; }
.mg-leg i.col, .mg-leg i.area { height: 9px; opacity: .6; }
.mg-svg { width: 100%; overflow: hidden; }
.mg-p { display: block; font-size: 10.5px; }
.mg-p text { fill: var(--dim); font-variant-numeric: tabular-nums; }
.mg-p text.unit { fill: var(--faint); font-size: 10px; }
.mg-p text.xt { fill: var(--faint); }
.mg-p text.stab { fill: #10202e; font-size: 9px; font-weight: 700; }
.mg-p .gl { stroke: var(--line-soft); stroke-dasharray: 2 3; }
.mg-p .night { fill: var(--faint); opacity: .08; }
.mg-p .mid { stroke: var(--line); stroke-width: 1; }
.mg-p .cur { stroke: var(--text); stroke-width: 1; opacity: .55; }
.mg-p .barb { stroke: var(--isobar); fill: none; stroke-width: 1.3; }
.mg-p .barb .pennant { fill: var(--isobar); }
.mg-p .hit { cursor: crosshair; }
.mg-tip { position: absolute; z-index: 5; pointer-events: none; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow); padding: 8px 10px; font-size: 11.5px; min-width: 210px; display: grid; gap: 2px; font-variant-numeric: tabular-nums; }
.mg-tip b { margin-bottom: 3px; }
.mg-tip div { display: flex; align-items: center; gap: 6px; }
.mg-tip div i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.mg-tip div span { margin-left: auto; padding-left: 12px; font-weight: 600; }
#mgDlg { height: 94vh; }
#mgDlg[open] { display: flex; flex-direction: column; }
#mgDlg .mg-body { flex: 1; max-height: none; }
.mg-files .btn { width: auto; flex: none; }
.met-btns { flex-wrap: wrap; }
.mode-badge { font-style: normal; font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: var(--r-sm); background: rgba(76, 201, 176, .16);
  color: #2E9C86; margin-right: 4px; white-space: nowrap; }
[data-theme="light"] .mode-badge { color: #0B7A68; background: rgba(11, 122, 104, .1); }

/* studija – što računati */
.calc-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 8px; }
.calc { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; border: 1px solid var(--line); background: var(--raised);
  color: var(--text); border-radius: var(--r-md); padding: 9px 9px 8px; cursor: pointer; font: inherit; transition: border-color .15s, background-color .15s; }
.calc i { color: var(--act); font-size: 15px; }
.calc b { font-size: 12.5px; }
.calc small { font-size: 10.5px; color: var(--dim); line-height: 1.3; }
.calc:hover { border-color: var(--act); }
.calc.on { border-color: var(--act); background: var(--act-soft); box-shadow: inset 0 0 0 1px var(--act); }
.calc-bg { margin: 4px 0 0; }
.calc-how { margin: 4px 0 12px; }
.calc-how i { color: var(--act); }
#studyCalc h3 { margin-top: 14px; }
@media (max-width: 420px) { .calc-opts { grid-template-columns: 1fr; } }
.calc-bg select { width: 100%; }

/* ---------- slučajevi studije, uvoz dimnjaka, vlastiti profil, statistike postaja */
em.study { font-style: normal; font-size: 10.5px; background: color-mix(in srgb, var(--act) 18%, transparent); color: var(--act); border: 1px solid color-mix(in srgb, var(--act) 45%, transparent);
  border-radius: 999px; padding: 1px 8px; white-space: nowrap; height: fit-content; margin-left: 6px; }
.case-card.is-study { border-left: 3px solid var(--act); }
details.imp { margin: 10px 0; border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; background: var(--panel2, transparent); }
details.imp > summary { cursor: pointer; font-weight: 600; display: flex; gap: 8px; align-items: center; }
details.imp > summary small { font-weight: 400; color: var(--dim); }
details.imp textarea { width: 100%; font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; resize: vertical; margin: 6px 0; box-sizing: border-box; }
details.imp code { font-size: 11px; }
.imp-act { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 6px 0; }
.imp-warn { margin: 4px 0 8px; padding-left: 18px; font-size: 12px; color: var(--warn, #E8A33D); }
.imp-err { color: var(--bad); font-size: 12.5px; }
.imp-tab td, .imp-tab th { white-space: nowrap; }
#impAdd { margin-top: 8px; }
.custom-prof { margin: 10px 0; border: 1px solid color-mix(in srgb, var(--act) 40%, var(--line)); border-radius: var(--r); padding: 8px 10px; }
.custom-prof .cp-head { display: flex; gap: 8px; align-items: center; }
.custom-prof .cp-head .link { margin-left: auto; }
.custom-prof svg { width: 100%; height: 46px; display: block; margin: 6px 0 2px; }
.custom-prof svg rect { fill: var(--act); opacity: .8; }
table.sst tr.mod td:first-child { font-weight: 600; color: var(--act); }
table.sst tr.ref td:first-child { color: var(--dim); }
table.sst td.ok { color: var(--ok, #50CCAA); }
table.sst td.bad { color: var(--bad); }
.imp-file { display: block; font-size: 12px; color: var(--dim); margin: 4px 0; }
.imp-file input { display: block; margin-top: 4px; max-width: 100%; font-size: 12px; }

/* ---------- usporedba s mjerenjima (Validacija) */
.vc-entry { margin: 2px 0 12px; }
.vc-open { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 10px 12px; }
.vc-open small { font-weight: 400; opacity: .8; font-size: 11.5px; }
.vc-mini { font-size: 12px; color: var(--dim); margin-top: 6px; }
#vcDlg { height: 94vh; display: flex; flex-direction: column; }
#vcDlg[open] { display: flex; }
#vcDlg header h2 small { font-weight: 400; color: var(--dim); font-size: 12px; margin-left: 6px; }
.vc-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 330px 1fr; }
.vc-set { overflow-y: auto; padding: 12px 16px 24px; border-right: 1px solid var(--line); scrollbar-width: thin; }
.vc-set h4 { margin: 16px 0 6px; font-size: 12.5px; display: flex; gap: 7px; align-items: center; }
.vc-set h4:first-child { margin-top: 2px; }
.vc-set h4 small { font-weight: 400; color: var(--dim); }
.vc-set label { font-size: 12px; color: var(--dim); }
.vc-sts { display: grid; gap: 4px; }
.vc-st { display: flex; gap: 8px; align-items: flex-start; padding: 6px 8px; border: 1px solid var(--line-soft); border-radius: var(--r-md); cursor: pointer; color: var(--text) !important; }
.vc-st span { display: flex; flex-direction: column; }
.vc-st small { color: var(--dim); font-size: 11px; }
.vc-st.nocoord { border-color: var(--warn); }
.vc-up { margin: 8px 0 0; font-size: 12px; }
.vc-up summary { cursor: pointer; color: var(--act); }
.vc-up input[type=file] { margin: 6px 0; max-width: 100%; }
.vc-pols { flex-wrap: wrap; }
.vc-runs { display: grid; gap: 6px; }
.vc-run { border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 6px 8px; }
.vc-run.cur { border-color: color-mix(in srgb, var(--act) 50%, var(--line)); }
.vr-h { display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; }
.vr-h span { color: var(--dim); font-size: 11px; }
.vr-p { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.vr-p .chip { font-size: 11px; padding: 2px 8px; display: inline-flex; gap: 5px; align-items: center; }
i.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; }
i.dot.ring { border: 2px solid var(--dim); background: transparent; }
.vc-go { width: 100%; margin-top: 12px; }
.vc-help { margin-top: 6px; }
.vc-res { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.vc-tabs { margin: 10px 16px 0; flex-wrap: wrap; }
.vc-out { flex: 1; overflow: auto; padding: 10px 16px 24px; position: relative; }
.vc-empty { margin-top: 40px; text-align: center; }
.vc-meta { font-size: 11.5px; color: var(--dim); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.vc-meta .link { margin-left: auto; }
.vc-meta .wn { color: var(--warn); cursor: help; }
.vc-best { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: var(--r-md); margin-bottom: 10px;
  background: color-mix(in srgb, var(--ok) 12%, transparent); border: 1px solid color-mix(in srgb, var(--ok) 45%, transparent); }
.vc-best > i { color: var(--ok); font-size: 20px; }
.vc-best small { display: block; color: var(--dim); margin-top: 2px; }
.vc-tw { overflow-x: auto; }
table.vc-rank { width: 100%; font-variant-numeric: tabular-nums; }
table.vc-rank th, table.vc-rank td { white-space: nowrap; text-align: right; padding: 4px 6px; }
table.vc-rank td.ml, table.vc-rank th:nth-child(2) { text-align: left; }
table.vc-rank td.ml { display: flex; gap: 6px; align-items: center; }
table.vc-rank td.ok { color: var(--ok); }
table.vc-rank td.bad { color: var(--bad); }
table.vc-rank tr.best td { background: color-mix(in srgb, var(--ok) 8%, transparent); font-weight: 600; }
table.vc-rank tr.ref td { color: var(--dim); font-style: italic; }
.rk { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--raised); font-size: 11px; font-weight: 700; }
tr.best .rk { background: var(--ok); color: var(--panel); }
.vc-out h4 { margin: 14px 0 6px; }
.vc-stsel { margin-bottom: 8px; flex-wrap: wrap; }
.vc-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11.5px; color: var(--dim); margin-bottom: 6px; }
.vc-legend span { display: inline-flex; gap: 6px; align-items: center; }
.vc-legend i, .vc-tip i { display: inline-block; width: 12px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 4px; }
.vc-chart { position: relative; }
.vc-chart.sm { margin-bottom: 8px; }
.vc-svg text { font-size: 10.5px; fill: var(--dim); }
.vc-svg text.u { fill: var(--faint); font-size: 10.5px; }
.vc-svg .g { stroke: var(--line-soft); stroke-width: 1; }
.vc-svg .g.v { stroke-dasharray: 2 4; }
.vc-svg .one { stroke: var(--dim); stroke-width: 1.2; fill: none; }
.vc-svg .two { stroke: var(--dim); stroke-width: 1; stroke-dasharray: 5 4; fill: none; }
.vc-svg .cur { stroke: var(--faint); stroke-width: 1; }
.vc-tip { position: absolute; background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-md); padding: 6px 9px; font-size: 11.5px;
  box-shadow: var(--shadow); pointer-events: none; min-width: 170px; z-index: 2; }
#manStWrap { display: inline-flex; gap: 4px; align-items: center; }
#manStWrap select { max-width: 120px; }
@media (max-width: 900px) {
  .vc-body { grid-template-columns: 1fr; overflow-y: auto; }
  .vc-set { border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  .vc-out { overflow: visible; }
}
.vc-dt { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.vc-dt input { width: 100%; min-width: 0; font-size: 11.5px; padding-left: 4px; padding-right: 2px; }
table.vc-rank th.ml { text-align: left; }
.hf-box svg { width: 100%; height: 34px; display: block; margin: 2px 0 6px; }
.hf-box svg rect { fill: var(--act); opacity: .75; }

/* ---------- statički podaci (teren, pokrov, z0) */
.st-menu { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 8px 10px; margin-top: 6px;
  width: 300px; max-height: 70vh; overflow-y: auto; font-size: 12px; }
.st-menu .seg { margin: 0 0 6px; flex-wrap: wrap; }
.st-menu .seg button { flex: 1; font-size: 11px; padding: 4px 6px; }
.st-op { display: flex; gap: 8px; align-items: center; font-size: 11px; color: var(--dim); }
.st-op input { flex: 1; }
.st-ramp { height: 10px; border-radius: 3px; margin-top: 6px; }
.st-rl { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--dim); }
.st-cls { display: grid; gap: 2px; margin-top: 6px; }
.st-cls span { display: flex; gap: 6px; align-items: center; font-size: 11px; }
.st-cls span b { margin-left: auto; font-weight: 500; color: var(--dim); }
.st-cls i { width: 12px; height: 12px; border-radius: 2px; flex: none; border: 1px solid rgba(0,0,0,.2); }
#stInfo p { margin: 5px 0; }
.st-site { display: flex; gap: 8px; align-items: center; margin: 6px 0; padding: 6px; border: 1px solid var(--line-soft); border-radius: var(--r-md); }
.st-rose { width: 96px; height: 96px; flex: none; }
.st-rose circle { fill: none; stroke: var(--line); stroke-width: .6; }
.st-rose path { fill: var(--act); fill-opacity: .7; stroke: var(--panel); stroke-width: .5; }
.st-rose text { font-size: 8px; fill: var(--dim); text-anchor: middle; }
.st-overlay { image-rendering: pixelated; }
#stToggle.on { color: var(--act-ink); background: var(--act); border-color: var(--act); }

/* skočni prozor izvora */
.src-pop { font-size: 12.5px; display: grid; gap: 4px; }
.src-pop .row { display: flex; gap: 6px; margin-top: 6px; }
.src-pop .btn { padding: 4px 10px; font-size: 12px; }
.src-pop .btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.src-pop .btn.danger.armed { background: var(--bad); color: #fff; }

/* =================================================================== UPRAVITELJ SIMULACIJA
   Radni list „dispečera“: popis kao tablica bez kartica (linije i razmak), stanje je jedina obojena stvar u retku.
   Plava = akcija/odabir; narančasta samo za izvor i aktivan incident; stanja: radi (plava traka), pauza (žuta),
   gotovo (zelena), greška (crvena), čeka (sivo). */
.qm-open { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: var(--r-lg); flex: none;
  border: 1px solid var(--line); background: var(--bg); color: var(--dim); font-weight: 600; font-size: 12.5px; cursor: pointer; position: relative; }
.qm-open:hover { color: var(--text); border-color: var(--dim); }
.qm-open.on { color: var(--act-ink); background: var(--act); border-color: var(--act); }
.qm-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--raised); border: 1px solid var(--line);
  color: var(--text); font-size: 10.5px; display: inline-grid; place-items: center; font-weight: 700; }
.qm-badge.live { background: var(--act); color: var(--act-ink); border-color: var(--act); animation: qmPulse 2s infinite; }
.qm-open.on .qm-badge { background: var(--act-ink); color: var(--act); }
@keyframes qmPulse { 50% { box-shadow: 0 0 0 4px var(--act-soft); } }
@media (max-width: 1100px) { .qm-open span { display: none; } }

.qm { position: fixed; top: 56px; left: 0; right: 0; bottom: 0; z-index: 1100; background: var(--bg); display: flex; flex-direction: column; }
.qm-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 16px; border-bottom: 1px solid var(--line);
  background: var(--panel); flex-wrap: wrap; }
.qm-title { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.qm-title h2 { margin: 0; font-size: 17px; }
.qm-title .seg { margin: 0; }
.qm-counts { display: flex; gap: 6px; flex-wrap: wrap; }
.qc { font-size: 11.5px; color: var(--dim); padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line-soft); }
.qc b { color: var(--text); }
.qc-running { border-color: var(--act); } .qc-running b { color: var(--act); }
.qc-paused b { color: var(--warn); } .qc-done b { color: var(--ok); } .qc-error b { color: var(--bad); }
.qm-ctl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qm-flow { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: var(--r-sm); cursor: pointer;
  border: 1px solid var(--ok); color: var(--ok); background: transparent; font-weight: 600; font-size: 12.5px; }
.qm-flow.off { border-color: var(--warn); color: var(--warn); }
.qm-par { flex-direction: row; align-items: center; gap: 6px; margin: 0; color: var(--dim); }
.qm-par select { width: 58px; padding: 5px 6px; }
.qm-cpu { max-width: 210px; line-height: 1.25; }
.qm-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }

.qm-main { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 440px; }
.qm-left { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.qm-filters { display: flex; gap: 10px; align-items: center; padding: 10px 16px 8px; flex-wrap: wrap; }
.qm-filters .seg { margin: 0; }
.qm-filters input[type="search"] { width: 240px; padding: 5px 9px; }
.qm-bulk { display: flex; align-items: center; gap: 6px; padding: 7px 16px; background: var(--act-soft); border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.qm-bulk .n { margin-right: 6px; font-size: 12.5px; }
.qm-bulk button { border: 1px solid var(--line); background: var(--raised); color: var(--text); border-radius: var(--r-sm); padding: 4px 9px;
  font-size: 12px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.qm-bulk button:hover { border-color: var(--act); }
.qm-bulk button.go { border-color: var(--act); color: var(--act); }
.qm-bulk button.del { color: var(--bad); }
.qm-bulk button.clr { margin-left: auto; border: 0; background: none; color: var(--dim); }
.qm-bulk .sep { width: 1px; height: 18px; background: var(--line); margin: 0 3px; }

.qm-table-wrap { flex: 1; min-height: 0; overflow: auto; padding: 0 8px 20px; scrollbar-width: thin; }
.qm-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.qm-table thead th { position: sticky; top: 0; background: var(--bg); z-index: 1; text-align: left; font-weight: 400; color: var(--dim);
  font-size: 11.5px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.qm-table td { padding: 8px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.qm-table tbody tr { cursor: pointer; }
.qm-table tbody tr:hover td { background: var(--panel); }
.qm-table tbody tr.cur td { background: var(--act-soft); }
.qm-table tbody tr.cur td:first-child { box-shadow: inset 3px 0 0 var(--act); }
.qm-table tr.dragging { opacity: .4; }
.qm-table tr.drop-a td { box-shadow: inset 0 2px 0 var(--act); }
.qm-table tr.drop-b td { box-shadow: inset 0 -2px 0 var(--act); }
.qm-table .c-sel { width: 28px; }
.qm-table .c-ord { width: 64px; color: var(--faint); white-space: nowrap; }
.qm-table .c-ord .grip { cursor: grab; margin-right: 6px; color: var(--faint); }
.qm-table .c-ord .ud { display: inline-flex; flex-direction: column; vertical-align: middle; margin-left: 4px; opacity: 0; }
.qm-table tr:hover .c-ord .ud { opacity: 1; }
.qm-table .c-ord .ud button { border: 0; background: none; color: var(--dim); cursor: pointer; padding: 0 2px; font-size: 9px; line-height: 1.1; }
.qm-table .c-ord .ud button:hover { color: var(--act); }
.qm-table .c-name .nm { display: flex; align-items: center; gap: 7px; font-weight: 600; }
.qm-table .c-name .fine { display: block; margin-top: 2px; font-size: 11.5px; }
.qm-table .c-eng { width: 92px; color: var(--dim); white-space: nowrap; }
.qm-table .c-st { width: 230px; }
.qm-table .c-res { width: 170px; font-size: 12px; }
.qm-table .c-act { width: 112px; text-align: right; white-space: nowrap; }
.qm-table .c-act button { border: 1px solid transparent; background: none; color: var(--dim); width: 28px; height: 26px; border-radius: var(--r-sm);
  cursor: pointer; }
.qm-table .c-act button:hover { border-color: var(--line); background: var(--raised); color: var(--text); }
.qm-table .c-act button.go { color: var(--act); }
.qm-table .c-act button.del:hover { color: var(--bad); }
.qm-table tr.st-held .c-name .nm, .qm-table tr.st-cancelled .c-name .nm { color: var(--dim); }

.md { width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 10px; font-style: normal; flex: none;
  color: var(--ember); background: var(--ember-soft); }
.md-study { color: var(--act); background: var(--act-soft); }
.qd-meta .md { width: auto; height: auto; border-radius: 999px; padding: 2px 8px; gap: 5px; display: inline-flex; font-size: 11.5px; }

.qs { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 12px; color: var(--dim); }
.qs b { font-weight: 700; color: var(--text); margin-left: 2px; }
.qs-running, .qs-stopping { color: var(--act); }
.qs-paused { color: var(--warn); }
.qs-done { color: var(--ok); }
.qs-error, .qs-interrupted { color: var(--bad); }
.qs-held, .qs-cancelled { color: var(--faint); }
.qsub { display: block; font-size: 11px; color: var(--dim); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.qt { display: block; font-size: 11px; color: var(--faint); }
.qbar { display: block; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; margin-top: 5px; max-width: 210px; }
.qbar i { display: block; height: 100%; background: var(--act); transition: width .6s; }
.qbar.running i { background-image: linear-gradient(90deg, transparent 0 40%, rgba(255, 255, 255, .25) 50%, transparent 60% 100%);
  background-size: 200% 100%; animation: qmFlow 1.6s linear infinite; }
.qbar.paused i { background: var(--warn); }
.qbar.stopping i { background: var(--bad); }
.qbar.big { height: 6px; max-width: none; }
@keyframes qmFlow { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .qbar.running i, .qm-badge.live { animation: none; } }

.qm-empty { text-align: center; color: var(--dim); padding: 50px 20px; max-width: 520px; margin: 0 auto; }
.qm-empty > i { font-size: 30px; color: var(--faint); }
.qm-empty .btn { width: auto; margin-top: 10px; }

/* detalj */
.qm-detail { border-left: 1px solid var(--line); background: var(--panel); overflow-y: auto; padding: 14px 16px 30px; min-height: 0; scrollbar-width: thin; }
.qm-none { color: var(--dim); text-align: center; padding: 50px 14px; }
.qm-none > i { font-size: 28px; color: var(--faint); }
.qd-name { font-size: 16px; font-weight: 600; background: transparent; border-color: transparent; padding: 4px 6px; margin-left: -6px; width: calc(100% + 6px); }
.qd-name:not([readonly]):hover { border-color: var(--line); }
.qd-name[readonly] { cursor: default; }
.qd-meta { display: flex; align-items: center; gap: 10px; color: var(--dim); font-size: 12px; margin: 4px 0 10px; flex-wrap: wrap; }
.qd-prog { margin-bottom: 10px; }
.qd-pl { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; margin-top: 5px; }
.qd-err { margin-top: 6px; color: var(--bad); font-size: 12px; border-left: 2px solid var(--bad); padding-left: 8px; }
.qd-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.qd-acts .btn { width: auto; margin: 0; padding: 6px 10px; font-size: 12px; }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.qd-tabs { width: 100%; display: flex; }
.qd-tabs button { flex: 1; }
.qd-log { height: calc(100vh - 360px); min-height: 220px; }
.qd-kv td:first-child { color: var(--dim); width: 38%; }
.qd-src { list-style: none; padding: 0; margin: 4px 0 12px; display: grid; gap: 3px; font-size: 12px; max-height: 220px; overflow: auto; }
.qd-sbtn .btn { width: auto; margin: 0; }
.qd-hist { list-style: none; padding: 0; display: grid; gap: 5px; font-size: 12px; }
.qd-hist li { display: flex; justify-content: space-between; gap: 8px; }
.qd-hist .link { color: var(--act); }
.qd-wait { text-align: center; color: var(--dim); padding: 40px 10px; }
.qd-wait i { font-size: 24px; color: var(--faint); }
.qd-pols { margin: 0 0 8px; }
.qd-map { height: 290px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--map-bg); }
.qd-time { display: flex; align-items: center; gap: 8px; margin: 8px 0 2px; }
.qd-time .mini { height: 28px; }
.qd-time input { flex: 1; }
.qd-hl { font-size: 11.5px; color: var(--dim); min-width: 120px; text-align: right; }
.qd-ramp { height: 8px; border-radius: 2px; margin-top: 6px; border: 1px solid var(--line-soft); }
.qd-rl { display: flex; justify-content: space-between; font-size: 11px; color: var(--dim); margin-top: 2px; }
.qd-sum { font-size: 12.5px; margin: 6px 0; }
.qd-sum p { margin: 4px 0; }
.qd-tools .btn { margin-bottom: 6px; }
.qd-tgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 6px; }
.qd-tgrid .btn { margin: 0; padding: 6px 6px; font-size: 11.5px; text-decoration: none; }

/* jedan pored drugoga */
.qm-grid { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 0 16px 12px; gap: 8px; }
.qg-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 4px; }
.qg-bar select { width: auto; }
.qg-bar input[type="range"] { width: 200px; }
.qg-bar .switch { margin: 0; }
.qg-bar .grow { flex: 1; }
.qg-bar .btn { width: auto; margin: 0; padding: 5px 10px; }
.qg-cells { flex: 1; min-height: 0; display: grid; gap: 8px; grid-template-columns: 1fr 1fr; grid-auto-rows: minmax(0, 1fr); }
.qg-cells.n3, .qg-cells.n5, .qg-cells.n6 { grid-template-columns: 1fr 1fr 1fr; }
.qg-cell { display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.qg-h { display: flex; gap: 8px; align-items: baseline; padding: 5px 8px; font-size: 12px; background: var(--panel); border-bottom: 1px solid var(--line-soft); }
.qg-h b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qg-h span { color: var(--dim); white-space: nowrap; }
.qg-h .qg-max { margin-left: auto; color: var(--text); }
.qg-h .link { color: var(--act); font-size: 11.5px; }
.qg-map { flex: 1; min-height: 160px; background: var(--map-bg); }

/* natrag u Upravitelj (s karte) */
.qm-back { position: absolute; top: 12px; left: 56px; z-index: 900; display: inline-flex; gap: 7px; align-items: center; padding: 6px 12px;
  border-radius: var(--r-md); border: 1px solid var(--act); background: var(--panel); color: var(--act); font-weight: 600; font-size: 12.5px;
  box-shadow: var(--shadow); cursor: pointer; }
body.qm-on .toasts { z-index: 3000; }

/* korak 6: dodavanje u red */
.q-row { display: grid; grid-template-columns: 1fr 1fr 40px; gap: 6px; margin-top: -2px; }
.q-row .btn { margin-bottom: 10px; padding: 7px 8px; font-size: 12.5px; }
.q-edit { display: grid; grid-template-columns: 18px 1fr; gap: 8px; padding: 10px 12px; margin-bottom: 10px; border: 1px solid var(--act);
  border-radius: var(--r-md); background: var(--act-soft); font-size: 12.5px; }
.q-edit > i { color: var(--act); margin-top: 3px; }
.q-edit-b { grid-column: 1 / -1; display: flex; gap: 6px; }
.q-edit-b .btn { width: auto; margin: 0; padding: 5px 10px; font-size: 12px; }

@media (max-width: 1150px) { .qm-main { grid-template-columns: minmax(0, 1fr) 360px; } .qm-table .c-res { display: none; } }
@media (max-width: 820px) { .qm-main { grid-template-columns: 1fr; } .qm-detail { border-left: 0; border-top: 1px solid var(--line); max-height: 50vh; } }
/* izbornik slojeva uvijek iznad plutajućih ploča (satelit, statički podaci) – inače se sloj ne može isključiti */
.layer-box { z-index: 1010; }
@media (max-width: 1500px) { .brand-sub { display: none; } .brand { min-width: 0; } }
@media (max-width: 1350px) { .qm-open span { display: none; } }
/* odabrani model: kartica ne mijenja visinu (inače se popis „razleti“); puni opis je ispod popisa */
.engine.on .fam { display: -webkit-box; -webkit-line-clamp: 2; }
.eng-desc { margin: 8px 0 4px; padding-left: 10px; border-left: 2px solid var(--act); }
.eng-desc:empty { display: none; }
.field-row > * { min-width: 0; }

/* Što-ako: izbornik varijanti i tablica */
.wi-varbar { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; margin: 6px 0 2px; }
.wi-varbar .wi-vsel { flex: 1; min-width: 200px; margin: 0; flex-direction: column; gap: 3px; }
.wi-varbar .wi-vsel span { font-size: 11.5px; }
.wi-varbar .wi-vsel select { padding: 5px 7px; font-size: 12px; }
.wi-varbar .seg { margin: 0; }
.wi-varbar .link { color: var(--act); }
table.wi-vars .wi-grp td { font-weight: 600; color: var(--text); padding-top: 9px; border-bottom-color: var(--line); }
table.wi-vars .wi-base td { background: var(--act-soft); }
table.wi-vars small { font-size: 10.5px; margin-left: 3px; }
table.wi-vars small.bad { color: var(--bad); } table.wi-vars small.ok { color: var(--ok); }
table.wi-vars .wi-act { white-space: nowrap; text-align: right; }
table.wi-vars .wi-act button { border: 1px solid var(--line); background: var(--raised); color: var(--dim); border-radius: var(--r-sm); width: 26px; height: 22px; cursor: pointer; margin-left: 2px; }
table.wi-vars .wi-act button:hover { color: var(--act); border-color: var(--act); }
.wi-prm { margin-top: 4px; }
#uncBox .link { color: var(--act); }
.run-who { font-size: 12px; font-weight: 600; color: var(--act); margin-bottom: 4px; } .run-who:empty { display: none; }

.wind-note{display:block;margin-top:4px;font-size:.92em}
.wind-note.bad{color:var(--bad,#b3261e)}
