/* Svarog CRM. Delovni list za klice, v barvah steklenice brinjevca.
   Okvir (stranski meni, spodnja vrstica na telefonu, prijava) je temno brinov; delovna površina je bela.
   Napisi: Big Shoulders Display (kot etiketa) samo za naslove in velike številke;
   besedilo: Atkinson Hyperlegible Next (jasno loči 0/O in 1/l/I v številkah in e-naslovih).
   Kontrole so tonsko zapolnjene, brez obrob okoli vsega. Statusi imajo vsak svoj odtenek in vedno napis;
   rdeča in jantarna sta samo za »pokliči ponovno« (zamuda, danes).
   Svetla tema je privzeta; temno vklopi stikalo »Svetlo / Temno« (html[data-theme="dark"]). */

:root {
  color-scheme: light;
  --frame: #103d2f; --frame-2: #185040; --frame-ink: #eef5f1; --frame-muted: #b3cbbf; --frame-line: #2a5d4d;
  --surface: #ffffff; --tint: #f1f4f2; --tint-2: #e4eae6; --selected: #e4f0e9;
  --ink: #131b17; --ink-2: #2d3833; --muted: #525d57; --faint: #6b7670;
  --rule: #e2e7e4; --field: #87928c;
  --accent: #145c44; --accent-hover: #0d4935; --accent-ink: #ffffff; --accent-soft: #e0eee6; --accent-text: #11533d;
  --overdue: #b3261e; --overdue-soft: #fdebe8; --today: #8a5000; --today-soft: #fbf0db;
  --s-nov: #6b7570; --s-kontaktiran: #2b62a5; --s-zanimanje: #7444ad; --s-stranka: #145c44; --s-ni_interesa: #6b7570; --s-ne_obratuje: #2d3833;
  --on-status: #ffffff;
  --shadow-pop: 0 18px 44px -14px rgba(16, 40, 31, 0.35), 0 0 0 1px rgba(16, 40, 31, 0.08);
  --scrim: rgba(12, 30, 23, 0.4);
  --font: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Big Shoulders Display", "Arial Narrow", var(--font);
  --side: 236px; --detail-w: 500px; --row: 48px; --r: 5px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --frame: #0e221b; --frame-2: #183428; --frame-ink: #e6efea; --frame-muted: #9fb6aa; --frame-line: #213a30;
  --surface: #141a17; --tint: #1c2420; --tint-2: #26302b; --selected: #183127;
  --ink: #e9eeea; --ink-2: #cdd5d0; --muted: #a3aea8; --faint: #8d9892;
  --rule: #27302c; --field: #6a766f;
  --accent: #5cc49b; --accent-hover: #7ad2ae; --accent-ink: #062419; --accent-soft: #183529; --accent-text: #80d8b4;
  --overdue: #ff8b7e; --overdue-soft: #3d1f1b; --today: #f1bb62; --today-soft: #352a10;
  --s-nov: #96a19b; --s-kontaktiran: #74a7ea; --s-zanimanje: #b996ea; --s-stranka: #5cc49b; --s-ni_interesa: #96a19b; --s-ne_obratuje: #cdd5d0;
  --on-status: #0c1411;
  --shadow-pop: 0 18px 44px -12px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.08);
  --scrim: rgba(0, 0, 0, 0.55);
}

/* ---------- osnova ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--surface); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overflow: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
::selection { background: var(--accent-soft); }
.grow { flex: 1; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; display: block; }
[data-icon] { display: inline-flex; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* naslovi kot etiketa */
.page-h, .list-title h1, .d-head h2, .login-card h1, .brand, .counts b, .xp-out .big, .dlg-h h2 {
  font-family: var(--display); font-weight: 800; letter-spacing: 0.005em; line-height: 1.05;
}

/* ---------- gumbi in polja: tonsko zapolnjeni, brez obrob ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 15px;
  border: 0; border-radius: var(--r); background: var(--tint); color: var(--ink);
  font-weight: 700; white-space: nowrap; text-decoration: none; line-height: 1.2;
}
.btn:hover { background: var(--tint-2); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.ghost { background: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--tint); }
.btn.danger { color: var(--overdue); }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 14.5px; }
.btn.block { width: 100%; min-height: 48px; font-size: 16px; }
.btn:disabled { opacity: .5; cursor: default; }
.btn .i { width: 17px; height: 17px; }
.iconbtn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r); border: 0; background: transparent; color: var(--ink-2); text-decoration: none; }
.iconbtn:hover { background: var(--tint); color: var(--ink); }
.linkbtn { border: 0; background: none; padding: 2px 0; color: var(--accent-text); font-weight: 700; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.linkbtn:hover { text-decoration-thickness: 2px; }
.linkbtn:disabled { color: var(--muted); text-decoration: none; cursor: default; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 14px; font-weight: 700; color: var(--ink-2); }
/* polje: zapolnjeno, spodnja črta nosi kontrast; ob fokusu postane brinova */
input:not([type=checkbox]), select, textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; border: 0; border-bottom: 2px solid var(--field); border-radius: var(--r) var(--r) 0 0;
  background: var(--tint); color: var(--ink); outline: none;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:hover:not(:focus), select:hover:not(:focus), textarea:hover:not(:focus) { background: var(--tint-2); }
input:focus, select:focus, textarea:focus { border-bottom-color: var(--accent); background: var(--surface); box-shadow: inset 0 0 0 1px var(--rule); }
textarea { resize: vertical; line-height: 1.5; }
input[type=checkbox] { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; flex: none; }
select {
  appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23808b85' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; background-size: 15px;
}
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.span2 { grid-column: span 2; }
.form-err { color: var(--overdue); font-size: 14px; font-weight: 700; min-height: 20px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px; border: 0; border-radius: var(--r);
  background: var(--tint); color: var(--ink-2); font-size: 14.5px; font-weight: 700; white-space: nowrap;
}
.chip:hover { background: var(--tint-2); }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.chip[aria-pressed="true"] .sd { box-shadow: 0 0 0 2px var(--accent-ink); }
.chip[aria-pressed="true"]::before { content: ""; width: 9px; height: 5px; border: solid currentColor; border-width: 0 0 2px 2px; transform: translateY(-2px) rotate(-45deg); }

/* status: pika v barvi statusa; »ni interesa« je votel krog, »ne obratuje« prečrtan krog */
.sd { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--c, var(--s-nov)); }
.sd.ni_interesa { background: transparent; box-shadow: inset 0 0 0 2px var(--s-ni_interesa); }
.sd.ne_obratuje { width: 12px; height: 12px; background: linear-gradient(135deg, transparent 43%, var(--s-ne_obratuje) 43% 57%, transparent 57%); box-shadow: inset 0 0 0 2px var(--s-ne_obratuje); }
.status { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; color: var(--ink-2); }
.status.stranka { color: var(--accent-text); font-weight: 700; }
.status.ni_interesa, .status.ne_obratuje { color: var(--muted); }
.due { font-weight: 700; white-space: nowrap; }
.due.overdue { color: var(--overdue); }
.due.today { color: var(--today); }

/* ---------- prijava: brinova podlaga, bel list ---------- */
.login { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; background: var(--frame); }
.login-card { width: min(400px, 100%); display: flex; flex-direction: column; gap: 16px; background: var(--surface); padding: 30px 28px 28px; border-radius: 8px; }
.login-card h1 { font-size: 40px; margin-top: 10px; }
.login-card .muted { font-size: 15px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 27px; color: var(--accent-text); }
.brand .mark { width: 30px; height: 30px; border-radius: 4px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 21px; }
.brand-lg { font-size: 30px; }

/* ---------- ogrodje ---------- */
.app { display: grid; grid-template-columns: var(--side) minmax(0, 1fr) auto; height: 100vh; height: 100dvh; }
.side { display: flex; flex-direction: column; gap: 26px; padding: 20px 12px 16px; background: var(--frame); color: var(--frame-ink); min-height: 0; }
.side :focus-visible { outline-color: var(--frame-ink); }
.side .brand { padding: 0 10px; color: var(--frame-ink); }
.side .brand .mark { background: var(--frame-ink); color: var(--frame); }
.side > .muted { color: var(--frame-muted); }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: var(--r); text-decoration: none; color: var(--frame-muted); font-weight: 700; font-size: 16px; }
.nav a .i { width: 20px; height: 20px; }
.nav a:hover { color: var(--frame-ink); background: var(--frame-2); }
.nav a[aria-current="page"] { color: var(--frame-ink); background: var(--frame-2); }
.nav .lbl { flex: 1; }
.nav .n { min-width: 24px; height: 22px; padding: 0 7px; border-radius: 11px; background: #e5484d; color: #fff; font-size: 13px; font-weight: 700; display: grid; place-items: center; }
.nav .n:empty { display: none; }
.side-foot { display: flex; flex-direction: column; gap: 14px; padding: 16px 6px 0; border-top: 1px solid var(--frame-line); }
.sync { display: flex; gap: 9px; font-size: 13.5px; color: var(--frame-muted); line-height: 1.4; }
.sync .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--frame-muted); margin-top: 5px; flex: none; }
.sync.ok .dot { background: #6fd3a8; }
.sync.warn { color: #ffb4a9; font-weight: 700; }
.sync.warn .dot { background: #ff8b7e; }
.me { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14.5px; flex-wrap: wrap; }
.me .linkbtn { font-size: 14px; color: var(--frame-muted); }
.me .linkbtn:hover { color: var(--frame-ink); }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--frame-2); color: var(--frame-ink); display: grid; place-items: center; font-size: 13px; font-weight: 700; flex: none; }
.main { min-width: 0; min-height: 0; overflow: hidden; }
.page { height: 100%; overflow: auto; }
.page-list { display: flex; flex-direction: column; overflow: hidden; container-type: inline-size; container-name: list; }
.page-h { font-size: 44px; }

/* stikalo za videz: dve možnosti; na brinovem okvirju svetla, na beli površini tonska */
.theme { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 3px; border-radius: 7px; background: var(--tint); }
.theme button { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 34px; padding: 0 10px; border: 0; border-radius: var(--r); background: transparent; color: var(--muted); font-size: 14px; font-weight: 700; }
.theme button:hover { color: var(--ink); }
.theme button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }
.theme .i { width: 16px; height: 16px; }
.side .theme { background: var(--frame-2); }
.side .theme button { color: var(--frame-muted); }
.side .theme button:hover { color: var(--frame-ink); }
.side .theme button[aria-pressed="true"] { background: var(--frame-ink); color: var(--frame); box-shadow: none; }

/* ---------- seznam ---------- */
.list-top { padding: 22px 24px 16px; display: flex; flex-direction: column; gap: 16px; }
.list-title { display: flex; align-items: baseline; gap: 12px; }
.list-title h1 { font-size: 36px; }
.list-title .muted { font-size: 15px; }
.list-title .btn { align-self: center; }
.filters { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.filters .search { position: relative; width: 320px; }
.filters .search .i { position: absolute; left: 12px; top: 12px; width: 17px; height: 17px; color: var(--muted); }
.filters .search input { padding-left: 38px; }
.filters select { width: auto; max-width: 210px; font-size: 14.5px; }
.filters select.on { background-color: var(--accent-soft); border-bottom-color: var(--accent); color: var(--accent-text); font-weight: 700; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--ink-2); cursor: pointer; white-space: nowrap; min-height: 38px; }
.lhead, .row {
  display: grid; align-items: center; column-gap: 16px; padding: 0 24px;
  grid-template-columns: minmax(190px, 2.4fr) minmax(100px, 1fr) minmax(120px, 1fr) 140px minmax(150px, 1.6fr) 84px;
}
.lhead { height: 36px; font-size: 13.5px; color: var(--muted); font-weight: 700; border-bottom: 2px solid var(--ink); flex: none; }
.lhead .c-ct { text-align: right; }
.lhead button { border: 0; background: none; padding: 4px 0; color: inherit; font: inherit; text-align: left; }
.lhead button:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.lhead button[aria-sort] { color: var(--ink); }
.scroller { flex: 1; overflow: auto; position: relative; overscroll-behavior: contain; }
.vlist { position: relative; }
.row { position: absolute; left: 0; right: 0; height: var(--row); border-bottom: 1px solid var(--rule); background: var(--surface); cursor: pointer; }
.row:hover { background: var(--tint); }
.row.open { background: var(--selected); }
.row > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .nm { font-weight: 700; border: 0; background: none; padding: 0; text-align: left; font-size: 15px; color: var(--ink); }
.row .nm:focus-visible { outline-offset: -2px; }
.row .city, .row .cat { color: var(--muted); }
.row .cb { display: flex; gap: 8px; align-items: baseline; }
.row .cb .t { color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.row .ct { display: flex; gap: 4px; justify-content: flex-end; }
.row .ct a { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r); color: var(--ink-2); }
.row .ct a:hover { color: var(--accent-ink); background: var(--accent); }
.row .ct span { width: 36px; }
.row .ct span .i { display: none; }
.row .ct .i { width: 18px; height: 18px; }
.row.dim .nm, .row.dim .city, .row.dim .cat { color: var(--muted); font-weight: 400; }
.row .sub { display: none; }
.empty { padding: 72px 24px; text-align: center; color: var(--muted); max-width: 480px; margin: 0 auto; font-size: 15px; }
.empty h2 { color: var(--ink); font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.empty .btn { margin-top: 16px; }
@container list (max-width: 900px) {
  .lhead, .row { grid-template-columns: minmax(160px, 2fr) minmax(90px, 1fr) 130px minmax(120px, 1.4fr) 84px; }
  .lhead .c-cat, .row .cat { display: none; }
}

/* ---------- lokal ---------- */
.detail { width: 0; overflow: hidden; background: var(--surface); border-left: 1px solid var(--rule); display: flex; flex-direction: column; }
.detail.open { width: var(--detail-w); }
@media (max-width: 1279px) and (min-width: 761px) {
  .detail { position: fixed; top: 0; right: 0; bottom: 0; z-index: 20; width: var(--detail-w); max-width: 92vw; transform: translateX(104%); transition: transform .2s cubic-bezier(.3, .7, .2, 1); box-shadow: var(--shadow-pop); }
  .detail.open { transform: none; }
}
.d-head { padding: 22px 16px 18px 24px; display: flex; gap: 10px; align-items: flex-start; flex: none; background: var(--tint); }
.d-head h2 { font-size: 34px; overflow-wrap: anywhere; }
.d-head p { color: var(--muted); margin-top: 6px; }
.d-head .acts { display: flex; gap: 4px; align-items: center; margin-left: auto; }
.d-head .btn.ghost:hover, .d-head .iconbtn:hover { background: var(--tint-2); }
.d-body { flex: 1; overflow: auto; overscroll-behavior: contain; }
.d-sec { padding: 22px 24px; }
.d-sec + .d-sec { border-top: 1px solid var(--rule); }
.d-sec > h3 { font-size: 16px; font-weight: 700; color: var(--ink); margin-bottom: 12px; }
.reach { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.reach a { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 9px 14px; border-radius: var(--r); background: var(--tint); text-decoration: none; min-width: 0; }
.reach a:hover { background: var(--accent-soft); }
.reach a .i { color: var(--accent-text); width: 20px; height: 20px; }
.reach a span { display: flex; flex-direction: column; min-width: 0; }
.reach b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reach small { color: var(--muted); font-size: 13.5px; }
.reach .wide { grid-column: span 2; }
.reach .none { grid-column: span 2; color: var(--muted); }

/* izbira statusa: tonske ploščice; izbrana je polna v barvi statusa, z belim napisom in kljukico */
.stat-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.stat-pick button {
  display: flex; align-items: center; gap: 8px; min-height: 50px; padding: 8px 11px; border: 0; border-radius: var(--r); white-space: nowrap;
  background: var(--tint); color: var(--ink-2); font-weight: 700; text-align: left; line-height: 1.2;
}
.stat-pick button:hover { background: var(--tint-2); color: var(--ink); }
.stat-pick button[aria-pressed="true"] { background: var(--c); color: var(--on-status); }
.stat-pick button[aria-pressed="true"] .sd { --c: var(--on-status); --s-ni_interesa: var(--on-status); --s-ne_obratuje: var(--on-status); }
.stat-pick button[aria-pressed="true"]::after { content: ""; flex: none; margin-left: auto; width: 10px; height: 5px; border: solid currentColor; border-width: 0 0 2.5px 2.5px; transform: translateY(-2px) rotate(-45deg); }
.stat-pick button[data-status="ne_obratuje"][aria-pressed="true"] {
  background: repeating-linear-gradient(135deg, var(--c) 0 7px, color-mix(in srgb, var(--c) 86%, var(--surface)) 7px 14px);
}
.stat-note { margin-top: 12px; color: var(--ink-2); font-size: 14px; }
.cb-cur { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r); background: var(--tint); margin-bottom: 12px; }
.cb-cur.overdue { background: var(--overdue-soft); }
.cb-cur.today { background: var(--today-soft); }
.cb-cur .what { flex: 1; min-width: 0; color: var(--ink-2); }
.cb-cur .btn { background: var(--surface); }
.cb-form { display: grid; grid-template-columns: 1fr 160px; gap: 8px; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.note-row { display: flex; justify-content: flex-end; margin-top: 10px; }
.hist { list-style: none; margin: 18px 0 0; padding: 0; }
.hist-empty { margin-top: 14px; color: var(--muted); }
.hist li { padding: 12px 0; border-top: 1px solid var(--rule); }
.hist .h { display: flex; gap: 10px; align-items: baseline; font-size: 13.5px; color: var(--muted); }
.hist .h b { color: var(--ink-2); font-weight: 700; }
.hist .txt { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 3px; }
.hist li.sys .txt { color: var(--ink-2); display: flex; align-items: center; gap: 7px; }
.opt { margin-bottom: 14px; }
.facts { display: grid; grid-template-columns: 100px 1fr; gap: 8px 14px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.facts .idv { font-size: 13.5px; color: var(--muted); }

/* ---------- pregled ---------- */
.dash { max-width: 1180px; padding: 34px 40px 64px; display: flex; flex-direction: column; gap: 34px; }
.dash-head { display: flex; align-items: flex-end; gap: 16px; }
.dash-head p { color: var(--muted); margin-top: 8px; font-size: 16px; }
.dash-head p::first-letter { text-transform: uppercase; }
.dash-theme { display: none; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(260px, 1fr); gap: 44px; align-items: start; }
.dash-side { display: flex; flex-direction: column; gap: 26px; position: sticky; top: 0; }
.blk-h { display: flex; align-items: baseline; gap: 12px; padding-bottom: 10px; border-bottom: 2px solid var(--ink); flex-wrap: wrap; }
.blk-h h2 { font-size: 18px; font-weight: 700; }
.blk-h .sub { color: var(--muted); font-size: 14.5px; }
.calls { list-style: none; margin: 0; padding: 0; }
.call { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.call .who { min-width: 0; padding: 0; border: 0; background: none; text-align: left; display: block; width: 100%; overflow: hidden; }
.call .l1 { display: flex; gap: 10px; align-items: baseline; min-width: 0; }
.call .l1 b { font-size: 17px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 0 1 auto; min-width: 0; }
.call .l1 span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.call .l2 { display: flex; gap: 10px; margin-top: 2px; min-width: 0; }
.call .l2 .t { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.call .acts { display: flex; gap: 4px; align-items: center; }
.calls-empty { padding: 22px 0; color: var(--muted); }
.calls-empty b { color: var(--ink); display: block; margin-bottom: 4px; font-size: 16px; }
.counts { display: flex; flex-direction: column; }
.counts a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; text-decoration: none; border-bottom: 1px solid var(--rule); }
.counts a:hover span { text-decoration: underline; text-underline-offset: 3px; }
.counts b { order: 2; font-size: 30px; font-variant-numeric: tabular-nums; }
.counts span { display: flex; align-items: center; gap: 9px; color: var(--ink-2); font-weight: 700; }
.week { color: var(--ink-2); font-size: 15.5px; padding: 16px 18px; background: var(--tint); border-radius: var(--r); }
.week b { font-weight: 700; color: var(--ink); }

/* ---------- izvoz ---------- */
.xp { max-width: 780px; padding: 34px 40px 64px; display: flex; flex-direction: column; gap: 28px; }
.xp-sub { margin-top: 8px; color: var(--muted); font-size: 16px; }
.xp h3 { font-size: 16px; font-weight: 700; margin-bottom: 10px; }
.xp .hint { margin-top: 8px; font-size: 14px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.opts { display: flex; flex-direction: column; gap: 6px; }
.xp-out { border-radius: 8px; padding: 22px 24px; display: flex; flex-direction: column; gap: 16px; background: var(--tint); }
.xp-out .big { font-size: 52px; }
.xp-out .big small { font-family: var(--font); font-size: 16px; color: var(--muted); font-weight: 400; letter-spacing: 0; margin-left: 10px; }
.xp-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.xp-out .btn:not(.primary) { background: var(--surface); }
.xp-out .btn:not(.primary):hover { background: var(--tint-2); }

/* ---------- plavajoče ---------- */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 15; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 70; max-width: min(540px, calc(100vw - 24px)); background: var(--frame); color: var(--frame-ink); padding: 12px 18px; border-radius: 6px; box-shadow: var(--shadow-pop); font-weight: 700; }
.dlg { border: 0; padding: 0; border-radius: 8px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-pop); width: min(640px, calc(100vw - 24px)); max-height: calc(100dvh - 40px); }
.dlg::backdrop { background: var(--scrim); }
.dlg.narrow { width: min(440px, calc(100vw - 24px)); }
.dlg form { display: flex; flex-direction: column; max-height: calc(100dvh - 40px); }
.dlg-h { padding: 22px 24px 6px; }
.dlg-h h2 { font-size: 32px; }
.dlg-b { padding: 12px 24px 18px; overflow: auto; display: flex; flex-direction: column; gap: 14px; }
.dlg-f { display: flex; gap: 8px; align-items: center; padding: 14px 24px 18px; background: var(--tint); }
.dlg-f .btn.ghost:hover { background: var(--tint-2); }
.tabbar, .only-phone { display: none; }

@media (hover: none) {
  .btn:not(.primary):hover, .chip:not([aria-pressed="true"]):hover, .reach a:hover, .stat-pick button:not([aria-pressed="true"]):hover { background: var(--tint); }
  .iconbtn:hover, .btn.ghost:hover { background: transparent; }
  .row:hover { background: var(--surface); }
}

/* pregled se zloži v en stolpec, ko je ozek (tudi ko je odprt lokal) */
#pg-pregled { container-type: inline-size; }
@container (max-width: 860px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .dash-side { position: static; }
}

/* ---------- telefon ---------- */
@media (max-width: 760px) {
  body { font-size: 16px; }
  :root { --row: 70px; }
  input:not([type=checkbox]), select, textarea { font-size: 16px; min-height: 46px; }
  .app { grid-template-columns: minmax(0, 1fr); height: calc(100dvh - 64px - env(safe-area-inset-bottom)); }
  .side { display: none; }
  .only-phone { display: inline-grid; }
  .hide-phone { display: none; }
  .btn, .btn.sm { min-height: 44px; }
  .iconbtn { width: 44px; height: 44px; }
  .list-top { padding: 16px 14px 12px; gap: 12px; }
  .list-title h1 { font-size: 32px; }
  .filters .search { width: 100%; }
  .filters select { flex: 1 1 30%; max-width: none; font-size: 15px; }
  .lhead { display: none; }
  .row { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; row-gap: 3px; align-content: center; padding: 0 16px; }
  .row .city, .row .cat, .row .cb, .row .ct { display: none; }
  .row .nm { font-size: 16.5px; }
  .row .st { font-size: 14px; }
  .row .sub { display: flex; gap: 8px; grid-column: 1 / span 2; color: var(--muted); font-size: 14.5px; overflow: hidden; }
  .row .sub .t { overflow: hidden; text-overflow: ellipsis; }
  .detail { position: fixed; inset: 0; z-index: 25; width: 100% !important; border: 0; transform: translateY(100%); transition: transform .22s cubic-bezier(.3, .7, .2, 1); }
  .detail.open { transform: none; }
  .d-head { padding: calc(12px + env(safe-area-inset-top)) 10px 16px 8px; align-items: center; }
  .d-head h2 { font-size: 28px; }
  .d-sec { padding: 20px 16px; }
  .reach { grid-template-columns: 1fr; }
  .reach .wide, .reach .none { grid-column: auto; }
  .stat-pick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-pick button { min-height: 52px; }
  .cb-form, .pair { grid-template-columns: 1fr; }
  .chip { min-height: 42px; font-size: 15px; }
  .dash, .xp { padding: 22px 16px 40px; gap: 28px; }
  .page-h { font-size: 38px; }
  .dash-head { flex-direction: column; align-items: stretch; gap: 16px; }
  .dash-theme { display: grid; }
  .call { gap: 10px; }
  .call .l1 span { display: none; }
  .call .acts { gap: 2px; }
  .grid2 { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .toast { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .tabbar {
    display: grid; grid-template-columns: repeat(3, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 22;
    height: calc(64px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--frame);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--frame-muted); font-size: 13px; font-weight: 700; position: relative; }
  .tabbar a:focus-visible { outline-color: var(--frame-ink); outline-offset: -4px; }
  .tabbar .i { width: 24px; height: 24px; }
  .tabbar [aria-current="page"] { color: var(--frame-ink); background: var(--frame-2); }
  .tabbar .badge { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: #e5484d; color: #fff; font-size: 11.5px; font-weight: 700; display: grid; place-items: center; }
  .tabbar .badge:empty { display: none; }
}
