/* Track Mobile — barve in pisave track.si */
:root {
  --brand: #4a7c2f;      /* besedilo, gumbi */
  --brand-dk: #3a6324;
  --mark: #88be41;       /* limeta iz logotipa, samo grafika */
  --band: #eaf1e0;
  --bg: #f4f7f2;
  --ink: #1b2414;
  --muted: #5a6650;
  --line: #e2e9da;
  --line2: #d3dccb;
  --err: #b3261e;
  /* stanja = barve ikone vozila (ageColors v app.js) */
  --st-moving: #27ae60;
  --st-stopped: #e74c3c;
  --st-old: #333;
  --st-offline: #999;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
:root { color-scheme: only light; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font-family: Lato, "Segoe UI", sans-serif; font-size: 16px;
  -webkit-text-size-adjust: 100%;
}
[hidden] { display: none !important; }
h1 { font-family: "Roboto Condensed", sans-serif; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
button { font: inherit; cursor: pointer; }

/* ---------- prijava ---------- */
.login {
  min-height: 100%; display: flex; flex-direction: column; align-items: center;
  padding: max(48px, env(safe-area-inset-top)) 20px calc(24px + var(--safe-b));
}
.login-box { width: 100%; max-width: 380px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.login-logo { width: 220px; height: auto; }
.login-mark { width: 48px; height: 4px; border-radius: 2px; background: var(--mark); }
.login h1 { margin: 6px 0 0; font-size: 30px; }
.login p { margin: 0; }
#loginForm { width: 100%; display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
#loginForm label { font-size: 14px; font-weight: 700; margin-top: 8px; }
#loginForm input[type=text], #loginForm input[type=password] {
  height: 52px; border-radius: 12px; border: 1px solid var(--line2); background: #fff;
  padding: 0 14px; font: inherit; font-size: 17px; color: var(--ink);
}
#loginForm input:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
#loginForm .check { display: flex; align-items: center; gap: 10px; font-weight: 400; font-size: 16px; min-height: 44px; }
#loginForm .check input { width: 22px; height: 22px; accent-color: var(--brand); }
.btn-primary {
  height: 54px; border: 0; border-radius: 14px; background: var(--brand); color: #fff;
  font-weight: 700; font-size: 18px; margin-top: 6px;
}
.btn-primary:hover { background: var(--brand-dk); }
.btn-primary:disabled { opacity: .6; cursor: wait; }
.err { color: var(--err); font-weight: 700; margin: 4px 0 0; }
.login-foot { margin-top: auto; padding-top: 24px; font-size: 14px; }

/* ---------- aplikacija ---------- */
.app { height: 100%; display: flex; flex-direction: column; }
.shell { flex: 1; min-height: 0; display: flex; }
.views { flex: 1; min-width: 0; min-height: 0; position: relative; display: flex; }
.view { flex: 1; min-width: 0; min-height: 0; }

/* ---------- navigacija: računalnik = levi trak ---------- */
.nav {
  width: 88px; flex: none; display: flex; flex-direction: column; align-items: stretch; gap: 4px;
  padding: 12px 6px; background: #fff; border-right: 1px solid var(--line); z-index: 1001;
}
.nav-it {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 0;
  color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 700; border-radius: 12px;
  -webkit-tap-highlight-color: transparent;
}
.nav-ic {
  width: 56px; height: 32px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  transition: background .15s ease, color .15s ease;
}
.nav-it:hover .nav-ic { background: var(--bg); }
.nav-it[aria-current=page] { color: var(--ink); }
.nav-it[aria-current=page] .nav-ic { background: var(--band); color: var(--brand-dk); }
.nav-it:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- strani (Vozila, Zgodovina, Dogodki, Več) ---------- */
.page { overflow-y: auto; background: var(--bg); }
.page-in { max-width: 1100px; margin: 0 auto; padding: 20px 16px 32px; display: flex; flex-direction: column; gap: 12px; }
.page-in.narrow { max-width: 560px; }
.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.page-head h1 { margin: 0; font-size: 28px; }
.page .search { background: #fff; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.vcard { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.vcard-h { display: grid; grid-template-columns: 40px minmax(0,1fr) auto; gap: 10px; align-items: center; }
.vcard-h .ico svg { width: 40px; height: 40px; display: block; }
.vcard-h b { font-size: 17px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; color: #fff; background: var(--c); white-space: nowrap; }
.vcard-g { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; font-size: 14px; }
.vcard-g span { color: var(--muted); display: block; font-size: 12px; }
.vcard-g .wide { grid-column: 1 / -1; }
.vcard-a { display: flex; gap: 8px; }
.btn-sec {
  flex: 1; min-height: 44px; border-radius: 12px; border: 1px solid var(--line2); background: #fff; color: var(--ink);
  font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
}
.btn-sec:hover { background: var(--band); }

/* ---------- Zgodovina ---------- */
.hist { display: flex; position: relative; }
.hpanel { width: 380px; flex: none; display: flex; flex-direction: column; background: #fff; border-right: 1px solid var(--line); min-height: 0; }
.hctl { padding: 12px; display: flex; flex-direction: column; gap: 8px; border-bottom: 1px solid var(--line); }
.hctl select, .hday input {
  height: 44px; border-radius: 12px; border: 1px solid var(--line2); background: #fff; padding: 0 10px;
  font: inherit; font-size: 16px; color: var(--ink); min-width: 0;
}
.hctl select:focus, .hday input:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.hday { display: flex; align-items: center; gap: 4px; }
.hday input { flex: 1; text-align: center; font-weight: 700; }
.hday .icon-btn { border: 1px solid var(--line2); }
.hday .icon-btn:disabled { opacity: .35; cursor: default; }
.htabs { display: flex; padding: 0 12px; gap: 4px; border-bottom: 1px solid var(--line); }
.htabs button { flex: 1; min-height: 44px; border: 0; background: none; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; }
.htabs button[aria-selected=true] { color: var(--ink); border-bottom-color: var(--brand); }
.htabs .n { font-weight: 400; }
.hbody { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; }
.hgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hstat { background: var(--bg); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.hstat span { font-size: 12px; color: var(--muted); }
.hstat b { font-size: 18px; font-variant-numeric: tabular-nums; }
.hstat.wide { grid-column: 1 / -1; }
.hempty { padding: 24px 8px; text-align: center; color: var(--muted); }
.hleg { display: flex; align-items: center; color: var(--muted); font-size: 13px; padding: 0 0 0 20px; min-height: 26px; }
.hleg::before { content: ""; width: 2px; align-self: stretch; background: #5b8dd9; border-radius: 1px; margin-right: 14px; }
.hstop { width: 100%; text-align: left; border: 1px solid transparent; background: none; border-radius: 12px; padding: 8px; display: grid; grid-template-columns: 28px minmax(0,1fr); gap: 2px 10px; color: var(--ink); }
.hstop:hover { background: var(--bg); }
.hstop.sel { background: var(--band); border-color: #c9dcb4; }
.hstop .no { grid-row: 1 / span 2; width: 26px; height: 26px; border-radius: 50%; color: #fff; font-weight: 700; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.hstop .tt { font-weight: 700; font-variant-numeric: tabular-nums; }
.hstop .pl { font-size: 14px; color: var(--muted); }
.hmapwrap { flex: 1; min-width: 0; position: relative; display: flex; }
.hmsg { position: absolute; z-index: 1001; left: 50%; top: 16px; transform: translateX(-50%); background: #fff; padding: 10px 16px; border-radius: 12px; box-shadow: 0 1px 6px rgba(0,0,0,.2); font-weight: 700; max-width: calc(100% - 32px); text-align: center; }
.hplay {
  position: absolute; z-index: 1001; left: 12px; right: 12px; bottom: 12px; max-width: 560px; margin: 0 auto;
  background: #fff; border-radius: 16px; box-shadow: 0 2px 10px rgba(0,0,0,.2); padding: 6px 10px; display: flex; align-items: center; gap: 10px;
}
.hplay-btn { width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; }
.hplay input[type=range] { flex: 1; min-width: 0; accent-color: var(--brand); }
.htime { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 64px; text-align: center; }
.hplay select { height: 36px; border-radius: 10px; border: 1px solid var(--line2); background: #fff; font: inherit; font-size: 14px; }

.hrep { padding: 8px 12px; border-top: 1px solid var(--line); }
.hrep .btn-sec { width: 100%; }

/* ---------- Poročila ---------- */
.rep-ctl { padding: 14px; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px 12px; align-items: end; }
.rep-ctl label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; color: var(--muted); }
.rep-ctl select, .rep-ctl input { height: 44px; border-radius: 12px; border: 1px solid var(--line2); background: #fff; padding: 0 10px; font: inherit; font-size: 16px; color: var(--ink); min-width: 0; }
.rep-ctl select:focus, .rep-ctl input:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.rep-quick { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.rep-act { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.rep-act .btn-primary { height: 44px; margin: 0; padding: 0 22px; font-size: 16px; }
.rep-act .btn-sec { flex: 0 1 auto; padding: 0 14px; }
.btn-sec:disabled { opacity: .45; cursor: default; }
.link-row { color: var(--ink); text-decoration: none; }
.link-row:hover { background: var(--bg); }

.rep { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.rep:empty { display: none; }
.rep-h { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; border-bottom: 2px solid var(--mark); padding-bottom: 12px; margin-bottom: 8px; }
.rep-h img { width: 140px; height: auto; }
.rep-h h2 { margin: 0 0 4px; font: 700 22px "Roboto Condensed", sans-serif; }
.rep-h .meta { font-size: 14px; line-height: 1.5; }
.rep-h .acc { text-align: right; font-size: 13px; color: var(--muted); }
.rep-g { margin-top: 18px; break-inside: avoid-page; }
.rep-g h3 { margin: 0 0 6px; font: 700 16px Lato, sans-serif; }
.rep-tw { overflow-x: auto; }
.rep table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 760px; }
.rep th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 700; padding: 6px 8px; border-bottom: 1px solid var(--line2); white-space: nowrap; }
.rep td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.rep td.n, .rep th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rep td.t { font-variant-numeric: tabular-nums; white-space: nowrap; }
.rep td .poi { display: block; color: var(--brand-dk); font-size: 12px; font-weight: 700; }
.rep tr.sum td { font-weight: 700; background: var(--bg); border-bottom: 0; }
.rep .tot { margin-top: 18px; padding: 12px; border-radius: 12px; background: var(--band); display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 15px; }
.rep .tot b { font-variant-numeric: tabular-nums; }
.rep .empty { padding: 16px 0; }

.soon { background: #fff; border: 1px dashed var(--line2); border-radius: 16px; padding: 32px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.soon-ic { width: 64px; height: 64px; border-radius: 50%; background: var(--band); color: var(--brand-dk); display: flex; align-items: center; justify-content: center; }
.soon h2 { margin: 6px 0 0; font: 700 20px "Roboto Condensed", sans-serif; }
.soon p { margin: 0; color: var(--muted); max-width: 420px; }

.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.acc { display: flex; align-items: center; gap: 14px; padding: 14px; }
.acc-av { width: 48px; height: 48px; border-radius: 50%; background: var(--band); color: var(--brand-dk); font-weight: 700; font-size: 18px; display: flex; align-items: center; justify-content: center; flex: none; }
.sec { margin: 10px 4px 0; font: 700 13px Lato, sans-serif; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.set { overflow: hidden; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; min-height: 56px; }
.set-row.acc { justify-content: flex-start; }
.refresh-btn { flex: none; display: flex; align-items: center; gap: 6px; padding: 0 14px; }
.info-logo img { width: 110px; height: auto; }
.set-row + .set-row { border-top: 1px solid var(--line); }
.set-row > span { display: flex; flex-direction: column; gap: 2px; }
label.set-row { cursor: pointer; }
.set-select { height: 40px; border-radius: 10px; border: 1px solid var(--line2); background: #fff; padding: 0 8px; font: inherit; font-size: 16px; color: var(--ink); flex: none; }
.set-select:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.switch {
  appearance: none; -webkit-appearance: none; width: 48px; height: 28px; border-radius: 14px; background: var(--line2);
  position: relative; cursor: pointer; flex: none; transition: background .15s ease; margin: 0;
}
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: left .15s ease; }
.switch:checked { background: var(--brand); }
.switch:checked::after { left: 23px; }
.switch:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.btn-out {
  min-height: 52px; border-radius: 14px; border: 1px solid #e6c4c1; background: #fff; color: var(--err);
  font-weight: 700; font-size: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 8px;
}
.btn-out:hover { background: #fbeeed; }
.icon-btn {
  width: 44px; height: 44px; flex: none; border: 0; border-radius: 12px; background: transparent;
  color: var(--ink); display: flex; align-items: center; justify-content: center;
}
.icon-btn:hover { background: var(--band); }
.spin svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.body { flex: 1; min-height: 0; position: relative; display: flex; }

/* brez zgornjega menija: kontrole karte in strani pod izrezom zaslona */
.shell { padding-top: env(safe-area-inset-top, 0px); }
.map { flex: 1; min-width: 0; background: #e9ede4; }

/* seznam: namizje = levi stolpec */
.panel { width: 380px; flex: none; display: flex; flex-direction: column; background: #fff;
  border-right: 1px solid var(--line); min-height: 0; }
.sheet-handle { display: none; }
.panel-head { padding: 12px 12px 8px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--line); }
.search { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px;
  border: 1px solid var(--line2); border-radius: 12px; color: var(--muted); background: #fff; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 16px; color: var(--ink); background: transparent; }
.search:focus-within { outline: 2px solid var(--brand); outline-offset: 1px; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line2);
  background: #fff; color: var(--ink); font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.chip[aria-pressed=true] { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip .n { font-weight: 400; opacity: .8; }

.list { list-style: none; margin: 0; padding: 6px; overflow-y: auto; flex: 1; min-height: 0; }
.veh { width: 100%; text-align: left; border: 1px solid transparent; background: transparent; border-radius: 12px;
  padding: 10px; display: grid; grid-template-columns: 32px minmax(0,1fr) auto; gap: 4px 10px; align-items: center; color: var(--ink); }
.veh:hover { background: var(--bg); }
.veh.sel { background: var(--band); border-color: #c9dcb4; }
.veh .ico { grid-row: 1 / span 2; width: 32px; height: 32px; }
.veh .ico svg { width: 32px; height: 32px; display: block; }
.veh .nm { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.veh .st { font-size: 14px; font-weight: 700; text-align: right; white-space: nowrap; }
.veh .pl { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.veh .tm { font-size: 13px; color: var(--muted); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.empty { padding: 24px 12px; text-align: center; color: var(--muted); }

.st-moving { --c: var(--st-moving); }
.st-old { --c: var(--st-old); }
.st-stopped { --c: var(--st-stopped); }
.st-offline { --c: var(--st-offline); }
.veh .st { color: #fff; background: var(--c); padding: 2px 10px; border-radius: 999px; justify-self: end; font-size: 13px; }
/* ikone na karti in gruče: icons.js (Klasik) */
.leaflet-popup-content { font: 14px/1.4 Lato, sans-serif; margin: 12px 14px; min-width: 200px; }
.pp h3 { margin: 0 0 4px; font: 700 17px/1.2 "Roboto Condensed", sans-serif; }
.pp .row { display: flex; justify-content: space-between; gap: 12px; }
.pp .row span:first-child { color: var(--muted); }
.pp .badge { display: inline-block; padding: 2px 10px; border-radius: 999px; color: #fff; background: var(--c); font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.pp a { color: var(--brand); font-weight: 700; }

.toast { position: fixed; left: 50%; bottom: calc(20px + var(--safe-b)); transform: translateX(-50%); z-index: 3000;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 15px; max-width: calc(100% - 32px); }

/* ---------- telefon: seznam je spodnji list ---------- */
@media (max-width: 899px) {
  /* spodnja navigacijska vrstica */
  .shell { flex-direction: column; }
  .nav {
    order: 2; width: auto; flex-direction: row; justify-content: space-around; gap: 0;
    padding: 6px 4px calc(6px + var(--safe-b)); border-right: 0; border-top: 1px solid var(--line);
    box-shadow: 0 -2px 10px rgba(0,0,0,.04);
  }
  .nav-it { flex: 1; padding: 4px 0; font-size: 12px; }
  .nav-ic { width: 52px; }
  .page-in { padding: 16px 12px 24px; }
  .page-head h1 { font-size: 24px; }
  .cards { grid-template-columns: 1fr; }
  .toast { bottom: calc(84px + var(--safe-b)); }
  .rep-ctl { grid-template-columns: 1fr 1fr; }
  .rep-ctl label:first-child { grid-column: 1 / -1; }
  .rep { padding: 12px; }
  .rep-h .acc { text-align: left; }
  .hist { flex-direction: column; }
  .hpanel { order: 2; width: auto; height: 42%; border-right: 0; border-top: 1px solid var(--line); }
  .hctl { flex-direction: row; padding: 8px; }
  .hctl select { flex: 1; }
  .hday { flex: none; }
  .hday input { width: 136px; flex: none; font-size: 15px; }
  .hday .icon-btn { width: 40px; height: 40px; }
  .hmapwrap { min-height: 0; }
  .hplay { left: 8px; right: 8px; bottom: 8px; }
  .panel {
    position: absolute; left: 0; right: 0; bottom: 0; width: auto; z-index: 1001;
    height: 42%; border-right: 0; border-radius: 18px 18px 0 0;
    box-shadow: 0 -4px 18px rgba(0,0,0,.15);
    transition: height .2s ease;
  }
  .panel.full { height: calc(100% - 12px); }
  .panel.min { height: 132px; }
  .sheet-handle { display: flex; justify-content: center; align-items: center; height: 22px; border: 0; background: transparent; flex: none; }
  .sheet-handle span { width: 44px; height: 5px; border-radius: 3px; background: var(--line2); }
  .panel-head { padding-top: 2px; }
  .map { padding-bottom: 0; }
}

/* ---------- tisk / PDF: samo poročilo ---------- */
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  html, body { height: auto; background: #fff; }
  .nav, .no-print, .toast { display: none !important; }
  .app, .shell, .views, .view, .page { display: block !important; height: auto !important; overflow: visible !important; background: #fff; }
  .view[hidden] { display: none !important; }
  .page-in { max-width: none; padding: 0; }
  .rep { border: 0; padding: 0; }
  .rep-tw { overflow: visible; }
  .rep table { min-width: 0; font-size: 9.5pt; }
  .rep th { font-size: 8.5pt; }
  .rep td, .rep th { padding: 3px 5px; }
  .rep tr.sum td, .rep .tot { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .rep-g h3 { break-after: avoid; }
  .rep tr { break-inside: avoid; }
}

/* ---------- Nastavitve naprave ---------- */
.dev-pick { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.dev-pick select, .fld input, .chan .num input, .cnt-add input {
  height: 44px; border-radius: 12px; border: 1px solid var(--line2); background: #fff; padding: 0 10px;
  font: inherit; font-size: 16px; color: var(--ink); min-width: 0;
}
.dev-pick select:focus, .fld input:focus, .chan input:focus, .cnt-add input:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.dev-ro { margin: 8px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--band); color: var(--brand-dk); font-size: 14px; }
.fld { display: flex; flex-direction: column; gap: 4px; padding: 10px 14px; font-size: 13px; font-weight: 700; color: var(--muted); }
.fld + .fld { border-top: 1px solid var(--line); }
.fld small { font-weight: 400; }
.fld input:disabled, .chan input:disabled { background: var(--bg); color: var(--muted); }
.alr + .alr, .alr + .set-row { border-top: 1px solid var(--line); }
.chan { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 0 14px 12px; transition: opacity .15s ease; }
.chan.off { opacity: .45; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; cursor: pointer; min-height: 32px; }
.chk input { width: 20px; height: 20px; accent-color: var(--brand); margin: 0; }
.chan .num { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; }
.chan .num input { width: 88px; height: 40px; }
.dev-save {
  display: flex; align-items: center; gap: 12px;
  margin-top: 12px; padding: 10px 12px; border-radius: 16px; background: rgba(244, 247, 242, .94); border: 1px solid var(--line);
}
.dev-save.dirty { position: sticky; bottom: 8px; z-index: 5; box-shadow: 0 4px 16px rgba(0,0,0,.12); background: #fff; }
.dev-save .btn-primary { height: 46px; margin: 0; padding: 0 28px; font-size: 16px; width: auto; }
.dev-save .btn-primary:disabled { opacity: .5; cursor: default; }
.cnt-add { display: grid; grid-template-columns: 1.3fr 1fr 1fr auto; gap: 8px; align-items: end; padding: 12px 14px; }
.cnt-add label { min-width: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; color: var(--muted); }
.cnt-add input { width: 100%; }
.cnt-add .btn-sec { height: 44px; padding: 0 14px; }
.cnt-list { list-style: none; margin: 0; padding: 0; }
.cnt-list li { display: grid; grid-template-columns: 1.3fr 1fr 1fr 40px; gap: 8px; align-items: center; padding: 8px 14px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; min-height: 48px; }
.cnt-list li.muted { display: block; padding: 14px; }
.cnt-list .icon-btn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line2); background: #fff; color: var(--err); display: flex; align-items: center; justify-content: center; cursor: pointer; }
@media (max-width: 420px) {
  .cnt-add { grid-template-columns: 1fr 1fr; }
  .cnt-add label:first-child { grid-column: 1 / -1; }
  .cnt-add .btn-sec { grid-column: 1 / -1; }
}
.cmd-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; padding: 12px 14px; }
.cmd-row + .cmd-row { border-top: 1px solid var(--line); }
.cmd-row .cmd-h { flex: 1 1 100%; display: flex; align-items: center; gap: 8px; }
.cmd-row .cmd-h .badge { font-size: 12px; padding: 2px 8px; border-radius: 10px; background: var(--band); color: var(--brand-dk); text-transform: uppercase; }
.cmd-row label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; color: var(--muted); flex: 1 1 140px; min-width: 0; }
.cmd-row input { height: 44px; border-radius: 12px; border: 1px solid var(--line2); background: #fff; padding: 0 10px; font: inherit; font-size: 16px; color: var(--ink); width: 100%; }
.cmd-row .btn-cmd { height: 44px; padding: 0 20px; border-radius: 12px; border: 0; background: var(--err); color: #fff; font: inherit; font-weight: 700; cursor: pointer; flex: none; }
.cmd-row .btn-cmd:disabled { opacity: .5; cursor: default; }
.cmd-st .set-row > span { min-width: 0; overflow-wrap: anywhere; }
.icon-pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.icon-pick select { flex: 1 1 160px; height: 44px; border-radius: 12px; border: 1px solid var(--line2); background: #fff; padding: 0 10px; font: inherit; font-size: 16px; color: var(--ink); min-width: 0; }
.icon-pick select:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.icon-prev { display: flex; align-items: center; gap: 4px; padding: 4px 8px; border: 1px solid var(--line2); border-radius: 10px; background: var(--bg); min-height: 44px; }
.icon-prev svg { display: block; }

/* ---------- Alarmi (kot Klasik zavihek Dogodki) ---------- */
.alarms.off { opacity: .55; }
.alarms > .alr + .alr, .alarms > .alr + .set-row, .alarms > .set-row + .alr { border-top: 1px solid var(--line); }
.chan .set-select { height: 40px; }
.chan .num input.sm { width: 64px; }
.ev-btn { height: 40px; padding: 0 14px; flex: none; }
.chan .muted.small { flex: 1 1 120px; }

/* ---------- okna ---------- */
body.modal-open { overflow: hidden; }
.modal { position: fixed; inset: 0; z-index: 3000; background: rgba(20, 28, 14, .45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-box { background: #fff; border-radius: 18px; width: 100%; max-width: 480px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.modal-box.wide { max-width: 640px; }
.modal-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.modal-h h2 { margin: 0; font: 700 19px "Roboto Condensed", sans-serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-b { padding: 14px 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.modal-b p { margin: 0; }
.modal-f { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px calc(12px + var(--safe-b)); border-top: 1px solid var(--line); flex-wrap: wrap; }
.modal-f .btn-primary, .geo-form-a .btn-primary { width: auto; height: 44px; margin: 0; padding: 0 20px; font-size: 16px; }
.modal-f .btn-sec, .geo-form-a .btn-sec { height: 44px; padding: 0 16px; }
@media (max-width: 560px) {
  .modal { padding: 0; align-items: flex-end; }
  .modal-box, .modal-box.wide { max-width: none; max-height: 92vh; border-radius: 18px 18px 0 0; }
}

.tt-rows { display: flex; flex-direction: column; }
.tt-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.tt-row:first-child { border-top: 0; }
.tt-row.off .tt-int { opacity: .4; }
.tt-day { width: 72px; font-weight: 700; }
.tt-int { display: inline-flex; align-items: center; gap: 4px; }
.tt-int input { height: 40px; border-radius: 10px; border: 1px solid var(--line2); padding: 0 6px; font: inherit; font-size: 15px; width: 96px; background: #fff; }
.tt-rep { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--line); font-size: 15px; }
.tt-rep input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--brand); margin: 0; }
.tt-rep input[type=number] { width: 80px; height: 40px; border-radius: 10px; border: 1px solid var(--line2); padding: 0 8px; font: inherit; font-size: 16px; }

.geo-map { height: 240px; border-radius: 12px; border: 1px solid var(--line); flex: none; }
.geo-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.geo-list li { display: flex; align-items: center; gap: 6px; padding: 4px 6px 4px 0; }
.geo-list li + li { border-top: 1px solid var(--line); }
.geo-list li.sel { background: var(--band); }
.geo-list .empty-li { padding: 14px; display: block; }
.geo-it { flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 8px 12px; font: inherit; color: var(--ink); display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.geo-list .icon-btn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line2); background: #fff; flex: none; font-size: 16px; cursor: pointer; }
.geo-list .icon-btn.del { color: var(--err); }
.geo-form { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.fld0 { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; color: var(--muted); }
.fld0 input, .fld0 select { height: 44px; border-radius: 12px; border: 1px solid var(--line2); background: #fff; padding: 0 10px; font: inherit; font-size: 16px; color: var(--ink); min-width: 0; }
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg label { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid var(--line2); border-radius: 10px; background: #fff; cursor: pointer; font-size: 15px; }
.seg input { accent-color: var(--brand); margin: 0; }
.geo-form-a { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.toast { z-index: 4000; }
.dev-veh { margin: -4px 0 4px; font: 700 18px Lato, sans-serif; color: var(--brand-dk); }
.hveh { font: 700 13px Lato, sans-serif; color: var(--brand-dk); line-height: 1.25; padding: 2px 0; flex: 1; min-width: 0; overflow: hidden; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }  /* celo ime v največ dveh vrsticah */
.hveh.none { color: var(--muted); font-weight: 400; }
/* ---------- koledar zgodovine ---------- */
.hdate-btn { flex: 1; height: 44px; border-radius: 12px; border: 1px solid var(--line2); background: #fff; font: inherit; font-weight: 700; font-size: 15px; color: var(--ink); cursor: pointer; padding: 0 10px; white-space: nowrap; }
.hdate-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.cal-box { max-width: 380px; }
.cal-h h2 { flex: 1; text-align: center; text-transform: capitalize; }
.cal-h .icon-btn { width: 40px; height: 40px; border: 1px solid var(--line2); border-radius: 10px; font-size: 22px; background: #fff; }
.cal-h .icon-btn:disabled { opacity: .35; }
.cal-wd, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-wd span { font-size: 12px; font-weight: 700; color: var(--muted); }
.cal-grid button { position: relative; aspect-ratio: 1; min-height: 40px; border-radius: 10px; border: 1px solid transparent; background: none; font: inherit; font-size: 15px; color: var(--ink); cursor: pointer; }
.cal-grid button.drive { background: var(--band); color: var(--brand-dk); font-weight: 700; }
.cal-grid button.drive::after { content: ""; position: absolute; left: 50%; bottom: 5px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--mark); }
.cal-grid button.today { border-color: var(--brand); }
.cal-grid button.sel { background: var(--brand); color: #fff; }
.cal-grid button.sel::after { background: #fff; }
.cal-grid button:disabled { color: var(--line2); cursor: default; background: none; }
.cal-grid .pad { visibility: hidden; }
.cal-leg { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cal-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--mark); display: inline-block; }
/* ---------- meni zgodovine ---------- */
.hmenu-w { position: relative; flex: none; align-self: flex-end; }
.hmenu-btn { border: 1px solid var(--line2); width: 44px; height: 44px; }
.hmenu-btn[aria-expanded=true] { background: var(--band); }
.hmenu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 1200; width: 270px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 28px rgba(0,0,0,.18); overflow: hidden; }
.hmenu button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; min-height: 56px; background: none; border: 0; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.hmenu button + button { border-top: 1px solid var(--line); }
.hmenu button:hover { background: var(--bg); }
.hmenu button > span:first-child { display: flex; flex-direction: column; gap: 2px; }
.mini-sw { width: 40px; height: 24px; border-radius: 12px; background: var(--line2); position: relative; flex: none; transition: background .15s ease; }
.mini-sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: left .15s ease; }
[aria-checked=true] .mini-sw { background: var(--brand); }
[aria-checked=true] .mini-sw::after { left: 19px; }
@media (max-width: 767px) { .hmenu-w { align-self: center; } .hmenu { top: auto; bottom: calc(100% + 6px); } }
/* glavni meni brez napisov (Več → Prikaz); napis ostane za bralnike zaslona */
.nav-compact .nav-lb { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nav-compact .nav-it { gap: 0; }
@media (max-width: 767px) {
  .nav-compact .nav { padding: 4px 4px calc(4px + var(--safe-b)); }
  .nav-compact .nav-it { padding: 2px 0; }
  .nav-compact .toast { bottom: calc(64px + var(--safe-b)); }
}
/* ---------- oblaček: gumbi ---------- */
.pp-act { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; }
.pp-act .btn-sec, .pp-act a.btn-sec { height: 38px; padding: 0 8px; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; color: var(--ink); }
.pp-act .btn-sec svg { flex: none; color: var(--brand-dk); }
.pp .place { margin: 6px 0 0; }

/* ---------- okno Info ---------- */
.info-tabs { display: flex; border-bottom: 1px solid var(--line); padding: 0 8px; }
.info-tabs button { flex: 1; height: 44px; background: none; border: 0; border-bottom: 3px solid transparent; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; }
.info-tabs button[aria-selected=true] { color: var(--ink); border-bottom-color: var(--brand); }
.info-grid { display: grid; grid-template-columns: minmax(110px, 40%) 1fr; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.info-grid > * { padding: 8px 12px; border-top: 1px solid var(--line); min-width: 0; overflow-wrap: anywhere; }
.info-grid > :nth-child(-n+2) { border-top: 0; }
.info-grid .k { color: var(--muted); font-size: 14px; background: var(--bg); }
.info-grid .v { font-weight: 700; color: var(--brand-dk); font-variant-numeric: tabular-nums; }
.info-grid .v a { color: var(--brand); }
.info-grid .v .geo-a { display: inline-flex; gap: 10px; margin-left: 8px; font-weight: 700; }
.info-grid .v.na { color: var(--muted); font-weight: 400; }
.mt-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.mt-card + .mt-card { margin-top: 10px; }
.mt-card h3 { margin: 0; font: 700 15px Lato, sans-serif; }
.mt-st { font-weight: 700; }
.mt-st.over { color: var(--err); }
.mt-st.soon { color: #b45309; }
.mt-st.ok { color: var(--brand-dk); }
.mt-note { color: var(--muted); font-style: italic; font-size: 14px; margin: 10px 0 0; }
.info-time { flex-basis: 100%; }
#mInfo .modal-f .btn-sec { flex: 1; }
/* ---------- graf hitrosti v zgodovini ---------- */
.hchart { position: absolute; z-index: 1001; left: 12px; right: 12px; bottom: 12px; max-width: 560px; margin: 0 auto;
  background: rgba(255,255,255,.94); border-radius: 14px; box-shadow: 0 2px 10px rgba(0,0,0,.2); padding: 5px 10px 3px; touch-action: none; }
.hplay:not([hidden]) ~ .hchart { bottom: 72px; }
.hchart-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13px; }
.hchart-h b { font-size: 13px; }
#hChartCur { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--brand-dk); }
#hChartSvg { display: block; width: 100%; height: 48px; margin-top: 2px; cursor: crosshair; }
.hchart-x { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 2px; }
@media (max-width: 767px) { .hchart { left: 8px; right: 8px; bottom: 8px; } .hplay:not([hidden]) ~ .hchart { bottom: 68px; } #hChartSvg { height: 44px; } }
.hchart-r { display: inline-flex; align-items: center; gap: 6px; padding: 1px 2px 1px 8px; border-radius: 999px; background: var(--band); font-size: 12px; font-weight: 700; color: var(--brand-dk); font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 0; overflow: hidden; }
.hchart-r #hChartRangeTx { overflow: hidden; text-overflow: ellipsis; }
#hChartClr { width: 22px; height: 22px; flex: none; border: 0; border-radius: 50%; background: #fff; color: var(--ink); font-size: 12px; line-height: 1; cursor: pointer; }
.hchart.ranged #hChartCur, .hchart.ranged #hChartMax { display: none; }
/* zgodovina brez povzetka in postankov (meni ☰): ostane samo vrstica z vozilom in dnevom, karta je večja */
.hist.hcompact { flex-direction: column; }
.hist.hcompact .htabs, .hist.hcompact .hbody { display: none !important; }
.hist.hcompact .hpanel { order: 2; width: auto; height: auto; border-right: 0; border-top: 1px solid var(--line); }
.hist.hcompact .hctl { border-bottom: 0; }
@media (min-width: 768px) { .hist.hcompact .hctl { flex-direction: row; align-items: center; } }
/* kompaktna zgodovina: meni ☰ je spodaj, zato se odpre navzgor tudi na računalniku */
.hist.hcompact .hmenu { top: auto; bottom: calc(100% + 6px); }
.hchart-h { gap: 8px; }
/* ---------- podatki točke zgodovine ---------- */
.pt-h { gap: 8px; }
.pt-ttl { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pt-ttl h2 { font-size: 17px; font-variant-numeric: tabular-nums; }
.pt-nav { display: flex; gap: 4px; flex: none; }
.pt-nav .icon-btn, .pt-h > .icon-btn { width: 36px; height: 36px; border: 1px solid var(--line2); border-radius: 10px; background: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.pt-nav .icon-btn:disabled { opacity: .35; cursor: default; }
#mPt .info-grid .v { font-size: 15px; }
@media (min-width: 768px) { #mPt { align-items: flex-start; justify-content: flex-end; padding: 16px; pointer-events: none; background: transparent; } #mPt .modal-box { pointer-events: auto; max-width: 400px; max-height: calc(100vh - 32px); } }
/* telefon: okno točke kot nizek spodnji list, da je točka na karti vidna */
@media (max-width: 767px) { #mPt { background: transparent; pointer-events: none; } #mPt .modal-box { pointer-events: auto; max-height: 52vh; box-shadow: 0 -4px 24px rgba(0,0,0,.25); } #mPt .info-grid > * { padding: 5px 10px; } #mPt .info-grid .v, #mPt .info-grid .k { font-size: 14px; } #mPt .modal-b { padding: 10px 12px; } }
/* okno točke: kompaktna mreža v dveh stolpcih */
.pt-grid { display: grid; grid-template-columns: auto 1fr auto 1fr; gap: 2px 8px; font-size: 13px; line-height: 1.3; }
.pt-grid .k { color: var(--muted); white-space: nowrap; }
.pt-grid .v { font-weight: 700; color: var(--brand-dk); font-variant-numeric: tabular-nums; min-width: 0; overflow-wrap: anywhere; }
.pt-grid .v.w { grid-column: span 3; }
.pt-grid .v.na { color: var(--muted); font-weight: 400; }
.pt-grid .geo-a { margin-left: 6px; }
#ptBody.loading { opacity: .6; }
#mPt .modal-b { padding: 8px 12px 10px; }
#mPt .modal-h { padding: 8px 12px; }
@media (min-width: 768px) { #mPt .modal-box { max-width: 380px; } }
@media (max-width: 767px) { #mPt .modal-box { max-height: 40vh; } }
/* okno točke = majhna plavajoča kartica na vrhu karte (ne prekrije spodnjih kontrol) */
#mPt.modal { align-items: flex-start; justify-content: center; padding: 8px; background: transparent; pointer-events: none; }
#mPt .modal-box { pointer-events: auto; width: 100%; max-width: 360px; max-height: 45vh; border-radius: 14px; box-shadow: 0 4px 18px rgba(0,0,0,.25); }
#mPt .modal-h { padding: 6px 8px 6px 12px; border-bottom: 0; }
#mPt .pt-ttl { flex-direction: row; align-items: baseline; gap: 8px; }
#mPt .pt-ttl h2 { font-size: 16px; }
#mPt .pt-nav .icon-btn, #mPt .pt-h > .icon-btn { width: 32px; height: 32px; font-size: 16px; border-radius: 8px; }
#mPt .modal-b { padding: 0 12px 8px; gap: 4px; }
.pt-main { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pt-sp { font-size: 18px; color: var(--brand-dk); }
.pt-pl { font-size: 13px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-more summary { cursor: pointer; font-size: 13px; color: var(--brand); font-weight: 700; padding: 2px 0; }
.pt-more .pt-grid { margin-top: 4px; font-size: 12px; }
body.modal-open:has(#mPt:not([hidden])):not(:has(.modal:not(#mPt):not([hidden]))) { overflow: visible; }
@media (min-width: 768px) { #mPt.modal { justify-content: flex-end; padding: 12px 64px 12px 12px; } }
@media (max-width: 767px) { #mPt .modal-box { max-height: 45vh; border-radius: 14px; } }
.geo-row { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.geo-ib { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line2); border-radius: 8px; background: #fff; color: var(--brand-dk); cursor: pointer; padding: 0; text-decoration: none; }
.geo-ib:hover { background: var(--band); }
/* kartica postanka: enako plavajoča kot kartica točke */
#mSt.modal { align-items: flex-start; justify-content: center; padding: 8px; background: transparent; pointer-events: none; }
#mSt .modal-box { pointer-events: auto; width: 100%; max-width: 360px; max-height: 45vh; border-radius: 14px; box-shadow: 0 4px 18px rgba(0,0,0,.25); }
#mSt .modal-h { padding: 6px 8px 6px 12px; border-bottom: 0; }
#mSt .pt-ttl { flex-direction: row; align-items: baseline; gap: 8px; }
#mSt .pt-ttl h2 { font-size: 16px; }
#mSt .pt-nav .icon-btn, #mSt .pt-h > .icon-btn { width: 32px; height: 32px; font-size: 16px; border-radius: 8px; border: 1px solid var(--line2); background: #fff; cursor: pointer; }
#mSt .pt-nav .icon-btn:disabled { opacity: .35; cursor: default; }
#mSt .modal-b { padding: 0 12px 10px; gap: 6px; }
.st-leg { display: flex; flex-direction: column; gap: 1px; font-size: 13px; }
.st-leg .lb { color: var(--muted); font-size: 12px; }
.st-leg b { font-variant-numeric: tabular-nums; }
.st-leg.go b { color: var(--brand-dk); }
.st-leg.stop b { color: #c0392b; }
.st-leg .pl { font-weight: 700; color: var(--ink); }
.st-drive { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--brand-dk); font-weight: 700; padding: 2px 0 2px 8px; border-left: 3px solid var(--mark); }
.st-no { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; color: #fff; font-size: 12px; font-weight: 700; }
@media (min-width: 768px) { #mSt.modal { justify-content: flex-end; padding: 12px 64px 12px 12px; } }
/* oznake časa pod grafom: postavljene po času (ves dan ali izbrano obdobje) */
.hchart-x { position: relative; height: 14px; display: block; }
.hchart-x span { position: absolute; top: 0; white-space: nowrap; }
.hveh { cursor: pointer; text-decoration: none; }
.hveh.none { cursor: default; text-decoration: none; }
.hveh:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
/* okno Info: približno pol nižje, kompaktnejše vrstice, ostalo se drsa */
#mInfo .modal-box { max-height: 55vh; }
#mInfo .info-grid > * { padding: 5px 10px; }
#mInfo .info-grid .k, #mInfo .info-grid .v { font-size: 14px; }
#mInfo .modal-b { padding: 10px 12px; }
#mInfo .modal-h { padding: 8px 12px; }
#mInfo .info-tabs button { height: 38px; }
#mInfo .modal-f { padding: 8px 12px calc(8px + var(--safe-b)); }
#mInfo .modal-f .btn-sec { height: 38px; }
@media (min-width: 768px) { #mInfo .modal-box { max-height: 60vh; } }
/* gumbi na kartici vozila: dovolj roba okoli besedila, raje v dve vrsti kot stisnjeno */
.vcard-a { display: grid; grid-template-columns: 1fr 1fr; }
.vcard-a .btn-sec { padding: 0 14px; white-space: nowrap; min-width: 0; }
/* ✕ za ponastavitev obdobja: večji in lažje zadet (vidno 30 px, dotik 44 px) */
#hChartClr { position: relative; width: 30px; height: 30px; font-size: 15px; font-weight: 700; background: #fff; border: 1px solid var(--line2); }
#hChartClr::before { content: ""; position: absolute; inset: -7px; }
#hChartClr:hover { background: var(--band); }
.hchart-r { padding: 2px 2px 2px 10px; }.hchart-r { overflow: visible; }  /* sicer odreže povečano območje dotika gumba ✕ */
/* hitro zaporedno tapanje (listanje točk, gumbi) ne sme sprožiti povečave strani z dvojnim tapom */
button, a, [role=button], .modal-box, .hchart, .hplay { touch-action: manipulation; }
/* iPhone: kartici točke in postanka pod statusno vrstico/izrezom (safe area) + malo razmika */
#mPt.modal, #mSt.modal { padding-top: calc(14px + env(safe-area-inset-top, 0px)); }
@media (min-width: 768px) { #mPt.modal, #mSt.modal { padding-top: calc(12px + env(safe-area-inset-top, 0px)); } }
.st-more > .st-leg, .st-more > .st-drive { margin-top: 6px; }
#mSt .modal-b { gap: 4px; }
.list-hint { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--band); color: var(--brand-dk); font-weight: 700; border-left: 4px solid var(--brand); }
/* ✕ v iskalniku vozil (namesto vgrajenega, ki ga ni na vseh telefonih) */
.search input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.search-clr { flex: none; width: 32px; height: 32px; margin-right: -6px; border: 0; border-radius: 50%; background: var(--band); color: var(--brand-dk); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.search-clr:hover { background: var(--line2); }
/* iPhone: ob odprti tipkovnici aplikacija zavzame samo vidni del (visualViewport), stran se ne sme premakniti čez vrh */
html, body { overflow: hidden; overscroll-behavior: none; }
.app { height: var(--app-h, 100%); }
/* karta: okrogel gumb za iskanje pred filtri */
.chips-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.chips-row .chips { flex: 1; min-width: 0; }
.search-open { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line2); background: #fff; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.search-open:hover { background: var(--band); }
/* Vozila: iskalnik in filtri ostanejo na vrhu tudi med drsenjem */
.list-sticky { position: sticky; top: 0; z-index: 20; display: flex; flex-direction: column; gap: 10px; margin: -8px -16px 0; padding: 8px 16px 10px; background: var(--bg); box-shadow: 0 6px 8px -8px rgba(0,0,0,.25); }
@media (max-width: 767px) { .list-sticky { margin: -8px -12px 0; padding: 8px 12px 10px; } }
/* oblaček: trije gumbi (Info, Zgodovina, Nastavitve) v eni vrsti, ikona nad napisom */
.pp-act { grid-template-columns: repeat(3, 1fr); }
.pp-act .btn-sec { flex-direction: column; gap: 2px; height: auto; min-height: 52px; padding: 6px 4px; font-size: 13px; }
/* nastavitve naprave: glava z imenom vozila in ✕ ostane na vrhu med drsenjem */
.dev-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: flex-start; gap: 12px; margin: -20px -16px 0; padding: 14px 16px 10px; background: var(--bg); box-shadow: 0 6px 8px -8px rgba(0,0,0,.25); }
.dev-top-t { flex: 1; min-width: 0; }
.dev-top h1 { margin: 0; font-size: 24px; }
.dev-top .dev-veh { margin: 2px 0 0; overflow-wrap: anywhere; }
.dev-close { flex: none; width: 40px; height: 40px; border: 1px solid var(--line2); border-radius: 12px; background: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.dev-close:hover { background: var(--band); }
@media (max-width: 767px) { .dev-top { margin: -16px -12px 0; padding: 12px 12px 8px; } .dev-top h1 { font-size: 20px; } }
.pt-ex { overflow-wrap: anywhere; }
.pt-ex-b { border: 1px solid var(--line2); background: #fff; color: var(--brand); font: inherit; font-size: 12px; font-weight: 700; border-radius: 8px; padding: 1px 8px; cursor: pointer; }
.pt-grid .k.w { grid-column: 1; }  /* dolga vrednost: oznaka levo, vrednost čez preostanek vrstice */
/* ---------- Dogodki ---------- */
.ev-page { height: 100%; }
.ev-top { position: sticky; top: 0; z-index: 20; display: flex; flex-direction: column; gap: 8px; margin: -20px -16px 0; padding: 14px 16px 10px; background: var(--bg); box-shadow: 0 6px 8px -8px rgba(0,0,0,.25); }
.ev-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ev-head h1 { margin: 0; font-size: 24px; }
.ev-ctl { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.ev-ctl .hday { flex: none; }
.ev-ctl .hday input { width: 150px; height: 40px; border-radius: 12px; border: 1px solid var(--line2); background: #fff; font: inherit; font-weight: 700; text-align: center; padding: 0 6px; }
.ev-ctl .chips { flex: 1; min-width: 0; }
.ev-sep { width: 1px; align-self: stretch; background: var(--line2); flex: none; margin: 4px 2px; }
.ev-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.ev-map { position: sticky; top: 130px; height: calc(100vh - 170px); min-height: 300px; border-radius: 16px; border: 1px solid var(--line); order: 2; }
.ev-listw { order: 1; min-width: 0; }
.ev-list { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.ev-list:empty { display: none; }
.ev-list li + li { border-top: 1px solid var(--line); }
.ev-it { width: 100%; display: grid; grid-template-columns: 12px auto minmax(0, 1fr) auto; gap: 4px 10px; align-items: start; padding: 10px 12px; background: none; border: 0; text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.ev-it:hover { background: var(--bg); }
.ev-it.sel { background: var(--band); }
.ev-dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 4px; }
.ev-tm { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ev-tm small { color: var(--muted); font-weight: 400; }
.ev-tx { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ev-tx b { font-size: 14px; }
.ev-msg { font-size: 14px; overflow-wrap: anywhere; }
.ev-pl { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-k { font-size: 12px; font-weight: 700; white-space: nowrap; }
.ev-more { padding: 10px 12px; display: block; }
@media (max-width: 767px) {
  .ev-top { margin: -16px -12px 0; padding: 12px 12px 8px; }
  .ev-head h1 { font-size: 20px; }
  .ev-body { grid-template-columns: 1fr; }
  .ev-map { position: relative; top: auto; order: 0; height: 200px; min-height: 0; }
  .ev-k { display: none; }
}
@media (max-width: 767px) { .ev-ctl .chips { flex-basis: 100%; } }  /* telefon: filtri v svoji vrstici, vidni v celoti */
/* Android: poteg po grafu mora ostati graf (izbira obdobja), ne pomik strani — manipulation dovoli pan in prekine dotik (pointercancel) */
.hchart, #hChartSvg { touch-action: none; }
/* oznake mej hitrosti (50, 130) levo ob črtkani črti (ponoči običajno ni vožnje) */
.hchart-plot { position: relative; }
.hchart-lim span { position: absolute; left: 2px; transform: translateY(-100%); font-size: 10px; font-weight: 700; line-height: 1.1; padding: 0 3px; border-radius: 3px; background: rgba(255,255,255,.75); pointer-events: none; }
/* nastavitve naprave: registrska in dodatni opis pod razpiralnim naslovom */
.dev-extra { border-top: 1px solid var(--line); }
.dev-extra > summary { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 14px; cursor: pointer; font-size: 14px; font-weight: 700; color: var(--brand); list-style: none; }
.dev-extra > summary::-webkit-details-marker { display: none; }
.dev-extra > summary::before { content: "▸"; color: var(--brand); transition: transform .15s ease; }
.dev-extra[open] > summary::before { transform: rotate(90deg); }
.dev-extra > summary .muted { font-weight: 400; color: var(--muted); }
.dev-extra .fld { border-top: 1px solid var(--line); }
.rep-ctl label.rtype { grid-column: 1 / -1; }
.rep-ctl > * { min-width: 0; }
@media (max-width: 767px) {
  .rep-ctl { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .rep-ctl label.rtype + label { grid-column: 1 / -1; }  /* vozilo čez vso širino, od/do v eni vrstici */
}
/* izbor vozila z iskalnikom (poročila) */
.dpick-w { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dpick-w > label { font-size: 13px; font-weight: 700; color: var(--muted); }
.dpick { position: relative; min-width: 0; }
.dpick-btn { width: 100%; height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border-radius: 12px; border: 1px solid var(--line2); background: #fff; font: inherit; font-size: 16px; color: var(--ink); text-align: left; cursor: pointer; }
.dpick-btn span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dpick-btn svg { flex: none; color: var(--muted); }
.dpick-btn:focus-visible, .dpick-btn[aria-expanded="true"] { outline: 2px solid var(--brand); outline-offset: 1px; }
.dpick-pop { position: absolute; z-index: 50; top: calc(100% + 6px); left: 0; right: 0; min-width: 260px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.dpick-list { list-style: none; margin: 6px 0 0; padding: 0; max-height: min(50vh, 340px); overflow-y: auto; overscroll-behavior: contain; }
.dpick-list li { padding: 9px 10px; border-radius: 10px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; font-size: 15px; color: var(--ink); }
.dpick-list li small { color: var(--muted); white-space: nowrap; }
.dpick-list li.act { background: var(--band); }
.dpick-list li[aria-selected="true"] { font-weight: 700; }
.dpick-list li.none { color: var(--muted); cursor: default; }
@media (max-width: 767px) { .rep-ctl label.rtype + .dpick-w { grid-column: 1 / -1; } }
.rep-ctl .dpick-pop .search input { height: auto; border: 0; border-radius: 0; padding: 0; background: transparent; outline: 0; }
/* meni Izvoz (poročila) */
.rep-act .xmenu-w { align-self: auto; }
.rep-act .xmenu-w .hmenu { left: 0; right: auto; top: calc(100% + 6px); bottom: auto; width: 250px; }
.rep-act #rCsv[aria-expanded="true"] { background: var(--band); }
@media (max-width: 767px) { .rep-act .xmenu-w .hmenu { left: auto; right: 0; max-width: calc(100vw - 32px); } }
/* kartice vozil: kompaktni gumbi z ikono v eni vrstici */
.vcard-a { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.vcard-a .btn-sec { height: auto; min-height: 0; padding: 6px 2px 5px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 12px; font-weight: 700; line-height: 1.15; border-radius: 10px; min-width: 0; }
.vcard-a .btn-sec svg { flex: none; width: 20px; height: 20px; color: var(--brand-dk); }
.vcard-a .btn-sec span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* dogodki: skupina + izbirnik vozila (kot poročila) */
.ev-ctl { display: grid; grid-template-columns: auto 190px minmax(220px, 380px); justify-content: start; align-items: center; gap: 8px 10px; }
.ev-sel { height: 40px; border-radius: 12px; border: 1px solid var(--line2); background: #fff; padding: 0 10px; font: inherit; font-size: 16px; font-weight: 700; color: var(--ink); min-width: 0; }
.ev-sel:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.ev-dpick .dpick-btn { height: 40px; font-weight: 700; }
.ev-dpick .dpick-pop { z-index: 1300; }
.ev-map { z-index: 0; }  /* sloji karte ne smejo prekriti seznama vozil */
@media (max-width: 767px) {
  .ev-ctl { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ev-ctl .hday { grid-column: 1 / -1; }  /* obdobje zgoraj, spodaj skupina in vozilo vsak pol vrstice */
}
/* števci: zadnji vnosi, nov vnos na gumb */
.cnt-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; }
.cnt-new { height: 38px; padding: 0 12px; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.cnt-new svg { color: var(--brand-dk); }
.cnt-add { grid-template-columns: 1.3fr 1fr 1fr; border-top: 1px solid var(--line); background: var(--bg); }
.cnt-fa { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; }
.cnt-fa .btn-primary { height: 44px; margin: 0; padding: 0 22px; width: auto; font-size: 16px; }
.cnt-fa .btn-sec { height: 44px; padding: 0 16px; }
.cnt-list li.cnt-hd { min-height: 0; padding-top: 6px; padding-bottom: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.cnt-more { display: block; width: 100%; padding: 12px 14px; border: 0; border-top: 1px solid var(--line); background: none; font: inherit; font-size: 14px; font-weight: 700; color: var(--brand-dk); cursor: pointer; text-align: center; }
.cnt-more:hover { background: var(--bg); }
@media (max-width: 767px) { .cnt-add { grid-template-columns: 1fr 1fr; } .cnt-fa .btn-primary, .cnt-fa .btn-sec { flex: 1; } }
/* prejemniki alarmov: prikaz, urejanje na gumb */
.rcpt-view { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; }
.rcpt-rows { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.rcpt-row span { display: block; font-size: 12px; font-weight: 700; color: var(--muted); }
.rcpt-row b { display: block; font-weight: 400; overflow-wrap: anywhere; }
.rcpt-row b.none { color: var(--muted); font-style: italic; }
.rcpt-edit { flex: none; height: 38px; padding: 0 12px; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.rcpt-edit svg { color: var(--brand-dk); }
/* dogodki: gumb za nastavitve naprave ob vsakem dogodku */
.ev-list li { display: flex; align-items: stretch; }
.ev-list li .ev-it { flex: 1; min-width: 0; }
.ev-list li.ev-more { display: block; }
.ev-set { flex: none; width: 44px; display: flex; align-items: flex-start; justify-content: center; padding-top: 10px; border: 0; border-left: 1px solid var(--line); background: none; color: var(--muted); cursor: pointer; }
.ev-set:hover { background: var(--bg); color: var(--brand-dk); }
.ev-set svg { width: 18px; height: 18px; }
/* skupni kanali za prvi / ponovljeni premik */
.alr-sh .chan { padding-top: 10px; }
.alr-sh:has(.chan[hidden]) { display: none; }
/* telefon: izbirnik vozila kot plošča na vrhu vidnega dela (tudi ob odprti tipkovnici), nad spodnjim menijem */
@media (max-width: 767px) {
  .dpick-pop, .ev-dpick .dpick-pop { position: fixed; z-index: 3000; top: calc(env(safe-area-inset-top, 0px) + 8px); left: 8px; right: 8px; min-width: 0;
    max-height: calc(var(--app-h, 100dvh) - env(safe-area-inset-top, 0px) - 96px); display: flex; flex-direction: column;
    box-shadow: 0 10px 30px rgba(0,0,0,.25); }
  .dpick-pop[hidden] { display: none; }
  .dpick-pop .dpick-list { flex: 1 1 auto; min-height: 0; max-height: none; }
}
.dpick-bd { display: none; }
@media (max-width: 767px) { .dpick-bd { display: block; position: fixed; inset: 0; z-index: 2999; background: rgba(0,0,0,.35); } .dpick-bd[hidden] { display: none; } }
@media (max-width: 767px) { body.dpick-open .ev-top { z-index: 3000; } }
/* dogodki: obdobje od–do */
.ev-sel { width: 100%; }
.ev-ctl .ev-per input { width: 140px; }
.ev-dash { color: var(--muted); font-weight: 700; }
.ev-day { display: block; font-size: 11px; font-weight: 400; color: var(--muted); }
@media (max-width: 767px) {
  .ev-ctl .ev-per input { flex: 1 1 0; width: auto; min-width: 0; font-size: 14px; padding: 0 2px; }
}
@media (max-width: 379px) { .ev-ctl .ev-per input { font-size: 13px; } .ev-ctl .ev-per input::-webkit-calendar-picker-indicator { display: none; } }
/* omejen način: skrij vse razen stanja (karta, seznam, info, Več) */
body.limited .nav-it[data-view="hist"], body.limited .nav-it[data-view="events"], body.limited .nav-it[data-view="report"],
body.limited [data-hist], body.limited [data-set], body.limited [data-evset], body.limited a[href="#porocilo"],
body.limited #hMenuRep, body.limited #infoHist, body.limited #infoSet { display: none !important; }
body.limited .vcard-a { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* Več: povratne informacije */
.fb { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.fb-q b { display: block; }
.fb-rate { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fb-opt { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border: 1px solid var(--line2); border-radius: 12px; background: #fff; font: inherit; font-weight: 700; font-size: 14px; color: var(--ink); cursor: pointer; }
.fb-opt .fb-ic { font-size: 26px; line-height: 1; }
.fb-opt[aria-checked="true"] { border-color: var(--brand); background: var(--band); box-shadow: inset 0 0 0 1px var(--brand); }
.fb-c { display: flex; flex-direction: column; gap: 4px; }
.fb-c textarea { width: 100%; min-height: 80px; resize: vertical; border: 1px solid var(--line2); border-radius: 12px; padding: 10px; font: inherit; font-size: 16px; color: var(--ink); background: #fff; box-sizing: border-box; }
.fb-c textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.fb-a { display: flex; justify-content: flex-end; }
.fb-a .btn-primary { height: 44px; margin: 0; padding: 0 26px; width: auto; }
/* Več: naslov stranke; gumb za povratne informacije */
.acc-addr { color: var(--ink); margin-top: 1px; }
button.link-row { width: 100%; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
#mFB .fb { padding: 0; }
/* Android: sistemski gumbi (nazaj, domov, aplikacije) so prosojni nad aplikacijo — pod njimi temen pas, da so svetli gumbi vidni */
html.android body::after { content: ""; position: fixed; left: 0; right: 0; bottom: 0; height: env(safe-area-inset-bottom, 0px);
  background: #1f2a1c; z-index: 2147483647; pointer-events: none; }
/* obvestilo ob prihodu s starega naslova trackL1 */
.new-app { padding: 4px 16px 8px; line-height: 1.45; }
.new-app p { margin: 8px 0; }
