:root {
  --navy: #0a1b55; --ink: #071038; --blue: #1a4fe0; --yellow: #ffc81a; --paper: #f3f5fc; --white: #fff;
  --line: #dde3f4; --muted: #5a6488; --k: #1a4fe0; --c: #f0a500;
  --s-nova: #1a4fe0; --s-potvrzena: #b77900; --s-zaplacena: #12804a; --s-zrusena: #7b8299;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font: 15px/1.45 "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--paper); }
h1, h2 { margin: 0; text-wrap: balance; }
h1 { font-size: 30px; letter-spacing: -.02em; }
h2 { font-size: 17px; }
.sub { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

.shell { display: flex; flex-wrap: wrap; min-height: 100%; }
.side { flex: 1 1 220px; max-width: 240px; background: var(--navy); color: #fff; padding: 22px 14px; display: flex; flex-direction: column; gap: 22px; }
.main { flex: 999 1 560px; min-width: 0; padding: 28px clamp(16px, 3vw, 40px) 48px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; align-content: start; }
.view { min-width: 0; display: grid; gap: 22px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; padding: 0 8px; }
.brand svg { width: 32px; height: 32px; }
.brand b { color: var(--yellow); }
nav { display: grid; gap: 4px; }
.nav { font: inherit; font-weight: 700; text-align: left; color: #c9d4ff; background: none; border: 0; border-radius: 10px; padding: 11px 12px; cursor: pointer; }
.nav:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav.is-on { background: var(--yellow); color: var(--ink); }
.nav--out { margin-top: auto; font-weight: 600; }
@media (max-width: 760px) { .side { max-width: none; flex-basis: 100%; flex-direction: row; align-items: center; padding: 12px; } nav { display: flex; } .nav--out { margin: 0 0 0 auto; } .brand span { display: none; } }

.btn { font: inherit; font-weight: 700; padding: 10px 16px; border: 0; border-radius: 10px; background: var(--yellow); color: var(--ink); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.btn:hover { filter: brightness(.96); }
.btn--ghost { background: var(--white); box-shadow: inset 0 0 0 1px #c3cce9; }
.btn--sm { padding: 5px 10px; font-size: 13px; font-weight: 600; }
.btn--danger { background: #c4122f; color: #fff; box-shadow: none; }
input, select { font: inherit; padding: 9px 11px; border: 1px solid #c3cce9; border-radius: 10px; background: #fff; color: var(--ink); width: 100%; }
label { font-weight: 700; font-size: 12.5px; color: var(--muted); }

.msg { margin: 0; padding: 12px 16px; border-radius: 12px; background: #fff3cd; border: 1px solid #f0d27a; }
.msg.err { background: #fde3e7; border-color: #f0a3b0; }
.msg.ok { background: #dff5e7; border-color: #9ed8b4; }

.login { width: min(400px, 100%); margin: 10vh auto 0; display: grid; gap: 10px; background: var(--navy); color: #fff; padding: 32px; border-radius: 22px; box-shadow: 0 30px 60px rgba(7, 16, 56, .25); }
.login h1 { font-size: 24px; margin: 6px 0 10px; }
.login label { color: #c9d4ff; }
.brand--big { padding: 0; font-size: 22px; }

.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.head__btns { display: flex; flex-wrap: wrap; gap: 8px; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 20px; min-width: 0; }
.panel--flush { padding: 0; }
.panel__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 22px; }
@media (max-width: 1000px) { .grid2 { grid-template-columns: minmax(0, 1fr); } }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.kpi { background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 18px 18px 16px; display: grid; gap: 4px; position: relative; overflow: hidden; }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--kc, var(--blue)); }
.kpi span { color: var(--muted); font-size: 13px; font-weight: 700; }
.kpi b { font-size: 32px; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi small { color: var(--muted); font-size: 13px; }

.legend { display: flex; gap: 14px; font-size: 13px; color: var(--muted); }
.lg::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.lg--k::before { background: var(--k); } .lg--c::before { background: var(--c); }
.chart svg { display: block; width: 100%; height: auto; }
.chart text { font: 12px "Figtree", system-ui, sans-serif; fill: var(--muted); font-variant-numeric: tabular-nums; }
.chart .grid { stroke: #e8ecf8; }
.chart .bar-k { fill: var(--k); } .chart .bar-c { fill: var(--c); }
.chart .tot { fill: var(--ink); font-weight: 700; }

.todo { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.todo li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--paper); }
.todo b { font-size: 24px; min-width: 2ch; font-variant-numeric: tabular-nums; }
.todo span { flex: 1; }
.todo .btn { padding: 6px 12px; font-size: 13px; }
.todo .ok { color: var(--muted); background: none; padding: 0; }

.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td small { display: block; color: var(--muted); }
.acts { min-width: 760px; }
.acts .typ { display: inline-block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 2px 7px; border-radius: 6px; margin-right: 8px; }
.typ--krouzek { background: #e3ebff; color: var(--k); } .typ--kemp { background: #fff1cc; color: #8a5d00; }
.meter { display: flex; align-items: center; gap: 10px; min-width: 170px; font-size: 13px; font-variant-numeric: tabular-nums; }
.meter i { flex: 1; height: 8px; border-radius: 4px; background: #e8ecf8; overflow: hidden; display: block; }
.meter i em { display: block; height: 100%; background: var(--blue); border-radius: 4px; }
.meter.full i em { background: #c4122f; }
.na { color: var(--muted); font-size: 13px; }

.filters { display: flex; flex-wrap: wrap; gap: 12px; }
.f { display: grid; gap: 4px; flex: 0 1 230px; }
.f--grow { flex: 1 1 280px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: inherit; font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 999px; border: 1px solid #c3cce9; background: #fff; color: var(--ink); cursor: pointer; font-variant-numeric: tabular-nums; }
.chip.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.list { min-width: 1060px; }
.list td.vs { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.list td.dt { white-space: nowrap; font-variant-numeric: tabular-nums; }
.list .note { max-width: 240px; color: var(--muted); font-size: 14px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 800; white-space: nowrap; }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.s-nova { color: var(--s-nova); } .s-potvrzena { color: var(--s-potvrzena); } .s-zaplacena { color: var(--s-zaplacena); } .s-zrusena { color: var(--s-zrusena); }
.list select { width: auto; padding: 5px 8px; font-size: 13px; margin-top: 6px; }
.empty { text-align: center; color: var(--muted); padding: 40px; margin: 0; }
.demo { background: var(--yellow); color: var(--ink); font-weight: 700; padding: 10px 16px; border-radius: 12px; }
