/* Nektar Natura Sales — the one stylesheet.
   Tokens from the platform's brand (dashboards/shared.css): leaf #8CC63F, lime #CDF789,
   forest #0B201B / #183C33 / #3C8861. Light by default (outdoors), dark by the theme picker
   in Moje (html[data-theme]), or by prefers-color-scheme when "Samodejno" is picked there.
   Zero external requests: system fonts, inline SVG, local images only. */

/* ------------------------------------------------------------------ tokens */
:root {
  --leaf: #8CC63F;
  --lime: #CDF789;
  --lime-deep: #B9EA62;
  --forest: #0B201B;
  --forest-2: #183C33;
  --forest-3: #3C8861;

  --page: #F6F8F2;
  --surface: #FFFFFF;
  --sunk: #EDF1E7;
  --raise: #F1F5EC;
  --ink: #0B201B;
  --ink-2: #2B3D35;
  --muted: #5E6F66;
  --faint: #8A9A90;
  --line: rgba(11, 32, 27, .08);
  --line-strong: rgba(11, 32, 27, .16);
  --accent: #2F6E4E;            /* text-on-light accent, AA on white */
  --accent-soft: rgba(60, 136, 97, .10);

  --primary-bg: #0B201B;
  --primary-ink: #F1F6F1;
  --hero-bg: #CDF789;
  --hero-ink: #0B201B;

  --ok: #48CF79;   --ok-ink: #17703A;  --ok-soft: rgba(72, 207, 121, .16);
  --warn: #E0A32A; --warn-ink: #8A5A00; --warn-soft: rgba(224, 163, 42, .16);
  --bad: #CC3366;  --bad-ink: #A3204D;  --bad-soft: rgba(204, 51, 102, .12);
  --info-ink: #2F6E4E; --info-soft: rgba(60, 136, 97, .12);
  --lime-soft: rgba(140, 198, 63, .18); --lime-ink: #3F6B12;
  --neutral-soft: rgba(11, 32, 27, .06); --neutral-ink: #3E5048;

  --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-full: 999px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;

  --shadow-1: 0 1px 2px rgba(11, 32, 27, .05), 0 1px 1px rgba(11, 32, 27, .03);
  --shadow-2: 0 2px 6px rgba(11, 32, 27, .05), 0 10px 28px rgba(11, 32, 27, .07);
  --shadow-hero: 0 10px 30px rgba(140, 198, 63, .38), 0 2px 6px rgba(11, 32, 27, .10);
  --tabbar-bg: #FFFFFF;           /* opaque: text scrolling under a translucent bar read as garbage */
  --seg-on: #FFFFFF;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --ease: cubic-bezier(.2, .7, .2, 1);
  --t-fast: 150ms; --t: 220ms;

  --tabbar-h: 64px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #0B201B; --surface: #102923; --sunk: #0D241E; --raise: #17392F;
    --ink: #F1F6F1; --ink-2: #D3DED6; --muted: #9DB0A5; --faint: #7A8F84;
    --line: rgba(241, 246, 241, .08); --line-strong: rgba(241, 246, 241, .16);
    --accent: #A6DA63; --accent-soft: rgba(140, 198, 63, .14);
    --primary-bg: #CDF789; --primary-ink: #0B201B;
    --ok-ink: #7FDDA2; --ok-soft: rgba(72, 207, 121, .16);
    --warn-ink: #F0C46A; --warn-soft: rgba(224, 163, 42, .16);
    --bad-ink: #F08AAE; --bad-soft: rgba(204, 51, 102, .20);
    --info-ink: #8FD1AC; --info-soft: rgba(60, 136, 97, .22);
    --lime-soft: rgba(205, 247, 137, .14); --lime-ink: #CDF789;
    --neutral-soft: rgba(241, 246, 241, .07); --neutral-ink: #C3D1C8;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .35);
    --shadow-2: 0 2px 8px rgba(0, 0, 0, .30), 0 12px 30px rgba(0, 0, 0, .25);
    --shadow-hero: 0 10px 34px rgba(205, 247, 137, .20), 0 2px 6px rgba(0, 0, 0, .35);
    --tabbar-bg: #102923;
    --seg-on: #234A3E;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --page: #0B201B; --surface: #102923; --sunk: #0D241E; --raise: #17392F;
  --ink: #F1F6F1; --ink-2: #D3DED6; --muted: #9DB0A5; --faint: #7A8F84;
  --line: rgba(241, 246, 241, .08); --line-strong: rgba(241, 246, 241, .16);
  --accent: #A6DA63; --accent-soft: rgba(140, 198, 63, .14);
  --primary-bg: #CDF789; --primary-ink: #0B201B;
  --ok-ink: #7FDDA2; --ok-soft: rgba(72, 207, 121, .16);
  --warn-ink: #F0C46A; --warn-soft: rgba(224, 163, 42, .16);
  --bad-ink: #F08AAE; --bad-soft: rgba(204, 51, 102, .20);
  --info-ink: #8FD1AC; --info-soft: rgba(60, 136, 97, .22);
  --lime-soft: rgba(205, 247, 137, .14); --lime-ink: #CDF789;
  --neutral-soft: rgba(241, 246, 241, .07); --neutral-ink: #C3D1C8;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow-2: 0 2px 8px rgba(0, 0, 0, .30), 0 12px 30px rgba(0, 0, 0, .25);
  --shadow-hero: 0 10px 34px rgba(205, 247, 137, .20), 0 2px 6px rgba(0, 0, 0, .35);
  --tabbar-bg: #102923;
  --seg-on: #234A3E;
  color-scheme: dark;
}

/* ------------------------------------------------------------------ base */
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; min-height: 100%; background: var(--page); }
body {
  color: var(--ink);
  font: 400 16px/1.5 var(--font);
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease);
}
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--accent); text-decoration: none; }
h1, h2, h3, p { margin: 0; }
svg { flex: none; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: var(--r-sm); }
.skip:focus { top: calc(var(--safe-t) + 8px); }

:focus { outline: none; }
:focus-visible { outline: 3px solid var(--leaf); outline-offset: 2px; border-radius: var(--r-sm); }

.logo--dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo--light { display: none; }
  :root:not([data-theme="light"]) .logo--dark { display: block; }
}
:root[data-theme="dark"] .logo--light { display: none; }
:root[data-theme="dark"] .logo--dark { display: block; }

/* ------------------------------------------------------------------ boot */
.boot {
  position: fixed; inset: 0; display: grid; place-items: center; background: var(--page);
  z-index: 50; transition: opacity 300ms var(--ease);
}
.boot .logo { width: 160px; height: auto; }
.boot.gone { opacity: 0; pointer-events: none; }

/* ------------------------------------------------------------------ view + motion */
.view {
  min-height: 100dvh;
  padding: calc(var(--safe-t) + 20px) 20px calc(var(--tabbar-h) + var(--safe-b) + 32px);
  max-width: 560px; margin: 0 auto;
}
.view.no-tabs { padding-bottom: calc(var(--safe-b) + 32px); }
.view.enter { animation: view-in var(--t) var(--ease) both; }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.fade-in { animation: view-in var(--t) var(--ease) both; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}

/* ------------------------------------------------------------------ type */
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--muted); }
.title { font: 700 30px/1.15 var(--font-display); letter-spacing: -0.025em; }
.title-sm { font: 700 24px/1.2 var(--font-display); letter-spacing: -0.02em; }
.lede { color: var(--muted); font-size: 16px; margin-top: 6px; }
.section-h {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin: 32px 0 12px; font-size: 13px; font-weight: 650; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted);
}
.section-h a, .section-h button {
  text-transform: none; letter-spacing: 0; font-size: 15px; font-weight: 600; color: var(--accent);
  display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; justify-content: center;
  margin: -12px -10px; padding: 0 10px; border-radius: var(--r-full);
}
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; }

/* ------------------------------------------------------------------ top bars */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; margin-bottom: 20px; }
.topbar .logo { height: 30px; width: auto; }
.back {
  display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin-left: -10px; padding: 0 10px;
  color: var(--accent); font-weight: 600; font-size: 16px; border-radius: var(--r-full);
}
.back svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn {
  width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: var(--r-full);
  color: var(--ink-2); transition: background-color var(--t-fast) var(--ease);
}
.icon-btn:active { background: var(--neutral-soft); }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------------------------ cards + lists */
.card {
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-1);
  border: 1px solid var(--line); padding: 16px;
}
.list { display: flex; flex-direction: column; gap: 10px; }
.row {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 14px 16px; min-height: 64px; box-shadow: var(--shadow-1); color: var(--ink);
  transition: transform var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
a.row:active, button.row:active { transform: scale(.985); background: var(--raise); }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 600; font-size: 16px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub { color: var(--muted); font-size: 14px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-meta { display: flex; gap: 10px; margin-top: 6px; color: var(--muted); font-size: 13px; flex-wrap: wrap; }
.row-meta span { display: inline-flex; align-items: center; gap: 4px; }
.row-meta svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.chev { width: 18px; height: 18px; color: var(--faint); fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.empty {
  text-align: center; padding: 36px 20px; color: var(--muted); background: transparent;
  border: 1.5px dashed var(--line-strong); border-radius: var(--r-lg); font-size: 15px;
}
.empty strong { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }

/* ------------------------------------------------------------------ pills + badges */
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px;
  border-radius: var(--r-full); font-size: 12.5px; font-weight: 650; letter-spacing: .01em;
  background: var(--neutral-soft); color: var(--neutral-ink); white-space: nowrap;
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .9; }
.pill.no-dot::before { display: none; }
.pill.lg { height: 32px; padding: 0 14px; font-size: 14px; }
.tone-ok { background: var(--ok-soft); color: var(--ok-ink); }
.tone-bad { background: var(--bad-soft); color: var(--bad-ink); }
.tone-warn { background: var(--warn-soft); color: var(--warn-ink); }
.tone-lime { background: var(--lime-soft); color: var(--lime-ink); }
.tone-info { background: var(--info-soft); color: var(--info-ink); }
.tone-neutral { background: var(--neutral-soft); color: var(--neutral-ink); }

.score {
  flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  font: 700 16px/1 var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
}
.score small { display: block; font-size: 9.5px; font-weight: 600; opacity: .8; margin-top: 1px; letter-spacing: .02em; }
.score.band-A { background: var(--lime); color: var(--forest); }
.score.band-B { background: var(--ok-soft); color: var(--ok-ink); }
.score.band-C { background: var(--neutral-soft); color: var(--neutral-ink); }
.score.band-none { background: var(--accent-soft); color: var(--accent); }
.score.band-none svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.stars { color: var(--warn); letter-spacing: 1px; font-size: 13px; }

.badge-sync {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border-radius: var(--r-full); background: var(--warn-soft); color: var(--warn-ink);
  font-size: 14px; font-weight: 600;
}
.badge-sync svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 22px; border-radius: var(--r-full); font-weight: 650; font-size: 16.5px;
  transition: transform var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
  user-select: none; -webkit-user-select: none;
}
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .5; pointer-events: none; }
/* a disabled primary is a quiet grey pill, not the primary colour at 38 % (olive mud in dark) */
.btn-primary[disabled], .btn-hero[disabled] { opacity: 1; background: var(--sunk); color: var(--faint); box-shadow: none; }
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { background: var(--primary-bg); color: var(--primary-ink); box-shadow: var(--shadow-2); }
.btn-hero { background: var(--hero-bg); color: var(--hero-ink); box-shadow: var(--shadow-hero); }
.btn-soft { background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); }
.btn-ghost { color: var(--accent); min-height: 44px; padding: 0 14px; }
.btn-danger { color: var(--bad-ink); min-height: 44px; padding: 0 14px; }
.btn-block { width: 100%; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn-row { display: flex; gap: 10px; }
.btn-row > .btn { flex: 1; }

.spinner {
  width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent;
  animation: spin 800ms linear infinite; display: inline-block; flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ forms */
.field { display: flex; flex-direction: column; gap: 8px; }
.field > label, .label { font-size: 13px; font-weight: 650; color: var(--muted); letter-spacing: .02em; }
.input, .textarea, .select {
  width: 100%; min-height: 52px; padding: 13px 16px; border-radius: var(--r-md);
  background: var(--surface); border: 1.5px solid var(--line-strong); color: var(--ink);
  font-size: 17px; line-height: 1.4;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
  -webkit-appearance: none; appearance: none;
}
.textarea { resize: none; min-height: 120px; }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:focus, .textarea:focus, .select:focus { border-color: var(--forest-3); box-shadow: 0 0 0 4px var(--accent-soft); outline: none; }
.select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
input[type="date"].input { min-height: 52px; }

.search {
  position: relative; display: flex; align-items: center;
}
.search svg { position: absolute; left: 16px; width: 20px; height: 20px; color: var(--muted); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.search .input { padding-left: 46px; border-radius: var(--r-full); background: var(--surface); box-shadow: var(--shadow-1); }
.search .input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search .spinner { position: absolute; right: 18px; color: var(--muted); }

/* segmented control */
.seg {
  display: flex; gap: 4px; padding: 4px; border-radius: var(--r-full); background: var(--sunk);
  border: 1px solid var(--line);
}
.seg button {
  flex: 1; min-height: 44px; padding: 0 12px; border-radius: var(--r-full); font-size: 14.5px; font-weight: 600;
  color: var(--muted); transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.seg button[aria-pressed="true"] { background: var(--seg-on); color: var(--ink); box-shadow: var(--shadow-1); }

/* chips */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 2px 20px 6px; scroll-snap-type: x proximity; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px;
  border-radius: var(--r-full); background: var(--surface); border: 1px solid var(--line-strong);
  font-size: 15px; font-weight: 550; color: var(--ink); white-space: nowrap; scroll-snap-align: start;
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.chip:active { transform: scale(.97); }
.chip svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.chip .x { margin: -2px -14px -2px -6px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); }
.chip .x:active { background: var(--neutral-soft); }
.chip[aria-pressed="true"] { border-color: transparent; }
.chip.tone-ok { background: var(--ok-soft); color: var(--ok-ink); }
.chip.tone-bad { background: var(--bad-soft); color: var(--bad-ink); }
.chip.tone-warn { background: var(--warn-soft); color: var(--warn-ink); }
.chip.tone-lime { background: var(--lime-soft); color: var(--lime-ink); }
.chip.tone-info { background: var(--info-soft); color: var(--info-ink); }
.chip.tone-neutral { background: var(--neutral-soft); color: var(--neutral-ink); border-color: transparent; }
.chip.add { border-style: dashed; color: var(--accent); }
.chip.ref { background: var(--accent-soft); border-color: transparent; color: var(--accent); font-weight: 600; }

/* stepper */
.stepper { display: inline-flex; align-items: center; border-radius: var(--r-full); background: var(--sunk); border: 1px solid var(--line); }
.stepper button { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); font-size: 20px; font-weight: 500; }
.stepper button:active { background: var(--neutral-soft); }
.stepper input { width: 46px; height: 44px; padding: 0; text-align: center; background: none; border: 0; font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ------------------------------------------------------------------ tab bar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
  height: calc(var(--tabbar-h) + var(--safe-b)); padding: 0 6px var(--safe-b);
  background: var(--tabbar-bg); border-top: 1px solid var(--line-strong);
  box-shadow: 0 -4px 16px rgba(11, 32, 27, .05);
}
.tab {
  height: var(--tabbar-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--faint); font-size: 11px; font-weight: 600; letter-spacing: .01em; position: relative;
  transition: color var(--t-fast) var(--ease);
}
.tab svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--t-fast) var(--ease); }
.tab[aria-current="page"] { color: var(--ink); }
.tab[aria-current="page"] svg { stroke-width: 2.2; }
.tab:active svg { transform: scale(.9); }
.tab--rec { justify-content: flex-end; padding-bottom: 11px; }
.tab-rec-dot {
  width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; margin-top: -26px; margin-bottom: 2px;
  background: var(--lime); color: var(--forest); box-shadow: var(--shadow-hero), 0 0 0 5px var(--page);
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t) var(--ease);
}
.tab--rec svg { width: 27px; height: 27px; stroke-width: 2.1; }
.tab--rec:active .tab-rec-dot { transform: scale(.94); }
/* On Posnemi itself the screen's big mic is THE action: the FAB steps down to a plain active tab
   (a soft pill like iOS/Material), so there are never two identical lime mic buttons. */
.tab--rec[aria-current="page"] { justify-content: center; padding-bottom: 0; }
.tab--rec[aria-current="page"] .tab-rec-dot {
  width: 54px; height: 30px; margin: 0; border-radius: var(--r-full);
  background: var(--accent-soft); color: var(--ink); box-shadow: none;
}
.tab--rec[aria-current="page"] svg { width: 22px; height: 22px; }
.tab-badge {
  position: absolute; top: 9px; left: calc(50% + 7px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--warn); color: var(--forest); font: 700 11px/18px var(--font); font-style: normal; text-align: center;
  box-shadow: 0 0 0 2px var(--surface);
}

/* ------------------------------------------------------------------ toasts + sheets */
.toasts {
  position: fixed; left: 0; right: 0; z-index: 60; pointer-events: none;
  top: calc(var(--safe-t) + 10px); display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 16px;
}
.toast {
  pointer-events: auto; max-width: 520px; display: flex; align-items: center; gap: 10px;
  background: var(--forest); color: #F1F6F1; padding: 13px 18px; border-radius: var(--r-md);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .25); font-size: 15px; font-weight: 550; cursor: pointer;
  animation: toast-in var(--t) var(--ease) both;
}
:root[data-theme="dark"] .toast { background: #F1F6F1; color: var(--forest); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .toast { background: #F1F6F1; color: #0B201B; } }
.toast .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--leaf); flex: none; }
.toast.bad .dot { background: var(--bad); }
.toast.warn .dot { background: var(--warn); }
.toast.out { animation: toast-out 180ms var(--ease) both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-12px) scale(.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-8px); } }

.scrim { position: fixed; inset: 0; z-index: 70; background: rgba(11, 32, 27, .38); animation: fade var(--t) var(--ease) both; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 71; max-height: 88dvh; display: flex; flex-direction: column;
  background: var(--page); border-radius: 22px 22px 0 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, .2);
  padding: 8px 20px calc(var(--safe-b) + 20px); max-width: 560px; margin: 0 auto;
  animation: sheet-in 260ms var(--ease) both;
}
.sheet.out { animation: sheet-out 200ms var(--ease) both; }
.scrim.out { animation: fade 200ms var(--ease) reverse both; }
@keyframes sheet-in { from { transform: translateY(100%); } }
@keyframes sheet-out { to { transform: translateY(100%); } }
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: 4px auto 12px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sheet-head h2 { font: 700 20px/1.25 var(--font-display); letter-spacing: -0.015em; }
.sheet-body { overflow-y: auto; margin: 0 -20px; padding: 0 20px 4px; -webkit-overflow-scrolling: touch; }

/* ------------------------------------------------------------------ login */
.login {
  min-height: calc(100dvh - var(--safe-t) - var(--safe-b) - 52px); display: flex; flex-direction: column; justify-content: center; gap: 36px;
}
.login .logo { width: 176px; height: auto; }
.login h1 { font: 700 28px/1.2 var(--font-display); letter-spacing: -0.02em; }
.login form { display: flex; flex-direction: column; gap: 16px; }
.login .help { font-size: 14px; color: var(--muted); }
.login-leaf { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.login-leaf::before {
  content: ""; position: absolute; right: -80px; top: -60px; width: 300px; height: 300px; border-radius: 0 100% 0 100%;
  background: radial-gradient(circle at 30% 70%, var(--lime) 0, var(--leaf) 70%); opacity: .14; transform: rotate(-12deg);
}
.login { position: relative; z-index: 1; }
.form-error { color: var(--bad-ink); font-size: 14.5px; font-weight: 550; min-height: 20px; }

/* ------------------------------------------------------------------ home */
.greet { margin: 4px 0 26px; }
.hero-card {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 18px; width: 100%; text-align: left;
  padding: 24px 22px; border-radius: 24px; background: var(--lime); color: var(--forest);
  box-shadow: var(--shadow-hero); min-height: 128px;
  transition: transform var(--t-fast) var(--ease);
}
.hero-card:active { transform: scale(.985); }
.hero-card .mic {
  width: 68px; height: 68px; border-radius: 50%; background: var(--forest); color: var(--lime);
  display: grid; place-items: center; flex: none; position: relative; z-index: 1;
}
.hero-card .mic svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hero-card h2 { font: 700 22px/1.2 var(--font-display); letter-spacing: -0.02em; position: relative; z-index: 1; }
.hero-card p { font-size: 15px; opacity: .78; margin-top: 4px; position: relative; z-index: 1; }
.hero-card::after {
  content: ""; position: absolute; right: -40px; bottom: -70px; width: 190px; height: 190px;
  border-radius: 0 100% 0 100%; background: var(--leaf); opacity: .28; transform: rotate(18deg);
}
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.action {
  display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-height: 124px; padding: 18px;
  border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); color: var(--ink);
  transition: transform var(--t-fast) var(--ease);
}
.action:active { transform: scale(.975); }
.action .ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.action .ic svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.action .sub { font-size: 13.5px; color: var(--muted); display: block; margin-top: 2px; }
.action strong { font-size: 17px; font-weight: 650; letter-spacing: -0.01em; display: block; }

/* "Naloži datoteko" — the hero's quieter twin: same width, one line, clearly a button */
.upload-card {
  position: relative; display: flex; align-items: center; gap: 14px; width: 100%; margin-top: 12px;
  min-height: 72px; padding: 12px 14px 12px 14px; border-radius: var(--r-lg); cursor: pointer;
  background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow-1); color: var(--ink);
  transition: transform var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
  -webkit-user-select: none; user-select: none;
}
.upload-card:active { transform: scale(.985); background: var(--raise); }
.upload-card:focus-within { outline: 3px solid var(--leaf); outline-offset: 2px; }
.upload-card .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--lime-soft); color: var(--lime-ink); flex: none; }
.upload-card .ic svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.upload-card .uc-main { flex: 1; min-width: 0; }
.upload-card strong { display: block; font-size: 17px; font-weight: 650; letter-spacing: -0.01em; }
.upload-card .sub { display: block; font-size: 13.5px; color: var(--muted); margin-top: 1px; }

/* timeline */
.tl { display: flex; flex-direction: column; }
.tl-item { position: relative; padding: 0 0 22px 26px; }
.tl-item::before { content: ""; position: absolute; left: 5px; top: 18px; bottom: 0; width: 2px; background: var(--line); border-radius: 1px; }
.tl-item:last-child::before { display: none; }
.tl-item::after { content: ""; position: absolute; left: 0; top: 7px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2.5px solid var(--tl-c, var(--faint)); }
.tl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-when { font-size: 13px; color: var(--muted); }
.tl-sum { margin-top: 6px; font-size: 15.5px; line-height: 1.5; color: var(--ink-2); }
.tl-foot { margin-top: 6px; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-foot a { font-weight: 600; display: inline-flex; align-items: center; min-height: 44px; margin: -12px -6px; padding: 0 6px; border-radius: var(--r-sm); }
.tl-foot .tl-fu { color: var(--accent); font-weight: 600; }   /* brand green; ochre is for the queue only */
.tl-who { gap: 6px; }
.tl-who > span[aria-hidden] { color: var(--faint); }
.tl-n { margin-left: auto; font-size: 12.5px; font-weight: 700; color: var(--muted); background: var(--neutral-soft); border-radius: var(--r-full); padding: 2px 8px; }
.tl-card { padding: 20px 16px 4px; }
.tl-card .more { margin: 0 0 14px; min-height: 46px; font-size: 15.5px; }

/* records (home "Zadnje") */
.rec-row .row-main { display: flex; flex-direction: column; gap: 4px; }
.rec-row .row-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-weight: 550; font-size: 15px; line-height: 1.4; }
.rec-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* ------------------------------------------------------------------ ask (chat) */
.chat-view { display: flex; flex-direction: column; min-height: calc(100dvh - var(--safe-t) - 20px - var(--tabbar-h) - var(--safe-b) - 32px); }
.chat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.ctx-banner {
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border-radius: var(--r-full);
  background: var(--accent-soft); color: var(--accent); font-size: 14.5px; font-weight: 600; margin-bottom: 12px;
}
.ctx-banner span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctx-banner button { width: 44px; height: 44px; margin: -6px -2px -6px 0; border-radius: 50%; display: grid; place-items: center; }
.ctx-banner svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.chat-empty { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 22px; padding-bottom: 16px; }
.chat-mark { width: 64px; height: 64px; border-radius: 22px; display: grid; place-items: center; background: var(--lime-soft); color: var(--lime-ink); }
.chat-mark svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chat-empty .suggest { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.suggest .chip { min-height: 46px; padding: 0 18px; font-size: 15.5px; font-weight: 500; white-space: normal; text-align: left; line-height: 1.3; padding-top: 10px; padding-bottom: 10px; }
.msgs { flex: 1 0 auto; display: flex; flex-direction: column; gap: 16px; padding: 4px 0 16px; }
.msg { max-width: 88%; font-size: 16.5px; line-height: 1.55; animation: view-in var(--t) var(--ease) both; }
.msg.user {
  align-self: flex-end; background: var(--forest-2); color: #F1F6F1; padding: 11px 16px;
  border-radius: 20px 20px 6px 20px; white-space: pre-wrap; overflow-wrap: anywhere;
}
:root[data-theme="dark"] .msg.user { background: var(--raise); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .msg.user { background: var(--raise); } }
.msg.bot { align-self: stretch; max-width: 100%; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); padding: 14px 16px; border-radius: 6px 20px 20px 20px; overflow-wrap: anywhere; }
.msg.bot p + p, .msg.bot ul + p, .msg.bot p + ul { margin-top: 10px; }
.msg.bot ul { margin: 0; padding-left: 20px; }
.msg.bot li + li { margin-top: 4px; }
.msg.bot strong { font-weight: 650; }
.msg.bot code { font-family: var(--mono); font-size: .9em; background: var(--sunk); padding: 1px 5px; border-radius: 5px; }
/* structured answers (ui.js md) */
.msg.bot > * + *, .msg-text > * + * { margin-top: 12px; }
.msg.bot .ans-lead { font-size: 17px; font-weight: 550; line-height: 1.45; }
.msg.bot .ans-h { margin-top: 18px; font-size: 12.5px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.msg.bot .ans-h + * { margin-top: 8px; }
.msg.bot .ans-kv { margin: 12px 0 0; border-radius: 14px; background: var(--sunk); padding: 2px 14px; }
.msg.bot .ans-kv > div { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 15.5px; line-height: 1.4; }
.msg.bot .ans-kv > div:first-child { border-top: 0; }
.msg.bot .ans-kv dt { color: var(--muted); flex: 0 1 42%; }
.msg.bot .ans-kv dd { margin: 0; text-align: right; font-weight: 550; flex: 1 1 58%; }
.msg.bot .ans-list { list-style: none; padding: 0; }
.msg.bot .ans-list li { position: relative; padding-left: 18px; }
.msg.bot .ans-list li::before { content: ""; position: absolute; left: 3px; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--leaf); }
.msg.bot .ans-list li + li, .msg.bot .ans-ol li + li { margin-top: 7px; }
.msg.bot .ans-ol { list-style: none; padding: 0; counter-reset: step; }
.msg.bot .ans-ol li { position: relative; padding-left: 32px; counter-increment: step; }
.msg.bot .ans-ol li::before { content: counter(step); position: absolute; left: 0; top: .1em; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; background: var(--lime-soft); color: var(--lime-ink); }
.msg.bot .ans-table { overflow-x: auto; margin-left: -4px; margin-right: -4px; }
.msg.bot .ans-table table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.35; }
.msg.bot .ans-table th { text-align: left; font-weight: 650; color: var(--muted); font-size: 12.5px; letter-spacing: .03em; padding: 6px 6px; border-bottom: 1px solid var(--line-strong); }
.msg.bot .ans-table td { padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.msg.bot .ans-table tr:last-child td { border-bottom: 0; }
.msg.bot .ans-note { padding: 10px 12px; border-radius: 12px; background: var(--warn-soft); color: var(--warn-ink); font-size: 14.5px; line-height: 1.45; }
.msg.bot .ans-src { font-size: 13px; color: var(--muted); padding-top: 10px; border-top: 1px solid var(--line); }
.msg.bot .num { font-family: var(--mono); font-size: .88em; font-weight: 600; background: var(--sunk); padding: 1px 5px; border-radius: 5px; white-space: nowrap; }
.msg.bot .ans-kv .num { background: var(--surface); }
.msg.bot .ans-next { display: flex; flex-wrap: wrap; gap: 8px; }
.msg.bot .ans-next .chip { white-space: normal; text-align: left; line-height: 1.3; padding-top: 8px; padding-bottom: 8px; min-height: 40px; }
.msg-status { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14.5px; min-height: 22px; }
.msg-status .leafdots { display: inline-flex; gap: 4px; }
.leafdots i { width: 7px; height: 7px; border-radius: 50%; background: var(--leaf); animation: pulse 1.1s ease-in-out infinite; }
.leafdots i:nth-child(2) { animation-delay: .15s; }
.leafdots i:nth-child(3) { animation-delay: .3s; }
@keyframes pulse { 0%, 100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1); } }
.msg .refs { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
/* v1.5: pictures from the documents and the files Vprašaj made (attachments.js) */
.atts { display: grid; gap: 12px; }
.att-imgs { display: grid; gap: 12px; }
.att-img { margin: 0; }
.att-img-btn { display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--sunk); cursor: zoom-in; }
.att-img-btn:focus-visible { outline: 3px solid var(--leaf); outline-offset: 2px; }
.att-img img { display: block; width: 100%; height: auto; max-height: 60vh; object-fit: contain; background: #FFFFFF; }
.att-ph { display: block; width: 100%; min-height: 140px; max-height: 60vh; border-radius: 0; }
.att-img figcaption { display: grid; gap: 2px; margin-top: 6px; font-size: 14px; line-height: 1.4; }
.att-cap { color: var(--ink-2); }
.att-src { font-size: 12.5px; color: var(--muted); }
.att-miss { margin: 0; padding: 12px 14px; border-radius: var(--r-md); background: var(--neutral-soft); color: var(--muted); font-size: 14px; }
.att-file { display: grid; grid-template-columns: auto 1fr; gap: 10px 12px; align-items: center; padding: 12px; border-radius: var(--r-md); background: var(--sunk); border: 1px solid var(--line); }
.att-file-ic { position: relative; display: grid; place-items: center; width: 44px; height: 48px; border-radius: 10px; background: var(--surface); color: var(--forest-3); box-shadow: var(--shadow-1); }
.att-file-ic svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.att-file-ic b { position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); padding: 1px 5px; border-radius: 6px; font-size: 9.5px; font-weight: 750; letter-spacing: .04em; line-height: 1.4; white-space: nowrap; background: var(--forest-2); color: #F1F6F1; }
.att-file.fmt-xlsx .att-file-ic b, .att-file.fmt-csv .att-file-ic b { background: #1F7A47; }
.att-file.fmt-pdf .att-file-ic b { background: #B4234A; }
.att-file.fmt-docx .att-file-ic b { background: #2B5797; }
.att-file-meta { min-width: 0; display: grid; gap: 2px; }
.att-file-meta strong { font-size: 15.5px; font-weight: 650; overflow-wrap: anywhere; line-height: 1.3; }
.att-file-meta small { font-size: 13px; color: var(--muted); line-height: 1.35; }
.att-file-actions { grid-column: 1 / -1; display: flex; gap: 8px; }
.att-file-actions .btn { flex: 1; min-height: 44px; gap: 8px; }
.att-dl { background: var(--hero-bg); color: var(--hero-ink); }
.att-zoom { display: grid; gap: 10px; padding-bottom: 12px; }
.att-zoom img { display: block; width: 100%; height: auto; border-radius: var(--r-md); background: #FFFFFF; touch-action: pinch-zoom; }
.msg.err { border-color: transparent; background: var(--bad-soft); color: var(--bad-ink); box-shadow: none; }
.caret { display: inline-block; width: 8px; height: 1.05em; vertical-align: -0.15em; margin-left: 2px; background: var(--leaf); border-radius: 2px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.composer {
  position: sticky; bottom: calc(var(--tabbar-h) + var(--safe-b) + 10px); z-index: 5;
  display: flex; align-items: flex-end; gap: 8px; padding: 6px; border-radius: 28px;
  background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow-2);
}
.composer textarea {
  flex: 1; min-height: 44px; max-height: 160px; padding: 10px 6px 10px 12px; border: 0; background: none; resize: none;
  font-size: 17px; line-height: 1.4; outline: none;
}
.composer textarea::placeholder { color: var(--faint); }
.composer .icon-btn { flex: none; }
.composer .send { background: var(--primary-bg); color: var(--primary-ink); transition: opacity var(--t-fast), transform var(--t-fast); }
.composer .send[disabled] { opacity: .25; }
.composer .mic.on { background: var(--bad-soft); color: var(--bad-ink); }

/* ------------------------------------------------------------------ record */
.rec-head { margin-bottom: 18px; }
.hint-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.rec-stage { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 18px 0 24px; }
.rec-btn {
  position: relative; width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center;
  background: var(--lime); color: var(--forest); box-shadow: var(--shadow-hero);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), background-color var(--t) var(--ease);
}
.rec-btn:active { transform: scale(.95); }
.rec-btn svg { width: 46px; height: 46px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; position: relative; z-index: 1; }
.rec-btn .stop { width: 34px; height: 34px; border-radius: 9px; background: var(--forest); position: relative; z-index: 1; }
.rec-btn::before, .rec-btn::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--lime); opacity: 0; z-index: 0;
}
.rec-btn.on::before { animation: ring 1.8s var(--ease) infinite; }
.rec-btn.on::after { animation: ring 1.8s var(--ease) .6s infinite; }
@keyframes ring { 0% { opacity: .55; transform: scale(1); } 100% { opacity: 0; transform: scale(1.55); } }
.rec-timer { font: 600 30px/1 var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.rec-state { color: var(--muted); font-size: 15px; display: flex; align-items: center; gap: 8px; }
.rec-state .live { width: 9px; height: 9px; border-radius: 50%; background: var(--bad); animation: pulse 1.2s ease-in-out infinite; }
.lang-seg { width: 100%; max-width: 330px; }
.lang-seg button { font-size: 13px; letter-spacing: .04em; min-height: 44px; padding: 0 6px; }
.transcript { position: relative; }
.transcript .textarea { min-height: 150px; padding: 16px; font-size: 17px; line-height: 1.55; border-radius: var(--r-lg); background: var(--surface); }
.transcript .interim { color: var(--faint); }
.transcript-live {
  min-height: 150px; padding: 16px; border-radius: var(--r-lg); background: var(--surface); border: 1.5px solid var(--line-strong);
  font-size: 17px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere;
}
.transcript-live .ph { color: var(--faint); }
.upload-row { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; margin-top: 2px; }
.upload-row .or { font-size: 13px; color: var(--faint); font-weight: 600; letter-spacing: .04em; }
.upload-row.solo { justify-content: flex-start; margin: 0 0 14px; }
.upload-btn { cursor: pointer; position: relative; }
.upload-btn:focus-within { outline: 3px solid var(--leaf); outline-offset: 2px; }
.upload-btn svg { width: 18px; height: 18px; }
.file-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.file-chip { max-width: 100%; min-height: 36px; padding: 0 12px; font-size: 14px; background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.file-chip > span:not(.muted) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.file-chip .muted { font-weight: 500; }
.up-progress { width: 100%; max-width: 280px; height: 6px; border-radius: 3px; background: var(--sunk); overflow: hidden; position: relative; }
.up-progress i { display: block; height: 100%; width: 0; background: var(--leaf); border-radius: 3px; transition: width 200ms linear; }
.up-progress.busy i { width: 35%; position: absolute; left: 0; animation: up-busy 1.3s var(--ease) infinite; }
@keyframes up-busy { 0% { transform: translateX(-100%); } 100% { transform: translateX(290%); } }
.reading .file-chip { min-height: 40px; }

.note-fallback {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-md);
  background: var(--accent-soft); color: var(--ink-2); font-size: 14.5px; margin-bottom: 14px;
}
.note-fallback svg { width: 22px; height: 22px; color: var(--accent); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.analysing { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; padding: 56px 12px 24px; }
.leaf-spin { width: 84px; height: 84px; position: relative; }
.leaf-spin i {
  position: absolute; inset: 0; border-radius: 0 100% 0 100%; background: var(--leaf); opacity: .9;
  animation: leaf 2.4s var(--ease) infinite;
}
.leaf-spin i:nth-child(2) { background: var(--lime); animation-delay: .4s; opacity: .7; }
@keyframes leaf { 0% { transform: rotate(0) scale(.82); } 50% { transform: rotate(180deg) scale(1); } 100% { transform: rotate(360deg) scale(.82); } }
.analysing .quote { margin-top: 12px; padding: 14px 16px; border-left: 3px solid var(--leaf); text-align: left; color: var(--muted); font-size: 15px; max-height: 120px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }

/* draft card */
.draft { display: flex; flex-direction: column; gap: 14px; }
.draft-hero { display: flex; flex-direction: column; gap: 14px; }
.draft-kind { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.conf { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.conf .bar { width: 54px; height: 6px; border-radius: 3px; background: var(--sunk); overflow: hidden; }
.conf .bar i { display: block; height: 100%; background: var(--leaf); border-radius: 3px; }
.blk { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow-1); display: flex; flex-direction: column; gap: 12px; }
.blk-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.blk-h button { text-transform: none; letter-spacing: 0; font-size: 15px; font-weight: 600; color: var(--accent); min-height: 44px; }
.hotel-pick { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; min-height: 52px; }
.hotel-pick .hp-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.hotel-pick .hp-ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.hotel-pick strong { color: var(--ink); display: block; font-size: 17px; font-weight: 650; line-height: 1.3; }
.hotel-pick span { font-size: 14px; color: var(--muted); }
.hotel-pick.missing .hp-ic { background: var(--warn-soft); color: var(--warn-ink); }
.chips.scroll.kind-picker {
  margin: 0 -16px; padding: 2px 44px 4px 16px;
  /* fade at the right edge: the row visibly goes on, so the scroll is not missed */
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent);
}
.blk { overflow: hidden; }
details.blk > summary { min-height: 44px; margin: -10px 0; cursor: pointer; list-style: none; }
details.blk > summary::-webkit-details-marker { display: none; }
.kind-picker .chip { min-height: 44px; font-size: 14.5px; }
.ol { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
.ol + .ol { border-top: 1px solid var(--line); padding-top: 12px; }
.ol-name { flex: 1; min-width: 0; font-weight: 600; font-size: 15.5px; line-height: 1.3; }
.ol-name small { display: block; font-weight: 500; color: var(--muted); font-size: 13px; }
.ask-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.ask-list li { display: flex; gap: 8px; font-size: 15px; color: var(--ink-2); }
.ask-list li::before { content: "?"; flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--warn-soft); color: var(--warn-ink); font-weight: 700; font-size: 12px; display: grid; place-items: center; margin-top: 2px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
/* Only the one action stays pinned, on a solid strip (a gradient let the card under it show
   through half-cut); "Zavrzi osnutek" sits at the end of the form, not over it. */
.save-bar, .rec-actions {
  position: sticky; bottom: calc(var(--tabbar-h) + var(--safe-b)); z-index: 4; display: flex; flex-direction: column;
  margin: 4px -20px 0; padding: 10px 20px 12px;
  background: var(--page); border-top: 1px solid var(--line);
}
.draft .discard { align-self: center; margin-top: -4px; }
.textarea.grow { min-height: 52px; padding-top: 13px; padding-bottom: 13px; }
details.tx-blk { display: block; padding: 0 16px; gap: 0; }
details.tx-blk > summary { margin: 0; min-height: 52px; }
.tx-toggle { text-transform: none; letter-spacing: 0; }
.tx-body { white-space: pre-wrap; color: var(--ink-2); padding: 0 0 16px; }

.done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 48px 8px 24px; }
.done .check { width: 96px; height: 96px; border-radius: 50%; background: var(--lime); color: var(--forest); display: grid; place-items: center; box-shadow: var(--shadow-hero); animation: pop 420ms var(--ease) both; }
.done .check svg { width: 46px; height: 46px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw 420ms var(--ease) 180ms forwards; }
.done .check.queued { background: var(--warn-soft); color: var(--warn-ink); box-shadow: none; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.06); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.done-actions { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.done-actions .btn { white-space: nowrap; }

/* ------------------------------------------------------------------ hotel page */
.hotel-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.hotel-head .meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 15px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 12px 14px; box-shadow: var(--shadow-1); min-width: 0; }
.fact .k { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.fact .v { font: 700 20px/1.2 var(--font-display); letter-spacing: -0.02em; margin-top: 4px; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fact .v.sm { font-size: 15px; font-weight: 650; }
.kv { display: flex; flex-direction: column; }
.kv > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 15px; }
.kv > div:first-child { border-top: 0; padding-top: 0; }
.kv > div:last-child { padding-bottom: 0; }
.kv dt, .kv .k { color: var(--muted); }
.kv .v { text-align: right; font-weight: 550; overflow-wrap: anywhere; }
.hotel-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.fit-hero { display: flex; align-items: center; gap: 14px; }
.fit-hero .score { width: 56px; height: 56px; font-size: 20px; }

/* product sheet */
.variants { display: flex; flex-direction: column; gap: 8px; }
.variant { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.variant .code { font-family: var(--mono); font-size: 14px; font-weight: 600; }
.variant .ean { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }

/* ------------------------------------------------------------------ mine */
.me-card { display: flex; align-items: center; gap: 14px; }
.avatar { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--lime); color: var(--forest); font: 700 20px/1 var(--font-display); flex: none; }
.settings .set { display: flex; flex-direction: column; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); }
.settings .set:first-child { border-top: 0; padding-top: 0; }
.settings .set:last-child { padding-bottom: 0; }
.version { text-align: center; color: var(--faint); font-size: 13px; margin-top: 28px; }
.q-item .row-title { white-space: normal; }
.q-item .err { color: var(--bad-ink); font-size: 13px; margin-top: 4px; }

/* skeletons */
.sk { background: linear-gradient(90deg, var(--sunk) 0, var(--raise) 40%, var(--sunk) 80%); background-size: 300% 100%; animation: sk 1.3s ease-in-out infinite; border-radius: var(--r-md); }
@keyframes sk { from { background-position: 100% 0; } to { background-position: 0 0; } }
.sk-row { height: 72px; }
.sk-line { height: 14px; border-radius: 7px; }

/* offline banner */
.offline {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 14px; border-radius: var(--r-md);
  background: var(--warn-soft); color: var(--warn-ink); font-size: 14px; font-weight: 600;
}
.offline svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

@media (min-width: 600px) {
  .view { padding-left: 28px; padding-right: 28px; }
}

/* ------------------------------------------------------------------ v1.2: sales status, opportunity, calendar */
.status-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.status-pill { font-weight: 700; }
.status-list .row { min-height: 56px; }
.status-list .row[aria-current="true"] { border-color: var(--leaf); }

/* event type pills: lime = presentation, forest = meeting (the calendar's dots use the same) */
.ev-pill { height: 24px; font-size: 12px; }
.ev-pill.ev-pres { background: var(--lime); color: var(--forest); }
.ev-pill.ev-meet { background: var(--forest-2); color: #F1F6F1; }
.dot-meet, .dot-pres { display: inline-block; width: 7px; height: 7px; border-radius: 50%; }
.dot-meet { background: var(--forest-3); }
.dot-pres { background: var(--leaf); }

.ev-row { align-items: flex-start; }
.ev-time { flex: none; width: 58px; display: flex; flex-direction: column; gap: 2px; padding-top: 2px; }
.ev-time strong { font: 700 17px/1.1 var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.ev-time span { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ev-row .row-main { display: flex; flex-direction: column; gap: 4px; }
.ev-hotel { font-weight: 650; font-size: 15.5px; color: var(--ink); line-height: 1.3; }
a.ev-hotel { text-decoration: none; }
.ev-prods { margin-top: 4px; gap: 6px; }
.ev-prods .chip, .prod-chip { min-height: 34px; font-size: 13.5px; padding: 0 12px; }
.prod-chip { background: var(--lime-soft); border-color: transparent; color: var(--lime-ink); font-weight: 600; }
.prod-chip svg { width: 15px; height: 15px; }

.opp { display: flex; flex-direction: column; gap: 0; padding: 4px 16px; }
.opp-sec { padding: 14px 0; }
.opp-sec + .opp-sec { border-top: 1px solid var(--line); }
.opp-sec h3 { font-size: 12.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.opp-row + .opp-row { margin-top: 10px; }
.opp-kv { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.opp-kv .k { color: var(--ink-2); font-size: 15px; }
.opp-kv .v { font-weight: 650; text-align: right; font-size: 15px; overflow-wrap: anywhere; }
.opp-src { font-size: 11.5px; color: var(--faint); margin-top: 3px; letter-spacing: .01em; }
.opp-kv + .opp-src { text-align: right; }
.opp-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opp-stats .fact { box-shadow: none; background: var(--raise); border-color: transparent; }
.opp-when { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.opp-when svg { width: 18px; height: 18px; color: var(--accent); }
.opp-notes { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 15px; }

.tl-status { color: var(--ink-2); }
.tl-status strong { color: var(--accent); font-weight: 650; }
.tl-ev { display: flex; flex-wrap: nowrap; align-items: flex-start; gap: 6px; }
.tl-ev svg { width: 15px; height: 15px; flex: none; color: var(--accent); margin-top: 2px; }
.tl-ev span { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.contact-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; padding: 10px 0; }
.contact-row > .field:first-child { grid-column: 1 / -1; }   /* name on its own line: "F&B manager" fits at 390 px */
.contact-row + .contact-row { border-top: 1px solid var(--line, rgba(0,0,0,.06)); }
.contact-row + .contact-row { margin-top: 4px; }
.contact-row .ct-rm { margin-bottom: 4px; }
.held-row { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.held-q { font-size: 15px; font-weight: 550; min-width: 0; }
.held-yes { flex: none; min-width: 64px; justify-content: center; gap: 4px; }
.held-yes svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.done-list { list-style: none; margin: 4px 0 0; padding: 14px 16px; width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 10px;
  text-align: left; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); }
.done-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; font-weight: 550; }
.done-list svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--accent); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ev-row.is-done .ev-time strong, .ev-row.is-done .row-main { text-decoration: line-through; text-decoration-color: var(--faint); opacity: .7; }
.tl-an { color: var(--ink-2); }

/* the draft: events and the opportunity profile */
.ev-edit { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: var(--r-md); background: var(--raise); }
.ev-edit-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ev-edit .seg { flex: 1; max-width: 280px; }
.ev-edit .seg button { flex: 1; }
.ev-edit .input { background: var(--surface); }
input[type="time"].input { min-height: 48px; }
.add-row { display: flex; gap: 8px; align-items: center; }
.add-row .input { flex: 1; min-width: 0; }
.add-row .btn { flex: none; }

/* Koledar */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 16px; flex-wrap: wrap; }
.cal { padding: 10px 10px 12px; }
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.cal-month { font: 700 18px/1.2 var(--font-display); text-transform: capitalize; letter-spacing: -0.01em; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-dow { text-align: center; font-size: 11.5px; font-weight: 650; color: var(--muted); padding: 6px 0; text-transform: lowercase; }
.cal-day {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 46px; border-radius: var(--r-sm); font-variant-numeric: tabular-nums; color: var(--ink);
  transition: background-color var(--t-fast) var(--ease);
}
.cal-day .n { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; font-size: 15px; font-weight: 550; }
.cal-day.out { color: var(--faint); }
.cal-day.today .n { box-shadow: inset 0 0 0 2px var(--leaf); font-weight: 750; }
.cal-day.sel .n { background: var(--primary-bg); color: var(--primary-ink); box-shadow: none; }
.cal-day:active { background: var(--sunk); }
.cal-day .dots { display: flex; gap: 3px; height: 7px; }
.cal-legend { display: flex; gap: 16px; justify-content: center; font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.agenda-day { font-size: 14px; font-weight: 650; color: var(--ink-2); margin: 14px 2px 8px; }
.agenda-day:first-child { margin-top: 0; }
.cal-link .cal-ic { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--lime-soft); color: var(--lime-ink); }
.cal-link .cal-ic svg { width: 20px; height: 20px; }
.tl-ev svg, .opp-when svg, .cal-link .cal-ic svg, .prod-chip svg, .ev-edit .icon-btn svg, .add-row .icon-btn svg, .hotel-actions svg {
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.two > * { min-width: 0; }
.ev-edit .input, .blk[data-profile] .input { width: 100%; min-width: 0; }
.ev-edit input[type="date"].input, .ev-edit input[type="time"].input { padding-left: 10px; padding-right: 8px; }

/* ------------------------------------------------------------------ v1.4 Posli + Posel */
.tone-sec-info { --sec: var(--forest-3); --sec-soft: var(--info-soft); }
.tone-sec-lime { --sec: var(--leaf); --sec-soft: var(--lime-soft); }
.tone-sec-ok { --sec: var(--ok); --sec-soft: var(--ok-soft); }
.tone-sec-bad { --sec: var(--bad); --sec-soft: var(--bad-soft); }
.stage-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--sec, var(--faint)); flex: none; }

/* Domov: the wide "Moji posli" tile */
.action.action-deals {
  grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 14px; min-height: 84px; padding: 16px 16px 16px 18px;
  background: var(--forest); color: #F1F6F1; border-color: transparent; box-shadow: var(--shadow-2);
}
.action-deals .ic { background: rgba(205, 247, 137, .16); color: var(--lime); flex: none; }
.action-deals .ad-main { flex: 1; min-width: 0; }
.action-deals .sub { color: rgba(241, 246, 241, .74); font-variant-numeric: tabular-nums; }
.action-deals .ad-stuck {
  flex: none; display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: var(--r-full);
  background: rgba(224, 163, 42, .22); color: #F0C46A; font-size: 12.5px; font-weight: 700;
}
.action-deals .chev { color: rgba(241, 246, 241, .5); }
:root[data-theme="dark"] .action.action-deals { background: var(--raise); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .action.action-deals { background: var(--raise); } }

/* Posli: scope toggle, the value hero, stale line */
.deals-scope { margin-top: 16px; }
.deals-hero { margin-top: 18px; padding: 20px 18px 16px; background: var(--forest); color: #F1F6F1; border-color: transparent; position: relative; overflow: hidden; }
.deals-hero::after {
  content: ""; position: absolute; right: -50px; top: -60px; width: 170px; height: 170px; border-radius: 0 100% 0 100%;
  background: var(--leaf); opacity: .22; transform: rotate(18deg); pointer-events: none;
}
:root[data-theme="dark"] .deals-hero { background: var(--raise); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .deals-hero { background: var(--raise); } }
.dh-k { font-size: 13px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: rgba(241, 246, 241, .7); }
.dh-v { font: 750 34px/1.1 var(--font-display); letter-spacing: -0.03em; margin-top: 6px; font-variant-numeric: tabular-nums; color: var(--lime); position: relative; z-index: 1; }
.dh-v small { font-size: 15px; font-weight: 600; letter-spacing: 0; color: rgba(241, 246, 241, .78); }
.dh-sub { font-size: 14px; color: rgba(241, 246, 241, .78); margin-top: 4px; font-variant-numeric: tabular-nums; }
.dh-counts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 16px; position: relative; z-index: 1; }
.dh-count {
  display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 56px; padding: 8px 2px; border-radius: var(--r-md);
  background: rgba(241, 246, 241, .08); color: #F1F6F1; transition: background-color var(--t-fast) var(--ease);
}
.dh-count:active { background: rgba(241, 246, 241, .16); }
.dh-count strong { font: 700 19px/1.1 var(--font-display); font-variant-numeric: tabular-nums; }
.dh-count em { font-style: normal; font-size: 10px; font-weight: 600; color: #F0C46A; white-space: nowrap; }
.dh-count span { font-size: 11px; font-weight: 600; color: rgba(241, 246, 241, .72); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dh-stuck { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 14px; font-weight: 600; color: #F0C46A; }
.dh-stuck svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.stale-line { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 13.5px; color: var(--warn-ink); font-weight: 550; }
.stale-line svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Opozorila */
.alert-row .alert-ic { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--warn-soft); color: var(--warn-ink); }
.alert-row .alert-ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* the stage sections */
.stage-sec { margin-top: 14px; }
.stage-sec:first-of-type { margin-top: 28px; }
.stage-sec > summary {
  list-style: none; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 14px 0 16px; cursor: pointer;
  border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1);
  -webkit-user-select: none; user-select: none; transition: background-color var(--t-fast) var(--ease);
}
.stage-sec > summary::-webkit-details-marker { display: none; }
.stage-sec > summary:active { background: var(--raise); }
.stage-sec > summary:focus-visible { outline: 3px solid var(--leaf); outline-offset: 2px; }
.stage-name { font-weight: 700; font-size: 16px; letter-spacing: -0.01em; }
.stage-count {
  min-width: 26px; height: 24px; padding: 0 8px; border-radius: var(--r-full); display: inline-grid; place-items: center;
  background: var(--sec-soft, var(--neutral-soft)); color: var(--ink); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.stage-eur { margin-left: auto; font-size: 13.5px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.stage-chev { width: 18px; height: 18px; color: var(--faint); fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transform: rotate(90deg); transition: transform var(--t) var(--ease); flex: none; }
.stage-sec[open] > summary .stage-chev { transform: rotate(-90deg); }
.stage-list { margin-top: 10px; padding-left: 10px; border-left: 2px solid var(--sec-soft, var(--line)); }
.stage-empty { color: var(--faint); font-size: 14px; padding: 6px 4px 4px; }

/* a deal card */
.deal-card { align-items: flex-start; padding-top: 14px; padding-bottom: 14px; }
.deal-card > .chev { margin-top: 3px; }
.deal-card.is-stuck { border-color: var(--warn-soft); box-shadow: inset 3px 0 0 var(--warn), var(--shadow-1); }
.deal-meta { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; font-size: 13.5px; color: var(--ink-2); }
.deal-meta span { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deal-meta svg { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; color: var(--muted); }
.deal-meta .deal-value { font-weight: 650; font-variant-numeric: tabular-nums; }
.muted-2 { color: var(--faint) !important; }
.deal-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.alert-pill { height: 24px; font-size: 12px; }
.pending-pill { height: 24px; font-size: 12px; background: var(--warn-soft); color: var(--warn-ink); gap: 5px; }
.pending-pill svg, .owner-pill svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.owner-pill { height: 24px; font-size: 12px; gap: 5px; }
.phase-pill { height: 24px; font-size: 12px; font-weight: 650; background: var(--lime-soft); color: var(--lime-ink); }
.owner-pill.is-me { background: var(--lime-soft); color: var(--lime-ink); }

/* the hotel page's Posel section */
.deal-sec { padding: 16px; }
.deal-sec-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.deal-kv { display: flex; flex-direction: column; margin-top: 12px; }
.deal-kv > div { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; }
.deal-kv .k { color: var(--muted); flex: none; }
.deal-kv .v { text-align: right; font-weight: 600; min-width: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.deal-pending { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; font-size: 13.5px; color: var(--ink-2); }
.deal-pending-solo:empty { display: none; }
.deal-pending-solo { margin-top: 12px; }
.deal-ro { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--neutral-soft); color: var(--ink-2); font-size: 14px; }
.deal-ro svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.deal-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.deal-act {
  display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 12px; border-radius: var(--r-md);
  background: var(--sunk); color: var(--ink); font-size: 14.5px; font-weight: 650; text-align: left; line-height: 1.2;
  transition: transform var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.deal-act:active { transform: scale(.97); background: var(--raise); }
.deal-act[disabled] { opacity: .45; pointer-events: none; }
.deal-act svg { width: 19px; height: 19px; flex: none; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* the action sheets */
.sheet-actions { display: flex; gap: 10px; margin-top: 8px; padding-bottom: 4px; }
.sheet-actions .btn-primary { flex: 1; }
.stage-pick { display: flex; flex-direction: column; gap: 8px; }
.stage-opt {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 16px; border-radius: var(--r-md);
  background: var(--surface); border: 1.5px solid var(--line-strong); color: var(--ink); font-size: 16px; font-weight: 600; text-align: left;
  transition: border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.stage-opt .so-name { flex: 1; }
.stage-opt .so-sub { display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin-top: 1px; }
.link-btn { color: var(--accent); font-weight: 650; text-decoration: underline; text-underline-offset: 2px; padding: 0; background: none; }
.done-pill { height: 22px; font-size: 11.5px; margin-left: 6px; background: var(--neutral-soft); color: var(--ink-2); }
.tl-ev.is-done span { color: var(--muted); }
/* a closed deal's event (won / lost after it was booked): muted history, not struck through */
.ev-row.is-closed .ev-time strong, .ev-row.is-closed .row-main > :not(.rec-top), .ev-row.is-closed .ev-pill { opacity: .55; }
.opp-row.is-closed .opp-when strong, .opp-row.is-closed .chips { opacity: .55; }
.opp-when .closed-pill { margin-left: 2px; }
.dot-closed { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.stage-opt[aria-checked="true"] { border-color: var(--sec); background: var(--sec-soft); }
.stage-opt[data-now] { border-style: dashed; }
.agent-opt { min-height: 60px; }
.agent-opt[aria-checked="true"] { border-color: var(--forest-3); background: var(--accent-soft); }
.agent-opt .agent-check { opacity: 0; color: var(--accent); }
.agent-opt[aria-checked="true"] .agent-check { opacity: 1; }
.avatar.sm { width: 36px; height: 36px; font-size: 15px; }

/* ---- v1.6 Prijavi napako (views/report.js, views/reports.js; the flag under an Ask answer) */
.msg-report { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 4px 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.msg-report svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }
.msg-report:hover, .msg-report:focus-visible { color: var(--ink); }
.issue-ctx { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.issue-ctx svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; vertical-align: -3px; }
.issue-q { font-weight: 600; }
.issue-a { color: var(--muted); white-space: pre-wrap; }
.issue-photo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.issue-photo img { max-width: 120px; max-height: 120px; border-radius: 10px; border: 1px solid var(--line); object-fit: cover; }
.issue-row { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.issue-detail { padding: 4px 14px 12px; }
.issue-comment { margin-top: 6px; display: flex; gap: 6px; align-items: flex-start; white-space: pre-wrap; }
.issue-comment svg { width: 14px; height: 14px; flex: 0 0 auto; margin-top: 3px; fill: none; stroke: currentColor; stroke-width: 2; }
.issue-events { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 8px; }
.issue-events li { border-left: 2px solid var(--line); padding-left: 10px; font-size: 14px; }
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* v1.6: purchase orders (js/views/orders.js) — warnings per line, instructions, the Ask card */
.order-warn { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; padding: 8px 10px; border-radius: 10px;
  background: var(--warn-soft); color: var(--warn-ink); font-size: 14px; line-height: 1.4; }
.order-warn.bad { background: var(--bad-soft); color: var(--bad-ink); }
.order-warn svg { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 2; }
.order-ins summary { cursor: pointer; font-size: 14px; }
.order-in { border-left: 2px solid var(--line); padding: 4px 0 6px 10px; margin-top: 6px; }
.order-line .qty { font-variant-numeric: tabular-nums; }
.warn-ink { color: var(--warn-ink); }
.err-ink { color: var(--bad-ink); }
.chip.on { border-color: var(--lime); }
.order-card { margin-top: 10px; }
