/* Strane van naslovne (tabele, akt, metodologija) i admin. Ista paleta kao naslovna (home.css):
   tamnoplava + sive nijanse; crvena (--hot) je jedini akcenat: „Najviši rizik“ i rok koji ističe. */
:root {
  --page: #f6f7f9; --bg: #ffffff; --fg: #111a2e; --muted: #5a6478; --faint: #8a93a5; --line: #e2e6ec; --soft: #f1f3f6;
  --navy: #13213f; --on-navy: #ffffff; --sel: #13213f; --on-sel: #ffffff;
  --accent: #b42318; --accent-soft: #fdecea; --ok: #24407a; --ok-soft: #e8edf6;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow: 0 1px 2px rgba(17, 26, 46, .05), 0 4px 16px rgba(17, 26, 46, .04);
}
@media (prefers-color-scheme: dark) {
  :root { --page: #0d1220; --bg: #151c2e; --fg: #e7eaf1; --muted: #a2abbd; --faint: #7a849a; --line: #263049; --soft: #1a2236;
    --navy: #243a6a; --on-navy: #eef2fb; --sel: #dbe3f3; --on-sel: #0d1220;
    --accent: #f97066; --accent-soft: #3a1d1f; --ok: #b3c6ea; --ok-soft: #1c2a44; --shadow: none; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--fg); font: 16px/1.55 var(--font); }
a { color: var(--ok); text-underline-offset: 2px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
main, main.wrap { padding-top: 28px; padding-bottom: 56px; min-height: 60vh; }
h1 { font-size: clamp(26px, 3.4vw, 34px); line-height: 1.15; letter-spacing: -.02em; font-weight: 800; margin: 4px 0 12px; }
h2 { font-size: 20px; letter-spacing: -.01em; margin: 28px 0 10px; }
.lead { font-size: 17px; color: var(--fg); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hero h1 { font-size: 32px; }
.rokovi { background: var(--soft); border-radius: 10px; padding: 12px 16px; margin: 16px 0; }
.rokovi h2 { margin: 0 0 6px; font-size: 15px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.rokovi ul { margin: 0; padding: 0; list-style: none; }
.rokovi li { padding: 3px 0; }
.controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 16px 0 6px; }
.switch { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.switch a { padding: 6px 12px; font-size: 14px; text-decoration: none; color: var(--fg); border-right: 1px solid var(--line); }
.switch a:last-child { border-right: 0; }
.switch a.on { background: var(--sel); color: var(--on-sel); }
.small-switch { margin: 6px 6px 6px 0; }
.small-switch a { padding: 3px 10px; font-size: 13px; }
.filters, .search { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.search { margin-bottom: 8px; }
.search input[type=search] { flex: 1 1 260px; }
input, select, textarea, button { font: inherit; font-size: 14px; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; }
button { cursor: pointer; background: var(--soft); }
button:hover { border-color: var(--muted); }
label.inline { font-size: 14px; display: inline-flex; gap: 6px; align-items: center; }
.records, .queue { list-style: none; padding: 0; margin: 8px 0; }
.rec, .qrow { border-top: 1px solid var(--line); padding: 14px 0; }
.rec-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--muted); align-items: center; }
.rec-meta a { color: var(--muted); }
.rec-title { display: block; font-weight: 650; font-size: 17px; color: var(--fg); text-decoration: none; margin: 3px 0; }
.rec-title:hover { text-decoration: underline; }
.rec-sub { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; color: var(--muted); }
.rec-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; font-size: 13px; }
.kind { border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; font-weight: 700; color: var(--fg); }
.tag { background: var(--soft); border-radius: 4px; padding: 0 6px; font-size: 12px; }
.status { border-radius: 999px; padding: 1px 9px; background: var(--soft); }
.s-zaustaviti { background: var(--accent); color: #fff; }
.s-pitati { background: var(--ok-soft); color: var(--ok); }
.s-masina { background: transparent; border: 1px dashed var(--line); color: var(--muted); }
.s-akcija { background: var(--navy); color: var(--on-navy); }
.scores { color: var(--muted); font-variant-numeric: tabular-nums; margin-left: auto; }
.rok { white-space: nowrap; }
.rok.blizu { color: var(--accent); font-weight: 650; }
.rok.istekao { color: var(--muted); text-decoration: line-through; }
.empty { padding: 30px 0; color: var(--muted); }
.more { display: inline-block; margin-top: 10px; }
.akt h1 { font-size: 26px; }
.crumbs { font-size: 14px; color: var(--muted); margin: 0; }
.org { color: var(--muted); margin-top: -4px; }
.verdict { border-left: 4px solid var(--line); background: var(--soft); padding: 10px 14px; border-radius: 0 8px 8px 0; margin: 16px 0; }
.verdict.st-zaustaviti { border-left-color: var(--accent); }
.verdict.st-pitati { border-left-color: var(--ok); }
.verdict .note { margin: 8px 0 0; white-space: pre-wrap; }
.facts { display: grid; grid-template-columns: 200px 1fr; gap: 6px 16px; margin: 16px 0; }
.facts dt { color: var(--muted); font-size: 14px; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { border-bottom: 1px solid var(--line); padding: 7px 8px; text-align: left; vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
table.score td:nth-child(2), table.score td:nth-child(3) { width: 80px; font-variant-numeric: tabular-nums; }
tr.sum td { font-weight: 700; }
pre.text { white-space: pre-wrap; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--soft); padding: 10px; border-radius: 6px; max-height: 420px; overflow: auto; }
ul.att, ul.rel { padding-left: 18px; }
details summary { cursor: pointer; color: var(--ok); font-size: 14px; }
.prose { max-width: 760px; font-size: 16.5px; line-height: 1.7; }
.prose .lead { font-size: 18px; line-height: 1.6; color: var(--muted); }
.prose h2 { font-size: 22px; margin: 40px 0 12px; padding-top: 24px; border-top: 1px solid var(--line); scroll-margin-top: 16px; }
.prose p, .prose li { max-width: 68ch; }
.prose li { margin: 6px 0; }
.prose code { background: var(--chip, #eef1f5); padding: 1px 6px; border-radius: 4px; font-size: 14.5px; white-space: nowrap; }
.toc { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 20px 0 8px; padding: 14px 16px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
.toc-k { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-right: 6px; }
.toc a { font-size: 14px; color: var(--fg); text-decoration: none; padding: 3px 10px; border-radius: 999px; background: var(--chip, #eef1f5); }
.toc a:hover { box-shadow: inset 0 0 0 1px var(--faint); }
.tbl-wrap { overflow-x: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
.tbl-wrap table { font-size: 14.5px; line-height: 1.5; }
.tbl-wrap th { background: var(--soft); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; padding: 10px 12px; }
.tbl-wrap td { padding: 10px 12px; }
.tbl-wrap tr:last-child td { border-bottom: 0; }
/* admin */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.tabs a { font-size: 13px; text-decoration: none; color: var(--fg); border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; }
.tabs a.on { background: var(--sel); color: var(--on-sel); }
.badge { display: inline-block; min-width: 18px; text-align: center; background: var(--soft); color: var(--fg); border-radius: 999px; padding: 0 5px; font-size: 11px; margin-left: 3px; }
.badge.p0 { background: var(--accent); color: #fff; }
.qrow { display: grid; grid-template-columns: 1fr 300px; gap: 14px; }
.prio { font-weight: 800; }
.prio.P0 { color: var(--accent); }
.qform { font-size: 13px; }
.qbtns { display: flex; gap: 6px; margin-bottom: 6px; }
.qbtns button { flex: 1; }
.qbtns button.on { background: var(--sel); color: var(--on-sel); }
.qbtns button.stop { border-color: var(--accent); color: var(--accent); }
.qbtns button.stop.on { background: var(--accent); color: #fff; }
.qform label { display: block; margin: 5px 0; }
.qform label select, .qform label input { margin-left: 4px; }
.qform label.wide textarea { width: 100%; display: block; margin-top: 3px; }
.warn { background: var(--accent-soft); color: var(--accent); padding: 8px 12px; border-radius: 6px; margin: 10px 0; }
table.health tr.stale td:first-child { border-left: 3px solid var(--accent); }
table.health tr.err td { background: var(--accent-soft); }
@media (max-width: 720px) {
  .qrow { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .facts dt { margin-top: 6px; }
  .scores { margin-left: 0; }
  .hero h1 { font-size: 26px; }
  table.health { display: block; overflow-x: auto; }
}


/* ---- tabela (redizajn 2.11; 4.11: paleta naslovne, crvena samo za najviši rizik i rok) ---- */
:root { --hot: #b42318; --hot-soft: #fdecea; --chip: #eef1f5; --bar: #13213f; --stripe: #8a93a5; }
@media (prefers-color-scheme: dark) { :root { --hot: #f97066; --hot-soft: #3a1d1f; --chip: #1e2740; --bar: #b3c6ea; --stripe: #5d6782; } }
.wrap.wide { max-width: 1320px; }

/* zaglavlje strane (Pregledani akti, Svi akti, admin) */
.hero, .page-head { margin: 0 0 18px; }
.hero h1, .page-head h1 { margin: 0 0 8px; font-size: clamp(28px, 3.6vw, 36px); }
.hero .lead, .page-head .lead { font-size: 17px; line-height: 1.55; color: var(--muted); max-width: 62em; margin: 0 0 8px; }
.hero .upd, .page-head .upd { font-size: 14px; color: var(--muted); margin: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.upd a { color: var(--fg); font-weight: 500; }
.legend { display: inline-flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 16px; }
.kpis.k3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--fg); background: var(--bg); box-shadow: var(--shadow); }
.kpi:hover { border-color: var(--faint); }
.kpi-v { font-size: 30px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi-l { font-size: 14px; color: var(--muted); }
.kpi.hot { border-top: 3px solid var(--hot); }
.kpi.hot .kpi-v { color: var(--hot); }

/* filteri: jedna kartica sa pretragom i grupama čipova */
.filters-card { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 10px; margin: 0 0 14px; box-shadow: var(--shadow); }
.fbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; }
.fbar input[type=search] { flex: 1 1 320px; min-width: 0; }
.fbar input, .fbar select, .fbar button, .moref select, .moref input { font-size: 15px; padding: 9px 11px; border-radius: 8px; }
.fbar select { max-width: 260px; }
.fbar button { background: var(--navy); color: var(--on-navy); border-color: var(--navy); font-weight: 600; padding-left: 16px; padding-right: 16px; }
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--ok); outline-offset: 2px; }
.minv { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.minv input { width: 6em; }

.chips { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; }
.chip-g { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip-k { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); flex: none; margin-right: 2px; }
.chip-k.sep { margin-left: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; padding: 4px 11px; border-radius: 999px; background: var(--chip); color: var(--fg); text-decoration: none; border: 1px solid transparent; white-space: nowrap; }
.chip b { font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.chip:hover { border-color: var(--faint); }
.chip.on { background: var(--sel); color: var(--on-sel); }
.chip.on b { color: var(--on-sel); opacity: .75; }
.st-chip.st-c-zaustaviti { background: var(--hot-soft); color: var(--hot); }
.st-chip.st-c-zaustaviti.on { background: var(--hot); color: #fff; }
.st-chip.st-c-zaustaviti.on b { color: #fff; }
.lvl-chip.l1 { color: var(--hot); box-shadow: inset 0 0 0 1px var(--hot); background: var(--bg); }
.lvl-chip.l1.on { background: var(--hot); color: #fff; }
.lvl-chip.l1.on b { color: #fff; }
details.moref { border-top: 1px solid var(--line); margin-top: 2px; padding-top: 8px; }
details.moref > summary { font-size: 14px; font-weight: 600; color: var(--fg); margin: 0 0 2px; list-style: none; }
details.moref > summary::-webkit-details-marker { display: none; }
details.moref > summary::before { content: "+"; display: inline-block; width: 1.1em; color: var(--muted); font-weight: 700; }
details.moref[open] > summary::before { content: "–"; }
details.moref[open] { display: flex; flex-direction: column; gap: 10px; }
.show-sm { display: none !important; }

.resbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 15px; padding: 4px 0 12px; }
.afilter { font-size: 14px; background: var(--chip); color: var(--fg); border-radius: 999px; padding: 2px 10px; text-decoration: none; }
.afilter:hover { box-shadow: inset 0 0 0 1px var(--faint); }
.resbar .reset { font-size: 14px; }
.resbar .csv { margin-left: auto; font-size: 14px; color: var(--fg); font-weight: 500; }

.tscroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); box-shadow: var(--shadow); }
table.tri { width: 100%; border-collapse: collapse; font-size: 15px; }
table.tri th { position: sticky; top: 0; background: var(--soft); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; padding: 10px 12px; border-bottom: 1px solid var(--line); }
table.tri th a { color: var(--muted); text-decoration: none; }
table.tri th a:hover { color: var(--fg); }
table.tri td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.tri tbody tr:last-child td { border-bottom: 0; }
table.tri tbody tr:hover { background: var(--soft); }
table.tri tr.zaustaviti td:first-child, table.tri tr.l1 td:first-child { box-shadow: inset 4px 0 0 var(--hot); }
table.tri tr.pitati td:first-child, table.tri tr.l2 td:first-child { box-shadow: inset 4px 0 0 var(--stripe); }

.c-nivo { width: 132px; }
.c-rok { width: 80px; white-space: nowrap; }
.c-akt { min-width: 340px; }
.c-akt .orig { font-size: 13px; color: var(--muted); margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.c-vrsta { width: 140px; font-size: 14px; }
.c-vrsta .dt { color: var(--fg); text-decoration: none; }
.c-vrsta .dt:hover { text-decoration: underline; }
.c-dur { width: 72px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.c-akt .t { color: var(--fg); font-weight: 650; font-size: 16px; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; }
.c-akt .t:hover { text-decoration: underline; }
.c-akt .why-l { font-size: 14px; color: var(--fg); margin-top: 4px; line-height: 1.45; }
.c-akt .o { font-size: 13.5px; color: var(--muted); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.sigs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.sig { font-size: 12.5px; background: var(--chip); border-radius: 4px; padding: 1px 7px; color: var(--fg); white-space: nowrap; }
.m-meta { display: none; }
.c-oblast { width: 130px; }
.c-oblast .tag { font-size: 13.5px; color: var(--fg); text-decoration: none; background: var(--chip); border-radius: 4px; padding: 2px 7px; white-space: nowrap; }
.c-oblast .kd { display: block; font-size: 13px; color: var(--muted); margin-top: 6px; text-decoration: none; line-height: 1.35; }
.c-oblast .tag:hover, .c-oblast .kd:hover { text-decoration: underline; }
.c-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; width: 96px; font-weight: 600; }
th.c-num { text-align: right; }
.c-num .dur { font-size: 13px; color: var(--muted); font-weight: 400; }
.c-date { width: 64px; white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.dash { color: var(--muted); opacity: .5; }

/* rok: crveno samo danas/sutra, podebljano do 7 dana */
.rk { font-size: 14.5px; font-variant-numeric: tabular-nums; color: var(--muted); }
.rk.hitno { color: var(--hot); background: var(--hot-soft); border-radius: 4px; padding: 2px 7px; font-weight: 800; }
.rk.blizu { color: var(--fg); font-weight: 800; }
.rk.mesec { color: var(--fg); font-weight: 600; }
.rk.istekao { color: var(--muted); font-size: 13px; }

/* ocena na javnoj strani: jedna oznaka, isti oblik kao na naslovnoj */
.ocena { display: inline-block; font-size: 13px; font-weight: 600; border-radius: 999px; padding: 3px 10px; white-space: nowrap; line-height: 1.3; }
.oc-zaustaviti { background: var(--hot-soft); color: var(--hot); }
.oc-pitati { background: var(--chip); color: var(--fg); }

.c-risk { width: 84px; white-space: nowrap; }
.c-risk .bar { width: 36px; }
.bar { display: inline-block; width: 52px; height: 6px; border-radius: 3px; background: var(--chip); vertical-align: middle; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--bar); }
.rv { font-size: 13px; color: var(--muted); margin-left: 6px; font-variant-numeric: tabular-nums; }

/* nivo (Svi akti, admin): Uzbuna je obrub, da se ne meša sa oznakom „Najviši rizik“ */
.lvl { display: inline-block; font-size: 12.5px; font-weight: 700; border-radius: 4px; padding: 2px 7px; white-space: nowrap; }
.lvl.l1 { color: var(--hot); box-shadow: inset 0 0 0 1.5px var(--hot); }
.lvl.l2 { background: var(--chip); color: var(--fg); }
.lvl.l3 { color: var(--fg); box-shadow: inset 0 0 0 1px var(--line); }
.lvl.l4 { color: var(--muted); }
.st { display: inline-block; font-size: 12px; border-radius: 999px; padding: 1px 8px; white-space: nowrap; margin-top: 5px; }
.st-zaustaviti { background: var(--hot-soft); color: var(--hot); font-weight: 600; }
.st-pitati { background: var(--chip); color: var(--fg); }
.st-rutina { background: var(--chip); color: var(--muted); }
.st-masina { color: var(--muted); padding-left: 0; }
.c-nivo .prio { font-size: 12px; margin-top: 4px; }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; font-size: 15px; }
.pager a { font-weight: 600; text-decoration: none; padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); }
.pager a:hover { border-color: var(--faint); }

@media (max-width: 1100px) { .hide-md { display: none; } }
@media (max-width: 760px) {
  main, main.wrap { padding-top: 20px; }
  .hero .lead, .page-head .lead { font-size: 15.5px; }
  .kpis, .kpis.k3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .kpis:not(.k3) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { padding: 9px 11px; border-radius: 10px; }
  .kpi-v { font-size: 22px; }
  .kpi-l { font-size: 12.5px; line-height: 1.3; }
  .hide-sm { display: none !important; }
  .show-sm { display: flex !important; }
  .filters-card { padding: 12px 12px 8px; margin-left: -4px; margin-right: -4px; }
  .fbar input[type=search] { flex: 1 1 100%; }
  .fbar select { max-width: none; flex: 1 1 0; min-width: 0; }
  table.tri .dash { display: none; }
  .fbar button { display: none; }
  /* čipovi u jednom redu koji se pomera vodoravno, da filteri ne zauzmu ceo ekran */
  .chip-row { flex-wrap: nowrap; overflow-x: auto; gap: 6px 16px; margin: 0 -12px; padding: 0 12px 2px; scrollbar-width: none; }
  .chip-row::-webkit-scrollbar { display: none; }
  .chip-row:not(.moref .chip-row) { -webkit-mask-image: linear-gradient(to right, #000 85%, transparent); mask-image: linear-gradient(to right, #000 85%, transparent); }
  .chip-g { flex-wrap: nowrap; }
  details.moref .chip-row { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
  details.moref .chip-g { flex-wrap: wrap; }
  /* tabela postaje lista kartica */
  .tscroll { border: 0; overflow: visible; background: transparent; box-shadow: none; }
  table.tri, table.tri tbody { display: block; }
  table.tri thead { display: none; }
  table.tri tr { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "nivo rok num" "akt akt akt" "odl odl odl"; gap: 8px 10px; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 12px 16px; margin-bottom: 10px; }
  table.tri tbody tr:hover { background: var(--bg); }
  table.tri tr.zaustaviti, table.tri tr.l1 { border-left: 4px solid var(--hot); }
  table.tri tr.pitati, table.tri tr.l2 { border-left: 4px solid var(--stripe); }
  table.tri tr td:first-child { box-shadow: none !important; }
  table.tri td { display: block; padding: 0; border: 0; width: auto; min-width: 0; }
  td.c-nivo { grid-area: nivo; } td.c-nivo > div { display: inline; }
  td.c-rok { grid-area: rok; }
  td.c-num { grid-area: num; }
  td.c-akt { grid-area: akt; min-width: 0; }
  td.c-odl { grid-area: odl; }
  td.c-risk, td.c-dur, td.c-vrsta { display: none !important; }
  .c-akt .t { font-size: 16.5px; -webkit-line-clamp: 3; }
  .c-akt .o { max-width: 100%; white-space: normal; }
  .m-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font-size: 13px; color: var(--muted); }
}

/* ---- stranica akta (v3, 4.11: kartice na površini, čitljiv tekst akta) ---- */
.akt { max-width: 920px; }
.akt .crumbs { font-size: 14.5px; margin: 0 0 14px; color: var(--muted); }
.akt .crumbs a { text-decoration: none; color: var(--muted); }
.akt .crumbs a:hover { color: var(--fg); text-decoration: underline; }
.akt-head { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin-bottom: 10px; }
.akt-head .ocena { font-size: 14px; padding: 4px 12px; }
.rokbadge { font-size: 15px; font-weight: 600; color: var(--fg); }
.rokbadge.hitno { color: var(--hot); background: var(--hot-soft); border-radius: 6px; padding: 3px 9px; font-weight: 800; }
.rokbadge.blizu { font-weight: 800; }
.rokbadge.istekao { color: var(--muted); font-weight: 400; }
.akt h1 { font-size: clamp(24px, 3.2vw, 32px); line-height: 1.2; margin: 4px 0 10px; }
.akt .sub { font-size: 17px; line-height: 1.5; color: var(--muted); margin: 0 0 8px; max-width: 62em; }
.akt .org { font-size: 15.5px; color: var(--muted); margin: 0 0 10px; }
.akt .sigs { margin: 0 0 18px; }
.zasto { border-left: 4px solid var(--hot); background: var(--bg); border-radius: 0 12px 12px 0; padding: 14px 18px; margin: 18px 0; box-shadow: var(--shadow); }
.zasto h2 { margin: 0 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.zasto p { margin: 0; font-size: 17px; line-height: 1.6; }
.masina-note { background: var(--bg); border: 1px dashed var(--line); border-radius: 10px; padding: 10px 14px; font-size: 15px; color: var(--muted); }
.akt-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 16px; margin: 18px 0 22px; align-items: start; }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; box-shadow: var(--shadow); }
.card h2 { margin: 0 0 12px; font-size: 18px; }
.card.action { border-top: 3px solid var(--navy); }
.koraci { margin: 0; padding-left: 22px; font-size: 16px; line-height: 1.5; }
.koraci li { margin: 6px 0; }
.koraci li::first-letter { text-transform: uppercase; }
.kada { font-size: 15px; margin: 12px 0 0; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.btn { display: inline-block; font-size: 15px; font-weight: 600; padding: 10px 16px; border-radius: 10px; background: var(--navy); color: var(--on-navy); border: 1px solid var(--navy); text-decoration: none; cursor: pointer; }
.btn.ghost { background: var(--bg); color: var(--fg); border-color: var(--line); }
.btn:hover { filter: brightness(1.12); }
.btn.ghost:hover { filter: none; border-color: var(--faint); }
.podaci dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 0; font-size: 15.5px; }
.podaci dt { color: var(--muted); font-size: 14px; padding-top: 1px; }
.podaci dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.podaci dd small { display: block; font-weight: 400; font-size: 13.5px; color: var(--muted); }
.axes { display: grid; grid-template-columns: 1fr auto; gap: 10px 14px; align-items: center; font-size: 15px; margin: 10px 0; }
.axes small { display: block; font-size: 13px; color: var(--muted); }
.axes .bar { width: 110px; }
.razlozi { color: var(--muted); padding-left: 18px; }
/* sklopivi odeljci: jedna lista sa linijama, strelica umesto trougla */
details.more-d { border-top: 1px solid var(--line); padding: 14px 0; }
details.more-d > summary, .izvorni details.doc > summary { list-style: none; }
details.more-d > summary::-webkit-details-marker, .izvorni details.doc > summary::-webkit-details-marker { display: none; }
details.more-d > summary { font-size: 16px; font-weight: 600; color: var(--fg); display: flex; align-items: center; gap: 8px; }
details.more-d > summary::before, .izvorni details.doc > summary::before { content: ""; flex: none; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); margin: 0 4px 0 2px; transition: transform .15s; }
details.more-d[open] > summary::before, .izvorni details.doc[open] > summary::before { transform: rotate(45deg); }
details.more-d[open] > summary { margin-bottom: 10px; }
ul.rel li { margin: 6px 0; }
.srcline { font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 16px; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 4px; }
@media (max-width: 760px) {
  .akt .sub { font-size: 15.5px; }
  .akt-grid { grid-template-columns: 1fr; }
  .card { padding: 16px; }
  .btns .btn { flex: 1 1 auto; text-align: center; }
}

/* admin tabela */
.odl { display: flex; gap: 4px; }
.odl button { font-size: 12px; padding: 4px 7px; }
.odl button.on { background: var(--sel); color: var(--on-sel); border-color: var(--sel); }
.odl button.stop { border-color: var(--hot); color: var(--hot); }
.odl button.stop.on { background: var(--hot); color: #fff; }
details.adm { margin-top: 6px; font-size: 13px; }
details.adm > summary { font-size: 12px; }
details.adm ul.why { margin: 6px 0; padding-left: 16px; color: var(--muted); }
.adm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 6px 10px; margin: 6px 0; }
.adm-grid label, details.adm label.wide { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--muted); }
details.adm label.wide { margin: 6px 0; }
details.adm textarea { width: 100%; }
@media (max-width: 760px) { .c-odl { width: auto; } .odl { flex-direction: row; } .odl button { flex: 1; } }

body.admin .c-akt { min-width: 260px; }
body.admin .c-oblast { width: 130px; }
.c-odl { width: 96px; }
@media (min-width: 761px) { .odl { flex-direction: column; } .odl button { width: 100%; } }
table.tri th.c-vrsta { white-space: normal; }

/* ---- objašnjenja (tooltips): miš ili dodir/fokus ---- */
[data-tip] { position: relative; }
[data-tip]:not(a):not(th) { cursor: help; }
th[data-tip] > a, th[data-tip] > span { border-bottom: 1px dotted var(--faint); cursor: help; }
th[data-tip] > a { cursor: pointer; }
[data-tip]:hover::after, [data-tip]:focus::after, [data-tip]:focus-within::after {
  content: attr(data-tip); position: absolute; z-index: 60; left: 0; top: calc(100% + 6px);
  width: max-content; max-width: 300px; white-space: normal; text-align: left;
  background: #13213f; color: #fff; font: 400 13px/1.5 var(--font); text-transform: none; letter-spacing: 0;
  padding: 9px 11px; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.22); pointer-events: none;
}
@media (prefers-color-scheme: dark) { [data-tip]:hover::after, [data-tip]:focus::after, [data-tip]:focus-within::after { background: #e7eaf1; color: #0d1220; } }
.tip-r[data-tip]::after { left: auto !important; right: 0; }
[data-tip]:focus { outline: none; }
.est { color: var(--muted); font-weight: 500; font-style: italic; border-bottom: 1px dotted var(--muted); }
.kpi[data-tip]:last-child::after { left: auto; right: 0; }
.podaci dt span[data-tip], .axes span[data-tip] { border-bottom: 1px dotted var(--faint); }
table.tri th { z-index: 3; }
[data-tip]:hover, [data-tip]:focus, [data-tip]:focus-within { z-index: 70; }

/* ---- pun tekst akta (Službeni glasnik) ---- */
.izvorni { margin: 22px 0; padding-bottom: 8px; }
.izvorni .izvorni-h { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-bottom: 4px; }
.izvorni .izvorni-h h2 { margin: 0; }
.izvorni .note { margin: 0 0 8px; font-size: 13.5px; color: var(--muted); }
.izvorni .doc { border-top: 1px solid var(--line); padding: 12px 0 4px; }
.izvorni .doc:first-of-type { border-top: 0; }
.izvorni details.doc > summary { cursor: pointer; display: flex; gap: 8px; align-items: baseline; }
.izvorni details.doc > summary::before { position: relative; top: -2px; }
.izvorni .doc-t { font-weight: 650; color: var(--fg); }
.izvorni .doc-src { display: block; font-size: 13px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.doc-body { position: relative; margin-top: 14px; }
.doc-text { max-width: 68ch; font-size: 15.5px; line-height: 1.65; color: var(--fg); }
.doc-text p { margin: 0 0 .75em; }
.doc-text p.d-naslov { text-align: center; font-weight: 700; letter-spacing: .04em; margin: 1.3em 0 .3em; }
.doc-text p.d-pod { text-align: center; font-weight: 600; margin: 0 auto 1.1em; max-width: 52ch; }
.doc-text p.d-clan { text-align: center; font-weight: 650; margin: 1.2em 0 .45em; }
.doc-text p.d-naslov + p:not(.d-pod) { margin-top: .9em; }
.doc-text p.d-potpis { margin: 0; font-size: 14px; color: var(--muted); }
.doc-text p:not(.d-potpis) + p.d-potpis { margin-top: 1.4em; }
.doc-text p.d-potpis + p:not(.d-potpis) { margin-top: 1.4em; }
/* dug tekst: prikazan početak, dugme otvara ceo */
.doc-body.clamp .doc-text { max-height: 26em; overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, #000 65%, transparent); mask-image: linear-gradient(to bottom, #000 65%, transparent); }
.doc-more { display: none; margin-top: 10px; }
.doc-body.dug .doc-more { display: inline-flex; }
@media (max-width: 760px) { .doc-text { font-size: 15px; } .doc-body.clamp .doc-text { max-height: 30em; } }
