/* =====================================================
   style.css - vzhled celého systému
   Barvy: námořnická modrá #1B3A6B, zelená #2E7D32, bílá
   ===================================================== */
:root{
  --navy:#0b2545; --navy-dark:#07192f; --navy-soft:#123f6d;
  --green:#2f7d4f; --green-dark:#24623d; --green-soft:#e8f5ee;
  --red:#b42318; --grey:#d9e2ec; --grey-dark:#64748b;
  --text:#172033; --muted:#667085; --surface:#fff; --line:#dce5ee; --bg:#eef3f7;
  --shadow:0 8px 24px rgba(11,37,69,.09);
}
*{box-sizing:border-box;}
body{margin:0;font-family:Segoe UI,system-ui,Arial,sans-serif;color:var(--text);background:linear-gradient(180deg,#f6f9fc 0%,var(--bg) 100%);line-height:1.45;}
button,input,select{font:inherit;}

/* ---- tlačítka ---- */
.btn-primary,.btn-green,.btn-grey,.btn-confirm,.btn-mini,.btn-danger{
  border:0;border-radius:8px;cursor:pointer;font-weight:700;color:#fff;box-shadow:0 4px 12px rgba(11,37,69,.12);
  transition:background .18s ease,transform .18s ease,box-shadow .18s ease;}
.btn-primary{background:var(--navy);} .btn-primary:hover{background:var(--navy-soft);}
.btn-green{background:var(--green);} .btn-green:hover{background:var(--green-dark);}
.btn-confirm{background:var(--green);} .btn-confirm:hover{background:var(--green-dark);}
.btn-grey{background:var(--grey-dark);}
.btn-danger{background:var(--red);}
.btn-primary:active,.btn-green:active,.btn-grey:active,.btn-confirm:active,.btn-mini:active{transform:translateY(1px);}
button:disabled{opacity:.62;cursor:not-allowed;transform:none;}
.btn-big{font-size:18px;padding:15px 24px;min-height:54px;width:100%;margin-top:14px;}
.btn-mini{padding:8px 12px;font-size:14px;background:var(--navy);}
.btn-row{display:flex;gap:12px;margin-top:18px;}
.btn-row .btn-big{margin-top:0;}

.alert{padding:12px 14px;border-radius:8px;margin:10px 0;font-weight:600;}
.alert.error{background:#fdecea;color:var(--red);}
.alert.ok{background:#e8f5e9;color:var(--green-dark);}
.hint{color:var(--muted);font-size:14px;}

/* ---- login ---- */
.login-body{display:flex;align-items:center;justify-content:center;min-height:100vh;
  background:linear-gradient(135deg,var(--navy-dark),var(--navy) 58%,var(--green-dark));}
.login-card{background:var(--surface);padding:36px;border-radius:8px;width:min(92vw,360px);box-shadow:0 24px 60px rgba(0,0,0,.28);border-top:5px solid var(--green);}
.login-logo{display:block;width:70px;height:auto;margin:0 auto 16px;}
.login-card h1{margin:0;color:var(--navy);font-size:26px;}
.login-card .sub{margin:4px 0 20px;color:var(--muted);}
.login-card label{display:block;margin-bottom:14px;font-weight:600;font-size:14px;}
.login-card input{width:100%;padding:12px;border:2px solid var(--grey);border-radius:8px;font-size:16px;margin-top:6px;background:#fbfdff;}

/* ---- kypař ---- */
.topbar{background:var(--navy);color:#fff;display:flex;justify-content:space-between;
  align-items:center;padding:14px 18px;font-size:16px;border-bottom:4px solid var(--green);}
.topbar a,.link-logout{color:#cfe0ff;text-decoration:none;font-weight:600;}
.kypar-main{display:flex;align-items:center;justify-content:center;min-height:80vh;padding:20px;}
.big-action{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;
  background:var(--green);color:#fff;text-decoration:none;font-size:32px;font-weight:800;
  width:min(90vw,420px);height:min(60vh,420px);border-radius:14px;box-shadow:0 16px 34px rgba(47,125,79,.28);}
.big-action:active{transform:scale(.98);}
.big-action .plus{font-size:90px;line-height:1;}

.flow-main{max-width:620px;margin:0 auto;padding:24px 18px;}
.step{display:none;}
.step.active{display:block;animation:fade .25s ease;}
@keyframes fade{from{opacity:0;transform:translateY(8px);}to{opacity:1;transform:none;}}
.step h2{color:var(--navy);font-size:24px;margin:0 0 8px;}
.step h2.step-subtitle{font-size:20px;margin:18px 0 6px;}
.manual-label{display:block;font-weight:700;margin:16px 0 8px;color:var(--navy);}
.qr-input,.big-input{width:100%;font-size:24px;padding:17px;min-height:56px;border:2px solid var(--navy-soft);
  border-radius:8px;text-align:center;background:#fff;box-shadow:0 3px 12px rgba(11,37,69,.06);}
.qr-input{border-style:dashed;}
.qr-input:focus,.big-input:focus,.form-grid input:focus,.form-grid select:focus,.filtry input:focus,.filtry select:focus,.modal-card input:focus,.modal-card select:focus{
  outline:3px solid rgba(47,125,79,.18);border-color:var(--green);
}
.scan-actions{display:flex;gap:10px;flex-wrap:wrap;margin:16px 0;}
.scan-actions button{padding:12px 16px;}
.camera-panel{background:#07192f;border:1px solid #194873;border-radius:8px;padding:10px;margin:14px 0;box-shadow:var(--shadow);}
.qr-reader,.qr-video{width:100%;min-height:280px;border-radius:6px;overflow:hidden;background:#061322;}
.qr-video{display:block;object-fit:cover;aspect-ratio:4/3;}
.qr-reader video{border-radius:6px;}
.data-box{background:var(--surface);border-radius:8px;padding:14px 16px;box-shadow:var(--shadow);border:1px solid var(--line);}
.data-box .row{display:flex;justify-content:space-between;gap:16px;padding:8px 0;border-bottom:1px solid #eef1f5;font-size:18px;}
.data-box .row:last-child{border-bottom:0;}
.data-box .row span{color:var(--muted);}
.data-box .row b{text-align:right;}
.netto-box{background:var(--green);color:#fff;border-radius:8px;padding:22px;text-align:center;margin-bottom:14px;box-shadow:0 10px 22px rgba(47,125,79,.18);}
.netto-box strong{display:block;font-size:46px;margin-top:6px;}
.done-box{text-align:center;padding-top:40px;}
.done-box .check{width:90px;height:90px;border-radius:50%;background:var(--green);color:#fff;
  font-size:52px;line-height:90px;margin:0 auto 16px;}
.done-box .btn-big{max-width:320px;margin:10px auto;display:block;text-decoration:none;text-align:center;}

/* ---- admin nav ---- */
.admin-nav{background:linear-gradient(90deg,var(--navy-dark),var(--navy) 62%,#123f6d);color:#fff;display:flex;align-items:center;gap:20px;padding:10px 22px;flex-wrap:wrap;border-bottom:4px solid var(--green);box-shadow:0 8px 26px rgba(7,25,47,.18);}
.admin-nav .brand{font-weight:800;letter-spacing:.2px;white-space:nowrap;}
.admin-nav nav{display:flex;gap:14px;}
.admin-nav a{color:#dbeafe;text-decoration:none;font-weight:700;padding:7px 9px;border-radius:6px;}
.admin-nav a:hover{color:#fff;}
.admin-nav .nav-right{margin-left:auto;font-size:13px;display:flex;align-items:center;gap:6px;flex-wrap:wrap;}
.nav-stavba{display:inline-flex;align-items:center;gap:6px;background:rgba(255,255,255,.12);padding:4px 10px;border-radius:6px;font-size:13px;}
.nav-change-stavba{color:#b8d4f0;font-size:12px;text-decoration:none;font-weight:700;}
.nav-change-stavba:hover{color:#fff;text-decoration:underline;}
.nav-sep{color:rgba(255,255,255,.4);}
.nav-role{color:#b8d4f0;font-size:12px;font-weight:600;}
.admin-main{max-width:1100px;margin:0 auto;padding:26px 20px;}
.admin-main h1{color:var(--navy);margin:0 0 18px;font-size:30px;}
.card{background:var(--surface);border-radius:8px;padding:22px;margin-bottom:22px;box-shadow:var(--shadow);border:1px solid var(--line);}
.card h2{margin-top:0;color:var(--navy);}
.stats-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:14px;margin-bottom:22px;}
.stat-card{background:var(--surface);border:1px solid var(--line);border-left:5px solid var(--green);border-radius:8px;padding:16px;box-shadow:var(--shadow);}
.stat-card span{display:block;color:var(--muted);font-weight:700;font-size:13px;}
.stat-card strong{display:block;color:var(--navy);font-size:34px;line-height:1.1;margin-top:4px;}
.form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px;}
.form-grid label,.filtry label{display:block;font-weight:600;font-size:14px;}
.form-grid input,.form-grid select,.filtry input,.filtry select{width:100%;padding:10px;border:2px solid var(--grey);
  border-radius:8px;font-size:15px;margin-top:5px;background:#fbfdff;}
.settings-add-grid{display:grid;grid-template-columns:minmax(220px,1fr) minmax(150px,220px) minmax(120px,160px);gap:14px;align-items:end;}
.settings-add-grid label{display:block;font-weight:600;font-size:14px;}
.settings-add-grid input[type="text"]{width:100%;padding:10px;border:2px solid var(--grey);border-radius:8px;font-size:15px;margin-top:5px;background:#fbfdff;}
.check-label{display:flex!important;align-items:center;gap:8px;margin-top:25px;color:var(--navy);}
.check-label input{width:auto!important;margin:0!important;}
.settings-table input[type="text"],.settings-table input[type="number"]{width:100%;min-width:120px;padding:8px 9px;border:2px solid var(--grey);border-radius:8px;background:#fbfdff;}
.settings-table input[type="checkbox"]{width:18px;height:18px;}
.settings-table td{vertical-align:middle;}
.settings-active{display:inline-flex;align-items:center;gap:8px;font-weight:700;color:var(--navy);}
.settings-actions{display:flex;gap:8px;align-items:center;}
.settings-actions form{margin:0;}
.settings-shortcut{display:flex;align-items:center;justify-content:space-between;gap:18px;border-left:5px solid var(--green);}
.settings-shortcut h2{margin-bottom:4px;}
.settings-shortcut .btn-link{padding:11px 16px;white-space:nowrap;}
.btn-link{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;}
.settings-folder{padding:0;overflow:hidden;}
.settings-folder summary{list-style:none;cursor:pointer;padding:18px 22px;color:var(--navy);font-size:19px;font-weight:800;display:flex;align-items:center;justify-content:space-between;gap:12px;}
.settings-folder summary::-webkit-details-marker{display:none;}
.settings-folder summary::after{content:"+";display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:8px;background:var(--green-soft);color:var(--green-dark);font-weight:900;}
.settings-folder[open] summary{border-bottom:1px solid var(--line);background:#f8fbfd;}
.settings-folder[open] summary::after{content:"-";}
.settings-folder > :not(summary){margin-left:22px;margin-right:22px;}
.settings-folder > :last-child{margin-bottom:22px;}
.settings-two-col{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-top:16px;}
.settings-two-col h2{font-size:18px;margin:0 0 10px;color:var(--navy);}
.settings-inline-add{display:grid;grid-template-columns:minmax(170px,1fr) auto auto;gap:10px;align-items:end;margin:12px 0 14px;}
.settings-inline-add label{font-weight:600;font-size:14px;}
.settings-inline-add input[type="text"]{width:100%;padding:10px;border:2px solid var(--grey);border-radius:8px;font-size:15px;margin-top:5px;background:#fbfdff;}
.settings-inline-add .check-label{margin-top:0;}
.settings-inline-add button{padding:11px 16px;}
.section-title{color:var(--navy);font-size:20px;margin:24px 0 12px;}
.inline-form{display:flex;gap:6px;align-items:center;}
.inline-form input{width:130px;padding:7px 8px;border:2px solid var(--grey);border-radius:8px;}
.print-options{display:flex;align-items:center;justify-content:space-between;gap:18px;border-top:4px solid var(--green);}
.print-options h2{margin-bottom:4px;}
.print-options label{font-weight:700;min-width:190px;color:var(--navy);}
.print-options select{width:100%;padding:11px;border:2px solid var(--grey);border-radius:8px;margin-top:6px;background:#fbfdff;}
.print-option-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end;}
.print-option-actions button{padding:11px 16px;}
.print-check-option{display:flex;align-items:center;gap:8px;min-width:220px;color:var(--navy);font-weight:800;}
.print-check-option input{width:18px;height:18px;accent-color:var(--green);margin:0;}
.form-check-row{margin-top:18px;align-items:flex-start;}
.form-check-row span{font-weight:700;color:var(--navy);}
.pruvodky-filters h2{margin:0 0 14px;color:var(--navy);}
.filter-grid{display:grid;grid-template-columns:2fr repeat(3,1fr);gap:12px;align-items:end;}
.filter-grid label{display:block;font-size:13px;font-weight:700;color:var(--navy);}
.filter-grid input,.filter-grid select{width:100%;padding:10px;border:2px solid var(--grey);border-radius:8px;margin-top:5px;background:#fbfdff;}
.filter-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:14px;}
.filter-actions button{padding:10px 16px;}
.pruvodky-browser{display:flex;flex-direction:column;gap:12px;margin-bottom:24px;}
.object-group,.material-group{background:var(--surface);border:1px solid var(--line);border-radius:8px;box-shadow:var(--shadow);overflow:hidden;}
.material-group{box-shadow:none;margin:0 14px 14px;border-color:#e7edf4;}
.object-group summary,.material-group summary{cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;font-weight:800;color:var(--navy);list-style:none;}
.object-group summary::-webkit-details-marker,.material-group summary::-webkit-details-marker{display:none;}
.object-group summary{background:#f8fbfd;border-bottom:1px solid var(--line);}
.material-group summary{background:#fff;}
.object-group summary b,.material-group summary b{font-size:12px;color:var(--muted);background:#eef2f6;border-radius:999px;padding:3px 8px;white-space:nowrap;}
.pruvodka-list{display:flex;flex-direction:column;border-top:1px solid #eef1f5;}
.pruvodka-item{display:grid;grid-template-columns:34px minmax(260px,1fr) minmax(210px,auto) auto;gap:12px;align-items:center;padding:12px 14px;border-bottom:1px solid #eef1f5;background:#fff;}
.pruvodka-item:last-child{border-bottom:0;}
.pruvodka-item:hover{background:#f7fafc;}
.item-check{display:flex;align-items:center;justify-content:center;}
.item-check input{width:18px;height:18px;}
.item-main{min-width:0;display:flex;flex-direction:column;gap:2px;}
.item-main strong{color:var(--navy);font-size:15px;}
.item-main span,.item-main small{color:var(--muted);font-size:13px;overflow-wrap:anywhere;}
.item-meta{display:flex;gap:10px;align-items:center;flex-wrap:wrap;color:var(--muted);font-size:13px;justify-content:flex-end;}
.item-actions{display:flex;gap:8px;justify-content:flex-end;}
.legacy-pruvodky-table{display:none!important;}
.filtry{display:flex;gap:12px;align-items:end;flex-wrap:wrap;background:var(--surface);padding:16px;border-radius:8px;margin-bottom:16px;box-shadow:var(--shadow);border:1px solid var(--line);}
.filtry button{padding:11px 18px;}
.souhrn{margin:8px 0 14px;font-size:16px;}
.tabulka-wrap{overflow-x:auto;background:var(--surface);border-radius:8px;box-shadow:var(--shadow);border:1px solid var(--line);}
.tabulka{width:100%;border-collapse:collapse;font-size:14px;}
.tabulka th,.tabulka td{padding:10px 12px;text-align:left;border-bottom:1px solid #eef1f5;white-space:nowrap;}
.tabulka th{background:linear-gradient(180deg,var(--navy),var(--navy-dark));color:#fff;position:sticky;top:0;z-index:2;}
.tabulka tr:hover td{background:#f0f5fb;}
.tabulka-zebra tbody tr:nth-child(even) td{background:#f7f9fc;}
.tabulka-zebra tbody tr:nth-child(even):hover td{background:#edf2f9;}
.empty-state-cell{text-align:center;padding:32px 20px;color:var(--muted);font-style:italic;}

.badge-ok,.badge-muted{display:inline-flex;align-items:center;justify-content:center;min-width:38px;padding:3px 8px;border-radius:999px;font-size:12px;font-weight:800;}
.badge-ok{background:var(--green-soft);color:var(--green-dark);}
.badge-muted{background:#eef2f6;color:var(--grey-dark);}

/* ---- modální okno ---- */
.modal{position:fixed;inset:0;background:rgba(0,0,0,.5);display:flex;align-items:center;justify-content:center;z-index:50;}
.modal-card{background:var(--surface);border-radius:8px;padding:24px;width:min(92vw,440px);box-shadow:0 24px 70px rgba(0,0,0,.28);}
.modal-card h2{margin-top:0;color:var(--navy);}
.modal-card label{display:block;font-weight:600;font-size:14px;margin-top:12px;}
.modal-card input,.modal-card select{width:100%;padding:10px;border:2px solid var(--grey);border-radius:8px;margin-top:5px;font-size:15px;}
/* ---- tisk průvodky (šablona dle ŽSD a.s.) ---- */
/* Landscape A4 = 297×210mm. Bezpečná tisková plocha při okraji 6mm = 285×198mm. */
.print-area{padding:16px;background:#fff;}
.print-book{display:block;}
.print-page{page:pruvodka-landscape;width:285mm;height:198mm;min-height:198mm;margin:0 auto 8mm;padding:0;display:grid;gap:0;background:#fff;box-shadow:0 10px 34px rgba(11,37,69,.16);break-after:page;page-break-after:always;overflow:hidden;}
.print-page:last-child{margin-bottom:0;break-after:auto;page-break-after:auto;}
.print-count-1{grid-template:1fr / 1fr;}
.print-count-2{grid-template:repeat(2,1fr) / 1fr;}
.print-count-4{grid-template:repeat(2,minmax(0,1fr)) / repeat(2,minmax(0,1fr));}
.print-slot{min-width:0;min-height:0;overflow:hidden;display:flex;}
.print-slot-empty{background:#fff;border:1px dashed #e5e7eb;}

/* ---- karta průvodky ---- */
.pruvodka-doc{width:100%;height:100%;margin:0;display:flex;flex-direction:column;
  break-inside:avoid;page-break-inside:avoid;min-width:0;min-height:0;overflow:hidden;
  font-family:Segoe UI,system-ui,Arial,sans-serif;color:#222;}
/* čárkovaný rámeček pro vystřižení */
.print-slot{border:1px dashed #ccc;}

/* -- záhlaví karty -- */
.pd-head{display:flex;justify-content:space-between;align-items:flex-start;
  border-bottom:2px solid #000;padding:2mm 3mm 1.5mm;gap:4px;}
.pd-h-left{min-width:0;}
.pd-h-left strong{display:block;font-size:7.5pt;color:#000;line-height:1.1;}
.pd-h-left span{display:block;font-size:4.5pt;color:#666;font-weight:600;margin-top:1px;}
.pd-h-center{font-size:7pt;font-weight:700;color:#000;white-space:nowrap;text-align:center;flex-shrink:0;}
.pd-h-right{text-align:right;white-space:nowrap;}
.pd-h-right b{font-size:11pt;color:#000;}

/* -- tělo karty (řádky polí) -- */
.pd-body{flex:1;display:flex;flex-direction:column;padding:0 3mm 2mm;}
.pd-row{display:flex;gap:0;min-height:0;}
.pd-row-bottom{flex:1;}
.pd-cell{border:0.4px solid #888;padding:0.8mm 1.2mm;display:flex;flex-direction:column;
  justify-content:flex-start;overflow:hidden;min-height:0;box-sizing:border-box;}
.pd-lbl{font-size:5pt;font-weight:700;color:#222;line-height:1.1;margin-bottom:0.3mm;white-space:nowrap;}
.pd-cell b{font-size:7pt;color:#000;line-height:1.15;overflow-wrap:anywhere;}
.pd-hint{font-size:5.5pt;color:#999;}
.pd-blank-line{display:block;border-bottom:0.5px solid #888;width:80%;height:5pt;margin-top:1pt;}

/* zvýrazněné pole množství */
.pd-tonnage{background:#eee;border-width:1.5px;border-color:#000;}
.pd-tonnage .pd-lbl{font-size:5pt;}

/* QR buňka */
.pd-qr-cell{display:flex;align-items:center;justify-content:center;border-style:dashed;border-color:#888;}
.pd-qr canvas,.pd-qr img{display:block;}

/* ---- velikostní varianty dle počtu na stránku ---- */

/* 1 na stránku (297×210mm) — velké fonty */
.print-count-1 .pd-head{padding:4mm 6mm 3mm;}
.print-count-1 .pd-h-left strong{font-size:14pt;}
.print-count-1 .pd-h-left span{font-size:8pt;}
.print-count-1 .pd-h-center{font-size:13pt;}
.print-count-1 .pd-h-right b{font-size:20pt;}
.print-count-1 .pd-body{padding:0 6mm 4mm;}
.print-count-1 .pd-row{min-height:16mm;}
.print-count-1 .pd-row-bottom{min-height:62mm;}
.print-count-1 .pd-lbl{font-size:9pt;}
.print-count-1 .pd-cell b{font-size:13pt;}
.print-count-1 .pd-hint{font-size:10pt;}
.print-count-1 .pd-blank-line{height:10pt;}
.print-count-1 .pd-tonnage{border-width:2.5px;}
.print-count-1 .pd-qr-cell{min-height:58mm;}

/* 2 na stránku (297×105mm) — stejné jako 4 šířka ale víc výšky */
.print-count-2 .pd-head{padding:3mm 4mm 2mm;}
.print-count-2 .pd-h-left strong{font-size:10pt;}
.print-count-2 .pd-h-left span{font-size:6pt;}
.print-count-2 .pd-h-center{font-size:9pt;}
.print-count-2 .pd-h-right b{font-size:14pt;}
.print-count-2 .pd-body{padding:0 4mm 3mm;}
.print-count-2 .pd-row{min-height:12mm;}
.print-count-2 .pd-lbl{font-size:7pt;}
.print-count-2 .pd-cell b{font-size:10pt;}
.print-count-2 .pd-hint{font-size:7pt;}
.print-count-2 .pd-blank-line{height:7pt;}
.print-count-2 .pd-tonnage{border-width:2px;}

/* 4 na stránku (142,5×99mm) — bezpečně uvnitř tisknutelné plochy */
/* výchozí velikosti výše odpovídají tomuto */

@media print{
  @page{size:A4 landscape;margin:6mm;}
  @page pruvodka-landscape{size:A4 landscape;margin:6mm;}
  html,body{width:auto!important;min-width:0!important;min-height:0!important;margin:0!important;background:#fff!important;overflow:visible!important;}
  body.printing-pruvodky{
    width:auto!important;
    min-width:0!important;
    height:auto!important;
    overflow:visible!important;
    -webkit-print-color-adjust:exact;
    print-color-adjust:exact;
  }
  body.printing-pruvodky > :not(.print-area){display:none!important;}
  .print-area{position:static!important;inset:auto!important;width:285mm!important;min-width:285mm!important;height:auto!important;padding:0!important;margin:0!important;overflow:visible!important;background:#fff!important;}
  .print-book{display:block!important;width:285mm!important;margin:0!important;}
  .print-page{
    page:pruvodka-landscape;
    position:relative;
    width:285mm!important;
    height:198mm!important;
    min-width:285mm!important;
    min-height:198mm!important;
    max-width:285mm!important;
    max-height:198mm!important;
    box-sizing:border-box;
    box-shadow:none!important;
    margin:0!important;
    overflow:hidden!important;
    break-inside:avoid-page;
    break-after:page;
    page-break-inside:avoid;
    page-break-after:always;
  }
  .print-page:last-child{break-after:auto;page-break-after:auto;}
  .print-slot,.pruvodka-doc{break-inside:avoid-page;page-break-inside:avoid;}
  .tabulka th{position:static;}
  .pd-qr canvas,.pd-qr img{display:block;min-width:68px;min-height:68px;}
}

@media (min-width:641px) and (max-width:1100px){
  .topbar{padding:16px 22px;font-size:18px;}
  .admin-nav{gap:16px;padding:14px 18px;}
  .admin-nav .brand{width:100%;font-size:18px;}
  .admin-nav nav{gap:10px;flex-wrap:wrap;}
  .admin-nav a{padding:9px 10px;background:rgba(255,255,255,.08);}
  .admin-nav .nav-right{margin-left:auto;font-size:15px;}

  .admin-main{max-width:100%;padding:24px 18px;}
  .admin-main h1{font-size:28px;}
  .card{padding:20px;}
  .stats-grid{grid-template-columns:repeat(3,minmax(0,1fr));}
  .form-grid{grid-template-columns:repeat(2,minmax(220px,1fr));}
  .settings-add-grid{grid-template-columns:1fr 180px 140px;}

  .print-options{align-items:flex-start;}
  .print-option-actions{justify-content:flex-start;}
  .filter-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .pruvodka-item{grid-template-columns:34px 1fr;align-items:start;}
  .item-meta,.item-actions{grid-column:2;justify-content:flex-start;}
  .tabulka{font-size:13px;}
  .tabulka th,.tabulka td{padding:9px 10px;}

  .flow-main{max-width:760px;padding:30px 24px;}
  .step h2{font-size:28px;}
  .qr-input,.big-input{font-size:28px;padding:19px;}
  .scan-actions button,.btn-row button{min-height:48px;}
  .camera-panel{padding:12px;}
  .qr-reader,.qr-video{min-height:360px;}
  .data-box{padding:18px 20px;}
  .data-box .row{font-size:19px;}
  .netto-box strong{font-size:52px;}

  .kypar-main{min-height:82vh;}
  .big-action{width:min(70vw,520px);height:min(52vh,460px);font-size:34px;}
}

@media (max-width:640px){
  .topbar,.admin-nav{align-items:flex-start;gap:10px;}
  .admin-nav nav{width:100%;gap:12px;flex-wrap:wrap;}
  .admin-nav .nav-right{margin-left:0;}
  .admin-main{padding:18px 12px;}
  .card,.filtry{padding:16px;}
  .settings-folder{padding:0;}
  .settings-folder summary{padding:16px;font-size:17px;}
  .settings-folder > :not(summary){margin-left:16px;margin-right:16px;}
  .settings-add-grid{grid-template-columns:1fr;}
  .settings-two-col{grid-template-columns:1fr;}
  .settings-inline-add{grid-template-columns:1fr;}
  .settings-shortcut{display:block;}
  .settings-shortcut .btn-link{margin-top:12px;}
  .print-options{display:block;}
  .print-option-actions{justify-content:flex-start;margin-top:12px;}
  .filter-grid{grid-template-columns:1fr;}
  .object-group summary,.material-group summary{align-items:flex-start;}
  .material-group{margin:0 8px 10px;}
  .pruvodka-item{grid-template-columns:30px minmax(0,1fr);gap:8px;padding:11px 10px;}
  .item-actions{grid-column:1 / -1;padding-left:38px;justify-content:flex-start;}
  .item-meta{grid-column:1 / -1;padding-left:38px;justify-content:flex-start;}
  .btn-row{flex-direction:column;}
  .data-box .row{display:block;font-size:16px;}
  .data-box .row b{display:block;text-align:left;margin-top:2px;}
  .qr-input,.big-input{font-size:22px;padding:15px;}
  .netto-box strong{font-size:38px;}
}

/* =====================================================
   UI polish v6 - jednotny administracni system
   ===================================================== */
:root{
  --navy:#062653;
  --navy-dark:#041a3a;
  --navy-soft:#0d3f82;
  --green:#168c46;
  --green-dark:#0f6d35;
  --green-soft:#e9f8ef;
  --red:#c2352a;
  --amber:#b77900;
  --amber-soft:#fff4d8;
  --grey:#d7e0ea;
  --grey-dark:#5f6f83;
  --text:#101828;
  --muted:#667085;
  --surface:#fff;
  --line:#d9e2ec;
  --bg:#f3f6fa;
  --shadow:0 8px 22px rgba(16,24,40,.07);
  --shadow-soft:0 3px 10px rgba(16,24,40,.05);
  --radius:8px;
  --field-h:42px;
}
body{background:var(--bg);font-size:15px;letter-spacing:0;}
button,input,select,textarea{font:inherit;letter-spacing:0;}
a{color:var(--navy-soft);}
.admin-nav{min-height:58px;padding:0 24px;background:linear-gradient(90deg,var(--navy-dark),var(--navy));border-bottom:3px solid var(--green);box-shadow:0 4px 16px rgba(4,26,58,.18);}
.admin-nav .brand{font-size:18px;}
.admin-nav nav{gap:4px;}
.admin-nav a{min-height:38px;display:inline-flex;align-items:center;padding:9px 12px;border-radius:var(--radius);font-size:14px;color:#e8f1ff;}
.admin-nav a:hover{background:rgba(255,255,255,.1);}
.admin-nav .nav-right{font-size:13px;}
.nav-stavba{min-height:32px;border-radius:var(--radius);background:rgba(255,255,255,.1);}
.admin-main{max-width:1240px;padding:28px 24px 44px;}
.admin-main h1{font-size:28px;line-height:1.18;margin:0 0 18px;color:var(--navy-dark);}
.card,.tabulka-wrap,.filtry,.object-group{border-radius:var(--radius);border:1px solid var(--line);box-shadow:var(--shadow);background:var(--surface);}
.card{padding:20px;margin-bottom:18px;}
.card h2,.settings-two-col h2,.section-title{font-size:18px;line-height:1.25;color:var(--navy-dark);margin:0 0 12px;}
.hint{font-size:13px;color:var(--muted);}
.alert{border-radius:var(--radius);border:1px solid transparent;padding:12px 14px;}
.alert.ok{border-color:#b7e6c8;background:var(--green-soft);}
.alert.error{border-color:#f1b8b4;background:#fff1f0;}
.stats-grid{gap:16px;margin-bottom:18px;}
.stat-card{min-height:92px;border-left:0;border-radius:var(--radius);padding:18px 18px 16px;box-shadow:var(--shadow);display:flex;flex-direction:column;justify-content:center;}
.stat-card span{font-size:12px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);}
.stat-card strong{font-size:32px;color:var(--navy-dark);}
.btn-primary,.btn-green,.btn-grey,.btn-confirm,.btn-mini,.btn-danger,.btn-link{min-height:var(--field-h);border-radius:var(--radius);box-shadow:none;padding:0 16px;font-size:14px;font-weight:800;display:inline-flex;align-items:center;justify-content:center;gap:8px;}
.btn-primary{background:var(--navy);}
.btn-green,.btn-confirm{background:var(--green);}
.btn-grey{background:#eef2f6;color:var(--navy);border:1px solid var(--line);}
.btn-danger{background:#fff1f0;color:var(--red);border:1px solid #f2b8b5;}
.btn-mini{min-height:34px;padding:0 12px;font-size:13px;background:#eef4fb;color:var(--navy);border:1px solid #c7d6e7;}
.btn-mini.btn-danger{background:#fff1f0;color:var(--red);border-color:#f2b8b5;}
.btn-big{width:auto;min-height:46px;margin-top:14px;font-size:15px;padding:0 18px;}
.btn-row{gap:10px;align-items:center;flex-wrap:wrap;}
.form-grid,.settings-add-grid,.settings-inline-add,.filter-grid{gap:14px;}
.form-grid label,.filtry label,.settings-add-grid label,.settings-inline-add label,.filter-grid label,.modal-card label,.login-card label{font-size:13px;font-weight:800;color:var(--navy-dark);}
.form-grid input,.form-grid select,.filtry input,.filtry select,.settings-add-grid input[type="text"],.settings-inline-add input[type="text"],.filter-grid input,.filter-grid select,.modal-card input,.modal-card select,.inline-form input,.login-card input,.print-options select{
  min-height:var(--field-h);height:var(--field-h);padding:0 12px;border:1px solid #cfd9e6;border-radius:var(--radius);background:#fff;font-size:14px;color:var(--text);box-shadow:inset 0 1px 1px rgba(16,24,40,.02);margin-top:6px;
}
.form-grid input:focus,.form-grid select:focus,.filtry input:focus,.filtry select:focus,.settings-add-grid input:focus,.settings-inline-add input:focus,.filter-grid input:focus,.filter-grid select:focus,.modal-card input:focus,.modal-card select:focus,.inline-form input:focus,.login-card input:focus{
  outline:3px solid rgba(13,63,130,.12);border-color:var(--navy-soft);
}
.check-label{min-height:var(--field-h);margin-top:0;font-size:13px;font-weight:800;align-items:center!important;}
.check-label input,.settings-table input[type="checkbox"]{width:18px!important;height:18px!important;accent-color:var(--green);}
.filtry{box-shadow:var(--shadow-soft);padding:14px;margin-bottom:16px;}
.filtry button{min-height:var(--field-h);padding:0 16px;}
.settings-shortcut{border-left:0;padding:0;overflow:hidden;}
.settings-shortcut > div{padding:18px 20px;}
.settings-shortcut .btn-link{margin-right:20px;}
.settings-folder{border-radius:var(--radius);padding:0;overflow:hidden;margin-bottom:14px;}
.settings-folder summary{min-height:54px;padding:0 18px;font-size:16px;font-weight:900;color:var(--navy-dark);background:#fff;border-bottom:1px solid transparent;}
.settings-folder summary::after{width:30px;height:30px;border-radius:var(--radius);background:#eef4fb;color:var(--navy);content:"+";}
.settings-folder[open] summary{background:#f8fbfd;border-bottom-color:var(--line);}
.settings-folder[open] summary::after{content:"-";}
.settings-folder > :not(summary){margin-left:18px;margin-right:18px;}
.settings-folder > h2,.settings-folder > p,.settings-folder > form,.settings-folder > .tabulka-wrap,.settings-folder > .settings-two-col{margin-top:16px;}
.settings-two-col{gap:16px;}
.settings-inline-add{grid-template-columns:minmax(180px,1fr) minmax(120px,auto) auto;}
.settings-table input[type="text"],.settings-table input[type="number"]{min-height:38px;height:38px;border:1px solid #cfd9e6;border-radius:var(--radius);background:#fff;padding:0 10px;}
.settings-actions{gap:8px;justify-content:flex-end;}
.tabulka-wrap{overflow:auto;box-shadow:var(--shadow-soft);}
.tabulka{font-size:13px;border-collapse:separate;border-spacing:0;}
.tabulka th{position:sticky;top:0;background:#f8fbfd;color:var(--navy-dark);font-size:12px;text-transform:uppercase;letter-spacing:.04em;border-bottom:1px solid var(--line);padding:12px;z-index:2;}
.tabulka td{padding:12px;border-bottom:1px solid #edf1f6;vertical-align:middle;}
.tabulka tr:hover td,.tabulka-zebra tbody tr:nth-child(even):hover td{background:#f8fbfd;}
.tabulka-zebra tbody tr:nth-child(even) td{background:#fff;}
.badge-ok,.badge-muted{border-radius:6px;min-height:24px;padding:3px 8px;font-size:12px;}
.badge-ok{background:var(--green-soft);color:var(--green-dark);border:1px solid #b7e6c8;}
.badge-muted{background:#f1f4f8;color:var(--grey-dark);border:1px solid #dbe3ec;}
.pruvodky-filters h2{font-size:18px;}
.object-group,.material-group{box-shadow:var(--shadow-soft);}
.object-group summary,.material-group summary{min-height:48px;padding:0 16px;}
.object-group summary{background:#f8fbfd;}
.pruvodka-item{min-height:66px;border-bottom:1px solid #edf1f6;}
.item-main strong{font-size:14px;color:var(--navy-dark);}
.item-main span,.item-main small,.item-meta{font-size:13px;}
.login-card{border-top:0;border-radius:var(--radius);box-shadow:0 22px 60px rgba(4,26,58,.22);}
.topbar{min-height:56px;background:var(--navy);border-bottom:3px solid var(--green);}
.flow-main{max-width:680px;}
.data-box,.netto-box,.camera-panel{border-radius:var(--radius);}
.qr-input,.big-input{min-height:60px;border:1px solid #cfd9e6;border-radius:var(--radius);box-shadow:var(--shadow-soft);}
.empty-state-cell{font-size:14px;color:var(--muted);}
.modal-card{border-radius:var(--radius);}

@media (max-width:900px){
  .admin-main{padding:22px 16px 34px;}
  .admin-nav{padding:10px 16px;}
  .admin-nav .nav-right{width:100%;margin-left:0;}
  .filter-grid{grid-template-columns:1fr 1fr;}
  .settings-inline-add{grid-template-columns:1fr;}
}

@media (max-width:640px){
  .admin-main h1{font-size:24px;}
  .card{padding:16px;}
  .stats-grid{grid-template-columns:1fr;}
  .form-grid,.settings-add-grid,.settings-two-col,.filter-grid{grid-template-columns:1fr;}
  .settings-folder > :not(summary){margin-left:14px;margin-right:14px;}
  .settings-shortcut{display:block;}
  .settings-shortcut .btn-link{margin:0 16px 16px;}
  .inline-form{flex-direction:column;align-items:stretch;}
  .inline-form input,.inline-form button{width:100%;}
  .btn-primary,.btn-green,.btn-grey,.btn-confirm,.btn-danger,.btn-link{width:100%;}
  .btn-mini{width:auto;}
}

/* =====================================================
   UI polish v7 - fidelity pass podle vizualizace
   ===================================================== */
:root{
  --app-bg:#f5f8fc;
  --app-line:#dfe7f1;
  --app-blue:#052b63;
  --app-blue-2:#021f49;
  --app-green:#16a34a;
  --app-red:#ef4444;
  --app-orange:#f59e0b;
  --app-shadow:0 8px 24px rgba(15,23,42,.08);
  --app-shadow-soft:0 2px 8px rgba(15,23,42,.06);
}
body.admin-body{background:var(--app-bg);}
.admin-nav{
  min-height:62px;
  padding:0 28px;
  gap:26px;
  background:linear-gradient(90deg,#021b41 0%,#052b63 62%,#07285a 100%);
  border-bottom:0;
  box-shadow:0 6px 18px rgba(2,27,65,.22);
}
.admin-nav .brand{display:flex;align-items:center;gap:12px;font-size:18px;font-weight:900;color:#fff;}
.brand-mark{width:30px;height:30px;border-radius:7px;border:1px solid rgba(147,197,253,.48);background:linear-gradient(145deg,#1974dc 0%,#0a4f9e 58%,#07366f 100%);color:#fff;display:inline-flex;align-items:center;justify-content:center;font-weight:950;box-shadow:0 5px 13px rgba(1,15,38,.32),inset 0 1px 0 rgba(255,255,255,.22);}
.admin-nav nav{align-self:stretch;display:flex;gap:0;}
.admin-nav nav a{
  position:relative;
  min-height:62px;
  padding:0 18px;
  border-radius:0;
  color:#e8eef7;
  font-size:14px;
  font-weight:800;
  gap:9px;
}
.admin-nav nav a.active::after{content:"";position:absolute;left:14px;right:14px;bottom:0;height:4px;border-radius:4px 4px 0 0;background:var(--app-green);}
.admin-nav nav a:hover{background:rgba(255,255,255,.08);}
.nav-ico{font-size:17px;line-height:1;color:#dbe8f7;}
.admin-nav .nav-right{margin-left:auto;gap:12px;color:#e9f1fb;}
.nav-stavba{min-height:34px;padding:0 12px;background:transparent;color:#fff;font-weight:700;}
.status-dot{width:14px;height:14px;border-radius:999px;background:var(--app-green);box-shadow:0 0 0 3px rgba(22,163,74,.16);display:inline-block;}
.nav-sep{width:1px;height:24px;background:rgba(255,255,255,.22);}
.nav-role{font-weight:800;color:#fff;}
.nav-change-stavba{color:#bad4f3!important;margin-left:4px;}
.admin-main{max-width:1420px;padding:24px 28px 46px;}
.admin-main h1{font-size:24px;margin-bottom:18px;color:#061b3d;}
.stats-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(210px,1fr));
  gap:18px;
  margin-bottom:18px;
}
.stats-grid.metric-strip{grid-template-columns:repeat(5,minmax(160px,1fr));}
.stat-card{
  position:relative;
  min-height:92px;
  padding:16px 18px 14px 82px;
  border:1px solid var(--app-line);
  border-radius:7px;
  background:#fff;
  box-shadow:var(--app-shadow);
}
.stat-card::before{
  content:"";
  position:absolute;
  left:18px;
  top:16px;
  width:46px;
  height:46px;
  border-radius:12px;
  background:#eaf2ff;
  box-shadow:inset 0 0 0 1px #d7e6ff;
}
.stat-card::after{
  content:"▤";
  position:absolute;
  left:31px;
  top:25px;
  color:#0b63ce;
  font-weight:950;
  font-size:22px;
}
.stats-grid .stat-card:nth-child(2)::before{background:#eaf8ef;box-shadow:inset 0 0 0 1px #cbeed8;}
.stats-grid .stat-card:nth-child(2)::after{content:"✓";color:var(--app-green);}
.stats-grid .stat-card:nth-child(3)::before{background:#fff6e6;box-shadow:inset 0 0 0 1px #fde3ad;}
.stats-grid .stat-card:nth-child(3)::after{content:"!";color:var(--app-orange);}
.stats-grid .stat-card:nth-child(4)::before{background:#fff0f0;box-shadow:inset 0 0 0 1px #ffd1d1;}
.stats-grid .stat-card:nth-child(4)::after{content:"▥";color:var(--app-red);}
.stats-grid .stat-card:nth-child(5)::before{background:#edf4ff;box-shadow:inset 0 0 0 1px #d5e5ff;}
.stats-grid .stat-card:nth-child(5)::after{content:"▣";color:#2563eb;}
.stat-card span{font-size:13px;text-transform:none;letter-spacing:0;color:#334155;font-weight:800;}
.stat-card strong{font-size:25px;line-height:1.08;color:#071a39;margin-top:3px;white-space:nowrap;}
.stat-card small{display:block;margin-top:5px;color:#64748b;font-size:12px;font-weight:650;}
.card,.filtry,.tabulka-wrap,.settings-folder,.object-group{
  border:1px solid var(--app-line);
  border-radius:7px;
  box-shadow:var(--app-shadow-soft);
  background:#fff;
}
.settings-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:18px;align-items:start;}
.settings-content{min-width:0;}
.section-table{margin-bottom:16px;}
.form-submit{width:auto;max-width:220px;margin-top:14px;}
.settings-folder{margin-bottom:10px;}
.settings-folder summary{
  min-height:50px;
  padding:0 18px;
  display:flex;
  align-items:center;
  gap:12px;
  border-bottom:1px solid transparent;
  background:#fff;
}
.settings-folder summary::before{content:"▦";width:22px;color:#0b2f66;font-size:17px;}
.settings-folder summary::after{margin-left:auto;background:transparent;color:#061b3d;font-size:20px;width:24px;height:24px;}
.settings-folder[open] summary{border-bottom-color:#e6edf5;background:#fbfdff;}
.settings-folder > :not(summary){margin-left:18px;margin-right:18px;}
.settings-folder > :last-child{margin-bottom:18px;}
.users-folder{overflow:hidden;}
.user-workbench{display:grid;grid-template-columns:260px minmax(0,1fr);gap:22px;padding:14px 0 0;}
.user-create-panel{display:flex;flex-direction:column;gap:9px;}
.user-create-panel h2{margin:0 0 2px;color:#06429a;font-size:15px;}
.user-create-panel label{font-size:13px;font-weight:800;color:#1e293b;}
.user-create-panel input,.user-create-panel select{
  width:100%;
  height:38px;
  min-height:38px;
  margin-top:5px;
  border:1px solid #cfd9e6;
  border-radius:6px;
  padding:0 10px;
  background:#fff;
  color:#0f172a;
}
.settings-inline-add select{
  width:100%;
  height:42px;
  min-height:42px;
  margin-top:6px;
  border:1px solid #cfd9e6;
  border-radius:6px;
  padding:0 10px;
  background:#fff;
  color:#0f172a;
}
.access-add-form{grid-template-columns:minmax(240px,320px) auto;}
.user-create-panel .btn-green{align-self:flex-start;min-height:38px;margin-top:4px;}
.user-table-panel{box-shadow:none;}
.table-foot{padding:10px 14px;color:#64748b;font-size:12px;border-top:1px solid #edf2f7;background:#fbfdff;}
.tabulka th{background:#fbfdff;color:#0b1f42;font-size:12px;font-weight:900;text-transform:none;letter-spacing:0;}
.tabulka td{height:48px;}
.filtry{
  display:grid;
  grid-template-columns:repeat(4,minmax(150px,1fr)) auto auto auto;
  align-items:end;
}
.btn-primary,.btn-green,.btn-grey,.btn-confirm,.btn-danger,.btn-link,.btn-mini{border-radius:6px;}
.btn-primary{background:#052b63;}
.btn-green,.btn-confirm{background:var(--app-green);}
.btn-grey{background:#fff;color:#0b2f66;border:1px solid #b8c8dd;}
.btn-danger{background:#fff5f5;color:#dc2626;border:1px solid #fecaca;}
.inline-form{display:flex;gap:8px;align-items:center;}

@media (max-width:1100px){
  .stats-grid.metric-strip,.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .settings-layout{grid-template-columns:1fr;}
  .user-workbench{grid-template-columns:1fr;}
  .filtry{grid-template-columns:repeat(2,minmax(0,1fr));}
}

@media (max-width:700px){
  .admin-nav{padding:10px 14px;gap:10px;}
  .admin-nav nav{width:100%;overflow-x:auto;}
  .admin-nav nav a{min-height:44px;padding:0 12px;white-space:nowrap;}
  .admin-nav .nav-right{width:100%;}
  .admin-main{padding:18px 12px 34px;}
  .stats-grid.metric-strip,.stats-grid{grid-template-columns:1fr;}
  .stat-card{padding-left:76px;}
  .filtry{grid-template-columns:1fr;}
  .user-create-panel .btn-green{width:100%;}
}

/* =====================================================
   UI polish v8 - pruvodky podle dashboard vizualizace
   ===================================================== */
.pruvodky-workspace{
  display:grid;
  grid-template-columns:260px minmax(0,1fr);
  gap:18px;
  align-items:start;
  margin-top:18px;
}
.pruvodky-workspace .pruvodky-filters{
  position:sticky;
  top:82px;
  padding:18px;
  margin:0;
  box-shadow:var(--app-shadow-soft);
}
.pruvodky-filters h2{
  margin:0 0 16px;
  color:#062653;
  font-size:16px;
  line-height:1.25;
}
.pruvodky-workspace .filter-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
}
.pruvodky-workspace .filter-grid label{
  display:block;
  color:#0f2447;
  font-size:12px;
  font-weight:850;
}
.pruvodky-workspace .filter-grid input,
.pruvodky-workspace .filter-grid select{
  width:100%;
  height:38px;
  min-height:38px;
  margin-top:5px;
  border:1px solid #cfd9e6;
  border-radius:6px;
  padding:0 10px;
  background:#fff;
  color:#0f172a;
  font-size:13px;
}
.pruvodky-workspace .filter-actions{
  display:grid;
  grid-template-columns:1fr;
  gap:8px;
  margin-top:14px;
}
.pruvodky-workspace .filter-actions .hint{font-size:12px;text-align:center;}
.pruvodky-panel{
  min-width:0;
  overflow:hidden;
  background:#fff;
  border:1px solid var(--app-line);
  border-radius:7px;
  box-shadow:var(--app-shadow-soft);
}
.panel-heading{
  min-height:54px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:0 16px;
  border-bottom:1px solid #e7edf5;
  background:#fff;
}
.panel-heading h2{margin:0;color:#062653;font-size:16px;}
.panel-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;}
.pruvodky-browser{
  display:flex;
  flex-direction:column;
  gap:0;
  margin:0;
}
.object-group,
.material-group{
  border:0;
  border-radius:0;
  box-shadow:none;
  background:#fff;
  overflow:visible;
}
.object-group{border-bottom:1px solid #e7edf5;}
.object-group:last-child{border-bottom:0;}
.material-group{margin:0;border-top:1px solid #edf2f7;}
.object-group summary,
.material-group summary{
  list-style:none;
  cursor:pointer;
  min-height:46px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:0 16px;
  color:#0f2447;
  font-weight:900;
  background:#fbfdff;
}
.object-group summary::-webkit-details-marker,
.material-group summary::-webkit-details-marker{display:none;}
.object-group summary::marker,
.material-group summary::marker{content:"";}
.object-group summary::before,
.material-group summary::before{
  content:"›";
  width:20px;
  height:20px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-right:2px;
  color:#0b2f66;
  font-size:20px;
  transform:rotate(0deg);
  transition:transform .15s ease;
}
.object-group[open] > summary::before,
.material-group[open] > summary::before{transform:rotate(90deg);}
.object-group summary span,
.material-group summary span{display:inline-flex;align-items:center;gap:8px;margin-right:auto;}
.object-group summary b,
.material-group summary b{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:0 9px;
  border-radius:999px;
  background:#eef4fb;
  color:#41516a;
  font-size:12px;
  white-space:nowrap;
}
.material-group summary{background:#fff;}
.pruvodka-list{border-top:1px solid #edf2f7;}
.pruvodka-item{
  display:grid;
  grid-template-columns:34px minmax(260px,1fr) minmax(210px,auto) minmax(128px,auto);
  gap:14px;
  align-items:center;
  min-height:74px;
  padding:12px 16px;
  border-bottom:1px solid #edf2f7;
  background:#fff;
}
.pruvodka-item:last-child{border-bottom:0;}
.pruvodka-item:hover{background:#f8fbff;}
.item-check{display:flex;align-items:center;justify-content:center;margin:0;}
.item-check input{width:17px;height:17px;accent-color:#0b63ce;}
.item-main{display:flex;flex-direction:column;gap:4px;min-width:0;}
.item-main strong{color:#061b3d;font-size:14px;font-weight:950;}
.item-main span{color:#26374f;font-size:13px;line-height:1.35;}
.item-main small{color:#64748b;font-size:12px;line-height:1.35;}
.item-meta{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  color:#475569;
  font-size:12px;
  white-space:nowrap;
}
.item-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;}
.item-actions .btn-mini{min-width:70px;}
.legacy-pruvodky-table{display:none!important;}

@media (max-width:1100px){
  .pruvodky-workspace{grid-template-columns:1fr;}
  .pruvodky-workspace .pruvodky-filters{position:static;}
  .pruvodky-workspace .filter-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .pruvodka-item{grid-template-columns:34px minmax(0,1fr);align-items:start;}
  .item-meta,.item-actions{grid-column:2;justify-content:flex-start;}
}

@media (max-width:640px){
  .pruvodky-workspace .filter-grid{grid-template-columns:1fr;}
  .panel-heading{align-items:flex-start;flex-direction:column;padding:14px 16px;}
  .panel-actions{width:100%;}
  .panel-actions .btn-grey,.panel-actions .btn-danger{width:100%;}
  .pruvodka-item{grid-template-columns:28px minmax(0,1fr);padding:12px;}
  .item-actions{gap:6px;flex-wrap:wrap;}
}

/* =====================================================
   UI polish v9 - predvolby SO/stavby a nastaveni
   ===================================================== */
.preset-accordion{
  display:grid;
  gap:10px;
  margin-top:16px;
}
.preset-folder{
  border:1px solid #e1e9f3;
  border-radius:7px;
  background:#fff;
  overflow:hidden;
}
.preset-folder summary{
  min-height:46px;
  padding:0 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  cursor:pointer;
  list-style:none;
  color:#062653;
  font-size:15px;
  font-weight:900;
  background:#fbfdff;
}
.preset-folder summary::-webkit-details-marker{display:none;}
.preset-folder summary::marker{content:"";}
.preset-folder summary::after{
  content:"+";
  width:24px;
  height:24px;
  border-radius:6px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#062653;
  background:#eef4fb;
  font-weight:950;
}
.preset-folder[open] summary{border-bottom:1px solid #e7edf5;}
.preset-folder[open] summary::after{content:"-";}
.preset-folder > form,
.preset-folder > .tabulka-wrap{
  margin:14px;
}
.preset-folder > form + .tabulka-wrap{
  margin-top:0;
}
.form-grid select[id$="_preset"]{
  font-weight:750;
  background:#fbfdff;
}

/* =====================================================
   Kypař mobile workspace - scoped, no admin impact
   ===================================================== */
@media screen{
  body.kypar-body{
    --ky-bg:#f2f5f6;
    --ky-surface:#ffffff;
    --ky-surface-muted:#f7f9fa;
    --ky-ink:#031725;
    --ky-text:#102f43;
    --ky-muted:#435b6b;
    --ky-line:#d5dee4;
    --ky-line-strong:#afbdc7;
    --ky-navy:#071c2a;
    --ky-navy-soft:#103246;
    --ky-green:#087a3c;
    --ky-green-hover:#066331;
    --ky-green-soft:#edf8f1;
    --ky-green-line:#a8d7b9;
    --ky-danger:#b42318;
    --ky-danger-soft:#fff2f0;
    --ky-shadow:0 8px 24px rgba(9,29,44,.09);
    --ky-shadow-strong:0 14px 34px rgba(9,29,44,.14);
    min-height:100vh;
    min-height:100svh;
    margin:0;
    overflow-x:hidden;
    color:var(--ky-text);
    color-scheme:light;
    background:var(--ky-bg) !important;
    font-family:"Inter","Segoe UI",Roboto,system-ui,-apple-system,BlinkMacSystemFont,Arial,sans-serif;
    font-size:16px;
    line-height:1.45;
    letter-spacing:0;
    -webkit-font-smoothing:antialiased;
  }

  body.kypar-body *,
  body.kypar-body *::before,
  body.kypar-body *::after{
    letter-spacing:0;
  }

  body.kypar-body svg{
    display:block;
    flex:0 0 auto;
  }

  body.kypar-body [hidden]{
    display:none !important;
  }

  body.kypar-body .kypar-topbar{
    position:sticky;
    top:0;
    z-index:50;
    min-height:72px;
    padding:10px max(16px,env(safe-area-inset-right)) 10px max(16px,env(safe-area-inset-left));
    border:0;
    border-bottom:1px solid rgba(255,255,255,.12);
    color:#fff;
    background:var(--ky-navy);
    box-shadow:0 6px 18px rgba(2,16,25,.18);
  }

  body.kypar-body .kypar-brand{
    min-width:0;
    display:flex;
    align-items:center;
    gap:12px;
  }

  body.kypar-body .kypar-brand-mark{
    width:44px;
    height:44px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border:1px solid rgba(255,255,255,.18);
    border-radius:8px;
    color:#fff;
    background:var(--ky-green);
  }

  body.kypar-body .kypar-brand-mark svg{
    width:24px;
    height:24px;
  }

  body.kypar-body .kypar-brand-copy{
    min-width:0;
    display:flex;
    flex-direction:column;
    line-height:1.2;
  }

  body.kypar-body .kypar-brand-copy strong{
    overflow:hidden;
    color:#fff;
    font-size:16px;
    font-weight:850;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  body.kypar-body .kypar-brand-copy small{
    margin-top:3px;
    color:#d8e5ec;
    font-size:13px;
    font-weight:750;
  }

  body.kypar-body .kypar-header-action{
    min-width:52px;
    min-height:48px;
    padding:0 10px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    border:1px solid rgba(255,255,255,.22);
    border-radius:8px;
    color:#f6fbff;
    background:transparent;
    text-decoration:none;
    font-size:14px;
    font-weight:750;
    transition:background .16s ease,border-color .16s ease,transform .16s ease;
  }

  body.kypar-body .kypar-header-action:hover{
    color:#fff;
    border-color:rgba(255,255,255,.38);
    background:rgba(255,255,255,.08);
  }

  body.kypar-body .kypar-header-action:active{
    transform:translateY(1px);
  }

  body.kypar-body .kypar-header-action svg{
    width:22px;
    height:22px;
  }

  body.kypar-home-page .kypar-main{
    min-height:calc(100vh - 72px);
    min-height:calc(100svh - 72px);
    padding:0;
    display:block;
    background:var(--ky-bg);
  }

  body.kypar-body .kypar-home{
    width:min(100%,560px);
    min-height:calc(100vh - 72px);
    min-height:calc(100svh - 72px);
    margin:0 auto;
    padding:18px 16px max(18px,env(safe-area-inset-bottom));
    display:flex;
    flex-direction:column;
    gap:18px;
  }

  body.kypar-body .kypar-user-panel{
    min-height:84px;
    padding:14px 16px;
    display:flex;
    align-items:center;
    gap:13px;
    border:1px solid var(--ky-line);
    border-radius:8px;
    color:var(--ky-ink);
    background:var(--ky-surface);
    box-shadow:0 3px 12px rgba(9,29,44,.05);
  }

  body.kypar-body .kypar-user-icon{
    width:48px;
    height:48px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    color:#fff;
    background:var(--ky-green);
  }

  body.kypar-body .kypar-user-icon svg{
    width:25px;
    height:25px;
  }

  body.kypar-body .kypar-user-panel > span:last-child{
    min-width:0;
    display:flex;
    flex-direction:column;
  }

  body.kypar-body .kypar-user-panel small{
    color:var(--ky-muted);
    font-size:13px;
    font-weight:750;
  }

  body.kypar-body .kypar-user-panel strong{
    overflow-wrap:anywhere;
    color:var(--ky-ink);
    font-size:20px;
    font-weight:850;
    line-height:1.25;
  }

  body.kypar-body .kypar-home-focus{
    flex:1 1 auto;
    min-height:230px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:18px;
    text-align:center;
  }

  body.kypar-body .kypar-home-symbol{
    width:112px;
    height:112px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border:2px solid var(--ky-green-line);
    border-radius:8px;
    color:var(--ky-green);
    background:var(--ky-green-soft);
  }

  body.kypar-body .kypar-home-symbol svg{
    width:62px;
    height:62px;
  }

  body.kypar-body .kypar-home h1{
    max-width:100%;
    margin:0;
    color:var(--ky-ink);
    font-size:32px;
    font-weight:900;
    line-height:1.15;
    overflow-wrap:anywhere;
  }

  body.kypar-body .big-action{
    width:100%;
    height:auto;
    min-height:68px;
    margin:0;
    padding:0 20px;
    display:grid;
    grid-template-columns:26px minmax(0,1fr) 22px;
    align-items:center;
    justify-items:center;
    gap:12px;
    border:1px solid #0b8746;
    border-radius:8px;
    color:#fff;
    background:var(--ky-green);
    box-shadow:0 10px 22px rgba(8,122,60,.22);
    text-decoration:none;
    font-size:18px;
    font-weight:850;
    line-height:1.2;
    transition:background .16s ease,box-shadow .16s ease,transform .16s ease;
  }

  body.kypar-body .big-action:hover{
    background:var(--ky-green-hover);
    box-shadow:0 13px 28px rgba(8,122,60,.28);
    transform:translateY(-1px);
  }

  body.kypar-body .big-action:active{
    transform:translateY(1px);
  }

  body.kypar-body .big-action svg{
    width:26px;
    height:26px;
  }

  body.kypar-body .big-action .big-action-arrow{
    width:21px;
    height:21px;
  }

  body.kypar-body .flow-topbar{
    display:grid;
    grid-template-columns:minmax(82px,1fr) auto minmax(82px,1fr);
    align-items:center;
  }

  body.kypar-body .kypar-cancel{
    width:max-content;
    justify-self:start;
  }

  body.kypar-body .flow-header-title{
    min-width:0;
    display:flex;
    flex-direction:column;
    align-items:center;
    line-height:1.18;
    text-align:center;
  }

  body.kypar-body .flow-header-title strong{
    color:#fff;
    font-size:15px;
    font-weight:850;
  }

  body.kypar-body .flow-header-title small{
    margin-top:3px;
    color:#d8e5ec;
    font-size:13px;
    font-weight:750;
  }

  body.kypar-body .kypar-topbar-spacer{
    width:82px;
    justify-self:end;
  }

  body.kypar-body .flow-progress-wrap{
    position:sticky;
    top:72px;
    z-index:30;
    padding:12px max(16px,env(safe-area-inset-right)) 12px max(16px,env(safe-area-inset-left));
    border-bottom:1px solid var(--ky-line);
    background:rgba(255,255,255,.96);
    box-shadow:0 3px 10px rgba(9,29,44,.05);
  }

  @supports (backdrop-filter:blur(10px)){
    body.kypar-body .flow-progress-wrap{
      background:rgba(255,255,255,.88);
      backdrop-filter:blur(12px);
    }
  }

  body.kypar-body .flow-progress{
    width:min(100%,560px);
    margin:0 auto;
    padding:0;
    display:flex;
    align-items:center;
    justify-content:space-between;
    list-style:none;
  }

  body.kypar-body .flow-progress-step{
    position:relative;
    flex:1 1 0;
    display:flex;
    align-items:center;
    justify-content:center;
  }

  body.kypar-body .flow-progress-step:not(:first-child)::before{
    content:"";
    position:absolute;
    top:50%;
    right:50%;
    width:100%;
    height:2px;
    background:var(--ky-line);
    transform:translateY(-50%);
  }

  body.kypar-body .flow-progress-step span{
    position:relative;
    z-index:1;
    width:28px;
    height:28px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border:2px solid var(--ky-line);
    border-radius:50%;
    color:var(--ky-muted);
    background:var(--ky-surface);
    font-size:13px;
    font-weight:850;
    line-height:1;
  }

  body.kypar-body .flow-progress-step.is-complete::before,
  body.kypar-body .flow-progress-step.is-current::before{
    background:var(--ky-green);
  }

  body.kypar-body .flow-progress-step.is-complete span{
    border-color:var(--ky-green);
    color:#fff;
    background:var(--ky-green);
  }

  body.kypar-body .flow-progress-step.is-current span{
    border-color:var(--ky-green);
    color:var(--ky-green);
    background:var(--ky-surface);
    box-shadow:0 0 0 3px var(--ky-green-soft);
  }

  body.kypar-flow-page{
    background:var(--ky-surface) !important;
  }

  body.kypar-body .flow-main{
    width:min(100%,620px);
    max-width:620px;
    margin:0 auto;
    padding:24px 16px max(32px,env(safe-area-inset-bottom));
  }

  body.kypar-body .step{
    display:none;
  }

  body.kypar-body .step.active{
    min-height:calc(100vh - 173px);
    min-height:calc(100svh - 173px);
    padding:0 !important;
    display:flex;
    flex-direction:column;
    border:0 !important;
    border-radius:0;
    color:var(--ky-text);
    background:transparent !important;
    box-shadow:none !important;
    animation:kypar-step-in .2s ease-out;
  }

  @keyframes kypar-step-in{
    from{opacity:0;transform:translateY(6px);}
    to{opacity:1;transform:translateY(0);}
  }

  body.kypar-body .step-heading{
    margin-bottom:22px;
  }

  body.kypar-body .step-kicker{
    display:block;
    margin-bottom:6px;
    color:var(--ky-green);
    font-size:13px;
    font-weight:850;
    text-transform:uppercase;
  }

  body.kypar-body .step h2{
    max-width:100%;
    margin:0;
    color:var(--ky-ink) !important;
    font-size:28px;
    font-weight:900;
    line-height:1.16;
    overflow-wrap:anywhere;
  }

  body.kypar-body .step h2.step-subtitle{
    margin:0 0 6px;
    font-size:20px;
    font-weight:850;
  }

  body.kypar-body .hint{
    margin:9px 0 0;
    color:var(--ky-muted) !important;
    font-size:15px;
    font-weight:600;
    line-height:1.5;
  }

  body.kypar-body .step-question{
    margin-top:24px;
    padding-top:22px;
    border-top:1px solid var(--ky-line);
  }

  body.kypar-body .manual-label{
    margin:0 0 8px;
    display:block;
    color:var(--ky-ink) !important;
    font-size:14px;
    font-weight:850;
  }

  body.kypar-body .qr-input,
  body.kypar-body .big-input{
    width:100%;
    min-height:60px;
    margin:0;
    padding:12px 16px;
    border:2px solid var(--ky-line-strong) !important;
    border-radius:8px;
    outline:0;
    color:var(--ky-ink) !important;
    background:var(--ky-surface) !important;
    box-shadow:none;
    caret-color:var(--ky-green);
    font-size:24px;
    font-weight:800;
    line-height:1.2;
    text-align:center;
    transition:border-color .16s ease,box-shadow .16s ease,background .16s ease;
  }

  body.kypar-body .qr-input{
    border-style:solid;
    text-transform:uppercase;
  }

  body.kypar-body .qr-input:focus,
  body.kypar-body .big-input:focus{
    border-color:var(--ky-green) !important;
    box-shadow:0 0 0 4px rgba(8,122,60,.15);
  }

  body.kypar-body input::placeholder{
    color:#758693 !important;
    opacity:1;
    font-weight:550;
  }

  body.kypar-body .measure-input{
    position:relative;
    display:grid;
    grid-template-columns:minmax(0,1fr) 64px;
    border:2px solid var(--ky-line-strong);
    border-radius:8px;
    overflow:hidden;
    background:var(--ky-surface);
    transition:border-color .16s ease,box-shadow .16s ease;
  }

  body.kypar-body .measure-input:focus-within{
    border-color:var(--ky-green);
    box-shadow:0 0 0 4px rgba(8,122,60,.15);
  }

  body.kypar-body .measure-input .big-input{
    min-height:82px;
    border:0 !important;
    border-radius:0;
    box-shadow:none;
    font-size:38px;
    text-align:right;
  }

  body.kypar-body .measure-input .big-input:focus{
    border:0 !important;
    box-shadow:none;
  }

  body.kypar-body .measure-input > span{
    display:flex;
    align-items:center;
    justify-content:center;
    border-left:1px solid var(--ky-line);
    color:var(--ky-muted);
    background:var(--ky-surface-muted);
    font-size:24px;
    font-weight:850;
  }

  body.kypar-body .scan-actions{
    margin:0;
    display:grid;
    grid-template-columns:1fr;
    gap:10px;
  }

  body.kypar-body .btn-primary.scan-button{
    min-height:132px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:12px;
    border:2px solid var(--ky-green-line) !important;
    color:var(--ky-green) !important;
    background:var(--ky-green-soft) !important;
    box-shadow:none;
    font-size:18px;
  }

  body.kypar-body .btn-primary.scan-button:hover{
    border-color:var(--ky-green) !important;
    color:var(--ky-green-hover) !important;
    background:#e3f4e9 !important;
    box-shadow:none;
  }

  body.kypar-body .btn-primary.scan-button svg{
    width:46px;
    height:46px;
  }

  body.kypar-body .flow-divider{
    margin:22px 0 18px;
    display:flex;
    align-items:center;
    gap:12px;
    color:var(--ky-muted);
    font-size:13px;
    font-weight:750;
    text-align:center;
  }

  body.kypar-body .flow-divider::before,
  body.kypar-body .flow-divider::after{
    content:"";
    flex:1 1 auto;
    height:1px;
    background:var(--ky-line);
  }

  body.kypar-body .flow-divider span{
    flex:0 1 auto;
  }

  body.kypar-body .camera-panel{
    margin:14px 0 0;
    padding:8px;
    border:1px solid #25495d;
    border-radius:8px;
    background:#04131d;
    box-shadow:var(--ky-shadow);
  }

  body.kypar-body .qr-reader,
  body.kypar-body .qr-video,
  body.kypar-body .qr-reader video{
    border-radius:6px;
  }

  body.kypar-body .alert{
    margin:12px 0 0;
    padding:13px 14px;
    border:1px solid #efaaa4;
    border-radius:8px;
    color:var(--ky-danger);
    background:var(--ky-danger-soft);
    font-size:14px;
    font-weight:750;
  }

  body.kypar-body .data-box{
    overflow:hidden;
    padding:0;
    border:1px solid var(--ky-line) !important;
    border-radius:8px;
    color:var(--ky-text);
    background:var(--ky-surface) !important;
    box-shadow:0 3px 12px rgba(9,29,44,.05);
  }

  body.kypar-body .data-box .row{
    min-height:52px;
    padding:11px 14px;
    display:grid;
    grid-template-columns:minmax(110px,.82fr) minmax(0,1.18fr);
    align-items:center;
    gap:14px;
    border-bottom:1px solid var(--ky-line);
    color:var(--ky-text);
    font-size:15px;
  }

  body.kypar-body .data-box .row:last-child{
    border-bottom:0;
  }

  body.kypar-body .data-box .row span{
    color:var(--ky-muted);
    font-size:14px;
    font-weight:750;
  }

  body.kypar-body .data-box .row b{
    min-width:0;
    color:var(--ky-ink);
    font-size:15px;
    font-weight:800;
    text-align:right;
    overflow-wrap:anywhere;
  }

  body.kypar-body .netto-box{
    margin:0 0 14px;
    padding:22px 16px;
    border:1px solid var(--ky-green-line);
    border-radius:8px;
    color:var(--ky-green-hover);
    background:var(--ky-green-soft);
    box-shadow:none;
    text-align:center;
  }

  body.kypar-body .netto-box span{
    color:var(--ky-green-hover);
    font-size:14px;
    font-weight:800;
  }

  body.kypar-body .netto-box strong{
    display:block;
    margin-top:4px;
    color:var(--ky-green-hover);
    font-size:48px;
    font-weight:900;
    line-height:1.12;
    overflow-wrap:anywhere;
  }

  body.kypar-body .btn-primary,
  body.kypar-body .btn-green,
  body.kypar-body .btn-confirm,
  body.kypar-body .btn-grey{
    min-height:52px;
    margin:0;
    padding:0 16px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:9px;
    border-radius:8px;
    box-shadow:none;
    font-size:15px;
    font-weight:850;
    line-height:1.2;
    text-align:center;
    text-decoration:none;
  }

  body.kypar-body .btn-primary,
  body.kypar-body .btn-green,
  body.kypar-body .btn-confirm{
    border:1px solid #0b8746 !important;
    color:#fff !important;
    background:var(--ky-green) !important;
  }

  body.kypar-body .btn-primary:hover,
  body.kypar-body .btn-green:hover,
  body.kypar-body .btn-confirm:hover{
    border-color:var(--ky-green-hover) !important;
    background:var(--ky-green-hover) !important;
    box-shadow:0 8px 18px rgba(8,122,60,.18);
  }

  body.kypar-body .btn-grey{
    border:1px solid var(--ky-line-strong);
    color:var(--ky-ink);
    background:var(--ky-surface);
  }

  body.kypar-body .btn-grey:hover{
    border-color:#8799a6;
    color:var(--ky-ink);
    background:var(--ky-surface-muted);
  }

  body.kypar-body .btn-skip{
    color:var(--ky-text);
    background:var(--ky-surface-muted);
  }

  body.kypar-body .btn-primary svg,
  body.kypar-body .btn-green svg,
  body.kypar-body .btn-confirm svg,
  body.kypar-body .btn-grey svg{
    width:21px;
    height:21px;
  }

  body.kypar-body .btn-big{
    width:100%;
    min-height:56px;
    font-size:16px;
  }

  body.kypar-body .btn-row{
    margin-top:auto;
    padding-top:24px;
    display:grid;
    grid-template-columns:minmax(104px,.42fr) minmax(0,1fr);
    gap:10px;
  }

  body.kypar-body .btn-row-primary{
    grid-template-columns:1fr;
  }

  body.kypar-body .choice-actions,
  body.kypar-body .three-actions{
    grid-template-columns:minmax(104px,.48fr) minmax(0,1fr) minmax(0,1fr);
  }

  body.kypar-body .confirm-actions{
    grid-template-columns:minmax(104px,.42fr) minmax(0,1fr);
  }

  body.kypar-body button:disabled{
    opacity:.64;
    cursor:not-allowed;
  }

  body.kypar-body .done-box{
    flex:1 1 auto;
    padding:30px 0 0;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    text-align:center;
  }

  body.kypar-body .done-box .check{
    width:86px;
    height:86px;
    margin:0 auto 20px;
    display:flex;
    align-items:center;
    justify-content:center;
    border:1px solid var(--ky-green-line);
    border-radius:50%;
    color:#fff;
    background:var(--ky-green);
  }

  body.kypar-body .done-box .check svg{
    width:44px;
    height:44px;
  }

  body.kypar-body .done-box h2{
    margin-bottom:28px;
    text-align:center;
  }

  body.kypar-body .done-box .btn-big,
  body.kypar-body .done-home-link{
    width:min(100%,360px);
  }

  body.kypar-body .done-home-link{
    margin-top:10px;
  }

  @media (max-width:520px){
    body.kypar-body .kypar-header-action span{
      display:none;
    }

    body.kypar-body .kypar-header-action{
      width:48px;
      min-width:48px;
      padding:0;
    }

    body.kypar-body .kypar-cancel span{
      display:inline;
    }

    body.kypar-body .kypar-cancel{
      width:auto;
      min-width:72px;
      padding:0 9px;
    }

    body.kypar-body .flow-topbar{
      grid-template-columns:82px minmax(0,1fr) 82px;
    }

    body.kypar-body .step h2{
      font-size:26px;
    }

    body.kypar-body .choice-actions,
    body.kypar-body .three-actions{
      grid-template-columns:1fr;
    }

    body.kypar-body .data-box .row{
      grid-template-columns:minmax(96px,.82fr) minmax(0,1.18fr);
      padding:10px 12px;
      gap:10px;
    }
  }

  @media (max-width:370px){
    body.kypar-body .kypar-topbar{
      padding-left:12px;
      padding-right:12px;
    }

    body.kypar-body .kypar-brand-copy strong{
      font-size:14px;
    }

    body.kypar-body .flow-header-title strong{
      font-size:14px;
    }

    body.kypar-body .flow-header-title small{
      font-size:11px;
    }

    body.kypar-body .flow-progress-wrap{
      padding-left:8px;
      padding-right:8px;
    }

    body.kypar-body .flow-progress-step span{
      width:26px;
      height:26px;
    }

    body.kypar-body .flow-main{
      padding-left:12px;
      padding-right:12px;
    }

    body.kypar-body .step h2{
      font-size:24px;
    }

    body.kypar-body .btn-row,
    body.kypar-body .confirm-actions{
      grid-template-columns:1fr;
    }

    body.kypar-body .netto-box strong{
      font-size:42px;
    }
  }

  @media (min-width:700px){
    body.kypar-flow-page{
      background:var(--ky-bg) !important;
    }

    body.kypar-body .flow-main{
      padding-top:30px;
      padding-bottom:48px;
    }

    body.kypar-body .step.active{
      min-height:600px;
      padding:28px !important;
      border:1px solid var(--ky-line) !important;
      border-radius:8px;
      background:var(--ky-surface) !important;
      box-shadow:var(--ky-shadow);
    }

    body.kypar-body .kypar-home{
      padding-top:28px;
      padding-bottom:28px;
    }
  }

  @media (prefers-reduced-motion:reduce){
    body.kypar-body .step.active{
      animation:none;
    }
  }
}

@media screen and (prefers-color-scheme:dark){
  body.kypar-body{
    --ky-bg:#07111a;
    --ky-surface:#0e1c27;
    --ky-surface-muted:#142633;
    --ky-ink:#f3f8fb;
    --ky-text:#dbe7ed;
    --ky-muted:#a8bac5;
    --ky-line:#29404e;
    --ky-line-strong:#4c6472;
    --ky-navy:#041019;
    --ky-navy-soft:#102c3b;
    --ky-green:#087a3c;
    --ky-green-hover:#066331;
    --ky-green-soft:#102d20;
    --ky-green-line:#2c6a45;
    --ky-danger:#ffaaa3;
    --ky-danger-soft:#381d1d;
    --ky-shadow:0 8px 24px rgba(0,0,0,.24);
    --ky-shadow-strong:0 14px 34px rgba(0,0,0,.34);
    color-scheme:dark;
    background:var(--ky-bg) !important;
  }

  body.kypar-flow-page,
  body.kypar-home-page .kypar-main{
    background:var(--ky-bg) !important;
  }

  body.kypar-body .flow-progress-wrap{
    border-color:var(--ky-line);
    background:rgba(14,28,39,.96);
  }

  @supports (backdrop-filter:blur(10px)){
    body.kypar-body .flow-progress-wrap{
      background:rgba(14,28,39,.88);
    }
  }

  body.kypar-body .kypar-user-panel,
  body.kypar-body .data-box,
  body.kypar-body .flow-progress-step span{
    color:var(--ky-text) !important;
    background:var(--ky-surface) !important;
    border-color:var(--ky-line) !important;
  }

  body.kypar-body .kypar-user-panel strong,
  body.kypar-body .kypar-home h1,
  body.kypar-body .step h2,
  body.kypar-body .manual-label,
  body.kypar-body .data-box .row b{
    color:var(--ky-ink) !important;
  }

  body.kypar-body .flow-progress-step.is-complete span{
    color:#fff !important;
    background:var(--ky-green) !important;
    border-color:var(--ky-green) !important;
  }

  body.kypar-body .flow-progress-step.is-current span{
    color:#64d78e !important;
    background:var(--ky-surface) !important;
    border-color:var(--ky-green) !important;
  }

  body.kypar-body .qr-input,
  body.kypar-body .big-input,
  body.kypar-body .measure-input{
    color:var(--ky-ink) !important;
    background:var(--ky-surface) !important;
    border-color:var(--ky-line-strong) !important;
  }

  body.kypar-body .measure-input > span{
    color:var(--ky-muted);
    background:var(--ky-surface-muted);
    border-color:var(--ky-line);
  }

  body.kypar-body input::placeholder{
    color:#91a5b1 !important;
  }

  body.kypar-body .btn-primary.scan-button{
    color:#65da91 !important;
    background:var(--ky-green-soft) !important;
    border-color:var(--ky-green-line) !important;
  }

  body.kypar-body .btn-primary.scan-button:hover{
    color:#8ce7ad !important;
    background:#143b28 !important;
    border-color:#3c8758 !important;
  }

  body.kypar-body .btn-grey,
  body.kypar-body .btn-skip{
    color:var(--ky-ink) !important;
    background:var(--ky-surface-muted) !important;
    border-color:var(--ky-line-strong) !important;
  }

  body.kypar-body .btn-grey:hover,
  body.kypar-body .btn-skip:hover{
    background:#1b313f !important;
    border-color:#708795 !important;
  }

  body.kypar-body .netto-box{
    color:#8ce7ad;
    background:var(--ky-green-soft);
    border-color:var(--ky-green-line);
  }

  body.kypar-body .netto-box span,
  body.kypar-body .netto-box strong{
    color:#8ce7ad;
  }

  body.kypar-body .alert{
    color:var(--ky-danger);
    background:var(--ky-danger-soft);
    border-color:#7c3b38;
  }

  @media (min-width:700px){
    body.kypar-flow-page{
      background:var(--ky-bg) !important;
    }

    body.kypar-body .step.active{
      color:var(--ky-text) !important;
      background:var(--ky-surface) !important;
      border-color:var(--ky-line) !important;
    }
  }
}

/* =====================================================
   UI refresh 20260716 - cleaner settings and users flow
   ===================================================== */
.page-heading{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  margin:0 0 18px;
}
.page-heading h1{
  margin:0 0 6px;
}
.page-heading p{
  margin:0;
  max-width:760px;
  color:#50627a;
  font-size:14px;
  line-height:1.5;
}
.page-heading .btn-link{
  flex:0 0 auto;
}
.settings-content{
  grid-column:1 / -1;
  width:100%;
}
.settings-folder{
  border-color:#dce7f3;
}
.settings-folder summary{
  letter-spacing:0;
}
.settings-folder > .hint,
.settings-folder > p.hint{
  max-width:780px;
  line-height:1.55;
}
.access-add-form{
  align-items:end;
  max-width:560px;
}
.inline-delete-form{
  display:inline;
  margin:0;
}
.user-workbench{
  grid-template-columns:minmax(260px,340px) minmax(0,1fr);
  align-items:start;
}
.user-create-panel{
  padding:18px;
  border:1px solid #dfe8f3;
  border-radius:8px;
  background:linear-gradient(180deg,#fbfdff 0%,#f6f9fd 100%);
}
.user-create-panel h2{
  color:#062653;
  font-size:16px;
}
.user-create-panel .hint{
  margin:2px 0 0;
  padding:10px 12px;
  border-radius:7px;
  background:#eef6ff;
  color:#31506f;
}
.user-create-panel input,
.user-create-panel select,
.settings-inline-add select{
  transition:border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.user-create-panel input:focus,
.user-create-panel select:focus,
.settings-inline-add select:focus{
  outline:3px solid rgba(11,99,206,.12);
  border-color:#0b63ce;
  background:#fff;
}
.user-table-panel{
  min-width:0;
}
.user-table-panel .tabulka{
  min-width:820px;
}
.table-foot{
  display:flex;
  justify-content:flex-end;
}
.settings-actions .inline-delete-form{
  display:inline-flex;
}
.tabulka td:last-child,
.tabulka th:last-child{
  text-align:right;
}
.tabulka td .inline-form{
  justify-content:flex-start;
}
.alert a{
  color:inherit;
  font-weight:900;
}

@media (max-width:900px){
  .page-heading{
    flex-direction:column;
  }
  .page-heading .btn-link{
    width:auto;
  }
  .user-workbench{
    grid-template-columns:1fr;
  }
}

@media (max-width:640px){
  .page-heading .btn-link{
    width:100%;
  }
  .access-add-form{
    max-width:none;
  }
  .tabulka td:last-child,
  .tabulka th:last-child{
    text-align:left;
  }
}

/* Nastaveni v10 - full width sprava ORP/SO */
.settings-main{
  max-width:none;
  width:100%;
}
.settings-main .settings-layout,
.settings-main .settings-content,
.settings-main .settings-folder{
  width:100%;
}
.settings-inline-wide{
  grid-template-columns:minmax(180px,260px) minmax(260px,1fr) minmax(120px,auto) auto;
}
.settings-inline-wide input[type="text"]{
  min-width:0;
}

@media (max-width:900px){
  .settings-inline-wide{
    grid-template-columns:1fr;
  }
}

/* =====================================================
   Enterprise UI v11 - premium field operations refresh
   ===================================================== */
@media screen {
  :root{
    --navy:#071a34;
    --navy-dark:#041225;
    --navy-soft:#0e3a72;
    --green:#16834b;
    --green-dark:#0f6338;
    --green-soft:#e8f7ef;
    --red:#c52a22;
    --grey:#d7e1ec;
    --grey-dark:#627084;
    --text:#0f1f36;
    --muted:#5c6d83;
    --surface:#ffffff;
    --line:#dbe5ef;
    --bg:#f3f7fb;
    --radius:8px;
    --field-h:46px;
    --shadow:0 12px 32px rgba(8,31,63,.08);
    --shadow-soft:0 4px 16px rgba(8,31,63,.07);
    --ring:rgba(22,131,75,.24);
    --amber:#c97912;
    --blue:#0b63ce;
    --table-head:#f8fbfd;
  }

  html{
    color-scheme:light;
    background:var(--bg);
  }

  body{
    color:var(--text);
    background:
      linear-gradient(180deg,#fbfdff 0%,#f3f7fb 54%,#edf3f8 100%);
    font-family:"Inter","Segoe UI",Roboto,system-ui,-apple-system,BlinkMacSystemFont,Arial,sans-serif;
    font-size:15px;
    -webkit-font-smoothing:antialiased;
    text-rendering:optimizeLegibility;
  }

  body.admin-body,
  body.kypar-body{
    min-height:100vh;
    background:
      linear-gradient(180deg,#fbfdff 0%,#f4f8fc 48%,#edf4f8 100%);
  }

  body.login-body,
  .screen .login-body{
    background:
      linear-gradient(135deg,#041225 0%,#071a34 46%,#0f6338 100%) !important;
  }

  body.login-body:not([style]){
    display:flex;
    align-items:center;
    justify-content:center;
  }

  #screen-stavby{
    background:
      linear-gradient(135deg,#041225 0%,#071a34 48%,#0f6338 100%) !important;
  }

  a{
    color:var(--blue);
    text-underline-offset:3px;
  }

  button,
  input,
  select,
  textarea{
    font:inherit;
  }

  button,
  a,
  input,
  select,
  textarea,
  summary{
    touch-action:manipulation;
  }

  button:focus-visible,
  a:focus-visible,
  input:focus-visible,
  select:focus-visible,
  textarea:focus-visible,
  summary:focus-visible{
    outline:3px solid var(--ring);
    outline-offset:2px;
  }

  .btn-primary,
  .btn-green,
  .btn-grey,
  .btn-confirm,
  .btn-danger,
  .btn-link,
  .btn-mini{
    min-height:44px;
    border-radius:var(--radius);
    box-shadow:none;
    border:1px solid transparent;
    padding:0 16px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    font-size:14px;
    font-weight:800;
    letter-spacing:0;
    line-height:1.1;
    transition:background .16s ease,border-color .16s ease,box-shadow .16s ease,transform .16s ease,color .16s ease;
  }

  .btn-primary{
    background:var(--navy);
    color:#fff;
  }

  .btn-primary:hover{
    background:#0a2852;
    box-shadow:0 8px 20px rgba(7,26,52,.18);
  }

  .btn-green,
  .btn-confirm{
    background:var(--green);
    color:#fff;
  }

  .btn-green:hover,
  .btn-confirm:hover{
    background:var(--green-dark);
    box-shadow:0 8px 20px rgba(22,131,75,.18);
  }

  .btn-grey{
    background:#fff;
    color:#0f315f;
    border-color:#bdcad9;
  }

  .btn-grey:hover{
    background:#f3f7fb;
    border-color:#9fb1c6;
  }

  .btn-danger{
    background:#fff6f5;
    color:var(--red);
    border-color:#f2c2bf;
  }

  .btn-danger:hover{
    background:#ffecea;
    border-color:#e79b96;
  }

  .btn-mini{
    min-height:38px;
    padding:0 12px;
    background:#eef5fc;
    color:#0b315f;
    border-color:#c9d8e8;
    font-size:13px;
  }

  .btn-mini:hover{
    background:#e3eef8;
  }

  .btn-big{
    width:auto;
    min-height:56px;
    padding:0 22px;
    font-size:16px;
    border-radius:var(--radius);
  }

  .btn-row{
    gap:12px;
    align-items:center;
    flex-wrap:wrap;
  }

  button:disabled{
    opacity:.56;
    cursor:not-allowed;
    box-shadow:none;
  }

  .admin-nav{
    position:sticky;
    top:0;
    z-index:40;
    min-height:66px;
    padding:0 28px;
    gap:26px;
    border-bottom:1px solid rgba(255,255,255,.10);
    background:#071a34;
    box-shadow:0 10px 30px rgba(4,18,37,.18);
  }

  .admin-nav .brand{
    gap:12px;
    font-size:18px;
    font-weight:900;
    color:#fff;
  }

  .brand-mark{
    width:32px;
    height:32px;
    border-radius:var(--radius);
    position:relative;
    overflow:hidden;
    border:1px solid rgba(147,197,253,.48);
    background:linear-gradient(145deg,#1974dc 0%,#0a4f9e 58%,#07366f 100%);
    color:#fff;
    font-size:17px;
    font-weight:950;
    letter-spacing:-.03em;
    text-shadow:0 1px 1px rgba(1,15,38,.34);
    box-shadow:0 5px 13px rgba(1,15,38,.32),inset 0 1px 0 rgba(255,255,255,.22);
  }

  .brand-mark::after{
    content:"";
    position:absolute;
    right:5px;
    bottom:3px;
    left:5px;
    height:2px;
    border-radius:999px;
    background:#22c55e;
    box-shadow:0 0 7px rgba(34,197,94,.65);
  }

  .admin-nav nav{
    align-self:stretch;
    display:flex;
    gap:2px;
    min-width:0;
  }

  .admin-nav nav a{
    position:relative;
    min-height:66px;
    padding:0 15px;
    display:inline-flex;
    align-items:center;
    gap:8px;
    border-radius:0;
    color:#d9e6f5;
    font-size:14px;
    font-weight:800;
    white-space:nowrap;
  }

  .admin-nav nav a:hover{
    color:#fff;
    background:rgba(255,255,255,.07);
  }

  .admin-nav nav a.active{
    color:#fff;
  }

  .admin-nav nav a.active::after{
    left:14px;
    right:14px;
    bottom:0;
    height:3px;
    background:var(--green);
  }

  .nav-ico{
    --nav-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='7' height='9' x='3' y='3' rx='1'/%3E%3Crect width='7' height='5' x='14' y='3' rx='1'/%3E%3Crect width='7' height='9' x='14' y='12' rx='1'/%3E%3Crect width='7' height='5' x='3' y='16' rx='1'/%3E%3C/svg%3E");
    width:18px;
    height:18px;
    flex:0 0 18px;
    display:inline-block;
    color:currentColor;
    background:currentColor;
    font-size:0;
    line-height:0;
    -webkit-mask:var(--nav-icon) center / contain no-repeat;
    mask:var(--nav-icon) center / contain no-repeat;
  }

  .admin-nav nav a[href$="admin_pruvodky.php"] .nav-ico{
    --nav-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z'/%3E%3Cpath d='M14 2v4a2 2 0 0 0 2 2h4'/%3E%3Cpath d='M10 9H8'/%3E%3Cpath d='M16 13H8'/%3E%3Cpath d='M16 17H8'/%3E%3C/svg%3E");
  }

  .admin-nav nav a[href$="admin_statistiky.php"] .nav-ico{
    --nav-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3v18h18'/%3E%3Cpath d='M7 16V9'/%3E%3Cpath d='M12 16V5'/%3E%3Cpath d='M17 16v-3'/%3E%3C/svg%3E");
  }

  .admin-nav nav a[href$="admin_export.php"] .nav-ico{
    --nav-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3Cpath d='M12 15V3'/%3E%3C/svg%3E");
  }

  .admin-nav nav a[href$="admin_nastaveni.php"] .nav-ico{
    --nav-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.52a2 2 0 0 1-1 1.72l-.15.1a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.38a2 2 0 0 0-.73-2.73l-.15-.1a2 2 0 0 1-1-1.72v-.52a2 2 0 0 1 1-1.72l.15-.1a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
  }

  .admin-nav .nav-right{
    margin-left:auto;
    gap:10px;
    color:#eaf2fb;
  }

  .nav-stavba{
    min-height:36px;
    padding:0 12px;
    border:1px solid rgba(255,255,255,.12);
    border-radius:var(--radius);
    background:rgba(255,255,255,.07);
    color:#fff;
  }

  .status-dot{
    width:10px;
    height:10px;
    box-shadow:0 0 0 4px rgba(22,131,75,.18);
  }

  .nav-role{
    min-height:28px;
    padding:0 9px;
    display:inline-flex;
    align-items:center;
    border:1px solid rgba(255,255,255,.16);
    border-radius:999px;
    color:#fff;
    font-size:12px;
  }

  .nav-sep{
    width:1px;
    height:24px;
    background:rgba(255,255,255,.18);
  }

  .nav-change-stavba{
    color:#cce0f6 !important;
  }

  .admin-main{
    max-width:1440px;
    padding:28px clamp(16px,2.2vw,34px) 56px;
  }

  .admin-main h1{
    color:#071a34;
    font-size:clamp(24px,2vw,30px);
    line-height:1.15;
    margin:0 0 18px;
    font-weight:900;
  }

  .page-heading{
    align-items:center;
    margin-bottom:20px;
  }

  .page-heading p{
    color:#53667d;
    font-size:14px;
  }

  .card,
  .filtry,
  .tabulka-wrap,
  .settings-folder,
  .object-group,
  .preset-folder,
  .pruvodky-panel,
  .stat-hero-card,
  .so-card,
  .export-filter-card,
  .export-so-block,
  .export-summary-card{
    border:1px solid var(--line) !important;
    border-radius:var(--radius) !important;
    background:#fff !important;
    box-shadow:var(--shadow-soft) !important;
  }

  .card{
    padding:22px;
    margin-bottom:20px;
  }

  .card h2,
  .settings-folder h2,
  .section-title{
    color:#0a2447;
    font-size:18px;
    font-weight:900;
    line-height:1.25;
  }

  .stats-grid{
    gap:16px;
    margin-bottom:20px;
  }

  .stats-grid.metric-strip{
    grid-template-columns:repeat(auto-fit,minmax(190px,1fr));
  }

  .stat-card{
    position:relative;
    min-height:100px;
    padding:18px 18px 16px !important;
    overflow:hidden;
    border-left:0;
    border-radius:var(--radius);
    background:#fff;
    box-shadow:var(--shadow-soft);
  }

  .stat-card::before{
    content:"";
    position:absolute;
    left:0;
    top:0;
    bottom:0;
    width:4px;
    height:auto;
    border-radius:0;
    background:var(--green);
    box-shadow:none;
  }

  .stat-card::after{
    display:none;
  }

  .stats-grid .stat-card:nth-child(2)::before{background:var(--blue);}
  .stats-grid .stat-card:nth-child(3)::before{background:var(--amber);}
  .stats-grid .stat-card:nth-child(4)::before{background:#8b5cf6;}
  .stats-grid .stat-card:nth-child(5)::before{background:#0f766e;}

  .stat-card span,
  .stat-hero-card span,
  .export-summary-card span{
    color:#4d6077;
    font-size:12px;
    font-weight:850;
    text-transform:uppercase;
    letter-spacing:.04em;
  }

  .stat-card strong,
  .stat-hero-card strong,
  .export-summary-card strong{
    color:#071a34;
    font-size:clamp(25px,2.2vw,34px);
    line-height:1.05;
    font-weight:900;
    margin-top:6px;
  }

  .stat-card small{
    color:#6a7b8f;
  }

  .form-grid,
  .filter-grid,
  .settings-add-grid,
  .settings-inline-add,
  .export-filter-form{
    gap:14px;
  }

  .form-grid label,
  .filtry label,
  .filter-grid label,
  .settings-add-grid label,
  .settings-inline-add label,
  .login-card label,
  .modal-card label,
  .export-filter-form label,
  .user-create-panel label{
    color:#182d49;
    font-size:13px;
    font-weight:850;
  }

  .form-grid input,
  .form-grid select,
  .filtry input,
  .filtry select,
  .filter-grid input,
  .filter-grid select,
  .inline-form input,
  .print-options select,
  .export-filter-form input,
  .export-filter-form select,
  .settings-add-grid input[type="text"],
  .settings-inline-add input[type="text"],
  .settings-inline-add select,
  .settings-table input[type="text"],
  .settings-table input[type="number"],
  .user-create-panel input,
  .user-create-panel select,
  .login-card input,
  .modal-card input,
  .modal-card select,
  .export-filter-form input[type=month],
  .export-filter-form select,
  .big-input,
  .qr-input,
  textarea{
    min-height:var(--field-h);
    border:1px solid #c8d5e4 !important;
    border-radius:var(--radius) !important;
    background:#fbfdff !important;
    color:#0f1f36;
    box-shadow:0 1px 0 rgba(8,31,63,.03);
    transition:border-color .16s ease,box-shadow .16s ease,background .16s ease;
  }

  .form-grid input:focus,
  .form-grid select:focus,
  .filtry input:focus,
  .filtry select:focus,
  .filter-grid input:focus,
  .filter-grid select:focus,
  .settings-add-grid input[type="text"]:focus,
  .settings-inline-add input[type="text"]:focus,
  .settings-inline-add select:focus,
  .settings-table input[type="text"]:focus,
  .settings-table input[type="number"]:focus,
  .user-create-panel input:focus,
  .user-create-panel select:focus,
  .login-card input:focus,
  .modal-card input:focus,
  .modal-card select:focus,
  .export-filter-form input:focus,
  .export-filter-form select:focus,
  .big-input:focus,
  .qr-input:focus{
    outline:3px solid var(--ring);
    border-color:var(--green) !important;
    background:#fff !important;
  }

  input[type="checkbox"]{
    accent-color:var(--green);
  }

  select option,
  select optgroup{
    background:var(--surface);
    color:var(--text);
  }

  .filtry{
    display:grid;
    grid-template-columns:repeat(4,minmax(155px,1fr)) repeat(3,auto);
    align-items:end;
    padding:16px;
    gap:12px;
  }

  .filtry button{
    min-height:var(--field-h);
    white-space:nowrap;
  }

  .souhrn{
    padding:10px 2px;
    color:#394b61;
    font-weight:650;
  }

  .tabulka-wrap{
    overflow:auto;
  }

  .tabulka{
    width:100%;
    border-collapse:separate;
    border-spacing:0;
    font-size:13px;
  }

  .tabulka th,
  .tabulka td{
    padding:12px 14px;
    border-bottom:1px solid #edf2f7;
    white-space:nowrap;
  }

  .tabulka th{
    position:sticky;
    top:0;
    z-index:2;
    background:var(--table-head) !important;
    color:#122947 !important;
    font-size:12px;
    font-weight:900;
    text-transform:none;
    letter-spacing:0;
    box-shadow:0 1px 0 var(--line);
  }

  .tabulka td{
    height:52px;
    color:#1b2f49;
    background:#fff;
  }

  .tabulka tbody tr:nth-child(even) td{
    background:#fbfdff;
  }

  .tabulka tr:hover td,
  .tabulka-zebra tbody tr:nth-child(even):hover td{
    background:#f4f8fc;
  }

  .empty-state-cell{
    padding:36px 20px !important;
    color:#687a90;
    font-style:normal;
  }

  .badge-ok,
  .badge-muted,
  .kod-badge,
  .filter-badge{
    min-height:26px;
    border-radius:999px;
    padding:3px 10px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border:1px solid transparent;
    font-size:12px;
    font-weight:900;
  }

  .badge-ok{
    background:#e8f7ef;
    color:#116a3d;
    border-color:#bfe8cf;
  }

  .badge-muted{
    background:#f0f4f8;
    color:#5c6d83;
    border-color:#d9e3ed;
  }

  .alert{
    border-radius:var(--radius);
    border:1px solid transparent;
    box-shadow:none;
  }

  .alert.ok{
    background:#e8f7ef;
    color:#0f6338;
    border-color:#bfe8cf;
  }

  .alert.error{
    background:#fff1f0;
    color:var(--red);
    border-color:#f2c2bf;
  }

  .settings-folder{
    overflow:hidden;
  }

  .settings-folder summary,
  .preset-folder summary{
    min-height:54px;
    padding:0 18px;
    background:#fff;
    color:#0a2447;
    font-size:15px;
    font-weight:900;
  }

  .settings-folder[open] summary,
  .preset-folder[open] summary{
    background:#fbfdff;
    border-bottom:1px solid #e7eef6;
  }

  .settings-folder summary::after,
  .preset-folder summary::after{
    border-radius:var(--radius);
    background:#eef5fc;
    color:#0a2447;
  }

  .settings-folder > :not(summary){
    margin-left:18px;
    margin-right:18px;
  }

  .user-create-panel{
    border-radius:var(--radius);
    background:#fbfdff;
  }

  .user-create-panel .hint{
    border:1px solid #d9e8f8;
    background:#eef6ff;
  }

  .pruvodky-workspace{
    grid-template-columns:minmax(280px,320px) minmax(0,1fr);
    gap:18px;
  }

  .pruvodky-workspace .pruvodky-filters{
    top:86px;
    padding:18px;
  }

  .pruvodky-filters h2,
  .panel-heading h2{
    color:#0a2447;
    font-size:16px;
    font-weight:900;
  }

  .panel-heading{
    min-height:58px;
    padding:0 18px;
    background:#fff;
    border-bottom:1px solid #e7eef6;
  }

  .object-group summary,
  .material-group summary{
    min-height:50px;
    color:#112944;
  }

  .object-group summary{
    background:#fbfdff;
  }

  .object-group summary b,
  .material-group summary b{
    border:1px solid #d9e3ed;
    background:#f0f5fa;
    color:#52657d;
  }

  .pruvodka-item{
    grid-template-columns:38px minmax(260px,1fr) minmax(200px,auto) minmax(136px,auto);
    min-height:78px;
    padding:14px 18px;
  }

  .pruvodka-item:hover{
    background:#f7fbff;
  }

  .item-main strong{
    color:#071a34;
    font-weight:950;
  }

  .item-main span{
    color:#263a54;
  }

  .item-main small,
  .item-meta{
    color:#66778b;
  }

  .print-options{
    border-top:0;
    align-items:center;
  }

  .print-options label{
    min-width:180px;
  }

  .login-card{
    width:min(92vw,410px);
    padding:34px;
    border:1px solid rgba(255,255,255,.16);
    border-top:0;
    border-radius:var(--radius);
    box-shadow:0 28px 70px rgba(1,10,22,.32);
  }

  .login-logo{
    width:82px;
    margin-bottom:18px;
  }

  .login-card h1{
    color:#071a34;
    font-size:28px;
    font-weight:950;
  }

  .login-card .sub{
    color:#5c6d83;
  }

  .login-card .btn-big{
    width:100%;
  }

  .topbar{
    position:sticky;
    top:0;
    z-index:30;
    min-height:62px;
    padding:0 20px;
    background:#071a34;
    border-bottom:1px solid rgba(255,255,255,.10);
    box-shadow:0 8px 24px rgba(4,18,37,.14);
  }

  .topbar a,
  .link-logout{
    color:#d5e5f7;
    font-weight:850;
  }

  .kypar-main{
    min-height:calc(100vh - 62px);
    padding:24px;
    background:
      linear-gradient(180deg,#f8fbfd 0%,#edf4f8 100%);
  }

  .big-action{
    width:min(92vw,460px);
    height:min(58vh,440px);
    border-radius:var(--radius);
    background:linear-gradient(180deg,#18a158 0%,#116f40 100%);
    box-shadow:0 22px 52px rgba(22,131,75,.25);
    font-size:clamp(26px,6vw,36px);
    letter-spacing:0;
  }

  .big-action:hover{
    transform:translateY(-2px);
    box-shadow:0 26px 60px rgba(22,131,75,.30);
  }

  .big-action .plus{
    font-size:clamp(72px,18vw,104px);
  }

  .flow-main{
    max-width:760px;
    padding:28px 18px 44px;
  }

  .step.active{
    display:block;
    padding:clamp(20px,3vw,30px);
    border:1px solid var(--line);
    border-radius:var(--radius);
    background:#fff;
    box-shadow:var(--shadow-soft);
  }

  .step h2{
    color:#071a34;
    font-size:clamp(23px,3vw,30px);
    font-weight:950;
    line-height:1.15;
  }

  .hint{
    color:#63758a;
  }

  .manual-label{
    color:#102945;
    font-weight:900;
  }

  .qr-input,
  .big-input{
    min-height:64px;
    font-size:clamp(22px,5vw,30px);
    font-weight:850;
    text-align:center;
  }

  .scan-actions{
    gap:12px;
  }

  .camera-panel,
  .data-box,
  .netto-box,
  .modal-card{
    border-radius:var(--radius);
    box-shadow:var(--shadow-soft);
  }

  .data-box{
    border:1px solid var(--line);
  }

  .data-box .row{
    min-height:44px;
    align-items:center;
  }

  .netto-box{
    background:linear-gradient(180deg,#16834b,#0f6338);
  }

  .netto-box strong{
    font-size:clamp(42px,10vw,58px);
  }

  .done-box .check{
    background:var(--green);
  }

  .modal{
    background:rgba(7,26,52,.58);
    backdrop-filter:blur(6px);
  }

  .modal-card{
    border:1px solid var(--line);
  }

  .stavby-grid{
    grid-template-columns:repeat(auto-fill,minmax(290px,1fr)) !important;
    gap:18px !important;
  }

  .stavba-card{
    border-top:0 !important;
    border:1px solid rgba(255,255,255,.08) !important;
    border-radius:var(--radius) !important;
    box-shadow:0 18px 46px rgba(1,10,22,.20) !important;
  }

  .stavba-card:hover{
    transform:translateY(-4px) !important;
    box-shadow:0 24px 60px rgba(1,10,22,.28) !important;
  }

  .stavba-open-btn{
    min-height:154px !important;
    padding:22px !important;
  }

  .stavba-title{
    color:#071a34 !important;
    font-size:19px !important;
    font-weight:950 !important;
  }

  .stavba-meta{
    color:#5d6d80 !important;
  }

  .preview-bar{
    background:#071a34 !important;
    box-shadow:0 8px 24px rgba(4,18,37,.18);
  }

  .preview-bar button{
    min-height:32px;
    border-radius:6px !important;
  }

  .preview-bar button.active{
    background:var(--green) !important;
  }

  .stat-hero{
    gap:16px !important;
    margin-bottom:20px !important;
  }

  .stat-hero-card{
    padding:18px !important;
    border-left:0 !important;
  }

  .so-grid{
    gap:18px !important;
  }

  .so-card{
    overflow:hidden;
  }

  .so-card-header,
  .export-so-header,
  .export-header{
    background:#071a34 !important;
    box-shadow:none !important;
  }

  .export-header{
    border-radius:var(--radius) !important;
    border:1px solid rgba(255,255,255,.08);
    padding:28px !important;
  }

  .so-card-header h2,
  .export-so-header h3{
    font-weight:950 !important;
  }

  .so-odpad-table th,
  .export-table th{
    color:#52657d !important;
    letter-spacing:.04em !important;
  }

  .pct-bar-wrap{
    background:#e5edf5 !important;
  }

  @media (max-width:1100px){
    .admin-nav{
      padding:0 18px;
      gap:14px;
    }

    .admin-nav .nav-right{
      width:100%;
      margin-left:0;
      padding-bottom:10px;
    }

    .filtry{
      grid-template-columns:repeat(2,minmax(0,1fr));
    }

    .filtry button{
      width:100%;
    }

    .pruvodky-workspace{
      grid-template-columns:1fr;
    }

    .pruvodky-workspace .pruvodky-filters{
      position:static;
    }

    .pruvodky-workspace .filter-grid{
      grid-template-columns:repeat(2,minmax(0,1fr));
    }

    .pruvodka-item{
      grid-template-columns:38px minmax(0,1fr);
      align-items:start;
    }

    .item-meta,
    .item-actions{
      grid-column:2;
      justify-content:flex-start;
    }
  }

  @media (max-width:760px){
    .admin-nav{
      position:sticky;
      min-height:auto;
      padding:10px 14px;
      gap:10px;
    }

    .admin-nav .brand{
      width:100%;
    }

    .admin-nav nav{
      width:100%;
      overflow-x:auto;
      padding-bottom:2px;
      scrollbar-width:thin;
    }

    .admin-nav nav a{
      min-height:46px;
      padding:0 12px;
      border-radius:var(--radius);
    }

    .admin-nav nav a.active::after{
      left:12px;
      right:12px;
      height:2px;
    }

    .nav-sep{
      display:none;
    }

    .nav-stavba{
      max-width:100%;
      flex-wrap:wrap;
    }

    .admin-main{
      padding:20px 12px 42px;
    }

    .card{
      padding:16px;
    }

    .stats-grid,
    .stats-grid.metric-strip,
    .form-grid,
    .settings-add-grid,
    .settings-two-col,
    .filter-grid,
    .pruvodky-workspace .filter-grid,
    .settings-inline-add,
    .settings-inline-wide,
    .filtry{
      grid-template-columns:1fr !important;
    }

    .btn-primary,
    .btn-green,
    .btn-grey,
    .btn-confirm,
    .btn-danger,
    .btn-link{
      width:100%;
    }

    .btn-mini{
      width:auto;
    }

    .btn-row{
      display:grid;
      grid-template-columns:1fr;
    }

    .btn-row .btn-big,
    .flow-main .btn-row button{
      width:100%;
    }

    .print-options{
      display:grid;
      grid-template-columns:1fr;
      align-items:start;
    }

    .panel-heading{
      min-height:0;
      padding:14px;
      align-items:flex-start;
      flex-direction:column;
    }

    .panel-actions,
    .print-option-actions{
      width:100%;
      display:grid;
      grid-template-columns:1fr;
    }

    .pruvodka-item{
      grid-template-columns:30px minmax(0,1fr);
      padding:14px 12px;
    }

    .item-actions{
      gap:8px;
      flex-wrap:wrap;
    }

    .user-workbench{
      grid-template-columns:1fr;
    }

    .table-foot{
      justify-content:flex-start;
    }

    .kypar-main{
      padding:16px;
    }

    .big-action{
      width:100%;
      height:min(56vh,390px);
    }

    .flow-main{
      padding:18px 12px 34px;
    }

    .step.active{
      padding:18px;
    }

    .so-card-body{
      flex-direction:column !important;
    }

    .export-filter-form{
      display:grid !important;
      grid-template-columns:1fr;
    }
  }

  @media (prefers-reduced-motion:reduce){
    *,
    *::before,
    *::after{
      animation-duration:.01ms !important;
      animation-iteration-count:1 !important;
      scroll-behavior:auto !important;
      transition-duration:.01ms !important;
    }
  }
}

@media screen and (prefers-color-scheme:dark){
  :root{
    color-scheme:dark;
    --navy:#dbeafe;
    --navy-dark:#eff6ff;
    --navy-soft:#93c5fd;
    --green:#22c55e;
    --green-dark:#16a34a;
    --green-soft:#123322;
    --red:#f87171;
    --grey:#334155;
    --grey-dark:#94a3b8;
    --text:#e5edf6;
    --muted:#a8b6c8;
    --surface:#111c2d;
    --line:#24334a;
    --bg:#08111f;
    --table-head:#142238;
    --ring:rgba(34,197,94,.26);
  }

  body,
  body.admin-body,
  body.kypar-body{
    color:var(--text);
    background:linear-gradient(180deg,#08111f 0%,#0c1626 100%);
  }

  body.login-body,
  .screen .login-body,
  #screen-stavby{
    background:linear-gradient(135deg,#030812 0%,#071426 52%,#0f3d27 100%) !important;
  }

  .card,
  .filtry,
  .tabulka-wrap,
  .settings-folder,
  .object-group,
  .preset-folder,
  .pruvodky-panel,
  .stat-card,
  .stat-hero-card,
  .so-card,
  .export-filter-card,
  .export-so-block,
  .export-summary-card,
  .login-card,
  .modal-card,
  .data-box,
  .step.active,
  .user-create-panel{
    background:#111c2d !important;
    border-color:#24334a !important;
    color:var(--text);
  }

  .admin-main h1,
  .card h2,
  .settings-folder h2,
  .page-heading h1,
  .stat-card strong,
  .stat-hero-card strong,
  .export-summary-card strong,
  .step h2,
  .login-card h1,
  .item-main strong,
  .stavba-title{
    color:#f4f8ff !important;
  }

  .page-heading p,
  .hint,
  .stat-card span,
  .stat-card small,
  .stat-hero-card span,
  .export-summary-card span,
  .item-main small,
  .item-meta{
    color:#a8b6c8 !important;
  }

  .form-grid input,
  .form-grid select,
  .filtry input,
  .filtry select,
  .filter-grid input,
  .filter-grid select,
  .settings-add-grid input[type="text"],
  .settings-inline-add input[type="text"],
  .settings-inline-add select,
  .settings-table input[type="text"],
  .settings-table input[type="number"],
  .user-create-panel input,
  .user-create-panel select,
  .login-card input,
  .modal-card input,
  .modal-card select,
  .export-filter-form input[type=month],
  .export-filter-form select,
  .big-input,
  .qr-input{
    background:#0c1626 !important;
    border-color:#314158 !important;
    color:#eef5ff !important;
  }

  input::placeholder,
  textarea::placeholder{
    color:#8fa2b7 !important;
    opacity:1;
  }

  .form-grid label,
  .filtry label,
  .filter-grid label,
  .settings-add-grid label,
  .settings-inline-add label,
  .login-card label,
  .modal-card label,
  .export-filter-form label,
  .user-create-panel label,
  .manual-label{
    color:#dbeafe !important;
  }

  .btn-primary{
    background:#2563eb !important;
    color:#fff !important;
    border-color:#3b82f6 !important;
  }

  .btn-primary:hover{
    background:#1d4ed8 !important;
  }

  .btn-green,
  .btn-confirm{
    background:#16a34a !important;
    color:#fff !important;
    border-color:#22c55e !important;
  }

  .btn-green:hover,
  .btn-confirm:hover{
    background:#15803d !important;
  }

  .btn-danger{
    background:#3a1718 !important;
    color:#fecaca !important;
    border-color:#7f1d1d !important;
  }

  .tabulka th{
    background:#142238 !important;
    color:#dbeafe !important;
  }

  .tabulka td,
  .tabulka tbody tr:nth-child(even) td{
    background:#111c2d;
    color:#e5edf6;
    border-color:#24334a;
  }

  .tabulka tr:hover td,
  .tabulka-zebra tbody tr:nth-child(even):hover td,
  .pruvodka-item:hover{
    background:#17263b;
  }

  .btn-grey,
  .btn-mini{
    background:#142238;
    color:#dbeafe;
    border-color:#314158;
  }

  .settings-folder summary,
  .preset-folder summary,
  .panel-heading,
  .object-group summary,
  .material-group summary{
    background:#111c2d !important;
    color:#f4f8ff !important;
    border-color:#24334a !important;
  }

  .settings-folder[open] > summary,
  .preset-folder[open] > summary,
  details.settings-folder[open] > summary,
  details.preset-folder[open] > summary{
    background:#111c2d !important;
    color:#f4f8ff !important;
    border-color:#24334a !important;
  }

  .settings-folder summary::before,
  .settings-folder summary::after,
  .preset-folder summary::after{
    background:#18263a !important;
    color:#dbeafe !important;
    border:1px solid #314158 !important;
  }

  .table-foot{
    background:#111c2d !important;
    color:#cbd8e8 !important;
    border-color:#24334a !important;
  }

  .user-create-panel .hint,
  .settings-folder > .hint,
  .settings-folder > p.hint{
    background:#142238 !important;
    color:#cbd8e8 !important;
    border:1px solid #314158 !important;
  }

  .table-foot,
  .export-table tfoot td,
  .so-odpad-table tfoot td{
    background:#111c2d !important;
    color:#cbd8e8 !important;
    border-color:#24334a !important;
  }

  .export-table thead tr,
  .so-odpad-table thead tr{
    background:#142238 !important;
  }

  .export-table th,
  .export-table td,
  .so-odpad-table th,
  .so-odpad-table td{
    background:transparent !important;
    color:#e5edf6 !important;
    border-color:#24334a !important;
  }

  .export-table tbody tr:hover td,
  .so-odpad-table tr:hover td{
    background:#17263b !important;
  }

  .spz-cell,
  .netto-cell,
  .netto-big,
  .so-chart-total strong,
  .kod-badge{
    color:#f4f8ff !important;
  }

  .kod-badge,
  .filter-badge{
    background:#18263a !important;
    border-color:#314158 !important;
  }

  .pct-bar-wrap{
    background:#26364d !important;
  }

  .export-header p,
  .export-empty,
  .empty-so,
  .so-card-header .so-total,
  .so-chart-total,
  .odpad-name,
  .export-so-meta{
    color:#a8b6c8 !important;
  }

  .stavba-card,
  .stavba-open-btn,
  .stavba-edit,
  #add-form,
  #screen-stavby button[style*="background:#fff"],
  #screen-stavby button[style*="background: #fff"]{
    background:#111c2d !important;
    border-color:#24334a !important;
    color:#e5edf6 !important;
  }

  #add-form h2,
  #screen-stavby button[style*="background:#fff"] > div:first-child,
  #screen-stavby button[style*="background: #fff"] > div:first-child{
    color:#f4f8ff !important;
  }

  #screen-stavby button[style*="background:#fff"] > div:not(:first-child),
  #screen-stavby button[style*="background: #fff"] > div:not(:first-child),
  #screen-stavby button[style*="background:#fff"] span,
  #screen-stavby button[style*="background: #fff"] span{
    color:#a8b6c8 !important;
  }

  .stavba-edit-form input{
    background:#0c1626 !important;
    border-color:#314158 !important;
    color:#eef5ff !important;
  }

  .stavba-title,
  .stavba-edit summary{
    color:#f4f8ff !important;
  }

  .stavba-sub,
  .stavba-meta{
    color:#a8b6c8 !important;
  }

  select,
  select option,
  select optgroup{
    background-color:#0c1626 !important;
    color:#eef5ff !important;
    color-scheme:dark;
  }

  select option:checked,
  select option:hover{
    background-color:#2563eb !important;
    color:#fff !important;
  }

  .panel-heading h2,
  .pruvodky-filters h2{
    color:#f4f8ff !important;
  }

  .object-group,
  .material-group,
  .pruvodka-list{
    border-color:#24334a !important;
  }

  .pruvodka-item{
    background:#111c2d !important;
    border-color:#24334a !important;
  }

  .item-main span{
    color:#dbeafe !important;
  }

  .object-group summary b,
  .material-group summary b{
    background:#18263a !important;
    color:#cbd8e8 !important;
    border-color:#314158 !important;
  }

  .badge-muted{
    background:#18263a;
    color:#b9c7d8;
    border-color:#314158;
  }
}

/* =====================================================
   Theme consistency v12 - controls, contrast and icons
   ===================================================== */
@media screen{
  :root{
    --surface-raised:#ffffff;
    --surface-subtle:#f7fafc;
    --field-bg:#fbfdff;
    --field-border:#c8d5e4;
    --field-placeholder:#5f7087;
    --icon-surface:#eef5fc;
    --icon-border:#d2dfed;
    --icon-color:#0b63ce;
    --hover-surface:#f2f7fc;
    --success-surface:#e8f7ef;
    --success-border:#bfe8cf;
    --success-text:#0f6338;
    --danger-surface:#fff1f0;
    --danger-border:#f2c2bf;
    --danger-text:#a61b16;
  }

  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]),
  select,
  textarea{
    background:var(--field-bg) !important;
    border-color:var(--field-border) !important;
    color:var(--text) !important;
    caret-color:var(--text);
  }

  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]):focus,
  select:focus,
  textarea:focus{
    background:var(--field-bg) !important;
    border-color:var(--green) !important;
    box-shadow:0 0 0 3px var(--ring) !important;
  }

  input::placeholder,
  textarea::placeholder{
    color:var(--field-placeholder) !important;
    opacity:1;
  }

  select option,
  select optgroup{
    background:var(--surface-raised);
    color:var(--text);
  }

  .inline-form{
    gap:10px;
  }

  .inline-form input{
    width:164px;
    min-height:46px;
  }

  .inline-form .btn-mini{
    min-height:46px;
  }

  .brand-mark,
  .done-box .check,
  .settings-folder summary::before,
  .settings-folder summary::after,
  .preset-folder summary::after,
  .object-group summary::before,
  .material-group summary::before{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    line-height:1;
    text-align:center;
  }

  .brand-mark{
    flex:0 0 32px;
  }

  .nav-ico{
    width:20px;
    height:20px;
    flex:0 0 20px;
    align-self:center;
    background-position:center;
  }

  .settings-folder summary::before{
    content:"";
    width:32px;
    height:32px;
    flex:0 0 32px;
    margin:0;
    border:1px solid var(--icon-border);
    border-radius:var(--radius);
    background-color:var(--icon-surface);
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%230b63ce' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='18' x='3' y='3' rx='2'/%3E%3Cpath d='M9 3v18M3 9h18M3 15h18'/%3E%3C/svg%3E");
    background-position:center;
    background-repeat:no-repeat;
    background-size:18px 18px;
    box-shadow:none;
    color:transparent;
  }

  .settings-folder summary::after,
  .preset-folder summary::after{
    width:32px;
    height:32px;
    flex:0 0 32px;
    margin-left:auto;
    padding:0;
    border:1px solid var(--icon-border);
    border-radius:var(--radius);
    background:var(--icon-surface);
    color:var(--icon-color);
    font-size:18px;
  }

  .object-group summary::before,
  .material-group summary::before{
    width:28px;
    height:28px;
    flex:0 0 28px;
    margin:0;
    border:1px solid var(--icon-border);
    border-radius:6px;
    background:var(--icon-surface);
    color:var(--icon-color);
    font-size:20px;
    transform:rotate(0deg);
    transform-origin:center;
  }

  .object-group[open] > summary::before,
  .material-group[open] > summary::before{
    transform:rotate(90deg);
  }

  .alert.ok,
  .badge-ok{
    background:var(--success-surface);
    border-color:var(--success-border);
    color:var(--success-text);
  }

  .alert.error{
    background:var(--danger-surface);
    border-color:var(--danger-border);
    color:var(--danger-text);
  }

  .data-box .row,
  .tabulka th,
  .tabulka td,
  .table-foot{
    border-color:var(--line);
  }
}

@media screen and (prefers-color-scheme:dark){
  :root{
    --surface-raised:#111c2d;
    --surface-subtle:#142238;
    --field-bg:#0c1626;
    --field-border:#3b4d66;
    --field-placeholder:#9aabc0;
    --icon-surface:#18263a;
    --icon-border:#3b4d66;
    --icon-color:#93c5fd;
    --hover-surface:#17263b;
    --success-surface:#102d21;
    --success-border:#236542;
    --success-text:#86efac;
    --danger-surface:#35191c;
    --danger-border:#7f3035;
    --danger-text:#fecaca;
  }

  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]),
  select,
  textarea{
    color-scheme:dark;
    -webkit-text-fill-color:var(--text);
  }

  input:-webkit-autofill,
  input:-webkit-autofill:hover,
  input:-webkit-autofill:focus{
    -webkit-text-fill-color:var(--text) !important;
    -webkit-box-shadow:0 0 0 1000px var(--field-bg) inset !important;
    caret-color:var(--text);
  }

  .settings-folder summary::before{
    background-color:var(--icon-surface) !important;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2393c5fd' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='18' x='3' y='3' rx='2'/%3E%3Cpath d='M9 3v18M3 9h18M3 15h18'/%3E%3C/svg%3E") !important;
    background-position:center !important;
    background-repeat:no-repeat !important;
    background-size:18px 18px !important;
  }

  .settings-folder summary::after,
  .preset-folder summary::after,
  .object-group summary::before,
  .material-group summary::before{
    background:var(--icon-surface) !important;
    border-color:var(--icon-border) !important;
    color:var(--icon-color) !important;
  }

  .souhrn,
  .settings-active,
  .check-label,
  .print-check-option,
  .form-check-row span{
    color:#dbeafe !important;
  }

  .data-box .row,
  .pruvodka-list,
  .so-odpad-table th,
  .so-odpad-table td{
    border-color:var(--line) !important;
  }

  .badge-muted{
    background:var(--surface-subtle);
    border-color:var(--icon-border);
    color:#c5d2e1;
  }

  .btn-green,
  .btn-confirm{
    background:#15803d !important;
    border-color:#22c55e !important;
  }

  .btn-green:hover,
  .btn-confirm:hover{
    background:#166534 !important;
  }
}

/* =====================================================
   Theme consistency v13 - focused controls and icon alignment
   ===================================================== */
@media screen{
  :root{
    --select-chevron:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%235f7087' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    --settings-grid-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%230b63ce' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='7' height='7' x='3' y='3' rx='1'/%3E%3Crect width='7' height='7' x='14' y='3' rx='1'/%3E%3Crect width='7' height='7' x='3' y='14' rx='1'/%3E%3Crect width='7' height='7' x='14' y='14' rx='1'/%3E%3C/svg%3E");
    --summary-chevron:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%230b63ce' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E");
  }

  html body select:not([multiple]):not([size]){
    -webkit-appearance:none;
    appearance:none;
    padding-right:42px !important;
    background-color:var(--field-bg) !important;
    background-image:var(--select-chevron) !important;
    background-position:right 13px center !important;
    background-repeat:no-repeat !important;
    background-size:18px 18px !important;
  }

  html body select:focus:focus,
  html body select:active:active,
  html body textarea:focus:focus{
    background-color:var(--field-bg) !important;
    color:var(--text) !important;
    -webkit-text-fill-color:var(--text) !important;
  }

  .settings-folder summary,
  .preset-folder summary,
  .object-group summary,
  .material-group summary,
  .admin-nav nav a{
    align-items:center !important;
  }

  .brand-mark,
  .done-box .check,
  .export-empty .icon,
  .nav-ico,
  .settings-folder summary::before,
  .settings-folder summary::after,
  .preset-folder summary::after,
  .object-group summary::before,
  .material-group summary::before{
    box-sizing:border-box;
    align-self:center;
    vertical-align:middle;
  }

  .brand-mark,
  .done-box .check,
  .export-empty .icon,
  .settings-folder summary::before,
  .settings-folder summary::after,
  .preset-folder summary::after,
  .object-group summary::before,
  .material-group summary::before{
    display:inline-grid !important;
    place-items:center;
  }

  .export-empty .icon{
    width:64px;
    height:64px;
    margin:0 auto 12px;
    line-height:1;
  }

  .nav-ico{
    display:block;
    background-position:50% 50%;
    transform:none;
  }

  .settings-folder summary::before{
    content:"" !important;
    background-color:var(--icon-surface) !important;
    background-image:var(--settings-grid-icon) !important;
    background-position:50% 50% !important;
    background-repeat:no-repeat !important;
    background-size:18px 18px !important;
  }

  .settings-folder summary::after,
  .preset-folder summary::after{
    content:"" !important;
    background-color:var(--icon-surface) !important;
    background-image:var(--summary-chevron) !important;
    background-position:50% 50% !important;
    background-repeat:no-repeat !important;
    background-size:18px 18px !important;
    transform:rotate(90deg);
    transform-origin:center;
    transition:transform .16s ease, background-color .16s ease, border-color .16s ease;
  }

  .settings-folder[open] > summary::after,
  .preset-folder[open] > summary::after{
    transform:rotate(-90deg);
  }

  .object-group summary::before,
  .material-group summary::before{
    content:"" !important;
    background-color:var(--icon-surface) !important;
    background-image:var(--summary-chevron) !important;
    background-position:50% 50% !important;
    background-repeat:no-repeat !important;
    background-size:16px 16px !important;
  }
}

@media screen and (prefers-color-scheme:dark){
  :root{
    --select-chevron:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%239aabc0' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    --settings-grid-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2393c5fd' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='7' height='7' x='3' y='3' rx='1'/%3E%3Crect width='7' height='7' x='14' y='3' rx='1'/%3E%3Crect width='7' height='7' x='3' y='14' rx='1'/%3E%3Crect width='7' height='7' x='14' y='14' rx='1'/%3E%3C/svg%3E");
    --summary-chevron:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2393c5fd' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E");
  }

  html body select:not([multiple]):not([size]),
  html body select:focus:focus,
  html body select:active:active,
  html body textarea:focus:focus{
    background-color:var(--field-bg) !important;
    color:#eef5ff !important;
    -webkit-text-fill-color:#eef5ff !important;
    border-color:var(--field-border) !important;
  }

  html body select option,
  html body select optgroup{
    background-color:#0c1626 !important;
    color:#eef5ff !important;
    -webkit-text-fill-color:#eef5ff !important;
  }
}

/* Rychlé přidání ORP ve formuláři průvodky */
@media screen{
  .form-field-with-action{
    min-width:0;
  }

  .form-field-with-action > label{
    display:block;
  }

  .field-action-button{
    min-height:44px;
    margin-top:7px;
    padding:0 4px;
    border:0;
    background:transparent;
    color:var(--blue);
    display:inline-flex;
    align-items:center;
    gap:8px;
    font:inherit;
    font-size:13px;
    font-weight:850;
    cursor:pointer;
  }

  .field-action-button:hover{
    color:var(--navy-dark);
  }

  .action-plus{
    width:28px;
    height:28px;
    flex:0 0 28px;
    display:grid;
    place-items:center;
    border:1px solid var(--icon-border);
    border-radius:6px;
    background:var(--icon-surface);
    color:var(--icon-color);
    font-size:18px;
    line-height:1;
  }

  .orp-quick-panel{
    margin-top:6px;
    padding:12px;
    border:1px solid var(--field-border);
    border-radius:var(--radius);
    background:var(--surface-subtle);
    box-shadow:var(--shadow-soft);
  }

  .orp-quick-panel[hidden]{
    display:none !important;
  }

  .orp-quick-row{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:8px;
    align-items:end;
  }

  .orp-quick-row input{
    min-width:0;
    margin-top:6px;
  }

  .orp-quick-row .btn-primary{
    min-height:var(--field-h);
    margin-top:6px;
  }

  .orp-quick-row .btn-primary:disabled{
    cursor:wait;
    opacity:.68;
  }

  .orp-quick-status{
    margin:9px 0 0;
    font-size:12px;
    font-weight:750;
    line-height:1.45;
  }

  .orp-quick-status.is-success{
    color:var(--success-text);
  }

  .orp-quick-status.is-error{
    color:var(--danger-text);
  }

  @media (max-width:480px){
    .orp-quick-row{
      grid-template-columns:1fr;
    }

    .orp-quick-row .btn-primary{
      width:100%;
    }
  }
}

@media screen and (prefers-color-scheme:dark){
  .field-action-button{
    color:#93c5fd;
  }

  .field-action-button:hover{
    color:#dbeafe;
  }
}

/* Vnořené záložky Statistiky / Export */
@media screen{
  .section-tabs{
    display:inline-flex;
    align-items:center;
    gap:3px;
    max-width:100%;
    margin:0 0 18px;
    padding:4px;
    border:1px solid var(--line);
    border-radius:8px;
    background:var(--surface-subtle);
  }

  .section-tabs a{
    min-height:40px;
    padding:0 15px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border:1px solid transparent;
    border-radius:6px;
    color:var(--muted);
    text-decoration:none;
    font-size:14px;
    font-weight:850;
    white-space:nowrap;
  }

  .section-tabs a:hover{
    color:var(--navy-dark);
    background:var(--hover-surface);
  }

  .section-tabs a.active{
    border-color:var(--line);
    background:var(--surface-raised);
    color:var(--navy-dark);
    box-shadow:var(--shadow-soft);
  }

  @media (max-width:480px){
    .section-tabs{
      width:100%;
    }

    .section-tabs a{
      flex:1 1 0;
    }
  }
}

/* Finální kontrast světlého režimu */
@media screen and (prefers-color-scheme:light){
  :root{
    --text:#091d35;
    --muted:#40566f;
    --field-placeholder:#4d6279;
  }

  body:not(.login-body){
    color:var(--text);
  }

  .admin-main h1,
  .page-heading h1,
  .settings-folder h2,
  .settings-folder summary,
  .preset-folder summary,
  .section-title,
  .pruvodky-filters h2,
  .panel-heading h2,
  .stat-card strong,
  .stat-hero-card strong,
  .export-summary-card strong,
  .item-main strong,
  .login-card h1,
  .stavba-title{
    color:#061a33 !important;
  }

  .page-heading p,
  .hint,
  .stat-card span,
  .stat-card small,
  .stat-hero-card span,
  .export-summary-card span,
  .item-main small,
  .item-meta,
  .empty-state-cell{
    color:#40566f !important;
  }

  .form-grid label,
  .filtry label,
  .filter-grid label,
  .settings-add-grid label,
  .settings-inline-add label,
  .login-card label,
  .modal-card label,
  .export-filter-form label,
  .user-create-panel label,
  .manual-label{
    color:#102b49 !important;
  }

  .tabulka td,
  .data-box .row,
  .souhrn,
  .settings-active,
  .check-label,
  .print-check-option,
  .form-check-row span{
    color:#172f4c !important;
  }

  input::placeholder,
  textarea::placeholder{
    color:var(--field-placeholder) !important;
    opacity:1;
  }

  body.kypar-body{
    --ky-ink:#011827;
    --ky-text:#0b2a3d;
    --ky-muted:#324f61;
  }

  body.kypar-body input::placeholder{
    color:#526a79 !important;
  }
}

/* Přímý přechod ze sekce Nastavení do správy uživatelů */
@media screen{
  .settings-link-card{
    min-height:78px;
    margin-bottom:10px;
    padding:14px 18px !important;
    display:flex;
    align-items:center;
    gap:14px;
    color:var(--text);
    text-decoration:none;
    border-color:#dce7f3;
    transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease,background-color .16s ease;
  }

  .settings-link-card:hover{
    border-color:#b9cfe5;
    background:#fbfdff;
    box-shadow:0 8px 22px rgba(7,26,52,.09);
    transform:translateY(-1px);
  }

  .settings-link-card:focus-visible{
    outline:3px solid var(--ring);
    outline-offset:2px;
  }

  .settings-link-card-icon,
  .settings-link-card-arrow{
    display:inline-grid;
    place-items:center;
    flex:0 0 auto;
    border:1px solid var(--icon-border);
    border-radius:var(--radius);
    background:var(--icon-surface);
    color:var(--icon-color);
  }

  .settings-link-card-icon{
    width:38px;
    height:38px;
  }

  .settings-link-card-arrow{
    width:32px;
    height:32px;
    margin-left:auto;
  }

  .settings-link-card-icon svg{
    width:20px;
    height:20px;
  }

  .settings-link-card-arrow svg{
    width:18px;
    height:18px;
  }

  .settings-link-card svg{
    stroke:currentColor;
    stroke-width:2;
    stroke-linecap:round;
    stroke-linejoin:round;
  }

  .settings-link-card-copy{
    min-width:0;
    display:flex;
    flex-direction:column;
    gap:3px;
  }

  .settings-link-card-copy strong{
    color:#061a33;
    font-size:16px;
    font-weight:900;
    line-height:1.25;
  }

  .settings-link-card-copy > span{
    color:var(--muted);
    font-size:14px;
    line-height:1.4;
  }

  @media (max-width:640px){
    .settings-link-card{
      min-height:72px;
      padding:13px 14px !important;
      gap:11px;
    }

    .settings-link-card-copy > span{
      font-size:13px;
    }
  }
}

@media screen and (prefers-color-scheme:dark){
  .settings-link-card{
    background:#111c2d !important;
    border-color:#24334a;
    color:#e5edf6;
  }

  .settings-link-card:hover{
    background:#17263b !important;
    border-color:#3b4d66;
  }

  .settings-link-card-copy strong{
    color:#f4f8ff;
  }

  .settings-link-card-copy > span{
    color:#a8b6c8;
  }
}

/* Prázdný stav tabulky musí zůstat uprostřed i přes zarovnání posledního sloupce Akce. */
@media screen{
  .tabulka td.empty-state-cell{
    text-align:center !important;
    vertical-align:middle;
  }
}

/* Globální nastavení dostupné ještě před výběrem stavby. */
@media screen{
  .app-settings-body{
    min-height:100vh;
  }

  .app-settings-topbar{
    min-height:66px;
    padding:10px 24px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    background:linear-gradient(90deg,#071a34,#0b2f5a 68%,#123f6d);
    border-bottom:3px solid var(--green);
    box-shadow:0 8px 24px rgba(4,18,37,.18);
    color:#dbeafe;
  }

  .app-settings-brand{
    display:inline-flex;
    align-items:center;
    gap:10px;
    color:#fff;
    font-size:17px;
    font-weight:900;
    text-decoration:none;
  }

  .app-settings-topbar-actions{
    display:flex;
    align-items:center;
    gap:14px;
    color:#c5d7eb;
    font-size:13px;
    font-weight:700;
  }

  .app-settings-topbar-actions a{
    color:#dbeafe;
    font-weight:850;
    text-decoration:none;
  }

  .app-settings-topbar-actions a:hover{
    text-decoration:underline;
  }

  .app-settings-main{
    width:min(1480px,100%);
    margin:0 auto;
  }

  .app-settings-heading{
    margin-bottom:22px;
  }

  .app-settings-shortcuts{
    margin-bottom:18px;
  }

  .app-settings-user-link{
    margin-bottom:0;
  }

  @media (max-width:700px){
    .app-settings-topbar{
      padding:10px 14px;
      align-items:center;
      flex-wrap:wrap;
    }

    .app-settings-topbar-actions{
      width:100%;
      align-items:center;
      justify-content:space-between;
      flex-direction:row;
      gap:10px;
      padding-top:8px;
      border-top:1px solid rgba(255,255,255,.12);
      text-align:left;
    }

    .app-settings-heading{
      align-items:stretch;
    }

    .app-settings-heading .btn-link{
      width:100%;
    }
  }
}

@media screen and (prefers-color-scheme:dark){
  .app-settings-body{
    background:linear-gradient(180deg,#08111f 0%,#0c1626 100%);
  }

  .app-settings-user-link{
    background:#111c2d !important;
    border-color:#24334a;
  }
}

/* Kypař: jednoduché předvolby SPZ a jmen. */
@media screen{
  body.kypar-body .kypar-header-actions{
    display:flex;
    align-items:center;
    gap:8px;
  }

  body.kypar-body .kypar-settings-link{
    width:48px;
    min-width:48px;
    padding:0;
  }

  body.kypar-body .qr-reader video,
  body.kypar-body .qr-video{
    filter:none !important;
    backdrop-filter:none !important;
  }

  body.kypar-body .camera-filter-status{
    margin:12px 0 0;
    padding:10px 12px;
    border:1px solid rgba(255,255,255,.14);
    border-radius:8px;
    background:rgba(255,255,255,.06);
  }

  body.kypar-settings-page{
    background:var(--ky-bg) !important;
  }

  body.kypar-body .kypar-settings-main{
    width:min(100%,680px);
    margin:0 auto;
    padding:24px 16px max(36px,env(safe-area-inset-bottom));
  }

  body.kypar-body .kypar-settings-heading{
    margin-bottom:20px;
  }

  body.kypar-body .kypar-settings-heading h1{
    margin:0;
    color:var(--ky-ink);
    font-size:30px;
    font-weight:900;
    line-height:1.15;
  }

  body.kypar-body .kypar-settings-heading p{
    margin:8px 0 0;
    color:var(--ky-muted);
    font-size:15px;
    font-weight:600;
  }

  body.kypar-body .alert.ok{
    color:#0f6338;
    background:#e8f7ef;
    border-color:#a8dec0;
  }

  body.kypar-body .kypar-preference-panel{
    margin-top:16px;
    padding:18px;
    border:1px solid var(--ky-line);
    border-radius:10px;
    background:var(--ky-surface);
    box-shadow:0 4px 14px rgba(9,29,44,.06);
  }

  body.kypar-body .kypar-preference-heading{
    display:flex;
    align-items:center;
    gap:12px;
  }

  body.kypar-body .kypar-preference-heading > div{
    min-width:0;
  }

  body.kypar-body .kypar-preference-icon{
    width:44px;
    height:44px;
    display:inline-grid;
    place-items:center;
    flex:0 0 44px;
    border:1px solid var(--ky-green-line);
    border-radius:9px;
    color:var(--ky-green);
    background:var(--ky-green-soft);
  }

  body.kypar-body .kypar-preference-icon svg{
    width:23px;
    height:23px;
  }

  body.kypar-body .kypar-preference-heading h2{
    margin:0;
    color:var(--ky-ink);
    font-size:20px;
    font-weight:900;
  }

  body.kypar-body .kypar-preference-heading p{
    margin:2px 0 0;
    color:var(--ky-muted);
    font-size:13px;
    font-weight:600;
  }

  body.kypar-body .kypar-preference-add{
    margin-top:16px;
  }

  body.kypar-body .kypar-preference-add label{
    display:block;
    margin-bottom:7px;
    color:var(--ky-ink);
    font-size:13px;
    font-weight:850;
  }

  body.kypar-body .kypar-preference-add > div{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:8px;
  }

  body.kypar-body .kypar-preference-add input{
    width:100%;
    min-height:52px;
    padding:0 14px;
    border:2px solid var(--ky-line-strong);
    border-radius:8px;
    outline:0;
    color:var(--ky-ink);
    background:var(--ky-surface);
    font-size:17px;
    font-weight:800;
  }

  body.kypar-body .kypar-preference-add input:focus{
    border-color:var(--ky-green);
    box-shadow:0 0 0 4px rgba(8,122,60,.15);
  }

  body.kypar-body .kypar-preference-list{
    margin-top:14px;
    display:grid;
    gap:8px;
  }

  body.kypar-body .kypar-preference-item{
    min-height:54px;
    padding:7px 8px 7px 14px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    border:1px solid var(--ky-line);
    border-radius:8px;
    color:var(--ky-ink);
    background:var(--ky-surface-muted);
  }

  body.kypar-body .kypar-preference-item strong{
    min-width:0;
    overflow-wrap:anywhere;
    font-size:17px;
    font-weight:900;
  }

  body.kypar-body .kypar-preference-item button{
    min-height:40px;
    padding:0 12px;
    border:1px solid #c96b64;
    border-radius:7px;
    color:var(--ky-danger);
    background:var(--ky-danger-soft);
    font-size:13px;
    font-weight:850;
  }

  body.kypar-body .kypar-preference-empty{
    margin:0;
    padding:14px;
    border:1px dashed var(--ky-line-strong);
    border-radius:8px;
    color:var(--ky-muted);
    text-align:center;
    font-size:14px;
    font-weight:650;
  }

  body.kypar-body .kypar-quick-select{
    margin-bottom:2px;
  }

  body.kypar-body .kypar-quick-label{
    display:block;
    margin-bottom:9px;
    color:var(--ky-ink);
    font-size:14px;
    font-weight:900;
  }

  body.kypar-body .kypar-quick-track{
    padding:2px 2px 9px;
    display:grid;
    grid-auto-flow:column;
    grid-auto-columns:minmax(170px,42%);
    gap:10px;
    overflow-x:auto;
    overscroll-behavior-inline:contain;
    scroll-snap-type:inline mandatory;
    scrollbar-width:thin;
  }

  body.kypar-body .kypar-quick-button{
    min-height:76px;
    padding:11px 14px;
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    justify-content:center;
    gap:2px;
    scroll-snap-align:start;
    border:2px solid var(--ky-green-line);
    border-radius:9px;
    color:var(--ky-ink);
    background:var(--ky-green-soft);
    box-shadow:none;
    text-align:left;
    cursor:pointer;
    transition:border-color .15s ease,background .15s ease,transform .15s ease;
  }

  body.kypar-body .kypar-quick-button:hover,
  body.kypar-body .kypar-quick-button:focus-visible{
    border-color:var(--ky-green);
    outline:0;
    transform:translateY(-1px);
  }

  body.kypar-body .kypar-quick-button strong{
    max-width:100%;
    color:var(--ky-ink);
    font-size:19px;
    font-weight:900;
    line-height:1.2;
    overflow-wrap:anywhere;
  }

  body.kypar-body .kypar-quick-button small{
    color:var(--ky-green);
    font-size:12px;
    font-weight:850;
  }

  body.kypar-body .kypar-preset-divider{
    margin:16px 0 14px;
  }

  @media (max-width:520px){
    body.kypar-body .kypar-header-actions{gap:6px;}
    body.kypar-body .kypar-quick-track{grid-auto-columns:78%;}
    body.kypar-body .kypar-preference-panel{padding:15px;}
    body.kypar-body .kypar-preference-add > div{grid-template-columns:1fr;}
  }
}

@media screen and (prefers-color-scheme:dark){
  body.kypar-body .kypar-preference-panel{
    box-shadow:0 8px 24px rgba(0,0,0,.18);
  }

  body.kypar-body .kypar-preference-item button{
    border-color:#7c3b38;
  }
}

/* =====================================================
   Produkční sjednocení ovládání administrace
   ===================================================== */
@media screen{
  body.admin-body{
    background:#f3f6f9;
  }

  .admin-nav{
    background:#061a36;
    box-shadow:0 1px 0 rgba(255,255,255,.08),0 8px 24px rgba(6,26,54,.12);
  }

  .admin-main{
    max-width:1480px;
  }

  .admin-main > h1,
  .page-heading h1{
    letter-spacing:-.025em;
  }

  .card,
  .filtry,
  .tabulka-wrap,
  .pruvodky-panel,
  .object-group{
    border-radius:9px;
    box-shadow:0 3px 12px rgba(20,41,68,.055);
  }

  button,
  a,
  input,
  select,
  summary{
    -webkit-tap-highlight-color:transparent;
  }

  button:focus-visible,
  a:focus-visible,
  input:focus-visible,
  select:focus-visible,
  summary:focus-visible,
  [role="option"]:focus-visible{
    outline:3px solid rgba(11,99,206,.24);
    outline-offset:2px;
  }

  button:disabled,
  form[aria-busy="true"] button{
    cursor:wait;
  }

  .app-combobox{
    position:relative;
    min-width:0;
  }

  .app-combobox.is-open{
    z-index:90;
  }

  .app-combobox-label-row{
    min-height:22px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
  }

  .app-combobox-label-row > label{
    color:#0f2447;
    font-size:13px;
    font-weight:850;
  }

  .app-combobox-count{
    min-height:22px;
    padding:3px 8px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border:1px solid #d3dfec;
    border-radius:999px;
    background:#f3f7fb;
    color:#52677f;
    font-size:11px;
    font-weight:850;
    line-height:1;
    white-space:nowrap;
  }

  .app-combobox-control{
    position:relative;
    margin-top:7px;
  }

  .form-grid .app-combobox-control input{
    width:100%;
    height:50px;
    margin:0;
    padding:0 52px 0 14px;
    border:1px solid var(--field-border,#c8d5e4);
    border-radius:10px;
    background:var(--field-bg,#fbfdff);
    box-shadow:inset 0 1px 2px rgba(12,36,66,.035);
    transition:border-color .16s ease,box-shadow .16s ease,background-color .16s ease;
  }

  .app-combobox.has-selection .app-combobox-control input{
    border-color:#8fbb9f;
    background:#f8fdf9;
  }

  .app-combobox.has-custom-value .app-combobox-control input{
    border-color:#91afd0;
    background:#f8fbff;
  }

  .app-combobox-toggle{
    position:absolute;
    inset:3px 3px 3px auto;
    width:44px;
    min-height:44px;
    padding:0;
    border:0;
    border-radius:8px;
    color:#315a87;
    background:transparent;
    box-shadow:none;
    cursor:pointer;
    transition:background-color .16s ease,color .16s ease;
  }

  .app-combobox-toggle svg{
    width:20px;
    height:20px;
    stroke:currentColor;
    stroke-width:2.25;
    stroke-linecap:round;
    stroke-linejoin:round;
    transition:transform .16s ease;
  }

  .app-combobox-toggle:hover{
    color:#0b63ce;
    background:#eaf2fb;
  }

  .app-combobox.is-open .app-combobox-toggle svg{
    transform:rotate(180deg);
  }

  .app-combobox.is-open .app-combobox-control input{
    border-color:#0b63ce;
    background:var(--field-bg,#fbfdff);
    box-shadow:0 0 0 3px rgba(11,99,206,.13),inset 0 1px 2px rgba(12,36,66,.035);
  }

  .app-combobox-panel{
    position:absolute;
    z-index:80;
    top:83px;
    left:0;
    right:0;
    overflow:hidden;
    border:1px solid #b9c9da;
    border-radius:12px;
    background:var(--surface-raised,#fff);
    box-shadow:0 20px 44px rgba(8,31,59,.20);
  }

  .app-combobox-panel[hidden]{
    display:none !important;
  }

  .app-combobox-options{
    max-height:240px;
    padding:7px;
    overflow-y:auto;
  }

  .app-combobox-option{
    width:100%;
    min-height:46px;
    padding:8px 10px;
    display:grid;
    grid-template-columns:24px minmax(0,1fr);
    gap:9px;
    align-items:center;
    border:1px solid transparent;
    border-radius:8px;
    color:var(--text,#091d35);
    background:transparent;
    box-shadow:none;
    text-align:left;
    font-weight:800;
    cursor:pointer;
    transition:border-color .14s ease,background-color .14s ease,color .14s ease;
  }

  .app-combobox-option-mark{
    width:22px;
    height:22px;
    display:grid;
    place-items:center;
    border:1px solid #cedbea;
    border-radius:6px;
    background:#f4f8fc;
    color:transparent;
    font-size:13px;
    font-weight:950;
  }

  .app-combobox-option:hover,
  .app-combobox-option.is-active,
  .app-combobox-option[aria-selected="true"]{
    color:#063f82;
    border-color:#bfd6ef;
    background:#eaf3ff;
  }

  .app-combobox-option[aria-selected="true"] .app-combobox-option-mark{
    border-color:#23914b;
    background:#e8f8ed;
    color:#16743a;
  }

  .app-combobox-empty{
    margin:0;
    padding:18px 12px;
    color:var(--muted,#40566f);
    text-align:center;
    font-size:13px;
  }

  .app-combobox-footer{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding:10px 12px;
    border-top:1px solid var(--line,#dce5ee);
    color:var(--muted,#40566f);
    background:var(--surface-subtle,#f7fafc);
    font-size:12px;
  }

  .app-combobox-footer a{
    color:#0b63ce;
    font-weight:800;
    white-space:nowrap;
  }

  .app-combobox > .hint{
    display:block;
    margin-top:7px;
    color:var(--muted,#52677f);
    font-size:12px;
    line-height:1.45;
  }

  .app-combobox.is-open > .hint{
    visibility:hidden;
  }

  .pagination{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:14px;
    padding:16px 0 4px;
  }

  .pagination[hidden]{
    display:none;
  }

  .pagination button{
    min-height:40px;
    padding:8px 15px;
  }

  .pagination span{
    min-width:130px;
    color:var(--muted,#40566f);
    text-align:center;
    font-size:13px;
    font-weight:800;
  }

  .empty-state-cell.error-state{
    color:#9f241c;
    background:#fff5f4 !important;
  }

  .modal-card{
    width:min(92vw,520px);
    box-shadow:0 24px 64px rgba(3,23,45,.25);
  }

  @media (max-width:760px){
    .app-combobox-footer{
      align-items:flex-start;
      flex-direction:column;
    }

    .pagination{
      justify-content:space-between;
    }

    .pagination span{
      min-width:0;
    }
  }
}

@media screen and (prefers-color-scheme:dark){
  body.admin-body{
    background:#08111f;
  }

  .app-combobox-label-row > label{
    color:#dbeafe;
  }

  .app-combobox-count{
    border-color:#33465f;
    background:#132238;
    color:#9eb0c6;
  }

  .app-combobox.has-selection .app-combobox-control input{
    border-color:#376849;
    background:#10251b !important;
  }

  .app-combobox.has-custom-value .app-combobox-control input{
    border-color:#3d5f86;
    background:#111f33 !important;
  }

  .app-combobox-toggle{
    color:#9aabc0;
  }

  .app-combobox-toggle:hover,
  .app-combobox-option:hover,
  .app-combobox-option.is-active,
  .app-combobox-option[aria-selected="true"]{
    color:#dbeafe;
    border-color:#315b87;
    background:#17304f;
  }

  .app-combobox-panel{
    border-color:#3b4d66;
    background:#111c2d;
  }

  .app-combobox-option-mark{
    border-color:#3b4d66;
    background:#17263b;
  }

  .app-combobox-option[aria-selected="true"] .app-combobox-option-mark{
    border-color:#3b8a57;
    background:#153421;
    color:#86efac;
  }

  .app-combobox-footer{
    border-color:#2c3f58;
    background:#0d1828;
  }

  .empty-state-cell.error-state{
    color:#fecaca;
    background:#32191d !important;
  }
}

/* =====================================================
   Průvodky: oddělené stavy, výběr podkategorií a PDF
   ===================================================== */
.print-options-intro{
  flex:1 1 220px;
  min-width:220px;
}

.print-options{
  flex-wrap:wrap;
}

.print-options .print-option-actions{
  flex:1 1 420px;
}

.print-options-intro .pdf-save-hint{
  max-width:360px;
  margin:7px 0 0;
  color:#315473;
  font-size:12px;
  font-weight:750;
  line-height:1.45;
}

.panel-title-block{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

.selection-count{
  display:inline-flex;
  align-items:center;
  min-height:25px;
  padding:2px 9px;
  border:1px solid #d8e3ee;
  border-radius:999px;
  background:#f3f7fb;
  color:#53677d;
  font-size:11px;
  font-weight:850;
  white-space:nowrap;
}

.pruvodky-state-tabs{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  padding:12px 16px;
  border-bottom:1px solid #e4ebf3;
  background:#f7fafc;
}

.pruvodky-state-tab{
  min-height:44px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  padding:8px 14px;
  border:1px solid #d4e0ec;
  border-radius:8px;
  background:#fff;
  color:#314c68;
  font:inherit;
  font-size:13px;
  font-weight:850;
  cursor:pointer;
  transition:border-color .15s ease,background .15s ease,color .15s ease,box-shadow .15s ease;
}

.pruvodky-state-tab:hover{
  border-color:#9eb9d7;
  background:#f7fbff;
  color:#0b4d96;
}

.pruvodky-state-tab.is-active{
  border-color:#1d66b2;
  background:#eaf3ff;
  color:#073d79;
  box-shadow:inset 0 0 0 1px rgba(29,102,178,.08);
}

.pruvodky-state-tab b{
  display:inline-grid;
  place-items:center;
  min-width:25px;
  height:25px;
  padding:0 7px;
  border-radius:999px;
  background:#e8eef5;
  color:#435b72;
  font-size:12px;
}

.pruvodky-state-tab.is-active b{
  background:#1764b1;
  color:#fff;
}

.pruvodky-state-view[hidden]{
  display:none;
}

.material-group > summary{
  flex-wrap:wrap;
}

.material-select-control{
  position:relative;
  z-index:2;
  min-height:32px;
  display:inline-flex;
  align-items:center;
  gap:7px;
  margin:0 0 0 6px;
  padding:5px 10px;
  border:1px solid #c9d9e9;
  border-radius:7px;
  background:#f4f8fc;
  color:#173b62;
  font-size:12px;
  font-weight:850;
  line-height:1.2;
  white-space:nowrap;
  cursor:pointer;
}

.material-select-control:hover{
  border-color:#91b3d6;
  background:#eaf3ff;
}

.material-select-control input{
  width:17px;
  height:17px;
  margin:0;
  accent-color:#1764b1;
  cursor:pointer;
}

.material-group summary .material-select-control span{
  display:inline!important;
  margin:0!important;
  color:inherit;
}

.pruvodky-state-empty{
  min-height:220px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:7px;
  padding:32px 20px;
  color:#5c7085;
  text-align:center;
}

.pruvodky-state-empty > span{
  width:46px;
  height:46px;
  display:grid;
  place-items:center;
  border:1px solid #c8d9e9;
  border-radius:14px;
  background:#eef5fb;
  color:#1764b1;
  font-size:23px;
  font-weight:900;
}

.pruvodky-state-empty strong{
  color:#173553;
  font-size:15px;
}

.pruvodky-state-empty p{
  margin:0;
  font-size:13px;
}

.pruvodky-filter-empty{
  margin:18px;
  padding:22px 16px;
  border:1px dashed #bfd0e1;
  border-radius:8px;
  background:#f7fafc;
  color:#536b82;
  text-align:center;
  font-size:13px;
  font-weight:750;
}

.pruvodky-filter-empty[hidden]{
  display:none;
}

@media (max-width:760px){
  .panel-title-block{
    width:100%;
    align-items:flex-start;
    justify-content:space-between;
  }

  .pruvodky-state-tabs{
    padding:10px 12px;
  }

  .pruvodky-state-tab{
    padding:8px;
  }

  .material-select-control{
    flex:1 1 calc(100% - 28px);
    width:auto;
    justify-content:center;
    margin:2px 0 0 28px;
  }
}

@media screen and (prefers-color-scheme:dark){
  .print-options-intro .pdf-save-hint{
    color:#a9bdd2;
  }

  .selection-count{
    border-color:#33475f;
    background:#17263a;
    color:#b9c8d8;
  }

  .pruvodky-state-tabs{
    border-color:#263a52;
    background:#0d1828;
  }

  .pruvodky-state-tab{
    border-color:#344960;
    background:#131f31;
    color:#c6d4e3;
  }

  .pruvodky-state-tab:hover,
  .pruvodky-state-tab.is-active{
    border-color:#4c80b8;
    background:#17304f;
    color:#eff6ff;
  }

  .pruvodky-state-tab b{
    background:#22344b;
    color:#c4d2e1;
  }

  .pruvodky-state-tab.is-active b{
    background:#2e78c4;
    color:#fff;
  }

  .material-select-control{
    border-color:#39516c;
    background:#17263a;
    color:#dbeafe;
  }

  .material-select-control:hover{
    border-color:#4c80b8;
    background:#17304f;
  }

  .pruvodky-state-empty{
    color:#9fb1c5;
  }

  .pruvodky-state-empty > span{
    border-color:#36506c;
    background:#172a41;
    color:#8fc2ff;
  }

  .pruvodky-state-empty strong{
    color:#e7f0fa;
  }

  .pruvodky-filter-empty{
    border-color:#3a5069;
    background:#111f31;
    color:#aebed0;
  }
}

/* =====================================================
   Bezpečná obnova hesla a správa přístupů
   ===================================================== */
.login-help-links{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:7px;
  margin-top:18px;
  padding-top:15px;
  border-top:1px solid #dce5ee;
  text-align:center;
}

.login-help-links a,
.login-secondary-link{
  color:#0b5fb3;
  font-weight:850;
  text-decoration:none;
}

.login-help-links a:hover,
.login-secondary-link:hover{
  text-decoration:underline;
}

.login-help-links span,
.password-help{
  color:#607287;
  font-size:12px;
  line-height:1.5;
}

.password-card{
  width:min(92vw,440px);
}

.password-back{
  width:100%;
  margin-top:14px;
}

.password-card .login-secondary-link{
  display:block;
  margin-top:16px;
  text-align:center;
}

.user-create-panel label.is-disabled{
  opacity:.55;
}

.password-security-note{
  display:flex;
  align-items:flex-start;
  gap:8px;
  padding:12px 14px;
  border-bottom:1px solid #dce6f0;
  background:#f1f7fd;
  color:#34506d;
  font-size:12px;
}

.password-security-note strong{
  color:#123b67;
  white-space:nowrap;
}

.user-table-panel .tabulka{
  min-width:1120px;
}

.account-recovery-form{
  min-width:230px;
  display:grid;
  grid-template-columns:minmax(150px,1fr) auto;
  gap:7px;
  align-items:center;
}

.account-recovery-form input{
  min-width:0;
  width:100%;
  min-height:36px;
  padding:7px 9px;
  border:1px solid #cad7e5;
  border-radius:7px;
  background:#fff;
  color:#142b46;
}

.recovery-state,
.password-updated{
  display:block;
  margin-top:6px;
  color:#6a7d91;
  font-size:11px;
  font-weight:750;
}

.recovery-state.is-ready{
  color:#19713c;
}

.password-change-form{
  min-width:260px;
  flex-wrap:wrap;
}

.password-change-form input[name="nove_heslo"]{
  min-width:145px;
  flex:1 1 145px;
}

.kypar-password-form{
  min-width:420px;
}

.kypar-password-form input[name="nove_heslo"]{
  border-color:#93afd0;
  background:#f5f9fe;
  font-family:ui-monospace,SFMono-Regular,Consolas,monospace;
  font-weight:800;
  letter-spacing:.03em;
}

@media (max-width:700px){
  .password-security-note{
    flex-direction:column;
  }

  .account-recovery-form{
    grid-template-columns:1fr;
  }
}

/* --------------------------------------------------------------------------
   Jednotný světlý / tmavý režim
   Tato vrstva je záměrně na konci souboru. Přepisuje starší dílčí barevné
   varianty a nevstupuje do tiskových šablon.
   -------------------------------------------------------------------------- */
@media screen {
  html[data-theme="light"]{
    color-scheme:light;
    --theme-bg:#eef3f7;
    --theme-bg-top:#f8fafc;
    --theme-surface:#ffffff;
    --theme-surface-2:#f3f6f9;
    --theme-field:#ffffff;
    --theme-text:#172033;
    --theme-heading:#102a43;
    --theme-muted:#5b6d80;
    --theme-line:#d3dde7;
    --theme-link:#075fae;
    --theme-hover:#eaf2f8;
    --theme-nav-1:#08243d;
    --theme-nav-2:#0d3b61;
    --theme-primary:#145184;
    --theme-primary-hover:#0d416d;
    --theme-success:#187a45;
    --theme-success-hover:#116738;
    --theme-danger:#b42318;
    --theme-danger-hover:#951d15;
    --theme-neutral:#526579;
    --theme-neutral-hover:#415267;
    --theme-focus:#14a85a;
    --theme-success-bg:#e9f7ef;
    --theme-success-text:#17683c;
    --theme-danger-bg:#fff0ef;
    --theme-danger-text:#9f2018;
    --theme-info-bg:#e9f3ff;
    --theme-info-text:#174e82;
    --theme-warning-bg:#fff8e8;
    --theme-glow:rgba(20,81,132,.10);
    --theme-shadow:0 10px 28px rgba(14,39,65,.09);

    --navy:#123e66;
    --navy-dark:#092944;
    --navy-soft:#1b659b;
    --green:#187a45;
    --green-dark:#116738;
    --green-soft:#e9f7ef;
    --red:#b42318;
    --grey:#d3dde7;
    --grey-dark:#526579;
    --text:var(--theme-text);
    --muted:var(--theme-muted);
    --surface:var(--theme-surface);
    --line:var(--theme-line);
    --bg:var(--theme-bg);
    --shadow:var(--theme-shadow);
    --field-bg:var(--theme-field);
  }

  html[data-theme="dark"]{
    color-scheme:dark;
    --theme-bg:#08111f;
    --theme-bg-top:#0d1828;
    --theme-surface:#111d2e;
    --theme-surface-2:#17263a;
    --theme-field:#0c1728;
    --theme-text:#e9f0f8;
    --theme-heading:#f7faff;
    --theme-muted:#aebdce;
    --theme-line:#33455e;
    --theme-link:#91c8ff;
    --theme-hover:#1b2d44;
    --theme-nav-1:#061421;
    --theme-nav-2:#0b2d4a;
    --theme-primary:#23699f;
    --theme-primary-hover:#2d7db9;
    --theme-success:#168348;
    --theme-success-hover:#1d9955;
    --theme-danger:#b83a36;
    --theme-danger-hover:#d24b46;
    --theme-neutral:#47596f;
    --theme-neutral-hover:#586d86;
    --theme-focus:#43d17f;
    --theme-success-bg:#102d21;
    --theme-success-text:#8ee6b1;
    --theme-danger-bg:#351b22;
    --theme-danger-text:#ffaaa5;
    --theme-info-bg:#142a42;
    --theme-info-text:#aad3ff;
    --theme-warning-bg:#2d2716;
    --theme-glow:rgba(45,125,185,.13);
    --theme-shadow:0 12px 30px rgba(0,0,0,.28);

    --navy:#dbeafe;
    --navy-dark:#f4f8ff;
    --navy-soft:#93c5fd;
    --green:#45cf7e;
    --green-dark:#67dc96;
    --green-soft:#102d21;
    --red:#ff928c;
    --grey:#3b4c62;
    --grey-dark:#b8c5d3;
    --text:var(--theme-text);
    --muted:var(--theme-muted);
    --surface:var(--theme-surface);
    --line:var(--theme-line);
    --bg:var(--theme-bg);
    --shadow:var(--theme-shadow);
    --field-bg:var(--theme-field);
  }

  html[data-theme] body,
  html[data-theme] body.admin-body,
  html[data-theme] body.deponie-body,
  html[data-theme] body.mode-body,
  html[data-theme] body.login-body,
  html[data-theme] body.kypar-body,
  html[data-theme] body.kypar-flow-page{
    background:
      radial-gradient(circle at 8% 0%,var(--theme-glow),transparent 31rem),
      linear-gradient(180deg,var(--theme-bg-top),var(--theme-bg)) !important;
    color:var(--theme-text) !important;
  }

  html[data-theme] a{
    color:var(--theme-link);
  }

  html[data-theme] .admin-nav,
  html[data-theme] .deponie-nav,
  html[data-theme] .app-settings-topbar,
  html[data-theme] .topbar,
  html[data-theme] .kypar-topbar,
  html[data-theme] .mode-header{
    background:linear-gradient(115deg,var(--theme-nav-1),var(--theme-nav-2)) !important;
    border-color:rgba(255,255,255,.16) !important;
    color:#f8fbff !important;
    box-shadow:0 7px 24px rgba(2,12,22,.22);
  }

  html[data-theme] .admin-nav a,
  html[data-theme] .admin-nav strong,
  html[data-theme] .deponie-nav a,
  html[data-theme] .deponie-nav strong,
  html[data-theme] .app-settings-topbar a,
  html[data-theme] .topbar a,
  html[data-theme] .mode-header a{
    color:#f8fbff !important;
  }

  html[data-theme] .admin-nav nav a:hover,
  html[data-theme] .admin-nav nav a.active,
  html[data-theme] .deponie-nav nav a:hover,
  html[data-theme] .deponie-nav nav a.active{
    background:rgba(255,255,255,.14) !important;
    color:#fff !important;
  }

  html[data-theme] .card,
  html[data-theme] .panel,
  html[data-theme] .mode-panel,
  html[data-theme] .mode-card,
  html[data-theme] .facility-card,
  html[data-theme] .stat-card,
  html[data-theme] .metric-grid > *,
  html[data-theme] .data-box,
  html[data-theme] .step,
  html[data-theme] .settings-folder,
  html[data-theme] .object-group,
  html[data-theme] .material-group,
  html[data-theme] .preset-folder,
  html[data-theme] .pruvodky-panel,
  html[data-theme] .pruvodka-item,
  html[data-theme] .filtry,
  html[data-theme] .tabulka-wrap,
  html[data-theme] .modal-card,
  html[data-theme] .login-card,
  html[data-theme] .empty-state,
  html[data-theme] .record-row,
  html[data-theme] .document-upload-form,
  html[data-theme] .document-preview,
  html[data-theme] .document-list,
  html[data-theme] .print-choice,
  html[data-theme] .tara-memory,
  html[data-theme] .historical-confirm,
  html[data-theme] .summary-grid > div,
  html[data-theme] .deponie-guide-summary,
  html[data-theme] .detail-weight-strip > div:not(.netto),
  html[data-theme] .user-create-panel,
  html[data-theme] .export-filter-card,
  html[data-theme] .export-so-block,
  html[data-theme] .export-summary-card,
  html[data-theme] .stat-hero-card,
  html[data-theme] .so-card,
  html[data-theme] .settings-link-card,
  html[data-theme] .app-combobox-panel,
  html[data-theme] .orp-quick-panel,
  html[data-theme] .flow-context-bar,
  html[data-theme] .deponie-progress,
  html[data-theme] .flow-progress-wrap{
    background:var(--theme-surface) !important;
    border-color:var(--theme-line) !important;
    color:var(--theme-text) !important;
    box-shadow:var(--theme-shadow);
  }

  html[data-theme] .settings-folder > summary,
  html[data-theme] .preset-folder > summary,
  html[data-theme] .object-group > summary,
  html[data-theme] .material-group > summary,
  html[data-theme] .pruvodky-state-tabs,
  html[data-theme] .pruvodky-state-tab,
  html[data-theme] .app-combobox-option,
  html[data-theme] .section-tabs,
  html[data-theme] .pagination,
  html[data-theme] .export-so-header{
    background:var(--theme-surface-2) !important;
    border-color:var(--theme-line) !important;
    color:var(--theme-text) !important;
  }

  html[data-theme] .mode-card:hover,
  html[data-theme] .facility-card:hover,
  html[data-theme] .settings-link-card:hover,
  html[data-theme] .pruvodka-item:hover,
  html[data-theme] .record-row:hover,
  html[data-theme] .app-combobox-option:hover,
  html[data-theme] .app-combobox-option[aria-selected="true"]{
    background:var(--theme-hover) !important;
    border-color:color-mix(in srgb,var(--theme-primary) 55%,var(--theme-line)) !important;
  }

  html[data-theme] .admin-main h1,
  html[data-theme] .admin-main h2,
  html[data-theme] .admin-main h3,
  html[data-theme] .deponie-main h1,
  html[data-theme] .deponie-main h2,
  html[data-theme] .deponie-main h3,
  html[data-theme] .mode-panel h1,
  html[data-theme] .mode-panel h2,
  html[data-theme] .mode-card h3,
  html[data-theme] .login-card h1,
  html[data-theme] .item-main strong,
  html[data-theme] .detail-list dd,
  html[data-theme] .document-list strong,
  html[data-theme] summary strong,
  html[data-theme] legend{
    color:var(--theme-heading) !important;
  }

  html[data-theme] .hint,
  html[data-theme] .sub,
  html[data-theme] small,
  html[data-theme] .muted,
  html[data-theme] .item-meta,
  html[data-theme] .detail-list dt,
  html[data-theme] .mode-kicker,
  html[data-theme] .app-combobox-count,
  html[data-theme] .empty-state p,
  html[data-theme] .stat-card span,
  html[data-theme] .stat-card small{
    color:var(--theme-muted) !important;
  }

  html[data-theme] input:not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
  html[data-theme] select,
  html[data-theme] textarea{
    background:var(--theme-field) !important;
    border-color:var(--theme-line) !important;
    color:var(--theme-text) !important;
    -webkit-text-fill-color:var(--theme-text);
    box-shadow:inset 0 1px 1px rgba(0,0,0,.04);
  }

  html[data-theme] input::placeholder,
  html[data-theme] textarea::placeholder{
    color:var(--theme-muted) !important;
    opacity:.9;
  }

  html[data-theme] input:disabled,
  html[data-theme] select:disabled,
  html[data-theme] textarea:disabled{
    background:var(--theme-surface-2) !important;
    color:var(--theme-muted) !important;
    -webkit-text-fill-color:var(--theme-muted);
    opacity:1;
  }

  html[data-theme] :is(a,button,input,select,textarea,summary):focus-visible{
    outline:3px solid color-mix(in srgb,var(--theme-focus) 75%,white);
    outline-offset:2px;
  }

  html[data-theme] .tabulka,
  html[data-theme] .permission-table,
  html[data-theme] .compact-table,
  html[data-theme] .export-table{
    background:var(--theme-surface) !important;
    color:var(--theme-text) !important;
    border-color:var(--theme-line) !important;
  }

  html[data-theme] .tabulka th,
  html[data-theme] .permission-table th,
  html[data-theme] .compact-table th,
  html[data-theme] .export-table th{
    background:var(--theme-surface-2) !important;
    color:var(--theme-heading) !important;
    border-color:var(--theme-line) !important;
  }

  html[data-theme] .tabulka td,
  html[data-theme] .permission-table td,
  html[data-theme] .compact-table td,
  html[data-theme] .export-table td{
    background:var(--theme-surface) !important;
    color:var(--theme-text) !important;
    border-color:var(--theme-line) !important;
  }

  html[data-theme] .tabulka-zebra tbody tr:nth-child(even) td,
  html[data-theme] .permission-table tbody tr:nth-child(even) td,
  html[data-theme] .compact-table tbody tr:nth-child(even) td,
  html[data-theme] .export-table tbody tr:nth-child(even) td{
    background:var(--theme-surface-2) !important;
  }

  html[data-theme] .tabulka tbody tr:hover td,
  html[data-theme] .permission-table tbody tr:hover td,
  html[data-theme] .compact-table tbody tr:hover td,
  html[data-theme] .export-table tbody tr:hover td{
    background:var(--theme-hover) !important;
  }

  html[data-theme] .btn-primary,
  html[data-theme] .btn-mini:not(.btn-danger):not(.btn-green):not(.btn-grey),
  html[data-theme] button.btn-primary{
    background:var(--theme-primary) !important;
    border-color:var(--theme-primary) !important;
    color:#fff !important;
  }

  html[data-theme] .btn-primary:hover,
  html[data-theme] .btn-mini:not(.btn-danger):not(.btn-green):not(.btn-grey):hover{
    background:var(--theme-primary-hover) !important;
    border-color:var(--theme-primary-hover) !important;
  }

  html[data-theme] .btn-green,
  html[data-theme] .btn-confirm,
  html[data-theme] button.btn-green{
    background:var(--theme-success) !important;
    border-color:var(--theme-success) !important;
    color:#fff !important;
  }

  html[data-theme] .btn-green:hover,
  html[data-theme] .btn-confirm:hover{
    background:var(--theme-success-hover) !important;
  }

  html[data-theme] .btn-danger,
  html[data-theme] button.btn-danger{
    background:var(--theme-danger) !important;
    border-color:var(--theme-danger) !important;
    color:#fff !important;
  }

  html[data-theme] .btn-danger:hover{
    background:var(--theme-danger-hover) !important;
  }

  html[data-theme] .btn-grey,
  html[data-theme] button.btn-grey{
    background:var(--theme-neutral) !important;
    border-color:var(--theme-neutral) !important;
    color:#fff !important;
  }

  html[data-theme] .btn-grey:hover{
    background:var(--theme-neutral-hover) !important;
  }

  html[data-theme] .alert.ok,
  html[data-theme] .alert.success,
  html[data-theme] .success-message,
  html[data-theme] .recovery-state.is-ready{
    background:var(--theme-success-bg) !important;
    border-color:color-mix(in srgb,var(--theme-success) 55%,var(--theme-line)) !important;
    color:var(--theme-success-text) !important;
  }

  html[data-theme] .alert.error,
  html[data-theme] .error-state,
  html[data-theme] .error-message{
    background:var(--theme-danger-bg) !important;
    border-color:color-mix(in srgb,var(--theme-danger) 55%,var(--theme-line)) !important;
    color:var(--theme-danger-text) !important;
  }

  html[data-theme] .alert.info,
  html[data-theme] .info-box,
  html[data-theme] .password-security-note{
    background:var(--theme-info-bg) !important;
    border-color:color-mix(in srgb,var(--theme-primary) 45%,var(--theme-line)) !important;
    color:var(--theme-info-text) !important;
  }

  html[data-theme] .deponie-action{
    background:var(--theme-surface) !important;
    border-color:var(--theme-line) !important;
    color:var(--theme-heading) !important;
    box-shadow:var(--theme-shadow);
  }

  html[data-theme] .deponie-action:hover{
    background:var(--theme-hover) !important;
    border-color:color-mix(in srgb,var(--theme-primary) 55%,var(--theme-line)) !important;
  }

  html[data-theme] .deponie-action-odvoz,
  html[data-theme] .detail-weight-strip .netto{
    background:linear-gradient(135deg,var(--theme-success),var(--theme-success-hover)) !important;
    border-color:var(--theme-success) !important;
    color:#fff !important;
  }

  html[data-theme] .deponie-action-odvoz *,
  html[data-theme] .detail-weight-strip .netto *{
    color:#fff !important;
  }

  html[data-theme] .deponie-progress .active,
  html[data-theme] .flow-progress-wrap .active,
  html[data-theme] .pruvodky-state-tab.is-active,
  html[data-theme] .section-tabs .active{
    background:var(--theme-primary) !important;
    border-color:var(--theme-primary) !important;
    color:#fff !important;
  }

  html[data-theme] .badge-ok{
    background:var(--theme-success-bg) !important;
    color:var(--theme-success-text) !important;
    border-color:color-mix(in srgb,var(--theme-success) 45%,var(--theme-line)) !important;
  }

  html[data-theme] .badge-muted,
  html[data-theme] .filter-badge,
  html[data-theme] .kod-badge{
    background:var(--theme-surface-2) !important;
    color:var(--theme-text) !important;
    border-color:var(--theme-line) !important;
  }

  html[data-theme] .modal{
    background:rgba(3,10,18,.72) !important;
    backdrop-filter:blur(3px);
  }

  html[data-theme] .theme-toggle{
    min-height:38px;
    padding:7px 11px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    flex:0 0 auto;
    border:1px solid rgba(255,255,255,.3);
    border-radius:999px;
    background:rgba(255,255,255,.11);
    color:#fff;
    font:inherit;
    font-size:13px;
    font-weight:800;
    line-height:1;
    letter-spacing:.01em;
    cursor:pointer;
    box-shadow:none;
    transition:background .16s ease,border-color .16s ease,transform .16s ease;
  }

  html[data-theme] .theme-toggle:hover{
    background:rgba(255,255,255,.2);
    border-color:rgba(255,255,255,.48);
    transform:translateY(-1px);
  }

  html[data-theme] .theme-toggle-icon{
    width:18px;
    font-size:17px;
    line-height:1;
    text-align:center;
  }

  html[data-theme] .theme-toggle-floating{
    position:fixed;
    right:16px;
    bottom:16px;
    z-index:1200;
    min-height:44px;
    padding:10px 14px;
    background:var(--theme-primary);
    border-color:var(--theme-primary);
    color:#fff;
    box-shadow:0 8px 26px rgba(0,0,0,.24);
  }

  html[data-theme] .theme-toggle-floating:hover{
    background:var(--theme-primary-hover);
  }

  html[data-theme="dark"] #screen-stavby button,
  html[data-theme="dark"] .stavba-card{
    background:var(--theme-surface) !important;
    border-color:var(--theme-line) !important;
    color:var(--theme-text) !important;
  }

  html[data-theme="light"] #screen-stavby button,
  html[data-theme="light"] .stavba-card{
    background:#fff !important;
    border-color:var(--theme-line) !important;
    color:var(--theme-text) !important;
  }

  @media (max-width:900px){
    html[data-theme] .theme-toggle{
      min-height:42px;
    }

    html[data-theme] .theme-toggle-label{
      display:none;
    }
  }

  @media (max-width:640px){
    html[data-theme] .theme-toggle{
      width:42px;
      padding:0;
    }

    html[data-theme] .theme-toggle-floating{
      width:auto;
      padding:10px 14px;
    }

    html[data-theme] .theme-toggle-floating .theme-toggle-label{
      display:inline;
    }
  }
}

/* =====================================================
   Režim Provozy a deponie
   ===================================================== */
.mode-body,
.deponie-body{
  min-height:100vh;
  background:#eef3f7;
}

.mode-shell{
  width:min(1120px,calc(100% - 32px));
  margin:0 auto;
  padding:32px 0;
}

.mode-shell-small{
  width:min(680px,calc(100% - 32px));
  padding-top:12vh;
}

.mode-header{
  display:flex;
  align-items:center;
  gap:14px;
  min-height:76px;
  padding:14px 18px;
  color:#fff;
  background:var(--navy-dark);
  border-bottom:4px solid var(--green);
}

.brand-mark{
  display:inline-grid;
  place-items:center;
  flex:0 0 38px;
  width:38px;
  height:38px;
  border-radius:7px;
  color:#fff;
  background:var(--green);
  font-weight:900;
  font-size:20px;
}

.mode-header h1{
  margin:0;
  font-size:22px;
}

.mode-header p{
  margin:2px 0 0;
  color:#c8d6e5;
  font-size:13px;
}

.mode-header>a,
.mode-header-actions{
  margin-left:auto;
}

.mode-header a{
  color:#e9f2fb;
  font-weight:700;
}

.mode-header-actions{
  display:flex;
  gap:16px;
  flex-wrap:wrap;
}

.mode-panel,
.panel{
  background:#fff;
  border:1px solid var(--line);
  border-radius:8px;
  box-shadow:0 5px 18px rgba(11,37,69,.07);
}

.mode-panel{
  padding:clamp(24px,4vw,48px);
}

.mode-panel>h1,
.mode-panel>h2{
  margin:4px 0 6px;
  color:var(--navy-dark);
  font-size:clamp(26px,4vw,38px);
}

.mode-panel>p{
  margin:0 0 26px;
  color:var(--muted);
}

.mode-kicker{
  display:block;
  color:var(--green-dark);
  font-size:11px;
  line-height:1.2;
  font-weight:900;
  letter-spacing:.09em;
  text-transform:uppercase;
}

.mode-grid,
.facility-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px;
}

.mode-card,
.facility-card{
  min-width:0;
  padding:24px;
  border:1px solid #cdd9e5;
  border-top:4px solid var(--navy);
  border-radius:8px;
  background:#fbfdff;
}

.mode-card-deponie,
.facility-card{
  border-top-color:var(--green);
}

.mode-card h3,
.facility-card h3{
  margin:8px 0 4px;
  color:var(--navy-dark);
  font-size:22px;
}

.mode-card p,
.facility-card p{
  color:var(--muted);
}

.mode-icon{
  display:grid;
  place-items:center;
  width:48px;
  height:48px;
  border:1px solid #a9bdcf;
  border-radius:7px;
  color:var(--navy);
  background:#eef5fb;
  font-size:25px;
  font-weight:900;
}

.facility-code,
.print-format{
  display:inline-block;
  color:var(--green-dark);
  font-size:11px;
  font-weight:900;
  letter-spacing:.08em;
}

.facility-card dl{
  margin:18px 0;
}

.facility-card dl div{
  display:flex;
  justify-content:space-between;
  gap:14px;
  padding:7px 0;
  border-bottom:1px solid #e8eef4;
}

.facility-card dt{
  color:var(--muted);
}

.facility-card dd{
  margin:0;
  text-align:right;
  font-weight:700;
}

.empty-state{
  padding:30px;
  text-align:center;
  border:1px dashed #aab9c8;
  border-radius:8px;
  background:#f8fafc;
}

.empty-state h2,
.empty-state h3{
  margin-top:0;
  color:var(--navy);
}

.empty-state-cell{
  padding:30px!important;
  text-align:center;
}

.deponie-nav{
  position:sticky;
  z-index:50;
  top:0;
  display:flex;
  align-items:center;
  gap:20px;
  min-height:62px;
  padding:8px 20px;
  color:#fff;
  background:var(--navy-dark);
  border-bottom:4px solid var(--green);
  box-shadow:0 4px 18px rgba(7,25,47,.18);
}

.deponie-brand{
  display:flex;
  align-items:center;
  gap:9px;
  color:#fff;
  text-decoration:none;
  white-space:nowrap;
  font-weight:900;
}

.deponie-nav nav{
  display:flex;
  align-items:stretch;
  gap:4px;
}

.deponie-nav nav a,
.deponie-nav-right a{
  min-height:42px;
  display:inline-flex;
  align-items:center;
  padding:8px 10px;
  border-radius:5px;
  color:#d9e7f5;
  text-decoration:none;
  font-weight:700;
  font-size:14px;
}

.deponie-nav nav a.active{
  color:#fff;
  background:#123d5d;
  box-shadow:inset 0 -3px 0 var(--green);
}

.deponie-nav-right{
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:8px;
  font-size:13px;
}

.deponie-current{
  display:flex;
  align-items:center;
  gap:5px;
  min-height:42px;
  padding:6px 10px;
  border:1px solid #365269;
  border-radius:6px;
}

.deponie-current a{
  min-height:0;
  padding:0 0 0 6px;
  color:#80d89c;
}

.deponie-mode-link{
  border:1px solid #365269;
}

.deponie-main{
  width:min(1500px,calc(100% - 32px));
  margin:0 auto;
  padding:24px 0 44px;
}

.page-heading-row{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  margin-bottom:18px;
}

.page-heading-row h1{
  margin:3px 0 2px;
  color:var(--navy-dark);
  font-size:clamp(25px,3vw,34px);
}

.page-heading-row p{
  margin:0;
  color:var(--muted);
}

.deponie-primary-actions{
  display:grid;
  grid-template-columns:1fr 1fr minmax(250px,.75fr);
  gap:12px;
  margin-bottom:18px;
}

.deponie-action{
  display:flex;
  align-items:center;
  gap:14px;
  min-height:88px;
  padding:16px 20px;
  border:2px solid var(--navy);
  border-radius:8px;
  color:var(--navy-dark);
  background:#fff;
  text-decoration:none;
  box-shadow:0 5px 16px rgba(11,37,69,.08);
}

.deponie-action-odvoz{
  color:#fff;
  background:var(--green);
  border-color:var(--green);
}

.deponie-action-navoz{
  border-color:#1b5c99;
}

.deponie-action-scan{
  border-color:#9aaabc;
}

.deponie-action .action-icon{
  display:grid;
  place-items:center;
  flex:0 0 45px;
  width:45px;
  height:45px;
  border:1px solid currentColor;
  border-radius:7px;
  font-size:27px;
  font-weight:900;
}

.deponie-action strong{
  display:block;
  font-size:clamp(17px,1.6vw,22px);
}

.deponie-action small{
  display:block;
  margin-top:2px;
  opacity:.78;
}

.metric-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin:16px 0;
}

.metric-grid article{
  min-width:0;
  padding:17px 20px;
  border:1px solid var(--line);
  border-left:4px solid var(--green);
  border-radius:8px;
  background:#fff;
  box-shadow:0 4px 14px rgba(11,37,69,.06);
}

.metric-grid span,
.metric-grid small{
  display:block;
  color:var(--muted);
}

.metric-grid strong{
  display:block;
  margin:3px 0;
  color:#087330;
  font-size:clamp(27px,3vw,40px);
  line-height:1.1;
}

.deponie-dashboard-grid{
  display:grid;
  grid-template-columns:minmax(0,2fr) minmax(330px,.9fr);
  gap:14px;
}

.deponie-dashboard-grid.single-column{
  grid-template-columns:minmax(0,1fr);
}

.dashboard-side{
  display:grid;
  align-content:start;
  gap:14px;
}

.panel{
  min-width:0;
  padding:18px;
}

.panel>h2,
.panel-heading h2{
  margin:2px 0 12px;
  color:var(--navy-dark);
  font-size:20px;
}

.panel-heading{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}

.panel-heading a{
  color:var(--green-dark);
  font-weight:800;
}

.count-badge{
  display:grid;
  place-items:center;
  min-width:30px;
  height:30px;
  border-radius:50%;
  color:#754e00;
  background:#fff0c9;
  font-weight:900;
}

.responsive-records{
  min-width:0;
}

.records-head,
.record-row{
  display:grid;
  grid-template-columns:125px minmax(170px,1.25fr) 100px minmax(180px,1.4fr) 95px 145px;
  gap:10px;
  align-items:center;
}

.records-head{
  padding:8px 10px;
  color:var(--muted);
  border-bottom:1px solid #cbd7e2;
  font-size:12px;
  font-weight:800;
}

.record-row{
  min-height:67px;
  padding:10px;
  border-bottom:1px solid #e1e8ef;
}

.record-row:last-child{
  border-bottom:0;
}

.record-row>div{
  min-width:0;
  overflow-wrap:anywhere;
}

.record-row strong,
.record-row small,
.record-row span{
  display:block;
}

.record-row small{
  margin-top:3px;
  color:var(--muted);
  font-size:11px;
}

.direction-badge{
  display:inline-flex!important;
  width:max-content;
  align-items:center;
  justify-content:center;
  min-height:24px;
  padding:3px 7px;
  border:1px solid;
  border-radius:4px;
  font-size:10px;
  font-weight:900;
  letter-spacing:.04em;
}

.direction-badge.odvoz{
  color:#096b31;
  border-color:#7ac995;
  background:#e7f8ec;
}

.direction-badge.navoz{
  color:#155a99;
  border-color:#82b7e4;
  background:#eaf4ff;
}

.record-actions{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
}

.btn-primary,
.btn-green,
.btn-grey,
.btn-danger,
.btn-confirm{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:9px 14px;
  text-decoration:none;
}

.record-actions .btn-grey,
.record-actions .btn-primary,
.record-actions .btn-danger{
  min-height:34px;
  padding:6px 9px;
  font-size:12px;
}

.pending-panel{
  border-color:#e6c26f;
  background:#fffcf4;
}

.pending-list article,
.material-summary>div{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 0;
  border-bottom:1px solid #e5ebf1;
}

.pending-list article:last-child,
.material-summary>div:last-child{
  border-bottom:0;
}

.pending-list article>div{
  min-width:0;
}

.pending-list strong,
.pending-list small{
  display:block;
  margin-top:3px;
}

.pending-list small{
  color:var(--muted);
}

.direction-dot{
  display:inline-block;
  width:9px;
  height:9px;
  margin-right:7px;
  border-radius:50%;
  background:#1f6db3;
}

.direction-dot.odvoz{
  background:var(--green);
}

.muted{
  color:var(--muted);
}

.flow-context-bar{
  display:grid;
  grid-template-columns:120px 1fr 120px;
  align-items:center;
  gap:16px;
  width:min(980px,calc(100% - 32px));
  margin:18px auto 0;
}

.flow-context-bar>div{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  min-width:0;
}

.flow-context-bar>span{
  color:var(--muted);
  text-align:right;
  font-weight:800;
}

.deponie-progress{
  width:min(920px,calc(100% - 32px));
  margin:16px auto;
}

.deponie-progress ol{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  margin:0;
  padding:0;
  list-style:none;
}

.deponie-progress li{
  position:relative;
  display:grid;
  justify-items:center;
  gap:5px;
  color:#738399;
  font-size:11px;
  font-weight:800;
}

.deponie-progress li::before{
  content:"";
  position:absolute;
  z-index:-1;
  top:17px;
  right:50%;
  width:100%;
  height:3px;
  background:#cbd7e2;
}

.deponie-progress li:first-child::before{
  display:none;
}

.deponie-progress li span{
  display:grid;
  place-items:center;
  width:36px;
  height:36px;
  border:3px solid #cbd7e2;
  border-radius:50%;
  color:#53667a;
  background:#fff;
}

.deponie-progress li.current span{
  border-color:var(--green);
  color:#fff;
  background:var(--green);
}

.deponie-progress li.complete span{
  border-color:#78b58f;
  color:#086b30;
  background:#e7f8ec;
}

.deponie-progress li.complete::before,
.deponie-progress li.current::before{
  background:#78b58f;
}

.deponie-flow-main{
  width:min(920px,calc(100% - 32px));
  margin:0 auto 40px;
}

.deponie-step{
  display:none;
  min-height:500px;
  padding:clamp(22px,4vw,40px);
  border:1px solid var(--line);
  border-top:5px solid var(--green);
  border-radius:8px;
  background:#fff;
  box-shadow:0 8px 26px rgba(11,37,69,.08);
}

.deponie-step.active{
  display:block;
}

.step-heading h1{
  margin:3px 0;
  color:var(--navy-dark);
  font-size:clamp(27px,4vw,38px);
}

.step-heading p{
  margin:0 0 22px;
  color:var(--muted);
}

.deponie-qr-reader{
  min-height:300px;
  margin:14px 0;
  border:1px solid #244965;
}

.flow-divider{
  display:flex;
  align-items:center;
  gap:12px;
  margin:20px 0;
  color:var(--muted);
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
}

.flow-divider::before,
.flow-divider::after{
  content:"";
  height:1px;
  flex:1;
  background:#d6e0e9;
}

.flow-footer-actions{
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-top:24px;
}

.flow-footer-actions .btn-big{
  width:auto;
  min-width:190px;
  margin:0;
}

.form-grid.two{
  grid-template-columns:repeat(2,minmax(0,1fr));
}

.form-grid .span-2{
  grid-column:span 2;
}

.touch-form label,
.facility-form label,
.statistics-filter label{
  color:var(--navy);
  font-weight:800;
}

.touch-form input,
.facility-form input,
.facility-form textarea,
.statistics-filter input,
.statistics-filter select{
  width:100%;
  min-height:48px;
  margin-top:6px;
  padding:10px 12px;
  border:1px solid #aab9c8;
  border-radius:6px;
  background:#fff;
}

.facility-form textarea{
  resize:vertical;
}

.deponie-guide-summary{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:0 18px;
  margin-bottom:20px;
}

.deponie-guide-summary>div{
  padding:9px 0;
  border-bottom:1px solid #e2e8ef;
}

.deponie-guide-summary span,
.deponie-guide-summary strong{
  display:block;
}

.deponie-guide-summary span{
  color:var(--muted);
  font-size:12px;
}

.tara-memory,
.historical-confirm{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin:18px 0;
  padding:18px;
  border:2px solid #74bd90;
  border-radius:8px;
  background:#eef9f2;
}

.tara-memory strong,
.historical-confirm strong{
  display:block;
  color:#087330;
  font-size:30px;
}

.tara-memory small{
  display:block;
  color:var(--muted);
}

.tara-memory-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.alert.info{
  color:#155a8c;
  background:#e9f4fd;
}

.alert.success{
  color:#086b30;
  background:#e7f8ec;
}

.weight-label{
  display:block;
  margin-top:25px;
  color:var(--navy);
  font-weight:900;
  text-align:center;
  font-size:17px;
}

.weight-input-wrap{
  display:flex;
  align-items:center;
  width:min(600px,100%);
  margin:10px auto;
  border:3px solid var(--navy);
  border-radius:9px;
  background:#fff;
  overflow:hidden;
}

.weight-input-wrap input{
  min-width:0;
  width:100%;
  padding:22px 15px;
  border:0;
  outline:0;
  color:var(--navy-dark);
  background:#fff;
  text-align:right;
  font-size:clamp(42px,9vw,70px);
  font-weight:900;
}

.weight-input-wrap span{
  padding:0 20px;
  color:var(--muted);
  font-size:24px;
  font-weight:900;
}

.source-note{
  color:var(--muted);
  text-align:center;
}

.check-row{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 0;
  font-weight:700;
}

.check-row input{
  width:23px;
  height:23px;
}

.netto-preview,
.summary-netto{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin:20px 0;
  padding:18px 22px;
  color:#fff;
  background:var(--green);
  border-radius:8px;
}

.netto-preview strong,
.summary-netto strong{
  font-size:clamp(30px,5vw,48px);
}

.summary-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  border:1px solid #cdd8e3;
  border-radius:8px;
  overflow:hidden;
}

.summary-grid>div{
  min-width:0;
  padding:12px 15px;
  border-right:1px solid #e1e8ef;
  border-bottom:1px solid #e1e8ef;
}

.summary-grid span,
.summary-grid strong{
  display:block;
}

.summary-grid span{
  color:var(--muted);
  font-size:12px;
}

.deponie-done{
  padding-top:10px;
}

.done-check{
  display:grid;
  place-items:center;
  width:80px;
  height:80px;
  margin:0 auto 12px;
  border-radius:50%;
  color:#fff;
  background:var(--green);
  font-size:48px;
  font-weight:900;
}

.done-print-actions,
.done-next{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin:20px 0;
}

.done-next{
  grid-template-columns:repeat(2,minmax(0,1fr));
}

.done-print-actions .btn-big,
.done-next .btn-big{
  width:auto;
  margin:0;
}

.settings-layout{
  display:grid;
  grid-template-columns:minmax(0,1.35fr) minmax(300px,.65fr);
  gap:14px;
}

.facility-form .btn-big{
  width:auto;
}

.panel hr{
  height:1px;
  margin:24px 0;
  border:0;
  background:#dce5ee;
}

.permission-table-wrap,
.compact-table-wrap{
  max-width:100%;
  overflow:auto;
  margin-bottom:14px;
}

.permission-table,
.compact-table{
  width:100%;
  border-collapse:collapse;
}

.permission-table th,
.permission-table td,
.compact-table th,
.compact-table td{
  padding:9px 10px;
  border-bottom:1px solid #e1e8ef;
  text-align:left;
}

.permission-table th,
.compact-table th{
  color:var(--muted);
  background:#f5f8fa;
  font-size:12px;
}

.permission-table input[type="checkbox"]{
  width:21px;
  height:21px;
}

.facility-admin-list article{
  padding:14px 0;
  border-bottom:1px solid #e1e8ef;
}

.facility-admin-list article:last-child{
  border-bottom:0;
}

.facility-admin-list h3{
  margin:3px 0;
}

.facility-admin-list p{
  margin:0 0 3px;
  color:var(--muted);
}

.facility-admin-list .record-actions{
  margin-top:10px;
}

.facility-admin-list .record-actions form{
  margin:0;
}

.facility-admin-list .is-inactive{
  opacity:.58;
}

.stats-filter-grid{
  grid-template-columns:repeat(5,minmax(135px,1fr));
}

.statistics-filter .filter-actions{
  margin-top:14px;
}

.analytics-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  margin-bottom:14px;
}

.detail-weight-strip{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  margin-bottom:14px;
  border:1px solid #b8c8d7;
  border-radius:8px;
  background:#fff;
  overflow:hidden;
}

.detail-weight-strip>div{
  padding:20px;
  border-right:1px solid #dce5ee;
}

.detail-weight-strip>div:last-child{
  border:0;
}

.detail-weight-strip span,
.detail-weight-strip strong,
.detail-weight-strip small{
  display:block;
}

.detail-weight-strip span,
.detail-weight-strip small{
  color:var(--muted);
}

.detail-weight-strip strong{
  color:var(--navy-dark);
  font-size:clamp(25px,4vw,40px);
}

.detail-weight-strip .netto{
  color:#fff;
  background:var(--green);
}

.detail-weight-strip .netto span,
.detail-weight-strip .netto strong{
  color:#fff;
}

.detail-grid{
  display:grid;
  grid-template-columns:minmax(300px,.75fr) minmax(0,1.25fr);
  gap:14px;
}

.detail-list{
  margin:0;
}

.detail-list>div{
  display:grid;
  grid-template-columns:150px minmax(0,1fr);
  gap:14px;
  padding:10px 0;
  border-bottom:1px solid #e2e8ef;
}

.detail-list dt{
  color:var(--muted);
}

.detail-list dd{
  margin:0;
  font-weight:750;
  overflow-wrap:anywhere;
}

.document-upload-form{
  display:grid;
  gap:12px;
  margin-bottom:20px;
  padding:14px;
  border:1px dashed #9eb0c0;
  border-radius:8px;
  background:#f7fafc;
}

.document-upload-form label{
  font-weight:800;
}

.document-upload-form input[type="text"],
.document-upload-form input:not([type]){
  width:100%;
  min-height:46px;
  padding:9px 11px;
}

.file-drop{
  display:grid;
  gap:3px;
  padding:18px;
  border:2px dashed #7f95a8;
  border-radius:8px;
  text-align:center;
  cursor:pointer;
}

.file-drop input{
  width:100%;
}

.file-drop small{
  color:var(--muted);
}

.document-preview{
  padding:10px;
  border:1px solid #cad6e1;
  border-radius:7px;
  background:#fff;
  text-align:center;
}

.document-preview img{
  display:block;
  max-width:100%;
  max-height:360px;
  margin:auto;
  object-fit:contain;
}

.document-list article{
  display:grid;
  grid-template-columns:50px minmax(0,1fr) auto;
  gap:12px;
  align-items:center;
  padding:12px 0;
  border-bottom:1px solid #e1e8ef;
}

.document-type{
  display:grid;
  place-items:center;
  width:46px;
  height:46px;
  border:1px solid #9cb0c2;
  border-radius:6px;
  color:var(--navy);
  background:#eef4f8;
  font-size:11px;
  font-weight:900;
}

.document-list strong,
.document-list small{
  display:block;
}

.document-list small{
  margin-top:3px;
  color:var(--muted);
}

.print-hub-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}

.print-choice{
  border-top:4px solid var(--green);
}

.print-choice h2{
  margin:6px 0;
  font-size:26px;
}

.print-choice-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:18px;
}

.print-choice-actions .btn-big{
  width:auto;
  margin:0;
}

.browser-limit{
  margin-top:14px;
}

@media (max-width:1150px){
  .deponie-nav{
    flex-wrap:wrap;
    gap:5px 12px;
  }

  .deponie-nav-right{
    width:100%;
    margin-left:0;
    padding-top:4px;
    border-top:1px solid #29465d;
  }

  .stats-filter-grid{
    grid-template-columns:repeat(3,minmax(150px,1fr));
  }
}

@media (max-width:900px){
  .deponie-primary-actions{
    grid-template-columns:1fr 1fr;
  }

  .deponie-action-scan{
    grid-column:span 2;
  }

  .metric-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .deponie-dashboard-grid,
  .settings-layout,
  .detail-grid{
    grid-template-columns:minmax(0,1fr);
  }

  .records-head{
    display:none;
  }

  .record-row{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:14px;
    margin:10px 0;
    padding:14px;
    border:1px solid #d5e0e9;
    border-left:4px solid var(--green);
    border-radius:7px;
    background:#fff;
  }

  .record-row>div::before{
    content:attr(data-label);
    display:block;
    margin-bottom:3px;
    color:var(--muted);
    font-size:10px;
    font-weight:800;
    text-transform:uppercase;
  }

  .analytics-grid{
    grid-template-columns:minmax(0,1fr);
  }
}

@media (max-width:680px){
  .mode-shell,
  .deponie-main,
  .deponie-flow-main,
  .flow-context-bar,
  .deponie-progress{
    width:min(100% - 20px,100%);
  }

  .mode-shell{
    padding:10px 0 24px;
  }

  .mode-header{
    align-items:flex-start;
    flex-wrap:wrap;
  }

  .mode-header>a,
  .mode-header-actions{
    width:100%;
    margin-left:52px;
  }

  .mode-grid,
  .facility-grid,
  .form-grid.two,
  .summary-grid,
  .print-hub-grid{
    grid-template-columns:minmax(0,1fr);
  }

  .form-grid .span-2{
    grid-column:auto;
  }

  .deponie-nav{
    position:static;
    padding:8px 10px;
  }

  .deponie-nav nav{
    order:3;
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    width:100%;
  }

  .deponie-nav nav a{
    justify-content:center;
  }

  .deponie-nav-right{
    display:grid;
    grid-template-columns:1fr auto;
  }

  .deponie-current{
    grid-column:1/-1;
    justify-content:space-between;
  }

  .page-heading-row{
    align-items:stretch;
    flex-direction:column;
  }

  .deponie-primary-actions{
    grid-template-columns:minmax(0,1fr);
  }

  .deponie-action-scan{
    grid-column:auto;
  }

  .deponie-action{
    min-height:78px;
  }

  .metric-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
  }

  .metric-grid article{
    padding:13px;
  }

  .metric-grid strong{
    font-size:25px;
  }

  .flow-context-bar{
    grid-template-columns:auto 1fr auto;
    gap:8px;
  }

  .flow-context-bar>div{
    align-items:flex-start;
    flex-direction:column;
    gap:4px;
  }

  .flow-context-bar>span{
    font-size:12px;
  }

  .deponie-progress li small{
    display:none;
  }

  .deponie-step{
    min-height:0;
    padding:20px 14px;
  }

  .flow-footer-actions{
    align-items:stretch;
    flex-direction:column-reverse;
  }

  .flow-footer-actions .btn-big{
    width:100%;
  }

  .deponie-guide-summary{
    grid-template-columns:minmax(0,1fr);
  }

  .tara-memory,
  .historical-confirm{
    align-items:stretch;
    flex-direction:column;
  }

  .tara-memory-actions{
    display:grid;
    grid-template-columns:minmax(0,1fr);
  }

  .done-print-actions,
  .done-next{
    grid-template-columns:minmax(0,1fr);
  }

  .stats-filter-grid{
    grid-template-columns:minmax(0,1fr);
  }

  .detail-weight-strip{
    grid-template-columns:minmax(0,1fr);
  }

  .detail-weight-strip>div{
    border-right:0;
    border-bottom:1px solid #dce5ee;
  }

  .detail-list>div{
    grid-template-columns:minmax(0,1fr);
    gap:2px;
  }

  .document-list article{
    grid-template-columns:46px minmax(0,1fr);
  }

  .document-list .record-actions{
    grid-column:1/-1;
  }

  .record-row{
    grid-template-columns:minmax(0,1fr);
  }

  .permission-table-wrap,
  .compact-table-wrap{
    overflow:visible;
  }

  .permission-table,
  .permission-table tbody,
  .permission-table tr,
  .permission-table td,
  .compact-table,
  .compact-table tbody,
  .compact-table tr,
  .compact-table td{
    display:block;
    width:100%;
  }

  .permission-table thead,
  .compact-table thead{
    display:none;
  }

  .permission-table tr,
  .compact-table tr{
    margin-bottom:10px;
    padding:9px;
    border:1px solid #dbe4ec;
    border-radius:6px;
  }

  .permission-table td,
  .compact-table td{
    padding:5px;
    border:0;
  }

  .permission-table td{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:10px;
  }

  .permission-table td:first-child{
    padding-bottom:9px;
    border-bottom:1px solid #e2e8ef;
  }

  .permission-table td:nth-child(1)::before{content:"Přístup k zařízení";}
  .permission-table td:nth-child(2)::before{content:"Uživatel";}
  .permission-table td:nth-child(3)::before{content:"Role";}
  .permission-table td:nth-child(4)::before{content:"Vážení";}
  .permission-table td:nth-child(5)::before{content:"Statistiky";}
  .permission-table td:nth-child(6)::before{content:"Dokumenty";}

  .permission-table td::before{
    color:var(--muted);
    font-size:12px;
    font-weight:800;
  }
}

@media print{
  .deponie-nav,
  .flow-context-bar,
  .deponie-progress{
    display:none!important;
  }
}

@media screen and (prefers-color-scheme:dark){
  .login-help-links{
    border-color:#304158;
  }

  .login-help-links a,
  .login-secondary-link{
    color:#8fc2ff;
  }

  .login-help-links span,
  .password-help,
  .recovery-state,
  .password-updated{
    color:#a8b8ca;
  }

  .password-security-note{
    border-color:#2c4058;
    background:#10233a;
    color:#bdd0e4;
  }

  .password-security-note strong{
    color:#e7f2ff;
  }

  .account-recovery-form input,
  .kypar-password-form input[name="nove_heslo"]{
    border-color:#3a506b;
    background:#111f31;
    color:#edf5ff;
  }

  .recovery-state.is-ready{
    color:#86efac;
  }
}

/* Uživatelé: tabulka má přednost před bočním formulářem.
   Díky celé šířce se na běžném desktopu zobrazí bez vodorovného posuvu. */
.users-folder .user-workbench{
  grid-template-columns:minmax(0,1fr);
}

.users-folder .user-create-panel{
  display:flex;
  flex-flow:row wrap;
  align-items:flex-end;
  gap:12px;
}

.users-folder .user-create-panel h2{
  flex:1 0 100%;
}

.users-folder .user-create-panel label{
  flex:1 1 190px;
  min-width:0;
}

.users-folder .user-create-panel .hint{
  flex:1 1 620px;
  margin:0;
}

.users-folder .user-create-panel .btn-green{
  flex:0 0 auto;
  align-self:flex-end;
  margin-top:0;
}

.user-table-panel{
  container:user-table / inline-size;
}

/* Když se šest sloupců už opravdu nevejde, řádek se přeskupí do přehledné
   karty. Všechny údaje i ovládací prvky zůstávají viditelné bez scrollování. */
@container user-table (max-width:1119px){
  .user-table-panel .tabulka{
    min-width:0;
  }

  .user-table-panel .tabulka thead{
    position:absolute;
    width:1px;
    height:1px;
    padding:0;
    margin:-1px;
    overflow:hidden;
    clip:rect(0 0 0 0);
    white-space:nowrap;
    border:0;
  }

  .user-table-panel .tabulka tbody{
    display:block;
  }

  .user-table-panel .tabulka tbody tr{
    display:grid;
    grid-template-columns:minmax(72px,.55fr) minmax(120px,1fr) minmax(130px,1fr);
    grid-template-areas:
      "user-id user-name user-role"
      "recovery recovery recovery"
      "password password action";
    border-bottom:1px solid var(--line);
  }

  .user-table-panel .tabulka tbody tr:last-child{
    border-bottom:0;
  }

  .user-table-panel .tabulka tbody td{
    min-width:0;
    height:auto;
    padding:12px 14px;
    white-space:normal;
    border:0;
  }

  .user-table-panel .tabulka tbody td::before{
    display:block;
    margin-bottom:6px;
    color:var(--muted);
    font-size:10px;
    font-weight:900;
    line-height:1.2;
    letter-spacing:.04em;
    text-transform:uppercase;
  }

  .user-table-panel .tabulka tbody td:nth-child(1){
    grid-area:user-id;
  }

  .user-table-panel .tabulka tbody td:nth-child(1)::before{
    content:"ID";
  }

  .user-table-panel .tabulka tbody td:nth-child(2){
    grid-area:user-name;
  }

  .user-table-panel .tabulka tbody td:nth-child(2)::before{
    content:"Jméno";
  }

  .user-table-panel .tabulka tbody td:nth-child(3){
    grid-area:user-role;
  }

  .user-table-panel .tabulka tbody td:nth-child(3)::before{
    content:"Role";
  }

  .user-table-panel .tabulka tbody td:nth-child(4){
    grid-area:recovery;
  }

  .user-table-panel .tabulka tbody td:nth-child(4)::before{
    content:"Obnova účtu";
  }

  .user-table-panel .tabulka tbody td:nth-child(5){
    grid-area:password;
  }

  .user-table-panel .tabulka tbody td:nth-child(5)::before{
    content:"Nové heslo";
  }

  .user-table-panel .tabulka tbody td:nth-child(6){
    grid-area:action;
    text-align:left;
  }

  .user-table-panel .tabulka tbody td:nth-child(6)::before{
    content:"Akce";
  }

  .user-table-panel .account-recovery-form,
  .user-table-panel .password-change-form,
  .user-table-panel .kypar-password-form{
    min-width:0;
  }

  .user-table-panel .password-change-form{
    display:flex;
    flex-wrap:wrap;
  }

  .user-table-panel .password-change-form input[name="nove_heslo"]{
    min-width:180px;
  }
}

@media (max-width:700px){
  .users-folder .user-create-panel{
    flex-direction:column;
    align-items:stretch;
  }

  .users-folder .user-create-panel h2,
  .users-folder .user-create-panel label,
  .users-folder .user-create-panel .hint,
  .users-folder .user-create-panel .btn-green{
    width:100%;
    flex:none;
  }

  .user-table-panel .tabulka tbody tr{
    grid-template-columns:minmax(0,1fr);
    grid-template-areas:
      "user-id"
      "user-name"
      "user-role"
      "recovery"
      "password"
      "action";
  }

  .user-table-panel .account-recovery-form{
    grid-template-columns:minmax(0,1fr);
  }

  .user-table-panel .password-change-form{
    align-items:stretch;
    flex-direction:column;
  }

  .user-table-panel .password-change-form input[name="nove_heslo"],
  .user-table-panel .password-change-form .btn-mini{
    width:100%;
    min-width:0;
  }
}

/* Pozdní přepisy prvků režimu deponie, jehož komponenty jsou definované níže
   než původní společná vrstva motivu. */
@media screen {
  html[data-theme] .deponie-step,
  html[data-theme] .weight-input-wrap,
  html[data-theme] .detail-weight-strip,
  html[data-theme] .file-drop{
    background:var(--theme-surface) !important;
    border-color:var(--theme-line) !important;
    color:var(--theme-text) !important;
    box-shadow:var(--theme-shadow);
  }

  html[data-theme] .mode-icon,
  html[data-theme] .document-type,
  html[data-theme] .deponie-progress li span{
    background:var(--theme-surface-2) !important;
    border-color:var(--theme-line) !important;
    color:var(--theme-link) !important;
  }

  html[data-theme] .deponie-progress li{
    color:var(--theme-muted) !important;
  }

  html[data-theme] .deponie-progress li::before{
    background:var(--theme-line) !important;
  }

  html[data-theme] .deponie-progress li.current span{
    background:var(--theme-success) !important;
    border-color:var(--theme-success) !important;
    color:#fff !important;
  }

  html[data-theme] .deponie-progress li.complete span{
    background:var(--theme-success-bg) !important;
    border-color:var(--theme-success) !important;
    color:var(--theme-success-text) !important;
  }

  html[data-theme] .deponie-progress li.complete::before,
  html[data-theme] .deponie-progress li.current::before{
    background:var(--theme-success) !important;
  }

  html[data-theme] .direction-badge.odvoz{
    background:var(--theme-success-bg) !important;
    border-color:var(--theme-success) !important;
    color:var(--theme-success-text) !important;
  }

  html[data-theme] .direction-badge.navoz{
    background:var(--theme-info-bg) !important;
    border-color:var(--theme-primary) !important;
    color:var(--theme-info-text) !important;
  }

  html[data-theme] .pending-panel{
    background:var(--theme-warning-bg) !important;
    border-color:#c99628 !important;
  }

  html[data-theme] .weight-input-wrap input{
    background:var(--theme-field) !important;
    color:var(--theme-heading) !important;
    -webkit-text-fill-color:var(--theme-heading);
  }

  html[data-theme] .btn-confirm,
  html[data-theme] button.btn-confirm{
    background:var(--theme-success) !important;
    border-color:var(--theme-success) !important;
    color:#fff !important;
  }

  html[data-theme] .btn-confirm:hover{
    background:var(--theme-success-hover) !important;
  }

  html[data-theme] .account-recovery-form input,
  html[data-theme] .kypar-password-form input[name="nove_heslo"]{
    background:var(--theme-field) !important;
    border-color:var(--theme-line) !important;
    color:var(--theme-text) !important;
    -webkit-text-fill-color:var(--theme-text);
  }
}

/* ============================================================
   Deponie — dashboard hlavních akcí a bilance (modul v2)
   ============================================================ */
.dep-actions{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
  gap:16px;
  margin-bottom:24px;
}
.dep-action{
  display:flex;flex-direction:column;gap:4px;
  padding:22px 20px;
  border-radius:10px;
  text-decoration:none;
  color:#fff;
  min-height:120px;
  box-shadow:var(--shadow);
  transition:transform .15s,box-shadow .15s,filter .15s;
  /* Theme-safe: --theme-* zůstává tmavé s bílým textem ve světlém i tmavém režimu. */
  background:var(--theme-primary,#123e66);
}
.dep-action:hover{transform:translateY(-3px);box-shadow:0 14px 30px rgba(11,37,69,.28);filter:brightness(1.06);}
.dep-action:active{transform:translateY(0);}
.dep-action-navoz{background:var(--theme-success,#187a45);}
.dep-action-odvoz{background:#b3671a;}
.dep-action-pruvodka{background:var(--theme-primary,#123e66);}
.dep-action-icon{font-size:30px;line-height:1;color:#fff;}
.dep-action-title{font-size:22px;font-weight:900;color:#fff;}
.dep-action-sub{font-size:13px;opacity:.92;color:#fff;}

.dep-reports{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:14px;
  margin-top:22px;
}
.dep-report{
  display:flex;flex-direction:column;gap:4px;
  padding:18px;
  border-radius:12px;
  text-decoration:none;
  background:var(--surface);
  border:1px solid var(--line);
  border-left:4px solid var(--green);
  box-shadow:var(--shadow);
  transition:transform .15s,box-shadow .15s;
}
.dep-report:hover{transform:translateY(-2px);box-shadow:0 12px 26px rgba(11,37,69,.16);}
.dep-report-title{font-size:16px;font-weight:800;color:var(--navy);}
.dep-report-sub{font-size:13px;color:var(--muted);}

.bilance-bars{display:flex;flex-direction:column;gap:10px;margin-top:12px;}
.bilance-bar-row{display:grid;grid-template-columns:minmax(120px,1.4fr) 3fr auto;align-items:center;gap:12px;}
.bilance-bar-label{font-weight:700;color:var(--text);font-size:14px;}
.bilance-bar-track{background:var(--bg);border-radius:8px;height:22px;overflow:hidden;border:1px solid var(--line);}
.bilance-bar-fill{height:100%;background:linear-gradient(90deg,var(--green),#3fa76a);border-radius:8px 0 0 8px;min-width:3px;}
.bilance-bar-fill.negativ{background:linear-gradient(90deg,#b23b3b,#d9663f);}
.bilance-bar-value{font-weight:800;color:var(--navy);font-size:14px;white-space:nowrap;text-align:right;min-width:70px;}

.bilance-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:18px;}
.bilance-tab{
  padding:10px 16px;border-radius:9px;text-decoration:none;
  background:var(--surface);border:1px solid var(--line);color:var(--navy);
  font-weight:700;font-size:14px;transition:background .15s,border-color .15s;
}
.bilance-tab:hover{border-color:var(--navy-soft);}
.bilance-tab.active{background:var(--theme-primary,#123e66);color:#fff;border-color:var(--theme-primary,#123e66);}

@media (max-width:560px){
  .bilance-bar-row{grid-template-columns:1fr auto;grid-template-areas:"label value" "track track";}
  .bilance-bar-label{grid-area:label;}
  .bilance-bar-value{grid-area:value;}
  .bilance-bar-track{grid-area:track;}
}

/* ============================================================
   Deponie — průvodce návozem/odvozem (flow, v2)
   ============================================================ */
.dep-flow .dep-step{margin-bottom:18px;}
.dep-steps{display:flex;flex-wrap:wrap;gap:6px;list-style:none;padding:0;margin:0 0 18px;counter-reset:depstep;}
.dep-steps li{
  flex:1 1 auto;min-width:88px;text-align:center;
  font-size:12px;font-weight:700;color:var(--muted);
  padding:8px 6px;border-radius:8px;background:var(--surface);border:1px solid var(--line);
  position:relative;counter-increment:depstep;
}
.dep-steps li::before{content:counter(depstep) ". ";}
.dep-steps li.active{background:var(--theme-primary,#123e66);color:#fff;border-color:var(--theme-primary,#123e66);}
.dep-steps li.done{background:var(--green-soft);color:var(--green-dark);border-color:var(--green);}

.dep-summary{
  background:var(--green-soft);border:1px solid var(--green);border-radius:10px;
  padding:12px 14px;font-size:15px;line-height:1.5;color:var(--text);margin-top:10px;
}

.settings-layout.settings-layout-single{
  grid-template-columns:minmax(0,1fr);
}

.filter-bar{
  display:flex;
  flex-wrap:wrap;
  align-items:end;
  gap:12px;
  margin-bottom:18px;
}
.filter-bar label{flex:1 1 150px;min-width:130px;}
.filter-bar input,.filter-bar select{width:100%;}
.pagination{display:flex;justify-content:center;align-items:center;gap:14px;margin-top:18px;}
.pagination span{font-weight:800;color:var(--text);}
.axle-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px;margin-top:10px;}
.axle-summary span{display:flex;justify-content:space-between;gap:10px;padding:10px;border:1px solid var(--line);border-radius:8px;background:var(--surface-2);}
.axle-summary .axle-total{border-color:var(--green);color:var(--green-dark);}
.document-thumb{width:58px;height:58px;object-fit:cover;border:1px solid var(--line);border-radius:8px;background:#fff;}
.badge-danger{display:inline-flex;padding:4px 8px;border-radius:999px;background:#5a1720;color:#ffd7dc;border:1px solid #b74151;font-size:12px;font-weight:900;}
@media (prefers-color-scheme:dark){
  .dep-summary{background:rgba(34,197,94,.12);}
}

.dep-spz-wrap{position:relative;}
.dep-suggest{
  position:absolute;left:0;right:0;top:100%;z-index:40;
  background:var(--surface);border:1px solid var(--line);border-radius:0 0 10px 10px;
  box-shadow:0 12px 26px rgba(11,37,69,.18);max-height:260px;overflow:auto;
}
.dep-suggest-item{
  display:flex;align-items:center;gap:8px;width:100%;text-align:left;
  padding:12px 14px;background:none;border:0;border-bottom:1px solid var(--line);
  cursor:pointer;font-size:15px;color:var(--text);
}
.dep-suggest-item:last-child{border-bottom:none;}
.dep-suggest-item:hover,.dep-suggest-item:focus{background:var(--green-soft);}
.dep-suggest-tara{margin-left:auto;font-size:12px;color:var(--muted);font-weight:700;}
.is-selected{outline:3px solid rgba(47,125,79,.4);outline-offset:1px;}

/* Odhlášení je bezpečný POST formulář, vizuálně zůstává součástí navigace. */
.logout-form{display:inline-flex;margin:0;vertical-align:middle;}
.logout-form .logout-link{
  appearance:none;
  border:0;
  background:none;
  color:inherit;
  cursor:pointer;
  font:inherit;
  padding:0;
  text-decoration:underline;
  text-underline-offset:2px;
}
.logout-form .logout-link:hover{color:inherit;text-decoration-thickness:2px;}
.logout-form .kypar-header-action{cursor:pointer;font-family:inherit;}
.mode-header>.logout-form{margin-left:auto;}

/* ============================================================
   Design system 2026 — jednotná produkční vrstva aplikace
   ============================================================ */
:root{
  --ui-bg:#07101f;
  --ui-bg-raised:#0b1526;
  --ui-surface:#101a2d;
  --ui-surface-2:#172338;
  --ui-field:#0b1526;
  --ui-line:#2a3a52;
  --ui-line-strong:#3a4e6a;
  --ui-text:#f5f7fb;
  --ui-muted:#9eacc0;
  --ui-primary:#4f7fe8;
  --ui-primary-hover:#6792ee;
  --ui-success:#2eaa6d;
  --ui-success-hover:#39bc7b;
  --ui-warning:#d99632;
  --ui-danger:#d05a5a;
  --ui-radius:10px;
  --ui-radius-sm:7px;
  --ui-shadow:0 10px 28px rgba(0,0,0,.20);
}

html[data-theme="dark"]{
  --theme-bg:var(--ui-bg);
  --theme-bg-top:var(--ui-bg);
  --theme-surface:var(--ui-surface);
  --theme-surface-2:var(--ui-surface-2);
  --theme-field:var(--ui-field);
  --theme-text:var(--ui-text);
  --theme-heading:#fff;
  --theme-muted:var(--ui-muted);
  --theme-line:var(--ui-line);
  --theme-link:#9bb9ff;
  --theme-hover:#1b2a42;
  --theme-nav-1:#081222;
  --theme-nav-2:#081222;
  --theme-primary:var(--ui-primary);
  --theme-primary-hover:var(--ui-primary-hover);
  --theme-success:var(--ui-success);
  --theme-success-hover:var(--ui-success-hover);
  --theme-danger:var(--ui-danger);
  --theme-neutral:#52647b;
  --theme-focus:#83a7ff;
  --theme-shadow:var(--ui-shadow);
  --navy:#dce7ff;
  --navy-dark:#fff;
  --green:#46ce89;
  --green-dark:#74dfa7;
  --surface:var(--ui-surface);
  --line:var(--ui-line);
  --bg:var(--ui-bg);
  --field-bg:var(--ui-field);
  --text:var(--ui-text);
  --muted:var(--ui-muted);
  --shadow:var(--ui-shadow);
}

html[data-theme] body,
html[data-theme] body.admin-body,
html[data-theme] body.deponie-body,
html[data-theme] body.mode-body,
html[data-theme] body.login-body,
html[data-theme] body.kypar-body,
html[data-theme] body.kypar-flow-page{
  background:var(--ui-bg)!important;
  color:var(--ui-text)!important;
}

html[data-theme] body{
  min-height:100vh;
  font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  text-rendering:optimizeLegibility;
}

html[data-theme] :is(a,button,input,select,textarea,summary):focus-visible{
  outline:3px solid #89aaff!important;
  outline-offset:2px;
}

html[data-theme] :is(input,select,textarea){
  min-height:46px;
  border:1px solid var(--ui-line-strong)!important;
  border-radius:var(--ui-radius-sm)!important;
  background:var(--ui-field)!important;
  color:var(--ui-text)!important;
  box-shadow:none!important;
}

html[data-theme] :is(input,select,textarea):hover{
  border-color:#577091!important;
}

html[data-theme] :is(input,select,textarea):focus{
  border-color:#7da0f7!important;
  box-shadow:0 0 0 3px rgba(79,127,232,.18)!important;
}

html[data-theme] textarea{min-height:96px}

html[data-theme] :is(.btn-primary,.btn-green,.btn-grey,.btn-danger,.btn-mini,.btn-confirm,button){
  border-radius:var(--ui-radius-sm);
  font-weight:750;
  transition:background-color .14s,border-color .14s,color .14s,transform .14s;
}

html[data-theme] :is(.btn-primary,.btn-green,.btn-grey,.btn-danger,.btn-mini,.btn-confirm):active{
  transform:translateY(1px);
}

html[data-theme] :is(.btn-primary,button.btn-primary){
  background:var(--ui-primary)!important;
  border-color:var(--ui-primary)!important;
  color:#fff!important;
  box-shadow:none!important;
}

html[data-theme] :is(.btn-primary,button.btn-primary):hover{
  background:var(--ui-primary-hover)!important;
  border-color:var(--ui-primary-hover)!important;
}

html[data-theme] :is(.btn-green,.btn-confirm,button.btn-green,button.btn-confirm){
  background:var(--ui-success)!important;
  border-color:var(--ui-success)!important;
  color:#fff!important;
  box-shadow:none!important;
}

html[data-theme] :is(.btn-green,.btn-confirm,button.btn-green,button.btn-confirm):hover{
  background:var(--ui-success-hover)!important;
  border-color:var(--ui-success-hover)!important;
}

html[data-theme] :is(.btn-grey,.btn-mini,button.btn-grey,button.btn-mini){
  background:var(--ui-surface-2)!important;
  border:1px solid var(--ui-line-strong)!important;
  color:#e8eef8!important;
  box-shadow:none!important;
}

html[data-theme] :is(.btn-grey,.btn-mini,button.btn-grey,button.btn-mini):hover{
  background:#213149!important;
  border-color:#627692!important;
}

html[data-theme] :is(.btn-danger,button.btn-danger){
  background:#321b23!important;
  border-color:#713847!important;
  color:#ffb7b7!important;
}

html[data-theme] .admin-nav{
  position:sticky;
  top:0;
  z-index:80;
  min-height:64px;
  padding:0 clamp(14px,2vw,28px);
  gap:clamp(14px,2vw,28px);
  flex-wrap:nowrap;
  border:0!important;
  border-bottom:1px solid #213149!important;
  background:#081222!important;
  box-shadow:0 6px 22px rgba(0,0,0,.20)!important;
}

html[data-theme] .admin-nav .brand{
  min-height:64px;
  gap:10px;
  color:#fff!important;
  font-size:17px;
  letter-spacing:-.015em;
}

html[data-theme] .brand-mark{
  width:34px;
  height:34px;
  border:1px solid #496694;
  border-radius:8px;
  background:#18355f;
  color:#cfe0ff;
  text-shadow:none;
  box-shadow:none;
}

html[data-theme] .brand-mark::after{
  left:8px;
  right:8px;
  bottom:5px;
  background:#49cf88;
  box-shadow:none;
}

html[data-theme] .admin-nav nav{
  min-width:0;
  overflow-x:auto;
  scrollbar-width:none;
}

html[data-theme] .admin-nav nav::-webkit-scrollbar{display:none}

html[data-theme] .admin-nav nav a{
  min-height:64px;
  padding:0 13px;
  gap:7px;
  border-radius:0;
  background:transparent!important;
  color:#aebcd0!important;
  font-size:13px;
  font-weight:700;
}

html[data-theme] .admin-nav nav a:hover{
  color:#fff!important;
  background:#101c30!important;
}

html[data-theme] .admin-nav nav a.active{
  color:#fff!important;
  background:transparent!important;
}

html[data-theme] .admin-nav nav a.active::after{
  left:12px;
  right:12px;
  height:3px;
  background:#5f8df0;
}

html[data-theme] .nav-ico{
  width:17px;
  height:17px;
  flex-basis:17px;
  opacity:.95;
}

/* Nastavení je poslední položka posuvné navigace deponie. Držíme ji celou
   na pravém okraji, aby se při menší šířce neořízl text a nezůstala jen ikona. */
html[data-theme] .admin-nav nav a[data-nav-utility]{
  position:sticky;
  right:0;
  z-index:3;
  flex:0 0 auto;
  min-width:max-content;
  margin-left:4px;
  padding-inline:14px;
  border-left:1px solid #263750;
  background:#0d192b!important;
  color:#d9e4f5!important;
  box-shadow:-14px 0 18px #081222;
}

html[data-theme] .admin-nav nav a[data-nav-utility]:hover,
html[data-theme] .admin-nav nav a[data-nav-utility]:focus-visible{
  background:#16243a!important;
  color:#fff!important;
}

html[data-theme] .admin-nav nav a[data-nav-utility] .nav-ico{
  width:18px;
  height:18px;
  flex-basis:18px;
  color:#a9c0f6;
}

html[data-theme] .admin-nav nav a[data-nav-utility]:hover .nav-ico,
html[data-theme] .admin-nav nav a[data-nav-utility]:focus-visible .nav-ico{
  color:#cfe0ff;
}

.deponie-settings-label{
  display:inline-block;
}

.nav-ico-navoz{
  --nav-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v13m0 0 5-5m-5 5-5-5M5 21h14'/%3E%3C/svg%3E")!important;
}
.nav-ico-odvoz{
  --nav-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21V8m0 0 5 5m-5-5-5 5M5 3h14'/%3E%3C/svg%3E")!important;
}
.nav-ico-document{
  --nav-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6M8 13h8M8 17h8'/%3E%3C/svg%3E")!important;
}
.nav-ico-movement{
  --nav-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 7h11l-3-3m2 13H6l3 3'/%3E%3C/svg%3E")!important;
}
.nav-ico-chart{
  --nav-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20V10M10 20V4M16 20v-7M22 20H2'/%3E%3C/svg%3E")!important;
}
.nav-ico-attachment{
  --nav-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.4 11.6-8.9 8.9a6 6 0 0 1-8.5-8.5l9.2-9.2a4 4 0 0 1 5.7 5.7l-9.2 9.2a2 2 0 1 1-2.8-2.8l8.5-8.5'/%3E%3C/svg%3E")!important;
}
.nav-ico-users{
  --nav-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E")!important;
}
.nav-ico-settings{
  --nav-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.7 1.7 0 0 0 .3 1.9l.1.1-2.8 2.8-.1-.1a1.7 1.7 0 0 0-1.9-.3 1.7 1.7 0 0 0-1 1.6v.2h-4V21a1.7 1.7 0 0 0-1-1.6 1.7 1.7 0 0 0-1.9.3l-.1.1L4.2 17l.1-.1a1.7 1.7 0 0 0 .3-1.9A1.7 1.7 0 0 0 3 14H2.8v-4H3a1.7 1.7 0 0 0 1.6-1 1.7 1.7 0 0 0-.3-1.9L4.2 7 7 4.2l.1.1a1.7 1.7 0 0 0 1.9.3A1.7 1.7 0 0 0 10 3V2.8h4V3a1.7 1.7 0 0 0 1 1.6 1.7 1.7 0 0 0 1.9-.3l.1-.1L19.8 7l-.1.1a1.7 1.7 0 0 0-.3 1.9A1.7 1.7 0 0 0 21 10h.2v4H21a1.7 1.7 0 0 0-1.6 1z'/%3E%3C/svg%3E")!important;
}

html[data-theme] .admin-nav .nav-right{
  flex-wrap:nowrap;
  gap:9px;
  color:#bfcbdb;
  white-space:nowrap;
}

html[data-theme] .nav-stavba{
  min-height:38px;
  padding:0 10px;
  border-color:#2c3d55;
  border-radius:var(--ui-radius-sm);
  background:#101c30;
  color:#dce5f2;
}

html[data-theme] .nav-change-stavba,
html[data-theme] .nav-mode-switch{
  color:#a9c0f6!important;
}

html[data-theme] .nav-role{
  border-color:#3b4e68;
  background:#15223a;
  color:#dce6f4;
}

html[data-theme] .status-dot{
  width:8px;
  height:8px;
  background:#49c985;
  box-shadow:0 0 0 3px rgba(73,201,133,.14);
}

html[data-theme] :is(.admin-main,.deponie-main){
  width:min(1500px,calc(100% - 32px));
  max-width:1500px;
  margin:0 auto;
  padding:28px 0 56px;
}

html[data-theme] :is(.admin-main,.deponie-main) h1{
  margin:0 0 18px;
  color:#fff!important;
  font-size:clamp(26px,2.4vw,34px);
  line-height:1.12;
  letter-spacing:-.025em;
}

html[data-theme] :is(.admin-main,.deponie-main) h2{
  color:#fff!important;
  font-size:20px;
  letter-spacing:-.015em;
}

html[data-theme] .page-heading-row{
  align-items:flex-end;
  margin-bottom:20px;
}

html[data-theme] .page-heading-row h1{margin:2px 0 5px}
html[data-theme] .page-heading-row p{max-width:760px;color:var(--ui-muted)}
html[data-theme] .mode-kicker{
  color:#79a0fa!important;
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

html[data-theme] :is(
  .card,.panel,.filtry,.tabulka-wrap,.login-card,.mode-panel,.mode-card,.facility-card,
  .stat-card,.settings-folder,.user-create-panel,.export-filter-card,.export-so-block,
  .export-summary-card,.stat-hero-card,.so-card,.settings-link-card,.app-combobox-panel,
  .step,.pruvodky-panel,.pruvodka-item,.document-upload-form,.document-preview,.document-list,
  .print-choice,.tara-memory,.historical-confirm,.empty-state
){
  border:1px solid var(--ui-line)!important;
  border-radius:var(--ui-radius)!important;
  background:var(--ui-surface)!important;
  color:var(--ui-text)!important;
  box-shadow:none!important;
}

html[data-theme] :is(.card,.panel){padding:22px}

html[data-theme] .stats-grid,
html[data-theme] .metric-grid{
  gap:12px;
  margin:0 0 18px;
}

html[data-theme] .stat-card,
html[data-theme] .metric-grid article{
  min-height:112px;
  padding:17px 18px;
  border:1px solid var(--ui-line)!important;
  border-left:1px solid var(--ui-line)!important;
  border-radius:var(--ui-radius)!important;
  background:var(--ui-surface)!important;
  box-shadow:none!important;
}

html[data-theme] :is(.stat-card,.metric-grid article) span{
  color:var(--ui-muted)!important;
  font-size:13px;
  font-weight:650;
}

html[data-theme] :is(.stat-card,.metric-grid article) strong{
  display:block;
  margin:7px 0 3px;
  color:#fff!important;
  font-size:clamp(25px,2.6vw,36px);
  line-height:1;
  letter-spacing:-.035em;
}

html[data-theme] :is(.stat-card,.metric-grid article) small{
  color:#7f90a6!important;
  font-size:12px;
}

html[data-theme] .filtry{
  padding:17px;
  gap:12px;
  background:var(--ui-bg-raised)!important;
}

html[data-theme] .souhrn{
  margin:16px 0 10px;
  padding:0;
  border:0;
  background:transparent;
  color:var(--ui-muted);
}

html[data-theme] .tabulka-wrap{
  overflow:auto;
  padding:0;
  border-radius:var(--ui-radius)!important;
  background:var(--ui-surface)!important;
}

html[data-theme] .tabulka{
  min-width:760px;
  border:0!important;
  border-collapse:separate;
  border-spacing:0;
  background:transparent!important;
}

html[data-theme] .tabulka thead th{
  height:48px;
  padding:10px 14px;
  border:0!important;
  border-bottom:1px solid var(--ui-line)!important;
  background:#152137!important;
  color:#c9d5e6!important;
  font-size:12px;
  font-weight:800;
  text-transform:none;
  letter-spacing:.01em;
  white-space:nowrap;
}

html[data-theme] .tabulka tbody td{
  min-height:50px;
  padding:13px 14px;
  border:0!important;
  border-bottom:1px solid #223149!important;
  background:transparent!important;
  color:#e9eef6!important;
}

html[data-theme] .tabulka tbody tr:last-child td{border-bottom:0!important}
html[data-theme] .tabulka tbody tr:hover td{background:#142036!important}

html[data-theme] .empty-state-cell{
  height:118px;
  padding:24px!important;
  text-align:center!important;
  color:var(--ui-muted)!important;
}

html[data-theme] :is(.alert,.flash){
  border-radius:var(--ui-radius-sm);
  box-shadow:none;
}

html[data-theme] .alert.success{
  border-color:#285f48!important;
  background:#102b23!important;
  color:#9ae2ba!important;
}

html[data-theme] .alert.error{
  border-color:#6e3544!important;
  background:#321a22!important;
  color:#ffc0c0!important;
}

html[data-theme] .login-body{
  background:var(--ui-bg)!important;
}

html[data-theme] .login-card{
  width:min(92vw,410px);
  padding:34px;
  border-top:3px solid var(--ui-primary)!important;
  box-shadow:0 18px 46px rgba(0,0,0,.26)!important;
}

html[data-theme] .login-card h1{
  color:#fff!important;
  font-size:28px;
  letter-spacing:-.03em;
}

html[data-theme] :is(.mode-card,.facility-card,.settings-link-card,.pruvodka-item):hover{
  border-color:#526b91!important;
  background:#142137!important;
  transform:translateY(-1px);
  box-shadow:none!important;
}

html[data-theme] .app-combobox-panel{
  margin-top:6px;
  border-color:#405572!important;
  box-shadow:0 16px 34px rgba(0,0,0,.30)!important;
}

html[data-theme] .app-combobox-option{
  min-height:48px;
  border-radius:6px;
  background:transparent!important;
  color:#eaf0f8!important;
}

html[data-theme] .app-combobox-option:hover,
html[data-theme] .app-combobox-option.is-active,
html[data-theme] .app-combobox-option[aria-selected="true"]{
  background:#20304a!important;
  border-color:#4e6a91!important;
}

html[data-theme] .print-settings{
  margin:20px 0;
  padding:18px;
  border:1px solid var(--ui-line);
  border-radius:var(--ui-radius);
  background:#0c1728;
}

html[data-theme] .print-settings legend{
  padding:0 8px;
  color:#fff!important;
  font-size:15px;
  font-weight:800;
}

.print-settings-guide{
  border-color:#38598a!important;
  box-shadow:inset 3px 0 #6f8fff;
}

.print-settings-intro{
  margin:2px 0 18px;
  padding:13px 14px;
  display:grid;
  grid-template-columns:42px minmax(0,1fr);
  align-items:center;
  gap:12px;
  border:1px solid #314867;
  border-radius:10px;
  background:#101d31;
}

.print-settings-icon{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border:1px solid #48689a;
  border-radius:10px;
  background:#172b49;
  color:#9bb7ff;
}

.print-settings-icon svg{
  width:22px;
  height:22px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.9;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.print-settings-intro strong{
  display:block;
  color:#f2f6fc;
  font-size:14px;
}

.print-settings-intro p{
  margin:3px 0 0;
  color:var(--ui-muted,#aebed1);
  font-size:12px;
  line-height:1.45;
}

.print-settings-grid{
  gap:16px 18px!important;
}

.print-settings-grid label small{
  display:block;
  margin-top:5px;
  color:var(--ui-muted,#9fb0c6);
  font-size:11px;
  font-weight:600;
  line-height:1.35;
}

html[data-theme] .print-settings-weighing{
  background:#0a1524;
}

html[data-theme] .print-settings-weighing legend{
  color:#cfdbee!important;
}

html[data-theme] .inline-fields{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-top:6px;
}

html[data-theme] .print-limits-grid{
  grid-template-columns:repeat(3,minmax(0,1fr));
}

html[data-theme] .dep-actions{
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin:0 0 18px;
}

html[data-theme] .dep-action{
  min-height:92px;
  padding:16px 18px;
  display:flex;
  flex-direction:row;
  align-items:center;
  gap:14px;
  border:1px solid var(--ui-line)!important;
  border-radius:var(--ui-radius);
  background:var(--ui-surface)!important;
  color:var(--ui-text);
  box-shadow:none;
  transition:background-color .14s,border-color .14s,transform .14s;
}

html[data-theme] .dep-action:hover{
  transform:translateY(-1px);
  border-color:#5c7498!important;
  background:#152238!important;
  box-shadow:none;
  filter:none;
}

html[data-theme] .dep-action-icon{
  width:44px;
  height:44px;
  flex:0 0 44px;
  display:grid;
  place-items:center;
  border:1px solid #405574;
  border-radius:9px;
  background:#172742;
  color:#82a6fa;
  font-size:0;
}

html[data-theme] .dep-action-icon svg{
  width:23px;
  height:23px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

html[data-theme] .dep-action-navoz .dep-action-icon{
  border-color:#2c644c;
  background:#112c23;
  color:#62d497;
}

html[data-theme] .dep-action-odvoz .dep-action-icon{
  border-color:#70532e;
  background:#2f2417;
  color:#efb25c;
}

html[data-theme] .dep-action-title{
  display:block;
  color:#fff;
  font-size:18px;
  line-height:1.15;
}

html[data-theme] .dep-action-sub{
  display:block;
  margin-top:4px;
  color:var(--ui-muted);
  font-size:12px;
}

html[data-theme] .deponie-metrics article:nth-child(1){border-top:2px solid #35b978!important}
html[data-theme] .deponie-metrics article:nth-child(2){border-top:2px solid #d99b43!important}
html[data-theme] .deponie-metrics article:nth-child(3){border-top:2px solid #638dec!important}
html[data-theme] .deponie-metrics article:nth-child(4){border-top:2px solid #78a1f8!important}

html[data-theme] .deponie-dashboard-grid{
  grid-template-columns:minmax(320px,.8fr) minmax(0,1.5fr);
  align-items:start;
  gap:14px;
}

html[data-theme] .section-heading{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:14px;
}

html[data-theme] .section-heading h2{margin:0 0 3px}
html[data-theme] .section-heading p{margin:0;color:var(--ui-muted);font-size:13px}

html[data-theme] .bilance-bar-row{
  grid-template-columns:minmax(120px,1.25fr) 2fr auto;
}

html[data-theme] .bilance-bar-track{
  height:12px;
  border:0;
  border-radius:999px;
  background:#08111f;
}

html[data-theme] .bilance-bar-fill{
  border-radius:999px;
  background:var(--ui-success);
}

html[data-theme] .bilance-bar-fill.negativ{background:var(--ui-danger)}
html[data-theme] .bilance-bar-value{color:#fff}

html[data-theme] .dep-reports{
  gap:10px;
  margin-top:14px;
}

html[data-theme] .dep-report{
  padding:16px;
  border:1px solid var(--ui-line);
  border-left:1px solid var(--ui-line);
  border-radius:var(--ui-radius);
  background:var(--ui-surface);
  box-shadow:none;
}

html[data-theme] .dep-report:hover{
  transform:translateY(-1px);
  border-color:#587096;
  box-shadow:none;
}

html[data-theme] .dep-report-title{color:#fff}
html[data-theme] .dep-report-sub{color:var(--ui-muted)}

html[data-theme] .direction-badge{
  min-width:58px;
  justify-content:center;
  border-radius:999px;
  font-size:11px;
  font-weight:800;
}

html[data-theme] .direction-badge.navoz{
  background:#112d23!important;
  border-color:#2e7554!important;
  color:#80dfaa!important;
}

html[data-theme] .direction-badge.odvoz{
  background:#302417!important;
  border-color:#77562d!important;
  color:#efbd72!important;
}

html[data-theme] .stat-hero-card,
html[data-theme] .export-hero,
html[data-theme] .export-header{
  background:var(--ui-surface)!important;
  color:var(--ui-text)!important;
}

html[data-theme] :is(.stat-hero-card,.export-hero,.export-header) :is(h1,h2,strong){
  color:#fff!important;
}

html[data-theme] body.kypar-body .big-action,
html[data-theme] body.kypar-body .kypar-primary-action{
  border:1px solid #2d694f;
  border-radius:12px;
  background:var(--ui-success);
  color:#fff;
  box-shadow:0 12px 30px rgba(0,0,0,.22);
}

html[data-theme] body.kypar-body .big-action:hover,
html[data-theme] body.kypar-body .kypar-primary-action:hover{
  background:var(--ui-success-hover);
  transform:translateY(-1px);
}

@media (max-width:1180px){
  html[data-theme] .admin-nav{
    flex-wrap:wrap;
    gap:0 14px;
    padding-top:0;
  }
  html[data-theme] .admin-nav .brand{min-height:56px}
  html[data-theme] .admin-nav nav{order:3;width:100%}
  html[data-theme] .admin-nav nav a{min-height:48px}
  html[data-theme] .admin-nav .nav-right{margin-left:auto}
}

@media (max-width:820px){
  html[data-theme] :is(.admin-main,.deponie-main){
    width:min(100% - 24px,1500px);
    padding:20px 0 40px;
  }
  html[data-theme] .admin-nav .nav-right{
    order:4;
    width:100%;
    padding:0 0 10px;
    overflow-x:auto;
  }
  html[data-theme] .nav-sep,
  html[data-theme] .nav-role{display:none}
  html[data-theme] .dep-actions,
  html[data-theme] .metric-grid,
  html[data-theme] .deponie-metrics{
    grid-template-columns:1fr 1fr;
  }
  html[data-theme] .dep-action-pruvodka{grid-column:1/-1}
  html[data-theme] .deponie-dashboard-grid{grid-template-columns:1fr}
  html[data-theme] :is(.card,.panel){padding:17px}
}

@media (max-width:560px){
  html[data-theme] .admin-nav{padding:0 12px}
  html[data-theme] .admin-nav .brand{font-size:15px}
  html[data-theme] .admin-nav .nav-right{font-size:12px}
  html[data-theme] .nav-stavba{max-width:100%;overflow:hidden}
  html[data-theme] .nav-stavba strong{max-width:150px;overflow:hidden;text-overflow:ellipsis}
  html[data-theme] .dep-actions,
  html[data-theme] .metric-grid,
  html[data-theme] .deponie-metrics{
    grid-template-columns:1fr;
  }
  html[data-theme] .dep-action-pruvodka{grid-column:auto}
  html[data-theme] .dep-action{min-height:84px}
  html[data-theme] .stat-card,
  html[data-theme] .metric-grid article{min-height:96px}
  html[data-theme] .page-heading-row{align-items:flex-start}
  html[data-theme] .section-heading{align-items:stretch;flex-direction:column}
  html[data-theme] .section-heading .btn-mini{align-self:flex-start}
  html[data-theme] .inline-fields{grid-template-columns:1fr}
  html[data-theme] .print-settings{padding:15px}
  .print-settings-intro{grid-template-columns:38px minmax(0,1fr);padding:12px}
  .print-settings-icon{width:38px;height:38px}
  html[data-theme] .bilance-bar-row{
    grid-template-columns:1fr auto;
    grid-template-areas:"label value" "track track";
  }
  html[data-theme] :is(input,select,textarea,.btn-primary,.btn-green,.btn-grey,.btn-danger,.btn-confirm){
    min-height:48px;
  }
}

/* ======================================================================
   Design refresh 2026.08 - sjednoceny produktovy system
   ====================================================================== */
@media screen{
  :root{
    --navy:#0a1325;
    --navy-dark:#060d1b;
    --navy-soft:#17233b;
    --green:#22b96b;
    --green-dark:#159653;
    --green-soft:#0d2d22;
    --red:#f35d6b;
    --grey:#2a3852;
    --grey-dark:#99a7bd;
    --text:#f6f8fc;
    --muted:#a5b1c5;
    --surface:#0d172a;
    --line:#273650;
    --bg:#070e1d;
    --shadow:0 18px 44px rgba(0,5,16,.24);
    --app-bg:#070e1d;
    --app-surface:#0d172a;
    --app-surface-2:#111d32;
    --app-surface-3:#15223a;
    --app-line:#273650;
    --app-line-strong:#394b6a;
    --app-text:#f6f8fc;
    --app-muted:#a5b1c5;
    --app-accent:#8188ff;
    --app-accent-strong:#6d73f3;
    --app-accent-soft:rgba(129,136,255,.14);
    --app-success:#22b96b;
    --app-warning:#ff8a24;
    --app-danger:#f35d6b;
    --app-radius:14px;
    --app-radius-sm:10px;
    --app-sidebar:268px;
    --app-topbar:76px;
    --app-control:48px;
    --app-focus:0 0 0 3px rgba(129,136,255,.28);
  }

  html[data-theme]{
    color-scheme:dark;
    background:var(--app-bg);
    scrollbar-color:#40506c var(--app-bg);
  }

  html[data-theme] body{
    min-height:100vh;
    color:var(--app-text)!important;
    background:
      radial-gradient(circle at 88% -10%,rgba(79,91,181,.12),transparent 34rem),
      linear-gradient(180deg,#091225 0%,var(--app-bg) 42%,#060c19 100%)!important;
    font-family:Inter,"Segoe UI Variable","Segoe UI",system-ui,-apple-system,BlinkMacSystemFont,sans-serif;
    font-size:15px;
    line-height:1.55;
    text-rendering:optimizeLegibility;
    -webkit-font-smoothing:antialiased;
  }

  html[data-theme] body::selection{background:rgba(129,136,255,.35);color:#fff}
  html[data-theme] :is(a,button,input,select,textarea,summary,[tabindex]):focus-visible{
    outline:0!important;
    box-shadow:var(--app-focus)!important;
  }
  html[data-theme] :is(button,a,input,select,textarea){-webkit-tap-highlight-color:transparent}
  html[data-theme] a{color:#a8adff}
  html[data-theme] p{color:var(--app-muted)}
  html[data-theme] hr{border:0;border-top:1px solid var(--app-line)}

  /* Application shell: top command bar + desktop sidebar. */
  html[data-theme] .admin-nav{
    position:fixed!important;
    inset:0 0 auto 0!important;
    z-index:1000!important;
    min-height:var(--app-topbar)!important;
    height:var(--app-topbar)!important;
    padding:0!important;
    display:grid!important;
    grid-template-columns:var(--app-sidebar) minmax(0,1fr)!important;
    align-items:center!important;
    gap:0!important;
    overflow:visible!important;
    color:var(--app-text)!important;
    background:rgba(7,14,29,.94)!important;
    border:0!important;
    border-bottom:1px solid var(--app-line)!important;
    box-shadow:0 10px 34px rgba(0,4,14,.18)!important;
    backdrop-filter:blur(18px);
  }

  html[data-theme] .admin-nav .brand{
    grid-column:1;
    width:100%!important;
    height:var(--app-topbar);
    padding:0 24px!important;
    display:flex!important;
    align-items:center;
    gap:11px;
    color:var(--app-text)!important;
    border-right:1px solid var(--app-line);
    font-size:18px!important;
    font-weight:780!important;
    letter-spacing:-.025em!important;
  }

  html[data-theme] .brand-mark{
    width:38px!important;
    height:38px!important;
    flex:0 0 38px;
    border:0!important;
    border-radius:0!important;
    background:#fff url("assets/zsd-logo.png") center / contain no-repeat!important;
    box-shadow:none!important;
    color:transparent!important;
    font-size:0!important;
  }
  html[data-theme] .brand-mark::after{display:none!important}

  html[data-theme] .admin-nav .nav-right{
    grid-column:2;
    min-width:0;
    height:var(--app-topbar);
    margin:0!important;
    padding:0 clamp(18px,2.7vw,42px)!important;
    display:flex!important;
    flex-wrap:nowrap!important;
    align-items:center!important;
    justify-content:flex-end;
    gap:10px!important;
    color:var(--app-muted)!important;
    font-size:13px!important;
  }

  html[data-theme] .admin-nav .nav-right a,
  html[data-theme] .admin-nav .logout-link{
    min-height:42px;
    padding:0 12px!important;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border:1px solid transparent!important;
    border-radius:10px!important;
    color:#dce3ef!important;
    background:transparent!important;
    box-shadow:none!important;
    font-size:13px!important;
    font-weight:700!important;
    text-decoration:none!important;
  }
  html[data-theme] .admin-nav .nav-right a:hover,
  html[data-theme] .admin-nav .logout-link:hover{
    border-color:var(--app-line)!important;
    background:var(--app-surface-2)!important;
    color:#fff!important;
  }
  html[data-theme] .admin-nav .logout-form{margin:0!important}
  html[data-theme] .admin-nav .nav-sep{width:1px;height:24px;overflow:hidden;color:transparent;background:var(--app-line)}
  html[data-theme] .admin-nav .nav-role{
    padding:6px 10px;
    border:1px solid var(--app-line-strong);
    border-radius:999px;
    color:#dce3ef!important;
    background:var(--app-surface-2);
    font-size:11px!important;
    font-weight:800!important;
  }
  html[data-theme] .admin-nav .nav-stavba{
    min-width:0;
    min-height:44px;
    padding:4px 6px 4px 12px!important;
    display:inline-flex!important;
    align-items:center;
    gap:7px;
    border:1px solid var(--app-line-strong)!important;
    border-radius:11px!important;
    background:var(--app-surface)!important;
    color:var(--app-muted)!important;
    box-shadow:none!important;
  }
  html[data-theme] .admin-nav .nav-stavba strong{
    max-width:230px;
    overflow:hidden;
    color:var(--app-text)!important;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  html[data-theme] .admin-nav .status-dot{
    width:8px;height:8px;flex:0 0 8px;border-radius:50%;background:var(--app-success);box-shadow:0 0 0 4px rgba(34,185,107,.12)
  }

  html[data-theme] .admin-nav:not(.deponie-admin-nav) > nav,
  html[data-theme] .deponie-admin-nav .deponie-nav-shell{
    position:fixed!important;
    inset:var(--app-topbar) auto 0 0!important;
    z-index:999!important;
    width:var(--app-sidebar)!important;
    height:auto!important;
    min-width:0!important;
    padding:18px 14px!important;
    display:block!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    background:linear-gradient(180deg,#091326 0%,#07101f 100%)!important;
    border-right:1px solid var(--app-line)!important;
    box-shadow:none!important;
  }
  html[data-theme] .deponie-admin-nav .deponie-nav-scroll{
    width:100%!important;
    height:auto!important;
    padding:0!important;
    overflow:visible!important;
    mask-image:none!important;
  }
  html[data-theme] .admin-nav:not(.deponie-admin-nav) > nav,
  html[data-theme] .deponie-admin-nav nav{
    width:100%!important;
    min-width:0!important;
    height:auto!important;
    padding:0!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    gap:6px!important;
    overflow:visible!important;
  }
  html[data-theme] .admin-nav nav a,
  html[data-theme] .deponie-mobile-more-trigger{
    position:relative!important;
    width:100%!important;
    min-width:0!important;
    min-height:50px!important;
    padding:0 14px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:13px!important;
    border:1px solid transparent!important;
    border-radius:11px!important;
    color:#c8d2e1!important;
    background:transparent!important;
    box-shadow:none!important;
    font-size:14px!important;
    font-weight:680!important;
    text-decoration:none!important;
    white-space:nowrap!important;
  }
  html[data-theme] .admin-nav nav a:hover{
    color:#fff!important;
    background:rgba(255,255,255,.045)!important;
    border-color:rgba(255,255,255,.04)!important;
  }
  html[data-theme] .admin-nav nav a.active{
    color:#f7f8ff!important;
    background:linear-gradient(90deg,rgba(129,136,255,.22),rgba(129,136,255,.09))!important;
    border-color:rgba(129,136,255,.42)!important;
  }
  html[data-theme] .admin-nav nav a.active::after{
    content:""!important;
    position:absolute!important;
    inset:9px auto 9px -1px!important;
    width:3px!important;
    height:auto!important;
    border-radius:0 4px 4px 0!important;
    background:var(--app-accent)!important;
  }
  html[data-theme] .admin-nav nav a[data-nav-utility]{margin:0!important;border-left:1px solid transparent!important}
  html[data-theme] .admin-nav nav a[data-nav-utility="users"]{margin-top:14px!important;padding-top:0!important;border-top:1px solid var(--app-line)!important;border-radius:0 0 11px 11px!important}
  html[data-theme] .nav-ico{width:22px!important;height:22px!important;flex:0 0 22px!important;background:currentColor!important;opacity:.96}
  .nav-ico-more{--nav-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='5' cy='12' r='1' fill='black'/%3E%3Ccircle cx='12' cy='12' r='1' fill='black'/%3E%3Ccircle cx='19' cy='12' r='1' fill='black'/%3E%3C/svg%3E")!important}
  html[data-theme] .deponie-nav-arrow{display:none!important}
  html[data-theme] .deponie-mobile-more-trigger,
  html[data-theme] .deponie-mobile-more{display:none!important}

  /* Main content and type hierarchy. */
  html[data-theme] :is(.admin-main,.deponie-main,.settings-main){
    width:auto!important;
    max-width:none!important;
    min-width:0!important;
    margin:0 0 0 var(--app-sidebar)!important;
    padding:calc(var(--app-topbar) + 38px) clamp(24px,3.2vw,54px) 64px!important;
  }
  html[data-theme] :is(.admin-main,.deponie-main,.settings-main) > :first-child{margin-top:0}
  html[data-theme] :is(.admin-main,.deponie-main,.settings-main) h1{
    margin:0 0 8px!important;
    color:var(--app-text)!important;
    font-size:clamp(28px,2.5vw,40px)!important;
    line-height:1.12!important;
    letter-spacing:-.035em!important;
    font-weight:780!important;
  }
  html[data-theme] :is(.admin-main,.deponie-main,.settings-main) h2{
    color:var(--app-text)!important;
    font-size:clamp(20px,1.7vw,26px)!important;
    line-height:1.2!important;
    letter-spacing:-.025em!important;
    font-weight:750!important;
  }
  html[data-theme] :is(.admin-main,.deponie-main,.settings-main) h3{color:var(--app-text)!important}
  html[data-theme] .page-heading-row{margin-bottom:24px!important;align-items:flex-end!important}
  html[data-theme] .page-heading-row p{margin:6px 0 0!important;color:var(--app-muted)!important;font-size:15px!important}
  html[data-theme] .mode-kicker{margin-bottom:8px!important;color:#a8adff!important;font-size:11px!important;letter-spacing:.11em!important;font-weight:850!important}

  /* Surfaces use restrained depth instead of stacked framed cards. */
  html[data-theme] :is(.panel,.card,.filtry,.tabulka-wrap,.object-group,.material-group,.settings-folder,.data-box,.document-empty-state,.access-management-callout){
    color:var(--app-text)!important;
    background:rgba(13,23,42,.9)!important;
    border:1px solid var(--app-line)!important;
    border-radius:var(--app-radius)!important;
    box-shadow:none!important;
  }
  html[data-theme] :is(.panel,.card){padding:24px!important}
  html[data-theme] .panel + .panel{margin-top:18px}
  html[data-theme] .section-heading{margin-bottom:18px!important;align-items:center!important}
  html[data-theme] .section-heading h2{margin:0 0 4px!important}
  html[data-theme] .section-heading p{margin:0!important}

  /* Operational actions. */
  html[data-theme] .dep-actions{
    margin:0 0 24px!important;
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:12px!important;
  }
  html[data-theme] .dep-action{
    min-height:78px!important;
    padding:14px 16px!important;
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:13px!important;
    color:var(--app-text)!important;
    background:rgba(13,23,42,.72)!important;
    border:1px solid var(--app-line-strong)!important;
    border-radius:12px!important;
    box-shadow:none!important;
    text-decoration:none!important;
    transition:transform .16s ease,border-color .16s ease,background .16s ease!important;
  }
  html[data-theme] .dep-action:hover{transform:translateY(-1px);background:var(--app-surface-2)!important}
  html[data-theme] .dep-action-icon{
    width:42px!important;height:42px!important;flex:0 0 42px!important;margin:0!important;border-radius:10px!important;background:rgba(255,255,255,.035)!important
  }
  html[data-theme] .dep-action-icon svg{width:22px!important;height:22px!important;stroke-width:1.9!important}
  html[data-theme] .dep-action-title{font-size:15px!important;line-height:1.25!important;font-weight:780!important}
  html[data-theme] .dep-action-sub{margin-top:3px!important;color:var(--app-muted)!important;font-size:12px!important;line-height:1.35!important}
  html[data-theme] .dep-action-navoz{border-color:rgba(34,185,107,.48)!important}
  html[data-theme] .dep-action-navoz :is(.dep-action-title,.dep-action-icon){color:var(--app-success)!important}
  html[data-theme] .dep-action-odvoz{border-color:rgba(255,138,36,.5)!important}
  html[data-theme] .dep-action-odvoz :is(.dep-action-title,.dep-action-icon){color:var(--app-warning)!important}
  html[data-theme] .dep-action-pruvodka{border-color:rgba(129,136,255,.56)!important}
  html[data-theme] .dep-action-pruvodka :is(.dep-action-title,.dep-action-icon){color:#a8adff!important}

  /* Metrics become one clean information band. */
  html[data-theme] :is(.stats-grid,.metric-grid,.deponie-metrics){gap:1px!important;padding:1px!important;background:var(--app-line)!important;border:1px solid var(--app-line)!important;border-radius:var(--app-radius)!important;overflow:hidden!important}
  html[data-theme] :is(.stat-card,.metric-grid article,.deponie-metrics article){
    min-height:112px!important;
    padding:18px 20px!important;
    background:var(--app-surface)!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
  }
  html[data-theme] :is(.stat-card,.metric-grid article,.deponie-metrics article) span{color:var(--app-muted)!important;font-size:12px!important;letter-spacing:.02em!important}
  html[data-theme] :is(.stat-card,.metric-grid article,.deponie-metrics article) strong{color:var(--app-text)!important;font-size:clamp(24px,2vw,34px)!important;letter-spacing:-.035em!important}
  html[data-theme] :is(.stat-card,.metric-grid article,.deponie-metrics article) small{color:#7f8ca2!important}

  html[data-theme] .deponie-dashboard-grid{gap:18px!important;align-items:start!important}
  html[data-theme] .bilance-bars{gap:0!important}
  html[data-theme] .bilance-bar-row{min-height:54px!important;padding:10px 0!important;border-top:1px solid var(--app-line)!important}
  html[data-theme] .bilance-bar-row:first-child{border-top:0!important}
  html[data-theme] .bilance-bar-label{color:#e8edf6!important;font-weight:680!important}
  html[data-theme] .bilance-bar-track{height:10px!important;background:#071020!important;border-color:var(--app-line)!important}
  html[data-theme] .bilance-bar-fill{background:linear-gradient(90deg,#4c72ff,#8188ff)!important}
  html[data-theme] .bilance-bar-fill.negativ{background:linear-gradient(90deg,#df365e,#ff7b3f)!important}
  html[data-theme] .bilance-bar-value{color:#f4f6fb!important;font-variant-numeric:tabular-nums;font-weight:760!important}

  /* Forms and controls. */
  html[data-theme] :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),select,textarea){
    min-height:var(--app-control)!important;
    padding:11px 13px!important;
    color:var(--app-text)!important;
    background:#0a1426!important;
    border:1px solid var(--app-line-strong)!important;
    border-radius:10px!important;
    box-shadow:none!important;
    font-family:inherit!important;
    font-size:15px!important;
    line-height:1.35!important;
  }
  html[data-theme] textarea{min-height:112px!important;resize:vertical}
  html[data-theme] :is(input,textarea)::placeholder{color:#78869c!important;opacity:1}
  html[data-theme] :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea):hover{border-color:#4a5c7b!important}
  html[data-theme] :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea):focus{border-color:var(--app-accent)!important;box-shadow:var(--app-focus)!important;outline:0!important}
  html[data-theme] :is(input[type="checkbox"],input[type="radio"]){width:20px!important;height:20px!important;accent-color:var(--app-accent)!important}
  html[data-theme] :is(label,.form-grid label,.filtry label,.filter-grid label){color:#dfe6f1!important;font-size:13px!important;font-weight:720!important}
  html[data-theme] label small{color:var(--app-muted)!important;font-weight:550!important}
  html[data-theme] :is(.form-grid,.settings-two-col,.print-settings-grid){gap:16px!important}
  html[data-theme] .filtry{
    padding:18px!important;
    display:grid!important;
    grid-template-columns:repeat(4,minmax(150px,1fr)) repeat(3,auto)!important;
    align-items:end!important;
    gap:12px!important;
  }
  html[data-theme] .filter-grid{gap:14px!important}

  html[data-theme] :is(.btn-primary,.btn-green,.btn-grey,.btn-confirm,.btn-mini,.btn-danger,.btn-link){
    min-height:44px;
    padding:0 16px!important;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    border:1px solid transparent!important;
    border-radius:10px!important;
    box-shadow:none!important;
    font-family:inherit!important;
    font-size:14px!important;
    font-weight:760!important;
    line-height:1.2!important;
    text-decoration:none!important;
    transition:transform .15s ease,background .15s ease,border-color .15s ease!important;
  }
  html[data-theme] :is(.btn-primary,.btn-confirm){color:#fff!important;background:var(--app-accent-strong)!important;border-color:#8f95ff!important}
  html[data-theme] .btn-green{color:#fff!important;background:#159653!important;border-color:#2cc477!important}
  html[data-theme] .btn-grey{color:#e1e7f1!important;background:var(--app-surface-2)!important;border-color:var(--app-line-strong)!important}
  html[data-theme] .btn-danger{color:#fff!important;background:#c93f52!important;border-color:#ef6675!important}
  html[data-theme] :is(.btn-primary,.btn-green,.btn-grey,.btn-confirm,.btn-mini,.btn-danger):hover{transform:translateY(-1px);filter:brightness(1.07)}
  html[data-theme] .btn-big{min-height:52px!important;margin-top:14px!important;font-size:15px!important}
  html[data-theme] .btn-mini{min-height:38px!important;padding:0 12px!important;color:#dfe6f3!important;background:var(--app-surface-2)!important;border-color:var(--app-line-strong)!important;font-size:12px!important}
  html[data-theme] :is(button,a).is-loading{pointer-events:none;opacity:.68}

  /* Data tables. */
  html[data-theme] .tabulka-wrap{overflow:auto!important;overscroll-behavior-inline:contain;scrollbar-gutter:stable}
  html[data-theme] .tabulka{color:var(--app-text)!important;background:transparent!important;font-size:13px!important}
  html[data-theme] .tabulka th{
    padding:13px 14px!important;
    color:#cbd5e5!important;
    background:#101b2f!important;
    border-bottom:1px solid var(--app-line-strong)!important;
    font-size:11px!important;
    font-weight:800!important;
    letter-spacing:.045em!important;
    text-transform:uppercase!important;
  }
  html[data-theme] .tabulka td{padding:13px 14px!important;color:#dce3ed!important;border-color:var(--app-line)!important}
  html[data-theme] .tabulka tbody tr{background:transparent!important}
  html[data-theme] .tabulka-zebra tbody tr:nth-child(even) td{background:rgba(255,255,255,.012)!important}
  html[data-theme] .tabulka tbody tr:hover td{background:rgba(129,136,255,.055)!important}
  html[data-theme] .empty-state-cell{padding:34px 18px!important;color:var(--app-muted)!important;font-style:normal!important;text-align:center!important}
  html[data-theme] .souhrn{color:var(--app-muted)!important;font-size:13px!important}
  html[data-theme] .pagination{display:flex;align-items:center;justify-content:center;gap:12px;margin:18px 0 0}

  /* Dialogs and status messages. */
  html[data-theme] .modal{padding:20px!important;background:rgba(1,6,16,.78)!important;backdrop-filter:blur(10px)}
  html[data-theme] .modal-card{
    padding:24px!important;
    color:var(--app-text)!important;
    background:var(--app-surface)!important;
    border:1px solid var(--app-line-strong)!important;
    border-radius:16px!important;
    box-shadow:0 28px 80px rgba(0,0,0,.44)!important;
  }
  html[data-theme] :is(.alert,.notice){border:1px solid transparent!important;border-radius:11px!important;font-size:13px!important}
  html[data-theme] .alert.ok{color:#bff8d8!important;background:#0d2d22!important;border-color:#1e6b49!important}
  html[data-theme] .alert.error{color:#ffd3d8!important;background:#32141c!important;border-color:#7a2d3a!important}
  html[data-theme] .hint{color:var(--app-muted)!important}

  /* Login and context selection. */
  html[data-theme] body.login-body,
  html[data-theme] body.mode-body{
    background:
      radial-gradient(circle at 22% 8%,rgba(129,136,255,.17),transparent 28rem),
      radial-gradient(circle at 82% 82%,rgba(34,185,107,.09),transparent 30rem),
      var(--app-bg)!important;
  }
  html[data-theme] .login-card{
    width:min(92vw,420px)!important;
    padding:36px!important;
    background:rgba(13,23,42,.94)!important;
    border:1px solid var(--app-line-strong)!important;
    border-top:1px solid var(--app-line-strong)!important;
    border-radius:18px!important;
    box-shadow:0 32px 90px rgba(0,0,0,.38)!important;
  }
  html[data-theme] .login-logo{max-width:112px!important}
  html[data-theme] .login-card h1{color:var(--app-text)!important;font-size:29px!important;letter-spacing:-.035em!important}
  html[data-theme] .login-card .sub{color:var(--app-muted)!important}
  html[data-theme] .mode-shell{max-width:1120px!important}
  html[data-theme] :is(.mode-card,.stavba-card,.zarizeni-card){background:var(--app-surface)!important;border:1px solid var(--app-line)!important;border-radius:14px!important;box-shadow:none!important}

  /* Kypař: one unmistakable primary operation. */
  html[data-theme] body.kypar-body{background:var(--app-bg)!important}
  html[data-theme] body.kypar-body .kypar-topbar{
    min-height:72px!important;
    padding:0 clamp(16px,4vw,30px)!important;
    background:rgba(7,14,29,.94)!important;
    border-bottom:1px solid var(--app-line)!important;
    box-shadow:none!important;
    backdrop-filter:blur(16px);
  }
  html[data-theme] body.kypar-body .kypar-brand-copy strong{color:var(--app-text)!important;letter-spacing:-.02em!important}
  html[data-theme] body.kypar-body .kypar-brand-copy small{color:var(--app-muted)!important}
  html[data-theme] body.kypar-body .kypar-header-action{min-width:46px!important;min-height:46px!important;border:1px solid var(--app-line)!important;border-radius:11px!important;background:var(--app-surface)!important;color:#dce4f0!important}
  html[data-theme] body.kypar-body .kypar-main{padding:clamp(20px,5vw,48px)!important}
  html[data-theme] body.kypar-body .kypar-home{width:min(100%,680px)!important}
  html[data-theme] body.kypar-body .kypar-user-panel{background:var(--app-surface)!important;border:1px solid var(--app-line)!important;border-radius:13px!important;box-shadow:none!important}
  html[data-theme] body.kypar-body .big-action{
    width:100%!important;
    min-height:164px!important;
    height:auto!important;
    padding:28px!important;
    flex-direction:row!important;
    justify-content:space-between!important;
    color:#fff!important;
    background:linear-gradient(135deg,#177d4b,#159653)!important;
    border:1px solid #33c47b!important;
    border-radius:16px!important;
    box-shadow:0 18px 46px rgba(21,150,83,.2)!important;
    font-size:clamp(24px,5vw,34px)!important;
    letter-spacing:-.02em!important;
  }
  html[data-theme] body.kypar-body .big-action > svg:first-child{width:52px!important;height:52px!important}
  html[data-theme] body.kypar-body .flow-main{padding-top:32px!important}
  html[data-theme] body.kypar-body .step h2{color:var(--app-text)!important;letter-spacing:-.025em!important}
  html[data-theme] body.kypar-body :is(.qr-input,.big-input){font-size:clamp(20px,5vw,28px)!important}

  /* Settings / attachments keep the same component grammar. */
  html[data-theme] .settings-folder summary{min-height:58px!important;color:var(--app-text)!important;background:transparent!important}
  html[data-theme] .settings-folder[open] summary{background:var(--app-surface-2)!important;border-color:var(--app-line)!important}
  html[data-theme] .settings-folder summary::after{background:var(--app-accent-soft)!important;color:#b5b9ff!important}
  html[data-theme] .print-settings{background:var(--app-surface)!important;border-color:var(--app-line)!important}
  html[data-theme] .print-settings-guide{box-shadow:inset 3px 0 var(--app-accent)!important}
  html[data-theme] .print-settings-intro{background:var(--app-surface-2)!important;border-color:var(--app-line-strong)!important}
  html[data-theme] .file-drop{background:#091326!important;border-color:#435373!important}
  html[data-theme] .file-drop:hover{border-color:var(--app-accent)!important;background:var(--app-accent-soft)!important}

  @media (prefers-reduced-motion:no-preference){
    html[data-theme] :is(.panel,.stat-card,.dep-action,.card,.mode-card,.stavba-card,.zarizeni-card){animation:app-surface-in .28s ease both}
    @keyframes app-surface-in{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}
  }
}

@media screen and (max-width:1240px){
  :root{--app-sidebar:238px}
  html[data-theme] .admin-nav .brand{padding-inline:18px!important;font-size:16px!important}
  html[data-theme] .admin-nav .nav-stavba strong{max-width:170px}
  html[data-theme] .filtry{grid-template-columns:repeat(4,minmax(135px,1fr))!important}
  html[data-theme] .filtry button{width:100%}
}

@media screen and (max-width:980px){
  :root{--app-topbar:72px}
  html[data-theme] body:is(.admin-body,.deponie-body){padding-bottom:calc(86px + env(safe-area-inset-bottom))!important}
  html[data-theme] .admin-nav{
    height:var(--app-topbar)!important;
    min-height:var(--app-topbar)!important;
    padding:0 14px!important;
    display:flex!important;
    justify-content:space-between!important;
    gap:10px!important;
  }
  html[data-theme] .admin-nav .brand{
    width:auto!important;
    height:var(--app-topbar)!important;
    padding:0!important;
    border:0!important;
    font-size:16px!important;
  }
  html[data-theme] .brand-mark{width:34px!important;height:34px!important;flex-basis:34px!important}
  html[data-theme] .admin-nav .nav-right{
    width:auto!important;
    min-width:0!important;
    height:var(--app-topbar)!important;
    margin-left:auto!important;
    padding:0!important;
    gap:6px!important;
  }
  html[data-theme] .admin-nav .nav-right > :is(.nav-role,.nav-sep,.nav-user,.nav-mode-switch){display:none!important}
  html[data-theme] .admin-nav .nav-stavba{
    max-width:min(44vw,260px)!important;
    min-height:42px!important;
    padding:3px 4px 3px 10px!important;
  }
  html[data-theme] .admin-nav .nav-device-label{display:none!important}
  html[data-theme] .admin-nav .nav-stavba strong{max-width:125px!important}
  html[data-theme] .admin-nav .nav-change-stavba{min-height:34px!important;padding:0 8px!important;font-size:11px!important}
  html[data-theme] .admin-nav .logout-link{min-width:42px!important;padding:0 9px!important;font-size:0!important}
  html[data-theme] .admin-nav .logout-link::before{
    content:"";width:20px;height:20px;background:currentColor;
    -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 17l5-5-5-5M15 12H3M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4'/%3E%3C/svg%3E") center/contain no-repeat;
    mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 17l5-5-5-5M15 12H3M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4'/%3E%3C/svg%3E") center/contain no-repeat;
  }

  html[data-theme] .admin-nav:not(.deponie-admin-nav) > nav,
  html[data-theme] .deponie-admin-nav .deponie-nav-shell{
    position:fixed!important;
    inset:auto 0 0 0!important;
    z-index:1001!important;
    width:100%!important;
    height:calc(78px + env(safe-area-inset-bottom))!important;
    min-height:0!important;
    padding:0 8px env(safe-area-inset-bottom)!important;
    overflow:visible!important;
    background:rgba(7,14,29,.97)!important;
    border:0!important;
    border-top:1px solid var(--app-line)!important;
    box-shadow:0 -14px 36px rgba(0,4,14,.25)!important;
    backdrop-filter:blur(18px);
  }
  html[data-theme] .deponie-admin-nav .deponie-nav-scroll{height:78px!important;overflow:visible!important}
  html[data-theme] .admin-nav:not(.deponie-admin-nav) > nav,
  html[data-theme] .deponie-admin-nav nav{
    height:78px!important;
    display:flex!important;
    flex-direction:row!important;
    align-items:stretch!important;
    justify-content:space-around!important;
    gap:2px!important;
  }
  html[data-theme] .admin-nav nav a,
  html[data-theme] .deponie-mobile-more-trigger{
    width:auto!important;
    min-width:64px!important;
    min-height:72px!important;
    padding:8px 8px 6px!important;
    flex:1 1 0!important;
    flex-direction:column!important;
    justify-content:center!important;
    gap:5px!important;
    border:0!important;
    border-radius:9px!important;
    font-size:11px!important;
    line-height:1.05!important;
  }
  html[data-theme] .admin-nav nav a.active{background:rgba(129,136,255,.1)!important;color:#b2b6ff!important}
  html[data-theme] .admin-nav nav a.active::after{inset:auto 8px 0!important;width:auto!important;height:3px!important;border-radius:3px 3px 0 0!important}
  html[data-theme] .admin-nav nav a[data-nav-utility="users"]{margin:0!important;padding-top:8px!important;border:0!important;border-radius:9px!important}
  html[data-theme] .nav-ico{width:23px!important;height:23px!important;flex-basis:23px!important}

  html[data-theme] .deponie-admin-nav nav > a[href$="deponie_pohyby.php"],
  html[data-theme] .deponie-admin-nav nav > a[href$="deponie_bilance.php"],
  html[data-theme] .deponie-admin-nav nav > a[href$="deponie_prilohy.php"],
  html[data-theme] .deponie-admin-nav nav > a[data-nav-utility]{display:none!important}
  html[data-theme] .deponie-mobile-more-trigger{display:flex!important;color:#c8d2e1!important;cursor:pointer}
  html[data-theme] .deponie-mobile-more{
    position:fixed!important;
    inset:auto 12px calc(88px + env(safe-area-inset-bottom)) 12px!important;
    z-index:1010!important;
    max-height:min(68vh,520px)!important;
    padding:10px!important;
    overflow:auto!important;
    color:var(--app-text)!important;
    background:rgba(13,23,42,.98)!important;
    border:1px solid var(--app-line-strong)!important;
    border-radius:16px!important;
    box-shadow:0 24px 70px rgba(0,0,0,.48)!important;
    backdrop-filter:blur(18px);
  }
  html[data-theme] .deponie-mobile-more:not([hidden]){display:block!important}
  html[data-theme] .deponie-mobile-more-head{min-height:48px;padding:4px 7px 9px 12px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--app-line)}
  html[data-theme] .deponie-mobile-more-head strong{font-size:15px}
  html[data-theme] .deponie-mobile-more-head button{width:42px;height:42px;display:grid;place-items:center;color:var(--app-muted);background:transparent;border:1px solid var(--app-line);border-radius:10px}
  html[data-theme] .deponie-mobile-more-head svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
  html[data-theme] .deponie-mobile-more nav{height:auto!important;padding:8px 0 0!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important}
  html[data-theme] .deponie-mobile-more nav a{min-height:54px!important;padding:0 13px!important;display:flex!important;flex-direction:row!important;justify-content:flex-start!important;gap:10px!important;font-size:13px!important}
  html[data-theme] .deponie-admin-nav.mobile-more-open::after{content:"";position:fixed;inset:var(--app-topbar) 0 calc(78px + env(safe-area-inset-bottom));z-index:1008;background:rgba(1,5,13,.55);backdrop-filter:blur(3px)}

  html[data-theme] :is(.admin-main,.deponie-main,.settings-main){
    margin:0!important;
    padding:calc(var(--app-topbar) + 28px) clamp(16px,4vw,30px) calc(116px + env(safe-area-inset-bottom))!important;
  }
  html[data-theme] .filtry{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  html[data-theme] .dep-actions{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  html[data-theme] .dep-action{min-height:88px!important;padding:13px!important}
  html[data-theme] .dep-action-sub{display:none!important}
  html[data-theme] .metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

@media screen and (max-width:700px){
  html[data-theme] body{font-size:14px}
  html[data-theme] .admin-nav{padding-inline:12px!important}
  html[data-theme] .admin-nav .brand{font-size:14px!important;gap:7px!important}
  html[data-theme] .brand-mark{width:31px!important;height:31px!important;flex-basis:31px!important}
  html[data-theme] .admin-nav .brand-label{max-width:118px;overflow:hidden;text-overflow:ellipsis}
  html[data-theme] .admin-nav .nav-stavba{max-width:42vw!important}
  html[data-theme] .admin-nav .nav-stavba strong{max-width:78px!important}
  html[data-theme] .admin-nav .nav-stavba > .status-dot{display:none!important}
  html[data-theme] .admin-nav .nav-change-stavba{font-size:0!important;min-width:34px!important}
  html[data-theme] .admin-nav .nav-change-stavba::before{
    content:"";width:16px;height:16px;background:currentColor;
    -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12a9 9 0 0 1 15-6.7L21 8M21 3v5h-5M21 12a9 9 0 0 1-15 6.7L3 16M3 21v-5h5'/%3E%3C/svg%3E") center/contain no-repeat;
    mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12a9 9 0 0 1 15-6.7L21 8M21 3v5h-5M21 12a9 9 0 0 1-15 6.7L3 16M3 21v-5h5'/%3E%3C/svg%3E") center/contain no-repeat;
  }
  html[data-theme] :is(.admin-main,.deponie-main,.settings-main){padding-inline:14px!important}
  html[data-theme] :is(.admin-main,.deponie-main,.settings-main) h1{font-size:30px!important}
  html[data-theme] .page-heading-row{align-items:flex-start!important;flex-direction:column!important;gap:12px!important}
  html[data-theme] :is(.panel,.card){padding:18px!important}
  html[data-theme] .dep-actions{grid-template-columns:1fr!important;gap:9px!important}
  html[data-theme] .dep-action{min-height:68px!important;padding:10px 13px!important}
  html[data-theme] .dep-action-sub{display:block!important}
  html[data-theme] :is(.stats-grid,.metric-grid,.deponie-metrics){grid-template-columns:repeat(2,minmax(0,1fr))!important}
  html[data-theme] :is(.stat-card,.metric-grid article,.deponie-metrics article){min-height:96px!important;padding:14px!important}
  html[data-theme] .deponie-dashboard-grid{grid-template-columns:1fr!important}
  html[data-theme] .bilance-bar-row{grid-template-columns:minmax(90px,1fr) minmax(80px,1.5fr) auto!important;gap:9px!important}
  html[data-theme] .bilance-bar-label{font-size:12px!important;overflow-wrap:anywhere}
  html[data-theme] .bilance-bar-value{font-size:12px!important}
  html[data-theme] :is(.form-grid,.settings-two-col,.settings-add-grid,.filter-grid,.print-settings-grid,.document-upload-grid){grid-template-columns:1fr!important}
  html[data-theme] .filtry{grid-template-columns:1fr!important;padding:14px!important}
  html[data-theme] .filtry button{width:100%!important;min-height:48px!important}
  html[data-theme] .btn-row{align-items:stretch;flex-direction:column!important}
  html[data-theme] .btn-row > *{width:100%!important}
  html[data-theme] .tabulka-wrap{margin-inline:0!important;border-radius:12px!important}
  html[data-theme] .tabulka{min-width:720px}

  html[data-theme] .recent-movements .tabulka-wrap{overflow:visible!important;background:transparent!important;border:0!important}
  html[data-theme] .recent-movements .tabulka{min-width:0!important;display:block!important}
  html[data-theme] .recent-movements .tabulka thead{display:none!important}
  html[data-theme] .recent-movements .tabulka tbody{display:block!important}
  html[data-theme] .recent-movements .tabulka tbody tr{
    padding:14px 0!important;
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:7px 14px!important;
    border-top:1px solid var(--app-line)!important;
  }
  html[data-theme] .recent-movements .tabulka tbody tr:first-child{border-top:0!important}
  html[data-theme] .recent-movements .tabulka td{
    min-width:0!important;
    padding:0!important;
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:8px!important;
    white-space:normal!important;
    background:transparent!important;
    border:0!important;
    overflow-wrap:anywhere;
  }
  html[data-theme] .recent-movements .tabulka td::before{content:attr(data-label);color:#7f8ca2;font-size:10px;font-weight:800;letter-spacing:.055em;text-transform:uppercase}
  html[data-theme] .recent-movements .tabulka td[data-label="Materiál"]{grid-column:1/-1;align-items:flex-start}
  html[data-theme] .recent-movements .tabulka td[data-label="Akce"]{justify-content:flex-end}
  html[data-theme] .recent-movements .tabulka td[data-label="Akce"]::before{display:none}

  html[data-theme] .modal{align-items:flex-end!important;padding:10px!important}
  html[data-theme] .modal-card{width:100%!important;max-height:calc(100dvh - 28px)!important;overflow:auto!important;padding:20px!important;border-radius:18px 18px 12px 12px!important}
  html[data-theme] .print-limits-grid{grid-template-columns:1fr!important}
  html[data-theme] .print-settings-intro{grid-template-columns:38px minmax(0,1fr)!important}
  html[data-theme] .document-upload-actions{flex-direction:column!important}
  html[data-theme] .document-upload-actions > *{width:100%!important}

  html[data-theme] body.kypar-body .kypar-topbar{min-height:66px!important;padding-inline:12px!important}
  html[data-theme] body.kypar-body .kypar-brand-copy strong{font-size:15px!important}
  html[data-theme] body.kypar-body .kypar-brand-copy small{font-size:11px!important}
  html[data-theme] body.kypar-body .kypar-header-action{min-width:44px!important;min-height:44px!important}
  html[data-theme] body.kypar-body .kypar-header-action span{display:none!important}
  html[data-theme] body.kypar-body .kypar-main{padding:20px 14px!important;align-items:flex-start!important}
  html[data-theme] body.kypar-body .kypar-home{gap:16px!important}
  html[data-theme] body.kypar-body .big-action{min-height:132px!important;padding:22px!important;font-size:25px!important}
  html[data-theme] body.kypar-body .big-action > svg:first-child{width:42px!important;height:42px!important}
  html[data-theme] body.kypar-body .flow-main{padding:22px 14px 40px!important}
  html[data-theme] body.kypar-body :is(.qr-input,.big-input){min-height:58px!important;font-size:21px!important}

  html[data-theme] .login-card{padding:26px 22px!important;border-radius:16px!important}
}

@media screen and (max-width:420px){
  html[data-theme] .admin-nav .brand{font-size:0!important}
  html[data-theme] .admin-nav .brand-label{display:none!important}
  html[data-theme] .brand-mark{width:36px!important;height:36px!important;flex-basis:36px!important}
  html[data-theme] .admin-nav .nav-stavba{max-width:58vw!important}
  html[data-theme] .admin-nav .nav-stavba strong{max-width:104px!important}
  html[data-theme] .admin-nav .logout-form{display:none!important}
  html[data-theme] .admin-nav nav a,
  html[data-theme] .deponie-mobile-more-trigger{min-width:52px!important;padding-inline:4px!important;font-size:10px!important}
  html[data-theme] :is(.stats-grid,.metric-grid,.deponie-metrics){grid-template-columns:1fr!important}
  html[data-theme] .bilance-bar-row{grid-template-columns:minmax(72px,1fr) minmax(64px,1.2fr) auto!important}
}

@media screen and (min-width:981px){
  html[data-theme] .admin-nav:not(.deponie-admin-nav) > nav,
  html[data-theme] .deponie-admin-nav .deponie-nav-shell{
    height:calc(100dvh - var(--app-topbar))!important;
    max-height:none!important;
  }
  html[data-theme] .deponie-admin-nav .deponie-nav-scroll{
    width:100%!important;
    height:100%!important;
  }
  html[data-theme] .deponie-admin-nav .deponie-nav-scroll > nav{
    width:100%!important;
    min-width:100%!important;
    max-width:none!important;
  }
  html[data-theme] .deponie-admin-nav .brand-label{display:inline!important}
}

@media screen and (max-width:420px){
  html[data-theme] .deponie-admin-nav .brand-label{display:none!important}
}

@media (prefers-reduced-motion:reduce){
  html[data-theme] *,html[data-theme] *::before,html[data-theme] *::after{
    scroll-behavior:auto!important;
    transition-duration:.01ms!important;
    animation-duration:.01ms!important;
    animation-iteration-count:1!important;
  }
}

/* ============================================================
   Přílohy deponie — kompaktní výběr souboru a čistý prázdný stav
   ============================================================ */
html[data-theme] .document-panel .panel-heading{
  margin-bottom:16px;
  padding-bottom:15px;
  border-bottom:1px solid var(--ui-line);
  background:transparent!important;
  color:var(--ui-text)!important;
}

html[data-theme] .document-panel .panel-heading h2{
  margin:3px 0 0;
  color:#fff!important;
  font-size:22px;
}

html[data-theme] .document-panel .count-badge{
  min-width:34px;
  height:34px;
  padding:0 10px;
  display:inline-grid;
  place-items:center;
  border:1px solid #405983;
  border-radius:9px;
  background:#172947;
  color:#b8ceff;
  font-size:13px;
  font-weight:850;
  box-shadow:none;
}

html[data-theme] .document-upload-form{
  gap:16px;
  margin:0 0 16px;
  padding:18px;
  border:1px solid var(--ui-line)!important;
  border-radius:var(--ui-radius)!important;
  background:var(--ui-bg-raised)!important;
  box-shadow:none!important;
}

.document-upload-grid{
  display:grid;
  grid-template-columns:minmax(260px,.72fr) minmax(420px,1.28fr);
  gap:14px;
  align-items:stretch;
}

.document-name-field{
  min-width:0;
  display:grid;
  align-content:start;
  gap:8px;
}

.document-name-field > span{
  color:#dce6f4;
  font-size:13px;
  font-weight:800;
}

html[data-theme] .document-name-field input{
  width:100%;
  min-width:0;
  min-height:54px;
  padding:0 14px;
  font-size:15px;
  font-weight:600;
}

html[data-theme] .file-drop{
  position:relative;
  min-width:0;
  min-height:86px;
  padding:13px 14px;
  display:grid;
  grid-template-columns:46px minmax(0,1fr) auto;
  grid-template-areas:
    "icon copy action"
    "icon name action";
  gap:3px 13px;
  align-items:center;
  border:1px dashed #506789!important;
  border-radius:9px;
  background:#0d192b!important;
  color:var(--ui-text)!important;
  text-align:left;
  box-shadow:none!important;
  cursor:pointer;
  transition:border-color .14s ease,background-color .14s ease;
}

html[data-theme] .file-drop:hover,
html[data-theme] .file-drop:focus-within{
  border-color:#7e9be0!important;
  background:#111f35!important;
}

.file-drop-input{
  position:absolute;
  width:1px!important;
  height:1px;
  margin:0;
  padding:0;
  overflow:hidden;
  opacity:0;
  pointer-events:none;
}

.file-drop-icon{
  grid-area:icon;
  width:46px;
  height:46px;
  display:grid;
  place-items:center;
  border:1px solid #3c5680;
  border-radius:9px;
  background:#172947;
  color:#9bb8fa;
}

.file-drop-icon svg,
.document-upload-privacy svg,
.document-empty-icon svg{
  width:22px;
  height:22px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.9;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.file-drop-copy{
  grid-area:copy;
  min-width:0;
  align-self:end;
}

.file-drop-copy strong,
.file-drop-copy small{
  display:block;
}

.file-drop-copy strong{
  color:#f7f9fd;
  font-size:14px;
  line-height:1.3;
}

html[data-theme] .file-drop-copy small{
  margin-top:3px;
  color:var(--ui-muted)!important;
  font-size:12px;
  font-weight:600;
}

.file-drop-action{
  grid-area:action;
  min-height:38px;
  padding:0 14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid #5678b8;
  border-radius:7px;
  background:#1b3156;
  color:#dce8ff;
  font-size:13px;
  font-weight:800;
  white-space:nowrap;
}

.file-drop:hover .file-drop-action,
.file-drop:focus-within .file-drop-action{
  border-color:#7396dd;
  background:#25416f;
  color:#fff;
}

.file-drop-name{
  grid-area:name;
  min-width:0;
  align-self:start;
  overflow:hidden;
  color:#8392a7;
  font-size:12px;
  font-weight:650;
  line-height:1.35;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.file-drop.has-file{
  border-style:solid!important;
  border-color:#347658!important;
}

.file-drop.has-file .file-drop-icon{
  border-color:#347658;
  background:#122c24;
  color:#75dda5;
}

.file-drop.has-file .file-drop-name{
  color:#83d9aa;
}

.document-upload-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.document-upload-privacy{
  min-width:0;
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:#8f9fb4;
  font-size:12px;
  font-weight:650;
}

.document-upload-privacy svg{
  width:18px;
  height:18px;
  flex:0 0 18px;
  color:#6fcf9b;
}

html[data-theme] .document-upload-actions .btn-green{
  min-width:210px;
  min-height:46px;
  margin:0;
  padding:0 20px;
}

html[data-theme] .document-list{
  overflow:hidden;
}

html[data-theme] .document-list.is-empty{
  border-style:dashed!important;
  border-color:#354762!important;
  background:#0b1526!important;
}

.document-empty-state{
  min-height:92px;
  padding:18px 20px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:13px;
  text-align:left;
}

.document-empty-icon{
  width:42px;
  height:42px;
  flex:0 0 42px;
  display:grid;
  place-items:center;
  border:1px solid #344b70;
  border-radius:9px;
  background:#152640;
  color:#88a8ef;
}

.document-empty-state strong{
  color:#eaf0f8;
  font-size:14px;
}

.document-empty-state p{
  margin:3px 0 0;
  color:#8f9fb4;
  font-size:13px;
  line-height:1.45;
}

@media (max-width:980px){
  .document-upload-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width:620px){
  html[data-theme] .document-panel .panel-heading{
    padding:0 0 15px;
    align-items:flex-start;
    flex-direction:row;
  }

  html[data-theme] .document-upload-form{
    padding:14px;
  }

  html[data-theme] .file-drop{
    grid-template-columns:42px minmax(0,1fr);
    grid-template-areas:
      "icon copy"
      "name name"
      "action action";
    gap:9px 11px;
  }

  .file-drop-icon{
    width:42px;
    height:42px;
  }

  .file-drop-action{
    width:100%;
  }

  .document-upload-actions{
    align-items:stretch;
    flex-direction:column;
  }

  html[data-theme] .document-upload-actions .btn-green{
    width:100%;
    min-width:0;
  }

  .document-empty-state{
    justify-content:flex-start;
  }
}

/* ============================================================
   Navigace deponie — kompaktní lišta s ovládaným vodorovným posunem
   ============================================================ */
html[data-theme] .deponie-admin-nav{
  width:100%;
  max-width:100%;
  min-width:0;
  display:grid;
  grid-template-columns:max-content minmax(220px,1fr) max-content;
  align-items:center;
  gap:clamp(10px,1.2vw,20px);
  overflow:hidden;
}

html[data-theme] .deponie-admin-nav .brand{
  min-width:0;
}

.deponie-admin-nav .brand-label{
  white-space:nowrap;
}

.deponie-nav-shell{
  position:relative;
  min-width:0;
  width:100%;
  height:64px;
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:stretch;
}

.deponie-nav-scroll{
  min-width:0;
  width:100%;
  height:100%;
  overflow-x:auto;
  overflow-y:hidden;
  overscroll-behavior-inline:contain;
  scroll-behavior:smooth;
  scrollbar-width:none;
}

.deponie-nav-scroll::-webkit-scrollbar{
  display:none;
}

html[data-theme] .deponie-nav-scroll:focus-visible{
  border-radius:5px;
  outline-offset:-4px!important;
}

html[data-theme] .deponie-nav-scroll nav{
  width:max-content!important;
  min-width:max-content!important;
  height:100%;
  overflow:visible!important;
}

html[data-theme] .deponie-nav-scroll nav a{
  flex:0 0 auto;
  scroll-snap-align:start;
}

html[data-theme] .deponie-nav-scroll nav a[data-nav-utility]{
  position:relative;
  right:auto;
  z-index:auto;
  margin-left:5px;
  border-left:1px solid #2a3a52;
  box-shadow:none;
}

html[data-theme] button.deponie-nav-arrow{
  position:relative;
  z-index:5;
  width:34px;
  min-width:34px;
  height:64px;
  min-height:64px!important;
  margin:0;
  padding:0!important;
  display:grid;
  place-items:center;
  border:0!important;
  border-radius:0!important;
  background:#101c30!important;
  color:#c8d8f0!important;
  box-shadow:none!important;
  cursor:pointer;
}

html[data-theme] button.deponie-nav-arrow[hidden]{
  display:none!important;
}

html[data-theme] button.deponie-nav-arrow:hover,
html[data-theme] button.deponie-nav-arrow:focus-visible{
  background:#192944!important;
  color:#fff!important;
}

html[data-theme] button.deponie-nav-arrow:disabled{
  background:#0b1628!important;
  color:#52647d!important;
  opacity:1;
  cursor:default;
}

.deponie-nav-arrow-prev{
  border-right:1px solid #2a3a52!important;
  box-shadow:10px 0 16px #081222!important;
}

.deponie-nav-arrow-next{
  border-left:1px solid #2a3a52!important;
  box-shadow:-10px 0 16px #081222!important;
}

.deponie-nav-arrow svg{
  width:18px;
  height:18px;
  fill:none;
  stroke:currentColor;
  stroke-width:2.2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

html[data-theme] .deponie-admin-nav .nav-right{
  min-width:max-content;
  margin-left:0;
  justify-self:end;
  flex-wrap:nowrap;
}

html[data-theme] .deponie-admin-nav .nav-stavba strong{
  max-width:150px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.deponie-admin-nav .nav-user{
  max-width:110px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

@media (max-width:1740px){
  html[data-theme] .deponie-admin-nav{
    grid-template-columns:34px minmax(180px,1fr) max-content;
    gap:10px;
    padding-inline:14px;
  }

  .deponie-admin-nav .brand-label{
    display:none;
  }

  html[data-theme] .deponie-admin-nav .brand{
    width:34px;
  }

  html[data-theme] .deponie-nav-scroll nav a{
    padding-inline:10px;
    gap:6px;
  }

  html[data-theme] .deponie-admin-nav .nav-right{
    gap:6px;
  }
}

@media (max-width:1440px){
  .deponie-admin-nav .nav-user,
  html[data-theme] .deponie-admin-nav .nav-role,
  html[data-theme] .deponie-admin-nav .nav-sep{
    display:none;
  }

  html[data-theme] .deponie-admin-nav .nav-stavba strong{
    max-width:112px;
  }
}

@media (max-width:1180px){
  html[data-theme] .deponie-admin-nav{
    min-height:0;
    grid-template-columns:max-content minmax(0,1fr);
    grid-template-areas:
      "brand utility"
      "primary primary";
    gap:0 12px;
    padding:0 14px;
  }

  html[data-theme] .deponie-admin-nav .brand{
    grid-area:brand;
    width:auto;
    min-height:56px;
  }

  .deponie-admin-nav .brand-label{
    display:inline;
  }

  .deponie-nav-shell{
    grid-area:primary;
    height:50px;
    border-top:1px solid #1d2b40;
  }

  html[data-theme] .deponie-nav-scroll nav{
    order:initial;
    width:max-content!important;
  }

  html[data-theme] .deponie-nav-scroll nav a{
    min-height:50px;
  }

  html[data-theme] button.deponie-nav-arrow{
    height:50px;
    min-height:50px!important;
  }

  html[data-theme] .deponie-admin-nav .nav-right{
    grid-area:utility;
    width:auto;
    margin:0;
    padding:0;
    overflow:visible;
  }
}

@media (max-width:700px){
  html[data-theme] .deponie-admin-nav{
    grid-template-columns:minmax(0,1fr);
    grid-template-areas:
      "brand"
      "primary"
      "utility";
    gap:0;
  }

  html[data-theme] .deponie-admin-nav .brand{
    min-height:52px;
  }

  html[data-theme] .deponie-admin-nav .nav-right{
    width:100%;
    max-width:100%;
    justify-self:stretch;
    padding:8px 0 10px;
    overflow-x:auto;
    overflow-y:hidden;
    scrollbar-width:thin;
  }
}

@media (max-width:560px){
  .deponie-admin-nav .brand-label{
    display:none;
  }

  html[data-theme] .deponie-admin-nav .brand{
    width:34px;
  }

  .deponie-nav-shell{
    height:46px;
  }

  html[data-theme] .deponie-nav-scroll nav a{
    min-height:46px;
    padding-inline:10px;
    font-size:12px;
  }

  html[data-theme] button.deponie-nav-arrow{
    width:32px;
    min-width:32px;
    height:46px;
    min-height:46px!important;
  }

  .deponie-admin-nav .nav-device-label{
    display:none;
  }

  html[data-theme] .deponie-admin-nav .nav-stavba strong{
    max-width:100px;
  }
}

/* Bezpečné potvrzení nevratných akcí bez systémových promptů. */
html[data-theme] .destructive-dialog{
  width:min(92vw,520px);
  max-width:520px;
  margin:auto;
  padding:0;
  overflow:visible;
  border:0;
  border-radius:12px;
  background:transparent;
  color:var(--ui-text);
  box-shadow:0 28px 80px rgba(0,0,0,.48);
}

html[data-theme] .destructive-dialog::backdrop{
  background:rgba(2,8,18,.76);
  backdrop-filter:blur(3px);
}

html[data-theme] .destructive-dialog-card{
  margin:0;
  padding:22px;
  display:grid;
  grid-template-columns:48px minmax(0,1fr);
  gap:16px;
  border:1px solid #4b2f3a;
  border-radius:12px;
  background:#111a2c;
  box-shadow:none;
}

.destructive-dialog-icon{
  width:48px;
  height:48px;
  display:grid;
  place-items:center;
  border:1px solid #743a49;
  border-radius:10px;
  background:#321a22;
  color:#ff9fa8;
}

.destructive-dialog-icon svg{
  width:23px;
  height:23px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.9;
  stroke-linecap:round;
  stroke-linejoin:round;
}

html[data-theme] .destructive-dialog h2{
  margin:3px 0 7px;
  color:#fff!important;
  font-size:21px;
}

html[data-theme] .destructive-dialog p{
  margin:0;
  color:#aebbd0;
  font-size:14px;
  line-height:1.55;
}

.destructive-confirm-field,
.destructive-dialog > form > .alert,
.destructive-dialog-actions{
  grid-column:1/-1;
}

.destructive-confirm-field{
  display:grid;
  gap:7px;
  color:#dfe7f2;
  font-size:13px;
  font-weight:700;
}

html[data-theme] .destructive-confirm-field input{
  width:100%;
  text-transform:uppercase;
  letter-spacing:.08em;
  font-weight:850;
}

.destructive-dialog-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  padding-top:2px;
}

.destructive-dialog-actions button{
  min-width:128px;
  min-height:44px;
}

html[data-theme] .stavba-delete-form{
  background:#0b1526;
  border-color:#2a3a52;
}

.app-combobox-option-copy{
  min-width:0;
  display:grid;
  gap:3px;
}

.app-combobox-option-copy strong{
  overflow:hidden;
  color:inherit;
  font-size:14px;
  line-height:1.25;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.app-combobox-option-copy small{
  overflow:hidden;
  color:var(--ui-muted,#9fb0c6);
  font-size:11px;
  font-weight:650;
  line-height:1.25;
  text-overflow:ellipsis;
  white-space:nowrap;
}

html[data-theme] .deponie-main .app-combobox-label-row > label{
  color:var(--ui-text);
}

html[data-theme] .deponie-main .app-combobox-footer{
  border-color:var(--ui-line);
  background:#0b1526;
  color:var(--ui-muted);
}

/* Deponie / uživatelé a přístupy k provozům */
.sr-only{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important;
}

.deponie-users-main{
  padding-bottom:56px;
}

.deponie-user-stats{
  margin-bottom:18px;
}

.deponie-user-toolbar{
  display:grid;
  grid-template-columns:minmax(240px,1fr) minmax(190px,260px) max-content;
  align-items:end;
  gap:14px;
  margin-bottom:18px;
  padding:18px 20px!important;
}

.deponie-user-toolbar label{
  display:grid;
  gap:7px;
  color:var(--ui-text,#ecf3fb);
  font-size:13px;
  font-weight:800;
}

.deponie-user-toolbar input,
.deponie-user-toolbar select{
  width:100%;
  min-height:46px;
  margin:0;
}

.deponie-user-toolbar > p{
  min-height:46px;
  margin:0;
  padding:0 16px;
  display:flex;
  align-items:center;
  gap:6px;
  border:1px solid var(--ui-line,#283950);
  border-radius:10px;
  color:var(--ui-muted,#aebed1);
  white-space:nowrap;
}

.deponie-user-toolbar > p strong{
  color:var(--ui-text,#f2f6fb);
  font-size:18px;
}

.deponie-user-access-list{
  display:grid;
  gap:14px;
}

.deponie-user-access-card{
  padding:0!important;
  overflow:hidden;
  transition:border-color .18s ease, box-shadow .18s ease;
}

html[data-theme] .deponie-user-access-card.has-no-access{
  border-color:rgba(245,178,74,.5);
}

.deponie-user-access-form{
  display:grid;
}

.deponie-user-access-head{
  display:grid;
  grid-template-columns:46px minmax(0,1fr) max-content;
  align-items:center;
  gap:14px;
  padding:18px 20px;
  border-bottom:1px solid var(--ui-line,#283950);
}

.deponie-user-avatar{
  width:46px;
  height:46px;
  display:grid;
  place-items:center;
  border:1px solid rgba(111,143,255,.45);
  border-radius:13px;
  background:linear-gradient(145deg,rgba(72,104,221,.3),rgba(41,184,135,.14));
  color:#eef5ff;
  font-size:20px;
  font-weight:900;
  box-shadow:inset 0 1px rgba(255,255,255,.08);
}

.deponie-user-access-head h2{
  margin:0 0 3px;
  color:var(--ui-text,#f2f6fb);
  font-size:18px;
  line-height:1.2;
}

.deponie-user-access-head p{
  margin:0;
  overflow:hidden;
  color:var(--ui-muted,#aebed1);
  font-size:13px;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.deponie-user-role{
  padding:7px 10px;
  border:1px solid #405474;
  border-radius:999px;
  background:#14223a;
  color:#d9e6f7;
  font-size:11px;
  font-weight:850;
  letter-spacing:.035em;
  white-space:nowrap;
}

.deponie-user-access-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px 20px 10px;
}

.deponie-user-access-actions p{
  margin:0;
  color:var(--ui-muted,#aebed1);
  font-size:13px;
}

.deponie-user-access-actions p strong{
  color:#fff;
  font-size:17px;
}

.deponie-user-access-actions > div{
  display:flex;
  gap:8px;
}

.deponie-user-access-actions .btn-mini{
  min-height:36px!important;
  padding:7px 11px!important;
  font-size:12px!important;
}

.deponie-facility-access-grid{
  margin:0;
  padding:4px 20px 18px;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  border:0;
}

.deponie-facility-access-option{
  position:relative;
  min-width:0;
  min-height:68px;
  padding:12px 13px;
  display:grid;
  grid-template-columns:26px minmax(0,1fr);
  align-items:center;
  gap:11px;
  border:1px solid var(--ui-line,#2b3c54);
  border-radius:12px;
  background:#0b1526;
  cursor:pointer;
  transition:border-color .15s ease,background .15s ease,transform .15s ease;
}

.deponie-facility-access-option:hover{
  border-color:#526d98;
  background:#101d31;
  transform:translateY(-1px);
}

.deponie-facility-access-option:has(input:checked){
  border-color:#5f82ef;
  background:linear-gradient(135deg,rgba(55,90,205,.24),rgba(22,94,93,.15));
  box-shadow:inset 0 0 0 1px rgba(109,139,255,.14);
}

.deponie-facility-access-option.is-inactive{
  border-style:dashed;
  background:#0a1321;
}

.deponie-facility-access-option.is-inactive:has(input:checked){
  border-color:#6f7890;
  background:#101827;
}

.deponie-facility-access-option:focus-within{
  outline:3px solid rgba(111,143,255,.3);
  outline-offset:2px;
}

.deponie-facility-access-option input{
  position:absolute;
  width:1px;
  height:1px;
  opacity:0;
  pointer-events:none;
}

.deponie-facility-check{
  width:26px;
  height:26px;
  display:grid;
  place-items:center;
  border:1px solid #40516c;
  border-radius:8px;
  background:#111e31;
  color:transparent;
  font-size:15px;
  font-weight:950;
  transition:.15s ease;
}

.deponie-facility-access-option input:checked + .deponie-facility-check{
  border-color:#6f8fff;
  background:#5d7bec;
  color:#fff;
  box-shadow:0 5px 14px rgba(55,85,190,.32);
}

.deponie-facility-copy{
  min-width:0;
  display:grid;
  gap:3px;
}

.deponie-facility-copy strong{
  overflow:hidden;
  color:var(--ui-text,#f1f6fb);
  font-size:14px;
  line-height:1.25;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.deponie-facility-copy strong em{
  margin-left:5px;
  padding:2px 5px;
  border:1px solid #4d586d;
  border-radius:999px;
  color:#9aa8bc;
  font-size:9px;
  font-style:normal;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
  vertical-align:2px;
}

.deponie-facility-copy small{
  overflow:hidden;
  color:var(--ui-muted,#aebed1);
  font-size:11px;
  line-height:1.35;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.deponie-user-access-footer{
  min-height:70px;
  padding:13px 20px;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:18px;
  border-top:1px solid var(--ui-line,#283950);
  background:rgba(7,15,28,.38);
}

.deponie-user-access-footer .btn-green{
  min-width:168px;
  margin-left:auto;
}

.deponie-user-access-footer .btn-green:disabled{
  border-color:#324056!important;
  background:#273348!important;
  color:#8f9db0!important;
  cursor:not-allowed;
  box-shadow:none!important;
  opacity:.78;
}

.deponie-user-access-warning{
  margin:0;
  color:#f5c272;
  font-size:12px;
  font-weight:750;
}

.deponie-admin-access-note{
  margin:18px 20px;
  padding:15px 16px;
  display:flex;
  align-items:center;
  gap:13px;
  border:1px solid rgba(72,192,132,.35);
  border-radius:12px;
  background:rgba(28,119,80,.13);
}

.deponie-admin-access-note svg{
  width:25px;
  height:25px;
  flex:0 0 auto;
  fill:none;
  stroke:#57d197;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.deponie-admin-access-note div{
  display:grid;
  gap:2px;
}

.deponie-admin-access-note strong{
  color:#dff8eb;
  font-size:14px;
}

.deponie-admin-access-note span{
  color:#a7c7b6;
  font-size:12px;
}

.deponie-user-filter-empty{
  padding:34px!important;
  color:var(--ui-muted,#aebed1);
  text-align:center;
}

.access-management-callout{
  padding:15px;
  display:grid;
  grid-template-columns:44px minmax(0,1fr) max-content;
  align-items:center;
  gap:13px;
  border:1px solid #314767;
  border-radius:12px;
  background:#0c192a;
}

.access-management-callout-icon{
  width:44px;
  height:44px;
  display:grid;
  place-items:center;
  border:1px solid #415d87;
  border-radius:11px;
  background:#142641;
  font-size:20px;
}

.access-management-callout strong{
  display:block;
  color:#eff5fd;
  font-size:14px;
}

.access-management-callout p{
  margin:3px 0 0;
  color:var(--ui-muted,#aebed1);
  font-size:12px;
  line-height:1.45;
}

.facility-danger-zone{
  margin-top:20px;
  padding:16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  border:1px solid #633744;
  border-radius:12px;
  background:#25151d;
}

.facility-danger-zone h2{
  margin:3px 0 6px;
  color:#fff!important;
  font-size:17px;
}

.facility-danger-zone p{
  max-width:650px;
  margin:0 0 7px;
  color:#cbb8bf;
  font-size:13px;
  line-height:1.5;
}

.facility-danger-zone small{
  color:#f0aeb6;
  font-size:12px;
  font-weight:750;
}

.facility-danger-zone > .btn-danger{
  flex:0 0 auto;
}

@media (max-width:1000px){
  .deponie-facility-access-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media (max-width:760px){
  .deponie-user-toolbar{
    grid-template-columns:1fr;
  }

  .deponie-user-toolbar > p{
    justify-content:center;
  }

  .deponie-user-access-head{
    grid-template-columns:42px minmax(0,1fr);
    padding:15px;
  }

  .deponie-user-avatar{
    width:42px;
    height:42px;
    border-radius:11px;
  }

  .deponie-user-role{
    grid-column:1 / -1;
    justify-self:start;
    margin-left:56px;
    margin-top:-7px;
  }

  .deponie-user-access-actions{
    align-items:flex-start;
    flex-direction:column;
    padding-inline:15px;
  }

  .deponie-user-access-actions > div{
    width:100%;
  }

  .deponie-user-access-actions button{
    flex:1;
  }

  .deponie-facility-access-grid{
    grid-template-columns:1fr;
    padding-inline:15px;
  }

  .deponie-user-access-footer{
    align-items:stretch;
    flex-direction:column;
    padding:13px 15px 15px;
  }

  .deponie-user-access-footer .btn-green{
    width:100%;
  }

  .deponie-admin-access-note{
    margin:15px;
  }

  .access-management-callout{
    grid-template-columns:42px minmax(0,1fr);
  }

  .access-management-callout .btn-primary{
    grid-column:1 / -1;
    width:100%;
  }

  .facility-danger-zone{
    align-items:stretch;
    flex-direction:column;
  }

  .facility-danger-zone > .btn-danger{
    width:100%;
  }
}

@media (max-width:560px){
  html[data-theme] .destructive-dialog-card{
    padding:18px;
    grid-template-columns:42px minmax(0,1fr);
    gap:13px;
  }

  .destructive-dialog-icon{
    width:42px;
    height:42px;
  }

  .destructive-dialog-actions{
    align-items:stretch;
    flex-direction:column-reverse;
  }

  .destructive-dialog-actions button{
    width:100%;
  }
}

/* Mobilni navigace je uvnitr fixni hlavicky. Explicitni vertikalni ukotveni
   ji proto pocita od viewportu a nenecha starsi styly vytahnout listu nahoru. */
@media screen and (max-width:980px){
  html[data-theme] .admin-nav:not(.deponie-admin-nav) > nav,
  html[data-theme] .deponie-admin-nav .deponie-nav-shell{
    top:calc(100dvh - 78px)!important;
    right:0!important;
    bottom:auto!important;
    left:0!important;
    height:calc(78px + env(safe-area-inset-bottom))!important;
    transform:none!important;
  }

  html[data-theme] .deponie-mobile-more{
    top:auto!important;
    right:12px!important;
    bottom:calc(88px + env(safe-area-inset-bottom))!important;
    left:12px!important;
    transform:none!important;
  }
}

html[data-theme] textarea{
  width:100%!important;
  max-width:100%!important;
}

/* ============================================================
   Stavby 2026 — stabilni app shell a sjednocene pracovni plochy
   ============================================================ */
@media screen{
  :root{
    --stavby-sidebar:248px;
    --stavby-topbar:72px;
    --stavby-content-max:1600px;
  }

  html[data-theme] .stavby-admin-nav{
    position:fixed!important;
    inset:0 0 auto 0!important;
    z-index:1000!important;
    width:100%!important;
    height:var(--stavby-topbar)!important;
    min-height:var(--stavby-topbar)!important;
    padding:0!important;
    display:grid!important;
    grid-template-columns:var(--stavby-sidebar) minmax(0,1fr)!important;
    align-items:center!important;
    gap:0!important;
    overflow:visible!important;
    background:rgba(5,13,28,.96)!important;
    border:0!important;
    border-bottom:1px solid #243551!important;
    box-shadow:0 12px 32px rgba(0,4,14,.2)!important;
    -webkit-backdrop-filter:none!important;
    backdrop-filter:none!important;
  }

  html[data-theme] .stavby-admin-nav .brand{
    grid-column:1!important;
    width:100%!important;
    height:var(--stavby-topbar)!important;
    min-height:var(--stavby-topbar)!important;
    padding:0 22px!important;
    display:flex!important;
    align-items:center!important;
    gap:11px!important;
    overflow:hidden;
    border-right:1px solid #243551!important;
    color:#f7f9fd!important;
    font-size:17px!important;
    font-weight:780!important;
    letter-spacing:-.025em!important;
    white-space:nowrap;
  }

  html[data-theme] .stavby-admin-nav .brand-label{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  html[data-theme] .stavby-admin-nav .nav-right{
    grid-column:2!important;
    width:100%!important;
    min-width:0!important;
    height:var(--stavby-topbar)!important;
    margin:0!important;
    padding:0 clamp(18px,2.6vw,40px)!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    gap:9px!important;
    overflow:hidden;
    color:#9eacc0!important;
    white-space:nowrap;
  }

  html[data-theme] .stavby-admin-nav .nav-stavba{
    margin-right:auto!important;
  }

  html[data-theme] .stavby-admin-nav .nav-user{
    max-width:170px;
    overflow:hidden;
    color:#dce4f0;
    font-weight:680;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  html[data-theme] .stavby-admin-nav > nav{
    position:fixed!important;
    inset:var(--stavby-topbar) auto 0 0!important;
    z-index:999!important;
    width:var(--stavby-sidebar)!important;
    min-width:var(--stavby-sidebar)!important;
    max-width:var(--stavby-sidebar)!important;
    height:calc(100dvh - var(--stavby-topbar))!important;
    min-height:0!important;
    padding:18px 14px!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    justify-content:flex-start!important;
    gap:6px!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    background:linear-gradient(180deg,#071326 0%,#06101f 100%)!important;
    border:0!important;
    border-right:1px solid #243551!important;
    box-shadow:none!important;
  }

  html[data-theme] .stavby-admin-nav > nav a{
    position:relative!important;
    width:100%!important;
    min-width:0!important;
    min-height:50px!important;
    padding:0 14px!important;
    display:flex!important;
    flex:0 0 auto!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:13px!important;
    border:1px solid transparent!important;
    border-radius:11px!important;
    color:#aebbd0!important;
    background:transparent!important;
    box-shadow:none!important;
    font-size:14px!important;
    font-weight:690!important;
    line-height:1.2!important;
    text-decoration:none!important;
    white-space:nowrap!important;
  }

  html[data-theme] .stavby-admin-nav > nav a:hover{
    color:#fff!important;
    background:#101d31!important;
    border-color:#263955!important;
  }

  html[data-theme] .stavby-admin-nav > nav a.active{
    color:#fff!important;
    background:linear-gradient(90deg,rgba(79,127,232,.24),rgba(79,127,232,.1))!important;
    border-color:rgba(97,143,239,.42)!important;
  }

  html[data-theme] .stavby-admin-nav > nav a.active::after{
    content:""!important;
    position:absolute!important;
    inset:9px auto 9px -1px!important;
    width:3px!important;
    height:auto!important;
    border-radius:0 4px 4px 0!important;
    background:#6292f5!important;
  }

  html[data-theme] .stavby-admin-nav .nav-ico{
    width:21px!important;
    height:21px!important;
    flex:0 0 21px!important;
  }

  html[data-theme] .stavby-admin-nav ~ .admin-main{
    width:auto!important;
    max-width:none!important;
    min-width:0!important;
    margin:0 0 0 var(--stavby-sidebar)!important;
    padding:calc(var(--stavby-topbar) + 34px) clamp(24px,3vw,52px) 64px!important;
  }

  html[data-theme] .stavby-admin-nav ~ .admin-main > *{
    max-width:var(--stavby-content-max);
    margin-right:auto;
    margin-left:auto;
  }

  html[data-theme] .stavby-admin-nav ~ .admin-main > h1{
    margin-bottom:22px!important;
  }

  html[data-theme] body.admin-body .stats-grid{
    grid-template-columns:repeat(auto-fit,minmax(190px,1fr))!important;
    gap:1px!important;
    margin-bottom:18px!important;
    padding:1px!important;
    overflow:hidden;
    background:#273650!important;
    border:1px solid #273650!important;
    border-radius:14px!important;
  }

  html[data-theme] body.admin-body .stats-grid.metric-strip{
    grid-template-columns:repeat(5,minmax(145px,1fr))!important;
  }

  html[data-theme] body.admin-body .stat-card{
    --stat-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6M8 13h8M8 17h8'/%3E%3C/svg%3E");
    position:relative!important;
    min-height:106px!important;
    padding:18px 18px 17px 74px!important;
    display:flex!important;
    flex-direction:column!important;
    justify-content:center!important;
    overflow:hidden;
    background:#0e1a2e!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
  }

  html[data-theme] body.admin-body .stat-card::before{
    content:""!important;
    position:absolute!important;
    top:50%!important;
    left:18px!important;
    width:40px!important;
    height:40px!important;
    border:1px solid #4e79d5!important;
    border-radius:50%!important;
    background:#132b4e!important;
    box-shadow:none!important;
    transform:translateY(-50%)!important;
  }

  html[data-theme] body.admin-body .stat-card::after{
    content:""!important;
    position:absolute!important;
    display:block!important;
    top:50%!important;
    left:28px!important;
    width:20px!important;
    height:20px!important;
    color:#78a5ff!important;
    background:currentColor!important;
    -webkit-mask:var(--stat-icon) center/contain no-repeat!important;
    mask:var(--stat-icon) center/contain no-repeat!important;
    transform:translateY(-50%)!important;
  }

  html[data-theme] body.admin-body .stat-card:nth-child(2){
    --stat-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3C/svg%3E");
  }
  html[data-theme] body.admin-body .stat-card:nth-child(2)::before{border-color:#3d845e!important;background:#112d23!important}
  html[data-theme] body.admin-body .stat-card:nth-child(2)::after{color:#63d795!important}
  html[data-theme] body.admin-body .stat-card:nth-child(3){
    --stat-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v18M5 7h14M5 17h14M7 7l-3 5h6L7 7Zm10 0-3 5h6l-3-5Z'/%3E%3C/svg%3E");
  }
  html[data-theme] body.admin-body .stat-card:nth-child(3)::before{border-color:#7653b8!important;background:#261b3e!important}
  html[data-theme] body.admin-body .stat-card:nth-child(3)::after{color:#b490ff!important}

  html[data-theme] body.admin-body .stat-card span{
    color:#a8b4c7!important;
    font-size:12px!important;
    font-weight:680!important;
    letter-spacing:.01em!important;
    text-transform:none!important;
  }

  html[data-theme] body.admin-body .stat-card strong{
    margin-top:4px!important;
    color:#f8faff!important;
    font-size:clamp(24px,2vw,32px)!important;
    font-variant-numeric:tabular-nums;
    letter-spacing:-.04em!important;
  }

  html[data-theme] body.admin-body .filtry{
    grid-template-columns:repeat(4,minmax(150px,1fr)) repeat(3,max-content)!important;
    gap:12px!important;
    padding:16px!important;
    align-items:end!important;
    background:#0e1a2e!important;
    border-color:#2a3d5b!important;
    border-radius:14px!important;
  }

  html[data-theme] body.admin-body .filtry label,
  html[data-theme] body.admin-body .filter-grid label{
    min-width:0;
    color:#dce4f0!important;
    font-size:12px!important;
    font-weight:760!important;
  }

  html[data-theme] body.admin-body .filtry button{
    min-height:48px!important;
    white-space:nowrap;
  }

  html[data-theme] body.admin-body .filtry .btn-green{
    color:#f3bd5a!important;
    background:#171b25!important;
    border-color:#b77c17!important;
  }

  html[data-theme] body.admin-body .filtry .btn-green:hover{
    color:#ffd47a!important;
    background:#292113!important;
    border-color:#d99a28!important;
  }

  html[data-theme] body.admin-body .souhrn{
    min-height:28px;
    color:#a8b4c7!important;
    font-size:13px;
  }

  html[data-theme] body.admin-body .tabulka-wrap{
    overflow:auto!important;
    background:#0b172a!important;
    border-color:#2a3d5b!important;
    border-radius:13px!important;
    scrollbar-gutter:stable;
  }

  html[data-theme] body.admin-body .tabulka{
    width:100%;
    color:#dfe6f1!important;
    font-size:13px!important;
    font-variant-numeric:tabular-nums;
  }

  html[data-theme] body.admin-body .tabulka th{
    height:46px!important;
    padding:11px 13px!important;
    color:#aebbd0!important;
    background:#0e1b30!important;
    border-color:#2a3d5b!important;
    font-size:11px!important;
    font-weight:800!important;
    letter-spacing:.025em!important;
    text-transform:none!important;
    white-space:nowrap;
  }

  html[data-theme] body.admin-body .tabulka td{
    height:50px!important;
    padding:10px 13px!important;
    color:#dce4f0!important;
    background:#0b172a!important;
    border-color:#243650!important;
  }

  html[data-theme] body.admin-body .tabulka tbody tr:hover td{
    background:#101f35!important;
  }

  html[data-theme] body.admin-body .record-netto{
    color:#65d894!important;
  }

  html[data-theme] body.admin-body .section-tabs{
    width:max-content!important;
    max-width:100%;
    margin-bottom:22px!important;
    padding:4px!important;
    display:flex!important;
    gap:4px!important;
    overflow:auto;
    background:#0d192c!important;
    border:1px solid #2a3d5b!important;
    border-radius:11px!important;
  }

  html[data-theme] body.admin-body .section-tabs a{
    min-height:40px!important;
    padding:0 15px!important;
    display:inline-flex!important;
    align-items:center!important;
    border:0!important;
    border-radius:8px!important;
    color:#aebbd0!important;
    background:transparent!important;
    text-decoration:none!important;
  }

  html[data-theme] body.admin-body .section-tabs a.active{
    color:#fff!important;
    background:#1c3563!important;
  }

  html[data-theme] body.admin-body .pruvodka-create-card{
    margin-bottom:18px!important;
  }

  html[data-theme] body.admin-body .pruvodka-create-card .form-grid{
    grid-template-columns:repeat(4,minmax(180px,1fr))!important;
    gap:14px!important;
  }

  html[data-theme] body.admin-body .pruvodky-workspace{
    grid-template-columns:minmax(0,1fr)!important;
    gap:14px!important;
  }

  html[data-theme] body.admin-body .pruvodky-workspace .pruvodky-filters{
    position:static!important;
    top:auto!important;
    padding:18px!important;
  }

  html[data-theme] body.admin-body .pruvodky-workspace .filter-grid{
    grid-template-columns:repeat(6,minmax(130px,1fr))!important;
    gap:12px!important;
  }

  html[data-theme] body.admin-body .pruvodky-workspace .filter-actions{
    margin-top:14px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:8px!important;
  }

  html[data-theme] body.admin-body .pruvodky-panel{
    background:#0b172a!important;
    border-color:#2a3d5b!important;
    border-radius:13px!important;
    box-shadow:none!important;
  }

  html[data-theme] body.admin-body .panel-heading{
    min-height:64px!important;
    padding:10px 16px!important;
    background:#0e1a2e!important;
    border-color:#2a3d5b!important;
  }

  html[data-theme] body.admin-body .pruvodky-state-tabs{
    background:#0a1628!important;
    border-color:#2a3d5b!important;
  }

  html[data-theme] body.admin-body :is(.object-group,.material-group){
    background:#0b172a!important;
    border-color:#243650!important;
  }

  html[data-theme] body.admin-body :is(.object-group,.material-group) summary{
    color:#dce4f0!important;
    background:#0e1b30!important;
    border-color:#243650!important;
  }

  html[data-theme] body.admin-body .pruvodka-item{
    background:#0b172a!important;
    border-color:#243650!important;
    border-radius:0!important;
    box-shadow:none!important;
  }

  html[data-theme] body.admin-body .settings-link-card{
    min-height:92px!important;
    margin-bottom:14px!important;
    display:grid!important;
    grid-template-columns:48px minmax(0,1fr) 28px!important;
    align-items:center!important;
    gap:15px!important;
    background:#0e1a2e!important;
    border-color:#2a3d5b!important;
    border-radius:13px!important;
  }

  html[data-theme] body.admin-body .settings-folder{
    margin-bottom:12px!important;
    overflow:hidden;
    background:#0e1a2e!important;
    border-color:#2a3d5b!important;
    border-radius:13px!important;
  }

  html[data-theme] body.admin-body .settings-folder summary{
    min-height:60px!important;
    color:#eef2f8!important;
    background:#0e1a2e!important;
  }

  html[data-theme] body.admin-body .settings-folder[open] summary{
    background:#122038!important;
    border-color:#2a3d5b!important;
  }

  html[data-theme] body.admin-body .stat-hero{
    gap:1px!important;
    padding:1px!important;
    overflow:hidden!important;
    background:#2a3d5b!important;
    border:1px solid #2a3d5b!important;
    border-radius:14px!important;
  }

  html[data-theme] body.admin-body .stat-hero-card{
    min-height:108px!important;
    background:#0e1a2e!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
  }

  html[data-theme] body.admin-body .stats-overview,
  html[data-theme] body.admin-body .so-card,
  html[data-theme] body.admin-body .export-filter-card,
  html[data-theme] body.admin-body .export-so-block{
    background:#0e1a2e!important;
    border-color:#2a3d5b!important;
    border-radius:13px!important;
    box-shadow:none!important;
  }
}

@media screen and (max-width:1380px){
  :root{--stavby-sidebar:228px}
  html[data-theme] .stavby-admin-nav .brand{padding-inline:18px!important;font-size:16px!important}
  html[data-theme] .stavby-admin-nav .nav-right{padding-inline:20px!important}
  html[data-theme] .stavby-admin-nav .nav-role,
  html[data-theme] .stavby-admin-nav .nav-sep,
  html[data-theme] .stavby-admin-nav .nav-user{display:none!important}
  html[data-theme] body.admin-body .filtry{grid-template-columns:repeat(4,minmax(130px,1fr)) repeat(3,minmax(116px,1fr))!important}
  html[data-theme] body.admin-body .filtry button{width:100%!important}
  html[data-theme] body.admin-body .pruvodka-create-card .form-grid{grid-template-columns:repeat(3,minmax(180px,1fr))!important}
  html[data-theme] body.admin-body .pruvodky-workspace .filter-grid{grid-template-columns:repeat(3,minmax(160px,1fr))!important}
}

@media screen and (min-width:981px){
  html[data-theme] .admin-nav.stavby-admin-nav > nav{
    top:var(--stavby-topbar)!important;
    right:auto!important;
    bottom:0!important;
    left:0!important;
    width:var(--stavby-sidebar)!important;
    min-width:var(--stavby-sidebar)!important;
    max-width:var(--stavby-sidebar)!important;
    height:calc(100dvh - var(--stavby-topbar))!important;
  }
}

@media screen and (max-width:980px){
  :root{--stavby-topbar:68px}

  html[data-theme] body.admin-body:has(.stavby-admin-nav){
    padding-bottom:calc(84px + env(safe-area-inset-bottom))!important;
  }

  html[data-theme] .stavby-admin-nav{
    height:var(--stavby-topbar)!important;
    min-height:var(--stavby-topbar)!important;
    padding:0 12px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:10px!important;
  }

  html[data-theme] .stavby-admin-nav .brand{
    width:auto!important;
    min-width:0!important;
    height:var(--stavby-topbar)!important;
    min-height:var(--stavby-topbar)!important;
    padding:0!important;
    border:0!important;
    font-size:15px!important;
  }

  html[data-theme] .stavby-admin-nav .nav-right{
    width:auto!important;
    min-width:0!important;
    height:var(--stavby-topbar)!important;
    margin-left:auto!important;
    padding:0!important;
    gap:6px!important;
    overflow:visible!important;
  }

  html[data-theme] .stavby-admin-nav .nav-mode-switch,
  html[data-theme] .stavby-admin-nav .nav-role,
  html[data-theme] .stavby-admin-nav .nav-sep,
  html[data-theme] .stavby-admin-nav .nav-user{display:none!important}

  html[data-theme] .stavby-admin-nav .nav-stavba{
    max-width:min(42vw,260px)!important;
    min-height:40px!important;
    margin:0!important;
    padding:3px 4px 3px 9px!important;
  }

  html[data-theme] .stavby-admin-nav .nav-stavba strong{
    max-width:115px!important;
  }

  html[data-theme] .stavby-admin-nav > nav{
    position:fixed!important;
    inset:auto 0 0 0!important;
    top:auto!important;
    right:0!important;
    bottom:0!important;
    left:0!important;
    z-index:1001!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:calc(76px + env(safe-area-inset-bottom))!important;
    min-height:0!important;
    padding:0 6px env(safe-area-inset-bottom)!important;
    display:flex!important;
    flex-direction:row!important;
    align-items:stretch!important;
    justify-content:space-around!important;
    gap:2px!important;
    overflow:visible!important;
    background:rgba(5,13,28,.97)!important;
    border:0!important;
    border-top:1px solid #2a3d5b!important;
    box-shadow:0 -14px 34px rgba(0,4,14,.28)!important;
    transform:none!important;
  }

  html[data-theme] .stavby-admin-nav > nav a{
    width:auto!important;
    min-width:60px!important;
    min-height:70px!important;
    padding:7px 6px 5px!important;
    display:flex!important;
    flex:1 1 0!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    gap:5px!important;
    border:0!important;
    border-radius:9px!important;
    font-size:10px!important;
    line-height:1.05!important;
  }

  html[data-theme] .stavby-admin-nav > nav a.active{
    color:#8bb2ff!important;
    background:rgba(79,127,232,.13)!important;
  }

  html[data-theme] .stavby-admin-nav > nav a.active::after{
    inset:auto 9px 0!important;
    width:auto!important;
    height:3px!important;
    border-radius:3px 3px 0 0!important;
  }

  html[data-theme] .stavby-admin-nav .nav-ico{
    width:22px!important;
    height:22px!important;
    flex-basis:22px!important;
  }

  html[data-theme] .stavby-admin-nav ~ .admin-main{
    width:auto!important;
    margin:0!important;
    padding:calc(var(--stavby-topbar) + 26px) clamp(16px,4vw,28px) calc(108px + env(safe-area-inset-bottom))!important;
  }

  html[data-theme] body.admin-body .stats-grid.metric-strip{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }

  html[data-theme] body.admin-body .filtry{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }

  html[data-theme] body.admin-body .filtry button{
    width:100%!important;
  }

  html[data-theme] body.admin-body .pruvodka-create-card .form-grid,
  html[data-theme] body.admin-body .pruvodky-workspace .filter-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}

@media screen and (max-width:700px){
  html[data-theme] .stavby-admin-nav .brand-label{max-width:112px}
  html[data-theme] .stavby-admin-nav .nav-stavba-label,
  html[data-theme] .stavby-admin-nav .status-dot{display:none!important}
  html[data-theme] .stavby-admin-nav .nav-stavba strong{max-width:88px!important}
  html[data-theme] .stavby-admin-nav .nav-change-stavba{font-size:0!important;min-width:34px!important}
  html[data-theme] .stavby-admin-nav .nav-change-stavba::before{
    content:"";
    width:16px;
    height:16px;
    background:currentColor;
    -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12a9 9 0 0 1 15-6.7L21 8M21 3v5h-5M21 12a9 9 0 0 1-15 6.7L3 16M3 21v-5h5'/%3E%3C/svg%3E") center/contain no-repeat;
    mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12a9 9 0 0 1 15-6.7L21 8M21 3v5h-5M21 12a9 9 0 0 1-15 6.7L3 16M3 21v-5h5'/%3E%3C/svg%3E") center/contain no-repeat;
  }
  html[data-theme] .stavby-admin-nav .logout-form{display:inline-flex!important}

  html[data-theme] .stavby-admin-nav ~ .admin-main{
    padding-inline:14px!important;
  }

  html[data-theme] .stavby-admin-nav ~ .admin-main h1{
    font-size:30px!important;
  }

  html[data-theme] body.admin-body .stats-grid,
  html[data-theme] body.admin-body .stats-grid.metric-strip{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }

  html[data-theme] body.admin-body .stat-card{
    min-height:98px!important;
    padding:14px 10px!important;
    align-items:center!important;
    text-align:center;
  }

  html[data-theme] body.admin-body .stat-card::before,
  html[data-theme] body.admin-body .stat-card::after{display:none!important}
  html[data-theme] body.admin-body .stat-card span{font-size:10px!important}
  html[data-theme] body.admin-body .stat-card strong{font-size:24px!important}
  html[data-theme] body.admin-body .stat-card small{font-size:9px!important}

  html[data-theme] body.admin-body .filtry{
    grid-template-columns:repeat(6,minmax(0,1fr))!important;
    gap:10px!important;
  }

  html[data-theme] body.admin-body .filtry label{
    grid-column:span 3;
  }

  html[data-theme] body.admin-body .filtry button{
    grid-column:span 2;
    min-width:0!important;
    padding-inline:6px!important;
    font-size:12px!important;
  }

  html[data-theme] body.admin-body .pruvodka-create-card .form-grid,
  html[data-theme] body.admin-body .pruvodky-workspace .filter-grid{
    grid-template-columns:1fr!important;
  }

  html[data-theme] body.admin-body .pruvodky-workspace .filter-actions,
  html[data-theme] body.admin-body .panel-heading,
  html[data-theme] body.admin-body .panel-actions{
    align-items:stretch!important;
    flex-direction:column!important;
  }

  html[data-theme] body.admin-body .pruvodky-workspace .filter-actions > *,
  html[data-theme] body.admin-body .panel-actions > *{
    width:100%!important;
  }

  html[data-theme] body.admin-body .records-table{
    min-width:0!important;
    display:block!important;
    background:transparent!important;
  }

  html[data-theme] body.admin-body .records-table thead{display:none!important}
  html[data-theme] body.admin-body .records-table tbody{
    display:grid!important;
    gap:12px!important;
    background:transparent!important;
  }

  html[data-theme] body.admin-body .records-table tbody tr{
    padding:14px!important;
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:0 16px!important;
    background:#0e1a2e!important;
    border:1px solid #2a3d5b!important;
    border-radius:13px!important;
  }

  html[data-theme] body.admin-body .records-table tbody tr:has(td[colspan]){
    display:block!important;
  }

  html[data-theme] body.admin-body .records-table td{
    min-width:0!important;
    height:auto!important;
    min-height:54px!important;
    padding:9px 0!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    align-content:center!important;
    gap:3px!important;
    color:#e4eaf3!important;
    background:transparent!important;
    border:0!important;
    border-bottom:1px solid #243650!important;
    white-space:normal!important;
    overflow-wrap:anywhere;
  }

  html[data-theme] body.admin-body .records-table td::before{
    content:attr(data-label);
    color:#8291a8;
    font-size:10px;
    font-weight:800;
    letter-spacing:.055em;
    text-transform:uppercase;
  }

  html[data-theme] body.admin-body .records-table td[colspan]{
    display:block!important;
    min-height:76px!important;
    padding:24px!important;
    text-align:center!important;
    border:0!important;
  }

  html[data-theme] body.admin-body .records-table td[colspan]::before{display:none}
  html[data-theme] body.admin-body .records-table .record-netto{color:#65d894!important}
  html[data-theme] body.admin-body .records-table .record-action{
    align-items:end!important;
    border-bottom:0!important;
  }
  html[data-theme] body.admin-body .records-table .record-action::before{display:none}
  html[data-theme] body.admin-body .records-table .record-action button{width:100%!important;min-height:44px!important}
}

@media screen and (max-width:460px){
  html[data-theme] .stavby-admin-nav .brand-label{display:inline!important;max-width:120px!important}
  html[data-theme] .stavby-admin-nav .brand-mark{width:36px!important;height:36px!important;flex-basis:36px!important}
  html[data-theme] .stavby-admin-nav .nav-stavba{max-width:31vw!important}
  html[data-theme] .stavby-admin-nav .nav-stavba strong{max-width:104px!important}
  html[data-theme] .stavby-admin-nav .nav-change-stavba{display:none!important}
  html[data-theme] .stavby-admin-nav .logout-link{min-width:40px!important;padding:0 8px!important}
  html[data-theme] .stavby-admin-nav > nav a{min-width:50px!important;padding-inline:3px!important;font-size:9px!important}
}

/* PWA instalace a mobilní bezpečné okraje -------------------------------- */
html,
body{
  min-height:100%;
  min-height:100svh;
}

body{
  overflow-x:hidden;
}

.pwa-install-trigger{
  position:fixed;
  z-index:1300;
  right:max(16px,env(safe-area-inset-right));
  bottom:max(18px,env(safe-area-inset-bottom));
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  min-height:46px;
  padding:10px 16px;
  border:1px solid rgba(126,174,213,.42);
  border-radius:999px;
  background:linear-gradient(135deg,#174f78,#0f3e61);
  color:#f8fbff;
  box-shadow:0 14px 34px rgba(0,5,16,.34);
  font:inherit;
  font-size:14px;
  font-weight:800;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}

.pwa-install-trigger[hidden],
.pwa-install-overlay[hidden],
.pwa-install-primary[hidden],
.pwa-install-steps[hidden]{
  display:none!important;
}

.pwa-install-trigger svg{
  width:20px;
  height:20px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.pwa-install-trigger:hover{
  transform:translateY(-1px);
  border-color:rgba(110,213,95,.68);
}

.pwa-install-trigger:focus-visible,
.pwa-install-dialog button:focus-visible{
  outline:3px solid #8ee785;
  outline-offset:3px;
}

.pwa-install-overlay{
  position:fixed;
  z-index:1600;
  inset:0;
  display:grid;
  place-items:center;
  padding:max(18px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(18px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));
  background:rgba(1,8,16,.76);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}

body.pwa-dialog-open{
  overflow:hidden;
}

.pwa-install-dialog{
  position:relative;
  width:min(100%,480px);
  max-height:calc(100dvh - max(36px,env(safe-area-inset-top) + env(safe-area-inset-bottom)));
  overflow:auto;
  overscroll-behavior:contain;
  padding:30px;
  border:1px solid rgba(129,169,202,.32);
  border-radius:24px;
  background:linear-gradient(160deg,#11283b,#091827 70%);
  color:#f4f8fc;
  box-shadow:0 30px 90px rgba(0,0,0,.5);
}

.pwa-install-dialog>img{
  display:block;
  width:72px;
  height:72px;
  margin:0 0 18px;
  border-radius:17px;
  box-shadow:0 12px 28px rgba(0,0,0,.28);
}

.pwa-install-close{
  position:absolute;
  top:14px;
  right:14px;
  width:44px;
  height:44px;
  padding:0;
  border:1px solid rgba(153,184,210,.3);
  border-radius:50%;
  background:rgba(8,20,32,.68);
  color:#e9f2fa;
  font-size:28px;
  line-height:1;
  cursor:pointer;
}

.pwa-install-eyebrow{
  margin:0 0 6px;
  color:#7ade70;
  font-size:12px;
  font-weight:900;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.pwa-install-dialog h2{
  margin:0;
  color:#fff;
  font-size:clamp(24px,6vw,32px);
  line-height:1.15;
}

.pwa-install-lead{
  margin:12px 0 0;
  color:#c4d2df;
  line-height:1.55;
}

.pwa-install-steps{
  display:grid;
  gap:10px;
  margin:22px 0 0;
  padding:0;
  list-style:none;
}

.pwa-install-steps li{
  display:grid;
  grid-template-columns:34px 1fr;
  align-items:center;
  gap:12px;
  min-height:56px;
  padding:10px 12px;
  border:1px solid rgba(129,169,202,.22);
  border-radius:14px;
  background:rgba(21,51,74,.45);
  color:#e9f1f8;
  line-height:1.4;
}

.pwa-install-steps svg,
.pwa-step-number{
  width:34px;
  height:34px;
  padding:7px;
  border-radius:10px;
  background:#183f5d;
  color:#8de785;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.pwa-step-number{
  display:grid;
  place-items:center;
  padding:0;
  font-weight:900;
}

.pwa-install-hint{
  margin:18px 0 0;
  color:#a9bdce;
  font-size:13px;
  line-height:1.5;
}

.pwa-install-actions{
  display:flex;
  gap:10px;
  margin-top:22px;
}

.pwa-install-actions button{
  flex:1 1 0;
  min-height:50px;
  padding:11px 14px;
  border-radius:13px;
  font:inherit;
  font-weight:850;
  cursor:pointer;
}

.pwa-install-primary{
  border:1px solid #79dc70;
  background:#69d55f;
  color:#092313;
}

.pwa-install-secondary{
  border:1px solid rgba(146,177,202,.34);
  background:#142b3e;
  color:#eef5fb;
}

@media screen and (max-width:767px){
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  select,
  textarea{
    font-size:16px!important;
  }

  button,
  [role="button"],
  input,
  select,
  textarea{
    touch-action:manipulation;
  }

  body:is(.admin-body,.deponie-body,.pwa-has-app-navigation) .pwa-install-trigger{
    bottom:calc(92px + env(safe-area-inset-bottom));
  }

  .pwa-install-dialog{
    align-self:end;
    width:100%;
    padding:24px 20px max(22px,env(safe-area-inset-bottom));
    border-radius:24px 24px 16px 16px;
  }

  .pwa-install-actions{
    flex-direction:column;
  }
}

@media screen and (max-width:420px){
  .pwa-install-trigger span{
    display:none;
  }

  .pwa-install-trigger{
    width:48px;
    height:48px;
    padding:0;
  }
}

@media (display-mode:standalone){
  body{
    padding-top:env(safe-area-inset-top);
  }

  .pwa-install-trigger{
    display:none!important;
  }
}

/* =====================================================
   Uživatelé, provozy a značka ŽSD — responsive polish
   ===================================================== */
html[data-theme] .brand-mark{
  width:38px!important;
  height:38px!important;
  flex:0 0 38px!important;
  border:0!important;
  border-radius:0!important;
  background:#fff url("assets/zsd-logo.png") center / contain no-repeat!important;
  box-shadow:none!important;
  color:transparent!important;
  font-size:0!important;
}

html[data-theme] .brand-mark::after{display:none!important}

.user-account-list-panel{
  min-width:0;
  display:grid;
  gap:16px;
}

.user-account-list-panel .password-security-note{
  min-height:70px;
  margin:0;
  padding:17px 20px;
  display:flex;
  align-items:center;
  gap:14px;
  border:1px solid #314666;
  border-radius:12px;
  background:#101e34;
  color:#b8c7db;
  line-height:1.5;
}

.user-account-list-panel .password-security-note strong{color:#f2f6fc}

.password-security-icon{
  width:36px;
  height:36px;
  flex:0 0 36px;
  display:grid;
  place-items:center;
  color:#8eb1ef;
}

.password-security-icon svg{
  width:29px;
  height:29px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.user-account-list{
  min-width:0;
  overflow:hidden;
  border:1px solid #2a3d5b;
  border-radius:13px;
  background:#0d182b;
}

.user-account-list-head,
.user-account-row{
  display:grid;
  grid-template-columns:minmax(210px,1.05fr) minmax(280px,1.42fr) minmax(250px,1.2fr) minmax(104px,.42fr);
  align-items:center;
  gap:22px;
}

.user-account-list-head{
  min-height:55px;
  padding:0 20px;
  color:#91a2bb;
  background:#101d32;
  border-bottom:1px solid #2d405e;
  font-size:12px;
  font-weight:800;
  letter-spacing:.025em;
}

.user-account-row{
  min-width:0;
  min-height:126px;
  padding:20px;
  border-bottom:1px solid #263a57;
  background:#0d182b;
}

.user-account-row:last-child{border-bottom:0}
.user-account-row:hover{background:#101d32}

.user-account-identity{
  min-width:0;
  display:flex;
  align-items:center;
  gap:14px;
}

.user-account-avatar{
  width:52px;
  height:52px;
  flex:0 0 52px;
  display:grid;
  place-items:center;
  border:1px solid #5276b6;
  border-radius:50%;
  background:#294f9e;
  color:#fff;
  font-size:20px;
  font-weight:850;
  text-transform:uppercase;
}

.user-account-row:nth-child(3n) .user-account-avatar{background:#27789b}
.user-account-row:nth-child(4n) .user-account-avatar{background:#235d88}

.user-account-name{
  min-width:0;
  display:grid;
  justify-items:start;
  gap:4px;
}

.user-account-name > strong{
  max-width:100%;
  overflow-wrap:anywhere;
  color:#f3f6fb;
  font-size:16px;
  line-height:1.25;
}

.user-account-name > small{
  color:#8fa0b7;
  font-size:11px;
  line-height:1.35;
}

.user-account-role{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:3px 8px;
  border-radius:6px;
  color:#c9d5e8;
  background:#22314a;
  font-size:11px;
  font-weight:800;
}

.user-account-role.role-admin{color:#7ce9aa;background:#12452e}
.user-account-role.role-stavbyvedouci{color:#cbd5e8;background:#293652}
.user-account-role.role-deponie{color:#89d8ba;background:#173e38}

.user-account-cell{min-width:0}
.user-account-cell::before{display:none}

.user-account-list-panel .account-recovery-form,
.user-account-list-panel .password-change-form{
  min-width:0;
  width:100%;
  display:grid;
  grid-template-columns:minmax(0,1fr) max-content;
  align-items:center;
  gap:10px;
}

.user-account-list-panel .password-change-form.kypar-password-form{
  grid-template-columns:minmax(0,1fr) max-content max-content;
}

.user-account-list-panel :is(.account-recovery-form,.password-change-form) input{
  width:100%;
  min-width:0!important;
  min-height:45px;
  margin:0;
}

.user-account-list-panel :is(.account-recovery-form,.password-change-form) .btn-mini{
  min-height:45px;
  margin:0;
  padding-inline:14px;
  white-space:nowrap;
}

.user-account-list-panel .recovery-state{
  display:block;
  margin-top:7px;
  color:#8fa0b7;
  font-size:10px;
}

.user-account-actions{text-align:right}
.user-account-actions .inline-delete-form{display:inline-block;margin:0}
.user-account-actions .btn-danger{min-height:43px;padding-inline:15px}

.user-current-label{
  display:inline-flex;
  align-items:center;
  min-height:32px;
  padding:5px 9px;
  border:1px solid #35513f;
  border-radius:7px;
  color:#83d7a3;
  background:#122d21;
  font-size:11px;
  font-weight:800;
}

.user-account-list-panel .table-foot{
  padding:0 4px;
  color:#91a2b9;
  background:transparent;
  border:0;
  text-align:left;
}

.facility-admin-list .record-actions{
  display:grid;
  grid-template-columns:minmax(0,1fr) max-content;
  gap:8px;
}

.facility-admin-list .record-actions > a{grid-column:1 / -1;text-align:center}
.facility-admin-list .record-actions > form{min-width:0}
.facility-admin-list .record-actions > form .btn-grey{width:100%}
.facility-admin-list .record-actions > .btn-danger{min-height:40px;margin:0}
.destructive-dialog-summary{display:block;margin-top:8px;color:#f0aeb6;font-weight:750}

.guide-detail-layout{min-width:0}
.guide-detail-data{min-width:0;overflow:hidden}
.guide-detail-data .tabulka{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  table-layout:fixed;
}
.guide-detail-data .tabulka :is(th,td){white-space:normal;overflow-wrap:anywhere}
.guide-detail-qr{min-width:0;text-align:center}

.guide-qr-code{
  width:min(100%,186px);
  margin-inline:auto;
  padding:12px;
  display:block;
  border:1px solid #d7dde7;
  border-radius:11px;
  background:#fff;
}

.guide-qr-code :is(img,canvas){display:block;width:100%!important;height:auto!important;aspect-ratio:1}

@media screen and (max-width:1180px){
  .user-account-list-head{display:none}

  .user-account-row{
    grid-template-columns:minmax(220px,.85fr) minmax(0,1.15fr);
    gap:18px 22px;
    padding:19px;
  }

  .user-account-identity{grid-row:span 2;align-self:start}
  .user-account-cell{display:block}
  .user-account-cell::before{
    content:attr(data-label);
    display:block;
    margin-bottom:7px;
    color:#8192aa;
    font-size:10px;
    font-weight:850;
    letter-spacing:.045em;
    text-transform:uppercase;
  }

  .user-account-actions{grid-column:2;text-align:left}
  .guide-detail-layout{grid-template-columns:minmax(0,1fr)!important}
  .guide-detail-qr{padding-block:24px!important}
}

@media screen and (max-width:720px){
  html[data-theme] body.admin-body .stats-grid.metric-strip.users-metric-strip,
  html[data-theme] .screen.admin-body .stats-grid.metric-strip.users-metric-strip{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    overflow:visible!important;
  }
  html[data-theme] body.admin-body .stats-grid.metric-strip.users-metric-strip .stat-card:last-child:nth-child(odd),
  html[data-theme] .screen.admin-body .stats-grid.metric-strip.users-metric-strip .stat-card:last-child:nth-child(odd){grid-column:1 / -1}

  .user-account-list-panel .password-security-note{align-items:flex-start;padding:15px}

  .user-account-row{
    min-height:0;
    grid-template-columns:minmax(0,1fr);
    gap:17px;
    padding:17px;
  }

  .user-account-identity{grid-row:auto}
  .user-account-actions{grid-column:auto}
  .user-account-list-panel .account-recovery-form,
  .user-account-list-panel .password-change-form,
  .user-account-list-panel .password-change-form.kypar-password-form{
    grid-template-columns:minmax(0,1fr);
  }

  .user-account-list-panel :is(.account-recovery-form,.password-change-form) .btn-mini,
  .user-account-actions .btn-danger,
  .user-account-actions .inline-delete-form{width:100%}

  .facility-admin-list .record-actions{grid-template-columns:minmax(0,1fr)}
  .facility-admin-list .record-actions > a{grid-column:auto}
  .guide-detail-data{padding-inline:14px!important}
  .guide-detail-data .tabulka tbody,
  .guide-detail-data .tabulka tr,
  .guide-detail-data .tabulka :is(th,td){display:block;width:100%!important}
  .guide-detail-data .tabulka tr{padding:10px 0;border-bottom:1px solid #263a57}
  .guide-detail-data .tabulka tr:last-child{border-bottom:0}
  .guide-detail-data .tabulka :is(th,td){padding:4px 0!important;border:0!important}
  .guide-detail-data .tabulka th{position:static!important;background:transparent!important;color:#8192aa!important;font-size:10px!important}
  .guide-detail-qr{padding:20px 14px!important}
  .guide-qr-code{width:min(72vw,174px)}
}

@media screen and (max-width:460px){
  /* Na velmi úzkém displeji necháme v horní liště samotnou značku.
     Název by spolu s volbou provozu zalomil pravou část do druhého řádku. */
  html[data-theme] .stavby-admin-nav .brand-label{display:none!important}
  html[data-theme] .stavby-admin-nav .brand{
    width:38px!important;
    min-width:38px!important;
    flex:0 0 38px!important;
    overflow:visible!important;
  }
  html[data-theme] .stavby-admin-nav .nav-right{
    width:auto!important;
    max-width:calc(100vw - 72px)!important;
    flex:0 1 auto!important;
  }
  html[data-theme] .stavby-admin-nav .nav-stavba{
    width:auto!important;
    max-width:min(55vw,190px)!important;
  }

  .users-folder .user-create-panel{padding:16px!important}
  .users-folder .user-create-panel :is(input,select,.btn-green){width:100%!important}
}

/* Registr vozidel: běžné a nevratné akce jsou oddělené, ale dostupné na jednom místě. */
.vehicle-edit-actions{
  margin-top:8px;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:8px;
}

.vehicle-edit-actions form{margin:0}
.vehicle-edit-actions .btn-mini{min-height:42px;margin:0}

@media screen and (max-width:720px){
  .vehicle-edit-actions{align-items:stretch;flex-direction:column}
  .vehicle-edit-actions form,
  .vehicle-edit-actions .btn-mini{width:100%}
}

/* =====================================================
   Oficiální značka ŽSD — široký geometrický znak podle firemního vzoru
   ===================================================== */
html[data-theme] .brand-mark{
  width:64px!important;
  height:38px!important;
  flex:0 0 64px!important;
  border:1px solid rgba(118,148,192,.42)!important;
  border-radius:9px!important;
  background-color:#fff!important;
  background-image:url("assets/zsd-logo.png")!important;
  background-position:center!important;
  background-size:90px auto!important;
  background-repeat:no-repeat!important;
  box-shadow:0 7px 18px rgba(0,5,18,.24),inset 0 0 0 1px rgba(255,255,255,.7)!important;
}

html[data-theme] .admin-nav .brand{gap:12px!important}

html[data-theme] .login-logo{
  width:min(100%,220px)!important;
  max-width:220px!important;
  height:112px!important;
  margin:0 auto 22px!important;
  display:block;
  object-fit:cover;
  object-position:center;
  border:1px solid rgba(127,157,201,.42);
  border-radius:14px;
  background:#fff;
  box-shadow:0 18px 38px rgba(0,4,16,.25),inset 0 0 0 1px rgba(255,255,255,.8);
}

@media screen and (max-width:560px){
  html[data-theme] .brand-mark{
    width:52px!important;
    height:36px!important;
    flex-basis:52px!important;
    background-size:78px auto!important;
  }

  html[data-theme] .deponie-admin-nav .brand{
    width:auto!important;
    min-width:52px!important;
  }
}

@media screen and (max-width:460px){
  html[data-theme] .stavby-admin-nav .brand{
    width:52px!important;
    min-width:52px!important;
    flex:0 0 52px!important;
  }

  html[data-theme] .login-logo{
    width:min(100%,188px)!important;
    max-width:188px!important;
    height:96px!important;
  }
}

/* =====================================================
   Mobilní PWA shell v2 — bezpečná hlavička a posuvná navigace
   ===================================================== */
@media screen and (max-width:980px){
  :root{
    --mobile-shell-topbar:68px;
    --mobile-shell-nav:76px;
  }

  html[data-theme] body:is(.admin-body,.deponie-body){
    padding-top:0!important;
    padding-bottom:calc(var(--mobile-shell-nav) + env(safe-area-inset-bottom,0px) + 12px)!important;
  }

  html[data-theme] .admin-nav{
    top:0!important;
    right:0!important;
    bottom:auto!important;
    left:0!important;
    width:100%!important;
    height:calc(var(--mobile-shell-topbar) + env(safe-area-inset-top,0px))!important;
    min-height:calc(var(--mobile-shell-topbar) + env(safe-area-inset-top,0px))!important;
    padding:env(safe-area-inset-top,0px) max(12px,env(safe-area-inset-right,0px)) 0 max(12px,env(safe-area-inset-left,0px))!important;
    box-sizing:border-box!important;
    display:flex!important;
    flex-wrap:nowrap!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:9px!important;
    overflow:visible!important;
    background:#050d1c!important;
    -webkit-backdrop-filter:none!important;
    backdrop-filter:none!important;
  }

  html[data-theme] .admin-nav .brand{
    width:auto!important;
    min-width:0!important;
    max-width:min(38vw,210px)!important;
    height:var(--mobile-shell-topbar)!important;
    min-height:var(--mobile-shell-topbar)!important;
    padding:0!important;
    flex:0 1 auto!important;
    overflow:hidden!important;
  }

  html[data-theme] .admin-nav .brand-label{
    min-width:0!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
  }

  html[data-theme] .admin-nav .nav-right{
    width:auto!important;
    min-width:0!important;
    max-width:calc(100% - 62px)!important;
    height:var(--mobile-shell-topbar)!important;
    min-height:var(--mobile-shell-topbar)!important;
    margin:0 0 0 auto!important;
    padding:0!important;
    display:flex!important;
    flex:1 1 auto!important;
    align-items:center!important;
    justify-content:flex-end!important;
    gap:6px!important;
    overflow:hidden!important;
  }

  html[data-theme] .admin-nav .nav-stavba{
    width:auto!important;
    min-width:0!important;
    max-width:min(58vw,280px)!important;
    height:42px!important;
    flex:1 1 auto!important;
    flex-wrap:nowrap!important;
    align-items:center!important;
    overflow:hidden!important;
  }

  html[data-theme] .admin-nav .nav-stavba strong{
    min-width:0!important;
    max-width:none!important;
    flex:1 1 auto!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
  }

  html[data-theme] .admin-nav .nav-change-stavba,
  html[data-theme] .admin-nav .logout-form,
  html[data-theme] .admin-nav .logout-link{
    flex:0 0 auto!important;
  }

  html[data-theme] .admin-nav .logout-form{
    display:inline-flex!important;
    margin:0!important;
  }

  html[data-theme] .admin-nav:not(.deponie-admin-nav) > nav,
  html[data-theme] .deponie-admin-nav .deponie-nav-shell{
    position:fixed!important;
    inset:auto 0 0 0!important;
    top:auto!important;
    right:0!important;
    bottom:0!important;
    left:0!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:calc(var(--mobile-shell-nav) + env(safe-area-inset-bottom,0px))!important;
    min-height:0!important;
    padding:0 max(6px,env(safe-area-inset-right,0px)) env(safe-area-inset-bottom,0px) max(6px,env(safe-area-inset-left,0px))!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
    background:#050d1c!important;
    border:0!important;
    border-top:1px solid #2a3d5b!important;
    box-shadow:0 -14px 34px rgba(0,4,14,.28)!important;
    transform:none!important;
  }

  html[data-theme] .admin-nav:not(.deponie-admin-nav) > nav,
  html[data-theme] .deponie-admin-nav .deponie-nav-scroll{
    overflow-x:auto!important;
    overflow-y:hidden!important;
    overscroll-behavior-inline:contain;
    scroll-behavior:smooth;
    scroll-snap-type:x proximity;
    scroll-padding-inline:8px;
    scrollbar-width:none;
    touch-action:pan-x;
    -webkit-overflow-scrolling:touch;
  }

  html[data-theme] .admin-nav:not(.deponie-admin-nav) > nav::-webkit-scrollbar,
  html[data-theme] .deponie-admin-nav .deponie-nav-scroll::-webkit-scrollbar{
    display:none;
  }

  html[data-theme] .deponie-admin-nav .deponie-nav-shell{
    display:block!important;
  }

  html[data-theme] .deponie-admin-nav .deponie-nav-scroll{
    width:100%!important;
    height:var(--mobile-shell-nav)!important;
    padding:0!important;
    mask-image:none!important;
    -webkit-mask-image:none!important;
  }

  html[data-theme] .deponie-admin-nav .deponie-nav-scroll > nav{
    width:max-content!important;
    min-width:100%!important;
    height:var(--mobile-shell-nav)!important;
    padding:0!important;
    display:flex!important;
    flex-direction:row!important;
    align-items:stretch!important;
    justify-content:flex-start!important;
    gap:2px!important;
    overflow:visible!important;
  }

  html[data-theme] .admin-nav:not(.deponie-admin-nav) > nav{
    width:100%!important;
    min-width:0!important;
    height:var(--mobile-shell-nav)!important;
    padding:0 max(6px,env(safe-area-inset-right,0px)) env(safe-area-inset-bottom,0px) max(6px,env(safe-area-inset-left,0px))!important;
    display:flex!important;
    flex-direction:row!important;
    flex-wrap:nowrap!important;
    align-items:stretch!important;
    justify-content:flex-start!important;
    gap:2px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
  }

  html[data-theme] .deponie-admin-nav .deponie-nav-scroll > nav > a,
  html[data-theme] .deponie-admin-nav .deponie-nav-scroll > nav > a[href$="deponie_pohyby.php"],
  html[data-theme] .deponie-admin-nav .deponie-nav-scroll > nav > a[href$="deponie_bilance.php"],
  html[data-theme] .deponie-admin-nav .deponie-nav-scroll > nav > a[href$="deponie_prilohy.php"],
  html[data-theme] .deponie-admin-nav .deponie-nav-scroll > nav > a[data-nav-utility]{
    width:auto!important;
    min-width:0!important;
    min-height:70px!important;
    padding:7px 8px 5px!important;
    display:flex!important;
    flex:0 0 clamp(76px,22vw,94px)!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    gap:5px!important;
    border:0!important;
    border-radius:10px!important;
    scroll-snap-align:start;
    font-size:10px!important;
    line-height:1.08!important;
  }

  html[data-theme] .admin-nav:not(.deponie-admin-nav) > nav > a{
    width:auto!important;
    min-width:0!important;
    min-height:70px!important;
    padding:7px 6px 5px!important;
    display:flex!important;
    flex:0 0 clamp(70px,24vw,104px)!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    gap:5px!important;
    scroll-snap-align:start;
  }

  html[data-theme] .deponie-admin-nav .deponie-mobile-more-trigger,
  html[data-theme] .deponie-admin-nav .deponie-mobile-more,
  html[data-theme] .deponie-admin-nav .deponie-nav-arrow{
    display:none!important;
  }

  html[data-theme] .admin-nav ~ :is(.admin-main,.deponie-main,.settings-main){
    margin:0!important;
    padding-top:calc(var(--mobile-shell-topbar) + env(safe-area-inset-top,0px) + 24px)!important;
    padding-bottom:calc(var(--mobile-shell-nav) + env(safe-area-inset-bottom,0px) + 32px)!important;
  }
}

@media screen and (max-width:430px){
  html[data-theme] .admin-nav .brand-label{display:none!important}
  html[data-theme] .admin-nav .brand{
    width:52px!important;
    min-width:52px!important;
    max-width:52px!important;
    flex:0 0 52px!important;
  }
  html[data-theme] .admin-nav .nav-right{max-width:calc(100% - 61px)!important}
  html[data-theme] .admin-nav .nav-stavba{max-width:none!important}
}

@media (display-mode:standalone) and (max-width:980px){
  html[data-theme] body{padding-top:0!important}
}

/* =====================================================
   Mobilní korekce v5 — formuláře, průvodky a rychlá správa
   ===================================================== */
.nav-ico-sites{
  --nav-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21h18M5 21V7l7-4 7 4v14M9 10h2v2H9m4-2h2v2h-2M9 15h2v2H9m4-2h2v2h-2'/%3E%3C/svg%3E")!important;
}

html[data-theme] body.stavby-picker-body{
  min-height:100dvh!important;
  padding-top:calc(24px + env(safe-area-inset-top,0px))!important;
  padding-right:max(16px,env(safe-area-inset-right,0px))!important;
  padding-bottom:calc(30px + env(safe-area-inset-bottom,0px))!important;
  padding-left:max(16px,env(safe-area-inset-left,0px))!important;
}

html[data-theme] .stavby-picker-body #add-form,
html[data-theme] .stavby-picker-body .stavba-card{
  color:var(--app-text)!important;
  background:var(--app-surface)!important;
  border-color:var(--app-line)!important;
}

html[data-theme] .stavby-picker-body #add-form h2,
html[data-theme] .stavby-picker-body .stavba-title,
html[data-theme] .stavby-picker-body .stavba-edit summary{
  color:var(--app-text)!important;
}

html[data-theme] .stavby-picker-body .stavba-open-btn,
html[data-theme] .stavby-picker-body .stavba-edit,
html[data-theme] .stavby-picker-body .stavba-delete-form{
  color:var(--app-text)!important;
  background:transparent!important;
  border-color:var(--app-line)!important;
}

html[data-theme] .stavby-picker-body .stavba-sub,
html[data-theme] .stavby-picker-body .stavba-meta{
  color:var(--app-muted)!important;
}

html[data-theme] .stavby-picker-body .stavba-edit-form label{
  color:#dfe6f1!important;
}

@media screen and (max-width:980px){
  /* Správa provozu je na mobilu součástí stejné vodorovně posuvné lišty. */
  html[data-theme] .deponie-admin-nav .deponie-nav-scroll > nav > a[data-mobile-primary="true"]{
    display:flex!important;
    visibility:visible!important;
    opacity:1!important;
  }

  html[data-theme] .stavby-admin-nav > nav > a[data-nav-utility]{
    display:flex!important;
    visibility:visible!important;
  }
}

/* =====================================================
   Přihlášení v7 — zapamatovaný uživatel bez ukládání hesla
   ===================================================== */
html[data-theme] .login-card-remember{
  width:min(92vw,460px)!important;
}

html[data-theme] .remembered-login-prompt[hidden],
html[data-theme] [data-login-form][hidden],
html[data-theme] .login-user-context[hidden]{
  display:none!important;
}

html[data-theme] .remembered-login-prompt{
  margin-top:20px;
  padding:18px;
  display:grid;
  grid-template-columns:50px minmax(0,1fr);
  gap:14px;
  color:var(--app-text);
  background:linear-gradient(145deg,rgba(27,45,75,.94),rgba(15,29,51,.96));
  border:1px solid #3a5276;
  border-radius:15px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035);
}

html[data-theme] .remembered-login-icon{
  width:50px;
  height:50px;
  display:grid;
  place-items:center;
  color:#9bbcff;
  background:rgba(98,146,255,.12);
  border:1px solid rgba(126,165,255,.34);
  border-radius:14px;
}

html[data-theme] .remembered-login-icon svg{
  width:25px;
  height:25px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.9;
  stroke-linecap:round;
  stroke-linejoin:round;
}

html[data-theme] .remembered-login-copy{
  min-width:0;
}

html[data-theme] .remembered-login-copy .mode-kicker{
  display:block;
  margin:1px 0 6px!important;
  color:#9bbcff!important;
}

html[data-theme] .remembered-login-copy h2{
  margin:0!important;
  color:var(--app-text)!important;
  font-size:19px!important;
  line-height:1.28!important;
  letter-spacing:-.02em!important;
}

html[data-theme] .remembered-login-copy h2 strong{
  color:#fff;
  overflow-wrap:anywhere;
}

html[data-theme] .remembered-login-copy p{
  margin:8px 0 0;
  color:var(--app-muted);
  font-size:12px;
  line-height:1.5;
}

html[data-theme] .remembered-login-actions{
  grid-column:1 / -1;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:9px;
}

html[data-theme] .remembered-login-actions button{
  min-height:46px;
  padding:0 13px;
  border-radius:11px;
  font-size:13px;
}

html[data-theme] .login-user-context{
  min-height:44px;
  margin:0 0 14px;
  padding:8px 10px 8px 13px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  color:#cdd8e8;
  background:#101d31;
  border:1px solid #304766;
  border-radius:11px;
  font-size:12px;
}

html[data-theme] .login-user-context strong{
  color:#fff;
}

html[data-theme] .login-user-context button{
  min-height:32px;
  padding:0 10px;
  color:#9bbcff;
  background:transparent;
  border:1px solid #435c82;
  border-radius:8px;
  cursor:pointer;
  font-size:12px;
  font-weight:760;
}

html[data-theme] .login-card input.is-remembered-user{
  color:#c8d6ea!important;
  -webkit-text-fill-color:#c8d6ea!important;
  background:#0b1728!important;
  border-color:#304562!important;
  cursor:default;
}

html[data-theme] .login-card .remember-user-option{
  min-height:58px;
  margin:4px 0 0!important;
  padding:10px 11px;
  display:flex!important;
  align-items:flex-start;
  gap:10px;
  color:#dce5f2!important;
  background:#0d192b;
  border:1px solid #2a3d5a;
  border-radius:11px;
  cursor:pointer;
}

html[data-theme] .login-card .remember-user-option input{
  width:20px!important;
  min-width:20px!important;
  height:20px!important;
  min-height:20px!important;
  margin:2px 0 0!important;
  padding:0!important;
  accent-color:#6292ff!important;
  box-shadow:none!important;
}

html[data-theme] .login-card .remember-user-option > span{
  min-width:0;
  display:grid;
  gap:2px;
}

html[data-theme] .login-card .remember-user-option strong{
  color:#edf3fb;
  font-size:13px;
}

html[data-theme] .login-card .remember-user-option small{
  color:var(--app-muted)!important;
  font-size:11px;
  font-weight:550;
  line-height:1.4;
}

@media screen and (max-width:520px){
  html[data-theme] .login-card-remember{
    width:min(calc(100vw - 24px),460px)!important;
    padding:25px 20px!important;
  }

  html[data-theme] .remembered-login-prompt{
    padding:15px;
    grid-template-columns:44px minmax(0,1fr);
    gap:11px;
  }

  html[data-theme] .remembered-login-icon{
    width:44px;
    height:44px;
    border-radius:12px;
  }

  html[data-theme] .remembered-login-copy h2{
    font-size:17px!important;
  }

  html[data-theme] .remembered-login-actions{
    grid-template-columns:1fr;
  }
}

@media screen and (max-width:700px){
  html[data-theme] body.admin-body :is(.filtry,.form-grid,.filter-grid) > *,
  html[data-theme] body.admin-body :is(.filtry,.form-grid,.filter-grid) label,
  html[data-theme] body.admin-body :is(.filtry,.form-grid,.filter-grid) input,
  html[data-theme] body.admin-body :is(.filtry,.form-grid,.filter-grid) select,
  html[data-theme] body.admin-body .form-field-with-action,
  html[data-theme] body.admin-body .app-combobox{
    min-width:0!important;
    max-width:100%!important;
    box-sizing:border-box!important;
  }

  html[data-theme] body.admin-body :is(.filtry,.form-grid,.filter-grid) input[type="date"]{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:48px!important;
    display:block!important;
    box-sizing:border-box!important;
  }

  html[data-theme] body.admin-body input[type="date"]::-webkit-date-and-time-value{
    min-width:0;
    text-align:left;
  }

  html[data-theme] body.admin-body .filtry{
    overflow:hidden!important;
  }

  html[data-theme] body.admin-body .filtry label{
    min-width:0!important;
    overflow:hidden!important;
  }

  html[data-theme] body.admin-body #create-pruvodky-button{
    width:100%!important;
    max-width:none!important;
    min-height:52px!important;
  }

  html[data-theme] body.admin-body .print-options-intro{
    min-width:0!important;
  }

  html[data-theme] body.admin-body .print-options-intro .pdf-save-hint{
    color:#aebdd0!important;
    opacity:1!important;
  }

  html[data-theme] body.admin-body .material-select-control{
    width:calc(100% - 28px)!important;
    min-height:46px!important;
    padding:9px 12px!important;
    border-color:#3c5577!important;
    background:#13223a!important;
    color:#edf3fb!important;
    box-shadow:inset 0 0 0 1px rgba(126,163,218,.05)!important;
  }

  html[data-theme] body.admin-body .material-group summary .material-select-control span{
    color:#edf3fb!important;
  }

  html[data-theme] body.admin-body :is(.material-select-checkbox,.pruvodka-check){
    width:20px!important;
    height:20px!important;
    min-width:20px!important;
    margin:0!important;
    padding:0!important;
    appearance:none;
    -webkit-appearance:none;
    border:2px solid #7186a4!important;
    border-radius:6px!important;
    background:#071326!important;
    box-shadow:none!important;
  }

  html[data-theme] body.admin-body :is(.material-select-checkbox,.pruvodka-check):checked{
    border-color:#78a6ff!important;
    background-color:#4f7fe8!important;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m4 10 4 4 8-9' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")!important;
    background-position:center!important;
    background-repeat:no-repeat!important;
    background-size:16px!important;
  }

  html[data-theme] body.admin-body .pruvodka-item{
    grid-template-columns:28px minmax(0,1fr)!important;
    gap:9px 11px!important;
    padding:15px 14px!important;
  }

  html[data-theme] body.admin-body .pruvodka-item .item-main span{
    color:#aebbd0!important;
  }

  html[data-theme] body.admin-body .pruvodka-item .item-main small{
    color:#8496af!important;
  }

  html[data-theme] body.admin-body .pruvodka-item :is(.item-meta,.item-actions){
    grid-column:2!important;
    padding-left:0!important;
    justify-content:flex-start!important;
  }

  html[data-theme] body.admin-body .pruvodka-item .item-actions{
    flex-wrap:wrap!important;
  }

  html[data-theme] body.admin-body .empty-state-cell{
    min-height:0!important;
    padding:26px 16px!important;
  }

  html[data-theme] body.admin-body .pagination{
    margin-top:12px!important;
    padding:8px!important;
    border:1px solid var(--app-line)!important;
    border-radius:12px!important;
    background:var(--app-surface)!important;
  }

  html[data-theme] body.admin-body .pagination button{
    min-width:0!important;
    flex:1 1 0!important;
  }

  html[data-theme] body.stavby-picker-body{
    padding-top:calc(20px + env(safe-area-inset-top,0px))!important;
  }

  html[data-theme] .stavby-picker-header{
    align-items:flex-start!important;
    margin-bottom:20px!important;
    gap:14px!important;
  }

  html[data-theme] .stavby-picker-header > div:first-child{
    width:100%;
    min-width:0;
  }

  html[data-theme] .stavby-picker-header h1{
    font-size:clamp(25px,8vw,32px)!important;
    line-height:1.08!important;
  }

  html[data-theme] .stavby-picker-body .stavby-header-actions{
    width:100%!important;
    margin-left:0!important;
  }

  html[data-theme] .stavby-picker-body .stavba-open-btn{
    padding:20px!important;
  }

  html[data-theme] .stavby-picker-body .stavba-edit summary{
    min-height:52px!important;
    padding-inline:16px!important;
  }
}

@media screen and (max-width:700px){
  html[data-theme] .stavby-admin-nav ~ .admin-main h1{
    margin-bottom:16px!important;
    font-size:28px!important;
  }

  html[data-theme] body.admin-body .stats-grid,
  html[data-theme] body.admin-body .stats-grid.metric-strip{
    margin-bottom:14px!important;
    border-radius:13px!important;
  }

  html[data-theme] body.admin-body .stat-card{
    min-height:86px!important;
    padding:11px 8px!important;
  }

  html[data-theme] body.admin-body .stat-card span{
    font-size:9px!important;
    line-height:1.2!important;
  }

  html[data-theme] body.admin-body .stat-card strong{
    margin-top:5px!important;
    font-size:22px!important;
  }

  html[data-theme] body.admin-body .filtry{
    gap:9px!important;
    padding:12px!important;
    border-radius:13px!important;
  }

  html[data-theme] body.admin-body .filtry label{
    gap:6px!important;
    font-size:11px!important;
    line-height:1.2!important;
  }

  html[data-theme] body.admin-body .filtry :is(input:not([type="checkbox"]):not([type="radio"]),select){
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:44px!important;
    min-height:44px!important;
    max-height:44px!important;
    padding-block:0!important;
    box-sizing:border-box!important;
    font-size:16px!important;
    line-height:normal!important;
  }

  html[data-theme] body.admin-body .filtry input[type="date"]{
    height:44px!important;
    min-height:44px!important;
    max-height:44px!important;
    padding:0 12px!important;
  }

  html[data-theme] body.admin-body .filtry button{
    min-height:46px!important;
    border-radius:11px!important;
  }

  html[data-theme] body.admin-body .souhrn{
    margin:16px 2px 12px!important;
    font-size:14px!important;
    line-height:1.35!important;
  }
}

/* =====================================================
   Mobilní korekce v8 — nastavení v posuvné liště a nativní ovladače iOS
   ===================================================== */
@media screen and (max-width:980px){
  :root{
    --mobile-shell-nav:72px;
  }

  html[data-theme] .deponie-admin-nav .deponie-nav-scroll{
    width:100%!important;
    margin-right:0!important;
  }

  html[data-theme] .deponie-admin-nav .deponie-nav-scroll > nav > a{
    flex-basis:clamp(64px,18vw,76px)!important;
  }

  html[data-theme] .deponie-admin-nav .deponie-nav-scroll > nav > a[data-nav-utility="settings"]{
    display:flex!important;
    visibility:visible!important;
    opacity:1!important;
  }
}

@media screen and (max-width:700px){
  html[data-theme] body.admin-body input[type="date"],
  html[data-theme] body.admin-body :is(.filtry,.form-grid,.filter-grid) input[type="date"]{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:44px!important;
    min-height:44px!important;
    max-height:44px!important;
    padding:0 12px!important;
    display:block!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
    font-size:16px!important;
    line-height:normal!important;
  }

  html[data-theme] body.admin-body input[type="date"]::-webkit-datetime-edit,
  html[data-theme] body.admin-body input[type="date"]::-webkit-date-and-time-value{
    min-width:0!important;
    min-height:0!important;
    height:auto!important;
    padding:0!important;
    line-height:normal!important;
    text-align:left!important;
  }

  html[data-theme] body.admin-body input[type="date"]::-webkit-calendar-picker-indicator{
    margin:0!important;
    padding:4px!important;
  }

  html[data-theme] body.admin-body .form-grid label > .hint{
    margin:5px 0 0!important;
    display:block!important;
    font-size:11px!important;
    line-height:1.3!important;
  }

  html[data-theme] body.admin-body :is(.material-select-checkbox,.pruvodka-check){
    width:20px!important;
    min-width:20px!important;
    max-width:20px!important;
    height:20px!important;
    min-height:20px!important;
    max-height:20px!important;
    flex:0 0 20px!important;
    align-self:center!important;
    margin:0!important;
    padding:0!important;
    box-sizing:border-box!important;
    aspect-ratio:1 / 1!important;
    appearance:none!important;
    -webkit-appearance:none!important;
  }

  html[data-theme] body.admin-body .material-select-control{
    min-height:44px!important;
    align-items:center!important;
  }
}
