/* ============================================================
   TAXI DUBEŇ — Vozový park (interná appka /cars)
   Tmavý dizajn, svietiace žlté tlačidlá. Nadväzuje na hlavný web.
   ============================================================ */

:root {
  --yellow: #f0c21e;
  --yellow-dark: #d9ac0f;
  --yellow-soft: rgba(240, 194, 30, 0.14);

  --ink: #14161a;          /* pozadie appky */
  --ink-2: #191c22;        /* panely */
  --ink-3: #20242b;        /* karty */
  --ink-4: #272c34;        /* hover / vyvýšené */
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);

  --text: #eef0f3;
  --muted: #9aa0a9;
  --muted-2: #6d737d;

  --ok: #38c172;           /* zelená */
  --warn: #f0a91e;         /* oranžová */
  --bad: #ef4d5a;          /* červená */
  --ok-soft: rgba(56, 193, 114, 0.14);
  --warn-soft: rgba(240, 169, 30, 0.15);
  --bad-soft: rgba(239, 77, 90, 0.15);

  --radius: 16px;
  --radius-sm: 11px;
  --radius-lg: 22px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.3);
  --glow: 0 0 0 1px rgba(240, 194, 30, 0.35), 0 6px 24px rgba(240, 194, 30, 0.35);

  --header-h: 66px;
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: var(--font);
  background: var(--ink);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

.icon { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ------------------------------------------------------------
   Tlačidlá
   ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 20px; border-radius: 999px; border: 1px solid transparent;
  font: 600 15px/1 var(--font); cursor: pointer; white-space: nowrap;
  transition: transform .14s ease, background-color .2s, box-shadow .25s, border-color .2s, color .2s;
}
.btn:active { transform: scale(.97); }
.btn .icon { font-size: 18px; }

.btn-primary { background: var(--yellow); color: var(--ink);
  box-shadow: 0 0 0 1px rgba(240,194,30,.4), 0 6px 22px rgba(240,194,30,.28); }
.btn-primary:hover { background: var(--yellow); box-shadow: var(--glow); transform: translateY(-1px); }

.btn-ghost { background: var(--ink-3); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--ink-4); border-color: var(--line-strong); }

.btn-quiet { background: transparent; color: var(--muted); }
.btn-quiet:hover { color: var(--text); background: var(--ink-3); }

.btn-danger { background: var(--bad-soft); color: #ff9aa2; border-color: rgba(239,77,90,.3); }
.btn-danger:hover { background: rgba(239,77,90,.22); }

.btn-sm { padding: 8px 14px; font-size: 13.5px; }
.btn-block { width: 100%; }
.btn-icon { padding: 10px; border-radius: 12px; }

/* ------------------------------------------------------------
   Prihlásenie
   ------------------------------------------------------------ */
.login-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(1100px 520px at 50% -10%, rgba(240,194,30,.10), transparent 60%),
    var(--ink);
}
.login-card {
  width: 100%; max-width: 380px; background: var(--ink-2);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 34px 30px; box-shadow: var(--shadow);
}
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.login-brand .mark {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: var(--yellow); color: var(--ink); font-weight: 800; font-size: 20px;
  box-shadow: 0 0 22px rgba(240,194,30,.4);
}
.login-logo { width: 46px; height: 46px; border-radius: 13px; object-fit: cover; flex: none;
  box-shadow: 0 0 0 1px rgba(240,194,30,.35), 0 0 22px rgba(240,194,30,.4); }
.login-brand b { font-size: 17px; letter-spacing: -.01em; }
.login-brand span { display: block; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.login-card h1 { font-size: 21px; margin-bottom: 4px; letter-spacing: -.02em; }
.login-card .sub { color: var(--muted); font-size: 14px; margin-bottom: 22px; }

.field { margin-bottom: 15px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 7px; font-weight: 500; }
.field input, .field select {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--ink-3); border: 1px solid var(--line); color: var(--text);
  font: 500 15px var(--font); transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus {
  outline: none; border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(240,194,30,.16);
}
.field select {
  appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%239aa0a9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.field select option { background: var(--ink-2); color: var(--text); }

/* ------------------------------------------------------------
   Vlastný rozbaľovač (select) + dátumové pole + kalendár
   ------------------------------------------------------------ */
.cs { position: relative; }
.cs.open { z-index: 40; }   /* otvorený select nad nasledujúcimi poľami (doklady) */
.cs-trigger, .dp-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 14px; border-radius: var(--radius-sm); background: var(--ink-3);
  border: 1px solid var(--line); color: var(--text); font: 500 15px var(--font);
  cursor: pointer; text-align: left; transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.cs-trigger:hover, .dp-trigger:hover { border-color: var(--line-strong); background: var(--ink-4); }
.cs.open .cs-trigger { border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(240,194,30,.16); }
.cs-caret { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; flex: none; }
.cs.open .cs-caret { transform: rotate(180deg); }
.dp-ic { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round; flex: none; }
.dp-val.empty { color: var(--muted-2); }

.cs-menu {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 40;
  background: var(--ink-2); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); padding: 5px;
  opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: top; pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}
.cs.open .cs-menu { opacity: 1; transform: none; pointer-events: auto; }
.cs-opt { display: block; width: 100%; text-align: left; padding: 9px 11px; border: none;
  background: transparent; color: var(--text); font: 500 14px var(--font); border-radius: 8px;
  cursor: pointer; transition: background-color .12s; }
.cs-opt:hover { background: var(--ink-4); }
.cs-opt.sel { color: var(--yellow); font-weight: 600; }

.dp-pop {
  position: fixed; z-index: 4000; width: 288px; background: var(--ink-2);
  border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: var(--shadow); padding: 12px;
  opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: top; pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}
.dp-pop.open { opacity: 1; transform: none; pointer-events: auto; }
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dp-title { font-weight: 600; font-size: 14.5px; }
.dp-nav { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; border: none;
  background: var(--ink-3); color: var(--text); cursor: pointer; transition: background-color .15s; }
.dp-nav:hover { background: var(--ink-4); }
.dp-nav .icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; }
.dp-dow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 4px; }
.dp-dow span { text-align: center; font-size: 11px; color: var(--muted-2); font-weight: 600; padding: 4px 0; }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-day { aspect-ratio: 1; display: grid; place-items: center; border: none; background: transparent;
  color: var(--text); font: 500 13px var(--font); border-radius: 8px; cursor: pointer;
  transition: background-color .12s, color .12s; }
.dp-day:hover { background: var(--ink-4); }
.dp-day.other { color: var(--muted-2); }
.dp-day.today { box-shadow: inset 0 0 0 1px var(--line-strong); }
.dp-day.sel { background: var(--yellow); color: var(--ink); font-weight: 700; box-shadow: 0 0 12px rgba(240,194,30,.4); }
.dp-foot { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.dp-foot button { border: none; background: transparent; color: var(--muted); font: 600 13px var(--font);
  cursor: pointer; padding: 5px 8px; border-radius: 7px; transition: background-color .12s, color .12s; }
.dp-foot button:hover { color: var(--text); background: var(--ink-3); }
.dp-today { color: var(--yellow) !important; }

/* ------------------------------------------------------------
   Servis a náklady
   ------------------------------------------------------------ */
.svc-list { display: flex; flex-direction: column; gap: 7px; }
.svc-row { background: var(--ink-3); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 11px; }
.svc-head { display: flex; align-items: center; gap: 9px; }
.svc-type { font-weight: 600; font-size: 12.5px; background: var(--ink); border: 1px solid var(--line);
  padding: 2px 9px; border-radius: 999px; flex: none; }
.svc-date { font-size: 12.5px; color: var(--muted); }
.svc-km { font-size: 12px; color: var(--muted-2); }
.svc-cost { margin-left: auto; font-weight: 700; font-size: 14px; color: var(--yellow); white-space: nowrap; }
.svc-del { border: none; background: transparent; color: var(--muted-2); cursor: pointer; padding: 4px;
  border-radius: 7px; display: grid; place-items: center; flex: none; transition: background-color .15s, color .15s; }
.svc-del .icon { width: 16px; height: 16px; }
.svc-del:hover { color: var(--bad); background: var(--bad-soft); }
.svc-desc { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.svc-empty { text-align: center; color: var(--muted-2); font-size: 13px; padding: 14px; }
.svc-total { display: flex; justify-content: space-between; align-items: center; margin-top: 10px;
  padding: 11px 13px; background: var(--ink-3); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); }
.svc-total span { color: var(--muted); font-size: 13px; }
.svc-total b { font-size: 18px; color: var(--yellow); }
.svc-add { margin-top: 10px; }
.svc-add summary { cursor: pointer; font-size: 13px; color: var(--yellow-dark); font-weight: 600;
  padding: 7px 0; list-style: none; }
.svc-add summary::-webkit-details-marker { display: none; }
.svc-add[open] summary { color: var(--muted); }

/* ------------------------------------------------------------
   KPI dlaždice + náklady flotily
   ------------------------------------------------------------ */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
@media (max-width: 720px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }
.stat { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px 17px; position: relative; overflow: hidden; }
.stat-ic { position: absolute; top: 14px; right: 14px; width: 20px; height: 20px; color: var(--muted-2); opacity: .6; }
.stat-val { font-size: 27px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.stat-val.money { font-size: 22px; color: var(--yellow); }
.stat-label { font-size: 13px; margin-top: 3px; font-weight: 500; }
.stat-sub { font-size: 12px; color: var(--muted-2); }

.seg { display: inline-flex; background: var(--ink-3); border: 1px solid var(--line); border-radius: 9px; padding: 3px; }
.seg button { border: none; background: transparent; color: var(--muted); font: 600 12.5px var(--font);
  padding: 5px 12px; border-radius: 7px; cursor: pointer; transition: background-color .15s, color .15s; }
.seg button:hover { color: var(--text); }
.seg button.active { background: var(--yellow); color: var(--ink); }

.cost-summary { margin-bottom: 16px; }
.cost-total { font-size: 32px; font-weight: 800; letter-spacing: -.02em; color: var(--yellow); line-height: 1.1; }
.cost-subline { font-size: 13px; color: var(--muted); margin-top: 2px; }
.cost-bars { display: flex; flex-direction: column; gap: 10px; }
.cost-bar { display: grid; grid-template-columns: 150px 1fr auto; align-items: center; gap: 12px; }
@media (max-width: 560px) { .cost-bar { grid-template-columns: 100px 1fr auto; gap: 8px; } }
.cost-name { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cost-plate { font-size: 11px; color: var(--muted-2); font-weight: 500; }
.cost-track { height: 10px; background: var(--ink-3); border-radius: 999px; overflow: hidden; }
.cost-fill { display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--yellow-dark), var(--yellow)); transition: width .5s ease; }
.cost-amt { font-size: 14px; font-weight: 700; white-space: nowrap; }
.cost-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.cost-cat { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted);
  background: var(--ink-3); border: 1px solid var(--line); padding: 5px 11px; border-radius: 999px; }
.cost-cat i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.cost-cat b { color: var(--text); font-weight: 600; }

.cost-block { margin-top: 18px; }
.cost-block:first-child { margin-top: 0; }
.cost-blocktitle { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin-bottom: 11px; }
.cost-amt { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; white-space: nowrap; }
.cost-amt b { font-size: 14px; font-weight: 700; }
.cost-amt .perkm { font-size: 11px; color: var(--muted-2); }
.cost-fill.km { background: linear-gradient(90deg, #2f8f56, var(--ok)); }
.cost-hint { font-size: 12.5px; color: var(--muted-2); margin-top: 14px; padding: 10px 12px;
  background: var(--ink-3); border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); }
.cost-actions { margin-top: 16px; }

/* mesačný trend nákladov */
.trend { display: flex; align-items: flex-end; gap: 6px; }
.trend-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.trend-wrap { width: 100%; height: 72px; display: flex; align-items: flex-end; }
.trend-bar { width: 100%; border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, var(--yellow), var(--yellow-dark)); transition: height .5s ease; }
.trend-col { cursor: pointer; }
.trend-col:hover .trend-bar { filter: brightness(1.15); }
.trend-col:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; border-radius: 6px; }
.trend-lbl { font-size: 10px; color: var(--muted-2); }
.trend-col.sel .trend-bar { box-shadow: 0 0 0 2px var(--ink-2), 0 0 0 3px var(--yellow), 0 0 10px rgba(240,194,30,.5); filter: brightness(1.2); }
.trend-col.sel .trend-lbl { color: var(--yellow); font-weight: 700; }
.tb-hint { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--muted-2); }

/* navigátor mesiaca v paneli nákladov */
.cost-nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 18px; }
.cn-arrow { width: 34px; height: 34px; flex: none; border-radius: 9px; border: 1px solid var(--line);
  background: var(--ink-3); color: var(--text); font-size: 20px; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; transition: background .15s, border-color .15s; }
.cn-arrow:hover:not(:disabled) { background: var(--ink-2); border-color: var(--line-strong); color: var(--yellow); }
.cn-arrow:disabled { opacity: .35; cursor: default; }
.cn-label { font-size: 15.5px; font-weight: 700; min-width: 150px; text-align: center; }
.cm-veh { font-size: 11.5px; color: var(--muted); background: var(--ink-3); border: 1px solid var(--line);
  padding: 1px 7px; border-radius: 999px; white-space: nowrap; }

/* ------------------------------------------------------------
   Digitálny strážca (insighty / anomálie)
   ------------------------------------------------------------ */
.guard-panel { position: relative; overflow: hidden;
  background:
    radial-gradient(600px 120px at 100% 0%, rgba(240,194,30,.06), transparent 70%),
    var(--ink-2); }
.guard-panel .panel-head { border-bottom-color: var(--line); }
.guard-shield { color: var(--yellow); filter: drop-shadow(0 0 6px rgba(240,194,30,.45)); }
.guard-meta { font-size: 12px; color: var(--muted-2); white-space: nowrap; }
@media (max-width: 560px) { .guard-meta { display: none; } }

.guard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)); gap: 12px; }
.guard-card { display: flex; gap: 12px; background: var(--ink-3); border: 1px solid var(--line);
  border-left: 3px solid var(--muted-2); border-radius: var(--radius-sm); padding: 13px 14px;
  transition: transform .12s, border-color .2s, box-shadow .2s; }
.guard-card.clickable { cursor: pointer; }
.guard-card.clickable:hover { transform: translateY(-1px); box-shadow: var(--shadow-soft); }
.guard-card.bad  { border-left-color: var(--bad); }
.guard-card.warn { border-left-color: var(--warn); }
.guard-card.info { border-left-color: #4fd1e0; }
.guard-card.good { border-left-color: var(--ok); }
.guard-card .g-ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.guard-card .g-ic .icon { width: 20px; height: 20px; }
.guard-card.bad  .g-ic { background: var(--bad-soft);  color: var(--bad); }
.guard-card.warn .g-ic { background: var(--warn-soft); color: var(--warn); }
.guard-card.info .g-ic { background: rgba(79,209,224,.14); color: #6fdfec; }
.guard-card.good .g-ic { background: var(--ok-soft);   color: var(--ok); }
.guard-card .g-body { min-width: 0; }
.guard-card .g-title { font-size: 13.5px; font-weight: 600; letter-spacing: -.01em; margin-bottom: 2px; }
.guard-card .g-text { font-size: 12.5px; color: var(--muted); line-height: 1.5; }

/* malý segment + kompaktný select (hlavičky panelov) */
.seg-sm button { padding: 5px 11px; font-size: 12px; }
.mini-select {
  margin-left: 8px; padding: 6px 28px 6px 11px; border-radius: 8px;
  background: var(--ink-3); border: 1px solid var(--line); color: var(--text);
  font: 600 12.5px var(--font); cursor: pointer; appearance: none; -webkit-appearance: none; max-width: 160px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%239aa0a9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center;
}
.mini-select option { background: var(--ink-2); color: var(--text); }
@media (max-width: 560px) { .mini-select { max-width: 130px; margin-left: 6px; } }

/* skupina ovládačov v hlavičke panela (seg + select) — na mobile zalomí pod názov */
.head-ctrls { display: flex; align-items: center; gap: 8px; min-width: 0; }
@media (max-width: 560px) {
  #rhythmPanel .panel-head { flex-wrap: wrap; row-gap: 10px; }
  #rhythmPanel .head-ctrls { width: 100%; }
  #rhythmPanel .head-ctrls .seg { flex: none; }
  #rhythmPanel .head-ctrls #rhythmVeh { flex: 1; max-width: none; margin-left: auto; }
}

/* ------------------------------------------------------------
   Prevádzkový rytmus (punch-card)
   ------------------------------------------------------------ */
.rhythm-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; margin-bottom: 14px; }
.rhythm-peak { display: inline-flex; align-items: center; gap: 9px; background: var(--ink-3);
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 14px; }
.rhythm-peak b { color: var(--yellow); font-weight: 700; }
.rhythm-peak .pk-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: var(--yellow-soft); color: var(--yellow); flex: none; }
.rhythm-peak .pk-ic .icon { width: 17px; height: 17px; }
.rhythm-note { font-size: 12px; color: var(--muted-2); }
.rhythm-scroll { overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; scrollbar-color: var(--ink-4) transparent; }
.rhythm-scroll::-webkit-scrollbar { height: 8px; }
.rhythm-scroll::-webkit-scrollbar-thumb { background: var(--ink-4); border-radius: 8px; }
.rhythm-grid { display: grid; grid-template-columns: 30px repeat(24, minmax(15px, 1fr)); gap: 3px; min-width: 600px; }
.rhythm-corner { }
.rhythm-hh { font-size: 9.5px; color: var(--muted-2); text-align: center; line-height: 1; align-self: end; padding-bottom: 3px; }
.rhythm-day { font-size: 11px; color: var(--muted); font-weight: 600; display: flex; align-items: center; }
.rhythm-cell { aspect-ratio: 1; border-radius: 3px; background: var(--ink-3);
  transition: transform .1s, box-shadow .15s; cursor: default; }
.rhythm-cell:hover { transform: scale(1.22); box-shadow: 0 0 0 1px var(--line-strong); z-index: 1; }
.rhythm-cell.peak { box-shadow: 0 0 0 2px var(--yellow), 0 0 10px rgba(240,194,30,.5); }
.rhythm-legend { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 11.5px; color: var(--muted-2); }
.rhythm-legend .scale { display: inline-flex; gap: 3px; }
.rhythm-legend .scale i { width: 15px; height: 15px; border-radius: 3px; }

/* ------------------------------------------------------------
   Financie (tržby / náklady / zisk)
   ------------------------------------------------------------ */
.finance-panel { background:
    radial-gradient(560px 130px at 0% 0%, rgba(56,193,114,.06), transparent 70%), var(--ink-2); }
.fin-hero { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
@media (max-width: 780px) { .fin-hero { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .fin-hero { grid-template-columns: 1fr; } }
.fin-fig { background: var(--ink-3); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.fin-fig .ff-label { font-size: 12px; color: var(--muted); margin-bottom: 4px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fin-fig .ff-label small { color: var(--muted-2); font-size: 10.5px; }
.fin-fig .ff-val { font-size: 23px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.fin-fig.revenue .ff-val { color: #7ee2a8; }
.fin-fig.costs .ff-val { color: #ff9aa2; }
.fin-fig.profit { background: linear-gradient(135deg, rgba(56,193,114,.13), var(--ink-3)); border-color: rgba(56,193,114,.3); }
.fin-fig.profit.neg { background: linear-gradient(135deg, rgba(239,77,90,.13), var(--ink-3)); border-color: rgba(239,77,90,.3); }
.fin-fig.profit .ff-val { color: var(--ok); }
.fin-fig.profit.neg .ff-val { color: var(--bad); }
.fin-fig.account { background: linear-gradient(135deg, rgba(240,194,30,.14), var(--ink-3)); border-color: rgba(240,194,30,.35); }
.fin-fig.account .ff-val { font-size: 26px; color: var(--yellow); }
.fin-fig.account.neg { background: linear-gradient(135deg, rgba(239,77,90,.13), var(--ink-3)); border-color: rgba(239,77,90,.3); }
.fin-fig.account.neg .ff-val { color: var(--bad); }
.fin-fig .ff-sub { font-size: 11.5px; color: var(--muted-2); margin-top: 3px; }

.fin-breakdown { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.fin-chip { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted);
  background: var(--ink-3); border: 1px solid var(--line); padding: 5px 11px; border-radius: 999px; }
.fin-chip b { color: var(--text); font-weight: 600; }
.fin-chip i { width: 8px; height: 8px; border-radius: 50%; flex: none; }

.fin-trend { margin-bottom: 20px; }
.fin-trend .ft-title { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin-bottom: 11px; }
.ft-bars { display: flex; align-items: stretch; gap: 6px; height: 120px; }
.ft-col { flex: 1; display: flex; flex-direction: column; min-width: 0; cursor: pointer; }
.ft-col:hover .ft-bar { filter: brightness(1.18); }
.ft-col:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; border-radius: 6px; }
.ft-col.sel .ft-bar { box-shadow: 0 0 0 2px var(--ink-2), 0 0 0 3px var(--yellow), 0 0 9px rgba(240,194,30,.5); filter: brightness(1.15); }
.ft-col.sel .ft-lbl { color: var(--yellow); font-weight: 700; }
.fin-nav { margin-bottom: 16px; }
.ft-plot { flex: 1; display: flex; flex-direction: column; position: relative; }
.ft-zero { position: absolute; left: 0; right: 0; top: 50%; border-top: 1px dashed var(--line-strong); }
.ft-pos, .ft-neg { width: 100%; }
.ft-pos { align-self: flex-end; margin-top: auto; }
.ft-bar { width: 100%; border-radius: 4px 4px 0 0; transition: height .5s ease; }
.ft-bar.pos { background: linear-gradient(180deg, var(--ok), #2f8f56); }
.ft-bar.neg { background: linear-gradient(180deg, #b23a44, var(--bad)); border-radius: 0 0 4px 4px; }
.ft-lbl { font-size: 9.5px; color: var(--muted-2); text-align: center; margin-top: 5px; }

.fin-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.fin-tabs button { border: none; background: transparent; color: var(--muted); font: 600 13px var(--font);
  padding: 9px 13px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .15s, border-color .15s; }
.fin-tabs button:hover { color: var(--text); }
.fin-tabs button.active { color: var(--yellow); border-bottom-color: var(--yellow); }

.fin-list { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.fin-row { display: flex; align-items: center; gap: 11px; background: var(--ink-3); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 10px 13px; }
.fin-row .fr-date { font-size: 11.5px; color: var(--muted-2); width: 74px; flex: none; }
.fin-row .fr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.fin-row .fr-title { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.fin-row .fr-sub { font-size: 11.5px; color: var(--muted); }
.fin-row .fr-amt { font-weight: 700; font-size: 14px; white-space: nowrap; text-align: right; }
.fin-row .fr-amt.pos { color: var(--ok); } .fin-row .fr-amt.neg { color: var(--bad); }
.fin-row .fr-amt small { display: block; font-size: 10.5px; color: var(--muted-2); font-weight: 500; }
.fin-del { border: none; background: transparent; color: var(--muted-2); cursor: pointer; padding: 5px;
  border-radius: 7px; display: grid; place-items: center; flex: none; transition: background-color .15s, color .15s; }
.fin-del .icon { width: 16px; height: 16px; }
.fin-del:hover { color: var(--bad); background: var(--bad-soft); }
.fin-empty { text-align: center; color: var(--muted-2); font-size: 13px; padding: 16px; }
.fin-accnote { font-size: 12.5px; color: var(--muted); background: var(--ink-3); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 11px 13px; margin-bottom: 14px; line-height: 1.5; }
.fin-accnote b { color: var(--yellow); }
.fin-tag { font-size: 10.5px; font-weight: 600; padding: 1px 8px; border-radius: 999px; flex: none;
  white-space: nowrap; background: var(--ink); border: 1px solid var(--line); color: var(--muted); }

/* štítok „dotácia" (zaplatené zvonku) — fialový, ako dotácie v účte */
.fund-tag { font-size: 10px; font-weight: 700; padding: 1px 8px; border-radius: 999px; flex: none;
  display: inline-block; vertical-align: middle; white-space: nowrap;
  background: rgba(139,156,247,.16); border: 1px solid rgba(139,156,247,.4); color: #b6c1fb;
  letter-spacing: .02em; text-transform: uppercase; }
.svc-subnote { font-size: 12px; color: #b6c1fb; margin-top: 6px; text-align: right; }
.svc-subnote b { font-weight: 700; }

/* prehľad: koľko krylo taxíkové peniaze vs koľko bolo doložené zvonku */
.fin-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 18px; }
.fin-split .fs-item { background: var(--ink-3); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px 13px; display: flex; flex-direction: column; gap: 3px; }
.fin-split .fs-item.sub { border-color: rgba(139,156,247,.35); background: rgba(139,156,247,.08); }
.fin-split .fs-l { font-size: 12px; color: var(--muted); }
.fin-split .fs-v { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.fin-split .fs-item.taxi .fs-v { color: var(--text); }
.fin-split .fs-item.sub .fs-v { color: #b6c1fb; }

.fin-add { background: var(--ink-3); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; }
.fin-add .fa-title { font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 12px; }
.fin-add .field { margin-bottom: 12px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .grid-3 { grid-template-columns: 1fr 1fr; } }

/* ------------------------------------------------------------
   Pokrytie smien (denná / nočná)
   ------------------------------------------------------------ */
.shift-pills { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
@media (max-width: 480px) { .shift-pills { grid-template-columns: 1fr; } }
.shift-pill { display: flex; align-items: center; gap: 13px; background: var(--ink-3);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 16px; }
.shift-pill .sp-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.shift-pill .sp-ic .icon { width: 21px; height: 21px; }
.shift-pill.day .sp-ic { background: var(--yellow-soft); color: var(--yellow); }
.shift-pill.night .sp-ic { background: rgba(124,131,240,.16); color: #a3a8f5; }
.shift-pill .sp-label { font-size: 12px; color: var(--muted); }
.shift-pill .sp-val { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.shift-pill .sp-val small { font-size: 12px; font-weight: 500; color: var(--muted-2); }

.shift-strip-wrap { overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; scrollbar-color: var(--ink-4) transparent; }
.shift-strip-wrap::-webkit-scrollbar { height: 8px; }
.shift-strip-wrap::-webkit-scrollbar-thumb { background: var(--ink-4); border-radius: 8px; }
.shift-strip { display: flex; gap: 6px; min-width: min-content; }
.sh-col { display: flex; flex-direction: column; gap: 5px; align-items: center; min-width: 34px; flex: 1; }
.sh-cell { width: 100%; height: 30px; border-radius: 6px; display: grid; place-items: center;
  font: 700 12px var(--font); color: var(--text); background: var(--ink-3); transition: transform .1s; }
.sh-cell:hover { transform: scale(1.08); }
.sh-cell.empty { color: var(--muted-2); }
.sh-date { font-size: 9.5px; color: var(--muted-2); white-space: nowrap; }
.shift-rowlabels { display: flex; flex-direction: column; gap: 5px; justify-content: flex-start; padding-top: 0; }
.shift-legend { display: flex; align-items: center; gap: 16px; margin-top: 12px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.shift-legend .k { display: inline-flex; align-items: center; gap: 7px; }
.shift-legend .k i { width: 12px; height: 12px; border-radius: 3px; }

.shift-vehs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.sv-chip { display: flex; align-items: center; gap: 9px; background: var(--ink-3); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 13px; }
.sv-chip .sv-name { font-size: 12.5px; font-weight: 600; }
.sv-split { display: flex; width: 66px; height: 7px; border-radius: 999px; overflow: hidden; background: var(--ink); }
.sv-split .d { background: var(--yellow); } .sv-split .n { background: #7c83f0; }
.sv-chip .sv-num { font-size: 11px; color: var(--muted-2); }

/* ------------------------------------------------------------
   Plán smien (rozpis → JPG)
   ------------------------------------------------------------ */
.planner-week { display: inline-flex; align-items: center; gap: 4px; background: var(--ink-3);
  border: 1px solid var(--line); border-radius: 9px; padding: 3px; }
.planner-week span { font-size: 12.5px; font-weight: 600; padding: 0 8px; min-width: 96px; text-align: center; }
.planner-week button { border: none; background: transparent; color: var(--text); cursor: pointer;
  width: 26px; height: 26px; border-radius: 7px; font-size: 17px; line-height: 1; transition: background-color .15s; }
.planner-week button:hover { background: var(--ink-4); }

.drv-bar { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; min-height: 20px; }
.drv-empty { font-size: 12.5px; color: var(--muted-2); }
.drv-chip { display: inline-flex; align-items: center; gap: 5px; background: var(--ink-3); border: 1px solid var(--line-strong);
  border-radius: 999px; padding: 4px 6px 4px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: border-color .15s, background-color .15s; }
.drv-chip:hover { border-color: var(--yellow); background: var(--ink-4); }
.drv-x { border: none; background: transparent; color: var(--muted-2); cursor: pointer; font-size: 14px; line-height: 1;
  width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; }
.drv-x:hover { color: var(--bad); background: var(--bad-soft); }

.pl-grid { display: flex; flex-direction: column; gap: 7px; }
.pl-row { display: grid; grid-template-columns: 64px 1fr 1fr; gap: 10px; align-items: center; }
@media (max-width: 560px) {
  /* MOBIL: deň hore, denná a nočná pod sebou na plnú šírku — pohodlné písanie */
  .pl-row { grid-template-columns: 1fr; gap: 8px; background: var(--ink-3); border: 1px solid var(--line);
    border-radius: var(--radius-sm); padding: 11px 12px; }
  .pl-day { flex-direction: row; align-items: baseline; gap: 8px; }
  .pl-field input { padding: 11px 12px 11px 58px; font-size: 15px; }
}
.pl-day { display: flex; flex-direction: column; line-height: 1.15; }
.pl-day b { font-size: 13.5px; } .pl-day span { font-size: 11px; color: var(--muted-2); }
.pl-field { position: relative; display: flex; align-items: center; }
.pl-ic { position: absolute; left: 10px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; pointer-events: none; }
.pl-ic.day { color: var(--yellow-dark); } .pl-ic.night { color: #8b9cf7; }
.pl-field input { width: 100%; padding: 9px 12px 9px 54px; border-radius: var(--radius-sm); background: var(--ink-3);
  border: 1px solid var(--line); color: var(--text); font: 500 14px var(--font); transition: border-color .2s, box-shadow .2s; }
.pl-field input:focus { outline: none; border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(240,194,30,.16); }
.pl-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; flex-wrap: wrap; }
.pl-hint { font-size: 12px; color: var(--muted-2); flex: 1; min-width: 180px; }

/* ------------------------------------------------------------
   Rentabilita — kvadrant ťahúň / žrút (kompaktný + interaktívny)
   ------------------------------------------------------------ */
.profit-wrap { display: grid; grid-template-columns: minmax(0, 440px) 1fr; gap: 22px; align-items: center; }
@media (max-width: 760px) { .profit-wrap { grid-template-columns: 1fr; gap: 16px; } }
.profit-chartbox { min-width: 0; }
.profit-chart { width: 100%; height: auto; display: block; overflow: visible; }
.profit-chart .q-grid { stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 4 4; }
.profit-chart .q-axis { stroke: var(--line-strong); stroke-width: 1; }
.profit-chart .q-lbl { fill: var(--muted-2); font: 700 9.5px var(--font); text-transform: uppercase; letter-spacing: .05em; }
.profit-chart .q-axlbl { fill: var(--muted); font: 600 10.5px var(--font); }
.profit-chart .dot { stroke: var(--ink); stroke-width: 2; cursor: pointer; transition: r .15s ease; }
.profit-chart .dot.hl { stroke: var(--yellow); stroke-width: 3; filter: drop-shadow(0 0 7px rgba(240,194,30,.6)); }
.profit-chart .dot-lbl { fill: var(--text); font: 700 12px var(--font); pointer-events: none; }
.profit-chart .dot-lbl.hl { fill: var(--yellow); }

.profit-list { display: flex; flex-direction: column; gap: 8px; }
.pf-row { display: grid; grid-template-columns: auto 1fr auto; gap: 11px; align-items: center;
  padding: 9px 12px; background: var(--ink-3); border: 1px solid var(--line); border-radius: var(--radius-sm);
  cursor: pointer; transition: transform .12s, border-color .2s, box-shadow .2s; }
.pf-row:hover, .pf-row.hl { border-color: var(--line-strong); transform: translateY(-1px); box-shadow: var(--shadow-soft); }
.pf-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.pf-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pf-name { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-plate { font-size: 11px; color: var(--muted-2); font-weight: 500; }
.pf-badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 0; }
.pf-badge.ideal { color: #7ee2a8; } .pf-badge.drahy { color: #f2c56b; }
.pf-badge.zrut { color: #ff9aa2; } .pf-badge.malo { color: var(--muted); }
.pf-metrics { text-align: right; display: flex; flex-direction: column; line-height: 1.3; white-space: nowrap; }
.pf-metrics b { font-size: 13.5px; color: var(--yellow); }
.pf-metrics .pf-km { font-size: 11px; color: var(--muted-2); }
.profit-note { font-size: 12.5px; color: var(--muted-2); margin-top: 14px; }

/* ------------------------------------------------------------
   Predpoveď nákladov (cash-flow)
   ------------------------------------------------------------ */
.fc-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin-bottom: 16px; }
.fc-total { font-size: 30px; font-weight: 800; letter-spacing: -.02em; color: var(--yellow); line-height: 1.05; }
.fc-sub { font-size: 13px; color: var(--muted); }
.fc-chart { display: flex; align-items: flex-end; gap: 6px; height: 150px; }
.fc-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; height: 100%; justify-content: flex-end; }
.fc-barwrap { width: 100%; height: 118px; display: flex; flex-direction: column-reverse; align-items: stretch; justify-content: flex-start; position: relative; }
.fc-seg { width: 100%; transition: height .5s ease; }
.fc-seg.base { background: linear-gradient(180deg, #3a4150, #2a2f39); }
.fc-seg.evt { background: linear-gradient(180deg, var(--yellow), var(--yellow-dark)); border-radius: 4px 4px 0 0; }
.fc-col.peak .fc-seg.evt { box-shadow: 0 0 12px rgba(240,194,30,.5); }
.fc-col.peak .fc-mon { color: var(--yellow); font-weight: 700; }
.fc-mon { font-size: 10px; color: var(--muted-2); white-space: nowrap; }
.fc-events { margin-top: 18px; display: flex; flex-direction: column; gap: 7px; }
.fc-blocktitle { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.fc-evt { display: flex; align-items: center; gap: 10px; background: var(--ink-3); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 9px 12px; }
.fc-evt .fe-month { font-size: 11px; font-weight: 700; color: var(--yellow-dark); width: 58px; flex: none; text-transform: capitalize; }
.fc-evt .fe-what { flex: 1; min-width: 0; font-size: 13px; }
.fc-evt .fe-what span { color: var(--muted-2); font-size: 11.5px; }
.fc-evt .fe-cost { font-weight: 700; font-size: 13.5px; white-space: nowrap; }
.fc-legend { display: flex; gap: 16px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.fc-legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; margin-right: 6px; vertical-align: -1px; }

/* jemné animácie pri načítaní */
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.app-main .panel, .app-main .stat-row { animation: fadeUp .45s ease both; }
@media (prefers-reduced-motion: reduce) { .app-main .panel, .app-main .stat-row { animation: none; } }
.login-msg { font-size: 13.5px; margin-top: 4px; min-height: 18px; color: var(--bad); }

/* ------------------------------------------------------------
   Layout appky
   ------------------------------------------------------------ */
.app-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  display: flex; align-items: center; gap: 16px; padding: 0 20px;
  background: rgba(20,22,26,.86); backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}
.app-header .brand { display: flex; align-items: center; gap: 11px; font-weight: 700; }
.app-header .brand .mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--yellow); color: var(--ink); font-weight: 800; font-size: 15px;
  box-shadow: 0 0 16px rgba(240,194,30,.35);
}
.app-header .brand-logo {
  width: 40px; height: 40px; border-radius: 11px; object-fit: cover; flex: none;
  box-shadow: 0 0 0 1px rgba(240,194,30,.35), 0 0 18px rgba(240,194,30,.45);
}
.app-header .brand-txt { display: flex; flex-direction: column; line-height: 1.1; }
.app-header .brand small { display: block; font-size: 11px; color: var(--muted); font-weight: 500; }
.app-header .spacer { flex: 1; }
.header-status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 0 0 rgba(56,193,114,.6); animation: pulse 2s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(56,193,114,.5)} 70%{box-shadow:0 0 0 7px rgba(56,193,114,0)} 100%{box-shadow:0 0 0 0 rgba(56,193,114,0)} }

/* Mobil: hlavička s ikonovými tlačidlami, aby sa všetko zmestilo */
@media (max-width: 640px) {
  .app-header { gap: 8px; padding: 0 12px; }
  .app-header .brand small { display: none; }
  .app-header .brand span { white-space: nowrap; }
  .app-header .header-status { font-size: 0; gap: 0; }
  .app-header .btn { font-size: 0; gap: 0; padding: 10px; border-radius: 12px; }
  .app-header .btn .icon { font-size: 19px; }
}

.app-main { max-width: 1320px; margin: 0 auto; padding: 20px; }
.app-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 940px) { .app-grid { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------
   Sekcie appky + navigácia (bočné menu na PC / spodná lišta na mobile)
   ------------------------------------------------------------ */
.app-shell { max-width: none; margin: 0; display: flex; align-items: flex-start; }
.app-shell .app-main { flex: 1 1 auto; min-width: 0; max-width: 1360px; margin: 0 auto; }
.nav-spacer { flex: 0 0 220px; }   /* zrkadlo bočného menu → obsah je v strede obrazovky */

.view { display: none; }
.view.active { display: block; animation: fadeUp .4s ease both; }
@media (prefers-reduced-motion: reduce) { .view.active { animation: none; } }

.side-nav {
  flex: 0 0 220px; position: sticky; top: var(--header-h); align-self: flex-start;
  max-height: calc(100vh - var(--header-h)); overflow: auto;
  padding: 22px 16px; display: flex; flex-direction: column; gap: 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 17px;
  border: none; background: none; cursor: pointer; border-radius: 13px;
  color: var(--muted); font: 600 16.5px var(--font); text-align: left;
  transition: background .15s, color .15s;
}
.nav-item .icon { font-size: 23px; flex: none; }
.nav-item:hover { background: var(--ink-3); color: var(--text); }
.nav-item.active { background: var(--yellow-soft); color: var(--yellow); }

.tab-bar { display: none; }

@media (max-width: 940px) {
  .side-nav, .nav-spacer { display: none; }
  .app-shell .app-main { padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px) + 14px); }
  .tab-bar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: rgba(20, 22, 26, .95); backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .tab-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 9px 2px 8px; border: none; background: none; cursor: pointer;
    color: var(--muted-2); font: 600 10.5px var(--font); transition: color .15s;
  }
  .tab-item .icon { font-size: 22px; }
  .tab-item:hover { color: var(--muted); }
  .tab-item.active { color: var(--yellow); }
}

.panel {
  background: var(--ink-2); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.panel-head {
  display: flex; align-items: center; gap: 10px; padding: 15px 18px;
  border-bottom: 1px solid var(--line);
}
.panel-head h2 { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.panel-head .count { font-size: 12px; color: var(--muted); background: var(--ink-4);
  padding: 2px 9px; border-radius: 999px; }
.panel-head .spacer { flex: 1; }
.panel-body { padding: 16px 18px; }

/* Mapa */
/* isolation: izoluje interné vysoké z-indexy Leafletu (ovládanie ~1000, markery, popupy),
   aby nepresvitali nad modál/toasty. */
.map-panel { position: relative; isolation: isolate; }
.map-body { position: relative; }
#map { height: 460px; width: 100%; background: var(--ink-3); }
@media (max-width: 940px) { #map { height: 340px; } }

/* Mapa na celú obrazovku */
.map-panel.fullscreen {
  position: fixed; inset: 0; z-index: 90; margin: 0;
  border-radius: 0; display: flex; flex-direction: column;
}
.map-panel.fullscreen .map-body { flex: 1; }
.map-panel.fullscreen #map { height: 100%; }
body.map-open { overflow: hidden; }
.map-legend {
  position: absolute; left: 12px; bottom: 12px; z-index: 500;
  display: flex; gap: 12px; flex-wrap: wrap;
  background: rgba(20,22,26,.85); backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: 10px; padding: 7px 11px; font-size: 12px;
}
.map-legend span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.map-legend i { width: 9px; height: 9px; border-radius: 50%; }

/* Ovládač histórie trasy (nad mapou vpravo hore) */
.map-trail {
  position: absolute; top: 12px; right: 12px; z-index: 600;
  display: flex; align-items: center; gap: 3px;
  background: rgba(20,22,26,.88); backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: 10px; padding: 4px 5px;
}
.map-trail .trail-label { font-size: 11px; color: var(--muted); padding: 0 5px 0 3px;
  text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.map-trail button {
  border: none; background: transparent; color: var(--muted); cursor: pointer;
  font: 600 12.5px var(--font); padding: 4px 9px; border-radius: 7px; transition: background-color .15s, color .15s;
}
.map-trail button:hover { color: var(--text); background: var(--ink-4); }
.map-trail button.active { background: var(--yellow); color: var(--ink); box-shadow: 0 0 10px rgba(240,194,30,.4); }
.map-trail .trail-spin { width: 12px; height: 12px; border: 2px solid var(--line-strong);
  border-top-color: var(--yellow); border-radius: 50%; animation: spin .7s linear infinite; margin: 0 4px; display: none; }
.map-trail.loading .trail-spin { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 560px) {
  /* MOBIL: mapa ostáva „luxusná" — prepínač pláva vľavo hore, legenda vľavo dole;
     pod mapu ide len pekný pruh s časovými/heat ovládačmi (nebijú sa s ničím). */
  .map-body { display: flex; flex-direction: column; }
  #map { order: 1; border-radius: 12px; }
  .map-mode { top: 10px; left: 10px; }
  .map-legend { order: 3; position: static; top: auto; bottom: auto; left: auto; margin-top: 9px; align-self: flex-start; }
  .map-trail { order: 2; position: static; top: auto; right: auto; margin-top: 10px; width: 100%; box-sizing: border-box;
    display: flex; justify-content: center; gap: 4px; padding: 5px 6px; background: var(--ink-2); }
  .map-trail .trail-label { display: none; }
  .map-trail button { flex: 1; padding: 9px 8px; font-size: 13px; }
  .map-panel.fullscreen .map-body { display: flex; }
  .map-panel.fullscreen #map { flex: 1; }
}

/* Prepínač režimu mapy (Naživo / Heatmapa) — vľavo hore */
.map-mode {
  position: absolute; top: 12px; left: 12px; z-index: 600;
  background: rgba(20,22,26,.88); backdrop-filter: blur(8px); border-color: var(--line);
}
.map-mode button { padding: 5px 12px; font-size: 12.5px; }

/* Ovládač heatmapy (vpravo hore, na mieste trasy) */
.map-heat {
  position: absolute; top: 12px; right: 12px; z-index: 600;
  display: flex; flex-direction: column; gap: 5px; align-items: stretch;
  background: rgba(20,22,26,.9); backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: 10px; padding: 7px 8px; min-width: 190px;
}
.map-heat[hidden] { display: none; }
.heat-row { display: flex; align-items: center; gap: 3px; }
.heat-row .trail-label { width: 52px; flex: none; font-size: 10.5px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.map-heat button {
  border: none; background: transparent; color: var(--muted); cursor: pointer; flex: 1;
  font: 600 12px var(--font); padding: 4px 6px; border-radius: 7px; transition: background-color .15s, color .15s;
}
.map-heat button:hover { color: var(--text); background: var(--ink-4); }
.map-heat button.active { background: var(--yellow); color: var(--ink); box-shadow: 0 0 8px rgba(240,194,30,.35); }
.heat-veh {
  width: 100%; margin-top: 1px; padding: 6px 26px 6px 9px; border-radius: 7px;
  background: var(--ink-3); border: 1px solid var(--line); color: var(--text);
  font: 600 12px var(--font); cursor: pointer; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%239aa0a9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
}
.heat-veh option { background: var(--ink-2); color: var(--text); }
.map-heat .trail-spin { width: 12px; height: 12px; border: 2px solid var(--line-strong);
  border-top-color: var(--yellow); border-radius: 50%; animation: spin .7s linear infinite;
  margin: 2px auto 0; display: none; }
.map-heat.loading .trail-spin { display: block; }

/* heatmapa — legenda s prechodom */
.map-legend .heat-scale { width: 84px; height: 9px; border-radius: 999px;
  background: linear-gradient(90deg, #1f6f78, #43d1c4, #f0c21e, #ff8f5a, #ef4d5a); }
.map-legend .heat-empty { color: var(--muted-2); font-style: italic; }

@media (max-width: 560px) {
  /* override po základných pravidlách (v zdroji nižšie): prepínač pláva, heat pruh pod mapou */
  .map-mode button { padding: 6px 15px; }
  .map-heat { position: static; order: 2; margin-top: 10px; width: 100%; min-width: 0; box-sizing: border-box;
    top: auto; right: auto; background: var(--ink-2); }
  .map-heat .heat-row .trail-label { width: 46px; }
}

/* Leaflet dark tweaks */
.leaflet-container { background: #14161a !important; font-family: var(--font) !important; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
  background: var(--ink-3); color: var(--text); border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}
.leaflet-popup-content { margin: 12px 14px; font-size: 13px; }
.leaflet-popup-content b { color: #fff; }
.leaflet-bar a { background: var(--ink-3) !important; color: var(--text) !important;
  border-color: var(--line) !important; }
.leaflet-bar a:hover { background: var(--ink-4) !important; }

/* atribúcia zbalená do malého „ⓘ" (OSM/CARTO ostáva – licencia – len sa rozbalí pri prejdení/ťuknutí) */
.leaflet-control-attribution {
  background: rgba(20,22,26,.72) !important; color: var(--muted-2) !important;
  font: 500 10px/18px var(--font) !important; height: 18px; border-radius: 999px !important;
  padding: 0 !important; margin: 0 6px 6px 0 !important; box-shadow: none !important;
  max-width: 22px; overflow: hidden; white-space: nowrap; cursor: default;
  transition: max-width .35s ease, padding .35s ease, background-color .2s;
}
.leaflet-control-attribution::before { content: "ⓘ"; display: inline-block; width: 22px; text-align: center; color: var(--muted); }
.leaflet-control-attribution:hover, .leaflet-control-attribution:active,
.leaflet-control-attribution:focus-within { max-width: 320px; padding: 0 9px 0 0 !important; }
.leaflet-control-attribution a { color: var(--muted) !important; text-decoration: none; }
.leaflet-control-attribution a:hover { color: var(--text) !important; }
.car-marker { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50% 50% 50% 4px;
  transform: rotate(45deg); color: var(--ink); box-shadow: 0 3px 10px rgba(0,0,0,.55); border: 2px solid rgba(0,0,0,.2); }
.car-marker .car-ic { width: 19px; height: 19px; transform: rotate(-45deg); fill: none;
  stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* auto zhora (sedí na ceste, otáča sa v smere jazdy) */
.car-td { width: 30px; height: 30px; display: grid; place-items: center;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.55)); transition: transform .4s ease; }

/* menovka auta nad pinom */
.leaflet-tooltip.car-tip { background: rgba(20,22,26,.92); color: #fff; border: 1px solid var(--line-strong);
  border-radius: 6px; padding: 2px 8px; font: 700 11px/1.2 var(--font); box-shadow: 0 2px 8px rgba(0,0,0,.5);
  white-space: nowrap; }
.leaflet-tooltip.car-tip::before { display: none; }

/* ------------------------------------------------------------
   Zoznam vozidiel
   ------------------------------------------------------------ */
.fleet-list { display: flex; flex-direction: column; }
.car-row {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: var(--ink-3); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px 13px; margin-bottom: 8px; transition: border-color .2s, transform .12s, box-shadow .2s;
}
.car-row:last-child { margin-bottom: 0; }
.car-row:hover { border-color: var(--line-strong); transform: translateY(-1px); box-shadow: var(--shadow-soft); }
.car-row.active { border-color: var(--yellow); box-shadow: 0 0 0 1px var(--yellow-soft); }

.car-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.car-name { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; min-width: 0; flex-shrink: 1; }
.car-plate { flex: none; font-size: 11.5px; color: var(--muted); font-variant: small-caps; letter-spacing: .04em;
  background: var(--ink); border: 1px solid var(--line); padding: 1px 7px; border-radius: 6px; }
.car-live { flex: none; margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.car-live i { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.live-moving { background: var(--ok-soft); color: #7ee2a8; } .live-moving i { background: var(--ok); }
.live-idle   { background: var(--warn-soft); color: #f2c56b; } .live-idle i { background: var(--warn); }
.live-off    { background: rgba(255,255,255,.06); color: var(--muted); } .live-off i { background: var(--muted-2); }

.car-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); margin-bottom: 9px; }
.car-meta b { color: var(--text); font-weight: 600; }

/* stavové čipy dokladov */
.doc-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600;
  padding: 4px 9px; border-radius: 8px; border: 1px solid transparent;
}
.chip i { width: 6px; height: 6px; border-radius: 50%; }
.chip.ok   { background: var(--ok-soft);   color: #7ee2a8; border-color: rgba(56,193,114,.25); } .chip.ok i{background:var(--ok)}
.chip.warn { background: var(--warn-soft);  color: #f2c56b; border-color: rgba(240,169,30,.28); } .chip.warn i{background:var(--warn)}
.chip.bad  { background: var(--bad-soft);   color: #ff9aa2; border-color: rgba(239,77,90,.3);  } .chip.bad i{background:var(--bad)}
.chip.none { background: rgba(255,255,255,.05); color: var(--muted); } .chip.none i{background:var(--muted-2)}

.badge-nogps { font-size: 11px; color: var(--muted); background: var(--ink); border: 1px dashed var(--line-strong);
  padding: 2px 8px; border-radius: 6px; }

/* ------------------------------------------------------------
   Pripomienky
   ------------------------------------------------------------ */
.reminder { display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border-radius: var(--radius-sm); background: var(--ink-3); border: 1px solid var(--line); margin-bottom: 10px; }
.reminder:last-child { margin-bottom: 0; }
.reminder .r-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.reminder.bad  .r-icon { background: var(--bad-soft);  color: var(--bad); }
.reminder.warn .r-icon { background: var(--warn-soft); color: var(--warn); }
.reminder .r-body { flex: 1; min-width: 0; }
.reminder .r-title { font-size: 14px; font-weight: 600; }
.reminder .r-sub { font-size: 12.5px; color: var(--muted); }
.reminder .r-when { font-size: 12.5px; font-weight: 600; text-align: right; white-space: nowrap; }
.reminder.bad  .r-when { color: var(--bad); }
.reminder.warn .r-when { color: var(--warn); }
.empty-state { text-align: center; color: var(--muted); padding: 28px 14px; font-size: 14px; }
.empty-state .icon { font-size: 30px; margin-bottom: 8px; color: var(--ok); }

/* ------------------------------------------------------------
   Modál (detail / editácia dokladov)
   ------------------------------------------------------------ */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 2000; background: rgba(6,7,9,.66);
  backdrop-filter: blur(3px); display: grid; place-items: center; padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal {
  width: 100%; max-width: 540px; max-height: 90vh; overflow-y: auto;
  background: var(--ink-2); border: 1px solid var(--line-strong); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); transform: translateY(12px); transition: transform .2s;
  scrollbar-width: thin; scrollbar-color: var(--ink-4) transparent;
}
.modal::-webkit-scrollbar { width: 10px; }
.modal::-webkit-scrollbar-track { background: transparent; }
.modal::-webkit-scrollbar-thumb { background: var(--ink-4); border-radius: 8px; border: 2px solid var(--ink-2); }
.modal::-webkit-scrollbar-thumb:hover { background: var(--line-strong); }
.modal-backdrop.open .modal { transform: none; }
.modal-head { position: sticky; top: 0; z-index: 5; background: var(--ink-2); display: flex; align-items: center;
  gap: 10px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 17px; }
.modal-head .spacer { flex: 1; }
.modal-body { padding: 20px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 20px; z-index: 5;
  border-top: 1px solid var(--line); position: sticky; bottom: 0; background: var(--ink-2); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 480px) { .grid-2 { grid-template-columns: 1fr; } }
.section-label { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted);
  font-weight: 600; margin: 22px 0 12px; }
.section-label:first-child { margin-top: 0; }

/* ------------------------------------------------------------
   Toast
   ------------------------------------------------------------ */
.toast-host { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 3000;
  display: flex; flex-direction: column; gap: 10px; align-items: center; }
.toast { background: var(--ink-4); border: 1px solid var(--line-strong); color: var(--text);
  padding: 12px 18px; border-radius: 12px; font-size: 14px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 10px; animation: toastIn .25s ease; }
.toast.ok { border-color: rgba(56,193,114,.4); } .toast.ok .icon { color: var(--ok); }
.toast.bad { border-color: rgba(239,77,90,.4); } .toast.bad .icon { color: var(--bad); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Vraní olej — geofence otázka */
#vraniePrompt:empty { display: none; }
.vranie-card { display: flex; align-items: center; gap: 14px; margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(240,194,30,.12), var(--ink-2)); border: 1px solid rgba(240,194,30,.35);
  border-radius: var(--radius); padding: 14px 16px; animation: fadeUp .4s ease both; }
.vranie-card .vr-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none;
  background: var(--yellow-soft); color: var(--yellow); }
.vranie-card .vr-ic .icon { width: 22px; height: 22px; }
.vranie-card .vr-body { flex: 1; min-width: 0; }
.vranie-card .vr-title { font-size: 14.5px; font-weight: 700; }
.vranie-card .vr-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.vranie-card .vr-actions { display: flex; gap: 8px; flex: none; }
@media (max-width: 560px) { .vranie-card { flex-wrap: wrap; } .vranie-card .vr-actions { width: 100%; } .vranie-card .vr-actions .btn { flex: 1; } }

/* Nápoveda: ručné km pri autách bez GPS */
.km-hint { display: flex; align-items: flex-start; gap: 10px; margin: 12px 0; padding: 11px 13px;
  background: var(--warn-soft); border: 1px solid rgba(240,169,30,.28); border-radius: var(--radius-sm);
  font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.km-hint .icon { width: 18px; height: 18px; color: var(--warn); flex: none; margin-top: 1px; }
.km-hint b { color: var(--text); }

/* Auto v servise / nedostupné */
.veh-unavail { display: flex; align-items: center; gap: 12px; margin: 12px 0; padding: 12px 14px;
  background: var(--ink-3); border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer;
  transition: border-color .2s, background-color .2s; -webkit-tap-highlight-color: transparent; }
.veh-unavail.on { border-color: rgba(240,169,30,.4); background: var(--warn-soft); }
.veh-unavail .vu-txt { flex: 1; display: flex; flex-direction: column; line-height: 1.25; }
.veh-unavail small { color: var(--muted-2); font-size: 11.5px; }
.car-row.unavailable { opacity: .72; }
.car-badge-serv { flex: none; margin-left: auto; font-size: 12px; font-weight: 700; color: #f2c56b;
  background: var(--warn-soft); border: 1px solid rgba(240,169,30,.3); padding: 3px 9px; border-radius: 999px; white-space: nowrap; }

/* Servisné intervaly */
.si-list { display: flex; flex-direction: column; gap: 7px; }
.si-row { display: flex; align-items: center; gap: 10px; background: var(--ink-3); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 9px 11px; }
.si-main { flex: 1; min-width: 0; }
.si-type { font-weight: 600; font-size: 13.5px; }
.si-info { font-size: 12px; color: var(--muted-2); }

/* História zmien (audit) */
.audit-list { display: flex; flex-direction: column; gap: 2px; }
.audit-row { display: flex; gap: 11px; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.audit-row:last-child { border-bottom: 0; }
.audit-ico { font-size: 16px; line-height: 1.4; flex: none; width: 22px; text-align: center; }
.audit-body { min-width: 0; }
.audit-detail { font-size: 13px; }
.audit-ts { font-size: 11px; color: var(--muted-2); margin-top: 1px; }

/* Rýchle kontakty */
.contact-list { display: flex; flex-direction: column; gap: 8px; }
.contact-row { display: flex; align-items: center; gap: 12px; background: var(--ink-3); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 11px 13px; transition: border-color .15s, transform .1s; }
.contact-row:hover { border-color: var(--yellow); transform: translateY(-1px); }
.contact-ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex: none;
  background: var(--ok-soft); color: var(--ok); }
.contact-ic .icon { width: 20px; height: 20px; }
.contact-body { flex: 1; min-width: 0; }
.contact-name { font-weight: 600; font-size: 14px; }
.contact-note { font-size: 12px; color: var(--muted-2); }
.contact-phone { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.contact-edit { background: var(--ink-3); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 10px; }
.contact-edit .field { margin-bottom: 10px; }

/* Zámok appky (PIN / Face ID) */
body.locked { overflow: hidden; }
.app-lock { position: fixed; inset: 0; z-index: 5000; display: none; place-items: center; padding: 24px;
  background: radial-gradient(700px 400px at 50% -10%, rgba(240,194,30,.10), transparent 60%), var(--ink); }
.app-lock.show { display: grid; }
.lock-card { width: 100%; max-width: 320px; text-align: center; }
.lock-logo { width: 66px; height: 66px; border-radius: 18px; margin: 0 auto 14px; object-fit: cover;
  box-shadow: 0 0 0 1px rgba(240,194,30,.35), 0 0 26px rgba(240,194,30,.45); }
.lock-title { font-size: 20px; font-weight: 700; }
.lock-sub { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.lock-dots { display: flex; gap: 14px; justify-content: center; margin: 20px 0 8px; }
.lock-dots span { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-strong); transition: background-color .15s, border-color .15s; }
.lock-dots span.on { background: var(--yellow); border-color: var(--yellow); box-shadow: 0 0 10px rgba(240,194,30,.5); }
.lock-err { min-height: 18px; font-size: 13px; color: var(--bad); font-weight: 600; }
.lock-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 12px auto 0; max-width: 280px; }
.lock-key { aspect-ratio: 1; border-radius: 50%; border: 1px solid var(--line); background: var(--ink-3);
  color: var(--text); font: 600 24px var(--font); cursor: pointer; transition: background-color .12s, transform .08s; }
.lock-key:hover { background: var(--ink-4); }
.lock-key:active { transform: scale(.93); }
.lock-key.empty { background: transparent; border: 0; cursor: default; }
.lock-bio { margin-top: 18px; border: 1px solid var(--line); background: var(--ink-3); color: var(--text);
  border-radius: 999px; padding: 11px 20px; font: 600 14px var(--font); cursor: pointer; }
.lock-bio:hover { background: var(--ink-4); border-color: var(--yellow); }

/* Koliesko nastavení — pootočí sa pri prejdení myšou */
#notifyBtn .settings-cog { transition: transform .55s cubic-bezier(.34, 1.2, .4, 1); }
#notifyBtn:hover .settings-cog { transform: rotate(90deg); }

/* Nastavenia upozornení (modál) */
.nt-status { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 600;
  padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--ink-3); }
.nt-status.ok { color: #7ee2a8; border-color: rgba(56,193,114,.3); background: var(--ok-soft); }
.nt-status.off { color: var(--muted); }
.nt-status.warn { color: #f2c56b; border-color: rgba(240,169,30,.28); background: var(--warn-soft); font-size: 13px; font-weight: 500; line-height: 1.5; }
.nt-status.warn small { color: var(--muted); }
.nt-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px rgba(56,193,114,.6); }
.nt-actions { display: flex; gap: 9px; margin-top: 12px; }
.nt-status + .btn { margin-top: 12px; }
.nt-toggles { display: flex; flex-direction: column; gap: 7px; }
.nt-toggle { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: var(--radius-sm);
  background: var(--ink-3); border: 1px solid var(--line); cursor: pointer;
  transition: border-color .18s, background-color .18s; -webkit-tap-highlight-color: transparent; }
.nt-toggle:hover { border-color: var(--line-strong); background: var(--ink-4); }
.nt-toggle:active { transform: scale(.995); }
.nt-toggle .nt-lbl { flex: 1; font-size: 14px; font-weight: 500; user-select: none; }
/* natívny checkbox skrytý, stav nesie */
.nt-toggle input, .veh-unavail input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
/* animovaný prepínač (zdieľaný) */
.nt-switch { position: relative; flex: none; width: 48px; height: 28px; border-radius: 999px;
  background: var(--ink); border: 1px solid var(--line-strong);
  transition: background-color .28s ease, border-color .28s ease, box-shadow .28s ease; }
.nt-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--muted); box-shadow: 0 1px 4px rgba(0,0,0,.5);
  transition: transform .3s cubic-bezier(.34,1.4,.5,1), background-color .28s ease; }
input:checked ~ .nt-switch { background: var(--yellow); border-color: var(--yellow);
  box-shadow: 0 0 0 1px rgba(240,194,30,.35), 0 0 12px rgba(240,194,30,.4); }
input:checked ~ .nt-switch::after { transform: translateX(20px); background: var(--ink); }
input:focus-visible ~ .nt-switch { outline: 2px solid var(--yellow); outline-offset: 2px; }
/* „v servise" prepínač je oranžový (výstražný) */
.veh-unavail input:checked ~ .nt-switch { background: var(--warn); border-color: var(--warn);
  box-shadow: 0 0 0 1px rgba(240,169,30,.35), 0 0 12px rgba(240,169,30,.4); }
.nt-note { font-size: 12px; color: var(--muted-2); margin: 10px 0 4px; line-height: 1.5; }
.nt-note b { color: var(--muted); }

/* iOS rada „Pridať na plochu" */
.ios-hint { position: fixed; left: 12px; right: 12px; bottom: 14px; z-index: 2500;
  display: flex; align-items: center; gap: 11px; max-width: 460px; margin: 0 auto;
  background: var(--ink-4); border: 1px solid var(--line-strong); border-radius: 14px;
  padding: 12px 14px; box-shadow: var(--shadow); font-size: 13px; animation: toastIn .3s ease; }
.ios-hint .icon { width: 22px; height: 22px; color: var(--yellow); flex: none; }
.ios-hint b { color: var(--text); }
.ios-hint span { flex: 1; color: var(--muted); line-height: 1.4; }
.ios-hint-x { border: none; background: transparent; color: var(--muted-2); font-size: 15px;
  cursor: pointer; padding: 2px 6px; flex: none; }
.ios-hint-x:hover { color: var(--text); }

.skeleton { background: linear-gradient(90deg, var(--ink-3) 25%, var(--ink-4) 37%, var(--ink-3) 63%);
  background-size: 400% 100%; animation: shimmer 1.4s infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { 0%{background-position:100% 0} 100%{background-position:-100% 0} }

/* ------------------------------------------------------------
   Sprievodca appkou (guided tour / spotlight coach-marks)
   ------------------------------------------------------------ */
.tour-catch { position: fixed; inset: 0; z-index: 9990; background: transparent;
  transition: background-color .3s ease; -webkit-tap-highlight-color: transparent; }
/* zvýraznená diera = element bez výplne; box-shadow stmaví okolie a obtiahne žltou */
.tour-spot { position: fixed; z-index: 9995; pointer-events: none; left: 0; top: 0; width: 0; height: 0;
  border-radius: 14px; opacity: 0;
  box-shadow: 0 0 0 9999px rgba(6,7,9,.74), 0 0 0 2px rgba(240,194,30,.9), 0 0 26px 6px rgba(240,194,30,.45);
  transition: left .42s cubic-bezier(.4,0,.2,1), top .42s cubic-bezier(.4,0,.2,1),
    width .42s cubic-bezier(.4,0,.2,1), height .42s cubic-bezier(.4,0,.2,1), opacity .3s ease; }
.tour-spot::after { content: ""; position: absolute; inset: -3px; border-radius: 17px;
  box-shadow: 0 0 0 2px rgba(240,194,30,.55); animation: tourPulse 1.9s ease-in-out infinite; }
@keyframes tourPulse { 0%,100% { opacity: .2; } 50% { opacity: .85; } }

.tour-coach { position: fixed; z-index: 9999; width: 400px; max-width: calc(100vw - 20px);
  background: var(--ink-3); border: 1px solid rgba(240,194,30,.34); border-radius: 18px;
  padding: 22px 24px 20px; box-shadow: var(--shadow), 0 0 0 1px rgba(240,194,30,.12);
  transition: left .4s cubic-bezier(.4,0,.2,1), top .4s cubic-bezier(.4,0,.2,1), opacity .25s ease;
  animation: tourCoachIn .3s ease; }
.tour-coach.center { left: 50%; top: 50%; transform: translate(-50%,-50%); animation: none; }
.tour-coach.leaving { opacity: 0; }
@keyframes tourCoachIn { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; } }
.tour-badge { display: inline-block; font-size: 12px; font-weight: 600; color: var(--ink);
  background: var(--yellow); padding: 4px 12px; border-radius: 999px; box-shadow: 0 0 12px rgba(240,194,30,.4); }
.tour-title { font-size: 20px; font-weight: 700; letter-spacing: -.01em; margin: 12px 0 7px; }
.tour-text { font-size: 15px; color: var(--muted); line-height: 1.62; margin: 0 0 17px; }
.tour-text b { color: var(--text); font-weight: 600; }
.tour-bar { height: 5px; border-radius: 999px; background: var(--ink); overflow: hidden; margin-bottom: 17px; }
.tour-bar i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--yellow);
  box-shadow: 0 0 8px rgba(240,194,30,.5); transition: width .4s ease; }
.tour-actions { display: flex; align-items: center; gap: 9px; }
.tour-actions .spacer { flex: 1; }
.tour-coach .btn { padding: 11px 20px; font-size: 15px; }
.tour-coach .btn-quiet { padding: 11px 12px; }
/* na širokom monitore ešte o kúsok väčšia a čitateľnejšia */
@media (min-width: 900px) {
  .tour-coach { width: 440px; padding: 26px 28px 22px; border-radius: 20px; }
  .tour-title { font-size: 22px; }
  .tour-text { font-size: 16px; line-height: 1.65; }
}

@media (prefers-reduced-motion: reduce) {
  .tour-spot, .tour-coach, .tour-bar i { transition: opacity .2s ease !important; }
  .tour-spot::after, .tour-coach { animation: none; }
}
.tour-coach.tour-reduce { animation: none; }

@media (max-width: 560px) {
  .tour-coach { left: 10px !important; right: 10px !important; top: auto !important;
    bottom: 12px !important; width: auto !important; max-width: none !important; transform: none !important;
    padding: 15px 17px 13px; border-radius: 16px; }
  .tour-coach.center { top: auto !important; bottom: 12px !important; }
  .tour-badge { font-size: 11.5px; padding: 3px 10px; }
  .tour-title { font-size: 17px; margin: 9px 0 5px; }
  .tour-text { font-size: 13.5px; line-height: 1.5; margin: 0 0 12px; }
  .tour-bar { height: 4px; margin-bottom: 12px; }
  .tour-actions { gap: 8px; }
  .tour-coach .btn { padding: 10px 15px; font-size: 14px; }
  .tour-coach .btn-quiet { padding: 10px 10px; }
}

/* nenápadný podpis úplne dole */
.app-footer { text-align: center; padding: 30px 16px calc(34px + env(safe-area-inset-bottom));
  font-size: 11.5px; font-weight: 500; letter-spacing: .02em; color: var(--muted-2); opacity: .55;
  transition: opacity .2s; }
.app-footer:hover { opacity: .85; }
.app-footer .ft-heart { color: #ef4d5a; }
