/* ==========================================================================
   Gradivo — app.css
   Oblikovalski sistem: "precizno terensko orodje" (Linear/Stripe poliranost).
   Grafitna orodjarska stranska vrstica uokvirja svetlo gosto vsebino; hi-vis
   amber je skalpel (ena primarna akcija); tehnične številke so monospace.
   Brez SCSS, brez build koraka. Pisave (Geist) so self-hostane v /assets/fonts.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Oblikovalni žetoni (design tokens)
   -------------------------------------------------------------------------- */
:root {
  /* Ink / grafit + jeklo (besedilo) */
  --ink: #12161C;
  --steel: #5B6675;
  --steel-muted: #8A93A0;
  --steel-faint: #AEB6C0;

  /* Ploskve in robovi (hladni, tehnični toni) */
  --surface: #FFFFFF;
  --panel: #F4F6F8;
  --field-soft: #F7F9FB;
  --table-head: #F7F9FB;
  --border: #E2E6EB;
  --border-strong: #D8DDE3;
  --hairline: #EEF1F4;

  /* Hi-vis amber (znamka) — le primarna akcija / aktivno stanje / opozorilo */
  --amber: #F5A300;
  --amber-press: #E39800;

  /* Semantika */
  --ok: #15803D;
  --ok-bg: #EAF4EE;
  --ok-border: #C6E4D0;
  --danger: #DC2626;
  --danger-bg: #FBEBEB;
  --danger-border: #F3C9C9;
  --neutral: #5B6675;
  --neutral-bg: #EEF1F4;

  /* Podatkovne nevtralne (razrez stroškov, legende) */
  --data-1: #2B3440;
  --data-2: #6C7684;
  --data-3: #A6AFBB;
  --data-4: #C3CBD4;

  /* Orodjarska (temna) stranska vrstica */
  --sidebar-bg: #12161C;
  --sidebar-border: #232B35;

  /* Trdna temna ploskev (izbran segment, aktiven čip, inverzna kartica).
     Za razliko od --ink se v temnem načinu NE obrne v svetlo — sicer bi
     belo besedilo na njej izginilo. */
  --ink-solid: #12161C;
  --on-ink: #FFFFFF;

  /* Radiji (rahlo oglato = natančno; brez pill) */
  --r: 8px;
  --r-card: 10px;
  --r-sm: 6px;

  /* Sence — 1–2 subtilni ravni, brez težkih/steklastih */
  --shadow-sm: 0 1px 2px rgba(18, 22, 28, .05);
  --shadow: 0 1px 2px rgba(18, 22, 28, .05), 0 18px 44px -22px rgba(18, 22, 28, .24);

  /* Postavitev */
  --sidebar-w: 248px;

  /* Prehodi (150–200ms, subtilno) */
  --t: .16s ease;

  /* Tipografija.
     Prenovljena maketa je OPUSTILA Geist Mono — vsa števila/€/mere/kode/datumi so
     zdaj Geist + tabular-nums (font-variant-numeric). Žeton --mono zato kaže na Geist
     (ostane kot semantična oznaka »tabelarna števila«); poravnavo stolpcev nosi tnum. */
  --font: 'Geist', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: var(--font);

  /* Tokovne (kontekstualne) vrednosti — v temnem načinu jih prepišemo */
  --bg: var(--panel);
  --text: var(--ink);
}

/* Temni način — prepis kontekstualnih žetonov (preklop v stranski vrstici).
   Zasloni v temnem načinu še niso posamično izrisani; to je skladen sistemski privzetek. */
html.is-dark {
  --bg: #0E1217;
  --surface: #161C24;
  --panel: #12171E;
  --field-soft: #1B222C;
  --table-head: #1A212B;
  --border: #232B35;
  --border-strong: #2B3440;
  --hairline: #1E252F;
  --text: #E8ECF1;
  --ink: #E8ECF1;
  --steel: #AEB6C0;
  --steel-muted: #8A93A0;
  /* Trdna ploskev ostane temna, a dvignjena nad podlago, da je vidna. */
  --ink-solid: #2B3440;
  --on-ink: #F4F7FA;
}

/* --------------------------------------------------------------------------
   Reset in osnove
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: rgba(245, 163, 0, .28); }

a { color: var(--ink); text-decoration: none; transition: color var(--t); }

h1, h2, h3, h4, h5, h6 {
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--text);
}

/* Monospace tehnične številke (ure, €, mere, davčne št.) — tabular figures. */
.mono, .num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

/* --------------------------------------------------------------------------
   Postavitev: temna sidebar + svetla vsebina
   -------------------------------------------------------------------------- */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  flex: 0 0 var(--sidebar-w);
  width: var(--sidebar-w);
  height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  background-color: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  z-index: 40;
}

/* Logotip */
.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 20px 18px 18px;
}

.sidebar__logo {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(255, 255, 255, .11);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar__wordmark { display: flex; flex-direction: column; line-height: 1; }
.sidebar__wordmark b { color: #F4F7FA; font-weight: 600; font-size: 15.5px; letter-spacing: -.02em; }
.sidebar__wordmark span {
  color: var(--steel);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: .03em;
  margin-top: 4px;
  text-transform: uppercase;
}

.sidebar__nav { flex: 1; padding: 6px 0; overflow-y: auto; }

.sidebar__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 38px;
  margin: 1px 10px;
  padding: 0 14px 0 18px;
  border-radius: var(--r);
  color: var(--steel-muted);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: -.01em;
  transition: background-color var(--t), color var(--t);
}
.sidebar__link svg { flex-shrink: 0; stroke-width: 1.6; }
.sidebar__link:hover { background: rgba(255, 255, 255, .045); }
.sidebar__link.is-active svg { stroke-width: 1.7; }

/* Aktivna postavka — blago ozadje + amber levi indikator + svetlejše besedilo */
.sidebar__link.is-active { background: rgba(255, 255, 255, .05); color: #F5F7FA; font-weight: 600; }
.sidebar__link.is-active::before {
  content: "";
  position: absolute;
  left: 0; top: 9px; bottom: 9px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--amber);
}

.sidebar__sep { height: 1px; background: rgba(255, 255, 255, .08); margin: 12px 20px; }

/* Preklop temnega načina + uporabnik na dnu */
.sidebar__foot { padding: 0 12px 14px; }
/* V nogi je ločnica poravnana z notranjim ovojem (18px od roba), brez odmika zgoraj. */
.sidebar__foot .sidebar__sep { margin: 0 6px 12px; }
.sidebar__foot .usermenu { padding-top: 10px; }

.sidebar__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 38px;
  margin: 1px 6px;
  padding: 0 8px;
  border-radius: var(--r);
  color: var(--steel-muted);
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  transition: background-color var(--t);
}
.sidebar__toggle:hover { background: rgba(255, 255, 255, .045); }
.sidebar__toggle { margin: 1px 10px; }
.sidebar__toggle > span { display: flex; align-items: center; gap: 12px; }

.switch { width: 34px; height: 19px; border-radius: 10px; background: rgba(255, 255, 255, .14); position: relative; flex-shrink: 0; transition: background var(--t); }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: #DCE2E9; transition: left var(--t), background var(--t); }
html.is-dark .switch { background: var(--amber); }
html.is-dark .switch::after { left: 17px; background: #12161C; }

.sidebar__user { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r); cursor: pointer; transition: background-color var(--t); }
.sidebar__user:hover { background: rgba(255, 255, 255, .045); }
.sidebar__avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255, 255, 255, .11);
  display: flex; align-items: center; justify-content: center;
  color: #DCE2E9; font-weight: 600; font-size: 12px; flex-shrink: 0;
}
.sidebar__user-meta { min-width: 0; flex: 1; }
.sidebar__user-meta b { display: block; color: #E8ECF1; font-weight: 600; font-size: 12.5px; }
.sidebar__user-meta span { color: var(--steel-muted); font-weight: 400; font-size: 11px; }

/* Dropup meni na uporabniku (spremeni geslo / odjava) */
.usermenu { position: relative; }
.usermenu__pop {
  display: none;
  position: absolute;
  left: 10px; right: 10px; bottom: calc(100% + 6px);
  background: #1B222C;
  border: 1px solid var(--sidebar-border);
  border-radius: var(--r);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .6);
  padding: 6px;
  z-index: 50;
}
.usermenu.is-open .usermenu__pop { display: block; }
.usermenu__item {
  display: block; width: 100%; text-align: left;
  padding: 9px 12px; border-radius: var(--r-sm);
  color: #C4CCD6; font-family: inherit; font-size: 12.5px; font-weight: 500;
  background: none; border: none; cursor: pointer;
  transition: background-color var(--t), color var(--t);
}
.usermenu__item:hover { background: rgba(255, 255, 255, .05); color: #F5F7FA; }
.usermenu__item--danger:hover { color: #FF8A8A; }
.usermenu__form { margin: 0; }

/* Zatemnitev za mobilni meni */
.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(18, 22, 28, .5); z-index: 35; }

/* --------------------------------------------------------------------------
   Glavni stolpec + mobilna vrstica
   -------------------------------------------------------------------------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.mobilebar {
  display: none;
  align-items: center;
  gap: 12px;
  height: 54px;
  padding: 0 14px;
  background: var(--sidebar-bg);
  border-bottom: 1px solid var(--sidebar-border);
  position: sticky;
  top: 0;
  z-index: 30;
}
.mobilebar__btn {
  width: 38px; height: 38px; border-radius: var(--r);
  background: rgba(255, 255, 255, .06); border: none;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.mobilebar b { color: #F4F7FA; font-weight: 600; font-size: 15px; letter-spacing: -.02em; }

/* Fiksna bela zgornja vrstica (chrome na vsakem zaslonu): drobtinice + primarna akcija */
.topbar {
  display: flex; align-items: center; gap: 14px;
  height: 60px; flex-shrink: 0;
  padding: 0 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 30;
}
.topbar__toggle {
  display: none;
  width: 38px; height: 38px; border-radius: var(--r);
  background: var(--panel); border: 1px solid var(--border);
  align-items: center; justify-content: center; cursor: pointer; color: var(--steel);
  flex-shrink: 0;
}
.topbar__toggle:hover { color: var(--ink); border-color: var(--border-strong); }
.topbar__crumb { font-size: 13px; font-weight: 600; color: var(--ink); letter-spacing: -.01em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar__crumb a { color: var(--steel-muted); }
.topbar__crumb a:hover { color: var(--ink); }
.topbar__crumb .sep { color: var(--steel-faint); margin: 0 9px; font-weight: 400; }
.topbar__crumb .cur { color: var(--ink); }
.topbar__spacer { flex: 1; }
.topbar__actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.topbar__actions form { margin: 0; }
/* Akcije v zgornji vrstici so nižje od gumbov v vsebini (34px). */
.topbar__actions .btn { height: 34px; padding: 0 14px; gap: 7px; }

.content { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 28px 32px 64px; }

/* --------------------------------------------------------------------------
   Glava strani (drobtinice + naslov + dejanja)
   -------------------------------------------------------------------------- */
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.pagehead__crumbs { font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--steel-muted); }
.pagehead h1 { font-size: 22px; margin-top: 8px; }
.pagehead__sub { color: var(--steel); font-size: 13px; margin-top: 6px; }
.pagehead__actions { display: flex; gap: 10px; flex-shrink: 0; }

/* --------------------------------------------------------------------------
   Obvestila (flash)
   -------------------------------------------------------------------------- */
.flash-area { display: flex; flex-direction: column; gap: 10px; }
.flash-area:not(:empty) { margin-bottom: 22px; }

.flash {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  border-radius: var(--r);
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 500;
}
.flash::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.flash--success { color: var(--ok); background: var(--ok-bg); border-color: var(--ok-border); }
.flash--error { color: var(--danger); background: var(--danger-bg); border-color: var(--danger-border); }

/* --------------------------------------------------------------------------
   Kartice
   -------------------------------------------------------------------------- */
/* Kartice so v maketi border-only (hairline rob, brez sence). */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 20px; }
.card__title { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--hairline); }

/* Kartica brez notranjega odmika — vsebina (tabela, seznam) sega do roba. */
.card--flush { padding: 0; overflow: hidden; }
/* Glava se poravna s prvim stolpcem tabele pod njo (celice imajo 16px). */
.card--flush > .card__head { padding-left: 16px; padding-right: 16px; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.card__head-title { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 600; letter-spacing: -.01em; color: var(--text); }
.card__head-title svg { flex-shrink: 0; color: var(--steel); }

/* Tih tekstovni link v glavi kartice (»Vsa gradbišča →«) — ne gumb. */
.link-quiet { font-size: 12px; font-weight: 500; color: var(--steel); }
.link-quiet:hover { color: var(--ink); }

/* Mono števec v glavi kartice */
.countbadge { font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--steel); background: var(--panel); border: 1px solid var(--border); border-radius: 5px; padding: 2px 7px; }
.countbadge--danger { color: var(--danger); background: var(--danger-bg); border-color: var(--danger-border); }

/* Čip z meta podatkom v zgornji vrstici (datum) */
.chip { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); font-size: 12px; color: var(--steel); letter-spacing: -.01em; white-space: nowrap; }
.chip svg { color: var(--steel-muted); flex-shrink: 0; }
.card__body { color: var(--steel); font-size: 13px; }
.card__body > * + * { margin-top: 12px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }

/* Kazalnik (KPI) */
.stat { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 30px; font-weight: 600; color: var(--text); line-height: 1.1; letter-spacing: -.02em; }
.stat--danger { color: var(--danger); }
/* Enota ob številki (€, mio €) — manjša in pridušena. */
.stat__unit { font-size: 16px; font-weight: 600; color: var(--steel-muted); }

/* --------------------------------------------------------------------------
   Gumbi — 1 primarna (amber) na zaslon, ostalo obris
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px;
  font-family: inherit; font-size: 13px; font-weight: 600; line-height: 1;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r);
  cursor: pointer; user-select: none; white-space: nowrap;
  transition: background-color var(--t), border-color var(--t), color var(--t);
}
.btn:hover { border-color: var(--steel-muted); }
.btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; }
.btn:disabled, .btn[disabled] { opacity: .55; cursor: not-allowed; }

.btn--primary { color: var(--ink); background: var(--amber); border-color: var(--amber); }
.btn--primary:hover { background: var(--amber-press); border-color: var(--amber-press); }
.btn--ghost { background: transparent; border-color: var(--border); color: var(--steel); }
.btn--ghost:hover { background: var(--panel); color: var(--ink); border-color: var(--border-strong); }
.btn--danger { color: var(--danger); border-color: var(--danger-border); background: transparent; }
.btn--danger:hover { background: var(--danger-bg); border-color: var(--danger); }
/* Potrditvena (zelena) akcija — npr. zaključek gradbišča. Ni primarna: amber ostane rezerviran. */
.btn--success { color: var(--ok); background: var(--ok-bg); border-color: var(--ok-border); }
.btn--success:hover { background: #DCEDE3; border-color: var(--ok); }
.btn--sm { height: 32px; padding: 0 12px; font-size: 12.5px; }
.btn--lg { height: 44px; padding: 0 20px; font-size: 14px; border-radius: 9px; }
.btn--block { width: 100%; }
/* Gol tekstovni gumb (Prekliči v nogi lista) */
.btn--plain { background: none; border-color: transparent; color: var(--steel); }
.btn--plain:hover { background: none; border-color: transparent; color: var(--ink); }

/* --------------------------------------------------------------------------
   Obrazci in polja
   -------------------------------------------------------------------------- */
.field { margin-bottom: 16px; }
.field > label { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--steel-muted); margin-bottom: 7px; }

.field__row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.field__row label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--steel-muted); }

input, select, textarea {
  display: block; width: 100%;
  height: 40px; padding: 0 12px;
  font-family: inherit; font-size: 13.5px; color: var(--ink);
  background: var(--field-soft);
  border: 1px solid var(--border);
  border-radius: var(--r);
  transition: border-color var(--t), box-shadow var(--t), background-color var(--t);
}
textarea { height: auto; min-height: 110px; padding: 10px 12px; resize: vertical; line-height: 1.6; }
input::placeholder, textarea::placeholder { color: var(--steel-muted); }
input:focus, select:focus, textarea:focus { outline: none; background: var(--surface); border-color: var(--ink); box-shadow: 0 0 0 3px rgba(18, 22, 28, .06); }
input:disabled, select:disabled, textarea:disabled { opacity: .6; cursor: not-allowed; }
input[type="checkbox"], input[type="radio"] { width: auto; height: auto; }

/* Številska polja v monospace */
input.mono, .field--num input { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.field__error { display: none; margin-top: 6px; font-size: 12px; color: var(--danger); }
.field__hint { display: block; margin-top: 6px; font-size: 12px; color: var(--steel-muted); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); background: var(--surface); }
.field.has-error input:focus { box-shadow: 0 0 0 3px rgba(220, 38, 38, .14); }
.field.has-error .field__error { display: block; }

/* --------------------------------------------------------------------------
   Tabele — jedro izkušnje: monospace desno poravnane številke, hairline vrstice
   -------------------------------------------------------------------------- */
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--surface); }
/* Tabela znotraj .card--flush: kartica že nosi rob in radij. */
.table-wrap--flush { border: none; border-radius: 0; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  padding: 11px 16px; text-align: left; vertical-align: middle;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  color: var(--steel-muted); background: var(--table-head);
  border-bottom: 1px solid var(--border);
}
tbody td { padding: 13px 16px; vertical-align: middle; color: var(--text); border-bottom: 1px solid var(--hairline); }
/* Noga tabele (vsote) — brez tega bi celice ostale brez notranjega roba. */
tfoot td, tfoot th {
  padding: 12px 16px; vertical-align: middle; font-weight: 600; color: var(--text);
  background: var(--field-soft); border-top: 1px solid var(--border);
}
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background-color var(--t); }
tbody tr:hover { background: var(--field-soft); }
th.num, td.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.unit { color: var(--steel-muted); }

/* --------------------------------------------------------------------------
   Značke stanja (oglate, kratke)
   -------------------------------------------------------------------------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: var(--r-sm); font-size: 11.5px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.badge--ok { color: var(--ok); background: var(--ok-bg); border-color: var(--ok-border); }
.badge--danger { color: var(--danger); background: var(--danger-bg); border-color: var(--danger-border); }
.badge--neutral { color: var(--neutral); background: var(--neutral-bg); border-color: var(--border); }

/* Status s piko (npr. povezava z bazo) */
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.status--ok { color: var(--ok); }
.status--error { color: var(--danger); }

/* --------------------------------------------------------------------------
   Pomožno + prazna stanja
   -------------------------------------------------------------------------- */
.muted { color: var(--steel-muted); }
.empty-state { padding: 44px 24px; text-align: center; color: var(--steel-muted); font-size: 13px; }
/* Pomožni razred za skrivanje mora premagati display komponente (npr. .field__picked),
   ne glede na vrstni red v datoteki — zato !important. */
.is-hidden { display: none !important; }
.divider { border: 0; border-top: 1px solid var(--hairline); margin: 22px 0; }

/* --------------------------------------------------------------------------
   Potrditveni modal (data-confirm)
   -------------------------------------------------------------------------- */
.modal[hidden] { display: none; }
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 18px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(18, 22, 28, .5); }
.modal__dialog { position: relative; width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--shadow); padding: 24px; }
.modal__message { color: var(--text); font-weight: 500; font-size: 14px; margin-bottom: 22px; }
.modal__actions { display: flex; justify-content: flex-end; gap: 10px; }

/* ==========================================================================
   PRIJAVA (login) — dvopanelna vstopna stran
   ========================================================================== */
.login { display: flex; min-height: 100vh; background: var(--surface); }

/* Levi grafitni "orodjarski" panel s fotografijo + gradientom */
.login__aside {
  position: relative;
  width: 560px;
  max-width: 44%;
  flex-shrink: 0;
  overflow: hidden;
  background: #12161C url('/assets/img/construction-site-silhouettes.jpg') center/cover no-repeat;
}
.login__aside::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(165deg, rgba(18, 22, 28, .9) 0%, rgba(18, 22, 28, .7) 45%, rgba(18, 22, 28, .95) 100%);
  background-size: 36px 36px, 36px 36px, cover;
  pointer-events: none;
}
.login__aside-inner { position: relative; height: 100%; display: flex; flex-direction: column; padding: 48px; min-height: 640px; }

.login__brand { display: flex; align-items: center; gap: 11px; }
.login__brand-logo { width: 34px; height: 34px; border-radius: 8px; background: rgba(255, 255, 255, .055); border: 1px solid rgba(255, 255, 255, .11); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.login__brand-wordmark { display: flex; flex-direction: column; line-height: 1; }
.login__brand-wordmark b { color: #F4F7FA; font-weight: 600; font-size: 17px; letter-spacing: -.02em; }
.login__brand-wordmark span { color: var(--steel); font-weight: 500; font-size: 10.5px; letter-spacing: .03em; text-transform: uppercase; margin-top: 4px; }

.login__pitch { max-width: 400px; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.login__pitch h2 { font-size: 30px; font-weight: 600; line-height: 1.25; letter-spacing: -.025em; color: #F4F7FA; }
.login__pitch p { font-size: 14px; line-height: 1.65; color: var(--steel-muted); margin-top: 16px; }
.login__features { display: flex; flex-direction: column; gap: 13px; margin-top: 28px; }
.login__feature { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #C4CCD6; }
.login__feature svg { flex-shrink: 0; }
.login__copy { font-family: var(--mono); font-size: 11px; color: var(--steel); }

/* Desni panel z obrazcem */
.login__panel { flex: 1; display: flex; align-items: center; justify-content: center; padding: 48px; background: var(--surface); }
.login__form { width: 360px; max-width: 100%; }
.login__form h1 { font-size: 23px; font-weight: 600; color: var(--ink); }
.login__form-sub { font-size: 13px; color: var(--steel); margin-top: 9px; line-height: 1.55; }
.login__fields { margin-top: 26px; }

/* Polje z ikono (geslo — oko) */
.input-icon { position: relative; }
.input-icon input { padding-right: 40px; }
.input-icon__btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; background: none; border: none; cursor: pointer; color: var(--steel-muted); }

.login__link { font-size: 12px; font-weight: 500; color: var(--steel); }
.login__link:hover { color: var(--ink); }

.checkline { display: flex; align-items: center; gap: 8px; margin-top: 16px; cursor: pointer; font-size: 12.5px; color: var(--steel); }
.checkline input { width: 16px; height: 16px; border-radius: 4px; accent-color: var(--ink); }

/* Prijavni gumb je višji od standardnega (44px) — glavna akcija zaslona. */
.login__submit { height: 44px; margin-top: 22px; font-size: 13.5px; }

.login__foot { font-size: 12px; color: var(--steel-muted); margin-top: 28px; text-align: center; line-height: 1.5; }

/* --------------------------------------------------------------------------
   Namestitvena sporočilna stran (/setup) — centrirana kartica
   -------------------------------------------------------------------------- */
.notice { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--panel); }
.notice__card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--shadow); padding: 32px; }
.notice__card h1 { font-size: 20px; }
.notice__card p { color: var(--steel); font-size: 13.5px; margin: 12px 0 20px; line-height: 1.6; }

/* --------------------------------------------------------------------------
   Odzivnost
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  /* Mobilno: temno stransko vrstico nadomesti svetla spodnja vrstica (.mobilenav). */
  .sidebar, .sidebar-backdrop { display: none !important; }
  .topbar { padding: 0 16px; }
  .content { padding: 22px 18px calc(96px + env(safe-area-inset-bottom)); }
}

@media (max-width: 860px) {
  .login { display: block; }
  .login__aside { display: none; }
  .login__panel { display: block; min-height: 100vh; padding: 56px 20px; }
  .login__form { width: 100%; max-width: 400px; margin: 0 auto; }
}

@media (max-width: 640px) {
  .pagehead { flex-direction: column; align-items: flex-start; gap: 14px; }
  .card-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ==========================================================================
   Gradbišča (sites) — seznam, obrazec, pregled
   ========================================================================== */
.list-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 16px; }
.list-head__count { margin-top: 6px; font-size: 13px; color: var(--steel); }

.searchbox { display: flex; align-items: center; gap: 8px; width: 300px; max-width: 100%; height: 38px; padding: 0 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); }
.searchbox svg { flex-shrink: 0; color: var(--steel-muted); }
.searchbox input { border: none; background: none; height: auto; padding: 0; font-size: 13px; }
.searchbox input:focus { box-shadow: none; background: none; }

.filter-tabs { display: flex; align-items: center; gap: 2px; padding: 0 16px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.filter-tab { display: inline-flex; align-items: center; gap: 7px; padding: 13px 6px; margin-right: 14px; font-size: 13px; font-weight: 500; color: var(--steel-muted); border-bottom: 2px solid transparent; white-space: nowrap; cursor: pointer; }
.filter-tab.is-active { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }
.filter-tab .cnt { font-family: var(--mono); font-size: 11px; color: var(--steel); background: var(--panel); border-radius: 4px; padding: 1px 6px; }
.filter-tab:not(.is-active) .cnt { color: var(--steel-muted); }

.progress { display: flex; align-items: center; gap: 9px; }
.progress__bar { flex: 1; height: 6px; background: var(--hairline); border-radius: 3px; overflow: hidden; min-width: 56px; }
.progress__fill { height: 100%; border-radius: 3px; background: var(--data-1); }
.progress__fill--done { background: var(--ok); }
/* Mirujoče gradbišče (zastoj / brez vnosov) — napredek se ne bere kot živ. */
.progress__fill--idle { background: #C7CDD4; }
.progress__pct { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 11.5px; width: 34px; text-align: right; color: var(--text); }
.progress__pct--muted { color: var(--steel-muted); }

.sbadge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; border-radius: 5px; padding: 3px 8px; border: 1px solid var(--border); }
.sbadge .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.sbadge--neutral { color: var(--steel); background: var(--neutral-bg); }
.sbadge--ok { color: var(--ok); background: var(--ok-bg); border-color: var(--ok-border); }
.sbadge--danger { color: var(--danger); background: var(--danger-bg); border-color: var(--danger-border); }

/* »Čaka podpis«: značka ostane nevtralna — oker nosi SAMO ikona ure, sicer bi
   rumena tekmovala z amber primarno akcijo. */
.sbadge--wait { color: var(--steel); background: var(--panel); }
.sbadge--wait svg { stroke: #8A6D2F; }

/* »Pred zaključkom«: nevtralna značka z zeleno piko (ne cela zelena — ta pomeni
   zaključeno). */
.sbadge--neutral .dot--ok { background: var(--ok); }

.cell-title { font-size: 13.5px; font-weight: 600; color: var(--text); }
.cell-title a { color: var(--text); }
.cell-title a:hover { color: var(--ink); text-decoration: underline; }
.cell-sub { font-size: 11px; color: var(--steel-muted); margin-top: 2px; }

/* Obrazec — sekcije */
.form-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 20px 22px; margin-bottom: 16px; }
.form-section__head { display: flex; align-items: center; gap: 11px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--hairline); }
.form-section__num { font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--steel-muted); width: 26px; height: 26px; border: 1px solid var(--border); border-radius: 6px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.form-section__head h3 { font-size: 14px; font-weight: 600; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 40px; }
.form-grid--3 { grid-template-columns: 1fr 1fr 1fr; }
.form-grid .col-2 { grid-column: 1 / -1; }
/* Dva razdelka drug ob drugem (VZD + Roki) */
.form-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }

/* Zaklenjeno polje — vrednost iz nastavitev ali samodejno dodeljena (št. pogodbe). */
.field--locked input, .field--locked select { background: var(--neutral-bg); color: var(--steel); cursor: not-allowed; }
/* Vstopno polje obrazca — edino s poudarjenim robom. */
.field--primary input { background: var(--surface); border-width: 1.5px; border-color: var(--ink); }

.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.form-actions--split { justify-content: space-between; }

/* Segmentni izbor (radio kot gumbi) */
.segment { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.segment label { display: inline-flex; align-items: center; justify-content: center; padding: 0 14px; height: 40px; font-size: 13px; color: var(--steel); cursor: pointer; border-right: 1px solid var(--border); user-select: none; background: var(--field-soft); }
.segment label:last-child { border-right: none; }
.segment input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segment input:checked + label { background: var(--ink-solid); color: var(--on-ink); }

/* Pregled gradbišča */
.site-head { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 22px 24px; margin-bottom: 18px; }
.site-head__code { font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--steel-muted); }
.site-head__row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-top: 8px; }
.site-head h1 { font-size: 24px; }
.site-head__loc { font-size: 13px; color: var(--steel); margin-top: 6px; }
.site-head__actions { display: flex; gap: 10px; flex-shrink: 0; }

.site-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; }
/* Zavihki: podčrtaj tesno pod besedilom (padding 4px), 22px razmik med njimi (maketa 03). */
.site-tab { padding: 13px 4px; margin-right: 22px; font-size: 13px; font-weight: 500; color: var(--steel-muted); border-bottom: 2px solid transparent; white-space: nowrap; cursor: pointer; background: none; border-left: none; border-right: none; border-top: none; font-family: inherit; }
.site-tab:last-child { margin-right: 0; }
/* Podčrtaj aktivnega zavihka je ink, ne amber — amber je rezerviran za primarno akcijo. */
.site-tab.is-active { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }
.site-tab .cnt { font-family: var(--mono); font-size: 11px; color: var(--steel-muted); background: var(--panel); border-radius: 4px; padding: 1px 6px; }
.site-tab.is-active .cnt { color: var(--steel); }

.dl { display: grid; grid-template-columns: 1fr 1fr; gap: 0 44px; }
.dl > div { padding: 11px 0; border-bottom: 1px solid var(--hairline); }
.dl > div.col-2 { grid-column: 1 / -1; }
.dl dt { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--steel-muted); }
.dl dd { font-size: 13.5px; color: var(--text); margin-top: 5px; }
/* Podvrstica pod vrednostjo (naslov + davčna pri udeležencih uvodnega lista) */
.dl dd .sub { display: block; font-size: 12px; color: var(--steel-muted); margin-top: 2px; }
.dl dd.mono { font-family: var(--mono); }

@media (max-width: 720px) {
  .form-grid, .dl { grid-template-columns: 1fr; }
  .site-head__row { flex-direction: column; }
  .list-head { flex-direction: column; align-items: flex-start; }
}

/* Modal z obrazcem (viri: dodaj/uredi) */
.modal__dialog--form { max-width: 460px; text-align: left; max-height: 88vh; overflow-y: auto; }
.modal__dialog--form h3 { font-weight: 600; }
.modal__dialog--form .field:last-of-type { margin-bottom: 4px; }

/* ==========================================================================
   Dnevni list (gradbeni dnevnik) — vnos, dokument, podpis, pripisi, foto
   ========================================================================== */

/* Izbirnik vira + gumb za dodajanje vrstice */
.lineadd { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
/* Izbirnik se sme skrčiti, a ne pod berljivo širino — v ozki kartici (materiali)
   se vrstica raje prelomi, kot da izbirnik izgine v 30px štrcelj. */
.lineadd select { flex: 1 1 190px; min-width: 150px; }
.lineadd .btn { flex-shrink: 0; }

/* Urejevalnik vrstic: kompakten vnos količine + enota */
#lineTable td { vertical-align: middle; }
.qtycell { display: inline-flex; align-items: center; gap: 7px; justify-content: flex-end; }
.qtycell input.line-qty { width: 84px; height: 34px; text-align: right; padding: 0 10px; }
.line-amount { font-weight: 600; }

/* Ikonski gumb (odstrani vrstico / foto) */
.iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; padding: 0;
  background: transparent; border: 1px solid var(--border); border-radius: var(--r-sm);
  color: var(--steel-muted); cursor: pointer;
  transition: color var(--t), border-color var(--t), background-color var(--t);
}
.iconbtn:hover { color: var(--danger); border-color: var(--danger-border); background: var(--danger-bg); }

/* Blok e-podpisa (zelen) */
.signblock {
  display: flex; align-items: center; gap: 14px;
  background: var(--ok-bg); border: 1px solid var(--ok-border); border-radius: var(--r-card);
  padding: 16px 18px; margin-bottom: 16px;
}
.signblock__icon {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid var(--ok-border); color: var(--ok);
}
.signblock__title { font-weight: 600; font-size: 14px; color: var(--ok); }
.signblock__meta { font-size: 12.5px; color: var(--steel); margin-top: 2px; }

/* Besedilni bloki (opravljena dela, opombe) */
.prose { color: var(--text); font-size: 13.5px; line-height: 1.65; }

/* Pripisi po podpisu — rdeča revizijska sled (append-only).
   Štirje odtenki rdeče ločijo oznako / datum / telo / avtorja: pripis mora biti
   berljiv kot poznejši poseg v zaklenjen dokument, ne kot navadna opomba. */
.appends { display: flex; flex-direction: column; gap: 12px; }
.append {
  border-left: 3px solid var(--danger);
  background: #FEF4F3;
  border-radius: 0 var(--r) var(--r) 0;
  padding: 13px 15px;
}
html.is-dark .append { background: #2A1517; }
.append__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.append__tag { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--danger); }
.append__date { font-family: var(--mono); font-size: 11px; color: #C0392B; flex-shrink: 0; }
.append__body { color: #7A2620; font-size: 13px; line-height: 1.6; margin-top: 7px; }
.append__author { font-family: var(--mono); font-size: 11px; color: #B0483F; margin-top: 7px; }
html.is-dark .append__body { color: #F8B4B4; }
html.is-dark .append__author, html.is-dark .append__date { color: #E08585; }

/* Fotografije */
.photogrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-bottom: 16px; }
.photo { position: relative; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; background: var(--field-soft); }
.photo img { display: block; width: 100%; height: 130px; object-fit: cover; }
.photo figcaption { padding: 7px 10px; font-size: 11.5px; color: var(--steel); border-top: 1px solid var(--hairline); }
.photo__del { position: absolute; top: 6px; right: 6px; margin: 0; }
.photo__del .iconbtn { width: 28px; height: 28px; background: rgba(255, 255, 255, .92); border-color: var(--border); }

.photoupload { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.photoupload input[type="file"] { flex: 1; min-width: 200px; height: auto; padding: 8px 10px; font-size: 12.5px; }
.photoupload input[type="text"] { flex: 2; min-width: 180px; }
.photoupload .btn { flex-shrink: 0; }

@media (max-width: 720px) {
  .lineadd { flex-direction: column; align-items: stretch; }
  .qtycell input.line-qty { width: 72px; }
}

/* ==========================================================================
   Nadzorna plošča (KPI + pregledne kartice)
   Vse posebnosti plošče so gnezdene pod .dash, da ne uhajajo v druge zaslone
   (npr. mono € na stroških ostane mono; kartice drugod obdržijo svoj radij).
   ========================================================================== */
/* Ovoj plošče — navpični ritem 22px (kot maketa: telo je flex-stolpec, gap 22). */
.dash { display: flex; flex-direction: column; gap: 22px; }

/* Kartice plošče: števila v Geist (tabular) — kot maketa. (Radij 10px in border-only
   sta zdaj globalna: --r-card + .card brez sence.) */
.dash .stat { font-family: var(--font); }
.dash .countbadge { font-family: var(--font); }

/* Pozdrav */
.dash-greet h1 { font-size: 22px; font-weight: 600; letter-spacing: -.02em; margin: 0; }
.dash-greet__sub { font-size: 13px; color: var(--steel); margin-top: 6px; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.dash .kpi-grid { margin-bottom: 0; }
.stat-card { display: block; padding: 16px 18px; }
.stat-label { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--steel-muted); }
.stat-card .stat { margin-top: 12px; }
.stat-sub { font-size: 12px; color: var(--steel); margin-top: 6px; }

/* Opozorilna KPI kartica — cela kartica je rdeča (rob, oznaka, številka, podnaslov),
   ozadje ostane belo. */
.stat-card--danger { border-color: var(--danger-border); }
.stat-card--danger .stat-label,
.stat-card--danger .stat,
.stat-card--danger .stat-sub { color: var(--danger); }
.stat-card--danger .stat-label svg { stroke: var(--danger); }

/* Inverzna (temna) KPI kartica — »Vnosi ta teden« (in vsota nad razrezom stroškov). */
.stat-card--ink { background: var(--ink-solid); border-color: var(--ink-solid); }
.stat-card--ink .stat { color: #F4F7FA; }
.stat-card--ink .stat-label, .stat-card--ink .stat-sub { color: var(--steel-muted); }
.stat-card--ink .stat__unit { color: var(--steel-muted); }

.dash-cols { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.dash-side { display: flex; flex-direction: column; gap: 20px; }

/* Pregledni seznam gradbišč na plošči — mreža (kot maketa), NE navadna tabela.
   Stolpci: Gradbišče · Vodja · Zadnji vnos · Status(desno). */
.dashlist__head, .dashlist__row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.1fr) minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}
.dashlist__head {
  padding: 9px 18px;
  background: var(--field-soft);
  border-bottom: 1px solid var(--border);
  font-size: 10.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--steel-muted);
}
.dashlist__row { padding: 12px 18px; border-bottom: 1px solid var(--hairline); transition: background-color var(--t); }
.dashlist__row:last-child { border-bottom: none; }
.dashlist__row:hover { background: var(--field-soft); }
.dashlist__name { font-size: 13px; font-weight: 600; color: var(--text); }
.dashlist__name a { color: var(--text); }
.dashlist__name a:hover { text-decoration: underline; }
.dashlist__loc { font-size: 11px; color: var(--steel-muted); margin-top: 2px; }
.dashlist__mgr { font-size: 12.5px; color: var(--steel); }
.dashlist__mgr--none { color: var(--steel-muted); }
.dashlist__entry { font-size: 12px; color: var(--steel); }
.dashlist__entry--none { color: var(--steel-muted); }
.dashlist__status { display: flex; justify-content: flex-end; }

/* Žive značke stanja NA PLOŠČI (indigo / oker / zelena) — v nasprotju z nevtralnimi
   značkami v seznamu gradbišč, kjer barvo nosi stolpec napredka. */
.sbadge--progress { color: #4F46E5; background: rgba(79, 70, 229, .08); border-color: rgba(79, 70, 229, .25); }
.sbadge--wait-strong { color: #B45309; background: rgba(180, 83, 9, .08); border-color: rgba(180, 83, 9, .25); }
.sbadge--ok-soft { color: #15803D; background: rgba(21, 128, 61, .08); border-color: rgba(21, 128, 61, .25); }
html.is-dark .sbadge--progress { color: #A5B4FC; background: rgba(129, 140, 248, .12); border-color: rgba(129, 140, 248, .28); }
html.is-dark .sbadge--wait-strong { color: #D4A94A; background: rgba(212, 169, 74, .10); border-color: rgba(212, 169, 74, .26); }
html.is-dark .sbadge--ok-soft { color: #4ADE80; background: rgba(74, 222, 128, .10); border-color: rgba(74, 222, 128, .26); }

/* Opozorilo: ikonska ploščica + stavek + meta (Geist). Prva (najresnejša) je rdeča. */
.warn { display: flex; gap: 11px; padding: 13px 16px; border-bottom: 1px solid var(--hairline); transition: background-color var(--t); }
.warn:last-child { border-bottom: none; }
.warn:hover { background: var(--field-soft); }
.warn__icon { width: 26px; height: 26px; border-radius: 6px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--panel); border: 1px solid var(--border); color: var(--steel); }
.warn__icon--danger { background: var(--danger-bg); border-color: var(--danger-border); color: var(--danger); }
.warn__body { min-width: 0; }
.warn__text { display: block; font-size: 12.5px; font-weight: 500; color: var(--text); line-height: 1.45; }
.warn__meta { display: block; font-size: 11px; color: var(--steel-muted); margin-top: 3px; }

/* Sekundarne celice v tabeli — pridušene, da naziv ostane nosilec vrstice. */
.cell-muted { color: var(--steel); font-size: 12.5px; }
.cell-faint { color: var(--steel-muted); font-size: 12.5px; }

@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-cols { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .kpi-grid { grid-template-columns: 1fr; }
  /* Ozek zaslon: seznam plošče na naziv + status (vodja/vnos padeta pod naziv). */
  .dashlist__head { display: none; }
  .dashlist__row { grid-template-columns: minmax(0, 1fr) auto; }
  .dashlist__mgr, .dashlist__entry { display: none; }
}

/* Značka administratorja (nevtralna, brez amber; deluje v obeh temah) */
.sbadge--ink { color: var(--text); background: var(--neutral-bg); border-color: var(--border-strong); }

/* ==========================================================================
   Mobilna lupina: svetla spodnja vrstica + pladenj »Več« + kartice + FAB
   (namizje ohrani temno stransko vrstico; ≤1024px prevzame spodnja vrstica)
   ========================================================================== */
.mobilenav { display: none; }
.moresheet { display: none; }
.fab { display: none; }
.site-cards { display: none; }

@media (max-width: 1024px) {
  .mobilenav {
    display: flex;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    height: calc(62px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--surface);
    border-top: 1px solid var(--border);
  }
  .mobilenav__item {
    flex: 1; position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    color: var(--steel-muted); font-family: inherit; font-size: 10.5px; font-weight: 600; letter-spacing: -.01em;
    background: none; border: none; cursor: pointer; text-decoration: none;
  }
  .mobilenav__item.is-active { color: var(--ink); }
  /* Amber pasica označuje aktivni zavihek */
  .mobilenav__item.is-active::before {
    content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 30px; height: 3px; border-radius: 0 0 2px 2px; background: var(--amber);
  }

  /* Pladenj »Več« */
  .moresheet { display: none; position: fixed; inset: 0; z-index: 70; }
  .moresheet.is-open { display: block; }
  .moresheet__backdrop { position: absolute; inset: 0; background: rgba(18, 22, 28, .5); }
  .moresheet__panel {
    position: absolute; left: 0; right: 0; bottom: 0;
    background: var(--surface); border-top: 1px solid var(--border);
    border-radius: 14px 14px 0 0; box-shadow: var(--shadow);
    padding: 8px 10px calc(14px + env(safe-area-inset-bottom));
  }
  .moresheet__grip { width: 38px; height: 4px; border-radius: 2px; background: var(--border-strong); margin: 6px auto 12px; }
  .moresheet__user { display: flex; align-items: center; gap: 11px; padding: 6px 14px 10px; }
  .moresheet__user .sidebar__avatar { background: var(--panel); border: 1px solid var(--border); color: var(--steel); }
  .moresheet__user-meta b { display: block; font-size: 13.5px; font-weight: 600; color: var(--text); }
  .moresheet__user-meta span { font-size: 11.5px; color: var(--steel-muted); }
  .moresheet__sep { height: 1px; background: var(--hairline); margin: 6px 8px; }
  .moresheet__item {
    display: flex; align-items: center; gap: 12px; width: 100%;
    padding: 13px 14px; border-radius: var(--r);
    color: var(--text); font-family: inherit; font-size: 14px; font-weight: 500; text-align: left;
    background: none; border: none; cursor: pointer;
  }
  .moresheet__item:hover, .moresheet__item.is-active { background: var(--panel); }
  .moresheet__item.is-active { font-weight: 600; }
  .moresheet__item--danger { color: var(--danger); }

  /* Plavajoč amber gumb (primarna akcija seznama na mobilnem) */
  .fab {
    display: inline-flex; align-items: center; justify-content: center;
    position: fixed; right: 16px; bottom: calc(78px + env(safe-area-inset-bottom)); z-index: 55;
    width: 54px; height: 54px; border-radius: 16px;
    background: var(--amber); color: var(--ink); border: none; cursor: pointer;
    box-shadow: 0 10px 24px -8px rgba(245, 163, 0, .6);
  }
  .fab:hover { background: var(--amber-press); }
  /* Ko je na zaslonu FAB, topbar CTA odpade (ena amber akcija). */
  .topbar__cta-desktop { display: none; }

  /* Gradbišča: gost kartični seznam namesto tabele */
  .table-desktop { display: none; }
  .site-cards { display: flex; flex-direction: column; gap: 10px; }
  .site-card { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--shadow-sm); padding: 14px 15px; }
  .site-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
  .site-card__name { font-size: 14.5px; font-weight: 600; color: var(--text); letter-spacing: -.01em; }
  .site-card__loc { font-size: 11.5px; color: var(--steel-muted); margin-top: 3px; }
  .site-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 11px; font-size: 12px; color: var(--steel); }
  .site-card__meta b { font-weight: 600; color: var(--text); }
  .site-card__foot { margin-top: 12px; }

  /* Filtrirni zavihki kot vodoravni čipi */
  .filter-tabs { gap: 8px; padding: 12px 14px; border-bottom: none; -webkit-overflow-scrolling: touch; }
  .filter-tab {
    margin-right: 0; padding: 7px 12px; border: 1px solid var(--border); border-radius: 999px;
    background: var(--surface); border-bottom: 1px solid var(--border);
  }
  .filter-tab.is-active { background: var(--ink-solid); color: var(--on-ink); border-color: var(--ink-solid); border-bottom-color: var(--ink-solid); }
  .filter-tab.is-active .cnt { background: rgba(255, 255, 255, .18); color: var(--on-ink); }
}

/* ==========================================================================
   Dokumentni ovoj (.paper) — uvodni list, situacija, dodaj dokument
   Obrazec, ki je pravni dokument, se bere kot en A4 list: ena bela ploskev,
   težka ink ločnica pod glavo, razdelki brez lastnih okvirjev.
   ========================================================================== */
.paper { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 1px 2px rgba(18, 22, 28, .04); padding: 40px 46px 46px; }
.paper__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 16px; border-bottom: 2px solid var(--ink); }
.paper__eyebrow { font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--steel-muted); }
.paper__head h2 { font-size: 22px; margin-top: 7px; }
.paper__meta { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.paper__foot { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.paper__foot-note { font-size: 12px; color: var(--steel-muted); }

/* Razdelek znotraj lista: mono številka brez okvirja, brez ločnice pod glavo. */
.paper .form-section { background: none; border: 0; border-radius: 0; padding: 0; margin: 26px 0 0; }
.paper .form-section__head { margin-bottom: 12px; padding-bottom: 0; border-bottom: 0; gap: 10px; }
.paper .form-section__num { width: auto; height: auto; border: 0; font-size: 12px; }

/* ==========================================================================
   Metrični trak — vodoravne meritve pod glavo (gradbišče, dnevni list)
   ========================================================================== */
.metrics { display: flex; border: 1px solid var(--border); border-radius: 9px; background: #FCFDFE; margin-top: 18px; overflow: hidden; }
html.is-dark .metrics { background: var(--field-soft); }
.metrics__cell { flex: 1; min-width: 0; padding: 12px 16px; border-right: 1px solid var(--hairline); }
.metrics__cell:last-child { border-right: none; }
.metrics__label { display: flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--steel-muted); }
.metrics__value { font-size: 13px; color: var(--text); margin-top: 5px; }
.metrics__value.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* Značka izvora podatka (npr. samodejno pridobljeno vreme) */
.srcbadge { font-size: 9.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ok); background: var(--ok-bg); border: 1px solid var(--ok-border); border-radius: 4px; padding: 1px 5px; }

@media (max-width: 860px) {
  .metrics { flex-wrap: wrap; }
  .metrics__cell { flex: 1 1 50%; border-bottom: 1px solid var(--hairline); }
}

/* ==========================================================================
   Razrez stroškov — sestavljen stolpec + legenda
   ========================================================================== */
.breakdown__bar { display: flex; gap: 2px; height: 13px; border-radius: 7px; overflow: hidden; }
.breakdown__seg { height: 100%; }
.breakdown__seg--1 { background: var(--data-1); }
.breakdown__seg--2 { background: var(--data-2); }
.breakdown__seg--3 { background: var(--data-3); }
.breakdown__seg--4 { background: var(--data-4); }
.breakdown__legend { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 16px; }
/* Kartici v paru sta enako visoki; presežek prostora se razdeli nad in pod pas z legendo,
   da legenda ostane pripeta k svojemu pasu (ne odplava na dno kartice). */
.breakdown .breakdown__bar { margin-top: auto; }
.breakdown .breakdown__legend { margin-bottom: auto; }
.breakdown__key { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--steel); }
.breakdown__swatch { width: 11px; height: 11px; border-radius: 3px; flex-shrink: 0; }
.breakdown__val { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 12px; color: var(--text); margin-top: 3px; }

/* ==========================================================================
   Dropzone — nalaganje datotek (dokumenti, fotografije dnevnega lista)
   ========================================================================== */
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 36px 20px; text-align: center; border: 1.5px dashed var(--border-strong); border-radius: 10px; background: #FBFCFD; cursor: pointer; transition: border-color var(--t), background-color var(--t); }
html.is-dark .dropzone { background: var(--field-soft); }
.dropzone:hover, .dropzone.is-over { border-color: var(--steel-muted); background: var(--panel); }
.dropzone__icon { width: 44px; height: 44px; border-radius: 10px; background: var(--panel); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--steel); }
.dropzone__text { font-size: 13.5px; font-weight: 500; color: var(--text); }
.dropzone__text b { font-weight: 600; color: var(--steel); text-decoration: underline; }
.dropzone__hint { font-family: var(--mono); font-size: 11px; color: var(--steel-faint); }
.dropzone input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone__name { font-size: 12.5px; font-weight: 600; color: var(--ok); }

/* ==========================================================================
   Dnevni list — dokument (05) in vnos (16)
   ========================================================================== */

/* Naslovna vrstica dokumenta: naslov + značke v isti vrstici */
.site-head__titleline { display: flex; align-items: center; flex-wrap: wrap; gap: 11px; }
.sublabel { font-size: 13px; color: var(--steel); margin-top: 6px; }

.metrics__cell--wide { flex: 2; }
.metrics__value--icon { display: flex; align-items: center; gap: 7px; }
.metrics__value--icon svg { flex-shrink: 0; color: var(--steel); }

/* Razdelek znotraj kartice brez oblazinjenja: nosi svoj odmik, sicer bi vsebina
   (rdeči pripisi, obrazec) tekla do roba kartice. */
.card__section { padding: 16px; }
.card__section + .card__section { border-top: 1px solid var(--border); }

/* Dva stolpca: stroji + materiali drug ob drugem */
.log-cols { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.doc-stack { display: flex; flex-direction: column; gap: 16px; }

/* Noga razdelka z vsoto */
.row-total td, .row-total th { background: var(--field-soft); font-weight: 600; border-top: 1px solid var(--border); }

/* Podpisni blok — dve kartici na dnu dokumenta */
.signgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.signcard { border: 1px solid var(--border); background: #FCFDFE; border-radius: 10px; padding: 16px 18px; }
html.is-dark .signcard { background: var(--field-soft); }
.signcard--ok { border-color: var(--ok-border); background: #F5FAF6; }
html.is-dark .signcard--ok { background: rgba(21, 128, 61, .12); }
.signcard__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.signcard__head .metrics__label, .signcard__head > span:first-child { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--steel-muted); }
.signcard__name { font-size: 15px; font-weight: 600; color: var(--text); margin-top: 11px; }
.signcard__name.muted { color: var(--steel-muted); font-weight: 500; }
.signcard__meta { font-size: 12px; color: var(--steel); margin-top: 4px; }
.signcard__meta.mono { font-family: var(--mono); }

/* Vnos: tabela vrstic po razdelkih */
.linetable { width: 100%; }
.line-table-wrap { width: 100%; overflow-x: auto; }
.lines-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.line-input { height: 30px; padding: 0 9px; font-size: 12.5px; border-radius: 6px; }
.line-input[readonly] { background: var(--panel); color: var(--steel); cursor: default; }
.line-input.line-qty, .line-input.line-rate { text-align: right; }
.line-hours { text-align: right; }
.line-sum-qty, .line-sum-amount { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; }

/* Vrstica za dodajanje vira v razdelku */
.lineadd-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 11px 16px; border-top: 1px solid var(--hairline); }
.lineadd-bar .line-picker { flex: 1 1 190px; min-width: 150px; height: 32px; font-size: 12.5px; }
/* Ozki kartici (stroji, materiali) nosita izbirnik in dva gumba — namig gre v svojo vrstico,
   sicer bi se izbirnik skrčil v neuporabno širino. */
.lines-grid .lineadd { flex: 1 1 100%; }
.lines-grid .lineadd__hint { flex: 1 1 100%; padding: 0; }
.lines-grid .lineadd-bar .line-picker { flex: 1 1 140px; min-width: 120px; }
.lineadd__hint { display: flex; align-items: flex-start; gap: 7px; font-size: 11px; line-height: 1.5; color: var(--steel-muted); padding: 0 16px 11px; }
.lineadd__hint svg { margin-top: 2px; }
.lineadd__hint svg { flex-shrink: 0; }
.line-empty { color: var(--steel-faint); text-align: center; }
.empty-state.line-empty { padding: 26px 20px; }

/* Gol × za odstranitev vrstice (design: brez okvirja) */
.iconbtn--bare, .iconbtn--plain, .iconbtn--quiet {
  border: none; background: none; width: 26px; height: 26px; color: var(--steel-muted);
}
.iconbtn--bare:hover, .iconbtn--plain:hover, .iconbtn--quiet:hover { background: none; border: none; color: var(--ink); }

/* Vreme v obrazcu je ROČNO — značka mora to povedati, ne lagati o samodejnem viru. */
.srcbadge--manual { color: var(--steel); background: var(--panel); border-color: var(--border); }
.metrics__field { height: 32px; padding: 0 9px; font-size: 12.5px; border-radius: 6px; margin-top: 5px; }
.metrics__note { font-size: 11px; color: var(--steel-muted); margin-top: 4px; }

/* ==========================================================================
   Stroški in obračun (06)
   ========================================================================== */
/* Zavihek »Stroški«: en sam navpični ritem — bloki se ne dotikajo. */
.costs { display: flex; flex-direction: column; gap: 20px; }
.costs__note { font-size: 13px; color: var(--steel); }
.costs .kpi-grid { margin-bottom: 0; }
/* Zavihek stroškov ima pet kazalnikov (delo, stroji, material, drugi, skupaj);
   pod 1024px prevzamejo splošna pravila .kpi-grid (2 stolpca, nato 1). */
@media (min-width: 1025px) { .costs .kpi-grid { grid-template-columns: repeat(5, 1fr); } }
.costs-split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
.card__head--plain { border-bottom: none; }
.card__head-val { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 600; color: var(--text); }

/* Glava znotraj oblazinjene kartice (.card že nosi 20px) — brez podvojenega odmika .card__head. */
.breakdown, .billing { display: flex; flex-direction: column; }
.breakdown__head, .billing__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.breakdown .empty-state { padding: 26px 0 12px; text-align: left; }

.breakdown__swatch--1 { background: var(--data-1); }
.breakdown__swatch--2 { background: var(--data-2); }
.breakdown__swatch--3 { background: var(--data-3); }
.breakdown__swatch--4 { background: var(--data-4); }

.billing__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--hairline); font-size: 12px; }
/* Prva vrstica se od odstotka/napredka loči z razmikom, ne s črto. */
.billing__row--first { border-top: none; margin-top: auto; padding-top: 20px; }
.billing__key { color: var(--steel); }
.billing__val { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--text); font-weight: 600; }
.billing__pct { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 30px; font-weight: 600; letter-spacing: -.02em; color: var(--text); margin-bottom: 14px; }
.progress--lg .progress__bar { height: 8px; border-radius: 4px; }

.rowend { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.right { text-align: right; }
.inline-form { display: inline; margin: 0; }

/* Drugi stroški gradbišča — kategorija kot tiha nevtralna značka v vrstici tabele */
.catbadge { display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; letter-spacing: .02em;
  color: var(--steel); background: var(--neutral-bg); border: 1px solid var(--border); border-radius: 5px; padding: 2px 7px; white-space: nowrap; }
/* Ista značka ob nazivu vrstice v dokumentu (»ročno«) — drobnejša, poravnana z besedilom. */
.catbadge--sm { font-size: 10px; font-weight: 400; padding: 1px 5px; vertical-align: 1px; margin-left: 6px; }
html.is-dark .catbadge { background: var(--field-soft); }

/* ==========================================================================
   Viri / šifranti (17) — tri kartice, brez zavihkov
   ========================================================================== */
.card-stack { display: flex; flex-direction: column; gap: 16px; }
.card-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card__head-group { display: flex; align-items: center; gap: 9px; min-width: 0; }
.card__head-icon { display: flex; align-items: center; color: var(--steel); flex-shrink: 0; }
.card__head-count { font-family: var(--mono); font-size: 11px; color: var(--steel-muted); white-space: nowrap; }
/* »Dodaj … v šifrant« je tiha vrstica v nogi kartice, ne amber gumb. */
.card__addrow {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 12px 18px; border: none; border-top: 1px solid var(--hairline);
  background: none; cursor: pointer;
  font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--steel); text-align: left;
}
.card__addrow:hover { background: var(--field-soft); color: var(--ink); }
.cell-action { text-align: center; width: 44px; }
.row-off { opacity: .55; }
.field__optional { font-weight: 400; text-transform: none; color: var(--steel-faint); }
.modal__actions-left { margin-right: auto; }

/* ==========================================================================
   Gradbišča — seznam (02), prazno stanje (20), pregled (03)
   ========================================================================== */
.sites-table { width: 100%; }
.cell-right { text-align: right; }
.cell-title--muted { color: var(--steel); font-weight: 500; }

/* Prazno stanje: brez kartice, navpično centrirano na ozadju. */
.empty-hero { display: flex; flex: 1; align-items: center; justify-content: center; padding: 60px 28px; }
.empty-hero__block { width: 440px; max-width: 100%; text-align: center; }
.empty-hero__icon {
  width: 64px; height: 64px; margin: 0 auto; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; color: var(--steel);
}
.empty-hero__title { font-size: 20px; font-weight: 600; letter-spacing: -.02em; margin-top: 20px; }
.empty-hero__text { font-size: 13.5px; line-height: 1.6; color: var(--steel); margin-top: 10px; }
.empty-hero__cta { margin-top: 22px; }

/* Pregled gradbišča: koda kot čip desno, naslov + značka v vrstici */
.site-head__titlerow { display: flex; align-items: center; gap: 11px; }
/* Naslov pregleda gradbišča je 21px (maketa 03); .site-head h1 drugod ostane 24px. */
.site-head__titlerow h1 { font-size: 21px; }
.site-head__chip {
  font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--steel);
  background: var(--panel); border: 1px solid var(--border); border-radius: 6px; padding: 5px 10px;
  white-space: nowrap; flex-shrink: 0;
}
.site-head__meta { font-size: 13px; color: var(--steel); margin-top: 6px; }
.site-head__meta b { font-weight: 600; color: var(--text); }

.dl--1 { grid-template-columns: 1fr; }
.dl--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.num--key { font-size: 14px; font-weight: 600; }
.paper__code { font-family: var(--mono); font-size: 12px; color: var(--steel); }
.paper__meta--stack { flex-direction: column; align-items: flex-end; gap: 7px; }

/* Cela vrstica tabele je povezava (design: klik kjer koli v vrstici).
   Povezava OSTANE v toku besedila — absolutno pozicioniran <a> je naslov potegnil
   iz toka (celica je ostala prazna, besedilo je "plavalo" nad vrstico). Klikljivo
   ploskev naredi ::after, klik drugod po vrstici pa prevzame app.js. */
.rowlink { position: relative; cursor: pointer; }
.rowlink td { position: relative; }
.rowlink__hit { position: static; color: inherit; }
.rowlink__hit::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 1; }
/* Tabela dnevnih listov: fiksne širine stolpcev, da glava in vrednosti stojijo v isti osi
   in se prazna polja (»—«) ne razlezejo čez pol tabele. Zadnji stolpec je desno poravnan. */
.dailytable { table-layout: fixed; }
.dailytable th:nth-child(1), .dailytable td:nth-child(1) { width: 76px; }
.dailytable th:nth-child(2), .dailytable td:nth-child(2) { width: 184px; }
.dailytable th:nth-child(4), .dailytable td:nth-child(4) { width: 96px; }
.dailytable th:nth-child(5), .dailytable td:nth-child(5) { width: 232px; }
.dailytable th:nth-child(6), .dailytable td:nth-child(6) { width: 152px; }
.dailytable td:nth-child(3), .dailytable td:nth-child(5) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Dnevni list v pripravi (osnutek) — rahlo topel poudarek vrstice (maketa 03). */
.daily-row--draft td { background: #FEFCF6; }
html.is-dark .daily-row--draft td { background: rgba(245, 163, 0, .05); }
.tab-panel[hidden] { display: none; }

@media (max-width: 1024px) {
  .log-cols, .lines-grid, .costs-split, .signgrid, .card-grid--2, .dl--3 { grid-template-columns: 1fr; }
}

/* Dokumenti: datotečno polje v modalu za nalaganje */
.field input[type="file"].docfile { height: auto; padding: 9px 11px; font-size: 12.5px; background: var(--field-soft); border: 1px solid var(--border); border-radius: var(--r); color: var(--text); cursor: pointer; }
.field input[type="file"].docfile::-webkit-file-upload-button,
.field input[type="file"].docfile::file-selector-button { margin-right: 10px; padding: 5px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); font: inherit; font-size: 12px; cursor: pointer; }

/* ══════════════════════════════════════════════════════════════════════════
   Registracija, ponastavitev gesla in čakalna vrsta registracij
   ══════════════════════════════════════════════════════════════════════════ */

/* Registracijski obrazec ima več polj kot prijava — nekaj več prostora. */
.login__form--wide { width: 420px; }

/* Račun, za katerega nastavljamo novo geslo (zaslon /reset-password). */
.login__account { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }

/* Dve polji v vrsti (telefon + podjetje); na ozkem zaslonu se zložita. */
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

/* Past za bote (honeypot). Namenoma NI display:none — nekateri boti taka polja preskočijo.
   Odmaknjeno iz vidnega polja, izvzeto iz bralnikov zaslona in iz tabulatorskega vrstnega reda. */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Čakalna vrsta registracij (Nastavitve → Uporabniki, samo lastnik sistema).
   Amber pas signalizira zahtevano odločitev — ena sama točka pozornosti na zaslonu. */
.queue { border-color: var(--amber-border, rgba(245, 163, 0, .32)); }
.queue .card__head { border-left: 3px solid var(--amber); border-radius: 10px 0 0 0; }
.queue__actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
@media (max-width: 720px) { .queue__actions { flex-direction: column; align-items: stretch; } }

/* Avatar v tabeli uporabnikov; »pending« različica označuje še nepotrjen račun. */
.useravatar { flex-shrink: 0; }
.useravatar--pending { background: rgba(245, 163, 0, .12); color: #B45309; border: 1px dashed rgba(245, 163, 0, .45); }
html.is-dark .useravatar--pending { background: rgba(212, 169, 74, .12); color: #D4A94A; border-color: rgba(212, 169, 74, .40); }

/* Grafitni (ink) gumb — enakovredna teža primarnemu, brez amber poudarka.
   Za odločitve, kjer je amber že porabljen za primarno akcijo zaslona. */
.btn--ink { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.btn--ink:hover { background: #1D242D; border-color: #1D242D; }
html.is-dark .btn--ink { background: #E8ECF1; border-color: #E8ECF1; color: #12161C; }
html.is-dark .btn--ink:hover { background: #FFFFFF; border-color: #FFFFFF; }

/* ==========================================================================
   Manjkajoči slogi komponent (pregled 31. 8. 2026)
   Ti razredi so bili v pogledih uporabljeni, v slogu pa jih ni bilo — zato so se
   izrisali kot gol tekst brez odmikov in poravnave (inicialke, časovni trak,
   polja z gumbom, celice tabele dokumentov).
   ========================================================================== */

/* Ploščica z inicialkami — profil stranke (velika) in seznam uporabnikov (majhna). */
.avatar-tile {
  width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--panel); border: 1px solid var(--border);
  color: var(--steel); font-size: 15px; font-weight: 600; letter-spacing: .02em;
}
.site-head__ident { display: flex; align-items: flex-start; gap: 15px; min-width: 0; }

/* .useravatar podeduje .sidebar__avatar, ki je pisan za temno vrstico —
   na svetli ploskvi bi bil bel tekst na belem. */
.useravatar {
  flex-shrink: 0; width: 30px; height: 30px; font-size: 11px;
  background: var(--panel); border: 1px solid var(--border); color: var(--steel);
}
.userrow { display: flex; align-items: center; gap: 11px; min-width: 0; }
.userrow__name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Časovni trak sodelovanja (profil stranke): pika + povezovalna črta + zapis. */
.tline { padding: 14px 16px 16px; }
.tline__item { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 13px; }
.tline__rail { display: flex; flex-direction: column; align-items: center; }
.tline__dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; background: var(--steel-muted); flex-shrink: 0; }
.tline__dot--ok { background: var(--ok); }
.tline__dot--wait { background: var(--amber); }
.tline__line { flex: 1; width: 1px; background: var(--border); margin: 5px 0 0; }
.tline__body { min-width: 0; padding-bottom: 18px; }
.tline__item:last-child .tline__body { padding-bottom: 0; }
.tline__text { font-size: 13px; line-height: 1.45; color: var(--text); }
.tline__meta { font-size: 11.5px; font-variant-numeric: tabular-nums; color: var(--steel-muted); margin-top: 3px; }

/* Polje z gumbom ob strani (davčna + »Poišči«, izbirnik stranke + »Nova stranka«). */
.field__with-btn, .field__inline { display: flex; align-items: center; gap: 10px; }
.field__with-btn > input, .field__inline > select { flex: 1 1 auto; min-width: 0; }
.field__with-btn > .btn, .field__inline > .btn { flex-shrink: 0; }
.field__hint--icon { display: flex; align-items: flex-start; gap: 6px; }
.field__hint--icon svg { flex-shrink: 0; margin-top: 1px; }
/* Že izbrana stranka: zapis namesto izbirnika. */
.field__picked {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 10px 8px 12px; background: var(--field-soft);
  border: 1px solid var(--border); border-radius: var(--r); font-size: 13px;
}
.field__picked > a { color: var(--text); font-weight: 600; }
.field__picked > a:hover { color: var(--ink); text-decoration: underline; }

/* Ozka kartica (diagnostika, naročnina) — polna širina bi bila prazna ploskev. */
.card--narrow { max-width: 560px; }
.subprice { font-size: 26px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--text); }
.subprice__per { font-size: 13px; font-weight: 400; color: var(--steel-muted); }

/* Nedestruktivni ikonski gumbi: rdeča ostane brisanju. */
.iconbtn--act:hover, .iconbtn--neutral:hover {
  color: var(--ink); border-color: var(--steel-muted); background: var(--field-soft);
}
.iconbtn:disabled { opacity: .4; cursor: not-allowed; }
.iconbtn:disabled:hover { color: var(--steel-muted); border-color: var(--border); background: transparent; }

/* Tabela dokumentov: ikona vrste datoteke ob nazivu + neprelomljiv stolpec z dejanji. */
.cell-file svg { color: var(--steel-muted); vertical-align: -3px; margin-right: 9px; }
.cell-actions { white-space: nowrap; }
.cell-actions > * + * { margin-left: 6px; }

/* Skupina gumbov v nogi dokumentnega ovoja (levo destruktivno, desno shranjevanje). */
.paper__foot-group { display: flex; align-items: center; gap: 10px; }

/* Manjši kazalnik — kartica z zneskom, kjer je ob številki še enota in podnaslov. */
.stat--sm { font-size: 22px; }

/* Ime vira v vrstici dnevnega lista je nosilni podatek vrstice. */
.line-name { font-weight: 600; }

/* Pripisi in obrazec zanje si v razdelku ne smejo biti nalepljeni. */
.card__section .appends + form { margin-top: 18px; }

/* Razmik med bloki vrstic (delavci / stroji+materiali) — prej inline slog v pogledu. */
.lines--stack, .lines-grid { margin-bottom: 16px; }

/* Vrstica za dodajanje, kadar je šifrant prazen — napotek + ročni vnos pod njim. */
.lineadd-bar > .lineadd__empty { margin: 0; flex: 1 1 100%; }
.lineadd--manual { margin-top: 10px; }
.link-quiet--underline { text-decoration: underline; }
