:root {
    --bg: #ffffff;
    --bg-elev: #ffffff;
    --ink: #0a0a0a;
    --ink-soft: #3a3a3a;
    --ink-mute: #8a8a8a;
    --line: #e4e4e4;
    --line-strong: #cfcfcf;
    --accent: #0a0a0a;
    --accent-ink: #0a0a0a;
    --accent-soft: #ededed;
    --ok: #2f6b3a;
    --ok-soft: #e6efe7;
    /* Rounded corners (NomiFac #677, docs/updates/zaobljeni-vogali.md): NomiFac's 7px on every button, field,
       picker, row and card that reads this token (was 2px - square). Pills (999px), round dots (50 %) and the
       notebook's own paper bits (bookmarks, tape, margin rule) keep their shapes. */
    --radius: 0px;
    --max: 1080px;
    /* The firm's account pages (Profesionalni: plošča, planer, asistent, imenik, račun, moj katalog, navodila-pro). */
    --max-board: 1440px;
    /* ONE TOP BAR (NomiFac #1191, docs/updates/enaka-vrstica-povsod.md): the landing's header (.lp-header, also on
       /kaj-je-architec and the server-rendered /clanki), the app's navbar (.app-nav: NavMenu, ProjectsScreen) and the
       /zacni wizard's head (.zw-top) all take their logo and their vertical padding from these two, so the bar
       and the logo no longer grow and shrink between the landing and the app (#633 had slimmed only the app's).
       The landing is the measure; phones step both down below (max-width: 760px). --nav-h is the bar's height:
       logo + padding + the 1px bottom border (min-height on the bars makes it exact). */
    --nav-logo-h: 3.25rem;
    --nav-pad-y: 1rem;
    --nav-h: calc(var(--nav-logo-h) + 2 * var(--nav-pad-y) + 1px);
    --font-serif: 'Archivo', system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
    --font-sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
    /* TYPOGRAPHY POLICY: two families only.
       --font-serif (Fraunces) = display headings at 1.3rem and up (h1, h2, clamp() heads, book/chapter titles).
       --font-sans  (Inter)    = everything else: body, all running prose, every label/heading under 1.3rem,
                                 h3, and ALL numerals (prices, ratios, counts, percentages) - Inter's figures
                                 are far clearer at a glance than Fraunces'.
       The old --font-hand (Caveat) was removed: script type at 0.7-1.5rem was unreadable. */
    /* Architec Studio: monospace labels (eyebrows, numbers, buttons), square everything, a hard rule. */
    --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --radius-pill: 0px;
    --rule: #0a0a0a;
    --panel: #fafafa;
    --hover: #f6f6f6;
}
/* The phone step of the one top bar (#1191): the landing's own step since 2026-06, now the app's too. */
@media (max-width: 760px) {
    :root { --nav-logo-h: 2.6rem; --nav-pad-y: .7rem; }
}
/* On a touch screen the bar's controls have a finger floor (40px; the Profesionalni pills 44px) that can be taller
   than the phone's logo, so the bar is too: --nav-h counts the floor, or a viewport-high page ends under the bar. */
@media (pointer: coarse) {
    :root { --nav-h: calc(max(var(--nav-logo-h), 44px) + 2 * var(--nav-pad-y) + 1px); }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
/* DENSITY (NomiFac #633, docs/updates/gostejsi-videz-nomifac.md): the root is 14px - NomiFac's density - so
   every rem in this sheet (type, padding, gaps, widths) comes down by an eighth at once. A percentage, not
   14px, so a reader who set a larger default size in the browser keeps it. The colours did not change
   (Architec.UnitTests DensityStyleTests guards them); touch screens get their finger-sized controls back in the
   "pointer: coarse" density block under the buttons. */
html { font-size: 87.5%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--ink);
    font-size: 1rem;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2 {
    font-family: var(--font-serif);
    font-weight: 400;
    letter-spacing: -.02em;
    color: var(--ink);
    margin: 0;
}
h1 { font-size: clamp(1.6rem, 2.6vw, 2.15rem); line-height: 1.1; }
h2 { font-size: 1.3rem; line-height: 1.2; }
h3 { font-family: var(--font-sans); font-weight: 600; font-size: 1.05rem; letter-spacing: 0; color: var(--ink); margin: 0; }
h1:focus, h2:focus { outline: none; }

/* A link's underline in this app is the 1px BOTTOM BORDER below - never text-decoration. Both at once
   is what produced the "double underline" that kept reappearing (a component added
   text-decoration: underline, the global hover border drew a second line under it), so anchors never
   take text-decoration at all; the !important is the guard that keeps it that way. Buttons styled as
   links are <button>s and keep their own underline. A link that must stay underlined at rest sets
   border-bottom-color (see .ai-md a, .app-footer-gurs a) instead of text-decoration.
   Underlining only a PART of a link (.x:hover .x-go { text-decoration: underline }) is the one other way, and
   then the link switches its own line off (.x { border-bottom: 0 }) - the guard can't reach inside a link, so
   that is where the second line came back (#686, the partner link on the ad card). Same rules in
   Architec.Lokacija; Architec.UnitTests/Ui/LinkUnderlineStyleTests fails on either pattern. */
a { color: var(--accent-ink); text-decoration: none !important; border-bottom: 1px solid transparent; transition: border-color .15s; }
a:hover { border-bottom-color: currentColor; }

/* ---------- boot ---------- */
.boot { display: flex; align-items: center; justify-content: center; flex-direction: column; height: 100vh; gap: 1rem; font-family: var(--font-serif); }
.boot-mark { font-size: 3rem; color: var(--accent); animation: pulse 1.4s ease-in-out infinite; }
.boot-logo { width: 6rem; height: auto; animation: pulse 1.4s ease-in-out infinite; }
.boot-text { font-size: 1.25rem; color: var(--ink-soft); letter-spacing: 0.05em; }
@keyframes pulse { 0%,100% { opacity: .3; transform: translateY(0) } 50% { opacity: 1; transform: translateY(-4px) } }

/* ---------- layout ---------- */
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.beta-banner {
    background: var(--accent); color: #fff; text-align: center;
    font-size: .82rem; font-weight: 600; letter-spacing: .01em;
    padding: .4rem 1rem;
    display: flex; align-items: center; justify-content: center; gap: .75rem; flex-wrap: wrap;
}
.beta-banner-text { line-height: 1.3; }

/* "Prijavi napako / idejo" pill in the beta banner */
.beta-report-btn {
    display: inline-flex; align-items: center; gap: .35rem;
    background: rgba(255,255,255,.16); color: #fff;
    border: 1px solid rgba(255,255,255,.45); border-radius: var(--radius-pill);
    padding: .15rem .7rem; font: inherit; font-size: .78rem; font-weight: 600;
    cursor: pointer; transition: background .15s, border-color .15s;
}
.beta-report-btn:hover { background: rgba(255,255,255,.28); border-color: #fff; }
.beta-report-btn svg { flex: 0 0 auto; }

/* ---------- feedback (report issue / idea) modal ---------- */
.fb-overlay {
    position: fixed; inset: 0; z-index: 1300;
    display: flex; align-items: center; justify-content: center; padding: 1.25rem;
    background: rgba(20, 20, 20,.55); overflow-y: auto;
}
/* Hide the dialog while the screen-capture frame is grabbed so it isn't in the screenshot. */
.fb-overlay.fb-capturing { visibility: hidden; }
/* Dedicated backdrop element is the only close target, so drag-selecting text inside the card and
   releasing outside it can't bubble a click into a close (the card is a sibling, not a child). */
.fb-backdrop { position: absolute; inset: 0; z-index: 0; }
.fb-card {
    position: relative; z-index: 1; width: min(34rem, 100%);
    background: var(--bg); border-radius: var(--radius);
    box-shadow: 0 24px 70px rgba(0,0,0,.35);
    padding: 1.9rem 1.8rem 1.5rem; margin: auto;
    text-align: left; color: var(--ink);
}
.fb-close {
    position: absolute; top: .5rem; right: .7rem; border: 0; background: none;
    font-size: 1.6rem; line-height: 1; color: var(--ink-mute); cursor: pointer;
}
.fb-close:hover { color: var(--ink); }
.fb-title { font-size: 1.3rem; margin: 0 1.5rem .35rem 0; }
.fb-sub { margin: 0 0 1rem; color: var(--ink-soft); font-size: .9rem; line-height: 1.5; }

.fb-type { display: inline-flex; gap: .4rem; margin: 0 0 1rem; }
.fb-type-opt {
    border: 1px solid var(--line-strong); background: var(--bg-elev); color: var(--ink-soft);
    border-radius: var(--radius-pill); padding: .35rem .9rem; font: inherit; font-size: .85rem; font-weight: 600;
    cursor: pointer; transition: all .15s;
}
.fb-type-opt.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }

.fb-label { display: block; font-size: .78rem; font-weight: 600; color: var(--ink-soft);
    margin: .85rem 0 .3rem; text-transform: uppercase; letter-spacing: .04em; }
.fb-input {
    width: 100%; font: inherit; font-size: .95rem; color: var(--ink);
    background: var(--bg-elev); border: 1px solid var(--line-strong); border-radius: var(--radius);
    padding: .55rem .7rem;
}
.fb-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.fb-textarea { resize: vertical; min-height: 5.5rem; line-height: 1.5; }

.fb-image-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.fb-img-btn { font-size: .85rem; cursor: pointer; }
.fb-img-btn.btn-ghost { border: 1px dashed var(--line-strong); }
.fb-file-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }

.fb-preview {
    position: relative; display: inline-block; max-width: 100%;
    border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg-elev);
}
.fb-preview img { display: block; max-width: 100%; max-height: 220px; object-fit: contain; }
.fb-preview-remove {
    position: absolute; top: .3rem; right: .3rem; width: 1.6rem; height: 1.6rem;
    border: 0; border-radius: 50%; background: rgba(20, 20, 20,.7); color: #fff;
    font-size: 1.1rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center;
}

.fb-error {
    margin-top: .85rem; padding: .55rem .7rem; border-radius: var(--radius);
    background: #f8e8e8; color: #7a2020; font-size: .85rem; border: 1px solid #d9b5b5;
}
.fb-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1.3rem; }
.fb-meta-note { margin: .8rem 0 0; font-size: .73rem; color: var(--ink-mute); line-height: 1.4; }

.fb-success { text-align: center; padding: 1rem .5rem; }
.fb-success-mark {
    width: 3rem; height: 3rem; margin: 0 auto .5rem; border-radius: 50%;
    background: var(--ok-soft); color: var(--ok); font-size: 1.6rem;
    display: flex; align-items: center; justify-content: center;
}
.fb-success h3 { margin: 0 0 .4rem; }
.fb-success p { margin: 0 0 1.2rem; color: var(--ink-soft); }

/* ---------- feedback survey (Anketa) ---------- */
/* The survey is taller than the bug/idea form, so let the card scroll within the viewport. */
.fb-card.is-survey { max-height: calc(100vh - 2.5rem); overflow-y: auto; }

.fb-q { margin: 1.1rem 0 0; }
.fb-q-label { display: block; font-size: .92rem; font-weight: 600; color: var(--ink); margin: 0 0 .5rem; line-height: 1.4; }
.fb-q-hint { font-weight: 400; color: var(--ink-mute); font-size: .8rem; }

.fb-options { display: flex; flex-direction: column; gap: .4rem; }
.fb-opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.fb-opt {
    display: flex; align-items: center; gap: .55rem;
    padding: .5rem .7rem; border: 1px solid var(--line-strong); border-radius: var(--radius);
    background: var(--bg-elev); cursor: pointer; font-size: .88rem; color: var(--ink-soft);
    transition: border-color .15s, background .15s, color .15s; line-height: 1.35;
}
.fb-opt:hover { border-color: var(--accent); }
.fb-opt.is-checked { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.fb-opt input { accent-color: var(--accent); width: 1rem; height: 1rem; flex: 0 0 auto; margin: 0; }
.fb-opt-consent { align-items: flex-start; }
.fb-opt-consent input { margin-top: .15rem; }
.fb-other-input { margin-top: .45rem; }

.fb-nps { display: flex; gap: .3rem; flex-wrap: wrap; }
.fb-nps-btn {
    width: 2rem; height: 2rem; border: 1px solid var(--line-strong); border-radius: var(--radius);
    background: var(--bg-elev); color: var(--ink-soft); font: inherit; font-size: .82rem; font-weight: 600;
    cursor: pointer; transition: background .12s, border-color .12s, color .12s;
}
.fb-nps-btn:hover { border-color: var(--accent); }
.fb-nps-btn.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.fb-nps-scale { display: flex; justify-content: space-between; font-size: .7rem; color: var(--ink-mute); margin-top: .3rem; }

@media (max-width: 480px) { .fb-opt-grid { grid-template-columns: 1fr; } }

/* ---------- feedback floating button + second-login nudge ---------- */
/* Bottom-left, opposite the AI assistant fab (bottom-right) so they never overlap. */
.fb-fab-wrap {
    position: fixed; left: 1.5rem; bottom: 1.5rem; z-index: 60;
    display: flex; flex-direction: column; align-items: flex-start; gap: .65rem;
}
.fb-fab {
    position: relative; isolation: isolate;
    width: 3.4rem; height: 3.4rem; border-radius: 50%; border: none; cursor: pointer;
    background: var(--accent); color: #fff;
    box-shadow: 0 10px 24px rgba(26, 26, 26, .28);
    display: inline-flex; align-items: center; justify-content: center;
    transition: transform .15s, box-shadow .15s, background .15s;
}
.fb-fab:hover {
    background: var(--accent-ink); transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(26, 26, 26, .34);
}
/* attention glow: an expanding "ping" ring + a gentle breathing halo, both behind the button */
.fb-fab::before, .fb-fab::after {
    content: ""; position: absolute; inset: 0; border-radius: 50%;
    z-index: -1; pointer-events: none;
}
.fb-fab::before {
    box-shadow: 0 0 0 0 rgba(10, 10, 10, .5);
    animation: fb-fab-ping 2.4s ease-out infinite;
}
.fb-fab::after {
    box-shadow: 0 0 14px 3px rgba(10, 10, 10, .5);
    animation: fb-fab-breathe 2.4s ease-in-out infinite;
}
@keyframes fb-fab-ping {
    0%   { box-shadow: 0 0 0 0 rgba(10, 10, 10, .5); }
    70%  { box-shadow: 0 0 0 16px rgba(10, 10, 10, 0); }
    100% { box-shadow: 0 0 0 0 rgba(10, 10, 10, 0); }
}
@keyframes fb-fab-breathe {
    0%, 100% { opacity: .5; }
    50%      { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .fb-fab::before, .fb-fab::after { animation: none; }
    .sv3d-ico.is-spin { animation: none; }
}

.fb-nudge {
    position: relative; width: 16.5rem; max-width: calc(100vw - 3rem);
    background: var(--bg-elev); border: 1px solid var(--line-strong); border-radius: var(--radius);
    box-shadow: 0 14px 34px rgba(26, 26, 26, .22);
    padding: .9rem 1rem 1rem; animation: fb-nudge-in .25s ease;
}
/* little speech-bubble tail pointing down toward the fab */
.fb-nudge::after {
    content: ""; position: absolute; left: 1.4rem; bottom: -7px; width: 12px; height: 12px;
    background: var(--bg-elev); border-right: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong);
    transform: rotate(45deg);
}
.fb-nudge-text { margin: 0 0 .7rem; font-size: .86rem; line-height: 1.45; color: var(--ink-soft); }
.fb-nudge-cta { width: 100%; justify-content: center; }
.fb-nudge-close {
    position: absolute; top: .25rem; right: .45rem; border: 0; background: none;
    font-size: 1.25rem; line-height: 1; color: var(--ink-mute); cursor: pointer;
}
.fb-nudge-close:hover { color: var(--ink); }
@keyframes fb-nudge-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- e-mail confirmation gate (projects screen) ---------- */
.email-confirm-card {
    display: flex; gap: 1rem; align-items: flex-start;
    background: var(--accent-soft); border: 1px solid var(--line-strong);
    border-radius: var(--radius); padding: 1.1rem 1.25rem; margin: 0 0 1.75rem;
}
.email-confirm-ico {
    flex: 0 0 auto; width: 2.4rem; height: 2.4rem; border-radius: 50%;
    background: var(--accent); color: #fff; font-size: 1.2rem;
    display: flex; align-items: center; justify-content: center;
}
.email-confirm-body { flex: 1; min-width: 0; }
.email-confirm-body h2 { font-size: 1.15rem; margin: 0 0 .35rem; }
.email-confirm-body p { margin: 0 0 .85rem; color: var(--ink-soft); line-height: 1.55; }
.email-confirm-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.email-confirm-msg { margin: .8rem 0 0; font-size: .9rem; font-weight: 600; color: var(--accent-ink); }

/* ---------- onboarding (guided spotlight tour) ---------- */
/* Full-screen layer that captures clicks (blocks the page underneath). For centered steps it dims
   directly; for targeted steps the dimming comes from the spotlight hole's huge box-shadow. */
.onboard { position: fixed; inset: 0; z-index: 1200; }
.onboard.is-centered { background: rgba(20, 20, 20,.55); }
/* Full-viewport dim with the spotlight hole cut out via clip-path (set inline). Deliberately NOT
   a huge (9999px) box-shadow spread - Firefox/WebRender fails to rasterize such oversized shadow
   surfaces on HiDPI (4K at 150% scale), blanking the whole overlay - and NOT four abutting strips,
   which leave an undimmed hairline along the hole's fractional edges at non-integer dpr. */
.onboard-dim {
    position: fixed; inset: 0; background: rgba(20, 20, 20,.62); pointer-events: none;
    transition: clip-path .25s ease;
}
/* Transparent cutout over the highlighted element (accent ring only; the strips do the dimming). */
.onboard-hole {
    position: fixed; border-radius: var(--radius); pointer-events: none;
    outline: 2px solid var(--accent); outline-offset: 2px;
    transition: top .25s ease, left .25s ease, width .25s ease, height .25s ease;
}
.onboard-card {
    position: fixed; width: min(21.25rem, 92vw);
    background: var(--bg); border-radius: var(--radius));
    box-shadow: 0 24px 70px rgba(0,0,0,.35); padding: 1.6rem 1.6rem 1.25rem; text-align: center;
    transition: top .25s ease, bottom .25s ease, left .25s ease;
    /* CardStyle emits its own max-height, capped to the room that side of the target actually has -
       this is only the floor for the centered card (and for a render before the first measurement).
       A cap against the VIEWPORT alone is not enough: a card placed near the bottom stays under
       100vh while still overrunning the screen, which is exactly how the actions row got lost. */
    max-height: calc(100vh - 24px); overflow-y: auto;
}
.onboard-card.is-centered { top: 50%; left: 50%; width: min(30rem, 92vw); transform: translate(-50%, -50%); padding: 2rem 1.9rem 1.5rem; }
.onboard-close {
    position: absolute; top: .6rem; right: .7rem; border: 0; background: none;
    font-size: 1.5rem; line-height: 1; color: var(--ink-mute); cursor: pointer;
}
.onboard-art { font-size: 2.4rem; line-height: 1; }
.onboard-step { margin-top: .6rem; font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-mute); }
.onboard-title { margin: .35rem 0 .5rem; font-size: 1.4rem; }
.onboard-body { margin: 0 auto; max-width: 28rem; color: var(--ink-soft); line-height: 1.6; }
.onboard-dots { display: flex; justify-content: center; gap: .4rem; margin: 1.25rem 0; }
.onboard-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); transition: background .2s, width .2s; }
.onboard-dot.is-active { background: var(--accent); width: 18px; border-radius: var(--radius-pill); }
.onboard-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.onboard-actions-right { display: flex; gap: .5rem; }
.app-nav {
    border-bottom: 1px solid var(--line);
    background: var(--bg);
    position: sticky; top: 0; z-index: 10;
    backdrop-filter: saturate(1.4) blur(6px);
}
/* The landing's height and logo (#1191: --nav-pad-y / --nav-logo-h); the inset stays the app column's. */
.app-nav-inner {
    max-width: var(--max); margin: 0 auto; padding: var(--nav-pad-y) clamp(1rem, 3vw, 2rem);
    min-height: calc(var(--nav-logo-h) + 2 * var(--nav-pad-y));
    display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap;
}
.brand {
    font-family: var(--font-serif); font-weight: 400; font-size: 1.15rem;
    color: var(--ink); display: inline-flex; align-items: center; gap: .5rem;
    border: none;
}
.brand-mark { color: var(--accent); font-size: 1.3rem; }
.brand-logo { height: var(--nav-logo-h); width: auto; display: block; }
.brand-glyph { width: 1em; height: 1em; vertical-align: -0.12em; }
.brand-tag {
    font-family: var(--font-sans); font-weight: 500; font-size: .8rem;
    color: var(--ink-mute); letter-spacing: .01em;
}
.brand:hover { border: none; }

.nav-links {
    display: flex; gap: .25rem; margin-left: auto; flex-wrap: wrap;
    align-items: center;
    font-size: .875rem;
}
.nav-links a {
    display: inline-flex; align-items: center;
    padding: .35rem .75rem; border-radius: var(--radius);
    color: var(--ink-soft); border: none; font-weight: 500;
    white-space: nowrap; line-height: 1.4;
}
.nav-links a:hover { color: var(--ink); background: var(--bg-elev); }
.nav-links a.active { color: var(--ink); background: var(--bg-elev); }
.nav-links a .count { color: var(--ink-mute); font-variant-numeric: tabular-nums; font-size: .75rem; margin-left: .35rem; }

/* Prominent, glowing "Hiša v 3D" nav entry - an accent pill that pulses to draw the eye, set apart
   from the muted text links around it. Overrides the base .nav-links a colour/weight. */
.nav-links a.nav-link-3d {
    color: #fff; font-weight: 700; gap: .35rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-ink));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent),
                0 0 12px 1px color-mix(in srgb, var(--accent) 55%, transparent);
    animation: nav-3d-glow 2.4s ease-in-out infinite;
    transition: transform .15s, box-shadow .15s;
}
.nav-links a.nav-link-3d:hover,
.nav-links a.nav-link-3d.active {
    color: #fff; transform: translateY(-1px);
    background: linear-gradient(135deg, var(--accent-ink), var(--accent));
}
.nav-link-3d-ico { display: inline-flex; align-items: center; }
.nav-link-3d-ico svg { width: 1.05rem; height: 1.05rem; }
/* Disabled entry: a phase-flow project with no saved parcel yet (the 3D view is built from it).
   A muted, non-clickable pill - no glow - that hints (via title) to look up the parcel first. */
.nav-links .nav-link-3d.is-disabled {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .35rem .75rem; border-radius: var(--radius);
    font-weight: 600; font-size: .875rem; white-space: nowrap; line-height: 1.4;
    color: var(--ink-mute); background: var(--bg-elev);
    border: 1px dashed var(--line-strong); cursor: not-allowed; animation: none;
}
.nav-links .nav-link-3d.is-disabled .nav-link-3d-ico { opacity: .7; }
@keyframes nav-3d-glow {
    0%, 100% { box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent),
                           0 0 8px 0 color-mix(in srgb, var(--accent) 40%, transparent); }
    50%      { box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 60%, transparent),
                           0 0 18px 3px color-mix(in srgb, var(--accent) 70%, transparent); }
}
@media (prefers-reduced-motion: reduce) {
    .nav-links a.nav-link-3d { animation: none; }
}

.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
    appearance: none; border: none; background: transparent;
    padding: .35rem .75rem; border-radius: var(--radius);
    font-family: var(--font-sans); font-size: .875rem; font-weight: 500;
    color: var(--ink-soft); cursor: pointer;
    display: inline-flex; align-items: center; gap: .3rem;
    transition: background .15s, color .15s;
}
.nav-dropdown-toggle:hover { color: var(--ink); background: var(--bg-elev); }
.nav-dropdown.open .nav-dropdown-toggle { color: var(--ink); background: var(--bg-elev); }
.nav-dropdown-chevron {
    font-size: .7rem; color: var(--ink-mute); transition: transform .15s;
}
.nav-dropdown.open .nav-dropdown-chevron { transform: rotate(180deg); color: var(--ink-soft); }
.nav-dropdown-backdrop {
    position: fixed; inset: 0; z-index: 18; background: transparent; cursor: default;
}
.nav-dropdown-menu {
    position: absolute; top: calc(100% + .35rem); left: 0; z-index: 20;
    min-width: 16rem; background: var(--bg-elev);
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    box-shadow: 0 12px 28px rgba(26, 26, 26, .12);
    padding: .35rem; display: flex; flex-direction: column; gap: 0;
}
.nav-dropdown-menu .nav-dropdown-item {
    display: flex; align-items: baseline; gap: .75rem;
    padding: .55rem .75rem; border-radius: var(--radius);
    font-family: var(--font-sans); font-size: .9rem; font-weight: 500;
    color: var(--ink-soft); border: none;
    white-space: nowrap;
}
.nav-dropdown-menu .nav-dropdown-item:hover { background: var(--bg); color: var(--ink); }
.nav-dropdown-menu .nav-dropdown-item.active { background: var(--bg); color: var(--ink); }
.nav-dropdown-menu .nav-dropdown-item .nav-dropdown-dot {
    flex: none; width: .55rem; height: .55rem; border-radius: 50%;
    background: var(--phase-color, var(--accent)); align-self: center;
}
.nav-dropdown-menu .nav-dropdown-item.active .nav-dropdown-dot {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--phase-color, var(--accent)) 30%, transparent);
}
.nav-dropdown-menu .nav-dropdown-item > span:nth-child(2) { flex: 1; }
/* user-menu rows: icon + label, vertically centred with a tight gap. The base .nav-dropdown-item uses
   baseline alignment (for the phase dropdown's text+count layout), which left odd gaps with the icons. */
.nav-user-menu .nav-dropdown-item { align-items: center; gap: .6rem; }
.nav-dropdown-menu .nav-dropdown-item .nav-dropdown-ico {
    flex: none; width: 1.15rem; height: 1.15rem;
    display: flex; align-items: center; justify-content: center; align-self: center;
}
.nav-dropdown-menu .nav-dropdown-item .nav-dropdown-ico svg { width: 17px; height: 17px; display: block; }
.nav-dropdown-menu .nav-dropdown-item .count {
    color: var(--ink-mute); font-variant-numeric: tabular-nums;
    font-size: .78rem; margin-left: 0;
}
/* Phase marked "ni relevantno": dim the row and strike its title (matches the phase header). */
.nav-dropdown-menu .nav-dropdown-item.is-irrelevant { opacity: .6; }
.nav-dropdown-menu .nav-dropdown-item.is-irrelevant .nav-phase-title {
    text-decoration: line-through; text-decoration-color: var(--ink-mute);
}

/* Reusable circular phase badge: phase color + phase number. */
.phase-badge {
    flex: none; align-self: center;
    display: inline-flex; align-items: center; justify-content: center;
    width: 1.3rem; height: 1.3rem; border-radius: 50%;
    background: var(--phase-color, var(--accent)); color: #fff;
    font-size: .68rem; font-weight: 700; line-height: 1;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--phase-color, var(--accent)) 22%, transparent);
}
.phase-cell { display: inline-flex; align-items: center; gap: .5rem; }

/* ---------- hamburger (collapses the nav links on phones) ---------- */
.nav-hamburger {
    display: none; /* desktop: links are shown inline, no hamburger */
    appearance: none; flex: none; cursor: pointer;
    width: 2.6rem; height: 2.6rem; padding: 0;
    align-items: center; justify-content: center;
    background: var(--bg-elev); color: var(--ink);
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    transition: border-color .15s, background .15s;
}
.nav-hamburger:hover { border-color: var(--ink); }

@media (max-width: 760px) {
    /* Keep the bar to a single row: brand on the left, avatar + hamburger on the right. */
    .app-nav-inner { flex-wrap: nowrap; gap: .6rem; }   /* height and logo: the phone step of --nav-pad-y / --nav-logo-h */
    .nav-user { margin-left: auto; }
    .nav-hamburger { display: inline-flex; }
    /* Avatar-only account button on phones: the full name pushed the bar past the viewport
       (horizontal scroll on every signed-in page). The dropdown still shows the name. */
    .nav-user-label { display: none; }

    /* The links drop into a full-width panel under the bar, toggled by .nav-open. */
    .nav-links {
        display: none;
        position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: .1rem;
        margin: 0; padding: .5rem clamp(1.25rem, 4vw, 2rem) .85rem;
        background: var(--bg-elev); border-bottom: 1px solid var(--line-strong);
        box-shadow: 0 16px 28px rgba(26, 26, 26, .14);
    }
    .app-nav.nav-open .nav-links { display: flex; }
    /* Scope everything to .nav-links so the account (UserMenu) dropdown keeps its floating layout. */
    .nav-links > * { width: 100%; }
    .nav-links a,
    .nav-links .nav-link-3d.is-disabled,
    .nav-links .nav-dropdown-toggle { width: 100%; padding: .7rem .75rem; font-size: 1rem; }
    /* The "Faze" submenu expands inline within the panel instead of as a floating dropdown. */
    .nav-links .nav-dropdown-menu {
        position: static; min-width: 0; border: none; box-shadow: none;
        padding: .15rem 0 .35rem .5rem;
    }
}

.app-main {
    max-width: var(--max); margin: 0 auto; padding: 1.5rem clamp(1rem, 3vw, 2rem) 3.5rem;
    width: 100%;
}
/* Wide layout for data-dense pages (Terminski Plan) - uses the available width, capped on huge screens. */
.app-main-wide { max-width: min(1800px, 100%); }

.app-footer {
    border-top: 1px solid var(--line);
    padding: 1.1rem 1.5rem;
    text-align: center;
    color: var(--ink-mute);
    font-size: .85rem;
    display: flex; flex-direction: column; align-items: center; gap: .3rem;
}
.app-footer-links { display: flex; gap: 1.25rem; flex-wrap: wrap; justify-content: center; }
.app-footer-link {
    background: none; border: 0; padding: 0; cursor: pointer; font: inherit;
    color: var(--ink-soft); border-bottom: 1px solid transparent; transition: border-color .15s;
}
.app-footer-link:hover { color: var(--accent); border-bottom-color: currentColor; }
/* The version doubles as the link to "Kaj je novega" - dotted so it reads as clickable inside the
   copyright line without shouting. */
.app-footer-version { text-decoration: none; border-bottom-style: dotted; border-bottom-color: currentColor; }
.app-footer-gurs { max-width: 760px; font-size: .72rem; line-height: 1.5; color: var(--ink-mute); }
.app-footer-gurs a { color: inherit; border-bottom-color: currentColor; }

/* ---------- admin: invite codes ---------- */
.invite-create {
    display: flex; gap: .75rem; align-items: flex-end; flex-wrap: wrap;
    margin: 1.25rem 0 1.75rem;
}
.invite-create-field { display: flex; flex-direction: column; gap: .25rem; }
.invite-create-field label { font-size: .75rem; font-weight: 600; color: var(--ink-mute); text-transform: uppercase; letter-spacing: .06em; }
.invite-create-field .type-input { width: 9rem; }
.invite-create-note { flex: 1; min-width: 12rem; }
.invite-create-note .type-input { width: 100%; }
.invite-table code.invite-code { font-size: .92rem; font-weight: 600; letter-spacing: .02em; }
.invite-table tr.is-revoked { opacity: .55; }
/* a sent invite is struck through so it's clear it has already been handed out */
.invite-table tr.is-sent code.invite-code {
    text-decoration: line-through; text-decoration-color: var(--ink-mute); color: var(--ink-mute);
}
.invite-status {
    display: inline-block; font-size: .72rem; font-weight: 700; padding: .12rem .5rem;
    border-radius: var(--radius-pill); color: #fff; background: var(--ink-mute);
}
.invite-status-active { background: #3f7d4f; }
.invite-status-used { background: var(--ink-mute); }
.invite-status-expired { background: #c6892b; }
.invite-status-revoked { background: #b5483f; }
.invite-table th.invite-sent-col, .invite-table td.invite-sent-col { text-align: center; }
.invite-sent-check { display: inline-flex; cursor: pointer; }
.invite-sent-check input { width: 1.1rem; height: 1.1rem; cursor: pointer; accent-color: #3f7d4f; }

/* ---------- admin list controls (filter row), shared by Invites & Users ----------
   The pager below the tables reuses the iskalnik's .search-pager styles. */
.admin-list-controls {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; flex-wrap: wrap; margin: 0 0 1rem;
}
.admin-filters { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.admin-filter-input { width: min(24rem, 100%); }
.admin-status-filter { width: auto; }
.admin-period-label { font-size: .82rem; font-weight: 600; color: var(--ink-soft); }
.admin-pager-info { color: var(--ink-mute); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* leading sequence-number column */
.admin-seq-col { width: 3rem; text-align: right; color: var(--ink-mute); font-variant-numeric: tabular-nums; }

/* ---------- hero ---------- */
.hero { margin-bottom: 2rem; }
.hero-back {
    display: inline-flex; align-items: center; gap: .3rem;
    font-size: .82rem; font-weight: 600; color: var(--ink-soft);
    border-bottom: none; margin-bottom: .6rem;
}
.hero-back:hover { color: var(--accent); }
.hero-eyebrow {
    font-family: var(--font-sans); font-size: .75rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.18em;
    color: var(--accent); margin-bottom: .5rem;
}
.hero h1 em {
    font-style: italic; font-weight: 400; color: var(--accent-ink);
}
/* Project title is the page's focal point - larger than the default h1. */
.hero-title { font-size: clamp(1.9rem, 3.6vw, 2.75rem); line-height: 1.05; }
.hero-lead {
    font-family: var(--font-sans); font-size: 1.08rem; line-height: 1.5;
    color: var(--ink-soft); font-weight: 400;
    max-width: 40rem; margin: .75rem 0 0;
}
.hero-meta {
    margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line);
    display: flex; gap: 2rem; flex-wrap: wrap; font-size: .85rem; color: var(--ink-mute);
}
.hero-meta strong { color: var(--ink); font-weight: 600; }

/* ---------- timeline ---------- */
.timeline-head {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-bottom: .9rem; gap: 1rem; flex-wrap: wrap;
}
.timeline-head h2 { font-size: 1rem; font-family: var(--font-sans); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-mute); }

.phases { display: grid; gap: 0; position: relative; }
.phase-row { position: relative; }
/* Disable-phase toggle: a sibling of the card link (not nested in the <a>), floated top-right so a
   click toggles relevance instead of navigating into the phase. */
.phase-toggle {
    position: absolute; top: .9rem; right: 1.1rem; z-index: 2;
    display: inline-flex; align-items: center; gap: .35rem;
    font-family: var(--font-sans); font-size: .72rem; font-weight: 600;
    padding: .28rem .65rem; border-radius: var(--radius-pill); cursor: pointer;
    border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink-mute);
    transition: border-color .12s, color .12s, background .12s;
}
.phase-toggle:hover { border-color: var(--ink); color: var(--ink); background: var(--bg-elev); }
.phase-toggle.is-on { background: var(--ink-mute); border-color: var(--ink-mute); color: #fff; }
.phase-card {
    display: grid; grid-template-columns: 2.5rem 1fr auto; gap: 1rem;
    padding: .9rem 1.25rem; border-top: 1px solid var(--line);
    border-left: 4px solid var(--phase-color, transparent);
    align-items: center;
    transition: background .15s;
    text-decoration: none; border-bottom: none;
}
.phase-row:last-child .phase-card { border-bottom: 1px solid var(--line); }
.phase-card:hover { background: var(--bg-elev); }
.phase-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2.15rem; height: 2.15rem; border-radius: 50%;
    background: var(--phase-color, var(--accent)); color: #fff;
    font-family: var(--font-sans); font-weight: 700; font-size: .95rem;
    line-height: 1; font-variant-numeric: tabular-nums;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--phase-color, var(--accent)) 20%, transparent);
}
.phase-body { min-width: 0; }
.phase-title { font-family: var(--font-serif); font-size: 1.2rem; font-weight: 400; color: var(--ink); line-height: 1.2; }
.phase-intro { font-size: .9rem; color: var(--ink-soft); margin-top: .2rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.phase-progress { display: flex; flex-direction: column; align-items: flex-end; gap: .4rem; min-width: 8rem; }
.phase-ratio { font-family: var(--font-sans); font-variant-numeric: tabular-nums; color: var(--ink); font-size: 1rem; font-weight: 600; }
.phase-ratio span { color: var(--ink-mute); font-weight: 400; }
.phase-bar { width: 8rem; height: 3px; background: var(--line); overflow: hidden; }
.phase-bar-fill { height: 100%; background: var(--phase-color, var(--accent)); transition: width .3s ease; }
.phase-bar-fill.full { background: var(--ok); }
.phase-card.is-irrelevant { opacity: .55; }
.phase-card.is-irrelevant .phase-num { background: var(--ink-mute); }
.phase-irrelevant-badge {
    font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
    color: #fff; background: var(--ink-mute); padding: .2rem .55rem; border-radius: var(--radius-pill); white-space: nowrap;
}

/* ---------- phase page ---------- */
.phase-header {
    display: flex; justify-content: space-between; gap: 2rem;
    /* Top-align the columns: the right-hand progress/budget stat must NOT bottom-align with the
       text block, otherwise a longer/shorter chapter intro changes the text-block height and shoves
       the <h1> up or down — so the heading appeared to jump vertically when switching chapters. */
    align-items: flex-start; padding-bottom: 1rem;
    border-bottom: 1px solid var(--line); margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.phase-header-text { flex: 1; min-width: 16rem; }
.phase-header .eyebrow {
    font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .18em;
    color: var(--phase-color, var(--accent)); margin-bottom: .4rem;
}
/* The page description runs the full width of its column. It used to stop at 36rem - a comfortable
   measure in the abstract, but on a notebook sheet or a --max board page it wrapped a two-line intro
   into four and left half the page empty beside it, which reads as a layout accident rather than as
   typography. The column itself (sheet, --max, .phase-header-text) is the measure. */
.phase-header .intro { color: var(--ink-soft); margin-top: .5rem; }
/* Back link folded into the eyebrow row (breadcrumb-style) so it no longer eats a whole row. */
.phase-eyebrow-row { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; margin-bottom: .4rem; }
.phase-eyebrow-row .eyebrow { margin-bottom: 0; }
.phase-back {
    display: inline-flex; align-items: center; gap: .2rem;
    font-size: .78rem; color: var(--ink-mute); text-decoration: none;
}
.phase-back::after { content: "·"; margin-left: .55rem; color: var(--line-strong); }
.phase-back:hover { color: var(--accent-ink); }
/* Zemljišče: lokacijsko-poročilo filing tab sticking out the notebook's top-right edge (like the
   schedule's view tabs). Positioned against the journal-page (position:relative). */
.journal-spread.has-corner-tab { margin-top: 1.6rem; }   /* room above for the tab to stick out */
.phase-corner-tab {
    position: absolute; right: 2.5rem; bottom: calc(100% - 1px); z-index: 6;
    display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; text-decoration: none;
    padding: .5rem 1rem; font-family: var(--font-sans); font-size: 1.05rem; font-weight: 700; line-height: 1.15;
    color: #fff; background: linear-gradient(180deg, var(--accent), var(--accent-ink));
    border: 1px solid var(--accent-ink); border-bottom: none; border-radius: var(--radius) var(--radius) 0 0;
    box-shadow: 0 -3px 8px rgba(26, 26, 26, .12); transition: filter .14s ease, transform .14s ease;
}
.phase-corner-tab:hover { filter: brightness(1.07); transform: translateY(-1px); }
.phase-corner-tab .icon { flex: 0 0 auto; }
.phase-stat {
    text-align: right; font-family: var(--font-sans);
}
.phase-stat-num { font-size: 2rem; font-weight: 800; line-height: 1; color: var(--ink); }
.phase-stat-num span { color: var(--ink-mute); font-weight: 400; }
.phase-stat-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .15em; color: var(--ink-mute); margin-top: .5rem; font-family: var(--font-sans); font-weight: 500; }
.phase-stat-bar { width: 9rem; height: 3px; background: var(--line); margin-top: .75rem; margin-left: auto; }
.phase-stat-bar-fill { height: 100%; background: var(--phase-color, var(--accent)); }
.phase-stat-bar-fill.full { background: var(--ok); }
.phase-budget { margin-top: 1rem; display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; }
.phase-budget-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-mute); }
.phase-budget-wrap { width: 8rem; }
.phase-budget-input { width: 100%; text-align: right; }
.phase-budget-spent { font-size: .8rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.phase-budget-spent.is-over { color: #b5483f; font-weight: 600; }

.section-block { margin-bottom: 1.75rem; }
.section-head {
    display: flex; align-items: baseline; gap: .75rem; margin-bottom: .6rem;
    padding-bottom: .35rem; border-bottom: 1px dashed var(--line-strong);
}
.section-head h2 {
    font-family: var(--font-serif); font-size: 1.15rem; font-weight: 400;
}
.section-head .section-count { color: var(--ink-mute); font-size: .8rem; font-variant-numeric: tabular-nums; margin-left: auto; }
.section-intro { color: var(--ink-soft); font-size: .92rem; margin: 0 0 .75rem; }

/* minmax(0, 1fr), not the implicit auto column: an auto track is as wide as its widest row WANTS to be, so one
   task whose panel carries a row of nowrap tabs made every row - and the page - 675 px wide on a phone. */
.checklist { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: .4rem; }
.checklist > * { min-width: 0; }

.item {
    /* the card's padding, named: the ✦ suggestion strip at its foot (.task-suggested) bleeds to the border by
       cancelling exactly this, so the two can't drift apart again (#1161) */
    --item-pad-y: .55rem; --item-pad-x: .85rem;
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: var(--item-pad-y) var(--item-pad-x);
    transition: border-color .15s, box-shadow .15s, background .2s;
}
.item:hover { border-color: var(--line-strong); }
.item.is-done { background: #d5e7d3; border-color: #9cc0a2; }
.item.is-wip { background: #fae8ca; border-color: #ddb377; }
.item.is-na { background: #e4e4e4; border-color: #cfcfcf; opacity: .78; }
.item.is-na .item-label { color: var(--ink-mute); text-decoration: line-through; text-decoration-color: var(--ink-mute); text-decoration-style: dotted; }
/* The builder's "ni relevantno" on a professional gradbišče: out of their plan, not out of sight - the row reads as
   usual, only its status says "Ni relevantno" (a whole phase gets a slash by its title and on its bookmark). */
.item.is-na.is-na-quiet { background: var(--bg-elev); border-color: var(--line); opacity: 1; }
.item.is-na.is-na-quiet .item-label { color: inherit; text-decoration: none; }

/* ---------- important tasks ---------- */
/* The flag itself moved into the task's ⋯ menu; what is left on the row is the card's gold edge below
   and, in the menu, the filled flag on the active row. */
.task-menu-flag.is-active .schedule-menu-ico svg { fill: currentColor; color: #c4831c; }
/* Waiting on another task. Dimmed like a task that is out of play, because that is what it is today:
   the work in front of it comes first, and the ⛔ mark under the title names it. Most dependencies are
   soft, so the row stays fully operable - only a STRICT one (is-hardblocked) switches the tick and the
   status picker off, and there the server would refuse the change anyway. */
.item.is-blocked { opacity: .74; }
.item.is-blocked .item-label { color: var(--ink-soft); }
.item.is-hardblocked .item-check,
.item.is-hardblocked .status-select { cursor: not-allowed; }
.item.is-hardblocked .item-check:hover { border-color: var(--line-strong); }

.item.is-important {
    border-color: #e0a93e;
    box-shadow: 0 0 0 1px #e0a93e, 0 0 16px rgba(224, 169, 62, .4);
}
.gantt-bar.is-important {
    box-shadow: 0 0 0 1.5px #fff, 0 0 0 3px #e3a93c, 0 0 10px 2px rgba(227, 169, 60, .9);
}
.item-row { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; }

/* The accordion chevron in its new place: in front of the number, as a bare ">" and nothing else. No
   box, no hover pill - it opens a panel rather than changing anything, and a third round control beside
   the tick chopped the row into pieces. It turns down when open (.item-expand.is-open, further down). */
.item-expand-lead {
    appearance: none; border: none; background: none; padding: 0; margin-right: -.5rem;
    display: inline-flex; align-items: center; flex-shrink: 0;
    cursor: pointer; color: var(--ink-mute);
    transition: color .15s;
}
.item-expand-lead svg { width: 13px; height: 13px; }
.item-expand-lead:hover { color: var(--ink); }

/* The task's ⋯ menu. The popup hangs off the row's right edge like the plan's and the step's do; its
   rows are the actions that used to be a line of unlabelled icons. */
.task-menu { flex-shrink: 0; }
.task-menu-btn { font-size: 1.05rem; line-height: 1; }
.task-menu-pop { right: 0; left: auto; width: 20rem; max-width: min(20rem, 84vw); }
.schedule-menu-item.is-active { background: var(--accent-soft); }
.schedule-menu-item.is-active b { color: var(--accent-ink); }
/* A menu row that IS the file input's label, and one that holds the faza picker. */
.task-menu-file { cursor: pointer; }
.task-menu-move { align-items: flex-start; }
.task-menu-move .item-move-select { margin-top: .25rem; max-width: 100%; width: 100%; }

/* Status as a dropdown, tinted by the current state. */
.status-select {
    flex-shrink: 0; appearance: none; -webkit-appearance: none;
    height: 1.9rem; box-sizing: border-box;
    border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
    background-color: var(--bg); color: var(--ink-soft);
    font-family: var(--font-sans); font-size: .72rem; font-weight: 700; line-height: 1;
    text-transform: uppercase; letter-spacing: .05em;
    padding: 0 1.7rem 0 .8rem; cursor: pointer;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%238c8679' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M4 6l4 4 4-4'/></svg>");
    background-repeat: no-repeat; background-position: right .55rem center; background-size: .7rem;
    transition: border-color .15s, color .15s;
}
.status-select:focus { outline: none; border-color: var(--accent); }
/* "Premakni v fazo" select shown on uncategorized (Splošno) task rows - a compact neutral select. */
.item-move-select {
    flex-shrink: 0; appearance: none; -webkit-appearance: none;
    height: 2rem; max-width: 11rem; box-sizing: border-box;
    border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
    background-color: var(--bg-elev); color: var(--ink-soft);
    font-family: var(--font-sans); font-size: .74rem; font-weight: 600; line-height: 1;
    padding: 0 1.7rem 0 .8rem; cursor: pointer; text-overflow: ellipsis;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%238c8679' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M4 6l4 4 4-4'/></svg>");
    background-repeat: no-repeat; background-position: right .55rem center; background-size: .7rem;
    transition: border-color .15s;
}
.item-move-select:focus { outline: none; border-color: var(--accent); }
/* Architec Studio: black and white - the word and the weight of the frame tell the state, not red/amber/green. */
.status-select.is-todo { color: var(--ink); border-color: var(--line-strong); }
.status-select.is-wip { color: var(--ink); border-color: var(--ink); }
.status-select.is-done { color: var(--ink-soft); border-color: var(--line-strong); }
.status-select.is-na { color: var(--ink-mute); border-color: var(--line); }

.item-label {
    flex: 1; min-width: 14rem; font-size: 1rem; line-height: 1.35; cursor: text;
    color: var(--ink); user-select: text; font-weight: 600;
}
.item.is-done .item-label { color: var(--ink-soft); }

/* ───────── collapsible task rows (progressive disclosure) ───────── */

/* Title is now a button that expands the row; label/preview/badges stack inside it. */
.item-label-btn {
    flex: 1; min-width: 12rem; display: flex; flex-direction: column; align-items: flex-start; gap: .15rem;
    background: none; border: none; padding: 0; margin: 0; text-align: left; cursor: pointer; font: inherit;
}
.item-label-btn .item-label { flex: initial; min-width: 0; width: 100%; cursor: pointer; }
.item-label-preview {
    display: block; width: 100%; min-width: 0; max-width: 100%;
    font-size: .82rem; font-weight: 400; color: var(--ink-mute);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.item-badges { display: inline-flex; flex-wrap: wrap; gap: .35rem; margin-top: .1rem; }
.item-badge {
    display: inline-flex; align-items: center; gap: .2rem;
    font-size: .72rem; color: var(--ink-soft); background: var(--bg);
    border: 1px solid var(--line); border-radius: var(--radius-pill); padding: .1rem .4rem; line-height: 1.4;
}
.item-badge svg { width: 12px; height: 12px; }
.item-badge-n { font-variant-numeric: tabular-nums; }
/* A mark that carries only its icon is a circle, not a pill with air on both sides of a 12 px glyph -
   four of them sit in a row under the task title and the eye reads them as a set. */
.item-badge-round {
    width: 1.4rem; height: 1.4rem; padding: 0;
    justify-content: center; gap: 0; flex: none;
}

/* One-click done: round checkbox on the left of every row. */
.item-check {
    flex-shrink: 0; width: 1.45rem; height: 1.45rem; padding: 0;
    border: 2px solid var(--line-strong); border-radius: 50%; background: var(--bg);
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
    color: transparent; transition: background .15s, border-color .15s, color .15s;
}
.item-check:hover { border-color: var(--accent); }
.item-check-mark { font-size: .85rem; line-height: 1; }
.item-check.is-checked { background: #3d6b4a; border-color: #3d6b4a; color: #fff; }

/* Expand chevron rotates down when open. */
.item-expand svg { transition: transform .15s; }
.item-expand.is-open svg { transform: rotate(90deg); }

/* Detail panel (everything below the header) is only in the DOM when expanded. */
.item-detail { margin-top: .6rem; }

/* Multi-select mode. */
.item-select { flex-shrink: 0; display: inline-flex; align-items: center; }
.item-select input { width: 1.1rem; height: 1.1rem; cursor: pointer; }
.item.is-selectable .item-label-btn { cursor: pointer; }
.item.is-selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

/* ───────── phase task toolbar (filters · hide-completed · select) ───────── */
.task-toolbar {
    display: flex; align-items: center; justify-content: space-between; gap: .75rem;
    flex-wrap: wrap; margin-bottom: .7rem;
}
.task-filters { display: inline-flex; gap: .35rem; flex-wrap: wrap; }
.task-filter, .task-toolbar-toggle {
    appearance: none; border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink-soft);
    border-radius: var(--radius-pill); padding: .32rem .8rem; font-family: var(--font-sans); font-size: .78rem;
    font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.task-filter:hover, .task-toolbar-toggle:hover { border-color: var(--accent); }
.task-filter.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.task-toolbar-right { display: inline-flex; gap: .5rem; flex-wrap: wrap; }
.task-toolbar-toggle.is-on { background: var(--ink); border-color: var(--ink); color: var(--bg-elev); }
.task-empty { color: var(--ink-mute); font-size: .92rem; text-align: center; padding: 1.25rem 0; }
.task-show-all {
    display: flex; align-items: center; justify-content: center; gap: .4rem;
    width: 100%; margin-top: .75rem; appearance: none; cursor: pointer;
    background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
    border-radius: var(--radius);
    padding: .6rem; color: var(--accent-ink); font-family: var(--font-sans); font-weight: 600; font-size: .85rem;
}
.task-show-all:hover { border-color: var(--accent); }
.task-show-all-ico { transform: rotate(90deg); flex-shrink: 0; }

/* ───────── bulk-action bar (sticky while selecting) ───────── */
.bulk-bar { position: sticky; bottom: 1rem; z-index: 20; margin-top: 1.25rem; display: flex; justify-content: center; pointer-events: none; }
.bulk-bar-inner {
    pointer-events: auto; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
    background: var(--bg-elev); border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
    padding: .5rem .9rem; box-shadow: 0 8px 30px rgba(0, 0, 0, .18);
}
.bulk-count { font-weight: 700; font-size: .85rem; white-space: nowrap; }
.bulk-actions, .bulk-bar-end { display: inline-flex; gap: .35rem; flex-wrap: wrap; }
.bulk-bar-end { margin-left: auto; }

/* ───────── cross-phase "Naslednji koraki" dashboard list ───────── */
.next-steps { margin: 0 0 1.5rem; }
.next-steps-head {
    display: flex; align-items: baseline; gap: .75rem; margin-bottom: .6rem;
    padding-bottom: .35rem; border-bottom: 1px dashed var(--line-strong);
}
.next-steps-head h2 { font-family: var(--font-serif); font-size: 1.15rem; font-weight: 400; }
.next-steps-sub { color: var(--ink-mute); font-size: .82rem; margin-left: auto; }
.next-steps-empty { color: var(--ink-mute); font-size: .92rem; }
.next-steps-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.next-step-link {
    display: flex; align-items: center; gap: .65rem; padding: .45rem .75rem; text-decoration: none; color: inherit;
    background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
    transition: border-color .15s, box-shadow .15s;
}
.next-step-link:hover { border-color: var(--line-strong); box-shadow: 0 2px 10px rgba(0, 0, 0, .06); }
.next-step-dot { width: .6rem; height: .6rem; border-radius: 50%; flex-shrink: 0; }
.next-step-main { display: flex; flex-direction: column; gap: .1rem; flex: 1; min-width: 0; }
.next-step-text { font-weight: 600; color: var(--ink); }
.next-step-phase { font-size: .78rem; color: var(--ink-mute); }
.next-step-tag {
    flex-shrink: 0; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    padding: .2rem .55rem; border-radius: var(--radius-pill); border: 1px solid;
}
.next-step-tag.is-overdue { color: #b03c30; border-color: #dc988d; background: #fbe9e6; }
.next-step-tag.is-soon { color: #9c6c06; border-color: #d8ba6c; background: #f2f2f2; }
.next-step-tag.is-important { color: #c4831c; border-color: #e6b25e; background: #f2f2f2; }
.next-step-tag.is-wip { color: #9c6c06; border-color: #d8ba6c; background: #f2f2f2; }
.next-step-tag.is-todo { color: var(--ink-soft); border-color: var(--line-strong); background: var(--bg); }

.note-input {
    display: block; width: 100%; margin-top: .85rem;
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    padding: .55rem .7rem; background: var(--bg);
    font-family: var(--font-sans); font-size: .9rem;
    color: var(--ink); resize: vertical; min-height: 4.8rem; line-height: 1.45;
}
.note-input::placeholder { color: var(--ink-mute); font-style: italic; }
.note-input:focus { outline: none; border-color: var(--accent); }

/* Task description folded behind an accordion ("Opis") to keep rows compact. */
.task-desc { margin-top: .75rem; }
.task-desc-label {
    display: block; font-size: .7rem; font-weight: 600; color: var(--ink-mute);
    text-transform: uppercase; letter-spacing: .08em;
}
.task-desc .note-input { margin-top: .45rem; }
/* "+ Dodaj opis" - shown instead of an empty textbox when the task has no description yet. Block on
   its own line (content-width) so it never sits next to the round action buttons above. */
.task-desc-add {
    display: block; width: fit-content; margin-top: .75rem;
    appearance: none; background: none; border: none; cursor: pointer; padding: 0;
    font-family: var(--font-sans); font-size: .8rem; font-weight: 600; color: var(--accent);
}
.task-desc-add:hover { text-decoration: underline; }
/* Rendered-markdown opis (read view) + an inline edit (✎) affordance. Long descriptions (e.g. saved AI
   advice) are capped + scroll so they don't make the task row grow without bound. */
.task-desc-head { display: flex; align-items: center; gap: .5rem; }
.task-desc-edit {
    appearance: none; background: none; border: none; cursor: pointer; padding: 0;
    font-size: .85rem; line-height: 1; color: var(--ink-mute);
}
.task-desc-edit:hover { color: var(--accent); }
.task-desc-md {
    margin-top: .35rem; font-size: .88rem; line-height: 1.5; color: var(--ink-soft);
    max-height: 18rem; overflow-y: auto;
}
.task-desc-md > :first-child { margin-top: 0; }
.task-desc-md > :last-child { margin-bottom: 0; }

/* ---------- task type ---------- */
.type-pills {
    display: inline-flex; flex-shrink: 0; gap: 0;
    border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
    background: var(--bg); overflow: hidden; padding: 2px;
}
.type-pill {
    appearance: none; border: none; background: transparent;
    padding: .25rem .65rem; font-family: var(--font-sans);
    font-size: .72rem; font-weight: 600; color: var(--ink-mute);
    cursor: pointer; border-radius: var(--radius-pill);
    text-transform: uppercase; letter-spacing: .06em;
    transition: background .15s, color .15s;
    white-space: nowrap;
}
.type-pill:hover { color: var(--ink); }
.type-pill.active { background: var(--accent); color: white; }

.type-panel {
    margin-top: .65rem; padding: .6rem .8rem;
    background: var(--bg); border: 1px solid var(--line);
    border-radius: var(--radius);
    display: grid; gap: .65rem;
}
.type-panel-inline {
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    align-items: end;
}
.type-field { display: flex; flex-direction: column; gap: .3rem; }
.type-field > label {
    font-size: .7rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .08em;
    color: var(--ink-mute);
}
.type-input {
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    background: var(--bg-elev); padding: .35rem .65rem;
    font-family: var(--font-sans); font-size: .95rem; color: var(--ink);
    width: 100%;
}
.type-input:focus { outline: none; border-color: var(--accent); }
.type-input::placeholder { color: var(--ink-mute); }
textarea.type-input { resize: vertical; min-height: 2.4rem; }
/* A picker and a text field standing side by side have to be the SAME height, or the row reads as
   misaligned however carefully the labels line up. Only select carried a min-height (2.5rem, a proper
   touch target); an input was whatever its padding and line-height came to - about 2.28rem - so every
   dropdown in the app sat ~3.5 px proud of the field beside it. The select's number wins: it is the
   deliberate one, and it is the one that is big enough to hit.
   Density (#633): 34px with a mouse, like NomiFac's fields; touch screens get 40px back further down. */
input.type-input, select.type-input { min-height: 2.43rem; }

/* A DROPDOWN wearing the typing field's clothes: .type-input was written for text, so every picker in
   the app (vpleteni, izvajalec, oseba, sklop, dobavitelj …) kept the operating system's own arrow and a
   2 px corner, and sat next to .status-select and the filter pills looking unfinished. One rule, so all
   forty of them change together: the app's pill, its own caret, and a hand cursor. */
select.type-input {
    appearance: none; -webkit-appearance: none;
    min-height: 2.43rem; padding: .35rem 2.1rem .35rem .75rem;
    /* The field's own corner (--radius), NOT a pill: these stand in forms beside text inputs, and a capsule
       picker next to a 7px field reads as two different form kits. The pill belongs to the navbar's
       gradbišče switcher, which is a control on a bar rather than a field on paper. */
    border-radius: var(--radius); background-color: var(--bg-elev); cursor: pointer;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%238c8679' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M4 6l4 4 4-4'/></svg>");
    background-repeat: no-repeat; background-position: right .85rem center; background-size: .7rem;
    transition: border-color .15s;
}
select.type-input:hover:not(:disabled) { border-color: var(--accent); }
select.type-input:disabled { opacity: .55; cursor: default; }

.price-input-wrap { position: relative; }
.price-input { padding-right: 2rem; font-variant-numeric: tabular-nums; }
.price-suffix {
    position: absolute; right: .7rem; top: 50%; transform: translateY(-50%);
    color: var(--ink-mute); pointer-events: none;
    font-weight: 600; font-size: .92rem;
}
.duration-summary {
    grid-column: 1 / -1;
    font-size: .8rem; color: var(--ink-soft);
    font-style: italic; font-variant-numeric: tabular-nums;
}

/* ---------- task meta (Rok + add inquiry) ---------- */
.task-meta {
    margin-top: .6rem; display: flex; align-items: center;
    gap: .85rem; flex-wrap: wrap;
}
.task-meta-dates {
    display: inline-flex; align-items: center; gap: .4rem; flex-wrap: wrap; max-width: 100%;
    color: var(--ink-soft);
}
.task-meta-label {
    font-size: .7rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: .08em; color: var(--ink-mute); margin-right: .25rem;
}
.task-meta-input {
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    background: var(--bg); padding: .25rem .5rem;
    font-family: var(--font-sans); font-size: .82rem; color: var(--ink);
    font-variant-numeric: tabular-nums;
}
.task-meta-input:focus { outline: none; border-color: var(--accent); }
/* admin-defined meta key/value pairs on a task */
.task-metafields { row-gap: .45rem; }
.task-metafield-input { min-width: 11rem; }
.task-meta-sep { color: var(--ink-mute); font-weight: 500; }
.task-meta-duration {
    margin-left: .25rem; font-size: .75rem; color: var(--ink-mute);
    font-style: italic; font-variant-numeric: tabular-nums;
}
.task-meta-recommended {
    display: inline-flex; align-items: center; gap: .5rem;
    font-size: .78rem; color: var(--ink-soft);
}
.task-meta-recommended strong { font-variant-numeric: tabular-nums; }
.item-info-btn.is-active { color: var(--accent); }
.task-info {
    margin: .5rem 0 .25rem; padding: .7rem .9rem;
    background: var(--bg-elev); border: 1px solid var(--line);
    border-left: 3px solid var(--accent); border-radius: var(--radius);
    font-size: .88rem; color: var(--ink-soft); line-height: 1.55; white-space: pre-line;
}
.task-inquiry-add { margin-left: auto; }

/* ---------- inquiries ---------- */
.inquiries {
    margin-top: .85rem; display: grid; gap: .55rem;
}
.inquiry-card {
    background: var(--bg); border: 1px solid var(--line-strong);
    border-radius: var(--radius); overflow: hidden;
}
.inquiry-summary {
    list-style: none; cursor: pointer; user-select: none;
    display: flex; align-items: center; gap: .5rem;
    padding: .5rem .75rem; font-size: .85rem;
}
.inquiry-summary::-webkit-details-marker { display: none; }
.inquiry-summary:hover { background: var(--bg-elev); }
.inquiry-chevron { display: inline-flex; color: var(--ink-mute); flex-shrink: 0; transition: transform .15s; }
.inquiry-chevron svg { display: block; }
.inquiry-card[open] .inquiry-chevron { transform: rotate(90deg); }
.inquiry-summary-title {
    flex: 1; min-width: 0; font-weight: 600; color: var(--ink);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.inquiry-summary-price {
    flex-shrink: 0; font-weight: 600; color: var(--ink-soft); font-variant-numeric: tabular-nums;
}
.inquiry-summary-badge {
    flex-shrink: 0; display: inline-flex; align-items: center; gap: .2rem;
    font-size: .68rem; font-weight: 600; color: var(--ok);
    text-transform: uppercase; letter-spacing: .04em;
}
.inquiry-summary-badge svg { width: 12px; height: 12px; fill: currentColor; stroke: currentColor; }
.inquiry-body {
    padding: .55rem .75rem .65rem; display: flex; flex-direction: column; gap: .5rem;
    border-top: 1px solid var(--line);
}
.inquiry-head {
    display: flex; align-items: center; gap: .55rem; flex-wrap: wrap;
}
.inquiry-title {
    flex: 1; min-width: 12rem;
}
.inquiry-price { width: 8.5rem; flex-shrink: 0; }
.inquiry-remove {
    appearance: none; border: none; background: transparent;
    color: var(--ink-mute); cursor: pointer; font-size: 1.25rem;
    line-height: 1; padding: 0 .35rem; flex-shrink: 0;
}
.inquiry-remove:hover { color: #7a2020; }
.inquiry-company { font-size: .85rem; min-height: 2.4rem; }
.inquiries-summary {
    font-size: .82rem; color: var(--ink-soft); padding: .35rem .5rem;
    font-style: italic;
}
.inquiries-summary strong {
    color: var(--ok); font-style: normal; font-weight: 600;
}
.inquiry-attachments {
    margin-top: 0; padding-top: .5rem;
    border-top: 1px dashed var(--line);
}
.upload-btn-sm {
    align-self: flex-start; font-size: .72rem; padding: .25rem .55rem;
}

/* ---------- gallery (task attachments, pinned to the bottom of the card) ---------- */
.task-gallery { margin-top: .9rem; padding-top: .75rem; border-top: 1px dashed var(--line); }
.task-gallery-head {
    font-size: .7rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: .08em; color: var(--ink-mute);
}
.task-gallery .attachments { margin-top: .5rem; padding-top: 0; border-top: none; gap: .75rem; }
/* Bigger, multi-row thumbnails for the on-task photo gallery. */
.task-gallery .attachment-thumb { width: 9rem; height: 9rem; }
@media (max-width: 560px) {
    .task-gallery .attachments { gap: .6rem; }
    .task-gallery .attachment-thumb { width: calc(50% - .3rem); height: 8.5rem; }
}

/* ---------- attachments ---------- */
.attachments {
    margin-top: .9rem; padding-top: .75rem;
    border-top: 1px dashed var(--line);
    display: flex; flex-wrap: wrap; gap: .6rem;
}
.attachment-thumb {
    position: relative; width: 6.5rem; height: 6.5rem;
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    background: var(--bg); padding: 0; overflow: hidden; cursor: zoom-in;
    transition: border-color .15s, transform .15s;
}
.attachment-thumb:hover { border-color: var(--accent); transform: translateY(-1px); }
.attachment-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.attachment-thumb .thumb-placeholder {
    display: grid; place-items: center; width: 100%; height: 100%;
    color: var(--ink-mute); font-size: 1.25rem;
}
/* A document tile: the PDF's first page fills it like a photo, anything else gets the DOC card - the
   same one the phase and cover galleries print, sized to the thumbnail. */
.attachment-doc { cursor: pointer; }
.attachment-doc-ph {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem;
    width: 100%; height: 100%; padding: .4rem; text-align: center; color: var(--ink-soft);
    background: var(--bg-elev);
}
.attachment-doc-ext { font-weight: 800; font-size: 1.05rem; color: var(--accent); }
.attachment-doc-name {
    font-size: .68rem; line-height: 1.15; overflow: hidden;
    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical;
    overflow-wrap: anywhere;
}

.attachment-remove {
    position: absolute; top: 2px; right: 2px;
    width: 1.25rem; height: 1.25rem;
    background: rgba(0,0,0,.55); color: #fff;
    border: none; border-radius: 50%;
    font-size: .85rem; line-height: 1; cursor: pointer;
    display: grid; place-items: center;
}
.attachment-remove:hover { background: var(--accent-ink); }

.attachment-file {
    position: relative; display: inline-flex; align-items: center;
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    background: var(--bg); padding: .35rem .55rem;
    max-width: 100%;
}
.attachment-file .file-link {
    appearance: none; border: none; background: transparent;
    display: inline-flex; align-items: center; gap: .5rem; cursor: pointer;
    color: var(--ink); padding: 0; font: inherit;
}
.attachment-file .file-link:hover { color: var(--accent-ink); }
.attachment-file .file-icon { font-size: 1rem; }
.attachment-file .file-name {
    font-size: .85rem; max-width: 14rem;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.attachment-file .file-size {
    color: var(--ink-mute); font-size: .72rem;
    font-variant-numeric: tabular-nums;
}
/* Inline in a file chip (the corner circle above is for photo thumbnails). A chip that is not itself
   positioned - .cost-att, the stroškov dropzone - otherwise sends the circle to the page's top-right corner. */
.attachment-file .attachment-remove,
.cost-att .attachment-remove,
.cost-dropzone .attachment-remove {
    position: static; margin-left: .4rem;
    width: 1.1rem; height: 1.1rem; font-size: .75rem;
    background: transparent; color: var(--ink-mute);
}
.cost-dropzone .attachment-remove { margin-left: auto; font-size: 1rem; }
.attachment-file .attachment-remove:hover,
.cost-att .attachment-remove:hover,
.cost-dropzone .attachment-remove:hover { color: #7a2020; background: transparent; }

/* ---------- item foot ---------- */
.item-foot {
    display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
    margin-top: .85rem;
}
.upload-btn {
    display: inline-flex; align-items: center; cursor: pointer;
    font-size: .78rem; font-weight: 500; color: var(--ink-soft);
    border: 1px dashed var(--line-strong); border-radius: var(--radius);
    padding: .35rem .7rem; background: transparent;
    transition: color .15s, border-color .15s, background .15s;
}
.upload-btn:hover { color: var(--accent-ink); border-color: var(--accent); background: var(--bg); }
.upload-btn input[type="file"] {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.upload-btn-locked-hint {
    font-size: .72rem; color: var(--ink-mute);
    border: none; padding: .25rem .55rem;
    border-bottom: 1px solid transparent;
}
.upload-btn-locked-hint:hover {
    color: var(--accent-ink); border-bottom-color: var(--accent);
}
.updated {
    margin-left: auto; font-size: .72rem; color: var(--ink-mute);
    font-variant-numeric: tabular-nums; letter-spacing: .02em;
}

/* ---------- lightbox ---------- */
.lightbox {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(20, 20, 20, .88);
    display: grid; place-items: center; padding: 2rem;
    animation: lb-fade .15s ease-out;
}
@keyframes lb-fade { from { opacity: 0 } to { opacity: 1 } }
.lightbox-figure {
    position: relative; /* stacks above the (positioned) backdrop sibling */
    max-width: min(95vw, 1500px); max-height: 92vh;
    margin: 0; display: flex; flex-direction: column; align-items: center;
    gap: .75rem;
}
.lightbox-figure img {
    max-width: 100%; max-height: 85vh; object-fit: contain;
    border-radius: var(--radius); background: #000;
    box-shadow: 0 30px 60px rgba(0,0,0,.5);
}
.lightbox-figure figcaption {
    color: var(--bg-elev); font-size: .85rem;
    display: flex; gap: 1rem; align-items: baseline;
}
.lightbox-figure .lightbox-count { color: var(--ink-mute); font-variant-numeric: tabular-nums; }

.lightbox-close {
    position: absolute; top: 1rem; right: 1rem;
    appearance: none; border: none; background: rgba(255,255,255,.1);
    color: #fff; width: 2.25rem; height: 2.25rem; border-radius: 50%;
    font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.lightbox-close:hover { background: rgba(255,255,255,.2); }
.lightbox-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    appearance: none; border: none; background: rgba(255,255,255,.08);
    color: #fff; width: 3rem; height: 3rem; border-radius: 50%;
    font-size: 2rem; line-height: 1; cursor: pointer;
}
.lightbox-nav:hover { background: rgba(255,255,255,.18); }
.lightbox-nav.prev { left: 1.25rem; }
.lightbox-nav.next { right: 1.25rem; }
@media (max-width: 560px) {
    .lightbox { padding: 1rem; }
    .lightbox-figure { max-width: 96vw; }
    .lightbox-nav { width: 2.5rem; height: 2.5rem; font-size: 1.6rem; }
    .lightbox-nav.prev { left: .4rem; }
    .lightbox-nav.next { right: .4rem; }
}

/* ---------- buttons ---------- */
/* Density (#633): NomiFac's controls - 32px with a 13px label and a 16px icon in front of it (Icon.razor, never a
   text glyph). min-height rather than height, so a label that has to wrap on a phone still fits. Touch screens
   get 40px back in the "pointer: coarse" block below. */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    min-height: 2.3rem; padding: .3rem .85rem; font-family: var(--font-sans);
    font-size: .93rem; font-weight: 500; line-height: 1.2; cursor: pointer;
    border-radius: var(--radius); border: 1px solid var(--line-strong);
    background: transparent; color: var(--ink); text-decoration: none;
    transition: all .15s;
}
.btn > .icon { flex: none; width: 1.15em; height: 1.15em; }
.btn:hover { background: var(--bg-elev); border-color: var(--ink); border-bottom: 1px solid var(--ink); }
/* <label class="btn"> (hidden-InputFile upload buttons): labels inherit the body line-height (1.55)
   while <button> uses the UA default (~1.2), which made them a few px taller than their neighbours */
label.btn { line-height: normal; margin: 0; }
.btn-primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: white; }
.btn-ghost { border-color: transparent; color: var(--ink-soft); }
.btn-danger { color: #7a2020; border-color: #d9b5b5; }
.btn-danger:hover { background: #f8e8e8; border-color: #7a2020; }

.phase-nav {
    display: flex; justify-content: space-between; gap: 1rem;
    margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line);
    flex-wrap: wrap;
}
.phase-nav .spacer { flex: 1; }

/* phase marked "not relevant" */
/* A row, not two inline buttons: "Imam X - nadaljuj" (text) beside "Označi fazo kot ni relevantno" (icon + text) sat on
   different baselines and touched (#870). Centred in one flex row they share a line and a gap; they wrap on a phone. */
.phase-actions { margin-top: 1.1rem; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.phase-header.is-irrelevant h1 { text-decoration: line-through; text-decoration-color: var(--ink-mute); }
.phase-irrelevant-banner {
    background: var(--bg-elev); border: 1px solid var(--line);
    border-left: 3px solid var(--ink-mute); border-radius: var(--radius);
    padding: .8rem 1rem; color: var(--ink-soft); font-size: .9rem; margin-bottom: 1.5rem;
}
.phase-sections.is-phase-irrelevant { opacity: .5; }
/* The one mark of a phase the builder set aside on a professional gradbišče (the chapter itself reads as usual). */
.phase-na-mark { display: inline-flex; vertical-align: middle; margin-left: .5rem; color: var(--ink-mute); }

/* ---------- IDP phase action panel (PDF + AI) ---------- */
/* Compact horizontal card (art · copy + progress · actions), matching the 2D-house card it sits by. */
.idp-actions {
    display: flex; align-items: center; gap: 1rem;
    margin: .25rem 0 1.5rem; padding: 1.1rem 1.25rem;
    border: 1px solid var(--line); border-radius: var(--radius)); background: var(--bg-elev);
}

/* IDP hero: the "Hiša v 3D" teaser + the "Povzetek idejnega projekta" card. Two cards sit side by side
   (equal halves); a lone card (e.g. when the 3D teaser is hidden) fills the WHOLE row; both stack on
   narrow screens. Flexbox + flex-grow guarantees the single-card full-width case. */
.idp-hero-row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: stretch; margin: .5rem 0 1.5rem; }
.idp-hero-row > .idp-image,
.idp-hero-row > .idp-actions { flex: 1 1 340px; min-width: 0; margin: 0; } /* specificity beats .idp-image-top margin */
.idp-hero-row > .idp-image { display: flex; }  /* wrapper stretches so its inner card fills the column */
.idp-actions-art {
    flex: none; width: 56px; height: 56px; display: grid; place-items: center;
    color: var(--accent); opacity: .8;
}
.idp-actions-art svg { width: 38px; height: 38px; }
.idp-actions-copy { flex: 1 1 auto; min-width: 0; }
.idp-actions-copy h3 { margin: 0 0 .2rem; font-size: 1rem; }
.idp-actions-copy p { margin: 0 0 .55rem; color: var(--ink-soft); font-size: .85rem; max-width: 52ch; }
.idp-actions-btns { flex: none; display: flex; flex-direction: column; gap: .4rem; }
.idp-action-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; white-space: nowrap; }
.idp-action-btn:disabled { opacity: .55; cursor: not-allowed; }
.idp-action-ico { font-size: 1.05em; line-height: 1; }
.idp-actions-progress { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.idp-actions-bar { flex: 1; min-width: 7rem; max-width: 14rem; height: 5px; background: var(--line); border-radius: var(--radius-pill); overflow: hidden; }
.idp-actions-bar-fill { height: 100%; background: var(--accent); transition: width .25s ease; }
.idp-actions-bar-fill.ok { background: var(--ok); }
.idp-actions-prog-label { font-size: .78rem; color: var(--ink-mute); }
@media (max-width: 560px) {
    .idp-actions { flex-wrap: wrap; }
    .idp-actions-btns { flex-direction: row; width: 100%; }
    .idp-actions-btns .btn { flex: 1; }
}

/* ---------- IDP AI-generated 2D house image ---------- */
.idp-image { margin: 0 0 1.5rem; }
.idp-image-top { margin-top: .5rem; }
.idp-image-status {
    display: inline-flex; align-items: center; gap: .55rem; padding: .85rem 1rem;
    border: 1px solid var(--line); border-radius: var(--radius)); background: var(--bg-elev);
    color: var(--ink-soft); font-size: .9rem;
}
.idp-image-err { color: var(--danger, #c0392b); border-color: var(--danger, #c0392b); }
.idp-image-fig {
    margin: 0; padding: .75rem; border: 1px solid var(--line);
    border-radius: var(--radius)); background: var(--bg-elev);
}
.idp-image-fig img {
    display: block; width: 100%; max-width: 720px; height: auto; margin: 0 auto;
    border-radius: var(--radius, var(--radius));
}
.idp-image-fig figcaption {
    margin-top: .6rem; font-size: .8rem; color: var(--ink-mute); text-align: center;
    display: flex; gap: .75rem; justify-content: center; align-items: center; flex-wrap: wrap;
}
.idp-image-acts { display: inline-flex; gap: .75rem; align-items: center; }
.idp-image-dl { font-weight: 600; }

/* Hiša v 3D on the Idejna zasnova chapter (IdzHouseCard): where the investor's own 3D zasnova stands -
   etaže, tloris, streha - and the way into it. Sits above the chapter's kazalo, as the čarovnik offer
   does on Projektna naloga. Theme variables only, so dark mode needs no rules of its own. */
.idz-house {
    display: flex; align-items: center; gap: 1rem; margin: .25rem 0 1.25rem; padding: 1rem 1.2rem;
    border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
    border-radius: var(--radius));
    background: color-mix(in srgb, var(--accent) 7%, var(--bg-elev));
}
.idz-house-art { flex: none; width: 52px; height: 52px; display: grid; place-items: center; color: var(--accent); }
.idz-house-art svg { width: 40px; height: 40px; }
.idz-house-copy { flex: 1 1 auto; min-width: 0; }
.idz-house-copy .eyebrow { margin-bottom: .15rem; }
.idz-house-copy h3 { margin: 0 0 .2rem; font-size: 1.05rem; }
.idz-house-copy p { margin: 0; color: var(--ink-soft); font-size: .85rem; max-width: 56ch; }
.idz-house-copy .idz-house-facts {
    margin-bottom: .2rem; color: var(--ink); font-family: var(--font-sans); font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.idz-house-copy .idz-house-facts.is-loading { color: var(--ink-mute); font-weight: 400; }
.idz-house-btn { flex: none; }
@media (max-width: 560px) {
    .idz-house { flex-wrap: wrap; }
    .idz-house-btn { width: 100%; justify-content: center; }
}

/* ---------- toasts (transient notifications) ---------- */
.toast-host {
    position: fixed; right: 1rem; bottom: 1rem; z-index: 1000;
    display: flex; flex-direction: column; gap: .5rem; max-width: min(92vw, 30rem);
}
.toast-item {
    display: flex; align-items: flex-start; gap: .6rem; padding: .7rem .85rem;
    border-radius: var(--radius)); background: var(--bg-elev);
    border: 1px solid var(--line); box-shadow: 0 6px 24px rgba(0, 0, 0, .14);
    font-size: .88rem; color: var(--ink); animation: toast-in .18s ease-out;
}
.toast-item .toast-msg { flex: 1 1 auto; word-break: break-word; }
.toast-close {
    flex: none; border: 0; background: none; cursor: pointer; line-height: 1;
    font-size: 1.1rem; color: var(--ink-mute); padding: 0 .15rem;
}
.toast-success { border-color: var(--ok); border-left: 3px solid var(--ok); }
.toast-info { border-left: 3px solid var(--accent); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- error alert (ErrorAlertHost, NomiFac #1375) ---------- */
/* Every error is a modal the user closes himself - ToastService.Error and <ErrorAlert>, where a toast in the corner
   and a red line under the form went unseen. Above every dialog it can come from (task modals 80, the map picker and
   its full-screen map 2000, the paywall 9000), below the »no connection« overlay (.conn-down, 9999). The backdrop is
   the only click-to-close target, as in .task-modal. */
.error-alert {
    position: fixed; inset: 0; z-index: 9500;
    display: flex; align-items: center; justify-content: center;
    padding: 1rem; overflow-y: auto;
}
.error-alert-backdrop { position: fixed; inset: 0; background: rgba(20, 20, 20, .55); }
.error-alert-card {
    position: relative; width: min(28rem, 100%); margin: auto;
    background: var(--bg-elev, var(--bg)); border: 1px solid var(--line-strong);
    border-top: 4px solid var(--danger, #c0392b); border-radius: var(--radius);
    box-shadow: 0 24px 60px rgba(20, 14, 6, .35);
    padding: 1.2rem 1.35rem 1.1rem; animation: error-alert-in .16s ease-out;
}
.error-alert-head { display: flex; align-items: center; gap: .65rem; margin-bottom: .55rem; }
.error-alert-head h2 { font-family: var(--font-serif); font-size: 1.3rem; margin: 0; }
.error-alert-mark {
    flex: none; width: 1.8rem; height: 1.8rem; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--danger, #c0392b); color: #fff; font-weight: 700; line-height: 1;
}
.error-alert-msg {
    margin: 0; color: var(--ink); line-height: 1.5;
    overflow-wrap: anywhere; white-space: pre-line; max-height: 50vh; overflow-y: auto;
}
.error-alert-actions {
    display: flex; align-items: center; justify-content: flex-end; gap: .75rem; flex-wrap: wrap;
    margin-top: 1.1rem;
}
.error-alert-more { margin-right: auto; color: var(--ink-mute); font-size: .85rem; }
.error-alert-ok { min-width: 6.5rem; min-height: 44px; justify-content: center; }   /* a thumb target (rem is 14 px) */
@keyframes error-alert-in { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .error-alert-card { animation: none; } }

/* ---------- feature nudges ("namigi") ---------- */
/* Bottom-right like the toasts but a slightly lower stacking order, so a real toast wins if both show.
   The FeedbackFab lives bottom-LEFT, so there is no collision there. */
/* The host is a POSITIONING box, not a surface: it stretches to whatever the card needs and would
   otherwise swallow clicks aimed at the page under it - on the čarovnik that is the "Naprej" button,
   which sits in the same bottom-right corner (and on a phone the host spans the whole width, see the
   media query below). Only the card itself takes the pointer. */
.hint-host {
    position: fixed; right: 1rem; bottom: 1rem; z-index: 900;
    max-width: min(92vw, 22rem);
    pointer-events: none;
}
.hint-card { pointer-events: auto; }
.hint-card {
    position: relative;
    padding: .85rem 1rem 1rem;
    border-radius: var(--radius));
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .16);
    color: var(--ink);
    animation: toast-in .2s ease-out;
}
.hint-close {
    position: absolute; top: .35rem; right: .45rem;
    border: 0; background: none; cursor: pointer; line-height: 1;
    font-size: 1.15rem; color: var(--ink-mute); padding: .1rem .25rem;
}
.hint-close:hover { color: var(--ink); }
.hint-badge {
    font-size: .68rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
    color: var(--accent); margin-bottom: .3rem;
}
.hint-title {
    font-family: var(--font-serif, inherit);
    font-size: 1.02rem; font-weight: 400; line-height: 1.25; margin-bottom: .25rem;
    padding-right: 1rem; /* clear the × */
}
.hint-body { font-size: .86rem; line-height: 1.4; color: var(--ink-mute); margin: 0 0 .7rem; }
.hint-cta {
    display: inline-flex; align-items: center; gap: .25rem;
    border: 0; cursor: pointer; border-radius: var(--radius, var(--radius));
    background: var(--accent); color: #fff;
    font-size: .84rem; font-weight: 600; padding: .4rem .8rem;
    transition: background .15s, transform .15s;
}
.hint-cta:hover { background: var(--accent-ink, var(--accent)); transform: translateY(-1px); }
@media (max-width: 560px) {
    .hint-host { right: .6rem; left: .6rem; bottom: .6rem; max-width: none; }
}

/* ---------- comments ---------- */
.comments {
    margin-top: .9rem; padding-top: .75rem;
    border-top: 1px dashed var(--line);
}
.comments-list { display: grid; gap: .5rem; margin-bottom: .65rem; }
.comment {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: .55rem .75rem;
}
.comment-meta {
    display: flex; align-items: baseline; gap: .55rem;
    font-size: .78rem; color: var(--ink-mute); margin-bottom: .2rem;
}
.comment-meta strong { color: var(--ink-soft); font-weight: 600; }
.comment-time { font-variant-numeric: tabular-nums; }
.comment-remove {
    margin-left: auto; appearance: none; border: none; background: transparent;
    color: var(--ink-mute); cursor: pointer; font-size: 1rem; line-height: 1;
    padding: 0 .25rem;
}
.comment-remove:hover { color: #7a2020; }
.comment-body {
    font-size: .92rem; color: var(--ink); white-space: pre-wrap; word-wrap: break-word;
}

.comment-add { display: flex; gap: .5rem; align-items: flex-start; }
.comment-input {
    flex: 1; min-height: 2.1rem; resize: vertical;
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    padding: .45rem .65rem; background: var(--bg);
    font-family: var(--font-sans); font-size: .9rem; color: var(--ink);
}
.comment-input:focus { outline: none; border-color: var(--accent); }
.comment-input::placeholder { color: var(--ink-mute); font-style: italic; }
.btn-sm { min-height: 1.95rem; padding: .2rem .65rem; font-size: .88rem; }

/* Density on touch screens (#633): the compact controls above are for a mouse. A finger gets 40px buttons
   (36px small ones) and 40px fields, and field text stays at 16px - iOS zooms into any field whose text is
   smaller. Px on purpose: these floors must not follow the 87.5% root. */
@media (pointer: coarse) {
    .btn { min-height: 40px; }
    .btn-sm { min-height: 36px; }
    input.type-input, select.type-input { min-height: 40px; }
    input.type-input, select.type-input, textarea.type-input, .note-input, .comment-input, .task-meta-input { font-size: 16px; }
    /* the account button on the bar: avatar-only on phones, 35px once the root shrank */
    .nav-user-toggle { min-height: 40px; min-width: 40px; justify-content: center; }
}

/* Inline button spinner (export "loading" state) - inherits the button's text colour. */
/* flex: none - inside a flex row (.parcel-loader-title and others) a label that wraps used to squeeze the 1em ring
   into an ellipse (NomiFac #1184): a spinner never shrinks. */
.btn-spinner {
    display: inline-block; width: 1em; height: 1em; flex: none; vertical-align: -0.15em; margin-right: .15em;
    border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
    animation: btn-spin .6s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* ---------- nav user ---------- */
.nav-user {
    display: inline-flex; align-items: center;
    /* margin-left:auto right-aligns the user menu whenever there's no search toolbar (profile,
       contractors, …), matching the /projects navbar. On project pages the flex:1 toolbar already
       fills the row, so auto adds nothing there. */
    padding-left: 1rem; margin-left: auto;
    border-left: 1px solid var(--line);
}

/* user avatar + name button that toggles the account dropdown */
.nav-user-toggle {
    appearance: none; border: 1px solid transparent; background: transparent;
    padding: .3rem .55rem .3rem .35rem; border-radius: var(--radius-pill);
    font-family: var(--font-sans); font-size: .875rem; font-weight: 500;
    color: var(--ink-soft); cursor: pointer;
    display: inline-flex; align-items: center; gap: .5rem;
    transition: background .15s, color .15s, border-color .15s;
}
.nav-user-toggle:hover { color: var(--ink); background: var(--bg-elev); }
.nav-user-dropdown.open .nav-user-toggle {
    color: var(--ink); background: var(--bg-elev); border-color: var(--line-strong);
}
.nav-user-avatar {
    flex: none; width: 1.75rem; height: 1.75rem; border-radius: 50%;
    background: var(--accent); color: #fff; overflow: hidden;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: .82rem;
}
.nav-user-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.nav-user-label {
    max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* "Pomoč" tour replay - promoted from the account dropdown onto the bar, sitting just before the
   avatar. Mirrors the .nav-user-toggle pill so the account cluster reads as one unit. */
.nav-tour-btn {
    appearance: none; border: 1px solid transparent; background: transparent;
    padding: .3rem .6rem; margin-right: .15rem; border-radius: var(--radius-pill);
    font-family: var(--font-sans); font-size: .875rem; font-weight: 500;
    color: var(--ink-soft); cursor: pointer;
    display: inline-flex; align-items: center; gap: .4rem;
    transition: background .15s, color .15s, border-color .15s;
}
.nav-tour-btn:hover { color: var(--ink); background: var(--bg-elev); border-color: var(--line-strong); }
.nav-tour-ico { display: inline-flex; }
.nav-tour-ico svg { width: 1.15rem; height: 1.15rem; }

@media (max-width: 760px) {
    /* Keep the bar to a single row on phones: show just the compass icon (the title/aria-label keep it
       accessible). */
    .nav-tour-label { display: none; }
    .nav-tour-btn { padding: .45rem; }
}

/* account dropdown opens flush to the right edge of the nav */
.nav-user-menu { left: auto; right: 0; min-width: 15rem; }

.nav-user-head {
    display: flex; align-items: center; gap: .6rem;
    padding: .5rem .65rem .65rem;
    border-bottom: 1px solid var(--line); margin-bottom: .35rem;
}
.nav-user-avatar-lg { width: 2.25rem; height: 2.25rem; font-size: 1rem; }
.nav-user-head-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.nav-user-head-name { font-weight: 600; color: var(--ink); font-size: .9rem;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-user-head-email { font-size: .75rem; color: var(--ink-mute);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* buttons reused as menu items must shed the UA button chrome (incl. centered text + auto width,
   which left button items like Predstavitev / Moji projekti misaligned vs the <a> NavLinks) */
button.nav-dropdown-item {
    appearance: none; background: transparent; width: 100%; text-align: left;
    font-family: var(--font-sans); font-size: .9rem;
}

.nav-dropdown-sep { height: 1px; background: var(--line); margin: .35rem -.35rem; }

.nav-user-section {
    padding: .35rem .75rem .15rem;
    font-size: .62rem; font-weight: 600; text-transform: uppercase; letter-spacing: .12em;
    color: var(--ink-mute);
}

.nav-user-logout { width: 100%; cursor: pointer; text-align: left; }
.nav-user-logout:hover { color: var(--danger, #b3261e); }

/* ---------- profile page ---------- */
/* Settings grouped into tabs (Račun / Nastavitve / Naročnina / Povezave); mirrors the admin analytics tabs. */
.profile-tabs {
    display: flex; gap: .35rem; flex-wrap: wrap;
    margin: 0 0 .5rem; border-bottom: 1px solid var(--line);
}
.profile-tab {
    appearance: none; background: none; border: none; border-bottom: 2px solid transparent;
    padding: .45rem .8rem; margin-bottom: -1px; cursor: pointer;
    font: inherit; font-size: .95rem; font-weight: 600; color: var(--ink-soft);
}
.profile-tab:hover { color: var(--ink); }
.profile-tab.is-active { color: var(--accent); border-bottom-color: var(--accent); }
.profile-section {
    margin-top: 1.25rem; padding-top: 1rem;
    border-top: 1px solid var(--line);
}
/* The header already draws a divider, so the first section skips its own top border (no double line). */
.profile-section:first-of-type { border-top: none; margin-top: .9rem; padding-top: 0; }
/* Read-only fields (e.g. e-mail) read as informational, not editable. */
.profile-field input[readonly] { background: var(--bg-elev); color: var(--ink-soft); cursor: default; }
.profile-section h2 {
    font-family: var(--font-serif); font-size: 1.15rem;
    margin-bottom: .3rem;
}
.profile-help {
    color: var(--ink-soft); font-size: .9rem; margin: .3rem 0 .7rem;
}
/* Plan usage meters ("Naročnina in poraba"): used vs. limit bars. */
.usage-list { display: flex; flex-direction: column; gap: 1rem; max-width: 34rem; }
.usage-item { display: flex; flex-direction: column; gap: .35rem; }
.usage-top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.usage-name { font-weight: 600; }
.usage-count { font-variant-numeric: tabular-nums; color: var(--ink-soft); font-size: .9rem; }
.usage-meter { height: .5rem; border-radius: var(--radius-pill); background: var(--bg-elev); overflow: hidden; }
.usage-fill { display: block; height: 100%; border-radius: var(--radius-pill); background: var(--accent); transition: width .35s ease; }
.usage-fill.tone-ok { background: var(--ok, #3a7d44); }
.usage-fill.tone-warn { background: #c79a00; }
.usage-fill.tone-bad { background: var(--danger, #b3261e); }
.usage-note { font-size: .8rem; color: var(--ink-mute); }
/* MCP endpoint shown as a bold copyable link (not a text input). */
.mcp-endpoint { display: inline-flex; align-items: center; gap: .5rem; max-width: 100%; }
.mcp-endpoint-url {
    font-family: var(--font-mono);
    font-weight: 700; color: var(--accent-ink);
    word-break: break-all;
}
.mcp-endpoint-url:hover { color: var(--ink); }
.mcp-copy-btn {
    appearance: none; border: 1px solid var(--line-strong); background: var(--bg-elev);
    color: var(--ink-mute); cursor: pointer; flex-shrink: 0;
    width: 1.9rem; height: 1.9rem; border-radius: var(--radius);
    display: grid; place-items: center; transition: background .12s, color .12s, border-color .12s;
}
.mcp-copy-btn svg { width: 1rem; height: 1rem; display: block; }
.mcp-copy-btn:hover { background: var(--bg); color: var(--accent-ink); border-color: var(--accent); }
.profile-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: .85rem;
}
.profile-field { display: flex; flex-direction: column; gap: .3rem; }
.profile-field > label {
    font-size: .7rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .08em;
    color: var(--ink-mute);
}
.profile-field-actions { flex-direction: row; gap: .5rem; align-items: end; }
.profile-field-message {
    grid-column: 1 / -1;
    font-size: .85rem; color: var(--ok); font-style: italic;
}
.profile-actions {
    margin-top: 1.5rem; padding-top: 1rem;
    border-top: 1px solid var(--line);
    display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.profile-saved {
    color: var(--ok); font-size: .85rem; font-style: italic;
}

/* avatar */
.profile-avatar-row { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.profile-avatar {
    width: 64px; height: 64px; border-radius: 50%; overflow: hidden; flex: none;
    display: grid; place-items: center; background: var(--bg-elev);
    border: 1px solid var(--line);
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-initial { font-size: 1.6rem; font-weight: 700; color: var(--ink-soft); }
.profile-avatar-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
/* the upload button is a <label> wrapping a hidden <input type=file> */
.profile-avatar-actions label.btn { cursor: pointer; }
.profile-avatar-actions label.btn.is-busy { opacity: .65; pointer-events: none; }

/* "coming soon" section + badge */
.profile-section.is-disabled { opacity: .55; }
/* "Izbris računa" - the one irreversible action on the page, so it reads as a danger zone. */
.profile-danger h2 { color: var(--danger, #b3261e); }
/* An inline action that reads as a link but switches tabs in place (no navigation). */
.profile-danger .btn-link {
    background: none; border: 0; padding: 0; font: inherit; cursor: pointer;
    color: var(--accent, #0a0a0a); text-decoration: underline;
}
.profile-delete-list { margin: .25rem 0 1rem 1.1rem; padding: 0; color: var(--ink-soft); font-size: .92rem; }
.profile-delete-list li { margin: .2rem 0; }
.profile-badge-soon {
    display: inline-block; margin-left: .5rem; vertical-align: middle;
    font-family: var(--font-sans, inherit); font-size: .62rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em; color: var(--ink-mute);
    background: var(--bg-elev); border: 1px solid var(--line);
    padding: .15rem .45rem; border-radius: var(--radius-pill);
}

/* ---------- login screen ---------- */
.login-screen {
    min-height: 100vh; display: grid; place-items: center;
    padding: 1.5rem; background: var(--bg);
}

/* ---------- legal documents (Terms, Privacy) ---------- */
/* ── /p/{token}: the landing a paid Lokacija report's personalized link opens ──
   Server-rendered (Pages/Invite.cshtml), so it must stand on app.css alone - no WASM, no components.
   One screen: the reader's own parcel named at the top, the 3D promise shown, two ways to an account. */
.invite-page { min-height: 100vh; background: var(--bg); padding: 2.5rem 1.5rem 4rem; }
.invite-head { max-width: 60rem; margin: 0 auto 2rem; text-align: center; }
.invite-brand img { height: 2.1rem; width: auto; }
.invite-eyebrow {
    margin-top: 1.5rem; font-size: .78rem; font-weight: 700; letter-spacing: .09em;
    text-transform: uppercase; color: var(--accent);
}
.invite-head h1 {
    margin: .5rem 0 .75rem; font-family: var(--font-serif); font-size: clamp(1.6rem, 4vw, 2.4rem);
    line-height: 1.15; color: var(--ink);
}
.invite-ko { display: block; font-size: .55em; color: var(--ink-mute); font-weight: 500; margin-top: .35rem; }
.invite-lead { max-width: 44rem; margin: 0 auto; color: var(--ink-soft); line-height: 1.6; }

.invite-body {
    max-width: 60rem; margin: 0 auto; display: grid; gap: 2rem;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: center;
}
.invite-shot { margin: 0; }
.invite-shot img {
    display: block; width: 100%; height: auto; border-radius: var(--radius));
    border: 1px solid var(--line); box-shadow: 0 18px 40px -22px rgba(26, 26, 26, .55);
}
.invite-shot figcaption { margin-top: .5rem; font-size: .8rem; color: var(--ink-mute); text-align: center; }

.invite-cta { display: flex; flex-direction: column; gap: .75rem; }
.invite-points { list-style: none; margin: 0 0 .5rem; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.invite-points li { position: relative; padding-left: 1.5rem; font-size: .93rem; line-height: 1.5; color: var(--ink-soft); }
.invite-points li::before {
    content: "✓"; position: absolute; left: 0; top: 0; color: var(--ok); font-weight: 700;
}
.invite-points strong { color: var(--ink); }
/* The two ways in. One geometry for both (full width, same height, same corner) so they read as a pair
   of real buttons - the Google sheet leading, the e-mail one right under it - instead of a button with a
   text link below. The .invite-cta scope wins over .btn / .btn-google's own padding + font size. */
.invite-form { display: contents; }              /* the <form> must not break the .invite-cta gap rhythm */
.invite-cta .invite-btn {
    width: 100%; min-height: 3.05rem; padding: .85rem 1.25rem; gap: .7rem;
    justify-content: center; text-align: center; font-size: .95rem; font-weight: 600;
    /* the <a> would otherwise inherit the body's 1.55 and stand ~4px taller than the <button> */
    line-height: 1.25;
}
/* Google is the fast path (verified address, no inbox detour), so it gets the elevation - the one kind of
   emphasis that does not touch the brand's own white sheet + coloured G. */
.invite-cta .btn-google { box-shadow: 0 10px 22px -14px rgba(26, 26, 26, .55); }
.invite-cta .btn-google:hover { box-shadow: 0 12px 26px -12px rgba(26, 26, 26, .6); }
.invite-btn-alt { background: var(--bg-elev); border-color: var(--line-strong); color: var(--ink); }
.invite-btn-alt:hover { background: var(--bg); border-color: var(--ink); }
.invite-or {
    display: flex; align-items: center; gap: .75rem; margin: -.1rem 0;
    font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
    color: var(--ink-mute);
}
.invite-or::before, .invite-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.invite-trial { margin: .35rem 0 0; font-size: .85rem; color: var(--ink-soft); }
.invite-trial strong { color: var(--ink); }
.invite-signin { margin: 0; font-size: .85rem; color: var(--ink-mute); }
.invite-foot {
    max-width: 44rem; margin: 2.5rem auto 0; text-align: center;
    font-size: .82rem; line-height: 1.55; color: var(--ink-mute);
}

@media (max-width: 780px) {
    .invite-body { grid-template-columns: 1fr; }
    /* Phone: the promise picture is worth less than getting the buttons above the fold. */
    .invite-shot { order: 2; }
    .invite-cta { order: 1; }
}

.legal-page { min-height: 100vh; background: var(--bg); padding: 2.5rem 1.5rem; }
.legal-doc {
    max-width: 46rem; margin: 0 auto;
    background: var(--bg-elev); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 2.5rem 2.25rem;
    color: var(--ink); line-height: 1.6;
}
.legal-doc h1 { font-size: 1.9rem; margin: .5rem 0 .25rem; }
.legal-doc h2 { font-size: 1.15rem; margin: 1.75rem 0 .5rem; }
.legal-doc p { margin: 0 0 .85rem; color: var(--ink-soft); }
.legal-doc ul { margin: 0 0 .85rem 1.1rem; color: var(--ink-soft); }
.legal-doc li { margin-bottom: .35rem; }
.legal-meta { font-size: .85rem; color: var(--ink-mute); }
.legal-callout {
    background: var(--bg); border: 1px solid var(--line-strong);
    border-radius: var(--radius); padding: .85rem 1rem;
    font-size: .9rem; color: var(--ink-soft); margin: 1rem 0 1.5rem;
}
.legal-back {
    display: inline-block; margin: 0 0 1rem; font-size: .9rem;
    color: var(--accent); text-decoration: none;
}
.legal-back:last-child { margin: 1.5rem 0 0; }

/* legal doc embedded inside a modal iframe - drop the full-page chrome */
.legal-embed { min-height: 0; padding: 0; background: transparent; }
.legal-embed .legal-doc { border: 0; border-radius: 0; max-width: none; margin: 0; padding: 1.5rem 1.75rem; }

/* "O nas" team grid (reuses the .legal-page / .legal-doc shell) */
.about-team {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin: .75rem 0 1.5rem;
}
@media (max-width: 560px) { .about-team { grid-template-columns: 1fr; } }
.about-member {
    display: flex; align-items: flex-start; gap: 1rem;
    background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1rem 1.1rem;
}
.about-portrait {
    flex: 0 0 auto; width: 4.5rem; height: 4.5rem; border-radius: 50%; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: var(--accent-soft); border: 1px solid var(--line-strong);
}
.about-portrait img { width: 100%; height: 100%; object-fit: cover; }
.about-portrait-ph { font-family: var(--font-serif); font-size: 1.4rem; font-weight: 400; color: var(--accent); }
.about-member-body { min-width: 0; }
.about-member-name { font-family: var(--font-sans); font-size: 1.15rem; color: var(--ink); }
.about-member-role { font-size: .9rem; color: var(--ink-mute); margin-bottom: .4rem; }
.about-member-points {
    list-style: none; margin: .1rem 0 .6rem; padding: 0;
    font-size: .9rem; color: var(--ink-mute); line-height: 1.45;
}
.about-member-points li { position: relative; padding-left: 1rem; margin: .2rem 0; }
.about-member-points li::before {
    content: ""; position: absolute; left: 0; top: .55em;
    width: .35rem; height: .35rem; border-radius: 50%; background: var(--accent);
}
.about-linkedin {
    display: inline-flex; align-items: center; gap: .35rem;
    font-size: .9rem; font-weight: 600; color: var(--accent);
}

/* legal modals: CSS-only (checkbox) on the auth pages, Blazor-toggled (.is-open) in the footer */
.legal-link { color: var(--accent); cursor: pointer; text-decoration: underline; }
.legal-link:hover { color: var(--accent-ink); }
.legal-modal-toggle { position: absolute; width: 0; height: 0; opacity: 0; pointer-events: none; }
.legal-modal {
    display: none; position: fixed; inset: 0; z-index: 1000;
    align-items: center; justify-content: center; padding: 1.25rem;
}
.legal-modal.is-open,
#m-terms:checked ~ .legal-modal--terms,
#m-privacy:checked ~ .legal-modal--privacy { display: flex; }
.legal-modal-backdrop { position: absolute; inset: 0; background: rgba(20, 20, 20,.55); border: 0; cursor: pointer; }
.legal-modal-card {
    position: relative; width: min(46rem, 100%); max-height: min(82vh, 100%);
    background: var(--bg); border-radius: var(--radius); overflow: hidden; display: flex;
    box-shadow: 0 24px 70px rgba(0,0,0,.35);
}
.legal-modal-close {
    position: absolute; top: .5rem; right: .55rem; z-index: 2;
    width: 2rem; height: 2rem; border: 0; border-radius: 50%;
    background: var(--bg-elev); color: var(--ink); font-size: 1.5rem; line-height: 1;
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.legal-modal-close:hover { background: var(--line); }
/* default 82vh (long legal pages); the iframe onload shrinks this to the content height for short
   pages like "O nas", and the card's max-height keeps long pages capped + internally scrollable. */
.legal-modal-frame { width: 100%; height: 82vh; border: 0; background: var(--bg); }

/* Newsletter sign-up modal: a small content card (reuses the .legal-modal overlay shell). */
.newsletter-card-modal {
    width: min(26rem, 100%); height: auto; display: block;
    background: var(--bg-elev); border: 1px solid var(--line);
}
.newsletter-modal-body { padding: 2rem 1.85rem 1.85rem; text-align: center; }
.newsletter-modal-title { margin: 0 0 .35rem; font-size: 1.35rem; }
.newsletter-modal-context { margin: 0 0 .5rem; color: var(--ink-mute); font-size: .9rem; }
.newsletter-modal-lead { margin: 0 0 1.25rem; color: var(--ink-soft); }
.newsletter-modal-error { margin: 0 0 .85rem; color: #c0392b; font-size: .9rem; }
.newsletter-modal-submit { width: 100%; }
.newsletter-modal-email { margin: .6rem 0 0; color: var(--ink-mute); font-size: .85rem; }

/* Newsletter Sendy redirect landing pages (server-rendered Razor Pages under /newsletter/*).
   Reuse .login-screen / .login-card / .login-logo / .login-lead; these add the icon + badge. */
.nl-card { text-align: center; }
.nl-icon {
    width: 3.25rem; height: 3.25rem; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.5rem; line-height: 1; margin: .25rem auto 1rem;
}
.nl-icon.ok { background: var(--accent); color: #fff; }
.nl-icon.cross { background: var(--bg); color: var(--ink-soft); border: 2px solid var(--line-strong); }
.nl-icon.warn { background: var(--bg); color: var(--accent); border: 2px solid var(--accent); }
.nl-badge {
    display: inline-block; margin-bottom: .75rem;
    font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    color: var(--accent); border: 1px solid var(--accent); padding: .25rem .65rem; border-radius: var(--radius-pill);
}
.nl-btn { display: inline-block; margin-top: 1.25rem; text-decoration: none; }
.nl-btn.secondary {
    background: transparent; color: var(--ink); border: 1px solid var(--line-strong);
}
.nl-note { margin: 1rem 0 0; font-size: .85rem; color: var(--ink-mute); }
.nl-note a { color: var(--accent); }
.login-card {
    width: 100%; max-width: 26rem;
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.85rem 2.1rem;
    display: flex; flex-direction: column; gap: .7rem;
    box-shadow: 0 12px 40px rgba(20, 14, 6, .07);
}
.login-mark {
    font-size: 2.5rem; color: var(--accent);
    line-height: 1; margin-bottom: .25rem;
}
.login-logo {
    height: 2.9rem; width: auto; display: block;
    align-self: center; margin-bottom: .15rem;
}
.login-eyebrow {
    font-size: .72rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .18em;
    color: var(--accent);
}
.login-card h1 { font-size: 1.6rem; line-height: 1.15; margin-bottom: .1rem; }
.login-lead {
    color: var(--ink-soft); font-size: .9rem; line-height: 1.45;
    margin: 0 0 .35rem;
}
.login-input {
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: var(--bg);
    padding: .75rem .9rem;
    font-family: var(--font-sans); font-size: 1rem;
    color: var(--ink);
}
.login-input:focus { outline: none; border-color: var(--accent); }
.login-submit {
    align-self: flex-start;
    padding: .7rem 1.4rem;
}
.login-submit:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- error UI ---------- */
#blazor-error-ui {
    color-scheme: light only;
    background: #262626; color: #f6f6f6;
    bottom: 0; box-shadow: 0 -1px 8px rgba(0,0,0,.25);
    box-sizing: border-box; display: none;
    left: 0; padding: .8rem 1.25rem; position: fixed; width: 100%; z-index: 1000;
}
#blazor-error-ui .dismiss, #blazor-error-ui .reload { cursor: pointer; color: var(--accent-soft); margin: 0 .5rem; }
#blazor-error-ui .dismiss { position: absolute; right: 1rem; top: .75rem; }

.blazor-error-boundary {
    background: #262626; color: white;
    padding: 1rem 1rem 1rem 1rem;
}
.blazor-error-boundary::after { content: "Prišlo je do napake."; }

/* ---------- schedule view switch: filing tabs that stick out of the notebook's top edge ----------
   The container's bottom is pinned to the notebook's top border (100% of the page height + the page's
   top padding) and it clips at that line (overflow:hidden), so a tucked tab shows only the small lip
   that peeks above the edge; the active tab sits at translateY(0), pulled fully out. */
.schedule-page { position: relative; }
/* The header row (view tabs + panel controls). In the notebook it is not a row at all: the tabs hang
   above the page edge and the controls sit inside the page's top-right corner, each positioned against
   .schedule-page - so the wrapper takes itself out of the layout with display:contents and nothing about
   that look changes. In fullscreen it becomes a real flex row (below), which is what stops the two from
   overlapping now that the right-hand side can carry a "Plan potrjen …" chip. */
.schedule-head { display: contents; }
.journal-spread:has(.journal-page-spread) { margin-top: 1.6rem; }  /* room above for the tabs to stick out */
/* Both view tabs stand fully above the page edge at all times. They used to be filing tabs tucked
   behind the paper with ~1.5rem peeking out, which read as decoration rather than navigation: the
   inactive view's name was cut in half (and clipped outright by the strip's overflow), so "Terminski
   plan" could not be read, only guessed at. The active one is now told apart by its fill, not by
   whether you can see it. */
.schedule-view-tabs {
    position: absolute; right: 3.25rem; bottom: calc(100% + 1.75rem); z-index: 6;  /* 1.75rem = spread padding-top */
    display: flex; gap: .5rem; align-items: flex-end; overflow: visible;
}
.schedule-view-tab {
    appearance: none; display: inline-flex; align-items: center; gap: .4rem;
    padding: .5rem .95rem; font-family: var(--font-sans); font-size: 1.05rem; font-weight: 700; line-height: 1.15;
    color: var(--ink-soft); cursor: pointer; white-space: nowrap;
    background: color-mix(in srgb, var(--accent) 10%, var(--bg-elev));
    border: 1px solid var(--line-strong); border-bottom: none; border-radius: var(--radius) var(--radius) 0 0;
    box-shadow: 0 -2px 6px -4px rgba(26, 26, 26, .5);
    transition: background .16s ease, color .16s ease, transform .16s ease;
}
.schedule-view-tab:hover {
    color: var(--ink); background: color-mix(in srgb, var(--accent) 20%, var(--bg-elev));
}
/* The page's own edge continues UNDER the closed tabs: a filing tab rests on the sheet, it does not cut
   a hole in it. The open one carries no such line - that is how it reads as open - and it is no longer
   lifted, because the 2px it rose by was exactly the gap that made the red edge look broken. */
.schedule-view-tab {
    border-bottom: 2px solid color-mix(in srgb, var(--phase-color, var(--accent)) 80%, var(--line-strong));
}
.schedule-view-tab.active {
    color: #fff; background: linear-gradient(180deg, var(--accent), var(--accent-ink)); border-color: var(--accent-ink);
    border-bottom-color: transparent;
    box-shadow: 0 -3px 10px -5px rgba(26, 26, 26, .6);
}
.schedule-view-tab .icon { flex: 0 0 auto; margin-top: .05rem; }

/* The same filing tabs on a page with no notebook spread to hang off (the professional site planner):
   they sit in the flow above the heading and rest on a rule instead of on the page edge. Only the
   POSITION differs - the tabs themselves must read as the same control on both pages. */
.schedule-view-tabs.is-inline {
    position: static; right: auto; bottom: auto;
    justify-content: flex-start; flex-wrap: wrap;
    margin: 0 0 1.5rem; border-bottom: 1px solid var(--line-strong);
}
.schedule-view-tabs.is-inline .schedule-view-tab { transform: none; }
.schedule-view-tabs.is-inline .schedule-view-tab.active { box-shadow: 0 -2px 8px -5px rgba(26, 26, 26, .5); }

/* top-right control cluster: zoom + the compact fullscreen toggle on one row, same icon-button style */
.schedule-topctrls {
    position: absolute; top: .35rem; right: .45rem; z-index: 6;
    display: flex; align-items: center; gap: .5rem;
    /* the late and baseline chips can make the row wider than a phone: it wraps instead of scrolling sideways */
    flex-wrap: wrap; justify-content: flex-end;
}
@media (max-width: 760px) {
    /* On phones the absolute top-right cluster lands on top of the gantt/kanban corner tabs (the
       "Kanban tabla" tab became untappable) - let it flow in the page instead, right-aligned. */
    .schedule-topctrls { position: static; justify-content: flex-end; margin: -0.25rem 0 .6rem; }
}
/* compact icon-only fullscreen toggle (now sits inside the cluster, no longer self-positioned) */
.schedule-fs-btn {
    width: 2rem; height: 2rem; display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.15rem; line-height: 1; cursor: pointer; color: var(--ink-soft);
    background: var(--bg-elev); border: 1px solid var(--line-strong); border-radius: var(--radius);
    transition: background .14s, color .14s, transform .14s;
}
.schedule-fs-btn svg { width: 1.05rem; height: 1.05rem; display: block; }
.schedule-fs-btn:hover { background: var(--accent-soft); color: var(--accent-ink); transform: translateY(-1px); }
/* Round, like the other view controls (Danes, − / ＋). Two identical rounded squares side by side read as
   the same button printed twice ("two ⋯ buttons"), so the two families are kept apart by the hairline
   below and by what they show - this one an icon, the menu a ⋯. The ⋯ was a square once to carry that
   difference by shape; since NomiFac #1183 every ⋯ in the app is a circle. */
.schedule-fs-btn { border-radius: var(--radius-pill); }
.schedule-topctrls .schedule-menu {
    margin-left: .15rem; padding-left: .6rem; border-left: 1px solid var(--line);
}
/* The late chip stands left of the fullscreen button (NomiFac #681) and takes the row's height, not its own
   2.25rem; a touch screen still gets 40 px (the pointer: coarse floor near the end of the file wins). */
.schedule-topctrls .gantt-late-chip { min-height: 2rem; }
/* "Ta teden" puts a TaskMenu in this corner while the plan next door puts a ScheduleMenu - two
   components, one corner, and to the reader they have to be the same object. TaskMenu's button is the
   app's small .icon-btn, so here it takes .schedule-menu-btn's chrome - a circle, like every ⋯ in the
   app (NomiFac #1183). */
.schedule-topctrls .task-menu-btn {
    width: 2rem; height: 2rem; display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.15rem; line-height: 1; color: var(--ink-soft);
    background: var(--bg-elev); border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
    transition: background .14s, color .14s, transform .14s;
}
.schedule-topctrls .task-menu-btn:hover { color: var(--ink); border-color: var(--accent); }
/* "Danes" + zoom live at the right end of the shared filter row, so they sit at the same height as the
   phase chips and read as view controls rather than as page furniture. */
.sched-viewctrls { margin-left: auto; display: inline-flex; align-items: center; gap: .4rem; }
/* "Danes" borrows the chip shape but is an ACTION, not a toggle - so it must escape the rule that dims
   every inactive chip to 45 %, or it would permanently look switched off. */
.sched-filter-chip.sched-today-chip:not(.active) { opacity: 1; color: var(--ink); font-weight: 700; }
.sched-filter-chip.sched-today-chip:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-ink); }
.sched-filter-chip.sched-today-chip:disabled { opacity: .35; cursor: default; }
.sched-viewctrls .gantt-zoom { display: inline-flex; gap: .3rem; align-items: stretch; }
.sched-viewctrls .gantt-zoom-label { min-width: 4.75rem; border: none; }
.sched-viewctrls .gantt-zoom-btn {
    width: var(--filter-h); height: var(--filter-h); box-sizing: border-box;
    font-size: .95rem; line-height: 1; color: var(--ink-mute); cursor: pointer;
    background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
    transition: background .14s, color .14s, border-color .14s;
}
.sched-viewctrls .gantt-zoom-btn:hover:not(:disabled) {
    background: var(--accent-soft); color: var(--accent-ink); border-color: var(--accent);
}
.sched-viewctrls .gantt-zoom-btn:disabled { opacity: .35; cursor: default; }
/* The base .gantt-zoom-btn rules join the pair into ONE pill: the second button loses its left border
   and each keeps half the rounding. Here they are two separate round chips with a gap between them, so
   both halves of that have to be undone - and at a specificity that beats :first-child / :last-child,
   which live further down the file and would otherwise win on source order. */
.sched-viewctrls .gantt-zoom-btn:first-child,
.sched-viewctrls .gantt-zoom-btn:last-child {
    border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
}
.sched-viewctrls .gantt-zoom-btn:first-child:hover:not(:disabled),
.sched-viewctrls .gantt-zoom-btn:last-child:hover:not(:disabled) { border-color: var(--accent); }

/* ⋯ overflow: everything that acts on the plan as a WHOLE (AI proposal, PDF, confirmed plan). Keeping
   those as five separate buttons made the cluster wider than the notebook's inner margin on a laptop.
   A circle, like every ⋯ in the app (NomiFac #1183; DensityStyleTests.Every_ellipsis_menu_button_is_round). */
.schedule-menu { position: relative; display: inline-flex; }
.schedule-menu-btn {
    width: 2rem; height: 2rem; display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.15rem; line-height: 1; cursor: pointer; color: var(--ink-soft);
    background: var(--bg-elev); border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
    transition: background .14s, color .14s, transform .14s;
}
.schedule-menu-btn:hover, .schedule-menu-btn.is-open {
    background: var(--accent-soft); color: var(--accent-ink); transform: translateY(-1px);
}
.schedule-menu-pop {
    position: absolute; top: calc(100% + .35rem); right: 0; z-index: 20;
    width: 19rem; max-width: min(19rem, 80vw); padding: .3rem;
    display: flex; flex-direction: column; gap: .1rem;
    background: var(--bg-elev); border: 1px solid var(--line-strong); border-radius: var(--radius);
    box-shadow: 0 10px 26px -12px rgba(30, 22, 10, .55);
}
.schedule-menu-item {
    display: flex; align-items: flex-start; gap: .5rem; text-align: left; width: 100%;
    padding: .45rem .5rem; border: none; border-radius: var(--radius); background: none; cursor: pointer;
    font-family: var(--font-sans); color: var(--ink);
}
.schedule-menu-item:hover:not(:disabled) { background: var(--accent-soft); }
.schedule-menu-item:disabled { opacity: .55; cursor: default; }
.schedule-menu-item b { display: block; font-size: .82rem; font-weight: 600; }
.schedule-menu-item em { display: block; font-style: normal; font-size: .7rem; color: var(--ink-mute); line-height: 1.35; }
.schedule-menu-ico {
    flex: none; width: 1.15rem; display: inline-flex; align-items: center; justify-content: center;
    margin-top: .1rem; color: var(--accent); font-size: .9rem;
}
/* A row the paket does not include: readable, obviously inactive, and a link to the plans rather than
   a dead end. It must not look broken - it is an advert for something that works. */
.schedule-menu-item.is-locked { text-decoration: none; color: var(--ink-soft); cursor: pointer; }
.schedule-menu-item.is-locked b { color: var(--ink-soft); }
.schedule-menu-item.is-locked .schedule-menu-ico { color: var(--ink-mute); }
.schedule-menu-item.is-locked:hover { background: var(--accent-soft); }
.schedule-menu-item.is-locked:hover b { color: var(--accent-ink); }
.schedule-menu-plan {
    margin-left: auto; align-self: center; flex: none;
    font-family: var(--font-sans); font-size: .62rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .05em;
    color: var(--accent-ink); background: var(--accent-soft);
    border: 1px solid var(--accent); border-radius: var(--radius-pill); padding: .1rem .4rem;
}
.schedule-menu-item.is-danger:hover:not(:disabled) { background: rgba(163, 53, 42, .1); }
.schedule-menu-item.is-danger .schedule-menu-ico { color: #a3352a; }
.schedule-menu-note {
    margin: .1rem .5rem .35rem; font-family: var(--font-sans); font-size: .72rem;
    color: var(--ink-mute); line-height: 1.4;
}

/* Fullscreen mode: break out of the centered container and fill the viewport.
   Only the Terminski Plan needs the extra horizontal room. */
.schedule-page.is-fullscreen {
    position: fixed; inset: 0; z-index: 70; border: none;
    background-color: var(--bg-elev);   /* the notebook page, not the app backdrop */
    background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 33px, var(--paper-line) 33px, var(--paper-line) 34px);
    overflow: auto;
    padding: 1.75rem clamp(1.5rem, 4vw, 4rem) 2.5rem;
}
/* centre binding crease down the fullscreen notebook (the open-book gutter), same as the spread */
.schedule-page.is-fullscreen::after {
    content: ""; position: fixed; top: 0; bottom: 0; left: 50%; width: 60px; transform: translateX(-50%);
    background: linear-gradient(90deg,
        transparent,
        rgba(26, 26, 26, .05) 16%,
        rgba(26, 26, 26, .15) 40%,
        rgba(26, 26, 26, .24) 47%,
        rgba(26, 26, 26, .5) 49.5%,
        rgba(26, 26, 26, .5) 50.5%,
        rgba(26, 26, 26, .24) 53%,
        rgba(26, 26, 26, .15) 60%,
        rgba(26, 26, 26, .05) 84%,
        transparent);
    pointer-events: none; z-index: 1;
}
.schedule-page.is-fullscreen .phase-header { margin-bottom: 1.5rem; }
.schedule-page.is-fullscreen .gantt { max-height: calc(100vh - 11rem); }
/* Fullscreen has no notebook edge for the tabs to hang off, so the header becomes ONE right-aligned
   row: view tabs, then the chip and the panel controls. The tabs used to be pinned 8rem from the edge -
   a guess at how wide the right-hand cluster would ever be. The "Plan potrjen …" chip made that guess
   wrong: it sat on top of the "Kanban tabla" tab, which could then not be clicked at all. A flex row
   cannot be got wrong, whatever the chip ends up saying. */
.schedule-page.is-fullscreen .schedule-head {
    position: absolute; top: .4rem; right: .45rem; left: .45rem; z-index: 6;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .5rem;
}
.schedule-page.is-fullscreen .schedule-view-tabs,
.schedule-page.is-fullscreen .schedule-topctrls { position: static; height: auto; overflow: visible; }
/* Fullscreen has no sheet edge for a tab to rest on, so the tabs become what they are there: buttons.
   A filing tab hanging in mid-air reads as a rendering fault. */
.schedule-page.is-fullscreen .schedule-view-tab,
.planner-page.is-fullscreen .schedule-view-tab {
    transform: none; border-radius: var(--radius-pill);
    border: 1px solid var(--line-strong); padding: .4rem .9rem; font-size: .95rem;
}
.schedule-page.is-fullscreen .schedule-view-tab.active,
.planner-page.is-fullscreen .schedule-view-tab.active {
    border-color: var(--accent-ink); box-shadow: none;
}

/* While the schedule is fullscreen (body class set from the page): drop the notebook page's stacking
   context so the fixed panel rises above the sticky navbar (z 10) instead of being trapped behind it. */
body.schedule-fullscreen .journal-page { z-index: auto; }

/* ---------- calendar ---------- */
.cal-controls {
    display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
}
.cal-month-label {
    font-family: var(--font-sans); font-size: 1.2rem; font-weight: 600;
    min-width: 9rem; text-align: center;
}
.cal-grid {
    display: grid; grid-template-columns: repeat(7, 1fr);
    border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--bg-elev); overflow: hidden;
}
.cal-dow {
    padding: .5rem .65rem; background: var(--bg);
    border-bottom: 1px solid var(--line);
    font-size: .7rem; font-weight: 600; color: var(--ink-mute);
    text-transform: uppercase; letter-spacing: .08em;
}
.cal-dow + .cal-dow { border-left: 1px solid var(--line); }
.cal-grid-week .cal-cell { min-height: 14rem; }
.cal-grid-month .cal-cell { min-height: 5.5rem; }
.cal-cell {
    padding: .35rem .4rem;
    border-top: 1px solid var(--line); border-left: 1px solid var(--line);
    background: var(--bg-elev); display: flex; flex-direction: column; gap: .25rem;
    position: relative;
}
.cal-daynum-suffix {
    margin-left: .25rem; color: var(--ink-mute);
    font-weight: 500; text-transform: lowercase;
}
.cal-event-range {
    margin-left: .25rem; color: var(--ink-mute);
    font-variant-numeric: tabular-nums; font-size: .7rem;
}
.cal-cell:nth-child(7n+1) { border-left: none; }
.cal-cell.is-outside { background: var(--bg); color: var(--ink-mute); opacity: .55; }
.cal-cell.is-today { background: var(--accent-soft); }
.cal-daynum {
    font-size: .78rem; font-weight: 600; color: var(--ink-soft);
    font-variant-numeric: tabular-nums;
}
.cal-cell.is-today .cal-daynum { color: var(--accent-ink); }
.cal-event {
    display: inline-flex; align-items: center; gap: .35rem;
    font-size: .72rem; padding: .12rem .35rem; border-radius: var(--radius);
    color: var(--ink); background: var(--bg);
    border: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    text-decoration: none;
}
.cal-event:hover { border-color: var(--accent); }
.cal-event-dot {
    width: .5rem; height: .5rem; border-radius: 50%; flex-shrink: 0;
    background: var(--ink-mute);
}
.cal-event.todo .cal-event-dot { background: #e0857a; }
.cal-event.wip .cal-event-dot { background: #e3b93c; }
.cal-event.done .cal-event-dot { background: #4f7d5a; }
.cal-event.na .cal-event-dot { background: #9a9a9a; }
.cal-event-text { overflow: hidden; text-overflow: ellipsis; }
.cal-empty {
    margin-top: 1.5rem; color: var(--ink-mute); font-style: italic;
}

/* ---------- report ---------- */
.report-actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
/* Match the export buttons to the height of the z DDV / brez DDV switch on /costs. */
.report-actions .billing-toggle { margin-bottom: 0; height: 2.4rem; }
.report-actions > .btn { height: 2.4rem; padding-top: 0; padding-bottom: 0; display: inline-flex; align-items: center; }
/* Zbirnik stroškov and Iskalnik now carry ONE ⋯ here instead of a row of buttons, and it has to be the
   same object as the plan's (.schedule-menu-btn): same size, same weight, and the same circle every ⋯
   in the app has (NomiFac #1183). */
.report-actions .task-menu-btn {
    width: 2rem; height: 2rem; display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.15rem; line-height: 1; color: var(--ink-soft);
    background: var(--bg-elev); border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
    transition: background .14s, color .14s;
}
.report-actions .task-menu-btn:hover { color: var(--ink); border-color: var(--accent); }
/* A hairline between groups of rows in a ⋯ menu: what you DO to the page, how you LOOK at it, what you
   take AWAY from it. Three kinds of thing in one list need something quieter than a heading. */
.schedule-menu-sep { height: 1px; margin: .3rem .45rem; background: var(--line); }
.report-filters {
    display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
    margin-bottom: 2rem;
}
.report-filters-label {
    font-size: .75rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: .08em; color: var(--ink-mute); margin-right: .25rem;
}
/* Status pills (search/iskalnik task table "Stanje" column) - text + status colour + leading dot. */
.status-pill {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .15rem .6rem; border-radius: var(--radius-pill);
    font-size: .75rem; font-weight: 600; line-height: 1.5;
    border: 1px solid transparent; white-space: nowrap;
    background: var(--bg); color: var(--ink-soft);
}
.status-pill::before {
    content: ""; width: .5rem; height: .5rem; border-radius: 50%;
    background: var(--status-color, var(--ink-mute)); flex: none;
}
.status-pill.todo { --status-color: #e0857a; background: #fbe9e5; color: #8a3322; border-color: #f1c7bd; }
.status-pill.wip  { --status-color: #e3b93c; background: #f2f2f2; color: #7a5e12; border-color: #ecd9a0; }
.status-pill.done { --status-color: #4f7d5a; background: #e7f0e9; color: #2f5238; border-color: #bcd6c2; }
.status-pill.na   { --status-color: #9a9a9a; background: #ededed; color: #5b5b5b; border-color: #cfcfcf; }

.report-filters .status-pill {
    border: 1px solid var(--line-strong);
}
.report-print-head {
    display: none; align-items: baseline; justify-content: space-between;
    margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 2px solid var(--ink);
}
.report-print-head h1 { font-size: 1.5rem; }
.report-print-meta { color: var(--ink-mute); font-size: .85rem; font-variant-numeric: tabular-nums; }
.report-summary {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
    gap: .5rem; margin-bottom: 2rem;
}
.report-summary-cell {
    background: var(--bg-elev); border: 1px solid var(--line);
    border-radius: var(--radius); padding: .85rem 1rem;
    text-align: center;
}
.report-summary-num {
    font-family: var(--font-sans); font-size: 1.8rem; font-weight: 600;
    color: var(--ink); line-height: 1;
}
.report-summary-label {
    font-size: .72rem; text-transform: uppercase; letter-spacing: .08em;
    color: var(--ink-mute); margin-top: .25rem;
}
.report-phase { margin-bottom: 2rem; }
.report-phase-title {
    font-family: var(--font-serif); font-size: 1.35rem; font-weight: 400;
    padding-bottom: .35rem; border-bottom: 1px solid var(--line-strong);
    margin-bottom: 1rem;
}
.report-section { margin-bottom: 1.25rem; }
.report-section-title {
    font-family: var(--font-sans); font-size: 1.05rem; font-weight: 600;
    color: var(--ink-soft); margin-bottom: .5rem;
}
.report-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.report-item {
    background: var(--bg-elev); border: 1px solid var(--line);
    border-radius: var(--radius); padding: .75rem 1rem;
}
.report-item-head {
    display: flex; align-items: center; gap: .65rem; flex-wrap: wrap;
}
.report-item-text { font-size: .95rem; color: var(--ink); flex: 1; min-width: 12rem; }
.report-details {
    margin: .55rem 0 0; padding: 0;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: .35rem .85rem;
}
.report-detail { margin: 0; display: flex; gap: .4rem; }
.report-detail dt {
    font-size: .7rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: .06em; color: var(--ink-mute); margin: 0;
}
.report-detail dd { margin: 0; font-size: .82rem; color: var(--ink); }
.report-desc {
    margin: .55rem 0 0; font-size: .88rem; color: var(--ink-soft);
    white-space: pre-wrap;
}

@media print {
    @page { margin: 1.5cm; }
    body { background: white; color: black; font-size: 11pt; }
    .app-nav, .app-footer, .report-no-print { display: none !important; }
    .app-main { max-width: none; padding: 0; }
    .report-print-head { display: flex !important; }
    .report-print-only { display: block !important; }
    .report-item, .report-summary-cell { background: white; }
    a { color: black; }
    .status-pill {
        border: 1px solid #888 !important; background: white !important;
        color: black !important; padding: .1rem .45rem;
    }
}

/* ---------- phase files (per-phase document/photo dropbox, collapsible) ---------- */
.phase-files {
    margin: 1.25rem 0 1.75rem;
    background: var(--bg-elev); border: 1px solid var(--line);
    border-left: 3px solid var(--phase-color, var(--line-strong));
    border-radius: var(--radius);
}
/* Accordion header (native <details><summary>) - collapses the whole area since it can get tall. */
.phase-files-summary {
    display: flex; align-items: center; gap: .6rem;
    padding: .9rem 1.2rem; cursor: pointer; list-style: none; user-select: none;
}
.phase-files-summary::-webkit-details-marker { display: none; }
.phase-files-summary::marker { content: ""; }
.phase-files-summary:hover .phase-files-summary-title { color: var(--accent-ink); }
.phase-files-ico { width: 1.15rem; height: 1.15rem; flex: none; color: var(--phase-color, var(--accent)); }
.phase-files-summary-title { font-family: var(--font-sans); font-size: 1.05rem; font-weight: 600; transition: color .15s; }
.phase-files-chevron {
    width: 1.1rem; height: 1.1rem; flex: none; color: var(--ink-mute);
    margin-left: .15rem; transition: transform .15s;
}
.phase-files[open] .phase-files-chevron { transform: rotate(180deg); }
.phase-files-content { padding: 0 1.2rem 1.25rem; }
.phase-files-sub { margin: 0; font-size: .82rem; color: var(--ink-soft); line-height: 1.5; }
.phase-files-examples { margin: .3rem 0 0; font-size: .78rem; color: var(--ink-mute); line-height: 1.5; }
.phase-files-examples strong { color: var(--ink-soft); font-weight: 600; }
.phase-files-count {
    margin-left: auto; flex-shrink: 0;
    font-size: .72rem; font-weight: 600; color: var(--ink-mute);
    background: var(--bg); border: 1px solid var(--line);
    border-radius: var(--radius-pill); padding: .2rem .6rem;
    font-variant-numeric: tabular-nums;
}

/* Drop zone: a transparent full-area file input sits on top so BOTH click and native file-drop
   work; the caption below is pointer-events:none so events reach the input underneath. */
.phase-files-drop {
    position: relative; display: block; margin-top: .85rem;
    border: 1.5px dashed var(--line-strong); border-radius: var(--radius);
    background: var(--bg); padding: 1.1rem 1rem; cursor: pointer;
    transition: border-color .15s, background .15s;
}
.phase-files-drop:hover { border-color: var(--accent); }
.phase-files-drop.is-dragging { border-color: var(--accent); background: var(--ok-soft); }
.phase-files-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.phase-files-drop-inner {
    display: flex; flex-direction: column; align-items: center; gap: .25rem;
    text-align: center; pointer-events: none; color: var(--ink-soft);
}
.phase-files-drop-icon { font-size: 1.5rem; line-height: 1; color: var(--phase-color, var(--accent)); }
.phase-files-drop-main { font-size: .9rem; }
.phase-files-drop-hint { font-size: .72rem; color: var(--ink-mute); }

.phase-files-empty { margin: .85rem 0 0; color: var(--ink-mute); font-style: italic; font-size: .88rem; }

/* In-flight upload progress rows (drag-drop / picker), shown under the drop zone until finished. */
.phase-files-uploads { list-style: none; margin: .85rem 0 0; padding: 0; display: grid; gap: .5rem; }
.phase-files-upload {
    background: var(--bg); border: 1px solid var(--line);
    border-radius: var(--radius); padding: .5rem .65rem;
    display: flex; flex-direction: column; gap: .4rem;
}
.phase-files-upload-head {
    display: flex; justify-content: space-between; align-items: baseline; gap: .75rem;
    font-size: .78rem;
}
.phase-files-upload-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phase-files-upload-status { flex-shrink: 0; color: var(--ink-mute); font-variant-numeric: tabular-nums; }
.phase-files-upload-bar {
    position: relative; height: 6px; border-radius: var(--radius-pill);
    background: var(--line); overflow: hidden;
}
.phase-files-upload-fill {
    position: absolute; top: 0; bottom: 0; left: 0; height: 100%;
    background: var(--phase-color, var(--accent)); border-radius: inherit;
    transition: width .15s ease;
}
.phase-files-upload.is-done .phase-files-upload-fill { background: var(--ok); }
.phase-files-upload.is-done .phase-files-upload-status { color: var(--ok); font-weight: 600; }
.phase-files-upload.is-error .phase-files-upload-fill { width: 100% !important; background: var(--danger, #c0392b); }
.phase-files-upload.is-error .phase-files-upload-status { color: var(--danger, #c0392b); font-weight: 600; }

/* Indeterminate slice that slides across while we wait on the server round-trip. */
.phase-files-upload-bar.is-indeterminate .phase-files-upload-fill {
    width: 40%; transition: none;
    animation: phase-files-upload-slide 1.1s ease-in-out infinite;
}
@keyframes phase-files-upload-slide {
    0% { left: -40%; } 100% { left: 100%; }
}

.phase-files-grid {
    margin-top: 1rem;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr));
    gap: .9rem;
}
.phase-file-card {
    background: var(--bg); border: 1px solid var(--line);
    border-radius: var(--radius); overflow: hidden;
    display: flex; flex-direction: column;
}
.phase-file-thumb {
    appearance: none; border: none; padding: 0; background: var(--bg-elev);
    width: 100%; aspect-ratio: 4/3; overflow: hidden; display: block;
    cursor: zoom-in; text-decoration: none;
}
.phase-file-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.phase-file-thumb-ph { display: grid; place-items: center; width: 100%; height: 100%; color: var(--ink-mute); }
.phase-file-doc {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: .35rem; cursor: pointer; color: var(--ink-soft);
    background: linear-gradient(160deg, var(--bg-elev), var(--bg));
}
.phase-file-doc:hover { color: var(--accent-ink); }
.phase-file-doc-icon { width: 2rem; height: 2rem; }
.phase-file-doc-ext { font-size: .68rem; font-weight: 700; letter-spacing: .08em; color: var(--ink-mute); }
/* PDF first-page preview fills the tile; the type badge floats in the corner. */
.phase-file-doc.has-preview { padding: 0; gap: 0; position: relative; background: #fff; align-items: stretch; }
.phase-file-doc-preview { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.phase-file-doc-ext-badge {
    position: absolute; top: .4rem; left: .4rem;
    background: rgba(20, 14, 6, .72); color: #fff; border-radius: var(--radius);
    padding: .08rem .32rem; font-size: .6rem; letter-spacing: .06em;
}
.phase-file-body { padding: .55rem .65rem .65rem; display: flex; flex-direction: column; gap: .4rem; }
.phase-file-name {
    font-size: .82rem; font-weight: 600; line-height: 1.25;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.phase-file-meta {
    display: flex; justify-content: space-between; gap: .5rem;
    font-size: .7rem; color: var(--ink-mute); font-variant-numeric: tabular-nums;
}
.phase-file-desc { font-size: .8rem; resize: vertical; min-height: 2.1rem; }
.phase-file-actions { display: flex; gap: .4rem; align-items: center; }
.phase-file-actions a.btn { text-decoration: none; }

/* ---------- subscription page ---------- */
.sub-tiers {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: 1.25rem; margin-bottom: 2rem;
}
.sub-tier {
    position: relative;
    background: var(--bg-elev); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 1.5rem 1.25rem 1.25rem;
    display: flex; flex-direction: column; gap: .75rem;
}
.sub-tier.is-featured {
    border-color: var(--accent); box-shadow: 0 12px 28px rgba(10, 10, 10, .12);
}
.sub-tier.is-active {
    border-color: var(--ok); background: var(--ok-soft);
}
.sub-tier-badge {
    position: absolute; top: -.6rem; left: 1rem;
    background: var(--accent); color: white;
    padding: .15rem .55rem; border-radius: var(--radius-pill);
    font-size: .65rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .08em;
}
.sub-tier-name {
    font-family: var(--font-serif); font-size: 1.35rem; font-weight: 400;
}
.sub-tier-price {
    font-family: var(--font-sans); font-size: 2rem; font-weight: 700;
    color: var(--ink); line-height: 1;
}
.sub-tier-price span {
    font-size: .85rem; font-weight: 400; color: var(--ink-mute);
}
.sub-tier-price-was { text-decoration: line-through; margin-right: .4rem; opacity: .7; }
.sub-tier-lead { color: var(--ink-soft); font-size: .9rem; margin: 0; }
.sub-tier-features {
    list-style: none; padding: 0; margin: 0;
    display: grid; gap: .35rem; font-size: .88rem;
    flex: 1;
}
.sub-tier-features li.has { color: var(--ink); }
.sub-tier-features li.no { color: var(--ink-mute); }
.sub-tier-features li.soon {
    color: var(--ink-mute);
    display: flex; align-items: center; gap: .4rem; flex-wrap: wrap;
}
.sub-tier-features li.soon .soon-badge {
    font-size: .68rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase;
    color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
    border-radius: var(--radius-pill); padding: .05rem .45rem; line-height: 1.4;
}
.sub-tier-cta { margin-top: auto; align-self: stretch; justify-content: center; }
.sub-saved { color: var(--ok); font-style: italic; }

/* Subscription page header + current-plan summary (replaces the borrowed .phase-header) */
.sub-header {
    display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
    gap: 1rem 1.5rem; margin: 0 0 1.6rem;
}
.sub-header-text { min-width: 0; }
.sub-header h1 { margin: .15rem 0 .4rem; }
.sub-header-lead { margin: 0; color: var(--ink-soft); font-size: .95rem; max-width: 34rem; }
.sub-current {
    display: flex; flex-direction: column; gap: .1rem;
    padding: .7rem 1.1rem; border-radius: var(--radius); min-width: 11rem;
    background: var(--bg-elev); border: 1px solid var(--line);
}
.sub-current.is-active { border-color: var(--ok); background: var(--ok-soft); }
/* On the auto-selected trial the box carries an accent border + explicit trial badge instead of green. */
.sub-current.is-trial { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--bg-elev)); }
.sub-current-label { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-mute); }
.sub-current-name { font-family: var(--font-serif); font-size: 1.3rem; font-weight: 400; color: var(--ink); line-height: 1.15; }
.sub-current-trial {
    align-self: flex-start; margin: .15rem 0 .05rem;
    padding: .12rem .55rem; border-radius: var(--radius-pill);
    font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
    background: var(--accent); color: #fff;
}
.sub-current-meta { font-size: .8rem; color: var(--ink-soft); }

/* Per-plan included limits (projects / attachments / AI calls) — one row each, divider above & below */
.sub-tier-limits {
    display: flex; flex-direction: column; gap: .35rem;
    padding: .75rem 0; margin: .1rem 0;
    border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.sub-tier.is-active .sub-tier-limits,
.sub-tier.is-featured .sub-tier-limits { border-color: color-mix(in srgb, var(--ink) 12%, transparent); }
.sub-tier-limit { display: flex; align-items: center; gap: .5rem; font-size: .85rem; color: var(--ink); }

/* "Your current plan" corner badge on the active card (sits opposite the "Priporočeno" badge) */
.sub-tier-badge-current { left: auto; right: 1rem; background: var(--ok); }

/* trial + referral perks: one balanced two-column row above the tiers */
.sub-perks {
    display: grid; grid-template-columns: 1fr 1fr; gap: .75rem;
    margin-bottom: 1.5rem;
}
.sub-perk {
    display: flex; align-items: flex-start; gap: .65rem;
    background: var(--bg-elev); border: 1px solid var(--line);
    border-radius: var(--radius); padding: .85rem 1rem;
}
.sub-perk-ico { font-size: 1.35rem; line-height: 1.3; flex-shrink: 0; }
.sub-perk-text strong { display: block; font-size: .9rem; color: var(--ink); margin-bottom: .15rem; }
.sub-perk-text p { margin: 0; font-size: .82rem; line-height: 1.5; color: var(--ink-soft); }
.sub-perk-ok {
    background: var(--ok-soft);
    border-color: color-mix(in srgb, var(--ok) 35%, transparent);
}
.sub-perk-ok .sub-perk-text strong { color: var(--ok); }
@media (max-width: 640px) {
    .sub-perks { grid-template-columns: 1fr; }
}

/* ---------- subscription: feature comparison grid ---------- */
.sub-compare { margin-top: 1.5rem; }
.sub-compare h2 { margin-bottom: 1rem; }
/* Desktop: overflow visible so the plan hover-tooltip can escape the table bounds. Narrow screens:
   horizontal scroll for the table (tooltips are hover-only, irrelevant on touch). */
.sub-compare-scroll { overflow: visible; }
@media (max-width: 52rem) {
    .sub-compare-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
.sub-compare-table {
    width: 100%; min-width: 36rem; border-collapse: collapse; font-size: .88rem;
}
.sub-compare-table thead th {
    background: var(--bg-elev); color: var(--ink);
    font-family: var(--font-sans); font-weight: 600; font-size: .95rem;
    text-align: center; padding: .7rem .6rem;
    border-bottom: 2px solid var(--line-strong);
}
.sub-compare-table thead th:first-child { text-align: left; }
.sub-compare-table thead th.is-featured { color: var(--accent-ink); }
.sub-compare-group th {
    text-align: left; padding: .85rem .6rem .3rem;
    font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
    color: var(--ink-mute);
}
.sub-compare-table tbody td,
.sub-compare-table tbody th.sub-compare-feat {
    padding: .5rem .6rem; border-bottom: 1px solid var(--line);
}
.sub-compare-feat { text-align: left; font-weight: 400; color: var(--ink-soft); }
.sub-compare-table tbody td { text-align: center; color: var(--ink); }
.sub-compare-table tbody td.is-featured { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.sub-compare-table tbody td.is-active { background: var(--ok-soft); }
.sub-compare-num { font-weight: 600; color: var(--ink); }

/* Merged pricing + comparison table: each plan column header carries name, price and the buy CTA.
   Fixed layout + a bounded first column so the long feature labels wrap instead of stretching column 1,
   and the plan columns split the rest of the width evenly across the table. */
.sub-compare-merged .sub-compare-table { min-width: 44rem; table-layout: fixed; }
.sub-compare-merged col.sub-col-label { width: 30%; }
.sub-plan-corner { background: transparent; border-bottom: 2px solid var(--line-strong); vertical-align: top; padding: 1rem .8rem 1rem 0; }
/* The toolbar reads as part of the table header, not a floating card: no background / border / shadow. */
.sub-plan-corner .sub-controls { margin: 0; padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
/* Control toolbar row: spans only the plan columns (above the plan names); no cell chrome so the
   inner .sub-controls card provides all the styling. */
.sub-controls-row td { padding: 0; border: 0; background: transparent; }
.sub-controls-row .sub-controls-cell { vertical-align: bottom; }
.sub-controls-row .sub-controls { margin: 0 0 1rem; }
.sub-compare-table thead th.sub-plan-head {
    vertical-align: top; text-align: center; padding: 1rem .7rem;
    /* 1px (a DEFINITE height) — the table grows the cell to the full row height, and the inner div's
       height:100% then resolves against it so margin-top:auto can bottom-pin the CTA. A percentage
       height here would stay unresolved (table has no explicit height) and the alignment would fail. */
    height: 1px;
    font-family: inherit; font-weight: 400; background: var(--bg-elev);
    border-bottom: 2px solid var(--line-strong);
}
.sub-plan-head.is-featured { background: color-mix(in srgb, var(--accent) 6%, var(--bg-elev)); }
.sub-plan-head.is-active { background: var(--ok-soft); }
/* Full-height flex column so the CTA buttons bottom-align across columns of unequal price content
   (e.g. "Po dogovoru" has no /mesec line). gap gives uniform spacing; the CTA's auto top-margin
   absorbs the slack and pins it to the bottom. */
.sub-plan-head-inner { position: relative; display: flex; flex-direction: column; align-items: center; gap: .4rem; height: 100%; }
.sub-plan-tag {
    padding: .12rem .55rem; border-radius: var(--radius-pill);
    font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
    background: var(--accent); color: #fff;
}
.sub-plan-tag.is-current { background: var(--ok); }
.sub-plan-tag.is-trial { background: var(--accent); }
.sub-plan-name { font-family: var(--font-sans); font-size: 1.1rem; font-weight: 700; color: var(--ink); }
.sub-plan-info { margin-left: .2rem; font-size: .7em; color: var(--ink-mute); vertical-align: super; }
.sub-plan-price { font-family: var(--font-sans); line-height: 1.1; }
.sub-plan-price-was { display: block; font-size: .8rem; font-weight: 400; color: var(--ink-mute); text-decoration: line-through; }
.sub-plan-price-now { font-size: 1.5rem; font-weight: 700; color: var(--ink); }
.sub-plan-period { font-size: .78rem; font-weight: 400; color: var(--ink-mute); }
.sub-plan-permonth { font-size: .72rem; color: var(--ink-soft); }
/* All CTAs single-line + smaller with a fixed line-height, so the long "Kontaktirajte nas" (an <a>,
   which inherits the page line-height) renders the exact same height as the <button> CTAs. */
.sub-plan-cta { margin-top: auto; width: 100%; justify-content: center; white-space: nowrap; font-size: .82rem; line-height: 1.2; padding-left: .55rem; padding-right: .55rem; }
/* SUMMERBREEZE promo pill on the featured Napredni column (click applies the code). */
.sub-plan-promo { display: block; width: 100%; margin-top: .1rem; padding: .35rem .5rem; background: var(--accent-soft); border: 1px dashed var(--accent); border-radius: var(--radius); color: var(--ink); font: inherit; font-size: .72rem; line-height: 1.3; text-align: center; cursor: pointer; }
.sub-plan-promo:hover { filter: brightness(.97); }
/* Custom hover tooltip: the "za koga" description, shown above the plan on hover/focus of the header. */
.sub-plan-tip {
    position: absolute; bottom: calc(100% + 8px); left: 50%; width: 230px; max-width: 78vw;
    padding: .7rem .85rem; border-radius: var(--radius); background: var(--ink); color: #fff;
    font-family: var(--font-sans); font-size: .76rem; font-weight: 400; line-height: 1.5; text-align: left;
    box-shadow: 0 12px 32px rgba(0,0,0,.28); z-index: 60; pointer-events: none;
    opacity: 0; visibility: hidden; transform: translateX(-50%) translateY(4px); transition: opacity .15s, transform .15s;
}
.sub-plan-tip::after {
    content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
    border: 6px solid transparent; border-top-color: var(--ink);
}
.sub-plan-head:hover .sub-plan-tip, .sub-plan-head:focus-within .sub-plan-tip {
    opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
.cell-yes { color: var(--ok); font-weight: 700; }
.cell-no { color: var(--ink-mute); }
.sub-compare-foot { margin-top: .7rem; font-size: .78rem; color: var(--ink-mute); }

/* ---------- locked feature screen ---------- */
.locked-feature {
    max-width: 32rem; margin: 4rem auto; text-align: center;
    padding: 2.5rem 2rem;
    background: var(--bg-elev); border: 1px solid var(--line);
    border-radius: var(--radius);
}
.locked-feature-mark {
    font-size: 2.5rem; color: var(--accent); margin-bottom: .5rem;
}
.locked-feature h2 {
    font-family: var(--font-serif); font-size: 1.75rem; margin-bottom: .5rem;
}
.locked-feature-lead {
    color: var(--ink-soft); font-size: 1rem; margin: 0 0 1rem;
}
.locked-feature-need {
    color: var(--ink-mute); font-size: .9rem; margin: 0 0 1.5rem;
}

/* ---------- nav link variants ---------- */
.nav-link-pricing { color: var(--accent-ink) !important; font-weight: 600; }

/* ---------- AI chat ---------- */
.ai-fab {
    position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 60;
    width: 3.4rem; height: 3.4rem; border-radius: 50%;
    border: none; cursor: pointer;
    background: var(--bg-elev); color: var(--accent);
    font-family: var(--font-serif); font-weight: 400;
    box-shadow: 0 10px 24px rgba(26, 26, 26, .25);
    display: grid; place-items: center;
    transition: transform .2s, background .15s, box-shadow .15s, opacity .15s;
    border: 1px solid var(--line-strong);
}
.ai-fab:hover {
    background: var(--bg); transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(26, 26, 26, .3);
}
.ai-fab.open {
    opacity: 0; pointer-events: none; transform: scale(.85);
}
.ai-fab-mark {
    line-height: 1; display: inline-flex; align-items: center; justify-content: center;
}
.ai-fab-mark img { width: 2.4rem; height: 2.4rem; display: block; object-fit: contain; }

.ai-sidebar {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 55;
    width: var(--ai-width, min(28rem, 100vw));
    min-width: 20rem; max-width: 100vw;
    background: var(--bg-elev);
    border-left: 1px solid var(--line-strong);
    box-shadow: -16px 0 30px rgba(26, 26, 26, .12);
    display: flex; flex-direction: column;
    animation: ai-slide-in .25s ease-out;
}
@keyframes ai-slide-in {
    from { transform: translateX(100%); opacity: .4; }
    to { transform: translateX(0); opacity: 1; }
}
/* AI assistant as a full notebook page (Pomočnik bookmark) instead of the floating sidebar. It fills
   the whole A4 page and blends into the lined paper - no card border/shadow/background. The notebook
   page itself (.journal-page-chat) is a flex column so the chat takes all the height below the header;
   the messages list (flex:1) scrolls while the input stays at the bottom of the page. */
.ai-page {
    display: flex; flex-direction: column; min-height: 0;
    background: none; border: none; border-radius: 0; box-shadow: none; overflow: hidden;
}
/* The chat page is viewport-bounded (NOT the A4 paper ratio that grows with content): so the messages
   area scrolls internally and the input + "AI lahko naredi napake" footer stay pinned/visible. The
   height budget must cover the chrome ABOVE the page (.app-main's 3rem top padding + breathing room) -
   short-changing it pushes the pinned input below the fold, so the body scrolls too and the two
   scrollbars fight (the old value budgeted only 2.5rem for a 3rem+ chrome). */
.journal-page-chat {
    display: flex; flex-direction: column;
    aspect-ratio: auto;
    height: calc(100dvh - var(--nav-h) - 3.75rem);
    min-height: 34rem; overflow: hidden;
}
.journal-page-chat .ai-page { flex: 1 1 auto; min-height: 0; margin-top: 1rem; }

/* ── Pomočnik on the wide spread: conversation history on the left, the chat beside it ─────────────
   The chat page is viewport-bounded, so it overrides the spread's own 1200px min-height (which would
   push the pinned input below the fold and start a second scrollbar). The centre crease is dropped
   here: the transcript is transparent - unlike the 3D/Gantt panels that sit on top of it - so the
   painted fold would run straight down the middle of the answers. */
.journal-page.journal-page-spread.journal-page-chat {
    min-height: 34rem;
    height: calc(100dvh - var(--nav-h) - 3.75rem);
}
.journal-page.journal-page-spread.journal-page-chat::after { display: none; }

/* The account-level Pomočnik (/asistent) has no notebook page under it - ShellLayout's <main> is an
   ordinary growing block. This gives it the same viewport-bounded box .journal-page-chat gives the
   project assistant, so the transcript scrolls inside and the input stays pinned instead of the whole
   page scrolling and two scrollbars fighting. */
.pro-chat-page {
    display: flex; flex-direction: column;
    height: calc(100dvh - var(--nav-h) - 3.75rem);
    min-height: 34rem; overflow: hidden;
}
.pro-chat-page .ai-page { flex: 1 1 auto; min-height: 0; }

/* ── The account-level Pomočnik as one locked screen ──────────────────────────────────────────────
   Sizing that page by hand never added up: the shell also carries .app-main's 6rem bottom padding and
   the whole footer, so 100dvh - --nav-h - 3.75rem of chat always left the page taller than the window -
   the transcript stopped short of the bottom edge and the footer sat a scroll below it (worse on a
   Profesionalni account, whose navbar was two rows tall and blew the --nav-h budget outright).
   So the SHELL is the screen and the flex chain hands the leftover height to the chat: nothing is
   guessed, the input stays pinned, and the footer lands on the bottom edge with nothing to scroll. */
.app-shell-fixed { height: 100dvh; min-height: 0; }
/* The trial/free bar is a sibling ABOVE the shell (MainLayout), so it has to come out of the budget. */
.trial-banner ~ .app-shell-fixed { height: calc(100dvh - 3.2rem); }
.app-shell-fixed .app-main {
    flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column;
    padding-bottom: 1rem;
}
.app-shell-fixed .pro-chat-page { height: auto; flex: 1 1 auto; min-height: 0; }

/* ── One header rhythm for the five account-level pro pages ───────────────────────────────────────
   The assistant sets it, because it is the page with no room to argue: on a screen that cannot scroll,
   the standard 3rem under the navbar plus 2rem+2.5rem under the title is a fifth of the transcript
   spent on air. The board, planer, delavci and izvajalci follow it, so moving between the five never
   moves the heading. (.app-shell-fixed is listed too: without the plan the assistant page still
   renders, and it is still viewport-locked.) */
.app-shell-pro .app-main,
.app-shell-fixed .app-main,
.projects-screen.is-pro .projects-main { padding-top: 1.5rem; }

.app-shell-pro .phase-header,
.app-shell-fixed .phase-header,
.projects-screen.is-pro .phase-header { padding-bottom: 1rem; margin-bottom: 1.25rem; }

.app-shell-pro .phase-header .intro,
.app-shell-fixed .phase-header .intro,
.projects-screen.is-pro .phase-header .intro { margin-top: .5rem; }

/* ── The firm's account pages: one WIDER column (2026-10-06) ──────────────────────────────────────
   /plosca, /planer, /asistent, /imenik (its tabs and its company pages), /racun, /moj-katalog and /navodila-pro
   are boards and lists; at --max (1080 px) a builder's desktop was mostly margin. ShellLayout marks them
   .app-shell-board (with the plan only - without it /contractors is a notebook page), and ProjectsScreen's board
   is .projects-screen.is-pro. The navbar widens with the column, so the logo and the menus stay over the
   content's edges. Only the cap moves: under 1080 px nothing changes, so phones and tablets keep their layout. */
.app-shell-board .app-main,
.app-shell-board .app-nav-inner,
.projects-screen.is-pro .projects-main,
.projects-screen.is-pro .app-nav-inner { max-width: var(--max-board); }
/* The imenik's own 1100 px (one width for its lists, so switching tabs does not reflow) gives way to the
   column - for all of its lists alike, so that promise still holds. */
.app-shell-board .pro-directory,
.app-shell-board .pro-workers { max-width: none; }
/* The chat's own 2.1rem title would repeat the h1 above it; its controls (usage, new thread, memory)
   stay and move to the right, where they read as controls rather than as a heading. */
.pro-chat-page .ai-head-titles { display: none; }
.pro-chat-page .ai-head { justify-content: flex-end; padding: .35rem 0 .6rem; }
/* One screen means the footer has to earn its height: the copyright and the four legal links fold into
   a single row. (The data-source credit is not here to drop - it rides on the landing footer only.) */
.app-shell-fixed .app-footer {
    flex: none; flex-direction: row; flex-wrap: wrap; justify-content: center;
    column-gap: 1.25rem; row-gap: .15rem; padding: .5rem 1.25rem; font-size: .78rem;
}

.ai-workspace {
    flex: 1 1 auto; min-height: 0;
    display: grid; grid-template-columns: minmax(16rem, 22rem) 1fr; gap: 2.25rem;
}
.ai-workspace.is-solo { grid-template-columns: 1fr; }   /* no history column (assistant not in the plan) */
.ai-workspace-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }

.ai-history {
    display: flex; flex-direction: column; gap: .8rem; min-height: 0;
    padding-right: 1.75rem; border-right: 1px dashed var(--line-strong);
}
/* Level with the chat's head beside it, which sits 1rem down the notebook page (.journal-page-chat .ai-page) -
   the history's title used to stand above the chat's (NomiFac #1376). Only side by side: stacked on a narrow
   screen the strip leads the page. */
@media (min-width: 901px) {
    .journal-page-chat .ai-history { margin-top: 1rem; }
}
/* Folded: the panel keeps only its hinge, and the grid hands the width to the chat (see .ai-workspace).
   The border stays, so the transcript still has an edge to sit against rather than drifting left. */
.ai-workspace:has(> .ai-history.is-collapsed) { grid-template-columns: auto 1fr; gap: 1rem; }
.ai-history.is-collapsed { padding-right: .6rem; }
.ai-history.is-collapsed .ai-history-head { justify-content: center; }

/* As tall as the chat's 2.1rem title line beside it, so "Pogovori" and "Architec Pomočnik" share a centre line. */
.ai-history-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; min-height: 2.2rem; }
/* The hinge. Sits first in the head so it never moves between the two states - a control that jumps
   when you use it has to be found again every time. */
.ai-history-fold {
    flex: 0 0 auto; align-self: center; display: inline-flex; align-items: center; justify-content: center;
    width: 1.7rem; height: 1.7rem; padding: 0; cursor: pointer; color: var(--ink-soft);
    background: none; border: 1px solid var(--line-strong); border-radius: var(--radius);
    transition: background .14s, color .14s;
}
.ai-history-fold:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }
.ai-history.is-collapsed .ai-history-fold svg { transform: rotate(180deg); }
.ai-history-title { flex: 1 1 auto; min-width: 0; margin: 0; font-family: var(--font-serif); font-size: 1.35rem; font-weight: 400; }
.ai-history-new {
    flex: 0 0 auto; font-family: var(--font-sans); font-size: .75rem; font-weight: 600;
    color: var(--accent-ink); background: none; border: 1px solid var(--line-strong);
    border-radius: var(--radius-pill); padding: .3rem .75rem; cursor: pointer; white-space: nowrap;
}
.ai-history-new:hover:not(:disabled) { background: var(--accent-soft); border-color: var(--accent); }
.ai-history-new:disabled { opacity: .5; cursor: default; }

.ai-history-tools { display: flex; flex-direction: column; gap: .5rem; }
/* The app's one field skin (.type-input), not a squeezed variant of it: this sits beside properly
   styled inputs everywhere else in the product, and type="search" adds the browser's own clear "×" on
   top of that - the same native chrome the journal search already refuses. */
.ai-history-search {
    width: 100%; appearance: none;
    font-family: var(--font-sans); font-size: .88rem;
    padding: .55rem .75rem; border: 1px solid var(--line-strong); border-radius: var(--radius);
    background: var(--bg-elev); color: var(--ink);
}
.ai-history-search:focus { outline: none; border-color: var(--accent); }
.ai-history-search::placeholder { color: var(--ink-mute); }
.ai-history-search::-webkit-search-cancel-button { display: none; }
.ai-history-filters { display: flex; align-items: center; justify-content: flex-end; gap: .5rem; }
.ai-history-sort {
    font-family: var(--font-sans); font-size: .76rem; color: var(--ink-soft); padding: .15rem .1rem;
    background: none; border: none; border-bottom: 1px dotted var(--line-strong); cursor: pointer;
}

.ai-history-empty { margin: .2rem 0 0; font-family: var(--font-sans); font-size: .84rem; color: var(--ink-soft); line-height: 1.5; }
.ai-history-list {
    list-style: none; margin: 0; padding: 0 .2rem 0 0;
    flex: 1 1 auto; min-height: 0; overflow-y: auto;
    display: flex; flex-direction: column; gap: .3rem;
}
.ai-history-item { position: relative; display: flex; align-items: flex-start; border-radius: var(--radius); }
.ai-history-item:hover { background: rgba(10, 10, 10, .06); }
.ai-history-item.is-open { background: rgba(10, 10, 10, .1); box-shadow: inset 3px 0 0 var(--accent); }
.ai-history-open {
    flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: .15rem;
    text-align: left; background: none; border: none; cursor: pointer;
    padding: .55rem .65rem; font-family: var(--font-sans); color: inherit;
}
.ai-history-open:disabled { cursor: default; }
.ai-history-item-title {
    font-size: .84rem; font-weight: 600; line-height: 1.3; color: var(--ink);
    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ai-history-item-meta { display: flex; flex-wrap: wrap; gap: .45rem; font-size: .68rem; color: var(--ink-mute); }
.ai-history-item-preview {
    font-size: .72rem; line-height: 1.35; color: var(--ink-soft);
    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
/* Which gradbišče a thread belongs to. Only shown at account level (/asistent), where one list holds
   conversations from every site - inside a project it would repeat the page title on every row. */
.ai-history-item-site {
    align-self: flex-start; font-size: .66rem; font-weight: 600; letter-spacing: .02em;
    color: var(--accent-ink); background: var(--accent-soft);
    border-radius: var(--radius-pill); padding: .05rem .45rem; max-width: 100%;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ai-history-del {
    flex: 0 0 auto; align-self: center; opacity: 0; transition: opacity .12s;
    background: none; border: none; cursor: pointer; color: var(--ink-mute);
    padding: .3rem; line-height: 0; border-radius: var(--radius);
}
.ai-history-del svg { width: 1rem; height: 1rem; }
.ai-history-item:hover .ai-history-del, .ai-history-item.is-open .ai-history-del { opacity: 1; }
.ai-history-del:hover { color: var(--accent); background: rgba(10, 10, 10, .12); }
.ai-history-confirm {
    flex: 0 0 auto; align-self: center; display: flex; align-items: center; gap: .25rem;
    font-family: var(--font-sans); font-size: .7rem; color: var(--ink-soft); padding-right: .3rem;
}
.ai-history-confirm button {
    font-family: var(--font-sans); font-size: .7rem; font-weight: 600; cursor: pointer;
    background: none; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); padding: .05rem .4rem;
}
.ai-history-yes { color: var(--accent-ink); }
.ai-history-yes:hover { background: var(--accent-soft); border-color: var(--accent); }

/* Narrow screens: the history stops being a column and becomes a short, scrollable strip above the
   chat. The page's height is the viewport, so the strip is kept tight - previews go, rows shrink to
   their title and date - or it would eat the transcript it is supposed to lead back into. */
@media (max-width: 900px) {
    .ai-workspace { grid-template-columns: 1fr; gap: .75rem; }
    /* One column already - folding buys height here, not width, which on a phone is the scarcer of
       the two: the strip and its search box are ~9 rem of the transcript. The hinge therefore STAYS
       (hiding it would strand a panel folded on a desktop and then carried onto a narrow screen). */
    .ai-workspace:has(> .ai-history.is-collapsed) { grid-template-columns: 1fr; }
    .ai-history.is-collapsed { padding-right: 0; padding-bottom: .4rem; }
    .ai-history.is-collapsed .ai-history-head { justify-content: flex-start; }
    .ai-history.is-collapsed .ai-history-fold svg { transform: rotate(90deg); }
    .ai-history {
        gap: .55rem; padding-right: 0; padding-bottom: .6rem;
        border-right: none; border-bottom: 1px dashed var(--line-strong);
    }
    .ai-history-list { max-height: 9rem; }
    .ai-history-item-preview { display: none; }
    .ai-history-del { opacity: 1; }   /* no hover on touch */
}
/* head/input blend onto the paper rather than reading as a card's chrome. The head IS the page
   heading now (no separate phase-header): a big handwritten title + beta + the tool/clear/memory
   icons, on a dashed chapter rule. */
.ai-page .ai-head {
    background: none; padding: 0 .25rem 1rem; margin-bottom: .5rem;
    border-bottom: 1px dashed var(--line-strong);
    align-items: flex-start;   /* title block has two lines now; keep the controls at the top */
    /* A column too narrow for the title AND the controls puts the controls on a row of their own under the
       subtitle, instead of squeezing the 2.1rem title into a sliver beside them (NomiFac #1376, 390 px). */
    flex-wrap: wrap; row-gap: .6rem;
}
.ai-head-titles { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.ai-page .ai-head-titles { flex: 1 1 19rem; }
.ai-page .ai-head-title { flex: 0 0 auto; font-family: var(--font-serif); font-size: 2.1rem; font-weight: 400; line-height: 1.05; }
.ai-page .ai-head-title .ai-head-mark img { width: 1.7rem; height: 1.7rem; vertical-align: -.25em; }
.ai-head-sub { margin: 0; font-family: var(--font-sans); font-size: .82rem; font-weight: 400; color: var(--ink-soft); line-height: 1.35; }
/* The meters and the controls on one line (NomiFac #1376): centred on each other, so the pills sit level with the
   Orodja switch and the icon buttons whatever the head's own alignment is. Wraps as a unit on a narrow column. */
.ai-head-side {
    flex: 0 1 auto; min-width: 0; margin-left: auto;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .4rem .6rem;
}
.ai-head-meters { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .35rem; min-width: 0; }
/* NomiFac #1357: the changes the Pomočnik's cards may still write (or Osnovni's sentence), a pill beside the AI meter
   since #1376. Osnovni's sentence is long: it may wrap on a phone, never scroll. */
.ai-head-writes { white-space: normal; overflow-wrap: anywhere; max-width: 100%; color: var(--ink-soft); }
.ai-page .ai-input-row { background: none; }
.ai-head {
    display: flex; align-items: center; gap: .5rem;
    padding: .9rem 1rem;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
}
.ai-head-title {
    font-family: var(--font-sans); font-weight: 600; font-size: 1.05rem;
    color: var(--ink); flex: 1;
}
.ai-head-mark { margin-right: .35rem; }
.ai-head-mark img { width: 1.4rem; height: 1.4rem; vertical-align: -.32em; object-fit: contain; }
.ai-beta {
    display: inline-block; margin-left: .4rem; vertical-align: middle;
    font-family: var(--font-sans); font-size: .58rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .07em; line-height: 1;
    color: var(--accent-ink); background: var(--accent-soft);
    padding: .12rem .35rem; border-radius: var(--radius);
}

/* ---------- backend-unreachable overlay (in-app, when the API dies mid-session) ---------- */
.conn-down {
    position: fixed; inset: 0; z-index: 9999;
    display: grid; place-items: center; padding: 1.5rem;
    background: rgba(237, 237, 237, .86); backdrop-filter: blur(4px);
}
.conn-down-card {
    text-align: center; background: var(--bg-elev);
    border: 1px solid var(--line); border-left: 3px solid var(--accent);
    border-radius: var(--radius); padding: 2.5rem 2.25rem; max-width: 30rem; width: 100%;
    box-shadow: 0 16px 48px rgba(26, 26, 26, .18);
}
.conn-down-logo { height: 34px; margin-bottom: 1.5rem; }
.conn-down-icon {
    width: 3.25rem; height: 3.25rem; margin: 0 auto 1.1rem; display: grid; place-items: center;
    border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink);
}
.conn-down-icon svg { width: 1.7rem; height: 1.7rem; }
.conn-down-title { font-family: var(--font-serif); font-size: 1.45rem; font-weight: 400; margin-bottom: .5rem; }
.conn-down-msg { font-size: .9rem; color: var(--ink-soft); line-height: 1.6; margin: 0 0 1.75rem; }
.conn-down-btn { width: 100%; justify-content: center; }
.conn-down-status {
    margin-top: 1.25rem; font-size: .76rem; color: var(--ink-mute);
    display: inline-flex; align-items: center; gap: .45rem;
}
.conn-dot { width: 8px; height: 8px; border-radius: 50%; background: #b5483f; flex: none; }

/* ---------- daily-usage pill (metered AI / lookup features) ---------- */
.usage-pill {
    display: inline-flex; align-items: center; gap: .3rem;
    font-size: .68rem; font-weight: 600; color: var(--ink-mute);
    background: var(--bg); border: 1px solid var(--line);
    border-radius: var(--radius-pill); padding: .12rem .5rem;
    font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 1.5;
}
.usage-pill-label { text-transform: uppercase; letter-spacing: .05em; }
.usage-pill-count { color: var(--ink-soft); }
.usage-pill-unit { color: var(--ink-mute); font-weight: 400; }
.usage-pill.is-exhausted { background: #fbeae7; border-color: #e2b3a9; color: #8a2f27; }
.usage-pill.is-exhausted .usage-pill-count { color: #8a2f27; }

/* "you hit today's limit" notices (parcel lookup + AI chat) - same soft tone as the exhausted pill,
   so it reads as a friendly quota notice rather than an alarming error. */
.parcel-limit, .ai-limit {
    display: flex; gap: .6rem; align-items: flex-start;
    padding: .8rem .95rem; border-radius: var(--radius);
    border: 1px solid #e2b3a9; background: #fbeae7; color: #8a2f27;
    font-size: .9rem; line-height: 1.45;
}
.parcel-limit { margin-top: 1.1rem; }
.ai-limit { margin: 0 1rem .65rem; }
.parcel-limit strong, .ai-limit strong { display: block; font-weight: 700; }
.parcel-limit-mark, .ai-limit-mark { font-size: 1.05rem; line-height: 1.35; flex-shrink: 0; }
/* NomiFac #1181: the day's full reports, the locked property and the spent full report. The notices wrap on a phone
   (320 px): min-width 0 lets the text column shrink, the link wraps whole and stays a tap target. */
.parcel-locked-notice > div, .report-full-spent > div { min-width: 0; overflow-wrap: break-word; }
.parcel-full-meter { margin: .7rem 0 0; font-size: .85rem; color: var(--ink-mute); }
.parcel-full-meter strong { color: var(--ink); font-weight: 700; }
/* Underlined at rest the app's way (the link's 1px bottom border, never text-decoration); padding keeps a 24 px+ target. */
.parcel-locked-link {
    display: inline-block; margin-top: .3rem; padding: .3rem 0 .05rem;
    font-weight: 700; color: inherit; border-bottom-color: currentColor; white-space: nowrap;
}
.parcel-sections > .report-full-spent { margin: 0 0 .75rem; }
.ai-head-close {
    appearance: none; border: none; background: transparent;
    color: var(--ink-mute); cursor: pointer;
    width: 2rem; height: 2rem; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    line-height: 1;
}
.ai-head-close svg { width: 1.15rem; height: 1.15rem; display: block; }
.ai-head-close:hover { background: var(--bg-elev); color: var(--ink); }

.ai-messages {
    flex: 1; min-height: 0; overflow-y: auto; padding: 1rem;
    display: flex; flex-direction: column; gap: .65rem;
    /* Never chain the wheel to the document: while a long reply streams the list is pinned to its
       bottom edge, so without containment every further wheel-down lurched the whole journal page
       (and wheel-up at the top did the same) - the "scrolling feels broken" bug. */
    overscroll-behavior: contain;
}
.ai-empty {
    color: var(--ink-soft); font-size: .9rem;
}
.ai-empty ul { padding-left: 1.1rem; margin: .5rem 0 0; }
.ai-empty li { margin-bottom: .25rem; }

/* "Shrani kot nalogo" action under an AI answer. */
.ai-msg-actions { margin-top: .5rem; }
.ai-msg-action {
    appearance: none; cursor: pointer; font: inherit;
    font-size: .78rem; font-weight: 600; color: var(--accent);
    background: none; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); padding: .25rem .7rem;
}
.ai-msg-action:hover:not(:disabled) { background: var(--bg); }
.ai-msg-action:disabled { color: var(--ink-mute); cursor: default; }

.ai-msg {
    display: flex; flex-direction: column; gap: .2rem;
    max-width: 88%;
}
.ai-msg.from-user { align-self: flex-end; align-items: flex-end; }
.ai-msg.from-ai { align-self: flex-start; align-items: flex-start; }
.ai-msg-meta {
    font-size: .7rem; color: var(--ink-mute);
    text-transform: uppercase; letter-spacing: .08em; font-weight: 600;
}
.ai-msg-body {
    padding: .6rem .9rem; border-radius: var(--radius);
    font-size: .9rem; line-height: 1.45;
    white-space: pre-wrap; word-wrap: break-word;
}
/* user bubble: brand accent (not the old near-black ink), white text, with a small "tail" corner */
.ai-msg.from-user .ai-msg-body {
    background: linear-gradient(135deg, var(--accent), var(--accent-ink)); color: #fff;
    border-bottom-right-radius: var(--radius);
}
/* assistant bubble: light card with a soft shadow + a tail on the left */
.ai-msg.from-ai .ai-msg-body {
    background: var(--bg-elev); color: var(--ink);
    border: 1px solid var(--line-strong); border-bottom-left-radius: var(--radius);
    box-shadow: 0 1px 2px rgba(26, 26, 26, .06);
}
.ai-thinking { font-style: italic; color: var(--ink-mute); }

/* Photos that came with a source (NEP - a picture of the actual building failure, or of the same
   detail done right). Shown above the "Viri" list; the caption is the same label the list links,
   and the corner badge says which rubric it is - a cokel done wrong and one done right look alike. */
.ai-shots {
    align-self: stretch; max-width: 100%; margin-top: .45rem;
    display: flex; flex-wrap: wrap; gap: .5rem;
}
.ai-shot { margin: 0; flex: 1 1 9rem; max-width: 13rem; min-width: 0; }
.ai-shot a { display: block; border: 0; position: relative; }
.ai-shot img {
    display: block; width: 100%; height: 8.5rem; object-fit: cover;
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    background: var(--bg); box-shadow: 0 1px 2px rgba(26, 26, 26, .06);
}
.ai-shot img:hover { border-color: var(--accent-ink); }
.ai-shot-badge {
    position: absolute; left: .3rem; top: .3rem; z-index: 1;
    padding: .08rem .35rem; border-radius: var(--radius-pill);
    font-size: .62rem; font-weight: 600; line-height: 1.5; letter-spacing: .01em;
    color: #fff; background: rgba(26, 26, 26, .78); box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.ai-shot-badge-kiks { background: rgba(168, 58, 42, .88); }      /* napaka */
.ai-shot-badge-pohvala { background: rgba(58, 122, 74, .88); }   /* dobra praksa */
.ai-shot-badge-oboje { background: rgba(150, 104, 30, .9); }     /* oboje na eni fotografiji */
.ai-shot figcaption {
    margin-top: .22rem; font-size: .7rem; line-height: 1.25; color: var(--ink-mute);
    overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}

/* "Viri" - source links the app derives from the turn's tool results (under the AI bubble). */
.ai-sources {
    align-self: stretch; max-width: 100%; margin-top: .35rem;
    padding: .45rem .6rem; font-size: .8rem;
    background: var(--bg); border: 1px dashed var(--line-strong); border-radius: var(--radius);
}
.ai-sources-title {
    font-size: .62rem; text-transform: uppercase; letter-spacing: .07em;
    font-weight: 700; color: var(--ink-mute); margin-bottom: .3rem;
}
.ai-sources-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .22rem; }
.ai-sources-list li { line-height: 1.3; padding-left: .9rem; position: relative; }
.ai-sources-list li::before { content: "↗"; position: absolute; left: 0; color: var(--ink-mute); font-size: .8em; }
.ai-sources-list a { color: var(--accent-ink); border-bottom-color: currentColor; word-break: break-word; }
.ai-sources-list span { color: var(--ink-soft); word-break: break-word; }

.ai-input-row {
    display: flex; gap: .5rem; align-items: flex-end;
    padding: .75rem 1rem;
    border-top: 1px solid var(--line);
    background: var(--bg);
}
.ai-input {
    flex: 1; min-height: 2.75rem; max-height: 16rem;
    border: 1px solid var(--line-strong); border-radius: var(--radius));
    padding: .6rem .8rem; font-family: var(--font-sans);
    font-size: .9rem; line-height: 1.5; color: var(--ink); background: var(--bg-elev);
    resize: vertical;                                   /* drag the bottom edge to grow it taller */
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .04);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.ai-input::placeholder { color: var(--ink-mute); }
.ai-input:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.ai-send { flex-shrink: 0; }
/* Round action buttons in the chat input row (random / send / stop). */
.ai-round-btn {
    flex: none; width: 2.5rem; height: 2.5rem; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0; font-size: 1.05rem; line-height: 1; cursor: pointer;
    border: 1px solid var(--line-strong); background: var(--bg-elev); color: var(--ink-soft);
    transition: background .15s, color .15s, border-color .15s, transform .1s;
}
.ai-round-btn svg { width: 1.15rem; height: 1.15rem; display: block; }
.ai-round-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-ink); background: var(--bg); }
.ai-round-btn:active:not(:disabled) { transform: scale(.92); }
.ai-round-btn:disabled { opacity: .45; cursor: default; }
.ai-send-btn { background: var(--accent); border-color: var(--accent); color: #fff; }
.ai-send-btn:hover:not(:disabled) { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }
.ai-stop-btn { background: #7a2020; border-color: #7a2020; color: #fff; }
.ai-stop-btn:hover:not(:disabled) { background: #8f2626; border-color: #8f2626; }

.ai-foot {
    padding: .5rem 1rem .75rem;
    font-size: .7rem; color: var(--ink-mute); font-style: italic;
    background: var(--bg); text-align: center;
}
/* Live "thinking" timer shown in the foot while the assistant works. */
.ai-timer {
    display: inline-flex; align-items: center; gap: .4rem;
    font-style: normal; color: var(--ink-soft); font-weight: 600;
}
.ai-timer-dot {
    width: .5rem; height: .5rem; border-radius: 50%;
    background: var(--accent); animation: ai-timer-pulse 1s ease-in-out infinite;
}
.ai-timer-secs { font-variant-numeric: tabular-nums; color: var(--accent-ink); }
@keyframes ai-timer-pulse { 0%,100% { opacity: .3; transform: scale(.8); } 50% { opacity: 1; transform: scale(1); } }

.ai-locked {
    padding: 2.5rem 1.5rem; text-align: center;
    display: flex; flex-direction: column; gap: .65rem; align-items: center;
}
.ai-locked-mark { font-size: 2rem; color: var(--accent); line-height: 1; }
.ai-locked h3 { font-family: var(--font-sans); font-size: 1.25rem; margin: 0; }
.ai-locked p { color: var(--ink-soft); margin: 0; font-size: .92rem; }
.ai-locked strong { color: var(--accent-ink); font-weight: 600; }

/* ---------- AI chat: header tools, suggestions, fullscreen, pin, markdown ---------- */
.ai-head-actions { display: flex; align-items: center; gap: .15rem; }
.ai-head-btn {
    appearance: none; border: none; background: transparent;
    color: var(--ink-mute); cursor: pointer;
    width: 1.9rem; height: 1.9rem; border-radius: var(--radius);
    font-size: 1rem; line-height: 1; display: grid; place-items: center;
    transition: background .12s, color .12s, opacity .12s;
}
.ai-head-btn svg { width: 1.05rem; height: 1.05rem; display: block; }
.ai-head-btn:hover:not(:disabled) { background: var(--bg-elev); color: var(--ink); }
.ai-head-btn:disabled { opacity: .35; cursor: default; }
.ai-head-btn.is-active { color: var(--accent); background: var(--accent-soft); }

.ai-suggestions { display: flex; flex-direction: column; gap: .4rem; margin-top: .75rem; }
.ai-suggestion {
    appearance: none; text-align: left; cursor: pointer;
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    background: var(--bg); color: var(--ink-soft);
    padding: .5rem .65rem; font-family: var(--font-sans); font-size: .85rem; line-height: 1.3;
    transition: border-color .12s, color .12s, background .12s;
}
.ai-suggestion:hover { border-color: var(--accent); color: var(--ink); background: var(--bg-elev); }

.ai-stop { background: #7a2020; color: #fff; border: none; }
.ai-stop:hover { background: #8f2626; }

/* Full-screen takes the whole viewport width. */
.ai-sidebar.is-fullscreen { width: 100vw; }
/* Pinned: docked beside content, no drop shadow (the layout reserves space for it). */
.ai-sidebar.is-pinned { box-shadow: none; }

/* Drag-to-resize handle on the panel's left edge. */
.ai-resize-handle {
    position: absolute; left: 0; top: 0; bottom: 0; width: 6px; z-index: 3;
    cursor: ew-resize; background: transparent; transition: background .12s;
}
.ai-resize-handle:hover, .ai-resize-handle:active { background: var(--accent-soft); }
.ai-sidebar.is-fullscreen .ai-resize-handle { display: none; }

/* "Orodja" details switch in the header. */
.ai-switch-wrap { display: inline-flex; align-items: center; gap: .3rem; cursor: pointer; user-select: none; margin-right: .15rem; }
.ai-switch-label { font-size: .68rem; font-weight: 600; color: var(--ink-mute); white-space: nowrap; }
.ai-switch-input { position: absolute; opacity: 0; width: 0; height: 0; }
.ai-switch {
    position: relative; width: 1.85rem; height: 1.05rem; border-radius: var(--radius); flex-shrink: 0;
    background: var(--line-strong); transition: background .15s;
}
.ai-switch::after {
    content: ""; position: absolute; top: 2px; left: 2px;
    width: calc(1.05rem - 4px); height: calc(1.05rem - 4px); border-radius: 50%;
    background: #fff; box-shadow: 0 1px 2px rgba(26, 26, 26, .3); transition: transform .15s;
}
.ai-switch-input:checked + .ai-switch { background: var(--accent); }
.ai-switch-input:checked + .ai-switch::after { transform: translateX(.8rem); }
.ai-switch-input:focus-visible + .ai-switch { outline: 2px solid var(--accent); outline-offset: 2px; }
.ai-switch-wrap:hover .ai-switch-label { color: var(--ink); }

/* Reserve room on the right so a pinned panel sits beside content instead of over it
   (only on wide enough viewports; on narrow screens the panel overlays). The reservation is on
   the SHELL, not the content box: the centered (max-width) content re-centers within the reduced
   width, shifting into the empty side margins - so the whitespace shrinks first and the content
   keeps its size until the margins are used up. */
@media (min-width: 860px) {
    .app-shell.ai-pinned { padding-right: var(--ai-width, min(28rem, 100vw)); transition: padding-right .15s ease; }
}

/* Rendered markdown inside assistant bubbles. The shared .ai-msg-body uses pre-wrap (to keep the
   user's line breaks); markdown is already block-formatted, so reset it - otherwise the blank lines
   in the markdown source render as literal gaps on top of the paragraph margins. */
.ai-md { white-space: normal; }
.ai-md > :first-child { margin-top: 0; }
.ai-md > :last-child { margin-bottom: 0; }
.ai-md p { margin: 0 0 .4rem; }
.ai-md h1, .ai-md h2, .ai-md h3, .ai-md h4, .ai-md h5, .ai-md h6 {
    font-family: var(--font-sans); font-weight: 700; color: var(--ink);
    margin: .7rem 0 .35rem; line-height: 1.25;
}
.ai-md h1 { font-size: 1.05rem; }
.ai-md h2 { font-size: 1rem; }
.ai-md h3 { font-size: .95rem; }
.ai-md h4 { font-size: .9rem; }
.ai-md h5 { font-size: .86rem; font-weight: 600; }
.ai-md h6 { font-size: .82rem; font-weight: 600; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; }
.ai-md ul, .ai-md ol { margin: .25rem 0 .6rem; padding-left: 1.2rem; }
.ai-md li { margin-bottom: .15rem; }
.ai-md a { color: var(--accent-ink); border-bottom-color: currentColor; }
.ai-md code {
    background: var(--bg); border: 1px solid var(--line);
    border-radius: var(--radius); padding: .05rem .3rem; font-size: .82em;
}
.ai-md pre {
    background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
    padding: .6rem .7rem; overflow-x: auto; margin: .4rem 0 .6rem;
}
.ai-md pre code { background: none; border: none; padding: 0; }

/* Per-task AI advice: the round accent button on the row + its result modal. */
.item-ai {
    color: #fff; border-color: transparent; font-size: .95rem; line-height: 1;
    background: linear-gradient(135deg, var(--accent), var(--accent-ink));
}
.item-ai:hover { color: #fff; filter: brightness(1.07); }
.item-ai:disabled { opacity: .6; cursor: default; }
.ai-advice-card { max-width: 660px; width: 100%; display: flex; flex-direction: column; }
.ai-advice-body { padding: 1rem 1.25rem; max-height: min(62vh, 640px); overflow-y: auto; }
.ai-advice-loading {
    display: flex; align-items: center; justify-content: center; gap: .6rem;
    color: var(--ink-soft); padding: 1.75rem 0;
}
.ai-advice-error { color: #b03c30; margin: .5rem 0; }
.ai-advice-foot {
    display: flex; gap: .5rem; flex-wrap: wrap; padding: .85rem 1.25rem; border-top: 1px solid var(--line);
}
.ai-md table { border-collapse: collapse; width: 100%; margin: .4rem 0 .6rem; font-size: .82rem; }
.ai-md th, .ai-md td { border: 1px solid var(--line-strong); padding: .3rem .45rem; text-align: left; }
.ai-md th { background: var(--bg); font-weight: 600; }
.ai-md blockquote {
    margin: .4rem 0; padding-left: .7rem; border-left: 3px solid var(--line-strong);
    color: var(--ink-soft);
}

/* Tool-call details (toggled by the "Orodja" switch). */
.ai-tools { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .35rem; max-width: 100%; }
.ai-tool {
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    background: var(--bg); font-size: .78rem; overflow: hidden;
}
.ai-tool-sum {
    cursor: pointer; padding: .3rem .5rem; display: flex; align-items: center; gap: .4rem;
    list-style: none; user-select: none;
}
.ai-tool-sum::-webkit-details-marker { display: none; }
.ai-tool-sum::before { content: "▸"; color: var(--ink-mute); font-size: .7rem; }
.ai-tool[open] .ai-tool-sum::before { content: "▾"; }
.ai-tool-badge {
    font-size: .6rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700;
    color: var(--accent-ink); background: var(--accent-soft);
    padding: .05rem .3rem; border-radius: var(--radius);
}
.ai-tool-name { font-family: var(--font-mono); color: var(--ink); }
.ai-tool-io-label {
    font-size: .62rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600;
    color: var(--ink-mute); padding: .25rem .5rem 0;
}
.ai-tool-io {
    margin: .1rem .5rem .4rem; padding: .35rem .45rem;
    background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
    font-family: var(--font-mono); font-size: .72rem;
    white-space: pre-wrap; word-break: break-word; max-height: 16rem; overflow: auto;
}

/* ---------- responsive ---------- */
@media (max-width: 640px) {
    .app-main { padding: 2rem 1.25rem 4rem; }
    .phase-card { grid-template-columns: 2rem 1fr; gap: .8rem; padding: .8rem 1rem; }
    .phase-progress { grid-column: 2; align-items: flex-start; margin-top: .5rem; }
    .phase-bar { width: 100%; }
    .hero-meta { gap: 1rem; }
    .phase-header { flex-direction: column; align-items: flex-start; }
    /* header stacks → the schedule toolbar drops under the intro, left-aligned */
    .schedule-toolbar { align-items: flex-start; }
    .schedule-tools { justify-content: flex-start; }
    /* no notebook edge on phones → the view tabs sit in-flow above the board, right-aligned */
    .schedule-view-tabs { position: static; justify-content: flex-end; flex-wrap: wrap; margin: 0 0 1rem; }
    .schedule-view-tab { border-bottom: 1px solid var(--line-strong); border-radius: var(--radius); padding: .45rem .8rem; font-size: 1rem; }
    .phase-stat { text-align: left; width: 100%; }
    .phase-stat-bar { margin-left: 0; width: 100%; }
    .phase-budget { align-items: stretch; width: 100%; }
    .phase-budget-wrap { width: 100%; }
    .phase-budget-input { text-align: left; }
    .phase-budget-open { align-self: flex-start; }
    /* section tabs scroll sideways instead of stacking into many rows on a phone */
    .phase-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: .25rem; }
    .phase-tab { flex: none; }
}

/* ---------- custom (user-added) tasks ---------- */
/* The task's delete control is an .icon-btn (trash can) like the row's other actions; only the hover
   colour differs - destructive, so it goes red instead of accent. */
.item-remove {
    appearance: none; border: none; background: transparent;
    color: var(--ink-mute); cursor: pointer; font-size: 1.4rem;
    line-height: 1; padding: 0 .35rem; flex-shrink: 0; align-self: flex-start;
}
.item-remove:hover { color: #7a2020; }
.icon-btn.item-remove {
    font-size: inherit; padding: 0; align-self: center;
    width: 1.75rem; height: 1.75rem; color: var(--ink-mute);
}
.icon-btn.item-remove:hover:not(:disabled) {
    color: #7a2020; border-color: #7a2020; background: var(--bg-elev);
}
.custom-add {
    display: flex; gap: .5rem; align-items: center; margin-top: 1rem; flex-wrap: wrap;
}
.custom-add-input {
    flex: 1; min-width: 12rem;
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    padding: .55rem .7rem; font-family: var(--font-sans); font-size: .95rem;
    color: var(--ink); background: var(--bg-elev);
}
.custom-add-input:focus { outline: none; border-color: var(--accent); }
.custom-add-input::placeholder { color: var(--ink-mute); font-style: italic; }

/* ---------- compact icon action buttons ---------- */
.icon-btn {
    appearance: none; cursor: pointer; flex-shrink: 0;
    width: 2rem; height: 2rem; padding: 0; border-radius: var(--radius-pill);
    border: 1px solid var(--line-strong); background: var(--bg);
    color: var(--ink-soft);
    display: inline-flex; align-items: center; justify-content: center;
    transition: background .15s, color .15s, border-color .15s;
}
.icon-btn:hover:not(:disabled) { color: var(--accent-ink); border-color: var(--accent); background: var(--bg-elev); }
.icon-btn:disabled { opacity: .4; cursor: default; }
.icon-btn.is-active { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.icon-btn svg { display: block; }
.icon-btn input[type="file"] {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}

/* ---------- selected offer (star toggle) ---------- */
.inquiry-select.is-selected {
    color: var(--ok); border-color: var(--ok); background: var(--ok-soft);
}
.inquiry-select.is-selected svg { fill: currentColor; }
.inquiry-card.is-selected { border-color: var(--ok); box-shadow: inset 3px 0 0 var(--ok); }

/* ---------- billing toggle ---------- */
.billing-toggle-wrap {
    display: flex; align-items: center; justify-content: center;
    gap: .6rem; flex-wrap: wrap; margin-bottom: 1.75rem;
}
.billing-toggle-wrap .billing-toggle { margin-bottom: 0; }
.billing-toggle {
    display: inline-flex; align-items: center; gap: .25rem;
    background: var(--bg-elev); border: 1px solid var(--line);
    border-radius: var(--radius-pill); padding: .25rem; margin-bottom: 1.75rem;
}
.billing-opt {
    appearance: none; border: none; background: none; cursor: pointer;
    font: inherit; font-size: .85rem; color: var(--ink-soft);
    padding: .35rem .95rem; border-radius: var(--radius-pill); transition: background .15s, color .15s;
}
.billing-opt.active { background: var(--accent); color: #fff; font-weight: 600; }
.billing-save {
    margin: 0; color: var(--ok); font-size: .78rem; font-weight: 600;
    background: var(--ok-soft); border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent);
    border-radius: var(--radius-pill); padding: .25rem .6rem;
}
.billing-promo {
    margin: 0; font-size: .78rem; font-weight: 700; color: var(--accent-ink);
    background: color-mix(in srgb, var(--accent) 15%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
    border-radius: var(--radius-pill); padding: .25rem .6rem;
}
.sub-tier-annual-note { color: var(--ok); font-size: .78rem; font-weight: 600; margin-top: -.35rem; }

/* ---------- gantt chart ---------- */
.gantt-controls {
    display: flex; align-items: center; justify-content: flex-start;
    gap: .75rem; flex-wrap: wrap; margin-bottom: 1.25rem;
}
/* The zoom rung's name, between − and ＋. Fixed width so stepping through the ladder does not shuffle
   the buttons under the reader's finger. */
.gantt-zoom-label {
    font-size: .8rem; font-weight: 600; color: var(--ink-mute);
    text-transform: uppercase; letter-spacing: .04em;
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 5.5rem; padding: 0 .35rem; white-space: nowrap;
    border-block: 1px solid var(--line-strong);
    background: transparent;
}
/* Joined −/＋ button pair, sized to match the .btn-sm "Celoten zaslon / Skrči" button next to it. */
.gantt-zoom { display: inline-flex; }
.gantt-zoom-btn {
    appearance: none; cursor: pointer;
    border: 1px solid var(--line-strong); background: transparent;
    font: inherit; font-size: .95rem; line-height: 1; color: var(--ink);
    width: 2.1rem; height: 2.1rem;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background .15s, color .15s, border-color .15s;
}
.gantt-zoom-btn:first-child { border-radius: var(--radius) 0 0 var(--radius); border-right: none; }
.gantt-zoom-btn:last-child { border-radius: 0 var(--radius) var(--radius) 0; border-left: none; }
.gantt-zoom-btn:hover:not(:disabled) { background: var(--bg-elev); border-color: var(--ink); }
.gantt-zoom-btn:disabled { opacity: .35; cursor: default; }
.gantt-nav { display: inline-flex; align-items: center; gap: .5rem; }
.gantt-range-label {
    font-variant-numeric: tabular-nums; font-size: .9rem;
    color: var(--ink-soft); min-width: 11rem; text-align: center;
}
.gantt {
    border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--bg-elev);
    overflow: auto; max-height: 70vh; position: relative;
    width: max-content; max-width: 100%;
    --gantt-label-w: 13rem;
    /* One height for a task and a milestone - the two used to differ by half a row. */
    --gantt-pill-h: 1.5rem;
}
.gantt-head {
    display: flex; width: max-content;
    position: sticky; top: 0; z-index: 3;
    border-bottom: 1px solid var(--line-strong); background: var(--bg);
}
.gantt-corner {
    width: var(--gantt-label-w); flex-shrink: 0;
    position: sticky; left: 0; z-index: 4; background: var(--bg);
    border-right: 1px solid var(--line-strong);
    padding: .35rem .6rem; font-size: .7rem; font-weight: 600;
    color: var(--ink-mute); text-transform: uppercase; letter-spacing: .04em;
    display: flex; align-items: center;
}
.gantt-head-track { display: flex; flex-direction: column; flex-shrink: 0; }
.gantt-years { display: flex; }
.gantt-year {
    flex-shrink: 0; border-left: 1px solid var(--line-strong);
    font-size: .72rem; font-weight: 700; color: var(--ink);
    padding: .3rem .3rem; text-align: center;
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.gantt-year:first-child { border-left: none; }
.gantt-months { display: flex; border-top: 1px solid var(--line); }
.gantt-month {
    flex-shrink: 0; border-left: 1px solid var(--line);
    font-size: .68rem; font-weight: 600; color: var(--ink-soft);
    padding: .35rem .3rem; text-align: center;
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.gantt-month:first-child { border-left: none; }
.gantt-month.is-today { color: var(--accent-ink); background: var(--accent-soft); }
.gantt-days { display: flex; border-top: 1px solid var(--line); }
.gantt-day {
    flex-shrink: 0; text-align: center; white-space: nowrap;
    font-size: .58rem; color: var(--ink-mute); padding: .1rem 0;
    font-variant-numeric: tabular-nums;
}
.gantt-day.month-start { border-left: 1px solid var(--line-strong); }
.gantt-day.is-today { color: var(--accent-ink); font-weight: 700; }
.gantt-row {
    display: flex; width: max-content; align-items: stretch; min-height: 2.6rem;
    border-top: 1px solid var(--line);
    cursor: pointer; background: var(--bg-elev);
}
.gantt-row:hover { background: var(--accent-soft); }
.gantt-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.gantt-row-label {
    width: var(--gantt-label-w); flex-shrink: 0;
    position: sticky; left: 0; z-index: 2; background: inherit;
    border-right: 1px solid var(--line-strong);
    padding: .4rem .6rem; display: flex; flex-direction: column;
    justify-content: center; gap: .1rem;
}
.gantt-row-title { font-size: .82rem; line-height: 1.2; color: var(--ink); overflow-wrap: anywhere; }
.gantt-row-phase { font-size: .68rem; color: var(--ink-mute); }
.gantt-row-track { position: relative; flex-shrink: 0; }
.gantt-today-line {
    position: absolute; top: 0; bottom: 0; width: 0;
    border-left: 2px solid var(--accent); z-index: 1;
}
/* Vertical highlight of a task's day span across every row (on pill hover). */
.gantt-col-hi {
    position: absolute; top: 0; bottom: 0; z-index: 0;
    background: var(--accent-soft); opacity: .55; pointer-events: none;
}
/* Light gray dotted vertical day delimiters (only when zoomed in enough). */
.gantt.has-daygrid .gantt-row-track::before {
    content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background-image: repeating-linear-gradient(to right,
        rgba(58, 58, 58, .22) 0, rgba(58, 58, 58, .22) 1px, transparent 1px, transparent var(--day-w));
    -webkit-mask-image: repeating-linear-gradient(to bottom, #000 0, #000 2px, transparent 2px, transparent 5px);
            mask-image: repeating-linear-gradient(to bottom, #000 0, #000 2px, transparent 2px, transparent 5px);
}
/* The pill grows a little with its row instead of staying a thin sliver in a tall one (a long task
   name wraps to several lines in the sticky label column). clamp keeps it sane at both ends: never
   thinner than the old 1.6rem, never a slab - 45% of the row, capped at 3rem. */
/* ── ONE capsule for both a task and a milestone ──────────────────────────────────────────────────
   They used to be drawn as two different objects: a milestone got a white pill with a phase badge and
   its date, a task got a solid slab flooded with its status colour, taller, with the badge hard against
   the left edge. Reading the plan therefore meant reading two visual languages for what is, in the end,
   the same thing - a piece of work at a point in time.
   The capsule below is the milestone's, and a task simply gets a wider one. Which frees the status to
   become what it should always have been: a small MARK, not the entire background. */
.gantt-pill {
    display: inline-flex; align-items: center; gap: .3rem;
    height: var(--gantt-pill-h, 1.5rem); box-sizing: border-box;
    padding: 0 .5rem 0 .3rem; border-radius: var(--radius-pill);
    background: var(--bg-elev);
    border: 1px solid var(--phase-color, var(--line-strong));
    box-shadow: 0 1px 3px rgba(20, 14, 6, .16);
    overflow: hidden;
}
/* The status, as a dot. Same four colours the fill used to carry. */
.gantt-pill-status {
    flex: none; width: .5rem; height: .5rem; border-radius: 50%;
    background: var(--status-color, var(--ink-mute));
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .7);
}
.gantt-pill-badge {
    flex: none; display: inline-flex; align-items: center; justify-content: center;
    width: 1.05rem; height: 1.05rem; border-radius: 50%;
    background: var(--phase-color, var(--ink-mute)); color: #fff;
    font-family: var(--font-sans); font-size: .6rem; font-weight: 700; line-height: 1;
}
.gantt-pill-label {
    font-family: var(--font-sans); font-size: .74rem; font-weight: 700; color: var(--ink);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gantt-pill-date {
    font-family: var(--font-sans); font-size: .68rem; color: var(--ink-mute); white-space: nowrap;
}
/* SCOPED, not bare .todo/.wip/…: those class names are also the kanban column classes, and a custom
   property set on a bare selector inherits into every descendant - it would have leaked a status colour
   across half the app. */
.gantt-bar.todo, .gantt-milestone.todo { --status-color: #e0857a; } /* light red - še načrtovano */
.gantt-bar.wip,  .gantt-milestone.wip  { --status-color: #e3b93c; } /* yellow - v teku */
.gantt-bar.done, .gantt-milestone.done { --status-color: #4f7d5a; } /* green - končano */
.gantt-bar.na,   .gantt-milestone.na   { --status-color: #9a9a9a; } /* grey - ni relevantno */

.gantt-bar {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: max-content; min-width: var(--bar-w); max-width: var(--bar-w);
    z-index: 1;
    transition: max-width .28s ease, box-shadow .15s ease;
    cursor: grab; touch-action: none;
}
.gantt-bar:active { cursor: grabbing; }
/* A task is a SPAN, and the capsule alone would not say so once the fill was gone - so the phase colour
   stays as a faint wash across its length. Enough to read as a band, not enough to fight the label. */
.gantt-bar { background-color: color-mix(in srgb, var(--phase-color, #8a8a8a) 12%, var(--bg-elev)); }
/* On hover the pill elevates (no width growth, so its edges keep mapping to start/end -
   the task title is already shown in the frozen left label column). */
.gantt-row:hover .gantt-bar {
    z-index: 6;
    box-shadow: 0 4px 14px rgba(20, 14, 6, .3);
}
/* Edge resize affordance: an ew-resize cursor over the last ~8px of each end. */
.gantt-bar::before, .gantt-bar::after {
    content: ""; position: absolute; top: 0; bottom: 0; width: 8px; z-index: 3;
    cursor: ew-resize;
}
.gantt-bar::before { left: 0; }
.gantt-bar::after { right: 0; }
/* While dragging, kill transitions so a resize tracks the pointer instantly. */
.gantt.is-dragging .gantt-bar { transition: none; }
.gantt-bar.na { opacity: .65; }
.gantt-bar.na .gantt-pill-label { text-decoration: line-through; }
/* Late: the border goes red on both kinds, so "behind schedule" reads the same everywhere. */
.gantt-bar.is-late { border-color: #a3352a; }
.gantt-bar.is-late .gantt-pill-label { color: #8c2c22; }

/* ---------- the shared filter row (phase chips + search + grouping; board also gets the sort) ---------- */
.sched-filter {
    display: flex; flex-wrap: wrap; align-items: center; gap: .4rem;
    margin-bottom: .75rem;
    /* One height for the whole row. The phase chips set it (badge + padding + border); the search box
       and the sort picker are form controls with their own intrinsic metrics, so without this they sat
       one or two pixels taller/shorter than the chips beside them. */
    --filter-h: 1.7rem;
}
.sched-filter-chip, .sched-search-input, .sched-sort-select {
    box-sizing: border-box; height: var(--filter-h); line-height: 1;
}
.sched-filter-label {
    font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
    color: var(--ink-mute); margin-right: .2rem;
}
.sched-filter-chip {
    appearance: none; cursor: pointer;
    display: inline-flex; align-items: center; gap: .35rem;
    font-family: var(--font-sans); font-size: .72rem; font-weight: 600;
    padding: .25rem .6rem; border-radius: var(--radius-pill);
    border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink-mute);
    transition: opacity .12s, border-color .12s, color .12s;
}
.sched-filter-chip:hover { border-color: var(--ink-mute); color: var(--ink); }
.sched-filter-badge {
    display: inline-flex; align-items: center; justify-content: center;
    width: 1.05rem; height: 1.05rem; border-radius: var(--radius-pill); flex: none;
    background: var(--phase-color, var(--ink-mute)); color: #fff;
    font-size: .62rem; font-weight: 700;
}
.sched-filter-chip.active { color: var(--ink); border-color: var(--phase-color, var(--ink)); }
/* Dimmed = hidden phase. */
.sched-filter-chip:not(.active) { opacity: .45; }
.sched-filter-chip:not(.active) .sched-filter-badge { background: var(--ink-mute); }
.sched-filter-chip.is-all { font-weight: 700; }
.sched-filter-chip.is-all.active { border-color: var(--ink); background: var(--ink); color: var(--bg); }

/* ---------- kanban board ---------- */
.kanban-board {
    display: flex; gap: .9rem; align-items: flex-start;
    overflow-x: auto; padding-bottom: .5rem;
}
.kanban-col {
    flex: 1 1 0; min-width: 14rem;
    display: flex; flex-direction: column;
    background: var(--bg-elev); border: 1px solid var(--line);
    border-top: 3px solid var(--status-color, var(--line-strong));
    border-radius: var(--radius); overflow: hidden;
}
.kanban-col.status-todo { --status-color: #e0857a; }
.kanban-col.status-wip  { --status-color: #e3b93c; }
.kanban-col.status-done { --status-color: #4f7d5a; }
.kanban-col.status-na   { --status-color: #9a9a9a; }
.kanban-col-head {
    display: flex; align-items: center; gap: .5rem;
    padding: .65rem .8rem; border-bottom: 1px solid var(--line);
    background: var(--bg);
}
.kanban-col-dot {
    width: .6rem; height: .6rem; border-radius: var(--radius-pill);
    background: var(--status-color, var(--ink-mute)); flex: none;
}
.kanban-col-title {
    font-family: var(--font-sans); font-size: .72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em; color: var(--ink);
}
.kanban-col-count {
    margin-left: auto; font-size: .72rem; font-weight: 600; color: var(--ink-mute);
    background: var(--bg-elev); border: 1px solid var(--line);
    border-radius: var(--radius-pill); padding: .05rem .5rem; min-width: 1.5rem; text-align: center;
}
.kanban-cards {
    display: flex; flex-direction: column; gap: .5rem;
    padding: .6rem; min-height: 4rem;
    max-height: calc(100vh - 22rem); overflow-y: auto;
}
.schedule-page.is-fullscreen .kanban-cards { max-height: calc(100vh - 12rem); }
.kanban-card {
    background: var(--bg); border: 1px solid var(--line-strong);
    border-left: 3px solid var(--phase-color, var(--line-strong));
    border-radius: var(--radius); overflow: hidden;
    display: flex; align-items: stretch;
    flex: none; /* keep natural height so a tall column scrolls instead of squishing cards */
    transition: box-shadow .15s, transform .05s;
}
.kanban-card:hover { box-shadow: 0 3px 10px rgba(20, 14, 6, .12); }
/* Drag only via the grip - keeps the rest of the card clickable (touch + mouse). */
.kanban-card-grip {
    flex: none; display: flex; align-items: center; justify-content: center;
    width: 1.5rem; color: var(--ink-mute);
    background: var(--bg-elev); border-right: 1px solid var(--line);
    cursor: grab; touch-action: none; user-select: none;
}
.kanban-card-grip:hover { color: var(--ink); background: var(--line); }
.kanban-card-grip:active { cursor: grabbing; }
.kanban-card-body {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column; gap: .25rem;
    padding: .5rem .6rem; cursor: pointer;
}
.kanban-card-body:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.kanban-card-phase {
    display: flex; align-items: center; gap: .35rem;
    font-size: .68rem; font-weight: 600; color: var(--ink-mute);
    text-transform: uppercase; letter-spacing: .04em;
}
.kanban-card-phasebadge {
    display: inline-flex; align-items: center; justify-content: center;
    width: 1.05rem; height: 1.05rem; border-radius: var(--radius-pill); flex: none;
    background: var(--phase-color, var(--ink-mute)); color: #fff;
    font-size: .62rem; font-weight: 700;
}
.kanban-card-title {
    font-family: var(--font-sans); font-size: .85rem; font-weight: 600;
    color: var(--ink); line-height: 1.25;
}
.kanban-card-meta { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .1rem; }
.kanban-chip {
    display: inline-flex; align-items: center; gap: .2rem;
    font-size: .68rem; font-weight: 600; color: var(--ink-mute);
    background: var(--bg-elev); border: 1px solid var(--line);
    border-radius: var(--radius-pill); padding: .08rem .42rem; white-space: nowrap;
}
.kanban-chip .icon { opacity: .85; }
.kanban-card.is-important { border-left-width: 5px; }
.kanban-card.is-important .kanban-card-title::after { content: " ★"; color: #e3b93c; }
/* The lifted card floats under the cursor (JS sets left/top/width inline; the rest is here). */
.kanban-card-dragging {
    position: fixed; z-index: 1000; margin: 0; pointer-events: none; cursor: grabbing;
    opacity: .97; transform: rotate(1.6deg) scale(1.03);
    box-shadow: 0 20px 40px -8px rgba(20, 14, 6, .45);
}
/* Dashed gap left in the column showing where the dragged card will land. */
.kanban-card-placeholder {
    flex: none; border: 2px dashed var(--phase-color, var(--line-strong)); border-radius: var(--radius);
    background: color-mix(in srgb, var(--accent) 6%, transparent); box-sizing: border-box;
}
.kanban-board.is-dragging { cursor: grabbing; }
.kanban-board.is-dragging .kanban-cards { background: rgba(0, 0, 0, .02); }
.kanban-empty {
    margin: 0; padding: 1rem .5rem; text-align: center;
    font-size: .75rem; color: var(--ink-mute);
    border: 1px dashed var(--line-strong); border-radius: var(--radius);
}

/* ---------- board arrangement, folded columns, deadline + decision chips ---------- */

/* The arrangement picker sits at the end of the phase-filter row. */
.sched-sort { margin-left: auto; display: inline-flex; align-items: center; gap: .35rem; }
.sched-sort-label {
    font-family: var(--font-sans); font-size: .68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em; color: var(--ink-mute);
}
.sched-sort-select {
    font-family: var(--font-sans); font-size: .74rem; color: var(--ink);
    background: var(--bg-elev); border: 1px solid var(--line-strong);
    border-radius: var(--radius-pill); padding: 0 1.4rem 0 .55rem; cursor: pointer;
}

/* Končano / Ni relevantno fold to a drop strip: the head stays, the cards go, and the column stops
   competing for width with the two that hold the actual work. */
.kanban-col-toggle {
    flex: none; background: none; border: none; cursor: pointer; padding: 0 .1rem;
    font-size: .8rem; line-height: 1; color: var(--ink-mute);
}
.kanban-col-toggle:hover { color: var(--ink); }
.kanban-col.is-collapsed { flex: 0 0 auto; min-width: 11rem; }
.kanban-col.is-collapsed .kanban-cards { min-height: 0; padding: .45rem; }
.kanban-col.is-collapsed .kanban-empty { padding: .55rem .4rem; }

/* Board search + the grouping toggle share the filter row with the phase chips and the sort picker. */
.sched-search { display: inline-flex; align-items: center; margin-left: .35rem; }
.sched-search-input {
    font-family: var(--font-sans); font-size: .74rem; color: var(--ink);
    background: var(--bg-elev); border: 1px solid var(--line-strong);
    border-radius: var(--radius-pill); padding: 0 .6rem; width: 11rem; max-width: 40vw;
}
.sched-search-input::placeholder { color: var(--ink-mute); }
.sched-group-chip { font-weight: 600; }

/* Swimlane heads inside a column: sticky, so the phase stays named while the column scrolls. */
.kanban-group-head {
    position: sticky; top: 0; z-index: 2;
    display: flex; align-items: center; gap: .35rem;
    margin: .25rem 0 -.1rem; padding: .2rem .1rem;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--phase-color, var(--line-strong));
}
.kanban-group-badge {
    flex: none; width: 1.05rem; height: 1.05rem; border-radius: var(--radius-pill);
    background: var(--phase-color, var(--ink-mute)); color: #fff;
    font-family: var(--font-sans); font-size: .62rem; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
}
.kanban-group-title {
    font-family: var(--font-sans); font-size: .68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.kanban-group-count { margin-left: auto; font-size: .66rem; color: var(--ink-mute); }

/* Quick add: a task thought of at the board gets entered at the board. */
.kanban-col-add {
    flex: none; background: none; border: none; cursor: pointer;
    font-size: .95rem; line-height: 1; color: var(--ink-mute); padding: 0 .1rem;
}
.kanban-col-add:hover { color: var(--accent); }
.kanban-add {
    display: flex; flex-direction: column; gap: .35rem;
    padding: .5rem .6rem; background: var(--bg); border-bottom: 1px solid var(--line);
}
.kanban-add-title, .kanban-add-phase {
    font-family: var(--font-sans); font-size: .78rem; color: var(--ink);
    background: var(--bg-elev); border: 1px solid var(--line-strong);
    border-radius: var(--radius); padding: .25rem .4rem; width: 100%;
}
.kanban-add-title.is-error { border-color: #a3352a; }
.kanban-add-actions { display: flex; gap: .35rem; }

/* Too much started at once - the one kanban rule worth stating out loud. */
.kanban-wip {
    margin: 0; padding: .45rem .8rem;
    font-family: var(--font-sans); font-size: .7rem; line-height: 1.35;
    color: var(--accent-ink); background: rgba(227, 185, 60, .16);
    border-bottom: 1px solid var(--line);
}

/* A date is not neutral once it has passed. */
.kanban-chip.is-late {
    color: #a3352a; background: rgba(10, 10, 10, .12); border-color: rgba(163, 53, 42, .45);
}
.kanban-chip.is-soon {
    color: #8a6410; background: rgba(227, 185, 60, .18); border-color: rgba(227, 185, 60, .55);
}
/* The decision the task carries: who does it, for how much. */
.kanban-chip.is-chosen {
    color: #2f5d3c; background: rgba(79, 125, 90, .12); border-color: rgba(79, 125, 90, .4);
    max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- "Predlagaj termine": the proposal list before anything is written ---------- */
.sched-ai-card { width: min(44rem, 100%); }
/* These dialogs host something that grows without limit - a task panel with sixteen koraki, a phase's
   auto-schedule with ten rows, a list of proposals - so the CARD is bounded and its BODY scrolls, rather
   than the card running off the bottom of the screen and taking its own head with it. The tab strip
   sticks while the content moves: on a sixteen-step task the tabs are how you get back out. */
.task-modal-card.sched-ai-card {
    max-height: min(88vh, 900px);
    display: flex; flex-direction: column;
}
.task-modal-card.sched-ai-card > .task-modal-head { flex: none; }
.task-modal-card.sched-ai-card > .sched-ai-content {
    flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
}
.task-modal-card.sched-ai-card .pro-tabs {
    position: sticky; top: 0; z-index: 1;
    background: var(--bg); padding-top: .15rem;
}
/* The modal card has no padding of its own (its head and body carry it), so the proposal list needs
   this wrapper - otherwise every row runs flush into the card's border. */
.sched-ai-content { padding: 1.25rem 1.5rem 1.5rem; }
.sched-ai-lead { margin: 0 0 1rem; font-size: .88rem; color: var(--ink-soft); line-height: 1.5; }
.sched-ai-note {
    margin: 0 0 1rem; padding: .6rem .8rem;
    font-size: .82rem; line-height: 1.45; color: var(--accent-ink);
    background: var(--accent-soft); border-left: 3px solid var(--accent);
    border-radius: var(--radius);
}
.sched-ai-empty { margin: .5rem 0 0; font-size: .9rem; color: var(--ink-mute); }

.sched-ai-list {
    list-style: none; margin: 0; padding: 0;
    max-height: min(48vh, 26rem); overflow-y: auto;
    border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--bg-elev);
}
.sched-ai-row {
    display: flex; align-items: flex-start; gap: .75rem;
    padding: .7rem .85rem;
    border-bottom: 1px solid var(--line);
    transition: background .12s;
}
.sched-ai-row:last-child { border-bottom: none; }
.sched-ai-row:hover { background: rgba(10, 10, 10, .05); }
/* A picked row is what will actually be written - mark it, so "izbranih 6 / 9" is visible in the list
   and not only in the counter. */
.sched-ai-row.is-picked { background: rgba(79, 125, 90, .07); box-shadow: inset 3px 0 0 var(--ok); }

.sched-ai-pick { flex: none; display: flex; align-items: center; padding-top: .15rem; cursor: pointer; }
.sched-ai-pick input { width: 1rem; height: 1rem; accent-color: var(--accent); cursor: pointer; }

.sched-ai-row-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: .25rem; }
.sched-ai-title { font-size: .92rem; font-weight: 600; line-height: 1.35; color: var(--ink); }
.sched-ai-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.sched-ai-phase {
    font-size: .7rem; font-weight: 600; color: var(--ink-mute);
    text-transform: uppercase; letter-spacing: .03em;
}
.sched-ai-dates {
    font-size: .74rem; font-weight: 600; color: var(--ink-soft); white-space: nowrap;
    background: var(--bg); border: 1px solid var(--line-strong);
    border-radius: var(--radius-pill); padding: .1rem .5rem;
}
.sched-ai-why { font-size: .78rem; line-height: 1.4; color: var(--ink-soft); font-style: italic; }

.sched-ai-foot {
    display: flex; align-items: center; flex-wrap: wrap; gap: .6rem;
    margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--line);
}
.sched-ai-count { font-size: .78rem; color: var(--ink-mute); margin: 0 auto 0 .2rem; }

@media (max-width: 560px) {
    .sched-ai-content { padding: 1rem 1rem 1.25rem; }
    .sched-ai-row { padding: .6rem .65rem; gap: .55rem; }
    .sched-ai-count { width: 100%; margin: 0; order: 3; }
}

/* ---------- Plan: shared filter row, phase groups, weekends, the undated tray ---------- */

/* The filter row serves both views now; on the plan it sits above the chart. */

/* Weekend stripes, drawn once per row as a repeating gradient offset to the first Saturday
   (--wk-off). Only at zoom levels where a day is wide enough to mean anything. */
.gantt.has-weekends .gantt-row-track::after {
    content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background-image: repeating-linear-gradient(to right,
        rgba(58, 58, 58, .07) 0, rgba(58, 58, 58, .07) calc(2 * var(--day-w)),
        transparent calc(2 * var(--day-w)), transparent calc(7 * var(--day-w)));
    background-position-x: calc(var(--wk-off) * var(--day-w));
}
/* Out of the building season: cool tint on the month band, so a January facade looks wrong. */
.gantt-month.is-winter { background: rgba(90, 120, 150, .1); }
.gantt-month.is-winter.is-today { background: var(--accent-soft); }

/* A phase head row: the rolled-up bar for the whole phase, and a chevron that folds it away. */
.gantt-phase-row { background: var(--bg); min-height: 2rem; }
.gantt-phase-row:hover { background: var(--accent-soft); }
.gantt-phase-row .gantt-row-label { flex-direction: row; align-items: center; gap: .4rem; }
.gantt-phase-toggle { flex: none; font-size: .75rem; color: var(--ink-mute); width: .8rem; }
.gantt-phase-badge {
    flex: none; width: 1.15rem; height: 1.15rem; border-radius: var(--radius-pill);
    background: var(--phase-color, var(--ink-mute)); color: #fff;
    font-family: var(--font-sans); font-size: .66rem; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
}
.gantt-phase-name {
    font-family: var(--font-sans); font-size: .74rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .04em; color: var(--ink);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gantt-phase-count { margin-left: auto; font-size: .68rem; color: var(--ink-mute); }
.gantt-phase-bar {
    position: absolute; top: 50%; transform: translateY(-50%); height: 6px; z-index: 2;
    border-radius: var(--radius); background: var(--phase-color, var(--ink-mute)); opacity: .55;
}
.gantt-phase-bar.is-late { box-shadow: 0 0 0 1.5px #a3352a; opacity: .75; }
.gantt-row.is-grouped .gantt-row-label { padding-left: 1.6rem; }

/* The tasks the plan cannot draw, kept in sight under it. */
.gantt-undated { margin-top: 1rem; border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.gantt-undated-head {
    width: 100%; display: flex; align-items: center; gap: .5rem;
    padding: .55rem .75rem; background: none; border: none; cursor: pointer; text-align: left;
    /* Tapped on a phone to open the undated tasks - it was 34 px, under the touch floor. */
    min-height: 2.5rem;
}
.gantt-undated-caret { color: var(--ink-mute); font-size: .8rem; }
.gantt-undated-title {
    font-family: var(--font-sans); font-size: .78rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .05em; color: var(--ink);
}
.gantt-undated-count {
    font-size: .72rem; font-weight: 700; color: var(--accent-ink);
    background: var(--accent-soft); border-radius: var(--radius-pill); padding: .05rem .5rem;
}
.gantt-undated-hint { font-size: .72rem; color: var(--ink-mute); }
.gantt-undated-list {
    list-style: none; margin: 0; padding: 0 .75rem .6rem;
    max-height: 18rem; overflow-y: auto;
}
.gantt-undated-row {
    display: flex; align-items: center; gap: .5rem;
    padding: .35rem 0; border-top: 1px solid var(--line);
}
.gantt-undated-badge {
    flex: none; width: 1.1rem; height: 1.1rem; border-radius: var(--radius-pill);
    background: var(--phase-color, var(--ink-mute)); color: #fff;
    font-size: .62rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
}
.gantt-undated-name {
    flex: 1 1 auto; min-width: 0; text-align: left; background: none; border: none; cursor: pointer;
    font-family: var(--font-sans); font-size: .84rem; color: var(--ink);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gantt-undated-name:hover { color: var(--accent-ink); text-decoration: underline; }
.gantt-undated-phase { flex: none; font-size: .7rem; color: var(--ink-mute); }
.gantt-undated-place { flex: none; }
.gantt-undated-more {
    margin: .3rem 0 .1rem; padding: .3rem .6rem; background: none; border: none; cursor: pointer;
    font-family: var(--font-sans); font-size: .75rem; color: var(--accent-ink); text-decoration: underline;
}
.gantt-undated-more:hover { color: var(--accent); }

/* The plan as last confirmed: a hollow ghost behind the live bar, so the drift is the gap. */
.gantt-baseline {
    position: absolute; top: 50%; transform: translateY(-50%); height: 60%; min-height: 10px; z-index: 1;
    border: 1px dashed var(--ink-mute); border-radius: var(--radius);
    background: repeating-linear-gradient(45deg,
        rgba(106, 106, 106, .1) 0 3px, transparent 3px 7px);
    pointer-events: none;
}
.gantt-baseline-chip {
    display: inline-flex; align-items: center; gap: .35rem;
    font-family: var(--font-sans); font-size: .72rem; color: var(--ink-soft);
    background: var(--bg-elev); border: 1px solid var(--line-strong);
    border-radius: var(--radius-pill); padding: .18rem .5rem .18rem .7rem; white-space: nowrap;
}
.gantt-baseline-btn {
    background: none; border: none; cursor: pointer; padding: 0 .2rem;
    font-family: var(--font-sans); font-size: .7rem; color: var(--accent-ink); text-decoration: underline;
}
.gantt-baseline-btn:hover { color: var(--accent); }

/* A milestone is a date, not a duration: a diamond ON its day, with the name in a small capsule beside
   it. The capsule matters - the first version put the label straight on the track, so a milestone row
   read as a bar that had gone missing rather than as a different KIND of entry. The whole thing is
   shifted left by half the diamond so the point sits exactly on the date, not the capsule's edge. */
.gantt-milestone {
    position: absolute; top: 50%; z-index: 5;
    transform: translate(-8px, -50%);
    display: flex; align-items: center; gap: .3rem; cursor: pointer;
}
.gantt-milestone-mark {
    flex: none; width: 14px; height: 14px; transform: rotate(45deg);
    background: var(--phase-color, var(--accent)); border: 2px solid var(--bg-elev);
    box-shadow: 0 1px 4px rgba(20, 14, 6, .35);
}
.gantt-milestone .gantt-pill { max-width: 24rem; }
.gantt-milestone.na { opacity: .65; }
.gantt-milestone.na .gantt-pill-label { text-decoration: line-through; }
.gantt-milestone.is-late .gantt-milestone-mark { background: #a3352a; }
.gantt-milestone.is-late .gantt-pill { border-color: #a3352a; }
.gantt-milestone.is-late .gantt-pill-label { color: #8c2c22; }

/* The offer to move the rest of a phase along with the bar that was just dragged. */
.gantt-chain {
    display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
    margin: 0 0 .75rem; padding: .55rem .8rem;
    background: var(--accent-soft); border: 1px solid var(--accent);
    border-radius: var(--radius);
}
.gantt-chain-text { font-family: var(--font-sans); font-size: .82rem; color: var(--accent-ink); }
.gantt-chain-close {
    margin-left: auto; background: none; border: none; cursor: pointer;
    font-size: 1.2rem; line-height: 1; color: var(--accent-ink); padding: 0 .2rem;
}
/* On a tablet the bar's two controls get a finger's worth (the × was 18 px - responsive audit 2026-10-09). */
@media (pointer: coarse) {
    .gantt-chain-close { min-width: 44px; min-height: 44px; }
    .gantt-chain .btn { min-height: 40px; }
}

/* ---------- Gantt: what is behind schedule ---------- */
/* A late bar keeps its status colour but gets a hatch and a red rim, so it reads as late at any zoom,
   including the 1.8 px/day one where a bar is a few pixels wide. */
.gantt-bar.is-late {
    box-shadow: inset 0 0 0 1.5px #a3352a;
    background-image: repeating-linear-gradient(135deg,
        rgba(163, 53, 42, .28) 0 4px, transparent 4px 9px);
}
.gantt-late-chip {
    align-self: center; display: inline-flex; align-items: center; gap: .4rem;
    font-family: var(--font-sans); font-size: .76rem; font-weight: 600;
    color: #a3352a; background: rgba(10, 10, 10, .1);
    border: 1px solid rgba(163, 53, 42, .4); border-radius: var(--radius-pill);
    padding: .25rem .7rem; cursor: pointer; white-space: nowrap;
    /* A filter toggle, so it is tapped like the other chips - it was 26 px tall. */
    min-height: 2.25rem;
}
.gantt-late-chip:hover { background: rgba(10, 10, 10, .18); }
.gantt-late-chip.active { background: #a3352a; border-color: #a3352a; color: #fff; }
.gantt-late-dot { width: .5rem; height: .5rem; border-radius: var(--radius-pill); background: currentColor; flex: none; }
.gantt-late-action { font-weight: 400; opacity: .8; font-size: .7rem; }

/* ---------- task modal (from gantt) ---------- */
.task-modal {
    position: fixed; inset: 0; z-index: 80;
    background: rgba(20, 20, 20, .55);
    display: flex; align-items: flex-start; justify-content: center;
    padding: 4vh 1rem; overflow-y: auto;
}
/* Dedicated backdrop element is the modal's only click-to-close target. Never put the close
   handler on the wrapper: drag-selecting text in the card and releasing over the dim area fires
   the click on the wrapper (the common ancestor of mousedown/mouseup), closing the modal mid-edit.
   Same pattern as .fb-backdrop / .legal-modal-backdrop. */
/* "Naloge še ne moreš zaključiti" (TaskBlockedHost): a professional task's open steps - the kontrolna točka in
   words first, then every step still to tick. The task-modal frame, narrower. */
.task-blocked-card { width: min(30rem, 100%); }
.task-blocked-body { padding: 0 1.25rem; }
.task-blocked-hold { margin: 0 0 .6rem; font-weight: 600; color: var(--danger, #b3261e); }
.task-blocked-steps { margin: .4rem 0 .8rem; padding-left: 1.2rem; line-height: 1.45; }
.task-blocked-steps li.is-hold { font-weight: 600; }
.task-blocked-actions { display: flex; justify-content: flex-end; padding: .75rem 1.25rem 1.1rem; }
.task-modal-backdrop, .lightbox-backdrop { position: fixed; inset: 0; }
.task-modal-card {
    position: relative; /* stacks above the (positioned) backdrop sibling */
    background: var(--bg); border: 1px solid var(--line-strong);
    border-radius: var(--radius); box-shadow: 0 24px 60px rgba(20, 14, 6, .35);
    width: min(46rem, 100%); margin: auto;
}
.task-modal-head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
    padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--line);
}
.task-modal-titles h2 { font-family: var(--font-serif); font-size: 1.5rem; margin: .15rem 0 0; }
.task-modal-actions { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.task-modal-close {
    appearance: none; border: none; background: transparent;
    color: var(--ink-mute); cursor: pointer; font-size: 1.6rem; line-height: 1; padding: 0 .25rem;
}
.task-modal-close:hover { color: var(--ink); }
.task-modal-body { padding: 1.25rem 1.5rem; margin: 0; }

/* A modal whose body is a task panel grows without limit - sixteen koraki, a description, offers,
   attachments - and an unbounded card ran off the bottom of the screen, took its own head with it and
   (inside the notebook, whose chrome reparents position:fixed) slid under the navbar. So the CARD is
   bounded to the viewport and its BODY scrolls, exactly as the .sched-ai-card dialogs do. */
.task-modal-card:has(> .task-modal-body) {
    max-height: min(88vh, 900px);
    display: flex; flex-direction: column;
}
.task-modal-card:has(> .task-modal-body) > .task-modal-head { flex: none; }
.task-modal-card > .task-modal-body {
    flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
}

/* Delete-task confirmation dialog (reuses .task-modal shell, narrower). */
.task-confirm-card { width: min(28rem, 100%); }
.task-confirm-body { padding: 1.25rem 1.5rem 1.5rem; }
.task-confirm-body p { color: var(--ink-soft); margin: 0 0 1.25rem; }
.task-confirm-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
/* Quoted comment text inside the delete-comment confirmation. */
.task-confirm-quote {
    margin: 0 0 1rem; padding: .55rem .75rem; max-height: 9rem; overflow: auto;
    background: var(--bg); border: 1px solid var(--line); border-left: 3px solid var(--line-strong);
    border-radius: var(--radius); color: var(--ink-soft); font-size: .9rem;
    white-space: pre-wrap; word-wrap: break-word;
}

/* ---------- report cost collector ---------- */
.report-costs { margin: 1.5rem 0 2rem; }
.report-costs-table { width: 100%; border-collapse: collapse; font-size: .9rem; margin-top: .75rem; }
.report-costs-table th, .report-costs-table td {
    text-align: left; padding: .55rem .65rem; border-bottom: 1px solid var(--line); vertical-align: top;
}
.report-costs-table thead th {
    background: var(--bg-elev); color: var(--ink-soft);
    font-size: .8rem; text-transform: uppercase; letter-spacing: .04em;
}
.report-costs-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.report-costs-item { font-weight: 500; color: var(--ink); }
.report-costs-sub { font-size: .78rem; color: var(--ink-mute); margin-top: .1rem; }
.report-costs-table tfoot td {
    border-top: 2px solid var(--line-strong); border-bottom: none;
    font-weight: 700; color: var(--accent-ink); font-size: 1rem; padding-top: .7rem;
}

/* ---------- cost collector page ---------- */
.report-filters-sep {
    width: 1px; align-self: stretch; min-height: 1.5rem;
    background: var(--line-strong); margin: 0 .35rem;
}
.cost-source {
    display: inline-block; font-size: .72rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .04em;
    padding: .1rem .45rem; border-radius: var(--radius-pill);
    border: 1px solid var(--line-strong); color: var(--ink-mute);
}
.cost-source.offer { color: var(--accent-ink); border-color: var(--accent-soft); background: var(--accent-soft); }
.cost-source.manual { color: var(--ok); border-color: var(--ok-soft); background: var(--ok-soft); }

/* inline cost controls (status + DDV) */
.cost-inline { width: auto; min-width: 6rem; padding: .25rem .4rem; font-size: .82rem; }
.cost-incl { display: inline-flex; align-items: center; gap: .35rem; font-size: .85rem; color: var(--ink-soft); white-space: nowrap; }
.cost-status-done { color: #2f7d4f; font-weight: 600; }
.cost-status-wip { color: var(--accent); font-weight: 600; }
.report-print-only { display: none; }

.budget-card {
    display: grid; gap: 1rem 1.25rem; align-items: end;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    background: var(--bg-elev); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 1.25rem 1.5rem; margin-bottom: 1.5rem;
}
.budget-field { display: flex; flex-direction: column; gap: .35rem; }
.budget-field > label {
    font-size: .72rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: .08em; color: var(--ink-mute);
}
.budget-stat { text-align: left; }
.budget-stat-label {
    font-size: .72rem; text-transform: uppercase; letter-spacing: .08em;
    color: var(--ink-mute); margin-bottom: .15rem;
}
.budget-stat-num {
    font-family: var(--font-sans); font-size: 1.5rem; font-weight: 600;
    color: var(--ink); line-height: 1; font-variant-numeric: tabular-nums;
}
.budget-stat-num.is-over { color: #b5483f; }
.budget-stat-num.is-ok { color: var(--ok); }
.budget-bar-wrap { grid-column: 1 / -1; }
.budget-bar {
    height: 8px; border-radius: var(--radius-pill); background: var(--line);
    overflow: hidden;
}
.budget-bar-fill {
    height: 100%; background: var(--accent); border-radius: var(--radius-pill);
    transition: width .3s ease;
}
.budget-bar-fill.is-over { background: #b5483f; }
.budget-bar-meta {
    margin-top: .4rem; font-size: .78rem; color: var(--ink-mute);
    font-variant-numeric: tabular-nums;
}

/* Financiranje, Dodaj lasten strošek and Uredi strošek are all the same modal shape now: one field per
   row, full width. (.finance-f's own 9rem was sized for the row of inputs it used to sit in on the page.) */
.budget-modal-body .finance-f { margin-bottom: .75rem; }
.budget-modal-body .finance-f .type-input,
.budget-modal-body .finance-f .price-input-wrap { width: 100%; }
.budget-modal-body .cost-incl { display: flex; align-items: center; gap: .45rem; margin-bottom: .75rem; }
.cost-add-title {
    font-size: .8rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: .08em; color: var(--ink-mute); margin: 0 0 .75rem;
}
/* Upload-first drop zone above the add-cost form: the InputFile stretches invisibly over the whole
   zone, so clicking anywhere opens the picker and a dragged file drops onto the native input. */
.cost-dropzone {
    position: relative; display: flex; align-items: center; gap: .55rem;
    padding: .7rem .9rem; margin-bottom: .75rem;
    border: 1.5px dashed color-mix(in srgb, var(--accent) 45%, var(--line));
    border-radius: var(--radius); background: color-mix(in srgb, var(--accent) 4%, transparent);
    font-size: .85rem; color: var(--ink-soft); cursor: pointer;
}
.cost-dropzone svg { color: var(--accent); flex: none; }
.cost-dropzone strong { color: var(--ink); }
.cost-dropzone:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.cost-dropzone.is-busy, .cost-dropzone.has-file { cursor: default; border-style: solid; }
.cost-dropzone.has-file { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.cost-dropzone-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.cost-dropzone-file { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.cost-dropzone-hint { font-size: .78rem; color: var(--ink-mute); }
.cost-dropzone-msg { margin: -.25rem 0 .75rem; font-size: .8rem; color: var(--ink-soft); }

/* cost charts + over-budget banner */
.cost-charts {
    display: grid; gap: 1rem; margin-bottom: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.cost-chart {
    background: var(--bg-elev); border: 1px solid var(--line);
    border-radius: var(--radius); padding: .85rem 1rem 1rem; min-width: 0;
}
.cost-chart-title {
    font-size: .76rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: .06em; color: var(--ink-mute); margin-bottom: .35rem;
}
.cost-chart-svg { width: 100%; min-height: 230px; overflow: hidden; }
.cost-overbudget {
    display: flex; align-items: center; gap: .55rem;
    background: #fbeae7; border: 1px solid #e2b3a9; border-left: 4px solid #b5483f;
    border-radius: var(--radius); padding: .75rem 1rem; margin-bottom: 1.25rem;
    color: #8a2f27; font-size: .9rem; font-weight: 500;
}
.budget-headroom { font-weight: 700; font-size: .95rem; }
.budget-headroom.is-ok { color: var(--ok); }
.budget-headroom.is-over { color: #b5483f; }
.budget-bar-sub { color: var(--ink-mute); }

/* financing & contingency panel */
/* financing form fields (shared by the Financiranje and Dodaj strošek modals) */
.finance-f { display: flex; flex-direction: column; gap: .25rem; }
.finance-f > span { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-mute); }
.finance-f .type-input { width: 9rem; }
.rollup-budget { width: 7rem; font-size: .82rem; }
.rollup-budget-cell { display: inline-flex; align-items: center; gap: .45rem; }
.rollup-budget-label { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-mute); white-space: nowrap; }

/* cost-line attachments (invoice / receipt) */
.cost-atts { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: .4rem; }
.cost-att { display: inline-flex; align-items: center; gap: .15rem; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: .08rem .15rem .08rem .45rem; font-size: .78rem; }
.cost-att .file-link { background: none; border: 0; cursor: pointer; color: var(--accent-ink); padding: 0; font: inherit; max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cost-att-add { display: inline-flex; align-items: center; gap: .25rem; font-size: .78rem; color: var(--accent); cursor: pointer; }
.cost-att-add input { display: none; }

.cost-table-title { margin: 0 0 .75rem; }

/* group on/off switches */
/* Zbirnik stroškov: the table toolbar (search + stanje/vir filters + the result count). Sits above the
   group pills; on a real project the table runs to dozens of rows and the pills alone couldn't find a
   single strošek. All colours come from the palette so dark.css needs no companion block. */
.cost-toolbar {
    display: flex; align-items: flex-end; gap: .75rem; flex-wrap: wrap;
    margin: 0 0 .85rem;
}
.cost-search { flex: 1 1 18rem; min-width: 12rem; }
.cost-toolbar-f { display: flex; flex-direction: column; gap: .2rem; font-size: .72rem; font-weight: 600;
    letter-spacing: .04em; text-transform: uppercase; color: var(--ink-mute); }
.cost-toolbar-f select { width: auto; }
.cost-toolbar-count { margin-left: auto; color: var(--ink-mute); font-size: .85rem;
    font-variant-numeric: tabular-nums; white-space: nowrap; padding-bottom: .55rem; }

/* Empty state with a next step in it, instead of one italic line. */
.cost-empty { padding: 2rem 1rem; text-align: center; border: 1px dashed var(--line-strong);
    border-radius: var(--radius); background: var(--bg-elev); }
.cost-empty-lead { margin: 0 0 .4rem; font-weight: 600; color: var(--ink); }
.cost-empty-sub { margin: 0 auto; max-width: 34rem; font-size: .9rem; color: var(--ink-soft); }

/* Visually hidden, still announced (the actions column's header). */
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Sortable headings read as the heading's own label, not as a row of grey buttons: no chrome, the
   thead's caps and colour, and the arrow + accent only on the column that sorts. */
.report-costs-table .cost-th-sort {
    display: inline-flex; align-items: center; gap: .25rem; padding: 0; margin: 0;
    background: none; border: none; box-shadow: none; border-radius: 0; cursor: pointer;
    font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; text-align: inherit;
}
.report-costs-table .cost-th-sort:hover { color: var(--ink); background: none; }
.report-costs-table .cost-th-sort.is-sorted { color: var(--accent-ink); }
.report-costs-table .cost-th-sort .sort-arrow { font-size: .7rem; }
.report-costs-table th.num .cost-th-sort { justify-content: flex-end; }

.report-costs-table .cost-date { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.report-costs-table .cost-date-none { color: var(--ink-mute); }

/* The row's ⋯ opens its popup downward, and the table's scroll wrapper clips it (overflow-x:auto makes
   overflow-y auto too) - the last rows' menus were cut off. The bottom padding is room for the popup
   inside the scroller; the matching negative margin keeps it from pushing the page down. That empty
   strip then lies over whatever follows the page (the footer), so it lets clicks through - the table
   takes them back, and a swipe that starts on it still scrolls the wrapper. position:relative makes the scroller the
   containing block of the »Dejanja« header's .sr-only span (absolute): without it the span escaped the scroller's
   clip and widened a phone's page to ~640 px (#680). */
.cost-table-scroll { position: relative; padding-bottom: 7rem; margin-bottom: -7rem; pointer-events: none; }
.cost-table-scroll > .report-costs-table { pointer-events: auto; }
.report-costs-table .admin-td-actions { width: 1%; white-space: nowrap; text-align: right; }
.report-costs-table .admin-td-actions .schedule-menu { display: inline-flex; }
.report-costs-table .admin-td-actions .task-menu-btn { width: 1.9rem; height: 1.9rem; }
@media print { .cost-table-scroll { padding-bottom: 0; margin-bottom: 0; } }

@media (max-width: 720px) {
    .cost-toolbar-count { margin-left: 0; padding-bottom: 0; }
}

.cost-group-toggle {
    display: inline-flex; align-items: center; gap: .5rem;
    border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
    padding: .3rem .8rem .3rem .55rem; background: var(--bg); cursor: pointer;
    font: inherit; font-size: .82rem; color: var(--ink-soft); transition: background .15s, border-color .15s, color .15s;
}
.cost-group-dot { width: 1.7rem; height: .95rem; border-radius: var(--radius-pill); background: var(--line-strong); position: relative; flex: none; transition: background .15s; }
.cost-group-dot::after { content: ""; position: absolute; top: 1px; left: 1px; width: calc(.95rem - 2px); height: calc(.95rem - 2px); border-radius: 50%; background: #fff; transition: transform .15s; }
.cost-group-toggle.on { color: var(--ink); border-color: var(--accent); background: var(--accent-soft); }
.cost-group-toggle.on .cost-group-dot { background: var(--accent); }
.cost-group-toggle.on .cost-group-dot::after { transform: translateX(.75rem); }
.cost-group-toggle.off { opacity: .9; }

/* per-phase roll-up */
.phase-rollup {
    background: var(--bg-elev); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 1.1rem 1.5rem; margin-bottom: 1.5rem;
}
.rollup-row { display: grid; grid-template-columns: minmax(7rem, 12rem) 1fr minmax(9rem, auto) auto; gap: .85rem; align-items: center; padding: .3rem 0; }
.rollup-label { font-size: .9rem; color: var(--ink); }
.rollup-bar { height: 7px; background: var(--line); border-radius: var(--radius-pill); overflow: hidden; }
.rollup-bar-fill { display: block; height: 100%; background: var(--accent); border-radius: var(--radius-pill); }
.rollup-bar-fill.is-over { background: #b5483f; }
.rollup-val { font-size: .85rem; color: var(--ink-soft); text-align: right; font-variant-numeric: tabular-nums; }
/* Over-budget phase/category rows: tinted band + warning icon so they stand out at a glance. */
.rollup-row.is-over {
    background: #fbeae7; border-radius: var(--radius);
    padding: .4rem .6rem; margin: 0 -.6rem;
}
.rollup-row.is-over .rollup-label { color: #8a2f27; font-weight: 600; }
.rollup-alert { color: #b5483f; margin-right: .3rem; }
.rollup-over { display: block; margin-top: .1rem; color: #b5483f; font-weight: 600; font-size: .78rem; }

@media (max-width: 720px) {
    .rollup-row { grid-template-columns: 1fr auto; }
    .rollup-bar { display: none; }
}

@media (max-width: 720px) {
    .budget-card { grid-template-columns: 1fr 1fr; }
    .budget-field { grid-column: 1 / -1; }
    /* keep the 7-column cost table readable: let it scroll instead of crushing columns */
    .table-scroll .report-costs-table { min-width: 44rem; }
}

@media (max-width: 560px) {
    /* the modal's fields go full width on phones */
    .finance-f { width: 100%; }
    .finance-f .type-input { width: 100%; }
}

/* ---------- iskalnik (search) ---------- */
.search-box { margin-bottom: 1rem; }
.search-box input { width: 100%; }

.search-table { table-layout: auto; }
.search-table thead th { padding: 0; vertical-align: middle; }
.search-table .th-sort {
    width: 100%; display: inline-flex; align-items: center; gap: .3rem;
    background: none; border: none; cursor: pointer; font: inherit;
    padding: .55rem .65rem; color: var(--ink-soft);
    text-transform: uppercase; letter-spacing: .04em; font-size: .8rem; font-weight: 600;
}
.search-table .th-sort:hover { color: var(--ink); }
.search-table .th-sort.active { color: var(--accent-ink); }
.search-table .th-sort .sort-arrow { font-size: .7rem; }
.search-table th.num .th-sort { justify-content: flex-end; }
.search-table th.search-flag-col .th-sort { justify-content: center; }
.search-table td { vertical-align: middle; }
.search-phase { color: var(--accent-ink); border-bottom: none; white-space: nowrap; }
.search-flag-col { width: 2.5rem; text-align: center; }
.search-flag { color: var(--accent); font-size: 1rem; }
.search-table tr.is-important td:first-child { box-shadow: inset 3px 0 0 var(--accent); }

.search-meta {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    font-size: .85rem; color: var(--ink-mute); margin-bottom: .6rem;
    font-variant-numeric: tabular-nums;
}

/* table column show/hide picker */
.col-picker { position: relative; }
.col-picker > summary {
    list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .35rem;
    padding: .35rem .75rem; border-radius: var(--radius-pill); border: 1px solid var(--line-strong);
    background: var(--bg); color: var(--ink-soft); font-size: .8rem; font-weight: 600;
    white-space: nowrap; user-select: none; transition: border-color .15s, color .15s;
}
.col-picker > summary::-webkit-details-marker { display: none; }
.col-picker > summary:hover,
.col-picker[open] > summary { border-color: var(--accent); color: var(--ink); }
.col-picker-menu {
    position: absolute; right: 0; top: calc(100% + .35rem); z-index: 40;
    min-width: 11rem; padding: .5rem; display: flex; flex-direction: column; gap: .1rem;
    background: var(--bg-elev); border: 1px solid var(--line-strong);
    border-radius: var(--radius); box-shadow: 0 12px 30px rgba(20, 14, 6, .18);
}
.col-picker-title {
    font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
    color: var(--ink-mute); padding: .15rem .4rem .35rem;
}
.col-picker-opt {
    display: flex; align-items: center; gap: .55rem; cursor: pointer;
    padding: .3rem .45rem; border-radius: var(--radius);
    font-size: .88rem; color: var(--ink); text-transform: none; letter-spacing: 0; font-weight: 400;
}
.col-picker-opt:hover { background: var(--bg); }
.col-picker-opt input { flex: none; margin: 0; }
.col-picker-opt.is-locked { color: var(--ink-mute); cursor: default; }
.col-picker-opt.is-locked:hover { background: transparent; }

/* horizontal scroll for wide tables on small screens (cost + search tables) */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media print { .table-scroll { overflow: visible; } }
.search-pager {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    margin-top: 1.25rem; flex-wrap: wrap;
}
.search-pager-nav { display: flex; align-items: center; gap: 1rem; margin-left: auto; }
.search-pager .btn[disabled] { opacity: .4; cursor: not-allowed; }
.search-pager-info {
    font-size: .85rem; color: var(--ink-mute); font-variant-numeric: tabular-nums;
}
.search-pager-size {
    display: inline-flex; align-items: center; gap: .5rem;
    font-size: .8rem; color: var(--ink-mute);
}

/* filter controls */
/* On the search page the split line sits BELOW the filters: drop the header's divider and add
   one under the controls, so all filters are above the line and the stat counters/results below. */
.search-header { border-bottom: none; padding-bottom: 0; margin-bottom: 1.5rem; }
.search-controls {
    margin-bottom: 1.75rem; padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--line);
}
.search-filter-row {
    display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: flex-end;
    margin-top: .85rem;
}
/* Dejstva in pravila (pro): text filter + kind picker on one line. The input is a .type-input, i.e.
   width:100%, which on its own pushed the select onto a second row. */
.pro-facts-controls { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.pro-facts-controls .search-box { flex: 1 1 16rem; max-width: 26rem; margin-bottom: 0; }

/* -- "Velja za": a dropdown holding a search box over a tree ---------------------------------------- */
/* Closed, it is a field like the ones beside it, showing what is chosen. Open, it hangs a panel over the
   form: a tree standing permanently open was the tallest thing in a row of one-line inputs and pushed
   the sentence, the value and Dodaj off the bottom of the block. */
/* The entry form (FactEntryForm, on the Dejstva page and in the gradbišče form) is TWO rows: what and
   where on the first - vrsta, velja za - and what exactly on the second, where the sentence takes
   whatever the short value, unit and Dodaj leave over. On one shared row it gave way to five other
   controls and came out the narrowest field in the form. */
.fact-entry { display: flex; flex-direction: column; gap: .5rem; }
.fact-entry-row { display: flex; gap: .5rem; align-items: flex-start; }
.fact-entry-row > select.fact-entry-kind { flex: 0 0 9.5rem; width: auto; }
.fact-entry-row > .fact-entry-text { flex: 1 1 0; min-width: 0; }
.fact-entry-row > .fact-entry-short { flex: 0 0 7.5rem; width: auto; min-width: 0; }
.fact-entry-row > .fact-entry-add { flex: none; min-height: 2.5rem; }
@media (max-width: 640px) {
    .fact-entry-row { flex-wrap: wrap; }
    .fact-entry-row > .fact-entry-text { flex-basis: 100%; }
    .fact-entry-row > .fact-entry-short { flex: 1 1 5rem; }
}
.pro-facts-add { margin-bottom: 1.25rem; }
.fact-scope { position: relative; flex: 1 1 auto; min-width: 0; }
.fact-scope-btn {
    display: flex; align-items: center; gap: .5rem; width: 100%; box-sizing: border-box;
    min-height: 2.5rem; padding: .45rem .65rem; cursor: pointer; text-align: left;
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    background: var(--bg-elev); color: var(--ink);
    font-family: var(--font-sans); font-size: .92rem;
}
.fact-scope-btn:hover { border-color: var(--accent); }
.fact-scope.is-open .fact-scope-btn { border-color: var(--accent); }
/* The value gives way, never the caret: a naloga's text runs to a full sentence. */
.fact-scope-value {
    flex: 1 1 auto; min-width: 0; display: flex; align-items: baseline; gap: .4rem;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* The same chevron select.type-input paints, at the same inset, so this field and the Vrsta picker beside
   it read as one form kit. (It was a drawn triangle while the picker beside it was a plain <select>
   wearing the browser's own arrow.) */
.fact-scope-caret {
    flex: none; width: .7rem; height: .7rem; margin-right: .2rem;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%238c8679' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M4 6l4 4 4-4'/></svg>") no-repeat center / contain;
}

/* The panel. Absolute, over the form - the block below it must not move when this opens. */
.fact-scope-pop {
    position: absolute; top: calc(100% + .25rem); left: 0; right: 0; z-index: 30;
    display: flex; flex-direction: column;
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    background: var(--bg-elev); overflow: hidden;
    box-shadow: 0 12px 28px -12px rgba(26, 26, 26, .45);
}
.fact-scope-search {
    width: 100%; box-sizing: border-box; appearance: none;
    padding: .5rem .7rem; border: none; border-bottom: 1px solid var(--line);
    background: var(--bg); color: var(--ink);
    font-family: var(--font-sans); font-size: .9rem;
}
.fact-scope-search:focus { outline: none; }
.fact-scope-search::placeholder { color: var(--ink-mute); }

/* A catalog is hundreds of rows, so the tree scrolls rather than growing the page. Tall enough that a
   phase's sklopi are visible at once - which is the comparison the reader is making. */
.fact-tree { max-height: 17rem; overflow-y: auto; padding: .25rem; }
.fact-tree-row { display: flex; align-items: flex-start; gap: .15rem; }
/* Indent carries the level. It is doing the same work as the "Faza / Sklop / Naloga" tag beside it -
   twice, deliberately: one is read at a glance, the other when the reader stops to check. */
.fact-tree-row.is-section { padding-left: 1.15rem; }
.fact-tree-row.is-task { padding-left: 2.3rem; }

.fact-twist {
    flex: none; width: 1.3rem; height: 1.6rem; padding: 0; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .95rem; line-height: 1; color: var(--ink-mute);
    background: none; border: none; border-radius: var(--radius);
    transition: transform .15s ease, color .14s;
}
.fact-twist:hover { color: var(--accent-ink); }
.fact-twist.is-open { transform: rotate(90deg); color: var(--ink); }
.fact-twist.is-leaf { cursor: default; }

.fact-pick {
    flex: 1 1 auto; min-width: 0; text-align: left; cursor: pointer;
    display: flex; align-items: baseline; gap: .45rem;
    padding: .25rem .45rem; border: 1px solid transparent; border-radius: var(--radius);
    background: none; color: var(--ink);
    font-family: var(--font-sans); font-size: .85rem; line-height: 1.35;
}
.fact-pick:hover { background: var(--accent-soft); }
.fact-pick.is-on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.fact-pick.is-on .fact-level { background: rgba(255, 255, 255, .22); color: #fff; }
/* The level, said in a word. Without it "Gradnja" (a faza) and "Armatura" (a naloga) are two lines of
   the same text, and the difference between them is the whole decision being made. */
.fact-level {
    flex: none; font-size: .62rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
    padding: .1rem .35rem; border-radius: var(--radius-pill);
    background: var(--bg-sunk, rgba(0,0,0,.06)); color: var(--ink-mute);
}
.fact-tree-row.is-phase > .fact-pick { font-weight: 600; }

.fact-scope-empty { font-size: .76rem; padding: .4rem .45rem; margin: 0; }

/* The facts table does NOT live in a scroll container - the row menu has to be able to hang out of it.
   The trade is that a narrow screen wraps the sentence column rather than scrolling the table sideways,
   which for prose is the better half of the trade anyway. */
.pro-facts-table { overflow: visible; }
/* Six columns, one of them a full sentence: at the .9rem the cost tables use, the four short columns
   were squeezed until "dejstvo" and "gradbišče" broke mid-word ("dejstv / o"). A size down buys every
   one of them the width it needs, and the prose column reads no worse for it. */
.pro-facts-table .report-costs-table { width: 100%; min-width: 0; font-size: .82rem; }
.pro-facts-table .report-costs-table thead th { font-size: .72rem; }
.pro-facts-table .report-costs-table th,
.pro-facts-table .report-costs-table td { padding: .5rem .55rem; }
.pro-facts-table .report-costs-table td { overflow-wrap: anywhere; }
/* Vrsta and Izvor are single words from a fixed set, so they take their own width and never break:
   overflow-wrap:anywhere above is meant for Besedilo, which is prose, not for a one-word label. */
.pro-facts-table .report-costs-table th:first-child,
.pro-facts-table .report-costs-table td:first-child,
.pro-facts-table .report-costs-table th:nth-child(5),
.pro-facts-table .report-costs-table td:nth-child(5) {
    white-space: nowrap; overflow-wrap: normal; width: 1%;
}
/* Vrsta is a mark, so the column is as narrow as the mark: centred under its own heading, and the svg
   dropped onto the text baseline so it sits level with the first line of the sentence beside it. */
.pro-facts-table .report-costs-table th:first-child,
.pro-facts-table .report-costs-table td.fact-kind { text-align: center; }
.fact-kind-ico { color: var(--ink-soft); vertical-align: -.35rem; }

/* The row's own menu, in the table's last column. */
.fact-actions { text-align: right; white-space: nowrap; width: 1%; }
.fact-actions .schedule-menu { display: inline-flex; }
.fact-actions .task-menu-btn { width: 1.9rem; height: 1.9rem; }

/* Correcting one entry: the sentence gets the width, the value and the unit share a line under it. */
.fact-editor { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; padding: 0 1.5rem 1rem; }
.fact-editor-wide { grid-column: 1 / -1; }
.fact-editor textarea.type-input { resize: vertical; }
.fact-editor-note { margin: 0 1.5rem .75rem; font-size: .82rem; }
@media (max-width: 560px) {
    .fact-editor { grid-template-columns: 1fr; }
}
/* "Samo pomembne" as a clean rounded toggle that matches the filter row (not a status badge). */
.report-flag-toggle {
    appearance: none; cursor: pointer; align-self: flex-end;
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .45rem .85rem; border-radius: var(--radius-pill);
    border: 1px solid var(--line-strong); background: var(--bg);
    color: var(--ink-soft); font-family: var(--font-sans); font-size: .9rem; font-weight: 500;
    line-height: 1.2; white-space: nowrap;
    transition: background .15s, color .15s, border-color .15s;
}
.report-flag-toggle:hover { border-color: var(--accent); color: var(--ink); }
.report-flag-toggle.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.report-clear-btn { align-self: flex-end; }
.search-filter { display: flex; flex-direction: column; gap: .3rem; }
.search-filter > span {
    font-size: .72rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: .08em; color: var(--ink-mute);
}
.search-select, .search-date {
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    background: var(--bg); color: var(--ink);
    padding: .45rem .6rem; font-family: var(--font-sans); font-size: .9rem;
}
.search-select { min-width: 9rem; }
.search-select:focus, .search-date:focus { outline: none; border-color: var(--accent); }
@media (max-width: 760px) {
    /* A <select> sizes to its longest option (the phase filter overflowed the phone viewport);
       cap the whole filter to the row width so the option text ellipsizes inside instead. */
    .search-filter { max-width: 100%; min-width: 0; }
    .search-select { max-width: 100%; }
}

/* clickable rows */
.search-row { cursor: pointer; }
.search-row:hover td { background: var(--bg-elev); }
.search-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

@media (max-width: 640px) {
    .gantt { --gantt-label-w: 8rem; }
    .gantt-controls { align-items: flex-start; }
}

/* ---------- generic eyebrow ---------- */
.eyebrow {
    font-size: .72rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .18em;
    color: var(--accent);
}

/* ---------- login: Google sign-in ---------- */
.login-switch {
    display: flex; gap: .4rem; align-items: center;
    font-size: .9rem; color: var(--ink-soft); margin-top: .25rem;
}
.login-link {
    appearance: none; background: none; border: none; cursor: pointer;
    color: var(--accent-ink); font: inherit; font-weight: 600; padding: 0;
    border-bottom: 1px solid transparent;
}
.login-link:hover { border-bottom-color: currentColor; }
.login-forgot { margin: -.15rem 0 .1rem; font-size: .9rem; }

.btn-google {
    display: inline-flex; align-items: center; justify-content: center; gap: .75rem;
    width: 100%; padding: .8rem 1rem;
    background: #fff; color: #3c4043;
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    font-family: var(--font-sans); font-size: .95rem; font-weight: 600;
    cursor: pointer; transition: box-shadow .15s, border-color .15s;
}
.btn-google:hover { box-shadow: 0 1px 6px rgba(60, 64, 67, .18); border-color: var(--ink-mute); }
.btn-google-icon { display: inline-flex; }

/* mock Google account chooser */
.gchooser-backdrop {
    position: fixed; inset: 0; z-index: 90;
    background: rgba(20, 20, 20, .55);
    display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.gchooser {
    width: min(26rem, 100%); background: #fff; color: #202124;
    border-radius: var(--radius); box-shadow: 0 24px 60px rgba(20, 14, 6, .4);
    overflow: hidden; font-family: var(--font-sans);
}
.gchooser-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid #e8eaed;
}
.gchooser-logo { display: inline-flex; align-items: center; gap: .6rem; font-size: .9rem; font-weight: 600; color: #5f6368; }
.gchooser-close {
    appearance: none; border: none; background: transparent; cursor: pointer;
    font-size: 1.5rem; line-height: 1; color: #5f6368; padding: 0 .25rem;
}
.gchooser-close:hover { color: #202124; }
.gchooser-body { padding: 1.25rem 1.5rem 1rem; }
.gchooser-title { font-size: 1.35rem; font-weight: 400; }
.gchooser-sub { color: #5f6368; font-size: .9rem; margin-top: .15rem; margin-bottom: 1rem; }
.gaccount-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.gaccount {
    display: flex; align-items: center; gap: .9rem; width: 100%;
    padding: .65rem .25rem; background: transparent; border: none; cursor: pointer;
    text-align: left; border-radius: var(--radius); font: inherit; color: #202124;
}
.gaccount:hover { background: #f1f3f4; }
.gaccount-avatar {
    flex: none; width: 2.25rem; height: 2.25rem; border-radius: 50%;
    background: var(--accent); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 1rem;
}
.gaccount-avatar-plus { background: #e8eaed; color: #5f6368; font-size: 1.4rem; }
.gaccount-text { display: flex; flex-direction: column; min-width: 0; }
.gaccount-name { font-size: .95rem; font-weight: 500; }
.gaccount-email { font-size: .82rem; color: #5f6368; }
.gform { display: flex; flex-direction: column; gap: .7rem; }
.gform-field { display: flex; flex-direction: column; gap: .25rem; font-size: .82rem; color: #5f6368; }
.gform-field input {
    border: 1px solid #c4c7c5; border-radius: var(--radius);
    padding: .65rem .75rem; font-family: var(--font-sans); font-size: 1rem; color: #202124;
}
.gform-field input:focus { outline: none; border-color: #1a73e8; box-shadow: 0 0 0 1px #1a73e8; }
.gform-submit { align-self: flex-end; }
.gform-back { align-self: flex-start; }

/* login: full-width primary action + tighter card on small screens */
.login-card .gform-submit { align-self: stretch; justify-content: center; }
@media (max-width: 480px) {
    .login-screen { padding: 1rem; }
    .login-card { padding: 1.5rem 1.35rem; }
    .login-card h1 { font-size: 1.45rem; }
}
.gform-check { display: flex; align-items: flex-start; gap: .5rem; font-size: .88rem; color: #5f6368; }
.gform-check input { margin-top: .15rem; flex: none; }
.gform-check a { color: var(--accent); }
.login-terms-note { font-size: .82rem; color: var(--ink-mute); text-align: center; margin: .25rem 0 0; }
.login-terms-note a { color: var(--accent); }
.gchooser-foot {
    padding: .85rem 1.5rem; border-top: 1px solid #e8eaed;
    font-size: .78rem; color: #5f6368; background: #f8f9fa;
}

/* ---------- project switcher in nav ----------
   The CONTAINER only positions the popup; the pill is the button inside it (see .project-switch-btn
   further down). It used to be the control itself - a bordered box - and when the button became the
   pill, that leftover box stayed around it: an oval inside a square. Anything else here belonged to
   that older switcher (avatar, two-line label) and went with it. */
.project-switch {
    display: inline-flex; align-items: center; max-width: 16rem;
    font-family: var(--font-sans); color: var(--ink);
}
.project-switch-name { font-size: .85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- projects picker screen ---------- */
.projects-screen { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.projects-nav-user { margin-left: auto; }
.projects-topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 1rem clamp(1.5rem, 4vw, 4rem);
    border-bottom: 1px solid var(--line); background: var(--bg);
    position: sticky; top: 0; z-index: 10;
}
.projects-user { display: flex; align-items: center; gap: .75rem; }
.projects-avatar {
    flex: none; width: 2.25rem; height: 2.25rem; border-radius: 50%;
    background: var(--accent); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 600;
}
.projects-user-text { display: flex; flex-direction: column; line-height: 1.15; }
.projects-user-name { font-weight: 600; font-size: .9rem; }
.projects-user-email { font-size: .78rem; color: var(--ink-mute); }

.projects-main { flex: 1; max-width: var(--max); width: 100%; margin: 0 auto; padding: 1.5rem clamp(1rem, 3vw, 2rem) 3.5rem; }
.projects-head {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    gap: 0; margin-bottom: 1.5rem;
}
.projects-head .intro { color: var(--ink-soft); margin-top: .5rem; max-width: 42rem; }
.projects-head h1 { margin-top: .3rem; }
.projects-head-action { margin-top: .9rem; display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.projects-limit-msg { margin: 0; font-size: .82rem; color: var(--ink-soft); text-align: center; max-width: 22rem; }

.projects-empty {
    border: 1px dashed var(--line-strong); border-radius: var(--radius);
    padding: 2rem 1.5rem; text-align: center; background: var(--bg-elev);
    display: flex; flex-direction: column; align-items: center; gap: .6rem;
}
.projects-empty p { color: var(--ink-soft); max-width: 28rem; margin: 0 0 .75rem; }

.projects-grid {
    display: grid; gap: 1.25rem;
    grid-template-columns: repeat(2, minmax(0, 1fr)); /* two bigger cards per row */
}
@media (max-width: 720px) {
    .projects-grid { grid-template-columns: 1fr; }
}
.project-card {
    position: relative;
    border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--bg-elev); display: flex; flex-direction: column;
    transition: border-color .15s, box-shadow .15s;
}
.project-card:hover { border-color: var(--line-strong); box-shadow: 0 8px 24px rgba(26, 26, 26, .08); }
/* Open / edit / delete as icon buttons in the top-right corner. */
.project-card-tools {
    position: absolute; top: .85rem; right: .85rem; z-index: 2;
    display: flex; gap: .3rem;
}
.project-card-tools .icon-btn { width: 1.9rem; height: 1.9rem; font-size: .95rem; line-height: 1; }
.project-card-tools .icon-btn-danger:hover:not(:disabled) {
    color: #b3261e; border-color: #b3261e;
}
/* Clickable card body - a vertical stack so the description/meta span the FULL card width.
   Only the avatar+name row reserves space for the top-right tools, so text isn't squashed. */
.project-card-open {
    display: flex; flex-direction: column; gap: .9rem; align-items: stretch; text-align: left;
    padding: 1.25rem; background: transparent; border: none; cursor: pointer;
    font: inherit; color: var(--ink); width: 100%; flex: 1 1 auto;
}
.project-card-head {
    display: flex; gap: .85rem; align-items: center; min-width: 0;
    padding-right: 3.75rem; /* clear the two top-right tool buttons (edit / delete) */
}
.project-card-avatar {
    flex: none; width: 2.75rem; height: 2.75rem; border-radius: var(--radius);
    background: var(--accent); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--font-serif); font-weight: 400; font-size: 1.35rem;
}
.project-card-titles { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.project-card-name {
    font-family: var(--font-sans); font-size: 1.2rem; font-weight: 600; line-height: 1.2;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.project-card-address {
    font-size: .82rem; color: var(--ink-soft);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.project-card-info { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.project-card-desc {
    font-size: .85rem; color: var(--ink-soft); line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.project-card-meta { font-size: .75rem; color: var(--ink-mute); }
.project-card-loc::before { content: "📍 "; }
/* Parcel-state badge: house = "Imam parcelo", search = "Iščem parcelo" (accent-tinted to flag the
   still-searching projects). Sized to its content, left-aligned in the card's info stack. */
.project-card-parcel {
    align-self: flex-start;
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .2rem .6rem; border-radius: var(--radius-pill);
    font-size: .72rem; font-weight: 600; line-height: 1.4;
    border: 1px solid var(--line-strong);
}
.project-card-parcel-ico { width: .95rem; height: .95rem; flex: none; }
.project-card-parcel.has-parcel { color: var(--ink-soft); background: var(--bg); }
.project-card-parcel.no-parcel { color: var(--accent-ink); background: var(--accent-soft); border-color: var(--accent); }
.project-card-actions {
    display: flex; gap: .4rem;
    padding: .85rem 1.25rem 1.1rem; border-top: 1px solid var(--line); margin-top: auto;
}
.project-card-cta { width: 100%; justify-content: center; }

/* ── projects as a bookshelf of notebooks (dnevniki) ───────────────────────────────────────────
   Each project is a closed notebook standing on a wooden shelf, showing its leather cover. Three
   notebooks per shelf; more projects spill onto more shelves. */
.projects-bookshelf { display: flex; flex-direction: column; gap: 2.75rem; }
.bookshelf { position: relative; }
.bookshelf-books {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem 2.25rem; align-items: end;
    padding: 0 .5rem;
}
/* the wooden shelf plank the notebooks rest on - spans the full width regardless of book count */
.bookshelf-board {
    height: 16px; margin-top: -4px; border-radius: var(--radius) var(--radius) var(--radius) var(--radius);
    background: linear-gradient(180deg, #5b5b5b 0%, #3a3a3a 62%, #3a3a3a 100%);
    box-shadow: 0 13px 22px -10px rgba(26, 26, 26, .55), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.shelf-book { position: relative; }
.shelf-book-cover {
    position: relative; appearance: none; cursor: pointer; text-align: left;
    width: 100%; aspect-ratio: 5 / 7; overflow: hidden;
    display: flex; flex-direction: column; gap: .35rem;
    padding: 1.05rem 1.05rem .95rem 1.7rem;            /* extra left padding clears the spine */
    border-radius: var(--radius) var(--radius) var(--radius) var(--radius); color: #ededed; font: inherit;
    background-color: color-mix(in srgb, var(--book-color, var(--accent)) 62%, #23150b);
    background-image:
        radial-gradient(120% 90% at 80% -10%, rgba(255, 255, 255, .10), transparent 55%),
        radial-gradient(40% 34% at 20% 30%, rgba(0, 0, 0, .18), transparent 70%),
        repeating-radial-gradient(circle at 0 0, rgba(0, 0, 0, .05) 0 1px, transparent 1px 3px);
    box-shadow: 0 14px 22px -12px rgba(26, 26, 26, .6), inset 0 0 0 1px rgba(0, 0, 0, .25);
    transition: transform .16s ease, box-shadow .16s ease;
}
.shelf-book-cover:hover { transform: translateY(-7px); box-shadow: 0 24px 32px -14px rgba(26, 26, 26, .65), inset 0 0 0 1px rgba(0, 0, 0, .25); }
.shelf-book-spine {
    position: absolute; top: 0; bottom: 0; left: 0; width: 1.1rem;
    background: linear-gradient(to right, rgba(0, 0, 0, .45), rgba(0, 0, 0, .04));
    border-right: 1px solid rgba(0, 0, 0, .22);
}
.shelf-book-eyebrow { font-size: .58rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: rgba(237, 237, 237, .62); }
/* line-height 1.25, not 1.1: Fraunces' ascent + descent is ~1.24em, so at 1.1 the clamp's overflow:hidden
   sheared the tails off g, j, p ("Novogradnja" read cut off on the cover). At 1.25 every line holds its
   glyphs, and the clamped fourth line still starts below the box, so none of it peeks in.
   break-word, not anywhere: anywhere may split a word that would fit a line of its own. */
.shelf-book-title {
    font-family: var(--font-serif); font-weight: 400; font-size: 1.45rem; line-height: 1.25; color: #fff;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: break-word;
}
.shelf-book-type { font-size: .72rem; color: rgba(237, 237, 237, .7); }
.shelf-book-foot { margin-top: auto; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.shelf-book-parcel {
    display: inline-flex; align-items: center; padding: .14rem .55rem; border-radius: var(--radius-pill);
    font-size: .64rem; font-weight: 600; border: 1px solid rgba(237, 237, 237, .28);
    color: #ededed; background: rgba(255, 255, 255, .08);
}
.shelf-book-parcel.no-parcel { background: rgba(255, 255, 255, .17); }
.shelf-book-readonly { font-size: .72rem; }
/* the project cover photo on a shelf book reuses the SAME taped frame (.cover-hero) as the notebook
   cover on /projects/{id}; only the surrounding margin is trimmed to fit the flex column. */
.shelf-book-hero { margin: 0 0 .15rem; aspect-ratio: 16 / 6; }
.shelf-book-tools {
    position: absolute; top: .5rem; right: .5rem; z-index: 3; display: flex; gap: .3rem;
    opacity: 0; transition: opacity .14s;
}
.shelf-book:hover .shelf-book-tools, .shelf-book:focus-within .shelf-book-tools { opacity: 1; }
.shelf-book-tools .icon-btn {
    width: 1.7rem; height: 1.7rem; font-size: .85rem; line-height: 1;
    background: rgba(0, 0, 0, .35); color: #fff; border-color: rgba(255, 255, 255, .25);
}
.shelf-book-tools .icon-btn:hover:not(:disabled) { background: rgba(0, 0, 0, .55); color: #fff; }
.shelf-book-tools .icon-btn-danger:hover:not(:disabled) { background: #b3261e; border-color: #b3261e; }
@media (max-width: 860px) { .bookshelf-books { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .bookshelf-books { grid-template-columns: 1fr; } }

/* First-run onboarding (#952): three path cards - Gradim hišo · Kupujem nepremičnino · Obnavljam - each with an
   example and what its dnevnik holds; a path not on offer yet is a greyed "Kmalu" card (as .seg-card.is-soon on the
   landing). Three columns where they fit, one stacked column below 900 px. */
.projects-onboard {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    gap: 1.5rem; padding: 1rem 0 2.5rem;
}
.projects-onboard-head { max-width: 42rem; }
.projects-onboard-head h2 {
    font-family: var(--font-serif); font-size: clamp(1.6rem, 2.6vw, 2.15rem); line-height: 1.1;
    color: var(--ink); margin: 0 0 .5rem;
}
.projects-onboard-head p { color: var(--ink-soft); margin: 0; }
.projects-onboard-choices {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem;
    width: 100%; max-width: 66rem;
}
.onboard-choice {
    position: relative; min-width: 0;
    appearance: none; cursor: pointer; text-align: left; font: inherit;
    display: flex; flex-direction: column; gap: .55rem;
    padding: 1.5rem; border: 1px solid var(--line-strong); border-radius: var(--radius));
    background: var(--bg-elev); color: var(--ink);
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.onboard-choice:hover, .onboard-choice:focus-visible { border-color: var(--accent); box-shadow: 0 10px 28px rgba(26, 26, 26, .1); transform: translateY(-2px); }
.onboard-choice-ico {
    width: 3rem; height: 3rem; border-radius: var(--radius); flex: none;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--accent-soft); color: var(--accent-ink); border: 1px solid var(--accent);
}
.onboard-choice-ico svg { width: 1.6rem; height: 1.6rem; }
.onboard-choice-title { font-family: var(--font-sans); font-size: 1.25rem; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.onboard-choice-text { display: flex; flex-direction: column; gap: .45rem; }
.onboard-choice-desc { font-size: .92rem; color: var(--ink); line-height: 1.5; }
.onboard-choice-example { font-size: .86rem; color: var(--ink-soft); line-height: 1.5; }
.onboard-choice-example em { font-style: italic; color: var(--ink-mute); }
/* The foot sits on the card's bottom edge, so the three CTAs line up whatever the copy's length. */
.onboard-choice-foot {
    margin-top: auto; padding-top: .75rem; border-top: 1px solid var(--line);
    display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .35rem .75rem;
}
.onboard-choice-meta { font-size: .8rem; color: var(--ink-mute); }
.onboard-choice-cta { margin-left: auto; font-size: .88rem; font-weight: 600; color: var(--accent-ink); white-space: nowrap; }
/* Not on offer yet: still a card (we want the reader's address), visibly not a door. */
.onboard-choice.is-soon { border-style: dashed; background: transparent; }
.onboard-choice.is-soon .onboard-choice-ico { background: var(--line); color: var(--ink-mute); border-color: var(--line-strong); }
.onboard-choice.is-soon .onboard-choice-title, .onboard-choice.is-soon .onboard-choice-cta { color: var(--ink-soft); }
/* Scoped by the grid so it also outranks dark.css's generated .onboard-choice:hover shadow. */
.projects-onboard-choices .onboard-choice.is-soon:hover,
.projects-onboard-choices .onboard-choice.is-soon:focus-visible { border-color: var(--line-strong); box-shadow: none; transform: none; }
.onboard-choice-soon {
    position: absolute; top: 1rem; right: 1rem;
    font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em;
    padding: .15rem .45rem; border-radius: var(--radius-pill); background: var(--line); color: var(--ink-soft);
}
.projects-onboard-msg { margin: 0; font-size: .88rem; color: var(--ink-soft); max-width: 36rem; }
.projects-onboard-other { font-size: .9rem; font-weight: 600; color: var(--accent-ink); }
.projects-onboard-other:hover { color: var(--accent); }
.projects-onboard-error {
    display: flex; flex-direction: column; align-items: center; gap: .75rem;
    padding: 1.5rem; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--bg-elev);
}
.projects-onboard-error p { margin: 0; color: var(--ink-soft); }
@media (max-width: 900px) {
    .projects-onboard-choices { grid-template-columns: minmax(0, 1fr); max-width: 36rem; }
}
@media (max-width: 400px) {
    .onboard-choice { padding: 1.15rem; }
}

/* "Imam parcelo" / "Nimam parcele" choice at the top of the create form - radio cards */
.project-parcel-choice { display: grid; grid-template-columns: repeat(2, 1fr); gap: .9rem; margin-bottom: 1.4rem; }
.parcel-choice-card {
    position: relative; appearance: none; cursor: pointer; text-align: left;
    display: flex; align-items: center; gap: .85rem;
    padding: 1rem 1.05rem; border: 1.5px solid var(--line-strong); border-radius: var(--radius);
    background: var(--bg); transition: border-color .14s, background .14s, box-shadow .14s, transform .14s;
}
.parcel-choice-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.parcel-choice-card.is-selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent-soft); }
.parcel-choice-ico {
    flex: none; display: inline-flex; align-items: center; justify-content: center;
    width: 2.6rem; height: 2.6rem; border-radius: 50%;
    background: var(--bg-elev); border: 1px solid var(--line-strong); color: var(--ink-soft);
    transition: background .14s, color .14s, border-color .14s;
}
.parcel-choice-ico svg { width: 1.35rem; height: 1.35rem; }
.parcel-choice-card.is-selected .parcel-choice-ico { background: var(--accent); border-color: var(--accent); color: #fff; }
.parcel-choice-body { display: flex; flex-direction: column; gap: .15rem; min-width: 0; flex: 1 1 auto; }
.parcel-choice-title { font-weight: 700; color: var(--ink); }
.parcel-choice-desc { font-size: .82rem; color: var(--ink-soft); }
.parcel-choice-check {
    flex: none; display: inline-flex; align-items: center; justify-content: center;
    width: 1.4rem; height: 1.4rem; border-radius: 50%;
    border: 1.5px solid var(--line-strong); color: #fff; background: transparent;
    transition: background .14s, border-color .14s;
}
.parcel-choice-check svg { width: .85rem; height: .85rem; opacity: 0; transition: opacity .14s; }
.parcel-choice-card.is-selected .parcel-choice-check { background: var(--accent); border-color: var(--accent); }
.parcel-choice-card.is-selected .parcel-choice-check svg { opacity: 1; }
.project-form-grid { display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); }
.project-field { display: flex; flex-direction: column; gap: .35rem; }
.project-field > span { font-size: .8rem; font-weight: 600; color: var(--ink-soft); }
.project-field-wide { grid-column: 1 / -1; }
.project-field-error { font-size: .8rem; font-weight: 600; color: var(--danger, #c0392b); }
/* One line under a field, saying what it is FOR - the professional site form asks for a name and an
   address whose purpose (the board, the crew's drive) is not obvious from the label alone. */
.project-field-hint { font-size: .78rem; font-style: normal; color: var(--ink-mute, var(--ink-soft)); }

/* Nadzorna plošča: "+ Novo gradbišče" beside the heading, and the per-site edit affordances. The row
   itself opens the site, so the table button is quiet and the phone card carries a full-width one. */
.pro-board-actions { display: flex; align-items: center; gap: .5rem; }
/* The row's menu sits ON the right edge of the table, under the header's own right edge - a menu
   drifting in the middle of a wide last column reads as belonging to nothing. */
.pro-site-edit { text-align: right; white-space: nowrap; width: 1%; }
.pro-site-edit .schedule-menu { display: inline-flex; }
/* .pro-site-row > td, not every last td: the unfolded detail row is ONE cell spanning the table, so it was
   the "last" cell too and right-aligned everything in it - Blokirano hugged the right edge. The plain
   `.pro-site-edit` rule cannot carry this alone: `.report-costs-table td` outranks it. */
.pro-sites-table th:last-child,
.pro-sites-table .pro-site-row > td:last-child { text-align: right; }
.pro-site-card-edit { width: 100%; margin-top: .5rem; min-height: 44px; }

/* ── Novo / uredi gradbišče (ProProjectForm) ─────────────────────────────────────────────────────────
   Wider than the consumer "Nov projekt" modal because it carries four blocks the other does not: the
   purpose, the people, the site's facts, and the phase skip. One rhythm between the blocks, each with a
   heading, so a builder can see at a glance what is still to answer. */
/* Capped at the viewport with the BLOCKS scrolling, not the page: five blocks are taller than a laptop
   screen, and a modal that runs off the bottom takes its Shrani with it. Same construction as the
   AI-termini modal above (.sched-ai-card) - card is a flex column, head and actions are flex:none. */
/* Wider than any other modal in the app on purpose: this one carries five blocks, and the widest of
   them - a fact row of five controls - only reads as ONE line when there is room for it. */
/* WIDTH, and why it is declared twice over. The card carries both .project-modal and
   .pro-project-modal, and .project-modal (width: min(34rem, 100%)) is declared LATER in this file at
   equal specificity - so it won, and the professional form has been rendering at the consumer form's
   34rem the whole time. Everything written for the wider card was dead with it, the three-track grid
   below included. Raising the specificity is what actually applies the width; a second declaration
   further down would only move the bug.

   60rem rather than the 84rem originally asked for: 84rem is 1344px, and a FORM read across that is a
   row of fields with no measure at all. 60rem fits the three tracks, the map, and the people list
   comfortably, and is still narrower than the screen it opens on. */
/* No height cap and no inner scroll (Miha, 2026-09-25): the help moved into ⓘ tooltips so the whole new
   gradbišče fits on one screen - and a scrolling box would clip those tooltips. On a screen that is still
   too short, the overlay (.task-modal) scrolls the whole card instead. */
.task-modal-card.pro-project-modal {
    width: min(60rem, 100%); display: flex; flex-direction: column;
}
/* At this width the top block reads better in three tracks than in two: name and address side by side
   with the date, instead of two very long inputs stacked over a half-empty row. */
@media (min-width: 1100px) {
    .pro-project-form .project-form-grid { grid-template-columns: repeat(3, 1fr); }
    .pro-project-form .project-field-wide { grid-column: span 2; }
}
.pro-project-modal > .task-modal-head { flex: none; }
.pro-project-form { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.pro-form-scroll { display: flex; flex-direction: column; gap: 1rem; }
/* .project-modal-body.pro-project-form, not .pro-project-form alone: the shared
   `.project-modal-body .project-form-actions { margin-top: 0 }` further down has the same specificity and
   won on order, so the last block (Faze pred gradnjo) sat right on the line above Shrani. */
.project-modal-body.pro-project-form .project-form-actions {
    flex: none; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line);
}

/* ── FieldTip: ⓘ beside a label, its text in a bubble on hover / keyboard focus ─────────────────── */
.field-tip {
    position: relative; display: inline-flex; vertical-align: middle; cursor: help;
    color: var(--ink-mute, var(--ink-soft)); border-radius: 50%; outline-offset: 2px;
}
.field-tip:hover, .field-tip:focus-visible { color: var(--accent-ink, var(--accent)); }
.field-tip-bubble {
    position: absolute; z-index: 30; top: calc(100% + 6px); left: -.6rem;
    width: max-content; max-width: min(22rem, 70vw); padding: .55rem .7rem;
    background: var(--ink, #262626); color: var(--bg, #fff); border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(20, 14, 6, .25);
    font-size: .8rem; font-weight: 400; line-height: 1.45; text-align: left; white-space: normal;
    pointer-events: none;
    /* display, not visibility: a hidden bubble still has a box, and beside a heading near the right edge
       that box made the whole page scroll sideways on a phone (scrollWidth 597 on a 390 px screen). */
    display: none;
}
.field-tip--end .field-tip-bubble { left: auto; right: -.6rem; }
.field-tip:hover .field-tip-bubble, .field-tip:focus .field-tip-bubble { display: block; }
.pro-form-block { display: flex; flex-direction: column; gap: .5rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.pro-form-block-title { margin: 0; font-size: .95rem; font-weight: 700; display: flex; align-items: center; gap: .35rem; }
/* Across the whole modal: the 72ch prose measure on .pro-muted stopped the block ledes at half the card,
   beside fields and lists that run its full width. */
.pro-form-block .pro-muted { margin: 0; font-size: .85rem; max-width: none; }
.pro-purpose-opts { margin-top: .2rem; }
.pro-check { display: flex; gap: .6rem; align-items: center; cursor: pointer; min-height: 2rem; }
.pro-check > span { display: inline-flex; align-items: center; gap: .35rem; }
.pro-check input { margin-top: .25rem; width: 1.1rem; height: 1.1rem; flex: none; }
.pro-check em { display: block; font-style: normal; }
.project-create-hint { margin: 0; font-size: .85rem; color: var(--ink-soft); line-height: 1.5; }
/* Notebook cover-colour swatches (create/edit project forms): each paints its palette colour; the
   selected swatch gets a ring in its own colour + a white check. */
.cover-color-picker { display: flex; flex-wrap: wrap; gap: .5rem; }
.cover-color-swatch {
    position: relative; width: 2.1rem; height: 2.1rem; border-radius: 50%; padding: 0; cursor: pointer;
    background: var(--swatch, var(--accent)); border: 2px solid var(--bg-elev);
    box-shadow: 0 0 0 1px var(--line-strong); transition: transform .12s ease, box-shadow .12s ease;
}
.cover-color-swatch:hover { transform: translateY(-1px); }
.cover-color-swatch.is-selected { box-shadow: 0 0 0 2px var(--bg-elev), 0 0 0 4px var(--swatch, var(--accent)); }
.cover-color-check { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; opacity: 0; }
.cover-color-swatch.is-selected .cover-color-check { opacity: 1; }
.cover-color-check svg { width: 1.1rem; height: 1.1rem; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .4)); }
.project-more-toggle {
    justify-self: start; padding: .15rem 0; border: 0; background: none; cursor: pointer;
    font-size: .85rem; font-weight: 600; color: var(--accent-ink); letter-spacing: .01em;
}
.project-more-toggle:hover { text-decoration: underline; }
.type-input.is-invalid { border-color: var(--danger, #c0392b); }
.project-form-actions { display: flex; gap: .6rem; align-items: center; margin-top: 1.25rem; flex-wrap: wrap; }
.project-modal { width: min(34rem, 100%); }
.project-modal-body { padding: 1.25rem 1.5rem 1.5rem; }
.project-modal-body p { color: var(--ink-soft); margin: 0 0 1rem; }
.project-modal-body .project-form-actions { margin-top: 0; }
/* Create-project form: the modal body has no gap of its own, so stack its blocks (type picker, parcel
   choice, fields, actions) with one uniform rhythm - otherwise the action buttons hug the last field
   and the "Več možnosti" section has no breathing room below it. */
.project-create-form { display: flex; flex-direction: column; gap: 1.3rem; }
.project-create-form .project-parcel-choice { margin-bottom: 0; }
/* ── Lokacija gradbišča: the parcel picker inside the professional form ───────────────────────────── */
/* The map is the tall thing in this form. Inside a modal that is itself capped at 88vh, the inline
   picker's own 420px would eat the scroll the other four blocks need, so it comes down here only. */
.pro-form-block .mappick { margin: .25rem 0 .5rem; }
.pro-form-block .mappick--inline:not(.mappick--fullscreen) .mappick-map {
    height: clamp(12rem, 24vh, 18rem); min-height: 0;
}
/* KO, parcel number, and the button that confirms them - packed to the left on a desktop, stacked on a
   phone. In 1.4fr/1fr tracks the k.o. picker (a 14rem combo) sat at the start of a much wider track and
   left a hole between itself and the parcel number; now each track is its field's own width. */
.pro-parcel-fields {
    display: grid; grid-template-columns: minmax(0, 18rem) minmax(0, 11rem) auto;
    justify-content: start; gap: .6rem; align-items: end;
}
.pro-parcel-field .ko-combo { width: 100%; }
.pro-parcel-field { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.pro-parcel-field label { font-size: .8rem; font-weight: 600; color: var(--ink-soft); }
@media (max-width: 700px) {
    .pro-parcel-fields { grid-template-columns: 1fr; }
}
/* The confirmation. Short on purpose: this block establishes WHICH plot, and the report that reads it
   lives on its own page - a summary here would be the first half of a page nobody asked for. */
.pro-parcel-picked {
    display: flex; align-items: flex-start; gap: .5rem;
    margin: 0 0 .5rem; padding: .55rem .7rem;
    border: 1px solid var(--line); border-left: 3px solid #2e7d32; border-radius: var(--radius);
    background: var(--bg-elev); font-size: .88rem;
}
.pro-parcel-mark { flex: none; color: #2e7d32; font-weight: 700; }
.pro-parcel-picked small { display: block; font-size: .78rem; color: var(--ink-mute); }

.project-delete-confirm-hint { font-size: .9rem; margin: 0 0 .4rem; }
.project-delete-confirm-input { width: 100%; margin-bottom: 1.25rem; }

@media (max-width: 560px) {
    .project-form-grid { grid-template-columns: 1fr; }
    .project-field-wide { grid-column: auto; }
    .project-parcel-choice { grid-template-columns: 1fr; }
}

/* ── first-time UX: "Nimam parcele" chapter - Iskanje nepremičnine (ParcelSearch.razor) ──
   Lives on a notebook page (JournalToolLayout): chapter header + the partner listings as photos
   taped onto the paper (same treatment as the per-phase file insert). */
.parcel-search-wizard { gap: .4rem; }

/* Lokacijsko poročilo for someone buying (#878): what it tells a buyer, and - for a plot not on the project yet -
   that its k.o. and number come from the seller first. The buyer box is the lookup card's intro under its heading
   (#1378), in place of the card's own sentence - so it keeps that sentence's room above the map. */
.report-buyer, .report-buyer-warn {
    margin: 1rem 0 0; padding: .9rem 1.1rem; border-radius: var(--radius);
    border: 1px solid var(--line); background: var(--bg-elev);
}
.parcel .report-buyer { margin: .5rem 0 1.35rem; }
.report-buyer h3 { margin: 0 0 .5rem; font-family: var(--font-sans); font-size: 1rem; font-weight: 700; }
.report-buyer ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .3rem; font-size: .9rem; line-height: 1.45; }
.report-buyer-note { margin: .6rem 0 0; font-size: .84rem; color: var(--ink-soft); line-height: 1.5; }
.report-buyer-warn {
    display: flex; gap: .75rem; align-items: flex-start;
    background: color-mix(in srgb, #d8a41f 12%, var(--bg-elev)); border-color: color-mix(in srgb, #d8a41f 45%, var(--line));
}
.report-buyer-warn-ico { flex: none; color: #9c6c06; margin-top: .1rem; }
.report-buyer-warn strong { color: var(--ink); }
.report-buyer-warn p { margin: .25rem 0 0; font-size: .88rem; line-height: 1.5; color: var(--ink-soft); }

/* »Prenesi PDF poročila« (NomiFac #1253) is a row in the Lokacijsko poročilo page's ⋯ since #1276 (LocationReportPdfButton
   - the .report-actions ⋯, the same object as on Zbirnik stroškov and Iskalnik). Unlike theirs it stays in the head's
   top-right corner at every width: .phase-header stacks under 640 px, which would drop it under the title on a phone. */
.phase-header.location-report-head { flex-direction: row; flex-wrap: nowrap; gap: .75rem; }
.location-report-head .phase-header-text { min-width: 0; }
.location-report-actions { flex: none; flex-wrap: nowrap; }
/* The menu closes on the click and the PDF takes up to a minute - this, beside the ⋯, says it is on its way. */
.location-report-busy { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; color: var(--ink-soft); white-space: nowrap; }
.location-report-busy .btn-spinner { color: var(--accent); }

.partner-parcels-note { font-size: .88rem; color: var(--ink-soft); margin: -.4rem 0 1.4rem; }
.partner-parcels-grid { display: grid; gap: 1.6rem 1.1rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.partner-parcel-card {
    position: relative; background: #fff; padding: .5rem .5rem 0;
    border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-card);
    display: flex; flex-direction: column;
    transition: transform .15s ease, box-shadow .15s ease;
}
.partner-parcel-card:nth-child(3n+1) { transform: rotate(-1.1deg); }
.partner-parcel-card:nth-child(3n+2) { transform: rotate(.8deg); }
.partner-parcel-card:nth-child(3n+3) { transform: rotate(-.4deg); }
.partner-parcel-card:hover { transform: rotate(0) scale(1.02); box-shadow: 0 14px 26px -10px rgba(26, 26, 26, .45); z-index: 2; }
.partner-parcel-tape {
    position: absolute; top: -.7rem; left: 50%; transform: translateX(-50%) rotate(-3deg);
    width: 3.6rem; height: 1.3rem; background: var(--tape);
    border: 1px solid rgba(154, 154, 154, .4); box-shadow: 0 1px 2px rgba(26, 26, 26, .12);
    z-index: 3; pointer-events: none;
}
.partner-parcel-card:nth-child(2n) .partner-parcel-tape { transform: translateX(-50%) rotate(2.5deg); }
.partner-parcel-thumb {
    position: relative; height: 9rem; overflow: hidden; border-radius: var(--radius);
    background: linear-gradient(135deg, #6b8f3d, #3f6f8f);   /* fallback while the photo loads / if it fails */
}
.partner-parcel-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; z-index: 0; }
/* bottom scrim so the white price stays readable over any photo */
.partner-parcel-thumb::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 55%;
    background: linear-gradient(to top, rgba(0,0,0,.5), transparent); z-index: 1; pointer-events: none;
}
.partner-parcel-badge {
    position: absolute; top: .55rem; left: .55rem; z-index: 2;
    font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    background: rgba(0,0,0,.5); color: #fff; padding: .2rem .45rem; border-radius: var(--radius-pill);
}
.partner-parcel-price {
    position: absolute; bottom: .55rem; right: .6rem; z-index: 2;
    font-weight: 800; color: #fff; font-size: 1rem; text-shadow: 0 1px 3px rgba(0,0,0,.6);
}
.partner-parcel-body { padding: .65rem .35rem .75rem; display: flex; flex-direction: column; gap: .15rem; }
.partner-parcel-title { font-weight: 700; color: var(--ink); }
.partner-parcel-meta { font-size: .8rem; color: var(--ink-soft); }
/* per-listing CTA into the Lokacijsko poročilo - vet the plot before falling in love with it */
.partner-parcel-check {
    margin-top: .5rem; align-self: flex-start; display: inline-flex; align-items: center; gap: .25rem;
    font-size: .84rem; font-weight: 700; color: var(--accent-ink); text-decoration: none;
}
.partner-parcel-check:hover { border-bottom-color: currentColor; }

.partner-parcels-cta {
    margin-top: 1.4rem; display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; flex-wrap: wrap;
    padding: 1.1rem 1.25rem; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--bg);
}
.partner-parcels-cta-text { display: flex; flex-direction: column; gap: .15rem; }
.partner-parcels-cta-text strong { color: var(--ink); }
.partner-parcels-cta-text span { font-size: .86rem; color: var(--ink-soft); }

/* ── Nepremičninski oglasi partnerjev (#585): AdsBrowser / AdCardView / AdDetailView / LokacijaPromoCta,
   shared by a project's /iskanje (notebook page) and the public /oglasi. Tokens only, so dark.css flips
   it without overrides; white text sits only on photo scrims. Mobile first: one column, filters folded. */
.ads { display: flex; flex-direction: column; gap: .9rem; min-width: 0; }
.estates-empty { color: var(--ink-soft); font-size: .92rem; }
.estates-search { display: flex; gap: .5rem; }
.estates-search-input {
    flex: 1; min-width: 0; padding: .65rem .8rem; font: inherit; font-size: 1rem;
    border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--bg-elev); color: var(--ink);
}
.estates-search-btn { flex: none; }
.estates-kinds { display: flex; flex-wrap: wrap; gap: .4rem; }
.estates-chip {
    display: inline-flex; align-items: center; gap: .35rem; min-height: 2.25rem; padding: .3rem .75rem;
    font: inherit; font-size: .86rem; font-weight: 600; color: var(--ink-soft); cursor: pointer;
    border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: var(--bg-elev);
}
.estates-chip:hover { border-color: var(--accent); color: var(--ink); }
.estates-chip.is-on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.estates-chip-n { font-weight: 500; font-size: .78rem; opacity: .75; }
.estates-more-toggle {
    align-self: flex-start; min-height: 2.25rem; padding: .2rem 0; font: inherit; font-size: .86rem; font-weight: 600;
    color: var(--accent-ink); background: none; border: 0; cursor: pointer; text-decoration: underline;
}
.estates-filters { display: none; grid-template-columns: 1fr; gap: .6rem .9rem; align-items: end; }
.estates-filters.is-open { display: grid; }
.estates-field { display: flex; flex-direction: column; gap: .2rem; min-width: 0; font-size: .8rem; color: var(--ink-soft); }
.estates-field select, .estates-field input {
    width: 100%; min-width: 0; min-height: 2.4rem; padding: .4rem .55rem; font: inherit; font-size: .92rem; color: var(--ink);
    border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--bg-elev);
}
.estates-range { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.estates-clear { justify-self: start; }
.estates-summary { font-size: .88rem; color: var(--ink-soft); }
/* the range filters are fieldsets (one legend for the two inputs) - drop the browser's box */
fieldset.estates-field { border: 0; margin: 0; padding: 0; }
fieldset.estates-field legend { padding: 0; margin-bottom: .2rem; font-size: .8rem; color: var(--ink-soft); }
.estates-ranking { font-size: .82rem; color: var(--ink-soft); }
.estates-ranking summary { cursor: pointer; display: inline-flex; align-items: center; min-height: 2.25rem; color: var(--accent-ink); font-weight: 600; }
.estates-ranking p { margin: .2rem 0 0; max-width: 46rem; line-height: 1.5; }
.estates-hero-note { margin: .6rem 0 0; max-width: 44rem; font-size: .86rem; color: var(--ink-mute); }
.estate-report { color: var(--accent-ink); white-space: nowrap; }
.estate-admin { padding: .8rem 1rem; border: 1px dashed #b4544a; border-radius: var(--radius); background: var(--bg-elev); font-size: .88rem; }
.estate-admin p { margin: 0 0 .5rem; }
.estate-admin-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.estate-admin-row .btn { min-height: 2.25rem; }
.estate-admin-reason { flex: 1 1 14rem; min-width: 0; min-height: 2.25rem; padding: .35rem .5rem; font: inherit; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--bg); color: var(--ink); }
.estates-summary strong { color: var(--ink); }
.estates-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr)); }
.estates-grid.is-loading { opacity: .55; transition: opacity .15s; }

.estate-card {
    display: flex; flex-direction: column; min-width: 0; overflow: hidden;
    background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: 0 1px 2px rgba(26, 26, 26, .06);
    transition: box-shadow .15s ease, transform .15s ease;
}
.estate-card:hover { box-shadow: 0 8px 18px -8px rgba(26, 26, 26, .4); transform: translateY(-2px); }
/* The card lifts on hover; the global hover border would draw a solid line across it, over the dashed foot (#686). */
.estate-card-main { display: flex; flex-direction: column; color: inherit; text-decoration: none; flex: 1; border-bottom: 0; }
.estate-card-thumb {
    position: relative; aspect-ratio: 4 / 3; overflow: hidden;
    background: linear-gradient(135deg, #6b8f3d, #3f6f8f);
}
.estate-card-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.estate-card-thumb::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,.55), transparent); pointer-events: none;
}
.estate-card-noimg { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.85); font-size: .85rem; }
.estate-card-badges { position: absolute; top: .5rem; left: .5rem; z-index: 2; display: flex; flex-wrap: wrap; gap: .3rem; }
.estate-badge {
    font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    background: rgba(0,0,0,.55); color: #fff; padding: .2rem .45rem; border-radius: var(--radius-pill);
}
.estate-badge-new { background: #a8481d; }
.estate-badge-rent { background: #2f5d7c; }
.estate-card-price {
    position: absolute; right: .6rem; bottom: .5rem; z-index: 2;
    font-weight: 800; font-size: 1.05rem; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.6);
}
.estate-card-count { position: absolute; left: .6rem; bottom: .6rem; z-index: 2; font-size: .72rem; color: rgba(255,255,255,.9); }
.estate-card-body { padding: .7rem .8rem .5rem; display: flex; flex-direction: column; gap: .15rem; }
.estate-card-title { margin: 0; font-family: var(--font-sans); font-size: 1rem; font-weight: 700; color: var(--ink); line-height: 1.3; }
.estate-card-place { font-size: .86rem; color: var(--ink-soft); }
.estate-card-meta { font-size: .8rem; color: var(--ink-soft); }
.estate-card-note { font-size: .78rem; color: var(--ink-mute); }
.estate-card-foot {
    display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap;
    padding: .5rem .8rem .65rem; border-top: 1px dashed var(--line);
}
/* One line on hover: "Partner ↗" is underlined, so the link drops the global hover border, which drew a second,
   longer line under the logo and the name (#686). */
.estate-card-partner {
    display: inline-flex; align-items: center; gap: .4rem; min-width: 0; min-height: 2.25rem;
    font-size: .8rem; color: var(--ink-soft); text-decoration: none; border-bottom: 0;
}
a.estate-card-partner:hover .estate-card-partner-go { text-decoration: underline; }
.estate-card-logo { width: 1.6rem; height: 1.6rem; object-fit: contain; flex: none; background: #fff; border-radius: var(--radius); }
.estate-card-partner-name { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 13rem; }
.estate-card-partner-go { color: var(--accent-ink); font-weight: 600; white-space: nowrap; }
.estate-card-check { display: inline-flex; align-items: center; min-height: 2.25rem; font-size: .8rem; font-weight: 700; color: var(--accent-ink); text-decoration: none; white-space: nowrap; }
/* #868 the Kupujem čarovnik's pick: top right over the photo (the badges sit top left, the price bottom right).
   A sibling of the card's link, positioned over it - never a button inside a link. */
.estate-card { position: relative; }
.estate-card-pick {
    position: absolute; top: .5rem; right: .5rem; z-index: 3;
    display: inline-flex; align-items: center; gap: .3rem; min-height: 2.5rem; padding: .3rem .85rem;
    font: inherit; font-size: .84rem; font-weight: 700; cursor: pointer;
    color: var(--ink); background: var(--bg-elev); border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}
.estate-card-pick:hover:not(:disabled) { border-color: var(--accent); }
.estate-card-pick.is-on { background: var(--accent); color: #fff; border-color: var(--accent); }
.estate-card-pick:disabled { opacity: .55; cursor: not-allowed; }
.estate-card.is-picked { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
/* #6a6a6a a signed-in account's izbrani oglasi: pinned above the search, on a tinted board of their own. */
.estates-saved {
    display: flex; flex-direction: column; gap: .7rem; padding: .9rem 1rem 1rem;
    border: 1px solid var(--accent); border-radius: var(--radius);
    background: color-mix(in srgb, var(--accent) 7%, var(--bg-elev));
}
.estates-saved-head { display: flex; flex-direction: column; gap: .15rem; }
.estates-saved-title {
    display: flex; align-items: center; gap: .4rem; margin: 0;
    font-family: var(--font-sans); font-size: 1.05rem; font-weight: 700; color: var(--ink);
}
.estates-saved-more { align-self: flex-start; min-height: 2.5rem; }
/* The pick button sits top right: the kind badges wrap before it rather than slide under it. */
.estate-card.is-pickable .estate-card-badges { right: 7.25rem; }
/* On a phone the pins are one swipeable row, so the search still starts near the top. No scroll-snap: it re-snaps to
   the card it was on when a new pin is put in front, and the new one would land out of sight. */
@media (max-width: 600px) {
    .estates-saved { padding: .75rem .75rem .85rem; }
    .estates-saved-grid {
        grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(15rem, 80%);
        overflow-x: auto; overscroll-behavior-x: contain; padding-bottom: .35rem;
    }
    .estates-saved-grid > .estate-card:hover { transform: none; }
}

.estates-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .3rem; margin-top: .5rem; }
.estates-pager-n {
    min-width: 2.4rem; min-height: 2.4rem; padding: 0 .5rem; font: inherit; font-size: .88rem; cursor: pointer;
    color: var(--ink); background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
}
.estates-pager-n.is-current { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 700; }
.estates-pager-gap { color: var(--ink-mute); padding: 0 .2rem; }

/* lokacija.glog.si call-to-action with the discount codes. #637: a box you notice - accent-tinted ground, an
   icon badge, what the report covers as chips and FILLED buttons (it was a pale band with a link at its edge);
   the same box on the grid (is-compact) and on the ad's details. Tokens only, so dark.css flips it. */
.loka-promo {
    display: flex; flex-direction: column; gap: 1rem; padding: 1.1rem 1.2rem;
    border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: var(--radius);
    background: linear-gradient(115deg, var(--accent-soft) 0%, var(--bg-elev) 78%);
    box-shadow: var(--shadow-card, 0 8px 18px -12px rgba(122, 50, 20, .35));
}
.loka-promo-main { display: flex; align-items: flex-start; gap: .9rem; min-width: 0; }
.loka-promo-badge {
    flex: none; display: grid; place-items: center; width: 2.9rem; height: 2.9rem; border-radius: 50%;
    background: var(--accent); color: var(--bg);
}
.loka-promo-text { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.loka-promo-kicker { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); }
.loka-promo-title { font-family: var(--font-serif); font-size: 1.3rem; font-weight: 400; line-height: 1.2; color: var(--ink); }
.loka-promo-lead { font-size: .9rem; line-height: 1.5; color: var(--ink-soft); }
.loka-promo-facts { list-style: none; margin: .3rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.loka-promo-facts li {
    display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .65rem;
    font-size: .78rem; font-weight: 600; color: var(--ink);
    background: var(--bg-elev); border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
}
.loka-promo-facts li::before { content: ""; flex: none; width: .4rem; height: .4rem; border-radius: 50%; background: var(--accent); }
/* the one button without codes: full width on a phone (a finger target), its own width from 640 px */
.loka-promo > .loka-promo-go { align-self: stretch; }
.loka-promo-codes { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; grid-template-columns: 1fr; }
.loka-promo-code {
    display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .7rem; padding: .65rem .75rem;
    border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--bg-elev);
}
.loka-promo-pkg { font-weight: 700; font-size: .92rem; color: var(--ink); }
.loka-promo-pct { padding: .1rem .5rem; font-size: .8rem; font-weight: 800; color: var(--accent-ink); background: var(--accent-soft); border-radius: var(--radius-pill); }
.loka-promo-codeval { display: inline-flex; align-items: center; gap: .35rem; }
.loka-promo-codeval code { font-size: .88rem; font-weight: 700; letter-spacing: .04em; padding: .1rem .35rem; background: var(--accent-soft); color: var(--accent-ink); border-radius: var(--radius); }
.loka-promo-copy {
    min-height: 2.25rem; padding: .15rem .55rem; font: inherit; font-size: .76rem; cursor: pointer;
    color: var(--ink-soft); background: transparent; border: 1px solid var(--line-strong); border-radius: var(--radius);
}
.loka-promo-code .loka-promo-go { margin-left: auto; white-space: nowrap; }

/* ad details */
.estate-detail { display: flex; flex-direction: column; gap: 1.1rem; min-width: 0; }
.estate-back { align-self: flex-start; display: inline-flex; align-items: center; min-height: 2.25rem; font-size: .86rem; color: var(--ink-soft); text-decoration: none; }
.estate-back:hover { color: var(--ink); }
.estate-head { display: flex; flex-direction: column; gap: .6rem; }
.estate-title { margin: .1rem 0 .15rem; font-size: clamp(1.5rem, 4.5vw, 2.2rem); line-height: 1.15; overflow-wrap: anywhere; }
.estate-place { color: var(--ink-soft); }
.estate-price { font-size: clamp(1.8rem, 5vw, 2.4rem); font-weight: 800; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; }
.estate-price-note { font-size: .84rem; color: var(--ink-soft); }
.estate-gallery { display: flex; flex-direction: column; gap: .5rem; min-width: 0; }
.estate-gallery-main { position: relative; background: #1a1a1a; border-radius: var(--radius); overflow: hidden; aspect-ratio: 3 / 2; max-height: 70vh; }
.estate-gallery-main img { width: 100%; height: 100%; object-fit: contain; display: block; }
.estate-gallery-nav {
    position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px;
    border: 0; border-radius: 50%; background: rgba(0,0,0,.45); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.estate-gallery-nav.is-prev { left: .5rem; }
.estate-gallery-nav.is-next { right: .5rem; }
.estate-gallery-count { position: absolute; right: .6rem; bottom: .5rem; font-size: .76rem; color: #fff; background: rgba(0,0,0,.5); padding: .15rem .45rem; border-radius: var(--radius-pill); }
.estate-gallery-strip { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .25rem; -webkit-overflow-scrolling: touch; }
.estate-thumb {
    position: relative; flex: none; width: 5.5rem; height: 4.1rem; padding: 0; cursor: pointer; overflow: hidden;
    border: 2px solid transparent; border-radius: var(--radius); background: var(--line);
}
.estate-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.estate-thumb.is-on { border-color: var(--accent); }
.estate-thumb-tag { position: absolute; left: 0; right: 0; bottom: 0; font-size: .62rem; color: #fff; background: rgba(0,0,0,.55); }
.estate-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.estate-facts h2, .estate-partner h2, .estate-description h2 { font-size: 1.3rem; margin: 0 0 .6rem; }
.estate-facts dl { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); border-top: 1px solid var(--line); }
.estate-fact { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.estate-fact dt { color: var(--ink-soft); }
.estate-fact dd { margin: 0; font-weight: 600; text-align: right; color: var(--ink); overflow-wrap: anywhere; }
.estate-partner { padding: .9rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev); align-self: start; min-width: 0; }
.estate-partner-head { display: flex; align-items: center; gap: .7rem; margin-bottom: .5rem; }
.estate-partner-logo { max-width: 5rem; max-height: 3rem; object-fit: contain; background: #fff; padding: .2rem; border-radius: var(--radius); }
.estate-partner-name { font-weight: 700; color: var(--ink); }
.estate-partner-sub { font-size: .82rem; color: var(--ink-soft); }
.estate-contact { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .25rem; font-size: .9rem; }
.estate-contact a { color: var(--accent-ink); text-decoration: none; display: inline-flex; align-items: center; gap: .65rem; min-height: 2.25rem; overflow-wrap: anywhere; }
.estate-contact-ico {
    flex: none; display: inline-flex; align-items: center; justify-content: center;
    width: 2rem; height: 2rem; border-radius: 50%;
    background: var(--accent-soft); color: var(--accent-ink);
}
.estate-contact-address { color: var(--ink-soft); }
.estate-partner-about { margin: .6rem 0 0; font-size: .86rem; color: var(--ink-soft); }
.estate-description-text { font-size: .95rem; line-height: 1.6; color: var(--ink); overflow-wrap: anywhere; }
.estate-source { font-size: .78rem; color: var(--ink-mute); margin: 0; }
.estate-missing { display: flex; flex-direction: column; gap: .6rem; align-items: flex-start; }

/* public /oglasi */
.estates-page { width: 100%; max-width: var(--max); margin: 0 auto; padding: 1.25rem 1rem 3rem; box-sizing: border-box; }
.estates-hero { padding: 1rem 0 1.25rem; }
.estates-hero-title { font-family: var(--font-serif); font-size: clamp(1.8rem, 5vw, 2.8rem); line-height: 1.1; margin: .5rem 0 .6rem; }
.estates-hero-lead { margin: 0; max-width: 44rem; color: var(--ink-soft); line-height: 1.6; }
.estates-architec-cta {
    margin-top: 2rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 1.1rem 1.25rem; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--bg-elev);
}
.estates-architec-cta > div { display: flex; flex-direction: column; gap: .15rem; }
.estates-architec-cta span { font-size: .88rem; color: var(--ink-soft); }

/* admin /admin/partnerji */
.partners-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .5rem; }
.partners-head h2 { margin: 0; }
.partners-msg { margin: 0 0 1rem; }
/* the partner cell (#680): logo beside a column of name and web address, so the address starts under the name.
   min-width: on a phone the column must not squeeze the name to a word per line and break the address mid-word -
   the table scrolls inside its card instead (.partners-table-wrap) */
.partners-name { display: flex; align-items: center; gap: .55rem; min-width: 13rem; }
.partners-name-text { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.partners-site { font-size: .82rem; overflow-wrap: break-word; }
.partners-logo-sm { flex: none; width: 2rem; height: 2rem; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.partners-logo-lg { max-width: 10rem; max-height: 5rem; object-fit: contain; display: block; margin: .3rem 0; background: #fff; }
.partners-wide { grid-column: 1 / -1; }
.partners-wide textarea { width: 100%; font: inherit; }
/* the partner editor (#637): head with the name and a close button, then tabs Podatki / Logotip / Viri oglasov */
.partners-editor-head { display: flex; align-items: flex-start; gap: .75rem; margin-bottom: .6rem; }
.partners-editor-logo { flex: none; width: 2.6rem; height: 2.6rem; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.partners-editor-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.partners-editor-title h2 { margin: 0; overflow-wrap: anywhere; }
.partners-tabs { margin-bottom: 1rem; }
.partners-tabs .profile-tab { display: inline-flex; align-items: center; }
.partners-tabs .profile-tab:disabled { opacity: .45; cursor: not-allowed; }
.partners-head p { margin: 0; }
.partners-head .btn { flex: none; white-space: nowrap; }
.partners-panel .admin-form-actions { flex-wrap: wrap; }
.partners-danger-zone { margin-left: auto; }
.partners-logo { display: flex; flex-direction: column; align-items: flex-start; gap: .4rem; }
.partners-logo .admin-form-actions { margin-top: .4rem; }
.partners-logo p { margin: 0; }
.partners-feed-form h3 { margin: 0 0 .4rem; font-size: 1rem; }
/* the logo's file input hides inside its label.btn but stays in the tab order (focus shows on the label) */
.partners-file { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.partners-logo label.btn { position: relative; }
.partners-logo label.btn:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.partners-logo label.btn.is-disabled { opacity: .5; pointer-events: none; }
.partners-row-actions { white-space: nowrap; }
/* #680: the shared `.admin-table td { text-align: left; vertical-align: top }` comes later and outranked the
   actions cell, so the edit button stood at the left of a wide last column and every cell hugged the top of a
   two-line row. Here the cells sit on the row's middle and the actions column shrinks to its buttons at the end. */
.partners-table-wrap .admin-table td { vertical-align: middle; }
.partners-table-wrap .admin-table td.partners-row-actions { text-align: right; width: 1%; }
.partners-row-actions .icon-btn + .icon-btn { margin-left: .3rem; }
.icon-btn.partners-icon-danger:hover:not(:disabled) { color: var(--danger, #7a2020); border-color: var(--danger, #7a2020); }
.partners-confirm { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .4rem; font-size: .88rem; }
.partners-feed { padding: .75rem 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: .5rem; }
.partners-feed.is-failed .partners-feed-status { color: #9b2c22; }
.partners-feed-url { font-size: .82rem; color: var(--ink-soft); overflow-wrap: anywhere; }
.partners-feed-status { font-size: .84rem; }
/* Ads in the feed that the public list leaves out - the partner or the feed is switched off (#958). */
.partners-hidden-ads { color: #9b2c22; }
.partners-feed-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.partners-preview { padding: .6rem .75rem; font-size: .86rem; border-left: 3px solid var(--ok); background: var(--bg); }
.partners-preview.is-failed { border-left-color: #9b2c22; }
.partners-preview ul { margin: .3rem 0 0; padding-left: 1.1rem; }
.partners-feed-form { margin-top: 1rem; }
tr.is-selected td { background: var(--accent-soft); }
/* the admin tables are wider than a phone: they scroll inside their card, the page never scrolls sideways */
.partners-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.partners-table-wrap input { min-height: 2.25rem; }
.partners-feed-actions .btn, .partners-head .btn { min-height: 2.25rem; }

@media (min-width: 640px) {
    .estates-filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); }
    .estates-more-toggle { display: none; }
    .estate-head { flex-direction: row; justify-content: space-between; align-items: flex-end; }
    .estate-head-price { text-align: right; flex: none; }
    /* auto-fit: one or two codes share the row instead of sitting in a third of it */
    .loka-promo-codes { grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
    .loka-promo > .loka-promo-go { align-self: flex-start; }
    /* on the details the button and the codes line up under the text, not under the badge */
    .loka-promo:not(.is-compact) > .loka-promo-go, .loka-promo:not(.is-compact) > .loka-promo-codes { margin-left: 3.8rem; }
}
@media (min-width: 900px) {
    .estate-body { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
    .loka-promo.is-compact { flex-direction: row; align-items: center; gap: 1.25rem; }
    .loka-promo.is-compact .loka-promo-main { flex: 1 1 22rem; }
    .loka-promo.is-compact .loka-promo-codes { flex: 2 1 30rem; }
    .loka-promo.is-compact > .loka-promo-go { align-self: center; flex: none; }
}
@media (prefers-reduced-motion: reduce) {
    .estate-card { transition: none; }
    .estate-card:hover { transform: none; }
}

/* ---------- profile email ---------- */
.profile-user-email { font-size: .82rem; color: var(--ink-mute); }

/* ---------- drag-to-reorder handle (phase page) ---------- */
.item-drag-handle {
    flex: none; align-self: center; cursor: grab; touch-action: none;
    color: var(--ink-mute); font-size: 1rem; line-height: 1; padding: 0 .15rem;
    user-select: none; transition: color .15s;
    /* the handle is line art now (Icon "grip"), so it has to sit on the row's centre line like a glyph */
    display: inline-flex; align-items: center;
}
.item-drag-handle:hover, .item-drag-handle:active { color: var(--ink); cursor: grabbing; }
.item.reorder-dragging {
    opacity: .85; box-shadow: 0 8px 22px rgba(20, 14, 6, .22);
    outline: 2px dashed var(--accent); outline-offset: -2px;
}

/* ---------- task reminder ---------- */
.task-reminder .task-meta-label { display: inline-flex; align-items: center; gap: .3rem; }
.task-reminder .task-meta-label svg { width: 14px; height: 14px; }
.reminder-gcal { text-decoration: none; }

/* ---------- project-wide progress (Home hero) ---------- */
.project-progress {
    display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: 1.5rem;
}
.project-progress-item { flex: 1 1 14rem; min-width: 12rem; }
.project-progress-head {
    display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .4rem;
}
.project-progress-label { font-size: .82rem; font-weight: 600; color: var(--ink-soft); }
.project-progress-pct {
    font-family: var(--font-sans); font-variant-numeric: tabular-nums;
    font-weight: 600; color: var(--ink);
}
.project-progress-bar {
    height: 6px; background: var(--line); border-radius: var(--radius-pill); overflow: hidden;
}
.project-progress-fill {
    height: 100%; background: var(--accent); border-radius: var(--radius-pill); transition: width .3s ease;
}
.project-progress-fill.delivery { background: #3f6f8f; }
.project-progress-fill.full { background: var(--ok); }
.project-progress-sub { margin-top: .35rem; font-size: .75rem; color: var(--ink-mute); }

/* ---------- 10-day weather forecast (ARSO) ---------- */
.weather-widget { margin-top: 1.5rem; }
.weather-head {
    display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .5rem;
}
.weather-title { font-size: .82rem; font-weight: 600; color: var(--ink-soft); }
.weather-src { font-size: .68rem; color: var(--ink-mute); }
.weather-days { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .3rem; }
.weather-day {
    flex: 1 0 4.4rem; min-width: 4.4rem; display: flex; flex-direction: column; align-items: center;
    gap: .12rem; padding: .55rem .25rem; border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--bg-elev);
}
.weather-dow { font-size: .74rem; font-weight: 600; color: var(--ink); }
.weather-date { font-size: .66rem; color: var(--ink-mute); font-variant-numeric: tabular-nums; }
.weather-icon { font-size: 1.4rem; line-height: 1.5; }
.weather-temp { font-size: .74rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.weather-temp strong { font-weight: 700; }
.weather-temp-min { color: var(--ink-mute); }
.weather-precip { font-size: .64rem; color: #3f6f8f; font-variant-numeric: tabular-nums; }
.weather-precip.dry { color: var(--ink-mute); opacity: .55; }

/* On the notebook cover the forecast sits at the foot of the dark leather book: a hairline divider,
   cream header text, and each day as a transparent tile (just a faint cream outline) so the leather
   shows through, with white/cream text so it stays legible on the dark cover. */
.book-cover-inner .weather-widget {
    width: 100%; margin-top: 1.7rem; padding-top: 1.35rem;
    border-top: 1px solid rgba(237, 237, 237, .16);
}
.book-cover-inner .weather-title { color: rgba(237, 237, 237, .92); }
.book-cover-inner .weather-src { color: rgba(237, 237, 237, .55); }
.book-cover-inner .weather-day {
    background: transparent; border-color: rgba(237, 237, 237, .22); box-shadow: none;
}
.book-cover-inner .weather-dow,
.book-cover-inner .weather-temp,
.book-cover-inner .weather-temp strong { color: #fff; }
.book-cover-inner .weather-date,
.book-cover-inner .weather-temp-min { color: rgba(237, 237, 237, .72); }
.book-cover-inner .weather-precip { color: rgba(237, 237, 237, .92); }
.book-cover-inner .weather-precip.dry { color: rgba(237, 237, 237, .5); opacity: 1; }

/* ---------- climate ("Podnebje lokacije") accordion panel in the parcel report ---------- */
.climate-figs {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr)); gap: .4rem;
}
.climate-fig {
    display: flex; flex-direction: column; gap: .1rem; padding: .55rem .6rem;
    border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev);
}
.climate-fig-val { font-size: .95rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.climate-fig-val small { font-size: .62rem; font-weight: 600; color: var(--ink-mute); }
.climate-fig-lbl { font-size: .66rem; color: var(--ink-mute); }
.climate-notes { margin: .6rem 0 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: .25rem; }
.climate-notes li { font-size: .72rem; color: var(--ink-soft); line-height: 1.35; }
.climate-foot { font-size: .64rem; color: var(--ink-mute); margin-top: .5rem; line-height: 1.3; }
.climate-ai { display: flex; align-items: center; gap: .5rem; margin-top: .9rem; }
.climate-ai-lbl { font-size: .72rem; color: var(--ink-soft); }
.climate-ai-result { margin-top: .7rem; }

/* ---------- nearby institutions ("V bližini" parcel tab) ---------- */
.nearby-panel { display: flex; flex-direction: column; gap: .6rem; }
.nearby-map-wrap { position: relative; }
.nearby-map {
    height: 320px; width: 100%; border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; z-index: 0;   /* keep Leaflet panes under the app's sticky/overlay chrome */
}
/* expand-to-modal button overlaid on the inline map */
.nearby-map-expand {
    position: absolute; top: .5rem; right: .5rem; z-index: 500;
    width: 1.9rem; height: 1.9rem; display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--line-strong); border-radius: var(--radius); cursor: pointer;
    background: var(--bg-elev); color: var(--ink); font-size: 1rem; line-height: 1;
    box-shadow: 0 1px 3px rgba(0,0,0,.18);
}
.nearby-map-expand:hover { background: var(--bg); }
/* "🏠 na parcelo" home button - a Leaflet bar control under the zoom buttons (top-left) */
.nearby-home-btn { font-size: 15px; text-align: center; text-decoration: none; cursor: pointer; }

/* full-screen map modal (reuses the generic .task-modal* chrome). Raised above the sticky nav (z 10)
   and the embedded Leaflet controls/panes (z up to ~1000) so it reliably covers the menu - on small
   screens the nav otherwise bled over the modal. */
.nearby-modal { z-index: 1100; }
.nearby-modal-card { width: min(1000px, 94vw); max-width: 94vw; }
/* recenter ("Na parcelo") control: center the monochrome house glyph in the Leaflet bar button */
.nearby-home-btn { display: flex !important; align-items: center; justify-content: center; }
.nearby-home-btn svg { width: 16px; height: 16px; }
.nearby-modal-body { padding: 0; }
.nearby-modal-map { width: 100%; height: min(74vh, 680px); border-radius: 0 0 var(--radius) var(--radius); overflow: hidden; }
/* map pins (Leaflet divIcon): a single uniform-color circular badge holding a white monochrome glyph */
.nearby-pin { background: none; border: none; }
.nearby-pin-ico {
    display: flex; align-items: center; justify-content: center; box-sizing: border-box;
    width: 100%; height: 100%; border-radius: 50%;
    background: var(--accent); color: #fff; border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.4);
}
.nearby-pin-ico svg { width: 60%; height: 60%; }
.nearby-pin-parcel .nearby-pin-ico { background: var(--ink); }   /* the parcel stands out from amenities */
/* clicking a list row pulses its pin so the eye lands on it immediately */
@keyframes nearbyFlash {
    0%   { transform: scale(1);    box-shadow: 0 0 0 0 rgba(10, 10, 10,.6); }
    50%  { transform: scale(1.55); box-shadow: 0 0 0 9px rgba(10, 10, 10,0); }
    100% { transform: scale(1);    box-shadow: 0 0 0 0 rgba(10, 10, 10,0); }
}
.nearby-pin-ico.is-flash { animation: nearbyFlash .7s ease-out 3; z-index: 1200; }
.nearby-attr { font-size: .68rem; color: var(--ink-mute); text-align: right; }

/* name search ("najdi Spar / OŠ Velike Lašče …") */
.nearby-search {
    display: flex; align-items: center; gap: .5rem;
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    padding: .3rem .3rem .3rem .6rem; background: var(--bg-elev);
}
.nearby-search:focus-within { border-color: var(--accent); }
.nearby-search-ico { display: inline-flex; align-items: center; flex: none; color: var(--ink-mute); }
.nearby-search-ico svg { width: 1rem; height: 1rem; }
.nearby-search-input {
    flex: 1 1 auto; min-width: 0; border: none; background: none; outline: none;
    font: inherit; font-size: .85rem; color: var(--ink);
}
.nearby-search-clear {
    appearance: none; border: none; background: none; cursor: pointer; flex: none;
    font-size: 1.1rem; line-height: 1; color: var(--ink-mute); padding: 0 .2rem;
}
.nearby-search-clear:hover { color: var(--ink); }

/* search results: flat, nearest-first across all categories */
.nearby-results { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.nearby-results li {
    display: flex; align-items: center; gap: .55rem; padding: .4rem .1rem;
    border-bottom: 1px solid var(--line);
}
.nearby-results li:last-child { border-bottom: none; }
.nearby-res-cat { font-size: .7rem; color: var(--ink-mute); flex: none; }
.nearby-results .nearby-name { font-weight: 600; }
.nearby-results .nearby-icon { flex: none; }

/* category blocks: each lists ALL its matches (so e.g. every nearby supermarket shows) */
.nearby-list {
    display: grid; gap: .55rem; align-items: start;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
}
.nearby-cat {
    padding: .55rem .7rem; border: 1px solid var(--line);
    border-radius: var(--radius); background: var(--bg-elev);
}
.nearby-cat-head { display: flex; align-items: center; gap: .4rem; margin-bottom: .4rem; }
.nearby-icon { display: inline-flex; align-items: center; justify-content: center; flex: none; color: var(--accent); }
.nearby-icon svg { width: 1.1rem; height: 1.1rem; }
/* list rows are clickable → FlashAsync pulses the matching pin on the map */
.nearby-item { cursor: pointer; border-radius: var(--radius); transition: background .12s; }
.nearby-item:hover { background: var(--accent-soft); }
.nearby-items .nearby-item { padding: .14rem .3rem; margin: 0 -.3rem; }
.nearby-cat-label {
    font-size: .68rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
    color: var(--ink-soft);
}
.nearby-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .22rem; }
.nearby-items li { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
/* name + address stacked on the left; the distance stays on the right */
.nearby-item-main { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.nearby-addr {
    font-size: .72rem; color: var(--ink-mute);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nearby-name {
    font-size: .82rem; color: var(--ink); min-width: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nearby-dist {
    font-size: .78rem; font-weight: 700; color: #3f6f8f; flex: none;
    font-variant-numeric: tabular-nums;
}

/* ---------- delivery bar on project cards ---------- */
.project-card-delivery { display: flex; flex-direction: column; gap: .25rem; margin-top: .15rem; }
.delivery-bar { height: 4px; background: var(--line); border-radius: var(--radius-pill); overflow: hidden; }
.delivery-bar-fill { display: block; height: 100%; background: #3f6f8f; border-radius: var(--radius-pill); transition: width .3s ease; }
.delivery-bar-fill.full { background: var(--ok); }
.delivery-meta { font-size: .72rem; color: var(--ink-mute); }

/* ---------- admin catalog editor ---------- */
/* project-type tabs: one per type, only the active type's catalog is rendered below */
.catalog-tabs {
    display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1.5rem;
    border-bottom: 2px solid var(--line-strong); padding-bottom: .5rem;
}
.catalog-tab {
    display: inline-flex; align-items: center; gap: .45rem;
    padding: .5rem .85rem; border: 1px solid var(--line-strong); border-radius: var(--radius);
    background: var(--bg); color: var(--ink-soft); font-family: var(--font-sans);
    font-size: .92rem; font-weight: 600; cursor: pointer;
    transition: background .14s, color .14s, border-color .14s;
}
.catalog-tab:hover { background: var(--bg-elev); color: var(--ink); }
.catalog-tab.is-active {
    background: var(--accent); border-color: var(--accent); color: #fff;
}
.catalog-tab-badge {
    font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    padding: .08rem .34rem; border-radius: var(--radius-pill); line-height: 1.5;
}
.catalog-tab-badge.is-published { color: #2f7d4f; background: color-mix(in srgb, #2f7d4f 16%, transparent); }
.catalog-tab-badge.is-hidden { color: var(--ink-mute); background: color-mix(in srgb, var(--ink-mute) 16%, transparent); }
.catalog-tab.is-active .catalog-tab-badge { color: #fff; background: rgba(255, 255, 255, .22); }
/* Only one type shows at a time now, so drop the between-type divider/margin. */
.catalog-type-group {
    margin-bottom: 2.5rem; padding-top: 1rem;
}
.catalog-add-type { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-bottom: 2rem; }
.catalog-add-type .type-input { flex: 1; min-width: 14rem; }
.catalog-type-head { display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem; }
.catalog-type-head .catalog-actions { margin-left: auto; }
.catalog-type-title {
    font-family: var(--font-serif); font-size: 1.5rem; font-weight: 400; color: var(--ink);
}
.catalog-add-phase { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-bottom: 2rem; }
/* The name takes what the number, the colour and the button leave of the row (the two small boxes are sized
   below); on a phone the button drops under the row rather than squeezing the name. */
.catalog-add-phase .type-input { flex: 1 1 8rem; min-width: 0; }
@media (max-width: 560px) { .catalog-add-phase .btn { flex: 1 1 100%; } }
/* Color picker → compact rounded swatch instead of a stretched bordered input box. */
.catalog-color {
    flex: none; width: 2.4rem; height: 2.4rem; min-width: 2.4rem;
    padding: 2px; border: 1px solid var(--line-strong); border-radius: var(--radius);
    background: var(--bg-elev); cursor: pointer; overflow: hidden;
    -webkit-appearance: none; appearance: none;
}
.catalog-color:hover { border-color: var(--accent); }
.catalog-color::-webkit-color-swatch-wrapper { padding: 0; }
.catalog-color::-webkit-color-swatch { border: none; border-radius: calc(var(--radius) - var(--radius)); }
.catalog-color::-moz-color-swatch { border: none; border-radius: calc(var(--radius) - var(--radius)); }
.catalog-number { width: 3.5rem; min-width: 3.5rem; flex: none; text-align: center; }
/* A phase's number and colour: two small boxes of ONE size beside its name - in the »＋ Dodaj fazo« row and in a
   phase's edit row. Three classes on purpose: those rows' own `.type-input { flex: 1; min-width … }` (two classes,
   one of them later in the file) used to outrank the widths above, and the number and the swatch stretched as wide
   as the name (2026-10-06). */
.catalog-add-phase .type-input.catalog-number, .catalog-add-phase .type-input.catalog-color,
.catalog-phase-head .type-input.catalog-number, .catalog-phase-head .type-input.catalog-color {
    flex: none; width: 3.5rem; min-width: 3.5rem; height: 2.5rem;
}
.catalog-add-phase .type-input.catalog-number,
.catalog-phase-head .type-input.catalog-number { padding-left: .3rem; padding-right: .3rem; }
.catalog-phase {
    border: 1px solid var(--line); border-left: 4px solid var(--phase-color, var(--accent));
    border-radius: var(--radius); background: var(--bg-elev);
    padding: 1rem 1.25rem; margin-bottom: 1.25rem;
}
.catalog-phase-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
/* The fold: the whole title line is the button (twist, number, name, count), so a phase opens wherever
   it is clicked rather than only on a small arrow. */
.catalog-toggle {
    display: inline-flex; align-items: center; gap: .55rem; min-width: 0; min-height: 2.25rem;
    padding: .15rem .4rem .15rem 0; border: 0; background: none; cursor: pointer;
    color: inherit; font: inherit; text-align: left;
}
.catalog-toggle:hover .catalog-phase-title, .catalog-toggle:hover strong { color: var(--accent-ink); }
.catalog-twist {
    flex: none; width: 1.1rem; display: inline-flex; justify-content: center;
    font-size: 1.15rem; line-height: 1; color: var(--ink-mute); transition: transform .15s ease;
}
.catalog-toggle[aria-expanded="true"] .catalog-twist { transform: rotate(90deg); color: var(--ink); }
.catalog-fold-all { display: flex; gap: .4rem; margin: 0 0 .9rem; }
.catalog-phase-head .type-input { flex: 1; min-width: 8rem; }
.catalog-dot { width: .8rem; height: .8rem; border-radius: 50%; background: var(--phase-color, var(--accent)); flex: none; }
.catalog-phase-title { font-family: var(--font-sans); font-size: 1.15rem; }
.catalog-muted { color: var(--ink-mute); font-size: .78rem; }
.catalog-actions { display: flex; gap: .3rem; align-items: center; margin-left: auto; }
.catalog-intro { flex-basis: 100%; }
.catalog-section {
    margin: .9rem 0 .9rem 1rem; padding: .6rem .8rem;
    border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--bg);
}
.catalog-section-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .4rem; }
.catalog-section-head .type-input { flex: 1; min-width: 8rem; }
.catalog-tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.catalog-task {
    display: flex; align-items: center; gap: .55rem; flex-wrap: wrap;
    padding: .35rem .5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev);
}
.catalog-task .type-input { flex: 1; min-width: 10rem; }
.catalog-task-text { flex: 1; min-width: 8rem; }
/* A professional task's name is its accordion handle (the PRO editor opens under it). */
.catalog-task-toggle { flex: 1 1 auto; min-height: 1.9rem; }
.catalog-task-toggle .catalog-task-text { min-width: 0; }
.catalog-kind { flex: none; width: auto; min-width: 8rem; }
.catalog-kind-badge {
    flex: none; font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
    padding: .12rem .4rem; border-radius: var(--radius-pill); color: #fff; background: var(--ink-mute);
}
.catalog-kind-badge.kind-1 { background: #c6892b; }
.catalog-kind-badge.kind-2 { background: #b5483f; }
.catalog-days {
    flex: none; width: auto; max-width: 6rem; min-width: 4rem; font-variant-numeric: tabular-nums;
}
.catalog-info { flex-basis: 100%; width: 100%; resize: vertical; }
.catalog-days-badge {
    flex: none; font-size: .68rem; font-weight: 600; color: var(--ink-soft);
    padding: .12rem .45rem; border-radius: var(--radius-pill); border: 1px solid var(--line-strong);
    background: var(--bg); font-variant-numeric: tabular-nums; white-space: nowrap;
}
/* Deprecated (soft-deleted) catalog task: dimmed + a badge; kept for projects already using it. */
.catalog-task.is-deprecated { opacity: .6; }
.catalog-task.is-deprecated .catalog-task-text { text-decoration: line-through; }
.catalog-deprecated-badge {
    flex: none; font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
    padding: .12rem .45rem; border-radius: var(--radius-pill); color: #fff; background: var(--ink-mute);
}
/* Project-type publish state badge (admin catalog): published = live for users, hidden = staging. */
.catalog-pub-badge {
    flex: none; font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
    padding: .12rem .45rem; border-radius: var(--radius-pill); color: #fff;
}
.catalog-pub-badge.is-published { background: #5a8a3c; }
.catalog-pub-badge.is-hidden { background: var(--ink-mute); }
/* Inline warning shown in the task editor when users have already answered the selectors. */
.catalog-warn {
    font-size: .82rem; line-height: 1.4; color: var(--ink-soft);
    padding: .55rem .7rem; border: 1px solid #d8b24a; border-left-width: 3px;
    border-radius: var(--radius); background: #f2f2f2;
}

.catalog-add-task, .catalog-add-section { display: flex; gap: .5rem; margin-top: .6rem; }
.catalog-add-task .type-input, .catalog-add-section .type-input { flex: 1; }
.catalog-add-section { margin-top: .8rem; }

/* Improved (labelled) task editor */
.catalog-task-edit {
    flex-basis: 100%; width: 100%;
    display: flex; flex-direction: column; gap: .7rem;
    padding: .3rem .15rem;
}
.catalog-edit-title {
    font-family: var(--font-sans); font-weight: 600; font-size: 1rem; color: var(--ink);
}
.catalog-field { display: flex; flex-direction: column; gap: .25rem; }
.catalog-field-label {
    font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-mute);
}
.catalog-field .type-input { flex: none; width: 100%; min-width: 0; }
.catalog-field-row { display: flex; gap: .7rem; flex-wrap: wrap; }
.catalog-field-row .catalog-field { flex: 1; min-width: 11rem; }
.catalog-field-narrow { flex: 0 0 12rem; }
.catalog-check { display: inline-flex; align-items: center; gap: .45rem; font-size: .88rem; color: var(--ink-soft); }

/* ---------- Profesionalni katalog (admin) ----------
   The PRO badge is not decoration: the professional project type deliberately carries the SAME name as the
   ordinary one (no account is ever offered both), so this is the only thing telling an admin which tab
   they are editing. Everything else follows the flat admin style already used on this page - tokens only,
   so dark mode is inherited without touching the generated dark stylesheet. */
.catalog-tab-badge.is-pro,
.catalog-pub-badge.is-pro {
    color: var(--accent-ink);
    background: color-mix(in srgb, var(--accent) 18%, transparent);
    font-weight: 700;
    letter-spacing: .03em;
}
.catalog-tab.is-active .catalog-tab-badge.is-pro { color: #fff; background: rgba(255, 255, 255, .28); }

/* ---------- Lastni katalog gradbinca (2026-10-06) ----------
   Moj katalog, Katalog gradbišča and the dashboard's vrste gradnje reuse the admin editor above. Tokens only, so
   dark mode is inherited; cards take the app's corner (var(--radius)); everything wraps at 320 px. */
.catalog-tab-badge.is-kind { color: var(--ink-soft); background: color-mix(in srgb, var(--ink-mute) 14%, transparent); text-transform: none; }
.catalog-tab.is-active .catalog-tab-badge.is-kind { color: #fff; background: rgba(255, 255, 255, .22); }

/* Read-only (an upravitelj gradbišča on Moj katalog, a lapsed plan): the tree still folds open, nothing edits. */
.catalog-editor.is-readonly .catalog-actions,
.catalog-editor.is-readonly .catalog-add-task,
.catalog-editor.is-readonly .catalog-add-section,
.catalog-editor.is-readonly .catalog-add-cost,
.catalog-editor.is-readonly .catalog-add-phase,
.catalog-editor.is-readonly .catalog-pro button:not(.catalog-toggle),
.catalog-editor.is-readonly .catalog-pro form { display: none; }
.catalog-editor.is-readonly :is(input, select, textarea) { pointer-events: none; opacity: .8; }

.own-catalog-note {
    margin: 0 0 1rem; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--bg-elev); color: var(--ink-soft); font-size: .9rem;
}
.own-catalog-kind-desc { margin: -.8rem 0 1rem; }

.catalog-pull {
    margin: 0 0 1.25rem; padding: .75rem .9rem; border: 1px solid var(--line);
    border-left: 3px solid var(--accent); border-radius: var(--radius); background: var(--bg-elev);
}
.catalog-pull-head { display: flex; align-items: flex-start; gap: .6rem; flex-wrap: wrap; }
.catalog-pull-ico { color: var(--accent); margin-top: .1rem; }
.catalog-pull-text { display: flex; flex-direction: column; gap: .15rem; flex: 1 1 14rem; min-width: 0; }
.catalog-pull-list { list-style: none; margin: .75rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.catalog-pull-item { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem; padding: .35rem 0; border-top: 1px solid var(--line); }
.catalog-pull-item .catalog-check { display: flex; flex-wrap: wrap; gap: .4rem; align-items: baseline; min-width: 0; flex: 1 1 16rem; }
.catalog-pull-kind {
    font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    padding: .05rem .35rem; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--ink-mute) 14%, transparent);
}
.catalog-pull-item.is-added .catalog-pull-kind { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.catalog-pull-item.is-removed .catalog-pull-kind { color: var(--danger, #b3261e); background: color-mix(in srgb, var(--danger, #b3261e) 12%, transparent); }
.catalog-pull-row { color: var(--ink-mute); font-size: .85rem; }
.catalog-pull-label { overflow-wrap: anywhere; min-width: 0; }
.catalog-pull-conflict { font-size: .78rem; color: var(--accent-ink); }
.catalog-pull-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }

.catalog-kinds { margin: -.5rem 0 1.5rem; }
.catalog-kinds > summary { cursor: pointer; font-weight: 600; color: var(--ink-soft); }
.catalog-kinds-list { list-style: none; margin: .5rem 0 1rem; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.catalog-kinds-list li { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }

/* Vrsta gradnje on the new-gradbišče form: cards, the locked ones marked "kmalu". */
.build-kinds { border: 0; padding: 0; margin: 0; min-width: 0; }
.build-kinds > legend { font-size: .85rem; font-weight: 600; color: var(--ink-soft); margin-bottom: .35rem; padding: 0; }
.build-kind-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .5rem; }
.build-kind-card {
    display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; min-height: 44px;
    padding: .6rem .75rem; border: 1px solid var(--line-strong); border-radius: var(--radius);
    background: var(--bg); color: var(--ink); font: inherit; text-align: left; cursor: pointer;
}
.build-kind-card:hover:not(:disabled) { border-color: var(--accent); }
.build-kind-card.is-active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.build-kind-card.is-locked, .build-kind-card:disabled { cursor: not-allowed; opacity: .6; }
.build-kind-soon {
    font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-mute);
}
.build-kind-note { display: block; margin-top: .35rem; font-size: .82rem; }

/* The catalog tree on a phone (responsive-auditor 2026-10-06): phase > sklop > task nests three borders deep, and a
   grid item / flex child would not shrink below its content - the page scrolled sideways at 320 px. Every level may
   shrink, long task names wrap, and the nesting gives back its indents under 400 px. */
.catalog-tasks { grid-template-columns: minmax(0, 1fr); }
.catalog-task, .catalog-task-toggle { min-width: 0; }
.catalog-task-text { min-width: 0; overflow-wrap: anywhere; }
.catalog-editor .catalog-pro { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 400px) {
    .catalog-editor .catalog-phase { padding: .75rem .6rem; }
    .catalog-editor .catalog-section { margin-left: .25rem; padding: .5rem .45rem; }
    .catalog-editor .catalog-pro { padding: .6rem .55rem; }
    .build-kind-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Touch: the editor's small buttons and the pull list's ticks big enough for a finger. */
@media (pointer: coarse) {
    .catalog-pull .btn-sm, .catalog-editor .btn-sm, .catalog-editor .icon-btn, .own-catalog-kinds .catalog-tab {
        min-height: 40px; min-width: 40px;
    }
    .catalog-pull-item input[type=checkbox] { width: 20px; height: 20px; }
    .catalog-pull-item .catalog-check { min-height: 40px; align-items: center; }
}

.catalog-pro {
    margin: .6rem 0 .2rem;
    padding: .9rem 1rem;
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    background: var(--bg-elev);
    display: flex;
    flex-direction: column;
    gap: .75rem;
}
/* Where the card will open, while its first read is on the way - no frame, so nothing jumps. */
.catalog-pro-loading {
    display: flex; align-items: center; gap: .45rem; margin: .6rem 0 .2rem; padding: .5rem 1rem;
    font-size: .82rem; color: var(--ink-mute);
}
.catalog-pro-loading .btn-spinner { color: var(--accent); }
.catalog-pro-head { display: flex; align-items: baseline; gap: .6rem; }
.catalog-pro-title { font-weight: 600; }
.catalog-pro-sub { margin: .4rem 0 0; font-size: .95rem; font-weight: 600; }
.catalog-pro-flags { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }
.catalog-pro-actions { display: flex; align-items: center; gap: .7rem; }
.catalog-field-narrow { max-width: 8rem; }

.catalog-pro-steps { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: .4rem; }
.catalog-pro-step { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; }
.catalog-pro-step.is-deprecated { opacity: .55; text-decoration: line-through; }
.catalog-pro-step-head { display: flex; align-items: center; gap: .5rem; flex: 1; min-width: 14rem; }
.catalog-pro-step-text { flex: 1; }
.catalog-pro-step-kind {
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--ink-mute);
    white-space: nowrap;
}
.catalog-pro-step-actions { display: flex; align-items: center; gap: .35rem; }

.catalog-pro-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.catalog-pro-list li { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.catalog-pro-add { align-items: flex-end; }
.catalog-pro-hint { margin: 0; max-width: none; }
/* A catalog fact, in two rows like the gradbišče's entry form: kind + key, then the sentence - the one
   written thing here - with the width and two lines, beside the short value and unit. */
.catalog-pro-fact-add { display: flex; flex-direction: column; gap: .5rem; }
.catalog-pro-fact-row { display: flex; gap: .5rem; align-items: flex-start; flex-wrap: wrap; }
.catalog-pro-fact-row > .catalog-pro-fact-kind { flex: 0 0 9.5rem; width: auto; }
.catalog-pro-fact-row > .catalog-pro-fact-key { flex: 0 1 18rem; width: auto; min-width: 0; }
.catalog-pro-fact-row > .catalog-pro-fact-text { flex: 1 1 24rem; min-width: 0; }
.catalog-pro-fact-row > .catalog-pro-fact-short { flex: 0 0 8rem; width: auto; min-width: 0; }
/* A dependency: the tree picker takes the row, the lag and the switch sit after it. */
.catalog-pro-dep-add { display: flex; gap: .6rem; align-items: flex-end; flex-wrap: wrap; }
.catalog-pro-dep-pick { flex: 1 1 26rem; min-width: 0; display: flex; flex-direction: column; gap: .25rem; }
.catalog-pro-dep-lag { flex: 0 0 8rem; }

/* A caption with no uploaded file - how a missing reference photo stays visible instead of forgotten. */
.catalog-warn-inline { color: var(--accent-ink); font-size: .82rem; white-space: nowrap; }

@media (max-width: 760px) {
    .catalog-pro-step { flex-direction: column; align-items: flex-start; }
}

/* ---------- Profesionalni panel na nalogi ----------
   Phone first (načelo 11): gradbinci are on site all day with one hand free and gloves on. So the tap
   targets are 44px, the tabs SCROLL sideways instead of wrapping into a grid that pushes content off
   screen, and the step list is one column at every width. The desktop view is the same markup with more
   room - there is no separate layout to keep in sync. Tokens only, so dark mode is inherited. */
.pro-panel {
    margin-top: .75rem;
    padding-top: .75rem;
    border-top: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: .7rem;
    /* May be narrower than its tab strip: the strip scrolls sideways inside it, the panel does not grow. */
    min-width: 0;
}

.pro-tabs {
    display: flex;
    gap: .3rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: .2rem;
}
.pro-tabs::-webkit-scrollbar { display: none; }
/* Pills, like the task filters (.task-filter) the same reader uses one screen up: same radius, weight
   and accent fill for the active one. The height stays a phone target - this panel is filled in on
   site - so it is a taller pill rather than a smaller one. */
.pro-tab {
    flex: 0 0 auto;
    min-height: 2.4rem;
    padding: .4rem .9rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-pill);
    background: var(--bg);
    color: var(--ink-soft);
    font-family: var(--font-sans);
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, border-color .15s, color .15s;
}
.pro-tab:hover { border-color: var(--accent); }
.pro-tab.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
/* The count is a badge beside the word, not a digit glued to it ("Čaka na1" read as one word). */
.pro-tab-count {
    display: inline-block; min-width: 1.25rem; margin-left: .4rem; padding: .05rem .35rem;
    border-radius: var(--radius-pill); background: var(--line); color: var(--ink-soft);
    font-size: .7rem; font-weight: 700; line-height: 1.3; text-align: center; font-variant-numeric: tabular-nums;
}
.pro-tab.is-active .pro-tab-count { background: rgba(255, 255, 255, .25); color: #fff; }

/* The step list folds. Its head is a plain row, not a card: the panel it sits in is already a card, and
   a second frame around sixteen steps would read as a dialog inside a dialog. */
.pro-steps-toggle {
    display: flex; align-items: center; gap: .5rem; width: 100%;
    appearance: none; background: none; border: none; cursor: pointer;
    padding: .35rem 0 .5rem; font: inherit; color: var(--ink); text-align: left;
}
.pro-steps-title { font-weight: 600; }
.pro-steps-caret { display: inline-flex; color: var(--ink-mute); transition: transform .15s; }
.pro-steps-toggle.is-open .pro-steps-caret { transform: rotate(90deg); }

.pro-steps { display: flex; flex-direction: column; gap: .5rem; }
.pro-step {
    display: flex;
    gap: .6rem;
    padding: .55rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-elev);
}
.pro-step.is-done { opacity: .62; }
/* A control point is the one thing that can stop the work, so it is marked in the list, not only inside. */
.pro-step.is-holdpoint { border-left: 3px solid var(--accent); }

/* 44px: the smallest target a gloved thumb hits reliably. The BUTTON keeps that size; what shrank is
   the circle drawn inside it - the task row's tick (.item-check) one size down, same shape, same green,
   so a step reads as a smaller sibling of the task rather than as a different control. */
.pro-step-check {
    flex: 0 0 auto; width: 44px; height: 44px;
    padding: 0; border: none; background: none; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
}
.pro-step-check-mark {
    width: 1.15rem; height: 1.15rem; flex: none;
    border: 2px solid var(--line-strong); border-radius: 50%; background: var(--bg);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .7rem; line-height: 1; color: transparent;
    transition: background .15s, border-color .15s, color .15s;
}
.pro-step-check:hover:not(:disabled) .pro-step-check-mark { border-color: var(--accent); }
.pro-step.is-done .pro-step-check-mark { background: #3d6b4a; border-color: #3d6b4a; color: #fff; }

.pro-step-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .3rem; }
.pro-step-line { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.pro-step-kind {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--ink-mute);
}
.pro-step-text { line-height: 1.35; overflow-wrap: anywhere; }
/* A step that has a picture, a plan or a note under it opens like the task above it does: the text IS
   the handle, with the chevron in front of it. No box - it is the step's own text, not a control added
   next to it. */
.pro-step-open {
    display: flex; align-items: flex-start; gap: .4rem; width: 100%; text-align: left;
    appearance: none; border: none; background: none; padding: 0; margin: 0;
    font: inherit; color: inherit; cursor: pointer;
}
.pro-step-open .pro-step-text { flex: 1; min-width: 0; }
.pro-step-caret { flex: none; display: inline-flex; margin-top: .15rem; color: var(--ink-mute); transition: transform .15s; }
.pro-step-open.is-open .pro-step-caret { transform: rotate(90deg); }
.pro-step-open:hover .pro-step-caret { color: var(--ink); }
/* What is folded away, said in marks: a picture, a pinned document, a note. */
.pro-step-marks { flex: none; display: inline-flex; align-items: center; gap: .25rem; color: var(--ink-mute); }
.pro-step-comment {
    padding: .35rem .5rem;
    border-left: 2px solid var(--line-strong);
    color: var(--ink-soft);
    font-size: .88rem;
}
.pro-step-commentbox { display: flex; flex-direction: column; gap: .4rem; }
.pro-step-commentactions { display: flex; gap: .4rem; }
.pro-step-image {
    max-width: 100%;
    border-radius: var(--radius);
    border: 1px solid var(--line);
}
.pro-step-tools { display: flex; flex-direction: column; gap: .25rem; }

/* Dejstva are REFERENCE, not instructions: a wall of catalog rules read at body size dwarfs the steps
   they belong to. Set one notch down, the way a footnote is - the § still marks a rule at a glance. */
.pro-facts-list .pro-row-main { font-size: .85rem; line-height: 1.45; }
.pro-facts-list .pro-row-icon { font-size: .9rem; opacity: .7; }
.pro-facts-list .pro-muted { font-size: .8rem; }
.pro-facts-list .pro-row-icon { line-height: 1.45; }
/* A rule is a fact that binds - said in a word, since every line now carries the same bullet. */
.pro-fact-tag {
    margin-left: .4rem; font-size: .64rem; font-weight: 700; letter-spacing: .06em;
    text-transform: uppercase; color: var(--accent-ink); background: var(--accent-soft);
    border-radius: var(--radius-pill); padding: .05rem .4rem; white-space: nowrap;
}
.pro-facts-hint { margin-top: .5rem; }

/* "Čaka na": search, then pick. The hits are rows rather than a native <select> so each can carry the
   phase it belongs to - two tasks in a catalog of two hundred often read alike. */
.pro-dep-add .type-input { flex: 1 1 auto; }
/* The hits are the navbar search's rows (.journal-search-result), in a panel that sits in the flow
   rather than floating: inside a modal a fixed dropdown would escape the card. */
.pro-dep-hits {
    display: flex; flex-direction: column; gap: .1rem; margin-top: .35rem;
    max-height: 16rem; overflow-y: auto;
    background: var(--bg-elev); border: 1px solid var(--line-strong); border-radius: var(--radius);
    padding: .35rem;
}
/* The step's ⋯: the same pop-over the plan's menu uses, pulled left so it stays inside the card of a
   narrow notebook page, and its trigger sized like the icon buttons it replaced. */
.step-menu-btn { font-size: 1rem; line-height: 1; }
.step-menu-pop { right: 0; left: auto; min-width: 15rem; }
/* A menu row that IS the file input's label. */
.step-menu-file { cursor: pointer; }
/* A pinned document that is not a picture: one tappable line with its name. */
.pro-step-file {
    align-self: flex-start; display: inline-flex; align-items: center; gap: .4rem;
    appearance: none; cursor: pointer; text-align: left;
    background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--radius);
    padding: .35rem .6rem; font: inherit; font-size: .82rem; color: var(--ink-soft);
    max-width: 100%; overflow-wrap: anywhere;
}
.pro-step-file:hover { border-color: var(--accent); color: var(--ink); }

.pro-badge {
    font-size: .7rem;
    padding: .1rem .35rem;
    border-radius: var(--radius);
    text-transform: uppercase;
    letter-spacing: .04em;
}
.pro-badge.is-stop { color: var(--accent-ink); background: var(--accent-soft); font-weight: 700; }

.pro-list { display: flex; flex-direction: column; gap: .45rem; }
.pro-row {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    padding: .45rem .1rem;
    border-bottom: 1px solid var(--line);
}
.pro-row:last-child { border-bottom: none; }
.pro-row.is-ok .pro-row-icon { color: var(--ok); }
.pro-row.is-inherited { opacity: .68; }
.pro-row-icon { flex: 0 0 1.4rem; text-align: center; }
.pro-row-main { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.pro-row-tools { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }

/* A pripeta oseba or podjetje. It is a THING the builder put there - it can be removed, it can carry a
   warning - so it is a solid token on the paper, not a hairline outline: it used to be .78rem text in a
   var(--line) ring on a var(--bg) card, which on paper is very nearly nothing at all. */
.pro-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .1rem 0 .15rem; }
.pro-chip {
    display: inline-flex; align-items: center; gap: .35rem;
    font-size: .82rem; font-weight: 600; line-height: 1.25;
    min-height: 1.95rem; padding: .25rem .65rem;
    color: var(--ink); background: var(--bg-elev);
    border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
}
/* Room for the × without making a chip that has none look lopsided. */
.pro-chip:has(.pro-chip-x) { padding-right: .25rem; }
.pro-chip-ico { flex: none; display: inline-flex; color: var(--ink-mute); }

.pro-field { display: flex; flex-direction: column; gap: .4rem; }
.pro-field-label { font-size: .8rem; color: var(--ink-mute); }
.pro-muted { color: var(--ink-mute); font-size: .85rem; margin: 0; }
/* An order whose deadline has passed - the single most expensive thing to miss on a site. */
.pro-late { color: var(--accent-ink); font-weight: 600; }
/* An order mail that never reached the supplier: said on the row itself, with its one answer. */
.pro-mail-failed {
    display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; margin-top: .4rem;
    padding: .45rem .6rem; border-radius: var(--radius); box-shadow: inset 3px 0 0 var(--accent-ink);
    background: var(--surface-2, rgba(0,0,0,.03)); color: var(--accent-ink); font-size: .85rem; font-weight: 600;
}
.pro-mail-failed > span { flex: 1 1 12rem; min-width: 0; overflow-wrap: anywhere; }

/* Dostava/prevzem on a material row: two small pickers under the line they describe. */
.pro-delivery { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; margin-top: .4rem; }
.pro-delivery .type-input { width: auto; min-width: 8rem; }
/* Najava podizvajalca (2026-09-29): one line per company under "Kdo izvaja" - state and deadline, then the two
   answers (povpraševanje, potrjeno). Red when late or when a confirmed date has moved, calm when confirmed. */
.pro-booking { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem .75rem;
    margin: .4rem 0 0; padding: .45rem .6rem; border-radius: var(--radius); background: var(--surface-2, rgba(0,0,0,.03)); font-size: .9rem; }
.pro-booking.is-late { box-shadow: inset 3px 0 0 var(--accent-ink); }
.pro-booking.is-ok { box-shadow: inset 3px 0 0 #2e7d32; }
.pro-booking-tools { display: inline-flex; gap: .35rem; flex-wrap: wrap; }
/* A row the podizvajalec brings: part of the popis, not of anybody's order list. */
.pro-row.is-executor { opacity: .75; }
.pro-exec-material { margin-bottom: .5rem; }

.pro-add { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.pro-add .type-input { flex: 1; min-width: 8rem; }
.pro-narrow { max-width: 7rem; }
.pro-suggested { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; padding-top: .3rem; }

/* Collapsed-row markers: what is in the way, readable without opening anything. */

@media (max-width: 760px) {
    .pro-step-tools { flex-direction: row; }
    .pro-add .type-input { min-width: 100%; }
}

/* The block's own head: title left, ⋯ right. */
.pro-card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
/* One label and one SMALL picker on a line - "Namen gradnje" is three words, and a select stretched
   across the whole cover looked like a form nobody asked for. */
.pro-field-inline { flex-direction: row; align-items: center; flex-wrap: wrap; gap: .6rem; }
.pro-select-sm { width: auto; min-width: 10rem; max-width: 14rem; }

/* On the notebook COVER the paper is dark, so this block's ink is light - it lives directly on that
   photograph now (no card behind it), and black text on it was unreadable. */
.book-cover-inner .pro-card { border-top-color: rgba(237, 237, 237, .25); }
.book-cover-inner .pro-card-title { color: #fff; }
.book-cover-inner .pro-card .pro-field-label { color: rgba(237, 237, 237, .8); }
.book-cover-inner .pro-card .pro-muted { color: rgba(237, 237, 237, .75); }
.book-cover-inner .pro-card .task-menu-btn { color: rgba(237, 237, 237, .9); border-color: rgba(237, 237, 237, .35); background: rgba(0, 0, 0, .25); }
.book-cover-inner .pro-card .task-menu-btn:hover { background: rgba(0, 0, 0, .4); color: #fff; }

/* "Uredi gradbišče" on the cover: one row - the button and, beside it, what it opens. The cover is a
   photograph, so the button takes the same light-on-dark treatment as the menu button above. */
.pro-card-edit-btn { display: inline-flex; align-items: center; gap: .4rem; }
/* Top-right corner of the cover: high enough to clear the parcel polaroid that hangs just below it, and
   out of the way of the title on the left. Absolute rather than a flex child, because the head row
   belongs to the name and the photo - an action in that row pushed one of them around.

   INSIDE the stitched frame, not across it. The chip used to sit at .6rem/.9rem while
   .book-cover-inner::after draws its dashed border at inset 1rem, so the button straddled the stitching
   - the one line on the cover whose whole job is to look unbroken. These offsets clear the 1rem inset
   plus the 2px dash and leave a little air inside it. */
.book-cover-inner .book-cover-edit {
    position: absolute; top: 1.45rem; right: 1.45rem; z-index: 3;
}
/* The ⋯ itself. The cover is a coloured photograph, so the button is a dark translucent chip rather
   than the app's usual light one - plain ink on leather is unreadable. */
.book-cover-inner .book-cover-edit .task-menu-btn {
    width: 1.9rem; height: 1.9rem;
    color: rgba(237, 237, 237, .95); border-color: rgba(237, 237, 237, .4);
    background: rgba(0, 0, 0, .38); backdrop-filter: blur(2px);
}
.book-cover-inner .book-cover-edit .task-menu-btn:hover { background: rgba(0, 0, 0, .58); color: #fff; }
/* The popup is a normal light menu again - it hangs off the cover, it is not part of it. */
.book-cover-inner .book-cover-edit .schedule-menu-pop { color: var(--ink); }
@media (max-width: 760px) {
    /* The phone cover draws the same frame at inset .7rem - keep the chip inside that one. */
    .book-cover-inner .book-cover-edit { top: 1.1rem; right: 1.1rem; }
}

/* Project-level professional settings on the site cover. NOT a card: it sits ON the notebook page, and a
   filled, shadowed box there reads as a foreign block dropped onto the paper. So it is transparent, with
   one hairline above it to say a new section starts - the same way the page separates its own parts. */
.pro-card {
    margin-top: 1.75rem;
    padding: 1.25rem 0 0;
    border: none;
    border-top: 1px solid var(--line);
    border-radius: 0;
    background: none;
    box-shadow: none;
}
.pro-card-block { display: flex; flex-direction: column; gap: .7rem; }
.pro-card-title { margin: 0; font-size: 1rem; }
.pro-confirm {
    padding: .6rem .7rem;
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    background: var(--accent-soft);
    color: var(--accent-ink);
}
.pro-confirm p { margin: 0 0 .5rem; }
.pro-confirm-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ---------- Planer ----------
   Ordered by what costs money to miss: warnings, then orders, then the work itself. On a phone this is a
   single column of cards a thumb scrolls through, which is how it is actually read - standing on site,
   before the crew arrives. */
/* In the header's right-hand column: the two buttons on one line, the "who arranged this plan" note
   under them, both hugging the right edge. */
.phase-header .planner-actions {
    display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; text-align: right;
}
.planner-actions-row { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }

/* The order dialog: the message is meant to be read and edited before it is copied, so it gets a
   monospaced-ish block rather than a one-line input's cramped body. */
/* The two questions of Odgovornost. Headings, not shouts: they separate two groups inside a panel that
   is itself inside a modal, so they are set at the field-label's weight with air above rather than as
   another level of title. */
.pro-resp { display: flex; flex-direction: column; }
/* The fields inside a block used to butt straight into each other: a .pro-field's own .4rem was all
   that stood between "Podjetje" and "Ljudje", so the chips of one read as part of the next. */
.pro-resp-block { display: flex; flex-direction: column; gap: 1.15rem; }
.pro-resp-block .pro-filters { margin: 0; }
.pro-resp-block + .pro-resp-block { margin-top: 1.75rem; }
/* No margin of its own: the block's own 1.15rem gap already puts air under the heading, and the two
   together left the title floating half a line above its first field. */
.pro-resp-title {
    margin: 0; font-family: var(--font-sans);
    font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    color: var(--ink-mute);
}
.pro-resp-details { margin-top: 1rem; }
.pro-resp-details > summary { cursor: pointer; font-size: .88rem; font-weight: 600; }
/* Inside the fold - the sentence, the vpleteni themselves, and the row that adds one - everything sat
   flush against everything else, while the fields above it breathe. Same rhythm here.
   (Margins, not a flex column: `display:flex` on <details> breaks the closed state in some browsers.) */
.pro-resp-details > * + * { margin-top: 1.1rem; }

.order-mail { width: 100%; line-height: 1.5; font-size: .88rem; resize: vertical; }
/* The tick that puts a deadline into the combined order. A 44 px target around a 16 px box: this is
   used on site, with one hand. */
.order-pick {
    flex: none; display: inline-flex; align-items: center; justify-content: center;
    width: 2.2rem; height: 2.2rem; margin: -.35rem 0 -.35rem -.35rem; cursor: pointer;
}
.order-pick input { width: 1.05rem; height: 1.05rem; accent-color: var(--accent); cursor: pointer; }
.planner-order-bar { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .6rem; }
/* A plan row that opens what it names. The row is the target, so it carries no underline of its own -
   the same rule the board's rows follow - and answers with colour. */
.planner-link { color: inherit; border-bottom: none; }
.planner-link:hover { border-bottom-color: transparent; background: var(--bg-sunk, rgba(0,0,0,.03)); }
.planner-link:hover strong { color: var(--accent-ink, var(--accent)); }
/* Why a task is blocked: one fact per line, and NOT capped at the prose measure - these are a list of
   short statements, not a paragraph. */
.planner-why {
    list-style: none; margin: .15rem 0 0; padding: 0; max-width: none;
    display: flex; flex-direction: column; gap: .1rem;
    font-size: .85rem; color: var(--ink-mute);
}
.planner-why li { padding-left: .8rem; position: relative; }
.planner-why li::before { content: "·"; position: absolute; left: .15rem; }
.planner-blocked-name { color: inherit; }
.planner-why-link { color: var(--accent); font-weight: 600; }
.planner-order-bar .task-filter:disabled { opacity: .45; cursor: default; }
/* The lines of a combined order, above the message that will carry them. */
.order-lines { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-direction: column; gap: .2rem; }
.order-lines li { font-size: .9rem; }
/* One line of the order with its quantity typed beside it. */
.order-line { display: flex; align-items: center; gap: .4rem .7rem; flex-wrap: wrap; padding: .3rem 0; border-bottom: 1px solid var(--line); }
.order-line-main { flex: 1 1 14rem; min-width: 0; }
.order-line > .order-qty { flex: 0 0 11rem; width: auto; }
@media (max-width: 520px) { .order-line > .order-qty { flex: 1 1 100%; } }
.order-supplier-line { margin: -.35rem 0 .75rem; }
/* The note under the buttons - it explains what the primary action does, so it needs to sit clear of it. */
.order-foot { margin-top: .85rem; }

/* ── Naročila: prejemniki, pošiljanje, zadolženi, datum dobave (2026-10-02) ── */
/* Komu gre naročilo: the supplier's addresses as ticks. One per line - an address is long, and two on a
   line on a 390 px phone is one that wraps under its own checkbox. */
.order-recipients { border: 0; margin: 0 0 .85rem; padding: 0; min-width: 0; }
.order-recipients legend { padding: 0; margin: 0 0 .3rem; }
.order-recipient {
    display: flex; align-items: center; gap: .55rem; min-height: 44px; padding: .1rem 0;
    cursor: pointer; font-size: .92rem;
}
.order-recipient input { flex: none; width: 1.15rem; height: 1.15rem; accent-color: var(--accent); cursor: pointer; }
.order-recipient span { min-width: 0; overflow-wrap: anywhere; }
.order-recipients .order-supplier-line { margin: .25rem 0 0; }
.order-actions .order-send { display: inline-flex; align-items: center; gap: .4rem; }
@media (max-width: 520px) {
    /* The primary action is a full-width thumb target; the reserves share the rows under it. */
    .order-actions .order-send { flex: 1 0 100%; justify-content: center; }
}
/* Zadolženi on a planner row: quiet when somebody is, a nudge when nobody is. */
.order-assignee { display: flex; align-items: flex-start; gap: .3rem; font-size: .82rem; color: var(--ink-soft); }
.order-assignee .icon { flex: none; margin-top: .15rem; }
.order-assignee.is-none { color: var(--ink-mute); font-style: italic; }
/* The small "datum dobave + zadolženi" card opened from a row. */
.order-edit-card { width: min(34rem, calc(100vw - 2rem)); }
/* A material's name can be a sentence: in the head of the two order dialogs it takes two lines, not six of
   a phone's screen - the head does not scroll, the body under it has to stay reachable. */
.order-card .task-modal-titles h2, .order-edit-card .task-modal-titles h2 {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
/* A dialog opened on a notebook page lies above the bookmark rail beside the sheet: the rail (z-index 2) was
   painted over the right edge of the dialog at tablet width, over the fields that sit there. */
.journal-page:has(.task-modal) { z-index: 3; }
/* The row an e-mail's link points at (…?narocilo=): marked until the page is left. A ring that follows the
   row's own corners, whatever they are. */
.pro-row.is-target, .mywork-order.is-target { box-shadow: 0 0 0 2px var(--accent); }
/* Datum dobave and zadolženi on a material row of the task panel. */
.pro-delivery-date, .pro-assignee {
    display: inline-flex; align-items: center; gap: .4rem; font-size: .82rem; color: var(--ink-mute);
}
/* flex, not inline-flex: the select is as wide as its longest name, and max-width: 100% only holds
   against a parent with a width of its own - on 320 px it ran 17 px off the screen. */
.pro-assignee { display: flex; margin-top: .4rem; flex-wrap: wrap; }
.pro-assignee > span, .pro-delivery-date > span { white-space: nowrap; }
.pro-assignee .type-input, .pro-delivery-date .type-input { width: auto; min-width: 9rem; max-width: 100%; }
.pro-assignee .type-input { flex: 0 1 auto; min-width: 0; }
/* On a phone the row's buttons go UNDER the name once they would leave it less than 9rem: beside it
   they left the name 11 px on a 320 px screen, one letter per line. A single small button still fits
   beside the name and stays there. */
@media (max-width: 520px) {
    .pro-row { flex-wrap: wrap; row-gap: .3rem; }
    .pro-row-main { flex: 1 1 9rem; }
}
.pro-delivery-date.is-late .type-input { border-color: #b03c30; }
/* A company's e-mail addresses in the imenik editor: one row each, the remove button a real target. */
.contractor-emails { display: flex; flex-direction: column; gap: .4rem; }
.contractor-email-row { display: flex; align-items: center; gap: .1rem .4rem; flex-wrap: wrap; }
.contractor-email-row .type-input { flex: 1 1 0; min-width: 0; }
.contractor-email-row .icon-btn { flex: none; min-width: 44px; min-height: 44px; }
/* "glavni" under the field, on a line of its own: beside it, it took a third of a 320 px row and the
   address itself was cut off. */
.contractor-email-tag {
    order: 3; flex: 1 0 100%; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-mute);
}
.contractor-email-add { align-self: flex-start; }
/* "Najprej pritisni Prihod" above the tasks of a delavec who is not clocked in. */
.mywork-arrive-first {
    display: flex; align-items: flex-start; gap: .5rem; margin: 0 0 .9rem; padding: .6rem .75rem;
    border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius);
    background: var(--bg-sunk, rgba(0,0,0,.03)); font-size: .9rem;
}
.mywork-arrive-first .icon { flex: none; margin-top: .15rem; color: var(--accent); }
/* Moja naročila on the crew's phone. */
.mywork-orders { margin: 0 0 1.25rem; }
.mywork-order.is-late { border-color: #b03c30; }

.planner-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .6rem;
    margin: .8rem 0;
}
.planner-summary {
    /* Air above it: the AI's paragraph follows the horizon pills, and butted against them it read as
       part of the control rather than as the answer to it. */
    margin-top: 1.25rem;
    padding: .7rem .85rem;
    border-left: 3px solid var(--accent);
    background: var(--bg-elev);
    border-radius: var(--radius);
    line-height: 1.45;
}
.planner-block { margin-top: 1.2rem; }
.planner-title { font-size: 1rem; margin: 0 0 .5rem; }
.planner-day { margin-bottom: .8rem; }
.planner-day-head {
    font-weight: 600;
    font-size: .9rem;
    padding-bottom: .25rem;
    border-bottom: 1px solid var(--line);
    margin-bottom: .35rem;
}
/* A passed ordering deadline is the most expensive thing on the page, so it is the loudest. */
.planner-warn-kriticno { color: var(--accent-ink); font-weight: 600; }
.planner-warn-kriticno .pro-row-icon { color: var(--accent); }
.planner-warn-opozorilo .pro-row-icon { color: var(--accent-ink); }
.planner-warn-info { color: var(--ink-soft); }

@media (max-width: 760px) {
    .planner-actions .btn { flex: 1 1 auto; min-height: 44px; }
}
.catalog-check input { accent-color: var(--accent); }
.catalog-edit-actions { display: flex; gap: .5rem; margin-top: .2rem; }

/* AI "generate description" helper on the task-edit form */
.catalog-field-label-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.catalog-ai-actions { display: inline-flex; align-items: center; gap: .35rem; }
.catalog-ai-actions .btn { text-transform: none; letter-spacing: 0; }
.catalog-ai-btn { color: var(--accent-ink); border: 1px solid var(--accent-soft); background: var(--accent-soft); }
.catalog-ai-btn:hover:not(:disabled) { border-color: var(--accent); }
.catalog-ai-btn:disabled { opacity: .5; cursor: default; }

/* ---------- admin dashboard + users ---------- */
.admin-back { display: inline-flex; align-items: center; gap: .25rem; margin-bottom: 1rem; }
.admin-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1rem; }
.admin-card {
    display: flex; align-items: center; gap: .9rem; text-decoration: none;
    padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--bg-elev); color: var(--ink);
    transition: border-color .15s, box-shadow .15s;
}
.admin-card:hover { border-color: var(--line-strong); box-shadow: 0 8px 24px rgba(26, 26, 26,.08); }
.admin-card-ico {
    flex: none; width: 2.6rem; height: 2.6rem; border-radius: var(--radius);
    background: var(--accent-soft); display: inline-flex; align-items: center; justify-content: center; font-size: 1.4rem;
}
.admin-card-body { display: flex; flex-direction: column; gap: .15rem; flex: 1; min-width: 0; }
.admin-card-title { font-family: var(--font-sans); font-weight: 600; font-size: 1.15rem; }
.admin-card-desc { font-size: .85rem; color: var(--ink-soft); }
.admin-card-arrow { flex: none; color: var(--ink-mute); font-size: 1.1rem; }

.admin-users-table td, .admin-users-table th { vertical-align: middle; }
.admin-users-action { text-align: right; white-space: nowrap; }
.admin-users-action .btn + .btn { margin-left: .4rem; }
.admin-users-table .is-disabled-row td { opacity: .6; }
.admin-delete-warn {
    color: #7a2020; background: #f8e8e8; border: 1px solid #d9b5b5;
    border-radius: var(--radius); padding: .6rem .75rem;
}
.project-modal-confirm .login-input { width: 100%; margin: .25rem 0 .25rem; }

/* manual plan grant (Paket) - label left, select right */
.admin-plan-row { display: flex; align-items: center; gap: .75rem; margin: .5rem 0; }
.admin-plan-row > span { flex: none; min-width: 5.5rem; color: var(--ink-soft); font-size: .9rem; }
.admin-plan-row .search-select { flex: 1 1 auto; }
.admin-plan-row .type-input { flex: 1 1 auto; min-width: 0; }
/* Admin → Uporabniki: "Povabi Pro skrbnika" block above the user list. */
.admin-pro-invites { margin: 0 0 1.75rem; }
.admin-pro-invites-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.admin-pro-invites-head h2 { font-size: 1.05rem; margin: 0; }

/* ── admin analytics ── */
.analytics-toolbar { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
/* Same skin as .type-input everywhere else in the app - this used to be pure layout, so the field
   rendered with the browser's default chrome (grey inset box, system font) next to properly styled
   inputs on the same page. Shared with the admin analytics table. */
.analytics-search {
    max-width: 22rem; flex: 1 1 16rem;
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    background: var(--bg-elev); padding: .45rem .65rem;
    font-family: var(--font-sans); font-size: .92rem; color: var(--ink);
}
.analytics-search:focus { outline: none; border-color: var(--accent); }
.analytics-search::placeholder { color: var(--ink-mute); }
.analytics-meta { color: var(--ink-mute); font-size: .85rem; white-space: nowrap; }
.admin-analytics-table th.analytics-th { cursor: pointer; user-select: none; white-space: nowrap; }
.admin-analytics-table th.analytics-th:hover { color: var(--ink); }
.admin-analytics-table th.analytics-th.is-sorted { color: var(--accent); }
.admin-analytics-table td, .admin-analytics-table th { vertical-align: middle; }
.admin-analytics-table .is-disabled-row td { opacity: .55; }
.analytics-email { display: block; font-weight: 500; color: var(--ink); }
.analytics-name { display: block; font-size: .78rem; color: var(--ink-mute); margin-top: .1rem; }
.user-status {
    display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    padding: .15rem .55rem; border-radius: var(--radius-pill);
}
.user-status.is-active { background: var(--ok-soft); color: var(--ok); }
.user-status.is-disabled { background: #f3d9d4; color: #9a3a2c; }

/* package (Osnovni / Napredni / Profesionalni) + 14-day trial badge in the Uporabniki table */
.analytics-package {
    display: inline-block; font-size: .78rem; font-weight: 600; white-space: nowrap;
    padding: .12rem .55rem; border-radius: var(--radius-pill);
    background: var(--paper, #ededed); color: var(--ink); border: 1px solid var(--line);
}
.analytics-package.tier-2 { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; } /* Napredni */
.analytics-package.tier-3 { background: #d6d6d6; color: #7a5a12; border-color: transparent; } /* Profesionalni */
.analytics-trial-badge {
    display: inline-block; margin-left: .35rem; font-size: .68rem; font-weight: 700; white-space: nowrap;
    text-transform: uppercase; letter-spacing: .03em;
    padding: .1rem .45rem; border-radius: var(--radius-pill);
    background: var(--ok-soft); color: var(--ok);
}
.admin-analytics-table th.analytics-th-action { text-align: right; white-space: nowrap; cursor: default; }

/* ── Uporabniki: feature-adoption strip ── */
.adoption-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
    gap: .6rem; margin-bottom: 1.15rem;
}
.adoption-card {
    background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
    padding: .6rem .7rem; display: flex; flex-direction: column; gap: .35rem;
}
.adoption-head { display: flex; align-items: center; gap: .4rem; }
.adoption-icon { flex: none; color: var(--accent); }
.adoption-label { font-size: .8rem; font-weight: 600; color: var(--ink-soft); }
.adoption-count { font-family: var(--font-sans); font-size: 1.4rem; font-weight: 600; color: var(--ink); line-height: 1; }
.adoption-total { font-family: var(--font-sans); font-size: .8rem; font-weight: 400; color: var(--ink-mute); }
.adoption-bar { height: 5px; border-radius: var(--radius-pill); background: var(--line); overflow: hidden; }
.adoption-fill { height: 100%; background: var(--accent); border-radius: var(--radius-pill); min-width: 2px; }

/* ── Uporabniki: per-user detail expander ── */
.analytics-th-expand, .admin-analytics-table td.analytics-expand-cell { width: 2rem; text-align: center; padding-left: .3rem; padding-right: .1rem; }
.analytics-expand-btn {
    appearance: none; background: none; border: none; cursor: pointer; padding: .1rem .3rem;
    font-size: .95rem; line-height: 1; color: var(--ink-mute);
    transition: transform .12s ease, color .12s ease;
}
.analytics-expand-btn:hover { color: var(--accent); }
.analytics-expand-btn.is-open { transform: rotate(90deg); color: var(--accent); }
.admin-analytics-table tr.analytics-row.is-open > td { background: var(--accent-soft); }
.analytics-detail-row > td { background: var(--bg); padding: 0 .5rem; }
.analytics-detail {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    gap: .5rem 1.6rem; padding: .85rem .3rem 1rem;
}
.analytics-detail-group h4 {
    margin: 0 0 .4rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em;
    color: var(--accent-ink); font-weight: 700;
}
.analytics-detail-hint { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--ink-mute); font-size: .68rem; }
.analytics-stat-list { margin: 0; display: flex; flex-direction: column; gap: .2rem; }
.analytics-stat { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font-size: .82rem; }
.analytics-stat dt { color: var(--ink-soft); margin: 0; }
.analytics-stat dd { margin: 0; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.analytics-stat.is-zero { opacity: .4; }
.analytics-stat.is-zero dd { font-weight: 400; }

/* ── admin analytics: tabs ── */
.analytics-tabs { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: 1.25rem; border-bottom: 1px solid var(--line); }   /* wrap: seven tabs pushed a phone's page sideways (#680) */
.analytics-tab {
    appearance: none; background: none; border: none; border-bottom: 2px solid transparent;
    padding: .55rem .9rem; margin-bottom: -1px; cursor: pointer;
    font: inherit; font-size: .95rem; font-weight: 600; color: var(--ink-soft);
}
.analytics-tab:hover { color: var(--ink); }
.analytics-tab.is-active { color: var(--accent); border-bottom-color: var(--accent); }
.analytics-tab-count {
    display: inline-block; margin-left: .35rem; padding: .05rem .45rem; border-radius: var(--radius-pill);
    background: var(--accent-soft); color: var(--accent); font-size: .75rem; font-weight: 700;
}

/* ── admin analytics: KPI cards ── */
.kpi-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
    gap: .9rem; margin-bottom: 1.25rem;
}
.kpi-card {
    display: flex; flex-direction: column; gap: .15rem;
    padding: .9rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev);
}
.kpi-value { font-family: var(--font-sans); font-size: 1.7rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-label { font-size: .82rem; font-weight: 600; color: var(--ink-soft); }
.kpi-sub { font-size: .78rem; color: var(--ink-mute); }

/* "Trenutno na strani" - live count with a pulsing dot. */
.kpi-card-live { border-color: rgba(93,121,80,.5); }
.live-dot {
    display: inline-block; width: .5rem; height: .5rem; margin-right: .45rem; vertical-align: middle;
    border-radius: 50%; background: rgb(93,121,80);
    animation: live-pulse 1.8s ease-out infinite;
}
@keyframes live-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(93,121,80,.5); }
    70%  { box-shadow: 0 0 0 .5rem rgba(93,121,80,0); }
    100% { box-shadow: 0 0 0 0 rgba(93,121,80,0); }
}
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

/* ── admin analytics: simple CSS bar charts ── */
.chart-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); gap: .9rem; margin-bottom: .9rem; }
.chart-card { padding: .9rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev); }
.chart-card h3 { margin: 0 0 .75rem; font-size: .9rem; font-weight: 700; color: var(--ink-soft); }
.chart-bars { display: flex; align-items: flex-end; gap: 2px; height: 7rem; position: relative; }
.chart-bars.is-wide { gap: 6px; }
.chart-col {
    flex: 1 1 0; min-width: 0; height: 100%; position: relative;
    display: flex; flex-direction: column; align-items: stretch; justify-content: flex-end;
}
/* horizontal count gridlines (ChartGrid) - first child of .chart-bars; bars are positioned, so they paint above */
.chart-grid { position: absolute; inset: 0; pointer-events: none; }
.chart-gridline { position: absolute; left: 0; right: 0; height: 0; border-top: 1px dashed var(--line); }
.chart-gridline span {
    position: absolute; right: 0; bottom: 1px;
    font-size: .66rem; line-height: 1.3; color: var(--ink-mute);
    background: color-mix(in srgb, var(--bg-elev) 80%, transparent); padding: 0 2px; border-radius: var(--radius);
}
.chart-gridline.is-top span { bottom: auto; top: 2px; }
.chart-fill { background: var(--accent); border-radius: var(--radius) var(--radius) 0 0; min-height: 0; }
.chart-fill.is-alt { background: #7c9a6d; }
.chart-fill.is-ok { background: var(--ok, #3a7d44); }
.chart-fill.is-bad { background: #b65c4a; }
/* stacked feedback trend segments (bottom→top: napake / ideje / anketa) */
.chart-fill.is-issue { background: #b65c4a; border-radius: 0; }
.chart-fill.is-idea { background: #c9a227; border-radius: 0; }
.chart-fill.is-survey { background: var(--accent); border-radius: var(--radius) var(--radius) 0 0; }
.chart-x { display: flex; justify-content: space-between; margin-top: .3rem; font-size: .72rem; color: var(--ink-mute); }
.chart-note { margin: .6rem 0 0; font-size: .76rem; color: var(--ink-mute); }
.chart-legend { display: flex; gap: .9rem; margin-top: .45rem; font-size: .76rem; color: var(--ink-soft); }
.chart-legend span { display: inline-flex; align-items: center; gap: .3rem; }
.legend-dot { width: .6rem; height: .6rem; border-radius: var(--radius); display: inline-block; }
.legend-dot.is-issue { background: #b65c4a; }
.legend-dot.is-idea { background: #c9a227; }
.legend-dot.is-survey { background: var(--accent); }
/* grouped day bars: Obiski (visits) + Obiskovalci (visitors) side by side, Obiski chart */
.chart-col-grouped { flex-direction: row; align-items: flex-end; gap: 1px; }
.chart-col-grouped .chart-fill { flex: 1 1 0; }
/* let the Obiski chart's bars grow to fill the card's full height (it shares a grid row with the
   taller top-pages list, which would otherwise leave the bars in a short strip up top) */
.chart-card-tall { display: flex; flex-direction: column; }
.chart-card-tall .chart-bars { flex: 1 1 auto; height: auto; min-height: 7rem; }
.legend-dot.is-visit { background: var(--accent); }
.legend-dot.is-visitor { background: #7c9a6d; }
/* Analitika → MCP (#1402, #1408): stacked day bars (bottom→top: branja / pisanja / potrditve) and the kind badge */
.chart-fill.is-mcp-read { background: #5d7950; border-radius: 0; }
.chart-fill.is-mcp-write { background: #c9a227; border-radius: 0; }
.chart-fill.is-mcp-confirm { background: var(--accent); border-radius: var(--radius) var(--radius) 0 0; }
.legend-dot.is-mcp-read { background: #5d7950; }
.legend-dot.is-mcp-write { background: #c9a227; }
.legend-dot.is-mcp-confirm { background: var(--accent); }
.mcp-kind {
    display: inline-block; padding: .05rem .4rem; border-radius: var(--radius-pill); font-size: .72rem; font-weight: 600;
    white-space: nowrap; background: color-mix(in srgb, #5d7950 16%, transparent); color: #46603b;
}
.mcp-kind.is-write { background: color-mix(in srgb, #c9a227 18%, transparent); color: #7d6310; }
.mcp-kind.is-confirm { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.mcp-usage-unused { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .6rem; }
.mcp-usage-unused .chart-note { margin: 0; }
.mcp-usage-intro { flex: 1 1 18rem; margin: 0; }   /* beside the period chips, under them on a phone */
.mcp-usage-error { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.mcp-usage-error p { margin: 0; }
.mcp-usage-clients { font-size: .8rem; color: var(--ink-soft); }
.mcp-usage-user-tools { padding: .35rem 0; }
.mcp-usage-user-tools .dist-row.is-wide { grid-template-columns: minmax(10rem, 18rem) 1fr 4rem; }

/* funnel rows need a wider right column ("N · 100 %") */
.dist-row.funnel-row { grid-template-columns: minmax(7rem, 11rem) 1fr 5.5rem; }

/* retention cohort heat table */
.cohort-card { grid-column: 1 / -1; }
.cohort-table { border-collapse: collapse; font-size: .82rem; min-width: 36rem; }
.cohort-table th, .cohort-table td { padding: .3rem .55rem; border: 1px solid var(--line); }
.cohort-table th { font-weight: 600; color: var(--ink-soft); background: var(--accent-soft); }
.cohort-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.cohort-table .cohort-cell { min-width: 3.2rem; }

/* ── admin analytics: pages / visits ("Obisk") ── */
.visits-table { min-width: 44rem; }
.visits-table td { vertical-align: top; }

/* user-flow sequences (top paths + per-visit drill-down): pill-chained page routes */
.flow-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .45rem; }
.flow-item { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.flow-steps { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; }
.flow-step {
    font-size: .76rem; font-variant-numeric: tabular-nums;
    background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-pill);
    padding: .05rem .45rem; color: var(--ink-soft); white-space: nowrap;
}
.flow-arrow { color: var(--ink-mute); font-size: .7rem; }
.flow-count { font-size: .8rem; font-weight: 600; color: var(--ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* horizontal distribution rows (WTP / razlogi / vloge / uporabnost) */
.dist-list { display: flex; flex-direction: column; gap: .45rem; }
.dist-row { display: grid; grid-template-columns: minmax(7rem, 14rem) 1fr 2rem; align-items: center; gap: .6rem; }
.dist-label { font-size: .82rem; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dist-bar { height: .6rem; border-radius: var(--radius-pill); background: var(--accent-soft); overflow: hidden; }
.dist-fill { height: 100%; border-radius: var(--radius-pill); background: var(--accent); }
.dist-list.is-bad .dist-fill { background: #b65c4a; }
.dist-count { font-size: .8rem; font-weight: 600; color: var(--ink-soft); text-align: right; font-variant-numeric: tabular-nums; }
/* wider count column - the storage rows carry a size AND a share ("9,0 MB · 45 %") */
.dist-row.is-wide { grid-template-columns: minmax(7rem, 12rem) 1fr 8rem; }
.dist-row.is-wide .dist-count { white-space: nowrap; }
.afb-dist-empty { margin: 0; font-size: .82rem; color: var(--ink-mute); }

/* ── admin analytics: feedback (odzivi) ── */
.afb-filters { display: flex; gap: .4rem; flex-wrap: wrap; }
.afb-filter {
    appearance: none; cursor: pointer; font: inherit; font-size: .85rem; font-weight: 600;
    padding: .35rem .8rem; border: 1.5px solid var(--line-strong); border-radius: var(--radius-pill);
    background: var(--bg-elev); color: var(--ink-soft);
}
.afb-filter:hover { border-color: var(--accent); color: var(--ink); }
.afb-filter.is-active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

.afb-survey-stats {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
    gap: .9rem; margin-bottom: 1.25rem;
}
.afb-nps-card { grid-column: 1 / -1; }
.afb-nps-head { display: flex; align-items: baseline; gap: .8rem; margin-bottom: .6rem; flex-wrap: wrap; }
.afb-nps-score { font-family: var(--font-sans); font-size: 2.1rem; font-weight: 700; line-height: 1; }
.afb-nps-legend { font-size: .82rem; color: var(--ink-mute); }
.afb-nps-bars { height: 5.5rem; gap: 6px; }
.afb-nps-bars .chart-col { justify-content: flex-end; }
.afb-nps-x { font-size: .7rem; color: var(--ink-mute); text-align: center; margin-top: .2rem; }
.afb-followup { margin: 0; font-size: .9rem; color: var(--ink-soft); }

.afb-list { display: flex; flex-direction: column; gap: .55rem; }
.afb-entry { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev); overflow: hidden; }
.afb-entry.is-open { border-color: var(--line-strong); }
.afb-entry-head {
    appearance: none; border: none; background: none; cursor: pointer; font: inherit; text-align: left;
    display: flex; align-items: center; gap: .6rem; width: 100%; padding: .65rem .85rem; color: var(--ink);
}
.afb-entry-head:hover { background: var(--accent-soft); }
.afb-badge {
    flex: none; font-size: .72rem; font-weight: 700; padding: .15rem .55rem; border-radius: var(--radius-pill); white-space: nowrap;
}
.afb-badge.is-issue { background: #f3d9d4; color: #9a3a2c; }
.afb-badge.is-idea { background: #f4ecd2; color: #8a6d1a; }
.afb-badge.is-survey { background: var(--accent-soft); color: var(--accent); }
.afb-entry-title { flex: 1 1 auto; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.afb-flag { flex: none; font-size: .8rem; }
.afb-flag-warn { color: #9a3a2c; font-weight: 700; }
.afb-entry-user { flex: none; font-size: .8rem; color: var(--ink-mute); }
.afb-entry-date { flex: none; font-size: .8rem; color: var(--ink-mute); white-space: nowrap; font-variant-numeric: tabular-nums; }
.afb-entry-body { padding: .2rem .85rem .85rem; border-top: 1px solid var(--line); }
.afb-survey-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin: .6rem 0 .2rem; }
.afb-chip {
    font-size: .78rem; padding: .2rem .6rem; border-radius: var(--radius-pill);
    background: var(--accent-soft); color: var(--ink-soft);
}
.afb-chip-ok { background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.afb-body-text {
    margin: .6rem 0 0; padding: 0; font: inherit; font-size: .9rem; color: var(--ink);
    white-space: pre-wrap; word-break: break-word;
}
.afb-screenshot {
    display: block; max-width: 24rem; max-height: 16rem; margin-top: .7rem;
    border: 1px solid var(--line); border-radius: var(--radius);
}
.afb-meta { margin-top: .7rem; }
.afb-meta summary { cursor: pointer; font-size: .82rem; color: var(--ink-mute); }
.afb-meta-table { margin-top: .4rem; font-size: .8rem; border-collapse: collapse; }
.afb-meta-table th { text-align: left; padding: .15rem .8rem .15rem 0; color: var(--ink-mute); font-weight: 600; vertical-align: top; white-space: nowrap; }
.afb-meta-table td { padding: .15rem 0; color: var(--ink-soft); word-break: break-word; }
.afb-more { display: flex; justify-content: center; margin-top: 1rem; }

@media (max-width: 700px) {
    .afb-entry-user { display: none; }
}

/* ── Task sequence number (#1, #2 …) - plain, larger, no chrome ── */
.item-number {
    flex: none; font-size: 1.4rem; font-weight: 800; color: var(--ink-mute);
    font-variant-numeric: tabular-nums; letter-spacing: -.01em; line-height: 1;
}

/* ── Task answer options (single / multi + Drugo) ── */
.task-options { display: flex; flex-wrap: wrap; gap: .5rem; margin: .65rem 0 .9rem; }
.task-option {
    display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; user-select: none;
    padding: .45rem .85rem; border: 1.5px solid var(--line-strong); border-radius: var(--radius);
    background: var(--bg-elev); font-size: .9rem; line-height: 1.1; color: var(--ink-soft);
    transition: border-color .12s, background .12s, color .12s, box-shadow .12s;
}
.task-option:hover { border-color: var(--accent); color: var(--ink); background: var(--bg); }
.task-option input { width: 1.05rem; height: 1.05rem; accent-color: var(--accent); margin: 0; cursor: pointer; flex: none; }
.task-option.is-checked {
    background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); font-weight: 600;
    box-shadow: 0 1px 2px color-mix(in srgb, var(--accent) 18%, transparent);
}
.task-option-other { flex-basis: 100%; border-style: dashed; }
.task-option-other-label { white-space: nowrap; font-weight: 600; }
.task-option-other-input {
    flex: 1; min-width: 8rem; padding: .35rem .55rem; border: 1px solid var(--line-strong);
    border-radius: var(--radius); background: var(--bg); font-size: .9rem; color: var(--ink);
}
.task-option-other-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ── Admin inline task editor (from the phase page) ── */
.item-admin-edit { color: var(--accent-ink); }
.admin-edit-card { width: min(34rem, 100%); max-height: 88vh; display: flex; flex-direction: column; }
.admin-edit-body { display: flex; flex-direction: column; gap: .85rem; overflow-y: auto; }
.admin-edit-row { display: flex; gap: .85rem; flex-wrap: wrap; }
.admin-edit-field { display: flex; flex-direction: column; gap: .3rem; flex: 1; min-width: 0; }
.admin-edit-field > span { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-mute); }
.admin-edit-field .type-input { width: 100%; }
.admin-edit-days { flex: 0 0 9rem; }
.admin-edit-check { display: inline-flex; align-items: center; gap: .5rem; font-size: .9rem; color: var(--ink-soft); cursor: pointer; }
.admin-edit-check input { accent-color: var(--accent); }
.admin-edit-foot { display: flex; gap: .6rem; padding: 1rem 1.5rem; border-top: 1px solid var(--line); }

/* ── Phase budget builder ── */
.phase-budget-sum { font-family: var(--font-sans); font-size: 1.15rem; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.phase-budget-open { align-self: flex-end; }

.budget-modal-card { width: min(40rem, 100%); max-height: 88vh; display: flex; flex-direction: column; }
.budget-modal-body { padding: 1.25rem 1.5rem; overflow-y: auto; }
.budget-modal-intro { margin: 0 0 1rem; font-size: .9rem; color: var(--ink-soft); }
.budget-section-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-mute); margin: 1rem 0 .5rem; }
.budget-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.budget-row {
    display: flex; align-items: center; gap: .6rem;
    padding: .4rem .6rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev);
}
.budget-row.is-on { border-color: var(--line-strong); background: var(--bg); }
.budget-row-pick { display: inline-flex; align-items: center; gap: .5rem; flex: 1; cursor: pointer; }
.budget-row-pick input { accent-color: var(--accent); }
.budget-row-name { font-size: .92rem; }
.budget-row-name-input { flex: 1; min-width: 8rem; }
.budget-row-amount { flex: 0 0 7.5rem; }
.budget-row-amount .price-input { text-align: right; width: 100%; }
.budget-row-estimate { font-size: .8rem; color: var(--ink-mute); font-variant-numeric: tabular-nums; }
.budget-add { display: flex; gap: .5rem; align-items: center; margin-top: .75rem; flex-wrap: wrap; }
.budget-add .budget-row-name-input { flex: 1; min-width: 10rem; }
.budget-modal-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 1rem 1.5rem; border-top: 1px solid var(--line);
}
.budget-total { display: flex; flex-direction: column; }
.budget-total span { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-mute); }
.budget-total strong { font-family: var(--font-sans); font-size: 1.35rem; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ── Phase section tabs + pagination ── */
.phase-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1.25rem 0; }
.phase-tab {
    appearance: none; cursor: pointer; display: inline-flex; align-items: center; gap: .45rem;
    padding: .5rem .85rem; border-radius: var(--radius-pill); border: 1px solid var(--line-strong);
    background: var(--bg-elev); color: var(--ink-soft); line-height: 1;
    font-family: var(--font-sans); font-size: .85rem; font-weight: 600;
    transition: background .15s, border-color .15s, color .15s;
}
.phase-tab:hover { border-color: var(--phase-color, var(--accent)); color: var(--ink); }
.phase-tab-num {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 1.4rem; height: 1.4rem; border-radius: 50%;
    background: var(--line); color: var(--ink-mute);
    font-size: .72rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.phase-tab.is-complete .phase-tab-num { background: var(--ok); color: #fff; }
.phase-tab.is-current {
    background: var(--phase-color, var(--accent)); border-color: var(--phase-color, var(--accent)); color: #fff;
}
.phase-tab.is-current .phase-tab-num { background: rgba(255, 255, 255, .25); color: #fff; }
.phase-tab-check { color: var(--ok); font-weight: 700; }
.phase-tab.is-current .phase-tab-check { color: #fff; }

.section-pager { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1.5rem 0; }
.section-pager-pos { font-size: .85rem; color: var(--ink-mute); font-variant-numeric: tabular-nums; }

/* ── Admin: task option badge + phase potential costs ── */
.catalog-opt-badge {
    flex: none; font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
    padding: .12rem .45rem; border-radius: var(--radius-pill); color: #fff; background: var(--accent);
}
.catalog-allow-other { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; color: var(--ink-soft); }
.catalog-allow-other input { accent-color: var(--accent); }
.catalog-phase-costs { margin: .8rem 0 .4rem; padding-top: .8rem; border-top: 1px dashed var(--line-strong); }
.catalog-costs-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-mute); margin-bottom: .5rem; }
.catalog-costs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; }
.catalog-cost { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.catalog-cost-name { flex: 1; min-width: 8rem; }
.catalog-cost-amount { font-variant-numeric: tabular-nums; color: var(--ink-soft); font-size: .85rem; }
.catalog-add-cost { display: flex; gap: .5rem; margin-top: .6rem; flex-wrap: wrap; }
.catalog-add-cost .type-input:first-child { flex: 1; min-width: 10rem; }

/* ──────────────────────────────────────────────────────────────────────────
   Parcel lookup (lokacijska informacija) - project-page map + OPN widget
   ────────────────────────────────────────────────────────────────────────── */
.parcel {
    position: relative;
    margin: 2.5rem 0;
    padding: 1.6rem 1.6rem 1.75rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-elev);
}
/* Daily-quota pill pinned to the card's top-right corner. */
.parcel-usage { position: absolute; top: 1.1rem; right: 1.1rem; }
.parcel-eyebrow {
    font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em;
    color: var(--accent); margin-bottom: .35rem;
}
.parcel-head h2 { font-size: 1.4rem; margin-bottom: .4rem; }
.parcel-head > p { margin: 0 0 1.35rem; color: var(--ink-soft); font-size: .92rem; max-width: 64ch; }

/* search row */
.parcel-search { display: flex; gap: .9rem; align-items: flex-end; flex-wrap: wrap; }
.parcel-field { display: flex; flex-direction: column; gap: .35rem; }
.parcel-field label {
    font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-mute);
}
.parcel-field input {
    width: 12rem; max-width: 100%;
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    padding: .6rem .75rem; background: var(--bg);
    font-family: var(--font-sans); font-size: .95rem; color: var(--ink);
    transition: border-color .15s;
}
.parcel-field input:focus { outline: none; border-color: var(--accent); }
.parcel-field input::placeholder { color: var(--ink-mute); font-style: italic; }

/* KO searchable combobox (filter-as-you-type dropdown that replaces the plain KO field). */
.ko-combo { position: relative; display: block; width: 14rem; max-width: 100%; }
.parcel-field .ko-combo { width: 14rem; }
.parcel-adjacent-add .ko-combo { flex: 1 1 8rem; min-width: 6rem; width: auto; }
.ko-combo .ko-combo-input { width: 100%; box-sizing: border-box; padding-right: 2.1rem; }
/* The same caret as select.type-input, not the ⌄ glyph: the font drew it small and low, at the baseline. */
.ko-combo-caret {
    position: absolute; right: .85rem; top: 50%; transform: translateY(-50%);
    width: .7rem; height: .7rem; font-size: 0; pointer-events: none;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%238c8679' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M4 6l4 4 4-4'/></svg>") no-repeat center / contain;
}
.ko-combo-list {
    position: absolute; top: calc(100% + .25rem); left: 0; right: 0; z-index: 40;
    margin: 0; padding: .25rem; list-style: none;
    background: var(--bg-elev); border: 1px solid var(--line-strong); border-radius: var(--radius);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .14); max-height: 16rem; overflow-y: auto;
}
.ko-combo-opt {
    display: flex; align-items: baseline; justify-content: space-between; gap: .6rem;
    padding: .45rem .55rem; border-radius: calc(var(--radius) - var(--radius)); cursor: pointer;
    font-size: .9rem; color: var(--ink);
}
.ko-combo-opt:hover, .ko-combo-opt.is-active { background: var(--accent-soft); }
.ko-combo-opt.is-selected { font-weight: 600; }
.ko-combo-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ko-combo-id { flex: none; color: var(--ink-mute); font-variant-numeric: tabular-nums; font-size: .8rem; }
.ko-combo-empty, .ko-combo-more {
    padding: .45rem .55rem; color: var(--ink-mute); font-size: .82rem; font-style: italic;
}
.parcel-go { height: 2.65rem; }
/* "Hiša v 3D" - secondary accent action beside "Prikaži parcelo" (opens the 3D view: real terrain
   once a parcel is looked up, a generic flat plot until then). */
/* Same accent-glow pill as the navbar "Hiša v 3D" entry (.nav-link-3d). */
.plan-3d-go {
    height: 2.65rem; gap: .35rem; font-weight: 700; border: none; white-space: nowrap;
    color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-ink));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent),
                0 0 12px 1px color-mix(in srgb, var(--accent) 55%, transparent);
    animation: nav-3d-glow 2.4s ease-in-out infinite; transition: transform .15s, background .15s;
}
.plan-3d-go:hover { color: #fff; transform: translateY(-1px); background: linear-gradient(135deg, var(--accent-ink), var(--accent)); }
.plan-3d-go-ico { display: inline-flex; }
.plan-3d-go-ico svg { width: 1.05rem; height: 1.05rem; }
/* Disabled: phase-flow project with no parcel yet - look it up first. A non-clickable span. */
.plan-3d-go.is-disabled {
    color: var(--ink-mute); border: 1px dashed var(--line-strong);
    background: var(--bg-elev); cursor: not-allowed; box-shadow: none; animation: none;
}
.plan-3d-go.is-disabled:hover { background: var(--bg-elev); border-color: var(--line-strong); color: var(--ink-mute); transform: none; }


/* result: map + info */
.parcel-result {
    margin-top: 1.6rem;
    display: grid; grid-template-columns: minmax(230px, 1fr) minmax(300px, 1.25fr);
    gap: 1.75rem; align-items: start;
}
@media (max-width: 760px) { .parcel-result { grid-template-columns: 1fr; } }

/* OPN imported from a lokacijska-informacija PDF with no geometry → single (info) column */
.parcel-result--nomap { grid-template-columns: 1fr; }

/* Uvoz lokacijske informacije (PDF) drop zone */
.parcel-li-drop {
    position: relative; display: flex; align-items: center; gap: .85rem;
    margin-top: 1.1rem; padding: .9rem 1.1rem;
    border: 1.5px dashed var(--line-strong); border-radius: var(--radius);
    background: var(--bg); cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}
.parcel-li-drop:hover { border-color: var(--accent); background: var(--accent-soft); }
.parcel-li-drop.is-busy { cursor: progress; }
/* the real file input fills the label, so the whole card is clickable and a drop target */
.parcel-li-drop input[type=file] {
    position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: inherit;
}
.parcel-li-drop.is-busy input[type=file] { pointer-events: none; }
.parcel-li-ic { font-size: 1.4rem; line-height: 1; flex: none; }
.parcel-li-text { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.parcel-li-text strong { font-size: .92rem; color: var(--ink); }
.parcel-li-text span { font-size: .8rem; color: var(--ink-soft); }
/* privacy hint under the OPN-import drop zone */
.parcel-li-note { margin: .4rem 0 0; font-size: .74rem; line-height: 1.4; color: var(--ink-mute); }

/* Multi-plot LI import warnings (parcels that couldn't be added / weren't covered) */
.parcel-li-warnings { margin-top: .7rem; display: flex; flex-direction: column; gap: .35rem; }
.parcel-li-warning {
    font-size: .82rem; line-height: 1.4; color: #8a5300;
    background: #fff7e6; border: 1px solid #f0d28a; border-radius: var(--radius);
    padding: .5rem .7rem;
}

/* Sosednje (mejne) parcele - adjacent-plot manager under the parcel summary */
.parcel-adjacent {
    margin: 1rem 0 .25rem; padding: .85rem 1rem;
    border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--bg);
}
.parcel-adjacent-head { display: flex; flex-direction: column; gap: .15rem; margin-bottom: .6rem; }
.parcel-adjacent-head strong { font-size: .92rem; color: var(--ink); }
.parcel-adjacent-hint { font-size: .78rem; color: var(--ink-soft); line-height: 1.4; }
.parcel-adjacent-list { list-style: none; margin: 0 0 .6rem; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.parcel-adjacent-item {
    display: flex; align-items: flex-start; justify-content: space-between; gap: .6rem;
    padding: .5rem .65rem; border: 1px solid var(--line); border-left: 3px solid #2f6fd0;
    border-radius: var(--radius); background: var(--surface, #fff);
}
.parcel-adjacent-id { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.parcel-adjacent-num { font-size: .85rem; font-weight: 600; color: var(--ink); }
.parcel-adjacent-sub { font-size: .77rem; color: var(--ink-soft); }
.parcel-adjacent-owner { font-size: .73rem; color: var(--ink-mute); }
.parcel-adjacent-remove {
    flex: none; width: 1.5rem; height: 1.5rem; line-height: 1; font-size: 1.1rem;
    border: 1px solid var(--line-strong); border-radius: 50%; background: var(--bg);
    color: var(--ink-soft); cursor: pointer;
}
.parcel-adjacent-remove:hover { color: var(--danger, #c0392b); border-color: var(--danger, #c0392b); }
.parcel-adjacent-combined {
    font-size: .82rem; line-height: 1.5; color: var(--ink); margin-bottom: .6rem;
    padding: .5rem .65rem; border-radius: var(--radius); background: var(--accent-soft);
}
.parcel-adjacent-add { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.parcel-adjacent-in {
    flex: 1 1 8rem; min-width: 6rem; padding: .45rem .6rem; font-size: .85rem;
    border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--bg); color: var(--ink);
}
.parcel-adjacent-in:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.parcel-adjacent-more {
    margin-top: .2rem; padding: .4rem .2rem; font-size: .83rem; font-weight: 600;
    background: none; border: none; color: var(--accent); cursor: pointer;
}
.parcel-adjacent-more:hover { text-decoration: underline; }

/* "Povzetek Lokacijske Info" - round, icon-only button next to the KO/parcel id (left of the assessed
   value); opens the OPN-import summary modal. */
.parcel-summary-left { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.parcel-summary-btn {
    flex: none; width: 2.3rem; height: 2.3rem; border-radius: 50%; padding: 0; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--accent-ink); background: var(--accent-soft); border: 1px solid var(--line-strong);
    transition: border-color .15s, background .15s, color .15s;
}
.parcel-summary-btn:hover { border-color: var(--accent); background: var(--accent); color: #fff; }
.parcel-summary-btn svg { width: 1.15rem; height: 1.15rem; }
.parcel-li-modal-card { width: min(92vw, 640px); }
.parcel-li-modal-body {
    padding: .25rem 1.4rem 1.4rem; font-size: .92rem; line-height: 1.6; color: var(--ink-soft);
    white-space: pre-wrap; max-height: 70vh; overflow-y: auto;
}

.parcel-map-wrap { margin: 0; display: flex; flex-direction: column; gap: .55rem; }
.parcel-map {
    position: relative; width: 100%; aspect-ratio: 1 / 1; overflow: hidden;
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    box-shadow: inset 0 1px 3px rgba(58, 58, 58, .12);
    /* grid shows only until the orthophoto loads (or if the WMS proxy fails) */
    background:
        linear-gradient(rgba(122,50,20,.05) 1px, transparent 1px) 0 0 / 26px 26px,
        linear-gradient(90deg, rgba(122,50,20,.05) 1px, transparent 1px) 0 0 / 26px 26px,
        #f6f6f6;
}
.parcel-ortho { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.parcel-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.parcel-coords {
    font-size: .8rem; color: var(--ink-mute); font-variant-numeric: tabular-nums; text-align: center;
}
.parcel-pin { color: var(--accent); }

/* info panel: summary header + tabbed sections */
.parcel-summary {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    margin-bottom: 1rem;
}
.parcel-summary-obcina { font-size: .9rem; color: var(--accent, #2563eb); font-weight: 600; margin-bottom: .12rem; }
.parcel-summary-title { font-family: var(--font-sans); font-size: 1.25rem; color: var(--ink); line-height: 1.15; }
.parcel-summary-sub { font-size: .85rem; color: var(--ink-mute); margin-top: .2rem; font-variant-numeric: tabular-nums; }

/* Lookup loader + progress - shown while the lokacijsko poročilo is assembled from the public registries. */
.parcel-loader { margin-top: 1rem; padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--radius); }
.parcel-loader-title { display: flex; align-items: center; gap: .5rem; font-weight: 600; color: var(--ink); margin-bottom: .7rem; }
.parcel-progress { height: 8px; border-radius: var(--radius-pill); background: var(--line); overflow: hidden; }
.parcel-progress-bar { height: 100%; width: 6%; border-radius: var(--radius-pill);
    background: linear-gradient(90deg, var(--accent, #2563eb), #7aa7f0);
    animation: parcel-progress 8s cubic-bezier(.22,.8,.2,1) forwards; }
@keyframes parcel-progress { 0% { width: 6%; } 55% { width: 70%; } 100% { width: 92%; } }
.parcel-loader-steps { list-style: none; margin: .9rem 0 .2rem; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.parcel-loader-steps li { position: relative; padding-left: 1.35rem; font-size: .82rem; color: var(--ink-mute); opacity: .5;
    animation: parcel-step 8s linear forwards; }
.parcel-loader-steps li::before { content: "○"; position: absolute; left: 0; }
.parcel-loader-steps li:nth-child(2) { animation-delay: 2s; }
.parcel-loader-steps li:nth-child(3) { animation-delay: 4s; }
.parcel-loader-steps li:nth-child(4) { animation-delay: 6s; }
@keyframes parcel-step { 0% { opacity: .5; } 12%, 100% { opacity: 1; color: var(--ink); } }
/* The čarovnik's APPLY overlay drives its checklist from the server's stream, not from a timer: a step
   lights up when it actually starts and gets a tick when it is done. */
.nw-apply-loading .parcel-loader-steps li { animation: none; opacity: .55; }
.nw-apply-loading .parcel-loader-steps li.is-now { opacity: 1; color: var(--ink); }
.nw-apply-loading .parcel-loader-steps li.is-now::before { content: "◐"; color: var(--accent); }
.nw-apply-loading .parcel-loader-steps li.is-done { opacity: 1; color: var(--ink-soft); }
.nw-apply-loading .parcel-loader-steps li.is-done::before { content: "✓"; color: var(--ok); }
@media (prefers-reduced-motion: reduce) {
    .parcel-progress-bar { animation: none; width: 60%; }
    .parcel-loader-steps li { animation: none; opacity: 1; }
}
.parcel-summary-value { flex: none; text-align: right; }
.parcel-summary-value-amount {
    font-family: var(--font-sans); font-size: 1.5rem; font-weight: 800; color: var(--ok); line-height: 1; white-space: nowrap;
}
.parcel-summary-value-k {
    font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-mute);
    margin-top: .2rem; white-space: nowrap;
}

.parcel-panel > *:last-child { margin-bottom: 0; }

/* count badge - shared by the namenska-raba panel and the accordion headers below */
.parcel-tab-count {
    font-size: .68rem; font-weight: 700; line-height: 1; padding: .14rem .42rem; border-radius: var(--radius-pill);
    background: var(--line); color: var(--ink-soft);
}

/* Full-width sections below the map + namenska raba, as stacked vertical accordions so each section
   (tables, the V-bližini map) gets the whole widget width instead of the cramped info column. */
.parcel-sections { margin-top: 1.6rem; display: flex; flex-direction: column; gap: .7rem; }
.parcel-acc {
    border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev); overflow: hidden;
}
.parcel-acc.is-open { border-color: var(--line-strong); }
.parcel-acc-head {
    appearance: none; width: 100%; display: flex; align-items: center; gap: .6rem;
    padding: .85rem 1rem; background: none; border: none; cursor: pointer; text-align: left;
    font-family: var(--font-sans); font-size: .92rem; font-weight: 700; color: var(--ink);
    transition: background .12s;
}
.parcel-acc-head:hover { background: var(--bg); }
.parcel-acc.is-open .parcel-acc-head { border-bottom: 1px solid var(--line); }
.parcel-acc-ico { flex: none; color: var(--ink-soft); }
.parcel-acc-title { flex: 1 1 auto; }
/* Chevron drawn from a rotated bordered square (font-size:0 hides the ⌄ glyph) so it sits perfectly
   centered in the header regardless of the font's glyph metrics; the box flips on open. */
.parcel-acc-chevron {
    flex: none; width: 1.1rem; height: 1.1rem; font-size: 0;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--ink-mute); transition: transform .15s ease;
}
.parcel-acc-chevron::before {
    content: ""; width: .5rem; height: .5rem; margin-top: -.18rem;
    border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    border-radius: var(--radius); transform: rotate(45deg);
}
.parcel-acc.is-open .parcel-acc-chevron { transform: rotate(180deg); }
.parcel-acc-body { padding: 1.1rem 1rem 1.2rem; }
.parcel-acc-body > *:last-child { margin-bottom: 0; }

/* Locked section teaser (tier below the one that unlocks it) - looks like a disabled accordion
   header but navigates to the pricing page. */
.parcel-acc-locked { border-style: dashed; background: var(--bg); }
.parcel-acc-locked .parcel-acc-head { color: var(--ink-mute); font-weight: 600; }
.parcel-acc-locked .parcel-acc-head:hover { background: var(--bg-elev); color: var(--ink-soft); }
.parcel-lock-ico { flex: none; font-size: .9rem; line-height: 1; opacity: .8; }
.parcel-lock-need {
    flex: none; font-size: .68rem; font-weight: 700; letter-spacing: .02em;
    padding: .14rem .5rem; border-radius: var(--radius-pill); white-space: nowrap;
    color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
}

/* Upsell to the standalone full location report (lokacija.glog.si) - a highlighted card at the top of
   the report body, shown to trial / Osnovni users who see the premium sections below as locked teasers.
   Offers a one-off pay-per-report OR a plan upgrade. See LokacijaReportUpsell.razor. */
.loka-upsell {
    display: flex; gap: 1rem; align-items: flex-start;
    padding: 1.1rem 1.2rem; margin-bottom: .3rem;
    border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line));
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--accent-soft), var(--bg-elev));
}
.loka-upsell-glyph { flex: none; font-size: 1.5rem; line-height: 1.4; }
.loka-upsell-main { flex: 1 1 auto; min-width: 0; }
.loka-upsell-title { font-family: var(--font-sans); font-size: 1.2rem; margin: 0 0 .3rem; color: var(--ink); }
.loka-upsell-lead { margin: 0 0 .85rem; color: var(--ink-soft); font-size: .92rem; line-height: 1.5; }
.loka-upsell-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; }
.loka-upsell-cta {
    display: inline-flex; align-items: center; gap: .4rem;
    background: var(--accent); color: #fff; text-decoration: none;
    padding: .55rem 1.1rem; border-radius: var(--radius); font-weight: 700; font-size: .92rem;
    white-space: nowrap; transition: filter .12s;
}
.loka-upsell-cta:hover { filter: brightness(.95); }
.loka-upsell-ext { font-size: .85em; }
.loka-upsell-alt { color: var(--accent-ink); font-weight: 600; font-size: .88rem; text-decoration: none; }
.loka-upsell-alt:hover { border-bottom-color: currentColor; }
.loka-upsell-fine { margin: .7rem 0 0; color: var(--ink-mute); font-size: .78rem; }
@media (max-width: 560px) {
    .loka-upsell { flex-direction: column; gap: .6rem; }
    .loka-upsell-cta { width: 100%; justify-content: center; }
}

.parcel-zone {
    display: flex; align-items: center; gap: .85rem;
    padding: .85rem .95rem; margin-bottom: 1.1rem;
    background: var(--bg); border: 1px solid var(--line); border-left: 3px solid var(--accent);
    border-radius: var(--radius);
}
.parcel-zone-code {
    flex: none; min-width: 2.6rem; height: 2.6rem; padding: 0 .5rem;
    display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--font-sans); font-size: 1.45rem; font-weight: 800; line-height: 1;
    color: #fff; background: var(--accent-ink); border-radius: var(--radius);
}
.parcel-zone-text { min-width: 0; }
.parcel-zone-name { font-family: var(--font-sans); font-size: 1.15rem; color: var(--ink); }
.parcel-zone-meta { font-size: .82rem; color: var(--ink-mute); margin-top: .15rem; }

.parcel-stats {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
    gap: .6rem; margin-bottom: 1.2rem;
}
.parcel-stat {
    display: flex; flex-direction: column; gap: .15rem;
    padding: .55rem .65rem; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
}
.parcel-stat-k { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-mute); }
.parcel-stat-v { font-size: 1rem; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }

.parcel-block-title {
    font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-mute);
    margin: 0 0 .4rem;
}
/* Section header inside an accordion body (e.g. Bivanjske razmere: Pokritost / Kakovost zraka / Hrup).
   A titled divider so the sub-sections read as distinct blocks, with a muted meta sub-label on the right. */
.parcel-acc-subhead {
    display: flex; align-items: baseline; flex-wrap: wrap; gap: .25rem .5rem;
    margin: 2.25rem 0 .7rem; padding-bottom: .35rem;
    border-bottom: 1px solid var(--line);
    font-size: .82rem; font-weight: 700; letter-spacing: .02em; color: var(--ink-soft);
}
.parcel-acc-subhead:first-child { margin-top: .15rem; }
.parcel-acc-submeta { margin-left: auto; font-size: .72rem; font-weight: 500; letter-spacing: 0; color: var(--ink-mute); }
.parcel-note { font-size: .88rem; color: var(--ink-soft); margin: .4rem 0 0; }

.parcel-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.parcel-table th, .parcel-table td {
    text-align: left; padding: .42rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top;
}
.parcel-table th { color: var(--ink-soft); font-weight: 600; width: 48%; }
.parcel-table td { color: var(--ink); }

.parcel-act-name { font-size: .9rem; color: var(--ink); }

/* ── Del-stavbe (apartment) report — DelStavbeLookup ── */
/* Številka stavbe / dela stavbe are short numbers - keep their inputs narrow so the search row is tight. */
.parcel-field input.loka-num { width: 8rem; }
/* Facts as a clean label/value grid (building + part summaries). */
.parcel-facts {
    list-style: none; margin: .55rem 0 0; padding: 0;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0 1.1rem;
}
.parcel-facts li {
    display: flex; justify-content: space-between; gap: .6rem;
    padding: .32rem 0; border-bottom: 1px solid var(--line); font-size: .9rem;
}
.parcel-facts li span { color: var(--ink-mute); }
.parcel-facts li strong { text-align: right; font-variant-numeric: tabular-nums; }
/* A block title right after the facts grid ("Prostori", "Lastniki") needs its own top gap - the facts
   rows end with a bottom border and no margin, so the title would touch the last row. */
.parcel-facts + .catalog-costs-title { margin-top: 1.1rem; }
/* The search fields render directly under the inline map picker (which has no bottom margin) - keep the
   map → form seam as airy as the form → result one. */
.mappick-root-inline + .parcel-search { margin-top: 1.4rem; }
/* Long k.o. names ("ŠENTVID NAD LJUBLJANO (1754)") overflow the 14rem combo - ellipsize instead of
   letting the text run under the ⌄ caret; the full name scrolls when the input is focused. */
.ko-combo .ko-combo-input { text-overflow: ellipsis; }
/* The "Deli stavbe" parts table. */
.loka-parts { width: 100%; border-collapse: collapse; margin: .4rem 0 1.1rem; font-size: .88rem; }
.loka-parts th, .loka-parts td { padding: .4rem .5rem; text-align: left; border-bottom: 1px solid var(--line); }
.loka-parts thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-mute); font-weight: 600; }
.loka-parts tbody tr.is-selected { background: var(--accent-soft, rgba(91, 91, 91, .08)); }
.loka-parts tbody tr:hover { background: var(--bg-soft, rgba(0, 0, 0, .02)); }
.loka-owners { list-style: none; margin: .35rem 0 .9rem; padding: 0; }
.loka-owners li { padding: .28rem 0; border-bottom: 1px solid var(--line); font-size: .88rem; color: var(--ink-soft); }

/* ── ownership (Lastništvo) + eZK (hipoteke) ── */
.parcel-owners { margin-bottom: .9rem; }
.parcel-owners td { text-align: right; white-space: nowrap; }
.parcel-owner-name { display: block; color: var(--ink); font-weight: 600; }
.parcel-owner-name.parcel-owner-masked { color: var(--ink-soft); font-style: italic; font-weight: 500; }
.parcel-owner-sub { display: block; font-size: .8rem; color: var(--ink-mute); font-weight: 400; }
.parcel-owner-share { display: block; font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }
.parcel-owner-type { display: block; font-size: .78rem; color: var(--ink-mute); }

.parcel-zk {
    margin: .4rem 0 1rem; padding: .7rem .85rem; border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--surface-2, rgba(0, 0, 0, .02));
}
.parcel-zk-head { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-mute); }
.parcel-zk-text { font-size: .88rem; color: var(--ink-soft); margin: .3rem 0 .45rem; }
/* Curated "why it matters" line under the geology figures. */
.parcel-zk-why { color: var(--ink-mute); font-size: .82rem; }

/* ── AI report additions: 1-minute summary card (top) + next-steps checklist (bottom) ── */
/* The card always follows the search UI (form / OPN drop zone), whose trailing elements often carry no
   bottom margin - its own top margin keeps that seam airy everywhere (block margins collapse, so
   nothing double-spaces where the preceding element already has one). */
.report-ai-summary { margin: 1.5rem 0 1.4rem; padding: 1.1rem 1.2rem; border: 1px solid #e7d4bf; border-radius: var(--radius);
    background: linear-gradient(180deg, #fffaf3, #f2f2f2); box-shadow: 0 6px 18px rgba(10, 10, 10, .06); }
.report-ai-summary-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .7rem; }
.report-ai-summary-head h3 { margin: 0; font-size: 1.12rem; font-weight: 800; color: var(--accent); }
.report-ai-spark { color: var(--accent); font-size: 1.05rem; line-height: 1; }
.report-ai-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem .9rem; margin: 0; }
@media (max-width: 620px) { .report-ai-summary-grid { grid-template-columns: 1fr; } }
.report-ai-summary-item dt { font-size: .7rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: #9c6c06; margin-bottom: .12rem; }
.report-ai-summary-item dd { margin: 0; font-size: .9rem; line-height: 1.45; color: #262626; }
.report-ai-note { margin: .8rem 0 0; font-size: .72rem; color: var(--ink-mute); font-style: italic; }

/* Location-suitability semaphore on the summary card (red / yellow / green, score 0-100). */
.report-score { margin: .15rem 0 .9rem; }
.report-score-top { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.report-score-dot { width: .8rem; height: .8rem; border-radius: 50%; flex: none; }
.report-score-cap { font-size: .82rem; color: var(--ink-soft); }
.report-score-beta { font-size: .58rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
    color: #6a6a6a; background: #f3e8d2; border: 1px solid #e4d3b0; border-radius: var(--radius-pill); padding: .08rem .4rem; }
.report-score-num { margin-left: auto; font-weight: 800; font-size: 1.05rem; color: #262626; }
.report-score-num small { font-weight: 600; font-size: .72rem; color: var(--ink-mute); }
.report-score-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.report-score--good .report-score-dot { background: #3d8b4f; }
.report-score--good .report-score-label { color: #3d8b4f; }
.report-score--warn .report-score-dot { background: #d8a41f; }
.report-score--warn .report-score-label { color: #9c6c06; }
.report-score--bad .report-score-dot { background: #c0392b; }
.report-score--bad .report-score-label { color: #c0392b; }
.report-score-bar { position: relative; height: 8px; border-radius: var(--radius-pill); margin-top: .5rem;
    background: linear-gradient(90deg, #c65a4a 0%, #e6c887 55%, #4f9a63 100%); }
.report-score-marker { position: absolute; top: -3px; width: 3px; height: 14px; background: #262626; border-radius: var(--radius); transform: translateX(-50%); }

.report-ai-checklist { margin: 1.4rem 0 0; padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.report-ai-h { margin: 0 0 .8rem; font-size: 1.05rem; font-weight: 800; color: var(--accent); display: flex; align-items: center; gap: .4rem; }
.report-ai-check-list { margin: 0; padding-left: 0; list-style: none; counter-reset: aicheck; display: grid; gap: .55rem; }
.report-ai-check-list li { display: flex; align-items: flex-start; gap: .55rem; font-size: .92rem; line-height: 1.5; color: #262626; counter-increment: aicheck; }
.report-ai-check-list li::before { content: counter(aicheck); flex: none; margin-top: .1rem;
    width: 1.4rem; height: 1.4rem; display: inline-flex; align-items: center; justify-content: center;
    font-size: .72rem; font-weight: 800; color: #fff; background: var(--accent); border-radius: 50%; }
.report-ai-check-box { flex: none; appearance: none; -webkit-appearance: none; margin: .18rem 0 0;
    width: 1.05rem; height: 1.05rem; border: 1.6px solid var(--accent); border-radius: var(--radius); background: #fff;
    cursor: pointer; position: relative; }
.report-ai-check-box:checked { background: var(--accent); }
.report-ai-check-box:checked::after { content: ""; position: absolute; left: .28rem; top: .08rem;
    width: .3rem; height: .58rem; border: solid #fff; border-width: 0 .16rem .16rem 0; transform: rotate(45deg); }
.report-ai-check-txt { flex: 1; }

/* ── Inline curated explanations under report figures (naravni dejavniki, podnebje, kakovost zraka) ── */
.report-info-notes { margin-top: .85rem; padding: .7rem .85rem; background: #f6f6f6; border: 1px solid var(--line); border-radius: var(--radius); }
.report-info-h { font-size: .78rem; font-weight: 700; color: #6a6a6a; margin-bottom: .4rem; }
.report-info-notes ul { margin: 0; padding-left: 1.05rem; display: grid; gap: .32rem; }
.report-info-notes li { font-size: .8rem; line-height: 1.45; color: var(--ink-soft); }

/* Energetski potenciali (razdelek Podnebje): dve ločeni kartici – Sonce (FV) in Zemlja (geosonda) */
.energy-potentials { margin-top: .85rem; padding: .8rem .9rem; background: linear-gradient(180deg, #f6f6f6, #f2f2f2); border: 1px solid var(--line); border-radius: var(--radius); }
.energy-potentials > .report-info-h { margin-bottom: .55rem; }
.energy-card { background: #fffdfa; border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem .75rem; }
.energy-card + .energy-card { margin-top: .6rem; }
.energy-card-h { display: flex; align-items: center; gap: .4rem; font-size: .82rem; font-weight: 700; color: #6a6a6a; margin-bottom: .4rem; }
.energy-ico { font-size: 1.1rem; line-height: 1; flex: none; }
.energy-val { font-size: 1.35rem; font-weight: 800; color: #0a0a0a; line-height: 1.1; }
.energy-val small { font-size: .72rem; font-weight: 600; color: var(--ink-mute); margin-left: .15rem; }
.energy-lbl { font-size: .82rem; font-weight: 600; color: var(--ink-soft); margin-top: .05rem; }
.energy-k { font-size: .72rem; color: var(--ink-mute); line-height: 1.4; margin: .2rem 0 0; }
.energy-card .gauge { margin: .1rem 0 .15rem; }
.energy-why { font-size: .72rem; color: var(--ink-mute); line-height: 1.45; margin: .35rem 0 0; }
.energy-card .climate-foot { margin-top: .3rem; }

/* Noise loudness reference scale (chips) */
.noise-scale { margin-top: .85rem; }
.noise-scale-h { font-size: .78rem; font-weight: 700; color: #6a6a6a; }
.noise-scale ul { margin: .4rem 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: .35rem .5rem; }
.noise-scale li { font-size: .77rem; color: var(--ink-soft); background: #f2f2f2; border: 1px solid var(--line); border-radius: var(--radius-pill); padding: .13rem .55rem; }
.noise-db { font-weight: 700; color: #262626; }

/* OPN raba-code plain-language description under the zone box */
.parcel-zone-desc { margin-top: .3rem; font-size: .82rem; line-height: 1.4; color: var(--ink-soft); }

/* (i) info badge - native title tooltip, matching the app's title= convention */
.parcel-i {
    display: inline-flex; align-items: center; justify-content: center;
    width: 1.05rem; height: 1.05rem; margin-left: .25rem; vertical-align: baseline;
    border: 1px solid var(--line-strong); border-radius: 50%;
    font-family: var(--font-sans); font-size: .62rem; font-weight: 700; font-style: italic;
    color: var(--ink-mute); background: var(--bg); cursor: help; user-select: none;
}
.parcel-i:hover, .parcel-i:focus { color: #fff; background: var(--accent); border-color: var(--accent); outline: none; }

.parcel .mono { font-family: var(--font-mono); font-size: .85em; }

/* Prostorski akti - list of adopted spatial-plan acts, each linking to its PIS record (documents). */
.parcel-acts { list-style: none; margin: 0 0 .4rem; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.parcel-act-item {
    padding: .7rem .85rem;
    background: var(--bg); border: 1px solid var(--line); border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    display: flex; flex-direction: column; gap: .25rem;
}
.parcel-act-row { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.parcel-act-row .parcel-act-name { font-weight: 600; }
.parcel-act-badge {
    flex: none; font-size: .66rem; text-transform: uppercase; letter-spacing: .05em;
    padding: .1rem .45rem; border-radius: var(--radius-pill);
    color: var(--ink-mute); border: 1px solid var(--line);
}
.parcel-act-badge.is-valid { color: #1a7f37; background: rgba(26, 127, 55, .1); border-color: rgba(26, 127, 55, .3); }
.parcel-act-sub { font-size: .8rem; color: var(--ink-mute); }
.parcel-act-link {
    font-size: .85rem; font-weight: 600; color: var(--accent-ink); text-decoration: none; margin-top: .15rem;
}
.parcel-act-link:hover { border-bottom-color: currentColor; }

/* komunalna oprema (GJI) tab */
.parcel-utils th { width: 62%; }
.parcel-utils td { text-align: right; vertical-align: top; }
.parcel-util-name { display: flex; align-items: center; gap: .45rem; font-weight: 600; }
.parcel-util-dot { flex: none; width: .6rem; height: .6rem; border-radius: var(--radius-pill); box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); }
.parcel-util-sub { display: block; font-size: .78rem; color: var(--ink-mute); font-weight: 400; margin-top: .15rem; }
.parcel-util-badge {
    display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .02em; white-space: nowrap;
    padding: .18rem .55rem; border-radius: var(--radius-pill); font-variant-numeric: tabular-nums;
    color: var(--ink-soft); border: 1px solid var(--line);
}
/* ── Dostopnost (access to a public road) ────────────────────────────────────────────────────────
   A three-state verdict, so it gets a colour rather than a badge: green/amber/red must be readable
   without reading a word. The green matches .parcel-util-badge.is-on so the report keeps one palette. */
.parcel-access {
    border-left: 3px solid var(--line); border-radius: var(--radius);
    padding: .6rem .75rem; background: var(--bg-elev);
}
.parcel-access-summary { font-weight: 700; }
.parcel-access-detail { margin: .3rem 0 0; font-size: .92rem; color: var(--ink-soft); }
.parcel-access.is-ok { border-left-color: #1a7f37; background: rgba(26, 127, 55, .07); }
.parcel-access.is-ok .parcel-access-summary { color: #1a7f37; }
.parcel-access.is-warn { border-left-color: #a5690a; background: rgba(165, 105, 10, .08); }
.parcel-access.is-warn .parcel-access-summary { color: #a5690a; }
.parcel-access.is-bad { border-left-color: #b02a20; background: rgba(176, 42, 32, .08); }
.parcel-access.is-bad .parcel-access-summary { color: #b02a20; }
/* the verdict repeated in the accordion header, so it reads while collapsed */
.parcel-access-pill {
    display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .02em; white-space: nowrap;
    padding: .18rem .55rem; border-radius: var(--radius-pill); color: var(--ink-soft); border: 1px solid var(--line);
}
.parcel-access-pill.is-ok { color: #1a7f37; background: rgba(26, 127, 55, .1); border-color: rgba(26, 127, 55, .3); }
.parcel-access-pill.is-warn { color: #a5690a; background: rgba(165, 105, 10, .1); border-color: rgba(165, 105, 10, .3); }
.parcel-access-pill.is-bad { color: #b02a20; background: rgba(176, 42, 32, .1); border-color: rgba(176, 42, 32, .3); }

/* ── Omejitve na parceli: varovalni pasovi infrastrukture · vodno in priobalno zemljišče ─────────
   One card shape for both (ProtectedCorridorBlock / WaterProtectionBlock). It deliberately does NOT
   reuse the Dostopnost verdict slab: that block is one sentence, while these carry a verdict, three
   figures, several rows and a legal explanation, and washing all of it in one colour made a section
   that shouted before it said anything. Here the colour is a 3 px edge plus a chip, the numbers a
   reader acts on stand on their own, and the long legal text sits behind a disclosure.
   A card is only coloured when a belt actually reaches the parcel - "a regional road is 90 m away"
   is context, and painting it amber would cry wolf on most plots in the country. */
.parcel-cbox {
    margin: 0 0 .9rem; padding: .7rem .8rem .75rem;
    border: 1px solid var(--line); border-left: 3px solid var(--line);
    border-radius: var(--radius); background: var(--bg-elev);
}
/* Toned states carry the same tint as the Dostopnost card right above them (and as the PDF), so the
   three verdicts in one report read as one traffic light rather than three conventions. The stat tiles
   keep their own white ground on top of it, which is what stops the tint turning into a slab. */
.parcel-cbox.is-ok { border-left-color: #1a7f37; background: rgba(26, 127, 55, .07); }
.parcel-cbox.is-warn { border-left-color: #a5690a; background: rgba(165, 105, 10, .08); }
.parcel-cbox.is-bad { border-left-color: #b02a20; background: rgba(176, 42, 32, .08); }
.parcel-cbox-head { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; }
.parcel-cbox-title {
    font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: var(--ink-mute);
}
.parcel-cbox-head > :last-child { margin-left: auto; }
.parcel-cbox-lead { margin: .3rem 0 0; font-weight: 700; font-size: 1rem; line-height: 1.35; }
.parcel-cbox.is-ok .parcel-cbox-lead { color: #1a7f37; }
.parcel-cbox.is-warn .parcel-cbox-lead { color: #8a5708; }
.parcel-cbox.is-bad .parcel-cbox-lead { color: #97241b; }

/* The figures that answer "can I still build here?" - tabular, side by side, out of the prose. */
.parcel-cbox-stats { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.parcel-cbox-stat {
    flex: 1 1 8.5rem; padding: .4rem .55rem; border: 1px solid var(--line);
    border-radius: var(--radius); background: var(--bg);
}
.parcel-cbox-stat b { display: block; font-size: .95rem; font-variant-numeric: tabular-nums; }
.parcel-cbox-stat span { display: block; margin-top: .1rem; font-size: .72rem; color: var(--ink-mute); }

.parcel-cbox-rows { margin-top: .65rem; }
.parcel-cbox-row {
    display: flex; align-items: flex-start; gap: .5rem;
    padding: .45rem 0; border-top: 1px solid var(--line);
}
.parcel-cbox-row:first-child { border-top: 0; padding-top: .1rem; }
.parcel-cbox-dot {
    flex: none; width: .55rem; height: .55rem; margin-top: .32rem; border-radius: var(--radius-pill);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .15);
}
.parcel-cbox-main { flex: 1 1 auto; min-width: 0; }
.parcel-cbox-name { font-weight: 600; }
.parcel-cbox-meta { display: block; font-size: .78rem; color: var(--ink-mute); margin-top: .1rem; line-height: 1.4; }
.parcel-cbox-law { display: block; font-size: .72rem; color: var(--ink-mute); margin-top: .1rem; }
.parcel-cbox-row .parcel-util-badge { flex: none; margin-top: .1rem; }

/* The legal explanation: read once, then out of the way. */
.parcel-cbox-more { margin-top: .55rem; }
.parcel-cbox-more > summary {
    cursor: pointer; font-size: .82rem; font-weight: 600; color: var(--ink-soft);
    list-style: none; display: inline-flex; align-items: center; gap: .3rem;
}
.parcel-cbox-more > summary::-webkit-details-marker { display: none; }
.parcel-cbox-more > summary::before { content: "▸"; font-size: .7rem; }
.parcel-cbox-more[open] > summary::before { content: "▾"; }
.parcel-cbox-more p { margin: .4rem 0 0; font-size: .88rem; color: var(--ink-soft); line-height: 1.5; }
.parcel-cbox-more .parcel-cbox-src { font-size: .78rem; color: var(--ink-mute); }

/* Kulturna dediščina in arheologija (HeritageBlock): register links under a unit, the "Kaj potrebuješ" list and
   the state-funding note inside the card. Hover underline comes from the global a:hover border - no text-decoration. */
.parcel-cbox-links { display: flex; flex-wrap: wrap; gap: .1rem .75rem; margin-top: .2rem; font-size: .76rem; }
.parcel-cbox-links a, .parcel-cbox-step-link { color: var(--accent-ink); font-weight: 600; text-decoration: none; }
.parcel-cbox-steps { margin-top: .65rem; padding-top: .55rem; border-top: 1px solid var(--line); }
.parcel-cbox-subtitle {
    display: block; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: var(--ink-mute);
}
.parcel-cbox-steps ol { margin: .35rem 0 0; padding-left: 1.2rem; }
.parcel-cbox-steps li { margin: .3rem 0; font-size: .88rem; line-height: 1.4; }
.parcel-cbox-step-who { color: var(--ink-soft); }
.parcel-cbox-step-link { margin-left: .35rem; font-size: .78rem; }
.parcel-cbox .parcel-zk { margin: .65rem 0 0; background: var(--bg); }

/* The row badges: a hit is the point of the whole section, the edge case is honestly hedged, and a
   non-constraining belt (javna pot, NN kabel) stays quiet so it cannot be mistaken for a problem. */
.parcel-util-badge.is-hit { color: #b02a20; background: rgba(176, 42, 32, .1); border-color: rgba(176, 42, 32, .35); font-weight: 700; }
.parcel-util-badge.is-edge { color: #a5690a; background: rgba(165, 105, 10, .1); border-color: rgba(165, 105, 10, .3); }
.parcel-util-badge.is-soft { color: var(--ink-soft); border-style: dashed; }

.parcel-util-badge.is-on { color: #1a7f37; background: rgba(26, 127, 55, .1); border-color: rgba(26, 127, 55, .3); }
.parcel-util-badge.is-off { color: var(--ink-mute); border-style: dashed; }
.parcel-util-speed { display: block; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }

/* pravni režimi (Režimi tab): kind badges */
.parcel-regimes td { text-align: right; vertical-align: top; }
.parcel-regime-badge {
    display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .02em; white-space: nowrap;
    padding: .18rem .55rem; border-radius: var(--radius-pill); border: 1px solid var(--line); color: var(--ink-soft);
}
.parcel-regime-natura2000 { color: #1a7f37; background: rgba(26, 127, 55, .1); border-color: rgba(26, 127, 55, .3); }
.parcel-regime-epo { color: #4d7c0f; background: rgba(77, 124, 15, .08); border-color: rgba(77, 124, 15, .3); }
.parcel-regime-arheologija { color: #9a3412; background: rgba(154, 52, 18, .08); border-color: rgba(154, 52, 18, .3); }
.parcel-regime-dediscina { color: #92400e; background: rgba(146, 64, 14, .08); border-color: rgba(146, 64, 14, .3); }

/* utility-line legend under the parcel map */
.parcel-map-legend { display: flex; flex-wrap: wrap; gap: .35rem .8rem; justify-content: center; }
.parcel-legend-item { display: inline-flex; align-items: center; gap: .35rem; font-size: .75rem; color: var(--ink-mute); }
.parcel-legend-swatch { flex: none; width: .95rem; height: 3px; border-radius: var(--radius); box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); }

/* expand-to-modal button pinned to the inline map's corner */
.parcel-map-zoom {
    position: absolute; top: .55rem; right: .55rem; z-index: 2;
    width: 2.1rem; height: 2.1rem; border-radius: var(--radius); cursor: pointer;
    border: 1px solid rgba(255, 255, 255, .45); background: rgba(10, 10, 10, .55); color: #fff;
    font-size: 1.05rem; line-height: 1; display: grid; place-items: center;
}
.parcel-map-zoom:hover { background: rgba(10, 10, 10, .78); }

/* full-size map modal (reuses the .task-modal shell) */
.parcel-map-modal-card { width: min(56rem, 100%); }
.parcel-map-modal-body {
    padding: 1rem 1.5rem 1.25rem; display: flex; flex-direction: column; gap: .6rem;
}
/* keep the square map within the viewport so the whole modal fits without scrolling */
.parcel-map-large { width: 100%; max-width: min(100%, 70vh); margin: 0 auto; }
.parcel-map-modal-tools { display: flex; align-items: center; gap: .45rem; flex-shrink: 0; }
.parcel-map-zoom-btn {
    width: 2.1rem; height: 2.1rem; border-radius: var(--radius); cursor: pointer;
    border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink);
    font-size: 1.15rem; font-weight: 700; line-height: 1; display: grid; place-items: center;
}
.parcel-map-zoom-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-ink); }
.parcel-map-zoom-btn:disabled { opacity: .4; cursor: default; }
.parcel-map-zoom-level {
    min-width: 2.7rem; text-align: center; font-size: .85rem; font-weight: 600;
    color: var(--ink-soft); font-variant-numeric: tabular-nums;
}

/* ---------- 3D parcel view (Plan3d.razor; scene in js/plan3d.js) ---------- */

.p3d-page { display: flex; flex-direction: column; gap: .5rem; }
/* Sandbox hint: shown when the scene is a generic flat plot (no parcel saved on the project yet). */
.p3d-generic-note {
    display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
    padding: .65rem .9rem; border: 1px solid var(--accent);
    border-left: 3px solid var(--accent); border-radius: var(--radius);
    background: var(--accent-soft); color: var(--ink); font-size: .9rem;
}
.p3d-generic-ico { flex: none; font-size: 1.1rem; line-height: 1; }
/* message takes the room so the "Prikaži pravo parcelo" action sits at the end (wraps when tight) */
.p3d-generic-note > span:not(.p3d-generic-ico) { flex: 1 1 16rem; }
.p3d-generic-load { flex: none; white-space: nowrap; }
/* compact header: title left, the buttons on the right (#1399 - an intro stood there, and the buttons had a row of
   their own under it) → the map starts right under the title. The promo of a locked paket keeps its intro there. */
.p3d-header {
    display: flex; align-items: flex-end; justify-content: space-between; gap: .5rem 1.5rem;
    flex-wrap: wrap; margin: 0 0 .25rem;
}
.p3d-header h1 { margin-bottom: 0; }
.p3d-header .phase-eyebrow-row { margin-bottom: .35rem; }
/* the bar ends at the page's right edge, so the Izvozi menu opens leftwards, into the page */
.p3d-header .p3d-export-pop { left: auto; right: 0; }
/* On the landscape spread the bar stays on the right page - no wider than half the header (the spine is its middle) -
   and when it wraps, its buttons gather at the outer edge. ≤999 px the spread is one sheet with no spine, and a bar
   that does not fit beside the title wraps under it, left, as before. */
@media (min-width: 1000px) {
    .journal-page-spread .p3d-header .p3d-toptools { max-width: calc(50% - 2rem); justify-content: flex-end; }
    .journal-page-spread .p3d-header .p3d-toolbar { justify-content: flex-end; }
}
/* the 3D view's footer (#1399): the one sentence the header's intro kept, under the map */
.p3d-footnote { margin: -.55rem 0 0; font-size: .74rem; line-height: 1.4; color: var(--ink-mute); }
.p3d-intro {
    margin: 0 0 .2rem; max-width: 36rem; font-size: .85rem; color: var(--ink-soft);
    line-height: 1.45;
}
.p3d-layout {
    --p3d-h: 950px; /* FIXED map height */
    /* single column: the old side panel moved INTO the map (menubar + on-map cards) */
    display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem;
    align-items: start;
}
.p3d-canvas-wrap {
    position: relative; border: 1px solid var(--line); border-radius: var(--radius));
    overflow: hidden; background: #dce9f5; /* matches the scene's sky color while WebGL boots */
    height: var(--p3d-h, 950px);
}
.p3d-canvas { display: block; width: 100%; height: 100%; touch-action: none; }
/* Focused via click to capture keyboard shortcuts (arrows/Q/E) — suppress the focus ring on the viewport. */
.p3d-canvas:focus, .p3d-canvas:focus-visible { outline: none; }

/* ── Tloris 2D (Notranjost → Tloris): a plain 2D canvas laid OVER the WebGL one. The host stays in the
   DOM whether or not the view is on (display:none while off) so Blazor never has to add or remove it
   and the ElementReference the JS holds stays valid; the WebGL loop is parked while it is up. */
/* No z-index on purpose: it must paint OVER the WebGL canvas (which is not positioned) but UNDER the
   map chrome that follows it in the markup - the etaža rail, the editor cards, the hint strip and the
   menubar all sit later in the DOM (or carry their own z-index), so plain source order does it. */
.p3d-plan2d-host { position: absolute; inset: 0; display: none; }
.p3d-plan2d-host.is-on { display: block; }
.p3d-plan2d { display: block; width: 100%; height: 100%; touch-action: none; }
.p3d-plan2d:focus, .p3d-plan2d:focus-visible { outline: none; }
/* zoom controls, bottom-right over the plan (same glassy pill as the map menubar) */
.p3d-plan2d-bar {
    position: absolute; right: .6rem; bottom: .6rem; display: inline-flex; overflow: hidden;
    border-radius: var(--radius); border: 1px solid rgba(255, 255, 255, .35);
    background: rgba(10, 10, 10, .58); backdrop-filter: blur(3px);
}
.p3d-plan2d-bar button {
    border: 0; background: transparent; color: #fff; font: inherit; font-size: .95rem; line-height: 1;
    padding: .34rem .62rem; cursor: pointer;
}
.p3d-plan2d-bar button + button { border-left: 1px solid rgba(255, 255, 255, .25); }
.p3d-plan2d-bar button:hover { background: rgba(255, 255, 255, .12); }
/* ── števec FPS + kakovost prikaza: a quiet chip bottom-right of the map, in 3D and over the tloris,
   also in full screen (it lives inside the wrap). The nodes are made by p3d/perf.js, never by Blazor.
   Under the izris overlay (z 12) and the loading veil (z 6) on purpose; the planview rule that strips
   every overlay takes it too. Dark glass like the other map chrome, so it needs no dark-theme twin. */
.p3d-perf {
    position: absolute; right: .6rem; bottom: .6rem; z-index: 5;
    display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; pointer-events: none;
}
.p3d-perf.is-2d { bottom: 3rem; }   /* stacked above the tloris' zoom buttons */
.p3d-perf > * { pointer-events: auto; }
.p3d-perf-chip {
    position: relative; display: inline-flex; align-items: center; gap: .3rem;
    min-height: 1.75rem; padding: .2rem .55rem; border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, .3); background: rgba(10, 10, 10, .5); color: #fff;
    font: inherit; font-size: .7rem; font-variant-numeric: tabular-nums; line-height: 1;
    white-space: nowrap; cursor: pointer; opacity: .78; backdrop-filter: blur(3px);
}
.p3d-perf-chip::after { content: ""; position: absolute; inset: -.5rem; }   /* a finger-sized target */
.p3d-perf-chip:hover, .p3d-perf-chip:focus-visible, .p3d-perf-chip[aria-expanded="true"] { opacity: 1; }
.p3d-perf.is-reduced .p3d-perf-chip { border-color: rgba(255, 196, 87, .85); }
.p3d-perf-note { color: #ffd98a; }
.p3d-perf-note:empty { display: none; }
.p3d-perf-pop {
    display: flex; flex-direction: column; gap: .12rem;
    width: 16.5rem; max-width: calc(100vw - 2rem); padding: .4rem; border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, .22); background: rgba(10, 10, 10, .96); color: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .45); font-size: .78rem; line-height: 1.35;
}
.p3d-perf-pop[hidden] { display: none; }
.p3d-perf-h {
    padding: .15rem .45rem .25rem; font-size: .66rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .05em; color: rgba(255, 255, 255, .62);
}
.p3d-perf-opt {
    display: flex; align-items: baseline; justify-content: space-between; gap: .6rem;
    min-height: 2.25rem; padding: .35rem .45rem .35rem 1.5rem; position: relative;
    border: 0; border-radius: var(--radius); background: transparent; color: #fff;
    font: inherit; text-align: left; cursor: pointer;
}
.p3d-perf-opt:hover, .p3d-perf-opt:focus-visible { background: rgba(255, 255, 255, .12); }
.p3d-perf-opt[aria-checked="true"]::before {
    content: "✓"; position: absolute; left: .45rem; top: 50%; transform: translateY(-50%); color: #ffd98a;
}
.p3d-perf-opt-l { font-weight: 600; }
.p3d-perf-opt-h { font-size: .68rem; color: rgba(255, 255, 255, .6); white-space: nowrap; }
.p3d-perf-state, .p3d-perf-gpu { margin: 0; padding: .3rem .45rem 0; font-size: .7rem; color: rgba(255, 255, 255, .78); }
.p3d-perf-state { margin-top: .2rem; border-top: 1px solid rgba(255, 255, 255, .16); }
.p3d-perf-gpu { padding-bottom: .15rem; color: rgba(255, 255, 255, .55); overflow-wrap: anywhere; }
/* The strips centred along the bottom edge (edit hints, the walk HUD) keep clear of the chip. */
.p3d-canvas-wrap:has(> .p3d-perf) .p3d-hint { max-width: min(94%, calc(100% - 12rem)); }
.p3d-canvas-wrap:has(> .p3d-perf) .p3d-walkbar { max-width: min(92%, 62rem, calc(100% - 12rem)); }
.p3d-canvas-wrap:has(> .p3d-perf.is-reduced) .p3d-hint { max-width: min(94%, calc(100% - 24rem)); }
.p3d-canvas-wrap:has(> .p3d-perf.is-reduced) .p3d-walkbar { max-width: min(92%, 62rem, calc(100% - 24rem)); }
@media (max-width: 760px) {
    /* No room for the words beside the number: the amber border says "reduced", the menu says why. */
    .p3d-perf-note { display: none; }
    .p3d-canvas-wrap:has(> .p3d-perf.is-reduced) .p3d-hint { max-width: min(94%, calc(100% - 12rem)); }
    .p3d-canvas-wrap:has(> .p3d-perf.is-reduced) .p3d-walkbar { max-width: min(92%, calc(100% - 12rem)); }
}
/* spinner overlay while the WebGL scene boots (terrain decode, meshes, first render) */
.p3d-canvas-loading {
    position: absolute; inset: 0; z-index: 6; display: flex; align-items: center;
    justify-content: center; gap: .7rem; background: rgba(220, 233, 245, .85);
    color: var(--ink-soft); font-size: .92rem; font-weight: 600;
}
/* Photoreal path-traced render overlay (Features:Plan3dRender) — covers the canvas while rendering */
.p3d-render-overlay {
    position: absolute; inset: 0; z-index: 12; display: flex; flex-direction: column;
    background: rgba(14, 20, 28, .93); color: #eef3f8;
}
.p3d-render-head {
    flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between;
    padding: .5rem .8rem; border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.p3d-render-title { font-weight: 700; font-size: .95rem; }
.p3d-render-x {
    background: transparent; border: 0; color: #cdd6df; font-size: 1.05rem; line-height: 1;
    cursor: pointer; padding: .2rem .45rem; border-radius: var(--radius);
}
.p3d-render-x:hover { background: rgba(255, 255, 255, .12); color: #fff; }
/* Shrani PNG / AI dodelava, in the head next to the count. They act on the picture on the stage, so
   they sit with the title rather than in the strip of thumbnails - and the bottom bar, which had grown
   to seven buttons, is down to the one that only applies to the montage flow. */
.p3d-render-headbtn {
    flex: 0 0 auto; margin-right: .4rem; padding: .25rem .6rem; border-radius: var(--radius); cursor: pointer;
    font: inherit; font-size: .76rem; font-weight: 600; white-space: nowrap;
    background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .25); color: #eef3f8;
}
.p3d-render-headbtn:hover { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .45); }
.p3d-render-headbtn.is-ai { background: rgba(47, 125, 224, .35); border-color: rgba(103, 168, 255, .6); }
.p3d-render-headbtn.is-ai:hover { background: rgba(47, 125, 224, .55); }
/* …and the count then stops being the thing that pushes them right. */
.p3d-render-head .p3d-render-count { margin-right: .6rem; }
/* The two izris dials (size, GPU share). Sliders, not presets: the numbers behind them are continuous
   and the cost is a smooth curve, so a stepped control would only be pretending otherwise. Each carries
   its value in the heading and what it costs underneath, since that is the whole decision. */
.p3d-render-sliders { display: flex; flex-direction: column; gap: .55rem; width: 100%; max-width: 30rem; }
.p3d-render-slider { display: flex; flex-direction: column; gap: .15rem; font-size: .78rem; }
.p3d-render-slider-head { display: flex; justify-content: space-between; gap: .5rem; color: #cdd6df; }
.p3d-render-slider-head b { color: #fff; font-variant-numeric: tabular-nums; }
.p3d-render-slider input[type="range"] { width: 100%; accent-color: #2f7de0; margin: 0; }
.p3d-render-slider-hint { font-size: .68rem; color: #8b9aa8; }

/* Naming an izris: the field replaces the status line in the bar, so the picture keeps the stage. */
.p3d-render-name {
    flex: 1 1 auto; min-width: 0; margin-right: .5rem;
    background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .25);
    border-radius: var(--radius); color: #eef3f8; font: inherit; font-size: .8rem; padding: .3rem .55rem;
}
.p3d-render-name::placeholder { color: #8b9aa8; }
.p3d-render-name:focus { outline: none; border-color: #2f7de0; background: rgba(255, 255, 255, .14); }
/* How many izrisi the project holds, out of what it may keep - next to the title. */
.p3d-render-count { font-size: .75rem; color: #9fb0c0; margin-left: auto; margin-right: .6rem; }
/* The gallery strip along the bottom: every izris this project holds, newest first, drawn from the
   thumbnails that came with the list. "+ Nov izris" leads it, so making another one is always one
   click away from looking at the old ones. */
.p3d-render-gallery {
    flex: 0 0 auto; display: flex; gap: .4rem; align-items: stretch; overflow-x: auto;
    padding: .45rem .6rem; border-top: 1px solid rgba(255, 255, 255, .12);
    background: rgba(0, 0, 0, .25); scrollbar-width: thin;
}
.p3d-render-newbtn, .p3d-render-thumb {
    flex: 0 0 auto; position: relative; padding: 0; cursor: pointer; overflow: hidden;
    border-radius: var(--radius); border: 1px solid rgba(255, 255, 255, .18);
    background: rgba(255, 255, 255, .06); color: #cdd6df;
}
.p3d-render-newbtn {
    width: 96px; height: 68px; display: flex; flex-direction: column; gap: .15rem;
    align-items: center; justify-content: center; font: inherit; font-size: .7rem; font-weight: 600;
    border-style: dashed;
}
.p3d-render-newbtn span { font-size: .68rem; }
.p3d-render-newbtn:hover:not(:disabled), .p3d-render-thumb:hover:not(:disabled) {
    border-color: rgba(255, 255, 255, .5); color: #fff;
}
.p3d-render-newbtn:disabled, .p3d-render-thumb:disabled { opacity: .5; cursor: not-allowed; }
.p3d-render-newbtn.is-sel, .p3d-render-thumb.is-sel {
    border-color: #2f7de0; box-shadow: 0 0 0 2px rgba(47, 125, 224, .45);
}
.p3d-render-thumb { width: 96px; height: 68px; }
.p3d-render-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.p3d-render-thumb-blank {
    display: flex; width: 100%; height: 100%; align-items: center; justify-content: center;
    font-size: 1.2rem; color: rgba(255, 255, 255, .35);
}
/* Zunanji / Notranji (+ AI): what the card is, read at a glance on top of the image. */
.p3d-render-thumb-tag {
    position: absolute; left: 0; right: 0; bottom: 0; padding: .1rem .25rem;
    font-size: .58rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase;
    color: #fff; background: linear-gradient(to top, rgba(0, 0, 0, .8), rgba(0, 0, 0, 0));
}
/* Per-card tools. The card is a <button>, so these are siblings laid over its top-right corner rather
   than children - a button inside a button is invalid HTML. Hidden until the card is hovered or holds
   the selection, so the strip stays a strip of pictures and not a strip of toolbars. */
.p3d-render-card { position: relative; flex: 0 0 auto; display: flex; }
.p3d-render-tools {
    position: absolute; top: 3px; right: 3px; display: flex; gap: 2px;
    opacity: 0; transition: opacity .12s ease; pointer-events: none;
}
.p3d-render-card:hover .p3d-render-tools,
.p3d-render-card:focus-within .p3d-render-tools { opacity: 1; pointer-events: auto; }
.p3d-render-tool {
    width: 20px; height: 20px; display: flex; align-items: center; justify-content: center;
    padding: 0; border-radius: var(--radius); cursor: pointer; font-size: .68rem; line-height: 1;
    background: rgba(10, 15, 22, .82); border: 1px solid rgba(255, 255, 255, .3); color: #eef3f8;
}
.p3d-render-tool:hover { background: rgba(10, 15, 22, .95); border-color: rgba(255, 255, 255, .6); }
.p3d-render-tool.is-del:hover { background: rgba(214, 69, 69, .85); border-color: rgba(255, 140, 140, .8); }
/* Touch has no hover, so there the tools are simply always visible. */
@media (hover: none) {
    .p3d-render-tools { opacity: 1; pointer-events: auto; }
}
/* Deleting an izris is destructive and permanent: the action reads as such rather than as one more grey button. */
.p3d-render-bar .btn.p3d-render-del:hover:not(:disabled) { background: rgba(214, 69, 69, .35); border-color: rgba(255, 140, 140, .6); }
/* The render the AI pass would work from, plus what it will do. */
.p3d-render-empty {
    max-width: 560px; display: flex; flex-direction: column; gap: .6rem;
    align-items: center; text-align: center;
}
.p3d-render-empty-thumb {
    max-width: 100%; max-height: 46vh; border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, .18); box-shadow: 0 6px 22px rgba(0, 0, 0, .4);
}
.p3d-render-stage {
    flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center;
    padding: .6rem; overflow: hidden;
}
.p3d-render-img {
    max-width: 100%; max-height: 100%; width: auto; height: auto;
    border-radius: var(--radius); box-shadow: 0 6px 24px rgba(0, 0, 0, .5);
}
.p3d-render-wait {
    display: flex; align-items: center; gap: .7rem; color: #cdd6df; font-size: .9rem;
    text-align: center; padding: 1rem;
}
.p3d-render-bar {
    flex: 0 0 auto; display: flex; align-items: center; gap: .7rem; flex-wrap: wrap;
    padding: .55rem .8rem; border-top: 1px solid rgba(255, 255, 255, .12);
}
.p3d-render-progress {
    flex: 1 1 160px; height: 8px; min-width: 120px; background: rgba(255, 255, 255, .15);
    border-radius: var(--radius-pill); overflow: hidden;
}
.p3d-render-progress-fill {
    height: 100%; width: 0; background: linear-gradient(90deg, #4ea1ff, #35d07f);
    border-radius: var(--radius-pill); transition: width .25s ease;
}
.p3d-render-status { font-size: .82rem; color: #cdd6df; }
.p3d-render-err { color: #ff9a8a; font-weight: 600; }
.p3d-render-actions { display: flex; align-items: center; gap: .4rem; margin-left: auto; }
/* the overlay sits on a dark backdrop, so the toolbar buttons need light-on-dark styling */
.p3d-render-bar .btn {
    background: rgba(255, 255, 255, .1); color: #eef3f8; border: 1px solid rgba(255, 255, 255, .28);
}
.p3d-render-bar .btn:hover:not(:disabled) { background: rgba(255, 255, 255, .2); color: #fff; }
.p3d-render-bar .btn:disabled { opacity: .5; }
.p3d-render-bar .btn-primary { background: #2f7de0; border-color: #2f7de0; color: #fff; }
.p3d-render-bar .btn-primary:hover:not(:disabled) { background: #2b6fc7; }
/* live progressive preview: JS creates the accumulation canvas inside the host div; in montage
   mode the photo sits under the transparent canvas. Both are centred with the same max box and
   share the photo's aspect, so they overlap exactly. */
.p3d-render-live {
    position: relative; width: 100%; height: 100%; min-height: 0;
    display: flex; align-items: center; justify-content: center;
}
/* The montage photo sits UNDER the traced canvas, so the house appears ON the photo as samples land.
   Both z-indexes are explicit and both are needed. The photo is absolutely positioned and the canvas
   is not (the host is display:contents, so the canvas is a plain flex child) - and in CSS painting
   order a positioned element with z-index:auto paints ABOVE a non-positioned one regardless of source
   order. So the photo covered the render: the preview showed the photo with the izris hidden behind
   it, which reads as "the render is not happening". */
.p3d-render-live-bg {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    max-width: 100%; max-height: 100%; border-radius: var(--radius); z-index: 0;
}
.p3d-render-live-host { display: contents; } /* the JS canvas becomes a direct flex child for sizing */
/* ...and the canvas needs a position of its own for z-index to apply to it at all.
   NOTE the selector is on the HOST, not on .p3d-render-live: display:contents removes the
   host's box so the canvas lays out as a flex child of .p3d-render-live, but selectors match
   the DOM tree, not the box tree - the canvas is still a DOM child of the host. */
.p3d-render-live-host > canvas { position: relative; z-index: 1; }
/* loader over the live preview while the scene + BVH are still building and no sample has landed
   yet (the host canvas stays blank until the first accumulation frame). Reuses the btn-spin keyframe. */
.p3d-render-loader {
    position: absolute; inset: 0; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: .8rem; pointer-events: none;
    color: #eef3f8; font-size: .9rem; text-align: center;
    /* above the canvas, which now carries z-index 1 - otherwise the loader paints underneath it and
       is only visible by luck, i.e. for as long as the blank canvas happens to be transparent. */
    z-index: 2;
}
.p3d-render-loader-ring {
    width: 42px; height: 42px; border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, .22); border-top-color: #4ea1ff;
    animation: btn-spin .8s linear infinite;
}
.p3d-render-loader-text { max-width: 24ch; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
/* quality preset radios on the setup step */
.p3d-render-quality {
    display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; justify-content: center;
    font-size: .85rem; color: #eef3f8;
}
.p3d-render-quality-label { color: #cdd6df; }
.p3d-render-quality label { display: inline-flex; align-items: center; gap: .3rem; cursor: pointer; }
.p3d-render-quality input { accent-color: #4ea1ff; }
/* setup step: optional user photo as the montage background */
.p3d-render-setup { flex-direction: column; overflow-y: auto; }
.p3d-render-setup-box {
    max-width: 580px; display: flex; flex-direction: column; gap: .65rem;
    align-items: center; text-align: center;
}
.p3d-render-setup-lead { margin: 0; font-size: .95rem; line-height: 1.45; }
.p3d-render-hint { margin: 0; font-size: .82rem; color: #cdd6df; line-height: 1.45; }
.p3d-render-setup-actions { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center; }
.p3d-render-setup .btn {
    background: rgba(255, 255, 255, .1); color: #eef3f8; border: 1px solid rgba(255, 255, 255, .28);
}
.p3d-render-setup .btn:hover:not(:disabled):not(.disabled) { background: rgba(255, 255, 255, .2); color: #fff; }
.p3d-render-setup .btn:disabled { opacity: .5; }
.p3d-render-setup .btn-primary { background: #2f7de0; border-color: #2f7de0; }
.p3d-render-setup .btn-primary:hover:not(:disabled):not(.disabled) { background: #2b6fc7; }
.p3d-render-upload { cursor: pointer; margin: 0; }
.p3d-render-upload.disabled { opacity: .5; pointer-events: none; } /* = .p3d-render-setup .btn:disabled */
.p3d-render-bg-preview {
    max-width: min(100%, 420px); max-height: 34vh; border-radius: var(--radius);
    box-shadow: 0 6px 24px rgba(0, 0, 0, .5);
}
/* ghost-align mode: the photo floats semi-transparent over the live 3D view; clicks pass through
   to the canvas so the camera can still be orbited/zoomed while lining it up with the photo */
.p3d-render-ghost {
    position: absolute; inset: 0; z-index: 8; width: 100%; height: 100%;
    object-fit: contain; pointer-events: none;
}
.p3d-render-alignbar {
    position: absolute; left: 50%; bottom: .7rem; transform: translateX(-50%); z-index: 13;
    display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; justify-content: center;
    max-width: calc(100% - 1.2rem); padding: .5rem .7rem; border-radius: var(--radius);
    background: rgba(14, 20, 28, .92); color: #eef3f8; box-shadow: 0 6px 24px rgba(0, 0, 0, .4);
}
.p3d-render-align-text { font-size: .8rem; color: #cdd6df; }
.p3d-render-ghost-op { width: 90px; accent-color: #4ea1ff; }
.p3d-render-alignbar .btn {
    background: rgba(255, 255, 255, .1); color: #eef3f8; border: 1px solid rgba(255, 255, 255, .28);
}
.p3d-render-alignbar .btn:hover:not(:disabled) { background: rgba(255, 255, 255, .2); color: #fff; }
.p3d-render-alignbar .btn-primary { background: #2f7de0; border-color: #2f7de0; }
.p3d-render-alignbar .btn-primary:hover:not(:disabled) { background: #2b6fc7; }
/* browser fullscreen (⛶): the map fills the WHOLE screen (the 1000 px cap doesn't apply) */
.p3d-canvas-wrap:fullscreen { border: none; border-radius: 0; max-height: none; }
.p3d-canvas-wrap:fullscreen .p3d-canvas {
    width: 100vw; height: 100vh; max-height: none; min-height: 0;
}
/* fullscreen toggle: the LAST pill in the map menubar (shares .p3d-furncat-btn look, both views) */
.p3d-fs { padding-inline: .5rem; font-size: .95rem; line-height: 1; }

/* buttons above the map, in the header beside the title (#1399): the persistence toolbar + the parcel-entry /
   ravna-parcela bar */
.p3d-toptools {
    display: flex; align-items: center; justify-content: space-between; gap: .6rem .9rem;
    flex-wrap: wrap;
}
.p3d-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; }
.p3d-asof { font-size: .72rem; color: var(--ink-mute); margin-left: .15rem; }

/* CAD / 3D export dropdown (DXF / OBJ / STL) */
.p3d-export { position: relative; display: inline-block; }
.p3d-export-pop {
    position: absolute; top: calc(100% + 4px); left: 0; z-index: 30;
    display: flex; flex-direction: column; gap: .25rem; white-space: nowrap;
    background: var(--bg-elev); border: 1px solid var(--line-strong); border-radius: var(--radius);
    padding: .4rem; box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}
.p3d-export-pop .btn { justify-content: flex-start; }

/* resilience banner: upstream (GURS/ARSO) down → serving cached geometry / flat terrain */
.p3d-cachebanner {
    display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .9rem;
    margin-bottom: .7rem; padding: .55rem .8rem; border-radius: var(--radius);
    background: #f2f2f2; border: 1px solid #e6c98a; color: #6b4e16; font-size: .82rem;
}
.p3d-cachebanner-txt { flex: 1; min-width: 12rem; line-height: 1.4; }
.p3d-cachebanner .btn { white-space: nowrap; }

/* parcel-entry bar (above the map, "iščem parcelo" projects): k.o. + parc. št. inputs + reset */
.p3d-parcelbar {
    display: flex; align-items: center; gap: .4rem; flex-wrap: wrap;
    padding: .3rem .5rem; border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--bg-elev);
}
.p3d-parcelbar-lbl { font-size: .8rem; font-weight: 600; color: var(--ink-soft); }
.p3d-parcelbar-in {
    width: 8rem; max-width: 38vw; font: inherit; font-size: .82rem; color: var(--ink);
    padding: .25rem .45rem; border: 1px solid var(--line-strong); border-radius: var(--radius);
    background: var(--bg);
}
.p3d-parcelbar-err { font-size: .78rem; font-weight: 600; color: var(--danger, #c0392b); }

/* "Load the real parcel?" prompt - overlays the sandbox once a parcel is entered (iščem-parcelo) */
.p3d-askreal {
    position: absolute; inset: 0; z-index: 30;
    display: flex; align-items: center; justify-content: center;
    padding: 1rem; background: rgba(20, 20, 20, .45);
}
.p3d-askreal-card {
    max-width: 24rem; width: 100%; padding: 1.3rem 1.4rem; text-align: center;
    background: var(--bg-elev, #fff); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .3);
}
.p3d-askreal-t { font-size: 1.18rem; font-weight: 700; color: var(--ink); margin-bottom: .5rem; }
.p3d-askreal-txt { margin: 0 0 1.1rem; font-size: .9rem; line-height: 1.55; color: var(--ink-soft); }
.p3d-askreal-actions { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; }
.p3d-askreal-fine { margin: .9rem 0 0; font-size: .76rem; color: var(--ink-mute, #9a9a9a); }

/* auto-tour buttons on the map, right of the osončenost card (overlay) */
/* Zunanjost ⇄ Notranjost segmented switch - anchors the left edge of the map menubar. */
.p3d-interior-seg {
    display: inline-flex; pointer-events: auto; border-radius: var(--radius); overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .35); background: rgba(10, 10, 10, .58); backdrop-filter: blur(3px);
}
.p3d-iseg {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .32rem .7rem; border: 0; background: transparent; color: #fff; font: inherit;
    font-size: .76rem; font-weight: 600; line-height: 1.1; cursor: pointer; white-space: nowrap;
}
.p3d-iseg .p3dico { width: .9rem; height: .9rem; }
.p3d-iseg + .p3d-iseg { border-left: 1px solid rgba(255, 255, 255, .25); }
.p3d-iseg:hover { background: rgba(255, 255, 255, .12); }
.p3d-iseg.is-active { background: var(--accent); color: #fff; }
/* Below a wide screen the view switch says Zunanjost / Notranjost / Tloris - the icons already tell 3D from
   2D. With the suffixes the menubar wrapped at 1280 px and put Pogledi mid-scene, where its menu covered the
   house; without them Pogledi stays on the first row, at the right. */
@media (max-width: 1439px) { .p3d-iseg-dim { display: none; } }
/* etaža toggle chip (the vertical rail, top floor first; multi-select) */
.p3d-istorey {
    padding: .28rem .65rem; border: 1px solid rgba(255, 255, 255, .35); border-radius: var(--radius);
    background: rgba(10, 10, 10, .58); color: #fff; font: inherit; font-size: .73rem; text-align: left;
    font-weight: 600; line-height: 1.1; cursor: pointer; white-space: nowrap; backdrop-filter: blur(3px);
}
.p3d-istorey::before { content: "○ "; opacity: .8; }
.p3d-istorey:hover { background: rgba(10, 10, 10, .78); }
.p3d-istorey.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.p3d-istorey.is-active::before { content: "● "; opacity: 1; }

/* Interior window editor card (right side, below the rotation dials). */
.p3d-winedit {
    position: absolute; top: calc(3.1rem + 96px); right: .65rem; width: 13rem; z-index: 4; pointer-events: auto;
    display: flex; flex-direction: column; gap: .4rem; padding: .6rem .7rem; border-radius: var(--radius);
    background: rgba(10, 10, 10, .72); color: #fff; backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, .25);
}
.p3d-winedit-head { display: flex; align-items: center; justify-content: space-between; gap: .4rem; }
.p3d-winedit-title { font-size: .82rem; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p3d-winedit-head-btns { display: flex; align-items: center; gap: .35rem; flex: 0 0 auto; } /* lock / delete / close icons */
.p3d-winedit-x { border: 0; background: transparent; color: #fff; font-size: .9rem; cursor: pointer; opacity: .8; line-height: 1; padding: 0; }
.p3d-winedit-x:hover:not(:disabled) { opacity: 1; }
.p3d-winedit-x:disabled { opacity: .3; cursor: default; }
.p3d-winedit-x.is-locked { opacity: 1; } /* locked lock icon stays prominent */
.p3d-winedit-sub { font-size: .68rem; opacity: .85; margin-top: -.2rem; }
/* "Poenoti odprtine na tej steni" - drops the stored sizes so a wall's openings take the house style
   again. A quiet outline button: it is a repair, not something you reach for every session. */
.p3d-winedit-reset {
    margin-top: .3rem; padding: .28rem .5rem; width: 100%;
    border: 1px solid rgba(255, 255, 255, .35); border-radius: var(--radius);
    background: transparent; color: #fff; font: inherit; font-size: .7rem; cursor: pointer;
}
.p3d-winedit-reset:hover { background: rgba(255, 255, 255, .12); }
.p3d-winedit-row { display: flex; flex-direction: column; gap: .15rem; font-size: .72rem; }
.p3d-winedit-row > span { display: flex; justify-content: space-between; gap: .5rem; }
.p3d-winedit-row input[type=range] { width: 100%; accent-color: var(--accent); }
/* Stena (#1228): »Do stropa« is a switch on its own line - the label and its tick side by side, not stacked */
.p3d-winedit-row.p3d-wall-full { flex-direction: row; align-items: center; justify-content: space-between; }
.p3d-winedit-row.p3d-wall-full input[type=checkbox] { accent-color: var(--accent); width: 1rem; height: 1rem; margin: 0; }
.p3d-winedit-actions { display: flex; justify-content: flex-end; margin-top: .15rem; }
.p3d-winedit-reset {
    padding: .25rem .6rem; border: 1px solid rgba(255, 255, 255, .35); border-radius: var(--radius);
    background: transparent; color: #fff; font: inherit; font-size: .72rem; font-weight: 600; cursor: pointer;
}
.p3d-winedit-reset:hover { background: rgba(255, 255, 255, .12); }
/* armed ("klikni steno, kamor želiš okno") - the button stays lit while the scene waits for the click */
.p3d-winedit-reset.is-armed {
    background: var(--accent); border-color: var(--accent); color: #fff;
    animation: p3d-arm-pulse 1.6s ease-in-out infinite;
}
@keyframes p3d-arm-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .72; } }
/* A lamp's switch: warm and lit while the lamp is on, a plain outline when it is off. */
.p3d-lampswitch.is-on { background: #ffcf8a; border-color: #ffcf8a; color: #2a1700; }
.p3d-lampswitch.is-on:hover { background: #ffdca6; }
/* Polkna: odprta / zaprta - two halves of one switch, the current state lit. */
.p3d-winedit-seg { display: flex; gap: .3rem; }
.p3d-winedit-seg > .p3d-winedit-reset { flex: 1; margin-top: 0; width: auto; }
.p3d-winedit-seg > .p3d-winedit-reset.is-on { background: var(--accent); border-color: var(--accent); }
.p3d-winedit-actions { gap: .35rem; }
.p3d-winedit-remove {
    padding: .25rem .6rem; border: 1px solid rgba(255, 120, 100, .55); border-radius: var(--radius);
    background: transparent; color: #ffb4a6; font: inherit; font-size: .72rem; font-weight: 600; cursor: pointer;
}
.p3d-winedit-remove:hover { background: rgba(255, 90, 70, .18); }

/* Etaža chip m² suffix + room-card area line. */
.p3d-istorey-m2 { font-weight: 400; opacity: .85; font-size: .66rem; }
/* Obnova stanovanja (#1186 A2): a flat on one etaža heads its list with the etaža's name - nothing to toggle. */
.p3d-istorey.p3d-istorey-static { cursor: default; }
.p3d-istorey.p3d-istorey-static::before { content: none; }
/* »Mere stanovanja« (#1186 rule 18): the GURS figures and their source under the form. */
.p3d-flat-gurs { margin: .5rem 0 .15rem; font-weight: 600; }
.p3d-flat-source { margin: 0 0 .5rem; opacity: .75; }
.p3d-flatdims-fields { border: 0; margin: 0; padding: 0; min-width: 0; }
.p3d-flatdims-fields:disabled { opacity: .8; }
/* The credit of a flat's GURS outline over Tloris 2D, bottom-left (the zoom pill is bottom-right). */
.p3d-plan2d-src {
    position: absolute; left: .6rem; bottom: .6rem; margin: 0; max-width: calc(100% - 9rem);
    padding: .15rem .45rem; border-radius: var(--radius); background: rgba(255, 255, 255, .82);
    color: #6a6a6a; font-size: .68rem; line-height: 1.25; pointer-events: none;
}
.p3d-intedit-area { margin-top: 0; }


/* Interior object editor - same placement as the window editor (they never show together). */
.p3d-intedit {
    position: absolute; top: calc(3.1rem + 96px); right: .65rem; width: 13rem; z-index: 4; pointer-events: auto;
    display: flex; flex-direction: column; gap: .4rem; padding: .6rem .7rem; border-radius: var(--radius);
    background: rgba(10, 10, 10, .72); color: #fff; backdrop-filter: blur(4px); border: 1px solid rgba(255, 255, 255, .25);
}
.p3d-intedit-name {
    width: 100%; padding: .25rem .4rem; border-radius: var(--radius); border: 1px solid rgba(255, 255, 255, .3);
    background: rgba(255, 255, 255, .1); color: #fff; font: inherit; font-size: .76rem;
}
/* As a SELECT the translucent white composites over the native white control (white-on-white) and the
   option list follows the page's light scheme - force a solid dark control + dark native dropdown. */
select.p3d-intedit-name {
    background: rgba(10, 10, 10, .85); color: #fff; color-scheme: dark;
}
select.p3d-intedit-name option { background: #2a1c08; color: #fff; }
.p3d-import-remove { margin-top: .1rem; }
/* "Odstrani uvožen model" sits on the DARK import card, where the app's default .btn (dark ink on a
   transparent ground) all but disappeared - it read as a dark block. Give it the same light, outlined
   treatment the other controls on this card use, with a red tint on hover because it is destructive. */
.p3d-import-remove .btn {
    width: 100%; justify-content: center;
    border: 1px solid rgba(255, 255, 255, .38); border-radius: var(--radius);
    background: rgba(255, 255, 255, .1); color: #fff; font-size: .74rem; font-weight: 600;
}
.p3d-import-remove .btn:hover {
    background: rgba(214, 90, 70, .3); border-color: rgba(255, 170, 155, .75); color: #fff;
}

/* Imported reference overlay (IFC/DXF) controls - top-right, the SAME anchor as the house tool
   panel (.p3d-mapcard) and the win/int editors: none of those can show while an import replaces the
   model, so the slot is free. Reuses the .p3d-winedit-* head/row/actions/reset styles. */
.p3d-import {
    position: absolute; top: calc(3.1rem + 96px); right: .65rem; width: 16.5rem; z-index: 4; pointer-events: auto;
    display: flex; flex-direction: column; gap: .4rem; padding: .6rem .7rem; border-radius: var(--radius);
    max-height: calc(100% - 3.1rem - 96px - .8rem); overflow-y: auto; overscroll-behavior: contain;
    background: rgba(8, 22, 40, .74); color: #fff; backdrop-filter: blur(4px); border: 1px solid rgba(255, 255, 255, .25);
}
.p3d-import-check { display: flex; align-items: center; gap: .4rem; font-size: .74rem; }
.p3d-import-check input { accent-color: var(--accent); }
/* selected imported element chip */
.p3d-import-sel { display: flex; align-items: center; gap: .35rem; padding: .3rem .4rem; border-radius: var(--radius);
    background: rgba(37, 99, 235, .28); border: 1px solid rgba(120, 170, 255, .5); }
.p3d-import-sel-name { flex: 1 1 auto; font-size: .74rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p3d-import-sel-btns { display: flex; gap: .1rem; flex: 0 0 auto; }
.p3d-import-sel-btns button, .p3d-import-grp-btns button, .p3d-import-el button {
    background: none; border: none; cursor: pointer; padding: .1rem .2rem; font-size: .82rem; line-height: 1; opacity: .85; }
.p3d-import-sel-btns button:hover, .p3d-import-grp-btns button:hover, .p3d-import-el button:hover { opacity: 1; }
.p3d-import-hint { font-size: .64rem; opacity: .7; line-height: 1.25; }
/* elements grouped by type */
.p3d-import-tree { display: flex; flex-direction: column; gap: .12rem; }
.p3d-import-tree-head { font-size: .66rem; letter-spacing: .04em; text-transform: uppercase; opacity: .6; margin-top: .15rem; }
.p3d-import-grp-h { display: flex; align-items: center; gap: .3rem; cursor: pointer; padding: .18rem .25rem; border-radius: var(--radius); font-size: .74rem; }
.p3d-import-grp-h:hover { background: rgba(255, 255, 255, .08); }
.p3d-import-grp-caret { flex: 0 0 auto; opacity: .7; width: .7rem; }
.p3d-import-grp-name { flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p3d-import-grp-count { flex: 0 0 auto; font-size: .64rem; opacity: .6; background: rgba(255, 255, 255, .12); border-radius: var(--radius-pill); padding: 0 .35rem; }
.p3d-import-grp-btns { flex: 0 0 auto; display: flex; gap: .05rem; }
.p3d-import-els { display: flex; flex-direction: column; padding-left: 1rem; }
.p3d-import-el { display: flex; align-items: center; gap: .2rem; border-radius: var(--radius); }
.p3d-import-el.sel { background: rgba(37, 99, 235, .3); }
.p3d-import-el-name { flex: 1 1 auto; text-align: left; background: none; border: none; color: inherit; cursor: pointer;
    font-size: .7rem; padding: .12rem .2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .9; }
.p3d-import-el-name:hover { opacity: 1; text-decoration: underline; }
.p3d-import-align { font-size: .72rem; margin-top: .15rem; }
.p3d-import-align > summary { cursor: pointer; opacity: .8; padding: .2rem 0; }
.p3d-import-align > summary:hover { opacity: 1; }
/* "Uvozi" is a <label> wrapping a hidden InputFile so a click opens the file dialog. */
.p3d-uvozi { cursor: pointer; }
/* while the scene loads it is inert exactly like its disabled <button> neighbours - real disabled
   .btn keeps its normal colours (author rules beat UA greying), so no opacity fade here either */
.p3d-uvozi.disabled { pointer-events: none; }
/* Map menubar - the single-row top strip in BOTH views: seg switch + category pills + menu pills.
   Everything top-anchored (top-left stack, dials, editor cards) sits below its 3.1rem line. */
/* z-index 10: ABOVE the menu backdrop (6) and the on-map cards (4). The bar is a stacking context, so
   its drop-down popovers can never rise above it on their own - at 5 they were painted under the
   backdrop and read as "hidden behind the 3D view". Still below the render overlay (12) / alignbar (13). */
.p3d-furnbar {
    position: absolute; left: 0; right: 0; top: 0; z-index: 10; pointer-events: none;
    display: flex; flex-direction: column; align-items: center; gap: .25rem;
    /* the taller bottom padding stretches the dark→transparent gradient into a softer band */
    padding: .4rem .6rem 1.6rem;
    background: linear-gradient(to bottom, rgba(10, 10, 10, .92), rgba(10, 10, 10, .5) 55%, transparent);
}
.p3d-furnbar-cats { display: flex; gap: .3rem; flex-wrap: wrap; justify-content: center; pointer-events: auto; }
/* Category pill: accented while its submenu is open OR while it holds the armed kind (menu closed).
   min-height keeps EVERY pill the same height - emoji glyphs (🪄 AI opis) grow the line box. */
.p3d-furncat { position: relative; }
.p3d-furncat-btn {
    display: inline-flex; align-items: center; gap: .25rem; font-size: .68rem; color: #ffffff;
    padding: .22rem .6rem; border-radius: var(--radius-pill); white-space: nowrap; cursor: pointer;
    min-height: 1.8rem;
    border: 1px solid rgba(255, 255, 255, .26); background: rgba(10, 10, 10, .55);
    backdrop-filter: blur(2px); transition: background .12s;
}
.p3d-furncat-btn:hover { background: rgba(10, 10, 10, .85); }
.p3d-furncat-btn.is-open, .p3d-furncat-btn.has-armed,
.p3d-furncat:hover > .p3d-furncat-btn { background: var(--accent); border-color: var(--accent); color: #1a1100; }
.p3d-furncat-caret { font-size: .55rem; opacity: .8; }
/* The submenu is always in the DOM: shown while the category (pill OR menu) is hovered, or pinned
   open by the pill's click-toggle (touch has no hover). */
.p3d-furnmenu {
    position: absolute; top: calc(100% + .3rem); left: 50%; transform: translateX(-50%); z-index: 7;
    display: none; flex-direction: column; gap: .12rem; min-width: 12rem; max-height: 60vh; overflow-y: auto;
    padding: .3rem; border-radius: var(--radius); border: 1px solid rgba(255, 255, 255, .22);
    background: rgba(10, 10, 10, .96); box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
}
.p3d-furncat:hover > .p3d-furnmenu, .p3d-furnmenu.is-open { display: flex; }
/* invisible bridge over the .3rem gap, present only WHILE hovering, so crossing pill → menu doesn't
   drop the :hover (a ::before inside the menu would be clipped by its overflow-y) */
.p3d-furncat:hover::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: .35rem; }
/* edge groups: keep the dropdown on-canvas instead of centring it off-screen */
.p3d-furncat:first-child .p3d-furnmenu { left: 0; transform: none; }
.p3d-furncat:last-child .p3d-furnmenu { left: auto; right: 0; transform: none; }
.p3d-furnmenu-item {
    display: flex; align-items: center; gap: .45rem; width: 100%; text-align: left;
    padding: .3rem .45rem; border: 0; border-radius: var(--radius); background: transparent; color: #fff;
    font-size: .72rem; cursor: pointer; white-space: nowrap;
}
.p3d-furnmenu-item:hover { background: rgba(255, 255, 255, .12); }
.p3d-furnmenu-item.is-active { background: var(--accent); color: #1a1100; }
/* A row that exists but cannot be used from this view (stropne luči outside the first-person view). */
.p3d-furnmenu-item:disabled { opacity: .45; cursor: default; }
.p3d-furnmenu-item:disabled:hover { background: transparent; }
/* Streha → what is already on the roof: a row = open its card + remove it (see Plan3d.razor). */
.p3d-roofel-row { padding: 0 .1rem 0 0; gap: 0; }
.p3d-roofel-open {
    display: flex; align-items: center; gap: .45rem; flex: 1 1 auto; min-width: 0;
    padding: .3rem .45rem; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.p3d-roofel-x { flex: 0 0 auto; padding: .2rem .35rem; border: 0; border-radius: var(--radius); background: transparent; color: inherit; font: inherit; cursor: pointer; opacity: .75; }
.p3d-roofel-x:hover { background: rgba(255, 90, 90, .35); opacity: 1; }
/* A sub-heading inside a catalog menu (Luči → Stropne luči). */
.p3d-furnmenu-sub {
    margin-top: .2rem; padding: .35rem .45rem .15rem; border-top: 1px solid rgba(255, 255, 255, .14);
    font-size: .62rem; letter-spacing: .04em; text-transform: uppercase; color: rgba(255, 255, 255, .7);
    white-space: nowrap;
}
/* One-colour <P3dIcon> per catalog kind (was a platform emoji): a fixed box so every row's
   label starts on the same x, and the glyph inherits the row colour incl. the .is-active flip. */
.p3d-furnmenu-ico { flex: 0 0 auto; display: inline-flex; width: 1rem; height: 1rem; }
.p3d-furnmenu-ico .p3dico { width: 100%; height: 100%; opacity: .9; }
.p3d-furnmenu-item:hover .p3d-furnmenu-ico .p3dico, .p3d-furnmenu-item.is-active .p3d-furnmenu-ico .p3dico { opacity: 1; }
/* AI-render enrichment knobs in the overlay bar (dark ground): quiet inline controls, never
   competing with the primary button beside them. */
.p3d-render-aiopts {
    display: inline-flex; align-items: center; gap: .9rem; flex-wrap: wrap;
    font-size: .78rem; color: #cdd6df;
}
.p3d-render-aiopts label { display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap; cursor: pointer; }
.p3d-render-aiopts select {
    background: rgba(255, 255, 255, .08); color: #eef3f8; border: 1px solid rgba(255, 255, 255, .25);
    border-radius: var(--radius); padding: .2rem .4rem; font: inherit;
}
.p3d-render-aiopts select option { background: #1c2733; color: #eef3f8; }

/* invisible click-away layer under the open submenu (the furnbar itself is pointer-events: none) */
.p3d-furnmenu-backdrop { position: fixed; inset: 0; z-index: 6; pointer-events: auto; }
/* Menu rows (Pogledi / Orodja) and headings carry a P3dIcon instead of an emoji: fixed box, so every
   label in a menu starts on the same x whether or not its row has a glyph. */
.p3d-mitem .p3dico, .p3d-mpop-h .p3dico { flex: 0 0 auto; opacity: .85; }
.p3d-mitem:hover .p3dico, .p3d-mitem.is-on .p3dico { opacity: 1; }
.p3d-mpop-h .p3dico { vertical-align: -2px; margin-right: .15rem; }
/* object glyph in the selected-object card heading */
.p3d-mapcard-ico { vertical-align: -2px; margin-right: .1rem; }


/* »Zasnova hiše« (NomiFac #1511; was »AI opis hiše«): the design form of a new house - a compact grid of
   values on the left, the live 3D preview of the house they describe on the right (plan3d.js
   housePreviewInit, the same builder as the plot). Below ~56rem the two stack, the preview first.
   The width is written on BOTH classes on purpose: the stock `.sub-modal { max-width: 32rem }` lives
   further down this file, so a single-class rule here loses the cascade to it. */
.sub-modal.p3d-ai-modal { max-width: min(76rem, 96vw); max-height: min(92vh, 58rem); overflow-y: auto; }
.p3d-ai-modal h2 { margin-bottom: .3rem; }
.p3d-design-lead { margin: 0 0 .75rem; font-size: .85rem; line-height: 1.45; color: var(--ink-soft); }
.p3d-design { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.p3d-design-form { min-width: 0; display: flex; flex-direction: column; gap: .5rem; }
/* one group: a caption and its fields in as many columns as fit - three or four at full width */
.p3d-dz { margin: 0; min-width: 0; padding: .35rem .6rem .55rem; border: 1px solid var(--line); border-radius: var(--radius); }
.p3d-dz > legend {
    padding: 0 .3rem; font-size: .68rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .04em; color: var(--ink-mute);
}
.p3d-dz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.25rem, 1fr)); gap: .4rem .6rem; align-items: end; }
.p3d-dz-f { display: flex; flex-direction: column; gap: .15rem; min-width: 0; font-size: .74rem; color: var(--ink-soft); }
.p3d-dz-f > select, .p3d-dz-f > input:not([type="checkbox"]) {
    width: 100%; min-width: 0; min-height: 2rem; padding: .2rem .35rem; font-size: .82rem; border-radius: var(--radius);
}
.p3d-dz-f > input[type="color"] {
    height: 2rem; padding: 0; cursor: pointer; border: 1px solid var(--line-strong); background: var(--bg-elev);
}
.p3d-dz-f > select:disabled { opacity: .55; }
.p3d-dz-c { display: flex; align-items: center; gap: .4rem; min-height: 2rem; font-size: .82rem; color: var(--ink); cursor: pointer; }
.p3d-dz-note { grid-column: 1 / -1; margin: 0; font-size: .72rem; color: var(--ink-mute); }
.p3d-dz-aux { display: flex; flex-wrap: wrap; gap: .3rem; padding-top: .1rem; }
.p3d-dz-chip {
    display: inline-flex; align-items: center; gap: .3rem; min-height: 2rem; padding: .15rem .55rem;
    border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--bg-elev);
    font-size: .78rem; color: var(--ink-soft); cursor: pointer;
}
.p3d-dz-chip.is-on { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.p3d-dz-chip.is-placed { cursor: default; opacity: .75; }
.p3d-dz-chip input { margin: 0; }
/* The preview stays in view while the form scrolls (the modal is the scroller). touch-action none:
   OrbitControls needs the drag, or a touch turns into a page scroll instead. */
.p3d-design-view { position: sticky; top: 0; min-width: 0; }
.p3d-design-canvas {
    display: block; width: 100%; aspect-ratio: 1 / 1; min-height: 16rem; max-height: 32rem;
    border: 1px solid var(--line); border-radius: var(--radius); touch-action: none; cursor: grab;
    background: linear-gradient(color-mix(in srgb, #9cc2e6 40%, var(--bg-elev)), var(--bg-elev) 75%);
}
.p3d-design-canvas:active { cursor: grabbing; }
.p3d-design-view .p3d-fill-k { margin-top: .35rem; }
@media (max-width: 56rem) {
    .p3d-design { grid-template-columns: 1fr; }
    .p3d-design-view { position: static; order: -1; }
    .p3d-design-canvas { aspect-ratio: 16 / 9; min-height: 11rem; max-height: 20rem; }
}
.p3d-ai-modal .sub-modal-actions { margin-top: 1rem; flex-wrap: wrap; align-items: center; }
/* Izbirnik izdelka (zbiralnik AQUAstay): the rotatable model on the left, what it is and what it
   costs on the right. Below ~60rem the two stack, model first - it is what the chooser is for. */
.sub-modal.p3d-prod-modal { max-width: min(60rem, 96vw); max-height: min(92vh, 48rem); overflow-y: auto; }
.p3d-prod { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 60rem) { .p3d-prod { grid-template-columns: 1fr; } }
.p3d-prod-view { min-width: 0; }
/* touch-action none: OrbitControls needs the drag, or a touch turns into a page scroll instead. */
.p3d-prod-canvas {
    display: block; width: 100%; aspect-ratio: 4 / 3; min-height: 15rem;
    border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev);
    touch-action: none; cursor: grab;
}
.p3d-prod-canvas:active { cursor: grabbing; }
.p3d-prod-view .p3d-fill-k { margin-top: .35rem; }
.p3d-prod-specs { min-width: 0; }
.p3d-prod-specs .p3d-ctl { margin-bottom: .5rem; }
.p3d-prod-modal .sub-modal-actions { margin-top: 1rem; }
/* Title row with a ✕ top right - the chooser also closes on the backdrop and Prekliči, but a big modal
   whose buttons sit below the fold needs the obvious way out where the eye starts. */
.p3d-prod-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.p3d-prod-head h2 { margin-bottom: .6rem; }
.p3d-prod-x {
    flex: none; background: none; border: 0; cursor: pointer; font-size: 1.15rem; line-height: 1;
    color: var(--ink-mute); padding: .3rem .4rem; margin: -.3rem -.4rem 0 0; border-radius: var(--radius);
}
.p3d-prod-x:hover { color: var(--ink); background: var(--line); }
/* Sončna elektrarna chooser: the okvirni predračun. Two columns only - what the part is (with its detail
   wrapping underneath) and the euros, which never wrap - so it still reads at phone width, where the
   modal stacks and this table gets the full width of a 360px screen. */
.p3d-prod-specs .p3d-check { margin: .1rem 0 .15rem; }
.p3d-solar-price { width: 100%; border-collapse: collapse; margin: .6rem 0 .35rem; font-size: .8rem; }
.p3d-solar-price th, .p3d-solar-price td { padding: .32rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.p3d-solar-price th { text-align: left; font-weight: 500; color: var(--ink-soft); }
.p3d-solar-price th .p3d-fill-k { font-weight: 400; overflow-wrap: anywhere; }
.p3d-solar-price td {
    text-align: right; white-space: nowrap; padding-left: .75rem;
    color: var(--ink); font-variant-numeric: tabular-nums;
}
.p3d-solar-price tfoot th, .p3d-solar-price tfoot td { border-bottom: 0; color: var(--ink); }
.p3d-solar-price tr.is-total th, .p3d-solar-price tr.is-total td { font-weight: 700; padding-top: .45rem; }
/* "Tip hiše" picker at the top of the Zasnova hiše form: the type names are long. */
.p3d-ai-type { display: block; margin: 0 0 .1rem; }
.p3d-ai-type > span { display: block; margin-bottom: .25rem; font-size: .82rem; color: var(--ink-soft); }
.p3d-ai-type > select { width: 100%; max-width: 26rem; }
.p3d-ai-type-hint { display: block; margin-top: .25rem; font-size: .74rem; color: var(--ink-mute); }
/* House editor fields (the exterior house card): h4 section headings + field spacing. The -flat
   variant strips the old sidebar box chrome - the map card supplies the frame now. */
.p3d-houseform {
    border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev);
    padding: 0 .6rem .6rem;
}
.p3d-houseform.p3d-houseform-flat { border: none; border-radius: 0; background: transparent; padding: 0; }
.p3d-houseform h4 {
    margin: .75rem 0 .35rem; font-size: .7rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .04em; color: var(--ink-mute);
}
.p3d-houseform h4:first-of-type { margin-top: .3rem; }
.p3d-houseform .p3d-ctl { margin-bottom: .45rem; }
.p3d-houseform .p3d-check { margin-bottom: .35rem; }
/* last field's margin + the container's padding-bottom doubled up → uneven bottom gap; drop it */
.p3d-houseform > :last-child { margin-bottom: 0; }
.p3d-houseform-colors { display: flex; gap: .6rem; }
.p3d-houseform-colors .p3d-color { flex: 1; }
.p3d-color input[type="color"] {
    width: 100%; height: 1.9rem; padding: 0; border: 1px solid var(--line-strong);
    border-radius: var(--radius); background: var(--bg-elev); cursor: pointer;
}

/* photo montage block in the AI sidebar */
.p3d-montage {
    display: flex; flex-direction: column; gap: .45rem; padding-top: .6rem;
    border-top: 1px dashed var(--line);
}
.p3d-montage h4 {
    margin: 0; display: flex; align-items: center; gap: .5rem; font-size: .78rem;
    font-weight: 700; color: var(--ink);
}
/* upload drop-zone: the InputFile stretches invisibly over the label (click OR drop works) */
.p3d-upload {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: .25rem;
    padding: .9rem .6rem; border: 1.5px dashed var(--line-strong); border-radius: var(--radius));
    background: var(--bg); cursor: pointer; text-align: center; overflow: hidden;
}
.p3d-upload:hover { border-color: var(--accent); }
.p3d-upload input[type="file"] {
    position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.p3d-upload-ico { font-size: 1.3rem; }
.p3d-upload-txt { font-size: .74rem; font-weight: 600; color: var(--ink-soft); }
.p3d-upload.has-img { padding: 0; border-style: solid; }
.p3d-upload.has-img img { display: block; width: 100%; max-height: 8.5rem; object-fit: cover; }
.p3d-upload-change {
    position: absolute; left: 0; right: 0; bottom: 0; padding: .2rem;
    background: rgba(10, 10, 10, .6); color: #fff; font-size: .66rem; font-weight: 600;
}
.p3d-montage-btn { width: 100%; justify-content: center; display: inline-flex; gap: .4rem; }
.p3d-montage-result { position: relative; }
.p3d-montage-img { display: block; width: 100%; border-radius: var(--radius); border: 1px solid var(--line); }
.p3d-montage-dl {
    position: absolute; right: .4rem; bottom: .4rem; width: 1.9rem; height: 1.9rem;
    display: grid; place-items: center; border-radius: var(--radius); background: rgba(10, 10, 10, .6);
    color: #fff; font-size: 1rem; text-decoration: none; backdrop-filter: blur(3px);
}
.p3d-montage-dl:hover { background: rgba(10, 10, 10, .85); color: #fff; }

/* Orodja tab sections */
.p3d-tool-sec {
    display: flex; flex-direction: column; gap: .45rem;
    padding-bottom: .75rem; border-bottom: 1px dashed var(--line);
}
.p3d-tool-sec h4 {
    margin: 0; font-size: .72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .06em; color: var(--ink-mute);
}
.p3d-hint {
    position: absolute; left: 50%; bottom: .6rem; transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: .25rem;
    padding: .35rem .8rem; border-radius: var(--radius); max-width: 94%; pointer-events: none;
    background: rgba(10, 10, 10, .6); color: #fff; font-size: .72rem; letter-spacing: .02em;
}
.p3d-hint-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .3rem; text-align: center; }
/* the placement hint turned into a correction ("that is not a wall") - the map's own strip, because a
   toast would be hidden while the canvas is fullscreen */
.p3d-hint-row.is-warn { color: #b5483f; font-weight: 600; }
.p3d-hint-keys { gap: .2rem; }
.p3d-hint-sep { opacity: .5; margin: 0 .15rem; }
.p3d-hint kbd {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 1.25em; padding: .05em .35em; border-radius: var(--radius);
    background: rgba(255, 255, 255, .92); color: #1f1300;
    font-family: inherit; font-size: .82em; font-weight: 600; line-height: 1.4;
    border: 1px solid rgba(0, 0, 0, .25); box-shadow: 0 1px 0 rgba(0, 0, 0, .3);
}
.p3d-opn { margin: -.3rem 0 0; font-size: .76rem; color: var(--ink-mute); line-height: 1.45; }

/* nasutje tool result */
.p3d-fill-result { margin: .2rem 0 0; font-size: .8rem; color: var(--ink-soft); line-height: 1.5; }
.p3d-fill-result b { color: var(--ink); font-variant-numeric: tabular-nums; }
.p3d-fill-k { display: block; font-size: .7rem; color: var(--ink-mute); }

/* nasutje / izkop areas: one row per levelled patch of ground, the selected one expanded into its
   editor (kota, mere, škarpa). The row is the same target as its outline on the map. */
.p3d-fill-areas { display: flex; flex-direction: column; gap: .25rem; }
.p3d-fill-area {
    display: flex; align-items: stretch; gap: .25rem;
    border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev);
}
.p3d-fill-area.is-sel { border-color: var(--accent); background: rgba(255, 194, 61, .12); }
.p3d-fill-area-row {
    flex: 1; display: flex; align-items: baseline; flex-wrap: wrap; gap: .1rem .45rem;
    padding: .3rem .5rem; border: 0; background: none; cursor: pointer; text-align: left;
    font: inherit; font-size: .8rem; color: var(--ink-soft);
}
.p3d-fill-area-name { font-weight: 600; color: var(--ink); }
.p3d-fill-area-row .p3d-fill-k { display: inline; }
.p3d-fill-area-v { margin-left: auto; font-variant-numeric: tabular-nums; white-space: nowrap; }
.p3d-fill-area-x {
    border: 0; background: none; cursor: pointer; color: var(--ink-mute);
    padding: 0 .45rem; font-size: .85rem; line-height: 1;
}
.p3d-fill-area-x:hover { color: #b3261e; }
.p3d-fill-edit {
    display: flex; flex-direction: column; gap: .4rem;
    margin: -.05rem 0 .25rem; padding: .45rem .55rem;
    border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); background: var(--bg-elev);
}
.p3d-fill-level, .p3d-fill-lvl, .p3d-fill-dims { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .7rem; }
.p3d-fill-num, .p3d-fill-name { display: flex; align-items: center; gap: .3rem; font-size: .75rem; color: var(--ink-mute); }
.p3d-fill-num input, .p3d-fill-name input {
    width: 5.5rem; padding: .15rem .35rem; border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--bg); color: var(--ink); font: inherit; font-size: .78rem;
    font-variant-numeric: tabular-nums;
}
.p3d-fill-name input { width: 100%; font-variant-numeric: normal; }
.p3d-fill-name { flex: 1; }
.p3d-fill-num .p3d-fill-k { display: inline; }

/* Brežine: the four side toggles read as one control, so they sit in a row of pills under their own
   caption rather than as four loose checkboxes among the numeric fields. */
.p3d-fill-slope { display: flex; flex-direction: column; gap: .3rem; padding-top: .15rem; border-top: 1px dashed var(--line); }
.p3d-fill-sides { display: flex; flex-wrap: wrap; gap: .3rem; }
.p3d-fill-sides .p3d-check {
    display: inline-flex; align-items: center; gap: .25rem; margin: 0;
    border: 1px solid var(--line); border-radius: var(--radius-pill); padding: .05rem .5rem .05rem .35rem;
    background: var(--bg); font-size: .75rem; font-weight: 600; cursor: pointer;
}
.p3d-fill-sides .p3d-check:has(input:checked) { border-color: var(--accent); color: var(--accent-ink); }

/* OPN compliance panel: FZ / FI / višina / odmik rows, green within limit, red over */
/* Header row: title left, the ✦ OPN AI-lookup button right. */
.p3d-opn-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.p3d-opn-ai { border: 1px solid var(--line); background: var(--bg-elev); border-radius: var(--radius); padding: .1rem .5rem; font-size: .8rem; font-weight: 600; cursor: pointer; color: var(--accent-ink); white-space: nowrap; }
.p3d-opn-ai:hover:not(:disabled) { border-color: var(--accent); }
.p3d-opn-ai:disabled { opacity: .6; cursor: default; }
.p3d-opn-ai-msg { color: #b3261e; }
.p3d-opn-rows { display: flex; flex-direction: column; gap: .25rem; }
.p3d-opn-row {
    display: flex; justify-content: space-between; align-items: baseline; gap: .5rem;
    padding: .3rem .5rem; border-radius: var(--radius); font-size: .8rem;
    background: var(--bg-elev); border: 1px solid var(--line); color: var(--ink-soft);
}
.p3d-opn-row.is-ok { background: #eaf5ec; border-color: #b6dcc0; color: #2e6b3e; }
.p3d-opn-row.is-bad { background: #fdeceb; border-color: #f0b6b2; color: #b3261e; }
.p3d-opn-v { font-weight: 600; font-variant-numeric: tabular-nums; }

/* design variants A/B/C: a load button + a save (💾) button per slot */
/* sun-hours heatmap legend: a blue→red gradient between the min/max hour labels */
.p3d-sunheat-legend { display: flex; align-items: center; gap: .4rem; margin-top: .4rem; font-size: .72rem; color: var(--ink-mute); font-variant-numeric: tabular-nums; }
.p3d-sunheat-bar {
    flex: 1; height: .55rem; border-radius: var(--radius); border: 1px solid var(--line);
    background: linear-gradient(90deg,
        hsl(238 72% 50%), hsl(178 72% 50%), hsl(118 72% 50%), hsl(58 72% 50%), hsl(0 72% 50%));
}

/* PDF poročilo o osončenosti: the paid deliverable at the bottom of the osončenost tool card. Sits
   above the disclaimer, separated by a hairline so it reads as its own step, not another toggle. */
/* The report-PDF block that closes a sun tool card - Osončenost parcele in the exterior view, Osončenost
   prostorov in Notranjost. Both are .p3d-tool-sec on the same themed .p3d-mapcard, and in both the button
   right above the report is a .btn.btn-primary in a .p3d-actions row, so the report button is exactly
   that too and needs nothing of its own here beyond the separator and the caption. */
.p3d-sunpdf { margin-top: .6rem; padding-top: .55rem; border-top: 1px dashed var(--line); }
.p3d-sunpdf .p3d-fill-k { display: block; margin: .35rem 0 0; }

/* ── The two osončenost reports on the web (Plan3dSunReportModal / Plan3dDaylightReportModal) ──
   A wide, tabbed reading window over Hiša v 3D with the PDF export in its footer. It borrows the
   Učilnica shell (.p3d-uc-steps tabs, .p3d-uc-body scroller, .p3d-uc-table, .p3d-uc-punch) and adds only
   what a report has: figures, picture grids, the heat scale and the verdict chips. Theme tokens
   throughout; the one deliberate literal is the white paper under the server-drawn charts, whose ink is
   baked into the SVG and has to stay legible in the dark theme too. */
.sub-modal.p3d-rep-modal {
    max-width: min(64rem, 96vw); max-height: 92vh; display: flex; flex-direction: column;
    padding: 1.1rem 1.25rem .9rem;
}
.p3d-rep-head { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: .7rem; }
.p3d-rep-titles { flex: 1; min-width: 0; }
.sub-modal .p3d-rep-head h2 { margin: 0; font-size: 1.3rem; color: var(--accent-ink); }
.sub-modal .p3d-rep-ident { margin: .2rem 0 0; font-size: .85rem; line-height: 1.4; color: var(--ink-soft); }
.p3d-rep-ident b { color: var(--ink); }
.p3d-rep-tabs { margin-bottom: .6rem; }

.p3d-rep-h { margin: 1.3rem 0 .45rem; padding-bottom: .3rem; font-size: 1rem; border-bottom: 1px solid var(--line); }
.p3d-rep-h:first-child { margin-top: .2rem; }
.p3d-rep-h4 { margin: 1rem 0 .45rem; font-size: .92rem; }
.p3d-rep-modal .p3d-uc-lead { margin: .2rem 0 .4rem; }
.p3d-rep-modal .p3d-uc-note { margin: 0 0 .4rem; }
.p3d-rep-modal .p3d-rep-fine { margin: .45rem 0 0; font-size: .8rem; font-style: italic; color: var(--ink-mute); }
.p3d-rep-soft { color: var(--ink-soft); }
/* the chosen reference day lies outside EN 17037's sunlight window - said plainly under the criterion */
.p3d-rep-caveat { display: block; margin-top: .25rem; font-size: .82rem; font-style: italic; color: var(--accent-ink); }

.p3d-rep-table td { font-weight: 600; color: var(--ink); }
.p3d-rep-table td.is-soft { font-weight: 400; color: var(--ink-soft); }
.p3d-rep-table td.is-mute { font-weight: 400; color: var(--ink-mute); }
.p3d-rep-rooms th[scope="row"] { font-weight: 600; color: var(--ink); }
.p3d-rep-rooms td { white-space: nowrap; }
.p3d-rep-sides { margin-left: .35rem; font-size: .72rem; font-weight: 400; color: var(--ink-mute); }

/* verdict chips: the colour carries the verdict, the mark only has to be readable */
.p3d-rep-grade {
    display: inline-block; padding: 0 .35rem; border-radius: var(--radius); font-weight: 600; font-style: normal;
    white-space: nowrap; font-variant-numeric: tabular-nums;
}
.p3d-rep-grade.is-pass { color: #2e6b3e; background: color-mix(in srgb, #3f7d4f 14%, transparent); }
.p3d-rep-grade.is-minimum { color: #8a5a0c; background: color-mix(in srgb, #c98a1e 18%, transparent); }
.p3d-rep-grade.is-fail { color: #b3261e; background: color-mix(in srgb, #b3261e 12%, transparent); }
.p3d-rep-grade.is-na { color: var(--ink-mute); }

/* pictures */
.p3d-rep-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.p3d-rep-grid.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.p3d-rep-shot { margin: 0; }
.p3d-rep-shot img, .p3d-rep-img {
    display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg);
}
.p3d-rep-img { max-width: 42rem; margin: .4rem auto 0; }
.p3d-rep-shot figcaption { margin-top: .3rem; font-size: .82rem; font-weight: 600; color: var(--ink-soft); }
.p3d-rep-figstat { display: block; font-weight: 400; color: var(--ink-mute); }
.p3d-rep-card {
    display: flex; flex-direction: column; padding: 0; overflow: hidden; cursor: pointer; text-align: left;
    font: inherit; color: inherit; background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
}
.p3d-rep-card:hover { border-color: var(--accent); }
.p3d-rep-card img { display: block; width: 100%; height: auto; }
.p3d-rep-cap { display: flex; flex-direction: column; gap: .1rem; padding: .5rem .7rem; font-size: .85rem; }
.p3d-rep-cap span { color: var(--ink-soft); }
.p3d-rep-noimg {
    display: flex; align-items: center; justify-content: center; aspect-ratio: 11 / 9; padding: 1rem;
    font-size: .85rem; color: var(--ink-mute); background: var(--bg);
}

/* server-drawn charts on their own white paper */
.p3d-rep-chart {
    margin: .5rem auto 0; padding: .6rem; max-width: 36rem;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
}
.p3d-rep-chart.is-polar { max-width: 27rem; }
.p3d-rep-chart svg { display: block; width: 100%; height: auto; }
.p3d-rep-legend {
    display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem 1.1rem; margin: .5rem 0 .2rem;
    font-size: .8rem; color: var(--ink-soft);
}
.p3d-rep-legend i { display: inline-block; width: 14px; height: 4px; margin-right: .4rem; border-radius: var(--radius); vertical-align: middle; }

/* heat scale + the day's numbers, and the four facade tiles */
.p3d-rep-heat { max-width: 30rem; margin-top: .5rem; }
.p3d-rep-modal .p3d-rep-stat { margin: .45rem 0 0; font-size: .92rem; color: var(--ink); }
.p3d-rep-stat b { color: var(--accent-ink); }
.p3d-rep-stat span { display: block; font-size: .8rem; color: var(--ink-soft); }
.p3d-rep-facades { display: grid; grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr)); gap: .5rem; }
.p3d-rep-facade {
    display: flex; flex-direction: column; padding: .5rem .7rem;
    background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
}
.p3d-rep-facade span { font-size: .78rem; color: var(--ink-soft); }
.p3d-rep-facade b { font-size: 1.25rem; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.p3d-rep-facade small { font-size: .72rem; color: var(--ink-mute); }

/* footer: when it was made (or why the PDF failed - a toast would sit under the backdrop) + actions */
.p3d-rep-foot {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem;
    margin-top: .4rem; padding-top: .7rem; border-top: 1px solid var(--line);
}
.p3d-rep-foot-msg { flex: 1 1 14rem; min-width: 0; font-size: .8rem; color: var(--ink-mute); }
.p3d-rep-foot-msg.is-error { font-weight: 600; color: #b3261e; }
.p3d-rep-foot-actions { display: flex; gap: .5rem; margin-left: auto; }

@media (max-width: 640px) {
    .sub-modal.p3d-rep-modal { max-height: 96vh; padding: .85rem; }
    .sub-modal .p3d-rep-head h2 { font-size: 1.1rem; }
    .p3d-rep-grid, .p3d-rep-grid.is-3 { grid-template-columns: minmax(0, 1fr); }
}

/* informative disclaimer line under an estimate (e.g. geosonda) */
.p3d-disclaimer { margin: .35rem 0 0; font-size: .7rem; font-style: italic; color: var(--ink-mute); }

/* "Pridobi ponudbo" CTA (disabled / coming soon) under the energy-object panels */
.p3d-quote-btn { width: 100%; margin-top: .6rem; }
.p3d-quote-btn:disabled { opacity: .6; cursor: not-allowed; }
.p3d-quote-soon {
    margin-left: .4rem; padding: .05rem .4rem; border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, .25); font-size: .68rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .04em;
}

/* sončna elektrarna tool */
.p3d-solar-cfg { margin: 0; font-size: .78rem; color: var(--ink-soft); }
.p3d-solar-cfg b { color: var(--ink); }
.p3d-solar-result { display: flex; flex-direction: column; gap: .4rem; margin-top: .15rem; }
.p3d-solar-big {
    font-size: 1.35rem; font-weight: 800; line-height: 1.1; color: var(--ink);
    font-variant-numeric: tabular-nums;
}
.p3d-solar-big span { font-size: .75rem; font-weight: 600; color: var(--ink-mute); }
.p3d-solar-bars { display: flex; align-items: flex-end; gap: 3px; height: 56px; margin-top: .15rem; }
.p3d-solar-bar {
    flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 2px; height: 100%;
}
.p3d-solar-bar-track {
    flex: 1 1 auto; width: 100%; display: flex; align-items: flex-end;
    background: color-mix(in srgb, var(--line) 45%, transparent); border-radius: var(--radius);
}
.p3d-solar-bar-fill {
    width: 100%; min-height: 1px; border-radius: var(--radius);
    background: linear-gradient(to top, #f5a623, #ffd35c);
}
.p3d-solar-bar-lbl { font-size: .58rem; color: var(--ink-mute); line-height: 1; }

/* panel action row: save / restore / recreate */
.p3d-actions { display: flex; flex-wrap: wrap; gap: .3rem; }
.p3d-check {
    display: flex; align-items: center; gap: .45rem; font-size: .8rem; font-weight: 600;
    color: var(--ink-soft); cursor: pointer;
}
.p3d-check input { accent-color: var(--accent); }
.p3d-check input:disabled { opacity: .5; }
.p3d-check:has(input:disabled) { opacity: .55; cursor: default; }

/* komunalni priključki legend (Orodja tab) */
.p3d-util-legend {
    display: flex; flex-wrap: wrap; gap: .25rem .7rem;
    margin: .1rem 0 .1rem 1.6rem; font-size: .74rem; color: var(--ink-mute);
}
.p3d-util-leg { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; }
.p3d-util-leg .p3d-util-dot {
    flex: none; width: .55rem; height: .55rem; border-radius: var(--radius-pill);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .15);
}

/* footprint shape picker (plan silhouettes) */
.p3d-shapes { display: flex; gap: .3rem; }
.p3d-shape {
    flex: 1 1 0; display: grid; place-items: center; padding: .25rem 0;
    border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--bg);
    color: var(--ink-soft); cursor: pointer;
}
.p3d-shape:hover { color: var(--ink); }
.p3d-shape.is-active { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.p3d-shape svg { width: 22px; height: 22px; display: block; fill: currentColor; }
.p3d-back {
    display: inline-block; margin-bottom: .35rem; font-size: .82rem; font-weight: 600;
    color: var(--ink-soft); text-decoration: none;
}
.p3d-back:hover { color: var(--ink); }

/* top-left overlay row: parcel info badge (JS prepends it) + the sun card - below the menubar */
.p3d-topleft {
    position: absolute; top: 3.1rem; left: .65rem; right: calc(.65rem + 96px); /* clear the dials */
    /* flex-start (not stretch): each card keeps its natural height. With stretch, a tall sibling on the
       same flex line (e.g. the interior-osončenost result, whose interior-ctl can share the line because
       its max-width caps the 100% basis) would balloon the gradbena-parcela badge + sun card to match. */
    display: flex; align-items: flex-start; align-content: flex-start; gap: .5rem; flex-wrap: wrap; pointer-events: none;
}
.p3d-info {
    max-width: min(60%, 24rem);
    padding: .45rem .7rem; border-radius: var(--radius); pointer-events: none;
    background: rgba(10, 10, 10, .58); color: #fff; backdrop-filter: blur(3px);
}
.p3d-info-title { font-size: .78rem; font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* One plot line of the gradbena parcela (k.o. + parc. št. - area); the primary is the first row. */
.p3d-info-plot { font-size: .72rem; opacity: .92; line-height: 1.4; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p3d-info-plot:first-of-type { opacity: 1; }
.p3d-info-row { font-size: .72rem; opacity: .92; font-variant-numeric: tabular-nums; line-height: 1.45; }
.p3d-info-k { opacity: .75; }
.p3d-info-v { font-weight: 600; }
/* Obnova stanovanja (#1235): the location card's data credit, under its rows. */
.p3d-info-src { font-size: .64rem; opacity: .7; line-height: 1.35; margin-top: .15rem; }

/* compass (needle + S rotate with the camera azimuth): centred UNDER the rotation dial in the
   right-edge control column */
.p3d-compass {
    position: absolute; top: calc(3.1rem + 92px); right: calc(.65rem + 14px); width: 56px; height: 56px;
    border-radius: 50%; background: rgba(255, 255, 255, .85); border: 1px solid var(--line-strong);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .18); cursor: pointer; user-select: none;
    backdrop-filter: blur(3px);
}
.p3d-compass-rotor { position: absolute; inset: 0; pointer-events: none; }
.p3d-compass-n {
    position: absolute; top: 3px; left: 50%; transform: translateX(-50%);
    font-size: .6rem; font-weight: 700; color: #c0392b;
}
.p3d-compass-needle {
    position: absolute; top: 50%; left: 50%; width: 0; height: 0; transform: translate(-50%, -100%);
    border-left: 5px solid transparent; border-right: 5px solid transparent;
    border-bottom: 17px solid #c0392b;
}
.p3d-compass-needle::after {
    content: ""; position: absolute; top: 17px; left: -5px; width: 0; height: 0;
    border-left: 5px solid transparent; border-right: 5px solid transparent;
    border-top: 17px solid #9aa0a6;
}

/* sun card (Razor-rendered): time slider + date + solstice presets + day animation */
.p3d-suncard {
    display: flex; flex-direction: column; gap: .25rem; min-width: 13rem; max-width: 17rem;
    padding: .4rem .65rem .5rem; border-radius: var(--radius); pointer-events: auto;
    background: rgba(10, 10, 10, .58); color: #fff; backdrop-filter: blur(3px);
}
.p3d-suncard-head {
    display: flex; align-items: baseline; justify-content: space-between; gap: .4rem;
    font-size: .78rem;
}
.p3d-suncard-head b { font-weight: 700; font-variant-numeric: tabular-nums; }
.p3d-suncard-title { font-weight: 600; }
.p3d-suncard-ico { opacity: .9; }
.p3d-sun-slider { width: 100%; margin: 0; accent-color: #ffd02e; }
.p3d-sun-row { display: flex; align-items: center; gap: .25rem; }
.p3d-sun-date {
    flex: 1 1 auto; min-width: 0; font: inherit; font-size: .72rem; color: #fff;
    padding: .15rem .3rem; border: 1px solid rgba(255, 255, 255, .35); border-radius: var(--radius);
    background: rgba(255, 255, 255, .12); color-scheme: dark;
}
.p3d-sun-btn {
    flex: none; padding: .15rem .4rem; border: 1px solid rgba(255, 255, 255, .35);
    border-radius: var(--radius); background: rgba(255, 255, 255, .12); font: inherit; font-size: .7rem;
    font-weight: 600; color: #fff; cursor: pointer; white-space: nowrap;
}
.p3d-sun-btn:hover { background: rgba(255, 255, 255, .25); }
.p3d-sun-btn.is-active { background: var(--accent); border-color: var(--accent); }

/* ── map menubar menus (Pogledi/Orodja): a pill (shared .p3d-furncat-btn look) with a popover
   styled to MATCH the dark furniture/catalog submenus (.p3d-furnmenu - Dodatki, Vrt, …): same
   dark backdrop, border, radius and item sizing, so the whole menubar reads as one family.
   Unlike the catalog submenus these hold interactive controls (sliders, selects), so they stay
   open until the pill or the backdrop is clicked. ── */
.p3d-menucat { position: relative; }
.p3d-menu-pop {
    position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; cursor: default;
    display: none; flex-direction: column; gap: .12rem;
    width: max-content; min-width: 12rem; max-width: 19rem;
    /* Tall enough that even the Pogledi menu shows every row without scrolling on a normal screen, but
       never taller than the map itself: .p3d-canvas-wrap clips (overflow:hidden) for its rounded corners,
       so anything past that is simply cut off. --p3d-h tracks the map height in both breakpoints. */
    max-height: min(48rem, 84vh, calc(var(--p3d-h, 950px) - 4.5rem));
    overflow-y: auto; overscroll-behavior: contain;
    padding: .3rem; border-radius: var(--radius); border: 1px solid rgba(255, 255, 255, .22);
    background: rgba(10, 10, 10, .96); color: #fff; color-scheme: dark;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .45); pointer-events: auto;
}
/* The popover lives INSIDE .p3d-canvas-wrap, which clips (overflow:hidden) for its rounded corners -
   anything past the map edge is simply cut, and the notebook paper shows through where the menu should
   be. The RIGHT-most menus (Orodja, and Pogledi behind it) therefore open leftwards from their pill
   instead of rightwards, and no popover may be wider than the map itself. */
.p3d-menucat:nth-last-of-type(-n+2) .p3d-menu-pop { left: auto; right: 0; }
.p3d-menu-pop { max-width: min(19rem, calc(100vw - 2rem)); }
/* hover opens (desktop, same as the furniture menus); the pill's click pins it (touch) */
.p3d-menucat:hover .p3d-menu-pop, .p3d-menu-pop.is-open { display: flex; }
/* an item click (add / tool / arm) closes the menu FOR REAL: hover-open is muted until the pointer
   leaves the pill's wrapper - otherwise the still-hovering cursor would pop it right back open */
.p3d-furnbar.is-hover-muted .p3d-menu-pop:not(.is-open),
.p3d-furnbar.is-hover-muted .p3d-furnmenu:not(.is-open) { display: none; }
/* bridge the 6 px gap between pill and popover so a slow diagonal hover doesn't close it */
.p3d-menucat::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 8px; }
.p3d-menu-pop-wide { width: 19rem; }
/* Variante A/B/C: one line per slot - full-width "Naloži varianto X" + the square 💾 beside it */
.p3d-mvariants { display: flex; flex-direction: column; gap: .12rem; }
.p3d-mpop-h {
    margin: .35rem 0 .2rem; padding-left: .45rem; font-size: .66rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .05em; color: rgba(255, 255, 255, .62);
}
/* Every heading but the first opens a new SECTION: a hairline + breathing room above it, so Talne
   obloge / Sobe / Hrup okolice read as separate groups instead of one long list of rows. */
.p3d-mpop-h:not(:first-child) {
    margin-top: .55rem; padding-top: .5rem; border-top: 1px solid rgba(255, 255, 255, .16);
}
/* item rows sized like .p3d-furnmenu-item, so Pogledi/Orodja match the catalog menus 1:1 */
.p3d-mitem {
    display: flex; align-items: center; gap: .45rem; width: 100%; text-align: left;
    padding: .3rem .45rem; border: 1px solid transparent; border-radius: var(--radius); background: transparent;
    font: inherit; font-size: .72rem; color: #fff; cursor: pointer;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.p3d-mitem:hover:not(:disabled) { background: rgba(255, 255, 255, .12); }
.p3d-mitem.is-active { border-color: transparent; background: var(--accent); color: #1a1100; }
.p3d-mitem:disabled { opacity: .45; cursor: default; }
/* ✓-toggle menu row: the leading glyph carries the state (like a native checkable menu item) */
.p3d-mtoggle::before { content: "○"; width: 1em; flex: none; color: rgba(255, 255, 255, .5); }
.p3d-mtoggle.is-on::before { content: "✓"; color: var(--accent); font-weight: 700; }
.p3d-mitem-row { display: flex; align-items: center; gap: .25rem; }
/* .p3d-furnmenu-item too: the Energija & Voda rows are catalog items that ALSO carry a ✓ and a ⚙, so
   they sit in this row shape while keeping the catalog menu's own class (and its selectors). */
.p3d-mitem-row .p3d-mitem, .p3d-mitem-row .p3d-furnmenu-item { flex: 1; min-width: 0; }
.p3d-mitem-x {
    flex: none; display: inline-flex; align-items: center; justify-content: center; padding: 0;
    width: 1.4rem; height: 1.4rem; border: 1px solid rgba(255, 255, 255, .25); border-radius: var(--radius);
    background: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .85); font: inherit; font-size: .8rem; line-height: 1; cursor: pointer;
}
.p3d-mitem-x:hover { color: #fff; background: var(--danger, #b3261e); border-color: var(--danger, #b3261e); }
/* Settings ⚙ on a ticked Energija & Voda row. Same slot as .p3d-mitem-x, but it opens a panel rather
   than destroying anything, so it must not borrow that button's danger-red hover. */
.p3d-mitem-gear {
    flex: none; display: inline-flex; align-items: center; justify-content: center; padding: 0;
    width: 1.4rem; height: 1.4rem; border: 1px solid rgba(255, 255, 255, .25); border-radius: var(--radius);
    background: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .85);
    font: inherit; font-size: .8rem; line-height: 1; cursor: pointer;
}
.p3d-mitem-gear:hover { color: #1a1100; background: var(--accent); border-color: var(--accent); }
/* dB badge on a noise-source menu row: pushed to the right edge, quieter than the label */
.p3d-mdb { margin-left: auto; flex: none; font-size: .66rem; color: rgba(255, 255, 255, .55); font-variant-numeric: tabular-nums; }
.p3d-mitem.is-on .p3d-mdb { color: rgba(255, 255, 255, .8); }
/* the zunaj → v hiši readout under the Izolacija oken slider */
.p3d-mnote { padding: .1rem .45rem .3rem; font-size: .7rem; color: rgba(255, 255, 255, .8); }
.p3d-mnote b { color: #fff; font-variant-numeric: tabular-nums; }
.p3d-mnote > span { display: block; margin-top: .15rem; font-size: .65rem; color: rgba(255, 255, 255, .5); white-space: normal; }
/* labelled control row inside a popover (Izolacija oken, Tla · etaža) */
.p3d-mrow { display: flex; flex-direction: column; gap: .25rem; padding: .2rem .45rem; font-size: .72rem; font-weight: 600; color: rgba(255, 255, 255, .85); }
.p3d-mrow > span { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.p3d-mrow > span b { color: #fff; font-variant-numeric: tabular-nums; }
/* The closed control is light-on-dark like the rest of the popover. Its OPEN list is drawn by the OS,
   which takes the element's own background - a translucent white over the dark card resolves to a WHITE
   popup, and the inherited white text vanished into it. So: an opaque dark background on the select and
   an explicit pair on <option>, which the native list actually honours. */
.p3d-mrow select {
    font: inherit; font-size: .78rem; color: #fff; padding: .3rem .45rem;
    border: 1px solid rgba(255, 255, 255, .25); border-radius: var(--radius);
    background: #2c2007; color-scheme: dark;
}
.p3d-mrow select option { background: #2c2007; color: #fff; }
.p3d-mrow input[type=range] { width: 100%; accent-color: var(--accent); }

/* ── exterior on-map cards (house / aux / solar editor + the Orodja tool cards): the same slot as
   the window/furniture editors, but LIGHT - they host the old sidebar's controls unchanged. ── */
.p3d-mapcard {
    position: absolute; top: calc(3.1rem + 96px); right: .65rem; width: 16.5rem; z-index: 4;
    display: flex; flex-direction: column; gap: .5rem; pointer-events: auto;
    padding: .6rem .75rem .75rem; border-radius: var(--radius);
    background: var(--bg-elev); color: var(--ink); border: 1px solid var(--line-strong);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .25);
    max-height: calc(100% - 3.1rem - 96px - .8rem); overflow-y: auto; overscroll-behavior: contain;
}
.p3d-mapcard-head {
    position: sticky; top: -.6rem; z-index: 1; margin: -.6rem -.75rem 0; padding: .6rem .75rem .45rem;
    display: flex; align-items: center; justify-content: space-between; gap: .4rem;
    background: var(--bg-elev); border-bottom: 1px solid var(--line);
}
.p3d-mapcard-title { font-size: .84rem; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p3d-mapcard-btns { display: flex; align-items: center; gap: .25rem; flex: 0 0 auto; }
.p3d-mapcard-x {
    border: 0; background: transparent; color: var(--ink-soft); font: inherit; font-size: .85rem;
    line-height: 1; padding: .1rem .2rem; border-radius: var(--radius); cursor: pointer;
}
.p3d-mapcard-x:hover { color: var(--ink); background: var(--accent-soft); }
.p3d-mapcard .p3d-tool-sec { border-bottom: none; padding-bottom: 0; }

/* ── Prerez hiše card: prečni ⇄ vzdolžni ⇄ vodoravni segment above the position slider ── */
.p3d-sect { display: flex; flex-direction: column; gap: .6rem; }
.p3d-sect .p3d-fill-k { margin: 0; line-height: 1.4; }
.p3d-sect-seg {
    display: flex; padding: 2px; gap: 2px; border-radius: var(--radius);
    border: 1px solid var(--line-strong); background: var(--bg);
}
.p3d-sect-btn {
    flex: 1; border: 0; border-radius: var(--radius); padding: .32rem .4rem; cursor: pointer;
    background: transparent; color: var(--ink-soft); font: inherit; font-size: .78rem; font-weight: 600;
}
.p3d-sect-btn:hover { color: var(--ink); }
.p3d-sect-btn.is-active { background: var(--accent); color: #fff; }

/* ── etaža rail: vertical storey chips in the top-left stack, on their OWN row directly under the
   osončenost card (flex-basis 100% wraps the flex line; the stack itself is pointer-events none) ── */
.p3d-etaza-rail {
    /* flex-basis:100% keeps the rail on its OWN row under the sun card (do NOT cap the width, or it stops
       wrapping and slides up next to the osončenost card). It stays transparent and click-through: the
       SCROLLER inside it is the only part that catches the pointer. */
    flex-basis: 100%; display: flex; pointer-events: none;
}
/* The list itself. It has to take the wheel (pointer-events) or a long tree - many rooms with their
   furniture, klet last - can never be scrolled to its end: the wheel went straight to the canvas and
   zoomed the 3D view instead. Only as wide as its content, so the rest of the row still lets the
   pointer through to the scene, and overscroll-behavior keeps a wheel at the end of the list from
   scrolling the page behind it. Height is capped by BOTH the map and the window, so the tail of the
   tree can never end up below the bottom of the screen. */
.p3d-etaza-scroll {
    pointer-events: auto;
    display: flex; flex-direction: column; align-items: flex-start; gap: .3rem;
    width: fit-content; max-width: 100%;
    /* The budget has to account for what is ABOVE the list (the 3.1rem top inset + the osončenost card,
       ~12rem together) AND leave the bottom of the map clear - the hint bar lives down there, and a list
       that ends flush against the edge reads as cut off. Whichever of the two bounds is smaller wins, so
       the tail of the tree stays on screen on a short window too. */
    max-height: min(calc(var(--p3d-h, 950px) - 17rem), calc(100vh - 20rem));
    overflow-y: auto; overscroll-behavior: contain;
    padding-right: .15rem; padding-bottom: .75rem;
    /* no scrollbar chrome: this floats over the 3D view, and a track/thumb there reads as a page
       scrollbar sitting in the middle of the scene */
    scrollbar-width: none;
}
.p3d-etaza-scroll::-webkit-scrollbar { width: 0; height: 0; }
/* etaža tree: a floor chip + its nested rooms → furniture */
.p3d-etaza-group { display: flex; flex-direction: column; align-items: flex-start; gap: .18rem; width: fit-content; max-width: 100%; pointer-events: none; }
.p3d-istorey, .p3d-tree-node { pointer-events: auto; } /* only the buttons themselves catch clicks */
.p3d-etaza-group.is-current > .p3d-istorey { box-shadow: 0 0 0 2px var(--accent); } /* active etaža: new rooms land here */
.p3d-tree { display: flex; flex-direction: column; align-items: flex-start; gap: .14rem; margin: .05rem 0 .1rem .5rem; pointer-events: none; }
.p3d-tree-node {
    display: inline-flex; align-items: center; gap: .3rem; max-width: 13rem;
    padding: .16rem .5rem; border: 1px solid rgba(255, 255, 255, .22); border-radius: var(--radius);
    background: rgba(10, 10, 10, .5); color: #fff; font: inherit; font-size: .68rem; line-height: 1.05;
    text-align: left; cursor: pointer; white-space: nowrap; backdrop-filter: blur(3px);
}
.p3d-tree-node:hover { background: rgba(10, 10, 10, .82); }
.p3d-tree-node.is-sel { background: var(--accent); border-color: var(--accent); color: #1a1100; font-weight: 600; }
.p3d-tree-room { font-weight: 600; }
.p3d-tree-obj { margin-left: .7rem; opacity: .92; font-size: .65rem; }
.p3d-tree-obj.is-loose { margin-left: 0; }
.p3d-tree-ico { flex: 0 0 auto; display: inline-flex; width: .82rem; height: .82rem; opacity: .85; }
.p3d-tree-node.is-sel .p3d-tree-ico { opacity: 1; }
.p3d-tree-lbl { overflow: hidden; text-overflow: ellipsis; }
/* "Dodaj sobo" leading row in room submenus */
.p3d-furnmenu-add { font-weight: 600; border-bottom: 1px solid rgba(255, 255, 255, .14); }
.p3d-furnmenu-add .p3d-furnmenu-ico { color: var(--accent); }

/* rotation dial (xy zasuk) - JS-owned overlay, top-right of the canvas, below the menubar */
.p3d-dial {
    position: absolute; top: 3.1rem; right: .65rem; width: 84px; height: 84px;
    border-radius: 50%; background: rgba(255, 255, 255, .85); border: 1px solid var(--line-strong);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .18); cursor: grab; touch-action: none; user-select: none;
    backdrop-filter: blur(3px);
}
.p3d-dial:active { cursor: grabbing; }
.p3d-dial-n {
    position: absolute; top: 3px; left: 50%; transform: translateX(-50%);
    font-size: .58rem; font-weight: 700; color: var(--ink-mute); pointer-events: none;
}
.p3d-dial-rotor { position: absolute; inset: 0; pointer-events: none; }
.p3d-dial-arrow {
    position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
    width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent;
    border-bottom: 8px solid var(--accent);
}
.p3d-dial-rect {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 26px; height: 20px; border: 2px solid var(--ink-soft); border-radius: var(--radius);
    background: rgba(0, 0, 0, .05);
}
.p3d-dial-deg {
    position: absolute; bottom: 7px; left: 50%; transform: translateX(-50%);
    font-size: .64rem; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums;
    pointer-events: none;
}

/* z dial (vertical offset) - JS-owned overlay, under the compass at the bottom of the column */
.p3d-zdial {
    position: absolute; top: calc(3.1rem + 156px); right: calc(.65rem + 25px); width: 34px; height: 132px;
    border-radius: var(--radius); background: rgba(255, 255, 255, .85); border: 1px solid var(--line-strong);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .18); cursor: grab; touch-action: none; user-select: none;
    backdrop-filter: blur(3px);
}
.p3d-zdial:active { cursor: grabbing; }
.p3d-zdial-track {
    position: absolute; top: 12px; bottom: 24px; left: 50%; width: 4px; transform: translateX(-50%);
    background: var(--line-strong); border-radius: var(--radius); pointer-events: none;
}
.p3d-zdial-handle {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff;
    display: grid; place-items: center; font-size: .72rem; line-height: 1; pointer-events: none;
}
.p3d-zdial-val {
    position: absolute; bottom: 5px; width: 100%; text-align: center;
    font-size: .58rem; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums;
    pointer-events: none;
}
.p3d-ctl { display: flex; flex-direction: column; gap: .3rem; }
.p3d-ctl > span {
    display: flex; justify-content: space-between; align-items: baseline; gap: .5rem;
    font-size: .78rem; font-weight: 600; color: var(--ink-soft);
}
.p3d-ctl > span b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.p3d-ctl input[type="range"] { width: 100%; accent-color: var(--accent); }
.p3d-ctl select {
    font: inherit; font-size: .88rem; color: var(--ink); padding: .35rem .5rem;
    border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--bg);
}
.p3d-ctl.is-disabled { opacity: .45; }
.p3d-note { margin: .2rem 0 0; font-size: .72rem; color: var(--ink-mute); line-height: 1.45; }

.p3d-loading {
    display: flex; align-items: center; gap: .7rem; padding: 1.1rem 1.25rem;
    border: 1px dashed var(--line); border-radius: var(--radius)); background: var(--bg-elev);
    color: var(--ink-soft); font-size: .9rem;
}
.p3d-empty {
    padding: 1.4rem 1.5rem; border: 1px dashed var(--line); border-radius: var(--radius));
    background: var(--bg-elev); max-width: 38rem;
}
.p3d-empty h3 { margin: 0 0 .3rem; font-size: 1.05rem; }
.p3d-empty p { margin: 0 0 1rem; color: var(--ink-soft); font-size: .9rem; line-height: 1.5; }

/* Plan-locked promo (Osnovni): day/night showcase left, copy + upgrade CTA right (the .img-compare slider
   and .lp-3d-points list, shared with the landing's 3D showcase under »Gradim hišo«, #1180). */
.p3d-promo {
    display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 1.2rem 2rem; align-items: center; margin-top: .4rem;
}
.p3d-promo-media .img-compare { border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; }
.p3d-promo-mediahint { margin: .5rem .2rem 0; font-size: .78rem; color: var(--ink-mute); }
.p3d-promo-copy h2 { margin: 0 0 .7rem; font-size: clamp(1.25rem, 2.4vw, 1.7rem); line-height: 1.25; }
.p3d-promo-copy > p { margin: 0; color: var(--ink-soft); line-height: 1.6; font-size: .95rem; }
.p3d-promo-cta { display: flex; flex-direction: column; gap: .45rem; margin-top: 1.25rem; align-items: flex-start; }
.p3d-promo-note { font-size: .8rem; color: var(--ink-mute); }
@media (max-width: 900px) { .p3d-promo { grid-template-columns: 1fr; } }
.p3d-error {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    padding: .9rem 1.1rem; border: 1px solid var(--danger, #b3261e); border-radius: var(--radius));
    color: var(--danger, #b3261e); font-size: .9rem; max-width: 44rem;
}
@media (max-width: 860px) {
    .p3d-layout { grid-template-columns: 1fr; }
    .p3d-layout { --p3d-h: clamp(280px, 52vh, 520px); } /* keep the popover cap in step */
    /* the map is much shorter here than --p3d-h (950px), so cap the rail to the viewport instead */
    .p3d-etaza-rail { max-height: 44vh; }
}

/* ──────────────────────────────────────────────────────────────────────────
   Public marketing landing page (Landing.razor / LandingLayout)
   ────────────────────────────────────────────────────────────────────────── */
.lp { display: flex; flex-direction: column; min-height: 100vh; background: var(--bg); }
.lp > main { flex: 1 0 auto; }

/* cookie notice - fixed bottom banner (necessary-cookies disclosure, single acknowledgment) */
.cookie-consent {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1100;
    padding: .85rem clamp(1rem, 4vw, 2rem);
    background: var(--bg-elev); border-top: 1px solid var(--line-strong);
    box-shadow: 0 -6px 24px rgba(26, 26, 26, .12);
}
.cookie-consent-inner {
    max-width: var(--max); margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem 1.5rem;
    flex-wrap: wrap;
}
.cookie-consent-text { margin: 0; font-size: .88rem; color: var(--ink-soft); flex: 1 1 18rem; }
.cookie-consent-text strong { color: var(--ink); font-weight: 600; }
.cookie-consent-link {
    appearance: none; border: none; background: none; padding: 0; cursor: pointer;
    font: inherit; color: var(--accent-ink); text-decoration: underline;
}
.cookie-consent-link:hover { color: var(--accent); }
.cookie-consent-btn { flex: 0 0 auto; white-space: nowrap; }

/* header */
.lp-header {
    position: sticky; top: 0; z-index: 20;
    background: rgba(237, 237, 237, .85); backdrop-filter: saturate(1.4) blur(8px);
    border-bottom: 1px solid var(--line);
}
/* Same height and logo as the signed-in navbar (.app-nav-inner) - both read --nav-pad-y / --nav-logo-h (#1191),
   incl. the phone step-down - so the bar doesn't jump when navigating landing → app. The inset is the landing's. */
.lp-header-inner {
    max-width: var(--max); margin: 0 auto;
    padding: var(--nav-pad-y) clamp(1.5rem, 4vw, 4rem);
    min-height: calc(var(--nav-logo-h) + 2 * var(--nav-pad-y));
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.lp-brand { display: inline-flex; align-items: center; border: none; text-decoration: none; cursor: pointer; }
.lp-brand:hover, .lp-brand:focus, .lp-brand:focus-visible { text-decoration: none; }
.lp-brand-logo { height: var(--nav-logo-h); width: auto; display: block; }
.lp-header-actions { display: flex; align-items: center; gap: .4rem; }
.lp-link {
    display: inline-flex; align-items: center; gap: .35rem;
    background: none; border: 0; border-bottom: 0; font: inherit; font-weight: 600; font-size: .9rem;
    color: var(--ink-soft); cursor: pointer; padding: .55rem .85rem; border-radius: var(--radius);
    text-decoration: none; transition: color .15s;
}
.lp-link .icon { color: var(--accent); }
.lp-link:hover { color: var(--ink); border-bottom: 0; }
.lp-header-cta { padding: .5rem 1.15rem; }
.lp-header-actions { flex-wrap: wrap; justify-content: flex-end; row-gap: .3rem; }
/* On smaller screens the header gets crowded; drop the in-page scroll shortcuts (Preveri parcelo /
   Naročnina) so Prijava + the account menu always fit. Both sections stay reachable by scrolling. */
@media (max-width: 768px) { .lp-nav-jump { display: none; } }

/* hero */
.lp-hero {
    max-width: var(--max); margin: 0 auto;
    padding: clamp(2.5rem, 6vw, 5.5rem) clamp(1.25rem, 4vw, 4rem) clamp(2rem, 4vw, 3.5rem);
    display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
@media (max-width: 880px) { .lp-hero { grid-template-columns: 1fr; } }
.lp-eyebrow {
    font-family: var(--font-sans); font-size: .75rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .18em; color: var(--accent); margin-bottom: 1rem;
}
.lp-hero-title {
    font-family: var(--font-serif); font-weight: 400;
    font-size: clamp(2.4rem, 5.5vw, 4rem); line-height: 1.03; letter-spacing: -.02em; margin: 0;
}
/* inline-block: »Začnimo pri tebi.« moves to the next line as one phrase rather than breaking after »Začnimo«
   (NomiFac #1184); wider than the line (a narrow phone), it still wraps inside itself. */
.lp-hero-title em { display: inline-block; font-style: italic; font-weight: 400; color: var(--accent-ink); }
.lp-hero-lead {
    font-family: var(--font-sans); font-weight: 400; font-size: 1.15rem; line-height: 1.6;
    color: var(--ink-soft); max-width: 38rem; margin: 1.4rem 0 0;
}
.lp-hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.lp-cta-lg { padding: .8rem 1.5rem; font-size: .95rem; }
.lp-hero-note { margin: 1.1rem 0 0; font-size: .95rem; line-height: 1.5; color: var(--ink-soft); }
/* the shared .lp-inline-link is the dark accent since the newsletter card went light (#1175); kept for the hero note */
.lp-hero-note .lp-inline-link { color: var(--accent-ink); font-weight: 600; }
.lp-hero-note .lp-inline-link:hover { color: var(--accent); }

/* ---------- segment chooser: the landing's first question ----------
   Replaces the two-column hero (copy + product-peek card) with one full-width column, because the
   chooser IS the right-hand side now - three real doors instead of a picture of someone else's project. */
.lp-hero.is-chooser { grid-template-columns: 1fr; text-align: left; }
.lp-hero.is-chooser .lp-hero-lead { max-width: 44rem; }

.seg-choose {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem;
    margin-top: clamp(1.75rem, 4vw, 2.5rem);
    /* The live card's button (#1167, D16): terakota with WHITE text, at least 4.5:1 in both themes - dark.css
       re-points both (its --accent-ink is a light peach that white cannot sit on). The rest shadow uses ink in the
       light theme and plain black in the dark one, where --ink is light and would glow. */
    --seg-cta-bg: var(--accent-ink);
    --seg-cta-bg-hover: #94401b;
    --seg-shadow: color-mix(in srgb, var(--ink) 9%, transparent);
}

/* Icon, title and blurb on the card's centre line (#878); the foot below keeps its two ends.
   #1167 ("make this section more visible, icons bigger"): a bigger icon in a bigger tile, more room, a frame and a
   shadow already at rest, and a lift with a deeper shadow on hover and keyboard focus.
   #1175: a chooser. The card holds two buttons - the pick (.seg-card-pick: icon, title, blurb) and »Začni →«
   (.seg-card-cta) - side by side; the pick's ::after spreads over the whole card, so a click anywhere but on »Začni«
   picks, and the picked card (.is-on) wears an accent ring. */
.seg-card {
    position: relative;
    display: flex; flex-direction: column; gap: .85rem;
    padding: 1.75rem 1.6rem 1.4rem;
    background: var(--bg-elev); border: 1px solid var(--line-strong); border-radius: var(--radius);
    box-shadow: 0 2px 6px var(--seg-shadow), 0 12px 28px var(--seg-shadow);
    transition: border-color .15s, transform .15s, box-shadow .15s;
}
.seg-card:hover, .seg-card:has(:focus-visible) {
    border-color: var(--accent); transform: translateY(-3px);
    box-shadow: 0 4px 10px var(--seg-shadow), 0 22px 48px var(--seg-shadow);
}
.seg-card.is-on {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent), 0 4px 10px var(--seg-shadow), 0 22px 48px var(--seg-shadow);
}
@media (prefers-reduced-motion: reduce) {
    /* No lift; the frame and the shadow still answer the pointer. */
    .seg-card { transition: border-color .15s, box-shadow .15s; }
    .seg-card:hover, .seg-card:has(:focus-visible) { transform: none; }
}
.seg-card-pick {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: .85rem; text-align: center;
    margin: 0; padding: 0; background: none; border: 0; color: inherit; font: inherit; cursor: pointer;
}
.seg-card-pick::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.seg-card-pick:focus-visible { outline: none; }
.seg-card-pick:focus-visible::after { outline: 2px solid var(--accent); outline-offset: 3px; }
.seg-card-ico {
    display: inline-flex; align-items: center; justify-content: center;
    width: 4.5rem; height: 4.5rem; border-radius: var(--radius);
    background: var(--accent-soft); color: var(--accent-ink); flex: none;
}
.seg-card-ico svg { width: 40px; height: 40px; }
.seg-card-body { display: flex; flex-direction: column; align-items: center; gap: .4rem; flex: 1; }
.seg-card-title {
    font-family: var(--font-sans); font-size: 1.4rem; font-weight: 700; line-height: 1.2; color: var(--ink);
    display: flex; align-items: center; justify-content: center; gap: .5rem; flex-wrap: wrap;
}
.seg-card-blurb { font-size: 1.02rem; line-height: 1.5; color: var(--ink-soft); }
.seg-card-foot {
    align-self: stretch; text-align: left;
    display: flex; align-items: center; justify-content: space-between; gap: .75rem;
    margin-top: .35rem; padding-top: .9rem; border-top: 1px solid var(--line);
}
.seg-card-meta { font-size: .82rem; color: var(--ink-mute); }
/* A button of its own beside the pick (#1175), above the pick's card-wide ::after (z-index), so it is the one spot on
   the card that starts rather than picks. */
.seg-card-cta {
    position: relative; z-index: 1;
    display: inline-flex; align-items: center; justify-content: center;
    padding: .6rem 1.2rem; border: 1px solid var(--seg-cta-bg); border-radius: var(--radius-pill);
    background: var(--seg-cta-bg); color: #fff; cursor: pointer;
    font-family: inherit; font-size: .95rem; font-weight: 700; line-height: 1.2; white-space: nowrap;
    transition: background-color .15s, border-color .15s, color .15s;
}
.seg-card-cta:hover, .seg-card-cta:focus-visible {
    background: var(--seg-cta-bg-hover); border-color: var(--seg-cta-bg-hover);
}
.seg-card-cta:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Not published yet: still a card (the audience is real and we want their address), but visibly not a
   door. Dashed edge, no shadow at rest, muted ink and a quiet outlined "Obvesti me" say "on the way". */
.seg-card.is-soon { border-style: dashed; background: transparent; box-shadow: none; }
.seg-card.is-soon .seg-card-ico { background: var(--line); color: var(--ink-mute); }
.seg-card.is-soon .seg-card-title { color: var(--ink-soft); }
.seg-card.is-soon .seg-card-cta,
.seg-card.is-soon .seg-card-cta:hover, .seg-card.is-soon .seg-card-cta:focus-visible {
    background: transparent; border-color: var(--line-strong); color: var(--ink-soft); font-weight: 600;
}
.seg-card.is-soon:hover { border-color: var(--line-strong); }
/* Picked, it can still be told from a live card: the dashed edge in the accent and the card's own background, no
   shadow. */
.seg-card.is-soon.is-on { border-color: var(--accent); background: var(--bg-elev); box-shadow: none; }
/* Top-right corner, not inline after the title: "Kupujem nepremičnino" + a badge is wider than the card,
   and letting it wrap knocks that one title onto two lines while its neighbours stay on one. */
.seg-card-soon {
    position: absolute; top: .8rem; right: .9rem;
    font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em;
    padding: .15rem .45rem; border-radius: var(--radius-pill); background: var(--line); color: var(--ink-mute);
}

/* 900 px and below: one card per row, and each card a row itself - icon left, title and blurb right, the
   button across the bottom - so all three doors, buttons included, sit on a 390 x 844 phone's first screen. */
@media (max-width: 900px) {
    .seg-choose { grid-template-columns: 1fr; gap: .75rem; }
    .seg-card { gap: .75rem; padding: 1rem 1.1rem; }
    .seg-card-pick {
        display: grid; grid-template-columns: auto minmax(0, 1fr);
        align-items: center; column-gap: 1rem; text-align: left;
    }
    .seg-card-ico { width: 3.5rem; height: 3.5rem; border-radius: var(--radius); }
    .seg-card-ico svg { width: 32px; height: 32px; }
    .seg-card-body { align-items: flex-start; gap: .15rem; }
    .seg-card-title { justify-content: flex-start; font-size: 1.2rem; }
    .seg-card-blurb { font-size: .92rem; line-height: 1.4; }
    .seg-card-foot { margin-top: 0; padding-top: 0; border-top: 0; }
    .seg-card-meta { display: none; }
    .seg-card-cta { flex: 1; padding: .6rem 1rem; }
    /* A row has room beside the title, and no neighbour to line up with. */
    .seg-card-soon { position: static; }
}

/* The fourth audience - "samo bi preveril parcelo" - as one quiet line rather than a fourth card, so it
   does not compete with the three that actually start a project. */
.seg-aside {
    margin: 1.1rem 0 0; font-size: .9rem; color: var(--ink-mute);
    display: flex; flex-wrap: wrap; align-items: center; gap: .45rem;
}
.seg-aside-link { color: var(--accent-ink); font-weight: 600; }
.seg-aside-link:hover { color: var(--accent); }
.seg-aside-sep { color: var(--line-strong); }

/* The picked card's phases, right under the chooser (#1175): the /kaj-je-architec list (PhaseJourney), without the gap
   above it that the hero's own bottom padding already makes. */
.docs-journey.lp-phases { padding-top: 0; }

/* The same content right under the tapped card, where the cards are rows (NomiFac #1324: on a phone what sat below all
   three went unnoticed). It is an item of the chooser's grid, inside the hero's column, which already holds the side
   inset - so the section and the phases drop their own, and the vertical gaps shrink to the card's. Should the window
   widen past 900 px while it is open, it spans the second row, under all three cards. */
.seg-picked { min-width: 0; grid-column: 1 / -1; grid-row: 2; }
.seg-picked .lp-3d, .seg-picked .lp-ads { padding: .75rem 0 1.25rem; }
.seg-picked .docs-journey.lp-phases { padding: 0 0 .75rem; }
.seg-picked .lp-section-head { margin-bottom: 1.25rem; }
@media (max-width: 900px) {
    .seg-picked { grid-row: auto; }
}

/* Under all three cards (a desktop; a phone as the page opens) the content starts right under them and the line »Samo
   preveril bi parcelo« - #1324 (b): the hero's bottom padding and the section's top one made ~90 px of air, and on a laptop
   the content began below the screen's edge, so a click seemed to change nothing. The picked card points into its
   content with a tail under its edge, in the ring's colour; where the cards are rows, only once the content opens right
   under the card (as the page opens it waits under all three). */
.lp-hero.is-chooser { padding-bottom: 1rem; }
.lp-picked > :is(.lp-3d, .lp-ads):first-child { padding-top: 1rem; }
.seg-card.is-on::before {
    content: ""; position: absolute; top: calc(100% + 1px); left: 50%; transform: translateX(-50%);
    border: 9px solid transparent; border-bottom: 0; border-top-color: var(--accent);
    pointer-events: none;
}
@media (max-width: 900px) {
    .seg-card.is-on:not(:has(+ .seg-picked))::before { content: none; }
}

/* hero "product peek" card */
.lp-hero-card {
    background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.5rem 1.5rem 1.25rem; box-shadow: 0 24px 60px rgba(20, 14, 6, .10);
}
.lp-card-head { display: flex; flex-direction: column; gap: .15rem; margin-bottom: 1rem; }
.lp-card-eyebrow { font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 700; color: var(--accent); }
.lp-card-title { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 400; color: var(--ink); line-height: 1.1; }
.lp-card-progress { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.25rem; }
.lp-card-progress-bar { flex: 1; height: 7px; border-radius: var(--radius-pill); background: var(--line); overflow: hidden; }
.lp-card-progress-bar > span { display: block; height: 100%; border-radius: var(--radius-pill); background: var(--accent); }
.lp-card-progress-label { font-size: .78rem; font-weight: 600; color: var(--ink-soft); white-space: nowrap; }
.lp-card-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .1rem; }
.lp-card-steps li {
    display: flex; align-items: center; gap: .7rem; padding: .5rem .55rem;
    border-radius: var(--radius); font-size: .9rem; color: var(--ink-soft);
}
.lp-card-steps li.is-active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.lp-card-steps li.is-done { color: var(--ink-mute); }
.lp-card-step-num {
    flex: none; width: 1.5rem; height: 1.5rem; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .78rem; font-weight: 700; background: var(--bg);
    border: 1px solid var(--line-strong); color: var(--ink-soft);
}
.lp-card-steps li.is-active .lp-card-step-num { background: var(--accent); border-color: var(--accent); color: #fff; }
.lp-card-steps li.is-done .lp-card-step-num { background: var(--ok-soft); border-color: var(--ok-soft); color: var(--ok); }
.lp-card-step-name { flex: 1; min-width: 0; }
.lp-card-step-tick { color: var(--ok); display: inline-flex; }

/* shared section heading */
.lp-section-head { max-width: 42rem; margin: 0 auto clamp(2rem, 4vw, 3rem); text-align: center; }
.lp-section-head .lp-eyebrow { margin-bottom: .75rem; }
.lp-section-head h2 { font-family: var(--font-serif); font-size: clamp(1.8rem, 3.5vw, 2.6rem); line-height: 1.1; }
.lp-section-head p { margin: 1rem 0 0; color: var(--ink-soft); font-size: 1.05rem; line-height: 1.55; }

/* The landing's 3D showcase under the »Gradim hišo« card, above its phases (Landing3dShowcase.razor - #1167 took it
   off, #1180 brought it back): copy left, the day/night slider right; one column under 800 px. The feature list and
   the slider are shared with the plan-locked 3D page (Plan3d.razor). */
.lp-3d, .lp-ads {
    max-width: var(--max); margin: 0 auto; padding: clamp(1.5rem, 4vw, 3rem) clamp(1.25rem, 4vw, 4rem);
    display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center;
}
.lp-3d-copy h2 { margin: .35rem 0 .7rem; font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.2; }
.lp-3d-copy p { margin: 0; color: var(--ink-soft); line-height: 1.6; }
.lp-3d-media { min-width: 0; }
@media (max-width: 800px) { .lp-3d, .lp-ads { grid-template-columns: 1fr; } }
.lp-3d-points { list-style: none; margin: 1.1rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.lp-3d-points li { display: flex; align-items: center; gap: .55rem; color: var(--ink); font-size: .95rem; }
.lp-3d-points li svg { color: var(--accent); flex: none; }

/* Day/night before-after comparison slider (the locked 3D page). The night image sits in normal flow and
   defines the box height; the day image overlays it, clipped to the LEFT of the divider (--pos) - so
   dragging right reveals more day, left reveals night. A full-cover transparent range input drives
   --pos, so there's no JS and it stays keyboard-accessible (arrow keys move the divider). */
.img-compare {
    position: relative; width: 100%; border-radius: var(--radius); overflow: hidden;
    border: 1px solid var(--line); user-select: none; touch-action: none; line-height: 0;
}
.img-compare .ic-img { width: 100%; display: block; -webkit-user-drag: none; }
.img-compare .ic-base { position: relative; height: auto; }
.img-compare .ic-top {
    position: absolute; inset: 0; height: 100%; object-fit: cover;
    clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}
.ic-divider {
    position: absolute; top: 0; bottom: 0; left: var(--pos);
    width: 2px; margin-left: -1px; background: #fff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .2); pointer-events: none;
}
.ic-handle {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 2.5rem; height: 2.5rem; border-radius: 50%; background: #fff; color: var(--accent);
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
}
.ic-range {
    position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
    -webkit-appearance: none; appearance: none; background: transparent;
    cursor: ew-resize; opacity: 0;
}
.ic-range::-webkit-slider-thumb { -webkit-appearance: none; width: 2.5rem; height: 100%; cursor: ew-resize; }
.ic-range::-moz-range-thumb { width: 2.5rem; height: 100%; border: 0; background: transparent; cursor: ew-resize; }
.ic-range:focus-visible { outline: none; }
.img-compare:focus-within .ic-handle { box-shadow: 0 0 0 3px var(--accent-soft), 0 2px 10px rgba(0, 0, 0, .35); }
.ic-badge {
    position: absolute; top: .6rem; padding: .2rem .55rem; border-radius: var(--radius-pill);
    font-size: .72rem; font-weight: 700; letter-spacing: .02em; color: #fff;
    background: rgba(0, 0, 0, .5); pointer-events: none;
}
.ic-badge-day { left: .6rem; }
.ic-badge-night { right: .6rem; }

/* The landing's ads showcase under the »Kupujem nepremičnino« card, above its phases (LandingAdsShowcase.razor, NomiFac
   #1275 - in place of the free parcel lookup #1180 had put there): the .lp-3d grid (its own class, so a test's section.lp-3d
   still means a 3D showcase) with one screenshot of /oglasi instead of the day/night slider. */
.lp-ads-shot { display: block; width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); }

/* cross-sell to the standalone lokacija.glog.si official-report service */
/* always-visible callout pill under the section heading */
.lp-parcel-loka-link {
    display: inline-flex; align-items: center; gap: .7rem; text-align: left;
    margin: 1.1rem auto 0; padding: .6rem .95rem .6rem .7rem;
    background: var(--accent-soft);
    border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
    color: var(--ink); text-decoration: none; font-size: .9rem; line-height: 1.4;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.lp-parcel-loka-link:hover {
    transform: translateY(-1px); border-color: var(--accent);
    box-shadow: 0 8px 22px rgba(10, 10, 10, .18);
}
.lp-parcel-loka-link-ic {
    flex: none; display: inline-flex; align-items: center; justify-content: center;
    width: 2rem; height: 2rem; border-radius: 50%; color: #fff; background: var(--accent);
}
.lp-parcel-loka-link-txt { min-width: 0; }
.lp-parcel-loka-link-cta { display: block; color: var(--accent-ink); font-weight: 700; white-space: nowrap; }
.lp-parcel-loka-link:hover .lp-parcel-loka-link-cta { text-decoration: underline; }
@media (max-width: 520px) {
    .lp-parcel-loka-link { border-radius: var(--radius); }
    .lp-parcel-loka-link-cta { white-space: normal; }
}

/* bold dark cross-sell card shown under a parcel result */
.lp-parcel-loka {
    position: relative; overflow: hidden; margin-top: .9rem;
    background:
        radial-gradient(120% 140% at 0% 0%, rgba(10, 10, 10, .35) 0%, transparent 55%),
        linear-gradient(135deg, #1a1a1a 0%, #1a1a1a 100%);
    border: 1px solid rgba(10, 10, 10, .35); border-radius: var(--radius);
    box-shadow: 0 18px 44px rgba(20, 14, 6, .28);
}
.lp-parcel-loka-glow {
    position: absolute; right: -22%; top: -55%; width: 70%; height: 200%;
    background: radial-gradient(circle, rgba(10, 10, 10, .45) 0%, transparent 65%);
    pointer-events: none;
}
.lp-parcel-loka-inner { position: relative; padding: 1.35rem 1.4rem; }
.lp-parcel-loka-badge {
    display: inline-flex; align-items: center; gap: .4rem; margin-bottom: .7rem;
    padding: .28rem .65rem; border-radius: var(--radius-pill);
    background: rgba(243, 217, 196, .14); border: 1px solid rgba(243, 217, 196, .28);
    color: var(--accent-soft); font-size: .72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .08em;
}
.lp-parcel-loka-title {
    font-family: var(--font-serif); font-size: 1.3rem; line-height: 1.15;
    color: #fff; margin-bottom: .45rem;
}
.lp-parcel-loka-text { margin: 0 0 .9rem; color: rgba(246, 246, 246, .78); font-size: .92rem; line-height: 1.55; }
.lp-parcel-loka-text strong { color: #fff; }
.lp-parcel-loka-points {
    list-style: none; margin: 0 0 1.1rem; padding: 0;
    display: flex; flex-wrap: wrap; gap: .4rem 1.1rem;
}
.lp-parcel-loka-points li {
    display: inline-flex; align-items: center; gap: .4rem;
    color: rgba(246, 246, 246, .9); font-size: .85rem;
}
.lp-parcel-loka-points li .icon { color: var(--accent-soft); }
.lp-parcel-loka-btn {
    display: inline-flex; align-items: center; gap: .5rem; white-space: nowrap;
    padding: .7rem 1.3rem; border-radius: var(--radius-pill);
    background: var(--accent); color: #fff; font-weight: 700; font-size: .95rem;
    text-decoration: none; border: 1px solid transparent;
    transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.lp-parcel-loka-btn:hover {
    transform: translateY(-1px); background: #d8662f; border-color: transparent;
    box-shadow: 0 10px 26px rgba(10, 10, 10, .42);
}
.lp-parcel-loka-btn span { transition: transform .15s ease; }
.lp-parcel-loka-btn:hover span { transform: translateX(3px); }
/* daily-quota upsell (shown instead of a red error when the free lookup is used up) */
.lp-parcel-limit {
    margin-top: 1.2rem; text-align: center; padding: 1.3rem 1.4rem;
    background: var(--accent-soft); border: 1px solid var(--accent); border-radius: var(--radius);
}
.lp-parcel-limit-text { margin: 0 auto 1rem; max-width: 46ch; color: var(--ink); font-size: .95rem; line-height: 1.5; }
.lp-parcel-limit-actions { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; }

/* newsletter band */
.lp-newsletter { max-width: var(--max); margin: 0 auto; padding: clamp(2.5rem, 5vw, 4.5rem) clamp(1.25rem, 4vw, 4rem); }

/* standalone /newsletter page - centers the shared newsletter card with a logo + back link */
.nl-page {
    min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 1.5rem; padding: 2rem 1.25rem;
}
.nl-page-brand { border-bottom: none; }
.nl-page-brand img { height: 6rem; display: block; }
.nl-page-section { width: 100%; padding-top: 0; padding-bottom: 0; }
.nl-page-back { color: var(--ink-soft); border-bottom: none; font-size: .9rem; }
/* kill the global a:hover bottom-border ("underline") on both links */
.nl-page-brand:hover, .nl-page-back:hover { color: var(--ink); border-bottom-color: transparent; }

/* #1175 »make this less intrusive on the page, background should be a lighter color«: a light card in the page's own
   card colour with a frame - it was an inverted near-black block (var(--ink)) that outweighed the chooser above it.
   Plain tokens throughout, so the dark theme needs no exception for it any more. */
.lp-newsletter-card {
    background: var(--bg-elev); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius);
    padding: clamp(2rem, 4vw, 3rem); display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center;
}
@media (max-width: 760px) { .lp-newsletter-card { grid-template-columns: 1fr; gap: 1.5rem; } }
.lp-newsletter-copy h2 { font-family: var(--font-serif); color: var(--ink); font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 .6rem; line-height: 1.1; }
.lp-newsletter-copy p { margin: 0; color: var(--ink-soft); line-height: 1.55; }
.lp-newsletter-form { display: flex; flex-wrap: wrap; gap: .6rem; }
.lp-newsletter-input {
    flex: 1; min-width: 12rem; border: 1px solid var(--line-strong);
    background: var(--bg); color: var(--ink);
    border-radius: var(--radius); padding: .8rem .9rem; font: inherit; font-size: 1rem;
}
.lp-newsletter-input::placeholder { color: var(--ink-mute); }
.lp-newsletter-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.lp-newsletter-submit { padding: .8rem 1.5rem; background: var(--accent); border-color: var(--accent); color: #fff; }
.lp-newsletter-submit:hover { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent-ink); }
.lp-newsletter-consent { flex-basis: 100%; margin: .25rem 0 0; font-size: .78rem; color: var(--ink-soft); }
.lp-newsletter-done { display: flex; align-items: center; gap: .85rem; }
.lp-newsletter-done p { margin: 0; color: var(--ink); line-height: 1.5; }
.lp-newsletter-done-ico {
    flex: none; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--ok); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
}
.lp-inline-link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-ink); text-decoration: underline; cursor: pointer; }
.lp-inline-link:hover { color: var(--accent); }

/* closing CTA */
.lp-final {
    max-width: 46rem; margin: 0 auto; text-align: center;
    padding: clamp(2.5rem, 5vw, 4.5rem) clamp(1.25rem, 4vw, 4rem) clamp(3rem, 6vw, 5rem);
}
.lp-final h2 { font-family: var(--font-serif); font-size: clamp(1.8rem, 3.5vw, 2.6rem); line-height: 1.1; }
.lp-final p { margin: 1rem auto 0; max-width: 34rem; color: var(--ink-soft); font-size: 1.05rem; }
.lp-final .lp-hero-actions { justify-content: center; margin-top: 1.75rem; }

.lp-sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ── Contractors (Izvajalci): directory page + task-modal picker ── */

/* Directory page */
.contractor-grid {
    display: grid; gap: 1rem; margin-top: 1.25rem;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
/* A company card, drawn exactly like the crew card next to it: the two lists sit in one console now,
   and a pinned yellow sticky note beside a plain white row read as two unrelated products. (The notes
   were the right idea while Izvajalci was a page of the notebook - it no longer is.) Metrics shared
   with .worker-card on purpose.

   No coloured rail down the left edge: at 3px it sat proud of the 1px hairline on the other three
   sides, so every card in the grid looked nicked out of its own corner. A card is identified by what it
   says, not by a stripe. */
.contractor-card {
    position: relative; display: flex; flex-direction: column; gap: .7rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--paper); color: var(--ink);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.contractor-card:hover { box-shadow: 0 6px 16px -12px rgba(26, 26, 26, .5); }

/* inline contractor add/edit form - a panel in the flow, not a modal and not a note */
.contractor-edit-inline { position: relative; margin: 1.5rem 0 1.75rem; }
.contractor-edit-inline .task-modal-card {
    position: static; width: 100%; max-width: none; max-height: none;
    background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: none;
}
.contractor-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; }
.contractor-card-title { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.contractor-card-title strong { font-size: 1rem; color: var(--ink); word-break: break-word; }
.contractor-card-sub { font-size: .82rem; color: var(--ink-soft); }
/* The card's ⋯ sits in the head's top-right corner - the same treatment as .worker-card-head, because
   the two tabs of the console must not answer the same gesture two different ways. */
.contractor-card-head .task-menu { margin-left: auto; }
.contractor-card-head .task-menu-btn { width: 1.9rem; height: 1.9rem; }
.contractor-trades { display: flex; flex-wrap: wrap; gap: .35rem; }
.contractor-trade-chip {
    font-size: .74rem; padding: .12rem .5rem; border-radius: var(--radius-pill);
    background: var(--accent-soft); color: var(--accent-ink); white-space: nowrap;
}
.contractor-contact { display: flex; flex-direction: column; gap: .25rem; font-size: .82rem; color: var(--ink-soft); }
/* Icon column stays fixed while the value wraps under itself, so the four lines align. */
.contractor-contact span { display: flex; align-items: flex-start; gap: .4rem; word-break: break-word; }
.contractor-contact .icon { flex-shrink: 0; margin-top: .22rem; color: var(--ink-mute); }
/* "Pot" beside an address - the dashboard's sites and the imenik's companies: Google Maps directions,
   on a phone the navigation app itself. A word, not a button: it sits inside a line of small print. */
.contractor-route {
    margin-left: .4rem; font-weight: 700; color: var(--accent-ink); white-space: nowrap;
    display: inline-flex; align-items: center; gap: .2rem; border-bottom: 0;
}
.contractor-notes { font-size: .82rem; color: var(--ink-mute); font-style: italic; white-space: pre-wrap; }

/* The company name carries the card the way the person's name carries a worker card. */
.contractor-card-title strong { font-family: var(--font-serif); font-size: 1.15rem; }
.contractor-contracts { border-top-color: var(--line); }

/* ---------- contracts on a contractor card (Pogodbe) ---------- */
/* Collapsed by default so a card without contracts stays a small sticky note; expanding loads them. */
.contractor-contracts { margin-top: .2rem; border-top: 1px dashed rgba(106, 106, 106, .35); padding-top: .5rem; }
.contractor-contracts-toggle {
    display: flex; align-items: center; gap: .4rem; width: 100%; padding: .1rem 0;
    background: none; border: none; cursor: pointer; font: inherit; font-size: .82rem;
    font-weight: 600; color: var(--ink-soft); text-align: left;
}
.contractor-contracts-toggle:hover { color: var(--ink); }
.contractor-contracts-caret { font-size: .7rem; width: .7rem; flex-shrink: 0; }
.contractor-contracts-count { margin-left: auto; font-weight: 400; font-size: .74rem; color: var(--ink-mute); }

.contract-empty { font-size: .78rem; color: var(--ink-mute); font-style: italic; margin: .4rem 0 0; }
.contract-list { list-style: none; margin: .5rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.contract-row {
    display: flex; gap: .5rem; padding: .45rem .55rem; border-radius: var(--radius);
    background: rgba(255, 255, 255, .45); border-left: 3px solid var(--ink-mute);
}
.contract-row.is-signed { border-left-color: #2e7d32; }
.contract-row.is-unsigned { border-left-color: #b8860b; }
.contract-check { flex-shrink: 0; padding-top: .1rem; cursor: pointer; }
.contract-check input { cursor: pointer; }
.contract-body { min-width: 0; display: flex; flex-direction: column; gap: .2rem; flex: 1; }
.contract-title { display: flex; align-items: baseline; gap: .4rem; flex-wrap: wrap; }
.contract-title strong { font-size: .86rem; color: var(--ink); word-break: break-word; }
.contract-badge {
    font-size: .68rem; padding: .05rem .4rem; border-radius: var(--radius-pill); white-space: nowrap; font-weight: 600;
}
.contract-badge.is-signed { background: rgba(46, 125, 50, .16); color: #22601f; }
.contract-badge.is-unsigned { background: rgba(184, 134, 11, .18); color: #7a5a08; }
.contract-meta {
    display: flex; flex-wrap: wrap; gap: .1rem .6rem; font-size: .74rem; color: var(--ink-mute);
}
.contract-meta span { word-break: break-word; }
.contract-meta-file { display: inline-flex; align-items: center; gap: .25rem; }
.contract-desc { font-size: .78rem; color: var(--ink-soft); white-space: pre-wrap; }
.contract-actions { display: flex; flex-wrap: wrap; gap: .1rem; margin-top: .15rem; }
/* Bare single-colour action icons - no border, no fill, label in the tooltip (title/aria-label).
   Keeps a dense contract row readable on the sticky note, where four small buttons would shout. */
.contract-icon {
    appearance: none; border: none; background: none; padding: .25rem; border-radius: var(--radius);
    cursor: pointer; color: var(--ink-mute); line-height: 0;
    display: inline-flex; align-items: center; justify-content: center;
    transition: color .15s, background .15s;
}
.contract-icon:hover:not(:disabled) { color: var(--accent); background: rgba(0, 0, 0, .06); }
.contract-icon:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.contract-icon:disabled { opacity: .45; cursor: default; }
/* Napredni-gated affordance: rendered as a plain <span>, so it needs the disabled look itself. */
.contract-icon.is-locked { opacity: .45; cursor: default; }
.contract-icon.is-locked:hover { color: var(--ink-mute); background: none; }
.contract-icon-danger:hover { color: #7a2020; }  /* matches .btn-danger */
/* The file input covers the whole icon so the label itself is the click target. */
.contract-upload { position: relative; overflow: hidden; }
.contract-upload input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.contract-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-top: .6rem; }
.contract-template { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.contract-template-trade { font-size: .78rem; padding: .2rem .35rem; max-width: 200px; }
.contract-hint { font-size: .72rem; color: var(--ink-mute); font-style: italic; margin: .35rem 0 0; }

/* Contract editor modal */
.contract-edit-card { max-width: 560px; width: 100%; }
.contract-edit-body { display: flex; flex-direction: column; gap: .85rem; }
.contract-signed-field { justify-content: flex-start; }
.contract-signed-check { display: flex; align-items: center; gap: .4rem; padding-top: .35rem; cursor: pointer; }
.contract-file-current {
    display: flex; flex-direction: column; gap: .1rem; font-size: .8rem; color: var(--ink-soft);
    margin-bottom: .3rem;
}
.contract-file-hint { font-size: .72rem; color: var(--ink-mute); }
.contract-file-pick {
    display: flex; align-items: center; gap: .5rem; padding: .5rem .6rem; cursor: pointer;
    border: 1px dashed var(--line); border-radius: var(--radius); font-size: .8rem; color: var(--ink-soft);
}
.contract-file-pick:hover { border-color: var(--accent); color: var(--ink); }

/* ---------- assistant memory (Kaj si pomočnik zapomni) ---------- */
.memory-settings {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    margin: 1rem 0 .5rem; padding: .75rem 1rem; border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--bg-elev);
}
.memory-toggle { display: flex; align-items: center; gap: .5rem; font-size: .9rem; color: var(--ink); cursor: pointer; }
.memory-settings-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.memory-section-title { margin-top: 1.6rem; font-size: 1.05rem; color: var(--ink); }
.memory-section-hint { margin: .15rem 0 .6rem; font-size: .82rem; color: var(--ink-mute); }
.memory-list { display: flex; flex-direction: column; gap: .55rem; }
.memory-card {
    border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev);
    padding: .75rem .9rem; display: flex; flex-direction: column; gap: .45rem;
}
.memory-card-pending { border-style: dashed; }
.memory-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; }
.memory-card-meta { display: flex; gap: .35rem; flex-wrap: wrap; }
.memory-icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 1.9rem; height: 1.9rem; padding: 0; border-radius: var(--radius); flex: 0 0 auto;
    border: 1px solid transparent; background: transparent; color: var(--ink-soft); cursor: pointer;
}
.memory-icon-btn:hover { background: var(--bg); color: var(--ink); border-color: var(--line); }
.memory-icon-btn svg { width: 16px; height: 16px; }
.memory-icon-btn.memory-icon-yes:hover { color: var(--accent); border-color: var(--accent); }
.memory-icon-btn.memory-icon-danger:hover { color: var(--danger, #c0392b); border-color: var(--danger, #c0392b); }
.memory-chip {
    font-size: .72rem; padding: .1rem .5rem; border-radius: var(--radius-pill);
    background: var(--accent-soft); color: var(--accent-ink); white-space: nowrap;
}
.memory-chip-scope { background: var(--line); color: var(--ink-soft); }
.memory-text { margin: 0; font-size: .92rem; color: var(--ink); word-break: break-word; }
.memory-card-actions { display: flex; gap: .25rem; flex-wrap: wrap; }
.memory-edit { width: 100%; resize: vertical; font: inherit; padding: .4rem .5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--ink); }
.memory-time { margin-left: auto; align-self: center; font-size: .72rem; color: var(--ink-mute); white-space: nowrap; }
.memory-search { margin: .9rem 0 .2rem; }
.memory-search input {
    width: 100%; font: inherit; padding: .5rem .7rem;
    border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--ink);
}
.memory-search input::placeholder { color: var(--ink-mute); }

/* ── /memory: "second brain" treatment — a neural hero + the memory list as a synaptic pathway ── */
/* Back to the Pomočnik: the memory page hangs off the chat, not off a bookmark of its own. */
.memory-back {
    display: inline-flex; align-items: center; gap: .3rem; margin-bottom: .9rem;
    font-size: .88rem; color: var(--ink-soft); text-decoration: none;
}
.memory-back:hover { color: var(--accent-ink); }
.memory-hero { display: flex; align-items: center; gap: 1.15rem; }
.memory-brain {
    flex: 0 0 auto; width: 4.6rem; height: 4.6rem; display: grid; place-items: center; color: var(--accent);
    border-radius: 50%; background: radial-gradient(circle at 50% 45%, var(--accent-soft), transparent 70%);
}
.memory-brain svg { width: 3.3rem; height: 3.3rem; overflow: visible; }
.memory-brain .mem-synapse { opacity: .45; }
.memory-brain .mem-hub { transform-origin: 32px 33px; animation: mem-pulse 3.4s ease-in-out infinite; }
@keyframes mem-pulse {
    0%, 100% { opacity: .9; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.14); }
}
@media (max-width: 560px) { .memory-brain { width: 3.6rem; height: 3.6rem; } .memory-brain svg { width: 2.6rem; height: 2.6rem; } }
@media (prefers-reduced-motion: reduce) { .memory-brain .mem-hub { animation: none; } }

/* Each memory reads as a node on a synaptic pathway: a soft rail down the list + a node per card. */
.memory-page .memory-list { position: relative; padding-left: 1.5rem; }
.memory-page .memory-list::before {
    content: ""; position: absolute; left: .5rem; top: .5rem; bottom: .5rem; width: 2px; border-radius: var(--radius);
    background: linear-gradient(var(--accent-soft), var(--line) 45%, var(--accent-soft));
}
.memory-page .memory-card { position: relative; }
.memory-page .memory-card::before {
    content: ""; position: absolute; left: -1.27rem; top: 1.15rem; width: .5rem; height: .5rem; border-radius: 50%;
    background: var(--bg-elev); border: 2px solid var(--accent); box-shadow: 0 0 0 3px var(--bg);
}
.memory-page .memory-card-pending::before { border-color: var(--ink-mute); }

/* Inline memory cards inside the assistant chat ("💡 Naj si zapomnim …?" / "✓ Zapomnil sem si …") */
.ai-memory-cards { display: flex; flex-direction: column; gap: .35rem; margin-top: .5rem; }
.ai-memory-card {
    display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
    font-size: .82rem; padding: .4rem .6rem; border-radius: var(--radius);
    background: var(--accent-soft); color: var(--ink); border: 1px solid var(--line);
}
.ai-memory-card.ai-memory-rejected { opacity: .65; }
.ai-memory-text { flex: 1 1 auto; min-width: 0; }
.ai-memory-text em { font-style: normal; font-weight: 600; }
.ai-memory-btn {
    flex: 0 0 auto; font: inherit; font-size: .78rem; padding: .15rem .6rem; border-radius: var(--radius-pill);
    border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer;
}
.ai-memory-btn:hover { background: var(--bg-elev); }
.ai-memory-btn.ai-memory-yes { background: var(--accent); color: #fff; border-color: var(--accent); }

/* A change the Pomočnik prepared (NomiFac #1314): the card with Potrdi / Zavrni under the answer. It wraps at any width -
   long names and ids break, the buttons go under each other on a phone - so it never scrolls the chat sideways. */
.ai-cards { display: flex; flex-direction: column; gap: .5rem; margin-top: .55rem; min-width: 0; max-width: 100%; }
.ai-card {
    box-sizing: border-box; max-width: 100%; min-width: 0; padding: .6rem .75rem; border-radius: var(--radius);
    background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-left: 3px solid var(--accent);
    font-size: .88rem; line-height: 1.45; overflow-wrap: anywhere;
}
.ai-card.is-confirmed { border-left-color: var(--ok); }
.ai-card.is-rejected, .ai-card.is-expired { border-left-color: var(--line); opacity: .8; }
.ai-card.is-failed { border-left-color: var(--danger, #b3261e); }
.ai-card-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: .35rem .5rem; font-weight: 600; }
.ai-card-mark { color: var(--accent); }
.ai-card-title { flex: 1 1 auto; min-width: 0; }
.ai-card-exp { flex: 0 0 auto; font-size: .76rem; font-weight: 400; color: var(--ink-mute); }
.ai-card-summary { margin: .35rem 0 0; }
.ai-card-list, .ai-card-warn { margin: .35rem 0 0; padding-left: 1.1rem; }
.ai-card-list li, .ai-card-warn li { margin: .1rem 0; }
.ai-card-warn { color: #9c6c06; font-size: .82rem; }
.ai-card-actions { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .55rem; }
.ai-card-btn {
    flex: 0 1 auto; min-height: 2.75rem; padding: .35rem 1.1rem; border-radius: var(--radius); cursor: pointer;
    font: inherit; font-weight: 600; border: 1px solid var(--line); background: var(--bg-elev); color: var(--ink);
}
.ai-card-btn:hover:not(:disabled) { border-color: var(--accent); }
.ai-card-btn.ai-card-yes { background: var(--accent); border-color: var(--accent); color: #fff; }
.ai-card-btn:disabled { opacity: .55; cursor: default; }
.ai-card-state { margin: .45rem 0 0; font-size: .84rem; color: var(--ink-mute); }
.ai-card.is-confirmed .ai-card-state { color: var(--ok); font-weight: 600; }
.ai-card-error { color: var(--danger, #b3261e); }
.ai-card-link { display: inline-block; margin-left: .35rem; color: var(--accent-ink, var(--accent)); font-weight: 600; }
.cover-ai-cards { align-self: stretch; max-width: 100%; min-width: 0; }
.cover-ai-cards .ai-cards { margin-top: 0; }
@media (max-width: 420px) {
    .ai-card-actions .ai-card-btn { flex: 1 1 8rem; }
}

/* Editor modal */
.contractor-edit-card { max-width: 620px; width: 100%; }
.contractor-edit-body { display: flex; flex-direction: column; gap: .85rem; }
.contractor-trade-picker { display: flex; flex-wrap: wrap; gap: .35rem; }
.contractor-trade-opt {
    font-size: .78rem; padding: .25rem .6rem; border-radius: var(--radius-pill); cursor: pointer;
    border: 1px solid var(--line-strong); background: var(--bg-elev); color: var(--ink-soft);
    transition: background .12s, border-color .12s, color .12s;
}
.contractor-trade-opt:hover { border-color: var(--accent); }
.contractor-trade-opt.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.contractor-trade-opt.is-custom { background: var(--accent-ink); border-color: var(--accent-ink); }
.contractor-trade-add { display: flex; gap: .4rem; margin-top: .45rem; }
.contractor-trade-add .type-input { flex: 1; }

/* Task-modal: attached chips + picker */
.task-contractors { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0 .2rem; }
.contractor-chip {
    display: inline-flex; align-items: center; gap: .4rem; max-width: 100%;
    padding: .2rem .25rem .2rem .6rem; border-radius: var(--radius-pill);
    border: 1px solid var(--line-strong); background: var(--bg-elev); font-size: .8rem;
}
.contractor-chip-name { font-weight: 600; color: var(--ink); }
.contractor-chip-trade { color: var(--ink-mute); font-size: .74rem; }
.contractor-chip-remove {
    border: none; background: transparent; cursor: pointer; line-height: 1;
    font-size: 1rem; color: var(--ink-mute); padding: 0 .15rem;
}
.contractor-chip-remove:hover { color: var(--accent); }
.contractor-picker {
    margin: .5rem 0; padding: .75rem; border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--bg); display: flex; flex-direction: column; gap: .6rem;
}
.contractor-picker-search { width: 100%; }
.contractor-picker-list { display: flex; flex-direction: column; gap: .25rem; max-height: 220px; overflow-y: auto; }
.contractor-picker-item {
    display: flex; justify-content: space-between; align-items: center; gap: .6rem;
    text-align: left; cursor: pointer; padding: .4rem .6rem; border-radius: var(--radius);
    border: 1px solid var(--line); background: var(--bg-elev); color: var(--ink);
}
.contractor-picker-item:hover { border-color: var(--accent); background: var(--accent-soft); }
.contractor-picker-name { font-weight: 600; }
.contractor-picker-trade { color: var(--ink-mute); font-size: .76rem; text-align: right; }
.contractor-picker-empty { margin: 0; font-size: .82rem; color: var(--ink-mute); }
/* "+ Nov izvajalec" link-button in the task picker - opens the full contractor form modal. */
.contractor-quickadd-open {
    appearance: none; border: none; background: transparent; padding: 0;
    align-self: flex-start; cursor: pointer; font-size: .82rem; color: var(--accent-ink);
}
.contractor-quickadd-open:hover { text-decoration: underline; }

/* ── Map location picker (MapPicker.razor + map-picker.js) ──────────────────────────────────── */
/* "Na zemljevidu" target button sitting beside the k.o. + številka fields (matches .parcel-go height). */
.parcel-pick-btn {
    display: inline-flex; align-items: center; gap: .4rem; align-self: flex-end; height: 2.65rem;
    border: 1px solid #cfcfcf; background: #fff; color: #7a4a1f; border-radius: var(--radius);
    padding: 0 .75rem; cursor: pointer; font: inherit; font-size: .86rem; font-weight: 600; white-space: nowrap;
}
.parcel-pick-btn:hover { background: #f6f6f6; border-color: #e0560f; color: #e0560f; }
.parcel-pick-btn svg { width: 18px; height: 18px; }
@media (max-width: 560px) { .parcel-pick-txt { display: none; } }

/* Landing "start on the map" CTA + divider (PublicParcelLookup). */
.lp-parcel-map-cta {
    display: flex; align-items: center; gap: .8rem; width: 100%; text-align: left; cursor: pointer;
    border: 1px solid #e3b48f; background: linear-gradient(180deg, #fff8f0, #f2f2f2);
    border-radius: var(--radius); padding: .85rem 1rem; color: #7a3d18; transition: border-color .15s, transform .05s;
}
.lp-parcel-map-cta:hover { border-color: #e0560f; }
.lp-parcel-map-cta:active { transform: translateY(1px); }
.lp-parcel-map-cta-ic { display: grid; place-items: center; flex: 0 0 auto; width: 40px; height: 40px;
    border-radius: var(--radius); background: #e0560f; color: #fff; }
.lp-parcel-map-cta-ic svg { width: 22px; height: 22px; }
.lp-parcel-map-cta-txt { display: flex; flex-direction: column; flex: 1 1 auto; line-height: 1.25; }
.lp-parcel-map-cta-txt strong { font-size: 1rem; }
.lp-parcel-map-cta-txt span { font-size: .85rem; color: #6a6a6a; }
.lp-parcel-map-cta-go { flex: 0 0 auto; font-size: 1.3rem; color: #e0560f; }
.lp-parcel-or { display: flex; align-items: center; gap: .7rem; margin: .85rem 0; color: #8a8a8a; font-size: .8rem; }
.lp-parcel-or > span { white-space: nowrap; }
.lp-parcel-or::before, .lp-parcel-or::after { content: ""; flex: 1; height: 1px; background: #e4e4e4; }

/* The modal. */
.mappick-overlay {
    position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center;
    padding: 16px; background: rgba(10, 10, 10, .55); backdrop-filter: blur(2px);
}
.mappick {
    display: flex; flex-direction: column; width: min(880px, 100%); max-height: 92vh; overflow: hidden;
    background: #fff; border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}
.mappick-head { display: flex; align-items: center; justify-content: space-between; padding: .9rem 1.1rem;
    border-bottom: 1px solid #e4e4e4; }
.mappick-head h3 { margin: 0; font-size: 1.05rem; color: #262626; }
.mappick-x { width: 32px; height: 32px; border: none; background: transparent; border-radius: var(--radius);
    font-size: 1.1rem; cursor: pointer; color: #8a8a8a; }
.mappick-x:hover { background: #ededed; color: #262626; }

/* z-index 1100 lifts the search bar + its address dropdown above all Leaflet panes/controls
   (tiles 200 … popups 700 … zoom control 1000), which otherwise hide/eat the suggestion list. */
.mappick-search { position: relative; z-index: 1100; padding: .8rem 1.1rem .2rem; }
/* Address search must look EXACTLY like the KO dropdown (KoSelect). Here it isn't inside a .parcel-field,
   so we mirror ".parcel-field input" directly (border/radius/bg/font/color/focus/placeholder); only the
   width (full) + right padding (caret room) differ. */
.mappick-search .ko-combo { width: 100%; }
.mappick-search .ko-combo-input {
    width: 100%; box-sizing: border-box; padding: .6rem 1.9rem .6rem .75rem;
    border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--bg);
    font-family: var(--font-sans); font-size: .95rem; color: var(--ink); transition: border-color .15s;
}
.mappick-search .ko-combo-input:focus { outline: none; border-color: var(--accent); box-shadow: none; }
.mappick-search .ko-combo-input::placeholder { color: var(--ink-mute); font-style: italic; }
/* Magnifier (search affordance) in place of the KO dropdown's down-caret. */
.mappick-search-mag {
    position: absolute; right: .7rem; top: 50%; transform: translateY(-50%);
    width: 1rem; height: 1rem; color: var(--ink-mute); pointer-events: none;
}
.mappick-search-mag svg { width: 1rem; height: 1rem; display: block; }
.mappick-search-ic { position: absolute; left: 1.5rem; top: 1.25rem; width: 18px; height: 18px; color: #9a9a9a; pointer-events: none; }
.mappick-search-ic svg { width: 18px; height: 18px; }
.mappick-search-input { width: 100%; padding: .6rem .7rem .6rem 2.2rem; border: 1px solid #cfcfcf; border-radius: var(--radius); font: inherit; }
.mappick-search-input:focus { outline: none; border-color: #e0560f; box-shadow: 0 0 0 3px rgba(224, 86, 15, .12); }
.mappick-suggest { position: absolute; left: 1.1rem; right: 1.1rem; top: 100%; z-index: 5; margin-top: -.1rem;
    list-style: none; padding: .25rem; background: #fff; border: 1px solid #d6d6d6; border-radius: var(--radius);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .15); max-height: 240px; overflow: auto; }
.mappick-suggest-opt { padding: .5rem .6rem; border-radius: var(--radius); cursor: pointer; font-size: .9rem; }
.mappick-suggest-opt:hover { background: #f2f2f2; }
.mappick-suggest-empty { padding: .5rem .6rem; color: #8a8a8a; font-size: .85rem; }

.mappick-map-wrap { position: relative; flex: 1 1 auto; min-height: 0; padding: .6rem 1.1rem; }
.mappick-map { width: 100%; height: 56vh; min-height: 300px; overflow: hidden; border-radius: var(--radius);
    border: 1px solid #d6d6d6; background: #eef1f3; cursor: crosshair; }
/* fallback shown over the (blank) map when WebGL/map init fails — e.g. the browser disabled the GPU
   after a prior crash. Sits inside the position:relative wrap, over the empty map box. */
.mappick-map-fail {
    position: absolute; inset: .6rem 1.1rem; display: flex; align-items: center; justify-content: center;
    text-align: center; padding: 1.2rem; border-radius: var(--radius); border: 1px solid #d6d6d6;
    background: #f6f6f6; color: #5b5b5b; font-size: .9rem; line-height: 1.5;
}
.mappick-map-fail span { max-width: 40ch; }

/* Full-screen toggle overlaid on the map's top-right corner (Leaflet's zoom control sits top-left). */
.mappick-fs-btn {
    position: absolute; top: 1.1rem; right: 1.6rem; z-index: 1000;
    width: 2.1rem; height: 2.1rem; display: inline-flex; align-items: center; justify-content: center;
    background: #fff; border: 1px solid #cfcfcf; border-radius: var(--radius); cursor: pointer;
    color: #5b5b5b; font-size: 1.05rem; line-height: 1; box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
}
.mappick-fs-btn:hover { background: #f2f2f2; color: #262626; }

/* "Zemljevid | Satelit" sheet switch - a MapLibre control at the map's bottom-left, so MapLibre's own
   .maplibregl-ctrl-group supplies the white pill + shadow and these rules only turn its two square icon
   slots into text buttons. Colours are literal, not tokens: the control pill stays white in dark mode
   (dark.css does not restyle MapLibre chrome), so dark ink on white is right in BOTH themes. The
   selector doubles up on the group class because maplibre-gl.css is injected at runtime and would
   otherwise win the tie on source order. */
.mappick-viewsw { display: flex; }
.mappick-viewsw.maplibregl-ctrl-group button {
    width: auto; height: 1.75rem; padding: 0 .6rem; border: 0; background: none; cursor: pointer;
    font: 600 .72rem/1 var(--font-sans); letter-spacing: .02em; color: #5b5b5b;
}
.mappick-viewsw.maplibregl-ctrl-group button + button { border-left: 1px solid #d6d6d6; }
.mappick-viewsw.maplibregl-ctrl-group button:hover { background: #ededed; color: #262626; }
.mappick-viewsw.maplibregl-ctrl-group button.is-on { background: #0a0a0a; color: #fff; }

.mappick-readout { padding: .2rem 1.1rem .4rem; min-height: 2.4rem; }
.mappick-result { display: flex; flex-wrap: wrap; gap: .5rem .9rem; }
.mappick-result-item { display: flex; flex-direction: column; padding: .4rem .7rem; background: #f2f2f2; border-radius: var(--radius); }
.mappick-result-k { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: #8a8a8a; }
.mappick-result-v { font-weight: 700; color: #262626; }
.mappick-empty, .mappick-busy { display: inline-flex; align-items: center; gap: .4rem; color: #8a8a8a; font-size: .9rem; }
.mappick-ok { color: #2e7d32; font-size: .9rem; font-weight: 600; }

.mappick-foot { display: flex; justify-content: flex-end; gap: .6rem; padding: .8rem 1.1rem 1rem; border-top: 1px solid #e4e4e4; }
.mappick-cancel { border: none; background: #ededed; color: #5b5b5b; }
.mappick-cancel:hover { background: #e4e4e4; }

/* The dropped pin (Leaflet divIcon SVG); accent comes from currentColor. */
.mappick-pin { background: none; border: none; color: #e0560f; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .35)); }
/* Force a crosshair over the whole map - MapLibre otherwise sets a "grab" hand cursor (looks un-clickable).
   MapLibre's cursor is an inline style on the canvas container, so !important here wins over it. */
.mappick-map .maplibregl-canvas-container, .mappick-map .maplibregl-canvas { cursor: crosshair !important; }
/* Inline (non-modal) layout - the map is shown straight on the page above the manual form. position +
   z-index:0 give the whole widget its own stacking context, so Leaflet's panes/controls (z-index up to
   1100) stay UNDER the page's sticky header when the page is scrolled. */
.mappick-root-inline { width: 100%; }
.mappick--inline { position: relative; z-index: 0; width: 100%; max-width: 100%; max-height: none; box-shadow: none;
    border: 1px solid #d6d6d6; border-radius: var(--radius); }
.mappick--inline .mappick-map { height: 420px; }

/* Full-screen pop-out of the inline picker: the same widget lifted to a fixed, full-viewport overlay
   (z-index 2000 puts it above all page chrome). The map flexes to fill the remaining height. */
.mappick--inline.mappick--fullscreen {
    position: fixed; inset: 0; z-index: 2000; width: 100%; max-width: 100%;
    height: 100vh; height: 100dvh; max-height: none; border: none; border-radius: 0; background: #fff;
}
.mappick--fullscreen .mappick-map { height: 100%; min-height: 0; border-radius: 0; }

/* ── Komunalni prispevek widget (KpWidget.razor) ── */
.kp { margin-top: 1.25rem; padding: 1rem 1.25rem; border: 1px solid #e2e6ea; border-radius: var(--radius); background: #fff; }
.kp-eyebrow { font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; color: #6b7280; }
.kp-head h3 { margin: .15rem 0 .25rem; font-size: 1.05rem; }
.kp-head p { margin: 0 0 .75rem; color: #6b7280; font-size: .85rem; }
.kp-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem; align-items: end; }
.kp-field label { display: block; font-size: .8rem; color: #374151; margin-bottom: .25rem; }
.kp-field input, .kp-field select { width: 100%; padding: .45rem .55rem; border: 1px solid #d1d5db; border-radius: var(--radius); }
.kp-unit { display: flex; align-items: center; gap: .4rem; }
.kp-unit span { color: #6b7280; font-size: .85rem; }
.kp-oprema { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; font-size: .85rem; }
.kp-oprema-lbl { color: #374151; font-weight: 600; }
.kp-oprema label { display: inline-flex; align-items: center; gap: .35rem; }
.kp-go { grid-column: 1 / -1; justify-self: start; }
.kp-result { margin-top: 1rem; }
.kp-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.kp-table th, .kp-table td { padding: .4rem .5rem; border-bottom: 1px solid #eef1f4; text-align: left; }
.kp-table thead th { color: #6b7280; font-weight: 600; font-size: .75rem; text-transform: uppercase; }
.kp-num { text-align: right; font-variant-numeric: tabular-nums; }
.kp-total { font-weight: 700; }
.kp-table tfoot td { border-top: 2px solid #d1d5db; border-bottom: none; }
.kp-note { color: #92600a; background: #fff7ed; border: 1px solid #fed7aa; border-radius: var(--radius); padding: .5rem .65rem; font-size: .8rem; margin: .5rem 0 0; }
.kp-source { color: #6b7280; font-size: .78rem; margin: .5rem 0 0; }
.kp-basis { color: #6b7280; font-size: .78rem; margin: 1rem 0 0; }

/* OPN odlok building rules (RAG) inside the "Vsi atributi OPN" accordion */
.parcel-rules { margin-top: 1rem; }
.parcel-rule { border-left: 3px solid var(--accent, #2563eb); padding: .35rem 0 .35rem .7rem; margin: .55rem 0; }
.parcel-rule-src { font-size: .76rem; color: #6b7280; margin-bottom: .15rem; }
.parcel-rule-src a { margin-left: .45rem; }
.parcel-rule-text { font-size: .86rem; white-space: pre-wrap; line-height: 1.45; }
.parcel-rule-note { font-size: .74rem; color: #9ca3af; margin-top: .55rem; }

/* ETN price trend chart (Cene accordion): per-kind tabs + an interactive SVG median-area chart with a hover
   tooltip, average overlay line and a year-over-year badge. Self-scaled per property kind. */
.price-panel { margin: .2rem 0 .6rem; }

/* property-kind tabs */
.price-tabs { display: flex; gap: .3rem; margin-bottom: .7rem; flex-wrap: wrap; }
.price-tab {
    font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer;
    padding: .3rem .7rem; border-radius: var(--radius-pill);
    border: 1px solid var(--line-strong); background: var(--bg-elev); color: var(--ink-soft);
    transition: background .15s, color .15s, border-color .15s;
}
.price-tab:hover { border-color: var(--accent); color: var(--accent-ink); }
.price-tab.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* KPI header */
.price-head { display: flex; align-items: flex-end; justify-content: space-between; gap: .7rem; margin-bottom: .15rem; }
.price-head-main { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.price-head-val { font-size: 1.7rem; font-weight: 700; line-height: 1; color: var(--ink); letter-spacing: -.01em; }
.price-head-val small { font-size: .82rem; font-weight: 600; color: var(--ink-mute); margin-left: .3rem; }
.price-head-meta { font-size: .76rem; color: var(--ink-mute); }
.price-trend {
    display: inline-flex; align-items: baseline; gap: .25rem; white-space: nowrap;
    font-size: .82rem; font-weight: 700; padding: .2rem .5rem; border-radius: var(--radius-pill);
}
.price-trend small { font-size: .64rem; font-weight: 500; opacity: .8; }
.price-trend-arrow { font-size: .68rem; }
.price-trend.is-up { color: #3d6b4a; background: var(--ok-soft); }
.price-trend.is-down { color: #b5483f; background: #fbe9e6; }

/* chart */
.price-chart-wrap { position: relative; margin-top: .2rem; }
.price-svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.price-grid { stroke: var(--line); stroke-width: 1; }
/* axis labels are HTML overlays positioned in % of the chart box (top/left set inline) */
.price-axis-y { position: absolute; right: 93.4%; transform: translateY(-50%); white-space: nowrap;
    font-size: .68rem; color: var(--ink-mute); pointer-events: none; }
.price-axis-x { position: absolute; transform: translate(-50%, -50%); white-space: nowrap;
    font-size: .68rem; color: var(--ink-mute); pointer-events: none; }
.price-axis-x.is-active { color: var(--accent-ink); font-weight: 700; }
.price-grad-a { stop-color: var(--accent); stop-opacity: .30; }
.price-grad-b { stop-color: var(--accent); stop-opacity: .02; }
.price-area { fill: url(#priceGrad); stroke: none; }
.price-line { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.price-avg { fill: none; stroke: var(--ink-mute); stroke-width: 1.5; stroke-dasharray: 4 3; opacity: .75; }
.price-guide { stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 3 3; }
.price-dot { fill: var(--accent); stroke: var(--bg-elev); stroke-width: 1.5; }
.price-dot.is-active { fill: var(--accent-ink); stroke: var(--bg-elev); stroke-width: 2; }
.price-hit { fill: transparent; pointer-events: all; cursor: pointer; }

/* hover tooltip (positioned in % of the chart box) */
.price-tip {
    position: absolute; transform: translate(-50%, calc(-100% - 12px)); pointer-events: none;
    background: var(--ink); color: #f6f6f6; border-radius: var(--radius); padding: .45rem .6rem;
    font-size: .74rem; line-height: 1.5; white-space: nowrap; z-index: 2;
    box-shadow: 0 6px 18px rgba(0,0,0,.22);
}
.price-tip.tip-l { transform: translate(-12%, calc(-100% - 12px)); }
.price-tip.tip-r { transform: translate(-88%, calc(-100% - 12px)); }
.price-tip.tip-below { transform: translate(-50%, 12px); }
.price-tip.tip-below.tip-l { transform: translate(-12%, 12px); }
.price-tip.tip-below.tip-r { transform: translate(-88%, 12px); }
.price-tip-yr { font-weight: 700; font-size: .8rem; margin-bottom: .15rem; }
.price-tip-row { display: flex; align-items: baseline; justify-content: space-between; gap: .9rem; }
.price-tip-row b { font-weight: 700; }
.price-tip-key { color: rgba(246, 246, 246,.7); }
.price-tip-key.is-med::before, .price-tip-key.is-avg::before {
    content: ""; display: inline-block; width: 8px; height: 2px; vertical-align: middle; margin-right: .35rem; border-radius: var(--radius);
}
.price-tip-key.is-med::before { background: var(--accent-soft); height: 3px; }
.price-tip-key.is-avg::before { background: rgba(246, 246, 246,.55); }
.price-tip-range, .price-tip-count { color: rgba(246, 246, 246,.6); font-size: .68rem; margin-top: .1rem; }

/* legend */
.price-legend { display: flex; align-items: center; gap: .9rem; margin-top: .55rem; flex-wrap: wrap; }
.price-leg { display: inline-flex; align-items: center; gap: .35rem; font-size: .74rem; color: var(--ink-soft); }
.price-leg-mark { display: inline-block; width: 14px; height: 0; border-top-width: 3px; border-top-style: solid; border-radius: var(--radius); }
.price-leg-mark.is-med { border-top-color: var(--accent); }
.price-leg-mark.is-avg { border-top-color: var(--ink-mute); border-top-style: dashed; border-top-width: 2px; }
.price-leg-hint { margin-left: auto; font-size: .7rem; color: var(--ink-mute); }

/* Reusable traffic-light gauge + tone chips (location-report widgets: podnebje / bivanje / nevarnosti).
   Each gauge shows a value's position on a [Min,Max] scale split into green/yellow/red zones, with a needle. */
.gauge-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem 1.4rem; margin: .3rem 0 .55rem; }
.gauge { min-width: 0; }
.gauge-head { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; margin-bottom: .3rem; }
.gauge-label { font-size: .78rem; font-weight: 600; color: var(--ink-soft); }
.gauge-val { font-size: .92rem; font-weight: 700; white-space: nowrap; }
.gauge-val small { font-size: .72rem; font-weight: 600; opacity: .85; margin-left: .2rem; }
.gauge-val.tone-good { color: #3d6b4a; }
.gauge-val.tone-warn { color: #9c6c06; }
.gauge-val.tone-bad { color: #b5483f; }
.gauge-track { position: relative; padding: 4px 0; }
.gauge-zones { display: flex; height: 9px; border-radius: var(--radius); overflow: hidden; background: var(--line); }
.gauge-zone { min-width: 2px; }
.gauge-zone.tone-good { background: rgba(61,107,74,.45); }
.gauge-zone.tone-warn { background: rgba(192,143,38,.5); }
.gauge-zone.tone-bad { background: rgba(181,72,63,.48); }
.gauge-needle { position: absolute; top: 1px; bottom: 1px; width: 2px; background: var(--ink); transform: translateX(-50%); border-radius: var(--radius); }
.gauge-needle::before {
    content: ""; position: absolute; top: -3px; left: 50%; transform: translateX(-50%);
    width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid var(--ink);
}
.gauge-scale { display: flex; justify-content: space-between; margin-top: .25rem; font-size: .66rem; color: var(--ink-mute); }

/* one-line color legend under a gauge group */
.gauge-legend { display: flex; gap: .9rem; flex-wrap: wrap; font-size: .68rem; color: var(--ink-mute); margin: .15rem 0 .3rem; }
.gauge-legend i { display: inline-block; width: 9px; height: 9px; border-radius: var(--radius); margin-right: .3rem; vertical-align: middle; }
.gauge-legend .tone-good { background: rgba(61,107,74,.6); }
.gauge-legend .tone-warn { background: rgba(192,143,38,.65); }
.gauge-legend .tone-bad { background: rgba(181,72,63,.62); }

/* tone chips for boolean / categorical factors (erozija, plazovi, hrup) */
.hazard-chips { display: flex; flex-direction: column; gap: .45rem; margin: .2rem 0 .55rem; }
.hazard-chip-row { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.hazard-chip-lbl { font-size: .82rem; font-weight: 600; color: var(--ink-soft); min-width: 5.5rem; }
.hazard-chip-note { font-size: .76rem; color: var(--ink-mute); }
.tone-chip { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; font-weight: 700; padding: .14rem .6rem; border-radius: var(--radius-pill); }
.tone-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; }
.tone-chip.tone-good { color: #3d6b4a; background: var(--ok-soft); }
.tone-chip.tone-good::before { background: #3d6b4a; }
.tone-chip.tone-warn { color: #9c6c06; background: #f2f2f2; }
.tone-chip.tone-warn::before { background: #c08f26; }
.tone-chip.tone-bad { color: #b5483f; background: #fbe9e6; }
.tone-chip.tone-bad::before { background: #b5483f; }

/* Raw "Vsi atributi OPN" key/value table, now placed BELOW the gradbeni-pogoji summary. */
.parcel-opn-attrs { margin-top: 1rem; }

/* Structured AI summary of the gradbeni pogoji + its compact source list. */
.parcel-rule-summary { font-size: .88rem; border-left: 3px solid var(--accent, #2563eb);
    padding: .15rem 0 .15rem .7rem; margin: .35rem 0 .15rem; }
.parcel-rule-srcs { display: flex; flex-wrap: wrap; gap: .25rem .6rem; font-size: .76rem; color: #6b7280; margin: .35rem 0 0; }
.parcel-rule-srcs-lbl { font-weight: 600; color: #9ca3af; }
.parcel-rule-srcs a { color: var(--accent-ink); border-bottom-color: currentColor; }


/* ── "AI Analiza OPN" (lokacijsko poročilo): the five building limits + the odlok read for this
      location. Shared markup with the standalone Architec.Lokacija report, so keep the two copies in sync. ── */
.opn-ai-params { margin-bottom: 1rem; }
.opn-ai-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .4rem; margin: .3rem 0 .5rem; }
.opn-ai-row { display: flex; align-items: baseline; gap: .4rem; padding: .4rem .6rem; border: 1px solid var(--line, #e5e7eb);
    border-radius: var(--radius); background: #fff; }
.opn-ai-row.is-missing { background: #fafafa; color: var(--ink-mute, #9ca3af); border-style: dashed; }
.opn-ai-row.is-ai { border-color: #dbeafe; }
.opn-ai-k { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-mute, #9ca3af); flex: 1 1 auto; }
.opn-ai-v { font-weight: 700; font-size: .95rem; }
.opn-ai-chip { flex: none; font-size: .62rem; font-weight: 700; letter-spacing: .04em; padding: .08rem .3rem; border-radius: var(--radius); }
.opn-ai-chip.is-gurs { background: #e6f4e6; color: #2e6b2e; }
.opn-ai-chip.is-ai { background: #e8f0fe; color: #1d4ed8; }
.opn-ai-legend { font-size: .74rem; line-height: 1.45; }
.opn-ai-lead { font-size: .95rem; line-height: 1.55; border-left: 3px solid var(--accent, #2563eb);
    padding: .15rem 0 .15rem .7rem; margin: .2rem 0 .8rem; }
.opn-ai-block { margin: 0 0 .8rem; }
.opn-ai-block-title { font-weight: 700; font-size: .9rem; margin-bottom: .15rem; }
.opn-ai-block-text { margin: 0; font-size: .88rem; line-height: 1.55; white-space: pre-wrap; }
.opn-ai-block-src { font-size: .74rem; color: #6b7280; margin-top: .15rem; }
.opn-ai-block-src a { color: var(--accent-ink); border-bottom-color: currentColor; }
.opn-ai-list { margin: .25rem 0 .8rem; padding-left: 1.1rem; font-size: .88rem; line-height: 1.5; }
.opn-ai-list li { margin-bottom: .2rem; }
.opn-ai-list.is-check { list-style: none; padding-left: 0; }
.opn-ai-list.is-check li::before { content: "☐"; margin-right: .4rem; color: var(--accent, #2563eb); }

/* ── Subscription page: voucher input, predračun offer, referral block ── */
.sub-voucher { max-width:30rem; margin:0 auto 1.6rem; padding:1rem 1.1rem; background:#fff; border:1px solid var(--line); border-radius:var(--radius); box-shadow:0 1px 2px rgba(0,0,0,.03); }
.sub-voucher-label { display:block; font-size:.9rem; font-weight:600; color:var(--ink); margin-bottom:.55rem; }
.sub-voucher-row { display:flex; gap:.5rem; }
.sub-voucher-input { flex:1; min-width:0; padding:.55rem .7rem; border:1px solid var(--line-strong); border-radius:var(--radius); font-size:.95rem; text-transform:uppercase; letter-spacing:.02em; }
.sub-voucher-input::placeholder { text-transform:none; letter-spacing:normal; color:var(--ink-soft); }
.sub-voucher-input:focus { outline:none; border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); }
.sub-voucher-btn { flex:none; white-space:nowrap; }
.sub-voucher-msg { margin-top:.6rem; padding:.45rem .65rem; border-radius:var(--radius); font-size:.88rem; font-weight:600; }
.sub-voucher-msg.is-ok { background:#e6f4e6; color:#2e6b2e; }
.sub-voucher-msg.is-err { background:#fbe7e4; color:#9a2b2b; }
.sub-offer { margin:1.5rem 0; padding:1.1rem 1.25rem; background:var(--accent-soft); border:1px solid var(--line-strong); border-radius:var(--radius); }
.sub-offer h2 { margin:0 0 .4rem; }
.sub-referral { margin:2rem 0; padding:1.1rem 1.25rem; background:#fff; border:1px solid var(--line); border-radius:var(--radius); }
.sub-referral h2 { margin:0 0 .4rem; }
.sub-referral-code { display:flex; gap:.5rem; align-items:center; margin:.6rem 0; }
.sub-referral-code input { flex:1; padding:.45rem .6rem; border:1px solid var(--line-strong); border-radius:var(--radius); background:var(--bg); }
.sub-referral-stats { font-size:.9rem; color:var(--ink-soft); }

/* ── Admin forms + tables (vouchers / plans) ── */
.admin-form-card { margin:0 0 1.5rem; padding:1.1rem 1.25rem; background:#fff; border:1px solid var(--line); border-radius:var(--radius); }
.admin-form-card h2 { margin:0 0 .8rem; }
.admin-subhead { margin:1rem 0 .4rem; font-size:.95rem; color:var(--ink-soft); }
.admin-form-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(13rem,1fr)); gap:.8rem; }
.admin-form-grid label { display:flex; flex-direction:column; gap:.25rem; font-size:.85rem; color:var(--ink-soft); }
.admin-form-grid input, .admin-form-grid select { padding:.45rem .6rem; border:1px solid var(--line-strong); border-radius:var(--radius); }
.admin-form-check { display:flex; flex-direction:row; align-items:center; gap:.4rem; }
.admin-form-check input { width:auto; }
/* Inside a form grid '.admin-form-grid label' (0,1,1) outweighed the row above and stood the box centred ABOVE its
   text (#637: Partnerji, Paketi, Kode za popust). The box goes before the text, level with the fields beside it. */
.admin-form-grid .admin-form-check { flex-direction:row; align-items:center; align-self:end; min-height:2.4rem; }
.admin-form-grid .admin-form-check input { width:auto; padding:0; margin:0; flex:none; }
.admin-feature-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(16rem,1fr)); gap:.4rem .8rem; margin:.4rem 0; }
.admin-form-actions { display:flex; align-items:center; gap:.8rem; margin-top:1rem; }
.admin-form-msg { color:#2e6b2e; font-weight:600; font-size:.9rem; }
.admin-storno-ref { display:block; font-size:.8rem; color:var(--ink-mute); white-space:nowrap; }
/* Vračilo (dobropis) dialog + the one-off withdrawal notice above the invoice list. */
.admin-form-hint { font-size:.82rem; color:var(--ink-soft); margin:.6rem 0 0; line-height:1.45; }
.admin-refund-quote { margin:.8rem 0; padding:.6rem .8rem; border:1px solid var(--line); border-radius:var(--radius); background:var(--bg-elev); font-size:.88rem; }
.admin-refund-quote p { margin:.2rem 0; }
.admin-withdrawal-notice { margin:0 0 1rem; padding:.7rem .9rem; border:1px solid var(--line-strong); border-radius:var(--radius); background:var(--bg-elev); font-size:.9rem; }
.admin-withdrawal-notice p { margin:0 0 .5rem; }
.admin-withdrawal-actions { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem; }
.admin-muted { color:var(--ink-soft); font-size:.85rem; }
.admin-table { width:100%; border-collapse:collapse; margin-top:.5rem; }
.admin-table th, .admin-table td { text-align:left; padding:.5rem .6rem; border-bottom:1px solid var(--line); font-size:.9rem; vertical-align:top; }
.admin-table thead th { color:var(--ink-soft); font-weight:600; }

/* Stack traces / JSON context in the admin error log. Scrolls inside its own box: a minified JS frame is
   one very long line, and letting it widen the table would push the whole page sideways. */
.admin-pre { max-height:22rem; overflow:auto; padding:.6rem .7rem; margin:.5rem 0 0; background:var(--surface-2, rgba(0,0,0,.04));
             border:1px solid var(--line); border-radius:var(--radius); font-family: var(--font-mono);
             font-size:.78rem; line-height:1.45; white-space:pre-wrap; word-break:break-word; }

/* ── End-of-test (trial) banner — app-wide, dismissible ── */
.trial-banner { display:flex; align-items:center; gap:.75rem; padding:.6rem 1rem; background:var(--accent-soft); border-bottom:1px solid var(--line-strong); color:var(--ink); font-size:.9rem; line-height:1.4; }
.trial-banner-urgent { background:#e4e4e4; }
.trial-banner-text { flex:1; min-width:0; }
.trial-banner-cta { flex:none; background:var(--accent); color:#fff; text-decoration:none; padding:.4rem .9rem; border-radius:var(--radius); font-weight:600; white-space:nowrap; }
.trial-banner-cta:hover { filter:brightness(.95); }
.trial-banner-x { flex:none; background:none; border:none; color:var(--ink-soft); font-size:1.3rem; line-height:1; cursor:pointer; padding:0 .25rem; }
.trial-banner-x:hover { color:var(--ink); }
/* The čarovnik's ask from a project cover (#869, was a modal): the same slot and shape as the paket bar - one of
   the two at a time (TrialBanner.razor) - told apart by the čarovnik's ✦ and a paper fade instead of a flat tint. */
.wizard-banner { background:linear-gradient(90deg, var(--accent-soft), var(--bg-elev) 70%); }
.wizard-banner-art { flex:none; color:var(--accent); font-size:1.35rem; line-height:1; }
@media (max-width: 600px) {
    .wizard-banner-more { display:none; }
}

/* ── Stanje storitev (NomiFac #1403) ── */
/* The outage bar: the trial bar's slot and shape (TrialBanner.razor - one bar at a time), orange for Motnje, red for
   Ne deluje. On a phone only »Motnje: GURS. Stanje storitev →«. */
.status-banner { background:#fbe7cf; }
.status-banner-down { background:#f6d4cf; }
.status-banner-art { flex:none; display:inline-flex; align-items:center; justify-content:center; width:1.5rem; height:1.5rem;
                     border-radius:50%; background:#c46a12; color:#fff; font-weight:700; font-size:.9rem; line-height:1; }
.status-banner-down .status-banner-art { background:#b3261e; }
.status-banner-short { display:none; }
.status-banner .trial-banner-text { overflow-wrap:anywhere; }
@media (max-width: 600px) {
    .status-banner-long { display:none; }
    .status-banner-short { display:inline; }
    .status-banner { gap:.5rem; padding:.5rem .75rem; }
    .status-banner .trial-banner-cta { padding:.35rem .6rem; }
}

/* ── GURS ne deluje (NomiFac #1461) ── */
/* The notice over a parcel / building lookup (rule 6): the quota notice's shape (.parcel-limit) in the outage bar's orange. */
.parcel-limit.gurs-notice { margin:0 0 .9rem; border-color:#e8c08f; background:#fbe7cf; color:#6b3a07; overflow-wrap:anywhere; }
.gurs-notice .parcel-limit-mark, .gurs-band-mark {
    flex:none; display:inline-flex; align-items:center; justify-content:center; width:1.35rem; height:1.35rem;
    border-radius:50%; background:#c46a12; color:#fff; font-weight:700; font-size:.8rem; line-height:1; }
/* The cover's band (rules 12-13): narrow, in the cover's flow above the title - never fixed, so it covers no button; it
   wraps on a phone rather than scroll. Green once GURS works again (the reminder). */
.gurs-band { display:flex; flex-wrap:wrap; align-items:center; gap:.35rem .7rem; margin:0 0 .9rem; padding:.45rem .6rem .45rem .75rem;
             max-width:100%; box-sizing:border-box; position:relative; z-index:1;
             border:1px solid #e8c08f; border-radius:var(--radius); background:#fbe7cf; color:#6b3a07; font-size:.88rem; line-height:1.4; }
.gurs-band.is-reminder { border-color:#a9d3ae; background:#e6f3e7; color:#1f5a26; }
.gurs-band.is-reminder .gurs-band-mark { background:#2e7d32; }
.gurs-band-text { flex:1 1 14rem; min-width:0; overflow-wrap:anywhere; }
.gurs-band-link { color:inherit; font-weight:600; white-space:nowrap; }
/* The reminder's action: a link keeps the app's own underline (its bottom border, a / a:hover); the »preberi parcelo« button
   reads the same - bold, with the same 1px line under it. */
.gurs-band-action { flex:0 1 auto; min-width:0; color:inherit; font-weight:700; overflow-wrap:anywhere; }
a.gurs-band-action { border-bottom-color:currentColor; }
button.gurs-band-action { display:inline-flex; align-items:center; gap:.4rem; text-align:left; background:none; border:0;
                          border-bottom:1px solid currentColor; border-radius:0; padding:.1rem 0; font:inherit; font-weight:700;
                          cursor:pointer; }
button.gurs-band-action:disabled { cursor:progress; opacity:.75; }
.gurs-band-x { flex:none; margin-left:auto; min-width:2.25rem; min-height:2rem; background:none; border:none; color:inherit;
               font-size:1.3rem; line-height:1; cursor:pointer; padding:0 .25rem; }

/* /status: a summary line, then one card per provider with a word AND a colour for its state and 24 hour dots. */
.svc-summary { display:flex; align-items:center; gap:.7rem; padding:.85rem 1rem; margin:0 0 1rem; border-radius:var(--radius);
               border:1px solid var(--line-strong); background:var(--bg-elev); }
.svc-summary-dot { flex:none; width:.9rem; height:.9rem; border-radius:50%; background:#2e7d32; }
.svc-summary-disrupted .svc-summary-dot { background:#d9822b; }
.svc-summary-down .svc-summary-dot { background:#c62828; }
.svc-summary-disrupted { background:#fbe7cf; }
.svc-summary-down { background:#f6d4cf; }
.svc-summary-text { display:flex; flex-wrap:wrap; gap:.25rem .9rem; align-items:baseline; min-width:0; }
.svc-summary-time { color:var(--ink-soft); font-size:.88rem; }
.svc-list { list-style:none; margin:0; padding:0; display:grid; gap:.75rem; }
.svc-row { padding:.85rem 1rem; border:1px solid var(--line); border-radius:var(--radius); background:var(--bg-elev); min-width:0; }
.svc-row-disrupted { border-color:#d9822b; }
.svc-row-down { border-color:#c62828; }
.svc-row-head { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:.4rem .8rem; }
.svc-name { margin:0; font-size:1.05rem; font-family:inherit; overflow-wrap:anywhere; }
.svc-badge { display:inline-flex; align-items:center; gap:.35rem; padding:.15rem .55rem; border-radius:var(--radius-pill); font-size:.82rem;
             font-weight:600; background:var(--surface-2, rgba(0,0,0,.05)); color:var(--ink); white-space:nowrap; }
.svc-badge-dot { width:.6rem; height:.6rem; border-radius:50%; background:#9e9e9e; }
.svc-badge-ok { background:#dcefdc; color:#1e5a2b; }
.svc-badge-ok .svc-badge-dot { background:#2e7d32; }
.svc-badge-disrupted { background:#fbe7cf; color:#7a3e00; }
.svc-badge-disrupted .svc-badge-dot { background:#d9822b; }
.svc-badge-down { background:#f6d4cf; color:#8c1d18; }
.svc-badge-down .svc-badge-dot { background:#c62828; }
.svc-affects { margin:.45rem 0 0; color:var(--ink); font-size:.92rem; overflow-wrap:anywhere; }
.svc-last { margin:.2rem 0 .55rem; color:var(--ink-soft); font-size:.82rem; }
.svc-hours { display:grid; grid-template-columns:repeat(24, minmax(0, 1fr)); gap:3px; max-width:36rem; }
.svc-dot { display:block; height:1.4rem; border-radius:var(--radius); background:#cfcfcf; min-width:0; }
.svc-dot-ok { background:#43a047; }
.svc-dot-disrupted { background:#e39236; }
.svc-dot-down { background:#d32f2f; }
.svc-dot-unknown, .svc-dot-none { background:#cfcfcf; }
.svc-hours-axis { display:flex; justify-content:space-between; max-width:36rem; margin-top:.2rem; color:var(--ink-soft); font-size:.75rem; }
.svc-note { margin:1rem 0 0; color:var(--ink-soft); font-size:.85rem; max-width:40rem; }
.svc-empty { display:flex; flex-wrap:wrap; align-items:center; gap:.6rem; }
@media (max-width: 400px) {
    .svc-hours { gap:2px; }
    .svc-dot { height:1.1rem; border-radius:var(--radius); }
}

/* /admin/stanje-storitev */
.svcadm-group + .svcadm-group { margin-top:1.1rem; }
.svcadm-provider { display:flex; align-items:center; gap:.6rem; margin:.4rem 0 .5rem; font-size:1rem; }
.svcadm-url { display:block; font-size:.78rem; word-break:break-all; max-width:34rem; }
.svcadm-sub { display:block; font-size:.78rem; }
.svcadm-flag { display:inline-block; margin-left:.4rem; padding:0 .4rem; border-radius:var(--radius); font-size:.72rem;
               background:var(--surface-2, rgba(0,0,0,.06)); color:var(--ink-soft); }
.svcadm-form { display:grid; grid-template-columns:repeat(auto-fill, minmax(14rem, 1fr)); gap:.75rem 1rem; margin:.75rem 0; }
.svcadm-field { display:flex; flex-direction:column; gap:.25rem; font-size:.88rem; min-width:0; }
.svcadm-wide { grid-column:1 / -1; }
.svcadm-check { display:flex; align-items:center; gap:.45rem; font-size:.9rem; }
.svcadm-field-error { color:#b3261e; font-size:.8rem; }
.svcadm-actions { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem; }
/* The editor is a modal (#1409): the task-modal frame; the form scrolls in its body on a short screen. */
.svcadm-seeded { display:block; margin-top:.3rem; font-size:.85rem; }
.svcadm-modal-card .svcadm-form { margin-top:0; }
.svcadm-modal-card .svcadm-actions { padding-top:.25rem; }
/* ── Post-trial paywall overlay ── */
.paywall-overlay { position:fixed; inset:0; z-index:9000; display:flex; align-items:center; justify-content:center; padding:1.25rem; background:rgba(26,26,26,.55); backdrop-filter:blur(3px); }
.paywall-card { max-width:30rem; width:100%; text-align:center; background:var(--bg, #ededed); border:1px solid var(--line-strong); border-radius:var(--radius); padding:2rem 1.6rem; box-shadow:0 18px 50px rgba(0,0,0,.3); }
.paywall-mark { font-size:2.2rem; }
.paywall-card h1 { font-family:var(--font-serif); font-size:1.6rem; margin:.4rem 0 .6rem; }
.paywall-card p { color:var(--ink-soft); margin:0 0 1.3rem; line-height:1.5; }
.paywall-cta { font-size:1rem; padding:.7rem 1.4rem; }
.paywall-links { margin-top:1.1rem; font-size:.85rem; color:var(--ink-soft); display:flex; gap:.6rem; justify-content:center; }
.paywall-links a { color:var(--accent); }

/* ── Subscription: scheduled-downgrade notice + consent modal ── */
.sub-downgrade-notice { display:flex; flex-wrap:wrap; align-items:center; gap:.75rem; justify-content:space-between; margin:0 0 1.2rem; padding:.7rem 1rem; background:#fff5e9; border:1px solid var(--line-strong); border-radius:var(--radius); font-size:.9rem; }
.sub-pending-notice { display:flex; flex-wrap:wrap; align-items:center; gap:.75rem; justify-content:space-between; margin:0 0 1.2rem; padding:.8rem 1rem; background:#fbe7e4; border:1px solid color-mix(in srgb, #b5483f 35%, transparent); border-radius:var(--radius); font-size:.9rem; }
.sub-pending-actions { display:flex; flex-wrap:wrap; gap:.5rem; }
.sub-modal-backdrop { position:fixed; inset:0; z-index:9000; display:flex; align-items:center; justify-content:center; padding:1.25rem; background:rgba(26,26,26,.5); }
/* A modal a chapter renders (Hiša v 3D's reports, AI opis, deli povezavo …) lives in .journal-page's
   stacking context, whose z-index is 1 - so its 9000 only counts INSIDE the page, and the cookie banner
   (1100) and the navbar paint over the modal's footer buttons. While one is open, lift the page itself. */
.journal-page:has(.sub-modal-backdrop) { z-index:9000; }
.sub-modal { max-width:32rem; width:100%; background:#fff; border-radius:var(--radius); padding:1.5rem 1.5rem 1.25rem; box-shadow:0 18px 50px rgba(0,0,0,.3); }
.sub-modal h2 { margin:0 0 .6rem; font-size:1.25rem; }
.sub-modal p { color:var(--ink-soft); line-height:1.5; margin:0 0 .8rem; }
.sub-modal-agree { display:flex; gap:.5rem; align-items:flex-start; margin:.4rem 0 1rem; font-size:.92rem; }
.sub-modal-agree input { margin-top:.2rem; }
.sub-modal-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:.6rem; }

/* Buy-confirmation modal: price line, "v obdelavi" processing state, UPN QR + bank details */
.sub-buy-price { font-family:var(--font-sans); font-size:1.1rem; color:var(--ink); margin:0 0 .8rem !important; }
.sub-buy-price strong { font-size:1.5rem; }
.sub-buy-price span { font-size:.85rem; color:var(--ink-mute); }
.sub-buy-was { font-size:.95rem; color:var(--ink-mute); text-decoration:line-through; margin-right:.45rem; }
/* Prorated mid-term upgrade: the "pay only the difference for the remaining days" explainer */
.sub-buy-proration { padding:.6rem .8rem; border-radius:var(--radius); background:var(--accent-soft);
    border:1px solid color-mix(in srgb, var(--accent) 25%, transparent); font-size:.88rem; line-height:1.55; }
.sub-buy-proration-note { font-size:.8rem; color:var(--ink-mute); margin-top:-.4rem; }
/* Buyer identity for the invoice (personal Napredni purchase) */
.sub-buy-buyer { margin:.2rem 0 .9rem; }
.sub-buy-buyer-lead { font-size:.85rem; font-weight:600; color:var(--ink); margin:0 0 .5rem !important; }
.sub-buy-buyer-grid { display:grid; grid-template-columns:1fr 1fr; gap:.55rem .7rem; }
.sub-buy-buyer-grid label { display:flex; flex-direction:column; gap:.2rem; font-size:.78rem; color:var(--ink-mute); }
.sub-buy-buyer-grid .type-input { font-size:.9rem; }
.sub-buy-buyer-addr { grid-column:1 / -1; }
.sub-buy-buyer-hint { font-weight:400; color:var(--ink-mute); }
.sub-buy-buyer-note { font-size:.78rem; color:var(--ink-mute); margin:.55rem 0 0; line-height:1.45; }
/* Odstop od pogodbe: the express request for an immediate start + the pointer to Pogoji §10. */
.sub-buy-withdrawal { margin:.9rem 0 .3rem; font-size:.86rem; line-height:1.45; }
.sub-buy-withdrawal-note { font-size:.78rem; color:var(--ink-mute); margin:0 0 .9rem; line-height:1.45; }
@media (max-width:460px) { .sub-buy-buyer-grid { grid-template-columns:1fr; } }
.sub-buy-processing { display:flex; align-items:flex-start; gap:.6rem; padding:.7rem .9rem; border-radius:var(--radius);
    background:var(--accent-soft); border:1px solid color-mix(in srgb, var(--accent) 25%, transparent); color:var(--ink) !important; }
.sub-buy-spinner { flex:none; width:1rem; height:1rem; margin-top:.15rem; border-radius:50%;
    border:2px solid color-mix(in srgb, var(--accent) 35%, transparent); border-top-color:var(--accent);
    animation:sub-buy-spin .8s linear infinite; }
@keyframes sub-buy-spin { to { transform:rotate(360deg); } }
.sub-buy-pay { display:flex; flex-wrap:wrap; align-items:center; gap:1.1rem; margin:1rem 0 .4rem; }
.sub-buy-qr { margin:0; text-align:center; flex:none; }
.sub-buy-qr img { display:block; width:180px; height:180px; border:1px solid var(--line); border-radius:var(--radius); background:#fff; padding:.4rem; }
.sub-buy-qr figcaption { margin-top:.4rem; font-size:.74rem; color:var(--ink-soft); max-width:180px; }
.sub-buy-details { flex:1 1 12rem; min-width:0; display:grid; grid-template-columns:auto 1fr; gap:.3rem .8rem; margin:0; font-size:.9rem; }
.sub-buy-details dt { color:var(--ink-mute); }
.sub-buy-details dd { margin:0; font-weight:600; color:var(--ink); word-break:break-word; }
.sub-buy-instant { display:flex; align-items:flex-start; gap:.5rem; margin:.3rem 0 .5rem; padding:.6rem .8rem;
    border-radius:var(--radius); font-size:.84rem; line-height:1.35; color:var(--ink);
    background:color-mix(in srgb, var(--accent) 8%, transparent);
    border:1px dashed color-mix(in srgb, var(--accent) 35%, transparent); }
.sub-buy-instant-ico { flex:none; font-size:1rem; line-height:1.35; }

/* Računi (invoices) list */
.inv-list { display:flex; flex-direction:column; gap:.6rem; }
.inv-row { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem 1rem; padding:.9rem 1.1rem; background:#fff; border:1px solid var(--line); border-radius:var(--radius); }
.inv-main { flex:1 1 14rem; min-width:0; }
.inv-title { font-weight:600; color:var(--ink); }
.inv-period { color:var(--ink-soft); font-weight:400; }
.inv-meta { display:flex; flex-wrap:wrap; gap:.4rem; font-size:.82rem; color:var(--ink-soft); margin-top:.15rem; }
.inv-dot { color:var(--line-strong); }
.inv-amount { font-family:var(--font-sans); font-weight:700; font-size:1.05rem; color:var(--ink); }
.inv-refund { display:block; font-weight:400; font-size:.8rem; color:var(--ink-mute); }
.inv-badge { display:inline-block; font-size:.72rem; font-weight:700; padding:.15rem .55rem; border-radius:var(--radius-pill); white-space:nowrap; }
.inv-badge-ok { background:var(--ok-soft); color:var(--ok); }
.inv-badge-pending { background:var(--accent-soft); color:var(--accent); }
.inv-badge-off { background:#ededed; color:var(--ink-mute); }
.inv-actions { display:flex; flex-wrap:wrap; gap:.4rem; }
.inv-nopdf { color:var(--ink-mute); }
.inv-empty { text-align:center; padding:2.5rem 1rem; color:var(--ink-soft); display:flex; flex-direction:column; gap:1rem; align-items:center; }

/* ── Read-only (over-limit) project badge ── */
.project-card-readonly { display:inline-block; margin-left:.4rem; font-size:.7rem; font-weight:700; color:#9a3a2c; background:#f3d9d4; padding:.1rem .45rem; border-radius:var(--radius-pill); vertical-align:middle; white-space:nowrap; }

/* Locked "Hiša v 3D" entries (no Napredni): visible but lead to /subscription. Muted, no glow. */
.nav-links a.nav-link-3d.nav-link-3d-locked { animation: none; opacity: .8; }
.plan-3d-go.plan-3d-locked { opacity: .85; }

/* ── Subscription: control bar (billing toggle + voucher + promo), now a toolbar inside the pricing
   table section so it shares the table's full width. ── */
.sub-controls { margin:0 0 1.1rem; padding:.9rem 1rem; background:#fff; border:1px solid var(--line); border-radius:var(--radius); box-shadow:0 1px 2px rgba(0,0,0,.03); }
.sub-controls-main { display:flex; flex-wrap:wrap; gap:.75rem; align-items:center; justify-content:space-between; }
.sub-controls .billing-toggle { margin-bottom:0; }
.billing-opt-badge { display:inline-block; margin-left:.4rem; padding:.05rem .45rem; border-radius:var(--radius-pill); background:var(--accent-soft); color:var(--accent); font-size:.66rem; font-weight:700; vertical-align:middle; }
.billing-opt.active .billing-opt-badge { background:rgba(255,255,255,.24); color:#fff; }
.sub-voucher-inline { display:flex; gap:.45rem; flex:1 1 14rem; min-width:0; }
/* "Imaš lokacijsko poročilo?" - the standing invitation to type a LOK-… code into the voucher box.
   Quieter than the promo button: it speaks to the minority of visitors who arrive holding a report. */
.sub-controls-hint { margin:.55rem 0 0; font-size:.78rem; line-height:1.45; color:var(--ink-mute); }
/* The report bonus, named inside the buy modal so the lower total reads as earned rather than arbitrary. */
.sub-buy-credit { margin:.35rem 0 0; font-size:.82rem; color:var(--ink-soft); }
.sub-controls-promo { display:block; width:100%; margin-top:.7rem; padding:.5rem .75rem; background:var(--accent-soft); border:1px dashed var(--accent); border-radius:var(--radius); color:var(--ink); font:inherit; font-size:.85rem; text-align:center; cursor:pointer; }
.sub-controls-promo:hover { filter:brightness(.97); }
.sub-controls .sub-voucher-msg { margin-top:.7rem; }

/* ============================================================================
   DNEVNIK (gradbeni dnevnik) - skeuomorphic notebook view for the phases.
   Cover (Home), the open notebook page (PhasePage) with lined paper + edge
   bookmarks, the sticky search/add toolbar, the chapter table-of-contents and
   the "taped photo" treatment of the per-phase file insert.
   ============================================================================ */

:root {
    /* --nav-h (the sticky bar's height) lives with --nav-logo-h / --nav-pad-y at the top of the file (#1191) */
    --radius-lg: 0px;               /* was referenced (idp cards) but never defined */
    --shadow-page: 0 18px 44px -20px rgba(26, 26, 26, .5), 0 2px 6px rgba(26, 26, 26, .1);
    --shadow-card: 0 8px 18px -8px rgba(26, 26, 26, .4);
    --paper-line: rgba(91, 91, 91, .085);   /* faint horizontal rule */
    --paper-margin: rgba(10, 10, 10, .4);   /* faded terracotta margin rule */
    --tape: rgba(228, 214, 168, .55);        /* sellotape / washi */
}

/* ── task search + add task: lives inline in the app navbar (NavMenu), right side where "Dnevnik" was ── */
.journal-toolbar {
    position: static; flex: 1 1 auto; min-width: 0; display: flex; justify-content: flex-end;
    margin: 0 0 0 1.5rem; padding: 0; background: none; border: none; box-shadow: none; backdrop-filter: none;
}
.journal-toolbar-inner { display: flex; gap: .5rem; width: 100%; max-width: 34rem; margin-left: auto; align-items: center; }
.journal-search { position: relative; flex: 1 1 auto; min-width: 0; display: flex; align-items: center; }
.journal-search-ico { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ink-mute); pointer-events: none; }
.journal-search-input {
    width: 100%; height: 2.15rem; padding: 0 2rem 0 2.35rem;
    border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
    background: var(--bg-elev); color: var(--ink); font: inherit; font-size: .88rem;
}
.journal-search-input:focus { outline: none; border-color: var(--accent); }
/* The phone's way to the search (shown under 760px, see "navbar search is a button on phones"). */
.journal-search-toggle {
    display: none; flex: 0 0 auto; align-items: center; justify-content: center;
    width: 2.15rem; height: 2.15rem; padding: 0; border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
    background: var(--bg-elev); color: var(--ink-soft); cursor: pointer;
}
.journal-search-toggle svg { width: 16px; height: 16px; }
.journal-search-toggle[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
.journal-search-clear {
    position: absolute; right: .5rem; top: 50%; transform: translateY(-50%);
    width: 1.3rem; height: 1.3rem; border: none; display: inline-flex; align-items: center; justify-content: center;
    background: var(--line); border-radius: 50%; color: var(--ink-soft); font-size: .95rem; line-height: 1; cursor: pointer;
}
.journal-search-results {
    /* centered on the viewport, just under the navbar, so the wide dropdown is symmetric instead of
       hanging off to one side */
    position: fixed; top: calc(var(--nav-h) + .4rem); left: 50%; right: auto; transform: translateX(-50%); z-index: 40;
    width: min(94vw, 64rem);
    margin: 0; padding: .35rem; list-style: none; max-height: 70vh; overflow-y: auto;
    background: var(--bg-elev); border: 1px solid var(--line-strong);
    border-radius: var(--radius); box-shadow: 0 14px 32px rgba(26, 26, 26, .2);
}
.journal-search-empty { padding: .8rem 1rem; color: var(--ink-mute); font-size: .9rem; }
.journal-search-result {
    display: flex; align-items: center; gap: .65rem; width: 100%;
    padding: .55rem .7rem; border: none; background: none; border-radius: var(--radius);
    text-align: left; cursor: pointer; color: var(--ink);
}
.journal-search-result:hover { background: var(--bg); }
/* keyboard-highlighted result (↑/↓) - a touch stronger than :hover so it's clearly the active one */
.journal-search-result.is-active { background: color-mix(in srgb, var(--accent) 14%, var(--bg-elev)); }
.journal-search-dot { width: .7rem; height: .7rem; border-radius: 50%; flex: 0 0 auto; }
/* a FILE hit wears a paperclip where a task wears its chapter dot, in the chapter's colour */
.journal-search-clip { width: .9rem; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; }
.journal-search-result-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.journal-search-result-text { max-width: 100%; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.journal-search-result-loc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.journal-search-result-loc { font-size: .75rem; color: var(--ink-mute); }
/* the trailing "＋ Dodaj nalogo »…«" quick-add row: create a task named after the typed text */
.journal-search-add { border-top: 1px dashed var(--line); margin-top: .15rem; }
.journal-search-add-plus {
    flex: 0 0 auto; width: 1.25rem; height: 1.25rem; display: grid; place-items: center; border-radius: 50%;
    background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent);
    font-weight: 700; font-size: 1rem; line-height: 1;
}
.journal-search-add .journal-search-result-text { color: var(--accent); }

.journal-add { position: relative; flex: 0 0 auto; }
/* compact icon-only "new task" button: a + pill the same height as the search bar */
.journal-add-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2.15rem; height: 2.15rem; padding: 0; border: 1px solid var(--accent); border-radius: var(--radius-pill);
    background: var(--accent); color: #fff; font: inherit; cursor: pointer;
}
.journal-add-btn:hover { filter: brightness(1.05); }
.journal-add-plus { font-size: 1.25rem; line-height: 1; }
.journal-add-backdrop { position: fixed; inset: 0; z-index: 1; }
.journal-add-pop {
    position: absolute; top: calc(100% + .4rem); right: 0; z-index: 2; width: 20rem; max-width: 86vw;
    display: flex; flex-direction: column; gap: .5rem; padding: 1rem;
    background: var(--bg-elev); border: 1px solid var(--line-strong);
    border-radius: var(--radius); box-shadow: 0 16px 34px rgba(26, 26, 26, .22);
}
.journal-add-pop-title { font-family: var(--font-sans); font-weight: 700; font-size: 1.05rem; }
.journal-add-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-mute); margin-top: .15rem; }
.journal-add-select, .journal-add-input { width: 100%; }
.journal-add-error { font-size: .75rem; font-weight: 600; color: var(--danger, #c0392b); margin-top: -.25rem; }
.journal-add-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: .35rem; }

/* ── notebook cover (Home dashboard) - a bound hardcover front ─────────── */
/* flex column so .book-cover-inner becomes a flex item — that lets it keep A4 as a MINIMUM height
   (via aspect-ratio) yet still grow with content instead of clipping it */
.journal-book-cover { position: relative; z-index: 1; flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.journal-book-cover .hero-back { display: inline-block; margin-bottom: 1rem; }
.book-cover-inner {
    position: relative;
    /* overflow visible (not hidden) so the box can grow past A4 to fit content; as a flex item of
       .journal-book-cover, aspect-ratio then acts as a MINIMUM height rather than a hard clip */
    overflow: visible;
    display: flex; flex-direction: column; gap: 1.6rem; justify-content: flex-start;
    /* match the inner notebook pages: A4 portrait (210 × 297) so the cover is the same height as a page */
    aspect-ratio: 210 / 297;
    padding: 2.75rem 2.75rem 2.5rem 4.25rem; border-radius: var(--radius) var(--radius) var(--radius) var(--radius);
    /* --book-color = this project's notebook colour (matches its book on the /projects shelf); falls
       back to the brand accent if unset */
    background-color: color-mix(in srgb, var(--book-color, var(--accent)) 58%, #23150b);
    background-image:
        radial-gradient(130% 95% at 78% -12%, rgba(255, 255, 255, .09), transparent 52%),   /* top sheen */
        radial-gradient(42% 36% at 18% 28%, rgba(0, 0, 0, .18), transparent 70%),            /* mottled patches */
        radial-gradient(46% 42% at 76% 62%, rgba(0, 0, 0, .2), transparent 70%),
        radial-gradient(34% 30% at 52% 92%, rgba(255, 255, 255, .05), transparent 70%),
        repeating-radial-gradient(circle at 0 0, rgba(0, 0, 0, .05) 0 1px, transparent 1px 3px), /* fine grain */
        repeating-linear-gradient(115deg, rgba(0, 0, 0, .035) 0 2px, transparent 2px 6px),       /* fibre */
        /* the opaque leather base - MUST use --book-color (this was the bug: it stayed on --accent and
           painted over the book-coloured background-color, so the cover always looked green) */
        linear-gradient(135deg, color-mix(in srgb, var(--book-color, var(--accent)) 74%, #2a190d), color-mix(in srgb, var(--book-color, var(--accent)) 48%, #1d1108));
    border: 1px solid rgba(0, 0, 0, .32);
    /* the cream page block bound under the hardcover, peeking out the right (fore-)edge - the same
       "stack of sheets" touch as the inner pages, but paper-coloured since these are the book's pages */
    box-shadow:
        7px 0 0 -3px #efe4cf, 10px 2px 8px -3px rgba(26, 26, 26, .32),
        12px 0 0 -6px #d6d6d6, 15px 3px 9px -6px rgba(26, 26, 26, .26),
        0 26px 52px -22px rgba(26, 26, 26, .65), inset 0 0 90px rgba(0, 0, 0, .34);
    color: #ededed;
}
.book-cover-foot { margin-top: auto; display: flex; flex-direction: column; gap: 1.2rem; }
/* #1161: every cover but the Profesionalni one (it stays A4, D17 of #1153) ends at the bottom of the WINDOW instead
   of at A4. Since #1153 an ordinary cover holds its title, »Kje začeti« or »Naslednji koraki« and the foot, and A4
   (~1550 px tall at 1100 px wide) left ~900 px of empty leather above the foot. More content still grows it. Only
   where A4 applies (from 1000 px - under that the cover follows its content anyway). The window less the sticky bar,
   .app-main's 1.5rem on top and as much again under the cover, so its edge and shadow stay in view; the paket /
   čarovnik bar above the navigation takes its 3.2rem too, like .app-shell-fixed. */
@media (min-width: 1000px) {
    .book-cover-inner.is-fit { aspect-ratio: auto; min-height: calc(100svh - var(--nav-h) - 3rem); }
    .trial-banner ~ .app-shell .book-cover-inner.is-fit { min-height: calc(100svh - var(--nav-h) - 3.2rem - 3rem); }
}
.book-cover-reset {
    align-self: flex-start; background: transparent; border: 1px solid rgba(237, 237, 237, .3);
    color: rgba(237, 237, 237, .8); padding: .3rem .75rem; border-radius: var(--radius-pill); font: inherit; font-size: .78rem; cursor: pointer;
}
.book-cover-reset:hover { border-color: rgba(237, 237, 237, .65); color: #fff; }

/* a no-parcel project's cover prompts finding the parcel first */
.book-cover-cta { margin-top: auto; display: flex; flex-direction: column; align-items: flex-start; gap: .6rem; }
.book-cover-cta p { margin: 0; max-width: 30rem; color: rgba(237, 237, 237, .85); }

/* have-parcel cover CTA → the Lokacijsko poročilo page */
.book-cover-parcel-cta {
    display: flex; align-items: center; gap: .9rem; width: 100%; padding: .9rem 1.1rem; border-radius: var(--radius);
    background: var(--accent); color: #fff; text-decoration: none; box-shadow: 0 12px 24px -12px rgba(0, 0, 0, .55);
    transition: filter .14s ease, transform .14s ease;
}
.book-cover-parcel-cta:hover { filter: brightness(1.06); transform: translateY(-1px); }
.book-cover-parcel-cta-ico { display: inline-flex; flex: 0 0 auto; }
.book-cover-parcel-cta-text { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.book-cover-parcel-cta-text strong { font-family: var(--font-serif); font-size: 1.4rem; font-weight: 400; }
.book-cover-parcel-cta-text span { font-size: .85rem; opacity: .92; }
.book-cover-parcel-cta-go { margin-left: auto; font-size: 1.4rem; flex: 0 0 auto; }

/* cover head row: title engraved on the cover (left) + the parcel photo pinned to the right edge */
.book-cover-head-row { display: flex; gap: 1.6rem; align-items: flex-start; flex-wrap: wrap; }
.book-cover-head-row .book-cover-plate { flex: 1 1 20rem; }
/* The plot as a photo clipped to the notebook's right border: ortofoto in a white polaroid frame,
   tilted, nudged toward the cover edge, with a metal paperclip hooked over its top. */
.book-cover-parcel {
    position: relative; flex: 0 0 16rem; width: 16rem; min-height: 12.5rem;
    align-self: flex-start; margin-top: -.35rem; margin-right: -1.4rem;
    display: flex; flex-direction: column; border-radius: var(--radius); text-decoration: none;
    background: #fff; border: .45rem solid #fff; border-bottom-width: .55rem;
    box-shadow: 0 16px 30px -12px rgba(0, 0, 0, .6); transform: rotate(2.6deg); transition: transform .16s ease;
}
.book-cover-parcel:hover { transform: rotate(.6deg) translateY(-2px); }
.book-cover-parcel.is-empty {
    align-items: center; justify-content: center; gap: .7rem; padding: 1.1rem; text-align: center;
    background: color-mix(in srgb, var(--accent) 8%, var(--bg-elev)); border: 2px dashed var(--accent); color: var(--accent-ink);
}
.book-cover-parcel-art { color: var(--accent); display: inline-flex; }
.book-cover-parcel-art svg { width: 3.6rem; height: 3.6rem; }
.book-cover-parcel-label { font-weight: 700; font-size: .9rem; line-height: 1.25; }
.book-cover-parcel.is-known { justify-content: flex-end; color: #fff; }
.book-cover-parcel-map {
    position: absolute; inset: 0; pointer-events: none; overflow: hidden;
    background:
        repeating-linear-gradient(0deg, rgba(255, 255, 255, .07) 0 1px, transparent 1px 17px),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, .07) 0 1px, transparent 1px 17px),
        linear-gradient(135deg, #c7d5b8, #9cb583 55%, #80a06b);
}
.parcel-outline-ortho { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.parcel-outline-svg { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .55)); }
.book-cover-parcel-info {
    position: relative; display: flex; flex-direction: column; gap: .08rem;
    padding: .7rem .8rem; background: linear-gradient(transparent, rgba(0, 0, 0, .6)); font-size: .82rem;
}
.book-cover-parcel-info strong { font-family: var(--font-sans); font-size: 1.25rem; line-height: 1.1; }
.book-cover-parcel-open { margin-top: .3rem; font-weight: 700; }

/* metal paperclip hooked over the top edge of the cover parcel photo */
.book-cover-parcel-clip {
    position: absolute; top: -.85rem; right: 1.5rem; z-index: 6; color: #8a8f98;
    transform: rotate(8deg); filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .4));
}
.book-cover-parcel.is-known .book-cover-parcel-clip { color: #9aa0aa; }

/* cover document slots: pinned files (open image / download other) + empty placeholders (open picker) */
.cover-photo-link { display: block; width: 100%; text-decoration: none; color: inherit; cursor: pointer; border: none; background: none; padding: 0; font: inherit; text-align: inherit; }
.cover-photo-ph { display: grid; place-items: center; aspect-ratio: 4 / 3; color: var(--ink-mute); }
.cover-photo-unpin {
    position: absolute; top: -.45rem; right: -.45rem; z-index: 5; width: 1.4rem; height: 1.4rem;
    border: none; border-radius: 50%; background: var(--ink); color: #fff; font-size: 1rem; line-height: 1;
    cursor: pointer; opacity: 0; transition: opacity .15s;
}
.cover-photo:hover .cover-photo-unpin { opacity: 1; }
.cover-photo.is-doc { background: #fff; }
.cover-photo-doc {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem;
    aspect-ratio: 4 / 3; padding: .4rem; text-align: center; color: var(--ink-soft);
}
.cover-photo-doc-ext { font-weight: 800; font-size: 1.15rem; color: var(--accent); }
.cover-photo-doc-name { font-size: .7rem; line-height: 1.15; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cover-photo-pdf { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
/* Doubled selector (.cover-photo.cover-photo-empty) so the transparent fill + cream text win over the
   later .cover-photo base rule (white card) - otherwise cream text sat on a white box, near-invisible. */
.cover-photo.cover-photo-empty {
    flex: 1 1 0; min-width: 0; max-width: 12rem; min-height: 7.5rem; cursor: pointer; font: inherit;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem;
    background: transparent; border: 2px dashed rgba(237, 237, 237, .5); border-radius: var(--radius);
    color: rgba(237, 237, 237, .92); padding: .5rem; box-shadow: none;
}
.cover-photo.cover-photo-empty:hover { background: rgba(255, 255, 255, .1); border-color: rgba(237, 237, 237, .8); color: #fff; }
.cover-photo-empty-plus { font-size: 1.7rem; line-height: 1; }
.cover-photo-empty-label { font-size: .72rem; text-align: center; }

/* ── Naslovna slika: a full-width cover photo taped across the top of the notebook cover ── */
.cover-hero {
    position: relative; display: block; width: 100%; margin: .2rem 0 .3rem; box-sizing: border-box;
    aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: visible;
    background: #fff; padding: .5rem; transform: rotate(-.5deg);
    box-shadow: 3px 10px 24px -8px rgba(0, 0, 0, .55);
}
.cover-hero-img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); background: var(--line); }
/* click-to-upload placeholder: dashed frame on the leather cover, cream text (like the empty doc slots) */
.cover-hero.cover-hero-empty {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem;
    aspect-ratio: 16 / 9; cursor: pointer; padding: .8rem; box-shadow: none;
    background: rgba(255, 255, 255, .06); border: 2px dashed rgba(237, 237, 237, .5); color: rgba(237, 237, 237, .92);
}
.cover-hero.cover-hero-empty:hover { background: rgba(255, 255, 255, .12); border-color: rgba(237, 237, 237, .85); color: #fff; }
.cover-hero-empty-plus { font-size: 2rem; line-height: 1; }
.cover-hero-empty-label { font-size: .82rem; font-weight: 600; text-align: center; }
.cover-hero-input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; opacity: 0; }
/* duct-tape strips at the corners (same tape as the pinned snapshots), rotated to hug the frame */
.cover-hero-tape {
    position: absolute; z-index: 3; width: 3.6rem; height: 1.2rem; background: var(--tape);
    border: 1px solid rgba(154, 154, 154, .4); box-shadow: 0 1px 2px rgba(0, 0, 0, .18);
}
.cover-hero-tape-tl { top: -.45rem; left: -.95rem; transform: rotate(-42deg); }
.cover-hero-tape-tr { top: -.45rem; right: -.95rem; transform: rotate(42deg); }
.cover-hero-tape-bl { bottom: -.45rem; left: -.95rem; transform: rotate(42deg); }
.cover-hero-tape-br { bottom: -.45rem; right: -.95rem; transform: rotate(-42deg); }
/* replace / remove controls, revealed on hover of the photo */
.cover-hero-tools { position: absolute; top: .8rem; right: .8rem; z-index: 4; margin: 0; display: flex; gap: .35rem; opacity: 0; transition: opacity .15s; }
.cover-hero.has-image:hover .cover-hero-tools, .cover-hero.has-image:focus-within .cover-hero-tools { opacity: 1; }
.cover-hero-btn {
    display: inline-grid; place-items: center; width: 1.85rem; height: 1.85rem; padding: 0; cursor: pointer;
    border: 1px solid rgba(255, 255, 255, .3); border-radius: 50%; background: rgba(0, 0, 0, .55);
    color: #fff; font: inherit; font-size: .95rem; line-height: 1;
}
.cover-hero-btn:hover { background: rgba(0, 0, 0, .78); }
.cover-hero-btn-danger:hover { background: #b3261e; border-color: #b3261e; }
.cover-hero-busy {
    position: absolute; inset: .5rem; z-index: 5; display: grid; place-items: center; border-radius: var(--radius);
    background: rgba(20, 12, 6, .5); color: #fff; font-weight: 600; font-size: .85rem;
}

/* ── IP kamera gradbišča: the live picture in the same taped frame ──────────────────────────────
   Deliberately RIGHT HERE, immediately after the .cover-hero block above, and not appended at the end
   of the file: these rules have the same specificity as the ones they sit beside, so their order in
   the file is what decides. (That is exactly how .journal-page-tool and .journal-page-spread ended up
   fighting each other.) */
.cover-hero-live { position: relative; width: 100%; height: 100%; border-radius: var(--radius); overflow: hidden; }
/* the still photograph underneath: the resting state when the site's uplink is down */
.cover-hero-live-base { position: absolute; inset: 0; }
.cover-hero-live-img { position: relative; transition: opacity .25s; }
.cover-hero-live.is-offline .cover-hero-live-img { opacity: 0; }
/* a transparent hit area over the whole frame - clicking the picture opens it large */
.cover-hero-live-open {
    position: absolute; inset: 0; z-index: 2; padding: 0; border: 0; cursor: zoom-in;
    background: transparent; appearance: none;
}
.cover-hero-live-badge {
    position: absolute; top: .8rem; left: .8rem; z-index: 3; display: inline-flex; align-items: center;
    gap: .35rem; padding: .16rem .5rem; border-radius: var(--radius-pill); background: rgba(0, 0, 0, .62);
    color: #fff; font-size: .68rem; font-weight: 700; letter-spacing: .06em;
}
.cover-hero-live-dot {
    width: .5rem; height: .5rem; border-radius: 50%; background: #e5484d;
    animation: cover-hero-live-pulse 2s ease-in-out infinite;
}
.cover-hero-live-badge.is-offline { background: rgba(26, 26, 26, .78); color: rgba(255, 255, 255, .8); }
.cover-hero-live-badge.is-offline .cover-hero-live-dot { background: #8a8a8a; animation: none; }
@keyframes cover-hero-live-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.cover-hero-live-name {
    position: absolute; bottom: .8rem; left: .8rem; z-index: 3; padding: .16rem .5rem; border-radius: var(--radius);
    background: rgba(0, 0, 0, .55); color: #fff; font-size: .72rem; font-weight: 600;
}
.cover-hero-offline {
    position: absolute; z-index: 3; left: 50%; top: 50%; transform: translate(-50%, -50%);
    display: grid; gap: .15rem; justify-items: center; padding: .5rem .8rem; border-radius: var(--radius);
    background: rgba(20, 12, 6, .62); color: #fff; font-size: .8rem; font-weight: 600; text-align: center;
}
.cover-hero-offline em { font-style: normal; font-weight: 400; font-size: .72rem; opacity: .85; }
/* while the FIRST frame is on its way. Not cosmetic: a snapshot camera has 8 seconds of server-side
   timeout behind it and an RTSP one up to 15 (Camera:FfmpegSnapshotTimeoutSeconds - ffmpeg has to finish
   an RTSP handshake and then WAIT for a keyframe), and for all of that the cover used to show either a
   hole or yesterday's photograph with a "V ŽIVO" badge over it. Same plate as .cover-hero-offline, one
   state up. */
.cover-hero-live.is-loading .cover-hero-live-img { opacity: 0; }
.cover-hero-live-badge.is-loading { background: rgba(26, 26, 26, .78); color: rgba(255, 255, 255, .85); }
.cover-hero-live-badge.is-loading .cover-hero-live-dot {
    background: #cfcfcf; animation: cover-hero-live-pulse 1.1s ease-in-out infinite;
}
.cover-hero-live-wait {
    position: absolute; z-index: 3; left: 50%; top: 50%; transform: translate(-50%, -50%);
    display: grid; gap: .3rem; justify-items: center; padding: .55rem .85rem; border-radius: var(--radius);
    background: rgba(20, 12, 6, .62); color: #fff; font-size: .8rem; font-weight: 600; text-align: center;
}
.cover-hero-live-wait em { font-style: normal; font-weight: 400; font-size: .72rem; opacity: .85; }
.cover-hero-live-spin {
    width: 1.15rem; height: 1.15rem; border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .28); border-top-color: #fff;
    animation: cover-hero-live-spin .8s linear infinite;
}
@keyframes cover-hero-live-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .cover-hero-live-spin { animation-duration: 2.4s; }
    .cover-hero-live-badge.is-loading .cover-hero-live-dot { animation: none; }
}
/* The same camera on a /projects shelf notebook (CameraView Compact): the frame there is about a third of
   the cover's, so the badge and the two plates shrink with it - at the cover's size "Nalagam sliko kamere"
   alone filled the picture. */
.cover-hero-live.is-compact .cover-hero-live-badge {
    top: .35rem; left: .35rem; gap: .25rem; padding: .08rem .38rem; font-size: .52rem;
}
.cover-hero-live.is-compact .cover-hero-live-dot { width: .38rem; height: .38rem; }
.cover-hero-live.is-compact .cover-hero-live-wait,
.cover-hero-live.is-compact .cover-hero-offline {
    gap: .2rem; padding: .3rem .55rem; font-size: .62rem; white-space: nowrap;
}
.cover-hero-live.is-compact .cover-hero-live-spin { width: .8rem; height: .8rem; }
/* the empty cover for a plan that has cameras: two ACTIONS side by side. The Osnovni empty state stays
   a single <label> - see the note in Home.razor about a button inside it firing the file picker too. */
.cover-hero.cover-hero-empty-dual { cursor: default; }
.cover-hero-cta { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin-top: .35rem; }
.cover-hero-cta-btn { cursor: pointer; }
/* "Naslovna slika" is a btn-ghost, i.e. transparent with a transparent border - on the cover plate
   that read as bare text next to the solid "Dodaj IP kamero" and was easy to miss altogether. Give
   it its own whitish plate so both CTAs read as buttons. */
.cover-hero-cta-btn.btn-ghost {
    background: rgba(255, 255, 255, .92); border-color: var(--line-strong); color: var(--ink);
}
.cover-hero-cta-btn.btn-ghost:hover { background: #fff; border-color: var(--ink); }
/* the professional list of a site's cameras (inline in the gradbišče form, or in its own modal) */
.camera-list { display: grid; gap: .5rem; }
.camera-row-url { word-break: break-all; font-size: .74rem; }
.camera-star {
    flex: none; width: 1.9rem; height: 1.9rem; padding: 0; cursor: pointer; border-radius: 50%;
    border: 1px solid var(--line); background: #fff; color: var(--line); font-size: 1rem; line-height: 1;
}
.camera-star.is-on { color: #d9a300; border-color: #d9a300; }
.camera-star:disabled { cursor: default; opacity: .6; }

/* ── "Dodaj kamero" dialog ────────────────────────────────────────────────────────────────────────
   A 12-column grid, and every field spans as much of it as its CONTENT needs. That is the whole idea
   here: a name is "Vhod", a URL is eighty characters, an interval is "10 sekund". Stretching all three
   to the card's full width - which is what happens when a form is assembled out of three different
   layout kits, as this one was - makes the short fields look broken and flattens the hierarchy, so the
   eye cannot tell the field that matters from the one that does not. */
.camera-modal { width: min(46rem, 100%); max-height: min(88vh, 880px); display: flex; flex-direction: column; }
.camera-modal > .task-modal-head { flex: none; }
/* The body scrolls, the head and the actions do not - a modal that runs off the bottom of a laptop
   screen takes its Shrani with it. Same construction as .sched-ai-card. */
.camera-modal-body {
    flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
    padding: 1.25rem 1.5rem 1.4rem; display: flex; flex-direction: column; gap: 1.25rem;
}
/* Padded like the body: the actions used to be a direct child of the card, which has no padding of its
   own, so the buttons sat flush against its border. */
.camera-modal-actions {
    flex: none; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
    padding: 1rem 1.5rem 1.25rem; border-top: 1px solid var(--line);
}
/* Shrani and Preveri povezavo are what you came to do, so they lead. Prekliči is the way OUT and
   belongs at the other end of the row - the gap between them is what stops a misfire. Izbriši kamero
   then sits beyond it, still the furthest thing from Shrani. */
.camera-modal-actions .btn-ghost { margin-left: auto; }
/* ...and when there is no Prekliči to push it (there always is, but the rule must not depend on that),
   the delete still finds the right edge on its own. */
.camera-modal-actions .btn-ghost ~ .camera-delete { margin-left: 0; }
.camera-delete { margin-left: auto; }

.camera-grid {
    display: grid; grid-template-columns: repeat(12, 1fr);
    /* Tighter between columns than between rows: fields on one line belong together, rows do not. */
    column-gap: .9rem; row-gap: .85rem; align-items: start;
}
.camera-field { display: flex; flex-direction: column; gap: .3rem; min-width: 0; grid-column: span 12; }
.camera-field > span { font-size: .8rem; font-weight: 600; color: var(--ink-soft); }
/* A hint belongs to the field above it, so it sits tight under it and starts a new row of its own -
   otherwise a two-line hint pushes its neighbour's input out of alignment. */
.camera-hint {
    grid-column: span 12; margin: -.35rem 0 0; font-style: normal;
    font-size: .78rem; line-height: 1.45; color: var(--ink-mute);
}
.camera-hint code {
    font-size: .95em; padding: 0 .25rem; border-radius: var(--radius);
    background: var(--bg); border: 1px solid var(--line);
}
/* ── The width of each field IS the length of what goes in it ── */
.camera-field-name { grid-column: span 5; }      /* "Vhod", "Dvorišče" */
.camera-field-kind { grid-column: span 7; }      /* a picker, two short options + caret */
.camera-field-url { grid-column: span 12; }      /* the longest thing in this form, by far */
.camera-field-user { grid-column: span 5; }      /* "admin" */
.camera-field-pass { grid-column: span 7; }
.camera-field-refresh { grid-column: span 4; }   /* "10 sekund" - and nothing wider, ever */
/* The URL is read character by character when something is wrong with it, so it gets a monospace-ish
   rhythm and never wraps mid-token. */
.camera-url-input { font-family: var(--font-mono, ui-monospace, "SFMono-Regular", Menlo, monospace); font-size: .86rem; }
/* Only the hint under the interval is short enough to sit beside its field rather than under it. */
@media (min-width: 620px) {
    .camera-hint-refresh { grid-column: span 8; align-self: center; margin-top: .55rem; }
}
@media (max-width: 619px) {
    .camera-field-name, .camera-field-kind, .camera-field-user,
    .camera-field-pass, .camera-field-refresh { grid-column: span 12; }
}

/* Credentials as one panel: the checkbox is a single decision, and two inputs that materialise loose
   in the middle of a form when it is ticked read as a glitch rather than as an answer to it. */
.camera-auth {
    padding: .75rem .9rem; border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--bg); transition: border-color .15s;
}
.camera-auth.is-open { border-color: var(--line-strong); }
.camera-auth-toggle { min-height: 0; }
.camera-auth-toggle em { font-size: .78rem; color: var(--ink-mute); margin-top: .1rem; }
.camera-auth-fields { margin-top: .85rem; }

/* "Preveri povezavo": the real frame the camera returned, which is the only convincing proof that the
   address, the protocol and the password are right TOGETHER. The panel is now the RESULT only - the
   button that fills it lives in the footer, beside Shrani. */
.camera-test {
    display: grid; gap: .75rem; padding: .85rem .9rem;
    border: 1px dashed var(--line-strong); border-radius: var(--radius);
}

.camera-test-shot { margin: 0; display: grid; gap: .4rem; justify-items: start; }
.camera-test-shot img {
    max-width: 100%; max-height: 13rem; border-radius: var(--radius);
    border: 1px solid var(--line-strong); background: #000;
}
.camera-test-ok { font-size: .8rem; font-weight: 600; color: var(--ok, #3d6b4a); }
@media (max-width: 619px) {
    .camera-modal-body { padding: 1rem 1.1rem 1.15rem; }
    .camera-modal-actions { padding: .85rem 1.1rem 1rem; }
    /* On a phone the destructive action gets its own line instead of being pushed to a far edge that
       is only a thumb-width away from Shrani. The same goes for Prekliči: on a row that wraps, an auto
       margin strands it alone at the right of its own line instead of following the button before it. */
    .camera-modal-actions .btn-ghost { margin-left: 0; }
    .camera-delete { margin-left: 0; width: 100%; }

}

/* pin-to-cover toggle on each file card in the phase galleries */
.phase-file-pin {
    position: absolute; top: .4rem; right: .4rem; z-index: 4; width: 1.75rem; height: 1.75rem;
    border: 1px solid var(--line); border-radius: 50%; background: rgba(255, 255, 255, .94); cursor: pointer;
    font-size: .9rem; line-height: 1; filter: grayscale(1) opacity(.5); transition: filter .15s, transform .15s, background .15s;
}
.phase-file-pin:hover { filter: none; transform: scale(1.12); }
.phase-file-pin.is-pinned { filter: none; background: var(--accent-soft); border-color: var(--accent); }
.phase-file-pin:disabled { cursor: not-allowed; opacity: .4; }
.phase-file-card.is-pinned { outline: 2px solid var(--accent); outline-offset: 2px; }

/* pin picker modal (choose a document from the project's pool) */
.pin-picker-card { max-width: 42rem; width: 92vw; }
.pin-picker-body { padding: 1rem 1.25rem 1.25rem; max-height: 60vh; overflow-y: auto; }
.pin-picker-empty { color: var(--ink-mute); }
.pin-picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr)); gap: .75rem; }
.pin-picker-item {
    display: flex; flex-direction: column; align-items: center; gap: .4rem; padding: .8rem .6rem; font: inherit;
    border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev); cursor: pointer; color: var(--ink);
}
.pin-picker-item:hover { border-color: var(--accent); background: var(--bg); }
.pin-picker-ico { font-size: 1.3rem; font-weight: 800; color: var(--accent); }
.pin-picker-name {
    font-size: .75rem; text-align: center; overflow: hidden;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    /* break long unspaced filenames (e.g. LR_brand_156426_FBTW…) so they wrap instead of overflowing */
    overflow-wrap: anywhere; word-break: break-word; line-height: 1.3;
}
.pin-picker-search { margin-bottom: .9rem; }
.pin-picker-search-input { width: 100%; }
.pin-picker-pager { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1.1rem; }
.pin-picker-page-label { font-size: .8rem; color: var(--ink-soft); min-width: 6.5rem; text-align: center; }
.pin-picker-page-btn {
    width: 2rem; height: 2rem; display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.1rem; line-height: 1; border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--bg-elev); color: var(--ink); cursor: pointer;
}
.pin-picker-page-btn:hover:not(:disabled) { border-color: var(--accent); background: var(--bg); }
.pin-picker-page-btn:disabled { opacity: .4; cursor: default; }

/* glowing "Hiša v 3D" bookmark - the same pulsing accent pill as the old navbar entry (.nav-link-3d).
   Selectors are doubled (.journal-bookmark.journal-bookmark-3d) so the accent gradient wins over the
   later, paler .journal-bookmark-special / .journal-bookmark base rules. */
.journal-bookmark.journal-bookmark-3d {
    color: #fff; border-color: var(--accent-ink); font-style: normal;
    background: linear-gradient(135deg, var(--accent), var(--accent-ink));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent),
                0 0 14px 1px color-mix(in srgb, var(--accent) 55%, transparent), var(--shadow-card);
    animation: journal-3d-glow 2.4s ease-in-out infinite;
}
.journal-bookmark.journal-bookmark-3d .journal-bookmark-label,
.journal-bookmark.journal-bookmark-3d .journal-bookmark-ico { color: #fff; }
.journal-bookmark.journal-bookmark-3d:hover {
    background: linear-gradient(135deg, var(--accent-ink), var(--accent));
}
/* When the 3D view is the open page, the generic .is-current would swap in a PALE cream fill, but the
   label keeps its own higher-specificity white colour → white-on-cream, unreadable. Keep the dark accent
   gradient here so the white text stays legible; the translateX shift from .is-current still marks it. */
.journal-bookmark.journal-bookmark-3d.is-current {
    background: linear-gradient(135deg, var(--accent-ink), var(--accent)); color: #fff;
}
@keyframes journal-3d-glow {
    0%, 100% { box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent),
                           0 0 8px 0 color-mix(in srgb, var(--accent) 45%, transparent), var(--shadow-card); }
    50%      { box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 62%, transparent),
                           0 0 20px 4px color-mix(in srgb, var(--accent) 72%, transparent), var(--shadow-card); }
}

/* Pomočnik (AI) bookmark - prominent, with a RAINBOW border. The double background-clip trick: the
   padding-box layer is the dark fill, the border-box layer is the rainbow that shows in the 2px border.
   Doubled selectors so it wins over the paler .journal-bookmark-special base. */
.journal-bookmark.journal-bookmark-ai {
    /* same dark accent-gradient fill + white text as "Hiša v 3D", but with a RAINBOW border via the
       double background-clip trick (fill on padding-box, rainbow on border-box) to emphasise AI. The
       generic is-current would replace the whole background with a single layer and wipe the rainbow,
       so the is-current rule below re-applies both layers. */
    border: 2px solid transparent; border-left: none;
    color: #fff; font-style: normal;
    background:
        linear-gradient(135deg, var(--accent), var(--accent-ink)) padding-box,
        linear-gradient(120deg, #e23b3b, #f0892a, #f4d23a, #4fae5a, #3f8fd0, #8a54c4, #e23b3b) border-box;
    box-shadow: var(--shadow-card);
}
.journal-bookmark.journal-bookmark-ai .journal-bookmark-label { color: #fff; }
.journal-bookmark.journal-bookmark-ai:hover {
    background:
        linear-gradient(135deg, var(--accent-ink), var(--accent)) padding-box,
        linear-gradient(120deg, #e23b3b, #f0892a, #f4d23a, #4fae5a, #3f8fd0, #8a54c4, #e23b3b) border-box;
}
.journal-bookmark.journal-bookmark-ai.is-current {
    color: #fff;
    background:
        linear-gradient(135deg, var(--accent-ink), var(--accent)) padding-box,
        linear-gradient(120deg, #e23b3b, #f0892a, #f4d23a, #4fae5a, #3f8fd0, #8a54c4, #e23b3b) border-box;
}
.journal-bookmark-ai .journal-bookmark-ico svg { width: 1.2rem; height: 1.2rem; display: block; }

/* Schedule (Načrtovanje): a large LANDSCAPE open notebook - two cream pages joined by a raised central
   binding ridge, given roughly double a normal page's footprint so the Gantt/Kanban get the room. The
   doubled selector (.app-main.app-main-wide) beats the generic 1340px .app-main rule lower in the file. */
@media (min-width: 1100px) {
    .app-main.app-main-wide:has(.journal-spread) { max-width: min(2000px, 100%); }
}
/* Doubled selector (.journal-page.journal-page-spread) so these win over the base .journal-page rules
   defined lower in the file - otherwise the landscape size + centre ridge get overridden. */
.journal-page.journal-page-spread {
    padding: 1.75rem 2.5rem 2.25rem;   /* symmetric: a spread has no single left margin */
    /* the spread is a deliberate landscape two-page notebook, so it keeps its own height and does NOT
       inherit the single page's A4-portrait aspect-ratio */
    aspect-ratio: auto;
    min-height: 1200px;
    /* drop shadow below + a stack of sheets peeking out the left & right edges (a bunch of papers) */
    box-shadow:
        var(--shadow-page),
        0 26px 42px -26px rgba(26, 26, 26, .5),
        -6px 0 0 -3px var(--bg-elev), -8px 1px 6px -3px rgba(26, 26, 26, .3),
        6px 0 0 -3px var(--bg-elev), 8px 1px 6px -3px rgba(26, 26, 26, .3),
        -11px 0 0 -6px var(--bg-elev), -13px 2px 7px -6px rgba(26, 26, 26, .24),
        11px 0 0 -6px var(--bg-elev), 13px 2px 7px -6px rgba(26, 26, 26, .24);
    background-image:
        /* horizontal ruled lines */
        repeating-linear-gradient(to bottom, transparent 0, transparent 33px, var(--paper-line) 33px, var(--paper-line) 34px),
        /* outer page-edge shading */
        linear-gradient(90deg, rgba(26, 26, 26, .07), transparent 14% 86%, rgba(26, 26, 26, .07));
}
/* the left red margin rule comes from the base ::before at left:2rem (same as the phases page); ::after is
   the centre crease. The right page's margin rule is its own element so it shows above the board panels. */
.journal-spread-rmargin {
    /* the right page's margin rule sits near its OUTER (right) edge, mirroring the left page's left margin */
    position: absolute; top: 0; bottom: 0; right: 2rem; left: auto; width: 2px;
    background: rgba(10, 10, 10, .22); border-radius: var(--radius); z-index: 5; pointer-events: none;
}
/* The 3D view (Hiša v 3D) opens on the same landscape spread as Načrtovanje and brings its own
   fixed-height map. It keeps a default min-height floor so the notebook never collapses when the 3D
   panel is short (loading, or the locked-feature upsell for non-Napredni users); real 3D content is
   taller than this and simply grows the page. */
.journal-page.journal-page-spread:has(.p3d-page) { min-height: 1120px; }
.journal-page-spread .p3d-layout { --p3d-h: 1020px; }
.journal-page.journal-page-spread::after {                    /* central binding crease + soft gutter shadow */
    content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 60px; transform: translateX(-50%);
    background: linear-gradient(90deg,
        transparent,
        rgba(26, 26, 26, .05) 16%,
        rgba(26, 26, 26, .15) 40%,
        rgba(26, 26, 26, .24) 47%,
        rgba(26, 26, 26, .5) 49.5%,    /* crisp crease */
        rgba(26, 26, 26, .5) 50.5%,
        rgba(26, 26, 26, .24) 53%,
        rgba(26, 26, 26, .15) 60%,
        rgba(26, 26, 26, .05) 84%,
        transparent);
    pointer-events: none; z-index: 4;
}

/* keep the cover's flex children from overflowing the rounded cover box */
.book-cover-inner > * { min-width: 0; max-width: 100%; box-sizing: border-box; }

/* taped snapshots from the project's files, stuck onto the cover - all five share one row */
.cover-photos { display: flex; flex-wrap: nowrap; gap: 1.3rem; margin: .5rem 0; }
.cover-photo {
    position: relative; margin: 0; flex: 1 1 0; min-width: 0; max-width: 12rem;
    background: #fff; padding: .45rem .45rem 1.1rem;
    border-radius: var(--radius); box-shadow: 3px 9px 20px -7px rgba(0, 0, 0, .6);
}
.cover-photo:nth-child(3n+1) { transform: rotate(-3deg); }
.cover-photo:nth-child(3n+2) { transform: rotate(2.2deg); }
.cover-photo:nth-child(3n+3) { transform: rotate(-1deg); }
.cover-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; border-radius: var(--radius); background: var(--line); }
.cover-photo-tape {
    position: absolute; top: -.6rem; left: 50%; transform: translateX(-50%) rotate(-5deg);
    width: 4.2rem; height: 1.3rem; background: var(--tape); z-index: 2;
    border: 1px solid rgba(154, 154, 154, .4); box-shadow: 0 1px 2px rgba(0, 0, 0, .18);
}

/* Zemljišče chapter → link card to the standalone Lokacijsko poročilo page */
.parcel-report-cta {
    display: flex; align-items: center; gap: 1rem; margin: 1.25rem 0; padding: 1rem 1.25rem;
    background: color-mix(in srgb, var(--phase-color, var(--accent)) 8%, var(--bg-elev));
    border: 1px solid var(--line); border-left: 3px solid var(--phase-color, var(--accent));
    border-radius: var(--radius); text-decoration: none; color: var(--ink); box-shadow: var(--shadow-card);
    transition: transform .14s ease, box-shadow .14s ease;
}
.parcel-report-cta:hover { transform: translateY(-2px); box-shadow: 0 14px 26px -12px rgba(26, 26, 26, .45); }
.parcel-report-cta-ico { flex: 0 0 auto; color: var(--phase-color, var(--accent)); display: inline-flex; }
.parcel-report-cta-text { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.parcel-report-cta-text strong { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 400; }
.parcel-report-cta-text span { color: var(--ink-soft); font-size: .9rem; }
.parcel-report-cta-go { margin-left: auto; font-size: 1.5rem; color: var(--phase-color, var(--accent)); }

/* Section labels are small uppercase Inter (not script); the hero "project card" keeps the lined paper. */
/* Section labels become handwritten notes; the hero "project card" reads as a lined notebook page. */
.lp-eyebrow, .lp-card-eyebrow {
    font-family: var(--font-sans); font-weight: 600; text-transform: uppercase; letter-spacing: .16em;
    color: var(--accent); font-size: .74rem;
}
.lp-hero-title em { font-family: inherit; font-style: italic; font-weight: 400; color: var(--accent); }
.lp-hero-card {
    position: relative;
    background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 29px, var(--paper-line) 29px, var(--paper-line) 30px);
}
.lp-hero-card::before {  /* a strip of tape holding the page */
    content: ""; position: absolute; top: -.7rem; left: 50%; transform: translateX(-50%) rotate(-3deg);
    width: 5.5rem; height: 1.5rem; background: var(--tape); z-index: 3;
    border: 1px solid rgba(154, 154, 154, .4); box-shadow: 0 1px 3px rgba(26, 26, 26, .15);
}
.lp-card-title { font-family: var(--font-serif); font-weight: 400; }

/* locked bookmarks (no parcel yet): visible but greyed and non-clickable */
.journal-bookmark.is-disabled { opacity: .42; cursor: not-allowed; filter: grayscale(.4); }
.journal-bookmark.is-disabled:hover { transform: none; }
.journal-bookmark-lock { flex: 0 0 auto; font-size: .8rem; }

/* the "Naslovnica" (cover) bookmark - first in the rail */
.journal-bookmark-cover { border-left: 4px solid var(--accent); background: color-mix(in srgb, var(--accent) 15%, var(--bg-elev)); }
.journal-bookmark-cover.is-current { background: color-mix(in srgb, var(--accent) 30%, var(--bg-elev)); color: var(--ink); }

/* "Naslednji koraki" - a compact, handwritten to-do list jotted on the leather cover: no boxed cards,
   just tight rows on faint ruled lines so it doesn't dominate the cover. */
.book-cover-notes { width: 100%; }

/* ---------- the welcome strip for a project that came through /zacni ---------- */
.cover-welcome {
    width: 100%; margin: 0 0 1.75rem; padding: 1rem 1.15rem 1.1rem;
    border: 1px solid var(--accent); border-radius: var(--radius); background: var(--accent-soft);
}
.cover-welcome-head { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; }
.cover-welcome-head h2 { margin: 0; font-family: var(--font-serif); font-size: 1.25rem; font-weight: 400; color: var(--ink); }
.cover-welcome-close {
    border: 0; background: transparent; color: var(--ink-mute); font-size: 1.25rem; line-height: 1;
    cursor: pointer; padding: .1rem .35rem; border-radius: var(--radius);
}
.cover-welcome-close:hover { color: var(--ink); background: var(--bg-elev); }
.cover-welcome-lead { margin: .35rem 0 .75rem; font-size: .93rem; line-height: 1.5; color: var(--ink-soft); }
.cover-welcome-lead strong { color: var(--ink); }
.cover-welcome-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .9rem; }
.cover-welcome-chip {
    display: inline-block; padding: .3rem .7rem; border-radius: var(--radius-pill); font-size: .84rem; font-weight: 600;
    background: var(--bg-elev); border: 1px solid var(--line); color: var(--ink); text-decoration: none;
    max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cover-welcome-chip:hover { border-color: var(--accent); }
.cover-welcome-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.cover-welcome-wizard { margin-left: auto; }

.journal-book-cover .next-steps {
    margin: 0; padding: 0; border-radius: 0; background: none; border: none; color: #ededed;
}
.journal-book-cover .next-steps-head { gap: .5rem; align-items: baseline; margin-bottom: .15rem; }
.journal-book-cover .next-steps-head h2 { font-family: var(--font-serif); font-size: 1.4rem; font-weight: 400; color: #fff; }
.journal-book-cover .next-steps-sub { font-size: .72rem; color: rgba(237, 237, 237, .6); }
.journal-book-cover .next-steps-empty { color: rgba(237, 237, 237, .8); font-size: .85rem; }
/* minmax(0,1fr) so the single column can shrink below its content - otherwise a long task row sizes the
   track to max-content and pushes the "Pomembno" pill past the cover's right edge */
.journal-book-cover .next-steps-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin: .1rem 0 0; padding: 0; list-style: none; }
.journal-book-cover .next-step { min-width: 0; }
.journal-book-cover .next-step-link {
    display: flex; align-items: baseline; gap: .5rem; padding: .25rem .25rem; border-radius: var(--radius);
    background: none; border: none; border-bottom: 1px dotted rgba(237, 237, 237, .16);  /* ruled line */
    color: #ededed; text-decoration: none; transition: background .15s; box-sizing: border-box; width: 100%;
}
.journal-book-cover .next-step-link:hover { background: rgba(255, 255, 255, .08); }
.journal-book-cover .next-step-dot { width: .42rem; height: .42rem; border-radius: 50%; flex: 0 0 auto; align-self: center; }
.journal-book-cover .next-step-main { display: flex; flex-direction: row; align-items: baseline; gap: .5rem; min-width: 0; flex: 1 1 auto; }
.journal-book-cover .next-step-text { color: #ededed; font-weight: 600; font-size: .88rem; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.journal-book-cover .next-step-phase { font-size: .68rem; color: rgba(237, 237, 237, .5); white-space: nowrap; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.journal-book-cover .next-step-tag { flex: 0 0 auto; font-size: .62rem; font-weight: 700; padding: .04rem .42rem; border-radius: var(--radius-pill); white-space: nowrap; }

/* tool pages inside the notebook get the handwriting chapter-title font on their main heading */
.journal-page-tool h1 { font-family: var(--font-serif); font-weight: 400; font-size: 2.2rem; line-height: 1.1; }

/* task progress band on the cover - spans the full cover width */
.book-cover-progress { width: 100%; }
.book-cover-progress-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .4rem; }
.book-cover-progress-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .15em; color: rgba(237, 237, 237, .8); }
.book-cover-progress-pct { font-family: var(--font-sans); font-weight: 800; font-size: 1.35rem; color: #fff; }
.book-cover-progress-bar { height: .6rem; border-radius: var(--radius-pill); background: rgba(0, 0, 0, .3); overflow: hidden; }
.book-cover-progress-fill { height: 100%; border-radius: var(--radius-pill); background: linear-gradient(90deg, var(--accent-soft), #fff); transition: width .4s ease; }
.book-cover-progress-fill.full { background: var(--ok-soft); }
.book-cover-progress-sub { margin-top: .4rem; font-size: .85rem; color: rgba(237, 237, 237, .85); }

/* first page inside the notebook: the chapter table of contents on lined paper */
.journal-first-page {
    position: relative; margin-top: 2.5rem;
    padding: 1.75rem 2rem 2rem calc(2rem + 1.25rem);
    background-color: var(--bg-elev);
    background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 33px, var(--paper-line) 33px, var(--paper-line) 34px);
    border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow-page);
}
.journal-first-page::before {
    content: ""; position: absolute; top: 0; bottom: 0; left: 2rem; width: 2px;
    background: var(--paper-margin); opacity: .55; pointer-events: none; border-radius: var(--radius);
}
.journal-first-page-head { display: flex; align-items: baseline; gap: .75rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.journal-first-page-head .eyebrow { width: 100%; font-size: .72rem; text-transform: uppercase; letter-spacing: .18em; color: var(--accent); }
.journal-first-page-title { font-family: var(--font-serif); font-size: 2.2rem; font-weight: 400; margin: 0; flex: 1 1 auto; }
.journal-first-page-head .journal-reset { flex: 0 0 auto; }
.journal-first-page .journal-toc-cover { background: transparent; border: none; box-shadow: none; }
.journal-flip-next { display: inline-flex; margin-top: 1.5rem; }
.book-cover-inner::after {  /* stitched, leather-bound frame inset from the spine */
    content: ""; position: absolute; inset: 1rem 1rem 1rem 3.4rem;
    border: 2px dashed rgba(237, 237, 237, .26); border-radius: var(--radius); pointer-events: none;
}
.book-cover-spine {  /* bound spine on the left edge */
    position: absolute; top: 0; bottom: 0; left: 0; width: 2.4rem;
    background: linear-gradient(to right, rgba(0, 0, 0, .42), rgba(0, 0, 0, .05));
    border-right: 1px solid rgba(0, 0, 0, .32);
}
/* Title block engraved straight onto the leather cover (no taped paper): gold-stamped eyebrow, a serif
   title sitting on a ruled line, the description on its own ruled line, and a stamped type tag. */
.book-cover-plate {
    position: relative; max-width: 40rem; padding: .2rem 0 0;
    background: transparent; color: #ededed; transform: none; border: none; box-shadow: none;
}
.book-cover-plate::before { display: none; }  /* drop the old tape */
.book-cover-eyebrow {
    font-family: var(--font-sans); font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .18em;
    color: var(--accent-soft); text-shadow: 0 1px 1px rgba(0, 0, 0, .35);
}
.book-cover-title {
    font-family: var(--font-serif); font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.06;
    margin: .15rem 0 0; padding-bottom: .55rem; color: #fff;
    border-bottom: 1px solid rgba(237, 237, 237, .32); text-shadow: 0 1px 2px rgba(0, 0, 0, .4);
}
.book-cover-lead {
    margin: .7rem 0 0; padding-bottom: .55rem; color: rgba(237, 237, 237, .82);
    border-bottom: 1px dashed rgba(237, 237, 237, .22);
}
.book-cover-type {
    display: inline-block; margin-top: .9rem; padding: .22rem .7rem;
    background: rgba(0, 0, 0, .14); color: var(--accent-soft);
    border: 1px solid rgba(237, 237, 237, .4); border-radius: var(--radius-pill);
    font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
}
.book-cover-meta { position: relative; display: flex; flex-wrap: wrap; gap: 1.4rem 2rem; margin: 1.9rem 0 0; }
.book-cover-meta > div { display: flex; flex-direction: column; gap: .15rem; }
.book-cover-meta dt { font-size: .68rem; text-transform: uppercase; letter-spacing: .15em; color: rgba(237, 237, 237, .72); }
.book-cover-meta dd { margin: 0; font-family: var(--font-sans); font-weight: 700; font-size: 1.1rem; color: #fff; }
.journal-toc-section { margin-top: 1.5rem; }
.journal-toc-section .timeline-head h2 { font-family: var(--font-serif); font-size: 1.6rem; font-weight: 400; }
.journal-toc-cover {
    background: var(--bg-elev); border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: var(--shadow-card); overflow: hidden;
}

/* ── notebook spread: lined page + edge bookmarks ──────────────────────── */
.journal-spread { position: relative; display: flex; align-items: flex-start; gap: 0; }
.journal-page {
    position: relative; flex: 1 1 auto; min-width: 0; z-index: 1;
    /* A4 portrait proportions (210 × 297): the page width stays fluid and the height follows it at the
       A4 ratio. It still grows past A4 when the chapter has more content than fits one sheet. */
    aspect-ratio: 210 / 297;
    padding: 1.25rem 1.5rem 1.75rem calc(2rem + 1rem);
    background-color: var(--bg-elev);
    background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 33px, var(--paper-line) 33px, var(--paper-line) 34px);
    /* The sheet is edged in the OPEN CHAPTER's own colour - the same colour as its bookmark, which
       overlaps this border on the right - so the page and the tab that opened it read as one thing.
       Tool pages and the cover have no chapter colour and fall back to the accent, which is what their
       bookmarks are. Mixed with the paper's line colour so it frames rather than shouts. */
    border: 2px solid color-mix(in srgb, var(--phase-color, var(--accent)) 80%, var(--line-strong));
    border-radius: var(--radius);
    /* drop shadow + a stack of sheets peeking out the right (free) edge - a bunch of papers, the same
       touch the Načrtovanje spread has (the spine is on the left, so the stack shows on the right). */
    box-shadow:
        var(--shadow-page),
        6px 0 0 -3px var(--bg-elev), 8px 1px 6px -3px rgba(26, 26, 26, .3),
        11px 0 0 -6px var(--bg-elev), 13px 2px 7px -6px rgba(26, 26, 26, .24);
}
.journal-page::before {  /* red margin rule */
    content: ""; position: absolute; top: 0; bottom: 0; left: 2rem; width: 2px;
    background: var(--paper-margin); opacity: .55; pointer-events: none; border-radius: var(--radius);
}
.journal-page::after {   /* binding shadow at the left spine */
    content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 16px;
    background: linear-gradient(to right, rgba(26, 26, 26, .12), transparent);
    pointer-events: none; border-radius: var(--radius) 0 0 var(--radius);
}
.journal-page.is-irrelevant { opacity: .85; }
.journal-chapter-head { border-bottom: 1px dashed var(--line-strong); }
.journal-chapter-title { font-family: var(--font-serif); font-size: 1.85rem; line-height: 1.1; font-weight: 400; }
.section-block { scroll-margin-top: calc(var(--nav-h) + 5rem); }

/* ── The investor's half of a professional gradbišče ──────────────────────────────────────────────
   Folded and muted, not hidden: the builder can see where the permits stand without their week filling
   up with somebody else's paperwork, and a task with two owners gets ticked twice. The whole heading is
   the fold target - on site this is tapped with a thumb. */
.section-block.is-investor { opacity: .82; }
.section-block.is-investor .section-head { align-items: center; }
.section-fold {
    appearance: none; background: none; border: none; padding: 0; cursor: pointer;
    display: inline-flex; align-items: center; gap: .5rem; text-align: left; color: inherit; font: inherit;
}
.section-fold h2 { margin: 0; }
.section-fold-caret { color: var(--ink-mute); transition: transform .15s; display: inline-block; }
.section-fold.is-open .section-fold-caret { transform: rotate(90deg); }
.section-tag {
    font-size: .68rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
    color: var(--ink-mute); background: var(--bg-sunk, rgba(0,0,0,.05));
    border-radius: var(--radius-pill); padding: .12rem .5rem; white-space: nowrap;
}
/* A read-only row still reads; it just cannot be changed. */
.section-block.is-investor .item-check:disabled,
.section-block.is-investor .status-select:disabled { cursor: not-allowed; }

/* chapter table of contents (kazalo) */
.journal-toc-chapter {
    margin: 1rem 0; padding: .75rem 1rem;
    background: color-mix(in srgb, var(--phase-color, var(--accent)) 7%, var(--bg-elev));
    border: 1px solid var(--line); border-left: 3px solid var(--phase-color, var(--accent)); border-radius: var(--radius);
}
.journal-toc-head { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 400; margin-bottom: .35rem; }
.journal-toc-list { list-style: none; margin: 0; padding: 0; }
.journal-toc-link {
    display: flex; align-items: baseline; gap: .6rem; width: 100%;
    padding: .4rem .2rem; border: none; background: none; cursor: pointer; text-align: left; color: var(--ink); font: inherit;
}
.journal-toc-num {
    flex: 0 0 auto; width: 1.5rem; height: 1.5rem; border-radius: 50%; align-self: center;
    display: inline-grid; place-items: center; font-size: .8rem; font-weight: 700;
    background: var(--phase-color, var(--accent)); color: #fff;
}
/* 0 1 auto + min-width 0: a long section name ("Temeljna plošča (F1) - navodila za izvedbo") wraps instead of
   pushing the count past a 320px phone (365px page, NomiFac #633's responsive audit). */
.journal-toc-title { flex: 0 1 auto; min-width: 0; font-weight: 600; }
.journal-toc-link:hover .journal-toc-title { text-decoration: underline; }
.journal-toc-leader { flex: 1 1 auto; border-bottom: 2px dotted var(--line-strong); transform: translateY(-.2rem); }
.journal-toc-count { flex: 0 0 auto; font-size: .8rem; color: var(--ink-mute); font-variant-numeric: tabular-nums; }
.journal-toc-row.is-complete .journal-toc-count { color: var(--ok); }

/* ── edge bookmarks: slim tabs with pull-out labels ─────────────────────────
   The rail names ~17 destinations in the width of a page margin, and it is the dnevnik's only table of
   contents. Printing the names ON the tabs needed 9.5rem-wide tabs with three-line titles: a wall of
   wrapped text that was hard to scan, and that width came straight off the page beside it. Now the tab
   carries only its chapter NUMBER (tools: their glyph) plus a progress fill, and the full name slides
   out from under the tab on hover / keyboard focus - one line, absolutely positioned, so nothing
   reflows and nothing is ever truncated. `.is-open` (the chevron at the top of the rail) pins the short
   names onto the tabs for anyone who wants them permanently. */
.journal-bookmarks {
    /* z-index 2, i.e. ABOVE the page (z-index 1), where the rail used to sit below it. A sticky element
       always makes its own stacking context, so nothing inside the rail can paint above the page unless
       the whole rail does - and the pull-out labels have to, since they open leftwards over the sheet.
       The tabs still read as tucked in: they have no left border and start under the page's edge. */
    position: sticky; top: calc(var(--nav-h) + 4.75rem); z-index: 2;
    flex: 0 0 auto; align-self: flex-start;
    /* less tuck under the page than before, so the tabs clear the stack of sheets now peeking out the
       page's right edge */
    /* The tabs TUCK further under the page than they stick out when pulled (see :hover / .is-current
       below), so a bookmark always overlaps the sheet: the page's coloured edge and the tab it belongs
       to touch, instead of floating a few pixels apart. The width carries the same tuck, so the page
       keeps exactly the width it had. */
    display: flex; flex-direction: column; align-items: stretch; gap: .25rem;
    width: 3.3rem; margin-left: -0.55rem;
    /* symmetric top/bottom inset so the last bookmark isn't flush against the page bottom when scrolled */
    padding-top: 1rem; padding-bottom: 1rem;
    transition: width .18s ease;
}
.journal-bookmarks.is-open { width: 12.5rem; }
.journal-bookmark {
    /* A tab, not a text block: the number/glyph is centred in the slim rail and the name (when pinned
       open) sits beside it on ONE line. */
    position: relative; z-index: 0;
    display: flex; align-items: center; justify-content: center; gap: .45rem;
    width: 100%; min-height: 2.3rem; padding: .3rem .3rem .35rem .55rem;
    background: color-mix(in srgb, var(--phase-color, var(--accent)) 18%, var(--bg-elev));
    border: 1px solid var(--line-strong); border-left: none; border-radius: 0 var(--radius) var(--radius) 0;
    box-shadow: var(--shadow-card); color: var(--ink-soft);
    text-decoration: none; cursor: pointer; text-align: left;
    transition: transform .16s ease, background .16s ease;
}
.journal-bookmarks.is-open .journal-bookmark { justify-content: flex-start; padding: .4rem .5rem .45rem .9rem; }
.journal-bookmark:hover, .journal-bookmark:focus-visible { transform: translateX(.35rem); z-index: 6; }
.journal-bookmark.is-current {
    transform: translateX(.45rem);
    background: color-mix(in srgb, var(--phase-color, var(--accent)) 30%, var(--bg-elev)); color: var(--ink);
}
/* how far the chapter has come, as a fill along the tab's bottom edge - the rail reads as a progress
   ladder at a glance, which is what the "4/12" text used to say in a space that no longer exists */
.journal-bookmark::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
    border-radius: 0 0 var(--radius) 0; pointer-events: none; opacity: .9;
    background: linear-gradient(to right,
        var(--phase-color, var(--accent)) var(--bm-progress, 0%), transparent var(--bm-progress, 0%));
}
.journal-bookmark-num {
    flex: 0 0 auto; width: 1.55rem; height: 1.55rem; border-radius: 50%;
    display: inline-grid; place-items: center; font-family: var(--font-sans);
    font-size: .78rem; font-weight: 700; background: var(--phase-color, var(--accent)); color: #fff;
}
/* The € bookmark (#878): the partner ads, a chapter tab with the euro where the number goes, set a little apart
   from chapter 1 below it - it comes before the chapters rather than being one. */
.journal-bookmark-euro svg { display: block; stroke-width: 2.6; }
.journal-bookmark-ads { margin-bottom: .35rem; }
/* The name printed on the tab - only when the rail is pinned open (and always on phones, where the rail
   is a horizontal strip and there is no hover). It is the catalog's SHORT title, on one line: the full
   one still shows in the pull-out. */
.journal-bookmark-label {
    display: none; flex: 1 1 auto; min-width: 0;
    font-family: var(--font-sans); font-size: .8rem; font-weight: 600; line-height: 1.2;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.journal-bookmarks.is-open .journal-bookmark-label { display: block; }
/* The pull-out label: the part of the bookmark that was inside the book. It slides out to the LEFT (over
   the page) rather than to the right, where there is only the browser edge.
   It is deliberately built to look like ONE object with its tab - the bookmark simply gets longer, the
   way an index unfolds - so it takes the tab's FULL HEIGHT (top/bottom 0, not a centred pill), the tab's
   own paper colour, and it overlaps the tab by .7rem so no seam or border shows where they meet. */
.journal-bookmark-tip {
    position: absolute; top: 0; bottom: 0; right: calc(100% - .7rem);
    display: flex; align-items: center; gap: .45rem;
    padding: .3rem .8rem .3rem .6rem;
    background: color-mix(in srgb, var(--phase-color, var(--accent)) 18%, var(--bg-elev));
    color: var(--ink);
    border: 1px solid var(--line-strong); border-right: none;
    border-left: 3px solid var(--phase-color, var(--accent)); border-radius: var(--radius) 0 0 var(--radius);
    box-shadow: -7px 4px 14px -7px rgba(26, 26, 26, .5);
    font-family: var(--font-sans); font-size: .78rem; font-weight: 600; font-style: normal; line-height: 1.3;
    white-space: nowrap; pointer-events: none;
    opacity: 0; visibility: hidden; transform: translate(.55rem, 0);
    transition: opacity .14s ease, transform .14s ease, visibility .14s;
}
/* the open chapter's tab is a shade stronger - its label has to be too, or the "one piece" breaks */
.journal-bookmark.is-current .journal-bookmark-tip {
    background: color-mix(in srgb, var(--phase-color, var(--accent)) 30%, var(--bg-elev));
}
/* the two dark accent tabs (Hiša v 3D, Pomočnik) continue into their label instead of turning to paper */
.journal-bookmark.journal-bookmark-3d .journal-bookmark-tip,
.journal-bookmark.journal-bookmark-ai .journal-bookmark-tip {
    background: linear-gradient(135deg, var(--accent), var(--accent-ink));
    border-color: var(--accent-ink); border-left-color: var(--accent-ink); color: #fff;
}
.journal-bookmark.journal-bookmark-3d .journal-bookmark-tip .journal-bookmark-tipcount,
.journal-bookmark.journal-bookmark-ai .journal-bookmark-tip .journal-bookmark-tipcount { color: rgba(255, 255, 255, .75); }
/* The delay is on the way IN only (the resting rule above has none): dragging the pointer down the rail
   to reach a far tab shouldn't flash every label it crosses, but leaving one should feel instant. */
.journal-bookmark:hover .journal-bookmark-tip,
.journal-bookmark:focus-visible .journal-bookmark-tip,
.journal-rail-toggle:hover .journal-bookmark-tip,
.journal-rail-toggle:focus-visible .journal-bookmark-tip {
    opacity: 1; visibility: visible; transform: translate(0, 0); transition-delay: .13s;
}
/* pinned open, the name is already on the tab - a flyout on top of it would just cover the page */
.journal-bookmarks.is-open .journal-bookmark-tip { display: none; }
.journal-bookmark-tipcount { font-style: normal; font-size: .7rem; color: var(--ink-mute); font-variant-numeric: tabular-nums; }
.journal-bookmark-count {
    display: none; flex: 0 0 auto;
    font-family: var(--font-sans); font-size: .68rem; color: var(--ink-mute); font-variant-numeric: tabular-nums;
}
.journal-bookmarks.is-open .journal-bookmark-count { display: block; }
.journal-bookmark.is-irrelevant { opacity: .5; }
/* A phase the builder set aside keeps its tab as it was; a slash rides on the number's corner - in the slim rail
   there is no room beside it (the same reason the lock sits in the tab's corner). */
.journal-bookmark.is-set-aside .journal-bookmark-num { position: relative; }
.journal-bookmark-na {
    position: absolute; right: -.32rem; bottom: -.28rem; width: .95rem; height: .95rem; border-radius: 50%;
    display: inline-grid; place-items: center; background: var(--bg-elev); color: var(--ink-soft);
    border: 1px solid var(--line-strong);
}
.journal-bookmark-special { background: color-mix(in srgb, var(--accent) 16%, var(--bg-elev)); border-left: 3px solid var(--accent); }
.journal-bookmark-special .journal-bookmark-num { background: var(--accent); }
.journal-bookmark.is-locked { opacity: .7; }
.journal-bookmark-ico { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 1.3rem; height: 1.3rem; }
.journal-bookmark-ico svg { width: 100%; height: 100%; }
/* the lock rides in the tab's corner: in the slim rail there is no room for it beside the number */
.journal-bookmark-lock { position: absolute; top: .12rem; right: .18rem; display: inline-flex; opacity: .8; }
.journal-bookmarks-sep { height: 1px; background: var(--line-strong); margin: .45rem .3rem .45rem 1rem; }

/* A chapter's INSERT (JournalBookmarks.InsertTab) - Lokacijsko poročilo under chapter 1, Idejna zasnova hiše
   v 3D under Idejna zasnova. It belongs to the chapter above and says so in that chapter's terms: its colour,
   and a filled circle (a touch smaller) carrying a glyph where the chapter carries its number, threaded up to the
   chapter's circle. As wide as every tab (the same target to hit), a shade paler and lower, no progress fill
   (an insert is read, not ticked off) - and it moves WITH its chapter: pulled out together when either is
   hovered or the chapter is open, so the thread never breaks. */
.journal-bookmark.journal-bookmark-insert {
    min-height: 1.95rem; margin-top: -.05rem;
    background: color-mix(in srgb, var(--phase-color, var(--accent)) 9%, var(--bg-elev));
}
.journal-bookmark.journal-bookmark-insert::after { display: none; }
.journal-bookmark.journal-bookmark-insert.is-current {
    background: color-mix(in srgb, var(--phase-color, var(--accent)) 22%, var(--bg-elev)); color: var(--ink);
}
.journal-bookmark-insert-ico {
    position: relative; flex: 0 0 auto; width: 1.45rem; height: 1.45rem; border-radius: 50%;
    display: inline-grid; place-items: center;
    background: var(--phase-color, var(--accent)); color: #fff;
}
/* the glyph fills the circle and draws heavier than the line icons around it: a thin outline in a small
   ringed circle was easy to miss on the rail. The pin is a 24-unit Icon, the house a 64-unit drawing,
   so each gets its own stroke to come out the same weight. */
.journal-bookmark-insert-ico svg { width: .95rem; height: .95rem; display: block; stroke-width: 2.5; }
.journal-bookmark-insert-ico svg[viewBox="0 0 64 64"] { stroke-width: 6; }
/* the thread: up from the insert's circle into the chapter's. It overshoots on purpose - the part that
   runs into the chapter's circle is the circle's own colour, so the join is seamless at any tab height. */
.journal-bookmark-insert-ico::before {
    content: ""; position: absolute; left: 50%; bottom: 100%; width: 2px; height: 1.25rem; margin-left: -1px;
    background: var(--phase-color, var(--accent));
}
.journal-bookmark-insert .journal-bookmark-label { font-size: .76rem; line-height: 1.2; white-space: normal; }
/* pinned open: the insert's circle sits under the chapter's (centre 1.675rem in from the tab's edge), its
   name beside it - "Idejna zasnova hiše v 3D" may take two lines rather than end in an ellipsis */
.journal-bookmarks.is-open .journal-bookmark.journal-bookmark-insert { padding-left: .95rem; }
/* one piece with the chapter: follow it out, and take it along */
.journal-bookmark:hover + .journal-bookmark-insert,
.journal-bookmark:focus-visible + .journal-bookmark-insert,
.journal-bookmark:has(+ .journal-bookmark-insert:hover),
.journal-bookmark:has(+ .journal-bookmark-insert:focus-visible) { transform: translateX(.35rem); }
.journal-bookmark.is-current + .journal-bookmark-insert,
.journal-bookmark.is-current:has(+ .journal-bookmark-insert:hover),
.journal-bookmark.is-current:has(+ .journal-bookmark-insert:focus-visible) { transform: translateX(.45rem); }
@media (max-width: 760px) {
    /* the phone strip is a row: the insert simply follows its chapter, with no thread to draw */
    .journal-bookmark.journal-bookmark-insert { min-height: 0; margin-top: 0; }
    .journal-bookmarks.is-open .journal-bookmark.journal-bookmark-insert { padding-left: .7rem; }
    .journal-bookmark-insert-ico::before { display: none; }
    .journal-bookmark-insert .journal-bookmark-label { white-space: nowrap; }
}

/* the pin-open / collapse chevron, sitting above the first bookmark */
.journal-rail-toggle {
    position: relative; align-self: stretch;
    display: flex; align-items: center; justify-content: center; gap: .3rem;
    min-height: 1.65rem; padding: .1rem .35rem; margin-bottom: .15rem;
    background: none; border: 1px dashed var(--line-strong); border-left: none; border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--ink-mute); cursor: pointer; font: inherit;
}
.journal-rail-toggle:hover { color: var(--ink); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.journal-rail-toggle svg { transition: transform .18s ease; }
.journal-bookmarks.is-open .journal-rail-toggle svg { transform: rotate(180deg); }
.journal-rail-toggle-text { display: none; font-family: var(--font-sans); font-size: .7rem; font-weight: 600; }
.journal-bookmarks.is-open .journal-rail-toggle-text { display: inline; }

/* ── taped photos: the per-phase file insert ───────────────────────────── */
.journal-page .phase-files { background: color-mix(in srgb, var(--phase-color, var(--accent)) 5%, var(--bg-elev)); }
.phase-file-card {
    position: relative; background: #fff; padding: .55rem .55rem 0;
    border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-card);
    transition: transform .15s ease, box-shadow .15s ease;
}
.phase-file-card:nth-child(3n+1) { transform: rotate(-1.4deg); }
.phase-file-card:nth-child(3n+2) { transform: rotate(1deg); }
.phase-file-card:nth-child(3n+3) { transform: rotate(-.5deg); }
.phase-file-card:hover { transform: rotate(0) scale(1.02); box-shadow: 0 14px 26px -10px rgba(26, 26, 26, .45); z-index: 2; }
.phase-file-tape {
    position: absolute; top: -.7rem; left: 50%; transform: translateX(-50%) rotate(-3deg);
    width: 3.4rem; height: 1.3rem; background: var(--tape);
    border: 1px solid rgba(154, 154, 154, .4); box-shadow: 0 1px 2px rgba(26, 26, 26, .12);
    z-index: 3; pointer-events: none;
}
.phase-file-card:nth-child(2n) .phase-file-tape { transform: translateX(-50%) rotate(2.5deg); }

/* ── IDP "Povzetek" insert + journal search highlight ──────────────────── */
.idp-povzetek-insert { margin-top: 1.5rem; scroll-margin-top: calc(var(--nav-h) + 5rem); }
@keyframes journalFound {
    0%, 100% { box-shadow: 0 0 0 0 transparent; }
    30% { box-shadow: 0 0 0 3px var(--accent), 0 0 18px 2px color-mix(in srgb, var(--accent) 40%, transparent); }
}
.journal-found { animation: journalFound 2.1s ease; border-radius: var(--radius); scroll-margin-top: calc(var(--nav-h) + 5rem); }

@media (prefers-reduced-motion: reduce) {
    .journal-found { animation: none; outline: 2px solid var(--accent); }
    .journal-bookmark, .journal-bookmarks, .journal-bookmark-tip,
    .phase-file-card, .partner-parcel-card { transition: none; }
    .journal-bookmark.journal-bookmark-3d { animation: none; }
}

/* ── mobile: stack the spread, bookmarks become a horizontal strip ─────── */
@media (max-width: 760px) {
    /* navbar search is a button on phones: the field squeezed the bar (logo, pro entries, add, account),
       so it drops down UNDER the bar when asked for. Absolute against the sticky .app-nav - top:100% is
       the bar's real bottom edge, whatever its height. */
    .app-nav .journal-toolbar { flex: 0 0 auto; min-width: 0; margin-left: auto; }
    .journal-toolbar-inner { flex-wrap: nowrap; width: auto; }
    .journal-search-toggle { display: inline-flex; }
    .journal-search { display: none; }
    .journal-search.is-expanded {
        display: flex; position: absolute; top: 100%; left: 0; right: 0; z-index: 40;
        padding: .5rem .75rem; background: var(--bg-elev);
        border-bottom: 1px solid var(--line-strong); box-shadow: 0 10px 22px rgba(26, 26, 26, .16);
    }
    .journal-search.is-expanded .journal-search-ico { left: 1.55rem; }
    .journal-search.is-expanded .journal-search-clear { right: 1.25rem; }
    .journal-search.is-expanded .journal-search-input { height: 2.5rem; font-size: 1rem; }
    .journal-search.is-expanded .journal-search-results {
        position: absolute; top: 100%; left: .5rem; right: .5rem; transform: none; width: auto;
        margin-top: .35rem;
    }
    /* The toolbar no longer pushes the account cluster to the edge; they sit together on the right. */
    .app-nav .journal-toolbar ~ .nav-user { margin-left: 0; }
    .journal-add, .journal-add-btn { flex: 0 0 auto; }
    .journal-add-pop { right: 0; left: auto; }

    .journal-spread { flex-direction: column; gap: 0; }
    /* Drop the A4 aspect ratio on phones: in the stacked (column) spread the ratio transfers the
       content-driven HEIGHT into WIDTH, so a tall chapter (e.g. the parcel report) blew the page up
       to several thousand px wide and the whole app scrolled horizontally. max-width pins the flex
       line to the viewport so wide inner widgets reflow instead of stretching the sheet. */
    .journal-page { aspect-ratio: auto; max-width: 100%; padding: 1.25rem 1.1rem 1.75rem 1.6rem; border-radius: var(--radius); }
    .journal-page::before { left: .8rem; }
    /* Same fix for the Home dashboard's hardcover front (its inner keeps the A4 ratio on desktop). */
    .journal-book-cover, .book-cover-inner { max-width: 100%; }
    .book-cover-inner { aspect-ratio: auto; padding: 1.75rem 1.25rem 1.75rem 2rem; }
    .journal-chapter-title { font-size: 1.6rem; }
    .journal-toc-chapter { padding: .7rem .8rem; }

    .journal-bookmarks, .journal-bookmarks.is-open {
        order: -1; position: static; flex-direction: row; flex-wrap: nowrap;
        gap: .4rem; margin: 0 0 .75rem; padding: .25rem 0; overflow-x: auto; -webkit-overflow-scrolling: touch;
        /* Base rule pins align-self:flex-start (edge-tab column); in the stacked spread that keeps the
           strip at max-content width (wider than the phone) instead of scrolling within the viewport. */
        align-self: stretch; min-width: 0; max-width: 100%; width: auto;
    }
    .journal-bookmark, .journal-bookmarks.is-open .journal-bookmark {
        width: auto; flex: 0 0 auto; padding: .45rem .7rem; justify-content: flex-start;
        border-left: 4px solid var(--phase-color, var(--accent)); border-radius: var(--radius); transform: none !important;
    }
    /* No hover on a touch screen, so the strip prints the names: it scrolls sideways, so a long name
       costs nothing but a little scrolling. */
    .journal-bookmark-label, .journal-bookmarks.is-open .journal-bookmark-label { display: block; }
    .journal-bookmark-tip, .journal-rail-toggle { display: none; }
    .journal-bookmark-count, .journal-bookmarks.is-open .journal-bookmark-count { display: none; }
    .journal-bookmark-lock { position: static; margin-left: .15rem; }
    .journal-bookmarks-sep { display: none; }
    /* The corner tab (Lokacijsko poročilo) hangs off the page's top edge - which, in the stacked
       spread, is exactly where the bookmark strip is. Give it a band of its own below the strip
       instead of letting the two share the same row. */
    .journal-spread.has-corner-tab { margin-top: 0; }
    .journal-spread.has-corner-tab .journal-bookmarks { margin-bottom: 2.6rem; }
}

/* ── wider notebook on large screens (the edge bookmarks eat into the width) ── */
@media (min-width: 1100px) {
    .app-main:has(.journal-spread) { max-width: min(1340px, 100%); }
}

/* ── book cover: responsive ────────────────────────────────────────────── */
@media (max-width: 760px) {
    .book-cover-inner { padding: 1.75rem 1.4rem 1.5rem 2.9rem; min-height: 0; gap: 1.25rem; }
    .book-cover-inner::after { inset: .7rem .7rem .7rem 2.4rem; }
    .book-cover-spine { width: 1.7rem; }
    .book-cover-plate { transform: none; }
    .book-cover-plate::before { display: none; }
    .book-cover-meta { gap: 1rem 1.4rem; }
    .book-cover-head-row { gap: 1rem; }
    .book-cover-parcel { flex: 1 1 auto; width: 100%; transform: none; margin: .25rem 0 0; align-self: stretch; }
    .journal-first-page { padding: 1.25rem 1.1rem 1.5rem 1.6rem; }
    .journal-first-page::before { left: .8rem; }
}

/* ── "Datoteke" gallery: just the taped photos + a small icon add button ── */
.phase-gallery { margin-top: 1.5rem; scroll-margin-top: calc(var(--nav-h) + 5rem); }
.phase-gallery:has(.phase-files-grid) { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px dashed var(--line-strong); }
.phase-gallery-add {
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .05rem;
    width: 3.1rem; height: 3.1rem; margin-top: 1rem; color: var(--ink-mute);
    background: var(--bg-elev); border: 1px dashed var(--line-strong); border-radius: var(--radius); cursor: pointer;
    transition: color .15s, border-color .15s;
}
.phase-gallery-add:hover { color: var(--accent); border-color: var(--accent); }
.phase-gallery-add-plus { font-size: .85rem; font-weight: 700; line-height: 1; }
.journal-toc-files .journal-toc-num { background: none; color: var(--phase-color, var(--accent)); }
.phase-drop-overlay-icon { color: var(--accent); }

/* ── whole-page file-drop overlay (drop files anywhere on the notebook) ── */
.phase-drop-overlay { display: none; }
.journal-page.is-file-dragging .phase-drop-overlay {
    display: block; position: absolute; inset: 0; z-index: 30;
    background: color-mix(in srgb, var(--accent) 10%, rgba(246, 246, 246, .5));
    border: 3px dashed var(--accent); border-radius: var(--radius);
}
.phase-drop-overlay-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: copy; }
/* the hint card follows the pointer via --drop-x/--drop-y (fixed → viewport coords) */
.phase-drop-overlay-card {
    position: fixed; left: var(--drop-x, 50%); top: var(--drop-y, 50%);
    transform: translate(-50%, calc(-50% + 1.6rem));
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: .35rem;
    padding: 1rem 1.4rem; max-width: min(90vw, 34rem); pointer-events: none;
    background: rgba(246, 246, 246, .98); border: 1px solid var(--accent); border-radius: var(--radius);
    box-shadow: 0 16px 34px rgba(26, 26, 26, .3);
}
.phase-drop-overlay-icon { color: var(--accent); }
.phase-drop-overlay-title { font-family: var(--font-serif); font-size: 1.8rem; font-weight: 400; color: var(--accent-ink); }
.phase-drop-overlay-why { max-width: 32rem; margin: 0; color: var(--ink-soft); font-size: .9rem; }
.phase-drop-overlay-examples { max-width: 32rem; margin: 0; font-size: .82rem; color: var(--ink-mute); }
.phase-drop-overlay-hint { font-size: .78rem; color: var(--ink-mute); }

/* ═══════════════════ Article CMS (blog) ═══════════════════ */
/* ---- public server-rendered pages (/clanki, /clanki/{slug}) ---- */
.cms-topbar { border-bottom: 1px solid var(--line); background: var(--bg-elev); }
.cms-topbar-inner { max-width: 60rem; margin: 0 auto; padding: .8rem 1.2rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.cms-brand img { height: 30px; display: block; }
.cms-nav { display: flex; gap: 1.2rem; font-size: .9rem; font-weight: 600; }
.cms-nav a { color: var(--ink-soft); text-decoration: none; }
.cms-nav a:hover { color: var(--accent); }
.cms-main { max-width: 62rem; width: 100%; margin: 0 auto; padding: 2.4rem clamp(1.25rem, 4vw, 2rem) 3.5rem; }
.cms-footer { max-width: 60rem; margin: 0 auto; padding: 1.6rem 1.2rem 2.5rem; border-top: 1px solid var(--line); color: var(--ink-mute); font-size: .82rem; display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; justify-content: space-between; }
.cms-footer a { color: var(--ink-soft); }

.cms-list-head { margin-bottom: 1.8rem; }
.cms-list h1 { font-family: var(--font-serif); font-size: 2.2rem; margin: 0 0 .3rem; }
.cms-list-lead { color: var(--ink-soft); margin: 0; }
.cms-empty { color: var(--ink-mute); padding: 2rem 0; }
.cms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1.4rem; }
.cms-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg-elev); text-decoration: none; color: inherit; transition: border-color .12s, box-shadow .12s; }
.cms-card:hover { border-color: var(--line-strong); box-shadow: 0 3px 14px rgba(0,0,0,.06); }
.cms-card-cover { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.cms-card-body { padding: .9rem 1rem 1.1rem; display: flex; flex-direction: column; gap: .35rem; }
.cms-card-body h2,
.cms-card-body h3 { font-family: var(--font-sans); font-size: 1.15rem; margin: 0; line-height: 1.25; }
.cms-card-body p { margin: 0; font-size: .88rem; color: var(--ink-soft); line-height: 1.4; }
.cms-card-body time { font-size: .76rem; color: var(--ink-mute); }

.cms-article-back { margin-bottom: 1rem; font-size: .85rem; color: var(--ink-mute); display: flex; gap: .4rem; flex-wrap: wrap; }
.cms-article-back a { color: var(--ink-soft); text-decoration: none; }
/* "Preberi še" - the internal links that carry a reader (and a crawler) on to the next article. */
.cms-related { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.cms-related h2 { font-family: var(--font-serif); font-size: 1.5rem; margin: 0 0 1.2rem; }
.cms-article-head h1 { font-family: var(--font-serif); font-size: 2.3rem; line-height: 1.15; margin: 0 0 .5rem; }
.cms-article-meta { display: flex; gap: .8rem; color: var(--ink-mute); font-size: .82rem; margin-bottom: 1rem; }
.cms-article-lead { font-size: 1.1rem; color: var(--ink-soft); line-height: 1.5; margin: 0 0 1.4rem; }
.cms-article-cover { width: 100%; border-radius: var(--radius); margin-bottom: 1.6rem; }
/* The body is rendered inside .ql-snow/.ql-editor so Quill content styles apply; strip the editor chrome. */
.cms-article-body.ql-editor { padding: 0; font-size: 1.05rem; line-height: 1.7; color: var(--ink); font-family: var(--font-sans); }
.cms-article-body.ql-editor h2 { font-family: var(--font-serif); font-size: 1.5rem; margin: 1.8rem 0 .6rem; }
.cms-article-body.ql-editor h3 { font-family: var(--font-sans); font-size: 1.2rem; margin: 1.4rem 0 .5rem; }
.cms-article-body.ql-editor p { margin: 0 0 1rem; }
.cms-article-body.ql-editor img { max-width: 100%; height: auto; border-radius: var(--radius); }
.cms-article-body.ql-editor a { color: var(--accent-ink); border-bottom-color: var(--accent); overflow-wrap: anywhere; }
.cms-article-body.ql-editor a:hover { text-decoration-thickness: 2px; }
.cms-article-body.ql-editor blockquote { border-left: 3px solid var(--accent); margin: 1.2rem 0; padding: .2rem 0 .2rem 1rem; color: var(--ink-soft); }

/* ---- admin editor (/admin/clanki) ---- */
.cms-admin-table { width: 100%; }
.cms-admin-slug { font-size: .78rem; color: var(--ink-mute); font-family: var(--font-mono, monospace); }
.cms-admin-actions { display: flex; gap: .4rem; justify-content: flex-end; white-space: nowrap; }
.cms-badge { font-size: .72rem; font-weight: 700; padding: .12rem .5rem; border-radius: var(--radius-pill); }
.cms-badge.is-pub { color: #1f6f54; background: color-mix(in srgb, #1f6f54 14%, transparent); }
.cms-badge.is-draft { color: var(--ink-mute); background: color-mix(in srgb, var(--ink) 8%, transparent); }

.cms-editor { display: grid; grid-template-columns: 1fr 18rem; gap: 1.5rem; align-items: stretch; }
.cms-editor-main { display: flex; flex-direction: column; min-width: 0; }
.cms-editor-side { display: flex; flex-direction: column; gap: 1.2rem; }
.cms-field { display: flex; flex-direction: column; gap: .3rem; margin-bottom: 1.1rem; }
/* The body ("Vsebina") field and its Quill editor grow to fill the main column, so the editor matches the
   sidebar's height (align-items: stretch equalises the two grid columns). */
.cms-field-body { flex: 1; margin-bottom: 0; }
.cms-field > span { font-size: .82rem; font-weight: 600; color: var(--ink-soft); }
.cms-field small { font-weight: 400; color: var(--ink-mute); }
.cms-editor .input { width: 100%; padding: .5rem .6rem; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--bg-elev); font: inherit; color: var(--ink); }
.cms-editor .input:focus { outline: none; border-color: var(--accent); }
.cms-editor-toolbar-extra { display: flex; align-items: center; gap: .6rem; margin-bottom: .3rem; }
.cms-quill { flex: 1; display: flex; flex-direction: column; min-height: 22rem; background: #fff; }
.cms-quill .ql-container { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.cms-quill .ql-editor { flex: 1; min-height: 20rem; font-size: 1rem; }
.cms-editor-footer { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1.4rem; }
.cms-side-block { border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; background: var(--bg-elev); }
.cms-side-title { display: block; font-size: .82rem; font-weight: 700; margin-bottom: .5rem; }
.cms-check { display: flex; align-items: center; gap: .5rem; font-weight: 600; }
.cms-hint { font-size: .76rem; color: var(--ink-mute); margin: .4rem 0 0; }
.cms-cover-preview { width: 100%; border-radius: var(--radius); margin-bottom: .5rem; }
@media (max-width: 760px) { .cms-editor { grid-template-columns: 1fr; } }

/* ---- list layout + keyword filter + end-of-article CTA ---- */
.cms-article { max-width: 44rem; margin: 0 auto; }
.cms-layout { display: grid; grid-template-columns: 1fr 14rem; gap: 2.2rem; align-items: start; }
.cms-main-col { min-width: 0; }
.cms-sidebar { position: sticky; top: 5.5rem; }
.cms-sidebar-title { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-mute); margin-bottom: .6rem; }
.cms-tags { display: flex; flex-wrap: wrap; gap: .4rem; align-items: flex-start; }
.cms-tag { display: inline-flex; align-items: center; padding: .2rem .6rem; border-radius: var(--radius-pill); font-size: .78rem; font-weight: 600; line-height: 1.3; text-decoration: none; color: var(--ink-soft); background: var(--bg-elev); border: 1px solid var(--line); transition: color .12s, border-color .12s; }
.cms-tag:hover { color: var(--accent); border-color: var(--line-strong); }
.cms-tag.is-active { color: #fff; background: var(--accent); border-color: var(--accent); }
.cms-article-tags { margin: 0 0 1rem; }
.cms-filter-active { font-size: .9rem; color: var(--ink-soft); margin: 0 0 1.2rem; }
.cms-filter-active a { color: var(--accent-ink); margin-left: .5rem; }
.cms-article-cta { margin: 2.4rem 0 0; padding: 1.4rem 1.5rem; border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line)); border-radius: var(--radius); background: linear-gradient(135deg, var(--accent-soft), var(--bg-elev)); text-align: center; }
.cms-article-cta p { margin: 0 0 .9rem; font-size: 1.05rem; color: var(--ink); }
.cms-article-cta .btn { text-decoration: none; }
@media (max-width: 720px) { .cms-layout { grid-template-columns: 1fr; } .cms-sidebar { position: static; } }

/* ============================================================================
   THEME SWITCH - small light/dark toggle that lives in the navbar.
   The knob position is driven by data-theme on <html> (set before first paint by
   the inline boot script in the host document), NOT by component state, so it is
   already in the right place on the very first frame. The dark palette itself
   lives in css/dark.css.
   ============================================================================ */
.theme-toggle {
    flex: none; position: relative; display: inline-flex; align-items: center;
    width: 3.1rem; height: 1.7rem; padding: 0 .2rem; margin: 0 .1rem;
    border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
    background: var(--bg-elev); cursor: pointer;
    transition: border-color .15s, background .15s;
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-toggle-ico {
    position: relative; z-index: 1; flex: none;
    width: 1.3rem; height: 1.3rem; display: inline-flex; align-items: center; justify-content: center;
    color: var(--ink-mute); transition: color .15s;
}
.theme-toggle-ico svg { width: 13px; height: 13px; }
.theme-toggle-ico + .theme-toggle-ico { margin-left: auto; }
.theme-toggle-knob {
    position: absolute; top: 50%; left: .2rem; transform: translateY(-50%);
    width: 1.3rem; height: 1.3rem; border-radius: 50%;
    background: var(--accent); box-shadow: 0 1px 3px rgba(26, 26, 26, .35);
    transition: transform .18s ease;
}
/* whichever icon the knob is parked under is the active one */
.theme-toggle-sun { color: #fff; }
[data-theme="dark"] .theme-toggle-knob { transform: translateY(-50%) translateX(calc(1.4rem - 2px)); }
[data-theme="dark"] .theme-toggle-sun { color: var(--ink-mute); }
[data-theme="dark"] .theme-toggle-moon { color: #1a1a1a; }
@media (prefers-reduced-motion: reduce) { .theme-toggle-knob { transition: none; } }

/* Inside the account dropdown the switch is a row: icon + label + the pill, right-aligned. The pill
   is only a picture there - the row itself is the button - so it must not swallow the click. */
.nav-user-menu .nav-theme-item { width: 100%; background: none; text-align: left; cursor: pointer; }
.nav-user-menu .nav-theme-item .theme-toggle-inline { margin-left: auto; pointer-events: none; }
.nav-user-menu .nav-theme-item:hover .theme-toggle-inline { border-color: var(--accent); }

/* ============================================================================
   KAJ JE NOVEGA - release notes, newest release first. One card per version;
   the release the user is running gets the accent rail + badge.
   ============================================================================ */
.wn-list { display: flex; flex-direction: column; gap: 1.1rem; max-width: 52rem; }
.wn-release {
    background: var(--bg-elev); border: 1px solid var(--line); border-left: 3px solid var(--line-strong);
    border-radius: var(--radius); padding: 1.1rem 1.3rem;
}
.wn-release.is-current { border-left-color: var(--accent); }
.wn-release-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: .55rem; margin-bottom: .3rem; }
.wn-version { margin: 0; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.wn-date { color: var(--ink-mute); font-size: .85rem; }
.wn-badge {
    padding: .1rem .5rem; border-radius: var(--radius-pill); font-size: .72rem; font-weight: 600;
    color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent);
}
.wn-section { margin-top: .9rem; }
.wn-section-title {
    margin: 0 0 .35rem; font-size: .78rem; font-weight: 700; letter-spacing: .04em;
    text-transform: uppercase; color: var(--ink-mute);
}
.wn-items { margin: 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: .35rem; }
.wn-items li { font-size: .92rem; line-height: 1.5; color: var(--ink-soft); }
.wn-items strong { color: var(--ink); }

/* ============================================================================
   PHONE IN PORTRAIT: hide the notebook design.
   ----------------------------------------------------------------------------
   The skeuomorphic chrome costs horizontal room a portrait phone doesn't have:
   the page's left inset for the terracotta margin rule, the binding gutter, the
   stack-of-sheets edges, the app-main side padding around the sheet, and the
   leather cover's spine + stitched frame - together 3-4rem that the content
   itself needs. In portrait the page becomes a plain full-bleed surface.
   LANDSCAPE is untouched (the "orientation: portrait" guard): turned sideways
   the phone has the width to spare, so the notebook stays as designed.

   Selectors are doubled (.x.x) because dark.css declares the same properties on
   [data-theme="dark"] .x and loads AFTER app.css - it wins every specificity
   tie, so these overrides must sit one class above it.
   ============================================================================ */
@media (max-width: 760px) and (orientation: portrait) {
    /* full bleed: the sheet takes over the container's side padding too */
    .app-main:has(.journal-spread) { padding-left: 0; padding-right: 0; }

    /* the page itself: no ruled paper, no side border/radius, no sheet stack */
    .journal-spread .journal-page.journal-page,
    .journal-spread .journal-page.journal-page.journal-page-spread,
    .journal-first-page.journal-first-page {
        padding: 1.25rem 1rem 1.5rem;
        background-image: none;
        border-left: none; border-right: none; border-radius: 0;
        box-shadow: none;
        min-height: 0;
    }
    /* margin rule + binding shadow (single page), centre crease + the right
       page's margin rule (landscape spread), margin rule (first page) */
    .journal-page::before, .journal-page::after,
    .journal-page.journal-page-spread::after,
    .journal-first-page::before,
    .journal-spread-rmargin { display: none; }
    .journal-first-page.journal-first-page { margin-top: 1.5rem; border-radius: 0; }

    /* the bookmark strip scrolls edge to edge, but not flush against the glass */
    .journal-bookmarks { padding-left: 1rem; padding-right: 1rem; }
    /* the filing tabs have no page corner left to hang off */
    .phase-corner-tab { right: 1rem; }

    /* the Home cover keeps its leather (the whole plate is light-on-dark text),
       but loses the bound-book hardware: spine, stitched frame inset, rounded
       corners and the cream page block peeking out the fore-edge */
    .journal-book-cover .book-cover-inner.book-cover-inner {
        padding: 1.5rem 1rem 1.5rem; border-radius: 0;
        box-shadow: 0 18px 36px -22px rgba(26, 26, 26, .6), inset 0 0 90px rgba(0, 0, 0, .34);
    }
    .journal-book-cover .book-cover-inner.book-cover-inner::after,
    .book-cover-spine { display: none; }

    /* fullscreen Terminski plan: same treatment - plain sheet, no gutter crease */
    .schedule-page.is-fullscreen { background-image: none; padding-left: 1rem; padding-right: 1rem; }
    .schedule-page.is-fullscreen::after { display: none; }
}

/* ───────────────────────── Čarovnik projektne naloge ─────────────────────────
   The lifestyle-questionnaire flow (/projects/{id}/carovnik) plus its two entry
   points: the offer card at the top of the Projektna naloga chapter and the ✦
   suggestion strip on a task row. Colours come from the theme variables, so dark
   mode needs no separate rules. */

/* the chapter's filing tabs sit in a row now (Čarovnik + Povzetek) */
.phase-corner-tabs {
    position: absolute; right: 2.5rem; bottom: calc(100% - 1px); z-index: 6;
    display: flex; align-items: flex-end; gap: .35rem;
}
.phase-corner-tabs .phase-corner-tab { position: static; }

/* ── offer card on the chapter ── */
.nw-offer {
    display: flex; align-items: center; gap: 1.1rem;
    margin: .25rem 0 2rem; padding: 1.15rem 1.35rem;
    border: 1px solid var(--accent-soft); border-radius: var(--radius));
    background: linear-gradient(180deg, var(--bg-elev), var(--bg));
    box-shadow: 0 1px 2px rgba(26, 26, 26, .05);
}
.nw-offer-art { flex: none; font-size: 2rem; line-height: 1; color: var(--accent); }
.nw-offer-copy { flex: 1 1 auto; min-width: 0; }
.nw-offer-copy h3 { margin: 0 0 .35rem; font-family: var(--font-sans); font-size: 1.15rem; }
.nw-offer-copy p { margin: 0; font-size: .9rem; line-height: 1.5; color: var(--ink-soft); }
/* "enkrat na projekt" - a real constraint, so it belongs in the offer rather than as a surprise later. */
.nw-offer-copy .nw-offer-note { margin-top: .4rem; font-size: .8rem; color: var(--ink-mute); font-style: italic; }

/* (The cover's dialog version of this offer is gone - #869: it is the top bar's .wizard-banner now.) */
.nw-offer-btn { flex: none; white-space: nowrap; }

/* ── the wizard page ── */
.nw { position: relative; max-width: 760px; margin: 0 auto; padding-bottom: 4rem; }
.nw-close {
    position: absolute; top: 1.25rem; right: 0; z-index: 2;
    width: 2.25rem; height: 2.25rem; display: grid; place-items: center; cursor: pointer;
    padding: 0; border: 1px solid var(--line-strong); border-radius: 50%;
    background: var(--bg-elev); color: var(--ink-soft); font: inherit; font-size: 1.35rem; line-height: 1;
    transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.nw-close:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }
.nw-loading { margin-top: 2rem; color: var(--ink-soft); }
.nw-head { margin: 1.5rem 0 1.75rem; }
.nw-head h1 { margin: .35rem 0 .5rem; font-family: var(--font-serif); font-size: 1.9rem; line-height: 1.2; }
.nw-head .intro { margin: 0; color: var(--ink-soft); }
.nw-steps { display: flex; gap: .35rem; margin-top: 1.1rem; }
.nw-step-dot { width: 2.25rem; height: 4px; border-radius: var(--radius); background: var(--line); }
.nw-step-dot.is-done { background: var(--accent-soft); }
.nw-step-dot.is-current { background: var(--accent); }

/* The fill sits a hair away from the page background, so a right-side-only radius was invisible and the
   block read as a square slab. Same shape as the other cards on this screen (hairline all round, accent
   bar on the left), which makes the rounding actually show. */
.nw-explain {
    margin-bottom: 1.75rem; padding: 1rem 1.15rem;
    border: 1px solid var(--line); border-left: 3px solid var(--accent);
    background: var(--bg-elev); border-radius: var(--radius));
}
/* Numbered station of the deep-link arrival: same badge as the two cards above it, and the accent
   bar goes - three cards in a row each with a bar reads as stripes, not as a sequence. Unnumbered (the
   ordinary wizard) it keeps the bar, where it is the only card on the screen. */
.nw-explain.is-step {
    display: flex; gap: .75rem; align-items: flex-start;
    border-left: 1px solid var(--line);
}
.nw-explain-body { min-width: 0; }
.nw-explain-mark {
    flex: none; width: 1.75rem; height: 1.75rem; display: grid; place-items: center;
    border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700;
}
.nw-explain p { margin: 0 0 .5rem; font-size: .92rem; line-height: 1.55; }
.nw-explain p:last-child { margin-bottom: 0; }
.nw-explain-note { color: var(--ink-mute); font-size: .85rem !important; }

/* "Kaj o projektu že vemo" (#869) under the explanation: the facts the run is grounded on without asking - the
   same dt/dd shape as the parcel panel's facts, on plain paper so it reads as a note, not as a second card. */
.nw-known { margin: -.75rem 0 1.75rem; padding: .85rem 1.15rem; border: 1px dashed var(--line-strong); border-radius: var(--radius)); }
.nw-known-title { display: block; font-size: .92rem; }
.nw-known-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: .5rem 1.25rem; margin: .6rem 0 .55rem; }
.nw-known-fact dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-mute); }
.nw-known-fact dd { margin: .15rem 0 0; font-size: .92rem; font-weight: 600; }
.nw-known-note { margin: 0; font-size: .85rem; color: var(--ink-mute); }

.nw-questions { display: flex; flex-direction: column; gap: 1.9rem; }
.nw-q { border: none; margin: 0; padding: 0; }
.nw-q-title { padding: 0; font-family: var(--font-sans); font-size: 1.1rem; font-weight: 600; }
.nw-q-help { margin: .3rem 0 0; font-size: .85rem; color: var(--ink-mute); }
.nw-opts { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }
.nw-opt {
    display: flex; flex-direction: column; gap: .15rem; align-items: flex-start; text-align: left;
    padding: .6rem .9rem; min-width: 6.5rem; cursor: pointer;
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    background: var(--bg-elev); color: var(--ink); font: inherit;
    transition: border-color .12s ease, background .12s ease, transform .12s ease;
}
.nw-opt:hover { border-color: var(--accent); transform: translateY(-1px); }
.nw-opt.is-on { border-color: var(--accent); background: var(--accent-soft); }
.nw-opt-label { font-size: .95rem; font-weight: 600; }
.nw-opt-hint { font-size: .78rem; color: var(--ink-mute); }
.nw-opt.is-on .nw-opt-hint { color: var(--accent-ink); }
.nw-note { width: 100%; margin-top: .8rem; resize: vertical; }

.nw-nav {
    display: flex; align-items: center; gap: .75rem;
    margin-top: 2.25rem; padding-top: 1.25rem; border-top: 1px solid var(--line);
}
.nw-nav-count { margin-left: auto; font-size: .82rem; color: var(--ink-mute); }
.nw-nav-review .btn:last-child { margin-left: auto; }

/* ── run screen ── */
.nw-run { padding: 1.25rem 0; }
.nw-run-bar { height: 6px; border-radius: var(--radius); background: var(--line); overflow: hidden; }
.nw-run-bar-fill { height: 100%; background: var(--accent); transition: width .3s ease; }
.nw-run-label { display: flex; align-items: center; gap: .6rem; margin: 1rem 0 1.25rem; font-size: .95rem; }
.nw-run-count { margin-left: auto; color: var(--ink-mute); font-variant-numeric: tabular-nums; }
.nw-run-found { color: var(--ink-soft); }

/* Every sklop of the run as a big illustrated tile - a minute of waiting gets something to watch,
   and the page has the height to carry it. The art is line work in currentColor, so the tile's state
   (waiting / running / done) tints the whole icon rather than swapping it out. */
.nw-stages {
    list-style: none; margin: 0 0 2rem; padding: 0;
    display: grid; gap: .9rem; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}
.nw-stage {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    padding: 1.25rem 1rem 1rem; border: 1px solid var(--line); border-radius: var(--radius));
    background: var(--bg-elev); color: var(--ink-mute);
    transition: border-color .25s ease, color .25s ease, box-shadow .25s ease, opacity .25s ease;
}
.nw-stage.is-pending { opacity: .5; }
.nw-stage.is-running { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.nw-stage.is-done { border-color: var(--ok-soft); color: var(--ok); opacity: 1; }

.nw-stage-art { position: relative; display: block; width: 100%; max-width: 200px; }
.nw-stage-art .nw-ico { display: block; width: 100%; height: auto; }
.nw-stage-badge {
    position: absolute; right: 4%; bottom: 4%; width: 2rem; height: 2rem;
    display: grid; place-items: center; border-radius: 50%; background: var(--bg-elev);
}
.nw-stage.is-done .nw-stage-badge { background: var(--ok-soft); }
.nw-stage.is-running .nw-stage-badge { background: var(--accent-soft); }
.nw-stage-check { color: var(--ok); font-weight: 700; font-size: 1.05rem; line-height: 1; }

.nw-stage-name { margin-top: .6rem; font-size: .95rem; font-weight: 600; color: var(--ink); }
.nw-stage.is-pending .nw-stage-name { color: var(--ink-soft); }
.nw-stage-note { font-size: .8rem; color: var(--ink-mute); }
.nw-stage.is-running .nw-stage-note { color: var(--accent-ink); font-weight: 600; }
.nw-stage.is-done .nw-stage-note { color: var(--ok); }

/* the running screen carries the tiles, so it gets the full width the wizard's prose doesn't need */
.nw-run { max-width: none; }

/* ── review screen ── */
.nw-review-actions { display: flex; align-items: center; gap: .5rem; margin-bottom: 1.25rem; }
.nw-review-count { margin-left: auto; font-size: .85rem; color: var(--ink-mute); }
.nw-group { margin-bottom: 2rem; }
.nw-group-title {
    display: flex; align-items: baseline; gap: .6rem; margin: 0 0 .75rem;
    padding-bottom: .4rem; border-bottom: 1px dashed var(--line-strong);
    font-family: var(--font-sans); font-size: 1.05rem;
}
.nw-group-all {
    border: none; background: none; padding: 0; cursor: pointer;
    font: inherit; font-size: .78rem; color: var(--ink-mute); text-decoration: underline;
}
.nw-group-all:first-of-type { margin-left: auto; }
.nw-group-all:hover { color: var(--accent); }
.nw-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.nw-row {
    display: flex; gap: .75rem; padding: .7rem .85rem;
    border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev); opacity: .62;
    transition: opacity .12s ease, border-color .12s ease;
}
.nw-row.is-on { opacity: 1; border-color: var(--accent-soft); }
.nw-row-check { flex: none; padding-top: .15rem; }
.nw-row-body { flex: 1 1 auto; min-width: 0; }
.nw-row-task { font-size: .88rem; color: var(--ink-soft); line-height: 1.4; }
.nw-row-answer { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem; margin-top: .4rem; }
.nw-chip {
    padding: .16rem .55rem; border-radius: var(--radius-pill); font-size: .85rem; font-weight: 600;
    background: var(--accent-soft); color: var(--accent-ink);
}
.nw-chip-meta { background: var(--line); color: var(--ink-soft); font-weight: 500; }
.nw-row-desc { font-size: .88rem; line-height: 1.45; }
.nw-row-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .45rem; }
.nw-conf { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.nw-conf-visoka { color: var(--ok); }
.nw-conf-srednja { color: var(--ink-mute); }
.nw-conf-nizka { color: #b5483f; }
.nw-why { font-size: .8rem; color: var(--ink-mute); font-style: italic; }
.nw-answered { font-size: .78rem; color: #b5483f; }

/* ── done screen: straight on to the house ── */
.nw-head-done { text-align: center; margin-top: 3rem; }
.nw-done-mark {
    width: 3.25rem; height: 3.25rem; margin: 0 auto 1rem; display: grid; place-items: center;
    border-radius: 50%; background: var(--ok-soft); color: var(--ok); font-size: 1.6rem;
}
/* The two ways on from a finished run, SIDE BY SIDE, each showing what it leads to. auto-fit means the
   house čarovnik gets two columns and every other set (one card) simply gets one full-width card. */
/* "Pomočnik si je zapomnil N dejstev" on the Done screen: a quiet aside under the headline, not a
   second call to action - the two cards below it are where the user is meant to go next. */
.nw-done-learned {
    margin: .75rem 0 0; font-size: .9rem; color: var(--ink-soft);
}
.nw-done-learned strong { color: var(--accent-ink); }
.nw-done-actions {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 1rem; margin-top: 2rem;
}
.nw-done-card {
    display: flex; flex-direction: column; align-items: stretch; gap: .9rem;
    padding: 1rem 1rem 1.15rem; text-decoration: none;
    border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--bg-elev);
    color: inherit; transition: border-color .12s ease, background .12s ease, transform .12s ease;
}
/* A screenshot of the destination. Fixed aspect so the two cards line up whatever the source images
   are; cover, because a letterboxed thumbnail of a UI screenshot reads as a broken image. */
.nw-done-shot {
    display: block; overflow: hidden; border-radius: var(--radius);
    border: 1px solid var(--line); background: var(--bg); aspect-ratio: 16 / 10;
}
.nw-done-shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
/* The chapter shot is a whole 1280px app window: at card width its text turns to grey mush, so it is
   zoomed into the notebook page itself - the part the card is actually promising. The 3D shot is
   already a close-up and needs none of this. */
.nw-done-shot.is-zoom img { transform: scale(1.3); transform-origin: 52% 36%; }
.nw-done-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.nw-done-card.is-primary { border-color: var(--accent); background: var(--accent-soft); }
.nw-done-card.is-primary .nw-done-copy strong { color: var(--accent-ink); }
.nw-done-card.is-primary .nw-done-copy small { color: var(--accent-ink); opacity: .85; }
.nw-done-copy { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.nw-done-copy strong { font-family: var(--font-sans); font-size: 1.05rem; }
.nw-done-copy small { color: var(--ink-soft); font-size: .85rem; line-height: 1.45; }
/* Every čarovnik but the house one (#870): the answers themselves instead of a screenshot of another chapter, and one
   text card onward. */
.nw-done-card.is-text { flex-direction: row; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.25rem; }
.nw-done-go { flex: none; font-size: 1.4rem; color: var(--accent-ink); }
.nw-done-summary { margin-top: 2rem; text-align: left; }
.nw-done-filters {
    display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 0 0 1.5rem;
    padding: .8rem 1rem; border: 1px solid var(--accent); border-radius: var(--radius); background: var(--accent-soft);
}
.nw-done-filters-lead { font-size: .9rem; font-weight: 600; color: var(--accent-ink); margin-right: .2rem; }
.nw-done-filter, .partner-parcels-preset-chip {
    display: inline-block; padding: .15rem .6rem; border-radius: var(--radius-pill); font-size: .82rem; font-weight: 600;
    background: var(--bg-elev); border: 1px solid var(--line-strong); color: var(--ink);
}
.nw-done-summary-title { font-family: var(--font-sans); font-size: 1rem; font-weight: 600; margin: 0 0 .7rem; }
.nw-done-picks {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .6rem; margin: 0;
}
.nw-done-pick {
    padding: .65rem .85rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev);
    min-width: 0;
}
.nw-done-pick dt { font-size: .78rem; color: var(--ink-mute); line-height: 1.35; }
.nw-done-pick dd { margin: .2rem 0 0; font-size: .92rem; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }

/* The ad browser's starting filters on a project (#870): one line above it, saying what the list was narrowed by. */
.partner-parcels-preset { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 0 0 .9rem; }
.partner-parcels-preset-lead {
    display: inline-flex; align-items: center; gap: .3rem; font-size: .88rem; font-weight: 600; color: var(--accent-ink);
}

/* ── ✦ suggestion markers on a task row ── */
/* The whole card gets a rainbow ring, so an unconfirmed čarovnik task is recognisable at a glance
   whether it's collapsed or expanded (this replaced the inline "✦ predlog" pill). Drawn as a masked
   pseudo-element ring rather than border-image, which ignores border-radius and squares the corners.
   Deliberately NOT animated: the čarovnik can flag ~100 tasks at once. */
.item.is-suggested { position: relative; border-color: transparent; }
.item.is-suggested::before {
    content: ""; position: absolute; inset: -1px; /* covers the now-transparent 1px border */
    border-radius: inherit; padding: 2px; pointer-events: none;
    background: linear-gradient(115deg, #ff6b6b, #ffa94d, #ffd43b, #51cf66, #22b8cf, #5c7cfa, #cc5de8, #ff6b6b);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;          /* Safari spelling of the same op */
            mask-composite: exclude;
}
/* Footer strip: bleeds to the card edges (cancels .item's padding, --item-pad-y / --item-pad-x) so it reads as
   a band under the task rather than another block of its content. It cancelled a fixed 1rem/1.25rem until #633
   slimmed the padding, and the band and its dashed line stuck out past the border (#1161). */
.task-suggested {
    display: flex; align-items: center; flex-wrap: wrap; gap: .6rem;
    margin: .9rem calc(-1 * var(--item-pad-x, .85rem)) calc(-1 * var(--item-pad-y, .55rem));
    padding: .7rem var(--item-pad-x, .85rem);
    border-top: 1px dashed var(--accent); border-radius: 0 0 var(--radius) var(--radius);
    background: var(--accent-soft);
}
.task-suggested-mark { flex: none; color: var(--accent); font-size: 1.05rem; }
.task-suggested-text { flex: 1 1 14rem; min-width: 0; font-size: .85rem; line-height: 1.45; }
/* the leading space is CSS, not markup: Razor drops the whitespace-only node between </strong> and
   this span, which ran the note straight into "Predlog čarovnika." - and an &nbsp; would glue them */
.task-suggested-why { margin-inline-start: .35em; color: var(--ink-soft); font-style: italic; }
/* accept / dismiss as bare glyphs - a two-word decision doesn't need two labelled buttons */
.task-suggested-act {
    flex: none; width: 1.85rem; height: 1.85rem; display: grid; place-items: center; cursor: pointer;
    padding: 0; border: 1px solid var(--line-strong); border-radius: 50%;
    background: var(--bg-elev); color: var(--ink-soft); font: inherit; font-size: 1rem; line-height: 1;
    transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.task-suggested-act:hover { border-color: currentColor; }
.task-suggested-act.is-ok:hover { background: var(--ok-soft); color: var(--ok); }
.task-suggested-act.is-no:hover { background: #f6e2e0; color: #b5483f; }
/* "potrdi in zaključi" - the primary of the three, so it reads as filled rather than outlined. Two ticks
   need a narrower glyph than the single ✓ to keep the same circle. */
.task-suggested-act.is-done {
    background: var(--ok-soft); border-color: var(--ok); color: var(--ok);
    font-size: .8rem; letter-spacing: -.12em; text-indent: -.12em;
}
.task-suggested-act.is-done:hover { background: var(--ok); color: #fff; border-color: var(--ok); }

@media (max-width: 640px) {
    .nw-offer { flex-direction: column; align-items: flex-start; }
    .nw-offer-btn { align-self: stretch; text-align: center; }
    .nw-opt { flex: 1 1 100%; }
    .phase-corner-tabs { right: 1rem; }
}

/* the čarovnik's project step hosts the shared create form on the plain page (no modal chrome) */
.nw-project-form { margin-top: .5rem; }
.nw-project-form .project-modal-body { padding: 0; }
.nw-project-form .project-form-actions { margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }

/* The create form is written in the čarovnik's idiom (.nw-q blocks, .nw-opt cards) because for most
   users it IS the wizard's first screen - but it also runs inside the "Nov projekt" modal, which is
   half the width of a wizard page, so it keeps the stack at a tighter rhythm. */
.project-create-form.nw-questions { gap: 1.5rem; }
.project-create-form .nw-q-title { font-size: 1.05rem; }
/* The project type is the form's one decision (#870): equal tiles in a grid, each a large target with its icon -
   the answer chips beside them were sized for "3-4 osebe". */
.project-type-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .6rem; }
.nw-opt.project-type-opt {
    flex-direction: row; align-items: center; gap: .7rem; min-width: 0; min-height: 4rem;
    padding: .85rem 1rem; border-radius: var(--radius));
}
.project-type-opt .nw-opt-label { font-size: 1rem; line-height: 1.25; }
.project-type-ico {
    flex: none; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%;
    background: var(--bg); color: var(--accent-ink);
}
.project-type-opt.is-on .project-type-ico { background: var(--accent); color: #fff; }
.nw-input { width: 100%; margin-top: .8rem; }
.nw-more-grid { margin-top: .9rem; }
.project-create-form .cover-color-picker { margin-top: .8rem; }
/* the own-vs-acquire cards are an answer to the question above them - same offset as .nw-opts */
.nw-q .project-parcel-choice { margin-top: .8rem; }

/* ── range question: two handles over the question's ordered stops (proračun) ──
   The inputs are transparent and pointer-events:none; only their thumbs take the pointer, so both
   handles are draggable while the visible track + fill below them are ours to style. */
.nw-range { margin-top: .9rem; }
.nw-range-value {
    display: flex; align-items: baseline; gap: .4rem;
    font-family: var(--font-sans); font-size: 1.25rem; min-height: 1.9rem;
}
.nw-range-dash { color: var(--ink-mute); }
/* Untouched (.is-unset) looks exactly like set (#1286): the answer isn't recorded until a handle moves -
   the note under the slider says so - but a grey, half-transparent range read as a disabled control. */
.nw-range-note { margin: .5rem 0 0; font-size: .8rem; color: var(--ink-mute); line-height: 1.45; }
.nw-range-track { position: relative; height: 2.25rem; margin: .25rem 0 .15rem; }
.nw-range-track::before {
    content: ""; position: absolute; left: 0; right: 0; top: 50%;
    height: 6px; margin-top: -3px; border-radius: var(--radius); background: var(--line);
}
.nw-range-fill {
    position: absolute; top: 50%; height: 6px; margin-top: -3px;
    border-radius: var(--radius); background: var(--accent);
}
.nw-range-input {
    position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
    -webkit-appearance: none; appearance: none; background: transparent; pointer-events: none;
}
.nw-range-input:focus { outline: none; }
.nw-range-input::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none; pointer-events: auto; cursor: grab;
    width: 1.35rem; height: 1.35rem; border-radius: 50%;
    border: 2px solid var(--accent); background: var(--bg-elev);
    box-shadow: 0 1px 3px rgba(26, 26, 26, .25);
}
.nw-range-input::-moz-range-thumb {
    pointer-events: auto; cursor: grab;
    width: 1.35rem; height: 1.35rem; border-radius: 50%; box-sizing: border-box;
    border: 2px solid var(--accent); background: var(--bg-elev);
    box-shadow: 0 1px 3px rgba(26, 26, 26, .25);
}
.nw-range-input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--accent-soft); }
.nw-range-input:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 3px var(--accent-soft); }
.nw-range-ends { display: flex; justify-content: space-between; font-size: .78rem; color: var(--ink-mute); }
.nw-range-clear {
    margin-top: .5rem; padding: 0; border: none; background: none; cursor: pointer;
    font: inherit; font-size: .8rem; color: var(--ink-mute); text-decoration: underline;
}
.nw-range-clear:hover { color: var(--accent); }

/* ── the čarovnik's lokacijsko-poročilo step (WizardParcelStep) ──
   Deliberately NOT the full report page: identity of the plot, and just enough of the reading back
   for the user to see we found the right one. */
.nw-parcel { position: relative; }
.nw-parcel-usage { display: flex; justify-content: flex-end; margin-bottom: .5rem; }
.nw-parcel-fields {
    display: grid; grid-template-columns: 1.4fr 1fr auto; gap: .75rem; align-items: end; margin-top: 1rem;
}
.nw-parcel-field { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.nw-parcel-field label { font-size: .8rem; font-weight: 600; color: var(--ink-soft); }
.nw-parcel-field .type-input, .nw-parcel-field .ko-combo { width: 100%; }
.nw-parcel-go { white-space: nowrap; }
.nw-parcel-confirm { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.nw-parcel-found {
    margin-top: 1.25rem; padding: 1rem 1.15rem;
    border: 1px solid var(--ok-soft); border-radius: var(--radius)); background: var(--bg-elev);
}
.nw-parcel-found-head { display: flex; gap: .75rem; align-items: flex-start; }
.nw-parcel-found-mark {
    flex: none; width: 1.75rem; height: 1.75rem; display: grid; place-items: center;
    border-radius: 50%; background: var(--ok-soft); color: var(--ok); font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.nw-parcel-found-head strong { display: block; font-family: var(--font-sans); font-size: 1.05rem; }
.nw-parcel-found-head small { color: var(--ink-soft); font-size: .85rem; line-height: 1.45; }
.nw-parcel-facts {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
    gap: .75rem 1.25rem; margin: 1rem 0 0;
}
.nw-parcel-fact dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-mute); }
.nw-parcel-fact dd { margin: .15rem 0 0; font-size: .92rem; }

/* ── čarovnik obnove (#930): typed inputs, "iz GURS", the building step's parts, the facts on the review ── */
.nw-num { display: inline-flex; align-items: center; gap: .45rem; margin-top: .8rem; max-width: 100%; }
.nw-num-input { width: 9rem; max-width: 100%; min-width: 0; text-align: right; font-variant-numeric: tabular-nums; }
.nw-num-unit { flex: none; font-size: .9rem; color: var(--ink-soft); }
.nw-num.is-invalid .nw-num-input { border-color: #b5483f; }
.nw-q-error { display: block; margin-top: .35rem; font-size: .82rem; color: #b5483f; }
.nw-num-row { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; margin-top: .5rem; }
.nw-num-cell { display: flex; flex-direction: column; min-width: 0; max-width: 100%; }
.nw-num-cell .nw-num { margin-top: .3rem; }
.nw-num-label { font-size: .82rem; font-weight: 600; color: var(--ink-soft); }
.nw-short, .nw-other { display: block; width: 100%; max-width: 32rem; margin-top: .8rem; box-sizing: border-box; }
.nw-month { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }
.nw-month select { width: auto; min-width: 8rem; max-width: 100%; }
.nw-gurs {
    display: inline-block; margin-left: .45rem; padding: .1rem .45rem; border-radius: var(--radius);
    font-family: var(--font-sans); font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    vertical-align: middle; background: var(--ok-soft); color: var(--ok);
}
/* the building step: a flat picks its own part of the building from a list that scrolls on its own */
.nw-parts { margin-top: 1.25rem; }
.nw-parts-title { display: block; font-family: var(--font-sans); font-size: 1rem; margin-bottom: .6rem; }
.nw-parts-list {
    list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem;
    max-height: 22rem; overflow-y: auto; overscroll-behavior: contain;
}
.nw-part {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .75rem; width: 100%; min-height: 44px;
    padding: .6rem .85rem; text-align: left; cursor: pointer; box-sizing: border-box;
    border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--bg-elev); color: var(--ink); font: inherit;
}
.nw-part:hover { border-color: var(--accent); }
.nw-part-no { font-weight: 700; }
.nw-part-meta { font-size: .85rem; color: var(--ink-soft); min-width: 0; overflow-wrap: anywhere; }
.nw-parts-none { margin-top: .6rem; }
.nw-parts-empty, .nw-building-note { margin: .75rem 0 0; font-size: .9rem; color: var(--ink-soft); }
/* review: the user's own data is listed, not offered - full strength, no checkbox */
.nw-facts .nw-row { opacity: 1; }
.nw-facts-note { margin: -.3rem 0 .75rem; font-size: .85rem; color: var(--ink-mute); }
.nw-fact-phase {
    margin-left: .35rem; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-mute);
}
@media (max-width: 480px) {
    .nw-num-input { width: 7.5rem; }
    .nw-month select { flex: 1 1 8rem; }
}

/* Deep link from a Lokacija report: the same "we read your parcel" panel, but on the questions screen,
   where it is a preamble to the first step rather than the result of the one before it - so the air
   goes under it, not over it. */
.nw-invited-parcel { margin: .25rem 0 1.5rem; }

/* The assistant's automatic reading of the OPN, directly under the parcel panel it belongs to: same
   card, accent instead of the "found" green, so it reads as the second half of one hand-over rather
   than a widget that wandered in. */
.nw-invited-ai {
    margin: 0 0 1.75rem; padding: 1rem 1.15rem;
    border: 1px solid var(--line);
    border-radius: var(--radius)); background: var(--bg-elev);
}
/* The AI mark moved out of the badge (which now numbers the station) and in front of the title, so the
   card still says "this was written by the Pomočnik" at a glance. */
.nw-ai-spark { color: var(--accent-ink); margin-right: .15rem; }
.nw-invited-ai-head { display: flex; gap: .75rem; align-items: flex-start; }
.nw-invited-ai-mark {
    flex: none; width: 1.75rem; height: 1.75rem; display: grid; place-items: center;
    border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink);
    font-weight: 700; font-variant-numeric: tabular-nums;
}
.nw-invited-ai-head strong { display: block; font-family: var(--font-sans); font-size: 1.05rem; }
.nw-invited-ai-head small { color: var(--ink-soft); font-size: .82rem; line-height: 1.45; }
.nw-invited-ai .ai-advice-loading, .nw-invited-ai .ai-advice-error { margin-top: .9rem; }
/* ONE accent rule per card. .parcel-rule-summary carries its own accent bar (it is a callout on the
   report page); inside this card that lands a few px from the card's own bar and the pair reads as a
   rendering fault, so here the answer is plain text in the card. */
.nw-invited-ai .parcel-rule-summary {
    margin-top: .9rem; border-left: none; padding-left: 0; font-size: .9rem;
}
.nw-invited-ai-more {
    display: inline-block; margin-top: .75rem; font-size: .85rem;
    color: var(--accent-ink); border-bottom-color: currentColor;
}

/* The lookup takes over the screen (the inline spinner under a tall map went unnoticed). Fixed, not
   absolute: the step scrolls, and the loader must stay in front of the reader wherever they are.
   The card itself is the report page's .parcel-loader, so both places read the same. */
.nw-parcel-loading {
    position: fixed; inset: 0; z-index: 9999;
    display: grid; place-items: center; padding: 1.5rem;
    background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(4px);
}
.nw-parcel-loading-card {
    margin-top: 0; width: 100%; max-width: 28rem;
    background: var(--bg-elev); border-left: 3px solid var(--accent);
    padding: 1.5rem 1.6rem; box-shadow: 0 16px 48px rgba(26, 26, 26, .18);
}
.nw-parcel-loading-card .parcel-loader-title { font-size: 1.05rem; font-family: var(--font-sans); }

@media (max-width: 560px) {
    .nw-parcel-fields { grid-template-columns: 1fr; }
}

/* "Ustvari 3D model": the modal becomes a loader until the house is standing on the plot */
.p3d-ai-building { text-align: center; padding: 2.5rem 1rem 2rem; }
.p3d-ai-building h2 { margin: 1.25rem 0 .5rem; font-family: var(--font-serif); font-size: 1.3rem; }
.p3d-ai-building p { margin: 0 auto; max-width: 34rem; color: var(--ink-soft); font-size: .92rem; line-height: 1.55; }
.p3d-ai-building-hint { margin-top: .75rem !important; color: var(--ink-mute) !important; font-size: .82rem !important; }
.p3d-ai-building-spin {
    width: 3rem; height: 3rem; margin: 0 auto; border-radius: 50%;
    border: 3px solid var(--line); border-top-color: var(--accent);
    animation: p3d-ai-spin .9s linear infinite;
}
@keyframes p3d-ai-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .p3d-ai-building-spin { animation-duration: 2.4s; } }


/* ── the shared create form, wearing the čarovnik's clothes (step 1 of the merged flow) ── */
.nw-project-form .project-field > span {
    font-family: var(--font-sans); font-size: 1.1rem; font-weight: 600; color: var(--ink);
}
.nw-project-form .project-form-grid { gap: 1.5rem; }
.nw-project-form .type-input { padding: .6rem .75rem; font-size: 1rem; }
.nw-project-form .project-parcel-choice { gap: .5rem; margin-bottom: 1.9rem; }
.nw-project-form .parcel-choice-card {
    border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--bg-elev);
    transition: border-color .12s ease, background .12s ease, transform .12s ease;
}
.nw-project-form .parcel-choice-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.nw-project-form .parcel-choice-card.is-selected {
    border-color: var(--accent); background: var(--accent-soft); box-shadow: none;
}
.nw-project-form .parcel-choice-title { font-size: .95rem; font-weight: 600; }
.nw-project-form .parcel-choice-desc { font-size: .78rem; }
.nw-project-form .project-more-toggle { font-size: .85rem; }
.nw-project-form .project-form-actions .btn { padding: .6rem 1.4rem; font-size: .95rem; }

/* ══════════════════════════════════════════════════════════════════════════
   Dokumentacija (public showcase, /dokumentacija) + Navodila (manual, /navodila)
   The public page wears the landing's chrome (.lp / .lp-header / .lp-final), so only
   the doc-specific pieces live here. Everything is token-based, so the dark theme follows.
   ══════════════════════════════════════════════════════════════════════════ */

/* the nav link of the page that is currently open */
.lp-nav-jump.is-current { color: var(--ink); font-weight: 600; }

/* ---------- public: hero ---------- */
.docs-hero {
    max-width: var(--max); margin: 0 auto;
    padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.25rem, 4vw, 4rem) clamp(1.5rem, 3vw, 2.5rem);
    text-align: center;
}
.docs-hero .lp-eyebrow { margin-bottom: .75rem; }
.docs-hero-title { font-family: var(--font-serif); font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.05; margin: 0; }
.docs-hero-lead { margin: 1.1rem auto 0; max-width: 44rem; color: var(--ink-soft); font-size: 1.05rem; line-height: 1.6; }
.docs-hero .lp-hero-actions { justify-content: center; }

/* ---------- public: the three paths (#866) - gradnja / nakup / obnova as tabs ---------- */
.docs-paths {
    max-width: var(--max); margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 4rem);
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem;
}
@media (max-width: 720px) { .docs-paths { grid-template-columns: 1fr; } }
.docs-path {
    display: flex; gap: .8rem; align-items: center; min-width: 0; min-height: 44px;
    padding: .85rem 1rem; text-align: left; font: inherit; color: var(--ink); cursor: pointer;
    border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.docs-path:hover { border-color: var(--line-strong); }
.docs-path.is-on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.docs-path:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.docs-path-ico {
    flex: 0 0 auto; width: 2.5rem; height: 2.5rem; border-radius: var(--radius);
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--line); color: var(--ink-soft);
}
.docs-path.is-on .docs-path-ico { background: var(--accent-soft); color: var(--accent-ink); }
.docs-path-body { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.docs-path-body strong { font-size: .98rem; }
.docs-path-body span { font-size: .82rem; color: var(--ink-mute); }

/* Nakup and Obnova: capability cards instead of screenshot blocks (no figures of those flows yet). */
.docs-cards {
    max-width: var(--max); margin: 0 auto;
    padding: 0 clamp(1.25rem, 4vw, 4rem) clamp(2.5rem, 5vw, 4rem);
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem;
}
@media (max-width: 880px) { .docs-cards { grid-template-columns: 1fr; } }
.docs-card { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev); padding: 1.5rem 1.6rem; }
.docs-card h3 { font-family: var(--font-serif); font-size: 1.35rem; line-height: 1.15; margin: 0; }
.docs-card > p { margin: .6rem 0 0; color: var(--ink-soft); font-size: .95rem; line-height: 1.55; }
.docs-card .docs-points { margin-top: 1rem; }

/* ---------- public: the 8 phases ---------- */
.docs-journey, .docs-plans, .docs-faq {
    max-width: var(--max); margin: 0 auto; padding: clamp(2.5rem, 5vw, 4rem) clamp(1.25rem, 4vw, 4rem);
}
/* The plans are a link target (»Naročnina«, /na-kratko, the printed »glog.si/#paketi«, #1167): land with the
   heading clear of the sticky header, whose height the section's own top padding does not quite cover. */
.docs-plans { scroll-margin-top: 2rem; }
.docs-phases { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
@media (max-width: 720px) { .docs-phases { grid-template-columns: 1fr; } }
.docs-phases li {
    display: flex; gap: .85rem; align-items: flex-start;
    border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev); padding: .85rem 1rem;
}
.docs-phase-num {
    flex: 0 0 auto; width: 1.7rem; height: 1.7rem; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--accent-soft); color: var(--accent-ink);
    font-family: var(--font-sans); font-weight: 700; font-size: .9rem;
}
.docs-phase-body { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.docs-phase-body strong { font-size: .95rem; }
.docs-phase-body span { color: var(--ink-soft); font-size: .87rem; line-height: 1.45; }

/* ---------- public: capability blocks ---------- */
.docs-block {
    max-width: var(--max); margin: 0 auto;
    padding: clamp(2rem, 4.5vw, 3.5rem) clamp(1.25rem, 4vw, 4rem);
    display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(1.75rem, 4vw, 3.5rem); align-items: center;
}
.docs-block.is-flipped .docs-block-copy { order: 2; }
.docs-block.is-flipped .docs-shot { order: 1; }
@media (max-width: 880px) {
    .docs-block { grid-template-columns: 1fr; }
    .docs-block.is-flipped .docs-block-copy, .docs-block.is-flipped .docs-shot { order: initial; }
}
.docs-block h2 { font-family: var(--font-serif); font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.12; }
.docs-block-copy > p { margin: 1rem 0 0; color: var(--ink-soft); font-size: 1rem; line-height: 1.6; }
.docs-points { list-style: none; margin: 1.25rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.docs-points li { display: flex; gap: .55rem; align-items: flex-start; font-size: .93rem; line-height: 1.45; }
.docs-points .icon { color: var(--ok); flex: 0 0 auto; margin-top: .15rem; }
.docs-plan {
    display: inline-flex; align-items: center; gap: .4rem; margin: 1.25rem 0 0;
    font-size: .82rem; color: var(--ink-mute);
}

/* screenshot frame - shared by both docs pages */
.docs-shot, .man-shot { margin: 0; }
/* A block may carry two screenshots (e.g. the scene AND the panel that drives it): they stack in
   the figure column and keep the block's two-column rhythm. */
.docs-shots { display: grid; gap: 1.25rem; min-width: 0; }
.docs-block.is-flipped .docs-shots { order: 1; }
/* A screenshot that failed to load marks its <img hidden> (see the onerror in Docs/Navodila): drop the
   whole figure, caption included, so the section reads as if it never had one. The figure itself is
   Blazor-owned, so it is hidden here rather than removed from the DOM. */
.docs-shot:has(img[hidden]), .man-shot:has(img[hidden]) { display: none; }
.docs-shot img[hidden] ~ figcaption, .man-shot img[hidden] ~ figcaption { display: none; }
.docs-shot img, .man-shot img {
    display: block; width: 100%; height: auto;
    border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--bg-elev);
    box-shadow: 0 12px 30px rgba(26, 26, 26, .12);
}
.docs-shot figcaption, .man-shot figcaption {
    margin-top: .55rem; font-size: .8rem; color: var(--ink-mute); text-align: center;
}

/* ---------- public: plan notes + FAQ (the plan table is Naročnina's .sub-compare, #1370) ---------- */
.docs-note { margin: 1.5rem auto 0; max-width: 46rem; text-align: center; font-size: .88rem; color: var(--ink-mute); line-height: 1.55; }

.docs-faq-list { max-width: 46rem; margin: 0 auto; display: flex; flex-direction: column; gap: .5rem; }
.docs-faq-item { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev); padding: .85rem 1rem; }
.docs-faq-item summary { cursor: pointer; font-weight: 600; font-size: .95rem; list-style: none; }
.docs-faq-item summary::-webkit-details-marker { display: none; }
.docs-faq-item summary::before { content: "+"; color: var(--accent); margin-right: .5rem; font-weight: 400; }
.docs-faq-item[open] summary::before { content: "\2212"; }
.docs-faq-item p { margin: .65rem 0 0; color: var(--ink-soft); font-size: .92rem; line-height: 1.6; }

/* ══════════ Navodila (private manual) ══════════ */
.man { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 2rem; align-items: start; margin-top: 1.5rem; }
@media (max-width: 860px) { .man { grid-template-columns: 1fr; gap: 1.25rem; } }

.man-side { position: sticky; top: 5.5rem; display: flex; flex-direction: column; gap: .75rem; }
@media (max-width: 860px) { .man-side { position: static; } }

.man-search { display: flex; align-items: center; gap: .45rem; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--bg-elev); padding: .35rem .6rem; }
.man-search .icon { color: var(--ink-mute); flex: 0 0 auto; }
.man-search input { flex: 1; min-width: 0; border: none; background: none; font: inherit; font-size: .88rem; color: var(--ink); outline: none; }

.man-nav { display: flex; flex-direction: column; gap: .1rem; max-height: calc(100vh - 12rem); overflow-y: auto; }
@media (max-width: 860px) { .man-nav { max-height: none; } }
.man-nav-group { margin: .9rem 0 .25rem; font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-mute); font-weight: 700; }
.man-nav-item, .man-nav-home {
    display: block; padding: .35rem .55rem; border-radius: var(--radius); border-bottom: none;
    font-size: .9rem; color: var(--ink-soft); line-height: 1.35;
}
.man-nav-item:hover, .man-nav-home:hover { background: var(--bg-elev); color: var(--ink); border-bottom: none; }
.man-nav-item.active, .man-nav-home.active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.man-nav-home { font-weight: 600; color: var(--ink); }
.man-nav-empty { margin: .75rem .55rem; font-size: .85rem; color: var(--ink-mute); }

.man-body { min-width: 0; }
.man-article { max-width: 46rem; }
.man-article h2 { font-family: var(--font-serif); font-size: 1.75rem; line-height: 1.15; margin: 0 0 .5rem; }
.man-article h3 { font-family: var(--font-sans); font-size: 1.15rem; margin: 2rem 0 .6rem; }
.man-article h4 { font-family: var(--font-sans); font-size: 1rem; margin: 1.35rem 0 .4rem; }
/* Keyboard keys read as keys, not as code: the manual names a lot of shortcuts (Q/E, Ctrl+Z, Esc). */
.man-article kbd {
    font: 600 .78em/1 var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
    padding: .12em .38em; border: 1px solid var(--line-strong); border-bottom-width: 2px;
    border-radius: var(--radius); background: var(--bg-elev); color: var(--ink); white-space: nowrap;
}
.man-lead { margin: 0 0 1.25rem; color: var(--ink-soft); font-size: 1rem; line-height: 1.6; }
.man-article p { line-height: 1.65; }
.man-steps, .man-list { margin: .5rem 0 0; padding-left: 1.3rem; display: flex; flex-direction: column; gap: .45rem; }
.man-steps li, .man-list li { line-height: 1.55; font-size: .95rem; }
.man-list { list-style: disc; }
.man-small { margin-top: 1.25rem; font-size: .87rem; color: var(--ink-mute); }

.man-note {
    margin: 1.5rem 0 0; padding: .8rem 1rem; border-left: 3px solid var(--accent);
    background: var(--bg-elev); border-radius: 0 var(--radius) var(--radius) 0; font-size: .9rem; line-height: 1.6; color: var(--ink-soft);
}
.man-note strong { color: var(--ink); }
.man-plan {
    display: inline-block; margin-right: .35rem; padding: .05rem .45rem; border-radius: var(--radius-pill);
    background: var(--accent-soft); color: var(--accent-ink); font-size: .72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em; vertical-align: .05rem;
}
.man-shot { margin: 1.5rem 0 0; }

.man-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .6rem; margin-top: .5rem; }
.man-card {
    display: flex; flex-direction: column; gap: .2rem; padding: .8rem .9rem;
    border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev);
    color: var(--ink); transition: border-color .12s, transform .12s;
}
.man-card:hover { border-color: var(--accent); transform: translateY(-1px); }
/* The kazalo is 18 cards deep: an icon per section gives the eye a shape to aim at before it reads
   the title. The chip carries the colour so the title stays plain text. */
.man-card-head { display: flex; align-items: center; gap: .55rem; min-width: 0; }
.man-card-ico {
    flex: none; width: 1.8rem; height: 1.8rem; display: grid; place-items: center;
    border-radius: var(--radius); background: var(--accent-soft); color: var(--accent-ink);
    transition: background .12s, color .12s;
}
.man-card:hover .man-card-ico { background: var(--accent); color: #fff; }
.man-card strong { font-size: .95rem; }
.man-card span { font-size: .84rem; color: var(--ink-soft); line-height: 1.45; }

.man-pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.man-pager-link { font-size: .9rem; color: var(--accent-ink); }
.man-pager-next { margin-left: auto; text-align: right; }

/* ── Prvoosebni pogled: the walk HUD (controls + vidni kot), pinned to the bottom of the canvas.
   Deliberately quiet - it sits over the view the user is composing, so it stays out of the middle
   and dims until hovered. pointer-events on the bar only, so the canvas keeps every drag. ── */
.p3d-walkbar {
    position: absolute; left: 50%; bottom: .7rem; transform: translateX(-50%);
    z-index: 6; max-width: min(92%, 62rem);
    display: flex; align-items: center; justify-content: center; gap: .5rem 1.1rem; flex-wrap: wrap;
    padding: .45rem .85rem; border-radius: var(--radius-pill);
    background: rgba(18, 22, 28, .74); border: 1px solid rgba(255, 255, 255, .14);
    box-shadow: 0 6px 22px rgba(0, 0, 0, .35); backdrop-filter: blur(6px);
    color: #dbe3ea; font-size: .74rem; line-height: 1.2;
    opacity: .72; transition: opacity .15s ease;
}
.p3d-walkbar:hover, .p3d-walkbar:focus-within { opacity: 1; }
.p3d-walkbar-keys { display: flex; align-items: center; gap: .2rem .85rem; flex-wrap: wrap; }
.p3d-walkbar-keys span { display: inline-flex; align-items: center; gap: .25rem; white-space: nowrap; }
.p3d-walkbar kbd {
    display: inline-block; min-width: 1.15rem; padding: .05rem .28rem; text-align: center;
    font: inherit; font-size: .7rem; color: #fff;
    background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .22);
    border-radius: var(--radius);
}
.p3d-walkbar-fov {
    display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; cursor: pointer;
    padding-left: .9rem; border-left: 1px solid rgba(255, 255, 255, .16);
}
.p3d-walkbar-fov input[type="range"] { width: 7.5rem; accent-color: #2f7de0; margin: 0; }
.p3d-walkbar-fov b { color: #fff; font-variant-numeric: tabular-nums; min-width: 2.4rem; }
@media (max-width: 720px) {
    .p3d-walkbar { font-size: .68rem; gap: .35rem .7rem; padding: .4rem .6rem; border-radius: var(--radius); }
    .p3d-walkbar-fov { padding-left: 0; border-left: 0; }
    .p3d-walkbar-fov input[type="range"] { width: 6rem; }
}

/* ============================================================================
   UČILNICA — explanatory animations inside Hiša v 3D (UcilnicaModal.razor),
   behind Features:Plan3dUcilnica. Topic list: docs/plan3d-ucilnica-animacije.md.

   Two rules run through this block:
   1. Everything structural takes THEME TOKENS (--ink, --line, --bg-elev), so the
      diagrams survive dark mode. The only literal colours are the TEMPERATURE
      scale (blue to ochre), which is a legend and must mean the same thing in
      both themes - those are computed in C# (TempColor) and arrive as inline
      fills, deliberately not overridden below.
   2. Every animation is decoration over a picture that already reads frozen, so
      the reduced-motion block at the end can simply stop all of them.
   ============================================================================ */
.p3d-uc-modal {
    max-width: 60rem; max-height: 92vh; display: flex; flex-direction: column;
    padding: 1.1rem 1.25rem 1rem;
}
.p3d-uc-head { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: .6rem; }
.p3d-uc-head h2 { flex: 1; font-size: 1.3rem; }
.p3d-uc-x {
    flex: none; background: none; border: 0; cursor: pointer; font-size: 1.1rem; line-height: 1;
    color: var(--ink-mute); padding: .2rem .3rem; border-radius: var(--radius);
}
.p3d-uc-x:hover { color: var(--ink); background: var(--line); }

/* -- stepper -- */
.p3d-uc-steps { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .9rem; }
.p3d-uc-step {
    display: inline-flex; align-items: center; gap: .45rem; cursor: pointer;
    padding: .35rem .7rem .35rem .4rem; font: inherit; font-size: .84rem; color: var(--ink-soft);
    background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-pill);
}
.p3d-uc-step:hover { border-color: var(--line-strong); color: var(--ink); }
.p3d-uc-step.is-on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.p3d-uc-stepn {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 1.35rem; height: 1.35rem; border-radius: 50%; font-size: .74rem; font-weight: 700;
    background: var(--bg-elev); border: 1px solid var(--line-strong); color: var(--ink-soft);
}
.p3d-uc-step.is-on .p3d-uc-stepn { background: var(--accent); border-color: var(--accent); color: #fff; }

.p3d-uc-body { flex: 1; overflow-y: auto; min-height: 0; padding-right: .2rem; }

/* -- prose -- */
.p3d-uc-lead { margin: 0 0 .9rem; color: var(--ink-soft); line-height: 1.55; }
.p3d-uc-warn { color: var(--accent-ink); }
.p3d-uc-punch {
    margin: .9rem 0 0; padding: .7rem .9rem; line-height: 1.5;
    background: var(--bg); border-left: 3px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0;
}
.p3d-uc-note { margin: .5rem 0 0; font-size: .85rem; color: var(--ink-soft); line-height: 1.5; }
.p3d-uc-sec { margin-top: 1.1rem; }
.p3d-uc-sec h4 { margin: 0 0 .3rem; font-size: .95rem; }
.p3d-uc-list { margin: .4rem 0 0; padding-left: 1.1rem; font-size: .87rem; color: var(--ink-soft); line-height: 1.55; }
.p3d-uc-list li { margin-bottom: .35rem; }

/* -- the drawings -- */
.p3d-uc-svg { display: block; width: 100%; height: auto; }
.p3d-uc-pipe { fill: none; stroke-width: 7; stroke-linecap: round; }
.p3d-uc-pipe.is-cool { stroke: #7fa8d8; }   /* cold liquid, straight after the expansion valve */
.p3d-uc-pipe.is-cold { stroke: #3a609e; }   /* cold gas, on its way to the compressor */
.p3d-uc-pipe.is-hot  { stroke: #c4402a; }   /* hot gas, straight after the compressor */
.p3d-uc-pipe.is-warm { stroke: #d98b4a; }   /* warm liquid, having given its heat to the house */

.p3d-uc-arrow { fill: none; stroke-width: 2.4; }
.p3d-uc-arrow.is-cold { stroke: #3a609e; }
.p3d-uc-arrow.is-hot { stroke: #c4402a; }
.p3d-uc-ahf.is-cold { fill: #3a609e; }
.p3d-uc-ahf.is-hot { fill: #c4402a; }

.p3d-uc-lbl { font-size: 14px; font-weight: 600; fill: var(--ink); }
.p3d-uc-sub { font-size: 11px; fill: var(--ink-mute); }
.p3d-uc-comp rect { fill: var(--bg-elev); stroke: var(--line-strong); stroke-width: 1.5; }
.p3d-uc-comp.is-drive rect { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 2; }
/* The four components sit ON the pipe loop, so they need to lift off it - a soft drop shadow reads as
   "these are the machines, that is the plumbing" without another colour in the picture. */
.p3d-uc-circuit .p3d-uc-comp rect { filter: drop-shadow(0 2px 3px rgba(30, 22, 10, .22)); }

/* What the refrigerant is on each run of the loop. */
.p3d-uc-stt { font-size: 10px; font-weight: 700; letter-spacing: .02em; text-anchor: middle; }
.p3d-uc-stt.is-cool { fill: #6f95c4; }
.p3d-uc-stt.is-cold { fill: #3a609e; }
.p3d-uc-stt.is-hot { fill: #c4402a; }
.p3d-uc-stt.is-warm { fill: #b0703a; }
.p3d-uc-arrow.is-power { stroke: var(--accent); stroke-width: 3; }
.p3d-uc-ahf.is-power { fill: var(--accent); }

/* Glyphs inside the four machines, and the source/house icons at the ends. They answer "where does
   this happen" - the captions alone told the reader what happens, never where. */
.p3d-uc-glyph { pointer-events: none; }
.p3d-uc-gl-line { fill: none; stroke: var(--ink-mute); stroke-width: 2; stroke-linecap: round; }
.p3d-uc-gl-line.is-cold { stroke: #3a609e; }
.p3d-uc-gl-line.is-hot { stroke: #c4402a; }
.p3d-uc-gl-line.is-drive { stroke: var(--accent); stroke-width: 2.6; }
.p3d-uc-gl-bub { fill: none; stroke: #3a609e; stroke-width: 1.8; }
.p3d-uc-gl-drop { fill: #c4402a; opacity: .8; }
.p3d-uc-gl-bolt { fill: var(--accent); }
.p3d-uc-gl-arr { fill: none; stroke: var(--accent); stroke-width: 2.2; }
.p3d-uc-gl-valve { fill: none; stroke: var(--ink-soft); stroke-width: 2; stroke-linejoin: round; }
.p3d-uc-gl-earth { fill: #8a8a8a; }
.p3d-uc-gl-pipe { fill: none; stroke: #cfe0f2; stroke-width: 2.2; stroke-linecap: round; }
.p3d-uc-gl-unit { fill: var(--bg-elev); stroke: var(--line-strong); stroke-width: 1.5; }
.p3d-uc-gl-fan { fill: none; stroke: var(--ink-mute); stroke-width: 1.5; }
.p3d-uc-gl-blade { stroke: #3a609e; stroke-width: 2; stroke-linecap: round; }
.p3d-uc-gl-house { fill: none; stroke: var(--ink-soft); stroke-width: 2.2; stroke-linejoin: round; }
.p3d-uc-gl-water { fill: #4d8fd6; opacity: .55; }
.p3d-uc-gl-wave { fill: none; stroke: #cfe0f2; stroke-width: 1.6; }
.p3d-uc-gl-pump { fill: #cfe0f2; }
.p3d-uc-gl-door { fill: var(--ink-soft); }
.p3d-uc-ct { font-size: 12.5px; font-weight: 600; fill: var(--ink); text-anchor: middle; }
.p3d-uc-cs { font-size: 9.5px; fill: var(--ink-mute); text-anchor: middle; }
.p3d-uc-flow circle { fill: var(--ink); opacity: .55; }

/* source / flow-temperature pickers */
.p3d-uc-srcpick, .p3d-uc-flowpick {
    display: flex; align-items: center; flex-wrap: wrap; gap: .5rem;
    margin-top: .9rem; font-size: .87rem; color: var(--ink-soft);
}

/* -- month scrubber -- */
.p3d-uc-scrub { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-bottom: .8rem; }
.p3d-uc-scrub-r { display: flex; align-items: center; gap: .6rem; flex: 1; min-width: 14rem; font-size: .87rem; }
.p3d-uc-scrub-r input[type="range"] { flex: 1; min-width: 8rem; accent-color: var(--accent); }
.p3d-uc-scrub-r b { min-width: 5.5rem; display: inline-block; }

/* -- the two cross-sections -- */
.p3d-uc-pair { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
.p3d-uc-col { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem; background: var(--bg-elev); }
.p3d-uc-colh { display: flex; align-items: center; gap: .4rem; font-size: .95rem; margin: 0 0 .5rem; }

.p3d-uc-sky { fill: #cfe0f0; }
.p3d-uc-earth { fill: #5b5b5b; }
.p3d-uc-hs { fill: var(--bg-elev); stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; }
.p3d-uc-tube { fill: none; stroke: var(--ink-soft); stroke-width: 2.4; stroke-linecap: round; }
.p3d-uc-surface { stroke: var(--ink); stroke-width: 1.6; }
.p3d-uc-probe { fill: none; stroke: #2b2b2b; stroke-width: 3; }
.p3d-uc-ax { font-size: 10px; fill: var(--ink-mute); }
.p3d-uc-tick { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 3; opacity: .55; }
.p3d-uc-tick.is-key { stroke-dasharray: none; stroke-width: 1.8; opacity: 1; }
.p3d-uc-read { font-size: 11.5px; font-weight: 600; fill: var(--ink); paint-order: stroke; stroke: var(--bg-elev); stroke-width: 3px; }
.p3d-uc-read.is-key { font-size: 12.5px; }
.p3d-uc-thermo { fill: var(--bg-elev); stroke: var(--ink-soft); stroke-width: 1.4; }

.p3d-uc-unit rect { fill: var(--bg-elev); stroke: var(--ink); stroke-width: 1.6; }
.p3d-uc-fan { fill: none; stroke: var(--ink-soft); stroke-width: 1.4; }
.p3d-uc-fanb {
    stroke: var(--ink-soft); stroke-width: 2; stroke-linecap: round;
    transform-box: view-box; transform-origin: 231px 226px; animation: uc-spin 1.4s linear infinite;
}
@keyframes uc-spin { to { transform: rotate(360deg); } }
.p3d-uc-frost rect { fill: #dfe9f5; stroke: #3a609e; stroke-width: 1.2; }
.p3d-uc-frost text { font-size: 12px; font-weight: 600; fill: #1f3f6d; }

/* -- COP readout -- */
.p3d-uc-cop { display: flex; align-items: center; gap: .6rem; margin-top: .6rem; }
.p3d-uc-cop-lbl { font-size: .78rem; color: var(--ink-mute); text-transform: uppercase; letter-spacing: .04em; }
.p3d-uc-cop-v { font-size: 1.35rem; font-variant-numeric: tabular-nums; min-width: 2.6rem; }
.p3d-uc-bar { flex: 1; height: .55rem; background: var(--line); border-radius: var(--radius-pill); overflow: hidden; }
.p3d-uc-bar i { display: block; height: 100%; border-radius: var(--radius-pill); transition: width .35s ease; }
.p3d-uc-bar i.is-ground { background: #3d6b4a; }
.p3d-uc-bar i.is-water { background: #2f6ea8; }
.p3d-uc-bar i.is-air { background: #0a0a0a; }

/* -- the numbers table -- */
.p3d-uc-tablewrap { overflow-x: auto; margin-top: .9rem; }
.p3d-uc-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.p3d-uc-table th, .p3d-uc-table td { padding: .45rem .6rem; border-bottom: 1px solid var(--line); text-align: left; }
.p3d-uc-table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-mute); }
.p3d-uc-table tbody th { font-weight: 500; color: var(--ink-soft); }
.p3d-uc-table td { font-variant-numeric: tabular-nums; }
.p3d-uc-tr-key td { background: var(--ok-soft); }

.p3d-uc-foot { display: flex; justify-content: space-between; gap: .6rem; padding-top: .8rem; margin-top: .3rem; border-top: 1px solid var(--line); }

@media (max-width: 760px) {
    .p3d-uc-modal { max-width: none; padding: .9rem; }
    .p3d-uc-pair { grid-template-columns: 1fr; }
    .p3d-uc-step { font-size: .78rem; padding: .3rem .55rem .3rem .35rem; }
}

/* The animations only underline what the colours already say, so removing them costs no meaning. */
@media (prefers-reduced-motion: reduce) {
    .p3d-uc-fanb { animation: none; }
    .p3d-uc-flow circle { display: none; }
    .p3d-uc-bar i { transition: none; }
}


/* ---------- Učilnica: the learn hub page ---------- */
/* Cards, not a list: each explainer is a small promise ("this ends in a number for YOUR parcel"), and a
   promise needs a line of its own to be read. */
.uc-hub { display: flex; flex-direction: column; gap: .6rem; margin: .4rem 0 1rem; }
.uc-card {
    display: flex; align-items: flex-start; gap: .8rem; width: 100%; text-align: left;
    padding: .85rem .95rem; cursor: pointer;
    background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
    font-family: var(--font-sans); color: var(--ink);
    transition: border-color .14s, transform .14s, box-shadow .14s;
}
.uc-card:hover:not(.is-soon) {
    border-color: var(--accent); transform: translateY(-1px);
    box-shadow: 0 8px 20px -14px rgba(30, 22, 10, .6);
}
.uc-card.is-soon { cursor: default; opacity: .62; }
.uc-card-ico {
    flex: none; width: 2.2rem; height: 2.2rem; border-radius: var(--radius);
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--accent-soft); color: var(--accent-ink);
}
.uc-card-ico svg { width: 1.35rem; height: 1.35rem; display: block; }
.uc-card.is-soon .uc-card-ico { background: var(--bg); color: var(--ink-mute); }
.uc-card-body { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.uc-card-title { font-size: .95rem; font-weight: 700; }
.uc-card-lead { font-size: .82rem; color: var(--ink-soft); line-height: 1.45; }
.uc-card-local { font-size: .72rem; color: var(--accent-ink); }
.uc-card-go { margin-left: auto; align-self: center; font-size: 1.1rem; color: var(--accent); }
.uc-card-soon {
    margin-left: auto; align-self: center; flex: none;
    font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
    color: var(--ink-mute); border: 1px dashed var(--line-strong); border-radius: var(--radius-pill); padding: .12rem .5rem;
}
.uc-hub-note {
    margin: .2rem 0 0; font-family: var(--font-sans); font-size: .8rem; color: var(--ink-soft); line-height: 1.5;
}
.uc-back {
    background: none; border: none; cursor: pointer; padding: .2rem 0; margin-bottom: .4rem;
    font-family: var(--font-sans); font-size: .82rem; color: var(--accent-ink);
}
.uc-back:hover { color: var(--accent); text-decoration: underline; }

/* The explainer rendered as the PAGE (Inline) rather than as a modal over the 3D screen: it keeps the
   card's own look but drops the dialog's height cap and centring. */
.p3d-uc-inline { display: block; }
.p3d-uc-modal.is-inline {
    position: static; width: 100%; max-width: none; max-height: none; transform: none;
    box-shadow: none; border-radius: var(--radius);
}

/* The 3D model that replaced the two flat sections. It carries the whole comparison, so it gets real
   height - and a minimum, because a squashed section stops reading as depth. */
/* The loop, said in words under the diagram: numbered to match the four boxes in it. */
.p3d-uc-steps-txt {
    margin: .8rem 0 .6rem; padding-left: 1.4rem;
    display: flex; flex-direction: column; gap: .45rem;
    font-family: var(--font-sans); font-size: .84rem; line-height: 1.55; color: var(--ink);
}
.p3d-uc-steps-txt li::marker { color: var(--accent); font-weight: 700; }
.p3d-uc-steps-txt i { color: var(--ink-soft); }

/* Step 3's working parameters. A four-column grid (name / slider / value / provenance) so the eye can
   run down the values, and the "where this came from" note stays subordinate to them. */
/* Slovarček: the three efficiency numbers, one definition list, collapsed by default. */
.p3d-uc-gloss { margin: 1.2rem 0 .2rem; border-top: 1px solid var(--line); padding-top: .6rem; }
.p3d-uc-gloss-head {
    display: inline-flex; align-items: center; gap: .4rem; cursor: pointer;
    background: none; border: none; padding: .2rem 0;
    font-family: var(--font-sans); font-size: .82rem; font-weight: 700; color: var(--accent-ink);
}
.p3d-uc-gloss-head:hover { color: var(--accent); }
.p3d-uc-gloss-caret { font-size: .7rem; }
.p3d-uc-gloss-list {
    margin: .5rem 0 0; padding: 0;
    font-family: var(--font-sans); font-size: .82rem; line-height: 1.5;
}
.p3d-uc-gloss-list dt {
    margin-top: .7rem; font-weight: 700; color: var(--ink);
    display: flex; align-items: baseline; gap: .4rem; flex-wrap: wrap;
}
.p3d-uc-gloss-list dt:first-child { margin-top: 0; }
.p3d-uc-gloss-list dt span { font-weight: 400; font-size: .74rem; color: var(--ink-mute); }
.p3d-uc-gloss-list dd { margin: .15rem 0 0; padding-left: 0; color: var(--ink-soft); }

/* The "skupaj na leto" row is the one the reader actually compares - a rule above it separates the
   components from the sum. */
.p3d-uc-table .p3d-uc-tr-sum th, .p3d-uc-table .p3d-uc-tr-sum td {
    border-top: 2px solid var(--line-strong);
}
/* The investment breakdown is the same table, one section down. */
.p3d-uc-invtable { margin: .6rem 0 .4rem; }

.p3d-uc-params {
    margin: .8rem 0 1rem; padding: .7rem .8rem;
    background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
    display: flex; flex-direction: column; gap: .5rem;
}
.p3d-uc-params-head {
    display: flex; align-items: center; justify-content: space-between; gap: .6rem;
    font-family: var(--font-sans); font-size: .82rem;
}
.p3d-uc-par {
    display: grid; grid-template-columns: 11rem 1fr 6.5rem; gap: .1rem .7rem; align-items: center;
    font-family: var(--font-sans);
}
.p3d-uc-par-lbl { font-size: .8rem; font-weight: 600; color: var(--ink); }
.p3d-uc-par input[type=range] { width: 100%; accent-color: var(--accent); cursor: pointer; }
/* The device pickers share the parameter grid but take a select where the sliders take a range. */
.p3d-uc-par-sel {
    width: 100%; font-family: var(--font-sans); font-size: .8rem; color: var(--ink);
    background: var(--bg-elev); border: 1px solid var(--line-strong); border-radius: var(--radius);
    padding: .2rem .4rem; cursor: pointer;
}
.p3d-uc-par.is-pick { grid-template-columns: 11rem 1fr; }
.p3d-uc-par.is-pick .p3d-uc-par-src { grid-column: 2 / 3; }
.p3d-uc-par-val { font-size: .82rem; font-weight: 700; color: var(--accent-ink); text-align: right; white-space: nowrap; }
.p3d-uc-par-src {
    grid-column: 2 / 4; font-size: .68rem; color: var(--ink-mute); line-height: 1.35;
}
@media (max-width: 640px) {
    .p3d-uc-par { grid-template-columns: 1fr 4.5rem; }
    .p3d-uc-par-lbl { grid-column: 1 / 3; }
    .p3d-uc-par-src { grid-column: 1 / 3; }
    /* The picker rows need saying again: `.p3d-uc-par.is-pick` outranks the plain `.p3d-uc-par` rule
       above even inside this query, so without these a phone kept the 11 rem label column and stood the
       note about the material in the strip beside the select. */
    .p3d-uc-par.is-pick { grid-template-columns: 1fr 4.5rem; }
    .p3d-uc-par.is-pick .p3d-uc-par-sel,
    .p3d-uc-par.is-pick .p3d-uc-checks,
    .p3d-uc-par.is-pick .p3d-uc-par-src { grid-column: 1 / 3; }
}

.p3d-uc-scene { margin: .2rem 0 .9rem; }
.p3d-uc-canvas {
    display: block; width: 100%; height: clamp(300px, 46vh, 460px);
    border: 1px solid var(--line); border-radius: var(--radius); background: #dfe7f0;
    touch-action: none; cursor: grab;
}
.p3d-uc-canvas:active { cursor: grabbing; }
.p3d-uc-scene-hint {
    margin: .35rem 0 0; font-family: var(--font-sans); font-size: .72rem; color: var(--ink-mute); line-height: 1.45;
}

/* ── Učilnica: štiri teme o ovoju hiše ───────────────────────────────────────────────────────────
   Insulation, orientation, ventilation and rainwater each draw ONE thing, and the drawing is the
   argument: a wall whose insulation layer really is as wide as the slider says, two solstice rays at
   their true angles, two counter-flowing streams, a roof and the tank under it. Colours are borrowed
   from the heat-pump diagram above so the whole chapter reads as one hand: #c4402a warm, #3a609e
   cold, --accent for what the user is steering. */

/* Skupno vsem štirim: risba v okvirju, poudarjena številka pod njo, vir ob podatku v tabeli.

   The max-width is not cosmetic. These viewBoxes are 320 units wide with 9,5 px labels in them, and an
   SVG at width:100% inside a ~990 px notebook page scales all of that by three: the drawings came out
   the height of the screen with 28 px captions crashing into each other, and the wall section - whose
   viewBox was only about 100 units wide - was scaled by NINE. A figure is a figure; it gets a figure's
   width and is centred in the column. */
.p3d-uc-wall, .p3d-uc-sun, .p3d-uc-hx, .p3d-uc-co2, .p3d-uc-rain {
    margin: .2rem auto .9rem; padding: .5rem; background: var(--bg-elev);
    border: 1px solid var(--line); border-radius: var(--radius);
    max-width: 34rem;
}
.p3d-uc-wallsvg, .p3d-uc-sunsvg, .p3d-uc-hxsvg, .p3d-uc-co2svg, .p3d-uc-rainsvg {
    display: block; width: 100%; height: auto;
}
.p3d-uc-walltx { font-size: 9.5px; fill: var(--ink-soft); font-family: var(--font-sans); }
.p3d-uc-walltx.is-lead { fill: var(--ink); font-weight: 600; }
.p3d-uc-walltx.is-summer { fill: #c4402a; font-weight: 600; }
.p3d-uc-walltx.is-winter { fill: #3a609e; font-weight: 600; }

/* Kotirna črtica pod plastjo oziroma pod tlorisom - kot na prerezu v načrtu. */
.p3d-uc-dim { fill: none; stroke: var(--ink-soft); stroke-width: 1; }
.p3d-uc-src { font-size: .78rem; color: var(--ink-mute); font-variant-numeric: normal; }
.p3d-uc-small { margin: .7rem 0 0; font-size: .8rem; color: var(--ink-mute); line-height: 1.5; }

/* Odgovor za TO hišo: ena velika številka in ena vrstica, ki pove, od kod je. */
.p3d-uc-uline, .p3d-uc-payback {
    display: flex; flex-direction: column; gap: .15rem;
    margin: .2rem 0 .9rem; padding: .55rem .7rem;
    background: var(--accent-soft); border-left: 3px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0;
}
.p3d-uc-ubig { font-size: 1.05rem; font-weight: 700; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.p3d-uc-unote { font-size: .78rem; color: var(--ink-soft); line-height: 1.45; }

/* Prerez stene: plasti so risane v merilu, temperaturna črta pade strmo tam, kjer material prevaja. */
.p3d-uc-layer { stroke: var(--ink); stroke-width: .8; }
.p3d-uc-layer.is-plaster { fill: #cfcfcf; }
.p3d-uc-layer.is-block { fill: #b5b5b5; }
.p3d-uc-layer.is-ins { fill: #f0e3b8; }
.p3d-uc-templine { fill: none; stroke: url(#uc-temp); stroke-width: 2.6; stroke-linecap: round; }

/* Sonce nad hišo: dva žarka, dve senci, en napušč. */
.p3d-uc-ground { stroke: var(--ink-soft); stroke-width: 1.4; }
.p3d-uc-house { fill: var(--bg); stroke: var(--ink); stroke-width: 1.6; }
.p3d-uc-window { fill: #bcd4e8; stroke: #3a609e; stroke-width: 1; }
/* Napušč je ploskev, ne poteza: risan kot črta je bil praska na fasadi, risan brez polnila pa črna
   plošča čez pol hiše (rect brez fill je črn). Barva je ista kot streha pri deževnici. */
.p3d-uc-eave { fill: #b0563a; stroke: var(--ink); stroke-width: 1.2; }
.p3d-uc-ray { fill: none; stroke-width: 1.8; stroke-dasharray: 5 4; }
.p3d-uc-ray.is-summer { stroke: #c4402a; }
.p3d-uc-ray.is-winter { stroke: #3a609e; }
/* Zadnji del žarka, od konice napušča do mesta, kamor pade na fasado - ta pove, od kod senca. */
.p3d-uc-hit { stroke-width: 1.8; }
.p3d-uc-hit.is-summer { stroke: #c4402a; }
.p3d-uc-hit.is-winter { stroke: #3a609e; }
.p3d-uc-shaded { fill: #6a6a6a; opacity: .55; }

/* Protitočni izmenjevalnik: rebra v škatli, dva toka mimo njih v nasprotni smeri, toplota čez pločevine. */
.p3d-uc-hxbox { fill: var(--bg); stroke: var(--ink); stroke-width: 1.6; }
.p3d-uc-hxfin { stroke: var(--line-strong); stroke-width: 1; }
.p3d-uc-hxheat { fill: none; stroke: var(--ink-mute); stroke-width: 1.4; stroke-dasharray: 3 2.5; }
.p3d-uc-hxheat-a { fill: var(--ink-mute); }
/* Tok je pobarvan z gradientom, ki ga nastavi drsnik izkoristka: odpadni se med potjo ohladi, sveži
   segreje. Barva na koncu je torej rezultat, ne okras. */
.p3d-uc-hxflow { fill: none; stroke-width: 5; stroke-linecap: round; }
.p3d-uc-hxflow.is-exhaust { stroke: url(#uc-hx-out); }
.p3d-uc-hxflow.is-supply { stroke: url(#uc-hx-in); }
/* Konici puščic nosita barvo, ki jo tok DOSEŽE na tistem koncu - postavljena je v risbi, ker jo
   izračuna drsnik. Zato tu ni pravila za fill: pravilo bi jo povozilo. */

/* CO₂ čez noč: zaprta soba se vzpenja, prezračevana se ustali pod mejo. */
.p3d-uc-limit { stroke: var(--ink-mute); stroke-width: 1.2; stroke-dasharray: 4 4; }
.p3d-uc-curve, .p3d-uc-key { fill: none; stroke-width: 2.6; stroke-linecap: round; }
.p3d-uc-curve.is-bad, .p3d-uc-key.is-bad { stroke: #c4402a; }
.p3d-uc-curve.is-good, .p3d-uc-key.is-good { stroke: #3d6b4a; }

/* Deževnica: dež, streha, žleb, zakopan zbiralnik in preliv. */
.p3d-uc-soil { fill: #e4e4e4; }
.p3d-uc-drop { stroke: #4d8fd6; stroke-width: 1.6; stroke-linecap: round; opacity: .8; }
.p3d-uc-roof { fill: #b0563a; stroke: var(--ink); stroke-width: 1.4; stroke-linejoin: round; }
.p3d-uc-gutter { fill: none; stroke: var(--ink-soft); stroke-width: 2.4; stroke-linejoin: round; }
.p3d-uc-tank { fill: #cfe0f2; stroke: var(--ink); stroke-width: 1.6; }
.p3d-uc-overflow { fill: none; stroke: #4d8fd6; stroke-width: 2; stroke-linecap: round; }

/* Kljukice ob drsnikih (kaj priklopiš na deževnico). */
.p3d-uc-checks { display: flex; flex-wrap: wrap; gap: .1rem .8rem; font-size: .82rem; }
.p3d-uc-checks label { display: inline-flex; align-items: center; gap: .25rem; cursor: pointer; }
.p3d-uc-checks input { accent-color: var(--accent); }

/* Vrstica z izbrano vrednostjo v lestvici (debelina, napušč, zbiralnik). */
.p3d-uc-table tr.is-current td, .p3d-uc-table tr.is-current th { background: var(--accent-soft); font-weight: 600; }
.p3d-uc-table tr.is-total td, .p3d-uc-table tr.is-total th {
    border-top: 1.5px solid var(--line-strong); border-bottom: none;
}

/* ── Deljen pogled hiše (/ogled/3d/{token}) ──────────────────────────────────────────────────────
   The public, account-less viewer. It is NOT the notebook: no paper, no bookmarks, no navbar - the
   house fills the window, with one thin bar above it and one line of provenance below. Everything
   here is its own namespace (.sv3d-*) so it cannot drift when the app's chrome changes. */
.sv3d { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); position: relative; }
/* The SAME overlay the app's own 3D view uses (.p3d-canvas-loading), stretched over the public page's
   stage. One design for one wait: a recipient of a link meets the product, not a second spinner. The
   bar stays above it so the page still reads as Architec while the house is being built. */
.sv3d-canvas-loading { position: absolute; inset: 0; z-index: 20; }
.sv3d-bar { position: relative; z-index: 25; }
.sv3d-bar {
    display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
    padding: .6rem clamp(.75rem, 3vw, 1.5rem);
    background: var(--bg-elev); border-bottom: 1px solid var(--line);
}
.sv3d-brand {
    display: inline-flex; align-items: center; gap: .5rem; text-decoration: none;
    font-family: var(--font-serif); font-size: 1.15rem; color: var(--ink);
}
/* The brand is a LOGO, not a sentence with a link in it - it never wears an underline, hover included.
   Switching text-decoration off (which this rule used to do alone) achieved nothing: in this app an
   anchor's underline IS the 1px bottom border from the global `a` rule at the top of this file, and
   text-decoration is already none !important everywhere. So the line under the logo came from
   `a:hover { border-bottom-color: currentColor }` - the border is what has to go. Kept 1px and merely
   made transparent rather than removed, so the bar's height does not shift by a pixel on hover. */
.sv3d-bar .sv3d-brand,
.sv3d-bar .sv3d-brand:hover,
.sv3d-bar .sv3d-brand:focus,
.sv3d-bar .sv3d-brand span { text-decoration: none; border-bottom-color: transparent; }
.sv3d-brand:hover { color: var(--accent-ink); }
.sv3d-logo { height: 1.9rem; width: auto; display: block; }
.sv3d-mid { display: flex; align-items: baseline; gap: .6rem; margin-right: auto; }
.sv3d-title { font-family: var(--font-sans); font-weight: 600; color: var(--ink); }
.sv3d-expiry {
    font-family: var(--font-sans); font-size: .78rem; color: var(--ink-mute);
    border: 1px solid var(--line); border-radius: var(--radius-pill); padding: .1rem .5rem; white-space: nowrap;
}
.sv3d-actions { display: flex; align-items: center; gap: .5rem; }
.sv3d-btn {
    font-family: var(--font-sans); font-size: .85rem; cursor: pointer;
    padding: .4rem .8rem; border-radius: var(--radius-pill); color: var(--ink);
    background: var(--bg); border: 1px solid var(--line-strong);
    transition: background .14s, color .14s, border-color .14s;
}
.sv3d-btn:hover { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--accent); }
.sv3d-btn.is-on { background: var(--accent); border-color: var(--accent-ink); color: #fff; }
.sv3d-btn:disabled { opacity: .55; cursor: default; }

/* Icon + word in every bar button, so the row reads as one set rather than three different shapes. */
.sv3d-btn { display: inline-flex; align-items: center; gap: .38rem; }
.sv3d-ico { width: 1rem; height: 1rem; flex: none; }
.sv3d-ico.is-spin { animation: sv3d-spin .9s linear infinite; }
@keyframes sv3d-spin { to { transform: rotate(360deg); } }

/* The CTA is the one button on this page that is not a pill - it is the call to action, and it should
   read as the app's own primary button. Rounded, not round. */
/* Same box as the bar buttons beside it: .btn brings its own padding and line-height, so the height is
   pinned here rather than left to whichever rule wins. */
.sv3d-cta {
    display: inline-flex; align-items: center; padding: .4rem 1rem; font-size: .85rem;
    border-radius: var(--radius); line-height: 1.2; border: 1px solid transparent;
}

/* The stage takes what the bar and the footer leave; the canvas fills it. */
.sv3d-stage { position: relative; flex: 1 1 auto; min-height: 60vh; }
.sv3d-stage.is-hidden { visibility: hidden; }
.sv3d-hint {
    position: absolute; left: 50%; bottom: .7rem; transform: translateX(-50%);
    margin: 0; padding: .3rem .8rem; border-radius: var(--radius-pill); pointer-events: none;
    font-family: var(--font-sans); font-size: .75rem; color: var(--ink-soft);
    background: color-mix(in srgb, var(--bg-elev) 88%, transparent); border: 1px solid var(--line);
}
.sv3d-msg {
    display: flex; align-items: center; justify-content: center; gap: .6rem;
    padding: 3rem 1.25rem; font-family: var(--font-sans); color: var(--ink-soft);
}
.sv3d-msg-block { flex-direction: column; text-align: center; }
.sv3d-msg-block h1 { font-family: var(--font-serif); font-size: 1.8rem; margin: 0; color: var(--ink); }
.sv3d-msg-block p { margin: 0; max-width: 32rem; line-height: 1.55; }
.sv3d-foot {
    padding: .7rem clamp(.75rem, 3vw, 1.5rem); border-top: 1px solid var(--line);
    font-family: var(--font-sans); font-size: .78rem; color: var(--ink-mute); text-align: center;
}
@media (max-width: 640px) {
    .sv3d-mid { width: 100%; order: 3; }
    .sv3d-hint { display: none; }         /* no mouse to explain on a phone */
}
/* On a phone the three tool buttons drop their words and keep their icons: 760 px is the same line
   plan3d.js draws with isPhone(), so the bar becomes a row of icons exactly when the scene becomes
   read-only. Osveži / Notranjost / Sprehod are round trips the icon carries on its own - the
   invitation ("Naredi svojo hišo") and the "?" keep their shape, because those are the two things a
   first-time visitor is not supposed to have to guess. The word still reaches a screen reader: each
   button carries an aria-label, so this hides pixels, not meaning. */
@media (max-width: 760px) {
    .sv3d-btn > span { display: none; }
    .sv3d-btn { padding: .4rem; width: 2rem; height: 2rem; justify-content: center; gap: 0; }
    .sv3d-ico { width: 1.05rem; height: 1.05rem; }
    .sv3d-actions { gap: .35rem; }
}

/* ── Deli povezavo (the Orodja tool card) ─────────────────────────────────────────────────────── */
.p3d-share-lead { margin: 0 0 .6rem; font-size: .78rem; line-height: 1.45; color: var(--ink-soft); }
.p3d-share-new { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .6rem; }
.p3d-share-days { display: flex; align-items: center; gap: .45rem; font-size: .78rem; color: var(--ink-soft); }
.p3d-share-days input[type=range] { width: 8rem; accent-color: var(--accent); }
.p3d-share-days b { font-size: .78rem; color: var(--ink); min-width: 3.6rem; }
.p3d-share-empty { margin: 0; font-size: .76rem; color: var(--ink-mute); }
.p3d-share-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.p3d-share-item { padding: .45rem .5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
/* The link just minted is the one the user is looking for - marked for the moment the card is open. */
.p3d-share-item.is-new { border-color: var(--accent); background: var(--accent-soft); }
.p3d-share-meta {
    display: flex; justify-content: space-between; gap: .5rem;
    font-size: .7rem; color: var(--ink-mute); margin-bottom: .3rem;
}
.p3d-share-row { display: flex; align-items: center; gap: .35rem; }
.p3d-share-url {
    flex: 1 1 auto; min-width: 0; font-family: var(--font-sans); font-size: .72rem;
    padding: .25rem .4rem; color: var(--ink-soft);
    background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
}
.p3d-share-btn {
    flex: none; font-family: var(--font-sans); font-size: .72rem; cursor: pointer;
    padding: .25rem .5rem; color: var(--ink); background: var(--bg-elev);
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    transition: background .14s, color .14s, border-color .14s;
}
.p3d-share-btn:hover { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--accent); }
.p3d-share-btn.is-danger:hover { background: rgba(163, 53, 42, .1); color: #a3352a; border-color: #a3352a; }
/* The viewer owns the window: bar, stage and footer are the three rows of one 100 vh grid, and the
   stage takes what is left. Without this the stage's own min-height pushed the footer below the fold,
   so the provenance line (and the invitation on it) was only there for whoever thought to scroll. */
.sv3d { height: 100vh; min-height: 0; overflow: hidden; }
.sv3d-stage { min-height: 0; }
/* Squared, like a tool button rather than a pill - it switches a MODE, it is not a call to action. */
.sv3d-btn { border-radius: var(--radius); }
    .sv3d-cta { border-radius: var(--radius); }
/* The marketing page is now one small "?" beside the invitation: a public link is somebody's house,
   and "make your own" is the thing to say about it - "what is Architec" is the footnote. */
.sv3d-help {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2rem; height: 2rem; flex: none; border-radius: var(--radius-pill); text-decoration: none;
    font-family: var(--font-sans); font-size: .95rem; font-weight: 700; line-height: 1;
    color: var(--ink-soft); background: var(--bg); border: 1px solid var(--line-strong);
    transition: background .14s, color .14s, border-color .14s;
}
.sv3d-help:hover, .sv3d-help:focus-visible {
    background: var(--accent-soft); color: var(--accent-ink); border-color: var(--accent); text-decoration: none;
}

/* The one thing the card must not soft-pedal: the link shows WHERE the house is. */
.p3d-share-warn { color: var(--ink); background: var(--accent-soft); border-radius: var(--radius); padding: .4rem .5rem; }

/* »Kaj vidi prejemnik«: the reassurance, folded away. The card's job is to produce a link, so the one
   sentence that changes a decision stays above the button and everything else waits behind a summary
   the reader opens once. */
.p3d-share-det { margin: 0 0 .7rem; border-top: 1px solid var(--line); padding-top: .5rem; }
.p3d-share-det > summary {
    cursor: pointer; font-size: .78rem; color: var(--ink-soft); list-style: none;
    display: inline-flex; align-items: center; gap: .3rem; padding: .15rem 0;
}
.p3d-share-det > summary::-webkit-details-marker { display: none; }
.p3d-share-det > summary::before { content: "›"; transition: transform .15s ease; display: inline-block; }
.p3d-share-det[open] > summary::before { transform: rotate(90deg); }
.p3d-share-det > summary:hover { color: var(--ink); }
.p3d-share-det-list {
    margin: .4rem 0 0; padding-left: 1.05rem; font-size: .76rem; line-height: 1.5; color: var(--ink-soft);
}
.p3d-share-det-list li { margin-bottom: .25rem; }

/* "Deli povezavo" modal: a link is meant to be read and copied, so the dialog is wider than the tool
   cards it replaced and its list of live links can breathe. */
.p3d-share-modal { max-width: 34rem; width: 100%; }
.p3d-share-modal h2 {
    display: flex; align-items: center; gap: .5rem;
    font-family: var(--font-serif); font-size: 1.3rem; margin: 0 0 .8rem;
}
/* The card is a .p3d-tool-sec, whose dashed bottom border separates it from the NEXT section in the
   Orodja panel. In this modal it is the only section and the Zapri row follows it, so that border was
   just a dashed line hanging above the button. Same suppression the map card already does - and since
   the stock .sub-modal-actions row carries no top margin of its own (it leans on whatever sits above
   it), the gap the border used to imply has to be put back explicitly, or Zapri ends up against the
   list of links. Same trick as .p3d-ai-modal. */
.p3d-share-modal .p3d-tool-sec { border-bottom: none; padding-bottom: 0; }
.p3d-share-modal .sub-modal-actions { margin-top: 1.1rem; }

/* ── HIŠA V 3D NA TELEFONU ───────────────────────────────────────────────────────────────────────
   The 3D screen is a design tool: it drags, grips and picks, and none of that survives a thumb on a
   360 px screen. So a phone gets the same scene as a VIEW - turn it, walk it, share it - and the page
   says so (.p3d-phonenote). The scene itself runs in plan3d.js's readOnly mode (see isPhone), which
   is what actually disarms editing; these rules take away the chrome that would promise it.
   The breakpoint matches isPhone() - if one moves, the other has to. */
.p3d-phonenote { display: none; }
@media (max-width: 760px) {
    /* The map takes most of the screen but never all of it: the strip below is what the page is
       scrolled by, since the canvas itself swallows every drag (touch-action: none, for orbiting). */
    .journal-page-spread .p3d-layout, .p3d-layout { --p3d-h: min(62svh, 520px); }
    .journal-page.journal-page-spread:has(.p3d-page) { min-height: 0; }
    .p3d-phonenote {
        display: block; margin: 0 0 .5rem; padding: .5rem .7rem; border-radius: var(--radius);
        background: var(--accent-soft); color: var(--ink);
        font-family: var(--font-sans); font-size: .78rem; line-height: 1.45;
    }

    /* What goes: the object catalogues, the AI design pill and the Orodja menu (every one of them
       edits something). What stays: Zunanjost ⇄ Notranjost, Pogledi (the walk lives there), deljenje
       and the fullscreen toggle - the four things that are about LOOKING. */
    .p3d-page.is-phoneview .p3d-furncat,
    .p3d-page.is-phoneview .p3d-menucat[data-menu="orodja"],
    .p3d-page.is-phoneview .p3d-ai-pill,
    .p3d-page.is-phoneview .p3d-toptools,
    /* …except the flat's »Mere stanovanja«, which a phone opens read-only (#1186 rule 24). */
    .p3d-page.is-phoneview .p3d-mapcard:not(.p3d-flatdims-card),
    .p3d-page.is-phoneview .p3d-objedit,
    .p3d-page.is-phoneview .p3d-winedit { display: none !important; }

    /* The bar keeps one row and scrolls if it has to, instead of stacking four rows over the scene. */
    .p3d-page.is-phoneview .p3d-furnbar-cats {
        flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
        justify-content: flex-start; max-width: 100%; scrollbar-width: none;
    }
    .p3d-page.is-phoneview .p3d-furnbar-cats::-webkit-scrollbar { display: none; }
    .p3d-page.is-phoneview .p3d-furnbar { padding-bottom: .8rem; }
    /* Touch has no hover, so the menus open on tap - and a 44 px row is what a thumb can hit. */
    .p3d-page.is-phoneview .p3d-furncat-btn { min-height: 40px; padding: .4rem .7rem; }
    .p3d-page.is-phoneview .p3d-mitem { min-height: 44px; }
}

/* Phone, continued: what is ABOVE the map decides whether the map is on screen at all. The chapter
   intro is a desktop luxury here - on a 390 px screen it, the title and the note together pushed the
   canvas a full screen down, so the page opened on prose with the house below the fold. */
@media (max-width: 760px) {
    .p3d-page.is-phoneview .p3d-intro,
    .p3d-page.is-phoneview .p3d-header .eyebrow,
    .p3d-page.is-phoneview .p3d-header .phase-eyebrow-row { display: none; }
    .p3d-page.is-phoneview .p3d-header h1 { font-size: 1.5rem; margin-bottom: .35rem; }
    .p3d-page.is-phoneview .p3d-header { margin-bottom: .5rem; }

    /* The sun card is one of the four things a phone keeps (turn / sun / walk / share), but it arrives
       as a panel with a date field, two solstice buttons and a play button - half the visible map. The
       slider and the hour are the part that answers "where do the shadows fall"; the rest is a desk
       tool and goes. */
    .p3d-page.is-phoneview .p3d-suncard { max-width: 62%; padding: .35rem .5rem; }
    .p3d-page.is-phoneview .p3d-suncard .p3d-sun-row { display: none; }
    .p3d-page.is-phoneview .p3d-suncard-title { font-size: .72rem; }
    /* The parcel badge wraps to five lines at this width; two is enough to say which plot this is. */
    .p3d-page.is-phoneview .p3d-info { max-width: 55%; }
}

/* Phone, continued: 437 px of chrome sat above the 3D map (measured at 390x844) - navbar, a 58 px gap
   kept for tabs that are in flow here anyway, the bookmark strip, a full chapter title block and the
   note. The house was below the fold on the one screen that exists to show it. This buys ~190 px back,
   which puts the whole map on screen the moment the page opens. */
@media (max-width: 760px) {
    .journal-spread:has(.journal-page-spread) { margin-top: 0; }
    .journal-page.journal-page-spread:has(.p3d-page) { padding: .75rem .75rem 1.25rem; }
    .p3d-page.is-phoneview .p3d-header h1 { font-size: 1.15rem; margin: 0 0 .3rem; }
    .p3d-page.is-phoneview .p3d-phonenote { margin-bottom: .4rem; padding: .4rem .6rem; font-size: .74rem; }
}

/* Phone, last pass on the 3D view. */
@media (max-width: 760px) {
    /* The hint strip teaches the mouse and the keyboard - "vleci objekt za premik", Q/E to rotate -
       none of which exists here. The note above the map already says what a phone can do. */
    .p3d-page.is-phoneview .p3d-hint { display: none; }
    /* Zunanjost ⇄ Notranjost was being cut in half by the right edge: the bar scrolls, but a clipped
       label reads as broken rather than as scrollable. Tighter type fits the whole row on 390 px. */
    .p3d-page.is-phoneview .p3d-iseg { font-size: .72rem; padding: .35rem .55rem; }
    .p3d-page.is-phoneview .p3d-furncat-btn { font-size: .75rem; }
}

/* ── HIŠA V 3D SAMO ZA OGLED (sodelavec, ki bere) ────────────────────────────────────────────────────
   The phone's view on any screen, for somebody the project is shared with to read. The scene runs in
   plan3d.js's readOnly mode; these rules take away the chrome that would promise editing - the object
   catalogues, AI opis, Orodja, the strip above the map (Shrani, Obnovi, uvoz, izvoz, izris), the object and
   model cards, the edit hints. Zunanjost ⇄ Notranjost, Pogledi (the walk lives there) and the fullscreen
   toggle stay; the share button is rendered only for the project's own account, to list and revoke what the
   investitor shared (ManagesSharesOnly in Plan3d.razor). Outside any media query on purpose: the phone
   rules above live inside one, and a reader is as likely to be at a desk. */
.p3d-viewnote {
    margin: 0 0 .5rem; padding: .5rem .7rem; border-radius: var(--radius);
    background: var(--accent-soft); color: var(--ink);
    font-family: var(--font-sans); font-size: .78rem; line-height: 1.45;
}
.p3d-page.is-viewonly .p3d-furncat,
.p3d-page.is-viewonly .p3d-menucat[data-menu="orodja"],
.p3d-page.is-viewonly .p3d-ai-pill,
.p3d-page.is-viewonly .p3d-toptools,
.p3d-page.is-viewonly .p3d-mapcard,
.p3d-page.is-viewonly .p3d-objedit,
.p3d-page.is-viewonly .p3d-winedit,
.p3d-page.is-viewonly .p3d-import,
.p3d-page.is-viewonly .p3d-hint { display: none !important; }

/* ── VABILA K NAROČNINI V HIŠI V 3D (2026-09-23) ──────────────────────────────────────────────────
   What the paket holds back is shown, not hidden: a locked view-switch segment, a locked etaža chip and
   the locked Uvozi and Izvozi buttons each carry a ključavnica, and a click on any of them opens ONE modal
   (the page's .sub-modal) - what the thing does, one line, and the button to the paketi. The Osnovni account
   looking at the house it drew in the trial gets the same message as a bar above the map instead, and the
   scene with NO controls at all: every overlay in the canvas wrap goes, only the picture stays. */
.p3d-page.is-planview .p3d-canvas-wrap > :not(.p3d-canvas):not(.p3d-canvas-loading) { display: none !important; }
.p3d-page.is-planview .p3d-furncat,
.p3d-page.is-planview .p3d-menucat[data-menu="orodja"],
.p3d-page.is-planview .p3d-ai-pill,
.p3d-page.is-planview .p3d-toptools,
.p3d-page.is-planview .p3d-mapcard,
.p3d-page.is-planview .p3d-objedit,
.p3d-page.is-planview .p3d-winedit,
.p3d-page.is-planview .p3d-import,
.p3d-page.is-planview .p3d-interior-seg,
.p3d-page.is-planview .p3d-hint { display: none !important; }
.p3d-planview-bar {
    display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1rem;
    margin: 0 0 .6rem; padding: .6rem .85rem; border-radius: var(--radius);
    background: var(--accent-soft); border: 1px solid rgba(10, 10, 10, .35); color: var(--ink);
    font-family: var(--font-sans); font-size: .82rem; line-height: 1.45;
}
.p3d-planview-bar strong { color: var(--accent); }
.p3d-planview-bar .btn { margin-left: auto; white-space: nowrap; }

/* NomiFac #1400: »uredi s svojim AI« - one line above the map until it is put away (✕) or an AI tool is connected. */
.p3d-mcp-tip {
    display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .75rem;
    margin: 0 0 .5rem; padding: .4rem .5rem .4rem .75rem; border-radius: var(--radius);
    background: var(--accent-soft); border: 1px solid rgba(10, 10, 10, .25); color: var(--ink);
    font-family: var(--font-sans); font-size: .8rem; line-height: 1.45;
}
.p3d-mcp-tip-txt { flex: 1 1 22rem; min-width: 0; }
.p3d-mcp-tip-txt > span[aria-hidden] { color: var(--accent); }
.p3d-mcp-tip-link { white-space: nowrap; }
.p3d-mcp-tip-close {
    width: 32px; height: 32px; border: 0; border-radius: var(--radius); background: transparent;
    color: var(--ink-soft); font-size: 1.15rem; line-height: 1; cursor: pointer;
}
.p3d-mcp-tip-close:hover { background: rgba(0, 0, 0, .06); color: var(--ink); }
.p3d-page.is-viewonly .p3d-mcp-tip, .p3d-page.is-planview .p3d-mcp-tip, .p3d-page.is-phoneview .p3d-mcp-tip { display: none; }
/* On the landscape spread the line keeps to the left page, under the title - text never runs across the spine (the
   buttons above keep to the right page, .p3d-toptools). ≤999 px the spread is one sheet: the whole width. */
@media (min-width: 1000px) {
    .journal-page-spread .p3d-mcp-tip { max-width: calc(50% - 2rem); }
}
.p3d-iseg.is-locked, .p3d-istorey.is-locked, .p3d-mitem.is-locked { opacity: .72; }
.p3d-iseg.is-locked:hover, .p3d-istorey.is-locked:hover, .p3d-mitem.is-locked:hover { opacity: 1; }
.p3d-lock-ico { display: inline-flex; align-items: center; margin-left: .3rem; opacity: .9; }
.p3d-istorey.is-locked::before { content: "○ "; opacity: .5; }
.p3d-locked-btn { opacity: .8; }
.p3d-locked-btn:hover { opacity: 1; }
.p3d-lockcta { max-width: 28rem; }
.p3d-lockcta .eyebrow { margin-bottom: .2rem; }
.p3d-lockcta h2 { display: flex; align-items: center; gap: .45rem; }
.p3d-lockcta-note { font-size: .86rem; }
.p3d-lockcta .sub-modal-actions { display: flex; justify-content: flex-end; gap: .6rem; }

/* ── NAČRTOVANJE NA TELEFONU ─────────────────────────────────────────────────────────────────────
   The plan is a list here (Schedule.razor renders .sched-plist when gantt-drag.js says isPhone), and
   the board's four columns scroll sideways one at a time instead of being squeezed into a phone. */
.sched-plist { list-style: none; margin: .4rem 0 0; padding: 0; display: flex; flex-direction: column; }
.sched-plist-item { border-top: 1px solid var(--line); }
.sched-plist-item:last-child { border-bottom: 1px solid var(--line); }
.sched-plist-item.is-late { background: rgba(163, 53, 42, .06); }
.sched-plist-btn {
    width: 100%; display: flex; align-items: flex-start; gap: .6rem; text-align: left;
    padding: .7rem .3rem; background: none; border: none; cursor: pointer; font-family: var(--font-sans);
}
.sched-plist-dot {
    flex: none; width: .6rem; height: .6rem; margin-top: .45rem; border-radius: 50%;
    background: var(--ink-mute);
}
/* Same status vocabulary as the board: red = to do, amber = in progress, green = done, grey = n/a. */
.sched-plist-dot.status-todo { background: #c0705f; }
.sched-plist-dot.status-doing { background: #d9a441; }
.sched-plist-dot.status-done { background: #4e8c62; }
.sched-plist-dot.status-na { background: var(--line-strong); }
.sched-plist-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: .2rem; }
.sched-plist-title { font-size: .88rem; line-height: 1.35; color: var(--ink); }
.sched-plist-ms { color: var(--accent); margin-right: .15rem; }
.sched-plist-meta { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; font-size: .72rem; }
.sched-plist-phase {
    color: var(--ink-soft); padding-left: .45rem;
    border-left: 3px solid var(--phase-color, var(--accent)); line-height: 1.2;
}
.sched-plist-dates { color: var(--ink-mute); font-variant-numeric: tabular-nums; }
.sched-plist-late {
    flex: none; align-self: center; font-size: .68rem; font-weight: 700; color: #a3352a;
    background: rgba(163, 53, 42, .12); border-radius: var(--radius-pill); padding: .1rem .45rem;
}
@media (max-width: 760px) {
    /* One column at a time, snapped: four 14 rem columns on a 390 px screen is four slivers. */
    .kanban-board { scroll-snap-type: x mandatory; gap: .6rem; }
    .kanban-col { flex: 0 0 86%; min-width: 0; scroll-snap-align: start; }
    .kanban-col.is-collapsed { flex: 0 0 auto; }
}

/* Phone: get the plan itself onto the first screen. Measured at 390x844, the first task sat at 715 px
   - below the fold - behind a chapter title, a three-line intro and three rows of filter chips. The
   words stay on a real screen; here the tasks come first. */
@media (max-width: 760px) {
    .schedule-page .phase-header .intro { display: none; }
    .schedule-page .phase-header h1 { font-size: 1.35rem; margin-bottom: .2rem; }
    .schedule-page .phase-header .eyebrow { display: none; }
    /* In list mode there is no track to zoom or to centre on today, and no panel worth filling the
       screen with - so the reading controls go with the track they belong to. */
    .schedule-page .sched-viewctrls, .schedule-page .schedule-fs-btn { display: none; }
}
@media (max-width: 760px) {
    /* Tighten the bands between the tabs, the heading and the filter row - each was a desktop-sized
       margin, and four of them together cost another task-and-a-half of screen. */
    .schedule-page .phase-header { margin: .4rem 0 .5rem; }
    .schedule-page .sched-filter { margin: .3rem 0; }
    .schedule-page .schedule-view-tabs { margin-bottom: .4rem; }
}

/* ── TARČE DOTIKA ────────────────────────────────────────────────────────────────────────────────
   A finger is not a mouse pointer: the audit found ten-plus controls per page under 32 px (footer
   links at 16-22, filter chips and icon buttons at 27, the sort select at 18). This is the floor, set
   on the POINTER rather than on the width - a touch laptop needs it as much as a phone does, and a
   phone with a stylus does not suddenly need less. 40 px is the compromise the layout survives:
   Apple says 44, Android 48, and this app's chips would stop fitting the row long before that.
   Only padding and min-height move; nothing here changes what anything looks like on a mouse. */
@media (pointer: coarse) {
    .btn, .icon-btn, .sched-filter-chip, .gantt-zoom-btn, .kanban-col-toggle, .kanban-col-add,
    .ai-history-new, .ai-head-btn, .p3d-sun-btn, .theme-toggle, .th-sort,
    .man-nav-item, .man-nav-home, .app-footer-link, .cookie-consent-link {
        min-height: 40px;
    }
    /* Inline links in a paragraph must NOT become 40 px blocks - they would tear the line apart. They
       get their hit area from padding instead, which leaves the text where it is. */
    .app-footer-link, .cookie-consent-link { display: inline-flex; align-items: center; }
    /* Selects and inputs are typed into as well as tapped, so they get the same floor. */
    select, input[type="text"], input[type="search"], input[type="date"], input[type="number"] {
        min-height: 40px;
    }
    /* A range slider's thumb is the target here; the track can stay thin. */
    input[type="range"] { min-height: 32px; }
}
@media (pointer: coarse) {
    /* Icon-only buttons need the floor in BOTH directions - a 27 px square with a 40 px height is
       still a miss waiting to happen. */
    .icon-btn, .hint-close, .task-modal-close { min-width: 40px; min-height: 40px; }
    .hint-cta { min-height: 40px; }
}
@media (pointer: coarse) {
    /* The rest of the below-the-floor set, found by MobileLayoutTests rather than by eye: the notebook's
       add button, the tour button in the navbar, the plan/board tabs and the plan's ⋯ menu. */
    .journal-add-btn, .journal-search-toggle, .nav-tour-btn, .schedule-menu-btn, .schedule-fs-btn {
        min-width: 40px; min-height: 40px;
    }
    .schedule-view-tab { min-height: 40px; }
}

/* ============================================================================
   /zacni - the anonymous onboarding čarovnik
   ----------------------------------------------------------------------------
   One screen at a time on the landing layout: one column, a big question,
   tap-a-card answers, and two computed "insight" screens between the questions.
   Tokens only, so the dark theme flips with the rest of the app.
   ============================================================================ */

/* ONE COLUMN (NomiFac #1284, docs/updates/zacni-carovnik-sirina.md): the head (logo + step dots) and every screen
   under it share one max-width and one side inset - the landing header's (.lp-header-inner), so the logo does not
   move on the click from the landing either. They used to be four centred boxes (head 60rem, questions 46rem, the
   ad step 72rem, the hand-off 38rem): the logo stood ~100 px left of the question and the dots ~100 px right of the
   cards, and the content slid sideways between steps. Running text keeps a reading measure (--zw-read) inside the
   column; cards, sliders, tables and the plan take the whole of it. */
.zw {
    min-height: 100vh; display: flex; flex-direction: column; background: var(--bg);
    --zw-max: var(--max);
    --zw-pad-x: clamp(1.5rem, 4vw, 4rem);
    --zw-read: 46rem;
}

.zw-top {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    max-width: var(--zw-max); width: 100%; margin: 0 auto;
    /* the landing's logo and height (#1191) - one click from it, through »Gradim hišo« */
    padding: var(--nav-pad-y) var(--zw-pad-x);
    min-height: calc(var(--nav-logo-h) + 2 * var(--nav-pad-y));
}
.zw-brand { display: inline-flex; border: none; text-decoration: none; }
.zw-brand-logo { height: var(--nav-logo-h); width: auto; display: block; }
.zw-progress { display: flex; gap: .4rem; }
.zw-dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--line-strong); }
.zw-dot.is-done { background: var(--accent); }
.zw-dot.is-current { background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }

.zw-screen {
    flex: 1; width: 100%; max-width: var(--zw-max); margin: 0 auto;
    padding: clamp(1rem, 4vw, 2.5rem) var(--zw-pad-x) 4rem;
}
/* Running text at a reading measure, flush with the logo - a 140-character line is not what "wider" asked for. */
.zw-lead, .zw-q-help, .zw-intro-points, .zw-facts, .zw-parcel-note, .zw-excl, .zw-disclaimer, .zw-handoff-note {
    max-width: var(--zw-read);
}
/* The centred screens (hand-off, /zacni/nadaljuj, "tega čarovnika še ni") stand in the same column; what they hold
   is centred in it (the form and its list keep their own narrower max-width). */
.zw-screen.zw-center { text-align: center; }
.zw-screen.zw-center > * { margin-left: auto; margin-right: auto; }
.zw-boot { display: flex; justify-content: center; padding: 4rem 0; }

.zw-eyebrow {
    font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .16em;
    color: var(--accent); margin-bottom: .6rem;
}
.zw-title {
    font-family: var(--font-serif); font-weight: 400; letter-spacing: -.02em;
    font-size: clamp(1.8rem, 4.5vw, 2.8rem); line-height: 1.1; margin: 0;
}
.zw-big { color: var(--accent-ink); white-space: nowrap; }
.zw-lead { margin: .9rem 0 0; font-size: 1.02rem; line-height: 1.6; color: var(--ink-soft); }

/* The intro in front of the first question (#1167): what we ask, what comes back - four ticked lines and one way in. */
.zw-intro-points {
    list-style: none; margin: clamp(1.25rem, 4vw, 2rem) 0 0; padding: 0;
    display: flex; flex-direction: column; gap: .9rem;
}
.zw-intro-points li { display: flex; align-items: flex-start; gap: .75rem; font-size: 1.05rem; line-height: 1.55; color: var(--ink); }
.zw-intro-tick {
    flex: none; display: inline-flex; align-items: center; justify-content: center;
    width: 1.75rem; height: 1.75rem; margin-top: .05rem; border-radius: 50%;
    background: var(--accent-soft); color: var(--accent-ink);
}
.zw-intro-go { padding: .75rem 1.5rem; font-size: 1rem; }

/* ---------- questions ---------- */
.zw-questions { display: flex; flex-direction: column; gap: 1.75rem; margin-top: clamp(1.5rem, 4vw, 2.25rem); }
.zw-q { border: 0; padding: 0; margin: 0; }
.zw-q-title { font-size: 1.02rem; font-weight: 700; color: var(--ink); padding: 0; margin: 0 0 .3rem; }
.zw-q-help { margin: 0 0 .8rem; font-size: .92rem; line-height: 1.5; color: var(--ink-soft); }

.zw-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .6rem; }
.zw-opt {
    display: flex; flex-direction: column; gap: .2rem; text-align: left;
    padding: .85rem 1rem; min-height: 3.4rem;
    background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
    color: var(--ink); font: inherit; cursor: pointer;
    transition: border-color .12s, background .12s, transform .12s;
}
.zw-opt:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.zw-opt.is-on { border-color: var(--accent); background: var(--accent-soft); }
.zw-opt-label { font-weight: 600; font-size: .98rem; }
.zw-opt-hint { font-size: .8rem; color: var(--ink-mute); }
.zw-opt.is-on .zw-opt-hint { color: var(--accent-ink); }
/* A choice between things carries its picture (#878): a one-colour line icon in a soft tile above the label. */
.zw-opt-ico {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2.6rem; height: 2.6rem; margin-bottom: .45rem; border-radius: var(--radius);
    background: var(--accent-soft); color: var(--accent-ink);
}
.zw-opt.is-on .zw-opt-ico { background: var(--accent); color: #fff; }
/* …beside the label, not above it (#1291): the icon on the left over both lines, the label in a larger type to its
   right and the hint under the label. */
.zw-opt.has-ico {
    display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto;
    align-items: center; column-gap: .85rem; row-gap: .1rem;
}
.zw-opt.has-ico .zw-opt-ico { grid-row: 1 / span 2; margin-bottom: 0; }
.zw-opt.has-ico .zw-opt-label { grid-column: 2; align-self: end; font-size: 1.3rem; line-height: 1.25; overflow-wrap: anywhere; }
.zw-opt.has-ico .zw-opt-hint { grid-column: 2; align-self: start; }
/* Multi-select reads as a checklist, so the cards stay wider and stack rather than spreading thin. */
.zw-opts.is-multi { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
/* Short answers ("1", "2", "4 ali več") sized to their content instead of stretched across a third of
   the screen - a one-character answer in a 20rem card reads as a mistake. */
.zw-opts.is-short { display: flex; flex-wrap: wrap; }
.zw-opts.is-short .zw-opt { flex: 0 1 auto; min-width: 7rem; }

/* ---------- number slider ---------- */
.zw-number { margin-top: .5rem; }
.zw-number-value {
    font-family: var(--font-serif); font-size: clamp(2rem, 5vw, 2.8rem); font-weight: 400;
    color: var(--ink); line-height: 1.1; text-align: center;
}
.zw-number-note { text-align: center; font-size: .82rem; color: var(--ink-mute); margin-top: .25rem; }
.zw-slider { width: 100%; margin: 1rem 0 .35rem; accent-color: var(--accent); }
.zw-number-ends { display: flex; justify-content: space-between; font-size: .8rem; color: var(--ink-mute); }

/* The two ways into the money question: "vem proračun" / "vem velikost hiše". A segmented pair rather
   than option cards - it is one question asked from two ends, not two questions. */
.zw-basis { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .5rem; margin-bottom: 1.25rem; }
.zw-basis-tab {
    display: flex; flex-direction: column; gap: .15rem; text-align: left;
    padding: .7rem .85rem; border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--bg-elev); color: var(--ink); cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}
.zw-basis-tab:hover { border-color: var(--line-strong); }
.zw-basis-tab.is-on { border-color: var(--accent); background: var(--accent-soft); }
.zw-basis-k { font-weight: 600; font-size: .92rem; }
.zw-basis-v { font-size: .78rem; color: var(--ink-mute); }
.zw-basis-tab.is-on .zw-basis-v { color: var(--accent-ink); }
/* The number the visitor did NOT enter, quoted live under the slider - the trade-off, visible while
   you drag, which is the whole reason this screen takes either side. */
.zw-number-twin { margin-top: .9rem; text-align: center; font-size: .95rem; color: var(--ink-soft); }
.zw-number-twin strong { color: var(--ink); }
.zw-insight-note { margin: .35rem 0 0; text-align: center; font-size: .85rem; color: var(--ink-mute); }
.zw-insight-note em { font-style: normal; font-weight: 600; color: var(--ink-soft); }
/* The two extra answers under the headline (room program, monthly payment): plain sentences with a
   short label in front, so they read as facts about THIS household rather than as more sliders. */
.zw-facts { margin: 1rem 0 .25rem; display: grid; gap: .45rem; }
.zw-fact { margin: 0; font-size: .95rem; line-height: 1.55; color: var(--ink-soft); }
.zw-fact strong { color: var(--ink); }
.zw-fact-k {
    display: inline-block; margin-right: .4rem; padding: .05rem .5rem; border-radius: var(--radius-pill);
    font-size: .74rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
    background: var(--accent-soft); color: var(--accent-ink);
}

/* ---------- the plan: dated chapters ---------- */
.zw-timeline { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: .15rem; }
.zw-tl {
    display: grid; grid-template-columns: 7.5rem 1.6rem 1fr auto; align-items: center; gap: .5rem;
    padding: .4rem .5rem; border-radius: var(--radius); font-size: .93rem;
}
.zw-tl:nth-child(odd) { background: var(--bg-elev); }
.zw-tl-when { font-variant-numeric: tabular-nums; color: var(--ink-soft); text-transform: capitalize; }
.zw-tl-n {
    display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%;
    background: var(--accent-soft); color: var(--accent-ink); font-size: .76rem; font-weight: 700;
}
.zw-tl-title { font-weight: 600; color: var(--ink); }
.zw-tl-dur { font-size: .8rem; color: var(--ink-mute); white-space: nowrap; }
.zw-plan-keys { display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; margin: .9rem 0 0; font-size: .95rem; color: var(--ink-soft); }
.zw-plan-keys strong { color: var(--ink); text-transform: capitalize; }
@media (max-width: 560px) {
    .zw-tl { grid-template-columns: 1.6rem 1fr auto; }
    .zw-tl-when { grid-column: 2 / -1; grid-row: 2; font-size: .8rem; }
}

/* "V dnevniku bo že vpisano" + "Po prijavi te čaka" - the two lists that make the sign-up concrete. */
.zw-ready, .zw-unlock {
    margin-top: 1.25rem; padding: .9rem 1.1rem; border-radius: var(--radius);
    border: 1px solid var(--line); background: var(--bg-elev);
}
.zw-unlock { border-color: var(--accent); background: var(--accent-soft); }
.zw-ready-head { font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: .45rem; }
.zw-unlock .zw-ready-head { color: var(--accent-ink); }
.zw-ready-list, .zw-unlock-list { margin: 0; padding-left: 1.2rem; display: grid; gap: .3rem; font-size: .93rem; line-height: 1.5; color: var(--ink-soft); }
.zw-ready-list strong, .zw-unlock-list strong { color: var(--ink); }
.zw-ready-list li::marker { content: "✓  "; color: var(--accent); }
/* The two AI lines earn the sparkle the app uses for every model-backed action, so the feature is
   recognisable here before the visitor has ever seen it inside the dnevnik. */
.zw-unlock-list li.is-ai::marker { content: "✦  "; color: var(--accent); }

/* The flagship, shown rather than described - the one item on this screen a sentence cannot carry. */
.zw-unlock-3d {
    margin: 0 0 .9rem; padding: 0;
    border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg);
}
.zw-unlock-3d img {
    /* 16/9 against a ~16/11 source, so `cover` trims about a ninth off each of the top and bottom - which
       is what it takes to lose the 3D editor's own toolbar and its keyboard-hint strip. A box matching
       the source's aspect ratio cropped nothing and left the picture half about our own chrome. */
    display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover;
    object-position: 50% 50%;
}
.zw-unlock-3d figcaption {
    padding: .7rem .85rem; font-size: .9rem; line-height: 1.5; color: var(--ink-soft);
}
.zw-unlock-3d figcaption strong { display: block; color: var(--ink); margin-bottom: .15rem; }
/* #1284: across the whole column the picture grew to ~930 px and pushed »Shrani moj načrt« a screen further down. On
   a wide screen the caption stands beside it instead, and the picture keeps about the size it had. */
@media (min-width: 880px) {
    .zw-unlock-3d { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: center; }
}
.zw-unlock-trial {
    margin: .9rem 0 0; padding-top: .75rem; border-top: 1px solid var(--line);
    font-size: .88rem; line-height: 1.5; color: var(--ink-soft);
}
.zw-unlock-trial strong { color: var(--accent-ink); }

/* The hand-off's "this is what the account is for" ticks. */
.zw-handoff-list {
    list-style: none; margin: 0 auto 1.25rem; padding: 0; max-width: 28rem;
    display: grid; gap: .3rem; text-align: left; font-size: .93rem; color: var(--ink-soft);
}
/* Hanging indent, so a wrapped second line sits under the TEXT rather than back at the tick - these rows
   now carry enough words to wrap. Done with text-indent and NOT display:grid: each row mixes bare text
   nodes with <strong>, and grid would promote every one of those fragments to its own track, breaking
   the lines one word at a time. */
.zw-handoff-list li { padding-left: 1.35rem; text-indent: -1.35rem; }
.zw-handoff-list li::before {
    content: "✓"; display: inline-block; width: 1.35rem; text-indent: 0;
    color: var(--accent); font-weight: 700;
}
.zw-handoff-list strong { color: var(--ink); }

/* ---------- parcel step ---------- */
.zw-parcel { margin-top: .5rem; }
.zw-parcel-found {
    margin-top: 1rem; padding: 1rem 1.1rem;
    background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
}
.zw-parcel-head { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.zw-parcel-area { font-size: .9rem; color: var(--ink-soft); }
.zw-parcel-zone { display: flex; align-items: center; gap: .5rem; margin-top: .5rem; font-size: .92rem; color: var(--ink-soft); }
.zw-parcel-zone-code {
    font-weight: 700; font-size: .78rem; letter-spacing: .04em;
    padding: .15rem .45rem; border-radius: var(--radius); background: var(--accent-soft); color: var(--accent-ink);
}
.zw-parcel-note { margin: .8rem 0 0; font-size: .9rem; line-height: 1.55; color: var(--ink-soft); }

/* ---------- insight screens ---------- */
.zw-insight .zw-title { margin-bottom: .2rem; }
.zw-table {
    margin-top: 1.75rem; border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--bg-elev); overflow: hidden;
}
.zw-table-head {
    padding: .7rem 1rem; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
    color: var(--ink-mute); border-bottom: 1px solid var(--line);
}
.zw-row {
    display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
    padding: .6rem 1rem; font-size: .93rem; border-bottom: 1px solid var(--line);
}
.zw-row:last-child { border-bottom: 0; }
.zw-row-k { color: var(--ink-soft); }
.zw-row-v { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; color: var(--ink); }
.zw-row.is-total { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.zw-row.is-total .zw-row-k { color: var(--ink); font-weight: 700; }

.zw-excl { margin: 1rem 0 0; font-size: .88rem; line-height: 1.55; color: var(--ink-soft); }
.zw-disclaimer { margin: .5rem 0 0; font-size: .8rem; line-height: 1.5; color: var(--ink-mute); }

/* the "Prilagodi" controls: three inputs that re-solve each other */
.zw-adjust {
    margin-top: 1.25rem; padding: 1rem 1.1rem;
    background: var(--bg-elev); border: 1px solid var(--line-strong); border-radius: var(--radius);
    display: flex; flex-direction: column; gap: .9rem;
}
.zw-adjust-row { display: grid; grid-template-columns: 8rem 1fr 7rem; align-items: center; gap: .75rem; }
.zw-adjust-k { font-size: .88rem; font-weight: 600; color: var(--ink-soft); }
.zw-adjust-v { font-size: .95rem; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.zw-adjust .zw-slider { margin: 0; }
.zw-adjust-opts { display: flex; flex-wrap: wrap; gap: .4rem; }
@media (max-width: 640px) {
    .zw-adjust-row { grid-template-columns: 1fr; }
    .zw-adjust-v { text-align: left; }
}

.zw-chip {
    padding: .35rem .7rem; border-radius: var(--radius-pill); font-size: .85rem; font-weight: 600;
    background: var(--bg); border: 1px solid var(--line); color: var(--ink-soft);
    cursor: pointer; font-family: inherit;
}
.zw-chip:hover { border-color: var(--line-strong); }
.zw-chip.is-on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }
.zw-chip.is-static { cursor: default; background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); }
.zw-chips { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1.25rem; }
.zw-center .zw-chips { justify-content: center; }

.zw-phases {
    list-style: none; margin: 1.5rem 0 0; padding: 0;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .5rem;
}
.zw-phases li {
    display: flex; align-items: center; gap: .55rem; font-size: .9rem; color: var(--ink-soft);
    padding: .5rem .7rem; background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
}
.zw-phase-n {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 1.5rem; height: 1.5rem; border-radius: 50%; font-size: .75rem; font-weight: 700;
    background: var(--accent-soft); color: var(--accent-ink);
}

/* ---------- hand-off ---------- */
.zw-handoff { display: flex; flex-direction: column; gap: .5rem; max-width: 24rem; margin: 1.75rem auto 0; text-align: left; }
.zw-handoff-label { font-size: .85rem; font-weight: 600; color: var(--ink-soft); }
.zw-handoff-input {
    width: 100%; padding: .75rem .9rem; font: inherit; font-size: 1rem;
    background: var(--bg-elev); border: 1px solid var(--line-strong); border-radius: var(--radius); color: var(--ink);
}
.zw-handoff-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.zw-handoff-go { margin-top: .35rem; padding: .8rem 1.2rem; font-size: .98rem; }
.zw-handoff-hint { margin: .55rem 0 0; font-size: .82rem; color: var(--ink-mute); }
.zw-handoff-alt { margin: .9rem 0 0; font-size: .93rem; color: var(--ink-soft); }
.zw-handoff-alt a { color: var(--accent-ink); font-weight: 600; }
.zw-handoff-alt a:hover { color: var(--accent); }
.zw-handoff-note { margin: 1.25rem 0 0; font-size: .82rem; line-height: 1.5; color: var(--ink-mute); }
/* #981: the server refused today's draft - said where the route out is chosen, not in the small print */
.zw-handoff-refused {
    max-width: 24rem; margin: 1.25rem auto 0; padding: .65rem .85rem; text-align: left;
    font-size: .88rem; line-height: 1.5; color: var(--ink);
    background: var(--accent-soft); border-left: 3px solid var(--accent); border-radius: var(--radius);
}

/* ---------- footer nav ---------- */
.zw-nav {
    display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap;
    margin-top: clamp(1.75rem, 4vw, 2.5rem);
}
.zw-nav-right { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.zw-nav-center { justify-content: center; }
/* "Naprej" waits for the screen to be answered. There is no error message anywhere in this wizard - the
   button simply looks unavailable until it is, which is the whole difference between guiding and nagging. */
.zw-nav .btn:disabled { opacity: .45; cursor: not-allowed; }

/* Hand-off: the "ali" rule between the e-mail form and the Google button, and the button itself. */
.zw-handoff-or {
    display: flex; align-items: center; gap: .75rem;
    max-width: 24rem; margin: 1.25rem auto .25rem;
    color: var(--ink-mute); font-size: .82rem;
}
.zw-handoff-or::before, .zw-handoff-or::after {
    content: ""; flex: 1; height: 1px; background: var(--line);
}
/* Google leads the hand-off (it is the route that skips the inbox), so it sits directly under the
   summary rather than below a divider. */
.zw-handoff-google { max-width: 24rem; margin: 1.25rem auto 0; width: 100%; justify-content: center; }
.zw-handoff-fast { margin: .5rem 0 0; font-size: .82rem; color: var(--ink-mute); }

/* ---------- "kdaj začnem" on the plan screen ---------- */
.zw-start {
    margin-top: 1.5rem; padding: .9rem 1rem;
    background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
}
.zw-start-k {
    display: block; margin-bottom: .5rem;
    font-size: .85rem; font-weight: 600; color: var(--ink-soft);
}
.zw-start-opts { display: flex; flex-wrap: wrap; gap: .4rem; }
.zw-start-note { margin: .6rem 0 0; font-size: .82rem; color: var(--ink-mute); }

/* ---------- profesionalni delovni prostor (nadzorna plošča, planer čez gradbišča) ----------
   Uses the flat admin-page tokens (.phase-header/.kpi-*/.chart-*) rather than the notebook skin: the
   journal stays skeuomorphic INSIDE a project, a board over thirty sites has to be dense. Mobile-first
   per načelo 11 - the sites table is desktop-only and collapses to a card column on a phone, because
   there is no table-to-card pattern anywhere else in this codebase to inherit. */
.pro-portfolio { display: flex; flex-direction: column; gap: 1.5rem; }

.pro-board-block { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; }
.pro-board-list { list-style: none; margin: 0; padding: 0; }
.pro-board-row {
    display: flex; align-items: flex-start; gap: .75rem; justify-content: space-between;
    padding: .55rem 0; border-top: 1px solid var(--line);
}
.pro-board-row:first-child { border-top: 0; }
.pro-board-row.is-alert { color: var(--danger, #0a0a0a); }
.pro-board-main { display: flex; flex-direction: column; gap: .1rem; min-width: 0; text-decoration: none; color: inherit; }
/* A whole row is one link, and a link that wraps two lines drew TWO lines on hover: the global
   a:hover border under the entire box, plus an underline under the title - exactly the double underline
   the link rules at the top of this file exist to prevent. The row answers with colour instead. */
.pro-board-main, .pro-board-main:hover { border-bottom-color: transparent; }
.pro-board-main:hover strong { text-decoration: none; color: var(--accent-ink, var(--accent)); }
.pro-board-sub { font-size: .78rem; color: var(--ink-mute); }
.pro-board-side { flex: none; font-size: .82rem; white-space: nowrap; }

.kpi-card.is-alert { border-color: var(--danger, #0a0a0a); }
.kpi-card.is-alert .kpi-value { color: var(--danger, #0a0a0a); }

/* A counter that is also a door. It has to look pressable without becoming a fifth kind of button on a
   row of four identical tiles, so the tile is unchanged and only gains a hover lift and a quiet cue
   line - which is also what keeps the three plain counters beside it from looking broken. */
.kpi-card-link {
    font: inherit; text-align: left; cursor: pointer;
    transition: border-color .14s ease, box-shadow .14s ease, transform .14s ease;
}
.kpi-card-link:hover {
    border-color: var(--accent);
    box-shadow: 0 6px 16px -12px rgba(26, 26, 26, .55);
    transform: translateY(-1px);
}
.kpi-card-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.kpi-card-go { font-size: .74rem; font-weight: 600; color: var(--accent-ink); margin-top: .15rem; }
.kpi-card-link:hover .kpi-card-go { text-decoration: underline; }

/* -- Gradbisca v zivo: the camera strip at the top of the board -------------- */
.camera-strip { margin-bottom: 1.25rem; }
/* The block's shared heading rule underlines the whole row; here the pager rides on that same line. */
.camera-strip-head {
    display: flex; align-items: center; gap: .75rem;
    margin: 0 0 .85rem; padding-bottom: .6rem; border-bottom: 1px solid var(--line);
}
.camera-strip-head > .planner-title { flex: 1 1 auto; margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.camera-strip-pager { display: flex; align-items: center; gap: .3rem; flex: 0 0 auto; }
.camera-strip-count { font-size: .78rem; color: var(--ink-mute); font-variant-numeric: tabular-nums; margin-right: .2rem; }
.camera-strip-pager .icon-btn { width: 1.9rem; height: 1.9rem; font-size: 1.1rem; line-height: 1; }
.camera-strip-pager .icon-btn:disabled { opacity: .35; cursor: default; }

/* Four across on a desktop, two on a tablet, one on a phone. The count the arrows page by stays FOUR
   either way: it is a page of the list, not a row of the grid, so the pager keeps meaning the same
   thing when the tiles reflow. */
.camera-strip-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; }
@media (max-width: 1000px) { .camera-strip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .camera-strip-grid { grid-template-columns: 1fr; } }

.camera-tile { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
/* -- Skupine gradbisc: a frame per group around its tiles (2026-10-03) -- */
.site-group { margin: 0 0 1rem; min-width: 0; }
.site-group + .site-group { padding-top: .85rem; border-top: 1px dashed var(--line); }
.site-group-head { display: flex; align-items: flex-start; gap: .6rem; margin: 0 0 .6rem; min-width: 0; }
.site-group-titles { flex: 1 1 auto; min-width: 0; }
.site-group-name { margin: 0; font-size: .95rem; font-weight: 700; overflow-wrap: anywhere; }
.site-group.is-ungrouped .site-group-name { font-weight: 600; color: var(--ink-mute); }
.site-group-sum { margin: .15rem 0 0; font-size: .78rem; color: var(--ink-mute); overflow-wrap: anywhere; }
.site-group-empty { margin: 0; }
.site-group-new { flex: 0 0 auto; white-space: nowrap; }
.site-group-card { max-width: 30rem; }
.camera-tile-top { display: flex; align-items: center; gap: .35rem; min-width: 0; }
.camera-tile-top .camera-tile-name { flex: 1 1 auto; min-width: 0; }
.camera-tile-top .task-menu-btn { width: 2rem; height: 2rem; }
.camera-tile-phase { font-size: .74rem; color: var(--ink-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.camera-tile-name {
    font-size: .82rem; font-weight: 600; color: var(--ink); text-decoration: none;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* A link, but never an underlined one: the name is a caption sitting on a picture, and a rule under it
   cuts the tile away from the frame below. Hover moves the COLOUR instead - enough to say it is a way
   into the gradbisce without turning the strip into a list of hyperlinks.

   The line has to be cancelled on BORDER-BOTTOM, not on text-decoration. This app does not underline
   links at all: `a` carries `text-decoration: none !important` plus a transparent bottom border, and
   `a:hover` colours that border in. So a `text-decoration: none` here overrode nothing and the hover
   rule kept drawing its line. */
.camera-tile-name:hover,
.camera-tile-name:focus-visible {
    color: var(--accent-ink); border-bottom-color: transparent;
}
/* Every tile is the same rectangle whatever is in it - a picture, a spinner or an invitation - so the
   strip does not change height as the answers arrive one at a time. */
.camera-tile-body {
    position: relative; aspect-ratio: 4 / 3; width: 100%; overflow: hidden;
    border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-sunk, rgba(0,0,0,.04));
}
.camera-tile-body.is-wait,
.camera-tile-body.is-empty {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem;
    font-family: var(--font-sans); font-size: .78rem; color: var(--ink-mute); text-align: center;
    padding: .5rem;
}
.camera-tile-body.is-empty {
    cursor: pointer; border-style: dashed;
    transition: border-color .14s, color .14s, background .14s;
}
.camera-tile-body.is-empty:hover { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); }
.camera-tile-body.is-empty .icon { color: var(--ink-mute); }
.camera-tile-body.is-empty:hover .icon { color: var(--accent); }
.camera-tile-empty-title { font-weight: 600; }
.camera-tile-empty-cta { font-size: .74rem; text-decoration: underline; }
/* No camera yet: a house elevation on grid paper stands in for the picture. Line work in currentColor,
   so the hover's accent and the dark theme recolour it with the text. The grid sits on ::before because
   .is-empty:hover resets the `background` shorthand. */
.camera-tile-body.is-house { justify-content: flex-end; padding-bottom: .55rem; }
.camera-tile-body.is-house::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image:
        linear-gradient(color-mix(in srgb, var(--line) 70%, transparent) 1px, transparent 1px),
        linear-gradient(90deg, color-mix(in srgb, var(--line) 70%, transparent) 1px, transparent 1px);
    background-size: 14px 14px; background-position: -1px -1px;
}
.camera-tile-house {
    position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%);
    width: 68%; max-height: 66%; opacity: .75;
    fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.camera-tile-house-dim { stroke-width: 1; opacity: .7; }
.camera-tile-body.is-house:hover .camera-tile-house { opacity: 1; }
.camera-tile-body.is-house .camera-tile-empty-cta { position: relative; font-weight: 600; }
.camera-tile-spin {
    width: 1.1rem; height: 1.1rem; border-radius: 50%;
    border: 2px solid var(--line-strong); border-top-color: var(--accent);
    animation: camera-tile-spin .8s linear infinite;
}
@keyframes camera-tile-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .camera-tile-spin { animation-duration: 2.4s; } }
/* The live viewer fills the tile: it was drawn for the notebook cover, where its own taped frame
   supplies the height. Here the tile is the frame. */
.camera-tile-body .cover-hero-live { position: absolute; inset: 0; height: 100%; }
.camera-tile-body .cover-hero-live-img,
.camera-tile-body .cover-hero-live-base { width: 100%; height: 100%; object-fit: cover; }
/* On a tile this small the badge and the name plate are the only chrome worth keeping. */
.camera-tile-body .cover-hero-live-badge { font-size: .62rem; }
.camera-tile-body .cover-hero-live-name { font-size: .68rem; }

/* "Nalagam sliko kamere …" and "Kamera ni dosegljiva.", inside a tile.

   Both are drawn for the notebook cover as a small plate centred on a big picture: absolutely
   positioned at left/top 50 % with no width of their own, so they are as wide as their longest line.
   That is fine across a cover and wrong in a 4:3 tile a quarter of that width - the plate grew past
   both edges, the tile's overflow:hidden cut it off, and the sentence about ffmpeg's first frame was
   sliced down the middle. So in a tile the plate stops being a plate: it becomes the whole face of the
   camera, and the text wraps inside it the way text should. */
.camera-tile-body .cover-hero-live-wait,
.camera-tile-body .cover-hero-offline {
    position: absolute; inset: 0; left: 0; top: 0; transform: none;
    width: 100%; height: 100%; box-sizing: border-box;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: .35rem; padding: .6rem .7rem; border-radius: 0;
    font-size: .74rem; line-height: 1.35; text-align: center;
    white-space: normal; overflow-wrap: anywhere;
}
.camera-tile-body .cover-hero-live-wait em,
.camera-tile-body .cover-hero-offline em { font-size: .68rem; line-height: 1.3; }

/* -- A tile's state and progress (NomiFac #31, 2026-10-09) --
   The picture is framed in the colour of how the house stands - green on plan, red when work is late, amber
   when it is stuck or has no plan (SiteHealth: the same rule as the Stanje column of the table) - and the foot
   says how far the house is. One custom property carries the colour, so the frame, the bar and the word
   cannot disagree. After the .is-empty rules on purpose: the house is a way into the plan now, not an
   invitation to add a camera, so its frame is solid like every other. */
.camera-tile { --tile-state: var(--ok); --tile-state-ink: var(--ok); }
.camera-tile.is-late { --tile-state: #b65c4a; --tile-state-ink: #9a3f2e; }
.camera-tile.is-blocked,
.camera-tile.is-unplanned { --tile-state: #d9a441; --tile-state-ink: #85590f; }
.camera-tile .camera-tile-body { border: 2px solid var(--tile-state); }
.camera-tile-foot { display: flex; align-items: center; gap: .45rem; min-width: 0; font-size: .74rem; line-height: 1.2; }
.camera-tile-progress {
    flex: 1 1 auto; min-width: 2.5rem; height: 6px; border-radius: var(--radius); overflow: hidden;
    background: color-mix(in srgb, var(--tile-state) 18%, var(--line));
}
.camera-tile-progress-fill { display: block; height: 100%; background: var(--tile-state); border-radius: inherit; }
.camera-tile-pct { flex: 0 0 auto; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink-soft); }
.camera-tile-state {
    flex: 0 1 auto; min-width: 0; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-weight: 600; color: var(--tile-state-ink);
}
/* The tile's ⋯ is the whole site's menu now (seven to nine rows): opened from a tile low on a phone it ran past
   the bottom of the screen. Bounded to the viewport, it scrolls inside instead. */
.camera-tile-top .task-menu-pop { max-height: min(70vh, 34rem); overflow-y: auto; }


/* ── Naročila on the board ───────────────────────────────────────────────────── */
/* Orders no longer have a table of their own on the board - they fold under their own gradbišče (see
   .pro-site-detail). What survives is the date's treatment, which is the one thing in that list read as
   a number rather than as a name. */
.pro-order-by { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.pro-board-row.is-alert .pro-order-by { color: var(--danger, #0a0a0a); font-weight: 600; }

/* Filters + sortable headers on the sites list. Both are used on a phone too - the filters apply to
   the card column just as much as to the table - so the chips carry the same 44 px floor as everything
   else in the professional workspace. */
.pro-filters { display: flex; flex-wrap: wrap; gap: .35rem; margin: .5rem 0 .75rem; }
.pro-filter {
    font: inherit; font-size: .8rem; font-weight: 600; color: var(--ink-soft);
    background: none; border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
    padding: .3rem .7rem; min-height: 2.25rem; cursor: pointer;
}
.pro-filter:hover { border-color: var(--accent); }
.pro-filter.is-on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }

.pro-sort {
    font: inherit; font-size: inherit; font-weight: inherit; color: inherit; text-align: left;
    background: none; border: 0; padding: 0; cursor: pointer; white-space: nowrap;
}
.pro-sort:hover { text-decoration: underline; }
.pro-sort.is-on { color: var(--accent-ink); }
.pro-sort-caret { font-size: .7rem; }

/* Sites: a table with room, a card column without. */
.pro-sites-table { display: none; }
.pro-site-row { cursor: pointer; }
.pro-site-row:hover { background: var(--bg-sunk, rgba(0,0,0,.03)); }

/* ── Naročila and Blokirano, folded under the gradbišče they belong to ────────────────────────────── */
/* The hinge: a caret that turns, sitting in the name cell before the name. Small, quiet, and its own
   target - the row around it opens the site, so this has to look like a different gesture. */
.pro-site-toggle {
    float: left; margin: -.1rem .45rem 0 0;
    width: 1.4rem; height: 1.4rem; padding: 0; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1rem; line-height: 1; color: var(--ink-mute);
    background: none; border: 1px solid transparent; border-radius: var(--radius);
    transition: transform .15s ease, color .14s, background .14s, border-color .14s;
}
.pro-site-toggle:hover { color: var(--accent-ink); background: var(--accent-soft); border-color: var(--accent); }
.pro-site-toggle.is-open { transform: rotate(90deg); color: var(--accent-ink); }
/* An open row and its detail read as ONE block, so the row keeps the hover tint while the fold is out. */
.pro-site-row.is-open { background: var(--bg-sunk, rgba(0,0,0,.03)); }
.pro-site-row.is-open td { border-bottom-color: transparent; }
.pro-site-detail > td {
    padding: 0 1.15rem 1rem; background: var(--bg-sunk, rgba(0,0,0,.03));
    border-bottom: 1px solid var(--line);
}
/* Two lists side by side: they answer different questions ("what must I order" / "what is stuck"), and
   stacked they turned every open row into a page of its own. */
.pro-site-detail-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 2rem; }
@media (max-width: 1100px) { .pro-site-detail-cols { grid-template-columns: 1fr; } }
.pro-site-detail-col h3 {
    margin: 0 0 .35rem; font-size: .78rem; font-weight: 700; letter-spacing: .04em;
    text-transform: uppercase; color: var(--ink-mute);
}
.pro-site-detail-col .pro-board-row { padding: .4rem 0; }
.pro-site-detail-col .pro-board-row:first-child { border-top: none; }
.pro-site-detail-col .pro-muted { padding: .15rem 0; }

/* The same fold on the phone card, where the table does not exist. */
.pro-site-card-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.pro-site-card-actions .btn { flex: 1 1 auto; }
.pro-site-card-detail { margin-top: .6rem; padding-top: .6rem; border-top: 1px solid var(--line); }
.pro-site-card-detail h3 {
    margin: .5rem 0 .25rem; font-size: .74rem; font-weight: 700; letter-spacing: .04em;
    text-transform: uppercase; color: var(--ink-mute);
}
.pro-site-card-detail h3:first-child { margin-top: 0; }
.pro-site-cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.pro-site-card { border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem .8rem; }
.pro-site-card.is-alert { border-color: var(--danger, #0a0a0a); }
.pro-site-card a { text-decoration: none; color: inherit; display: block; }
.pro-site-card-head { display: flex; flex-direction: column; gap: .1rem; margin-bottom: .45rem; }
.pro-site-card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-top: .45rem; }

@media (min-width: 900px) {
    .pro-sites-table { display: block; }
    .pro-site-cards { display: none; }
}

/* ---------- professional navigation + the revived project switcher ---------- */
/* .pro-nav holds only the site switcher since the account menu took the board/planer/pomočnik/imenik links
   (2026-10-05). It must never be an overflow container: that clips the switcher's dropdown. .pro-nav-link
   stays for "Moje delo" (NavMenu), which is dressed as a bar entry. */
.pro-nav { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; margin-left: .75rem; }
.pro-nav-link {
    padding: .35rem .6rem; border-radius: var(--radius); text-decoration: none;
    color: var(--ink-mute); font-size: .85rem; font-weight: 600; white-space: nowrap;
}
.pro-nav-link:hover { background: var(--bg-sunk, rgba(0,0,0,.04)); color: var(--ink); }
.pro-nav-link.is-active { color: var(--ink); background: var(--bg-sunk, rgba(0,0,0,.06)); }
/* The global a:hover draws a bottom border as its underline; a nav entry answers hover with its own
   background, so the line under "Moje delo" (and the others) read as a stray link style. */
.pro-nav-link, .pro-nav-link:hover { border-bottom-color: transparent; }

.project-switch { position: relative; }
/* The toggle IS the account menu's toggle (.nav-user-toggle) - this only caps the width, because a
   gradbišče name is longer than a person's. */
.project-switch-btn { max-width: 14rem; }
/* The name gives way, not the row: without this a long gradbišče name overflows the capped button and
   pushes the account cluster out of the bar. */
.project-switch-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The panel IS .nav-dropdown-menu; what is added here is what the account menu never needed - a scroll
   cap for thirty gradbišč, and a z-index above the professional bar. */
.project-switch-menu { max-height: 22rem; overflow-y: auto; z-index: 40; }
/* A field, shaped like the rows under it. The pill (999px) was borrowed from the filter chips, where a
   capsule means "one of several toggles"; here it is the one place you TYPE, and a capsule beside a
   column of square-cornered rows read as a stray control that had wandered in. Same corner radius and
   the same .75rem inset as a row, so the box and the list share one left edge. */
.project-switch-search {
    width: 100%; box-sizing: border-box; padding: .5rem .75rem; margin-bottom: .35rem;
    font-family: var(--font-sans); font-size: .92rem; line-height: 1.35;
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    background: var(--bg); color: var(--ink);
}
.project-switch-search:focus { outline: none; border-color: var(--accent); }
.project-switch-search::placeholder { color: var(--ink-mute); }
/* The rows ARE .nav-dropdown-item, and they have to READ as the account menu's rows a centimetre away.

   Two bugs lived in the old pair of lines. The base rule is .nav-dropdown-menu .nav-dropdown-item
   (specificity 0,2,0) and sets align-items: baseline for the phase list's text+count layout; this
   selector was a bare .project-switch-item (0,1,0), so its align-items: center never applied - the name
   sat on the baseline at the TOP of the row. And min-height: 2.75rem stretched that row half a line
   taller than every other menu row in the bar, which is what made the gap underneath the text visible.

   So: match the account menu's height on a mouse, and keep the 44 px tap target only where it is
   actually needed - a coarse pointer, which is the one-handed-on-site case it was written for. */
.nav-dropdown-menu .project-switch-item {
    width: 100%; text-align: left; cursor: pointer;
    display: flex; align-items: center; min-height: 2.25rem;
}
@media (pointer: coarse) {
    .nav-dropdown-menu .project-switch-item { min-height: 44px; }
}
.nav-dropdown-menu .project-switch-item[aria-selected="true"] { background: var(--bg); color: var(--ink); }
/* "+ Novo gradbišče" closes the list of sites: an action, not one more site. */
.project-switch-new { color: var(--accent); font-weight: 600; }
.project-switch-empty { padding: .5rem .55rem; }

@media (max-width: 720px) {
    .pro-nav { gap: .2rem; }
    .pro-nav-link { padding: .3rem .45rem; font-size: .8rem; }
}

/* ── The professional navbar: one row, always ─────────────────────────────────────────────────────
   Logo, the site switcher (and the task search inside a gradbišče), then the account cluster: Pomoč, the
   firm's account menu (AccountMenu - the board, planer, pomočnik, imenik, nastavitve) and the user menu.
   It must never wrap: a second row makes the bar ~2× --nav-h and every viewport-height page under it
   overflows. */
.app-nav-pro .app-nav-inner { flex-wrap: nowrap; gap: .75rem; }
.app-nav-pro .journal-toolbar { margin-left: .75rem; }
.app-nav-pro .nav-user { padding-left: .75rem; }
/* Shrinkable - it gives way before the account cluster does (the switcher's name ellipsises). */
.app-nav-pro .pro-nav { flex: 0 1 auto; min-width: 0; flex-wrap: nowrap; margin-left: 0; }

.pro-nav-link { display: inline-flex; align-items: center; gap: .4rem; }
.pro-nav-link .icon { flex: none; }

/* The person's menu goes to its avatar on every pro width - the firm's account menu beside it carries the
   name that matters there. The person's name is the first line of their dropdown, and both buttons keep
   their title/aria-label. */
.app-nav-pro .nav-tour-label,
.app-nav-pro .nav-user-label { display: none; }
.app-nav-pro .nav-tour-btn { padding: .45rem; }

/* The firm's account menu (AccountMenu), left of the user menu: the same pill, the firm's name and a PRO badge.
   It is the professional workspace's navigation, so it keeps its name on a desktop bar; below that the badge
   alone (the name stays in the button's title). */
.nav-account-dropdown { position: relative; }
.nav-account-toggle { gap: .35rem; padding: .3rem .5rem; }
.nav-account-dropdown.open .nav-account-toggle { color: var(--ink); background: var(--bg-elev); border-color: var(--line-strong); }
.nav-account-label { max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-account-badge {
    font-size: .66rem; font-weight: 700; letter-spacing: .06em; padding: .1rem .38rem; border-radius: var(--radius-pill);
    background: var(--accent); color: #fff; line-height: 1.3;
}
.nav-account-menu { left: auto; right: 0; min-width: 15rem; }
.nav-account-menu .nav-dropdown-item { align-items: center; gap: .6rem; width: 100%; background: none; text-align: left; cursor: pointer; }
.nav-account-menu .nav-dropdown-ico .icon { display: block; }

/* "Moje delo" is named on the desktop bar; the switcher has the room the link row used to take. */
.app-nav-pro .pro-nav-label { display: inline; }
.app-nav-pro .pro-nav { gap: .3rem; }
.app-nav-pro .pro-nav-link { padding: .4rem .5rem; }
.app-nav-pro .project-switch-btn { max-width: 16rem; }
/* Inside a gradbišče the row belongs to the task search and the switcher that names the site you are on;
   the firm's name on the account button gives way to them. */
.app-nav-compact .pro-nav-label,
.app-nav-compact .nav-account-label { display: none; }
.app-nav-compact .journal-toolbar { min-width: 11rem; }
.app-nav-compact .pro-nav { flex: 0 0 auto; }
/* Under the desktop bar the words come off: icons and the PRO badge, with their title/aria-label. */
@media (max-width: 1080px) {
    .app-nav-pro .pro-nav-label,
    .app-nav-pro .nav-account-label { display: none; }
    .app-nav-pro .project-switch-btn { max-width: 11rem; }
}
/* Phones: the brand shrinks with the bar (the global 760px rule); the switcher shrinks rather than squeeze
   the account cluster. */
@media (max-width: 760px) {
    .app-nav-pro .app-nav-inner { gap: .6rem; }
    .app-nav-pro .nav-user { padding-left: .5rem; margin-left: auto; }
    .app-nav-pro .pro-nav, .app-nav-compact .pro-nav { flex: 0 1 auto; min-width: 0; }
    .app-nav-pro .project-switch-btn { max-width: 7rem; }
    /* The search is a button here (see "navbar search is a button on phones"): it needs no width of its
       own, and the rules above that reserve one would bring the squeeze back. */
    .app-nav-pro .journal-toolbar, .app-nav-compact .journal-toolbar { min-width: 0; margin-left: auto; }
}

/* ---------- gradbeni dnevnik (K9) ----------
   Lives INSIDE a project, on the notebook page, so it keeps the journal skin rather than the flat board
   tokens. The month strip is a row of day chips that scrolls horizontally on every width - a builder
   fills this in at the end of a day, on site, on a phone, so the chips are 44 px tap targets and the
   editable fields come FIRST, above everything the app already wrote. */
.pro-diary { display: flex; flex-direction: column; gap: 1rem; }

.diary-strip { display: flex; align-items: center; gap: .5rem; }
.diary-nav {
    background: none; border: 1px solid var(--line-strong); border-radius: var(--radius);
    color: inherit; font: inherit; cursor: pointer;
    min-width: 44px; min-height: 44px; line-height: 1;
}
.diary-nav:disabled { opacity: .4; cursor: default; }
.diary-month { font-family: var(--font-serif); font-size: 1.1rem; font-weight: 400; }
.diary-export { margin-left: auto; font-size: .85rem; }

.diary-days {
    display: flex; gap: .3rem; overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding-bottom: .3rem;
}
.diary-day {
    flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: .05rem;
    background: none; border: 1px solid var(--line); border-radius: var(--radius);
    color: inherit; font: inherit; cursor: pointer;
    min-width: 2.9rem; min-height: 3.4rem; padding: .25rem .3rem;
}
.diary-day.is-quiet { opacity: .55; }               /* nothing recorded - still reachable */
.diary-day.is-future { opacity: .35; }
.diary-day.is-selected { border-color: var(--accent); background: var(--accent-soft); }
.diary-day-dow { font-size: .62rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-mute); }
.diary-day-num { font-size: 1rem; font-weight: 600; line-height: 1.1; }
.diary-day-flags { display: flex; align-items: center; gap: .15rem; min-height: .55rem; }
.diary-dot { width: .32rem; height: .32rem; border-radius: 50%; background: var(--accent); }
.diary-check { font-size: .6rem; color: var(--ok, #4f7d5a); line-height: 1; }

.diary-sheet { display: flex; flex-direction: column; gap: .9rem; }
.diary-heading { font-family: var(--font-serif); font-size: 1.35rem; margin: .4rem 0 0; }

.diary-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: .75rem; }
.diary-field { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.diary-field-wide { grid-column: 1 / -1; }
.diary-label { font-size: .78rem; font-weight: 600; color: var(--ink-soft); }
.diary-input {
    font: inherit; font-size: .9rem; color: inherit;
    background: var(--bg-elev); border: 1px solid var(--line-strong); border-radius: var(--radius);
    padding: .5rem .6rem; min-height: 44px; width: 100%;
}
.diary-textarea { min-height: 4.5rem; resize: vertical; }
.diary-hint { font-size: .74rem; color: var(--ink-mute); }
.diary-link {
    background: none; border: 0; padding: 0 .2rem; font: inherit; font-size: .74rem;
    color: var(--accent-ink); text-decoration: underline; cursor: pointer;
}
.diary-actions { display: flex; gap: .5rem; }
.diary-locked, .diary-empty { margin: 0; }

.diary-block { display: flex; flex-direction: column; gap: .3rem; }
.diary-block-title {
    font-size: .95rem; font-weight: 700; margin: .3rem 0 0;
    padding-bottom: .2rem; border-bottom: 1px dashed var(--line-strong);
}
.diary-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; }
.diary-entry { display: flex; gap: .5rem; align-items: baseline; font-size: .88rem; }
.diary-time { flex: none; font-size: .72rem; color: var(--ink-mute); font-variant-numeric: tabular-nums; }
.diary-entry-body { display: flex; flex-wrap: wrap; gap: .3rem; min-width: 0; }
.diary-entry-text { color: var(--ink-soft); }
.diary-person { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem; font-size: .88rem; }
.diary-role, .diary-muted { font-size: .74rem; color: var(--ink-mute); }

.diary-photos { display: flex; flex-wrap: wrap; gap: .5rem; }
.diary-photo { margin: 0; width: 8rem; }
.diary-photo img { width: 100%; height: 6rem; object-fit: cover; border-radius: var(--radius); }
.diary-photo figcaption { font-size: .7rem; color: var(--ink-mute); margin-top: .2rem; }

@media (max-width: 720px) {
    .diary-form { grid-template-columns: 1fr; }
    .diary-photo { width: calc(50% - .25rem); }
}

/* ============================================================================
   Profesionalni delovni prostor - oblikovni prehod
   ----------------------------------------------------------------------------
   The pro surface was built on the flat admin tokens and never got a rhythm of
   its own. Measured on the board at 1440 px before this block existed:

     .pro-portfolio      computed display:block, so its `gap` did nothing and the
                         three panels sat at gapAbove = 0 px - flush, one slab
     .kpi-grid           laid four cards into SIX tracks (auto-fill keeps empty
                         ones), stranding a third of the row
     body text           ran ~139 characters per line
     .chart-bars         the admin BAR-CHART frame (height: 7rem) was reused as a
                         progress bar inside a table cell, making every site row
                         ~160 px tall with the percentage stranded at its foot

   The rule this is built on: SPACE separates kinds, RULES separate instances.
   Before, one hairline divided every row AND every section, so nothing grouped.
   Sections are now told apart by air; rows inside a section keep the hairline.

   Scoped to the professional pages - nothing here may reach the journal, the
   admin analytics or the landing, so every selector sits under a pro root.
   ============================================================================ */

/* ── Rhythm ───────────────────────────────────────────────────────────────────
   Margin-based rather than a container `gap`: the container computes to block on
   this page, so a gap silently does nothing. The owl selector spaces siblings
   without leaving a trailing margin. */
.pro-portfolio > * + * { margin-top: 1.75rem; }
.pro-portfolio > .kpi-grid + * { margin-top: 1.5rem; }

/* ── The numbers row ─────────────────────────────────────────────────────────*/
.pro-portfolio .kpi-grid {
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    margin-bottom: 0;
}
.pro-portfolio .kpi-value { font-size: 2rem; letter-spacing: -.02em; }
.pro-portfolio .kpi-label { color: var(--ink-mute); font-weight: 500; }

/* ── Panels ───────────────────────────────────────────────────────────────────
   Room to breathe, and a heading that reads as a boundary rather than as bold
   body text: it was 1rem with no space above it. */
.pro-board-block { padding: 1.15rem 1.35rem 1.25rem; }
.pro-board-block > .planner-title,
.pro-board-block > h2 {
    font-size: 1.05rem; font-weight: 700; letter-spacing: -.01em;
    margin: 0 0 .85rem; padding-bottom: .6rem; border-bottom: 1px solid var(--line);
}

/* ── Rows: the hairline belongs to the instance, and the row is a tap target ──*/
.pro-board-row { padding: .7rem 0; gap: 1.25rem; }
.pro-board-main { gap: .2rem; }
.pro-board-sub { line-height: 1.5; }
.pro-board-side { color: var(--ink-mute); font-variant-numeric: tabular-nums; }

/* ── Measure ──────────────────────────────────────────────────────────────────
   Explanatory text was set across the full 1203 px column. Prose caps at ~72
   characters; a row's own title may still run wide, because a task name is
   scanned rather than read. */
.pro-board-sub,
.pro-muted { max-width: 72ch; }
/* ...except inside the task panel, which is already a narrow column inside a modal. There the cap cut
   the sentence off at half the panel and left the right half empty, which reads as a layout fault
   rather than as a comfortable measure. */
.pro-panel .pro-muted { max-width: none; }
/* ...and on Ekipa in dostop, where each block's lede (Investitor, Nadzornik, Delavci) stood in a half-width
   column above an invite row that runs the whole page. */
.team-page .pro-muted { max-width: none; }
/* ...and except a ROW's own second line ("rabimo ga 12. 9. · Betonarna · Betoniranje temeljne plošče").
   That is a scanned line, not prose: on the wide notebook spread the 72ch measure broke it a third of the
   way across and left two thirds of the row empty. The cap stays where it belongs - on paragraphs. */
.pro-row-main .pro-muted { max-width: none; }

/* ── Planner sections ─────────────────────────────────────────────────────────
   "Opozorila", "Delo po dnevih", "Blokirano" are different KINDS of thing, so
   they get air above them; inside each, rows keep their hairlines. */
/* ── "Ta teden" on the two-page spread ────────────────────────────────────────────────────────────
   It is the third tab of one tool, so it opens on the same landscape notebook as the plan and the
   board. One adjustment follows from what is ON it: its content is short lists rather than a Gantt, so
   it keeps a sensible floor instead of the spread's 1200 px. The centre crease STAYS - it is the same
   open notebook as the other two tabs, and a spread without its fold reads as a plain white page.
   .planner-horizon is the hook: it exists on this page and nowhere else in the notebook. (It used to be
   .planner-actions - the row of three buttons that has since folded into the corner ⋯.) */
.journal-page.journal-page-spread:has(.planner-horizon) { min-height: 34rem; }
/* The positioning context the view tabs and the corner ⋯ are measured against - the same job
   .schedule-page does on the plan, so both tabs strips land in exactly the same place. */
.planner-page { position: relative; }
/* Horizon pills on the left, the "who arranged this plan" line on the right - out from under the corner
   controls, which are absolutely positioned in the header's right column. */
/* The forecast sits between the heading and the horizon pills, with air on both sides: it is context
   for everything below it, not a block of the plan. */
.planner-page .weather-widget { margin: 0 0 1.25rem; }

/* A control, not decoration. Five bare pills between the heading and the plan read as labels of
   something rather than as the thing that sets how far ahead the page looks - so the page was taken for
   a fixed report and the horizon went unused. Now: a name for what they set, a frame that says the five
   are one control, and targets big enough to hit standing on a site. */
.planner-horizon {
    display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem;
    margin: 0 0 1.1rem; padding: .5rem .7rem;
    border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev);
}
.planner-horizon-label {
    display: inline-flex; align-items: center; gap: .35rem; flex: 0 0 auto;
    font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    color: var(--ink-mute);
}
.planner-horizon-label .icon { color: var(--accent); }
.planner-horizon-tabs { flex: 1 1 auto; padding-bottom: 0; }
/* Bigger than a filter chip: this is the page's primary control, and it is used with a glove on. */
.planner-horizon-tabs .pro-tab { min-height: 2.6rem; padding: .45rem 1.05rem; font-size: .85rem; }
.planner-horizon-tabs .pro-tab.is-active { box-shadow: 0 2px 8px -4px rgba(10, 10, 10, .8); }

/* The AI pass, while it runs. Small, centred, and NOT dismissable: it is a request that has already been
   spent, so the honest thing is to say what is happening rather than to offer a cancel that cannot. */
.planner-busy-card { width: min(26rem, 100%); padding: 1.25rem 1.4rem; }
.planner-busy { display: flex; align-items: flex-start; gap: .85rem; }
.planner-busy .btn-spinner { margin-top: .2rem; flex: none; color: var(--accent); }
.planner-busy p { margin: .3rem 0 0; }

/* Fullscreen: the same break-out the plan has, minus the Gantt-specific bits. */
.planner-page.is-fullscreen {
    position: fixed; inset: 0; z-index: 70; border: none;
    background-color: var(--bg-elev);
    background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 33px, var(--paper-line) 33px, var(--paper-line) 34px);
    overflow: auto;
    padding: 1.75rem clamp(1.5rem, 4vw, 4rem) 2.5rem;
}
/* No notebook edge to hang off in fullscreen: the tabs and the corner controls join the flow, right
   aligned, the way the plan's header does. */
.planner-page.is-fullscreen .schedule-view-tabs,
.planner-page.is-fullscreen .schedule-topctrls {
    position: static; justify-content: flex-end; margin: 0 0 1rem;
}


/* The week runs horizontally: as many day columns as the width takes, one under the other on a phone.
   auto-FIT, not auto-fill, and a wide minimum: with two days on the sheet the pair has to stretch across
   the whole spread - auto-fill left them as two narrow strips with the rest of the page empty, and a task
   title wrapped four times in a column it did not need to be that narrow. */
.planner-days {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(24rem, 1fr));
    gap: .75rem 2.5rem; align-items: start;
}
.planner-days .planner-day { margin-bottom: 0; }

/* Two columns, one per page of the spread: the gap straddles the centre crease. Left = the current task,
   right = warnings, orders, what is next, inspections, then what waits on it. */
.planner-split {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0 5rem; align-items: start;
}
.planner-col > .planner-block:first-child { margin-top: 1rem; }
/* Obdobje (left page) and the forecast (right page) share one row - the plan starts a band higher. The
   forecast's days shrink to the half-spread instead of scrolling sideways. */
/* Side by side they are one band: both a small title over a row of equal tiles, both the same height -
   the Obdobje buttons are drawn like the forecast's days (icon over word), bigger than a filter pill. */
.planner-topline { margin-bottom: .5rem; align-items: start; }
.planner-topline > .planner-col { display: flex; flex-direction: column; }
.planner-topline .planner-horizon {
    flex: 1 1 auto; margin: 0; padding: 0; border: none; background: none;
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
}
.planner-topline .planner-horizon-label {
    margin-bottom: .5rem; font-size: .82rem; font-weight: 600; letter-spacing: 0; text-transform: none;
    color: var(--ink-soft);
}
.planner-topline .planner-horizon-tabs {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .4rem;
    overflow: visible; padding-bottom: .3rem;
}
.planner-topline .planner-horizon-tabs .pro-tab {
    height: var(--topline-tile); min-height: 0; box-sizing: border-box; padding: .45rem .3rem;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .45rem;
    border-radius: var(--radius); background: var(--bg-elev); border-color: var(--line);
    font-size: .98rem; font-weight: 700; white-space: normal; text-align: center; line-height: 1.2;
}
.planner-topline .planner-horizon-tabs .pro-tab .icon { color: var(--accent); flex: none; }
.planner-topline .planner-horizon-tabs .pro-tab:hover { border-color: var(--accent); }
.planner-topline .planner-horizon-tabs .pro-tab.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.planner-topline .planner-horizon-tabs .pro-tab.is-active .icon { color: #fff; }
.planner-topline .weather-widget { margin-top: 0; flex: 1 1 auto; display: flex; flex-direction: column; }
.planner-topline .weather-days { align-items: center; }
/* The two heads are one height too, so the tiles under them start and end on the same lines: both
   rows stretch to the taller of the two (the forecast day), neither sets a height of its own. */
.planner-topline .weather-head,
.planner-topline .planner-horizon-label { min-height: 1.4rem; margin-bottom: .5rem; align-items: center; }
/* ONE height for both rows of tiles, set here rather than left to stretch: stretched, whichever side
   had more lines (a wrapped "Samo jutri") pushed the other one taller. */
.planner-topline { --topline-tile: 6.4rem; }
.planner-topline .weather-day {
    flex: 1 1 0; min-width: 3.2rem; padding: .35rem .15rem;
    height: var(--topline-tile); box-sizing: border-box; justify-content: center;
}
.planner-topline .weather-icon { font-size: 1.2rem; line-height: 1.3; }
@media (max-width: 1100px) { .planner-topline { row-gap: 1rem; } }
/* Half a spread is too narrow for days side by side - they stack. */
.planner-col .planner-days { grid-template-columns: minmax(0, 1fr); }
.planner-current-where {
    display: inline-block; margin: 0 0 .5rem;
    font-size: .8rem; font-weight: 600; color: var(--ink-mute); text-decoration: none;
}
.planner-current-where:hover { color: var(--accent); text-decoration: underline; }
.planner-blocked-lede { margin: 0 0 .6rem; font-size: .85rem; }
/* The task a warning, order, day entry or inspection belongs to - on top of the row, in the accent, so
   the line never floats without an owner. */
.planner-task-ref {
    display: flex; align-items: center; gap: .3rem; flex-wrap: wrap;
    margin: 0 0 .2rem; font-size: .78rem; line-height: 1.3;
    color: var(--accent); text-decoration: none;
}
.planner-task-ref .icon { flex: none; }
.planner-task-ref-phase { color: var(--ink-mute); }
.planner-task-ref-sep { color: var(--ink-mute); }
.planner-task-ref-name { font-weight: 700; }
/* Only the task name underlines, as on the rows that are one link - the global a:hover border would
   draw a second line under the whole "Faza › naloga". */
a.planner-task-ref:hover { border-bottom-color: transparent; }
a.planner-task-ref:hover .planner-task-ref-name,
.planner-link:hover .planner-task-ref-name,
.planner-prop-main:hover .planner-task-ref-name { text-decoration: underline; }
@media (max-width: 1100px) {
    .planner-split { grid-template-columns: minmax(0, 1fr); }
}

.planner-block { margin-top: 2rem; }
/* A soft band behind every block head (Miha, 2026-09-25): on a long spread the heads have to be found at
   a glance, and a hairline alone did not stop the eye. */
.planner-block > .planner-title,
.planner-accordion > summary.planner-title {
    font-size: 1.05rem; font-weight: 700; margin: 0 0 .75rem;
    padding: .5rem .75rem; border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--line) 40%, var(--bg-elev)); border-radius: var(--radius) var(--radius) 0 0;
}
.planner-day { margin-bottom: 1.25rem; }
.planner-day-head { margin-bottom: .35rem; }

/* ── A proposal is answered where it is read ──────────────────────────────────
   The plan used to be one all-or-nothing "Potrdi plan", with the per-row choice buried in a modal of
   checkboxes detached from the days they belonged to - so a plan that was right about four rows out of
   five was taken whole or thrown away whole. Each row now carries its own ✓/✕. */
.planner-prop { align-items: flex-start; gap: .5rem; }
.planner-prop-main {
    flex: 1 1 auto; min-width: 0;
    color: inherit; border-bottom: none; text-decoration: none;
}
.planner-prop-main:hover strong { color: var(--accent-ink, var(--accent)); }
/* What accepting this row would actually write. Muted, but never hidden - it IS the decision. */
.planner-prop-what { font-size: .78rem; color: var(--ink-mute); margin-top: .15rem; }
.planner-prop-actions { flex: none; display: flex; gap: .25rem; }
/* Auto width, not a 1.75rem square: the button carries a word beside its glyph now, and a fixed square
   clipped it. The min-width keeps the two the same size as each other while the words are hidden on a
   narrow column, so the pair never reads as one big button and one small one. */
.planner-prop-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .3rem;
    min-width: 1.75rem; height: 1.75rem; padding: 0 .45rem; cursor: pointer; line-height: 1;
    border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--bg); color: var(--ink-mute); font-size: .85rem; transition: all .12s;
}
.planner-prop-btn:hover { border-color: var(--ink); color: var(--ink); }
.planner-prop-btn.is-on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.planner-prop-btn.is-off { background: #f8e8e8; border-color: #d9b5b5; color: #7a2020; }
/* A declined row stays readable - it is still part of the week, it just will not be written. */
.planner-prop.is-off .planner-prop-main { opacity: .5; }
.planner-prop.is-off .planner-prop-main strong { text-decoration: line-through; }
/* The glyph keeps the lead, the word follows it. On a narrow column (a phone, or one page of the spread
   when the window is small) the word folds away and the title carries the meaning - the pair still reads
   as accept/reject because they sit side by side and only one is ever lit. */
.planner-prop-word { font-size: .76rem; font-weight: 600; }
@media (max-width: 900px) {
    .planner-prop-word { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
                         overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
}

.planner-actions-note { flex: 0 1 auto; font-size: .82rem; }
/* Every action on this page reads as one: a mark and a word. The bare-text buttons ("Naroči",
   "Naročeno", "Določi") were the only ones without the mark, so in a list whose every ROW starts with an
   icon they looked like leftover text rather than things to press. */
.planner-act { display: inline-flex; align-items: center; gap: .35rem; }
.planner-act .icon { flex-shrink: 0; }

/* The one sentence that says what the ✓/✕ on every row below actually decide. */
/* Across the section, like the week of day columns under it - the 72ch prose measure on .pro-muted
   stopped it at half the sheet, which read as a layout fault above a list that spans all of it. */
.planner-days-lede { margin: -.2rem 0 .7rem; font-size: .82rem; max-width: none; }
/* Where a material is on its way: naročeno → prevzeto → na gradbišču (or → dostava dobavitelja). The
   step still to happen carries the accent; the ones behind it are quiet. */
.delivery-steps { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .4rem; margin-top: .3rem; font-size: .78rem; }
.delivery-step { padding: .1rem .5rem; border-radius: var(--radius-pill); background: var(--bg-sunk, rgba(0,0,0,.05)); color: var(--ink-mute); }
.delivery-step.is-done { color: var(--ink-soft); }
.delivery-step.is-next { background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }
.delivery-arrow { color: var(--ink-mute); }
/* In its own section the summary already has the title's air above it. */
.planner-summary-block .planner-summary { margin-top: 0; }

/* ── Empty states get the same air as a populated panel, so a quiet site does
      not make the board look broken. ─────────────────────────────────────────*/
.pro-board-block > .pro-muted { margin: 0; padding: .35rem 0 .15rem; color: var(--ink-mute); }

/* ── Sites table ─────────────────────────────────────────────────────────────*/
/* overflow VISIBLE, not the .table-scroll default: the row's ⋯ opens an absolutely positioned popup,
   and a scroll container clips it (overflow-x:auto computes overflow-y to auto too, so the menu was cut
   off top and bottom, not just at the sides). The table only renders at >=900px and, a column lighter,
   fits there without scrolling - which is what made the scroll container disposable. */
.pro-sites-table { overflow: visible; }
/* SEPARATE, not collapse: the gap between two gradbišča below needs a transparent border that the row's
   own background does not paint into, and collapsed borders are shared between neighbouring cells - the
   8 px band would have been half the row above's and stayed tinted. No cell here carries a top border,
   so nothing doubles up when the borders stop collapsing. */
.pro-sites-table table { width: 100%; border-collapse: separate; border-spacing: 0; }
/* One <tbody> per gradbišče, so the gap goes BETWEEN tbodies: two open accordions ran their sunk
   backgrounds together into one long grey block and the eye could not tell whose naročila were whose.
   Inside a tbody the site row and its fold still touch - they are one thing. */
.pro-sites-table tbody + tbody > tr:first-child > td {
    border-top: .55rem solid transparent; background-clip: padding-box;
}
/* Several numeric columns side by side: at .75rem the words of one touched the next and the row read
   as one run-on line. */
.pro-sites-table th,
.pro-sites-table td { padding: .85rem 1.15rem; }
/* The header sits further off its rows than the rows sit from each other, so the strip reads as a
   heading rather than as the first row. */
.pro-sites-table thead th { padding-bottom: .65rem; }
/* first-of-type, not tbody: the table now carries one <tbody> per gradbišče, so "tbody tr:first-child"
   would give EVERY row the header's extra air instead of only the first one under it. */
.pro-sites-table tbody:first-of-type tr:first-child td { padding-top: 1rem; }
/* The outer cells used to have their side padding zeroed, to line the first column up with the block's
   own title. That alignment cost the row its margins: the name started hard against the left border and
   the ⋯ sat on the right one, so the table read as if it had burst its panel. Half the inner padding -
   enough to breathe, still visibly narrower than the block's 1.35rem so the title still leads. */
.pro-sites-table th:first-child,
.pro-sites-table td:first-child { padding-left: .55rem; }
.pro-sites-table th:last-child,
.pro-sites-table td:last-child { padding-right: .55rem; }
.pro-sites-table td { border-bottom: 1px solid var(--line); }
/* .report-costs-table thead th (0,1,2) sets ALL-CAPS and outranks a single-class
   selector, so "NASLEDNJI KORAK" shouted between sentence-case neighbours (the
   sortable ones are <button>s and never inherited it). */
.pro-sites-table .report-costs-table thead th {
    text-transform: none; letter-spacing: normal; background: none;
    font-size: .78rem; font-weight: 600; color: var(--ink-mute); white-space: nowrap;
    border-bottom: 1px solid var(--line-strong);
}
.pro-sites-table .report-costs-table th,
.pro-sites-table .report-costs-table td { vertical-align: middle; }
/* The name and its street were adjacent inline spans and ran together
   ("Vila RožnikCesta na Rožnik 12"). Two facts, two lines. */
.pro-site-name { display: block; font-weight: 600; }
.pro-site-addr { display: block; font-size: .78rem; color: var(--ink-mute); }
.pro-site-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* A rail, not a bar chart - see the note about .chart-bars at the top. */
/* ── Dogajanje: the audit trail ───────────────────────────────────────────────────────────────────
   Four columns that never wrap into each other: when, what kind, what happened (with the task under it)
   and WHO. The name is a column of its own because it is the reason the page exists. */
.pro-audit .audit-day + .audit-day { margin-top: 1.25rem; }
.audit-list { list-style: none; margin: 0; padding: 0; }
.audit-row {
    display: grid; grid-template-columns: 3.2rem 1.4rem minmax(0, 1fr) minmax(0, 12rem);
    align-items: start; gap: .75rem; padding: .6rem 0; border-top: 1px solid var(--line);
}
.audit-list > .audit-row:first-child { border-top: none; }
.audit-time { font-size: .8rem; color: var(--ink-mute); font-variant-numeric: tabular-nums; padding-top: .1rem; }
.audit-mark { display: inline-flex; justify-content: center; color: var(--accent); padding-top: .1rem; }
.audit-main { min-width: 0; }
.audit-what { font-size: .9rem; overflow-wrap: anywhere; }
.audit-task { font-size: .82rem; color: var(--ink-soft); overflow-wrap: anywhere; }
.audit-who {
    font-size: .85rem; font-weight: 600; text-align: right; overflow-wrap: anywhere;
    color: var(--ink-soft);
}
.audit-more { margin-top: 1rem; display: flex; justify-content: center; }
@media (max-width: 640px) {
    /* The name drops under the event rather than squeezing the sentence into three words. */
    .audit-row { grid-template-columns: 3.2rem 1.4rem minmax(0, 1fr); }
    .audit-who { grid-column: 3; text-align: left; font-weight: 500; }
}

/* ── The board's three charts ─────────────────────────────────────────────────────────────────────
   Hand-drawn: CSS bars, no chart library. Three shapes do not justify a dependency, these have to work
   on a 390 px screen and to print, and .chart-bars (a 7 rem vertical bar chart elsewhere in the app) is
   reused here as a thin rail, exactly as the sites table already does. */
.pro-charts {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(min(19rem, 100%), 1fr));
    gap: 1.25rem; margin-bottom: 1.5rem;
}
.pro-chart { min-width: 0; }

/* EVERY selector below sits under .pro-charts, and that is not decoration - it is the bug this block
   once was. `.chart-row`, `.chart-legend` and friends are ALSO the admin analytics page's own classes
   (app.css ~6154: .chart-row is the row of chart CARDS, a repeat(auto-fit, minmax(20rem, 1fr)) grid).
   Written unscoped and sitting at the end of the file, these won every specificity tie and turned
   /admin/analytics into a three-column grid of 7.5rem | 1fr | auto: the first card squeezed to a
   sliver, its sparkline flattened to a rail by `.chart-row .chart-bars`, the legend re-laid out. The
   page looked destroyed and nothing in the admin code had changed - the classic silent collision this
   section's own header warns about ("nothing here may reach the journal, the admin analytics or the
   landing, so every selector sits under a pro root").

   One row per gradbišče: name, rail, per cent. */
.pro-charts .chart-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.pro-charts .chart-row { display: grid; grid-template-columns: minmax(0, 7.5rem) 1fr auto; align-items: center; gap: .6rem; }
.pro-charts .chart-row-name {
    font-size: .82rem; color: inherit; text-decoration: none; border-bottom: none;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pro-charts .chart-row-name:hover { color: var(--accent-ink); }
.pro-charts .chart-row .chart-bars {
    display: block; height: .55rem; gap: 0; background: var(--line);
    border-radius: var(--radius-pill); overflow: hidden;
}
.pro-charts .chart-row .chart-fill { display: block; height: 100%; border-radius: var(--radius-pill); }
.pro-charts .chart-row-val { font-size: .78rem; color: var(--ink-mute); font-variant-numeric: tabular-nums; }

/* The open work as ONE bar: the question is what share of it is in trouble, not how many tasks. */
.pro-charts .chart-stack { display: flex; height: 1.15rem; border-radius: var(--radius-pill); overflow: hidden; background: var(--line); }
.pro-charts .chart-seg { display: block; height: 100%; }
.pro-charts .chart-seg.is-late, .pro-charts .chart-dot.is-late { background: #b65c4a; }
.pro-charts .chart-seg.is-blocked, .pro-charts .chart-dot.is-blocked { background: #8a8a8a; }
.pro-charts .chart-seg.is-soon, .pro-charts .chart-dot.is-soon { background: #d9a441; }
.pro-charts .chart-seg.is-ok, .pro-charts .chart-dot.is-ok { background: #7c9a6d; }
.pro-charts .chart-legend {
    list-style: none; margin: .75rem 0 0; padding: 0;
    display: flex; flex-wrap: wrap; gap: .35rem .9rem; font-size: .78rem; color: var(--ink-soft);
}
.pro-charts .chart-legend li { display: inline-flex; align-items: center; gap: .35rem; }
.pro-charts .chart-legend b { font-variant-numeric: tabular-nums; }
.pro-charts .chart-dot { width: .6rem; height: .6rem; border-radius: 50%; flex: none; }

/* Ordering deadlines per week. A grid, not a flex column, so the bar's percentage resolves against a
   track of definite height and cannot push the label out of the box.
   Scoped under .pro-charts for the same reason as above: `.chart-col` is also the admin analytics
   page's bar column. Unscoped, this grid + justify-items:center shrank every admin .chart-fill to
   zero width and all of /admin/analytics' bar charts went blank (gridlines and dates still showed). */
.pro-charts .chart-cols { display: flex; align-items: stretch; gap: .5rem; height: 9rem; }
.pro-charts .chart-col {
    flex: 1; min-width: 0; display: grid; grid-template-rows: auto 1fr auto;
    justify-items: center; gap: .25rem;
}
.pro-charts .chart-col-n { font-size: .72rem; color: var(--ink-mute); font-variant-numeric: tabular-nums; }
.pro-charts .chart-col-bar {
    align-self: end; width: 100%; max-width: 2.4rem; min-height: 2px;
    background: var(--accent); border-radius: var(--radius) var(--radius) 0 0;
}
.pro-charts .chart-col.is-late .chart-col-bar { background: #b65c4a; }
.pro-charts .chart-col-label {
    font-size: .68rem; color: var(--ink-mute); white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}

.pro-site-progress { min-width: 8rem; }
.pro-site-progress .chart-bars {
    display: block; height: .4rem; margin: 0 0 .35rem; gap: 0;
    background: var(--line); border-radius: var(--radius-pill); overflow: hidden;
}
.pro-site-progress .chart-fill { display: block; height: 100%; border-radius: var(--radius-pill); }
/* Same rail on the phone card, which sits outside both .pro-charts and .pro-site-progress and was
   therefore still getting the admin's 7 rem vertical bar-chart frame. */
.pro-site-card .chart-bars {
    display: block; height: .55rem; gap: 0; background: var(--line); border-radius: var(--radius-pill); overflow: hidden;
}
.pro-site-card .chart-fill { display: block; height: 100%; border-radius: var(--radius-pill); }
.pro-site-pct { font-size: .78rem; color: var(--ink-mute); font-variant-numeric: tabular-nums; }

/* ── Skupni napredek (NomiFac #53): every site, each skupina, and a picked set as one rail ───────────
   Scoped under .pro-progress like the charts above: .chart-* names belong to the admin analytics too.
   Name | rail | per cent on one line, what it is made of under it; on a phone the name takes its own line
   so a long skupina name never squeezes the rail to nothing. */
.pro-progress-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem .75rem; }
.pro-progress-head .planner-title { margin: 0; }
.pro-progress-pick { display: flex; flex-wrap: wrap; gap: .35rem; }
.pro-progress-rows { list-style: none; margin: .75rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .7rem; }
.pro-progress-row {
    display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr) auto;
    grid-template-areas: "name bar pct" ". sub sub"; align-items: center; gap: .15rem .6rem; min-width: 0;
}
.pro-progress-name {
    grid-area: name; font-size: .85rem; font-weight: 600; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pro-progress-bar { grid-area: bar; height: .6rem; background: var(--line); border-radius: var(--radius-pill); overflow: hidden; min-width: 0; }
.pro-progress-fill { display: block; height: 100%; background: var(--accent); border-radius: var(--radius-pill); }
.pro-progress-pct { grid-area: pct; font-size: .85rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.pro-progress-sub { grid-area: sub; font-size: .74rem; color: var(--ink-mute); overflow-wrap: anywhere; }
.pro-progress-row.is-total .pro-progress-bar { height: .8rem; }
.pro-progress-row.is-total .pro-progress-fill { background: var(--ok, #3a7d44); }
.pro-progress-row.is-empty .pro-progress-name { color: var(--ink-mute); font-weight: 500; }
.pro-progress-picker { margin-top: 1rem; padding-top: .85rem; border-top: 1px dashed var(--line); }
.pro-progress-hint { margin: 0 0 .5rem; font-size: .8rem; color: var(--ink-mute); }
.pro-progress-search { width: 100%; max-width: 22rem; margin: 0 0 .25rem; }
.pro-progress-chips { margin: .25rem 0 .5rem; }
.pro-progress-chips .pro-filter { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pro-progress-result { margin-top: .25rem; }
.pro-progress-none { margin: .25rem 0; }
.pro-progress-actions { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .75rem; }
@media (max-width: 560px) {
    .pro-progress-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name pct" "bar bar" "sub sub"; }
    /* The 44 px floor of the professional workspace (MobileLayoutTests) for the pick buttons. */
    .pro-progress .pro-filter, .pro-progress-actions .btn { min-height: 44px; }
}
/* The skupina's own rail in its frame on »Gradbišča v živo«: the tile's rail, in the neutral accent - a
   group has no single state colour. */
.site-group-progress { --tile-state: var(--accent); display: flex; align-items: center; gap: .45rem; max-width: 22rem; margin-top: .35rem; font-size: .74rem; }

/* ── Site cards (phone) ──────────────────────────────────────────────────────*/
.pro-site-card { padding: .85rem .95rem; }
.pro-site-cards { gap: .75rem; }
.pro-site-card-head { gap: .15rem; margin-bottom: .55rem; }
.pro-site-card-foot { gap: .5rem; margin-top: .6rem; font-size: .78rem; color: var(--ink-mute); }

@media (max-width: 560px) {
    /* Two across rather than four stacked full-width boxes: the four numbers are
       meant to be compared at a glance, which a single column prevents. */
    .pro-portfolio .kpi-grid { grid-template-columns: 1fr 1fr; gap: .6rem; }
    .pro-portfolio .kpi-value { font-size: 1.6rem; }
    .pro-board-block { padding: 1rem 1rem 1.1rem; }
    .pro-portfolio > * + * { margin-top: 1.25rem; }
}

/* ── Profesionalni plan, drugi krog: izmerjene napake ────────────────────────
   Vse spodaj je bilo izmerjeno v brskalniku na 1440 px, ne ocenjeno. */

/* The sites table let the browser size it (table-layout: auto), and the browser
   spends width on the longest string: "Naslednji korak" took 473 px of 1195
   (40 %) while the site NAME - the thing you scan the column for - got 164 px
   and wrapped onto three lines, making every row 87 px tall for one line of
   content. Fixed layout with declared columns puts the width where the meaning
   is. Below 560 px the cards replace the table, so this is desktop only. */
.pro-sites-table .report-costs-table { table-layout: fixed; }
/* FIVE columns, not eight. Faza moved under the site's name, and "zamuja / blokirano / plan" became one
   Stanje cell of marks: three numeric columns of mostly zeros cost more width than they carried, and at
   1200 px the "Naslednji korak" sentence ran straight into them. */
.pro-sites-table .report-costs-table th:nth-child(1) { width: 24%; }
.pro-sites-table .report-costs-table th:nth-child(2) { width: 10rem; }
.pro-sites-table .report-costs-table th:nth-child(3) { width: auto; }
.pro-sites-table .report-costs-table th:nth-child(4) { width: 13rem; }
.pro-sites-table .report-costs-table th:nth-child(5) { width: 8.5rem; }
/* The sixth column is the edit icon: as narrow as the button, so adding it did not steal width from
   "Naslednji korak" (the one column that is allowed to grow). */
.pro-sites-table .report-costs-table th:nth-child(6) { width: 3.25rem; }

/* Figures belong under their own heading, right-aligned and tabular so they
   line up down the column. `.pro-site-num` on its own could never do this:
   `.report-costs-table td` (0,1,1) outranks a lone class (0,1,0), so every
   number sat hard left, a column-width away from the heading it answers to. */
/* The site's own two lines: name, then faza + address under it. */
.pro-site-phase { display: block; font-size: .78rem; color: var(--ink-mute); }
/* Stanje: small marks instead of three columns of numbers. Silence means nothing is wrong, which is
   the common case and should look like it. */
.pro-site-state { display: flex; flex-wrap: wrap; gap: .3rem; }
.pro-site-state .pro-badge { font-size: .7rem; }
.pro-site-ok { font-size: .8rem; color: var(--ink-mute); }
/* "Plan" holds a word ("potrjen"), not a figure - it stays left, which also
   keeps its dash from butting up against the one in the last column. */
/* The site name is the row's identity - let it have the room fixed layout gave it. */
.pro-sites-table .report-costs-table td:first-child { line-height: 1.3; }
.pro-site-addr { margin-top: .15rem; }
/* A gradbišče on the shelf that its builder shared with this account (investitor): no edit, no delete. */
/* ── Deljeno: a sash across the notebook's top-right corner (SharedRibbon) ──
   The band is centred on the corner's diagonal at --rb-a from both edges and is --rb-l long, so it runs
   past both edges of the clipping box and its ends never show. Gold with a stitched edge: cream read as
   one more piece of the tape holding the cover photo, and it has to stand out on every book colour. Not
   themed - the leather cover looks the same in dark mode. */
.shared-ribbon {
    --rb-a: 2.15rem; --rb-l: 9rem; --rb-h: 1.5rem; --rb-box: 6rem;
    position: absolute; top: 0; right: 0; z-index: 4; width: var(--rb-box); height: var(--rb-box);
    overflow: hidden; pointer-events: none;
}
.shared-ribbon-band {
    position: absolute; box-sizing: border-box; pointer-events: auto;
    top: calc(var(--rb-a) - var(--rb-h) / 2); right: calc(var(--rb-a) - var(--rb-l) / 2);
    width: var(--rb-l); height: var(--rb-h); line-height: calc(var(--rb-h) - 2px);
    transform: rotate(45deg); text-align: center;
    background: linear-gradient(to bottom, #f3d98f, #e0b95e); color: #3d2a12;
    border-top: 1px dashed rgba(80, 52, 18, .45); border-bottom: 1px dashed rgba(80, 52, 18, .45);
    box-shadow: 0 3px 8px rgba(0, 0, 0, .4);
    /* padding-left = the letter-spacing, which otherwise trails the last letter and pulls the word off centre */
    font-family: var(--font-sans); font-size: .68rem; font-weight: 700; letter-spacing: .18em; padding-left: .18em;
    text-transform: uppercase;
}
.shared-ribbon.is-shelf { border-top-right-radius: var(--radius); }
.shared-ribbon.is-cover {
    --rb-a: 2.8rem; --rb-l: 11.5rem; --rb-h: 1.85rem; --rb-box: 8rem;
    border-top-right-radius: var(--radius);
}
.shared-ribbon.is-cover .shared-ribbon-band { font-size: .8rem; }
/* The cover's corner chip (the professional ⋯ an investitor may see) moves out from under the sash. */
.book-cover-inner:has(.shared-ribbon) .book-cover-edit { right: 5.8rem; }

/* A tool page is not a chapter. `.journal-page` is A4-proportioned on purpose -
   a chapter fills the sheet and grows past it - but Planer, Dnevnik and Dejstva
   are short, and the ratio was padding them out with blank ruled paper:
   measured 930 px of it on /dnevnik and 1294 px on /dejstva, out of a 1670 px
   sheet. Keep enough height that it still reads as a sheet, then stop. */
/* :not(.journal-page-spread) is load-bearing. Schedule and Plan3d carry BOTH
   classes, and this rule sits later in the file at the same specificity as
   `.journal-page.journal-page-spread` - so without the guard it silently takes
   over the sizing of every two-page spread. */
.journal-page.journal-page-tool:not(.journal-page-spread) {
    aspect-ratio: auto;
    min-height: 34rem;
    padding-bottom: 2.75rem;
}
/* …but never shorter than the bookmarks tucked into its edge. The rail is a flex sibling of the sheet
   and carries a tab per chapter plus one per tool - well past 34rem on a professional project - so a
   short page (Dejstva in pravila, a chapter with few tasks) ended with tabs hanging below the paper,
   which reads as a sheet cut off halfway. align-self overrides the spread's flex-start for the single
   page only: the two-page spreads (Načrtovanje, Hiša v 3D) keep the height they set themselves. */
.journal-spread > .journal-page:not(.journal-page-spread) { align-self: stretch; }

/* The whole unplanned-site row is one link now (see PortfolioPlanner.razor), so the
   hover target matches what the eye reads as a row - not just the name. */
.pro-board-link {
    display: flex; align-items: baseline; justify-content: space-between; gap: 1.25rem;
    width: 100%; text-decoration: none; color: inherit;
}
/* Same rule as .pro-board-main above: colour, not a pair of underlines. */
.pro-board-link, .pro-board-link:hover { border-bottom-color: transparent; }
.pro-board-link:hover strong { text-decoration: none; color: var(--accent-ink, var(--accent)); }
.pro-board-link .pro-board-side { color: var(--ink-mute); }
.pro-board-link:hover .pro-board-side { color: var(--accent-ink, var(--accent)); }

/* The assistant runs in the WIDE main (ShellLayout widens it for chat), so on this page
   `.ai-msg { max-width: 88% }` resolved to 843 px - about 130 characters a line for the
   AI's prose, and more on a bigger monitor. Cap it at a reading measure. Scoped to the
   pro page: the consumer assistant sits in a narrower main and is left as it is. */
.pro-chat-page .ai-msg { max-width: min(88%, 72ch); }

/* ── /planer, the planner across gradbišč ──────────────────────────────────────────────────────────
   Three shapes, because the page holds three kinds of thing and a flat list flattened them into one:
   a CLASH is a conflict between two named sites (a card, with both sites shown as equals), a DEADLINE
   is a point in time (a timeline, with the distance said in words), and "no plan" / "blocked" are
   standing states with no date at all (two plain columns at the bottom). */
.planner-norobot { display: block; margin-top: .2rem; font-size: .85em; color: var(--ink-mute); }

.clash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: 1rem; }
.clash-card {
    display: flex; flex-direction: column; gap: .7rem;
    padding: .9rem 1rem 1rem; border-radius: var(--radius);
    border: 1px solid color-mix(in srgb, var(--danger, #0a0a0a) 35%, var(--line));
    background: color-mix(in srgb, var(--danger, #0a0a0a) 5%, var(--bg-elev));
}
.clash-head { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; }
.clash-who { font-size: 1.02rem; line-height: 1.25; }
.clash-when {
    flex: none; font-size: .8rem; font-variant-numeric: tabular-nums; white-space: nowrap;
    color: var(--danger, #0a0a0a); font-weight: 600;
}
/* Both sites, side by side and the same size: the app cannot know which one should give way, and
   ranking them by anything it does know would be a guess the builder pays for. */
.clash-sites { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: .5rem; }
.clash-site {
    display: flex; flex-direction: column; gap: .12rem; min-width: 0;
    padding: .5rem .6rem; border: 1px solid var(--line); border-radius: calc(var(--radius) - var(--radius));
    background: var(--bg-elev); color: inherit; text-decoration: none;
}
.clash-site:hover { border-color: var(--accent); }
.clash-site:hover .clash-site-name { text-decoration: underline; }
.clash-site-name { font-weight: 600; overflow-wrap: anywhere; }
.clash-site-task {
    font-size: .78rem; color: var(--ink-mute); overflow-wrap: anywhere;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.clash-vs { align-self: center; font-size: 1.1rem; color: var(--ink-mute); }
.clash-note { margin: 0; font-size: .78rem; color: var(--ink-mute); }

/* Deadlines as a timeline. The date alone never answered "do I care today" without the reader doing
   the arithmetic, so every day carries its distance in words beside it. */
.planner-tl { position: relative; list-style: none; margin: 0; padding: 0; }
.planner-tl::before {
    content: ""; position: absolute; left: .3rem; top: .75rem; bottom: 1.2rem;
    width: 1px; background: var(--line-strong);
}
.planner-tl-day { display: grid; grid-template-columns: .65rem 1fr; gap: .9rem; padding-bottom: 1.1rem; }
.planner-tl-day:last-child { padding-bottom: 0; }
.planner-tl-mark {
    /* The rail is an absolutely positioned ::before, so it painted ON TOP of these dots - a positioned
       element wins over a static one no matter what colour ring the dot carries. One line fixes it, and
       the halo below then reads as a bead threaded on the rail rather than a dot with a scratch. */
    position: relative; z-index: 1;
    width: .7rem; height: .7rem; margin-top: .45rem; border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 3px var(--bg-elev), 0 0 0 4.5px var(--accent-soft);
}
.planner-tl-body { min-width: 0; }
.planner-tl-head {
    display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap;
    padding-bottom: .3rem; border-bottom: 1px solid var(--line);
}
.planner-tl-date { font-weight: 700; text-transform: capitalize; }
.planner-tl-rel {
    font-size: .74rem; color: var(--ink-mute); white-space: nowrap;
    padding: .05rem .45rem; border-radius: var(--radius-pill); background: var(--bg-sunk, rgba(0,0,0,.05));
}
/* A passed deadline is not a day in the plan - nothing can be ordered "on" it - so it is its own block
   above the timeline rather than a day drawn in the past. */
.is-late-block { border-left: 3px solid var(--danger, #0a0a0a); }

/* The one thing a plan has to say about itself before it is read: nothing on it has been written to the
   gradbišče yet. It sits above the horizon pills, in the reading order, because the answer to "what is
   this?" belongs before the plan and not in a menu behind it. */
.planner-confirmbar {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    margin: 0 0 1.1rem; padding: .8rem 1rem;
    border: 1px solid var(--accent); border-radius: var(--radius));
    background: var(--accent-soft);
}
.planner-confirmbar-text { display: flex; flex-direction: column; gap: .15rem; min-width: 14rem; flex: 1; }
.planner-confirmbar-text strong { color: var(--accent-ink); }
/* The first step ("faza še nima terminov") is an instruction, not a warning - it is what a new
   gradbišče looks like on day one, so it gets the paper's own frame rather than the accent's. */
.planner-confirmbar.is-step { border-color: var(--line-strong); background: var(--bg-elev); }
.planner-confirmbar.is-step .planner-confirmbar-text strong { color: var(--ink); }
/* Once answered it is a note, not a call to action: the paper's own tones, no accent fill. */
.planner-confirmbar.is-done { border-color: var(--line-strong); background: var(--bg-elev); }
.planner-confirmbar.is-done .planner-confirmbar-text strong { color: var(--ink); }
.planner-confirmbar-text span { font-size: .85rem; color: var(--ink-soft); }

/* ── Prvi korak: a gradbišče with no plan yet ─────────────────────────────────────────────────────────
   The biggest thing on the page on purpose: until the phases have dates, laying them out is the page's
   only job - as a bar among bars (or a row in the ⋯) a new builder walked straight past it. */
/* One column: the sentence runs the card's full width and the button follows it, instead of the text
   squeezing into a narrow measure beside the button. */
.planner-start {
    display: flex; flex-direction: column; align-items: flex-start; gap: .55rem;
    margin: 0 0 1.4rem; padding: 1.4rem 1.5rem;
    border: 1px solid var(--accent); border-radius: var(--radius);   /* the corner of the planner's other cards */
    background: var(--accent-soft);
}
.planner-start h2 { margin: 0; font-size: 1.3rem; }
.planner-start p { margin: 0; font-size: .92rem; color: var(--ink-soft); max-width: none; }
.planner-start-btn {
    margin-top: .35rem; min-height: 48px; padding: .7rem 1.3rem; font-size: 1rem;
    display: inline-flex; align-items: center; gap: .5rem;
}
@media (max-width: 560px) { .planner-start-btn { width: 100%; justify-content: center; } }
/* The Planer of a site with no plan: the step on the left page, what it unlocks on the right. */
.planner-first { padding: 2.5rem 0 2rem; min-height: 60vh; }
.planner-first-main h1 { margin: .35rem 0 .6rem; font-size: 2rem; line-height: 1.15; }
.planner-first-lead { margin: 0 0 1.6rem; font-size: 1.02rem; color: var(--ink-soft); max-width: 30rem; }
.planner-first-steps { list-style: none; margin: 0 0 1.8rem; padding: 0; display: flex; flex-direction: column; gap: 1rem; }
.planner-first-steps li { display: flex; gap: .85rem; align-items: flex-start; }
.planner-first-steps li > span {
    flex: 0 0 auto; width: 1.9rem; height: 1.9rem; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--accent); color: #fff; font-weight: 700; font-size: .9rem;
}
.planner-first-steps li div, .planner-first-preview li div { display: flex; flex-direction: column; gap: .1rem; }
.planner-first-steps b, .planner-first-preview b { font-weight: 600; color: var(--ink); }
.planner-first-steps em, .planner-first-preview em { font-style: normal; font-size: .88rem; color: var(--ink-mute); }
.planner-first-note { margin: .7rem 0 0; font-size: .82rem; color: var(--ink-mute); }
.planner-first-side { padding-top: 3.2rem; }
.planner-first-preview { list-style: none; margin: .9rem 0 0; padding: 0; display: flex; flex-direction: column; }
.planner-first-preview li {
    display: flex; gap: .8rem; align-items: flex-start; padding: .8rem .2rem;
    border-bottom: 1px dashed var(--line-strong); opacity: .75;
}
.planner-first-preview li > svg { flex: 0 0 auto; margin-top: .15rem; color: var(--accent); }
@media (max-width: 900px) {
    .planner-first { padding-top: 1.2rem; }
    .planner-first-main h1 { font-size: 1.6rem; }
    .planner-first-side { padding-top: 2rem; }
}

/* ── Kdo je na gradbišču ─────────────────────────────────────────────────────────────────────────
   A person still on site is the live half of this block, so it carries the only colour: a green dot and
   a green count. Everyone else is a record of the day, set back in ink-mute. */
.onsite-block { margin-bottom: 1.5rem; }
.onsite-sites { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.onsite-site { min-width: 0; }
.onsite-head { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; margin-bottom: .35rem; }
.onsite-name { font-weight: 700; color: inherit; border-bottom: none; }
.onsite-name:hover { color: var(--accent-ink); }
.onsite-count {
    font-size: .72rem; color: var(--ink-mute); padding: .05rem .5rem; border-radius: var(--radius-pill);
    background: var(--bg-sunk, rgba(0,0,0,.05));
}
.onsite-count.is-on { color: #2f6b3a; background: #e3f0e2; font-weight: 700; }
.onsite-people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; }
.onsite-person { display: flex; align-items: center; gap: .5rem; font-size: .88rem; flex-wrap: wrap; }
.onsite-dot {
    flex: none; width: .5rem; height: .5rem; border-radius: 50%; background: var(--line-strong);
}
.onsite-person.is-on .onsite-dot { background: #3f8f4f; box-shadow: 0 0 0 3px rgba(63, 143, 79, .18); }
.onsite-who { font-weight: 600; }
.onsite-when { color: var(--ink-mute); font-size: .8rem; display: inline-flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.onsite-dur { font-variant-numeric: tabular-nums; }
.onsite-auto {
    font-size: .66rem; text-transform: uppercase; letter-spacing: .05em;
    padding: .05rem .35rem; border-radius: var(--radius-pill); border: 1px dashed var(--line-strong);
}

/* Material waiting for this person: what they have to fetch, and what is coming to their task. A pickup
   carries the accent, because it is a trip somebody has to make. */
.mywork-materials { margin: 0 0 1.25rem; }
.mywork-section-title {
    font-family: var(--font-sans); font-size: .74rem; font-weight: 700; letter-spacing: .1em;
    text-transform: uppercase; color: var(--ink-mute); margin: 0 0 .6rem;
}
.mywork-material-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.mywork-material {
    display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
    padding: .8rem .9rem; border: 1px solid var(--line-strong);
    border-radius: var(--radius)); background: var(--bg-elev);
}
.mywork-material.is-pickup { border-color: var(--accent); background: var(--accent-soft); }
.mywork-material-ico { flex: none; color: var(--accent); display: inline-flex; }
.mywork-material-main { display: flex; flex-direction: column; gap: .1rem; min-width: 10rem; flex: 1; }
.mywork-material-main .pro-muted { font-size: .8rem; }
.mywork-material-btn { min-height: 44px; min-width: 8rem; border-radius: var(--radius-pill); font-weight: 700; }
.mywork-material-note { flex: none; font-size: .8rem; font-style: italic; color: var(--ink-mute); }
/* Why the pickup waits (clocked in on a gradbišče), on its own line above the button that is off meanwhile. */
.mywork-material-held { flex: 1 0 100%; font-size: .8rem; color: #8a5a12; }
@media (max-width: 520px) {
    .mywork-material-btn { flex: 1 0 100%; }
}

/* The worker's own version of the same fact, and the FIRST thing on their page: one card, one button,
   pressed with a glove on, before anything else is read. It used to sit in the paper's own quiet tones
   and read as a notice; a control that has to be pressed twice a day has to look like one. */
.mywork-attend {
    display: flex; align-items: center; gap: .9rem; flex-wrap: wrap;
    margin: 0 0 1.25rem; padding: 1rem 1.1rem;
    border: 2px solid var(--accent); border-radius: var(--radius));
    background: var(--accent-soft);
    box-shadow: var(--shadow-card, 0 8px 18px -8px rgba(26, 26, 26, .35));
}
/* Checked in: the whole card goes green, because the answer to "am I clocked in" must be readable
   without reading. */
.mywork-attend.is-on { border-color: #3f8f4f; background: #e7f2e6; }
.mywork-attend-dot {
    flex: none; width: .85rem; height: .85rem; border-radius: 50%;
    background: var(--line-strong); box-shadow: 0 0 0 4px rgba(0, 0, 0, .05);
}
.mywork-attend.is-on .mywork-attend-dot { background: #3f8f4f; box-shadow: 0 0 0 4px rgba(63, 143, 79, .2); }
/* Clocked in on ANOTHER gradbišče: Prihod here waits for the Odhod there - amber, not the green of "you are here". */
.mywork-attend.is-elsewhere { border-color: #b7791f; background: #f2f2f2; }
.mywork-attend.is-elsewhere .mywork-attend-dot { background: #b7791f; box-shadow: 0 0 0 4px rgba(183, 121, 31, .2); }
.mywork-attend-text { display: flex; flex-direction: column; gap: .2rem; min-width: 11rem; flex: 1; }
.mywork-attend-text strong { font-size: 1.05rem; }
.mywork-attend.is-on .mywork-attend-text strong { color: #2f6b3a; }
.mywork-attend-text .pro-muted { font-size: .84rem; }
/* 56 px of button: one thumb, gloves on, standing at the gate. Centred on purpose: it is wider than its
   word (and the whole row on a phone), and a label left in the corner of a big pill reads as misplaced. */
.mywork-attend-btn {
    min-height: 3.5rem; min-width: 9rem; font-size: 1.05rem; font-weight: 700;
    letter-spacing: .02em; border-radius: var(--radius-pill);
    display: inline-flex; align-items: center; justify-content: center; text-align: center;
}
/* Odhod, on the green card: a SOLID button in the card's own dark green. As a ghost it was a transparent
   pill on light green - the one control on the page that has to be found at the end of a long day. */
.mywork-attend.is-on .mywork-attend-btn {
    background: #2f6b3a; border-color: #2f6b3a; color: #fff;
}
.mywork-attend.is-on .mywork-attend-btn:hover:not(:disabled) { background: #245530; border-color: #245530; }
@media (max-width: 520px) {
    /* On a phone the button owns its own line and the full width - it is the reason this card exists. */
    .mywork-attend-btn { flex: 1 0 100%; }
}

.planner-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }

@media (max-width: 860px) {
    .planner-cols { grid-template-columns: 1fr; gap: 1.25rem; }
}
@media (max-width: 560px) {
    .clash-sites { grid-template-columns: 1fr; }
    .clash-vs { justify-self: center; }
    .planner-tl-day { gap: .7rem; }
}

/* The auto-schedule dialog: two fields on one row, stacked on a phone. */
.auto-sched-form { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.auto-sched-field { display: flex; flex-direction: column; gap: .25rem; min-width: 12rem; flex: 1 1 12rem; }
.auto-sched-cal { margin-bottom: 1.1rem; display: flex; flex-direction: column; gap: .4rem; }
.auto-sched-note { margin: 0; font-size: .78rem; }

/* ── The schedule check: the next two weeks against the plan (Razporedi faze, Analiziraj terminski plan) ──
   Fourteen tiles, a week to a row: a day off hatched and named, a hard-weather day tinted, the people under
   each working day. Tints are color-mix over the theme's own ground, so the dark theme needs nothing. */
.sched-advice-title { font-size: 1rem; margin: 1.1rem 0 .5rem; }
.sched-advice { display: flex; flex-direction: column; gap: .75rem; margin: 0 0 1rem; }
.sched-advice-summary {
    border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem .9rem; background: var(--paper);
}
.sched-advice-summary.is-ai {
    border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
    background: color-mix(in srgb, var(--accent) 7%, var(--bg));
}
.sched-advice-summary p { margin: .35rem 0 0; line-height: 1.5; max-width: none; }
.sched-advice-badge {
    display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .08em; color: var(--accent-ink);
}
.sched-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .3rem; }
.sched-day {
    display: flex; flex-direction: column; align-items: center; gap: .1rem; min-width: 0;
    padding: .35rem .2rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg);
    font-size: .74rem; text-align: center; line-height: 1.25;
}
.sched-day-dow { font-weight: 700; text-transform: capitalize; }
.sched-day-date { color: var(--ink-mute); }
.sched-day-wx { white-space: nowrap; }
.sched-day-off { color: var(--ink-mute); font-size: .68rem; overflow-wrap: anywhere; }
.sched-day-rain { color: color-mix(in srgb, #2d6aa3 80%, var(--ink)); font-weight: 600; }
.sched-day-people { display: inline-flex; align-items: center; gap: .15rem; color: var(--ink-soft); }
.sched-day.is-off {
    color: var(--ink-mute);
    background: repeating-linear-gradient(135deg, var(--bg) 0 5px, var(--paper) 5px 10px);
}
.sched-day.is-bad {
    border-color: color-mix(in srgb, #c9a227 55%, var(--line));
    background: color-mix(in srgb, #c9a227 12%, var(--bg));
}
.sched-day.is-short .sched-day-people { color: #b3372f; font-weight: 700; }
.sched-days-legend { margin: -.3rem 0 0; font-size: .74rem; max-width: none; }
@media (max-width: 560px) { .sched-days { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.sched-findings {
    list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; font-size: .86rem;
}
.sched-findings li { display: flex; gap: .45rem; align-items: flex-start; }
.sched-findings .icon { flex: none; margin-top: .2rem; }

.sched-changes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.sched-change {
    display: flex; gap: .8rem; align-items: center; justify-content: space-between;
    padding: .55rem .7rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg);
}
.sched-change.is-declined { opacity: .55; }
.sched-change-main { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.sched-change-dates { font-size: .88rem; font-variant-numeric: tabular-nums; }
.sched-change-dates s { color: var(--ink-mute); }
.sched-change-why { font-size: .82rem; color: var(--ink-soft); }
.sched-change-src {
    display: inline-flex; align-items: center; gap: .15rem; margin-right: .3rem;
    font-size: .7rem; font-weight: 700; color: var(--accent-ink);
}
/* ✓ and ✕ at thumb size: the list is read on a phone in the morning as often as at a desk. */
.sched-choice { display: inline-flex; gap: .3rem; flex: none; }
.sched-choice button {
    min-width: 44px; min-height: 44px; border-radius: var(--radius); border: 1px solid var(--line-strong);
    background: var(--bg); color: var(--ink-soft); font-size: 1.05rem; font-weight: 700; cursor: pointer;
}
.sched-choice button.is-yes {
    background: color-mix(in srgb, #2c5f2c 14%, var(--bg)); border-color: #2c5f2c; color: #2c5f2c;
}
.sched-choice button.is-no {
    background: color-mix(in srgb, #b3372f 12%, var(--bg)); border-color: #b3372f; color: #b3372f;
}
.sched-ai-review { display: flex; align-items: center; gap: .4rem .75rem; flex-wrap: wrap; margin: -.25rem 0 1rem; }
.sched-ai-review .btn { display: inline-flex; align-items: center; gap: .35rem; }
.sched-ai-review .pro-muted { font-size: .78rem; }
.report-costs-table tr.is-adjusted td { background: color-mix(in srgb, var(--accent) 7%, transparent); }

/* ── Delavci: the crew as PEOPLE (/delavci) ──
   Deliberately NOT the sticky notes the Izvajalci directory uses. Companies are notes pinned to a
   board; people are a crew list, and reading one as the other is exactly the confusion this feature
   exists to remove. So: plain cards, a coloured edge for the trade, and the person's name set larger
   than anything else on the card. */
/* Ljudje in podjetja: one console, two lists. The width is the crew list's, so switching tabs does not
   reflow the page under the reader. */
.pro-directory { max-width: 1100px; }
.pro-directory .pro-tabs { margin-bottom: 1rem; }
/* Add + search on one line above the list, the same shape the board's toolbars use. */
.directory-toolbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: 1.25rem 0 .5rem;
}

.pro-workers { max-width: 1100px; }
.worker-toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: 1.25rem 0 .5rem; }
/* The pisarna's members list - on /racun since 2026-10-06 (.account-office tightens it under the section's role line). */
.pro-account-members { margin-top: 1.25rem; }

/* Deli projekt on an ordinary project's cover - the professional ⋯'s corner and the same dark chip, only
   with its word: it is the one thing in that corner, and "Deli" says what it does. */
.book-cover-inner .book-cover-edit .book-cover-share {
    display: inline-flex; align-items: center; gap: .35rem; height: 1.9rem; padding: 0 .7rem;
    border-radius: var(--radius-pill); border: 1px solid rgba(237, 237, 237, .4);
    background: rgba(0, 0, 0, .38); backdrop-filter: blur(2px);
    color: rgba(237, 237, 237, .95); font-size: .8rem; font-weight: 600; text-decoration: none;
}
.book-cover-inner .book-cover-edit .book-cover-share:hover { background: rgba(0, 0, 0, .58); color: #fff; }
/* The level beside the e-mail on Deli projekt: as wide as its words, not as the row. */
.share-page .share-level { width: auto; flex: 0 0 auto; }
.share-locked {
    margin-top: 1.5rem; padding: 1.25rem 1.4rem;
    background: var(--bg-elev); border: 1px solid var(--line); border-left: 3px solid var(--accent);
    border-radius: var(--radius);
}
.share-locked .eyebrow { margin-bottom: .2rem; }
.share-locked-lead { margin: .35rem 0 .5rem; color: var(--ink-soft); }
.share-locked-list { margin: 0 0 1.1rem; padding-left: 1.2rem; color: var(--ink-soft); }
.share-locked-list li { margin: .15rem 0; }
.worker-empty { border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 1.25rem; margin-top: 1.25rem; }
.worker-empty p { margin: 0 0 .35rem; }

.worker-grid {
    display: grid; gap: 1rem; margin-top: 1.25rem;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.worker-card {
    display: flex; flex-direction: column; gap: .7rem;
    border: 1px solid var(--line);
    border-radius: var(--radius); background: var(--paper); padding: 1rem 1.1rem;
}
/* Someone who has left is kept, not deleted - their name is on signed diary pages. Faded, so the card
   reads as a record rather than as someone who could be sent to a gradbišče tomorrow. */
.worker-card.is-inactive { opacity: .6; }
.worker-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem; }
.worker-ident { min-width: 0; }
.worker-name { font-family: var(--font-serif); font-size: 1.15rem; margin: 0; word-break: break-word; }
.worker-role { font-size: .85rem; color: var(--ink-soft); margin: .15rem 0 0; }
/* Away TODAY. The one state that changes what happens this morning, so it is the only thing on the card
   allowed to carry colour of its own. */
.worker-away {
    flex-shrink: 0; font-size: .74rem; font-weight: 600; letter-spacing: .02em;
    padding: .2rem .55rem; border-radius: var(--radius-pill); background: #f8e8e8; color: #7a2020;
}
.worker-skills { margin: 0; }
.worker-contact { font-size: .85rem; color: var(--ink-soft); margin: 0; }
.worker-contact a { color: inherit; }

.worker-absences { display: flex; flex-direction: column; gap: .4rem; border-top: 1px solid var(--line); padding-top: .7rem; }
.worker-absences .pro-board-list { margin: 0; }
.worker-absence-form { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; }
.worker-form-actions { display: flex; gap: .4rem; }
/* The card's ⋯ sits in the head's top-right corner, after the "away today" mark. The old row of
   buttons along the bottom edge is gone - see the menu in WorkerList. */
.worker-card-head .task-menu { margin-left: auto; }
.worker-card-head .task-menu-btn { width: 1.9rem; height: 1.9rem; }

.worker-editor { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; padding: 0 1.5rem 1rem; }
.worker-editor-wide { grid-column: 1 / -1; }
.worker-modal-foot { display: flex; align-items: center; gap: .6rem; padding: 0 1.5rem 1.25rem; }
.worker-modal-spacer { flex: 1; }

/* The card opens the person's page (/zaposleni/{id}, 2026-10-07), like a company's card next door; its ⋯ (WorkerMenu)
   sits in a wrapper that stops the click, still in the head's top-right corner. */
.worker-card.is-openable { cursor: pointer; }
.worker-card.is-openable:hover { box-shadow: 0 0 0 2px var(--accent-soft); }
.worker-card-name { color: inherit; text-decoration: none; overflow-wrap: anywhere; }
.worker-card-menu { margin-left: auto; flex: none; }

/* ── Stran zaposlenega (/zaposleni/{id}) ── */
.worker-page-marks { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.worker-page-marks:empty { display: none; }
.worker-page-kpis { margin-top: .25rem; }
.worker-page-section { margin: 0 0 1.5rem; }
.worker-page-h3 { font-size: .9rem; margin: 1rem 0 .4rem; color: var(--ink-soft); }
.worker-page-data { display: grid; grid-template-columns: minmax(8rem, max-content) 1fr; gap: .4rem 1rem; margin: 0; }
.worker-page-data dt { font-size: .82rem; font-weight: 600; color: var(--ink-soft); }
.worker-page-data dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.worker-page-data .worker-skills { display: inline-flex; flex-wrap: wrap; }
.worker-page-notes { white-space: pre-line; }
.worker-page-section > .btn { margin-top: .5rem; }
.worker-page-past { opacity: .8; }
/* One row per week / month / gradbišče: label, a bar against the busiest row, hours, then the cost (and absence). */
.worker-stats { list-style: none; margin: .25rem 0 0; padding: 0; display: grid; gap: .35rem; }
.worker-stat {
    display: grid; grid-template-columns: minmax(7rem, 11rem) minmax(4rem, 1fr) 4.5rem minmax(6rem, max-content);
    align-items: center; gap: .3rem .75rem; font-size: .88rem;
}
.worker-stat-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.worker-stat-label { color: inherit; }
.worker-stat-bar { height: .55rem; background: var(--line); border-radius: var(--radius); overflow: hidden; }
.worker-stat-bar > span { display: block; height: 100%; background: var(--accent); }
.worker-stat-value { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.worker-stat-sub { font-size: .8rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.worker-days { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .3rem; }
.worker-day {
    display: flex; flex-direction: column; align-items: center; gap: .1rem; padding: .4rem .2rem;
    border: 1px solid var(--line); border-radius: var(--radius); font-size: .8rem; min-width: 0;
}
.worker-day.is-today { border-color: var(--accent); }
.worker-day.is-future { opacity: .55; }
.worker-day-name { color: var(--ink-soft); text-transform: uppercase; font-size: .7rem; letter-spacing: .04em; }
.worker-day-hours { font-weight: 600; font-variant-numeric: tabular-nums; }
.worker-day-off { font-size: .68rem; color: #7a2020; text-align: center; overflow-wrap: anywhere; }
@media (max-width: 600px) {
    .worker-page-data { grid-template-columns: 1fr; gap: .1rem; }
    .worker-page-data dd { margin-bottom: .45rem; }
    .worker-stat { grid-template-columns: minmax(0, 1fr) 4.5rem; }
    .worker-stat-bar { grid-column: 1 / -1; grid-row: 2; }
    .worker-stat-sub { grid-column: 1 / -1; }
}

/* Phone: one column, and the editor stops being a two-up grid before the fields get too narrow to
   type a name into. */
@media (max-width: 640px) {
    .worker-grid { grid-template-columns: 1fr; }
    .worker-editor { grid-template-columns: 1fr; }
    .worker-absence-form { flex-direction: column; align-items: stretch; }
}

/* A booked person whose absence overlaps THIS task's dates. The chip is the only warning a builder gets
   at the moment they make the booking, so it carries colour; without dates on the task there is nothing
   to overlap and no chip lights up. */
.pro-chip.is-warn { border-color: #c98b8b; background: #f8e8e8; color: #7a2020; }
.pro-chip.is-warn .pro-chip-ico { color: #a34444; }
.pro-chip-note { font-size: .74rem; font-weight: 600; opacity: .8; }
/* A real target for a thumb, inside a pill that is only 2 rem tall. */
.pro-chip-x {
    flex: none; display: inline-flex; align-items: center; justify-content: center;
    width: 1.45rem; height: 1.45rem; border: none; border-radius: var(--radius-pill); padding: 0;
    background: none; cursor: pointer; color: inherit; font-size: 1rem; line-height: 1; opacity: .55;
}
.pro-chip-x:hover { opacity: 1; background: rgba(26, 26, 26, .08); }

/* A person clash is a fact, a company clash a hint - the card says which before it is read. The person
   card carries the alert edge; the company one stays neutral. */
.clash-card.is-person { border-left: 3px solid #b3261e; }
.clash-kind {
    align-self: flex-start; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em;
    color: var(--ink-soft);
}
.clash-card.is-person .clash-kind { color: #7a2020; font-weight: 600; }

/* A person booked on the day's work but recorded away. The row stays - the two records disagree and the
   builder is the only one who can say which is wrong - but it must never read as attendance, so it is
   struck through and the printed sheet leaves it off entirely. */
.diary-person.is-absent strong { text-decoration: line-through; opacity: .7; }
.diary-absent {
    font-size: .74rem; font-weight: 600; padding: .1rem .45rem; border-radius: var(--radius-pill);
    background: #f8e8e8; color: #7a2020;
}

/* ── Ekipa in dostop (/projects/{id}/ekipa) ──
   Two blocks, not one list with a role picker: "koga naj obveščam" and "kdo bo delal" are different
   questions, and a single list answers neither well. */
.team-page { max-width: 720px; }
.team-block { margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.team-block:first-of-type { border-top: none; }
.team-title { font-family: var(--font-serif); font-size: 1.15rem; margin: 0 0 .25rem; }
.team-lead { margin: 0 0 .9rem; }
.team-note { display: block; margin-top: .2rem; }
.team-list { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.team-row {
    display: flex; align-items: center; gap: .6rem;
    padding: .55rem .7rem; border: 1px solid var(--line); border-radius: var(--radius);
}
.team-who { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.team-who strong { word-break: break-word; }
.team-who .pro-muted { font-size: .8rem; }
.team-state { flex-shrink: 0; }
.team-badge {
    font-size: .72rem; padding: .15rem .5rem; border-radius: var(--radius-pill);
    background: var(--accent-soft); color: var(--accent-ink); white-space: nowrap;
}
.team-badge.is-active { background: #e3f0e3; color: #2c5f2c; }
/* A stale link is not "invited" - it is something the builder has to do again. */
.team-badge.is-stale { background: #f8e8e8; color: #7a2020; }
.team-invite { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.team-invite .type-input { flex: 1 1 200px; min-width: 0; }
.team-link-row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.team-link-row code { font-size: .8rem; word-break: break-all; flex: 1 1 240px; }
/* The link sits in the member's own row, under the e-mail. */
.team-who .team-link-row { margin-top: .35rem; padding: .35rem .5rem; border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.team-who .team-link-note { font-size: .75rem; }
.team-who .team-link-new { align-self: flex-start; margin-top: .3rem; }

/* ── Povabilo (/povabilo/{token}) ── */
.invite-page { max-width: 520px; margin: 3rem auto; padding: 0 1.25rem; }
.invite-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; background: var(--paper); }
.invite-card h1 { font-family: var(--font-serif); font-size: 1.6rem; margin: .2rem 0 .9rem; }
.invite-lead { font-size: 1rem; line-height: 1.6; margin: 0 0 1.2rem; }
.invite-warn { color: #7a2020; font-weight: 600; margin: 0 0 1rem; }
.invite-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1.2rem; }

/* ── Moje delo (/moje-delo) ──
   Phone first and one-handed: this is opened standing on a gradbišče. Tap targets stay above the 44 px
   the layout test measures, and the note field is a single line with a single button. */
.mywork { max-width: 760px; }
/* Every button on the worker's page is wider than its word (a pill with a min-width, the whole row on a
   phone), and .btn lays its content out from the left - so "Prevzeto" sat in the corner of its own button.
   Centred here, for all of them, with the mark and the word as one group. */
.mywork .btn { justify-content: center; text-align: center; }
.mywork .btn .icon { flex: none; }
/* Prikaži pot and the rough driving time, straight under the site's name. */
.mywork-route { display: flex; align-items: center; gap: .6rem .9rem; flex-wrap: wrap; margin: 0 0 1rem; }
.mywork-route-btn, .mywork-eta-btn {
    min-height: 2.9rem; border-radius: var(--radius-pill); font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
}
.mywork-eta { font-size: .92rem; font-weight: 600; color: var(--ink-soft); }
@media (max-width: 520px) { .mywork-route-btn, .mywork-eta-btn { flex: 1 0 100%; } }
/* Moje delo, the chooser: one big card per gradbišče - tapped on a phone, often with a glove on. */
.mywork-sites-grid {
    list-style: none; margin: .5rem 0 0; padding: 0;
    display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
}
.mywork-site-card {
    display: flex; flex-direction: column; gap: .3rem; min-height: 5.5rem; padding: 1rem 1.15rem;
    border: 2px solid var(--line-strong); border-radius: var(--radius));
    background: var(--paper); color: var(--ink);
}
.mywork-site-card:hover, .mywork-site-card:focus-visible {
    border-color: var(--accent); border-bottom-color: var(--accent); background: var(--accent-soft);
}
.mywork-site-card strong { font-size: 1.1rem; line-height: 1.3; }
.mywork-site-card .pro-muted { font-size: .88rem; }
.mywork-site-role {
    margin-top: auto; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
    color: var(--ink-mute);
}
/* What a site holds today, as chips at the foot of its card; the role word keeps the right-hand end. */
.mywork-site-meta { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .45rem; }
.mywork-site-meta .mywork-site-role { margin: 0 0 0 auto; }
.mywork-chip {
    font-size: .76rem; font-weight: 700; padding: .15rem .55rem; border-radius: var(--radius-pill);
    background: var(--bg-sunk, rgba(0,0,0,.06)); color: var(--ink-soft);
}
.mywork-chip.is-on { background: #e3f0e2; color: #2f6b3a; }
/* Material waiting for this person: the accent, because it is a job and it is easy to forget. */
.mywork-chip.is-pickup {
    display: inline-flex; align-items: center; gap: .3rem;
    background: var(--accent-soft); color: var(--accent-ink); box-shadow: inset 0 0 0 1px var(--accent);
}
/* A pickup's address, distance and the way there. */
.mywork-material-where { display: inline-flex; align-items: center; flex-wrap: wrap; gap: .3rem; font-size: .84rem; color: var(--ink-soft); }
.mywork-material-route { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .3rem; }
.mywork-mini-btn { min-height: 2.4rem; border-radius: var(--radius-pill); gap: .35rem; }
/* One gradbišče: back to the list, then name · address on ONE line (cut with an ellipsis on a phone, the
   whole line in the tooltip) - the Prihod card has to be on the first screen, not under a heading block. */
.mywork-site-head { display: flex; flex-direction: column; gap: .15rem; margin: 0 0 .8rem; min-width: 0; }
.mywork-back { align-self: flex-start; font-size: .88rem; font-weight: 600; }
.mywork-back:hover { border-bottom-color: transparent; text-decoration: underline !important; }
.mywork-site-title {
    margin: 0; font-size: 1.2rem; line-height: 1.35; min-width: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mywork-site-addr { font-weight: 400; font-size: .95rem; color: var(--ink-soft); }
.mywork-empty { border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 1.5rem; margin-top: 1.5rem; }
.mywork-sites { margin: 1rem 0 .5rem; }
.mywork-list { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.25rem; }
.mywork-task { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; background: var(--paper); }
.mywork-task-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .7rem; }
.mywork-task-title { font-family: var(--font-serif); font-size: 1.1rem; margin: 0; }
.mywork-when {
    flex-shrink: 0; font-size: .78rem; font-weight: 600; padding: .2rem .55rem; border-radius: var(--radius-pill);
    background: var(--accent-soft); color: var(--accent-ink);
}
.mywork-steps { list-style: none; margin: .9rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.mywork-step { display: flex; align-items: flex-start; gap: .6rem; }
.mywork-check {
    flex-shrink: 0; width: 44px; height: 44px; border-radius: var(--radius); border: 2px solid var(--line-strong);
    background: var(--paper); font-size: 1.2rem; line-height: 1; cursor: pointer; color: var(--accent-ink);
}
.mywork-check:disabled { cursor: not-allowed; opacity: .45; }
.mywork-step.is-done .mywork-check { background: #e3f0e3; border-color: #2c5f2c; color: #2c5f2c; }
/* A step the crew ticked is final for them: the ✓ stays readable, not faded like a control they may not use. */
.mywork-step.is-done .mywork-check:disabled { opacity: 1; cursor: default; }
.mywork-step-text { padding-top: .55rem; line-height: 1.45; flex: 1; min-width: 0; }
.mywork-step.is-done .mywork-step-text { color: var(--ink-soft); }
/* The catalog's reference photograph under its step: the card's width on a phone, never cropped (it is
   instructional - the detail at the edge may be the point), and a tap opens it over the page. */
.mywork-step-img {
    display: block; width: 100%; max-width: 26rem; margin: .45rem 0 0; padding: 0;
    border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper);
    overflow: hidden; cursor: zoom-in;
}
.mywork-step-img img { display: block; width: 100%; height: auto; max-height: 18rem; object-fit: contain; }
.mywork-step-cap { display: block; margin-top: .2rem; font-size: .78rem; color: var(--ink-mute); }
/* A hold-point is shown rather than hidden: the worker has to know the task is not finished and who
   finishes it. */
.mywork-need {
    display: inline-block; margin-left: .4rem; font-size: .72rem; padding: .1rem .45rem;
    border-radius: var(--radius-pill); background: var(--accent-soft); color: var(--accent-ink); white-space: nowrap;
}
/* The comment a step asks for, under its text - on its own line, the card's width on a phone. */
.mywork-step-comment { display: block; width: 100%; max-width: 26rem; margin-top: .45rem; }
.mywork-notes { list-style: none; margin: .9rem 0 0; padding: .7rem 0 0; border-top: 1px solid var(--line); }
.mywork-notes li { margin-bottom: .5rem; font-size: .88rem; }
.mywork-notes .pro-muted { margin-left: .4rem; font-size: .78rem; }
.mywork-notes p { margin: .15rem 0 0; line-height: 1.5; }
.mywork-photos { margin: .6rem 0 0; font-size: .85rem; }
/* The photos on a task as the nadzornik (and the investitor) see them: thumbnails, a tap opens the lightbox.
   The crew keeps the count - they have no access to the builder's files. 64 px clears the tap-size test. */
.mywork-photo-strip { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: .6rem 0 0; }
.mywork-photo-thumb {
    width: 64px; height: 64px; padding: 0; overflow: hidden; cursor: zoom-in;
    border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
}
.mywork-photo-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* From the site head into the read-only gradbeni dnevnik (nadzornik). */
.mywork-diary-link {
    display: inline-flex; align-items: center; gap: .35rem; align-self: flex-start;
    min-height: 44px; font-size: .9rem; font-weight: 600;
}
/* The nadzornik's diary page: the builder's four fields as written, a label column and a value column. */
.diary-readonly { display: grid; grid-template-columns: max-content 1fr; gap: .3rem .9rem; margin: 0; }
.diary-readonly dt { font-size: .85rem; opacity: .7; }
.diary-readonly dd { margin: 0; }
/* The note and the photo: the field on its own line, then Shrani opombo on the left and Dodaj
   fotografijo on the right - real buttons, 44 px and more, each with its mark. */
.mywork-actions { display: flex; flex-direction: column; gap: .55rem; margin-top: .9rem; }
.mywork-actions .type-input { width: 100%; min-width: 0; }
.mywork-actions-row { display: flex; justify-content: space-between; gap: .6rem; }
.mywork-act-btn {
    flex: 0 1 auto; min-height: 44px; padding: .55rem 1.15rem; border-radius: var(--radius-pill); font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
}
.mywork-act-btn .icon { flex: none; }
/* The photo is the second action, not a lesser one: an accent outline on the accent's own tint. */
.mywork-act-btn.mywork-photo-btn {
    border: 2px solid var(--accent); background: var(--accent-soft); color: var(--accent-ink); cursor: pointer;
}
.mywork-act-btn.mywork-photo-btn:hover { background: var(--accent); color: #fff; border-bottom-color: var(--accent); }
/* On a phone they share the row half and half - still one left, one right, both big enough to hit. */
@media (max-width: 520px) { .mywork-act-btn { flex: 1 1 0; padding-inline: .6rem; } }
.mywork-photo-btn { position: relative; overflow: hidden; }
.mywork-photo-btn input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

@media (max-width: 640px) {
    .mywork-actions { flex-direction: column; align-items: stretch; }
    .mywork-actions .btn { width: 100%; }
    .team-invite { flex-direction: column; align-items: stretch; }
}

/* ── Dogajanje: search, filter chips and day headers ─────────────────────────────────────────────
   The search comes first because the page is opened to find ONE line; the chips narrow the trail to
   one kind of work; each day says how many lines it holds, so a month scanned at a glance shows which
   days were busy. The rows themselves keep the .audit-row grid defined with the rest of the trail. */
.audit-tools { display: flex; flex-direction: column; gap: .6rem; margin: 0 0 1rem; }
.audit-search { position: relative; display: flex; align-items: center; max-width: 34rem; }
.audit-search .icon { position: absolute; left: .7rem; color: var(--ink-mute); pointer-events: none; }
.audit-search .type-input { width: 100%; padding-left: 2.1rem; }
.audit-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.pro-audit .audit-day-head {
    display: flex; align-items: baseline; justify-content: space-between; gap: .75rem;
    font-size: 1rem; margin: 0 0 .35rem;
}
.audit-day-name { font-weight: 700; }
.audit-day-count {
    font-size: .78rem; font-weight: 500; color: var(--ink-mute);
    font-variant-numeric: tabular-nums; white-space: nowrap;
}
.pro-audit .audit-note { margin: 1rem auto 0; text-align: center; font-size: .82rem; }
@media (max-width: 640px) {
    .audit-search { max-width: none; }
    /* One swipeable row of chips rather than three lines of them above the first entry. */
    .audit-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .2rem; -webkit-overflow-scrolling: touch; }
    .audit-chips .pro-filter { flex: 0 0 auto; }
}

/* ── Normativ (task panel → Normativ) ─────────────────────────────────────────────────────────────
   The builder's own table as it is written - opis, delavci, ure, skupaj, cena - the vodja's lines marked. */
.pro-norms-table-wrap { overflow-x: auto; }
.pro-norms-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.pro-norms-table th,
.pro-norms-table td { padding: .4rem .5rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.pro-norms-table thead th {
    font-size: .72rem; font-weight: 600; color: var(--ink-mute); text-transform: uppercase; letter-spacing: .03em;
}
.pro-norms-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pro-norms-table tfoot td { font-weight: 700; border-bottom: 0; }
.pro-norms-lead {
    display: inline-block; margin-left: .35rem; padding: 0 .45rem; border-radius: var(--radius-pill);
    font-size: .7rem; font-weight: 600; background: var(--bg); color: var(--ink-mute); white-space: nowrap;
}
.pro-norms-note { font-size: .8rem; }

/* Ure in učinkovitost: what the report says beside the numbers, and the builder's own line of hours. */
.pro-hours-notes { display: flex; flex-direction: column; gap: .3rem; }
.pro-hours-notes p { margin: 0; font-size: .86rem; }
.pro-hours-add { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .6rem 0 .25rem; }
.pro-hours-add .type-input { flex: 1 1 9rem; min-width: 0; }
.pro-hours-add input[type="number"] { flex: 0 1 6rem; }

/* ── Ure in učinkovitost (/projects/{id}/ure) ────────────────────────────────────────────────────
   Totals first (four figures, the učinkovitost carrying the only colour), then the tasks as a table - or
   as cards below 640 px, because five columns do not fit a phone - then people, then the folded lines. */
.pro-hours-periods { margin: 0; }
.pro-hours-totals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
.pro-hours-stat {
    display: flex; flex-direction: column; gap: .1rem; padding: .3rem .6rem;
    border-left: 3px solid var(--line-strong);
}
.pro-hours-stat-num { font-size: 1.45rem; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.pro-hours-stat-label { font-size: .78rem; color: var(--ink-mute); }
.pro-hours-stat.is-good { border-left-color: var(--ok); }
.pro-hours-stat.is-warn { border-left-color: #b7791f; }
.pro-hours-stat.is-bad { border-left-color: #b03a2e; }
.pro-hours-formula { font-size: .82rem; }
.pro-hours-table-wrap { overflow-x: auto; }
.pro-hours-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.pro-hours-table th,
.pro-hours-table td { padding: .5rem .6rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.pro-hours-table thead th {
    font-size: .74rem; font-weight: 600; color: var(--ink-mute); text-transform: uppercase; letter-spacing: .03em;
}
.pro-hours-table tbody th { font-weight: 600; }
.pro-hours-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pro-hours-table .num .pro-muted { display: block; font-size: .74rem; }
.pro-hours-eff {
    display: inline-block; min-width: 3.6rem; padding: .15rem .5rem; border-radius: var(--radius-pill); text-align: center;
    font-size: .82rem; font-weight: 700; font-variant-numeric: tabular-nums; background: var(--bg); color: var(--ink-mute);
}
.pro-hours-eff.is-good { background: var(--ok-soft); color: var(--ok); }
.pro-hours-eff.is-warn { background: #f2f2f2; color: #7a4b0c; }
.pro-hours-eff.is-bad { background: #f8e3e0; color: #8a2a1f; }
.pro-hours-cards { display: none; list-style: none; margin: 0; padding: 0; }
.pro-hours-card { border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem .85rem; background: var(--paper); }
.pro-hours-card + .pro-hours-card { margin-top: .6rem; }
.pro-hours-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem; }
.pro-hours-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; margin: .55rem 0 0; }
.pro-hours-card-grid dt { font-size: .72rem; color: var(--ink-mute); }
.pro-hours-card-grid dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.pro-hours-card-grid dd .pro-muted { display: block; font-size: .74rem; font-weight: 400; }
.pro-hours-workers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.pro-hours-worker { padding-bottom: .5rem; border-bottom: 1px solid var(--line); }
.pro-hours-worker:last-child { padding-bottom: 0; border-bottom: 0; }
.pro-hours-worker-head { display: flex; justify-content: space-between; gap: .6rem; }
.pro-hours-worker-h { font-weight: 700; font-variant-numeric: tabular-nums; }
.pro-hours-entries summary { cursor: pointer; font-weight: 600; }
.pro-hours-entry-list { list-style: none; margin: .75rem 0 0; padding: 0; display: flex; flex-direction: column; }
.pro-hours-entry {
    display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) 5.5rem auto; gap: .6rem; align-items: center;
    padding: .4rem 0; border-bottom: 1px solid var(--line); font-size: .88rem;
}
.pro-hours-entry-date { color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.pro-hours-entry-main { display: flex; flex-wrap: wrap; gap: .3rem; min-width: 0; }
.pro-hours-entry-input { width: 100%; text-align: right; }
.pro-hours-entry-del { white-space: nowrap; }
@media (max-width: 640px) {
    .pro-hours-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pro-hours-table-wrap { display: none; }
    .pro-hours-cards { display: block; }
    .pro-hours-entry { grid-template-columns: minmax(0, 1fr) 5rem auto; }
    .pro-hours-entry-date { grid-column: 1 / -1; }
}

/* Delovni čas on a crew card in Ljudje in podjetja → Delavci. */
.worker-hours { display: flex; align-items: center; gap: .35rem; margin: 0; font-size: .85rem; color: var(--ink-soft); }
.worker-hours .icon { flex: none; color: var(--accent-ink); }
.worker-hours strong { color: var(--ink); font-variant-numeric: tabular-nums; }

/* ── Trenutna naloga on the Planer (PlannerTaskFocus) ────────────────────────────────────────────────
   Drawn the way the Planer draws everything else: no card, no rounded boxes inside boxes - ruled rows on
   the paper of the spread, the task's place in the accent, one strong title, and the steps as a flat list.
   The phase page keeps its task card (ChecklistItemRow + the default .pro-panel); every rule below is
   scoped to .ptf so none of it reaches there. */
.ptf { display: flex; flex-direction: column; gap: .9rem; }
.ptf-head { display: flex; flex-direction: column; gap: .55rem; }
.ptf-crumbs { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem 1rem; flex-wrap: wrap; }
.ptf-where { font-size: .78rem; font-weight: 700; color: var(--accent); letter-spacing: .01em; }
.ptf-open { font-size: .78rem; font-weight: 600; color: var(--ink-mute); text-decoration: none; border-bottom: none; }
.ptf-open:hover { color: var(--accent); }
.ptf-title {
    margin: 0; font-family: var(--font-sans); font-size: 1.05rem; font-weight: 700;
    line-height: 1.2; color: var(--ink); overflow-wrap: anywhere;
}
.ptf.is-done .ptf-title { color: var(--ink-soft); }
.ptf-meta { display: flex; align-items: center; gap: .5rem .9rem; flex-wrap: wrap; }
.ptf-dates { display: inline-flex; align-items: center; gap: .35rem; font-size: .85rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.ptf-dates .icon { color: var(--ink-mute); }
.ptf-due { font-size: .78rem; font-weight: 600; color: var(--ink-mute); }
.ptf-due.is-late { color: #b03c30; }

/* How far along: a hairline bar, not a gauge - the number beside it is what is read. */
.ptf-progress { display: flex; align-items: center; gap: .75rem; }
.ptf-progress-bar { flex: 1 1 auto; height: 4px; border-radius: var(--radius); background: var(--line); overflow: hidden; }
.ptf-progress-bar > span { display: block; height: 100%; background: var(--ok); border-radius: var(--radius); transition: width .25s ease; }
.ptf-progress-text { flex: none; font-size: .8rem; color: var(--ink-mute); font-variant-numeric: tabular-nums; }
.ptf-progress-text strong { color: var(--ink); }

/* What to do next, said once above the list - the answer the builder opened the page for. */
.ptf-next {
    margin: 0; padding: .55rem .75rem; border-left: 3px solid var(--accent);
    background: var(--accent-soft); border-radius: 0 var(--radius) var(--radius) 0;
    font-size: .9rem; line-height: 1.4; color: var(--ink);
}
.ptf-next-label {
    display: block; margin-bottom: .1rem; font-size: .68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em; color: var(--accent-ink, var(--accent));
}
.ptf-blocked {
    margin: 0; display: flex; align-items: center; gap: .4rem;
    font-size: .85rem; color: #7a2020;
}

/* The professional panel, flattened: tabs become the page's underlined text tabs, steps become rows. */
.ptf .pro-panel--planner { margin-top: 0; padding-top: 0; border-top: none; gap: .4rem; }
.ptf .pro-panel--planner > .pro-tabs {
    gap: 1.1rem; padding-bottom: 0; border-bottom: 1px solid var(--line);
}
.ptf .pro-panel--planner > .pro-tabs .pro-tab {
    min-height: 2.3rem; padding: .35rem 0; border: none; border-bottom: 2px solid transparent;
    border-radius: 0; background: none; color: var(--ink-mute); margin-bottom: -1px;
}
.ptf .pro-panel--planner > .pro-tabs .pro-tab:hover { color: var(--ink); }
.ptf .pro-panel--planner > .pro-tabs .pro-tab.is-active {
    background: none; color: var(--ink); border-bottom-color: var(--accent); box-shadow: none;
}
.ptf .pro-panel--planner .pro-tab-count {
    display: inline-block; min-width: 1.2rem; margin-left: .35rem; padding: 0 .3rem; border-radius: var(--radius-pill);
    background: var(--line); color: var(--ink-soft); font-size: .7rem; text-align: center; opacity: 1;
}
.ptf .pro-panel--planner .pro-steps { gap: 0; }
.ptf .pro-panel--planner .pro-step {
    padding: .3rem .1rem; border: none; border-bottom: 1px solid var(--line);
    border-radius: 0; background: none; align-items: flex-start;
}
.ptf .pro-panel--planner .pro-step:last-of-type { border-bottom: none; }
.ptf .pro-panel--planner .pro-step-check { width: 36px; height: 36px; margin-top: -.2rem; }
.ptf .pro-panel--planner .pro-step-body { padding-top: .35rem; }
.ptf .pro-panel--planner .pro-step.is-done { opacity: 1; }
.ptf .pro-panel--planner .pro-step.is-done .pro-step-text { color: var(--ink-mute); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.ptf .pro-panel--planner .pro-step.is-holdpoint { border-left: none; }
.ptf .pro-panel--planner .pro-step.is-holdpoint .pro-step-kind { color: var(--accent-ink, var(--accent)); font-weight: 700; }
/* The next open step: the one row the eye should land on. */
.ptf .pro-panel--planner .pro-step.is-next { background: linear-gradient(90deg, var(--accent-soft), transparent 70%); }
.ptf .pro-panel--planner .pro-step.is-next .pro-step-text { font-weight: 600; }
.ptf .pro-panel--planner .pro-step.is-next .pro-step-check-mark { border-color: var(--accent); }
.ptf .pro-panel--planner .pro-add { margin-top: .5rem; }

.ptf-foot {
    display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
    padding-top: .85rem; border-top: 1px solid var(--line);
}
.ptf-foot-link { margin-left: auto; font-size: .8rem; color: var(--ink-mute); text-decoration: none; border-bottom: none; }
.ptf-foot-link:hover { color: var(--accent); }
.ptf-closed { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; color: var(--ok); }

/* A planner block that folds (Naslednje naloge, blokirano): the head is the same ruled title as every
   other block, with a caret in front and the count behind, so closed it still says how much waits. */
.planner-accordion > summary.planner-title {
    display: flex; align-items: center; gap: .45rem; cursor: pointer; list-style: none;
    margin: 0;
}
.planner-accordion > summary::-webkit-details-marker { display: none; }
.planner-accordion > summary:hover { color: var(--accent-ink, var(--accent)); }
.planner-accordion-caret { display: inline-flex; color: var(--ink-mute); transition: transform .15s; }
.planner-accordion[open] .planner-accordion-caret { transform: rotate(90deg); }
.planner-accordion-count {
    min-width: 1.4rem; padding: .05rem .4rem; border-radius: var(--radius-pill); text-align: center;
    background: var(--line); color: var(--ink-soft); font-size: .75rem; font-weight: 700;
}
.planner-accordion[open] > summary { margin-bottom: .75rem; }

/* Normativ lines in /katalog → PRO ▾: a small table edited in place - each cell saves as it is left. */
.catalog-norms-wrap { overflow-x: auto; margin: .25rem 0 .5rem; }
.catalog-norms { width: 100%; border-collapse: collapse; font-size: .85rem; }
.catalog-norms th {
    text-align: left; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    color: var(--ink-mute); padding: .3rem .4rem; border-bottom: 1px solid var(--line);
}
.catalog-norms td { padding: .25rem .4rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.catalog-norms .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.catalog-norms td:first-child { min-width: 14rem; }
.catalog-norms td:first-child .type-input { width: 100%; }
.catalog-norms td.num .type-input { width: 5rem; text-align: right; }
.catalog-norms select.type-input { min-width: 6.5rem; }
.catalog-norms tfoot td { font-weight: 700; border-bottom: none; padding-top: .45rem; }

/* Under a ticked step: who ticked it and when. Quiet, but never struck through with the step's text. */
.pro-step-doneby {
    display: inline-flex; align-items: center; gap: .3rem;
    font-size: .74rem; color: var(--ok); font-variant-numeric: tabular-nums;
}
.pro-step.is-done .pro-step-doneby { text-decoration: none; }

/* Naročila on the Planer, one group per order-by day. */
.planner-order-day {
    display: flex; align-items: center; justify-content: space-between; gap: .5rem;
    margin: .9rem 0 .2rem; padding-bottom: .25rem; border-bottom: 1px dashed var(--line-strong);
    font-size: .8rem; font-weight: 700; color: var(--ink-soft); letter-spacing: .01em;
}
.planner-order-day:first-of-type { margin-top: .4rem; }
.planner-order-day.is-late { color: #b03c30; }
.planner-order-day.is-today { color: var(--accent-ink, var(--accent)); }
.planner-order-day-n {
    min-width: 1.3rem; padding: 0 .35rem; border-radius: var(--radius-pill); text-align: center;
    background: var(--line); color: var(--ink-soft); font-size: .7rem;
}


/* "Material pred začetkom del" in a professional sklop's head (phase page) and in /katalog. */
.section-material {
    display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .6rem; cursor: pointer;
    border: 1px dashed var(--line-strong); border-radius: var(--radius-pill); background: none;
    font: inherit; font-size: .74rem; font-weight: 600; color: var(--ink-mute);
}
.section-material.is-on { border-style: solid; border-color: var(--accent); color: var(--accent-ink, var(--accent)); background: var(--accent-soft); }
.section-material:disabled { cursor: default; opacity: .8; }
.catalog-section-flag { font-size: .8rem; }
.pro-res-add { margin-top: .5rem; }
.pro-add .type-input.pro-res-num { flex: 0 0 6.5rem; min-width: 0; }
.pro-add .type-input.pro-res-unit { flex: 0 0 5rem; min-width: 0; }
.pro-delay-row { display: flex; align-items: center; gap: .4rem; }
.pro-delay-row .type-input { max-width: 9rem; }
.pro-delay { padding-bottom: .5rem; border-bottom: 1px solid var(--line); }

/* Na gradbišču on the Planer: settled rows, quieter than the ones still asking for something. */
.planner-onsite-row .pro-row-main strong { color: var(--ink-soft); }
.planner-acts { display: flex; flex-direction: column; gap: .25rem; align-items: stretch; flex: none; }

/* Opozorila on the Planer: a soft red card, so the one list a builder must not miss is seen first. */
.planner-block.planner-warn-card {
    padding: .75rem .9rem .5rem; border: 1px solid rgba(176, 60, 48, .25); border-radius: var(--radius);
    background: linear-gradient(160deg, rgba(214, 90, 74, .13) 0%, rgba(214, 90, 74, .05) 55%, rgba(214, 90, 74, .02) 100%);
}
.planner-warn-card > .planner-title {
    background: none; border-bottom-color: rgba(176, 60, 48, .25); padding: 0 0 .5rem; color: #8f2e24;
    display: flex; align-items: center; gap: .45rem;
}
.planner-warn-count {
    min-width: 1.35rem; padding: .05rem .4rem; border-radius: var(--radius-pill); text-align: center;
    background: rgba(176, 60, 48, .15); color: #8f2e24; font-size: .74rem; font-weight: 700;
}
.planner-warn-card .pro-row { border-bottom-color: rgba(176, 60, 48, .14); }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .planner-warn-card > .planner-title,
    :root:not([data-theme="light"]) .planner-warn-count { color: #f0a59b; }
}
:root[data-theme="dark"] .planner-warn-card > .planner-title,
:root[data-theme="dark"] .planner-warn-count { color: #f0a59b; }
/* The forecast's absence on the Planer, said rather than hidden. */
.weather-missing-text { margin: 0; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
    font-size: .85rem; color: var(--ink-mute); }

/* Izbriši gradbišče: the warning says everything goes with it. */
.task-modal-card.site-delete-card { width: min(32rem, 100%); }
.site-delete-warn {
    display: flex; gap: .7rem; align-items: flex-start; margin-bottom: 1rem; padding: .8rem .9rem;
    border: 1px solid rgba(176, 60, 48, .3); border-radius: var(--radius);
    background: linear-gradient(160deg, rgba(214, 90, 74, .14), rgba(214, 90, 74, .04));
    font-size: .88rem; line-height: 1.5; color: var(--ink);
}
.site-delete-warn > .icon { flex: none; color: #b03c30; margin-top: .15rem; }
.site-delete-warn ul { margin: .4rem 0 .5rem; padding-left: 1.1rem; }
.site-delete-card .btn-danger { background: #b03c30; border-color: #b03c30; color: #fff; display: inline-flex; align-items: center; gap: .4rem; }
.site-delete-card .btn-danger:hover:not(:disabled) { background: #8f2e24; border-color: #8f2e24; }

/* Moje delo: a collected pickup's second tap - skladišče or site. */
.mywork-material-btns { display: flex; flex-direction: column; gap: .35rem; flex: none; }

/* Povratne informacije / izboljšave: optional, so quieter than a step that holds the task. */
.pro-step .pro-kind-7 { color: var(--accent-ink, var(--accent)); font-weight: 700; }

/* /katalog → PRO: facts the AI proposed from the steps, waiting for the admin. */
.catalog-fact-proposals {
    padding: .6rem .75rem; border: 1px dashed var(--accent); border-radius: var(--radius);
    background: var(--accent-soft);
}
.catalog-fact-proposals-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .35rem; }

/* ── Kdo je danes na gradbiščih: the map (2026-10-01) ───────────────────────────────────────────────
   The same basemap as the parcel's "V bližini". A pin is a gradbišče; green with a number = that many
   people on it right now, a small quiet dot = nobody. The list under it says who and when. */
.onsite-map-wrap { position: relative; margin-bottom: .9rem; }
.onsite-map {
    height: 340px; width: 100%; border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; z-index: 0;   /* keep the map's panes under the app's sticky/overlay chrome */
}
.onsite-map-legend {
    display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; margin-top: .45rem;
    font-size: .78rem; color: var(--ink-mute);
}
.onsite-map-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.onsite-map-legend .sites-pin { position: static; transform: none; cursor: default; }
.onsite-map-note { font-size: .8rem; margin: -.3rem 0 .8rem; }
.sites-pin {
    display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
    width: 16px; height: 16px; border-radius: 50%; cursor: pointer; font-style: normal;
    background: #8b8f96; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}
.sites-pin.is-on {
    width: 30px; height: 30px; background: #3f8f4f;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .4), 0 0 0 5px rgba(63, 143, 79, .22);
}
.sites-pin-n { color: #fff; font-size: .8rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.sites-pop { font-family: inherit; font-size: .85rem; color: #262626; min-width: 11rem; }
.sites-pop-name { font-weight: 700; color: #262626; }
.sites-pop ul { list-style: none; margin: .4rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .2rem; }
.sites-pop li { display: flex; align-items: center; gap: .4rem; }
.sites-pop p { margin: .35rem 0 0; color: #6a6a6a; }
.sites-pop-dot { flex: none; width: .45rem; height: .45rem; border-radius: 50%; background: #cfcfcf; }
.sites-pop li.is-on .sites-pop-dot { background: #3f8f4f; }
.sites-pop-when { margin-left: auto; padding-left: .6rem; color: #6a6a6a; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 640px) { .onsite-map { height: 260px; } }

/* ── Plan gradbišča: what an order is FOR, and the splošne naloge (2026-10-01) ── */
.planner-order-need {
    display: inline-flex; align-items: center; gap: .35rem; flex-wrap: wrap;
    margin-top: .15rem; font-size: .82rem; color: var(--ink-soft);
}
.planner-order-need b { color: var(--ink); }
.planner-order-need.is-late, .planner-order-need.is-late b { color: #b03c30; }
.planner-order-need.is-none { color: var(--ink-mute); font-style: italic; }
.planner-order-need-rel {
    padding: 0 .4rem; border-radius: var(--radius-pill); background: var(--line); font-size: .72rem; color: var(--ink-soft);
}
.planner-general .pro-row.is-late .pro-row-icon { color: #b03c30; }
.planner-general-undated { font-size: .82rem; margin: -.4rem 0 1rem; }

/* ── Ure in učinkovitost: the ⋯ in the page's top corner (izvoz) ── */
.pro-hours-menu { flex: none; }
.pro-hours-menu .task-menu-btn {
    width: 2rem; height: 2rem; display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.15rem; line-height: 1; color: var(--ink-soft);
    background: var(--bg-elev); border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
}
.pro-hours-menu .task-menu-btn:hover { color: var(--ink); border-color: var(--accent); }

/* ── Dogajanje: the task a line is about opens that task ── */
a.audit-task-link {
    display: inline-flex; align-items: center; gap: .3rem; flex-wrap: wrap;
    color: var(--accent); text-decoration: none; border-bottom: none;
}
a.audit-task-link:hover { border-bottom-color: transparent; }
a.audit-task-link:hover span:not(.audit-task-go) { text-decoration: underline; }
.audit-task-go { font-size: .74rem; color: var(--ink-mute); opacity: 0; transition: opacity .12s; }
a.audit-task-link:hover .audit-task-go, a.audit-task-link:focus-visible .audit-task-go { opacity: 1; }
@media (hover: none) { .audit-task-go { opacity: 1; } }

/* ── Planer čez gradbišča: rows that are answered on the spot (tick · what · when · ⋯) ── */
.planner-row-act { align-items: center; gap: .6rem; }
.planner-row-act .pro-board-main { flex: 1 1 auto; }
.planner-row-act .order-pick { margin: 0 0 0 -.35rem; }
.planner-row-act .pro-board-sub b { color: var(--ink-soft); }

/* -- Skupine gradbisc on the planer cez gradbisca (2026-10-03) -- */
.planner-group-filter { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0 0 1rem; }
.group-filter { display: flex; flex-direction: column; gap: .2rem; min-width: 0; max-width: 100%; }
.group-filter .type-input { min-width: 12rem; max-width: 100%; }
.group-planner .group-sub { margin: 1rem 0 .5rem; font-size: .9rem; font-weight: 700; }
.group-phases { list-style: none; margin: 0 0 .5rem; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.group-phase { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem; min-width: 0; }
.group-phase-name { font-weight: 600; }
.group-phase-sites { color: var(--ink-mute); overflow-wrap: anywhere; min-width: 0; }
.group-phase.is-together .group-phase-name { color: var(--accent-ink); }
.group-materials-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .6rem; }
.group-line { align-items: flex-start; flex-wrap: wrap; }
.group-line .pro-board-main { flex: 1 1 14rem; min-width: 0; }
.group-line-what { overflow-wrap: anywhere; }
.group-line-order { flex: 0 0 auto; white-space: nowrap; }
.group-line-toggle {
    align-self: flex-start; background: none; border: 0; padding: .35rem 0; min-height: 2.25rem;
    font: inherit; font-size: .8rem; color: var(--accent-ink); cursor: pointer; text-align: left;
}
.group-line-toggle:hover { text-decoration: underline; }
.group-parts { margin: .2rem 0 0; padding-left: 1.1rem; font-size: .84rem; }
.group-parts li { overflow-wrap: anywhere; }
.group-order { flex-wrap: wrap; }
.group-order .pro-board-main { flex: 1 1 14rem; min-width: 0; }
.group-order-edit { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .5rem; align-items: flex-end; }
.group-order-edit .auto-sched-field { min-width: 0; flex: 1 1 10rem; }
.group-order-houses .order-recipient span { overflow-wrap: anywhere; }
@media (max-width: 560px) {
    .group-line-order { width: 100%; justify-content: center; }
    .group-filter .type-input { min-width: 0; width: 100%; }
    .group-filter { width: 100%; }
}
.group-order-total { margin: .2rem 0 0; font-size: .9rem; font-weight: 600; color: var(--ink); }
.group-order-eyebrow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
/* A namig (z-index 900) must never lie over an open dialog's buttons - a modal is the one thing on screen. */
body:has(.task-modal) .hint-host { display: none; }
/* Skupine: the new controls get a full finger on a touch screen. */
@media (pointer: coarse) {
    .camera-tile-top .task-menu-btn, .site-group-head .task-menu-btn { width: 44px; height: 44px; }
    .site-group-new, .group-line-order, .group-order .btn, .group-line-toggle { min-height: 44px; }
    .group-order-houses input[type=checkbox], .order-recipient input[type=checkbox] { width: 22px; height: 22px; }
}

/* ── Arhiv podizvajalca (Profesionalni) - ContractorArchiveModal, OrderMailModal, MailThread ── */
.arch-card { width: min(52rem, 100%); }
.arch-address {
    display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem;
    margin: 0 0 .9rem; padding: .55rem .75rem; font-size: .85rem;
    background: var(--accent-soft); border-radius: var(--radius);
}
.arch-address-value, .arch-name { overflow-wrap: anywhere; word-break: break-word; }
.arch-list { list-style: none; margin: .75rem 0 0; padding: 0; display: grid; gap: .4rem; }
.arch-row {
    display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
    padding: .55rem .7rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg);
}
.arch-row-main { display: flex; flex-direction: column; flex: 1 1 12rem; min-width: 0; }
.arch-upload { margin-top: .75rem; }
.arch-upload.is-busy { opacity: .6; pointer-events: none; }
.arch-photos {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: .6rem; margin-top: .75rem;
}
.arch-photo { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg); }
.arch-photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.arch-photo figcaption { display: flex; align-items: center; gap: .3rem; padding: .3rem .45rem; font-size: .78rem; }
.arch-photo-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arch-new { display: grid; gap: .45rem; margin: .75rem 0 1rem; }
.arch-new .btn { justify-self: start; }
.arch-agreement {
    border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem .8rem; margin-bottom: .6rem; background: var(--bg);
}
.arch-agreement header { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .6rem; }
.arch-agreement header strong { flex: 1 1 10rem; overflow-wrap: anywhere; }
.arch-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: .4rem 0 0; font-size: .88rem; line-height: 1.5; }
.arch-comments { list-style: none; margin: .5rem 0 0; padding: 0 0 0 .7rem; border-left: 2px solid var(--line); display: grid; gap: .4rem; }
.arch-comments li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .5rem; font-size: .85rem; }
.arch-comments .arch-text { margin: 0; flex: 1 1 100%; }
.arch-comment-head { font-size: .8rem; }
.arch-comment-add { display: flex; gap: .4rem; margin-top: .5rem; }
.arch-comment-add .type-input { flex: 1; min-width: 0; }
/* Korespondenca: an inbox table - one bordered box, rows split by hairlines, no side stripes. */
.arch-thread { list-style: none; margin: .6rem 0 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--bg); overflow: hidden; }
.arch-mail { padding: .45rem .7rem; border-top: 1px solid var(--line); }
.arch-thread > .arch-mail:first-child { border-top: 0; }
.arch-mail-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .5rem; font-size: .84rem; }
.arch-mail-head .arch-name { color: var(--ink-soft); }
.arch-mail-head strong.arch-name { color: var(--ink); }
.arch-mail-dir { font-size: .7rem; color: var(--ink-soft); white-space: nowrap; }
.arch-mail.is-in .arch-mail-dir { color: var(--accent); }
.arch-mail-date { margin-left: auto; font-size: .78rem; color: var(--ink-soft); white-space: nowrap; }
.arch-mail-subject { margin-top: .1rem; font-size: .88rem; font-weight: 600; overflow-wrap: anywhere; }
.arch-mail-del { margin-left: .2rem; }
.arch-mail .arch-text { margin-top: .25rem; }
.arch-convs { list-style: none; margin: .75rem 0 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--bg); overflow: hidden; }
.arch-conv { border-top: 1px solid var(--line); }
.arch-conv:first-child { border-top: 0; }
.arch-conv-head { all: unset; box-sizing: border-box; display: grid; align-items: center; gap: .2rem .8rem; width: 100%;
    grid-template-columns: minmax(7rem, 13rem) minmax(0, 1fr) auto 4.5rem; padding: .45rem .7rem; cursor: pointer; font-size: .88rem; }
.arch-conv-head:hover { background: var(--bg-soft, rgba(0, 0, 0, .03)); }
.arch-conv-head:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.arch-conv.is-in .arch-conv-from .arch-name, .arch-conv.is-in .arch-conv-subject { font-weight: 600; }
.arch-conv-from { display: flex; align-items: baseline; gap: .35rem; min-width: 0; }
.arch-conv-from .arch-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arch-conv-dir { color: var(--ink-soft); font-size: .8rem; }
.arch-conv.is-in .arch-conv-dir { color: var(--accent); }
.arch-conv-count { font-size: .74rem; color: var(--ink-soft); }
.arch-conv-subject { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arch-conv-subject .contractor-trade-chip { margin-right: .3rem; font-weight: 400; }
.arch-conv-clip { font-size: .78rem; color: var(--ink-soft); white-space: nowrap; }
.arch-conv-date { text-align: right; font-size: .8rem; color: var(--ink-soft); white-space: nowrap; }
.arch-conv.is-open { background: var(--bg-soft, rgba(0, 0, 0, .025)); }
.arch-conv.is-open > .arch-conv-head { border-bottom: 1px solid var(--line); }
.arch-conv.is-open .arch-conv-subject { white-space: normal; }
.arch-conv .arch-thread { margin: 0; border: 0; border-radius: 0; padding-left: .8rem; }
.arch-conv > .pro-muted { margin: .4rem .7rem; }
.arch-mail-body summary { cursor: pointer; font-size: .8rem; color: var(--ink-soft); margin-top: .15rem; list-style: none; }
.arch-mail-body summary::-webkit-details-marker { display: none; }
.arch-snippet { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arch-mail-body[open] .arch-snippet { display: none; }
.arch-mail-body[open] summary::after { content: 'skrij besedilo'; font-size: .74rem; }
@media (max-width: 560px) {
    .arch-conv-head { grid-template-columns: minmax(0, 1fr) auto; }
    .arch-conv-subject { grid-column: 1 / -1; grid-row: 2; }
    .arch-conv-clip { display: none; }
}
.arch-attachments { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .2rem; font-size: .84rem; }
.arch-attachments li { display: flex; flex-wrap: wrap; gap: .4rem; align-items: baseline; }
.contractor-archive-btn { margin: .4rem 0 .2rem; }
.pro-order-mail { margin-top: .3rem; }
@media (max-width: 560px) {
    .arch-card .sched-ai-content { padding: 1rem; }
    .arch-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── Stran podjetja (/imenik/podjetja/{id}) + povezave na imena podjetij ── */
.contractor-link { color: inherit; overflow-wrap: anywhere; }
.contractor-link:hover, .contractor-link:focus-visible { color: var(--accent); }
.contractor-card.is-openable { cursor: pointer; }
.contractor-card.is-openable:hover { box-shadow: 0 0 0 2px var(--accent-soft); }
.contractor-card-name { color: inherit; text-decoration: none; overflow-wrap: anywhere; }
.contractor-page-back { margin: 0 0 .5rem; font-size: .88rem; }
.contractor-page-head h1 { overflow-wrap: anywhere; }
.contractor-page-head .contractor-contact { margin-top: .5rem; }
/* The page's ⋯ (ContractorMenu / WorkerMenu) stays in the head's top-right corner at every width - .phase-header
   wraps, which would drop it under the title on a phone. */
.contractor-page-head,
.phase-header.contractor-page-head { flex-direction: row; flex-wrap: nowrap; gap: .75rem; }
.contractor-page-head .phase-header-text { min-width: 0; }
.contractor-page-menu { flex: none; }
.contractor-page-filter {
    display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; margin: .5rem 0 .75rem;
}
.contractor-page-filter label { display: flex; align-items: center; gap: .5rem; flex: 1 1 16rem; min-width: 0; }
.contractor-page-filter select { flex: 1; min-width: 0; max-width: 24rem; }
.contractor-page-h2 { font-size: 1rem; margin: 1rem 0 .4rem; }
.contractor-site-chip {
    flex: none; max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-size: .75rem; padding: .1rem .45rem; border-radius: var(--radius); background: var(--accent-soft);
}
.contractor-page .pro-tabs { overflow-x: auto; }
.arch-more { margin: .75rem 0; }
.order-mail-archive-link { margin: 0 0 .5rem; font-size: .88rem; }
@media (max-width: 560px) {
    .contractor-site-chip { max-width: 100%; }
    .contractor-page-filter select { max-width: none; }
}

.arch-order { border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem .75rem; background: var(--bg);
    border-left: 3px solid var(--line-strong); display: grid; gap: .3rem; }
.arch-order.is-odgovorjeno { border-left-color: var(--accent); }
.arch-order.is-dobavljeno { opacity: .85; }
.arch-order-head { display: flex; flex-wrap: wrap; gap: .3rem .6rem; align-items: baseline; font-size: .85rem; }
.arch-order-state { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); }
.arch-order-sites { display: flex; flex-wrap: wrap; gap: .3rem .5rem; align-items: center; font-size: .82rem; }
.arch-order-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: .15rem; font-size: .88rem; }
.arch-order-lines li { overflow-wrap: anywhere; }
.arch-order-meta { display: flex; flex-wrap: wrap; gap: .2rem .8rem; font-size: .8rem; }

/* Nastavitve računa (/racun): the firm's paket, poraba, računi and pisarna on one page. */
.account-settings .profile-section { margin-top: 1.25rem; }
.account-settings-sub { font-size: .95rem; margin: 1.1rem 0 .4rem; }
.account-usage-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.account-usage-table th { text-align: left; font-weight: 600; color: var(--ink-soft); font-size: .78rem;
    border-bottom: 1px solid var(--line-strong); padding: .35rem .5rem; }
.account-usage-table td { border-bottom: 1px solid var(--line); padding: .35rem .5rem; }
.account-usage-table td:not(:first-child), .account-usage-table th:not(:first-child) { text-align: right; white-space: nowrap; }
.account-usage-table td.tone-warn { color: var(--warn, #b7791f); font-weight: 600; }
.account-usage-table td.tone-bad { color: var(--danger, #c0392b); font-weight: 600; }
/* Pisarna on /racun (2026-10-06, it was the imenik's third tab): the members list, then the firm's kolektivni
   dopust. The section is jumped to (#pisarna) - leave room for the sticky bar above it. */
.account-office { scroll-margin-top: 5rem; }
.account-office .pro-account-members { margin-top: .75rem; }
.account-closures-row { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; }
.account-closures-row .pro-muted { margin: 0; flex: 1 1 16rem; min-width: 0; }
/* Spremeni vlogo: the two roles as cards with what each may do, the picked one marked. */
.account-role-options { display: grid; gap: .5rem; margin: 0 0 1.25rem; }
.account-role-option {
    display: flex; align-items: flex-start; gap: .6rem; padding: .6rem .75rem; cursor: pointer;
    border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--bg-elev);
}
.account-role-option.is-on { border-color: var(--accent); background: var(--accent-soft); }
.account-role-option input { margin-top: .2rem; accent-color: var(--accent); }
.account-role-option b { display: block; font-size: .9rem; }
.account-role-option em { display: block; font-style: normal; font-size: .8rem; color: var(--ink-soft); line-height: 1.4; }

/* Touch floors for the controls the 14px root shrank below a finger (NomiFac #633, responsive audit): tabs, filters,
   the kazalo rows and the plan's chips were 32-35px on a phone. Px, after every rule that sizes them (the doubled
   class outweighs '.planner-horizon-tabs .pro-tab' and its kin), and before the PROJEKT POD 1000 px block, which
   must stay last. Fields keep 16px text on touch, or iOS zooms the page into them. */
@media (pointer: coarse) {
    .pro-tab.pro-tab, .pro-filter.pro-filter, .profile-tab.profile-tab, .journal-toc-link.journal-toc-link,
    .gantt-late-chip.gantt-late-chip, .gantt-undated-head.gantt-undated-head { min-height: 40px; }
    /* the ads' kind chips, »Več filtrov« and the code's »Kopiraj« were 32 px on a phone (#680, responsive audit) */
    .estates-chip.estates-chip, .estates-more-toggle.estates-more-toggle, .loka-promo-copy.loka-promo-copy { min-height: 40px; }
    /* the task names in »Brez termina« and its »Prikaži vse« were 18 and 22 px under the 40 px head (#857) */
    .gantt-undated-name.gantt-undated-name, .gantt-undated-more.gantt-undated-more { min-height: 40px; }
    .sub-voucher-input.sub-voucher-input, .custom-add-input.custom-add-input, .analytics-search.analytics-search,
    .search-select.search-select, .search-date.search-date { min-height: 40px; font-size: 16px; }
}

/* ══ PROJEKT POD 1000 px (2026-10-06) ═══════════════════════════════════════════════════════════════════
   Below 1000 px the desktop notebook stopped fitting, measured with a Playwright probe at 999 … 320 px on a
   Profesionalni gradbišče (cover, Plan gradbišča, Terminski plan, Kanban tabla):
   - the landscape spread kept its centre crease straight through the text down to 761 px;
   - the bookmark rail stayed a column of ~21 tabs taller than the screen (the tools under the fold) and, as
     the ≤760 strip, scrolled all but three of them out of view;
   - the view tabs (Plan gradbišča / Terminski plan / Kanban tabla) hung off the page's top edge and, at
     641-760 px, sat UNDER the bookmark strip, unreadable and unclickable;
   - the bar ran out of room: at 480 px the gradbišče switcher overlapped the help button, at 390 px the
     account was cut off and the page scrolled sideways (31 px; 101 px at 320).
   One layout from 999 px down, in three steps of the same idea - everything stays VISIBLE, it only scales:
   full (icon + name) → name only → icon only, with the open page always named:
   - bar: one row; the search field becomes its button; names of the account and the user go (their menus
     still show them); ≤600 the leaf stands in for the wordmark and the carets go; ≤360 the gradbišče
     switcher shows a house instead of the name (the name is its title and is in the list).
   - bookmarks: a WRAPPING strip above the page instead of a rail beside it - chapters on one line (or two),
     the tools on the next; 881-999 px with names, ≤880 icon / number only and the open one named, ≤600 (a
     phone) icon / number only throughout, the open one ringed, chapters and tools in one flow.
   - view tabs: a segmented control at the top of the page, in the flow; ≤559 names only, ≤399 the inactive
     ones as icons and the active one named.
   - the page: one sheet, full width, no crease; the planner's spread stretches like every page.
   Declared last in the file on purpose: every rule here meets an older one of the same specificity (the
   760/640 blocks above) and has to win it. Selectors that dark.css also styles are doubled. */
/* hidden on desktop: the leaf that stands in for the wordmark, the house that stands in for the gradbišče name */
.brand-leaf { display: none; }
.project-switch-ico { display: none; align-items: center; }

@media (max-width: 999px) {
    /* ── bar ── (its height, logo and --nav-h: the one top bar's tokens at the top of the file, #1191) */
    .app-nav-inner { flex-wrap: nowrap; gap: .6rem; padding: var(--nav-pad-y) clamp(.75rem, 2.5vw, 1.5rem); }
    .nav-user { margin-left: auto; gap: .4rem; }
    .nav-user-label, .nav-tour-label, .nav-account-label { display: none; }
    .app-nav .journal-toolbar, .app-nav-compact .journal-toolbar { flex: 0 0 auto; min-width: 0; margin-left: auto; }
    .journal-toolbar-inner { flex-wrap: nowrap; width: auto; }
    .journal-search-toggle { display: inline-flex; }
    .journal-search { display: none; }
    .journal-search.is-expanded {
        display: flex; position: absolute; top: 100%; left: 0; right: 0; z-index: 40;
        padding: .5rem .75rem; background: var(--bg-elev);
        border-bottom: 1px solid var(--line-strong); box-shadow: 0 10px 22px rgba(26, 26, 26, .16);
    }
    .journal-search.is-expanded .journal-search-ico { left: 1.55rem; }
    .journal-search.is-expanded .journal-search-clear { right: 1.25rem; }
    .journal-search.is-expanded .journal-search-input { height: 2.5rem; font-size: 1rem; }
    .journal-search.is-expanded .journal-search-results {
        position: absolute; top: 100%; left: .5rem; right: .5rem; transform: none; width: auto; margin-top: .35rem;
    }
    .app-nav .journal-toolbar ~ .nav-user { margin-left: 0; }
    .journal-add, .journal-add-btn { flex: 0 0 auto; }
    .journal-add-pop { right: 0; left: auto; }
    .pro-nav { flex: 0 1 auto; min-width: 0; }
    .project-switch { min-width: 0; }
    .project-switch-btn.project-switch-btn { max-width: 15rem; min-width: 0; }

    /* ── the page: one sheet, full width ── */
    .app-main:has(.journal-spread) { padding-top: 1.25rem; }
    .journal-spread, .journal-spread:has(.journal-page-spread), .journal-spread.has-corner-tab {
        flex-direction: column; gap: 0; margin-top: 0;
    }
    .journal-spread > .journal-page, .journal-spread > .journal-book-cover { align-self: stretch; max-width: 100%; }
    .journal-page { aspect-ratio: auto; }
    .journal-book-cover, .book-cover-inner { max-width: 100%; }
    .book-cover-inner { aspect-ratio: auto; }
    .journal-page.journal-page.journal-page-spread {
        min-height: 0; padding: 1.5rem 1.75rem 2rem calc(2rem + 1.25rem);
    }
    .journal-page.journal-page-spread::after, .journal-spread-rmargin { display: none; }

    /* ── bookmarks: a wrapping strip above the page ── */
    .journal-bookmarks, .journal-bookmarks.is-open {
        order: -1; position: static; z-index: auto;
        flex-direction: row; flex-wrap: wrap; align-items: stretch; gap: .35rem;
        align-self: stretch; width: auto; min-width: 0; max-width: 100%;
        margin: 0 0 1rem; padding: 0; overflow: visible;
    }
    .journal-bookmark, .journal-bookmarks.is-open .journal-bookmark,
    .journal-bookmark.journal-bookmark-insert, .journal-bookmarks.is-open .journal-bookmark.journal-bookmark-insert {
        flex: 0 0 auto; width: auto; min-width: 2.6rem; min-height: 2.6rem; margin: 0;
        padding: .3rem .6rem .35rem; justify-content: center; gap: .4rem;
        border: 1px solid var(--line-strong); border-radius: var(--radius);
        transform: none !important;
    }
    .journal-bookmark::after { border-radius: 0 0 var(--radius) var(--radius); }
    .journal-bookmark-special { border-left: 1px solid var(--line-strong); }
    .journal-bookmark.is-current { box-shadow: 0 0 0 2px var(--phase-color, var(--accent)); }
    .journal-bookmark-label, .journal-bookmarks.is-open .journal-bookmark-label,
    .journal-bookmark-insert .journal-bookmark-label { display: block; white-space: nowrap; font-size: .8rem; }
    .journal-bookmark-tip, .journal-rail-toggle,
    .journal-bookmark-count, .journal-bookmarks.is-open .journal-bookmark-count { display: none; }
    .journal-bookmark-insert-ico::before { display: none; }
    .journal-bookmark-lock { position: static; margin-left: .1rem; }
    /* the separator becomes a line break: the chapters on one line, the tools on the next */
    .journal-bookmarks-sep { display: block; flex: 0 0 100%; height: 0; margin: 0; background: none; }
    /* a chapter's corner tab (Lokacijsko poročilo) hangs off the page top - give it its band under the strip */
    .journal-spread.has-corner-tab .journal-bookmarks { margin-bottom: 2.6rem; }

    /* ── view tabs: a segmented control at the top of the page ── */
    .schedule-view-tabs, .schedule-view-tabs.is-inline {
        position: static; right: auto; bottom: auto; z-index: auto;
        display: flex; flex-wrap: nowrap; justify-content: stretch; align-items: stretch; gap: .3rem;
        margin: 0 0 1rem; padding: .25rem;
        background: color-mix(in srgb, var(--accent) 6%, var(--bg-elev));
        border: 1px solid var(--line-strong); border-radius: var(--radius);
    }
    .schedule-view-tabs .schedule-view-tab.schedule-view-tab {
        flex: 1 1 0; min-width: 0; justify-content: center;
        padding: .5rem .6rem; font-size: .98rem;
        border: 1px solid transparent; border-radius: var(--radius); box-shadow: none; transform: none;
    }
    .schedule-view-tabs .schedule-view-tab.schedule-view-tab:not(.active) { background: transparent; }
    .schedule-view-tabs .schedule-view-tab.schedule-view-tab.active { border-color: var(--accent-ink); }
    .schedule-view-tab span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
    /* the zoom / fullscreen cluster sits in the page's top-right corner on desktop - right where the tabs
       now are; it follows them in the flow */
    .schedule-topctrls { position: static; justify-content: flex-end; margin: -0.25rem 0 .6rem; }
}

@media (max-width: 880px) {
    /* icon / number only, the open bookmark keeps its name: with names the strip took five rows at 820 px */
    .journal-bookmarks, .journal-bookmarks.is-open { gap: .3rem; margin-bottom: .85rem; }
    .journal-bookmark, .journal-bookmarks.is-open .journal-bookmark,
    .journal-bookmark.journal-bookmark-insert, .journal-bookmarks.is-open .journal-bookmark.journal-bookmark-insert {
        min-width: 2.5rem; min-height: 2.5rem; padding: .25rem .4rem .3rem;
    }
    .journal-bookmark-label, .journal-bookmarks.is-open .journal-bookmark-label,
    .journal-bookmark-insert .journal-bookmark-label { display: none; }
    .journal-bookmark.is-current .journal-bookmark-label,
    .journal-bookmarks.is-open .journal-bookmark.is-current .journal-bookmark-label { display: block; }
}

@media (max-width: 600px) {
    .app-nav-inner { gap: .4rem; }
    .nav-user { gap: .25rem; }
    .app-nav .brand-logo { display: none; }
    .app-nav .brand-leaf { display: block; height: 2.35rem; width: auto; }
    /* the carets go; the account pill keeps its PRO badge, the user menu its avatar */
    .nav-account-toggle .nav-dropdown-chevron, .nav-user-dropdown .nav-dropdown-chevron,
    .project-switch-btn .nav-dropdown-chevron { display: none; }
    .nav-account-toggle > .icon { display: none; }
    .nav-user-toggle { padding-left: .3rem; padding-right: .3rem; }
    .project-switch-btn.project-switch-btn { max-width: calc(100vw - 17.5rem); }
    /* a chapter's section header (title, the Pro material switch, the count) wraps instead of pushing the
       count past the screen edge (7 px of sideways scroll at 320 px) */
    .section-head { flex-wrap: wrap; row-gap: .4rem; }
    .section-head h2 { min-width: 0; }

    /* bookmarks on a phone: icon / number only - the open one too, ringed (the page's own title names it) -
       a size smaller and in one flow, chapters and tools together. With the open one named and the tools on a
       line of their own the strip took a third and fourth row, and pushed the 3D map off the first screen. */
    .journal-bookmarks, .journal-bookmarks.is-open { gap: .25rem; margin-bottom: .5rem; }
    .journal-bookmark, .journal-bookmarks.is-open .journal-bookmark,
    .journal-bookmark.journal-bookmark-insert, .journal-bookmarks.is-open .journal-bookmark.journal-bookmark-insert {
        min-width: 2.25rem; min-height: 2.25rem; padding: .2rem .3rem .25rem;
    }
    .journal-bookmark.is-current .journal-bookmark-label,
    .journal-bookmarks.is-open .journal-bookmark.is-current .journal-bookmark-label { display: none; }
    .journal-bookmarks-sep { display: none; }
    /* the 3D map still fits the first screen under the strip (MobileLayoutTests.TheHouse_IsViewOnlyOnAPhone):
       62svh left room for one row of bookmarks, not for all of them */
    .journal-page-spread .p3d-layout, .p3d-layout { --p3d-h: min(55svh, 520px); }
}

@media (max-width: 559px) {
    /* view tabs: the names only */
    .schedule-view-tabs .schedule-view-tab.schedule-view-tab { padding: .5rem .35rem; font-size: .9rem; gap: .3rem; }
    .schedule-view-tab .icon { display: none; }
}

@media (max-width: 399px) {
    /* view tabs: the inactive ones as icons, the active one named */
    .schedule-view-tabs .schedule-view-tab.schedule-view-tab:not(.active) { flex: 0 0 2.9rem; }
    .schedule-view-tabs .schedule-view-tab.schedule-view-tab:not(.active) span { display: none; }
    .schedule-view-tab:not(.active) .icon { display: inline-block; }
    .schedule-view-tabs .schedule-view-tab.schedule-view-tab.active { flex: 1 1 auto; }
}

@media (max-width: 360px) {
    /* the gradbišče switcher: the house instead of the name */
    .project-switch-name { display: none; }
    .project-switch-ico { display: inline-flex; }
    .project-switch-btn.project-switch-btn { max-width: none; padding-left: .45rem; padding-right: .45rem; }
}
/* The bar's two pills - the gradbišče switcher and the firm's account menu - were 32x28 and 47x29 px on a phone,
   the only bar controls without a touch floor (NomiFac #39). They are how a professional gets around one-handed on
   site: a full finger in both directions. After the narrow-bar rules above, whose min-width: 0 it has to win. */
@media (pointer: coarse) {
    .project-switch-btn.project-switch-btn, .nav-account-toggle.nav-account-toggle {
        min-height: 44px; min-width: 44px; justify-content: center;
    }
}
/* Inside a gradbišče a small phone's bar has no room for that: logo, search, +, the switcher, Pomoč, the account and
   the user menu - and the switcher, the one shrinkable item, was squeezed to a 16 px sliver of its house. The room
   comes out of the gaps and the leaf, not out of any control - down to 320 px. */
@media (pointer: coarse) and (max-width: 400px) {
    .app-nav-compact .app-nav-inner { gap: .25rem; padding-left: .5rem; padding-right: .5rem; }
    .app-nav-compact .journal-toolbar-inner { gap: .25rem; }
    .app-nav-compact .nav-user { gap: .2rem; padding-left: .15rem; }
    .app-nav-compact .nav-account-toggle.nav-account-toggle { padding-left: .2rem; padding-right: .2rem; }
    .app-nav-compact .brand-leaf { height: 1.8rem; }
}
@media (max-width: 760px) {
    /* the hairline between the round "how you look" buttons and the square ⋯ stood alone once the phone hid
       the fullscreen button (.schedule-page .schedule-fs-btn above) */
    .schedule-page .schedule-topctrls .schedule-menu { border-left: none; padding-left: 0; margin-left: 0; }
}
@media (max-width: 760px) and (orientation: portrait) {
    /* full-bleed phone: the strip stays off the glass (the portrait block above set this; the 999 block reset it) */
    .journal-bookmarks, .journal-bookmarks.is-open { padding-left: 1rem; padding-right: 1rem; }
}

/* ── »Kje začeti« on the project cover (NomiFac #1153) ─────────────────────────────────────────────────────────
   Right under the title: the one place the cover says where to begin. Two or three numbered steps, the first open one as
   the cover's only primary button.
   #1277: tinted glass laid on the leather, not a paper card - the cover's colour and grain show through, so it reads as
   part of the cover (like »Naslednji koraki«) instead of a white block on it. The glass darkens the leather enough for
   the cover's cream ink to read on the lightest cover colour (CoverCardsOnLeatherStyleTests); the main step is the one
   solid cream button, so the eye still lands on what to do next. Shared with »Vprašaj Pomočnika« below: same glass,
   same edge, same ink. Colours are written out, not tokens: the leather is dark in both themes. */
.cover-start, .cover-ai {
    background: rgba(18, 10, 4, .4); color: #ededed;
    border: 1px solid rgba(237, 237, 237, .2); border-radius: var(--radius);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 12px 26px -22px rgba(0, 0, 0, .9);
    backdrop-filter: blur(3px);   /* softens the grain under the text; the colour and the mottling stay */
}
.cover-start { width: 100%; box-sizing: border-box; margin: 0; padding: 1rem 1.15rem 1.05rem; }
.cover-start-head { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; }
.cover-start-head h2 { margin: 0; font-family: var(--font-serif); font-size: 1.3rem; font-weight: 400; color: #fff; }
.cover-start-close {
    flex: none; min-width: 2rem; min-height: 2rem; border: 0; background: transparent; color: rgba(237, 237, 237, .7);
    font-size: 1.3rem; line-height: 1; cursor: pointer; border-radius: var(--radius);
}
.cover-start-close:hover, .cover-start-close:focus-visible { color: #fff; background: rgba(237, 237, 237, .12); }
.cover-start-seeded { margin: .35rem 0 .55rem; font-size: .9rem; line-height: 1.45; color: rgba(237, 237, 237, .88); }
.cover-start-seeded strong { color: #fff; }
.cover-start-chips { margin-bottom: .35rem; }
.cover-start .cover-welcome-chip { color: #ededed; background: rgba(237, 237, 237, .08); border-color: rgba(237, 237, 237, .3); }
.cover-start .cover-welcome-chip:hover { color: #fff; background: rgba(237, 237, 237, .16); border-color: rgba(237, 237, 237, .7); }
.cover-start-steps { list-style: none; margin: .6rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .7rem; }
.cover-start-step { display: flex; align-items: flex-start; gap: .7rem; min-width: 0; }
.cover-start-num {
    flex: none; width: 1.7rem; height: 1.7rem; border-radius: 50%; display: inline-grid; place-items: center;
    font-size: .82rem; font-weight: 700; border: 1.5px solid rgba(237, 237, 237, .45); color: rgba(237, 237, 237, .88);
    margin-top: .1rem;
}
.cover-start-step.is-primary .cover-start-num { background: #ededed; border-color: #ededed; color: #23160c; }
.cover-start-step.is-done .cover-start-num { background: rgba(237, 237, 237, .16); border-color: rgba(237, 237, 237, .6); color: #fff; }
.cover-start-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; }
.cover-start-title { font-weight: 650; font-size: .98rem; line-height: 1.3; color: #ededed; overflow-wrap: anywhere; }
a.cover-start-link { color: #ededed; text-decoration: none; border-bottom: 1px solid rgba(237, 237, 237, .45); }
a.cover-start-link:hover { color: #fff; border-bottom-color: #fff; }
.cover-start-step.is-done .cover-start-title { color: rgba(237, 237, 237, .85); font-weight: 600; }
.cover-start-go { max-width: 100%; white-space: normal; text-align: left; font-weight: 600; }
/* the cover's one main button: solid cream on the glass, the brightest thing on the cover */
.cover-start .cover-start-go {
    background: #ededed; border-color: #ededed; color: #23160c; box-shadow: 0 8px 18px -12px rgba(0, 0, 0, .9);
}
.cover-start .cover-start-go:hover { background: #fff; border-color: #fff; color: #23160c; }
.cover-start .cover-start-go:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.cover-start-body { margin: 0; font-size: .86rem; line-height: 1.45; color: rgba(237, 237, 237, .85); overflow-wrap: anywhere; }
.cover-start-step.is-grey { opacity: .62; }
.cover-start-note { margin: 0; font-size: .78rem; font-style: italic; color: rgba(237, 237, 237, .85); }
@media (max-width: 600px) {
    /* one column on a phone; the main button runs the card's width */
    .cover-start { padding: .85rem .9rem .95rem; }
    .cover-start-go { align-self: stretch; justify-content: center; text-align: center; }
}

/* ── »Vprašaj Pomočnika« on the project cover (NomiFac #1272) ──────────────────────────────────────────────────────
   One chat window in the cover's empty space under »Kje začeti« / »Naslednji koraki«, with the Pomočnik bookmark's
   rainbow along its top edge so it reads as the Pomočnik at a glance. Its own look, not the Pomočnik page's: a few
   suggestion chips, the month's allowance, one field with its send button; the conversation scrolls inside the card,
   never the cover. No .btn-primary here - the cover keeps one main button (»Kje začeti«, E4 of #1153).
   #1277: the same glass on the leather as »Kje začeti« (the shared rule above), not paper. Chips, allowance and field
   are lighter glass with a cream edge; Pošlji turns solid cream once there is something to send. The answers and the
   limit notice stay on paper bubbles: they are the long reads, with tables and links styled for paper. */
.cover-ai {
    position: relative; width: 100%; box-sizing: border-box; margin: 0; padding: 1.05rem 1.15rem .95rem;
    display: flex; flex-direction: column; gap: .7rem; overflow: hidden;   /* the rainbow follows the corners */
}
.cover-ai::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; pointer-events: none;
    background: linear-gradient(90deg, #e23b3b, #f0892a, #f4d23a, #4fae5a, #3f8fd0, #8a54c4);
}
.cover-ai-head { display: flex; align-items: flex-start; gap: .7rem; flex-wrap: wrap; }
.cover-ai-mark {
    flex: none; width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--accent), var(--accent-ink));
    box-shadow: 0 0 0 1px rgba(237, 237, 237, .35);   /* its edge on the dark glass */
}
.cover-ai-mark { color: #fff; }
.cover-ai-mark svg { width: 1.35rem; height: 1.35rem; display: block; }
.cover-ai-titles { flex: 1 1 14rem; min-width: 0; }
.cover-ai-titles h2 { margin: 0; font-family: var(--font-serif); font-size: 1.3rem; font-weight: 400; color: #fff; }
.cover-ai-sub { margin: .15rem 0 0; font-size: .86rem; line-height: 1.4; color: rgba(237, 237, 237, .85); }
.cover-ai-sub a { color: #ededed; font-weight: 600; text-decoration: none; border-bottom: 1px solid currentColor; }
.cover-ai-sub a:hover { color: #fff; }
.cover-ai-quota, .cover-ai-writes {
    flex: none; align-self: flex-start; padding: .25rem .6rem; font-size: .78rem; line-height: 1.3; white-space: nowrap;
    color: rgba(237, 237, 237, .88); background: rgba(0, 0, 0, .18); border: 1px solid rgba(237, 237, 237, .25);
    border-radius: var(--radius);
}
.cover-ai-quota b, .cover-ai-writes b { color: #fff; }
.cover-ai-quota.is-out, .cover-ai-writes.is-out { color: #ffb4a6; border-color: currentColor; }
.cover-ai-quota.is-out b { color: inherit; }
/* NomiFac #1357: the Pomočnik's changes next to the AI allowance - its sentence may be long, so it wraps. */
.cover-ai-writes { white-space: normal; max-width: 100%; overflow-wrap: anywhere; }
.cover-ai-suggestions { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.cover-ai-suggestions li { max-width: 100%; }
.cover-ai-chip {
    max-width: 100%; min-height: 36px; padding: .4rem .75rem; text-align: left; cursor: pointer;
    font: inherit; font-size: .86rem; line-height: 1.3; overflow-wrap: anywhere;
    color: #ededed; background: rgba(237, 237, 237, .08); border: 1px solid rgba(237, 237, 237, .3); border-radius: var(--radius);
}
.cover-ai-chip:hover:not(:disabled), .cover-ai-chip:focus-visible {
    color: #fff; border-color: rgba(237, 237, 237, .7); background: rgba(237, 237, 237, .16);
}
.cover-ai-chip:disabled { opacity: .55; cursor: default; }
.cover-ai-messages {
    display: flex; flex-direction: column; gap: .55rem; max-height: min(24rem, 55svh); overflow-y: auto;
    overscroll-behavior: contain; padding-right: .15rem;
}
.cover-ai-msg {
    max-width: 88%; box-sizing: border-box; padding: .55rem .75rem; border-radius: var(--radius);
    font-size: .92rem; line-height: 1.45; overflow-wrap: anywhere;
}
.cover-ai-msg.from-user { align-self: flex-end; white-space: pre-wrap; color: var(--ink); background: var(--accent-soft); }
/* a wide table in an answer scrolls inside its bubble, never the cover sideways */
.cover-ai-msg.from-ai {
    align-self: flex-start; overflow-x: auto; color: var(--ink); background: var(--bg); border: 1px solid var(--line);
}
.cover-ai-msg img { max-width: 100%; height: auto; }
.cover-ai-msg.is-thinking { color: var(--ink-mute); font-style: italic; }
.cover-ai-limit {
    margin: 0; padding: .55rem .75rem; font-size: .86rem; line-height: 1.45; color: var(--ink);
    background: var(--accent-soft); border-radius: var(--radius);
}
.cover-ai-limit a { color: var(--accent-ink); font-weight: 600; }
.cover-ai-form { display: flex; align-items: center; gap: .5rem; margin: 0; }
.cover-ai-input {
    flex: 1 1 auto; min-width: 0; height: max(2.75rem, 44px); box-sizing: border-box; padding: 0 .85rem;
    font: inherit; font-size: 16px;   /* iOS zooms into a field under 16 px (the root is 14 px) */
    color: #fff; background: rgba(0, 0, 0, .22); border: 1px solid rgba(237, 237, 237, .4); border-radius: var(--radius);
}
.cover-ai-input::placeholder { color: rgba(237, 237, 237, .75); opacity: 1; }
.cover-ai-input:focus { outline: none; border-color: #ededed; box-shadow: 0 0 0 3px rgba(246, 211, 184, .22); }
.cover-ai-input:disabled { opacity: .6; }
/* solid cream once there is a question to send; an outline on the glass until then */
.cover-ai-send {
    flex: none; width: max(2.75rem, 44px); height: max(2.75rem, 44px);   /* the touch floor, whatever the root size */
    display: grid; place-items: center; padding: 0; cursor: pointer;
    color: #23160c; background: #ededed; border: 1px solid #ededed; border-radius: var(--radius);
}
.cover-ai-send svg { width: 1.15rem; height: 1.15rem; display: block; }
.cover-ai-send:hover:not(:disabled):not(.is-stop) { background: #fff; border-color: #fff; }
.cover-ai-send:disabled { cursor: default; color: rgba(237, 237, 237, .55); background: transparent; border-color: rgba(237, 237, 237, .3); }
.cover-ai-send.is-stop { color: #ededed; background: rgba(237, 237, 237, .1); border-color: rgba(237, 237, 237, .6); }
.cover-ai-send:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.cover-ai-foot {
    display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .2rem .9rem;
    font-size: .8rem; line-height: 1.4; color: rgba(237, 237, 237, .85);
}
.cover-ai-link { font-weight: 600; color: #ededed; text-decoration: none; border-bottom: 1px solid currentColor; }
.cover-ai-link:hover { color: #fff; }
@media (max-width: 600px) {
    .cover-ai { padding: 1rem .9rem .85rem; }
    .cover-ai-msg { max-width: 94%; }
    .cover-ai-quota { white-space: normal; }
}

/* The ⋯ »Uredi naslovnico« in the cover's corner (the place Deli used to hold). Its rows are the app's menu rows -
   including Deli projekt, which keeps its class (.book-cover-share) but none of the corner chip's dark look. */
.book-cover-inner .book-cover-edit.cover-edit-menu .schedule-menu-pop { color: var(--ink); }
.book-cover-inner .cover-edit-menu a.schedule-menu-item { text-decoration: none; color: var(--ink); }
.book-cover-inner .book-cover-edit.cover-edit-menu .schedule-menu-item.book-cover-share {
    display: flex; align-items: flex-start; gap: .5rem; height: auto; padding: .45rem .5rem;
    border: none; border-radius: var(--radius); background: none; backdrop-filter: none;
    color: var(--ink); font-size: inherit; font-weight: inherit;
}
.book-cover-inner .book-cover-edit.cover-edit-menu .schedule-menu-item.book-cover-share:hover { background: var(--accent-soft); color: var(--ink); }
.book-cover-inner .cover-edit-menu .schedule-menu-plan { display: inline-flex; align-items: center; gap: .2rem; }

/* The cover picture while it uploads - the frame shows up the moment a file is chosen. */
.cover-hero.cover-hero-uploading { min-height: 8rem; }

/* »Potrebuješ pomoč? Predstavitev v 1 min.« (NomiFac #1153): the page's tour offered, not imposed - a small dark bubble hung
   under »Pomoč«, no dimming, over the page (never over the bar's own buttons). Right-aligned to the button so on a
   phone, where »Pomoč« is only its icon near the right edge, it grows leftwards and stays inside the screen. */
.nav-tour-wrap { position: relative; display: inline-flex; align-items: center; }
.nav-tour-hint {
    position: absolute; top: calc(100% + .6rem); right: -.25rem; z-index: 40;
    display: flex; align-items: center; gap: .1rem;
    width: max-content; max-width: min(17rem, calc(100vw - 1.5rem)); box-sizing: border-box;
    padding: .2rem .2rem .2rem .15rem; border-radius: var(--radius);
    background: var(--ink); color: var(--bg-elev);
    box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .55);
    font-family: var(--font-sans);
}
.nav-tour-hint::before {
    content: ""; position: absolute; top: -.35rem; right: 1.05rem; width: .7rem; height: .7rem;
    background: var(--ink); transform: rotate(45deg); border-radius: var(--radius);
}
.nav-tour-hint-go {
    position: relative; flex: 1 1 auto; min-width: 0; min-height: 2.1rem; padding: .3rem .55rem;
    border: 0; background: none; color: inherit; font: inherit; font-size: .84rem; line-height: 1.3;
    text-align: left; cursor: pointer; border-radius: calc(var(--radius) - var(--radius));
}
.nav-tour-hint-go strong { font-weight: 700; white-space: nowrap; }
.nav-tour-hint-x {
    position: relative; flex: none; min-width: 2.1rem; min-height: 2.1rem; border: 0; background: none;
    color: inherit; opacity: .75; font-size: 1.15rem; line-height: 1; cursor: pointer; border-radius: calc(var(--radius) - var(--radius));
}
.nav-tour-hint-go:hover, .nav-tour-hint-go:focus-visible,
.nav-tour-hint-x:hover, .nav-tour-hint-x:focus-visible { background: rgba(255, 255, 255, .14); opacity: 1; }
[data-theme="dark"] .nav-tour-hint-go:hover, [data-theme="dark"] .nav-tour-hint-x:hover { background: rgba(0, 0, 0, .12); }
@media (max-width: 760px) {
    /* »Pomoč« is only its icon here, a thumb from the right edge: the label wraps onto two lines rather than run
       off the left of a 320 px screen. */
    .nav-tour-hint { max-width: 13rem; }
    .nav-tour-hint-go strong { white-space: normal; }
}

/* ── Profil → Povezave: žetoni in povezave AI aplikacij (MCP, NomiFac #1281). Seznam kartic namesto tabele, da pri 320 px
   nič ne teče čez rob; gumb »Prekliči« ostane v dosegu palca. ── */
.mcp-section .mcp-subhead { font-size: 1rem; margin: 1.4rem 0 .5rem; }
.mcp-endpoint-field { max-width: 540px; }
.mcp-endpoint-url { overflow-wrap: anywhere; }
.profile-token-reveal {
    margin: 1rem 0; padding: 1rem;
    border: 1px solid #c79a00; border-radius: var(--radius); background: #fffbe6;
    display: flex; flex-direction: column; gap: .35rem;
}
.profile-token-reveal label { margin-top: .5rem; font-weight: 600; }
.mcp-copy-row { display: flex; gap: .5rem; min-width: 0; }
.mcp-copy-row .type-input { flex: 1 1 auto; min-width: 0; font-family: var(--font-mono); }
.mcp-list { list-style: none; margin: .5rem 0; padding: 0; display: grid; gap: .5rem; }
.mcp-item {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .25rem .75rem; align-items: center;
    padding: .6rem .75rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev);
}
.mcp-item-main { display: flex; flex-wrap: wrap; gap: .3rem .6rem; align-items: baseline; min-width: 0; }
.mcp-item-main strong, .mcp-item-main code, .mcp-host { overflow-wrap: anywhere; min-width: 0; }
.mcp-host { color: var(--ink-soft); font-size: .88rem; }
.mcp-item-meta { grid-column: 1; font-size: .82rem; color: var(--ink-mute); }
.mcp-item > .btn { grid-column: 2; grid-row: 1 / span 2; min-height: 44px; }
.mcp-access { font-size: .75rem; padding: .05rem .5rem; border-radius: var(--radius-pill); border: 1px solid currentColor; white-space: nowrap; }
.mcp-access.is-read { color: var(--ok); }
.mcp-access.is-write { color: var(--accent-ink); }
.mcp-new-token { margin-top: .75rem; }
.mcp-create-btn { margin-top: .75rem; min-height: 44px; }
.mcp-trial-limit { padding: .5rem .75rem; border-radius: var(--radius); background: var(--accent-soft); }
/* NomiFac #1357: the paket's MCP writes and today's calls - one line each, wrapping on a phone. */
.mcp-usage-lines { padding: .5rem .75rem; border-radius: var(--radius); background: var(--accent-soft); overflow-wrap: anywhere; }
.mcp-usage-lines > span { display: block; }
.mcp-writes-line { font-weight: 700; color: var(--ink); }
.mcp-writes-line.is-out { color: #8a2f27; }
.mcp-usage-note { font-size: .82rem; color: var(--ink-mute); margin-top: .15rem; }
@media (max-width: 480px) {
    .mcp-item { grid-template-columns: minmax(0, 1fr); }
    .mcp-item > .btn { grid-column: 1; grid-row: auto; justify-self: start; }
}

/* ── Vodnik za povezavo AI orodja (McpConnectGuide, NomiFac #1400): zavihki v Profil → Povezave, vsa orodja naenkrat v
   /navodila/mcp. Zavihki se pri 320 px prelomijo v dve vrsti, naslov in ukaz se prelomita kjer koli. ── */
.mcp-guide { margin: .75rem 0 0; max-width: 46rem; }
.mcp-guide.is-tabs { padding: .75rem .9rem .85rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev); }
.mcp-guide-tabs { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0 0 .6rem; }
.mcp-guide-tab {
    min-height: 40px; padding: .35rem .85rem; border: 1px solid var(--line); border-radius: var(--radius-pill);
    background: var(--bg); color: var(--ink-soft); font: inherit; font-size: .88rem; cursor: pointer;
}
.mcp-guide-tab:hover { border-color: var(--accent); color: var(--ink); }
.mcp-guide-tab.is-active { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); font-weight: 600; }
.mcp-guide-steps { margin: .25rem 0 0; padding-left: 1.4rem; display: flex; flex-direction: column; gap: .45rem; }
.mcp-guide-steps li { line-height: 1.55; font-size: .92rem; overflow-wrap: anywhere; }
.mcp-guide-url, .mcp-guide-cmd { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .35rem; max-width: 100%; vertical-align: middle; }
.mcp-guide-cmd { display: flex; margin-top: .3rem; }
.mcp-guide-url code, .mcp-guide-cmd code { overflow-wrap: anywhere; min-width: 0; }
.mcp-guide-copy {
    min-height: 32px; padding: .15rem .6rem; border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--bg); color: var(--ink-soft); font: inherit; font-size: .78rem; cursor: pointer;
}
.mcp-guide-copy:hover { border-color: var(--accent); color: var(--accent-ink); }
.mcp-guide-note { margin: .6rem 0 0; font-size: .84rem; color: var(--ink-mute); line-height: 1.5; }
.mcp-guide-after { margin: .85rem 0 0; font-size: .88rem; line-height: 1.5; }
.mcp-guide.is-all .mcp-guide-panel + .mcp-guide-panel { margin-top: .4rem; }

/* ── Privolitev OAuth /oauth/authorize (MCP, NomiFac #1281): kartica prijave, širša za celoten naslov za vrnitev. ── */
.oauth-consent .login-card { max-width: 32rem; }
.oauth-alert {
    margin: 0; padding: .6rem .75rem; border-radius: var(--radius);
    background: #fff4e5; border: 1px solid #f0b46a; color: #6b3d00; font-size: .9rem;
}
.oauth-summary { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .35rem .75rem; margin: .5rem 0; font-size: .9rem; }
.oauth-summary dt { color: var(--ink-mute); }
.oauth-summary dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.oauth-uri { font-family: var(--font-mono); font-size: .82rem; }
.oauth-muted { color: var(--ink-mute); font-size: .85rem; }
.oauth-access { border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem .75rem; display: grid; gap: .55rem; margin: 0; }
.oauth-access legend { padding: 0 .25rem; font-weight: 600; }
.oauth-access label { display: block; font-size: .92rem; }
.oauth-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; }
.oauth-actions .btn { min-height: 44px; flex: 1 1 8rem; justify-content: center; }
@media (max-width: 400px) {
    .oauth-summary { grid-template-columns: minmax(0, 1fr); }
    .oauth-summary dd { margin-bottom: .35rem; }
}

/* Navodila → Povezava z AI orodji (MCP): ukaz za terminal se lomi, ne teče čez rob pri 320 px (#1281). */
.man-code {
    margin: .5rem 0; padding: .6rem .75rem; border-radius: var(--radius); background: var(--bg-sunk);
    border: 1px solid var(--line); font-size: .82rem; white-space: pre-wrap; overflow-wrap: anywhere;
}

/* ============================================================================================================
   ARCHITEC STUDIO - the design layer (design: "Architec Studio - Home.html").
   White sheet, near-black ink (#0A0A0A), grey hairlines (#E4E4E4) and a hard black rule between sections; Archivo
   for text and display (weight 400, tight tracking), IBM Plex Mono for every small label, number and button;
   square corners, no shadows at rest, no paper. The tokens at the top of this file carry most of it; this block
   draws the public pages (.ax-*) and re-dresses the app's own chrome (bars, buttons, the notebook, the shelf).
   Last in the sheet on purpose: it wins over the older rules it overrides.
   ============================================================================================================ */

:root {
    --shadow-page: none;
    --shadow-card: none;
    --paper-line: transparent;
    --paper-margin: transparent;
    --tape: transparent;
    --radius-lg: 0px;
    --ax-gutter: 28px;
    --ax-pop-shadow: 0 1px 0 rgba(10, 10, 10, .04), 0 12px 32px -12px rgba(10, 10, 10, .28);
}

body { background: var(--bg); color: var(--ink); font-family: var(--font-sans); }
::selection { background: #0a0a0a; color: #fff; }
h1, h2 { font-weight: 400; letter-spacing: -.02em; }
h3 { font-weight: 500; letter-spacing: -.01em; }
a { color: var(--ink); }
a:hover { color: #5b5b5b; }

/* ---------- the wordmark ---------- */
.ax-wordmark { display: inline-flex; align-items: baseline; gap: 10px; color: var(--ink); white-space: nowrap; line-height: 1; }
.ax-wordmark-name { font-family: var(--font-sans); font-size: 15px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; }
.ax-wordmark-sub { font-family: var(--font-mono); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: #8a8a8a; }
/* the bars' old <img> logo classes now sit on the wordmark: the box is the text, not a 3.25rem picture */
.ax-wordmark.brand-logo, .ax-wordmark.zw-brand-logo, .ax-wordmark.lp-brand-logo { height: auto; width: auto; display: inline-flex; }
.ax-wordmark.login-logo { height: auto; width: auto; display: inline-flex; margin: 0 auto 1.5rem; }
.ax-wordmark.login-logo .ax-wordmark-name { font-size: 18px; }
.brand-leaf { filter: none; }

/* ---------- buttons (public pages) ---------- */
.ax-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    font-family: var(--font-mono); font-size: 11px; font-weight: 400; letter-spacing: .14em; text-transform: uppercase;
    padding: 10px 16px; background: #0a0a0a; color: #fff; border: 1px solid #0a0a0a; border-radius: 0;
    cursor: pointer; white-space: nowrap; transition: background .15s, color .15s;
}
.ax-btn:hover { background: #262626; border-color: #262626; color: #fff; border-bottom-color: #262626; }
.ax-btn-line { background: transparent; color: #0a0a0a; }
.ax-btn-line:hover { background: #0a0a0a; color: #fff; border-color: #0a0a0a; }
.ax-btn-sm { padding: 9px 14px; }
.ax-btn-lg { font-size: 12px; padding: 16px 26px; }
.ax-link {
    font-family: var(--font-mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
    color: var(--ink); border-bottom: 1px solid currentColor;
}
.ax-link:hover { color: #5b5b5b; }

/* ---------- the public page frame ---------- */
.ax-page {
    max-width: 1560px; margin: 0 auto; background: var(--bg);
    border-left: 1px solid var(--line); border-right: 1px solid var(--line);
}
.ax-header {
    position: sticky; top: 0; z-index: 50;
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    padding: 18px var(--ax-gutter); min-height: 0;
    background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--rule);
}
.ax-brand { display: flex; align-items: baseline; border: 0; }
.ax-brand:hover { border: 0; }
.ax-nav {
    display: flex; flex-wrap: wrap; gap: 22px;
    font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
}
.ax-nav-link { color: var(--ink); border-bottom: 1px solid transparent; padding-bottom: 2px; }
.ax-nav-link:hover, .ax-nav-link.is-current { color: var(--ink); border-bottom-color: currentColor; }
.ax-header-actions { display: flex; align-items: center; gap: 12px; }
.ax-lang {
    font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em;
    padding: 8px 10px; background: transparent; border: 1px solid var(--line-strong); color: var(--ink); cursor: pointer;
}
.ax-lang:hover { border-color: var(--ink); }
@media (max-width: 1060px) { .ax-nav { display: none; } }
@media (max-width: 560px) {
    .ax-header { padding: 14px 16px; gap: 12px; }
    .ax-header-actions { gap: 8px; }
    .ax-header-actions .ax-btn-line, .ax-wordmark-sub { display: none; }
}

/* ---------- type ---------- */
.ax-eyebrow {
    font-family: var(--font-mono); font-size: 11px; letter-spacing: .24em; text-transform: uppercase;
    color: #8a8a8a; margin-bottom: 28px;
}
.ax-display {
    font-family: var(--font-sans); font-size: clamp(40px, 5.6vw, 78px); line-height: .98; font-weight: 400;
    letter-spacing: -.03em; margin: 0 0 28px; text-wrap: balance;
}
.ax-display-md { font-size: clamp(28px, 3.6vw, 52px); margin: 0; max-width: 20ch; }
.ax-h2 { font-family: var(--font-sans); font-size: clamp(26px, 3vw, 40px); font-weight: 400; letter-spacing: -.02em; margin: 0; line-height: 1.1; }
.ax-h2-lg { font-size: clamp(28px, 3.4vw, 46px); letter-spacing: -.025em; margin: 0 0 20px; text-wrap: balance; }
.ax-h3 { font-family: var(--font-sans); font-size: 20px; font-weight: 500; margin: 0 0 10px; letter-spacing: -.01em; line-height: 1.25; }
.ax-h3-lg { font-size: 26px; font-weight: 400; letter-spacing: -.02em; }
.ax-lead { max-width: 52ch; font-size: 17px; line-height: 1.6; color: #3a3a3a; margin: 0; text-wrap: pretty; }
.ax-lead-sm { max-width: 48ch; font-size: 16px; line-height: 1.65; margin: 0 0 32px; }
.ax-text { margin: 0; font-size: 15px; line-height: 1.6; color: #3a3a3a; }
.ax-num { font-family: var(--font-mono); font-size: 11px; letter-spacing: .2em; color: #8a8a8a; text-transform: uppercase; }
.ax-cell-num { margin-bottom: 16px; }

/* ---------- sections ---------- */
.ax-hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); border-bottom: 1px solid var(--rule); }
.ax-hero-copy {
    padding: 72px var(--ax-gutter) 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 48px;
    border-right: 1px solid var(--line);
}
.ax-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.ax-figure { position: relative; margin: 0; background: var(--panel); overflow: hidden; }
.ax-figure img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
    filter: grayscale(1) contrast(1.04); transition: filter .5s ease;
}
.ax-figure:hover img { filter: none; }
.ax-hero-figure { min-height: 440px; }
.ax-split-figure { min-height: 520px; }
.ax-split-figure img { object-position: left top; }
.ax-dwg {
    position: absolute; left: 20px; bottom: 18px; pointer-events: none;
    font-family: var(--font-mono); font-size: 10px; letter-spacing: .2em; color: #8a8a8a; text-transform: uppercase;
    background: rgba(255, 255, 255, .9); padding: 4px 8px;
}
.ax-section { border-bottom: 1px solid var(--rule); }
.ax-section-head {
    display: flex; justify-content: space-between; align-items: baseline; gap: 24px; flex-wrap: wrap;
    padding: var(--ax-gutter); border-bottom: 1px solid var(--line);
}
.ax-grid { display: grid; }
/* at most three (two) columns, as the design: a track never narrower than a third (half) of the row */
.ax-grid-3 { grid-template-columns: repeat(auto-fit, minmax(max(300px, 32%), 1fr)); }
.ax-grid-2 { grid-template-columns: repeat(auto-fit, minmax(max(300px, 49%), 1fr)); }
/* hairlines between cells, the design's way: every cell draws its right and bottom edge, the grid clips the outer ones */
.ax-grid { overflow: hidden; }
.ax-cell {
    display: block; padding: 36px var(--ax-gutter); color: inherit;
    box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line);
}
.ax-cell-link { border-bottom: 0; transition: background .15s; }
.ax-cell-link:hover { background: var(--hover); color: inherit; border-bottom: 0; }
.ax-cell-link .ax-cell-num { margin-bottom: 22px; }

.ax-band {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    border-bottom: 1px solid var(--rule); background: #0a0a0a; color: #fff;
}
.ax-band-cell { padding: 40px var(--ax-gutter); box-shadow: 1px 0 0 #262626; }
.ax-band-value { font-size: clamp(34px, 4vw, 54px); font-weight: 300; letter-spacing: -.03em; line-height: 1.05; }
.ax-band-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: #9a9a9a; margin-top: 8px; }

.ax-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); border-bottom: 1px solid var(--rule); }
.ax-split-copy { padding: 56px var(--ax-gutter); border-right: 1px solid var(--line); }
.ax-phases { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.ax-phases li { display: flex; gap: 18px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.ax-phase-num { font-family: var(--font-mono); font-size: 12px; color: #8a8a8a; width: 24px; flex: 0 0 auto; padding-top: 2px; }

.ax-industry { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(320px, 1.4fr); scroll-margin-top: 80px; }
.ax-industry-intro { padding: 56px var(--ax-gutter); border-right: 1px solid var(--line); }
.ax-industry .ax-grid-2 { align-content: stretch; }
@media (max-width: 900px) { .ax-industry { grid-template-columns: 1fr; } .ax-industry-intro { border-right: 0; border-bottom: 1px solid var(--line); } }


.ax-cta {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px;
    padding: 72px var(--ax-gutter); border-bottom: 1px solid var(--rule);
}
.ax-newsletter { max-width: none; margin: 0; padding: 0; border-bottom: 1px solid var(--rule); }
.ax-newsletter .lp-newsletter-card { border: 0; padding: 56px var(--ax-gutter); background: var(--bg); }
.ax-newsletter .lp-newsletter-copy h2 { font-family: var(--font-sans); font-size: clamp(26px, 3vw, 40px); font-weight: 400; letter-spacing: -.02em; }
.ax-newsletter .lp-newsletter-input { border-radius: 0; }
.ax-newsletter .lp-newsletter-submit { background: #0a0a0a; border-color: #0a0a0a; color: #fff; }
@media (max-width: 560px) {
    :root { --ax-gutter: 16px; }
    .ax-hero-copy { padding-top: 48px; border-right: 0; }
    .ax-hero-figure { min-height: 300px; }
    .ax-split-copy { border-right: 0; }
    .ax-split-figure { min-height: 320px; }
    .ax-cta { padding: 48px var(--ax-gutter); }
}

/* ---------- footer (app + public) ---------- */
.app-footer.ax-footer {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px;
    padding: 44px var(--ax-gutter); text-align: left; align-items: start;
    font-size: 14px; color: #6a6a6a; border-top: 1px solid var(--line);
}
.ax-footer-col { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ax-footer-name { font-size: 14px; letter-spacing: .22em; text-transform: uppercase; color: var(--ink); margin-bottom: 6px; }
.ax-footer-meta { margin-top: 8px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; color: #8a8a8a; }
.ax-footer-links { gap: 8px; }
.ax-footer-links a, .ax-footer-links .app-footer-link { color: var(--ink); font: inherit; font-size: 14px; text-align: left; padding: 0; }
.ax-footer .app-footer-gurs { display: block; max-width: 52ch; font-size: 12px; line-height: 1.7; color: #6a6a6a; }
.ax-footer .app-footer-gurs a { border-bottom: 1px solid currentColor; }
.ax-footer a { color: var(--ink); }
.app-shell .ax-footer, .shell .ax-footer { margin-top: auto; }

/* ---------- landing leftovers that stay on the page ---------- */
.lp { background: var(--bg); }
.lp-newsletter { background: var(--bg); }

/* ============================================================================================================
   THE APP'S CHROME
   ============================================================================================================ */

/* ---------- bars: landing (old .lp-header on server pages), app nav, čarovnik ---------- */
.app-nav, .lp-header, .zw-top {
    background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--rule);
}
.app-nav-inner { --nav-logo-h: 1.6rem; }
.brand { font-family: var(--font-sans); }
.nav-links { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.nav-links a { border-radius: 0; font-weight: 400; color: var(--ink-soft); }
.nav-links a:hover, .nav-links a.active { background: transparent; color: var(--ink); box-shadow: inset 0 -1px 0 var(--ink); }
/* »Hiša v 3D«: a solid black tab instead of the glowing terracotta pill */
.nav-links a.nav-link-3d,
.nav-links a.nav-link-3d:hover,
.nav-links a.nav-link-3d.active {
    background: #0a0a0a; color: #fff; box-shadow: none; animation: none; transform: none; font-weight: 500;
}

/* ---------- buttons (app) ---------- */
.btn {
    font-family: var(--font-mono); font-size: .78rem; font-weight: 400; letter-spacing: .1em; text-transform: uppercase;
    border-radius: 0; border-color: var(--ink); color: var(--ink); background: transparent;
}
.btn:hover { background: var(--ink); color: #fff; border-color: var(--ink); border-bottom-color: var(--ink); }
.btn-primary { background: #0a0a0a; color: #fff; border-color: #0a0a0a; }
.btn-primary:hover { background: #262626; border-color: #262626; color: #fff; }
.btn-ghost { border-color: transparent; color: var(--ink-soft); }
.btn-ghost:hover { background: var(--hover); color: var(--ink); border-color: transparent; border-bottom-color: transparent; }
.btn-danger { color: #a3352a; border-color: #a3352a; }
.btn-danger:hover { background: #a3352a; color: #fff; border-color: #a3352a; }
.btn:disabled, .btn[disabled] { opacity: .45; }
.btn-google { font-family: var(--font-sans); text-transform: none; letter-spacing: 0; font-size: .93rem; border-color: var(--line-strong); }
.btn-google:hover { background: var(--hover); color: var(--ink); }
.icon-btn { border-radius: 0; }

/* ---------- labels: every small uppercase label is the mono ---------- */
.eyebrow, .lp-eyebrow, .lp-card-eyebrow, .onboard-step, .fb-label, .journal-add-label, .section-tag,
.invite-create-field label, .shelf-book-eyebrow, .sub-plan-tag, .docs-eyebrow, .zw-eyebrow {
    font-family: var(--font-mono); font-weight: 400; letter-spacing: .2em; color: #8a8a8a;
}

/* ---------- fields ---------- */
.type-input, .fb-input, .journal-search-input, select, textarea, input[type="text"], input[type="email"],
input[type="password"], input[type="number"], input[type="search"], input[type="date"], input[type="tel"] {
    border-radius: 0;
}
.type-input:focus, .fb-input:focus, .journal-search-input:focus,
select:focus, textarea:focus, input:focus { border-color: var(--ink); box-shadow: none; outline: none; }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 2px; }

/* ---------- pops, menus, modals: a black hairline and one soft shadow ---------- */
.nav-dropdown-menu, .nav-account-menu, .nav-user-menu, .journal-search-results, .journal-add-pop, .schedule-menu,
.col-picker-menu, .project-switch-menu, .p3d-menu-pop {
    border: 1px solid var(--ink); border-radius: 0; box-shadow: var(--ax-pop-shadow);
}
.fb-card, .legal-modal-card, .budget-modal-card, .nearby-modal-card, .parcel-map-modal-card, .parcel-li-modal-card,
.project-modal, .camera-modal, .newsletter-card-modal {
    border: 1px solid var(--ink); border-radius: 0; box-shadow: 0 24px 60px -24px rgba(10, 10, 10, .45);
}
.fb-overlay, .legal-modal-backdrop { background: rgba(10, 10, 10, .45); }

/* ---------- the notebook: a drawing sheet, not paper ---------- */
.journal-page {
    background-image: none; background-color: var(--bg);
    border: 1px solid var(--rule); box-shadow: none;
}
.journal-page::before, .journal-page::after { display: none; }
.journal-chapter-head { border-bottom: 1px solid var(--rule); }
.journal-chapter-title, .journal-toc-head { font-weight: 400; letter-spacing: -.02em; }
.journal-toc-chapter { background: var(--bg); border: 1px solid var(--line); border-left: 1px solid var(--rule); }
.journal-toc-num { border-radius: 0; background: transparent; color: var(--ink-mute); font-family: var(--font-mono); font-weight: 400; }
/* the kazalo's Datoteke paperclip: grey like the numbers above it, not the chapter colour */
.journal-toc-files .journal-toc-num { color: var(--ink-mute); }
.journal-toc-leader { border-bottom: 1px dotted var(--line-strong); }

/* the landscape spread (Načrtovanje, Hiša v 3D): one flat sheet - no crease, no edge shading, no stack of sheets */
.journal-page.journal-page-spread { box-shadow: none; background-image: none; }
.journal-page.journal-page-spread::after, .journal-spread-rmargin { display: none; }

/* the edge bookmarks: square tabs, a mono number, black when open */
.journal-bookmark {
    background: var(--bg); border: 1px solid var(--rule); border-left: none; border-radius: 0;
    box-shadow: none; color: var(--ink-soft);
}
.journal-bookmark:hover, .journal-bookmark:focus-visible { background: var(--hover); }
.journal-bookmark.is-current { background: #0a0a0a; color: #fff; }
.journal-bookmark::after { background: linear-gradient(to right, currentColor var(--bm-progress, 0%), transparent var(--bm-progress, 0%)); opacity: .55; }
.journal-bookmark-num {
    border-radius: 0; background: transparent; color: inherit;
    font-family: var(--font-mono); font-size: .74rem; font-weight: 500; letter-spacing: .04em;
}
.journal-bookmark.is-current .journal-bookmark-num { color: #fff; }
.journal-bookmark-special, .journal-bookmark-cover { background: var(--bg); border-left: none; }
.journal-bookmark-special.is-current, .journal-bookmark-cover.is-current { background: #0a0a0a; color: #fff; }
.journal-bookmarks-sep { background: var(--line); }

/* the cover: a black sheet (the design's dark band), no leather */
.book-cover-inner {
    background-color: #0a0a0a; background-image: none; border: 1px solid #0a0a0a; border-radius: 0;
    box-shadow: none; color: #fff;
}
/* tape, paperclips and the stack of sheets were the notebook's; a drawing set has none */
.cover-hero-tape, .partner-parcel-tape, .phase-file-tape, .cover-photo-tape, .book-cover-parcel-clip { display: none !important; }
.cover-hero, .partner-parcel-card { transform: none !important; box-shadow: none; border: 1px solid var(--line); }

/* the cover's stitched frame and spine go; a hairline stays as the sheet's border */
.book-cover-inner::after { border: 1px solid rgba(255, 255, 255, .14); inset: 1rem; }
.book-cover-spine { display: none; }
/* AI and »Hiša v 3D« are marked in black and white, without the rainbow, the gradient and the pulsing glow */
.cover-ai::before { background: #fff; height: 1px; opacity: .5; }
.cover-ai-mark { background: #fff; color: #0a0a0a; box-shadow: none; }
.journal-bookmark.journal-bookmark-ai, .journal-bookmark.journal-bookmark-ai.is-current,
.journal-bookmark.journal-bookmark-3d, .journal-bookmark.journal-bookmark-3d.is-current {
    background: #0a0a0a; color: #fff; border: 1px solid #0a0a0a; border-left: none; box-shadow: none; animation: none;
}
[class*="nav-3d"], .journal-bookmark-3d { animation: none !important; }
/* the service notice is a grey strip on a rule, not a peach band (the outage variant keeps its red) */
.status-banner { background: #f2f2f2; border-bottom: 1px solid var(--rule); }

/* the inserts under a chapter (Lokacijsko poročilo, Idejna zasnova hiše v 3D): a black square chip with a white glyph
   on a 1px black thread - no chapter colour; inverted while the insert is open */
.journal-bookmark.journal-bookmark-insert { background: var(--bg); }
.journal-bookmark.journal-bookmark-insert.is-current { background: #0a0a0a; color: #fff; }
.journal-bookmark-insert-ico { border-radius: 0; background: #0a0a0a; color: #fff; }
.journal-bookmark-insert.is-current .journal-bookmark-insert-ico { background: #fff; color: #0a0a0a; }
.journal-bookmark-insert-ico::before { background: #0a0a0a; width: 1px; margin-left: -.5px; }

/* ---------- Hiša v 3D: the menubar and its menus are the design's black band ----------
   Neutral black glass instead of the brown, square pills with mono labels. Hover is a light wash; an open menu, an
   active row or a picked control inverts to white with black ink (the old accent fill with dark text went black on
   black once the accent became #0A0A0A). */
.p3d-furnbar { background: linear-gradient(to bottom, rgba(10, 10, 10, .9), rgba(10, 10, 10, .45) 55%, transparent); }
.p3d-furncat-btn {
    color: #fff; background: rgba(10, 10, 10, .62); border: 1px solid rgba(255, 255, 255, .28); border-radius: 0;
    font-family: var(--font-mono); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase;
}
.p3d-furncat-btn:hover { background: rgba(10, 10, 10, .88); border-color: rgba(255, 255, 255, .6); color: #fff; }
.p3d-furncat-btn.is-open, .p3d-furncat-btn.has-armed,
.p3d-furncat:hover > .p3d-furncat-btn { background: #fff; border-color: #fff; color: #0a0a0a; }
.p3d-furnmenu, .p3d-menu-pop {
    background: rgba(10, 10, 10, .96); border: 1px solid rgba(255, 255, 255, .22); border-radius: 0;
    box-shadow: 0 12px 32px -12px rgba(0, 0, 0, .6);
}
.p3d-furnmenu-item, .p3d-mitem { border-radius: 0; color: #fff; }
.p3d-furnmenu-item:hover, .p3d-mitem:hover:not(:disabled) { background: rgba(255, 255, 255, .12); color: #fff; }
.p3d-furnmenu-item.is-active, .p3d-mitem.is-active { background: #fff; border-color: #fff; color: #0a0a0a; }
.p3d-furnmenu-item.is-active .p3dico, .p3d-mitem.is-active .p3dico { color: #0a0a0a; }
.p3d-mitem-gear:hover { background: #fff; border-color: #fff; color: #0a0a0a; }
.p3d-furnmenu-sub, .p3d-mpop-h { font-family: var(--font-mono); font-weight: 400; letter-spacing: .14em; color: rgba(255, 255, 255, .55); }
.p3d-iseg.is-active, .p3d-istorey.is-active, .p3d-sect-btn.is-active, .p3d-sun-btn.is-active,
.p3d-winedit-seg > .p3d-winedit-reset.is-on, .p3d-tree-node.is-sel { background: #fff; border-color: #fff; color: #0a0a0a; }

/* ---------- the projects shelf: black sheets on a black rule ---------- */
.bookshelf-board { height: 1px; margin-top: 0; background: var(--rule); box-shadow: none; border-radius: 0; }
.bookshelf-books { gap: 1.5rem; align-items: stretch; padding: 0; }
.shelf-book-cover {
    background-color: #0a0a0a; background-image: none; border-radius: 0; box-shadow: none;
    padding: 1.1rem 1.1rem 1rem; color: #fff; border: 1px solid #0a0a0a;
}
.shelf-book-cover:hover { transform: none; box-shadow: none; background-color: #1a1a1a; }
.shelf-book-spine { display: none; }
.shelf-book-title { font-weight: 400; letter-spacing: -.02em; }
.shelf-book-eyebrow { color: #9a9a9a; }
.shelf-book-parcel { border-radius: 0; font-family: var(--font-mono); font-weight: 400; letter-spacing: .06em; }

/* ---------- docs screenshots (/kaj-je-architec, /navodila): black and white, like the sheet around them ---------- */
.docs-shot img, .man-shot img { filter: grayscale(1); }

/* ---------- tables: a mono head over a black rule ---------- */
table thead th {
    font-family: var(--font-mono); font-weight: 400; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
    color: #8a8a8a; border-bottom: 1px solid var(--rule);
}

/* ---------- the toast / alerts keep their colours but lose their roundness ---------- */
.toast, .error-alert, .callout, .notice { border-radius: 0; }

@media print {
    .ax-header, .app-nav { position: static; backdrop-filter: none; }
}
.plan-3d-go { animation: none; box-shadow: none; }
img.login-logo { width: 13rem; max-width: 70%; height: auto; }
