/* ===== design tokens ===== */

:root {
  color-scheme: light;
  /* nevtralne (tople, kamnite) — usklajeno s parcelnik.si */
  --n0: #ffffff;
  --n1: #f2f2ef;
  --n2: #e3e3df;
  --n3: #d3d3cd;
  --n5: #8b8e85;
  --n7: #5c5f57;
  --n9: #1b1c19;
  /* akcent: globoka zelena (kataster/zemljišče) */
  --accent: #0f7a5a;
  --accent-strong: #0b6349;
  --accent-soft: #e7f3ed;
  --on-accent: #ffffff;
  /* semantični */
  --bg: #f7f7f5;
  --surface: var(--n0);
  --surface-2: var(--n1);
  --ink: var(--n9);
  --muted: var(--n7);
  --line: var(--n2);
  --line-strong: var(--n3);
  /* zemljevid — stavbe zelene, parcele jantarne (kot parcelnik.si) */
  --map-par: #c07c1f;
  --map-par-line: #96600f;
  --map-sta: #0f7a5a;
  --map-sta-line: #0b6349;

  --shadow-lg: 0 12px 32px rgba(20, 24, 20, .13), 0 4px 10px rgba(20, 24, 20, .06);
  --r-s: 7px; --r-m: 10px;
  --tr: .13s ease;
}

:root {
  /* kategorčne serije (validirana paleta, svetla; zelena vodi) */
  --s1: #1baf7a; --s2: #2a78d6; --s3: #eda100; --s4: #008300;
  --s5: #4a3aa7; --s6: #e34948; --s7: #e87ba4; --s8: #eb6834;
}

[data-theme="dark"] {
  --s1: #199e70; --s2: #3987e5; --s3: #c98500; --s4: #008300;
  --s5: #9085e9; --s6: #e66767; --s7: #d55181; --s8: #d95926;
}

[data-theme="dark"] {
  color-scheme: dark;
  --n0: #161916;
  --n1: #242923;
  --n2: #2a2f29;
  --n3: #363c35;
  --n5: #6f746a;
  --n7: #a0a69c;
  --n9: #e9ebe6;
  --accent: #27b083;
  --accent-strong: #35c493;
  --accent-soft: #14231d;
  --on-accent: #05130d;
  --bg: #0d0f0d;
  --surface-2: #1c201c;
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, .6), 0 4px 10px rgba(0, 0, 0, .3);
}

/* ===== osnova ===== */

* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-feature-settings: "tnum" 1, "cv05" 1, "ss01" 1;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--bg);
  display: flex; flex-direction: column;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent-soft); }
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }

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

button, select, input { font: inherit; color: inherit; }

/* ===== topbar ===== */

.topbar {
  display: flex; align-items: center; gap: 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 8px 16px;
  z-index: 40;
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 14.5px; letter-spacing: -.2px; }
.brand-mark {
  width: 28px; height: 28px; border-radius: var(--r-s);
  object-fit: contain; display: block;
}
.locked {
  margin: 20px 14px; padding: 20px;
  border: 1px solid var(--line); border-radius: var(--r-m);
  background: var(--surface-2); text-align: center;
}
.locked h3 { font-size: 14px; margin-bottom: 6px; }
.locked p { font-size: 12.5px; color: var(--muted); margin-bottom: 12px; line-height: 1.5; }
.locked .btn { display: inline-block; }
.locked .kvota { font-size: 11.5px; color: var(--muted); margin-top: 10px; }
.quota {
  margin-left: auto;
  font-size: 12px; font-weight: 600; white-space: nowrap;
  padding: 4px 11px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong);
  cursor: default;
}
.quota.low { background: var(--surface-2); color: var(--muted); }
.quota:not(.hidden) + .toplink { margin-left: 0; }

.toplink {
  margin-left: auto;
  font-size: 12.5px; font-weight: 500; color: var(--muted);
  text-decoration: none; white-space: nowrap;
  transition: color var(--tr);
}
.toplink:hover { color: var(--accent); }

.iconbtn {
  border: 1px solid var(--line); background: var(--surface);
  border-radius: var(--r-s);
  width: 30px; height: 30px;
  display: grid; place-items: center;
  cursor: pointer; color: var(--muted);
  transition: color var(--tr), border-color var(--tr), background var(--tr);
}
.iconbtn:hover { color: var(--ink); border-color: var(--line-strong); }
.iconbtn svg { width: 15px; height: 15px; }
.i-moon { display: none; }
[data-theme="dark"] .i-moon { display: block; }
[data-theme="dark"] .i-sun { display: none; }

/* ===== iskalnik ===== */

.searchwrap { position: relative; flex: 1; max-width: 560px; }
.searchbox {
  display: flex; align-items: center; gap: 9px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  padding: 7px 10px;
  transition: border-color var(--tr), background var(--tr), box-shadow var(--tr);
}
.searchbox:focus-within {
  border-color: var(--accent); background: var(--surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent), transparent 65%);
}
.searchbox svg { width: 14px; height: 14px; color: var(--muted); flex: none; }
.searchbox input { flex: 1; border: 0; outline: 0; background: transparent; }
.searchbox input::placeholder { color: var(--muted); }
.searchbox kbd {
  font: 600 10.5px/1 "Inter", sans-serif; color: var(--muted);
  border: 1px solid var(--line-strong); border-radius: 4px;
  padding: 3px 6px;
}
.searchbox:focus-within kbd { display: none; }
#clear { border: 0; background: none; font-size: 17px; color: var(--muted); cursor: pointer; line-height: 1; display: none; padding: 0; }

.results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-m);
  box-shadow: var(--shadow-lg);
  max-height: 62vh; overflow-y: auto;
  z-index: 50;
  padding: 4px;
}
.result {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 8px 10px; cursor: pointer;
  border-radius: var(--r-s);
}
.result:hover, .result.active { background: var(--accent-soft); }
.result .name { font-weight: 500; font-size: 13px; line-height: 1.35; }
.result .name mark { background: none; color: var(--accent); font-weight: 700; }
.result .sub { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.badge {
  flex: none; font-size: 11px; font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 5px; padding: 2px 7px; white-space: nowrap;
}
.badge.none { background: var(--n1); color: var(--muted); font-weight: 500; }
.hidden { display: none !important; }

/* ===== povzetek podjetja ===== */

.summary {
  display: flex; align-items: center; gap: 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 10px 16px;
  z-index: 30;
}
.s-name { min-width: 200px; max-width: 340px; }
.s-name h2 { font-size: 14px; font-weight: 600; line-height: 1.3; letter-spacing: -.1px; }
.s-name p { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.s-stats { display: flex; gap: 26px; flex: 1; }
.kpi span {
  display: block; font-size: 10.5px; font-weight: 500; color: var(--muted);
  text-transform: uppercase; letter-spacing: .5px; margin-bottom: 1px;
}
.kpi b { font-size: 15.5px; font-weight: 600; }
.kpi-val b { color: var(--accent); }
.kpi em { font-style: normal; text-transform: none; letter-spacing: 0; }
.s-actions { display: flex; gap: 8px; }

.btn {
  border: 1px solid transparent; border-radius: var(--r-s);
  padding: 7px 13px;
  background: var(--accent); color: var(--on-accent);
  font-size: 12.5px; font-weight: 600;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background var(--tr), border-color var(--tr);
}
.btn:hover { background: var(--accent-strong); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-2); }

/* ===== postavitev ===== */

.layout { flex: 1; display: flex; min-height: 0; }
.listpane {
  width: 480px; min-width: 320px; max-width: 75vw; flex: none;
  background: var(--surface);
  display: flex; flex-direction: column;
}
.splitter {
  flex: none; width: 9px; margin: 0 -2px; z-index: 20;
  cursor: col-resize;
  background: linear-gradient(to right, transparent 4px, var(--line) 4px, var(--line) 5px, transparent 5px);
  transition: background var(--tr);
}
.splitter:hover, .splitter.drag {
  background: linear-gradient(to right, transparent 3px, var(--accent) 3px, var(--accent) 6px, transparent 6px);
}
body.dragging { cursor: col-resize; user-select: none; }
body.dragging #map { pointer-events: none; }
.mappane { flex: 1; position: relative; min-width: 200px; }
#map { position: absolute; inset: 0; }

/* ===== orodna vrstica ===== */

.toolbar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.seg { display: flex; background: var(--n1); border-radius: var(--r-s); padding: 2px; }
.seg button {
  border: 0; background: none;
  font-size: 12px; font-weight: 500; color: var(--muted);
  padding: 5px 10px; border-radius: 5px; cursor: pointer;
  transition: color var(--tr), background var(--tr);
}
.seg button.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(20, 24, 20, .08); }
#sort {
  margin-left: auto;
  font-size: 12px; font-weight: 500;
  border: 1px solid var(--line); border-radius: var(--r-s);
  padding: 5.5px 6px; background: var(--surface); cursor: pointer;
}
#toggle-all { width: 28px; height: 28px; font-size: 13px; }
#toggle-all.open { transform: rotate(180deg); }

.top-title { font-size: 12.5px; font-weight: 600; }
#top-by, #top-obcina { font-size: 12px; font-weight: 500;
  border: 1px solid var(--line); border-radius: var(--r-s);
  padding: 5.5px 6px; background: var(--surface); cursor: pointer; }
#top-obcina { margin-left: auto; max-width: 190px; cursor: text; }
#top-obcina::placeholder { color: var(--muted); }

/* ===== struktura portfelja (donut) ===== */

.struktura { border-bottom: 1px solid var(--line); }
.str-head {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 14px; cursor: pointer;
}
.str-head:hover { background: var(--surface-2); }
.str-head .car { font-size: 9px; color: var(--muted); width: 10px; transition: transform var(--tr); }
.struktura.open .str-head .car { transform: rotate(90deg); }
.str-head b { font-size: 12.5px; font-weight: 600; }
.str-body { display: none; padding: 2px 14px 12px; }
.struktura.open .str-body { display: block; }
.str-controls { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.str-controls .seg button { padding: 4px 9px; font-size: 11.5px; }
.str-chart { display: flex; gap: 16px; align-items: center; }
.str-chart svg { flex: none; }
.str-chart svg path { transition: opacity var(--tr); cursor: pointer; }
.str-chart svg path.dim { opacity: .35; }
.str-legend { flex: 1; min-width: 0; }
.str-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; padding: 2.5px 0; cursor: default;
}
.str-row i { flex: none; width: 9px; height: 9px; border-radius: 3px; }
.str-row .l { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.str-row .p { color: var(--muted); width: 38px; text-align: right; }
.str-row .v { font-weight: 600; white-space: nowrap; }
.str-row.dim { opacity: .4; }

/* naslovi v iskalniku */
.res-sec { padding: 7px 12px 3px; font-size: 10.5px; font-weight: 600;
  color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.res-back { color: var(--accent); font-weight: 600; font-size: 12.5px;
  padding: 8px 12px; cursor: pointer; }
.res-back:hover { background: var(--accent-soft); border-radius: var(--r-s); }
.pop .pop-owner { color: var(--accent); font-weight: 600; cursor: pointer; }
.pop .pop-owner:hover { text-decoration: underline; }
.pop .pop-sec { margin-top: 6px; font-size: 10.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }

.toprow {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
  transition: background var(--tr);
}
.toprow:hover { background: var(--accent-soft); }
.toprow .rank {
  flex: none; width: 22px;
  font-size: 11.5px; font-weight: 600; color: var(--muted); text-align: right;
}
.toprow .t { flex: 1; min-width: 0; }
.toprow .t b { font-size: 12.5px; font-weight: 500; display: block;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toprow .t span { font-size: 11px; color: var(--muted); }
.toprow .v { font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.toprow .bar {
  position: relative; flex: none; width: 52px; height: 4px;
  background: var(--n1); border-radius: 2px; overflow: hidden;
}
.toprow .bar i { position: absolute; inset: 0; right: auto; background: var(--accent); border-radius: 2px; }

/* ===== seznam ===== */

.list { flex: 1; overflow-y: auto; overscroll-behavior: contain; }

.empty { padding: 44px 30px; color: var(--muted); }
.empty h3 { color: var(--ink); font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.empty p { font-size: 13px; line-height: 1.55; margin-bottom: 12px; max-width: 340px; }
.empty .ex { display: flex; gap: 6px; align-items: center; }
.empty .ex a {
  color: var(--ink); font-weight: 500; cursor: pointer; font-size: 12.5px;
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 4px 12px;
  transition: border-color var(--tr), color var(--tr);
}
.empty .ex a:hover { border-color: var(--accent); color: var(--accent); }

/* skeleton */
.sk { padding: 14px; }
.sk div {
  height: 14px; border-radius: 5px; margin-bottom: 12px;
  background: linear-gradient(90deg, var(--n1) 25%, var(--n2) 50%, var(--n1) 75%);
  background-size: 200% 100%;
  animation: sh 1.1s linear infinite;
}
@keyframes sh { to { background-position: -200% 0; } }

/* skupina = občina */
.grp-head {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 14px 8px;
  cursor: pointer;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 2;
  transition: background var(--tr);
}
.grp-head:hover { background: var(--surface-2); }
.grp-head .car { font-size: 9px; color: var(--muted); width: 10px; transition: transform var(--tr); }
.grp.open .grp-head .car { transform: rotate(90deg); }
.grp-head b { font-size: 13px; font-weight: 600; }
.grp-head .n { font-size: 11.5px; color: var(--muted); font-weight: 400; }
.grp-head .grp-meta { margin-left: auto; text-align: right; }
.grp-head .grp-meta b { font-size: 12.5px; display: block; }
.grp-head .grp-meta span { font-size: 11px; color: var(--muted); }
.grp-bar {
  position: absolute; left: 0; bottom: -1px; height: 2px;
  background: var(--accent); opacity: .65;
}
.grp-body { display: none; border-bottom: 1px solid var(--line); }
.grp.open .grp-body { display: block; }

.sub-label {
  font-size: 10.5px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .6px;
  padding: 12px 14px 4px;
}

/* stavba */
.bld-head {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 14px 8px 20px;
  cursor: pointer;
  transition: background var(--tr);
}
.bld-head:hover { background: var(--accent-soft); }
.bld-head .ico { flex: none; width: 7px; height: 7px; border-radius: 2px; background: var(--map-sta); }
.bld-head .t { flex: 1; min-width: 0; }
.bld-head .t b { font-size: 12.5px; font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bld-head .t span { font-size: 11px; color: var(--muted); }
.bld-head .v { text-align: right; flex: none; font-size: 12.5px; font-weight: 600; }
.bld-head .bld-car { flex: none; font-size: 9px; color: var(--muted); width: 10px; transition: transform var(--tr); }
.bld.open .bld-head .bld-car { transform: rotate(90deg); }
.bld-body { display: none; }
.bld.open .bld-body { display: block; }

.del {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  padding: 4.5px 14px 4.5px 38px;
  font-size: 12px;
  cursor: pointer;
  transition: background var(--tr);
}
.del:hover { background: var(--accent-soft); }
.del .d-t { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.del .d-t span { color: var(--muted); }
.del .d-v { color: var(--muted); white-space: nowrap; }
.del .d-v b { color: var(--ink); font-weight: 500; }

/* parcela */
.par {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 14px 6px 20px;
  cursor: pointer; font-size: 12px;
  transition: background var(--tr);
}
.par:hover { background: var(--accent-soft); }
.par .ico { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--map-par); }
.par .t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.par .t span { color: var(--muted); }
.par .v { white-space: nowrap; color: var(--muted); }
.par .v b { color: var(--ink); font-weight: 500; }

.more { padding: 8px 20px 10px; font-size: 11.5px; color: var(--muted); }

/* ===== zemljevid ===== */

.maplibregl-popup-content {
  font-family: "Inter", sans-serif;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--r-m); box-shadow: var(--shadow-lg);
  padding: 9px 12px;
}
.maplibregl-popup-tip { display: none; }
.pop b { font-size: 12.5px; }
.pop div { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

.legend {
  position: absolute; right: 10px; top: 10px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-s);
  padding: 6px 11px; font-size: 11.5px; color: var(--muted);
  display: flex; gap: 12px;
  z-index: 5;
}
.legend i { display: inline-block; width: 9px; height: 9px; margin-right: 5px; vertical-align: -1px; }
.legend .l-par { background: var(--map-par); border-radius: 50%; }
.legend .l-sta { background: var(--map-sta); border-radius: 2px; }

.map-note {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 12px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; box-shadow: var(--shadow-lg);
  padding: 6px 14px; font-size: 11.5px; color: var(--muted);
  z-index: 6; white-space: nowrap;
}

.home-stats {
  padding: 14px; border-top: 1px solid var(--line);
  font-size: 11.5px; color: var(--muted); line-height: 1.6;
}
.home-stats b { color: var(--ink); font-weight: 600; }

.loadmore {
  display: block; width: calc(100% - 28px); margin: 8px 14px 12px;
  border: 1px solid var(--line); border-radius: var(--r-s);
  background: var(--surface); color: var(--ink);
  font: inherit; font-size: 12px; font-weight: 600;
  padding: 7px; cursor: pointer;
}
.loadmore:hover { background: var(--surface-2); }

/* ===== detajl nepremičnine ===== */

.detail {
  position: absolute; right: 10px; top: 46px; bottom: 10px;
  width: 330px; max-width: calc(100% - 20px);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-m); box-shadow: var(--shadow-lg);
  z-index: 6; overflow-y: auto;
}
.detail-head {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 12px 14px 8px;
  position: sticky; top: 0; background: var(--surface);
}
.detail-head b { font-size: 13.5px; flex: 1; line-height: 1.3; }
.detail-head p { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.detail-close {
  border: 0; background: none; color: var(--muted); cursor: pointer;
  font-size: 17px; line-height: 1; padding: 0 2px; flex: none;
}
.detail-close:hover { color: var(--ink); }
.detail-val {
  margin: 4px 14px 10px; padding: 10px 12px;
  background: var(--accent-soft); border-radius: var(--r-s);
}
.detail-val span { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.detail-val b { display: block; font-size: 17px; color: var(--accent); }
.attrs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 7px 12px;
  padding: 2px 14px 12px;
}
.attrs div span { display: block; font-size: 10.5px; color: var(--muted); }
.attrs div b { font-size: 12.5px; font-weight: 500; }
.detail .sub-label { padding: 10px 14px 4px; border-top: 1px solid var(--line); }
.etn-tabs { display: flex; gap: 6px; padding: 8px 14px 4px; }
.etn-tab {
  flex: 1; padding: 5px 10px;
  font-size: 11.5px; font-weight: 600; color: var(--muted);
  background: none; border: 1px solid var(--line); border-radius: 6px;
  cursor: pointer; transition: background var(--tr), color var(--tr), border-color var(--tr);
}
.etn-tab:hover { background: var(--accent-soft); }
.etn-tab.active { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.etn-row {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 6px 14px; font-size: 12px;
  border-bottom: 1px solid color-mix(in oklch, var(--line), transparent 45%);
}
.etn-row .t span { color: var(--muted); }
.etn-row .v { white-space: nowrap; text-align: right; }
.etn-row .v b { font-weight: 600; }
.etn-row .v small { display: block; font-size: 10.5px; color: var(--muted); }
.etn-note { padding: 8px 14px 12px; font-size: 10.5px; color: var(--muted); line-height: 1.5; }
.tag { font-size: 10px; background: var(--n1); color: var(--muted); border-radius: 4px; padding: 1px 5px; }

@keyframes flash { 0%, 60% { background: var(--accent-soft); } 100% { background: transparent; } }
.flash { animation: flash 1.6s ease; }

@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .splitter { display: none; }
  .listpane { width: 100% !important; min-width: 0; max-width: none; height: 55%; order: 2; border-top: 1px solid var(--line); }
  .mappane { order: 1; }
  .s-stats { flex-wrap: wrap; gap: 12px; }
  .searchbox kbd { display: none; }
}

/* dve toplink povezavi: auto margin samo na prvi */
.toplink + .toplink { margin-left: 0; }

/* ===== kompaktni povzetek podjetja na ozkih zaslonih ===== */
@media (max-width: 1100px) {
  .summary { flex-direction: column; align-items: stretch; gap: 7px; padding: 8px 12px; }
  .s-name { max-width: none; min-width: 0; display: flex; align-items: baseline; gap: 8px; }
  .s-name h2 { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .s-name p { flex: none; margin-top: 0; white-space: nowrap; }
  .s-stats { flex-wrap: nowrap; gap: 18px; overflow-x: auto; scrollbar-width: none; }
  .s-stats::-webkit-scrollbar { display: none; }
  .kpi { flex: none; display: flex; align-items: baseline; gap: 6px; }
  .kpi span { font-size: 10px; white-space: nowrap; margin-bottom: 0; }
  .kpi b { font-size: 12.5px; white-space: nowrap; }
  .kpi em { display: none; }
  .s-actions { overflow-x: auto; scrollbar-width: none; }
  .s-actions::-webkit-scrollbar { display: none; }
  .s-actions .btn { padding: 5px 10px; font-size: 12px; flex: none; }
  .s-actions .iconbtn { flex: none; }
}
