/* Matice. – systém pro autoservis a pneuservis · demo WebTitan
 * Vzhled „Ráno v dílně“ (návrh B): grafitové sklo (liquid glass) s jantarovou a oranžovou nad fotkou dílny,
 * výstražné pruhy u toho, co stojí, SPZ jako malé raženky.
 */

:root {
  color-scheme: dark;
  --ink: #fbf6ee;
  --mu: rgba(250, 242, 230, 0.76);
  --mu2: rgba(250, 242, 230, 0.56);
  --mu3: rgba(250, 242, 230, 0.38);
  --glass: rgba(26, 23, 20, 0.5);
  --glass-strong: rgba(22, 19, 16, 0.72);
  --glass-solid: rgba(26, 22, 18, 0.95);
  --tile: rgba(255, 240, 220, 0.07);
  --tile-b: rgba(255, 240, 220, 0.1);
  --tile-h: rgba(255, 240, 220, 0.12);
  --line: rgba(255, 240, 220, 0.11);
  --amber: #ffb340;
  --amber-2: #ff8a1f;
  --amber-hi: #ffd18a;
  --amber-ink: #271401;
  --cream: #f8f3ea;
  --ok: #a9e08f;
  --ok-bg: rgba(150, 220, 120, 0.16);
  --warn: #ffd08a;
  --warn-bg: rgba(255, 179, 64, 0.2);
  --bad: #ff9a85;
  --bad-bg: rgba(255, 110, 80, 0.2);
  --info: #a8d4ff;
  --info-bg: rgba(120, 180, 255, 0.16);
  --hazard: repeating-linear-gradient(-45deg, var(--amber) 0 4px, #231e1a 4px 8px);
  --blur: blur(24px) saturate(130%);
  --r: 20px;
  --r-lg: 26px;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI Variable Text', 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI Variable Display', 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;
  --top-h: 58px;
  --pad: 24px;
  --rail-w: 68px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 110px; }
html, body { margin: 0; }
body { min-height: 100vh; font: 14px/1.45 var(--font); color: var(--ink); background: #1b1612; -webkit-font-smoothing: antialiased; letter-spacing: -0.005em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.num { font-family: var(--display); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.muted { color: var(--mu); }
.muted2 { color: var(--mu2); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.ok-t { color: var(--ok); }
.bad-t { color: var(--bad); }
.warn-t { color: var(--warn); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.show-m { display: none; }
body { overflow-x: hidden; }
:focus-visible { outline: 2px solid var(--amber-hi); outline-offset: 2px; }

/* ---------- fotka a stín ---------- */
.photo { position: fixed; inset: 0; z-index: -2; background: #2b1f15 url('../foto/dilna.webp') 60% 38% / cover no-repeat; filter: saturate(0.9) brightness(0.78) contrast(1.08); transition: opacity 0.6s; }
[data-role='mechanik'] .photo { background-image: url('../foto/zvedak-noc.webp'); background-position: 30% 50%; filter: saturate(0.8) brightness(0.62) contrast(1.1); }
[data-role='zakaznik'] .photo { background-image: url('../foto/auto-zvedak.webp'); background-position: 50% 40%; filter: saturate(0.85) brightness(0.7); }
.shade { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(16, 12, 9, 0.8) 0%, rgba(16, 12, 9, 0.5) 30%, rgba(16, 12, 9, 0.08) 56%, rgba(16, 12, 9, 0.34) 100%),
    linear-gradient(180deg, rgba(16, 12, 9, 0.55) 0%, rgba(16, 12, 9, 0) 22%, rgba(16, 12, 9, 0) 50%, rgba(16, 12, 9, 0.66) 100%); }
body:not([data-route='prehled']):not([data-route='portal']):not([data-route='m-prace']) .shade { background: linear-gradient(180deg, rgba(16, 12, 9, 0.66), rgba(16, 12, 9, 0.55) 30%, rgba(16, 12, 9, 0.78)); }
.grain { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.14; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ---------- sklo (grafit) ---------- */
.glass { position: relative; isolation: isolate; background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border-radius: var(--r-lg);
  box-shadow: inset 0 1px 0 rgba(255, 246, 232, 0.2), inset 0 -1px 0 rgba(255, 246, 232, 0.04), 0 0 0 0.5px rgba(0, 0, 0, 0.45), 0 30px 60px -30px rgba(8, 5, 2, 0.9); }
.glass::after { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(150deg, rgba(255, 236, 210, 0.58), rgba(255, 236, 210, 0.13) 26%, rgba(255, 236, 210, 0.03) 55%, rgba(255, 236, 210, 0.1) 82%, rgba(255, 236, 210, 0.32));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.glass.strong { background: var(--glass-strong); }
.tile { border-radius: 18px; background: var(--tile); box-shadow: inset 0 0 0 1px var(--tile-b), inset 0 1px 0 rgba(255, 250, 240, 0.12); }

/* ---------- horní lišta ---------- */
.top { position: fixed; z-index: 40; left: var(--pad); right: var(--pad); top: 22px; height: var(--top-h); display: flex; align-items: center; gap: 16px; pointer-events: none; }
.top .user { margin-left: auto; }
.top > * { pointer-events: auto; }
.pill { height: var(--top-h); border-radius: 999px; display: flex; align-items: center; }
.brand { gap: 12px; padding: 0 24px 0 9px; text-decoration: none; }
/* logo: šestihranná matice */
.mark { position: relative; width: 40px; height: 40px; flex: none; filter: drop-shadow(0 6px 12px rgba(255, 140, 30, 0.45)); }
.mark::before { content: ''; position: absolute; inset: 0; clip-path: polygon(25% 6.7%, 75% 6.7%, 100% 50%, 75% 93.3%, 25% 93.3%, 0 50%); background: linear-gradient(150deg, var(--amber-hi), var(--amber) 45%, var(--amber-2)); }
.mark::after { content: ''; position: absolute; left: 13px; top: 13px; width: 14px; height: 14px; border-radius: 50%; background: #221c17; box-shadow: inset 0 1.5px 2px rgba(0, 0, 0, 0.7), 0 1px 0 rgba(255, 255, 255, 0.35); }
.brand b { font-family: var(--display); font-size: 23px; font-weight: 600; letter-spacing: -0.02em; }
.brand b i { font-style: normal; color: var(--amber); }
.brand small { display: block; margin-top: -3px; font-size: 11.5px; color: var(--mu2); white-space: nowrap; }
.infobar { margin-right: auto; padding: 0 8px; font-size: 14px; white-space: nowrap; }
.infobar span { display: flex; align-items: center; gap: 8px; padding: 0 18px; }
.infobar span + span { border-left: 1px solid var(--line); }
.infobar svg { width: 17px; height: 17px; color: var(--mu); }
.user { gap: 6px; padding: 0 6px; }
.roles { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(255, 240, 220, 0.1); }
.roles button { height: 34px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--mu); transition: background 0.2s, color 0.2s; }
.roles button.on { color: var(--amber-ink); background: linear-gradient(160deg, var(--amber-hi), var(--amber)); }
.who { display: flex; align-items: center; gap: 10px; padding: 0 14px 0 4px; }
.av { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--amber-ink); background: linear-gradient(150deg, var(--amber-hi), var(--amber)); flex: none; }
.av.sm { width: 30px; height: 30px; font-size: 11px; }
.who b { display: block; font-size: 14px; font-weight: 600; line-height: 1.2; }
.who small { display: block; font-size: 11.5px; color: var(--mu2); }

/* ---------- boční lišta ---------- */
/* Lišta se nikdy nerozbaluje přes obsah: na širokých oknech je trvale rozbalená (obsah je vedle ní),
   na užších jsou jen ikony a název ukáže bublina vedle ikony (#tip). */
.rail { position: fixed; z-index: 35; left: var(--pad); top: calc(22px + var(--top-h) + 20px); bottom: var(--pad); width: var(--rail-w); padding: 10px 11px; border-radius: var(--r-lg); display: flex; flex-direction: column; gap: 3px; overflow: hidden auto; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.ri { position: relative; flex: none; display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: 14px; color: var(--mu); text-decoration: none; white-space: nowrap; transition: background 0.15s, color 0.15s; }
.ri svg { width: 19px; height: 19px; }
.ri span { display: none; font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.ri:hover { background: rgba(255, 245, 230, 0.12); color: var(--ink); }
.ri.on { color: var(--amber-ink); background: linear-gradient(160deg, var(--amber-hi), var(--amber) 60%, var(--amber-2)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 8px 18px -8px rgba(255, 140, 30, 0.9); }
.ri .badge { position: absolute; top: 3px; right: 3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; display: grid; place-items: center; font-size: 10.5px; font-weight: 700; color: #3a0e05; background: #ffb19e; box-shadow: 0 0 0 2px rgba(30, 24, 20, 0.85); }
.ri .badge.ok { background: var(--ok); color: #0f2a1c; }
.rg { flex: none; height: 9px; overflow: hidden; padding: 4px 12px 0; font-size: 10.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: transparent; white-space: nowrap; }
.rg::before { content: ''; display: block; height: 1px; margin: 0 -2px 6px; background: var(--line); }
#tip { position: fixed; z-index: 90; padding: 6px 11px; border-radius: 10px; font-size: 13px; font-weight: 600; white-space: nowrap; background: rgba(26, 22, 18, 0.96); box-shadow: inset 0 1px 0 rgba(255, 245, 230, 0.2), 0 10px 24px -10px rgba(8, 5, 2, 0.9); pointer-events: none; opacity: 0; transform: translateX(-4px); transition: opacity 0.12s, transform 0.12s; }
#tip.on { opacity: 1; transform: none; }
@media (min-width: 1500px) {
  :root { --rail-w: 236px; }
  .ri span { display: block; }
  .ri .badge { position: static; margin-left: auto; }
  .rg { height: 26px; color: var(--mu3); }
}
/* všech 16 položek se musí vejít na výšku okna bez posouvání lišty */
@media (max-height: 900px) and (min-width: 1101px) {
  .ri { height: 34px; }
  .rg { height: 8px; }
}
@media (max-height: 900px) and (min-width: 1500px) {
  .rg { height: 20px; padding-top: 3px; }
  .rg::before { margin-bottom: 3px; }
}
@media (max-height: 800px) and (min-width: 1101px) {
  .rail { gap: 2px; padding-top: 8px; padding-bottom: 8px; }
  .ri { height: 30px; }
}
@media (max-height: 740px) and (min-width: 1101px) {
  .ri { height: 27px; }
  .ri svg { width: 17px; height: 17px; }
  .rg { height: 7px; }
}
@media (max-height: 740px) and (min-width: 1500px) {
  .rg { height: 16px; font-size: 9.5px; }
}
.tile .t b, .tile .t small { display: block; }

/* ---------- obsah ---------- */
main { min-height: 100vh; padding: calc(22px + var(--top-h) + 24px) var(--pad) 40px calc(var(--pad) + var(--rail-w) + 22px); }
.page { max-width: 1340px; }
@media (min-width: 1700px) { .page { max-width: 1640px; } }
.ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 4px 0 22px 6px; flex-wrap: wrap; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--mu); }
.ph h1 { margin: 8px 0 6px; font-family: var(--display); font-size: clamp(34px, 3.4vw, 48px); line-height: 1.02; font-weight: 400; letter-spacing: -0.035em; text-shadow: 0 2px 24px rgba(40, 18, 2, 0.35); }
.ph p { margin: 0; max-width: 64em; font-size: 15.5px; color: var(--mu); text-shadow: 0 1px 12px rgba(40, 18, 2, 0.5); }
.ph p b { color: var(--ink); font-weight: 600; }
.acts { display: flex; gap: 10px; flex-wrap: wrap; }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start; }
.c3 { grid-column: span 3; } .c4 { grid-column: span 4; } .c5 { grid-column: span 5; } .c6 { grid-column: span 6; }
.c7 { grid-column: span 7; } .c8 { grid-column: span 8; } .c9 { grid-column: span 9; } .c12 { grid-column: span 12; }
.stack { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.card { padding: 20px 22px; border-radius: var(--r); }
.card.glass { background: var(--glass-strong); }
.card-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.card-h h2, .card h2 { margin: 0; font-family: var(--display); font-size: 20px; font-weight: 500; letter-spacing: -0.02em; }
.card-h h3, .card h3 { margin: 0; font-size: 15px; font-weight: 600; }
.card-h p, .card .sub { margin: 3px 0 0; font-size: 13px; color: var(--mu2); }
.card-h .acts { flex: none; }
.sep { height: 1px; background: var(--line); margin: 14px 0; border: 0; }
.empty { padding: 26px 10px; text-align: center; color: var(--mu2); font-size: 13.5px; }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { padding: 16px 18px; border-radius: 22px; }
.kpi small { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--mu); }
.kpi small svg { width: 15px; height: 15px; }
.kpi b { display: block; margin-top: 6px; font-family: var(--display); font-size: 28px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
.kpi b small { display: inline; font-size: 14px; color: var(--mu2); font-weight: 400; }
.kpi > span { display: block; margin-top: 4px; font-size: 12.5px; color: var(--mu2); }

/* tlačítka */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 999px; font-size: 14px; font-weight: 600; white-space: nowrap; text-decoration: none; background: rgba(255, 240, 220, 0.12); box-shadow: inset 0 1px 0 rgba(255, 250, 240, 0.16), inset 0 0 0 1px rgba(255, 240, 220, 0.12); transition: background 0.15s, transform 0.15s, opacity 0.15s; }
.btn:hover { background: rgba(255, 240, 220, 0.2); }
.btn:active { transform: scale(0.98); }
.btn svg { width: 17px; height: 17px; }
.btn.glass { background: var(--glass); }
.btn.glass:hover { background: rgba(60, 52, 44, 0.6); }
.btn.pri { color: var(--amber-ink); background: linear-gradient(160deg, var(--amber-hi), var(--amber) 55%, var(--amber-2)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 8px 20px -10px rgba(255, 140, 30, 0.9); }
.btn.pri:hover { filter: brightness(1.05); }
.btn.white { color: #2e1a07; background: var(--cream); box-shadow: inset 0 -1px 0 rgba(60, 30, 5, 0.12), 0 10px 26px -14px rgba(8, 5, 2, 0.9); }
.btn.white:hover { background: #fff; }
.btn.bad { color: #3a0e05; background: linear-gradient(160deg, #ffc2b3, #ff9a82); }
.btn.sm { height: 34px; padding: 0 13px; font-size: 13px; }
.btn.xs { height: 28px; padding: 0 10px; font-size: 12px; gap: 5px; }
.btn.xs svg { width: 14px; height: 14px; }
.btn.block { width: 100%; }
.btn.square { width: 42px; padding: 0; }
.btn.sm.square { width: 34px; }
.btn[disabled], .btn.busy { opacity: 0.55; pointer-events: none; }
.btn.busy::after { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.link { color: var(--amber-hi); text-decoration: none; font-weight: 600; font-size: 13px; }
.link:hover { text-decoration: underline; }

/* štítky */
.tag { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: rgba(255, 240, 220, 0.12); color: var(--mu); }
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.tag.bad { background: var(--bad-bg); color: var(--bad); }
.tag.info { background: var(--info-bg); color: var(--info); }
.tag.amber { background: linear-gradient(160deg, var(--amber-hi), var(--amber)); color: var(--amber-ink); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--mu3); flex: none; }
.dot.ok { background: var(--ok); } .dot.bad { background: var(--bad); } .dot.warn { background: var(--warn); } .dot.amber { background: var(--amber); }
.live { display: inline-flex; align-items: center; gap: 6px; color: var(--warn); font-weight: 600; }
.live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #ffb25c; animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 178, 92, 0.6); } 70% { box-shadow: 0 0 0 7px rgba(255, 178, 92, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 178, 92, 0); } }

/* záložky */
.tabs { display: inline-flex; gap: 3px; padding: 4px; border-radius: 999px; background: rgba(26, 22, 18, 0.5); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: inset 0 0 0 1px rgba(255, 240, 220, 0.12); margin: 0 0 18px; flex-wrap: wrap; }
.tabs a, .tabs button { height: 36px; padding: 0 16px; border-radius: 999px; display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; color: var(--mu); text-decoration: none; transition: background 0.2s, color 0.2s; }
.tabs a:hover, .tabs button:hover { color: var(--ink); }
.tabs .on { color: var(--amber-ink); background: linear-gradient(160deg, var(--amber-hi), var(--amber)); }
.tabs .cnt { min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; display: grid; place-items: center; font-size: 11px; background: rgba(255, 240, 220, 0.16); }
.tabs .on .cnt { background: rgba(59, 34, 8, 0.16); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button { height: 32px; padding: 0 13px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--mu); background: rgba(255, 240, 220, 0.1); box-shadow: inset 0 0 0 1px rgba(255, 240, 220, 0.1); }
.chips button.on { color: var(--amber-ink); background: linear-gradient(160deg, var(--amber-hi), var(--amber)); box-shadow: none; }

/* tabulky */
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; padding: 8px 10px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--mu2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background 0.12s; }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr.click:hover { background: rgba(255, 240, 220, 0.07); }
.tbl tr.hl td { background: rgba(255, 190, 90, 0.1); }
.tbl .r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl td b { font-weight: 600; }
.tbl td small { display: block; color: var(--mu2); font-size: 12px; }
.tbl-wrap { position: relative; overflow-x: auto; margin: 0 -8px; padding: 0 8px; }

/* seznamy */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 13px; padding: 10px 0; }
.list > li + li { border-top: 1px solid var(--line); }
.list .t { flex: 1; min-width: 0; }
.list b { display: block; font-size: 14px; font-weight: 600; }
.list small { display: block; font-size: 12.5px; color: var(--mu2); }
.list .r { font-size: 13.5px; font-weight: 600; white-space: nowrap; text-align: right; }
.list li.click { cursor: pointer; border-radius: 12px; }
.list li.click:hover { background: rgba(255, 240, 220, 0.06); }
.ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; background: rgba(255, 245, 230, 0.13); color: var(--ink); box-shadow: inset 0 1px 0 rgba(255, 250, 240, 0.16); }
.ic svg { width: 17px; height: 17px; }
.ic.a { color: var(--amber-ink); background: linear-gradient(160deg, var(--amber-hi), var(--amber)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55); }
.ic.bad { color: #3a0e05; background: linear-gradient(160deg, #ffc2b3, #ff9a82); }
.ic.ok { color: #0f2a1c; background: linear-gradient(160deg, #c2f2d6, var(--ok)); }

/* ukazatele */
.bar { position: relative; height: 8px; border-radius: 99px; background: rgba(255, 240, 220, 0.14); overflow: hidden; }
.bar i { position: absolute; inset: 0 auto 0 0; width: var(--p); border-radius: inherit; background: linear-gradient(90deg, var(--amber-hi), var(--amber)); transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.bar i.ok { background: linear-gradient(90deg, #c2f2d6, var(--ok)); }
.bar i.bad { background: linear-gradient(90deg, #ffc2b3, var(--bad)); }
.stackbar { position: relative; display: flex; height: 30px; border-radius: 12px; overflow: hidden; background: rgba(255, 240, 220, 0.1); }
.stackbar i { height: 100%; transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.stackbar .pro { background: linear-gradient(180deg, #a6efc5, #6cc994); }
.stackbar .proti { background: linear-gradient(180deg, #ffb7a6, #f07a5f); }
.stackbar .zdrzel { background: rgba(255, 240, 220, 0.38); }
.stackbar .mark50 { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--cream); box-shadow: 0 0 8px rgba(255, 255, 255, 0.8); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--mu); margin-top: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }

/* grafy */
.chart { display: block; width: 100%; height: 200px; overflow: visible; }
.chart text { font-family: var(--font); font-size: 11px; fill: rgba(255, 243, 228, 0.55); }
.chart .tip { opacity: 0; transition: opacity 0.15s; }
.chart g:hover .tip { opacity: 1; }

/* formuláře */
.form { display: grid; gap: 14px; }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fld { display: grid; gap: 6px; align-content: start; }
.fld > span { font-size: 12.5px; font-weight: 600; color: var(--mu); }
.fld small { font-size: 12px; color: var(--mu2); }
input.in, select.in, textarea.in, .fld input:where(:not([type=checkbox]):not([type=radio]):not([type=range])), .fld select, .fld textarea { width: 100%; min-height: 42px; padding: 10px 14px; border: 0; border-radius: 14px; background: rgba(255, 240, 220, 0.1); box-shadow: inset 0 0 0 1px rgba(255, 240, 220, 0.16); color: var(--ink); outline: 0; transition: box-shadow 0.15s, background 0.15s; }
.fld textarea { min-height: 96px; resize: vertical; }
input.in:focus, select.in:focus, textarea.in:focus, .fld input:where(:not([type=checkbox]):not([type=radio]):not([type=range])):focus, .fld select:focus, .fld textarea:focus { box-shadow: inset 0 0 0 2px var(--amber); background: rgba(255, 240, 220, 0.14); }
.fld select option { color: #222; }
.fld.err input, .fld.err textarea { box-shadow: inset 0 0 0 2px var(--bad); }
.fld .errm { color: var(--bad); font-size: 12px; }
.checks { display: flex; gap: 8px; flex-wrap: wrap; }
.checks label { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 13px; border-radius: 999px; font-size: 13px; background: rgba(255, 240, 220, 0.1); cursor: pointer; }
.checks input { accent-color: var(--amber); }
.search { position: relative; }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--mu2); }
.search input { padding-left: 40px; }
.tog { flex: none; width: 50px; height: 30px; border-radius: 999px; position: relative; background: rgba(255, 240, 220, 0.2); transition: background 0.2s; }
.tog::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(40, 20, 5, 0.35); transition: transform 0.25s cubic-bezier(0.3, 1.4, 0.5, 1); }
.tog[aria-checked='true'] { background: linear-gradient(90deg, var(--amber-2), var(--amber)); }
.tog[aria-checked='true']::after { transform: translateX(20px); }

/* boční panel a okno */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(25, 12, 3, 0.45); opacity: 0; pointer-events: none; transition: opacity 0.25s; }
.scrim.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; z-index: 61; top: 12px; right: 12px; bottom: 12px; width: min(560px, calc(100vw - 24px)); border-radius: var(--r-lg); background: var(--glass-solid); -webkit-backdrop-filter: blur(30px) saturate(150%); backdrop-filter: blur(30px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 245, 230, 0.2), 0 40px 90px -20px rgba(8, 5, 2, 0.9); transform: translateX(calc(100% + 24px)); transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); display: flex; flex-direction: column; overflow: hidden; }
.drawer.open { transform: none; }
.drawer-h { display: flex; align-items: flex-start; gap: 14px; padding: 22px 22px 14px; }
.drawer-h .t { flex: 1; min-width: 0; }
.drawer-h h2 { margin: 2px 0 0; font-family: var(--display); font-size: 26px; font-weight: 500; letter-spacing: -0.02em; }
.drawer-h p { margin: 4px 0 0; color: var(--mu); font-size: 13.5px; }
.drawer-b { flex: 1; overflow-y: auto; padding: 4px 22px 26px; }
.drawer .tabs { margin-bottom: 14px; }
.modal { position: fixed; z-index: 62; left: 50%; top: 50%; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 40px); overflow-y: auto; padding: 24px; border-radius: var(--r-lg); background: var(--glass-solid); -webkit-backdrop-filter: blur(30px) saturate(150%); backdrop-filter: blur(30px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 245, 230, 0.2), 0 40px 90px -20px rgba(8, 5, 2, 0.9); opacity: 0; transform: translate(-50%, -46%) scale(0.98); pointer-events: none; transition: opacity 0.2s, transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
.modal.open { opacity: 1; transform: translate(-50%, -50%); pointer-events: auto; }
.modal.wide { width: min(860px, calc(100vw - 24px)); }
.modal h2 { margin: 0 0 4px; font-family: var(--display); font-size: 24px; font-weight: 500; letter-spacing: -0.02em; }
.modal .lead { margin: 0 0 18px; color: var(--mu); }
.modal .foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.x { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; color: var(--mu); background: rgba(255, 240, 220, 0.1); }
.x:hover { color: var(--ink); background: rgba(255, 240, 220, 0.18); }
.modal .x { position: absolute; top: 18px; right: 18px; }

/* oznámení */
.toasts { position: fixed; z-index: 80; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; max-width: min(560px, calc(100vw - 32px)); padding: 12px 18px 12px 14px; border-radius: 18px; font-size: 14px; font-weight: 500; background: rgba(26, 22, 18, 0.92); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: inset 0 1px 0 rgba(255, 245, 230, 0.2), 0 18px 40px -14px rgba(8, 5, 2, 0.8); animation: toastIn 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); pointer-events: none; }
.toast .ic { width: 28px; height: 28px; border-radius: 50%; }
.toast.out { opacity: 0; transform: translateY(8px); transition: opacity 0.3s, transform 0.3s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(0.97); } }



/* kanban */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: start; }
.kcol { padding: 14px; border-radius: var(--r); min-height: 200px; }
.kcol h3 { display: flex; align-items: center; justify-content: space-between; margin: 2px 4px 12px; font-size: 14px; }
.kcard { display: block; width: 100%; text-align: left; padding: 13px 14px; border-radius: 16px; margin-bottom: 10px; background: rgba(255, 240, 220, 0.1); box-shadow: inset 0 0 0 1px rgba(255, 240, 220, 0.12); transition: background 0.15s, transform 0.15s; }
.kcard:hover { background: rgba(255, 240, 220, 0.16); transform: translateY(-1px); }
.kcard b { display: block; font-size: 13.5px; font-weight: 600; margin: 6px 0 3px; }
.kcard small { display: block; font-size: 12px; color: var(--mu2); }
.kcard.hav { box-shadow: inset 0 0 0 2px rgba(255, 140, 110, 0.6); }

/* časová osa */
.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; position: relative; }
.timeline::before { content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 14px 10px; font-size: 13.5px; }
.timeline li::before { content: ''; position: absolute; left: -18px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 3px rgba(244, 184, 96, 0.25); }
.timeline li.todo::before { background: rgba(255, 240, 220, 0.3); box-shadow: none; }
.timeline small { display: block; color: var(--mu2); font-size: 12px; }


/* QR */
.qr { width: 132px; height: 132px; padding: 8px; border-radius: 14px; background: #fff; flex: none; }
.qr svg { width: 100%; height: 100%; display: block; }

/* úkoly k vyzkoušení */
.tourbtn { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px 0 4px; margin-right: 2px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; transition: background 0.15s; }
.tourbtn:hover { background: rgba(255, 240, 220, 0.12); }
.tourbtn.hint .ring { animation: pulse 1.8s ease-out infinite; }
@media (prefers-reduced-motion: reduce) { .tourbtn.hint .ring { animation: none; box-shadow: 0 0 0 3px rgba(255, 178, 92, 0.6); } }
.tourbtn .ring { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--amber-ink); background: conic-gradient(var(--amber) var(--p), rgba(255, 240, 220, 0.22) 0); flex: none; }
.tourbtn .ring span { width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center; background: var(--cream); }
.tour { position: fixed; z-index: 46; right: var(--pad); top: calc(22px + var(--top-h) + 12px); width: min(400px, calc(100vw - 32px)); max-height: calc(100vh - 140px); overflow-y: auto; padding: 20px; border-radius: var(--r-lg); background: var(--glass-solid); -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px); box-shadow: inset 0 1px 0 rgba(255, 245, 230, 0.2), 0 30px 70px -20px rgba(8, 5, 2, 0.9); opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity 0.2s, transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
.tour.open { opacity: 1; transform: none; pointer-events: auto; }
/* na počítači obsah panelu úkolů uhne, ať nic nezakrývá */
@media (min-width: 1800px) {
  main { transition: padding-right 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
  body:not([data-route='prehled']):not([data-route='portal']):has(#tour.open) main { padding-right: calc(var(--pad) + 420px); }
}
.tour h3 { margin: 0 0 2px; font-family: var(--display); font-size: 20px; font-weight: 500; }
.tour p { margin: 0 0 12px; font-size: 13px; color: var(--mu); }
.tour .list > li { align-items: flex-start; }
.tour .list li.done b { text-decoration: line-through; color: var(--mu2); }
.tour .x { position: absolute; top: 14px; right: 14px; }
.spot { position: relative; z-index: 1; animation: spot 1.4s ease-in-out 3; border-radius: 16px; }
@keyframes spot { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 215, 150, 0); } 50% { box-shadow: 0 0 0 6px rgba(255, 215, 150, 0.75); } }

/* výzva WebTitan */
/* na konci stránky (ne plovoucí), ať nic nezakrývá */
.cta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; margin-top: 28px; padding: 10px 10px 10px 20px; border-radius: 22px; font-size: 13.5px; }
.cta b { font-weight: 600; }
.cta .acts { gap: 8px; align-items: center; }
[data-cta='off'] .cta { display: none; }
main > .cta { max-width: 1340px; }
@media (min-width: 1700px) { main > .cta { max-width: 1640px; } }
.tour .cta-in { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding: 12px 14px; border-radius: 16px; background: rgba(255, 240, 220, 0.08); font-size: 13px; }
.ri.more-only { display: none; }

/* skeleton */
.sk { border-radius: var(--r); background: linear-gradient(100deg, rgba(255, 240, 220, 0.06) 30%, rgba(255, 240, 220, 0.14) 50%, rgba(255, 240, 220, 0.06) 70%); background-size: 300% 100%; animation: sk 1.4s linear infinite; }
@keyframes sk { to { background-position: -100% 0; } }

/* nástup stránky */
.enter > * { animation: rise 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.enter > *:nth-child(2) { animation-delay: 50ms; } .enter > *:nth-child(3) { animation-delay: 100ms; } .enter > *:nth-child(4) { animation-delay: 150ms; } .enter > *:nth-child(5) { animation-delay: 200ms; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---------- menší okna ---------- */
@media (max-width: 1360px) {
  .infobar span:nth-child(3) { display: none; }
}
@media (max-width: 1240px) and (min-width: 1101px) {
  .infobar { display: none; }
}
@media (max-width: 1100px) {
  :root { --pad: 16px; }
  .infobar, .who > div { display: none; }
  .top { top: 12px; }
  .brand small { display: none; }
  main { padding: calc(12px + var(--top-h) + 22px) var(--pad) 120px; }
  .rail, .rail:hover, .rail:focus-within { top: auto; bottom: 12px; left: 12px; right: 12px; width: auto; height: 66px; flex-direction: row; justify-content: space-around; padding: 9px 10px; overflow-x: auto; background: var(--glass); }
  .rail .rg { display: none; }
  .ri { padding: 0 12px; }
  .ri span { display: none; }
  .ri.more-hide { display: none; }
  .grid > [class*='c'] { grid-column: span 12; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kanban { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ri.more-only { display: flex; }
  .tour { top: calc(12px + var(--top-h) + 10px); right: 12px; }
  .tourbtn > span:last-child { display: none; }
}
@media (max-width: 640px) {
  .ph h1 { font-size: 34px; }
  .kpis { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  .kpi b { font-size: 22px; }
  .kanban { grid-template-columns: minmax(0, 1fr); }
  .form .row2 { grid-template-columns: 1fr; }
  .roles button { padding: 0 9px; font-size: 12px; }
  .brand { padding-right: 16px; }
  .brand b { font-size: 20px; }
  .tourbtn { padding: 0 4px; }
  .tbl .hide-m { display: none; }
  .show-m { display: inline; }
  .card { padding: 16px; }
  .brand > div { display: none; }
  .brand { padding: 0 9px; }
  .kpi b { font-size: 20px; overflow-wrap: anywhere; }
  .ph .acts { width: 100%; }
}
