/* Volitve Destrnik 2026 — svetel, pregleden dizajn; mobilno najprej.
   Layout: na telefonu spodnja vrstica + meni »Več«, od 960 px stranski meni. */
:root {
    --bg: #f4f6f9; --surface: #ffffff; --surface-2: #f1f4f8; --hover: #eef2f7;
    --ink: #0f172a; --ink-2: #334155; --muted: #64748b; --line: #e3e8ef; --line-2: #d3dae4;
    --accent: #1f5fcc; --accent-ink: #ffffff; --accent-soft: #e7effc;
    --good: #16a34a; --warn: #d97706; --crit: #dc2626; --info: #2563eb; --st-none: #94a3b8;
    --s-nsi: #2a78d6; --s-lzu: #eb6834; --s-naj: #1baf7a; --s-sds: #eda100; --s-oth: #9aa39e;
    --s-plan: #b7d3f6; --s-real: #256abf;
    --r: 14px; --r-sm: 9px;
    --shadow: 0 1px 2px rgb(15 23 42 / .04), 0 1px 3px rgb(15 23 42 / .06);
    --f: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --f-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    --side-w: 248px; --bottom-h: 62px;
    color-scheme: light;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0d1117; --surface: #151b23; --surface-2: #1b222c; --hover: #202936;
        --ink: #e6edf3; --ink-2: #c1ccd8; --muted: #8b98a8; --line: #262f3b; --line-2: #313c4a;
        --accent: #6aa4ff; --accent-ink: #08142a; --accent-soft: #16243b;
        --good: #3fb950; --warn: #e3a008; --crit: #f85149; --info: #58a6ff; --st-none: #6b7787;
        --s-nsi: #3987e5; --s-lzu: #d95926; --s-naj: #199e70; --s-sds: #c98500; --s-oth: #6b736f;
        --s-plan: #184f95; --s-real: #6da7ec;
        --shadow: none;
        color-scheme: dark;
    }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--f); }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.015em; text-wrap: balance; }
h1 { font-size: clamp(1.5rem, 5vw, 1.9rem); }
h2 { font-size: clamp(1.35rem, 4.5vw, 1.7rem); line-height: 1.2; }
h3 { font-size: 1.02rem; line-height: 1.3; }
p { margin: 0; max-width: 75ch; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
.num, td.n { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.eyebrow { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 650; }
.warnmark { color: var(--crit); font-weight: 700; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.ic { width: 20px; height: 20px; flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Ogrodje ---------- */
.content { padding: 16px max(16px, env(safe-area-inset-right)) calc(var(--bottom-h) + 28px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); max-width: 1180px; margin: 0 auto; }
.content-center { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding-bottom: 16px; }
.side {
    position: fixed; inset: 0 auto 0 0; width: min(86vw, 300px); z-index: 40;
    background: var(--surface); border-right: 1px solid var(--line);
    display: flex; flex-direction: column; transform: translateX(-105%); transition: transform .2s ease;
    padding-top: env(safe-area-inset-top);
}
.side-open .side { transform: none; box-shadow: 0 10px 40px rgb(0 0 0 / .25); }
.scrim { position: fixed; inset: 0; background: rgb(15 23 42 / .4); z-index: 35; opacity: 0; pointer-events: none; transition: opacity .2s; }
.side-open .scrim { opacity: 1; pointer-events: auto; }
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 10px 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; min-width: 0; }
.brand b { display: block; font-size: .98rem; }
.brand small { display: block; color: var(--muted); font-size: .76rem; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 750; flex: none; }
.side-nav { flex: 1; overflow-y: auto; padding: 4px 10px 12px; display: flex; flex-direction: column; gap: 1px; }
.side-group { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 650; padding: 14px 10px 6px; }
.side-nav a { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: var(--r-sm); color: var(--ink-2); text-decoration: none; font-weight: 520; font-size: .93rem; min-height: 40px; }
.side-nav a .ic { color: var(--muted); width: 19px; height: 19px; }
.side-nav a:hover { background: var(--hover); color: var(--ink); }
.side-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 620; }
.side-nav a[aria-current="page"] .ic { color: var(--accent); }
.side-foot { display: flex; align-items: center; gap: 8px; padding: 12px 12px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.side-foot .who { flex: 1; min-width: 0; line-height: 1.25; }
.side-foot .who b, .side-foot .who small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot .who b { font-size: .88rem; }
.side-foot .who small { color: var(--muted); font-size: .75rem; }
.side-foot form { margin: 0; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; flex: none; }
.icon-btn { appearance: none; border: 0; background: none; color: var(--muted); width: 40px; height: 40px; border-radius: var(--r-sm); display: grid; place-items: center; cursor: pointer; font: inherit; text-decoration: none; }
.icon-btn:hover { background: var(--hover); color: var(--ink); }

.bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr);
    background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav a, .bottom-nav button {
    appearance: none; border: 0; background: none; font: inherit; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    height: var(--bottom-h); color: var(--muted); text-decoration: none; font-size: .7rem; font-weight: 560;
}
.bottom-nav .ic { width: 22px; height: 22px; }
.bottom-nav [aria-current="page"], .bottom-nav .on { color: var(--accent); }

@media (min-width: 960px) {
    .side { transform: none; width: var(--side-w); transition: none; }
    .side-close, .scrim, .bottom-nav { display: none; }
    .has-shell .content { margin-left: var(--side-w); padding: 28px 36px 56px; max-width: calc(1180px + var(--side-w)); }
    .has-shell .content > * { max-width: 1180px; }
}
@media (max-width: 959px) { .side-close { display: grid; } }

/* ---------- Gradniki ---------- */
section.view { display: grid; gap: 22px; }
@media (prefers-reduced-motion: no-preference) { section.view.enter { animation: fade .16s ease-out; } @keyframes fade { from { opacity: .5; } to { opacity: 1; } } }
.head { display: grid; gap: 6px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
@media (max-width: 600px) { .g4 { grid-template-columns: 1fr 1fr; gap: 10px; } }
.grid > * { min-width: 0; }
.panel, .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: grid; gap: 12px; align-content: start; min-width: 0; box-shadow: var(--shadow); }
.panel.flat { background: transparent; border: 0; padding: 0; gap: 6px; box-shadow: none; }
.card { display: block; margin-bottom: 16px; }
.card-narrow { width: 100%; max-width: 400px; margin: 0; padding: 26px 22px; }
.card h2 { margin-bottom: 1rem; font-size: 1.1rem; }
@media (max-width: 520px) { .panel { padding: 15px; } }

.kpi { display: grid; gap: 3px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); align-content: start; box-shadow: var(--shadow); min-width: 0; color: inherit; text-decoration: none; }
.kpi .v { font-size: 1.75rem; font-weight: 700; line-height: 1.15; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .l { color: var(--ink-2); font-size: .86rem; }
.kpi .s { color: var(--muted); font-size: .78rem; }
.kpi .s.warn { color: var(--warn); font-weight: 600; }
.kpi-link:hover { border-color: var(--line-2); background: var(--hover); }
@media (max-width: 600px) { .kpi { padding: 12px 13px; } .kpi .v { font-size: 1.4rem; } }

.vecard { display: grid; gap: 10px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-align: left; font: inherit; color: inherit; cursor: pointer; align-content: start; box-shadow: var(--shadow); }
.vecard:hover { border-color: var(--line-2); background: var(--hover); }
.vecard .t { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.vecard .t b { font-size: 1.3rem; font-weight: 700; }
.vecard dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 0; font-size: .85rem; }
.vecard dt { color: var(--muted); }
.vecard dd { margin: 0; font-variant-numeric: tabular-nums; }
.blocs { display: flex; gap: 2px; height: 8px; border-radius: 4px; overflow: hidden; }
.blocs span { display: block; height: 100%; }

ul.list { margin: 0; padding-left: 1.1em; display: grid; gap: 7px; }
ul.plain { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; font-weight: 600; padding: 2px 9px 2px 7px; border-radius: 99px; background: var(--surface-2); color: var(--ink); white-space: nowrap; }
.pill i, .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.dot-nsi { background: var(--s-nsi); } .dot-lzu { background: var(--s-lzu); } .dot-naj { background: var(--s-naj); }
.dot-sds { background: var(--s-sds); } .dot-oth { background: var(--s-oth); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters .lab { font-size: .78rem; color: var(--muted); }
.filters .sep { width: 6px; }
.chip { appearance: none; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); padding: 0 13px; min-height: 36px; border-radius: 99px; font: inherit; font-size: .85rem; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.chip:hover { color: var(--ink); background: var(--hover); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.chip b { font-weight: 700; font-variant-numeric: tabular-nums; }
.sdot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
input[type="search"], .filters select { font: inherit; font-size: 16px; min-height: 38px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 99px; background: var(--surface); color: var(--ink); min-width: 0; width: min(100%, 260px); }
.filters select { width: auto; max-width: 100%; padding-right: 8px; }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: .86rem; color: var(--ink-2); min-height: 36px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

.tbl { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: .88rem; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; background: var(--surface-2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tr.tot td { background: var(--surface-2); font-weight: 650; }
tr.seat td { background: color-mix(in srgb, var(--good) 9%, transparent); }
td.n, th.n { text-align: right; white-space: nowrap; }
@media (max-width: 520px) { th, td { padding: 8px 9px; } table { font-size: .84rem; } }
.inbar { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.inbar span.b { height: 8px; border-radius: 0 3px 3px 0; display: inline-block; }

.duel { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px; }
.cand { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px 16px; background: var(--surface); display: grid; gap: 4px; }
.cand .nm { font-size: 1.12rem; font-weight: 650; }
.cand .big { font-size: 1.9rem; font-weight: 700; letter-spacing: -.02em; }
.duel-bar { display: flex; gap: 3px; height: 14px; border-radius: 7px; overflow: hidden; }

.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { fill: var(--ink-2); font-family: var(--f); font-size: 12px; }
.chart text.lbl { fill: var(--ink); font-weight: 600; }
.chart text.mut { fill: var(--muted); }
.chart .grid-l { stroke: var(--line); stroke-width: 1; }
.chart .thr { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 4 3; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .8rem; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.legend i.dash { height: 0; border-top: 2px dashed var(--ink); border-radius: 0; width: 16px; }
#tip { position: fixed; z-index: 60; pointer-events: none; background: var(--ink); color: var(--surface); padding: 7px 10px; border-radius: 8px; font-size: .8rem; line-height: 1.35; max-width: 280px; box-shadow: 0 6px 20px rgb(0 0 0 / .2); }

.villages { display: flex; flex-wrap: wrap; gap: 8px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: 10px; }
.fact { background: var(--surface-2); border-radius: var(--r-sm); padding: 10px 12px; display: grid; gap: 2px; }
.fact .v { font-size: 1.3rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.fact .l { font-size: .76rem; color: var(--muted); }
.issue { border-left: 3px solid var(--line-2); padding: 4px 0 4px 12px; display: grid; gap: 3px; }
.issue.hot { border-left-color: var(--crit); } .issue.done { border-left-color: var(--good); } .issue.wip { border-left-color: var(--warn); }
.status { display: inline-flex; align-items: center; gap: 5px; font-size: .72rem; font-weight: 650; color: var(--ink-2); white-space: nowrap; text-transform: uppercase; letter-spacing: .04em; }
.status i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

.tl { display: grid; border-left: 2px solid var(--line); margin-left: 6px; }
.tl .it { position: relative; padding: 0 0 16px 18px; display: grid; gap: 2px; justify-items: start; }
.tl .it:last-child { padding-bottom: 0; }
.tl .it::before { content: ""; position: absolute; left: -7px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--muted); }
.tl .it.past::before { background: var(--muted); }
.tl .it.past .tl-label { color: var(--muted); }
.tl .it.next::before { border-color: var(--crit); background: var(--crit); }
.tl .it.big::before { border-color: var(--accent); background: var(--accent); }
.tl .it.done::before { border-color: var(--good); background: var(--good); }
.tl .it.done .tl-label { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-2); }
.tl .it.late::before { border-color: var(--warn); background: var(--surface); }
.tl .d { font-size: .76rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.tl .tl-label { font-weight: 560; }
.tick { appearance: none; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font: inherit; font-size: .8rem; border-radius: 99px; padding: 0 12px 0 8px; min-height: 34px; margin-top: 4px; display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.tick .box { width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid var(--line-2); display: inline-grid; place-items: center; }
.tick[aria-pressed="true"] { border-color: color-mix(in srgb, var(--good) 40%, transparent); background: color-mix(in srgb, var(--good) 10%, var(--surface)); color: var(--ink); }
.tick[aria-pressed="true"] .box { background: var(--good); border-color: var(--good); }
.tick[aria-pressed="true"] .box::after { content: ""; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.it.late .tick { border-color: color-mix(in srgb, var(--warn) 55%, transparent); color: var(--warn); }

.note { background: var(--accent-soft); border-radius: var(--r-sm); padding: 12px 14px; font-size: .9rem; }
details { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
details summary { cursor: pointer; padding: 13px 16px; font-weight: 620; }
details > div { padding: 0 16px 16px; display: grid; gap: 10px; }
.view-foot { color: var(--muted); font-size: .78rem; border-top: 1px solid var(--line); padding-top: 14px; }
.section-sep { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 650; }
.section-sep::before, .section-sep::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.loading, .empty { color: var(--muted); padding: 28px 8px; text-align: center; }

/* ---------- Obrazci in gumbi ---------- */
.form, .stack { display: flex; flex-direction: column; gap: 12px; }
.form label, .stack > label, .form-row label { display: flex; flex-direction: column; gap: 5px; font-size: .86rem; font-weight: 560; color: var(--ink-2); }
.form-row { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 560px) { .form-row { grid-template-columns: 1fr 1fr; } }
input[type=text], input[type=password], input[type=date], select, textarea {
    font: inherit; font-size: 16px; padding: 10px 12px; min-height: 44px; width: 100%;
    border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); color: var(--ink);
}
textarea { resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.req { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--crit); font-weight: 700; margin-left: 4px; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 720px) { .form-grid { grid-template-columns: 1fr 1fr 1fr auto; align-items: end; } }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.btn {
    appearance: none; font: inherit; font-size: .92rem; font-weight: 600; min-height: 44px; padding: 0 16px;
    border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
    cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none;
}
.btn:hover { background: var(--hover); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent); filter: brightness(1.08); }
.btn-danger { color: var(--crit); }
.btn-block, .btn-wide { width: 100%; }
@media (min-width: 600px) { .btn-wide { width: auto; justify-self: start; } }
.link-btn { appearance: none; border: 0; background: none; padding: 6px 4px; font: inherit; font-size: .82rem; color: var(--accent); cursor: pointer; font-weight: 560; min-height: 32px; }
.link-btn.danger { color: var(--crit); }

/* segmentirana izbira (radio) */
.seg { display: flex; flex-wrap: wrap; gap: 6px; border: 0; padding: 0; margin: 0; }
.seg[hidden] { display: none; }
.seg label { position: relative; flex: 1 1 auto; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: var(--r-sm); font-size: .85rem; font-weight: 560; color: var(--ink-2); background: var(--surface); text-align: center; }
.seg span i { width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--muted)); flex: none; }
.seg input:checked + span { border-color: var(--c, var(--accent)); background: color-mix(in srgb, var(--c, var(--accent)) 12%, var(--surface)); color: var(--ink); box-shadow: inset 0 0 0 1px var(--c, var(--accent)); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.flash { padding: 12px 14px; border-radius: var(--r-sm); margin-bottom: 14px; overflow-wrap: anywhere; font-size: .92rem; }
.flash-ok { background: color-mix(in srgb, var(--good) 12%, var(--surface)); }
.flash-err { background: color-mix(in srgb, var(--crit) 10%, var(--surface)); color: var(--crit); }
.secret { font-family: var(--f-mono); font-size: 1.05em; background: var(--surface); padding: .1rem .4rem; border-radius: 4px; user-select: all; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 650; padding: 3px 9px 3px 8px; border-radius: 99px; background: color-mix(in srgb, var(--c, var(--accent)) 13%, transparent); color: var(--ink); white-space: nowrap; }
.badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--accent)); }
.badge:not([style]) { --c: var(--accent); }
#toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--bottom-h) + 16px + env(safe-area-inset-bottom)); z-index: 70; background: var(--ink); color: var(--surface); padding: 11px 18px; border-radius: 12px; font-size: .9rem; box-shadow: 0 8px 24px rgb(0 0 0 / .25); max-width: calc(100vw - 32px); }
#toast.err { background: var(--crit); color: #fff; }
@media (min-width: 960px) { #toast { bottom: 24px; left: calc(50% + var(--side-w) / 2); } }

/* ---------- Plakati ---------- */
.stackbar { display: flex; gap: 3px; height: 12px; border-radius: 6px; overflow: hidden; background: var(--surface-2); }
.plist { display: grid; gap: 10px; }
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; border-left: 4px solid var(--c); scroll-margin-top: 12px; }
.pcard-head { appearance: none; border: 0; background: none; font: inherit; color: inherit; width: 100%; text-align: left; cursor: pointer; display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; padding: 14px 16px; }
.pcard-head:hover { background: var(--hover); }
.pcard-main { display: grid; gap: 2px; min-width: 0; }
.pcard-main b { font-size: 1rem; }
.pcard-side { display: grid; gap: 4px; justify-items: end; text-align: right; flex: none; }
@media (max-width: 520px) { .pcard-head { flex-direction: column; gap: 8px; } .pcard-side { justify-items: start; text-align: left; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } }
.pcard-body { padding: 4px 16px 16px; display: grid; gap: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.pcard .seg label { flex: 1 1 140px; }
.photo-pick { display: flex; align-items: center; gap: 10px; }
.photo-pick img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--line); }
.history { display: grid; gap: 12px; }
.hist { display: grid; gap: 6px; padding-left: 12px; border-left: 2px solid var(--line); }
.hist-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.hist-photo img { width: 100%; max-width: 320px; border-radius: var(--r-sm); display: block; border: 1px solid var(--line); }
.txt { overflow-wrap: anywhere; }

/* ---------- Teren in dejstva ---------- */
.day { font-size: .8rem; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: .05em; margin: 6px 2px -6px; }
.day:first-letter { text-transform: uppercase; }
.entries, .facts-list, #jlist { display: grid; gap: 10px; }
.entry, .fcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: grid; gap: 8px; box-shadow: var(--shadow); }
.entry-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.entry-top a { font-weight: 650; color: var(--ink); }
.entry-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px; }
.entry-meta .acts { display: flex; gap: 4px; flex-wrap: wrap; }
.kind { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 3px 8px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); }
.kind.k-obisk { background: color-mix(in srgb, var(--info) 13%, transparent); color: var(--info); }
.kind.k-pobuda { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.kind.k-dogodek { background: color-mix(in srgb, var(--s-naj) 15%, transparent); color: var(--s-naj); }
.src { display: grid; gap: 2px; font-size: .86rem; color: var(--ink-2); background: var(--surface-2); border-radius: var(--r-sm); padding: 8px 11px; overflow-wrap: anywhere; }
.vextra { padding-top: 14px; border-top: 1px dashed var(--line-2); }

/* ---------- Pregled: aktivnost ---------- */
.acts-list { display: grid; }
.act { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; padding: 9px 4px; border-bottom: 1px solid var(--line); color: var(--ink-2); text-decoration: none; font-size: .88rem; align-items: start; }
.act:last-child { border-bottom: 0; }
.act:hover { background: var(--hover); }
.act > .small { grid-column: 2; }
.adot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; background: var(--muted); }
.a-poster { background: var(--good); } .a-journal { background: var(--info); } .a-fact { background: var(--s-naj); } .a-deadline { background: var(--warn); } .a-results { background: var(--crit); }

/* ---------- Volilni večer ---------- */
.vol-chips .chip { font-variant-numeric: tabular-nums; }
.vol-chips .chip.has:not([aria-pressed="true"]) { border-color: color-mix(in srgb, var(--good) 50%, transparent); color: var(--good); }
.numgrid { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px; margin: 0; display: grid; gap: 8px; }
.numgrid legend { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; padding: 0 6px; }
.numf { display: grid; grid-template-columns: 1fr 110px; align-items: center; gap: 10px; font-size: .9rem; }
.numf input { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Uporabniki ---------- */
.user-list { list-style: none; margin: 0; padding: 0; }
.user-list li { display: flex; flex-direction: column; gap: .75rem; padding: .9rem 0; border-top: 1px solid var(--line); }
.user-list li:first-child { border-top: 0; padding-top: 0; }
.user-info { min-width: 0; overflow-wrap: anywhere; }
.user-actions { display: flex; gap: .5rem; }
.user-actions form { flex: 1; }
.user-actions .btn { width: 100%; }
@media (min-width: 600px) { .user-list li { flex-direction: row; align-items: center; justify-content: space-between; } .user-actions form { flex: none; } }
.content > h1 { margin-bottom: 16px; }
@media (max-width: 600px) { .pcard .form-actions .btn { flex: 1 1 40%; } .pcard .form-actions .btn-primary { flex-basis: 100%; } }

/* ---------- Teren: zavihki in obiski hiš ---------- */
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 12px; border: 1px solid var(--line); }
.tabs button { flex: 1; appearance: none; border: 0; background: none; font: inherit; font-weight: 620; font-size: .92rem; color: var(--muted); min-height: 42px; border-radius: 9px; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow), 0 0 0 1px var(--line); }
.visit-entry { gap: 10px; }
.visit-entry form { display: grid; gap: 10px; }
#hn { font-size: 2rem; font-weight: 700; text-align: center; letter-spacing: .04em; min-height: 64px; font-variant-numeric: tabular-nums; }
#hn::placeholder { font-size: 1.05rem; font-weight: 500; letter-spacing: 0; }
.letters { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.lt { appearance: none; font: inherit; font-weight: 650; min-height: 42px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); color: var(--ink-2); cursor: pointer; font-size: .9rem; }
.lt[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.lt[data-lt=""] { font-size: .78rem; font-weight: 560; }
.hninfo:empty { display: none; }
.hninfo { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--warn); font-weight: 600; }
.vbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.vbtn { appearance: none; border: 0; font: inherit; font-size: 1.15rem; font-weight: 700; min-height: 64px; border-radius: 12px; color: #fff; cursor: pointer; touch-action: manipulation; }
.vbtn:active { transform: scale(.98); filter: brightness(.95); }
.v-letak { background: var(--info); }
.v-pogovor { background: var(--good); }
@media (prefers-color-scheme: dark) { .vbtn { color: #08142a; } }
.visit-entry .link-btn { justify-self: start; }
.qinfo { background: color-mix(in srgb, var(--warn) 14%, var(--surface)); color: var(--ink); border-radius: var(--r-sm); padding: 8px 12px; font-weight: 560; }
.houses { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 6px; }
.house { appearance: none; font: inherit; font-weight: 700; font-size: .95rem; min-height: 44px; border-radius: var(--r-sm); border: 1px solid transparent; cursor: pointer; position: relative; font-variant-numeric: tabular-nums; color: var(--ink); }
.house.h-letak { background: color-mix(in srgb, var(--info) 15%, var(--surface)); border-color: color-mix(in srgb, var(--info) 30%, transparent); }
.house.h-pogovor { background: color-mix(in srgb, var(--good) 20%, var(--surface)); border-color: color-mix(in srgb, var(--good) 40%, transparent); }
.house.noted::after, .legend i.has-note { content: ""; position: absolute; top: 4px; right: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--warn); }
.legend i.has-note { position: static; width: 8px; height: 8px; }
.house.pending { border-style: dashed; border-color: var(--warn); opacity: .85; }
.house[aria-pressed="true"] { outline: 2px solid var(--ink); outline-offset: 1px; }
.hdetail { display: grid; gap: 8px; border-top: 1px dashed var(--line-2); padding-top: 12px; scroll-margin-bottom: 90px; }
.hdetail .row { justify-content: flex-start; }
#toast { display: flex; align-items: center; gap: 14px; }
#toast button { appearance: none; border: 0; background: none; color: inherit; font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 6px 2px; min-height: 36px; }
.house.h-none { background: var(--surface); border: 1px dashed var(--line-2); color: var(--muted); font-weight: 560; }
.legend i.h-none-i { background: var(--surface); border: 1px dashed var(--muted); }
.progress { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--good); border-radius: 4px; }
.progress.sm { height: 4px; margin-top: 4px; min-width: 56px; }
.assign { display: flex; align-items: center; gap: 4px 10px; flex-wrap: wrap; }
.a-assign { background: var(--accent); }
.user-edit { margin-top: 8px; border: 0; background: none; }
.user-edit summary { padding: 6px 0; font-size: .85rem; color: var(--accent); font-weight: 600; }
.user-edit form { padding: 6px 0 4px; max-width: 420px; }
/* elementi mrež se ne smejo raztegniti čez zaslon (široke tabele se drsajo znotraj .tbl) */
section.view > *, .panel > *, .card > * { min-width: 0; }
@media (min-width: 720px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .btn { justify-self: start; } }
