/* ===================================================================
   TramStats â€“ styles.css (sjednoceno a setÅ™Ã­dÄ›no)
   - design tokeny + reset
   - typografie a utility
   - layout: header, navbar, footer, container
   - komponenty: tabulky, tlaÄÃ­tka, chipy, formulÃ¡Å™e
   - akÄnÃ­ overlaye a plovoucÃ­ toolbar
   - show + galerie (vÄetnÄ› placeholderÅ¯)
   - pager, flash, doplÅˆky
   - edit specifika
   - kalendÃ¡Å™
   - vehicles (index + detail)
   - lines (scoped)
   - photo index grid
   - RWD zÃ³ny
=================================================================== */

/* =========================================
   0) Design Tokens & Reset
========================================= */
:root{
  /* barvy */
  --bg:#121212;
  --surface:#1e1e1e;
  --surface-2:#171717;       /* hover a jemnÃ© vrstvy */
  --surface-3:#202225;       /* lehkÃ© zvÃ½raznÄ›nÃ­ */
  --line:#2c2c2c;

  --fg:#e0e0e0;
  --text-2:#a8a8a8;          /* tlumenÃ½ text */
  --muted:#9e9e9e;

  --primary:#03dac6;
  --danger:#cf6679;
  --warn:#fbc02d;
  --z-base:0;
  --z-navbar:95;
  --z-header:100;
  --z-dropdown:500;
  --z-floating-backdrop:600;
  --z-floating-panel:610;
  --z-preview:700;
  --z-autocomplete:900;
  --z-overlay:1000;
  --z-modal:1100;
  --z-modal-ui:1200;

  /* kalendÃ¡Å™nÃ­ vÃ½Å¡ka bunÄ›k â€“ volitelnÃ© */
  --cal-cell-h:auto;
}

*{box-sizing:border-box}
html,body{
  margin:0;padding:0;
  background:var(--bg);color:var(--fg);
  font:15px/1.5 "Roboto",system-ui,-apple-system,sans-serif;
}
a{color:var(--primary);text-decoration:none}
a:hover{text-decoration:underline}
.container{max-width:1100px;margin:0 auto;padding:20px}
#main-content.container{padding-top:24px;padding-bottom:36px}
.muted{color:var(--muted)}

/* shared page shell */
.page-shell{display:flex;flex-direction:column;gap:18px;min-width:0}
.page-section,.content-section{display:block;min-width:0}
.section-gap{display:flex;flex-direction:column;gap:20px}
.page-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap}
.page-title{margin:0}
.page-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.page-intro{margin:0;color:var(--muted);line-height:1.5}
.error-page-card{
  max-width:760px;
  margin:24px auto 0;
  padding:24px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:18px;
  box-shadow:0 12px 28px rgba(0,0,0,.22);
  display:flex;
  flex-direction:column;
  gap:16px;
}
.error-page-card h1{
  margin:0;
}
.error-page-code{
  font-size:.86rem;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--primary);
}

/* shared topbar / toolbar rhythm */
.topbar{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.topbar h1{margin:0}
.page-meta{margin-top:4px;font-size:.92rem;color:var(--muted)}
.subactions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}
.toolbar{
  display:flex;
  align-items:flex-end;
  gap:12px;
  flex-wrap:wrap;
}
.filter-toolbar{
  display:flex;
  flex-direction:column;
  gap:14px;
}
.toolbar-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

/* =========================================
   1) Typografie, znaÄky, utility
========================================= */
h1{margin:0 0 20px;font-weight:500}
.badge{display:inline-block;padding:2px 8px;border-radius:6px;background:var(--line);font-size:.85em;color:var(--fg)}
.nowrap{white-space:nowrap}
.line-badge{display:inline-block;padding:2px 8px;border-radius:8px;font-weight:600;font-size:.9rem;line-height:1.4}
.muted.small span[title]{cursor:help}

/* Flex utilitky */
.flex{display:flex}
.inline{display:inline}
.ai-center{align-items:center}
.jc-between{justify-content:space-between}
.jc-center{justify-content:center}
.gap-4{gap:4px}.gap-6{gap:6px}.gap-8{gap:8px}.gap-12{gap:12px}
.mt-16{margin-top:16px}.mb-12{margin-bottom:12px}.mb-16{margin-bottom:16px}
.w-100{width:100%}.w-4em{width:4em}.w-45em{width:4.5em}.w-5em{width:5em}.w-6em{width:6em}
.flex-1{flex:1}.flex-1-320{flex:1 1 320px}
.small{font-size:.85em}

/* =========================================
   2) Header (hlaviÄka)
========================================= */
.header{position:sticky;top:0;z-index:var(--z-header);background:var(--bg);border-bottom:1px solid var(--line)}
.header__row{display:flex;align-items:center;gap:12px;min-height:72px}
.brand{font-weight:600;font-size:18px}
.header__spacer{flex:1 1 auto}
.header__user{display:flex;align-items:center;gap:12px}
.header__user-name{font-weight:600;color:var(--fg)}
.header__user-link{color:var(--muted);text-decoration:none}
.header__user-link:hover{color:var(--primary);text-decoration:none}
.icon-only{width:40px;aspect-ratio:1/1;padding:0;display:inline-grid;place-items:center}
.show-on-mobile{display:none}
.nav-toggle{font-size:1.2rem;line-height:1}

/* =========================================
   3) Navigace (menu)
========================================= */
.navbar{position:sticky;top:73px;z-index:var(--z-navbar);background:var(--bg);border-bottom:1px solid var(--line)}
.navbar .container{max-width:1100px;margin:0 auto;padding:0 20px}
.navbar .nav-list{display:flex;gap:6px;list-style:none;margin:0;padding:8px 0;overflow:visible;align-items:center}
.navbar .nav-item{list-style:none;flex:0 0 auto}
.navbar .nav-link{display:flex;align-items:center;gap:8px;padding:8px 12px;border-radius:10px;white-space:nowrap;color:var(--fg);text-decoration:none}
.navbar .nav-link:hover{color:var(--primary);background:transparent;text-decoration:none}
.navbar .nav-link.is-active{color:var(--primary);background:transparent}
.navbar{overflow-x:clip}
.nav-mobile-user{display:none}

/* =========================================
   4) Footer (patiÄka)
========================================= */
.footer{border-top:1px solid var(--line);opacity:.95}
.footer__row{display:flex;align-items:center;gap:12px;justify-content:space-between}
.footer__links{display:flex;gap:12px}

/* =========================================
   5) Tabulky a seznamy
========================================= */
.table-wrap{background:var(--surface);border-radius:12px;box-shadow:0 2px 6px rgba(0,0,0,.5);overflow:hidden}
.table-wrap.scroll-x{overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}
.table-wrap.scroll-x>.table{min-width:720px}
.table{width:100%;border-collapse:collapse}
.table th,.table td{padding:9px 12px;border-bottom:1px solid var(--line);text-align:left;vertical-align:middle}
#partsTable td{padding:12px 8px}
.table th{background:#1b1b1b;font-weight:600;text-transform:none;font-size:.84rem;letter-spacing:0;color:var(--muted)}
.table tbody tr:hover{background:rgba(255,255,255,.04)}
.table td.tab-center,.table th.tab-center{text-align:center}
.table .num,.num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.table .nowrap,.nowrap{white-space:nowrap}
.table th.actions,.table td.actions,.table-actions{text-align:right;white-space:nowrap}
.table td.actions{width:1%}
.table td code{white-space:normal;word-break:break-word}
.table-empty td,
.table td.table-empty{
  padding:14px 12px;
  color:var(--muted);
  text-align:left;
}
.table tbody tr.table-empty-row:hover,
.table tbody tr.is-empty:hover{background:transparent}
.table-clickable-row,
tr.has-rowlink,
.table tbody tr.vehicle-row{cursor:pointer}
.table-clickable-row:hover td,
tr.has-rowlink:hover td,
.table tbody tr.vehicle-row:hover td{background:rgba(255,255,255,.03)}

/* dvouÅ™Ã¡dkovÃ© Äasy */
.twolines{line-height:1.25}
.twolines div+div{color:var(--muted)}

/* oddÄ›lovaÄ v tabulce */
.thin-sep{background-color:transparent}
.table tr.thin-sep td{padding:0!important;min-height:0;height:auto;border:0;line-height:0;background:transparent!important;font-size:0}
.shejdr-divider{
  display:flex;
  align-items:center;
  gap:12px;
  padding:0;
  color:color-mix(in srgb, var(--primary) 72%, var(--fg));
  font-size:.82rem;
  font-weight:700;
  letter-spacing:.02em;
  line-height:1.2;
}
.shejdr-divider::before,
.shejdr-divider::after{
  content:"";
  flex:1 1 auto;
  height:1px;
  background:color-mix(in srgb, var(--primary) 26%, var(--line));
}

/* zvÃ½raznÄ›nÃ­ Å™Ã¡dkÅ¯ dle typu */
tr.row-green{background:rgba(0,160,80,.08)}
tr.row-red{background:rgba(220,60,60,.08)}
.table td.type-wide{text-align:left!important}
.type-wide{font-weight:500}

/* klikacÃ­ Å™Ã¡dek */
tr.has-rowlink{position:relative}
tr.has-rowlink .row-link{position:absolute;inset:0;z-index:1;display:block;text-indent:-9999px}
tr.has-rowlink:hover td{background:rgba(255,255,255,.03)}
td.actions,td.actions *{position:relative;z-index:2}

/* Akce â€“ stÅ™ed tlaÄÃ­tka â‹¯ */
td.actions{width:64px;padding:0;position:relative}
td.actions .kebab-btn{position:absolute;inset:0;margin:auto}

/* prvnÃ­ sloupec s kebabem (parts) */
.table.parts td.actions{width:48px;padding:0;text-align:center}
.kebab-btn.small{width:32px;height:32px;line-height:1;border-radius:8px;cursor:pointer}

/* pÅ™ekryv pÅ™es celÃ½ Å™Ã¡dek */
.part-row{position:relative}
.row-actions-overlay{position:absolute;inset:0;display:flex;gap:.5rem;justify-content:flex-start;align-items:center;background:rgba(0,0,0,.65);backdrop-filter:blur(2px);z-index:5;padding:8px 10px}
.row-actions-overlay .icon-btn{min-width:32px;height:32px;border-radius:8px}

/* =========================================
   6) Chipy, klÃ­Äe, stavy
========================================= */
.chip{display:inline-block;background:var(--line);color:var(--fg);padding:4px 10px;border-radius:9999px;font-size:.9em;margin:1px 0;font-weight:600}
.chip.warn{background:var(--warn);color:#000}
.chip.special{background:#8e24aa;color:#fff}
.key-toggle{opacity:.55}
.key-toggle.final{opacity:1}
.chip-sub{opacity:.9;font-size:.9em;margin-left:2px}
.part-tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.part-tags.show-tags{margin-top:6px}
.tag-picker{position:relative;display:inline-block;margin-top:6px}
.tag-toggle{
  display:inline-flex;align-items:center;gap:6px;
  min-height:30px;padding:4px 10px;border-radius:999px;
  border:1px solid var(--line);background:var(--surface-2);color:var(--fg);
  cursor:pointer;font:inherit;line-height:1
}
.tag-toggle:hover{background:var(--surface-3)}
.tag-toggle.has-selection{
  border-color:color-mix(in srgb, var(--primary) 55%, transparent);
  background:color-mix(in srgb, var(--primary) 12%, var(--surface-2));
  color:var(--primary)
}
.tag-toggle [data-tag-count="1"]{min-width:1ch;font-weight:700}
.tag-panel{
  position:absolute;right:0;top:calc(100% + 6px);z-index:var(--z-dropdown);
  width:min(320px, 70vw);padding:10px;border-radius:12px;
  border:1px solid var(--line);background:var(--surface);
  box-shadow:0 10px 30px rgba(0,0,0,.45)
}
.tag-options{display:flex;flex-wrap:wrap;gap:6px}
.tag-pill{display:inline-flex;align-items:center;cursor:pointer;position:relative}
.tag-pill input{
  position:absolute;
  width:1px;height:1px;
  padding:0;margin:-1px;border:0;
  overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);
  white-space:nowrap;opacity:0;pointer-events:none
}
.tag-pill .chip{
  border:1px solid var(--line);
  background:transparent;
  color:var(--fg);
  opacity:.78;
  transition:background .15s,border-color .15s,opacity .15s,box-shadow .15s,color .15s
}
.tag-pill:hover .chip{opacity:.92;border-color:color-mix(in srgb, var(--primary) 40%, transparent)}
.tag-pill input:checked + .chip{
  opacity:1;
  border-color:color-mix(in srgb, var(--primary) 60%, transparent);
  box-shadow:0 0 0 2px rgba(3,218,198,.16)
}
.tag-pill.inactive .chip{opacity:.6;filter:saturate(.65)}
.parts-wrap{overflow:visible}
#partsTable td{overflow:visible}
.part-note-wrap{position:relative;display:block}
#tagAutocompleteDropdown{
  position:fixed;
  z-index:var(--z-autocomplete);
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:10px;
  box-shadow:0 10px 30px rgba(0,0,0,.45);
  max-height:176px;
  overflow-y:auto;
  overflow-x:hidden;
  display:block;
  padding:6px;
}
#tagAutocompleteDropdown[hidden]{display:none!important}
.tag-autocomplete-item{
  appearance:none;
  -webkit-appearance:none;
  display:block;
  width:100%;
  min-height:38px;
  padding:7px 10px;
  border:1px solid transparent;
  border-radius:8px;
  background:var(--surface-2);
  color:var(--fg);
  text-align:left;
  cursor:pointer;
  font:inherit;
  line-height:1.25;
  box-shadow:none;
  outline:none
}
.tag-autocomplete-item + .tag-autocomplete-item{margin-top:4px}
.tag-autocomplete-item:hover,
.tag-autocomplete-item.is-active{
  background:color-mix(in srgb, var(--primary) 16%, var(--surface-2));
  border-color:color-mix(in srgb, var(--primary) 45%, transparent);
  color:var(--fg)
}

/* =========================================
   7) TlaÄÃ­tka
========================================= */
.btn{display:inline-flex;align-items:center;justify-content:center;padding:10px 14px;border-radius:12px;background:var(--line);color:var(--fg);border:1px solid transparent;cursor:pointer;transition:background .15s,transform .06s,box-shadow .15s}
.btn:hover{background:#2a2a2a;transform:translateY(-1px)}
.btn:focus{outline:2px solid var(--primary);outline-offset:2px}
.btn.primary{background:var(--primary);color:#000}
.btn.primary:hover{filter:brightness(.95)}
.btn.ghost{background:transparent;border-color:var(--line)}
.btn.danger{background:var(--danger);color:#000}
.btn[disabled]{opacity:.5;cursor:not-allowed;transform:none}

/* ikonovÃ¡ tlaÄÃ­tka */
.icon-btn{display:inline-flex;align-items:center;justify-content:center;height:32px;min-width:32px;padding:0 8px;border-radius:8px;background:transparent;border:1px solid var(--line);color:var(--fg);box-shadow:0 1px 2px rgba(0,0,0,.4);transition:transform .06s,background .15s;cursor:pointer}
.icon-btn:hover{background:#2a2d31;transform:translateY(-1px)}
.icon-btn:focus{outline:2px solid var(--primary);outline-offset:2px}
.icon-btn:active{transform:translateY(1px)}
.icon{font-family:'Material Icons';font-weight:normal;font-style:normal;font-size:24px;line-height:1}
.icon-btn.edit:hover{background:var(--warn);color:#000}
.icon-btn.delete:hover{background:var(--danger);color:#000}

/* =========================================
   8) FormulÃ¡Å™e
========================================= */
label{display:block;font-size:.9em;color:var(--muted);margin-bottom:6px}
.input,select,textarea{width:100%;padding:10px 12px;background:var(--surface);border:1px solid var(--line);border-radius:10px;color:var(--fg);outline:none;transition:border-color .15s,box-shadow .15s,background .15s}
.input:focus,select:focus,textarea:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(3,218,198,.15)}
input[readonly],.input[readonly],select[disabled],textarea[readonly]{opacity:.75;cursor:not-allowed}
.form-row{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:16px}
.form-stack{display:flex;flex-direction:column;gap:18px}
.form-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:14px;
}
.form-grid--compact{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}
.form-grid--upload{grid-template-columns:repeat(auto-fit,minmax(320px,1fr));align-items:start}
.form-field{
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width:0;
}
.form-field--full{grid-column:1 / -1}
.form-field > label{margin:0}
.form-field > .input,
.form-field > select,
.form-field > textarea{width:100%}
.form-field textarea.input{min-height:104px}
.form-field input[type="file"].input{padding:9px 12px}
.check-field{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:44px;
  color:var(--fg);
  margin-top:22px;
}
.check-field input[type="checkbox"]{
  width:16px;
  height:16px;
  margin:0;
  accent-color:var(--primary);
}
.help-text,
.field-help{
  font-size:.85rem;
  line-height:1.45;
  color:var(--muted);
}
.field-error{
  font-size:.85rem;
  line-height:1.4;
  color:var(--danger);
}
.error-list{
  margin:6px 0 0 18px;
  padding:0;
}
.error-list li + li{margin-top:4px}

/* Save bar */
.savebar,
.form-actions{
  display:flex;
  gap:8px;
  justify-content:flex-end;
  align-items:center;
  flex-wrap:wrap;
  margin-top:4px;
}
.form-actions--split{justify-content:space-between}

/* validace + alerty */
.input.warn{border-color:var(--warn);box-shadow:0 0 0 3px color-mix(in srgb,var(--warn) 20%, transparent)}
.input.is-invalid{border-color:var(--danger);box-shadow:0 0 0 3px color-mix(in srgb,var(--danger) 20%, transparent)}
.field{position:relative}
.hint.warn-msg{position:absolute;left:0;bottom:-1.2em;font-size:.8em;color:var(--warn);display:none}
.hint.warn-msg.show{display:block}
.alert{margin:12px 0;padding:12px;border-radius:10px;border:1px solid var(--line);background:var(--surface)}
.alert.warn{border-color:color-mix(in srgb,var(--warn) 55%, transparent);background:color-mix(in srgb,var(--warn) 10%, var(--surface));color:#000}
.alert.warn strong{color:#000}
.alert.warn ul{margin:6px 0 0 18px}
.flash strong{display:block;margin-bottom:4px}
.flash ul{margin:6px 0 0 18px;padding:0}

/* =========================================
   9) AkÄnÃ­ overlaye a plovoucÃ­ toolbar
========================================= */
.icon-col{width:80px;text-align:center}
.icon-group{display:flex;gap:4px;justify-content:center}
.table-actions{margin-top:1rem;text-align:right}

#float-actions[hidden],#fa-backdrop[hidden]{display:none!important}
#fa-backdrop{position:fixed;inset:0;z-index:var(--z-floating-backdrop);background:transparent}
.kebab-btn{width:36px;height:36px;display:flex;align-items:center;justify-content:center;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--fg);cursor:pointer;user-select:none;line-height:1}
.kebab-btn:hover{background:rgba(255,255,255,.06)}

/* plovoucÃ­ panel â€“ jednotnÃ¡ definice */
.float-actions{position:fixed;z-index:var(--z-floating-panel);display:flex;gap:8px;padding:8px 10px;border-radius:12px;border:1px solid var(--line);background:rgba(18,18,18,.96);box-shadow:0 12px 28px rgba(0,0,0,.45);backdrop-filter:saturate(140%) blur(4px)}
.float-actions .icon-btn,.float-actions button.icon-btn{width:36px;height:36px;border-radius:10px;border:1px solid var(--line);background:var(--surface-3);color:var(--fg);text-decoration:none;cursor:pointer}
.float-actions .icon-btn:hover{background:rgba(255,255,255,.06)}
.float-actions .material-icons{font-size:18px;line-height:1}
.float-actions .danger{color:var(--danger);border-color:rgba(255,255,255,.18)}

/* =========================================
   10) Show: hlaviÄnÃ­ grid a galerie (+ placeholdery)
========================================= */
.header-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:stretch;margin-bottom:15px}
.header-grid>.table-wrap,.header-grid>.gallery-box{height:100%}

.shift-show-page > h1{margin-bottom:0}
.shift-show-page .shift-show-actions{
  gap:12px;
  flex-wrap:wrap;
  align-items:flex-start;
}
.shift-show-page .shift-show-actions .actions-left,
.shift-show-page .shift-show-actions .actions-right{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.shift-show-page .shift-show-summary,
.shift-show-page .shift-show-gallery,
.shift-show-page .shift-show-parts-wrap{
  min-width:0;
}
.shift-show-page .shift-show-parts-wrap.scroll-x > .table{
  min-width:0;
}
.shift-show-page .shift-show-summary.scroll-x > .table{min-width:480px}
.shift-show-page .shift-show-summary .table th,
.shift-show-page .shift-show-summary .table td{vertical-align:middle}
.shift-show-page .shift-show-summary .table td{overflow-wrap:anywhere}
.shift-show-page .shift-show-gallery .gallery-main{min-height:0}
.shift-show-page .shift-show-parts{min-width:0}
.shift-show-page .shift-show-parts-desktop{min-width:920px}
.shift-show-page .shift-show-parts-responsive{display:none}
.shift-show-page .shift-show-parts th,
.shift-show-page .shift-show-parts td{vertical-align:middle}
.shift-show-page .shift-show-parts .part-main-row.has-desktop-detail td{border-bottom-color:transparent}
.shift-show-page .shift-show-parts th:nth-child(1),
.shift-show-page .shift-show-parts th:nth-child(2),
.shift-show-page .shift-show-parts th:nth-child(3),
.shift-show-page .shift-show-parts th:nth-child(4),
.shift-show-page .shift-show-parts th:nth-child(5),
.shift-show-page .shift-show-parts th:nth-child(6),
.shift-show-page .shift-show-parts th:nth-child(7),
.shift-show-page .shift-show-parts th:nth-child(8),
.shift-show-page .shift-show-parts td:nth-child(1),
.shift-show-page .shift-show-parts td:nth-child(2),
.shift-show-page .shift-show-parts td:nth-child(3),
.shift-show-page .shift-show-parts td:nth-child(4),
.shift-show-page .shift-show-parts td:nth-child(5),
.shift-show-page .shift-show-parts td:nth-child(6),
.shift-show-page .shift-show-parts td:nth-child(7),
.shift-show-page .shift-show-parts td:nth-child(8){white-space:nowrap}
.shift-show-page .shift-show-parts .ev-cell{
  flex-wrap:nowrap;
  min-width:max-content;
}
.shift-show-page .part-mobile-detail-row{display:none}
.shift-show-page .part-mobile-detail-row.has-desktop-detail{display:table-row}
.shift-show-page .part-mobile-detail-row td{
  padding-top:0;
  border-top:0;
  background:transparent;
}
.shift-show-page .part-mobile-detail{
  display:grid;
  gap:6px;
  padding:0 0 6px;
  color:var(--muted);
  font-size:.9rem;
}
.shift-show-page .part-mobile-detail--desktop-note{
  justify-items:end;
  text-align:right;
}
.shift-show-page .part-mobile-detail-label{
  color:var(--muted);
  font-weight:600;
  margin-right:6px;
}
.shift-show-page .part-mobile-detail-note{
  display:flex;
  align-items:flex-start;
  gap:8px;
  line-height:1.45;
  overflow-wrap:anywhere;
}
.shift-show-page .part-mobile-detail-tags{
  display:grid;
  gap:6px;
}
.shift-show-page .part-mobile-detail--desktop-note .part-mobile-detail-tags{
  justify-items:end;
}
.shift-show-page .part-mobile-detail--desktop-note .part-tags{
  justify-content:flex-end;
}
.shift-show-page .part-main-row.has-desktop-detail:hover td,
.shift-show-page .part-main-row.has-desktop-detail:hover + .part-mobile-detail-row td{
  background:rgba(255,255,255,.04) !important;
}
.shift-show-page .part-mobile-detail-row:hover td{
  background:transparent !important;
}
.shift-show-page .part-mobile-photo-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:44px;
  height:30px;
  overflow:hidden;
  border-radius:8px;
  border:1px solid var(--line);
  background:#0d0d0d;
}
.shift-show-page .part-mobile-photo-link img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.shift-show-page .shift-show-parts .photo-cell{
  padding-top:4px;
  padding-bottom:4px;
  line-height:0;
}
.shift-show-page .shift-show-parts .photo-pill{
  width:28px;
  height:28px;
  padding:0;
  margin-inline:auto;
  margin-block:0;
  line-height:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  border-radius:7px;
}
.shift-show-page .shift-show-parts .part-photo-trigger{
  min-height:0;
  width:28px;
  height:28px;
  padding:0;
  border:0;
  background:transparent;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  line-height:0;
  border-radius:7px;
  transition:transform .14s ease, box-shadow .14s ease, outline-color .14s ease, background-color .14s ease;
}
.shift-show-page .shift-show-parts .part-photo-trigger:hover,
.shift-show-page .shift-show-parts .part-photo-trigger:focus-visible{
  transform:scale(1.04);
  box-shadow:0 0 0 1px color-mix(in srgb, var(--primary) 44%, transparent), 0 0 12px rgba(0,229,255,.12);
  background:color-mix(in srgb, var(--primary) 10%, transparent);
}
.shift-show-page .shift-show-parts .part-photo-trigger:focus-visible{
  outline:1px solid color-mix(in srgb, var(--primary) 55%, transparent);
  outline-offset:2px;
}
.shift-show-page .shift-show-parts .photo-pill img,
.shift-show-page .shift-show-parts .part-photo-trigger img,
.shift-show-page .shift-show-parts img.thumb{
  width:28px;
  height:28px;
  max-width:28px;
  max-height:28px;
  object-fit:cover;
  display:block;
  border-radius:7px;
}
.shift-show-page .shift-show-parts tr.thin-sep td{
  padding:0 !important;
  height:auto;
  background:transparent !important;
}
.shift-show-page .shift-show-parts .part-main-row td{
  padding-top:8px;
  padding-bottom:8px;
}
.shift-show-page .shift-show-parts .part-main-row td.photo-cell{
  padding-top:2px !important;
  padding-bottom:2px !important;
  padding-left:0 !important;
  padding-right:0 !important;
  line-height:0;
}
.shift-show-page .shift-show-parts th.c-photo,
.shift-show-page .shift-show-parts .photo-cell{
  width:56px;
  min-width:56px;
  text-align:center;
}
.shift-show-page .shift-show-parts th.c-photo{
  padding-left:0;
  padding-right:0;
}
.shift-show-page .shift-show-parts th.c-km,
.shift-show-page .shift-show-parts th.num,
.shift-show-page .shift-show-parts td.num{
  text-align:left;
}
.shift-show-page .shift-show-parts .ev-cell{
  gap:6px;
}
.shift-show-page .shift-show-parts .ev-cell a{
  white-space:nowrap;
}
.shift-show-page .part-mobile-detail-row .part-detail-notes{
  display:block;
}
.shift-show-page .part-mobile-detail-row .part-tags.show-tags{
  margin-top:4px;
}
.shift-show-page .part-mobile-detail-icon{
  flex:0 0 auto;
  line-height:1.2;
}
/* Galerie */
.gallery-box{background:var(--surface);border:1px solid var(--line);border-radius:8px;overflow:hidden;display:flex;flex-direction:column;min-height:100%;position:relative}
.gallery-box .gallery-main{position:relative;aspect-ratio:16/9;background:#0f0f0f;flex:1 1 auto;height:auto}
.gallery-box .gallery-main a{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;opacity:0;pointer-events:none}
.gallery-box .gallery-main a.active{opacity:1;pointer-events:auto}
.gallery-box .gallery-main a img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block;object-position:center center}
.gallery-arrow{position:absolute;top:50%;transform:translateY(-50%);width:40px;height:40px;border-radius:10px;border:1px solid var(--line);background:#202225;display:flex;align-items:center;justify-content:center;cursor:pointer;outline:none;z-index:6}
.gallery-arrow.left{left:8px}
.gallery-arrow.right{right:8px}
.gallery-arrow:hover{background:#2a2d31}

.thumbs{position:absolute;left:0;right:0;bottom:0;display:none;gap:8px;align-items:center;padding:8px;max-height:30%;overflow-x:auto;overflow-y:hidden;background:rgba(0,0,0,.45);backdrop-filter:blur(2px);-webkit-overflow-scrolling:touch;scrollbar-width:none}
.thumbs::-webkit-scrollbar{display:none}
.thumbs a{flex:0 0 auto;display:block}
.thumbs a.active,.thumbs a:hover{opacity:1;border-color:var(--primary)}
.thumbs img{height:45px;width:auto;object-fit:cover;border-radius:6px}
.gallery-box>.photo-empty{aspect-ratio:16/9}
.gallery-box:hover .thumbs{display:flex}
.gallery-box.is-missing{border-color:var(--danger);box-shadow:0 0 0 1px color-mix(in srgb,var(--danger) 55%, transparent)}

/* Show: souhrnnÃ¡ tabulka vlevo â€“ fixnÃ­ proporce */
.header-grid .table-wrap:first-child .table{
  table-layout: fixed;
  width: 100%;
}

/* Default (nesplit): 25% + 75% */
.header-grid .table-wrap:first-child .table th{width:25%}
.header-grid .table-wrap:first-child .table td:nth-child(2){width:75%}

/* Å ejdr (Å™Ã¡dky se 4 buÅˆkami): 25% + 25% + 25% + 25% */
.header-grid .table-wrap:first-child .table:has(tr td:nth-child(4)) th{width:25%}
.header-grid .table-wrap:first-child .table:has(tr td:nth-child(4)) td{width:25%}

/* drobnosti */
.header-grid .table-wrap:first-child .table .nowrap{white-space:nowrap}
.header-grid .table-wrap:first-child .table .num{text-align:left}


/* ChybÄ›jÃ­cÃ­ fotka v rÃ¡meÄku galerie */
.photo-missing{position:absolute;inset:0;display:grid;place-items:center;text-align:center;background:#0f0f0f;color:var(--text-2);line-height:1.35;padding:12px;font-weight:600}
.photo-missing span{font-weight:400;font-size:.9em;opacity:.9}

/* Placeholdery pro fotky */
.photo-empty{background:var(--surface);color:var(--muted);border:1px dashed var(--line);display:grid;place-items:center;width:100%;aspect-ratio:4/3;font-size:2rem;border-radius:8px;user-select:none;text-decoration:none}
.photo-empty.as-link:hover{background:var(--surface-2);color:var(--fg);cursor:pointer}
.photo-empty:hover{background:var(--line);cursor:pointer}
.photo-empty--missing{background:var(--danger);color:#000;font-weight:600;text-align:center;line-height:1.4;flex:1}
.photo-empty--missing .small{font-weight:400;font-size:.9em;opacity:.8}

/* MalÃ½ placeholder v tabulce ÄÃ¡stÃ­ */
.thumb-empty{background:var(--surface);color:var(--muted);border:1px dashed var(--line);display:inline-grid;place-items:center;width:56px;height:42px;font-size:1rem;border-radius:6px;text-decoration:none}
.thumb-empty.as-link:hover{background:var(--surface-2);color:var(--fg);cursor:pointer}

/* klikatelnÃ© nÃ¡hledy */
.camera-link{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px}
.camera-link:hover,.gallery-main a:hover{cursor:pointer}
.camera-link img.thumb{max-width:100%;max-height:100%;width:18px;height:18px;object-fit:contain;display:block}

/* Sloupec Foto */
.table.parts th.c-photo{width:56px}
.table.parts td.photo-cell{text-align:center;vertical-align:middle}
.table.parts td.photo-cell .camera-link{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px}
.table.parts td.photo-cell .camera-link img.thumb{width:24px;height:24px;object-fit:contain;display:block}
.table.parts td.photo-cell .muted{display:inline-block;width:32px;height:32px;line-height:32px;text-align:center}

/* =========================================
   11) Pager
  ========================================= */
.pager{display:flex;align-items:center;justify-content:center;gap:14px;margin:16px 0}
.pager .btn{padding:8px 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--fg);text-decoration:none}
.pager .btn:hover{background:rgba(255,255,255,.06)}
.pager .btn.disabled{opacity:.5;pointer-events:none}

/* =========================================
   12) DoplÅˆky: den a poznÃ¡mky
========================================= */
.day_name,.note_line{color:var(--muted);font-size:12px}

/* =========================================
   13) Flash zprÃ¡vy
========================================= */
.flash{margin:12px 0;padding:12px;border-radius:10px;border:1px solid}
.flash.success{background:#0b3d2e;border-color:#1f7a53;color:#dff7ea}
.flash.error{background:#3d0b0b;border-color:#7a1f1f;color:#ffe5e5}

/* =========================================
   14) Edit specifika (edit.php)
========================================= */
#partsTable th:last-child,#partsTable td:last-child{width:20%}
#partsTable th:nth-child(6),#partsTable td:nth-child(6){width:10%}
#partsTable .note-cell{display:flex;align-items:center;gap:8px}
#partsTable .note-cell .input{flex:1 1 auto;min-width:0}
.note-cell .cam{flex:0 0 auto;cursor:pointer}

/* hover nÃ¡hled fotky v edit.php */
.photo-pop{position:fixed;z-index:var(--z-preview);display:none;max-width:35vw;max-height:70vh;padding:4px;background:#111;border:1px solid var(--line);box-shadow:0 10px 30px rgba(0,0,0,.45);pointer-events:none}
.photo-pop img{display:block;max-width:100%;max-height:70vh;object-fit:contain}

/* layout hlaviÄky v edit.php */
#edit-head{display:grid;grid-template-columns:3fr 3fr 3fr 1fr;gap:12px;align-items:end;--ctrl-h:44px}
#edit-head>*{min-width:0}
#edit-head label{display:flex;flex-direction:column;gap:6px}
#edit-head .input,#edit-head select{height:var(--ctrl-h);line-height:normal;padding:10px 12px;border-radius:10px;appearance:none;-webkit-appearance:none;-moz-appearance:none}
#edit-head .save-cell{display:flex;align-items:end;align-self:end}
#edit-head .save-cell .btn{width:100%;height:var(--ctrl-h);padding:0 14px;border-radius:10px;display:inline-flex;align-items:center;justify-content:center}

/* poznÃ¡mka na plnou Å¡Ã­Å™ku */
.notes-row{display:grid;grid-template-columns:1fr;gap:12px}
.notes-row textarea{margin-top:6px}

.topbar .subactions{margin-bottom:0}
.card.filter-card{padding:14px 16px}
.card.filter-card .form-grid,
.card.filter-card .form-row{margin-bottom:0}
.preview-card__image img{display:block;max-width:100%;height:auto;border-radius:10px}

.stats-page{
  display:grid;
  gap:18px;
  padding-bottom:24px
}
.stats-filter-card{
  display:flex;
  flex-direction:column;
  gap:14px;
  overflow:visible
}
.stats-filter-main{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;
  gap:12px;
  align-items:end
}
.stats-filter-field{
  position:relative;
  display:grid;
  gap:8px;
  min-width:0
}
.stats-filter-label{
  color:var(--muted);
  font-size:.84rem;
  line-height:1.2
}
.stats-filter-toggle{
  width:100%;
  min-height:46px;
  justify-content:flex-start;
  gap:10px;
  padding-inline:14px;
  border-radius:14px;
  background:linear-gradient(180deg,color-mix(in srgb,var(--surface) 92%, #000),color-mix(in srgb,var(--surface-2) 80%, #000));
  text-align:left
}
.stats-filter-toggle .material-icons{
  font-size:20px;
  line-height:1;
  color:var(--primary)
}
.stats-filter-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center
}
.stats-filter-actions .btn{
  min-height:46px
}
.stats-period-layer,
.stats-date-layer{
  position:absolute;
  left:0;
  top:calc(100% + 8px);
  z-index:var(--z-overlay)
}
.stats-period-layer[hidden],
.stats-date-layer[hidden]{
  display:none!important
}
.stats-period-backdrop,
.stats-date-backdrop{
  display:none
}
.stats-period-popover,
.stats-date-popover{
  width:min(440px,calc(100vw - 24px));
  border:1px solid var(--line);
  border-radius:18px;
  background:linear-gradient(180deg,color-mix(in srgb,var(--surface) 96%, #000),color-mix(in srgb,var(--surface-2) 88%, #000));
  box-shadow:0 24px 70px rgba(0,0,0,.38)
}
.stats-period-popover__head,
.stats-modal__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:16px 16px 12px
}
.stats-period-popover__body{
  display:grid;
  grid-template-columns:minmax(92px,108px) minmax(0,1fr);
  gap:14px;
  padding:0 16px 16px
}
.stats-period-years{
  display:grid;
  gap:8px
}
.stats-period-year,
.stats-period-month{
  display:inline-flex;
  align-items:center;
  justify-content:flex-start;
  min-height:40px;
  padding:0 12px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--surface-2);
  color:var(--fg);
  font:inherit;
  cursor:pointer;
  transition:background .15s,border-color .15s,color .15s,transform .06s
}
.stats-period-year:hover,
.stats-period-month:hover,
.stats-date-day:hover{
  border-color:color-mix(in srgb,var(--primary) 44%, var(--line));
  transform:translateY(-1px)
}
.stats-period-year.is-active,
.stats-period-month.is-active{
  background:color-mix(in srgb,var(--primary) 16%, var(--surface-2));
  border-color:color-mix(in srgb,var(--primary) 52%, var(--line));
  color:var(--primary)
}
.stats-period-months{
  display:grid;
  gap:10px
}
.stats-period-month--year{
  justify-content:space-between;
  font-weight:600
}
.stats-period-month-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px
}
.stats-date-popover{
  padding:14px
}
.stats-date-popover__head{
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:8px;
  margin-bottom:10px
}
.stats-date-popover__title{
  text-align:center;
  font-weight:700;
  text-transform:capitalize
}
.stats-date-weekdays,
.stats-date-grid{
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap:6px
}
.stats-date-weekdays{
  margin-bottom:8px;
  color:var(--muted);
  font-size:.82rem;
  text-align:center
}
.stats-date-day{
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--surface-2);
  color:var(--text);
  min-height:38px;
  font:inherit;
  cursor:pointer
}
.stats-date-day.is-outside{opacity:.45}
.stats-date-day.is-today{box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--primary) 50%, transparent)}
.stats-date-day.is-in-range{background:color-mix(in srgb,var(--primary) 16%, var(--surface-2));border-color:color-mix(in srgb,var(--primary) 35%, var(--line))}
.stats-date-day.is-start,
.stats-date-day.is-end{background:var(--primary);border-color:var(--primary);color:#00150f}
.stats-date-actions{
  display:flex;
  justify-content:space-between;
  gap:8px;
  flex-wrap:wrap;
  margin-top:12px
}
.stats-date-actions .btn{
  min-height:42px
}
.stats-section{
  display:flex;
  flex-direction:column;
  gap:14px
}
.stats-section + .stats-section{
  margin-top:8px
}
.stats-section-head{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap
}
.stats-section-head--toggle{
  justify-content:space-between;
  align-items:center;
  gap:10px
}
.stats-section-toggle{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex:1 1 auto;
  min-width:0;
  padding:0;
  border:0;
  background:transparent;
  color:var(--fg);
  font:inherit;
  text-align:left;
  cursor:pointer
}
.stats-section-toggle__title{
  font-size:clamp(1.35rem,2.4vw,1.85rem);
  font-weight:700;
  line-height:1.1
}
.stats-section-toggle__caret{
  flex:0 0 auto;
  font-size:22px!important;
  color:var(--muted);
  transition:transform .16s ease,color .16s ease
}
.stats-section-toggle:hover .stats-section-toggle__title,
.stats-section-toggle:hover .stats-section-toggle__caret{
  color:var(--primary)
}
.stats-section.is-collapsed .stats-section-toggle__caret{
  transform:rotate(-90deg)
}
.stats-section-content[hidden]{
  display:none!important
}
.stats-section > h2,
.stats-section .page-header h2{
  margin:0
}
.stats-page-header{
  align-items:flex-start;
  gap:12px
}
.stats-page-header > *{
  min-width:0
}
.stats-section-tools{
  display:flex;
  align-items:center;
  justify-content:flex-end
}
.stats-kpi-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:12px;
  align-items:stretch
}
.stats-metric-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px
}
.stats-metric-card{
  min-height:112px;
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:14px 15px;
  border:1px solid color-mix(in srgb,var(--line) 92%, transparent);
  border-radius:16px;
  background:
    radial-gradient(circle at top right, color-mix(in srgb,var(--primary) 16%, transparent), transparent 40%),
    linear-gradient(180deg,color-mix(in srgb,var(--surface) 94%, #000),color-mix(in srgb,var(--surface-2) 84%, #000));
  box-shadow:0 10px 22px rgba(0,0,0,.16)
}
.stats-metric-label{
  color:var(--muted);
  font-size:.8rem;
  line-height:1.2;
  letter-spacing:.02em;
  text-transform:uppercase
}
.stats-metric-value{
  font-size:1.56rem;
  font-weight:700;
  line-height:1.08;
  letter-spacing:-.02em;
  font-variant-numeric:tabular-nums
}
.stats-metric-subvalue{
  color:var(--text-2);
  font-size:.78rem;
  line-height:1.3;
  margin-top:auto
}
.stats-metric-hint-link{
  display:inline-flex;
  flex-wrap:wrap;
  gap:4px 6px;
  align-items:baseline;
  color:inherit;
  text-decoration:none
}
.stats-metric-hint-link:hover .stats-metric-hint-title{
  color:var(--primary)
}
.stats-metric-hint-title{
  color:var(--fg);
  font-weight:600
}
.stats-metric-hint-meta{
  color:var(--text-2)
}
.stats-metric-icon{
  font-size:18px!important;
  line-height:1;
  opacity:.85
}
.stats-type-main{font-weight:600;color:var(--fg)}
.stats-type-sub{color:var(--text-2);font-size:.92em}
.stats-mobile-only{display:none}
.stats-cell-mobile-note{
  color:var(--muted);
  font-size:.9em;
}
.stats-table-wrap{
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:16px;
  box-shadow:0 8px 18px rgba(0,0,0,.12)
}
.stats-table-wrap--flat{
  overflow:hidden
}
.stats-table{
  min-width:100%
}
.stats-table th,
.stats-table td{
  padding:10px 12px;
  font-size:.95rem
}
.stats-table thead th{
  background:color-mix(in srgb,var(--surface-2) 88%, #000);
  color:var(--text-2);
  white-space:nowrap;
  vertical-align:middle
}
.stats-table tbody tr:hover{
  background:rgba(255,255,255,.03)
}
.stats-table th.actions,
.stats-table td.actions{
  text-align:center
}
.stats-sort-button{
  display:inline-flex;
  align-items:center;
  gap:6px;
  width:100%;
  padding:0;
  border:0;
  background:transparent;
  color:inherit;
  font:inherit;
  text-align:inherit;
  cursor:pointer
}
.stats-table th.num .stats-sort-button{
  justify-content:flex-end;
}
.stats-table th:not(.num) .stats-sort-button{
  justify-content:flex-start;
}
.stats-sort-button:hover .stats-sort-label,
.stats-table thead th.is-sort-active .stats-sort-label{
  color:var(--fg)
}
.stats-sort-indicator{
  color:var(--muted);
  font-size:.82em;
  line-height:1
}
.stats-table thead th.is-sort-active .stats-sort-indicator{
  color:var(--primary)
}
.stats-empty-cell{
  padding:14px 12px;
  text-align:center;
  color:var(--muted)
}
.stats-empty-state{
  color:var(--muted);
  font-size:.92rem;
  line-height:1.45
}
.stats-note{
  margin:0;
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:12px;
  background:color-mix(in srgb,var(--surface-2) 82%, black);
  color:var(--text-2);
  font-size:.92rem;
  line-height:1.5
}
.stats-info{
  position:relative;
  display:inline-flex;
  align-items:center
}
.stats-info-trigger{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:28px;
  height:28px;
  padding:0;
  border:1px solid var(--line);
  border-radius:999px;
  background:var(--surface-2);
  color:var(--muted);
  cursor:pointer;
  font:inherit;
  line-height:1;
  transition:background .15s,color .15s,border-color .15s
}
.stats-info-trigger .material-icons{font-size:18px}
.stats-info-trigger:hover,
.stats-info-trigger[aria-expanded="true"]{
  background:var(--surface-3);
  color:var(--primary);
  border-color:color-mix(in srgb,var(--primary) 45%, var(--line))
}
.stats-info-popover{
  position:absolute;
  top:calc(100% + 8px);
  left:0;
  z-index:var(--z-dropdown);
  width:min(320px, calc(100vw - 32px));
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--surface);
  color:var(--fg);
  box-shadow:0 12px 30px rgba(0,0,0,.45);
  font-size:.9rem;
  line-height:1.45;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transform:translateY(-4px);
  transition:opacity .16s ease,transform .16s ease,visibility .16s ease
}
@media (hover:hover){
  .stats-info:hover .stats-info-popover,
  .stats-info:focus-within .stats-info-popover{
    opacity:1;
    visibility:visible;
    pointer-events:auto;
    transform:translateY(0)
  }
}
.stats-info-trigger[aria-expanded="true"] + .stats-info-popover{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transform:translateY(0)
}
.stats-section-head .stats-info-popover{
  left:auto;
  right:0;
}
.stats-table-group:not(.is-expanded) .stats-extra-row{
  display:none
}
.stats-table-footer{
  display:flex;
  justify-content:center
}
.stats-table-toggle{
  min-width:148px
}
.stats-switch{
  position:relative;
  display:inline-flex;
  align-items:center;
  gap:10px;
  min-height:42px;
  padding:0 14px 0 12px;
  border:1px solid var(--line);
  border-radius:999px;
  background:color-mix(in srgb,var(--surface-2) 72%, #000);
  cursor:pointer;
  user-select:none
}
.stats-switch input{
  position:absolute;
  opacity:0;
  pointer-events:none
}
.stats-switch__track{
  position:relative;
  width:38px;
  height:22px;
  border-radius:999px;
  background:color-mix(in srgb,var(--surface-3) 92%, #000);
  box-shadow:inset 0 0 0 1px var(--line)
}
.stats-switch__track::after{
  content:"";
  position:absolute;
  top:3px;
  left:3px;
  width:16px;
  height:16px;
  border-radius:50%;
  background:#fff;
  transition:transform .16s ease
}
.stats-switch input:checked + .stats-switch__track{
  background:color-mix(in srgb,var(--primary) 70%, #10261f)
}
.stats-switch input:checked + .stats-switch__track::after{
  transform:translateX(16px)
}
.stats-switch__label{
  color:var(--text-2);
  font-size:.92rem;
  white-space:nowrap
}
.stats-detail-trigger{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  padding:0;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--surface-2);
  color:var(--muted);
  cursor:pointer;
  font:inherit;
  line-height:1;
  box-shadow:0 1px 2px rgba(0,0,0,.3);
  transition:background .15s,color .15s,border-color .15s,transform .06s
}
.stats-detail-trigger .material-icons{font-size:18px}
.stats-detail-trigger:hover{
  color:var(--primary);
  background:var(--surface-3);
  border-color:color-mix(in srgb,var(--primary) 45%, var(--line));
  transform:translateY(-1px)
}
.stats-extremes-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px
}
.stats-extreme-card{
  min-height:152px;
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:15px 16px;
  border:1px solid color-mix(in srgb,var(--line) 92%, transparent);
  border-radius:16px;
  background:
    radial-gradient(circle at top right, color-mix(in srgb,var(--primary) 10%, transparent), transparent 42%),
    linear-gradient(180deg,color-mix(in srgb,var(--surface) 94%, #000),color-mix(in srgb,var(--surface-2) 84%, #000));
  box-shadow:0 10px 22px rgba(0,0,0,.14)
}
.stats-extreme-label{
  color:var(--muted);
  font-size:.82rem;
  letter-spacing:.02em;
  text-transform:uppercase
}
.stats-extreme-primary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  flex-wrap:wrap
}
.stats-extreme-primary strong,
.stats-extreme-primary strong a{
  color:var(--fg)
}
.stats-extreme-primary strong a:hover{
  color:var(--primary)
}
.stats-chip{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:0 9px;
  border:1px solid var(--line);
  border-radius:999px;
  background:color-mix(in srgb,var(--surface-2) 82%, #000);
  color:var(--text-2);
  font-size:.84rem
}
.stats-extreme-route{
  color:var(--text-2);
  line-height:1.45;
  overflow-wrap:anywhere
}
.stats-extreme-values{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  align-items:center;
  gap:12px;
  margin-top:auto;
  font-variant-numeric:tabular-nums
}
.stats-extreme-values span:nth-child(2){
  text-align:center
}
.stats-extreme-vehicle{
  text-align:right;
  color:var(--text-2)
}
.stats-modal[hidden]{display:none!important}
.stats-modal{
  position:fixed;
  inset:0;
  z-index:var(--z-modal);
  display:grid;
  place-items:center;
  padding:20px
}
.stats-modal__backdrop{
  position:absolute;
  inset:0;
  border:0;
  background:rgba(0,0,0,.62)
}
.stats-modal__dialog{
  position:relative;
  z-index:1;
  width:min(680px,100%);
  max-height:min(86vh,720px);
  border:1px solid var(--line);
  border-radius:18px;
  background:linear-gradient(180deg,color-mix(in srgb,var(--surface) 96%, #000),color-mix(in srgb,var(--surface-2) 90%, #000));
  box-shadow:0 24px 70px rgba(0,0,0,.42);
  overflow:auto
}
.stats-modal__close{flex:0 0 auto}
.stats-modal__body{
  padding:0 16px 16px
}
.stats-modal__body .page-intro{
  margin:0 0 14px
}
.stats-modal-table th,
.stats-modal-table td{
  white-space:nowrap
}
.stats-modal-table thead th:first-child{
  width:1%
}

/* =========================================
   15) KalendÃ¡Å™ â€“ sjednocenÃ½ blok
========================================= */
.table.calendar{table-layout:fixed;width:100%;background:var(--surface);--bs-table-hover-bg:transparent;--bs-table-hover-color:inherit}
.table.calendar th,.table.calendar td{width:14.2857%;vertical-align:top;word-wrap:break-word;overflow:hidden;padding:10px}
.table.calendar td{height:var(--cal-cell-h);position:relative;padding:0;transition:background .15s linear;background:linear-gradient(150deg,#03dac60b,transparent)}
.table.calendar tr:hover{background:transparent!important}

/* klikacÃ­ celÃ© <td> pÅ™es overlay odkaz */
.table.calendar td .cell-link{position:absolute;inset:0;display:block;z-index:3;background:transparent;text-decoration:none;color:inherit}
.table.calendar td .cell{position:relative;z-index:1}

/* hover celÃ© buÅˆky */
.table.calendar tbody td:hover{background:#2c2c2c}

/* obsah buÅˆky */
.table.calendar td .cell{display:flex;flex-direction:column;gap:6px;height:100%;padding:8px;overflow:hidden}
.table.calendar td .block{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;text-align:center;min-height:0}

/* hlaviÄka dne + typ smÄ›ny */
.day-head{display:flex;justify-content:space-between;align-items:center;font-weight:900;font-size:1.1em}
.day-head .day-type{font-size:.95em;opacity:.8;font-weight:300}

/* typ smÄ›ny â€“ obecnÄ› */
.type-center{font-style:italic;text-align:center;font-size:.9rem;color:var(--text-2);margin-top:2px}

/* Å™Ã¡dky uvnitÅ™ buÅˆky */
.chips-line{display:flex;justify-content:center;align-items:center;gap:10px;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.range-line{margin-top:4px;text-align:center}
.totals-line{display:flex;justify-content:space-between;align-items:center;margin-top:4px}

/* chipy v kalendÃ¡Å™i */
.table.calendar .chip{padding:1px 7px;font-weight:600;background:var(--surface-3);border:1px solid rgba(255,255,255,.06);box-shadow:0 1px 0 rgba(0,0,0,.35) inset;margin-right:10px}

/* Äasy */
.time-line{font-variant-numeric:tabular-nums;font-size:.9rem;color:var(--text-2);text-align:center}

/* Å¡ejdr */
.shift{display:flex;flex-direction:column;gap:6px;flex:1}
.shift:not(.split) .block{flex:1}
.shift.split .block{flex:1}
.shift.split .block+.block{padding-top:0;margin-top:0;margin-bottom:5px;position:relative}
.shift.split .block+.block::before{content:"";display:block;width:60%;height:1px;margin:0 auto;background:linear-gradient(to right,transparent 0,rgba(255,255,255,.14) 15%,rgba(255,255,255,.14) 85%,transparent 100%)}

/* OFF barvy na <td> */
.table.calendar td.row-green{background:rgba(0,160,80,.08)}
.table.calendar td.row-red{background:rgba(220,60,60,.08)}
.table.calendar td.roster-expected{background:linear-gradient(150deg, rgba(255,255,255,.04), transparent)}
.table.calendar .roster-shift{opacity:.82}
.table.calendar .chip.chip-roster{
  background:transparent;
  border:1px dashed rgba(255,255,255,.35);
  color:var(--text-2);
  box-shadow:none;
}
.table.calendar .roster-note{opacity:.85;font-style:italic}
.calendar-legend{
  display:flex;
  flex-wrap:wrap;
  gap:14px;
  align-items:center;
  margin:10px 0 14px;
  color:var(--text-2);
  font-size:.92rem;
}
.calendar-legend .legend-item{display:inline-flex;align-items:center;gap:8px}
.calendar-legend .legend-swatch{
  width:18px;
  height:18px;
  border-radius:6px;
  display:inline-block;
  border:1px solid rgba(255,255,255,.18);
}
.calendar-legend .legend-real{background:var(--surface-3)}
.calendar-legend .legend-roster{background:transparent;border-style:dashed}
.calendar-page{padding-bottom:calc(24px + env(safe-area-inset-bottom))}
.calendar-page .month-nav,
.calendar-page .month-quick,
.calendar-page .calendar-legend{display:none!important}
.calendar-grid-wrap{width:100%;overflow-x:hidden}
.calendar-monthbar{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
  justify-content:space-between;
  margin:6px 0 14px;
}
.calendar-month-label{
  flex:1 1 auto;
  min-width:0;
  font-size:1.2rem;
  font-weight:700;
  line-height:1.15;
  text-align:center;
}
.calendar-nav-btn{
  min-width:34px;
  min-height:34px;
  padding:6px 10px;
  border-radius:10px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.calendar-page .table.calendar{margin-bottom:0;border-collapse:separate;border-spacing:0}
.calendar-page .table.calendar th{
  padding:8px 4px;
  text-align:center;
  font-size:.88rem;
  font-weight:700;
  color:var(--text-2);
  box-sizing:border-box;
}
.calendar-page .table.calendar td{
  background:linear-gradient(180deg, rgba(255,255,255,.025), transparent);
  border:1px solid rgba(255,255,255,.05);
  box-sizing:border-box;
}
.calendar-page .table.calendar tbody td:hover{background:#252525}
.calendar-page .table.calendar td .cell{
  gap:8px;
  padding:10px;
}
.calendar-page .table.calendar td.calendar-empty{
  background:rgba(255,255,255,.018);
}
.calendar-page .table.calendar td.calendar-empty .cell{
  min-height:100%;
  padding:10px;
}
.calendar-page .table.calendar td.is-weekend{
  background:linear-gradient(180deg, rgba(255,255,255,.04), transparent);
}
.calendar-page .table.calendar td.is-today{
  box-shadow:inset 0 0 0 2px rgba(3,218,198,.5);
}
.calendar-page .table.calendar td.has-actual{
  background:linear-gradient(180deg, rgba(3,218,198,.08), transparent 68%);
}
.calendar-page .table.calendar td.has-roster{
  background:linear-gradient(180deg, rgba(255,255,255,.05), transparent 70%);
}
.calendar-page .day-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px;
}
.calendar-page .day-num{
  font-size:1.05rem;
  font-weight:800;
  line-height:1;
  color:var(--fg);
}
.calendar-page .day-type{
  min-width:0;
  text-align:right;
  line-height:1.1;
}
.calendar-page .day-type.is-actual{color:#fff;font-weight:800}
.calendar-page .day-type.is-roster{color:var(--text-2);font-weight:700}
.calendar-page .day-type__mobile{display:none}
.calendar-page .day-type__desktop{display:inline}
.calendar-page .shift{
  gap:8px;
  flex:1 1 auto;
  justify-content:center;
}
.calendar-page .shift-mobile-grid,
.calendar-page .shift-mobile-meta{display:none}
.calendar-page .shift-desktop-blocks{
  display:flex;
  flex-direction:column;
  gap:8px;
  flex:1 1 auto;
  justify-content:center;
}
.calendar-page .table.calendar td .block{
  align-items:center;
  justify-content:center;
  gap:4px;
  padding:8px 9px;
  border-radius:12px;
  background:rgba(255,255,255,.045);
  border:1px solid rgba(255,255,255,.06);
  text-align:center;
}
.calendar-page .table.calendar td.row-green .block{
  background:rgba(0,160,80,.12);
  border-color:rgba(0,160,80,.22);
}
.calendar-page .table.calendar td.row-red .block{
  background:rgba(220,60,60,.12);
  border-color:rgba(220,60,60,.22);
}
.calendar-page .table.calendar td.roster-expected .day-type{opacity:.86}
.calendar-page .chips-line{
  width:100%;
  justify-content:center;
  gap:6px;
  margin-top:0;
  flex-wrap:wrap;
}
.calendar-page .table.calendar .chip{
  margin-right:0;
  font-size:.84rem;
}
.calendar-page .time-line{
  font-size:.82rem;
  text-align:center;
}
.calendar-page .shift.split .block + .block::before{display:none}

@media (max-width: 767px){
  .calendar-page{
    padding-left:12px;
    padding-right:12px;
  }
  .calendar-monthbar{
    gap:8px;
  }
  .calendar-month-label{
    font-size:1.02rem;
  }
  .calendar-page .table.calendar th,
  .calendar-page .table.calendar td{
    width:14.2857%;
  }
  .calendar-page .table.calendar th{
    padding:5px 1px;
    font-size:.66rem;
  }
  .calendar-page .table.calendar td{
    height:64px;
    min-height:64px;
  }
  .calendar-grid-wrap{
    margin-left:-2px;
    margin-right:-2px;
  }
  .calendar-page .table.calendar td .cell{
    display:grid;
    grid-template-rows:16px 1fr 1fr;
    gap:2px;
    height:100%;
    padding:4px 2px 5px;
  }
  .calendar-page .day-head{
    align-items:flex-start;
    gap:3px;
    grid-row:1;
    min-height:16px;
  }
  .calendar-page .day-num{
    font-size:.8rem;
  }
  .calendar-page .day-type{
    flex:1 1 auto;
    font-size:.68rem;
    letter-spacing:-.01em;
  }
  .calendar-page .day-type__desktop{display:none}
  .calendar-page .day-type__mobile{display:inline}
  .calendar-page .shift{
    display:grid;
    grid-row:2 / span 2;
    align-self:stretch;
    min-height:100%;
    gap:0;
  }
  .calendar-page .shift-mobile-grid{
    display:grid;
    grid-template-rows:1fr 1fr;
    height:100%;
    min-height:100%;
  }
  .calendar-page .shift-mobile-grid--single{
    place-items:center;
  }
  .calendar-page .shift-mobile-row,
  .calendar-page .shift-mobile-meta{
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:.63rem;
    font-weight:700;
    line-height:1.15;
    text-align:center;
    color:#f5f7fa;
    word-break:break-word;
  }
  .calendar-page .shift-mobile-grid--single .shift-mobile-meta{
    grid-row:1 / span 2;
    align-self:center;
  }
  .calendar-page .cell-empty{
    display:grid;
    grid-template-rows:16px 1fr 1fr;
    height:100%;
  }
  .calendar-page .shift-desktop-blocks{display:none}
  .calendar-page .table.calendar td .block{
    padding:0;
    border:0;
    background:transparent;
  }
}

@media (max-width: 380px){
  .calendar-grid-wrap{
    zoom:.84;
  }
}

/* =========================================
   16) Vehicles index (scoped)
========================================= */
.vehicles-page .vehicles-toolbar{display:flex;gap:12px;align-items:center;margin:8px 0 12px;flex-wrap:wrap}
.vehicles-page .vehicles-toolbar .types{display:flex;gap:8px;flex-wrap:wrap}
.vehicles-page .vehicles-toolbar .ev-filter .input{min-width:220px;padding-right:34px}
.vehicles-page{padding-bottom:calc(16px + env(safe-area-inset-bottom))}
.vehicles-page .vehicles-year-dropdown{position:relative;display:inline-flex}
.vehicles-page .vehicles-year-dropdown--mobile{display:none}
.vehicles-page .vehicles-year-dropdown__toggle{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-height:28px;
  min-width:72px;
  padding:2px 10px;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--surface);
  color:var(--fg);
  font:inherit;
  font-size:.84rem;
  font-weight:600;
  line-height:1.1;
  cursor:pointer;
  box-shadow:none;
}
.vehicles-page .vehicles-year-dropdown__toggle:focus{
  border-color:var(--primary);
  outline:none;
  box-shadow:0 0 0 1px color-mix(in srgb, var(--primary) 40%, transparent);
}
.vehicles-page .vehicles-year-dropdown__caret{font-size:.8em;opacity:.8}
.vehicles-page .vehicles-year-dropdown__menu{
  position:absolute;
  top:calc(100% + 6px);
  left:0;
  min-width:100%;
  padding:6px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--surface);
  box-shadow:0 10px 24px rgba(0,0,0,.28);
  z-index:30;
}
.vehicles-page .vehicles-year-dropdown__item{
  display:block;
  padding:7px 10px;
  border-radius:8px;
  color:var(--fg);
  text-decoration:none;
  white-space:nowrap;
}
.vehicles-page .vehicles-year-dropdown__item:hover{background:rgba(255,255,255,.04)}
.vehicles-page .vehicles-year-dropdown__item.is-active{
  background:color-mix(in srgb, var(--primary) 24%, transparent);
  color:var(--primary);
  font-weight:700;
}
.vehicles-page .vehicle-filter-wrap{position:relative;display:flex;align-items:center}
.vehicles-page .vehicle-filter-clear{
  position:absolute;right:8px;top:50%;transform:translateY(-50%);
  border:0;background:transparent;color:var(--muted);cursor:pointer;
  font-size:1.1rem;line-height:1;padding:0 2px
}
.vehicles-page .vehicle-filter-clear:hover{color:var(--fg)}
.vehicles-page .vehicles-metric-toggle{display:none}
.vehicles-page .vehicles-table-wrap--mobile{display:none;overflow:hidden}
.vehicles-page .vehicles-table-wrap--desktop{display:block}
.vehicles-page .vehicles-table{width:100%}
.vehicles-page .vehicles-table--desktop thead th[colspan]{text-align:center}
.vehicles-page .vehicles-table--desktop thead th.vehicles-year-group{padding-top:6px;padding-bottom:6px}
.vehicles-page .vehicles-metric-head{white-space:nowrap}
.vehicles-page .vehicles-metric-head .material-icons{font-size:17px;line-height:1;vertical-align:middle}
.vehicles-page .vehicles-table th.num,
.vehicles-page .vehicles-table td.num{text-align:center}

/* badge toggle typÅ¯ + barvy */
.vehicles-page .badge.toggle{border:1px solid var(--line);background:var(--surface);color:var(--fg);padding:4px 10px;border-radius:999px;cursor:pointer;font-size:12px;user-select:none;display:inline-flex;gap:6px;align-items:center}
.vh{position:absolute;left:-9999px}

.chip-14t{border-color:#4FC3F7;color:#4FC3F7}
.chip-15t{border-color:#7E57C2;color:#7E57C2}
.chip-t3{border-color:#EF5350;color:#EF5350}
.chip-kt{border-color:#66BB6A;color:#66BB6A}
.chip-52t{border-color:#FFCA28;color:#FFCA28}

.vehicles-page .badge-14t{border-color:#4FC3F7;color:#4FC3F7}
.vehicles-page .badge-15t{border-color:#7E57C2;color:#7E57C2}
.vehicles-page .badge-t3{border-color:#EF5350;color:#EF5350}
.vehicles-page .badge-kt{border-color:#66BB6A;color:#66BB6A}
.vehicles-page .badge-52t{border-color:#FFCA28;color:#FFCA28}

.vehicles-page .badge.toggle.active.badge-14t{background:#4FC3F7;color:#111;font-weight:600}
.vehicles-page .badge.toggle.active.badge-15t{background:#7E57C2;color:#111;font-weight:600}
.vehicles-page .badge.toggle.active.badge-t3{background:#EF5350;color:#111;font-weight:600}
.vehicles-page .badge.toggle.active.badge-kt{background:#66BB6A;color:#111;font-weight:600}
.vehicles-page .badge.toggle.active.badge-52t{background:#FFCA28;color:#111;font-weight:600}

/* tÅ™Ã­dÄ›nÃ­ â€“ indikÃ¡tory v thead */
.vehicles-page .table thead th[data-sort-key]{cursor:pointer;position:relative;user-select:none}
.vehicles-page .table thead th.sort-asc::after{content:"\25B2";position:absolute;right:6px;font-size:10px}
.vehicles-page .table thead th.sort-desc::after{content:"\25BC";position:absolute;right:6px;font-size:10px}
.vehicles-page .table thead th.sort-off::after{content:""}

/* jemnÃ© utility pro ÄÃ­sla a zÃ¡vorky */
.num{text-align:left}
.muted-paren{font-size:12px;color:var(--muted)}

/* =========================================
   17) Vehicle detail (scoped)
========================================= */
.vehicle-show-page .header-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.vehicle-show-page .table.parts th,.vehicle-show-page .table.parts td{white-space:nowrap}
.vehicle-show-page .tab-center{text-align:center}
.vehicle-show-page .vehicle-title{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:4px;padding-bottom:15px}
.vehicle-show-page .vehicle-type-badge{
  display:inline-flex;align-items:baseline;gap:0;
  padding:2px 10px;border-radius:999px;
  border:1px solid var(--line);background:var(--surface);
  font-size:1.5rem;line-height:1
}
.vehicle-show-page .vehicle-type-main{font-weight:800}
.vehicle-show-page .vehicle-type-sub{font-weight:400;opacity:.88}
.vehicle-show-page .vehicle-ev{font-weight:600;line-height:1;display:inline-flex;align-items:center}
.vehicle-show-page .vehicle-meta-link{margin:0 0 12px;color:var(--muted);font-size:.95rem}
.vehicle-show-page .vehicle-meta-link a{color:var(--primary)}

/* klikatelnÃ© Å™Ã¡dky ÄÃ¡stÃ­ smÄ›ny */
.table.parts tr.row-link{cursor:pointer}
.table.parts td.no-row-link,.table.parts td.photo-cell{cursor:auto}
.cell-link{color:inherit;text-decoration:none;transition:color .15s ease}
.cell-link:hover{color:var(--primary);text-decoration:underline}

/* galerie â€“ mÅ¯Å¾e bÃ½t prÃ¡zdnÃ¡, drÅ¾Ã­ layout */
.vehicle-show-page .gallery-box{display:flex;flex-direction:column;gap:8px}
.vehicle-show-page .gallery-main{position:relative;border:1px solid var(--line);border-radius:12px;overflow:hidden;min-height:180px;display:flex;align-items:center;justify-content:center}
.vehicle-show-page .gallery-main a{display:none}
.vehicle-show-page .gallery-main a.active{display:block}
.vehicle-show-page .gallery-main img{width:100%;height:auto;display:block}
.vehicle-show-page .gallery-arrow{position:absolute;top:50%;transform:translateY(-50%);border:1px solid var(--line);background:var(--surface);color:var(--fg);border-radius:999px;width:32px;height:32px;line-height:30px;text-align:center;cursor:pointer}
.vehicle-show-page .gallery-arrow.left{left:8px}
.vehicle-show-page .gallery-arrow.right{right:8px}
.vehicle-show-page .thumbs{display:flex;gap:6px;flex-wrap:wrap}
.vehicle-show-page .thumbs a{border:1px solid var(--line);border-radius:8px;padding:2px;opacity:.7}
.vehicle-show-page .thumbs a.active{opacity:1;outline:1px solid var(--primary)}
.vehicle-show-page .thumbs img{display:block;height:56px;width:auto}

/* miniatury ve vÃ½pisu ÄÃ¡stÃ­ smÄ›ny */
.vehicle-show-page .table.parts th.c-photo,
.vehicle-show-page .table.parts td.photo-cell{width:72px;min-width:72px;text-align:center;vertical-align:middle;padding:2px 4px}
.vehicle-show-page .table.parts th.shift-col,
.vehicle-show-page .table.parts td.shift-col{width:72px}
.vehicle-show-page .sp-photo{
  display:inline-flex;align-items:center;justify-content:center;
  width:auto;height:36px;max-width:64px;padding:0;
  border:0;background:transparent;border-radius:8px;overflow:hidden;
  box-shadow:none;cursor:pointer;text-decoration:none
}
.vehicle-show-page .sp-photo.active{outline:1px solid var(--primary);outline-offset:2px}
.vehicle-show-page .sp-photo .thumb-mini{display:block;width:auto;max-width:64px;height:36px;object-fit:cover;border-radius:8px}

/* nÃ¡hled po najetÃ­ myÅ¡Ã­ na miniaturu */
#imgPreview{position:absolute;z-index:var(--z-preview);display:none;max-width:35vw;max-height:70vh;padding:4px;background:#111;border:1px solid var(--line);box-shadow:0 10px 30px rgba(0,0,0,.45);pointer-events:none}
#imgPreview img{display:block;max-width:100%;max-height:70vh;object-fit:contain}

/* hero foto */
.vehicle-show-page .hero-photo{position:relative;border:1px solid var(--line);border-radius:12px;background:#0f0f0f;overflow:hidden;padding:0}
.vehicle-show-page #heroImg{display:block;width:100%;height:auto}
.vehicle-show-page .hero-meta{position:absolute;left:8px;bottom:8px;z-index:2;border-collapse:separate;border-spacing:0;background:rgba(0,0,0,.5);backdrop-filter:blur(2px);color:#fff;font-size:.85rem;line-height:1.25;padding:6px 8px;border:1px solid rgba(255,255,255,.1);border-radius:10px}
.vehicle-show-page .hero-meta td{padding:2px 6px;vertical-align:middle;white-space:nowrap}
.vehicle-show-page .hero-meta .icon{display:inline-flex;align-items:center;justify-content:center;width:1.2rem;font-size:.95rem;text-align:center;opacity:.9}
.vehicle-show-page .hero-photo::after{content:"";position:absolute;inset:auto 0 0 0;height:28%;background:linear-gradient(0deg,rgba(0,0,0,.35),transparent);z-index:1}
.vehicle-show-page{
  padding-bottom:calc(16px + env(safe-area-inset-bottom));
}
.vehicle-show-page .vehicle-show-summary,
.vehicle-show-page .vehicle-show-gallery,
.vehicle-show-page .vehicle-occurrences-wrap{
  min-width:0;
}
.vehicle-show-page .vehicle-title{
  margin:0 0 4px;
  padding-bottom:0;
}
.vehicle-show-page .header-grid{
  grid-template-columns:minmax(320px,1fr) minmax(320px,1fr);
  align-items:stretch;
}
.vehicle-show-page .vehicle-year-dropdown{
  position:relative;
  display:inline-flex;
}
.vehicle-show-page .vehicle-year-dropdown__toggle{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-height:28px;
  min-width:72px;
  padding:2px 10px;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--surface);
  color:var(--fg);
  font:inherit;
  font-size:.84rem;
  font-weight:600;
  line-height:1.1;
  cursor:pointer;
}
.vehicle-show-page .vehicle-year-dropdown__toggle:focus{
  border-color:var(--primary);
  outline:none;
  box-shadow:0 0 0 1px color-mix(in srgb, var(--primary) 40%, transparent);
}
.vehicle-show-page .vehicle-year-dropdown__caret{font-size:.8em;opacity:.8}
.vehicle-show-page .vehicle-year-dropdown__menu{
  position:absolute;
  top:calc(100% + 6px);
  left:0;
  min-width:100%;
  padding:6px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--surface);
  box-shadow:0 10px 24px rgba(0,0,0,.28);
  z-index:30;
}
.vehicle-show-page .vehicle-year-dropdown__item{
  display:block;
  padding:7px 10px;
  border-radius:8px;
  color:var(--fg);
  text-decoration:none;
  white-space:nowrap;
}
.vehicle-show-page .vehicle-year-dropdown__item:hover{background:rgba(255,255,255,.04)}
.vehicle-show-page .vehicle-year-dropdown__item.is-active{
  background:color-mix(in srgb, var(--primary) 24%, transparent);
  color:var(--primary);
  font-weight:700;
}
.vehicle-show-page .vehicle-summary-table th.num,
.vehicle-show-page .vehicle-summary-table td.num{
  text-align:center;
}
.vehicle-show-page .vehicle-summary-table th.vehicle-summary-year-group{font-weight:600}
.vehicle-show-page .vehicle-summary-table thead th.vehicle-summary-metric-head{
  text-align:center;
  white-space:nowrap;
}
.vehicle-show-page .vehicle-summary-table thead th.vehicle-summary-metric-head .material-icons{
  font-size:17px;
  line-height:1;
  vertical-align:middle;
}
.vehicle-show-page .vehicle-show-summary{
  width:100%;
  overflow:visible;
}
.vehicle-show-page .vehicle-show-summary.table-wrap{
  overflow:visible;
}
.vehicle-show-page .vehicle-position-filter{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  padding:10px 12px 0;
}
.vehicle-show-page .vehicle-position-filter__chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:28px;
  min-width:28px;
  padding:0 10px;
  border:1px solid var(--line);
  border-radius:999px;
  background:color-mix(in srgb, var(--surface-2) 80%, #000);
  color:var(--muted);
  text-decoration:none;
  font-size:.82rem;
  font-weight:600;
}
.vehicle-show-page .vehicle-position-filter__chip:hover{
  text-decoration:none;
  color:var(--fg);
  background:rgba(255,255,255,.03);
}
.vehicle-show-page .vehicle-position-filter__chip.is-active{
  background:color-mix(in srgb, var(--primary) 18%, var(--surface));
  border-color:color-mix(in srgb, var(--primary) 45%, var(--line));
  color:var(--primary);
}
.vehicle-show-page .vehicle-summary-meta{
  display:grid;
  gap:6px;
  margin-top:-6px;
}
.vehicle-show-page .vehicle-summary-meta__item{
  margin:0;
  color:var(--muted);
}
.vehicle-show-page .vehicle-summary-meta__label{
  color:var(--fg);
  font-weight:600;
  margin-right:6px;
}
.vehicle-show-page .vehicle-show-gallery--hero{
  width:100%;
  max-width:724px;
  margin-inline:auto;
}
.vehicle-show-page .vehicle-show-gallery--hero .hero-photo,
.vehicle-show-page .vehicle-show-gallery--hero .photo-empty{
  width:100%;
}
.vehicle-show-page #heroImg{
  aspect-ratio:4/3;
  object-fit:cover;
}
.vehicle-show-page .vehicle-occurrences-wrap--mobile{
  display:none;
  overflow:hidden;
}
.vehicle-show-page .vehicle-occurrences-wrap--desktop{
  display:block;
}
.vehicle-show-page .vehicle-occurrences-table th,
.vehicle-show-page .vehicle-occurrences-table td{
  white-space:nowrap;
}
.vehicle-show-page .vehicle-occurrences-table thead th[data-sort-key]{
  position:relative;
  cursor:pointer;
  user-select:none;
}
.vehicle-show-page .vehicle-occurrences-table thead th.sort-asc::after{
  content:"\25B2";
  position:absolute;
  right:6px;
  font-size:10px;
  color:var(--primary);
}
.vehicle-show-page .vehicle-occurrences-table thead th.sort-desc::after{
  content:"\25BC";
  position:absolute;
  right:6px;
  font-size:10px;
  color:var(--primary);
}
.vehicle-show-page .vehicle-occurrences-table th.shift-col,
.vehicle-show-page .vehicle-occurrences-table td.shift-col{
  width:72px;
}
.vehicle-show-page .vehicle-occurrences-table th:nth-child(5),
.vehicle-show-page .vehicle-occurrences-table td:nth-child(5),
.vehicle-show-page .vehicle-occurrences-table th:nth-child(6),
.vehicle-show-page .vehicle-occurrences-table td:nth-child(6){
  text-align:left;
}
.vehicle-show-page .vehicle-occurrences-table th.c-photo,
.vehicle-show-page .vehicle-occurrences-table td.photo-cell{
  width:56px;
  min-width:56px;
  text-align:center;
  vertical-align:middle;
  padding:2px 4px;
}
.vehicle-show-page .vehicle-occurrence-main,
.vehicle-show-page .vehicle-occurrence-note,
.vehicle-show-page .vehicle-occurrence-mobile-main,
.vehicle-show-page .vehicle-occurrence-mobile-note{
  cursor:pointer;
}
.vehicle-show-page .vehicle-occurrence-main:hover td,
.vehicle-show-page .vehicle-occurrence-main:hover + .vehicle-occurrence-note td{
  background:rgba(255,255,255,.04);
}
.vehicle-show-page .vehicle-occurrence-note td{
  padding-top:0;
  padding-bottom:10px;
  background:transparent;
}
.vehicle-show-page .vehicle-occurrence-note:hover td{
  background:transparent;
}
.vehicle-show-page .vehicle-occurrence-note__content{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  color:var(--muted);
  text-align:right;
  white-space:normal;
  overflow-wrap:anywhere;
}
.vehicle-show-page .vehicle-occurrence-context{
  display:inline-flex;
  align-items:center;
  justify-content:flex-start;
  gap:0;
  margin-left:6px;
  vertical-align:middle;
  white-space:nowrap;
}
.vehicle-show-page .vehicle-position-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:1.35rem;
  height:1.35rem;
  padding:0 .35rem;
  border:1px solid var(--line);
  border-radius:999px;
  background:color-mix(in srgb, var(--surface-2) 80%, #000);
  color:var(--muted);
  font-size:.75rem;
  font-weight:700;
  line-height:1;
}
.vehicle-show-page .vehicle-occurrence-mobile-position{
  display:inline-flex;
  align-items:center;
  gap:0;
  flex-wrap:nowrap;
}
.vehicle-show-page .sp-photo{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:28px;
  height:28px;
  padding:0;
  border:0;
  background:transparent;
  border-radius:7px;
  overflow:hidden;
  line-height:0;
}
.vehicle-show-page .sp-photo .thumb-mini{
  width:28px;
  height:28px;
  object-fit:cover;
  border-radius:7px;
  display:block;
}
.vehicle-show-page .sp-photo--icon{
  width:auto;
  min-width:1.5rem;
  height:auto;
  line-height:1;
  font-size:1.05rem;
  border-radius:0;
  overflow:visible;
}
.vehicle-show-page .sp-photo:hover{
  text-decoration:none;
}
.vehicle-show-page .sp-photo.active{
  outline:1px solid var(--primary);
  outline-offset:2px;
}
.vehicles-page .table tbody tr.vehicle-row{cursor:pointer;transition:background-color .15s ease}
.vehicles-page .table tbody tr.vehicle-row:hover{background:rgba(255,255,255,.03)}
.vehicles-page .table td[data-ev]{min-width:182px}
.vehicles-page .vehicle-identity{display:grid;grid-template-columns:110px 54px;column-gap:10px;align-items:center}
.vehicles-page .vehicle-type-slot{display:flex;justify-content:flex-end;min-width:0}
.vehicles-page .vehicle-list-ev{font-variant-numeric:tabular-nums;white-space:nowrap}
.vehicles-page .vehicle-list-type-badge{display:inline-flex;align-items:baseline;gap:0;white-space:nowrap;flex:0 0 auto;width:fit-content;max-width:100%;font-size:.8em;padding:1px 7px;line-height:1}
.vehicles-page .vehicle-list-type-badge .vehicle-type-main{font-weight:800}
.vehicles-page .vehicle-list-type-badge .vehicle-type-sub{font-weight:400;opacity:.88}
@media (max-width: 820px){
  .vehicles-page{padding-bottom:calc(96px + env(safe-area-inset-bottom))}
  .vehicles-page .vehicles-metric-toggle{
    display:flex;
    gap:8px;
    align-items:center;
    justify-content:flex-start;
    width:auto;
    max-width:100%;
    margin:0 0 12px;
    padding:0;
    border:0;
    border-radius:0;
    background:transparent;
  }
  .vehicles-page .vehicles-metric-toggle__chip{
    border:1px solid var(--line);
    background:var(--surface);
    color:var(--muted);
    min-height:32px;
    padding:0 12px;
    border-radius:999px;
    font:inherit;
    font-size:.88rem;
    font-weight:600;
    cursor:pointer;
    box-shadow:none;
  }
  .vehicles-page .vehicles-metric-toggle__chip.is-active{
    background:var(--primary);
    border-color:color-mix(in srgb, var(--primary) 70%, var(--line));
    color:#111;
  }
  .vehicles-page .vehicles-year-dropdown--desktop{display:none}
  .vehicles-page .vehicles-year-dropdown--mobile{display:inline-flex}
  .vehicles-page .vehicles-metric-toggle .vehicles-year-dropdown__toggle{
    min-height:34px;
    border-radius:999px;
    padding:0 14px;
  }
  .vehicles-page .vehicles-year-dropdown__menu{
    top:calc(100% + 8px);
    left:0;
    right:auto;
    min-width:92px;
  }
  .vehicles-page .vehicles-table-wrap--desktop{display:none}
  .vehicles-page .vehicles-table-wrap--mobile{display:block}
  .vehicles-page .vehicles-table-wrap--mobile.table-wrap{overflow:visible}
  .vehicles-page .vehicles-table--mobile{table-layout:fixed}
  .vehicles-page .vehicles-table--mobile th,
  .vehicles-page .vehicles-table--mobile td{padding:10px 8px}
  .vehicles-page .vehicles-table--mobile th:first-child,
  .vehicles-page .vehicles-table--mobile td:first-child{width:46%;min-width:0}
  .vehicles-page .vehicles-table--mobile .vehicle-identity{
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
  }
  .vehicles-page .vehicles-table--mobile .vehicle-type-slot{justify-content:flex-start;display:inline-flex}
  .vehicles-page .vehicles-table--mobile .vehicle-list-ev{font-size:.98rem}
  .vehicles-page .vehicles-table--mobile td[data-ev]{min-width:0}
  .vehicles-page .vehicles-table--mobile .num{white-space:nowrap}
  .vehicle-show-page{
    padding-bottom:calc(96px + env(safe-area-inset-bottom));
  }
  .vehicle-show-page .header-grid{
    grid-template-columns:1fr;
  }
  .vehicle-show-page .vehicle-summary-table th,
  .vehicle-show-page .vehicle-summary-table td{
    padding:9px 10px;
  }
  .vehicle-show-page .vehicle-position-filter{
    padding:10px 10px 0;
    gap:6px;
  }
  .vehicle-show-page .vehicle-position-filter__chip{
    min-height:28px;
    min-width:28px;
    padding:0 10px;
    font-size:.85rem;
  }
  .vehicle-show-page .vehicle-show-gallery--hero{
    max-width:none;
  }
  .vehicle-show-page .vehicle-occurrences-wrap--desktop{
    display:none;
  }
  .vehicle-show-page .vehicle-occurrences-wrap--mobile{
    display:block;
  }
  .vehicle-show-page .vehicle-occurrences-wrap--mobile.table-wrap{
    overflow:visible;
  }
  .vehicle-show-page .vehicle-occurrences-table--mobile{
    table-layout:fixed;
  }
  .vehicle-show-page .vehicle-occurrences-table--mobile td{
    padding:10px 12px;
    white-space:normal;
  }
  .vehicle-show-page .vehicle-occurrence-mobile-row{
    display:flex;
    align-items:baseline;
    justify-content:space-between;
    gap:10px;
    flex-wrap:wrap;
  }
  .vehicle-show-page .vehicle-occurrence-mobile-row + .vehicle-occurrence-mobile-row{
    margin-top:4px;
  }
  .vehicle-show-page .vehicle-occurrence-mobile-row--top{
    color:var(--muted);
    font-size:.93rem;
  }
  .vehicle-show-page .vehicle-occurrence-mobile-position{
    white-space:nowrap;
  }
  .vehicle-show-page .vehicle-position-badge{
    min-height:20px;
    min-width:1.3rem;
    height:1.3rem;
    padding:0 .32rem;
  }
  .vehicle-show-page .vehicle-occurrence-mobile-row--metrics{
    color:var(--muted);
  }
  .vehicle-show-page .vehicle-occurrence-mobile-main:hover td,
  .vehicle-show-page .vehicle-occurrence-mobile-main:hover + .vehicle-occurrence-mobile-note td{
    background:rgba(255,255,255,.04);
  }
  .vehicle-show-page .vehicle-occurrence-mobile-note td{
    padding-top:0;
    padding-bottom:10px;
    background:transparent;
  }
.vehicle-show-page .vehicle-occurrence-mobile-note:hover td{
  background:transparent;
}
}
.line-show-page{
  padding-bottom:calc(16px + env(safe-area-inset-bottom));
}
.line-show-page .line-show-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.line-show-page .line-show-heading{
  min-width:0;
}
.line-show-page .page-actions .badge:not(.line-show-back-link){
  display:none;
}
.line-show-page .line-show-title{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  margin:0;
  padding-bottom:15px;
  font-size:clamp(1.9rem, 4vw, 2.65rem);
  line-height:1.05;
  letter-spacing:-0.03em;
  font-weight:800;
}
.line-show-page .line-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:48px;
  padding:2px 10px;
  border-radius:999px;
  border:1px solid var(--line-accent, var(--line));
  color:var(--line-accent, var(--fg));
  font-weight:700;
  line-height:1.35;
}
.line-show-page .line-show-summary,
.line-show-page .line-show-gallery,
.line-show-page .line-occurrences-wrap{
  min-width:0;
}
.line-show-page .line-show-summary{
  width:100%;
  overflow:visible;
}
.line-show-page .line-show-summary.table-wrap{
  overflow:visible;
}
.line-show-page .line-year-dropdown{
  position:relative;
  display:inline-flex;
}
.line-show-page .line-year-dropdown__toggle{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-height:28px;
  min-width:72px;
  padding:0 12px;
  border:1px solid var(--line);
  border-radius:999px;
  background:var(--surface);
  color:var(--fg);
  font:inherit;
  font-size:.9rem;
  font-weight:600;
  line-height:1;
  cursor:pointer;
}
.line-show-page .line-year-dropdown__toggle:focus{
  border-color:var(--primary);
  outline:none;
  box-shadow:0 0 0 1px color-mix(in srgb, var(--primary) 40%, transparent);
}
.line-show-page .line-year-dropdown__caret{font-size:.8em;opacity:.8}
.line-show-page .line-year-dropdown__menu{
  position:absolute;
  top:calc(100% + 6px);
  left:0;
  min-width:100%;
  padding:6px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--surface);
  box-shadow:0 14px 28px rgba(0,0,0,.35);
  z-index:var(--z-dropdown);
}
.line-show-page .line-year-dropdown__item{
  display:block;
  padding:7px 10px;
  border-radius:8px;
  color:var(--fg);
  text-decoration:none;
  white-space:nowrap;
}
.line-show-page .line-year-dropdown__item:hover{background:rgba(255,255,255,.04)}
.line-show-page .line-year-dropdown__item.is-active{
  background:color-mix(in srgb, var(--primary) 24%, transparent);
  color:var(--primary);
  font-weight:700;
}
.line-show-page .line-summary-table th.num,
.line-show-page .line-summary-table td.num{
  text-align:center;
}
.line-show-page .line-summary-table th.line-summary-year-group{
  font-weight:600;
}
.line-show-page .line-summary-table thead th.line-summary-metric-head{
  text-align:center;
  white-space:nowrap;
}
.line-show-page .line-summary-table thead th.line-summary-metric-head .material-icons{
  font-size:17px;
  line-height:1;
  vertical-align:middle;
}
.line-show-page .line-summary-meta{
  display:grid;
  gap:6px;
  margin-top:-6px;
}
.line-show-page .line-summary-meta__item{
  margin:0;
  color:var(--muted);
}
.line-show-page .line-summary-meta__label{
  color:var(--fg);
  font-weight:600;
  margin-right:6px;
}
.line-show-page .line-show-gallery--hero{
  width:100%;
  max-width:724px;
  margin-inline:auto;
}
.line-show-page .line-show-gallery--hero .hero-photo,
.line-show-page .line-show-gallery--hero .photo-empty{
  width:100%;
}
.line-show-page .hero-photo{
  position:relative;
  border:1px solid var(--line);
  border-radius:12px;
  background:#0f0f0f;
  overflow:hidden;
  padding:0;
}
.line-show-page #lineHeroImg{
  display:block;
  width:100%;
  aspect-ratio:4/3;
  object-fit:cover;
}
.line-show-page .hero-meta{
  position:absolute;
  left:8px;
  bottom:8px;
  z-index:2;
  border-collapse:separate;
  border-spacing:0;
  background:rgba(0,0,0,.5);
  backdrop-filter:blur(2px);
  color:#fff;
  font-size:.85rem;
  line-height:1.25;
  padding:6px 8px;
  border:1px solid rgba(255,255,255,.1);
  border-radius:10px;
}
.line-show-page .hero-meta td{
  padding:2px 6px;
  vertical-align:middle;
  white-space:nowrap;
}
.line-show-page .hero-meta .icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:1.2rem;
  font-size:.95rem;
  text-align:center;
  opacity:.9;
}
.line-show-page .hero-photo::after{
  content:"";
  position:absolute;
  inset:auto 0 0 0;
  height:28%;
  background:linear-gradient(0deg,rgba(0,0,0,.35),transparent);
  z-index:1;
}
.line-show-page .line-occurrences-wrap--mobile{
  display:none;
  overflow:hidden;
}
.line-show-page .line-occurrences-wrap--desktop{
  display:block;
}
.line-show-page .line-occurrences-table th,
.line-show-page .line-occurrences-table td{
  white-space:nowrap;
}
.line-show-page .line-occurrences-table thead th[data-sort-key]{
  position:relative;
  cursor:pointer;
  user-select:none;
}
.line-show-page .line-occurrences-table thead th.sort-asc::after{
  content:"\25B2";
  position:absolute;
  right:6px;
  font-size:10px;
  color:var(--primary);
}
.line-show-page .line-occurrences-table thead th.sort-desc::after{
  content:"\25BC";
  position:absolute;
  right:6px;
  font-size:10px;
  color:var(--primary);
}
.line-show-page .line-occurrences-table th.shift-col,
.line-show-page .line-occurrences-table td.shift-col{
  width:72px;
}
.line-show-page .line-occurrences-table th:nth-child(5),
.line-show-page .line-occurrences-table td:nth-child(5),
.line-show-page .line-occurrences-table th:nth-child(6),
.line-show-page .line-occurrences-table td:nth-child(6){
  text-align:left;
}
.line-show-page .line-occurrences-table th.c-photo,
.line-show-page .line-occurrences-table td.photo-cell{
  width:56px;
  min-width:56px;
  text-align:center;
  vertical-align:middle;
  padding:2px 4px;
}
.line-show-page .line-occurrence-main,
.line-show-page .line-occurrence-note,
.line-show-page .line-occurrence-mobile-main,
.line-show-page .line-occurrence-mobile-note{
  cursor:pointer;
}
.line-show-page .line-occurrence-main:hover td,
.line-show-page .line-occurrence-main:hover + .line-occurrence-note td{
  background:rgba(255,255,255,.04);
}
.line-show-page .line-occurrence-note td{
  padding-top:0;
  padding-bottom:10px;
  background:transparent;
}
.line-show-page .line-occurrence-note:hover td{
  background:transparent;
}
.line-show-page .line-occurrence-note__content{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  color:var(--muted);
  text-align:right;
  white-space:normal;
}
.line-show-page .vehicle-cell{
  white-space:normal;
}
.line-show-page .sp-photo{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:28px;
  height:28px;
  padding:0;
  border:0;
  background:transparent;
  border-radius:7px;
  overflow:hidden;
  line-height:0;
  text-decoration:none;
}
.line-show-page .sp-photo .thumb-mini{
  width:28px;
  height:28px;
  object-fit:cover;
  border-radius:7px;
  display:block;
}
.line-show-page .sp-photo--icon{
  width:auto;
  min-width:1.5rem;
  height:auto;
  line-height:1;
  font-size:1.05rem;
  border-radius:0;
}
.line-show-page .sp-photo:hover{text-decoration:none}
@media (max-width:820px){
  .line-show-page{
    padding-bottom:calc(96px + env(safe-area-inset-bottom));
  }
  .line-show-page .line-show-title{
    padding-bottom:8px;
    font-size:clamp(1.65rem, 8vw, 2.2rem);
  }
  .line-show-page .line-summary-table th,
  .line-show-page .line-summary-table td{
    padding:9px 10px;
  }
  .line-show-page .hero-meta{
    left:6px;
    right:6px;
    bottom:6px;
    font-size:.8rem;
  }
  .line-show-page .hero-meta td{
    padding:2px 5px;
  }
  .line-show-page .line-occurrences-wrap--desktop{
    display:none;
  }
  .line-show-page .line-occurrences-wrap--mobile{
    display:block;
  }
  .line-show-page .line-occurrences-wrap--mobile.table-wrap{
    overflow:visible;
  }
  .line-show-page .line-occurrences-table--mobile{
    table-layout:fixed;
  }
  .line-show-page .line-occurrences-table--mobile td{
    padding:10px 12px;
    white-space:normal;
  }
  .line-show-page .line-occurrence-mobile-row{
    display:flex;
    align-items:baseline;
    justify-content:space-between;
    gap:10px;
    flex-wrap:wrap;
  }
  .line-show-page .line-occurrence-mobile-row + .line-occurrence-mobile-row{
    margin-top:4px;
  }
  .line-show-page .line-occurrence-mobile-row--top{
    color:var(--muted);
    font-size:.93rem;
  }
  .line-show-page .line-occurrence-mobile-row--metrics{
    color:var(--muted);
  }
  .line-show-page .line-occurrence-mobile-vehicle{
    white-space:normal;
  }
  .line-show-page .line-occurrence-mobile-main:hover td,
  .line-show-page .line-occurrence-mobile-main:hover + .line-occurrence-mobile-note td{
    background:rgba(255,255,255,.04);
  }
  .line-show-page .line-occurrence-mobile-note td{
    padding-top:0;
    padding-bottom:10px;
    background:transparent;
  }
  .line-show-page .line-occurrence-mobile-note:hover td{
    background:transparent;
  }
}
.admin-vehicles-page .admin-vehicle-search-card{padding:10px 0;margin-bottom:12px;background:transparent;border:0;box-shadow:none}
.admin-vehicles-page .admin-vehicle-search-toolbar{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  flex-wrap:wrap;
}
.admin-vehicles-page .admin-vehicle-search-wrap{
  position:relative;
  flex:1 1 340px;
  max-width:540px;
}
.admin-vehicles-page .admin-vehicle-search-input{
  min-height:40px;
  padding-right:38px;
}
.admin-vehicles-page .admin-vehicle-search-clear{
  position:absolute;
  top:50%;
  right:10px;
  transform:translateY(-50%);
  width:24px;
  height:24px;
  border:0;
  padding:0;
  border-radius:999px;
  background:transparent;
  color:var(--muted);
  font-size:1.15rem;
  line-height:1;
  cursor:pointer;
}
.admin-vehicles-page .admin-vehicle-search-clear:hover{color:var(--fg);background:rgba(255,255,255,.06)}
.admin-vehicles-page .admin-vehicle-search-add{flex:0 0 auto}
@media (max-width:640px){
  .admin-vehicles-page .admin-vehicle-search-wrap{
    flex-basis:100%;
    max-width:none;
  }
  .admin-vehicles-page .admin-vehicle-search-add{
    width:auto;
    justify-content:flex-start;
  }
}

/* =========================================
   18) Lines (scoped)
========================================= */
.lines-page{padding-bottom:calc(16px + env(safe-area-inset-bottom))}
.lines-page .lines-year-dropdown{position:relative;display:inline-flex}
.lines-page .lines-year-dropdown--mobile{display:none}
.lines-page .lines-year-dropdown__toggle{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-height:28px;
  min-width:72px;
  padding:2px 10px;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--surface);
  color:var(--fg);
  font:inherit;
  font-size:.84rem;
  font-weight:600;
  line-height:1.1;
  cursor:pointer;
  box-shadow:none;
}
.lines-page .lines-year-dropdown__toggle:focus{
  border-color:var(--primary);
  outline:none;
  box-shadow:0 0 0 1px color-mix(in srgb, var(--primary) 40%, transparent);
}
.lines-page .lines-year-dropdown__caret{font-size:.8em;opacity:.8}
.lines-page .lines-year-dropdown__menu{
  position:absolute;
  top:calc(100% + 6px);
  left:0;
  min-width:100%;
  padding:6px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--surface);
  box-shadow:0 10px 24px rgba(0,0,0,.28);
  z-index:30;
}
.lines-page .lines-year-dropdown__item{
  display:block;
  padding:7px 10px;
  border-radius:8px;
  color:var(--fg);
  text-decoration:none;
  white-space:nowrap;
}
.lines-page .lines-year-dropdown__item:hover{background:rgba(255,255,255,.04)}
.lines-page .lines-year-dropdown__item.is-active{
  background:color-mix(in srgb, var(--primary) 24%, transparent);
  color:var(--primary);
  font-weight:700;
}
.lines-page .lines-metric-toggle{display:none}
.lines-page .lines-table-wrap--mobile{display:none;overflow:hidden}
.lines-page .lines-table-wrap--desktop{display:block}
.lines-page .lines-metrics-table{width:100%}
.lines-page .lines-metrics-table--desktop thead th[colspan]{text-align:center}
.lines-page .lines-metrics-table--desktop thead th.lines-year-group{padding-top:6px;padding-bottom:6px}
.lines-page .lines-metric-head{white-space:nowrap}
.lines-page .lines-metric-head .material-icons{font-size:17px;line-height:1;vertical-align:middle}
.lines-page .lines-metrics-table th.num,
.lines-page .lines-metrics-table td.num{text-align:center}
.lines-page .lines-metrics-table thead th[data-sort-key]{cursor:pointer;position:relative;user-select:none}
.lines-page .lines-metrics-table thead th.sort-asc::after{content:"\25B2";position:absolute;right:6px;font-size:10px}
.lines-page .lines-metrics-table thead th.sort-desc::after{content:"\25BC";position:absolute;right:6px;font-size:10px}
.lines-page .line-row{cursor:pointer;transition:background-color .15s ease}
.lines-page .line-row:hover td{background:rgba(255,255,255,.03)}
.lines-page .line-empty-row:hover{background:transparent}
.lines-page .line-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:46px;
  padding:2px 10px;
  border-radius:999px;
  font-weight:700;
  line-height:1.35;
  margin-right:0;
}
.lines-page .lines-table-wrap--desktop td:first-child,
.lines-page .lines-table-wrap--mobile td:first-child{min-width:0}
@media (max-width:820px){
  .lines-page{padding-bottom:calc(96px + env(safe-area-inset-bottom))}
  .lines-page .lines-metric-toggle{
    display:flex;
    gap:8px;
    align-items:center;
    justify-content:flex-start;
    width:auto;
    max-width:100%;
    margin:0 0 12px;
    padding:0;
    border:0;
    border-radius:0;
    background:transparent;
  }
  .lines-page .lines-metric-toggle__chip{
    border:1px solid var(--line);
    background:var(--surface);
    color:var(--muted);
    min-height:32px;
    padding:0 12px;
    border-radius:999px;
    font:inherit;
    font-size:.88rem;
    font-weight:600;
    cursor:pointer;
    box-shadow:none;
  }
  .lines-page .lines-metric-toggle__chip.is-active{
    background:var(--primary);
    border-color:color-mix(in srgb, var(--primary) 70%, var(--line));
    color:#111;
  }
  .lines-page .lines-year-dropdown--desktop{display:none}
  .lines-page .lines-year-dropdown--mobile{display:inline-flex}
  .lines-page .lines-metric-toggle .lines-year-dropdown__toggle{
    min-height:34px;
    border-radius:999px;
    padding:0 14px;
  }
  .lines-page .lines-year-dropdown__menu{
    top:calc(100% + 8px);
    left:0;
    right:auto;
    min-width:92px;
  }
  .lines-page .lines-table-wrap--desktop{display:none}
  .lines-page .lines-table-wrap--mobile{display:block}
  .lines-page .lines-table-wrap--mobile.table-wrap{overflow:visible}
  .lines-page .lines-metrics-table--mobile{table-layout:fixed}
  .lines-page .lines-metrics-table--mobile th,
  .lines-page .lines-metrics-table--mobile td{padding:10px 8px}
  .lines-page .lines-metrics-table--mobile th:first-child,
  .lines-page .lines-metrics-table--mobile td:first-child{width:40%;min-width:0}
  .lines-page .lines-metrics-table--mobile .num{white-space:nowrap}
}

/* =========================================
   19) Photo index grid
========================================= */
.modal-open{overflow:hidden}
.photo-library-tools{padding:10px 0;background:transparent;border:0;box-shadow:none}
.photo-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}
.photo-toolbar__left,
.photo-toolbar__right{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.photo-toolbar__left{justify-content:flex-start}
.photo-toolbar__right{justify-content:flex-end;margin-left:auto}
.photo-toolbar .btn{
  min-height:38px;
  padding:0 14px;
  border-radius:12px;
  line-height:1.1;
  white-space:nowrap;
}
.photo-active-filters{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:12px;
}
.photo-filters-modal[hidden]{display:none!important}
.photo-filters-modal{
  position:fixed;
  inset:0;
  z-index:var(--z-overlay);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
}
.photo-filters-modal__backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.66);
}
.photo-filters-modal__dialog{
  position:relative;
  z-index:1;
  width:min(100%, 720px);
  max-height:min(88vh, 760px);
  overflow:auto;
  padding:14px 16px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:16px;
  box-shadow:0 24px 56px rgba(0,0,0,.46);
}
.photo-filters-modal__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
  padding-bottom:8px;
  border-bottom:1px solid var(--line);
}
.photo-filters-modal__head h2{margin:0;font-size:1.1rem}
.photo-filters-modal__close{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  border:1px solid var(--line);
  border-radius:10px;
  background:transparent;
  color:var(--fg);
  font:inherit;
  font-size:1.35rem;
  line-height:1;
  cursor:pointer;
  transition:background .15s ease, transform .06s ease;
}
.photo-filters-modal__close:hover{background:var(--surface-2)}
.photo-filters-modal__close:active{transform:translateY(1px)}
.photo-filters-modal__close:focus{outline:2px solid var(--primary);outline-offset:2px}
.photo-filters-grid{gap:10px}
.photo-filters-modal__form{gap:12px}
.photo-filters-modal__form .form-field{gap:6px}
.photo-filters-modal__actions{justify-content:flex-start;margin-top:2px}
.photo-filters-modal__actions .btn{
  min-height:38px;
  padding:0 14px;
  border-radius:12px;
}
.photo-library-page{min-width:0}
.photos-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:12px;
  min-width:0;
}
.photo-card{
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:14px;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  box-shadow:0 1px 2px rgba(0,0,0,.22)
}
.photo-card__img{position:relative;background:#0d0d0d;overflow:hidden}
.photo-card__click{
  display:block;border:0;background:transparent;padding:0;width:100%;cursor:pointer;
  text-decoration:none;color:inherit
}
.photo-card__click.is-missing{
  display:grid;
  place-items:center;
  aspect-ratio:4/3;
  background:#101010;
}
.photo-card__click img{
  display:block;
  width:100%;
  aspect-ratio:4/3;
  object-fit:cover;
  transition:transform .22s ease
}
.photo-card__click:hover img,
.photo-card__click:focus-visible img{transform:scale(1.035)}
.photo-card__placeholder{
  display:none;
  align-items:center;
  justify-content:center;
  width:100%;
  height:100%;
  min-height:0;
  color:var(--text-2);
  font-size:1.4rem;
  background:linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.04));
}
.photo-card__click.is-missing .photo-card__placeholder{display:inline-flex}
.photo-card__body{display:grid;gap:4px;padding:9px 10px 8px}
.photo-card__row{
  display:grid;
  gap:3px;
  align-items:start;
}
.photo-card__row--compact{
  grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
  column-gap:10px;
  row-gap:3px;
}
.photo-card__meta-item{
  display:grid;
  grid-template-columns:1rem minmax(0,1fr);
  gap:7px;
  align-items:start;
  min-width:0;
  line-height:1.15;
}
.photo-card__meta-item--location{grid-column:auto}
.photo-card__icon{
  line-height:1.1;
  font-size:.95rem;
  opacity:.92;
}
.photo-card__value{
  min-width:0;
  font-size:.88rem;
  line-height:1.2;
  overflow-wrap:anywhere;
}
.photo-card__value a{color:var(--fg);text-decoration:none}
.photo-card__value a:hover{color:var(--primary)}
.photo-card__vehicle-links{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:4px 6px;
}
.photo-card__line-link{display:inline-flex;align-items:baseline;gap:0;text-decoration:none;flex-wrap:wrap}
.photo-card__subvalue{
  font-size:.8em;
  color:var(--muted);
  font-weight:400;
}
.photo-card__actions{
  display:flex;
  gap:8px;
  justify-content:flex-end;
  align-items:center;
  padding:0 12px 12px;
  margin-top:auto;
}
.photo-card__delete-form{
  position:absolute;
  top:10px;
  right:10px;
  z-index:2;
  display:inline-flex;
}
.photo-card__delete{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:32px;
  height:32px;
  border:1px solid color-mix(in srgb,var(--danger) 38%, var(--line));
  border-radius:10px;
  background:rgba(17,17,17,.84);
  color:#fff;
  cursor:pointer;
  box-shadow:0 2px 10px rgba(0,0,0,.28);
  transition:opacity .18s ease, background .15s, border-color .15s, transform .06s;
}
.photo-card__delete:hover{
  background:color-mix(in srgb,var(--danger) 28%, rgba(17,17,17,.84));
  border-color:color-mix(in srgb,var(--danger) 60%, var(--line));
}
.photo-card__delete:active{transform:translateY(1px)}
.photo-detail-page{
  min-width:0;
}
.photo-detail-header{
  align-items:flex-start;
}
.photo-detail-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px 14px;
  margin-top:8px;
  color:var(--text-2);
}
.photo-detail-meta__item{
  display:inline-flex;
  flex-wrap:wrap;
  gap:5px;
  min-width:0;
}
.photo-detail-meta__label{
  color:var(--muted);
}
.photo-detail-meta a{
  color:var(--fg);
  text-decoration:none;
}
.photo-detail-meta a:hover{
  color:var(--primary);
}
.photo-detail-meta__vehicle-list{
  display:inline-flex;
  flex-wrap:wrap;
  gap:4px 6px;
}
.photo-detail-media{
  padding:0;
  overflow:hidden;
}
.photo-detail-media__frame{
  position:relative;
  background:#0f0f0f;
  min-height:320px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.photo-detail-media__link{
  display:block;
  width:100%;
}
.photo-detail-media__link img{
  display:block;
  width:100%;
  max-width:100%;
  height:auto;
  max-height:min(82vh, 1200px);
  object-fit:contain;
  background:#0f0f0f;
}
.photo-detail-media__placeholder{
  display:none;
  place-items:center;
  gap:10px;
  width:100%;
  min-height:320px;
  padding:24px;
  text-align:center;
  color:var(--text-2);
  background:linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.04));
}
.photo-detail-media__placeholder.is-visible{display:grid}
.photo-detail-media__frame.is-missing .photo-detail-media__placeholder{
  display:grid;
}
.photo-detail-media__placeholder-icon{
  font-size:2rem;
}
.photo-detail-note{
  padding:14px 16px;
}
.photo-detail-note__label{
  color:var(--muted);
  font-size:.84rem;
  margin-bottom:6px;
}
.photo-detail-note__body{
  white-space:pre-wrap;
  line-height:1.5;
}
@media (hover:hover){
  .photo-card__delete-form{
    opacity:0;
    pointer-events:none;
  }
  .photo-card:hover .photo-card__delete-form,
  .photo-card:focus-within .photo-card__delete-form{
    opacity:1;
    pointer-events:auto;
  }
}

/* =========================================
   20) RWD zÃ³ny
========================================= */
/* tabulky pod 900px zÅ¯stÃ¡vajÃ­ tabulkami; pouÅ¾Ã­vÃ¡ se scroll wrapper */
@media (max-width:900px){
  .table-wrap.scroll-x>.table{min-width:680px}
  .photo-library-page,
  .photo-detail-page{
    padding-bottom:calc(88px + env(safe-area-inset-bottom));
  }
}
@media (max-width:760px){
  .photo-filters-modal{
    align-items:flex-start;
    justify-content:center;
    padding:
      max(12px, env(safe-area-inset-top, 0px))
      12px
      calc(92px + env(safe-area-inset-bottom, 0px));
  }
  .photo-filters-modal__dialog{
    width:min(100%, calc(100vw - 24px));
    max-width:680px;
    max-height:calc(100dvh - 24px - (92px + env(safe-area-inset-bottom, 0px)));
    padding:14px;
    margin-top:max(8px, env(safe-area-inset-top, 0px));
    overflow:auto;
  }
  .photo-filters-modal__actions{
    position:sticky;
    bottom:-14px;
    margin:10px -14px -14px;
    padding:12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
    background:linear-gradient(to top, color-mix(in srgb, var(--surface) 94%, #000), color-mix(in srgb, var(--surface) 82%, transparent));
    border-top:1px solid var(--line);
  }
  .photos-grid{
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:10px;
  }
}
@media (max-width:560px){
  .photo-toolbar{align-items:flex-start}
  .photo-toolbar__left,
  .photo-toolbar__right{width:100%}
  .photo-toolbar__right{justify-content:flex-start;margin-left:0}
  .photo-toolbar .btn{min-height:38px}
  .photo-card__row--compact{grid-template-columns:1fr}
  .photos-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:10px;
  }
  .photo-detail-meta{
    gap:6px 10px;
  }
  .photo-detail-media__frame,
  .photo-detail-media__placeholder{
    min-height:220px;
  }
}
.month-select{background:var(--surface);border:1px solid var(--line);color:var(--fg);border-radius:10px;padding:6px 10px}

/* form-row a edit-head RWD */
@media (max-width:900px){.form-row{grid-template-columns:1fr 1fr}#edit-head{grid-template-columns:1fr 1fr}#edit-head .save-cell{grid-column:span 2}}
@media (max-width:600px){.form-row{grid-template-columns:1fr}#edit-head{grid-template-columns:1fr}#edit-head .save-cell{grid-column:auto}}


/* === Snacks (kompakt) === */
#snackFieldset{border:0;padding:0;background:transparent}
#snackFieldset legend,.snacks .hint{display:none}

.snacks{display:flex;flex-direction:column;gap:6px}
.snacks .row{display:flex;align-items:center;gap:12px;margin:4px 0}
.snacks .snack-label{min-width:140px}
.snacks .snack-label .muted{opacity:.7}

/* InverznÃ­ aktivnÃ­ volba */
.snacks .seg{display:inline-flex;border:1px solid var(--line);border-radius:999px;overflow:hidden}
.snacks .seg input{position:absolute;opacity:0;pointer-events:none}
.snacks .seg label{padding:6px 10px;font-size:.9rem;cursor:pointer;user-select:none;margin-bottom:0px;}
.snacks .seg label+input+label{border-left:1px solid var(--line)}
/* aktivnÃ­ = primÃ¡rnÃ­ pozadÃ­, tmavÃ½ text */
.snacks .seg input:checked + label{background: var(--primary, #4da3ff);color: #000;border-color: var(--primary, #4da3ff);box-shadow: inset 0 0 0 1px var(--primary, #4da3ff);}
/* volitelnÄ›: hover na neaktivnÃ­ch segmentech */
.snacks .seg label:hover{background: rgba(255,255,255,.04)}


/* Linky: vzhled ÄipÅ¯ */
.line-chip,
.snack-chip { padding:5px 10px 5px 5px; background:var(--line); transition:.15s ease; }
.line-chip:hover,
.snack-chip:hover { background:#232323; color:var(--primary); text-decoration:none; transition:.15s ease; }
.chips {font-size: 0.9em}

.line-chip .chip-label{opacity:.7;margin-right:6px;}
.line-badge{display:inline-flex;align-items:center;border:1px solid var(--fg);border-radius:999px;padding:0 8px;margin-right:6px;transition:.15s ease;}
.line-chip:hover .line-badge{ border:1px solid var(--primary); transition:.15s ease; }
.line-badge strong{font-weight:700}
.line-chip .chip-meta{font-weight:400;margin-right:5px}

/* Snack Äip */
.snack {margin-right: 10px;}
a.snack {color: var(--fg); transition:.15s ease;}
a.snack:hover {color: var(--primary); text-decoration: none; transition:.15s ease;}
.snack-chip .chip-label{margin-right:6px}
.snack-chip .chip-meta{font-weight:400;margin-right:5px}

/* ==== MÄ›sÃ­ÄnÃ­ navigace ==== */
.month-bar{
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px 12px;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.month-bar__left, .month-bar__right{ display:flex; gap:8px; }
.month-bar__center{ flex:1 1 auto; text-align:center; position:relative; }

.month-title{ margin:0; font-size:1.1rem; font-weight:600; }
.month-title__button{
  background:transparent; border:1px solid var(--line);
  padding:6px 10px; border-radius:10px; color:var(--fg); cursor:pointer;
}
.month-title__button:hover{ background:var(--surface-2); }

/* volitelnÄ›: popup */
.month-popup{
  position:absolute; left:50%; transform:translateX(-50%);
  top:calc(100% + 6px); background:var(--surface);
  border:1px solid var(--line); border-radius:10px; padding:6px; z-index:20;
}
.month-popup__select{ width:220px; }

/* ===== Shifts: rychlonavigace rok/mÄ›sÃ­c (kompakt) ===== */
.month-quicknav{display:grid;gap:6px;margin-top:6px}

.mq-years,
.mq-months{
  display:grid;
  grid-auto-flow:column;
  grid-auto-columns:max-content;
  gap:6px;
  overflow-x:auto;
  padding:6px;
  border:1px solid var(--line);
  background:var(--surface-2);
  border-radius:10px;
  scroll-snap-type:x proximity;
}

/* scrollbar ztenÄenÃ½, neblokujÃ­cÃ­ */
.mq-years::-webkit-scrollbar,
.mq-months::-webkit-scrollbar{height:6px}
.mq-years::-webkit-scrollbar-thumb,
.mq-months::-webkit-scrollbar-thumb{background:var(--line);border-radius:6px}

/* Roky jako â€žbadgeâ€œ tlaÄÃ­tka */
.mq-years .badge{
  scroll-snap-align:start;
  border:1px solid var(--line);
  background:var(--surface);
  padding:6px 10px;
  border-radius:999px;
  font-weight:600;
  line-height:1;
  white-space:nowrap;
  cursor:pointer;
  user-select:none;
}
.mq-years .badge:hover{background:var(--surface-3)}
.mq-years .badge.active{
  background:var(--fg);
  color:#000;
  border-color:var(--fg);
}

/* MÄ›sÃ­ce jako kompaktnÃ­ chips */
.mq-months a.chip{
  scroll-snap-align:start;
  border:1px solid var(--line);
  background:var(--surface);
  color:var(--fg);
  padding:6px 10px;
  border-radius:12px;
  text-decoration:none;
  line-height:1;
  white-space:nowrap;
  display:inline-block;
}
.mq-months .chip:hover{background:var(--surface-3)}
.mq-months .chip.active{
  background:var(--fg);
  color:#000;
  border-color:var(--fg);
}

/* A11y focus */
.mq-years .badge:focus-visible,
.mq-months .chip:focus-visible{outline:2px solid var(--fg);outline-offset:2px}

/* JemnÃ© zhutnÄ›nÃ­ hornÃ­ liÅ¡ty (neovlivnÃ­ jinde) */
.month-bar__left .btn,
.month-bar__right .btn{padding:6px 10px}

/* RWD: na ÃºzkÃ© Å¡Ã­Å™ce drÅ¾ horizontÃ¡lnÃ­ posuv a kompaktnÃ­ centrum */
@media (max-width:720px){
  .month-title{text-align:center}
  .month-bar{gap:8px}
  .mq-years,.mq-months{padding:6px}
}

/* ===== Rychlonavigace bez boxÅ¯ v pozadÃ­ ===== */
.mq-years,
.mq-months{
  background:transparent;
  border:0;
  padding:0;
}

.mq-years .badge,
.mq-months a.chip{
  background:transparent;
  border:0;
  border-radius:0;
  padding:4px 6px;
  line-height:1.2;
  white-space:nowrap;
  display:inline-block;
  color:var(--fg);
  text-decoration:none;
  border-bottom:2px solid transparent;
  transition:color .15s, border-color .15s;
}

.mq-years .badge:hover,
.mq-months .chip:hover{
  color:var(--primary);
  border-bottom-color:color-mix(in srgb, var(--primary) 70%, transparent);
}

.mq-years .badge.active,
.mq-months .chip.active{
  font-weight:700;
  border-bottom-color:var(--fg);
}

.mq-years .badge:focus-visible,
.mq-months .chip:focus-visible{
  outline:2px solid var(--primary);
  outline-offset:2px;
}

/* jemnÃ© mezery kolem Å¡ipek, bez zmÄ›ny jinde */
.month-bar__left .btn,
.month-bar__right .btn{ padding:6px 10px }


/* ===== CentrovanÃ¡ rychlonavigace ===== */
.month-bar{
  justify-content:center;
  text-align:center;
}
.month-bar__left,
.month-bar__right{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
}
.month-bar__left{left:12px}
.month-bar__right{right:12px}

/* stÅ™edovÃ½ obsah zarovnanÃ½ na stÅ™ed */
.month-bar__center{
  flex:0 1 auto;
  text-align:center;
}
.month-title{margin-bottom:4px;font-size:1.2rem}
.month-quicknav{
  display:inline-grid;
  gap:4px;
  justify-items:center;
}
.mq-years,
.mq-months{
  justify-content:center;
  overflow-x:auto;
}
.mq-years .badge,
.mq-months .chip{
  border-bottom:2px solid transparent;
}
.mq-years .badge.active,
.mq-months .chip.active{
  border-bottom-color:var(--fg);
  font-weight:700;
}

/* pro malÃ© displeje */
@media (max-width:720px){
  .month-bar__left{left:8px}
  .month-bar__right{right:8px}
}

/* Linka: povolit zalomenÃ­ max na 2 Å™Ã¡dky */
.table--shifts .linka-wrap{
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  line-height:1.25;
  max-height:calc(1.25em * 2);
  white-space:normal;     /* umoÅ¾nÃ­ zalomenÃ­ chipÅ¯ */
}

/* Äitelnost chipÅ¯ v ÃºzkÃ©m Å™Ã¡dku */
.table--shifts .linka-wrap .chip{margin-right:6px;margin-bottom:4px}

/* akce uÅ¾ mÃ¡me ÃºzkÃ©, jen zajistit neÅ¡irÅ¡Ã­ neÅ¾ col */
.table--shifts td.actions{width:auto}

/* Parts: fixnÃ­ Å¡Ã­Å™ky sloupcÅ¯ */
.table.parts{table-layout:fixed}
.table.parts col.c-line,
.table.parts col.c-course,
.table.parts col.c-order{width:3.5ch}   /* aÅ¾ 3 znaky */
.table.parts col.c-range{width:18ch}
.table.parts col.c-km{width:8ch}
.table.parts col.c-type{width:10ch}
.table.parts col.c-ev{width:16ch}
.table.parts col.c-photo{width:56px}
.table.parts col.c-note{width:auto}
.table.parts td.nowrap{white-space:nowrap}

.shift-show-page .table.parts col.c-line{width:8ch}
.shift-show-page .table.parts col.c-order{width:4.5ch}
.shift-show-page .table.parts col.c-course{width:5ch}
.shift-show-page .table.parts col.c-range{width:14ch}
.shift-show-page .table.parts col.c-km{width:9ch}
.shift-show-page .table.parts col.c-type{width:11ch}
.shift-show-page .table.parts col.c-ev{width:18ch}
.shift-show-page .table.parts col.c-photo{width:56px}


/* ================================
   Shifts page
================================ */
.page-shell.shifts-page{width:100%}
.shifts-page .filters-bar,
.shifts-page .shifts-list,
.shifts-page .pager{width:100%}

.shifts-page .toolbar-label{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

.shifts-page .filters-bar{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-bottom:12px;
}

.shifts-page .filters-panel{
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:16px;
  background:color-mix(in srgb,var(--surface) 96%, #000);
}

.shifts-page .filters-left,
.shifts-page .filters-right{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.shifts-page .smart-filter-field{
  display:flex;
  flex-direction:column;
  gap:2px;
  flex:1 1 560px;
  min-width:0;
}

.shifts-page .smart-filter-control{position:relative;display:flex;align-items:center}
.shifts-page .smart-filter-control .quick-input{width:100%;min-width:0;padding-right:42px}

.shifts-page .smart-filter-help-toggle{
  position:absolute;
  right:8px;
  top:50%;
  transform:translateY(-50%);
  width:26px;
  height:26px;
  min-height:0;
  padding:0;
  border:0;
  border-radius:999px;
  background:transparent;
  color:var(--muted);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}
.shifts-page .smart-filter-help-toggle .material-icons{font-size:18px;line-height:1}
.shifts-page .smart-filter-help-toggle:hover,
.shifts-page .smart-filter-help-toggle[aria-expanded="true"]{
  color:var(--primary);
  background:color-mix(in srgb,var(--primary) 10%, transparent);
}

.shifts-page .smart-filter-help-popover[hidden]{display:none!important}
.shifts-page .smart-filter-help-popover{
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  z-index:var(--z-dropdown);
  width:min(220px,calc(100vw - 24px));
  padding:8px 10px;
  border:1px solid var(--line);
  border-radius:12px;
  background:color-mix(in srgb,var(--surface) 96%, #000);
  box-shadow:0 14px 36px rgba(0,0,0,.34);
  display:grid;
  gap:4px;
  color:var(--text);
  font-size:.74rem;
  line-height:1.2;
}
.shifts-page .smart-filter-help-popover code{font:inherit;color:var(--primary);background:transparent;padding:0}

.shifts-page .filters-cta,
.shifts-page .sort-group,
.shifts-page .perpage-group{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
}

.shifts-page .filters-bar .btn,
.shifts-page .filters-bar .input,
.shifts-page .date-range-toggle{height:38px}
.shifts-page .filters-bar .btn.active{
  background:color-mix(in srgb,var(--primary) 18%, var(--surface-2));
  border-color:color-mix(in srgb,var(--primary) 45%, var(--line));
  color:var(--text);
}

.shifts-page .date-range-picker{
  position:relative;
  display:flex;
  flex-direction:column;
  gap:2px;
  flex:0 0 auto;
  min-width:236px;
}
.shifts-page .date-range-toggle{justify-content:flex-start;gap:8px;min-width:236px}

.shifts-page .date-range-layer{position:absolute;left:0;top:100%;z-index:var(--z-overlay);margin-top:8px}
.shifts-page .date-range-layer[hidden]{display:none!important}
.shifts-page .date-range-backdrop{display:none}
.shifts-page .date-range-popover{
  width:min(340px,calc(100vw - 24px));
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:16px;
  box-shadow:0 18px 60px rgba(0,0,0,.35);
  padding:14px;
}
.shifts-page .date-range-popover__head{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:8px;margin-bottom:10px}
.shifts-page .date-range-popover__title{text-align:center;font-weight:700;text-transform:capitalize}
.shifts-page .date-range-weekdays,
.shifts-page .date-range-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px}
.shifts-page .date-range-weekdays{margin-bottom:8px;color:var(--muted);font-size:.82rem;text-align:center}
.shifts-page .date-range-day{
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--surface-2);
  color:var(--text);
  min-height:38px;
  font:inherit;
  cursor:pointer;
}
.shifts-page .date-range-day:hover{border-color:var(--primary);transform:translateY(-1px)}
.shifts-page .date-range-day.is-outside{opacity:.45}
.shifts-page .date-range-day.is-today{box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--primary) 50%, transparent)}
.shifts-page .date-range-day.is-in-range{background:color-mix(in srgb,var(--primary) 16%, var(--surface-2));border-color:color-mix(in srgb,var(--primary) 35%, var(--line))}
.shifts-page .date-range-day.is-start,
.shifts-page .date-range-day.is-end{background:var(--primary);border-color:var(--primary);color:#00150f}
.shifts-page .date-range-actions{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-top:12px}

.shifts-page .shifts-list{display:flex;flex-direction:column;gap:10px}
.shifts-page .shift-banner{
  position:relative;
  display:flex;
  flex-direction:column;
  gap:6px;
  padding:12px 14px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:16px;
  box-shadow:0 1px 3px rgba(0,0,0,.3);
  transition:background .15s;
  overflow:visible;
}
.shifts-page .shift-banner:not(.row-green):not(.row-red):not(.is-off):not(.is-unpaid):not(.is-sick):hover{background:var(--surface-2)}
.shifts-page .shift-banner.row-green{background:rgba(0,160,80,.08)}
.shifts-page .shift-banner.row-red{background:rgba(220,60,60,.08)}
.shifts-page .shift-banner.is-off,
.shifts-page .shift-banner.is-unpaid{background:rgba(0,160,80,.12)}
.shifts-page .shift-banner.is-sick{background:rgba(220,60,60,.12)}

.shifts-page .shift-banner.has-rowlink .row-link{position:absolute;inset:0;z-index:1;display:block;text-indent:-9999px}
.shifts-page .shift-banner.has-rowlink .shift-actions,
.shifts-page .shift-banner.has-rowlink .shift-note{position:relative;z-index:2}
.shifts-page .shift-banner.has-rowlink .shift-note{pointer-events:none}
.shifts-page .shift-banner.has-rowlink .shift-actions *,
.shifts-page .shift-banner.has-rowlink .shift-note a{pointer-events:auto}

.shifts-page .shift-main{
  display:grid;
  align-items:center;
  gap:6px 12px;
  grid-template-columns:minmax(32ch,max-content) minmax(28ch,1fr) max-content 40px;
  grid-template-areas:"headline pairs metrics actions";
}
.shifts-page .shift-main > *{min-width:0}
.shifts-page .shift-date{display:flex;flex-direction:column;line-height:1.18}
.shifts-page .shift-date .small{margin-top:2px;color:var(--muted)}
.shifts-page .shift-date-day--short{display:none}
.shifts-page .shift-headline{
  display:grid;
  grid-template-columns:13ch 7ch minmax(10ch,13ch);
  align-items:center;
  gap:6px 12px;
  min-width:0;
}
.shifts-page .shift-type{text-align:left;font-weight:600}
.shifts-page .shift-type-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:24px;
  padding:2px 9px;
  border-radius:999px;
  border:1px solid color-mix(in srgb,var(--line) 82%, transparent);
  background:color-mix(in srgb,var(--surface-2) 76%, #000);
  font-size:.88rem;
  line-height:1.1;
}
.shifts-page .shift-depot{text-align:left;min-width:0}
.shifts-page .shift-depot--summary{display:none}
.shifts-page .shift-summaryline{display:contents;grid-area:metrics}
.shifts-page .shift-route-pairs{
  grid-area:pairs;
  display:grid;
  gap:4px;
  min-width:0;
}
.shifts-page .shift-route-pair{
  display:grid;
  grid-template-columns:max-content minmax(0,1fr);
  gap:10px 12px;
  align-items:center;
  min-width:0;
}
.shifts-page .shift-line,
.shifts-page .shift-range{display:flex;flex-direction:column;gap:4px}
.shifts-page .shift-line{justify-self:end;text-align:right}
.shifts-page .shift-line .row{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end}
.shifts-page .shift-line .chip{margin-right:6px}
.shifts-page .shift-range{min-width:0}
.shifts-page .shift-range > div{white-space:nowrap}
.shifts-page .shift-metrics{
  display:grid;
  grid-template-columns:max-content max-content;
  gap:6px 14px;
  align-items:center;
  justify-content:end;
}
.shifts-page .shift-headline{grid-area:headline}
.shifts-page .shift-time,
.shifts-page .shift-km{font-variant-numeric:tabular-nums;text-align:right;white-space:nowrap}
.shifts-page .shift-time::before,
.shifts-page .shift-km::before{
  font-family:"Material Icons";
  font-size:18px;
  vertical-align:middle;
  opacity:.7;
  margin-right:4px;
  line-height:1;
}
.shifts-page .shift-time::before{content:"schedule"}
.shifts-page .shift-km::before{content:"route"}

.shifts-page .shift-actions{
  grid-column:-1;
  justify-self:start;
  display:inline-flex;
  align-items:center;
  justify-content:flex-start;
  gap:4px;
  line-height:1;
  z-index:2;
}
.shifts-page .shift-action-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:24px;
  height:24px;
  min-height:0;
  padding:0;
  border:1px solid transparent;
  border-radius:999px;
  background:transparent;
  color:var(--muted);
  line-height:1;
  text-decoration:none;
  cursor:pointer;
}
.shifts-page .shift-action-btn .material-icons{font-size:15px;line-height:1}
.shifts-page .shift-action-btn:hover{
  border-color:var(--line);
  background:color-mix(in srgb,var(--surface-2) 82%, #000);
  color:var(--text);
  text-decoration:none;
}
.shifts-page .shift-action-btn.danger:hover{
  border-color:color-mix(in srgb,var(--danger) 45%, var(--line));
  background:color-mix(in srgb,var(--danger) 12%, var(--surface-2));
  color:#fff;
}

.shifts-page .shift-note{
  border-top:1px solid var(--line);
  padding-top:8px;
  font-size:.9em;
  color:var(--muted);
}

.shifts-page .shift-banner.is-off .shift-main>:not(.shift-date):not(.shift-type):not(.shift-actions),
.shifts-page .shift-banner.is-sick .shift-main>:not(.shift-date):not(.shift-type):not(.shift-actions),
.shifts-page .shift-banner.is-unpaid .shift-main>:not(.shift-date):not(.shift-type):not(.shift-actions){display:none!important}
.shifts-page .shift-banner.is-off .shift-note,
.shifts-page .shift-banner.is-sick .shift-note,
.shifts-page .shift-banner.is-unpaid .shift-note{display:none!important}

.shifts-page .shift-banner.is-off .shift-main,
.shifts-page .shift-banner.is-unpaid .shift-main,
.shifts-page .shift-banner.is-sick .shift-main{grid-template-columns:13ch 1fr 40px}
.shifts-page .shift-banner.is-off .shift-type,
.shifts-page .shift-banner.is-unpaid .shift-type,
.shifts-page .shift-banner.is-sick .shift-type{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  text-align:left;
}

.shifts-page .pager{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px 10px;
  flex-wrap:wrap;
}
.shifts-page .pager__nav,
.shifts-page .pager__pages{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  flex-wrap:wrap;
}
.shifts-page .pager__jump,
.shifts-page .pager__page{
  height:36px;
  min-width:34px;
  padding:0 10px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:12px;
}
.shifts-page .pager__page.active,
.shifts-page .pager__page[aria-current="page"]{
  color:var(--primary);
  border-color:color-mix(in srgb,var(--primary) 60%, transparent);
  background:color-mix(in srgb,var(--primary) 12%, var(--surface));
}
.shifts-page .pager__ellipsis{color:var(--muted);padding:0 4px}
.shifts-page .pager__meta{flex:1 1 100%;text-align:center;margin-top:2px}

@media (hover:hover){
  .shifts-page .shift-banner.has-rowlink .shift-actions{opacity:.18;transition:opacity .18s ease}
  .shifts-page .shift-banner.has-rowlink:hover .shift-actions,
  .shifts-page .shift-banner.has-rowlink .shift-actions:focus-within{opacity:1}
}

@media (min-width:761px){
  .shifts-page .filters-left{
    width:100%;
    display:grid;
    grid-template-columns:minmax(0,1.75fr) auto auto;
    align-items:center;
    gap:8px 10px;
  }
  .shifts-page .filters-right{
    width:100%;
    justify-content:space-between;
    align-items:center;
    gap:12px;
  }
  .shifts-page .sort-group{margin-right:auto;justify-content:flex-start}
  .shifts-page .perpage-group{margin-left:auto;justify-content:flex-end}
  .shifts-page .filters-cta{justify-content:flex-start;flex-wrap:nowrap}
}

@media (max-width:900px){
  .shifts-page .filters-left,
  .shifts-page .filters-right{width:100%}
  .shifts-page .smart-filter-field{flex:1 1 100%}
  .shifts-page .date-range-picker{
    flex:0 1 236px;
    min-width:236px;
  }
  .shifts-page .date-range-toggle{
    width:100%;
    min-width:0;
  }
  .shifts-page .filters-cta{
    flex:0 0 auto;
    justify-content:flex-start;
    flex-wrap:nowrap;
  }
  .shifts-page .filters-cta .btn{
    flex:0 0 auto;
    min-width:0;
    justify-content:center;
  }
  .shifts-page .filters-right{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    flex-wrap:nowrap;
  }
  .shifts-page .sort-group,
  .shifts-page .perpage-group{
    flex:0 1 auto;
    width:auto;
    min-width:0;
    flex-wrap:nowrap;
  }
  .shifts-page .sort-group{justify-content:flex-start}
  .shifts-page .perpage-group{justify-content:flex-end;margin-left:auto}

  .shifts-page .shift-banner:not(.is-off):not(.is-unpaid):not(.is-sick) .shift-main{
    grid-template-columns:minmax(0,1fr) max-content;
    grid-template-areas:
      "headline actions"
      "pairs metrics";
    align-items:start;
  }
  .shifts-page .shift-banner:not(.is-off):not(.is-unpaid):not(.is-sick) .shift-headline{
    grid-area:headline;
    grid-template-columns:max-content max-content minmax(0,1fr);
    gap:6px 12px;
    align-items:start;
  }
  .shifts-page .shift-banner:not(.is-off):not(.is-unpaid):not(.is-sick) .shift-date{
    display:inline-flex;
    flex-direction:row;
    flex-wrap:wrap;
    align-items:baseline;
    gap:2px 6px;
  }
  .shifts-page .shift-banner:not(.is-off):not(.is-unpaid):not(.is-sick) .shift-date .small{margin-top:0}
  .shifts-page .shift-banner:not(.is-off):not(.is-unpaid):not(.is-sick) .shift-depot--headline{
    white-space:normal;
    overflow-wrap:anywhere;
  }
  .shifts-page .shift-banner:not(.is-off):not(.is-unpaid):not(.is-sick) .shift-summaryline{display:contents}
  .shifts-page .shift-banner:not(.is-off):not(.is-unpaid):not(.is-sick) .shift-route-pairs{
    grid-area:pairs;
    justify-self:stretch;
  }
  .shifts-page .shift-banner:not(.is-off):not(.is-unpaid):not(.is-sick) .shift-route-pair{gap:8px 12px}
  .shifts-page .shift-banner:not(.is-off):not(.is-unpaid):not(.is-sick) .shift-line{
    justify-self:stretch;
    text-align:left;
  }
  .shifts-page .shift-banner:not(.is-off):not(.is-unpaid):not(.is-sick) .shift-line .row{justify-content:flex-start}
  .shifts-page .shift-banner:not(.is-off):not(.is-unpaid):not(.is-sick) .shift-metrics{
    grid-area:metrics;
    justify-self:end;
    align-self:start;
    text-align:right;
  }
  .shifts-page .shift-banner:not(.is-off):not(.is-unpaid):not(.is-sick) .shift-actions{
    grid-area:actions;
    align-self:start;
    justify-self:end;
  }
}

@media (max-width:724px){
  .shifts-page .shift-banner:not(.is-off):not(.is-unpaid):not(.is-sick) .shift-main{
    grid-template-columns:minmax(0,1fr) max-content;
    grid-template-areas:
      "headline actions"
      "pairs metrics";
    gap:6px 10px;
  }
  .shifts-page .shift-banner:not(.is-off):not(.is-unpaid):not(.is-sick) .shift-headline{
    gap:6px 10px;
  }
  .shifts-page .shift-banner:not(.is-off):not(.is-unpaid):not(.is-sick) .shift-metrics{
    justify-self:end;
    text-align:right;
  }
  .shifts-page .shift-banner:not(.is-off):not(.is-unpaid):not(.is-sick) .shift-time,
  .shifts-page .shift-banner:not(.is-off):not(.is-unpaid):not(.is-sick) .shift-km,
  .shifts-page .shift-banner:not(.is-off):not(.is-unpaid):not(.is-sick) .shift-depot{text-align:left}
  .shifts-page .shift-banner:not(.is-off):not(.is-unpaid):not(.is-sick) .shift-depot{justify-self:start}
}

@media (max-width:760px){
  .shifts-page .filters-panel{
    display:grid;
    gap:10px;
  }
  .shifts-page .filters-left{
    width:100%;
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    grid-template-areas:
      "smart smart"
      "date cta";
    align-items:start;
    gap:10px;
  }
  .shifts-page .smart-filter-field{
    grid-area:smart;
    flex:none;
    min-width:0;
  }
  .shifts-page .date-range-picker{
    grid-area:date;
    flex:none;
    min-width:0;
  }
  .shifts-page .date-range-toggle{
    width:100%;
    min-width:0;
  }
  .shifts-page .filters-cta{
    grid-area:cta;
    width:100%;
    align-self:stretch;
  }
  .shifts-page .filters-cta .btn{
    flex:1 1 0;
    min-width:0;
  }
  .shifts-page .filters-right{
    width:100%;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    flex-wrap:nowrap;
  }
  .shifts-page .sort-group,
  .shifts-page .perpage-group{
    width:auto;
    flex:0 1 auto;
    flex-wrap:nowrap;
  }
  .shifts-page .shifts-list{padding-bottom:calc(88px + env(safe-area-inset-bottom,0px))}
  .shifts-page .date-range-layer{
    position:fixed;
    inset:0;
    margin:0;
    display:flex;
    align-items:flex-end;
    justify-content:center;
    padding:12px 12px calc(88px + env(safe-area-inset-bottom,0px));
  }
  .shifts-page .date-range-backdrop{display:block;position:absolute;inset:0;border:0;background:rgba(0,0,0,.5)}
  .shifts-page .date-range-popover{
    position:relative;
    width:min(420px,100%);
    max-height:min(72dvh,560px);
    overflow:auto;
    padding:12px;
  }
  .shifts-page .smart-filter-help-popover{
    left:0;
    right:auto;
    width:min(248px,calc(100vw - 24px));
  }
}

@media (max-width:520px){
  .shifts-page .filters-panel{
    gap:10px;
    padding:10px;
  }
  .shifts-page .filters-left{
    grid-template-columns:1fr;
    grid-template-areas:
      "smart"
      "date"
      "cta";
  }
  .shifts-page .date-range-picker,
  .shifts-page .date-range-toggle{
    width:100%;
    min-width:0;
  }
  .shifts-page .filters-cta{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
  }
  .shifts-page .filters-right{
    display:grid;
    grid-template-columns:1fr;
    gap:8px;
  }
  .shifts-page .sort-group,
  .shifts-page .perpage-group{
    width:100%;
    justify-content:flex-start;
    flex-wrap:wrap;
  }
  .shifts-page .sort-group .btn,
  .shifts-page .perpage-group .btn{
    flex:1 1 calc(25% - 6px);
    min-width:0;
    justify-content:center;
  }
}

@media (max-width:414px){
  .shifts-page .filters-panel{padding:10px}
  .shifts-page .filters-left,
  .shifts-page .filters-right,
  .shifts-page .filters-cta,
  .shifts-page .sort-group,
  .shifts-page .perpage-group{align-items:stretch}
  .shifts-page .shift-banner{padding:12px}
  .shifts-page .shift-banner:not(.is-off):not(.is-unpaid):not(.is-sick) .shift-route-pair{gap:8px 10px}
  .shifts-page .shift-banner:not(.is-off):not(.is-unpaid):not(.is-sick) .shift-range > div,
  .shifts-page .shift-banner:not(.is-off):not(.is-unpaid):not(.is-sick) .shift-line .row{white-space:nowrap}
}

@media (max-width:520px){
  .shifts-page .shift-date-day--full{display:none}
  .shifts-page .shift-date-day--short{display:inline}
  .shifts-page .shift-banner:not(.is-off):not(.is-unpaid):not(.is-sick) .shift-main{
    grid-template-columns:minmax(0,1fr) auto;
    grid-template-areas:
      "headline actions"
      "summary summary"
      "pairs pairs";
  }
  .shifts-page .shift-banner:not(.is-off):not(.is-unpaid):not(.is-sick) .shift-headline{
    grid-template-columns:minmax(0,1fr) max-content;
    grid-template-areas:"date type";
    gap:6px 10px;
  }
  .shifts-page .shift-banner:not(.is-off):not(.is-unpaid):not(.is-sick) .shift-date{
    grid-area:date;
    flex-direction:row;
    flex-wrap:nowrap;
    align-items:baseline;
    gap:2px 6px;
  }
  .shifts-page .shift-banner:not(.is-off):not(.is-unpaid):not(.is-sick) .shift-type{
    grid-area:type;
    align-self:start;
  }
  .shifts-page .shift-banner:not(.is-off):not(.is-unpaid):not(.is-sick) .shift-depot--headline{display:none}
  .shifts-page .shift-banner:not(.is-off):not(.is-unpaid):not(.is-sick) .shift-summaryline{
    grid-area:summary;
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:6px 10px;
    min-width:0;
  }
  .shifts-page .shift-banner:not(.is-off):not(.is-unpaid):not(.is-sick) .shift-depot--summary{
    display:inline;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  .shifts-page .shift-banner:not(.is-off):not(.is-unpaid):not(.is-sick) .shift-metrics{
    justify-self:start;
    justify-content:flex-start;
    text-align:left;
    gap:6px 10px;
  }
  .shifts-page .shift-banner:not(.is-off):not(.is-unpaid):not(.is-sick) .shift-summaryline{
    gap:6px 10px;
  }
}

@media (max-width:360px){
  .shifts-page .shift-banner:not(.is-off):not(.is-unpaid):not(.is-sick) .shift-headline{
    gap:6px 8px;
  }
  .shifts-page .shift-banner:not(.is-off):not(.is-unpaid):not(.is-sick) .shift-summaryline{
    gap:6px 8px;
  }
  .shifts-page .shift-banner:not(.is-off):not(.is-unpaid):not(.is-sick) .shift-metrics{
    gap:6px 8px;
  }
}
@media (max-width:360px){
  .shifts-page .filters-cta .btn{min-height:38px}
  .shifts-page .shift-banner{padding:11px}
  .shifts-page .shift-main{gap:6px 8px}
  .shifts-page .shift-banner:not(.is-off):not(.is-unpaid):not(.is-sick) .shift-route-pair{
    grid-template-columns:minmax(0,auto) minmax(0,1fr);
    gap:6px 8px;
  }
  .shifts-page .shift-banner:not(.is-off):not(.is-unpaid):not(.is-sick) .shift-type-badge{
    padding:2px 8px;
    min-height:22px;
    font-size:.82rem;
  }
  .shifts-page .shift-time::before,
  .shifts-page .shift-km::before{
    font-size:16px;
    margin-right:3px;
  }
}
/* =========================================
   23) Shift form cards
========================================= */
.shift-form-card{background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:18px;margin-bottom:18px;box-shadow:0 10px 24px rgba(0,0,0,.16)}
.shift-form-head-card .form-row{margin-bottom:0}
.parts-cards-wrap{overflow:visible;background:transparent;border:0;padding:0}
.parts-cards-table{width:100%;border-collapse:separate;border-spacing:0 14px;background:transparent}
.parts-cards-table thead{display:none}
.parts-cards-table tbody{display:block}
.parts-cards-table tr.part-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 16px;background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:16px 18px;box-shadow:0 10px 24px rgba(0,0,0,.18);margin-bottom:0;position:relative}
.parts-cards-table tr.part-row > td{display:block;width:auto !important;padding:0;border:0;min-width:0}
.parts-cards-table tr.part-row > td:first-child{grid-column:1/-1}
.parts-cards-table tr.part-row > td:nth-child(2){grid-column:1}
.parts-cards-table tr.part-row > td:nth-child(3){grid-column:2}
.parts-cards-table tr.part-row > td:nth-child(4){grid-column:3}
.parts-cards-table tr.part-row > td:nth-child(5){grid-column:1}
.parts-cards-table tr.part-row > td:nth-child(6){grid-column:2}
.parts-cards-table tr.part-row > td:nth-child(9){grid-column:3}
.parts-cards-table tr.part-row > td:nth-child(7){grid-column:1}
.parts-cards-table tr.part-row > td:nth-child(8){grid-column:2}
.parts-cards-table tr.part-row > td:nth-child(10){grid-column:1/-1}
.parts-cards-table tr.part-row > td::before{display:block;font-size:.75rem;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);font-weight:700;margin-bottom:6px}
.parts-cards-table tr.part-row > td:nth-child(2)::before{content:"Linka"}
.parts-cards-table tr.part-row > td:nth-child(3)::before{content:"PoÅ™adÃ­"}
.parts-cards-table tr.part-row > td:nth-child(4)::before{content:"Kurz"}
.parts-cards-table tr.part-row > td:nth-child(5)::before{content:"Typ"}
.parts-cards-table tr.part-row > td:nth-child(6)::before{content:"ÄŒÃ­slo vozu"}
.parts-cards-table tr.part-row > td:nth-child(9)::before{content:"Km"}
.parts-cards-table tr.part-row > td:nth-child(7)::before{content:"ZaÄÃ¡tek"}
.parts-cards-table tr.part-row > td:nth-child(8)::before{content:"Konec"}
.parts-cards-table tr.part-row > td:nth-child(10)::before{content:"PoznÃ¡mka ÄÃ¡sti"}
.part-card-chrome{display:flex;align-items:center;justify-content:space-between;gap:12px}
.part-card-toggle{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:1 1 auto;padding:0;background:none;border:0;color:var(--fg);font:inherit;text-align:left;cursor:pointer}
.part-card-title{font-weight:700;font-size:1rem;line-height:1.35}
.part-card-arrow{color:var(--muted);font-size:1.15rem}
.part-card-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}
.part-card-actions .icon-btn.is-active{background:color-mix(in srgb,var(--primary) 18%, var(--surface));border-color:color-mix(in srgb,var(--primary) 45%, transparent);color:var(--primary)}
.parts-cards-table tr.part-row.is-collapsed > td:not(:first-child){display:none}
.parts-cards-table tr.part-row.is-collapsed{padding-bottom:14px}
.parts-cards-table .kebab-btn{display:none !important}
.part-note-wrap{display:flex;flex-direction:column;gap:12px}
.part-note-wrap .note-cell{display:block}
.part-note-wrap .note-cell .input{width:100%}
.part-note-wrap .cam{display:none !important}
.part-photo-row{display:flex;justify-content:flex-start}
.part-photo-trigger{display:inline-flex;align-items:center;gap:10px;min-height:46px;padding:8px 12px;border-radius:12px;border:1px dashed var(--line);background:var(--surface-2);color:var(--fg);cursor:pointer}
.part-photo-trigger:hover{background:color-mix(in srgb,var(--primary) 10%, var(--surface-2));border-color:color-mix(in srgb,var(--primary) 40%, transparent)}
.part-photo-trigger.has-thumb{padding:6px 8px;border-style:solid}
.part-photo-trigger.has-thumb img{width:92px;height:56px;object-fit:cover;border-radius:10px;display:block}
.part-photo-label{font-weight:600}
.shejdr-warning{margin:-6px 0 12px}
.parts-cards-table tr.thin-sep{display:block;background:transparent;border:0;margin:-4px 0 10px;padding:0}
.parts-cards-table tr.thin-sep td{display:block !important;padding:0;border:0}
.shejdr-divider{display:flex;align-items:center;gap:12px;color:var(--primary);font-weight:700;font-size:.92rem}
.shejdr-divider::before,.shejdr-divider::after{content:"";flex:1 1 auto;height:1px;background:color-mix(in srgb,var(--primary) 35%, var(--line))}
.parts-cards-table tr.part-row.part-r{border-color:color-mix(in srgb,var(--primary) 25%, var(--line))}
.parts-cards-table tr.part-row.part-o{border-color:color-mix(in srgb,var(--warn) 25%, var(--line))}

@media (max-width:900px){
  .shift-form-head-card #edit-head{grid-template-columns:1fr}
  .parts-cards-table tr.part-row{grid-template-columns:1fr;padding:14px}
  .parts-cards-table tr.part-row > td{grid-column:1 !important}
  .part-card-chrome{flex-direction:column;align-items:stretch}
  .part-card-actions{justify-content:flex-start}
  .shift-part-card-body{padding:14px}
  .shift-part-card-toggle{padding:13px 14px}
  .shift-part-actions{justify-content:flex-start;padding:12px 14px}
  .shift-form-submit{justify-content:stretch}
  .shift-form-submit .btn{width:100%;min-width:0}
  .photo-picker-modal{padding:12px}
  .photo-picker-dialog{width:min(100vw - 16px, 980px);max-height:88vh}
  .photo-picker-upload-grid{grid-template-columns:1fr}
  .photo-picker-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .upload-file-card__body{grid-template-columns:1fr}
  .upload-file-grid{grid-template-columns:1fr}
  .upload-results-item{flex-direction:column;align-items:flex-start}
  .upload-results-item span{text-align:left}
}

/* R23 rework: skuteÄnÃ© karty mÃ­sto tabulky */
.form-submit-inline-hidden{display:none !important}
.shift-form-head-card #edit-head{grid-template-columns:repeat(3,minmax(0,1fr));align-items:start}
.shift-form-head-card #edit-head > label{display:flex;flex-direction:column;gap:6px}
.shift-form-head-card .notes-row{margin-top:14px}
.shift-form-submit{display:flex;justify-content:flex-end;margin-top:20px}
.shift-form-submit .btn{min-width:220px}
.parts-cards-wrap{padding:0 !important;border:0 !important;background:transparent !important}
.parts-cards-table{display:none !important}
.shift-parts-cards{display:flex;flex-direction:column;gap:16px}
.shift-part-card{background:var(--surface);border:1px solid var(--line);border-radius:18px;overflow:hidden;box-shadow:0 12px 28px rgba(0,0,0,.18)}
.shift-part-card-header{background:color-mix(in srgb, var(--surface-2) 78%, #000);border-bottom:1px solid var(--line)}
.shift-part-card-toggle{width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;background:transparent;border:0;color:var(--fg);font:inherit;text-align:left;cursor:pointer}
.shift-part-card-title{font-weight:700;font-size:1rem;line-height:1.35}
.shift-part-card-arrow{color:var(--muted);font-size:1.05rem}
.shift-part-card.is-error{border-color:color-mix(in srgb, var(--danger) 45%, var(--line));box-shadow:0 12px 28px rgba(0,0,0,.18),0 0 0 1px color-mix(in srgb, var(--danger) 22%, transparent)}
.shift-part-card.is-error .shift-part-card-header{background:color-mix(in srgb, var(--danger) 10%, var(--surface-2))}
.shift-part-card.is-error .shift-part-card-title{color:color-mix(in srgb, var(--danger) 74%, var(--fg))}
.shift-part-card-body{padding:16px}
.shift-part-card.is-collapsed .shift-part-card-body,
.shift-part-card.is-collapsed .shift-part-actions{display:none}
.shift-part-grid{display:grid;gap:14px 16px;margin-bottom:14px}
.shift-part-grid-primary{
  grid-template-columns:1.2fr .7fr .7fr .8fr .8fr;
  grid-template-areas:
    "line order course start end"
    "vtype vehicle km km km";
}
.shift-part-grid-primary .area-line{grid-area:line}
.shift-part-grid-primary .area-order{grid-area:order}
.shift-part-grid-primary .area-course{grid-area:course}
.shift-part-grid-primary .area-start{grid-area:start}
.shift-part-grid-primary .area-end{grid-area:end}
.shift-part-grid-primary .area-vtype{grid-area:vtype}
.shift-part-grid-primary .area-vehicle{grid-area:vehicle}
.shift-part-grid-primary .area-km{grid-area:km}
.shift-part-card .field{min-width:0}
.shift-part-card .field > label{display:block;font-size:.82rem;line-height:1.2;text-transform:none;color:var(--muted);margin-bottom:6px}
.shift-part-card .field .input,
.shift-part-card .field textarea,
.shift-part-card .field select{width:100%}
.shift-part-card .field-note{margin-bottom:14px}
.shift-part-card .field-photo{margin-bottom:0}
.shift-part-card .part-note-wrap{gap:10px}
.shift-part-card .part-note-wrap .note-cell{display:block}
.shift-part-card .part-note-wrap .note-cell .input{width:100%}
.shift-part-card .part-photo-row{display:flex;flex-wrap:wrap;align-items:center;gap:12px}
.shift-part-card .part-photo-trigger,
.shift-part-card .part-photo-picker{display:inline-flex;align-items:center;justify-content:center}
.shift-part-card .part-photo-inline-thumb{width:112px;height:70px;object-fit:cover;border-radius:12px;border:1px solid var(--line);background:#0d0d0d}
.shift-part-card .part-photo-help{font-size:.9rem}
.shift-part-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;padding:14px 16px;border-top:1px solid var(--line);background:color-mix(in srgb, var(--surface-2) 48%, #000)}
.shift-part-actions .split-btn.is-active{background:color-mix(in srgb,var(--primary) 16%, var(--surface));border-color:color-mix(in srgb,var(--primary) 45%, transparent);color:var(--primary)}
.shejdr-warning{margin:0 0 14px}
.shejdr-divider-card{display:block;margin:-4px 0 4px}
.photo-picker-modal[hidden]{display:none!important}
.photo-picker-modal{
  position:fixed;inset:0;z-index:var(--z-modal);
  display:flex;align-items:center;justify-content:center;
  padding:24px;
  overflow:auto;
  overscroll-behavior:contain
}
.photo-picker-backdrop{
  position:absolute;inset:0;background:rgba(0,0,0,.72);backdrop-filter:blur(4px);z-index:0
}
.photo-picker-dialog{
  position:relative;z-index:1;
  width:min(980px, calc(100vw - 32px));
  max-height:min(86vh, 760px);
  display:flex;flex-direction:column;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:18px;
  box-shadow:0 24px 60px rgba(0,0,0,.45);
  overflow:hidden
}
.photo-picker-head,
.photo-picker-foot{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  flex-wrap:wrap;padding:14px 16px;border-bottom:1px solid var(--line)
}
.photo-picker-foot{border-bottom:0;border-top:1px solid var(--line)}
.photo-picker-title{font-size:1.05rem;font-weight:700}

/* =========================================
   24) R27 Navigation, Admin hub, Footer
========================================= */
.desktop-only{display:inherit}
.header__row{min-height:72px}
.header__spacer{flex:1 1 auto}
.header__user{display:flex;align-items:center;gap:12px}
.header__user-name{color:var(--fg);font-weight:600}
.footer__row{padding-top:18px;padding-bottom:18px}
.footer__copy{white-space:nowrap}
.footer__links{display:flex;flex-wrap:wrap;justify-content:flex-end;row-gap:8px}

.admin-subnav-wrap{border-bottom:1px solid var(--line);background:color-mix(in srgb,var(--surface) 82%, #000)}
.admin-subnav{display:flex;gap:8px;flex-wrap:wrap;padding:10px 0}
.admin-subnav__link{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:34px;padding:0 12px;border-radius:999px;
  border:1px solid var(--line);background:var(--surface);color:var(--fg);
  text-decoration:none;font-size:.92rem
}
.admin-subnav__link:hover{color:var(--primary);text-decoration:none;border-color:color-mix(in srgb,var(--primary) 45%, var(--line))}
.admin-subnav__link.is-active{color:var(--primary);border-color:color-mix(in srgb,var(--primary) 60%, var(--line));background:color-mix(in srgb,var(--primary) 10%, var(--surface))}
.admin-subnav-mobile{display:none}
.admin-subnav-mobile summary{cursor:pointer;list-style:none;padding:10px 0;font-weight:600}
.admin-subnav-mobile summary::-webkit-details-marker{display:none}
.admin-subnav-mobile[open] .admin-subnav{padding:0 0 12px}
.admin-subnav-wrap .container{padding-top:8px;padding-bottom:8px}

.admin-hub .muted{margin-top:4px}
.admin-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-top:18px}
.admin-section-card{background:var(--surface-2);border:1px solid var(--line);border-radius:14px;padding:16px}
.admin-section-card h2{margin:0 0 12px;font-size:1.05rem}
.admin-link-list{display:flex;flex-direction:column;gap:8px}
.admin-link-card{
  display:flex;flex-direction:column;align-items:flex-start;justify-content:center;
  gap:4px;min-height:58px;padding:12px 14px;border-radius:12px;
  border:1px solid var(--line);background:var(--surface);
  color:var(--fg);text-decoration:none
}
.admin-link-card:hover{background:var(--surface-3);color:var(--primary);text-decoration:none}

.prose-page{max-width:820px}
.prose-page p:last-child{margin-bottom:0}
.contact-list{margin:0;padding-left:18px}
.contact-list li+li{margin-top:8px}

@media (max-width:900px){
  .desktop-only{display:none !important}
  .header__row{min-height:64px}
  .navbar{display:none;top:65px}
  .navbar[data-open="true"]{display:block}
  .navbar[data-open="false"]{display:none}
  .navbar .container{padding-top:10px;padding-bottom:12px;overflow-x:hidden}
  .navbar .nav-list{flex-direction:column;align-items:stretch;gap:4px;overflow-x:hidden}
  .navbar .nav-link{padding:10px 12px}
  .nav-mobile-user{
    display:flex;align-items:center;justify-content:space-between;gap:12px;
    padding:8px 0 12px;border-bottom:1px solid var(--line);margin-bottom:10px
  }
  .nav-mobile-user__name{font-weight:600}
  .nav-mobile-user__link{color:var(--primary);text-decoration:none}
  .admin-grid{grid-template-columns:1fr}
  .admin-subnav{display:none}
  .admin-subnav-mobile{display:block}
  .admin-subnav-mobile summary{padding:6px 0}
  .footer__row{flex-direction:column;align-items:flex-start}
  .footer__links{justify-content:flex-start}
}
.photo-picker-subtitle{font-size:.9rem;color:var(--muted)}
.photo-picker-body{padding:16px;overflow:auto}
.photo-picker-upload{
  margin-bottom:16px;padding:14px;border:1px solid var(--line);border-radius:14px;
  background:var(--surface-2)
}
.photo-picker-upload[hidden]{display:none!important}
.photo-picker-upload-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.photo-picker-upload-grid .form-field--full{grid-column:1 / -1}
.photo-picker-upload-actions{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:4px}
.photo-picker-upload-status{flex:1 1 260px;margin:0}
.photo-picker-upload-status.is-success{color:var(--primary)}
.photo-picker-upload-status.is-error{color:var(--danger)}
.upload-file-list{display:grid;gap:14px}
.upload-file-card{
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--surface-2);
  padding:14px;
  display:grid;
  gap:14px
}
.upload-file-card__head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.upload-file-card__name{display:block;font-size:1rem;word-break:break-word}
.upload-file-card__body{
  display:grid;
  grid-template-columns:minmax(140px,200px) minmax(0,1fr);
  gap:14px;
  align-items:start
}
.upload-file-card__preview{
  border:1px solid var(--line);
  border-radius:12px;
  overflow:hidden;
  background:var(--surface);
  min-height:120px
}
.upload-file-card__preview img{
  display:block;
  width:100%;
  height:100%;
  max-height:180px;
  object-fit:cover
}
.upload-file-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.upload-results-list{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.upload-results-item{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--surface-2)
}
.upload-results-item.is-success{border-color:color-mix(in srgb,var(--ok) 40%, var(--line))}
.upload-results-item.is-error{border-color:color-mix(in srgb,var(--danger) 45%, var(--line))}
.upload-results-item span{color:var(--muted);text-align:right}
.photo-picker-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(165px,1fr));
  gap:14px
}
.photo-picker-card{
  display:flex;flex-direction:column;gap:10px;
  width:100%;padding:10px;
  border:1px solid var(--line);border-radius:14px;
  background:var(--surface-2);color:var(--fg);
  text-align:left;cursor:pointer;
  transition:border-color .15s,background .15s,transform .06s
}
.photo-picker-card:hover{
  background:color-mix(in srgb,var(--primary) 7%, var(--surface-2));
  border-color:color-mix(in srgb,var(--primary) 42%, transparent);
  transform:translateY(-1px)
}
.photo-picker-card.is-selected{
  border-color:color-mix(in srgb,var(--primary) 58%, transparent);
  box-shadow:0 0 0 2px rgba(3,218,198,.14)
}
.photo-picker-card.is-fresh{
  border-color:color-mix(in srgb,var(--primary) 72%, transparent);
  box-shadow:0 0 0 2px rgba(3,218,198,.2)
}
.photo-picker-card img{
  width:100%;aspect-ratio:4/3;object-fit:cover;
  border-radius:10px;border:1px solid var(--line);background:#0d0d0d;display:block
}
.photo-picker-meta{display:grid;gap:4px;font-size:.85rem;color:var(--muted)}
.photo-picker-meta strong{color:var(--fg);font-size:.9rem}
.photo-picker-empty{
  padding:28px 16px;border:1px dashed var(--line);border-radius:14px;
  background:var(--surface-2);text-align:center;color:var(--muted)
}

@media (max-width:1000px){
  .shift-form-head-card #edit-head{grid-template-columns:1fr 1fr}
}

@media (max-width:860px){
  .shift-show-page .header-grid{
    grid-template-columns:1fr;
    align-items:start;
  }
  .shift-show-page .shift-show-actions{
    justify-content:space-between;
  }
  .shift-show-page .shift-show-summary .table th,
  .shift-show-page .shift-show-summary .table td{
    padding:10px 12px;
  }
  .shift-show-page .shift-show-summary.scroll-x > .table{
    min-width:0;
  }
  .shift-show-page .shift-show-summary .table{
    table-layout:auto !important;
  }
}

@media (min-width:521px) and (max-width:900px){
  .shift-part-grid-primary{
    grid-template-columns:1.2fr .8fr .8fr;
    grid-template-areas:
      "line order course"
      "start end ."
      "vtype vehicle km";
  }
}

@media (max-width:640px){
  .shift-show-page .shift-show-actions{
    gap:10px;
  }
  .shift-show-page .shift-show-actions .actions-left{
    flex:1 1 100%;
  }
  .shift-show-page .shift-show-actions .actions-right{
    margin-left:auto;
    justify-content:flex-end;
  }
  .shift-show-page .shift-show-gallery .gallery-main{
    aspect-ratio:16/10;
  }
}

@media (max-width:826px){
  .shift-show-page .shift-show-parts-wrap{
    overflow-x:hidden;
  }
  .shift-show-page .shift-show-parts-wrap.scroll-x > .table{
    min-width:0 !important;
  }
  .shift-show-page .shift-show-parts-desktop{
    display:none;
  }
  .shift-show-page .shift-show-parts-responsive{
    display:table;
    min-width:0;
    width:100%;
    table-layout:fixed;
    max-width:100%;
  }
  .shift-show-page .shift-show-parts-wrap.scroll-x > .shift-show-parts-responsive{
    min-width:0 !important;
    width:100%;
    max-width:100%;
  }
  .shift-show-page .shift-show-parts-responsive td{
    padding:8px 10px;
    vertical-align:middle;
    box-sizing:border-box;
  }
  .shift-show-page .part-responsive-main td{
    font-weight:600;
  }
  .shift-show-page .part-responsive-col--line{
    width:36%;
    white-space:normal;
  }
  .shift-show-page .part-responsive-col--range{
    width:34%;
  }
  .shift-show-page .part-responsive-col--km{
    width:30%;
    text-align:right;
  }
  .shift-show-page .part-responsive-col--range,
  .shift-show-page .part-responsive-col--km{
    white-space:nowrap;
  }
  .shift-show-page .part-responsive-col--type,
  .shift-show-page .part-responsive-col--photo{
    white-space:nowrap;
  }
  .shift-show-page .part-responsive-col--vehicle{
    white-space:normal;
  }
  .shift-show-page .part-responsive-col--photo{
    width:52px;
    text-align:center;
  }
  .shift-show-page .part-responsive-vehicle{
    display:flex;
    align-items:center;
    gap:8px;
    min-width:0;
    color:var(--muted);
  }
  .shift-show-page .part-responsive-type{
    white-space:nowrap;
    color:var(--fg);
  }
  .shift-show-page .part-responsive-ev{
    display:inline-flex;
    flex-wrap:wrap;
    align-items:center;
    gap:4px;
    min-width:0;
  }
  .shift-show-page .part-responsive-ev a{
    white-space:nowrap;
  }
  .shift-show-page .part-responsive-meta td,
  .shift-show-page .part-responsive-note td{
    padding-top:0;
    padding-bottom:10px;
    background:color-mix(in srgb, var(--surface-2) 42%, transparent);
  }
  .shift-show-page .part-responsive-meta td{
    color:var(--muted);
    font-size:.92rem;
  }
  .shift-show-page .part-responsive-photo-link{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:1.5rem;
    line-height:1;
    font-size:1.05rem;
  }
  .shift-show-page .part-responsive-note td{
    overflow-wrap:anywhere;
  }
  .shift-show-page .part-responsive-main:hover td,
  .shift-show-page .part-responsive-main:hover + .part-responsive-meta td,
  .shift-show-page .part-responsive-main:hover + .part-responsive-meta + .part-responsive-note td{
    background:rgba(255,255,255,.04) !important;
  }
  .shift-show-page .part-responsive-meta td,
  .shift-show-page .part-responsive-note td{
    background:transparent;
  }
  .shift-show-page .part-responsive-meta:hover td,
  .shift-show-page .part-responsive-note:hover td{
    background:transparent !important;
  }
  .shift-show-page .part-responsive-photo-link:hover{
    text-decoration:none;
  }
  .shift-show-page .part-responsive-note td{
    font-size:.9rem;
  }
  .shift-show-page .part-mobile-detail--note{
    gap:8px;
  }
  .shejdr-divider{
    gap:10px;
    padding:0;
    font-size:.76rem;
    color:color-mix(in srgb, var(--primary) 58%, var(--fg));
  }
  .shejdr-divider::before,
  .shejdr-divider::after{
    background:color-mix(in srgb, var(--primary) 18%, var(--line));
  }
}

@media (max-width:520px){
  .shift-show-page .part-responsive-col--line{
    width:40%;
  }
  .shift-show-page .part-responsive-col--range{
    width:35%;
  }
  .shift-show-page .part-responsive-col--km{
    width:25%;
  }
  .shift-show-page .part-responsive-main td,
  .shift-show-page .part-responsive-meta td{
    padding-left:8px;
    padding-right:8px;
  }
  .shift-show-page .part-responsive-vehicle{
    gap:6px;
  }
  .shift-show-page .shejdr-divider{
    gap:8px;
    padding:0;
    font-size:.72rem;
  }
}

@media (max-width:480px){
  .shift-show-page .shift-show-summary.scroll-x > .table{
    min-width:0;
  }
  .shift-show-page .shift-show-summary .table{
    font-size:.93rem;
  }
  .shift-show-page .shift-show-summary .table th,
  .shift-show-page .shift-show-summary .table td{
    padding:8px 9px;
  }
  .shift-show-page .shift-show-summary .table .nowrap{
    white-space:normal;
  }
  .stats-filter-main{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .stats-info-popover{
    width:min(280px, calc(100vw - 32px));
  }
  .stats-filter-actions{
    grid-column:1 / -1;
  }
  .stats-extremes-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .stats-kpi-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
  .stats-metric-card,
  .stats-extreme-card{
    min-height:0;
  }
  .stats-metric-value{
    font-size:1.45rem;
  }
  .stats-page-header{
    flex-direction:column;
  }
  .stats-section-tools{
    width:100%;
    justify-content:flex-start;
  }
}

@media (max-width:520px){
  .vehicle-show-page .vehicle-type-badge{font-size:1.2rem}
  .vehicle-show-page .vehicle-summary-table th,
  .vehicle-show-page .vehicle-summary-table td{padding:8px 9px;font-size:.93rem}
  .vehicle-show-page .hero-meta{left:6px;right:6px;bottom:6px;font-size:.8rem}
  .vehicle-show-page .hero-meta td{padding:2px 5px}
  .vehicle-show-page .vehicle-occurrences-table--mobile td{padding:9px 10px}
  .shift-part-grid-primary{
    grid-template-columns:1fr;
    grid-template-areas:
      "line"
      "order"
      "course"
      "start"
      "end"
      "vtype"
      "vehicle"
      "km";
  }
  .stats-filter-main{
    grid-template-columns:1fr;
  }
  .stats-kpi-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .stats-extremes-grid{
    grid-template-columns:1fr;
  }
  .stats-info-popover{
    left:auto;
    right:0;
  }
  .stats-period-popover__body{
    grid-template-columns:1fr;
  }
  .stats-period-years{
    grid-template-columns:repeat(auto-fit,minmax(80px,1fr));
  }
  .stats-period-month-grid{
    grid-template-columns:1fr;
  }
  .stats-switch{
    width:100%;
    justify-content:flex-start;
  }
  .stats-extreme-values{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .stats-extreme-vehicle{
    grid-column:1 / -1;
    text-align:left;
  }
  .stats-modal{
    padding:12px;
  }
}

@media (max-width:420px){
  .stats-kpi-grid{
    grid-template-columns:1fr;
  }
  .stats-filter-actions .btn{
    flex:1 1 100%;
    justify-content:center;
  }
  .stats-date-actions{
    display:grid;
    grid-template-columns:1fr;
  }
}

@media (max-width:720px){
  .stats-page{
    gap:14px;
    padding-bottom:96px;
  }
  .stats-filter-main{
    grid-template-columns:1fr;
    gap:10px;
  }
  .stats-filter-actions{
    width:100%;
    grid-column:auto;
  }
  .stats-kpi-grid{
    grid-template-columns:repeat(6,minmax(0,1fr));
    grid-template-areas:
      "shifts shifts vehicles vehicles lines lines"
      "km km km time time time";
  }
  .stats-kpi-grid > :nth-child(1){grid-area:shifts}
  .stats-kpi-grid > :nth-child(2){grid-area:km}
  .stats-kpi-grid > :nth-child(3){grid-area:time}
  .stats-kpi-grid > :nth-child(4){grid-area:vehicles}
  .stats-kpi-grid > :nth-child(5){grid-area:lines}
  .stats-extremes-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .stats-page-header{
    flex-direction:column;
  }
  .stats-section-tools{
    width:100%;
    justify-content:flex-start;
  }
  .stats-section-toggle__title{
    font-size:1.15rem;
  }
  .stats-period-layer,
  .stats-date-layer{
    position:fixed;
    inset:0;
    display:grid;
    align-items:end;
    z-index:var(--z-modal-ui);
  }
  .stats-period-backdrop,
  .stats-date-backdrop{
    display:block;
    position:absolute;
    inset:0;
    border:0;
    background:rgba(0,0,0,.58);
  }
  .stats-period-popover,
  .stats-date-popover{
    position:relative;
    width:min(100vw - 12px, 520px);
    max-height:min(78vh, 720px);
    margin:0 auto 8px;
    overflow:auto;
    border-bottom-left-radius:20px;
    border-bottom-right-radius:20px;
    padding-bottom:calc(14px + env(safe-area-inset-bottom, 0px));
  }
  .stats-table th,
  .stats-table td{
    padding:8px 9px;
    font-size:.88rem;
  }
  .stats-metric-card{
    min-height:104px;
  }
  .stats-metric-value{
    font-size:1.34rem;
  }
  .stats-extreme-card{
    min-height:0;
    padding:13px 14px;
  }
  .stats-extreme-values{
    gap:10px;
  }
  .stats-table-wrap.scroll-x > .stats-table{
    min-width:0;
  }
  .stats-desktop-only{display:none}
  .stats-mobile-only{display:inline}
  #stats-shift-types-content .stats-table th:first-child,
  #stats-shift-types-content .stats-table td:first-child,
  #stats-vehicle-types-content .stats-table th:first-child,
  #stats-vehicle-types-content .stats-table td:first-child{
    max-width:10ch;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  #stats-lines-content .stats-table th:nth-child(3),
  #stats-lines-content .stats-table td:nth-child(3),
  #stats-vehicles-content .stats-table th:nth-child(3),
  #stats-vehicles-content .stats-table td:nth-child(3),
  #stats-vehicles-content .stats-table th:nth-child(6),
  #stats-vehicles-content .stats-table td:nth-child(6){
    display:none;
  }
}

@media (min-width:721px){
  .stats-section-toggle{
    cursor:default;
  }
  .stats-section-toggle__caret{
    display:none!important;
  }
  .stats-section-toggle:hover .stats-section-toggle__title{
    color:var(--fg);
  }
}

/* =========================================
   34) R34a Unified Header / Navigation
========================================= */
.site-nav{
  position:sticky;
  top:0;
  z-index:var(--z-header);
  padding-top:10px;
  background:transparent;
  backdrop-filter:none;
}
.site-nav__container.container{
  padding-top:0;
  padding-bottom:10px;
}
.site-nav__shell{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  min-height:68px;
  padding:12px 16px;
  background:color-mix(in srgb, var(--surface) 94%, #000);
  border:1px solid var(--line);
  border-radius:18px;
  box-shadow:0 14px 30px rgba(0,0,0,.22);
}
.site-nav__left,
.site-nav__right{
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0;
}
.site-nav__left{flex:1 1 auto}
.site-nav__right{flex:0 0 auto;justify-content:flex-end}
.site-nav__brand{
  display:inline-flex;
  align-items:center;
  color:var(--fg);
  font-weight:700;
  font-size:1.15rem;
  white-space:nowrap;
  text-decoration:none;
}
.site-nav__brand:hover{
  color:var(--primary);
  text-decoration:none;
}
.site-nav__list{
  display:flex;
  align-items:center;
  gap:6px;
  list-style:none;
  margin:0;
  padding:0;
  flex-wrap:wrap;
}
.site-nav__item{position:relative}
.site-nav__link,
.site-nav__dropdown-toggle{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:40px;
  padding:0 12px;
  border-radius:12px;
  border:1px solid transparent;
  background:transparent;
  color:var(--fg);
  text-decoration:none;
  font:inherit;
  white-space:nowrap;
  cursor:pointer;
}
.site-nav__link:hover,
.site-nav__dropdown-toggle:hover{
  color:var(--primary);
  text-decoration:none;
  background:color-mix(in srgb, var(--primary) 8%, var(--surface));
}
.site-nav__link.is-active,
.site-nav__dropdown-toggle.is-active{
  color:var(--primary);
  background:color-mix(in srgb, var(--primary) 12%, var(--surface));
  border-color:color-mix(in srgb, var(--primary) 40%, var(--line));
}
.site-nav__caret{
  font-size:.82rem;
  color:var(--muted);
}
.site-nav__dropdown{
  position:absolute;
  top:calc(100% + 10px);
  left:0;
  min-width:220px;
  padding:8px;
  display:grid;
  gap:4px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:16px;
  box-shadow:0 18px 36px rgba(0,0,0,.3);
  z-index:var(--z-dropdown);
}
.site-nav__dropdown[hidden]{
  display:none !important;
}
.site-nav__dropdown-link{
  display:flex;
  align-items:center;
  min-height:40px;
  padding:0 12px;
  border-radius:10px;
  color:var(--fg);
  text-decoration:none;
}
.site-nav__dropdown-link:hover{
  color:var(--primary);
  background:color-mix(in srgb, var(--primary) 8%, var(--surface));
  text-decoration:none;
}
.site-nav__dropdown-link.is-active{
  color:var(--primary);
  background:color-mix(in srgb, var(--primary) 12%, var(--surface));
}
.site-nav__user{
  display:flex;
  align-items:center;
  gap:12px;
  white-space:nowrap;
}
.site-nav__user-name{
  color:var(--fg);
  font-weight:600;
}
.site-nav__user-link{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:0 12px;
  border-radius:12px;
  border:1px solid var(--line);
  color:var(--muted);
  text-decoration:none;
}
.site-nav__user-link:hover{
  color:var(--primary);
  border-color:color-mix(in srgb, var(--primary) 42%, var(--line));
  text-decoration:none;
}
.site-nav__user-link.is-active{
  color:var(--primary);
  border-color:color-mix(in srgb, var(--primary) 42%, var(--line));
}
.site-nav__mobile-trigger{
  display:none;
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  transform:none;
  z-index:var(--z-modal-ui);
  width:auto;
  height:auto;
  min-height:56px;
  padding:0 20px calc(10px + env(safe-area-inset-bottom, 0px));
  gap:10px;
  border-left:0;
  border-right:0;
  border-bottom:0;
  border-radius:18px 18px 0 0;
  background:color-mix(in srgb, var(--surface) 96%, #000);
  box-shadow:0 -12px 30px rgba(0,0,0,.34);
  border-top:1px solid var(--line);
  border-left:0;
  border-right:0;
  font-weight:600;
  font-size:1rem;
  letter-spacing:.01em;
  color:var(--fg);
  text-align:center;
  cursor:pointer;
}
.site-nav__mobile-trigger:hover{
  color:var(--primary);
}
.site-nav__mobile-trigger-icon,
.site-nav__mobile-trigger-label{
  display:inline-flex;
  align-items:center;
}
.site-nav__mobile-trigger-icon{
  font-size:1.05rem;
  line-height:1;
}
.site-nav__mobile-trigger-label{
  line-height:1.1;
}
.site-nav__icon-button{
  width:40px;
  height:40px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0;
  border-radius:12px;
  border:1px solid var(--line);
  background:color-mix(in srgb, var(--surface-2) 78%, #000);
  color:var(--fg);
  font:inherit;
  cursor:pointer;
}
.site-nav__icon-button:hover{
  color:var(--primary);
  border-color:color-mix(in srgb, var(--primary) 42%, var(--line));
}
.site-nav__backdrop{
  position:fixed;
  inset:0;
  z-index:var(--z-overlay);
  background:rgba(0,0,0,.32);
  visibility:hidden;
  opacity:0;
  transition:opacity .18s ease, visibility 0s linear .18s;
}
.site-nav__sheet{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  z-index:var(--z-modal-ui);
  max-height:min(78vh, 620px);
  display:flex;
  flex-direction:column;
  gap:14px;
  padding:12px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  background:var(--surface);
  border:1px solid var(--line);
  border-left:0;
  border-right:0;
  border-bottom:0;
  border-radius:24px 24px 0 0;
  box-shadow:0 22px 50px rgba(0,0,0,.4);
  overflow:auto;
  visibility:hidden;
  opacity:0;
  transform:translateY(100%);
  transition:transform .18s ease, opacity .18s ease, visibility 0s linear .18s;
  pointer-events:none;
}
.site-nav__sheet-handle{
  width:52px;
  height:4px;
  border-radius:999px;
  background:color-mix(in srgb, var(--muted) 50%, transparent);
  margin:0 auto;
}
.site-nav__sheet-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
.site-nav__sheet-title{
  font-size:1.02rem;
  font-weight:700;
}
.site-nav__sheet-body{
  display:grid;
  gap:12px;
}
.site-nav__sheet-list{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap:6px;
}
.site-nav__sheet-group{
  display:grid;
  gap:6px;
}
.site-nav__sheet-link,
.site-nav__sheet-admin-toggle{
  display:flex;
  align-items:center;
  justify-content:space-between;
  width:100%;
  min-height:46px;
  padding:0 14px;
  border-radius:14px;
  border:1px solid var(--line);
  background:color-mix(in srgb, var(--surface-2) 80%, #000);
  color:var(--fg);
  text-decoration:none;
  font:inherit;
  cursor:pointer;
}
.site-nav__sheet-link:hover,
.site-nav__sheet-admin-toggle:hover{
  color:var(--primary);
  text-decoration:none;
  border-color:color-mix(in srgb, var(--primary) 38%, var(--line));
}
.site-nav__sheet-link.is-active,
.site-nav__sheet-admin-toggle.is-active{
  color:var(--primary);
  border-color:color-mix(in srgb, var(--primary) 42%, var(--line));
  background:color-mix(in srgb, var(--primary) 11%, var(--surface));
}
.site-nav__sheet-admin-toggle .site-nav__caret{
  transition:transform .18s ease;
}
.site-nav__sheet-admin-toggle[aria-expanded="true"] .site-nav__caret{
  transform:rotate(180deg);
}
.site-nav__sheet-admin{
  display:grid;
  gap:6px;
  padding:0 0 0 12px;
  max-height:0;
  overflow:hidden;
  opacity:0;
  transform:translateY(-6px);
  pointer-events:none;
  transition:max-height .2s ease, opacity .16s ease, transform .16s ease, padding .2s ease;
}
.site-nav__sheet-admin.is-open{
  padding:2px 0 0 12px;
  max-height:none;
  overflow:visible;
  opacity:1;
  transform:translateY(0);
  pointer-events:auto;
}
.nav-sheet-open{overflow:hidden}
.nav-sheet-open .site-nav__backdrop{
  visibility:visible;
  opacity:1;
  transition-delay:0s;
}
.nav-sheet-open .site-nav__sheet{
  visibility:visible;
  opacity:1;
  transform:translateY(0);
  transition-delay:0s;
  pointer-events:auto;
}

@media (min-width:901px){
  .site-nav__mobile-trigger,
  .site-nav__backdrop,
  .site-nav__sheet{
    display:none !important;
  }
}

@media (max-width:900px){
  .site-nav__container.container{
    padding-bottom:8px;
  }
  .site-nav__shell{
    min-height:60px;
    gap:10px;
    padding:10px 12px;
  }
  .site-nav__list,
  .site-nav__item--dropdown{
    display:none;
  }
  .site-nav__mobile-trigger{
    display:inline-flex;
    justify-content:center;
    align-items:center;
  }
  .site-nav__right{
    gap:0;
  }
  .site-nav__user{
    gap:8px;
    font-size:.92rem;
  }
  .site-nav__user-name{
    max-width:110px;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  #main-content.container,
  .lines-page.container,
  body > .container:last-of-type{
    padding-bottom:96px;
  }
}

@media (max-width:640px){
  .site-nav{
    padding-top:8px;
  }
  .site-nav__container.container{
    padding-left:12px;
    padding-right:12px;
  }
  .site-nav__shell{
    border-radius:16px;
  }
  .site-nav__left{
    gap:10px;
  }
  .site-nav__brand{
    font-size:1.05rem;
  }
  .site-nav__user-link{
    min-height:36px;
    padding:0 10px;
  }
  .site-nav__mobile-trigger{
    padding-left:16px;
    padding-right:16px;
  }
}

/* =========================================
   35) R34h Admin polish
========================================= */
.admin-page{gap:16px}
.admin-card{padding:16px}
.admin-intro{
  margin:0;
  color:var(--muted);
  line-height:1.5
}
.admin-intro strong{color:var(--fg)}
.admin-stack{display:grid;gap:14px}
.admin-grid--cards{display:grid;gap:14px}
.admin-kpi{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:12px 14px;border:1px solid var(--line);border-radius:14px;background:var(--surface-2)
}
.admin-kpi__label{color:var(--muted);font-size:.92rem}
.admin-kpi__value{font-weight:700;font-size:1.05rem}
.admin-toolbar{
  display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap
}
.admin-toolbar__actions{
  display:flex;align-items:center;gap:8px;flex-wrap:wrap
}
.admin-panel{
  border:1px solid var(--line);
  border-radius:16px;
  background:var(--surface);
  overflow:hidden
}
.admin-panel__body{padding:16px}
.admin-filter-form{display:grid;gap:12px}
.admin-filter-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:12px
}
.admin-filter-actions{
  display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap
}
.admin-filter-actions .btn,
.admin-filter-actions .badge{min-height:40px}
.admin-table{
  width:100%;
  table-layout:fixed
}
.admin-table th,
.admin-table td{
  vertical-align:top
}
.admin-table td[data-label]::before{
  content:none
}
.admin-table .cell-main{
  display:grid;
  gap:4px
}
.admin-table .cell-title{
  font-weight:700;
  color:var(--fg)
}
.admin-table .cell-meta{
  color:var(--muted);
  font-size:.92rem
}
.admin-table .cell-code{
  display:inline-block;
  padding:3px 8px;
  border-radius:999px;
  border:1px solid var(--line);
  background:var(--surface-2);
  font-size:.85rem
}
.admin-status{
  display:inline-flex;align-items:center;gap:6px;
  min-height:28px;padding:0 10px;border-radius:999px;
  border:1px solid var(--line);background:var(--surface-2);
  font-size:.88rem;font-weight:600
}
.admin-status.is-ok{
  border-color:color-mix(in srgb,var(--ok) 40%, var(--line));
  color:color-mix(in srgb,var(--ok) 88%, #fff)
}
.admin-status.is-muted{
  color:var(--muted)
}
.admin-status.is-danger{
  border-color:color-mix(in srgb,var(--danger) 42%, var(--line));
  color:color-mix(in srgb,var(--danger) 86%, #fff)
}
.admin-actions{
  display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap
}
.admin-actions form{margin:0}
.admin-actions .btn,
.admin-actions .badge,
.admin-actions .icon-btn,
.admin-actions .inline-select{
  min-height:38px
}
.admin-actions .inline-select{
  min-width:112px
}
.admin-actions--start{justify-content:flex-start}
.admin-action-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:40px;
  min-width:40px;
  height:40px;
  border-radius:12px;
  border:1px solid var(--line);
  background:var(--surface);
  color:var(--fg);
  text-decoration:none;
  font-size:1.1rem;
  line-height:1;
  cursor:pointer;
  transition:background .15s,border-color .15s,color .15s,transform .06s
}
.admin-action-btn:hover{
  background:var(--surface-2);
  border-color:color-mix(in srgb,var(--primary) 38%, var(--line));
  color:var(--primary);
  text-decoration:none
}
.admin-action-btn:active{transform:translateY(1px)}
.admin-action-btn.is-danger:hover{
  color:var(--danger);
  border-color:color-mix(in srgb,var(--danger) 40%, var(--line))
}
.admin-action-btn.is-muted{
  color:var(--muted)
}
.admin-action-note{
  flex:1 1 100%;
  color:var(--muted);
  font-size:.92rem
}
.admin-link-card__meta{
  color:var(--muted);
  font-size:.88rem
}
.admin-log-table .admin-log-row{cursor:default}
.admin-log-trigger{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:40px;
  height:40px;
  border-radius:12px;
  border:1px solid var(--line);
  background:var(--surface);
  color:var(--primary);
  font-size:1rem;
  cursor:pointer
}
.admin-log-trigger:hover{
  background:var(--surface-2);
  border-color:color-mix(in srgb,var(--primary) 38%, var(--line))
}
.admin-log-row.is-open .admin-log-trigger{
  background:color-mix(in srgb,var(--primary) 10%, var(--surface));
  border-color:color-mix(in srgb,var(--primary) 45%, var(--line))
}
.admin-log-detail-row{
  display:none;
  border-top:1px solid color-mix(in srgb,var(--line) 88%, transparent)
}
.admin-log-detail-row.is-open{
  display:table-row
}
.admin-log-detail-cell{
  padding:0 !important
}
.admin-log-detail-panel{
  display:grid;
  gap:14px;
  padding:16px;
  background:color-mix(in srgb,var(--surface-2) 72%, var(--surface))
}
.admin-log-summary{
  display:grid;
  gap:6px
}
.admin-log-summary strong{
  color:var(--fg);
  font-size:1rem
}
.admin-log-meta{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px
}
.admin-log-meta-item{
  display:grid;
  gap:4px
}
.admin-log-meta-item span{
  color:var(--muted);
  font-size:.8rem;
  text-transform:uppercase;
  letter-spacing:.02em
}
.admin-log-pre{
  margin:0;
  max-width:100%;
  white-space:pre-wrap;
  word-break:break-word;
  font-size:.84rem;
  line-height:1.5;
  padding:14px;
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--surface)
}
.admin-empty{
  padding:18px;
  border:1px dashed var(--line);
  border-radius:14px;
  background:var(--surface-2);
  color:var(--muted)
}
.admin-section-title{
  display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap
}
.admin-section-title h2,
.admin-section-title h3{
  margin:0
}
.admin-section-note{
  margin:0;
  color:var(--muted)
}

@media (max-width:960px){
  .admin-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media (max-width:720px){
  .admin-card{padding:14px}
  .admin-panel__body{padding:14px}
  .admin-filter-grid{grid-template-columns:1fr}
  .admin-table,
  .admin-table thead,
  .admin-table tbody,
  .admin-table tr,
  .admin-table th,
  .admin-table td{
    display:block
  }
  .admin-table thead{
    position:absolute;
    width:1px;
    height:1px;
    padding:0;
    margin:-1px;
    overflow:hidden;
    clip:rect(0, 0, 0, 0);
    white-space:nowrap;
    border:0
  }
  .admin-table tbody{
    display:grid;
    gap:12px
  }
  .admin-table tbody tr{
    border:1px solid var(--line);
    border-radius:16px;
    background:var(--surface);
    padding:14px
  }
  .admin-table tbody tr.table-empty-row{
    padding:0;
    background:transparent;
    border:0
  }
  .admin-table tbody tr.table-empty-row td{
    padding:0
  }
  .admin-table td{
    padding:0;
    border:0
  }
  .admin-table td + td{
    margin-top:10px
  }
  .admin-table td[data-label]{
    display:grid;
    gap:4px
  }
  .admin-table td[data-label]::before{
    content:attr(data-label);
    color:var(--muted);
    font-size:.78rem;
    letter-spacing:.02em;
    text-transform:uppercase
  }
  .admin-table td[data-label="Akce"]::before{
    display:none
  }
  .admin-table .admin-actions{
    justify-content:flex-start
  }
  .admin-actions .inline-select{
    flex:1 1 180px
  }
  .admin-log-meta{
    grid-template-columns:1fr
  }
  .admin-grid{gap:12px}
  .admin-link-card{
    min-height:48px;
    padding:12px 14px
  }
  .admin-log-detail-row.is-open{
    display:block
  }
  .admin-log-detail-row.is-open .admin-log-detail-cell{
    display:block
  }
}
