/* dataZtacha – klidné světlé rozhraní s tmavomodrým akcentem značky (barvy podle logo/tokens.json).
   Červená = konkrétní problém, oranžová = potřeba doplnění, neutrální šedá = nevyhodnoceno. */
:root {
  --bg: #f3f5f6;
  --surface: #ffffff;
  --surface-2: #f7f9fa;
  --border: #dde3e6;
  --border-strong: #c5cfd4;
  --text: #1b2a31;
  --text-2: #475a63;
  --text-3: #5f717a;
  --accent: #16324f;
  --accent-hover: #0f2438;
  --accent-weak: #e6ecf3;
  --accent-line: #b4c5d8;
  --brand-orange: #f28c28; /* jen akcent (linky, zvýraznění), nikdy text na bílé */
  --problem: #b42318;
  --problem-bg: #fdeceb;
  --problem-line: #f1c0bb;
  --todo: #9a4a05;
  --todo-bg: #fff2df;
  --todo-line: #f3cc95;
  --ok: #1f6a47;
  --ok-bg: #e7f3ec;
  --neutral: #56666e;
  --neutral-bg: #edf0f2;
  --act-d: #1f5a8a;
  --act-w: #8a63c2;
  --act-a: #74a7c2;
  --act-r: #66a676;
  --radius: 10px;
  --radius-s: 6px;
  --shadow: 0 1px 2px rgba(20, 40, 50, .06), 0 1px 1px rgba(20, 40, 50, .04);
  --shadow-l: 0 10px 30px rgba(20, 40, 50, .16);
  --focus: 0 0 0 3px rgba(22, 50, 79, .35);
  --side-w: 232px;
  font-size: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
/* odkaz v textu: tmavomodrá značky je blízko barvě textu, proto je odkaz jemně podtržený (nepoznává se jen podle barvy) */
a:not([class]) { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; text-decoration-color: var(--accent-line); }
a:not([class]):hover { text-decoration-color: currentColor; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 600; }
h1 { font-size: 1.6rem; letter-spacing: -.01em; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.02rem; }
p { margin: 0 0 .6em; }
small, .small { font-size: .875rem; }
.muted { color: var(--text-3); }
.text-2 { color: var(--text-2); }
.num, td.num, th.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- rozvržení ---------- */
.layout { display: flex; min-height: 100vh; }
.side {
  width: var(--side-w); flex: 0 0 var(--side-w);
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 18px 14px 14px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 2px 6px 18px; }
.brand-logo { display: block; height: 36px; width: auto; flex: none; }
.brand-co { font-size: .78rem; color: var(--text-3); line-height: 1.25; }
.side .btn-upload { width: 100%; justify-content: center; margin-bottom: 18px; }
.nav { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px;
  color: var(--text-2); font-weight: 500; text-decoration: none;
}
.nav a svg { flex: none; opacity: .8; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { background: var(--accent-weak); color: var(--accent-hover); font-weight: 600; }
.nav a.active svg { opacity: 1; }
.nav a, .crumbs a, .tabs a, .law-toc a, .edu-toc a, .law-text sup a { text-decoration: none; }
.nav-sec { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); }
.nav-sec a { padding: 6px 10px; font-size: .9rem; font-weight: 450; }
.side-foot { padding: 12px 8px 0; font-size: .75rem; color: var(--text-3); line-height: 1.4; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.content { width: 100%; max-width: 1480px; padding: 22px 32px 48px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .sub { color: var(--text-3); margin-top: 4px; }
.page-head > div:first-child { min-width: 0; }
.page-head h1, .crumbs { overflow-wrap: anywhere; } /* dlouhé názvy souborů bez mezer */
.crumbs { font-size: .875rem; color: var(--text-3); margin-bottom: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.crumbs a { color: var(--text-3); }
.crumbs a:hover { color: var(--accent); }

/* kontextová lišta: kdo a jaké období */
.context {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 8px 10px 8px 14px; margin-bottom: 18px; box-shadow: var(--shadow);
}
.context .who { font-weight: 600; }
.context .sep { width: 1px; align-self: stretch; background: var(--border); }
.context .grow { flex: 1; }

/* ---------- komponenty ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 550; font-size: .95rem;
  padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text); cursor: pointer; text-decoration: none; white-space: nowrap; line-height: 1.3;
}
.btn:hover { background: var(--surface-2); text-decoration: none; border-color: #b4c0c6; }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--accent); padding: 6px 10px; }
.btn-ghost:hover { background: var(--accent-weak); border-color: transparent; }
.btn-s { padding: 5px 10px; font-size: .875rem; }
.btn-l { padding: 12px 22px; font-size: 1.05rem; }
.btn-icon { padding: 6px 8px; }
.btn-danger { color: var(--problem); }
.btn-group { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 8px; overflow: hidden; }
.btn-group .btn { border: none; border-radius: 0; }
.btn-group .btn + .btn { border-left: 1px solid var(--border-strong); }
.btn-group .btn.on { background: var(--accent-weak); color: var(--accent-hover); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.card-head h2, .card-head h3 { font-size: 1.05rem; white-space: nowrap; }
.card-head { flex-wrap: wrap; }
.card-body { padding: 14px 20px 18px; }
.card + .card, .card + .grid, .grid + .card, .section + .section { margin-top: 18px; }
.grid > .card + .card { margin-top: 0; }
.grid > div > .card + .card { margin-top: 18px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.grid-main { grid-template-columns: minmax(0, 1fr) clamp(340px, 27vw, 430px); align-items: start; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.tile { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; color: inherit; box-shadow: var(--shadow); }
a.tile:hover { border-color: var(--accent-line); text-decoration: none; }
.tile .label { font-size: .85rem; color: var(--text-3); }
.tile .value { font-size: 1.55rem; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 2px; }
.tile .hint { font-size: .82rem; color: var(--text-3); margin-top: 2px; }
.tile.problem .value { color: var(--problem); }
.tile.todo .value { color: var(--todo); }

/* stavy */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px;
  font-size: .8rem; font-weight: 600; line-height: 1.6; white-space: nowrap; border: 1px solid transparent;
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.badge.plain::before { display: none; }
.b-problem { color: var(--problem); background: var(--problem-bg); border-color: var(--problem-line); }
.b-todo { color: var(--todo); background: var(--todo-bg); border-color: var(--todo-line); }
.b-ok { color: var(--ok); background: var(--ok-bg); }
.b-neutral { color: var(--neutral); background: var(--neutral-bg); }
.b-accent { color: var(--accent-hover); background: var(--accent-weak); }

.note { border-radius: 8px; padding: 10px 14px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); font-size: .92rem; }
.note.todo { background: var(--todo-bg); border-color: var(--todo-line); color: #6f3604; }
.note.problem { background: var(--problem-bg); border-color: var(--problem-line); color: #8a1b12; }
.note.info { background: var(--accent-weak); border-color: var(--accent-line); color: var(--accent); }
.note + .note { margin-top: 8px; }
.note strong { color: inherit; }

/* tabulky */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.t th { text-align: left; font-weight: 600; font-size: .82rem; color: var(--text-3); text-transform: none; padding: 9px 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
table.t td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.t tr:last-child td { border-bottom: none; }
table.t tbody tr.click { cursor: pointer; }
table.t tbody tr.click:hover td { background: #f6fafa; }
table.t tr.sel td { background: var(--accent-weak) !important; }
table.t .col-s { width: 1%; white-space: nowrap; }
.card table.t th:first-child, .card table.t td:first-child { padding-left: 20px; }
.card table.t th:last-child, .card table.t td:last-child { padding-right: 20px; }

/* seznam věcí k doplnění */
.todo-list { list-style: none; margin: 0; padding: 0; }
.todo-list li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.todo-list li:last-child { border-bottom: none; }
.todo-list .ico { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; margin-top: 1px; }
.todo-list .ico.problem { background: var(--problem-bg); color: var(--problem); }
.todo-list .ico.todo { background: var(--todo-bg); color: var(--todo); }
.todo-list .ico.info { background: var(--neutral-bg); color: var(--neutral); }
.todo-list .txt { flex: 1; min-width: 0; }
.todo-list .t1 { font-weight: 550; }
.todo-list .t2 { font-size: .88rem; color: var(--text-3); }
.todo-list .act { flex: none; }

/* kontroly */
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; padding: 8px 20px; border-bottom: 1px solid var(--border); font-size: .93rem; }
.checks li:last-child { border-bottom: none; }
.checks .ct { flex: 1 1 0; min-width: 0; }
.checks li > .nowrap { flex: none; }
.checks .cn { font-size: .82rem; color: var(--text-3); }
/* co chybí u kontroly: proč, položky a tlačítka přímo k doplnění */
.checks li.has-need { flex-wrap: wrap; }
.checks .cneed { flex: 1 0 100%; margin: 6px 0 4px; padding: 9px 12px; border-radius: var(--radius-s); background: var(--todo-bg); border: 1px solid var(--todo-line); font-size: .86rem; color: #5c2e04; }
.checks .cneed-why { line-height: 1.45; }
.checks .cneed ul { list-style: none; margin: 8px 0 0; padding: 0; }
.checks .cneed li { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; justify-content: space-between; padding: 6px 0 0; border: none; border-top: 1px dashed var(--todo-line); font-size: inherit; }
.checks .cneed li + li { margin-top: 6px; }
.checks .cneed-t { flex: 1 1 14em; min-width: 0; color: var(--text); }
.checks .cneed > .need-acts { margin-top: 8px; }
.need-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.todo-list .act.need-acts { justify-content: flex-end; max-width: 46%; }
.linkish { background: none; border: none; padding: 6px 0 0; color: var(--accent); cursor: pointer; font: inherit; }
.linkish:hover { text-decoration: underline; }
.note.note-act { display: flex; gap: 10px 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.note.note-act > div { flex: 1 1 24em; }
.tn-fxman { margin-top: 6px; font-size: .86rem; font-weight: 400; color: #6f3604; }
.tn-fxman > div + div { margin-top: 4px; }
.tn-fxman .btn { margin-left: 4px; }
@media print { .tn-fxman { display: none; } }
.seg-why { margin-top: 4px; color: #6f3604; max-width: 62em; }
.unk-list li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 2px 0; }
@keyframes flash-ring { 0% { box-shadow: 0 0 0 0 rgba(242, 140, 40, .0); } 15% { box-shadow: 0 0 0 4px rgba(242, 140, 40, .55); } 100% { box-shadow: 0 0 0 0 rgba(242, 140, 40, 0); } }
.flash { animation: flash-ring 2.1s ease-out; border-radius: var(--radius); }
@media print { .cneed, .need-acts, .note-act > .btn { display: none !important; } }

/* formuláře */
label.f { display: block; font-weight: 550; font-size: .9rem; margin-bottom: 4px; }
.field { margin-bottom: 14px; }
.help { font-size: .82rem; color: var(--text-3); }
.field .help { font-size: .82rem; color: var(--text-3); margin-top: 3px; }
.field .err { font-size: .85rem; color: var(--problem); margin-top: 4px; }
input[type=text], input[type=search], input[type=password], input[type=datetime-local], input[type=date], input[type=month], input[type=number], select, textarea {
  font: inherit; font-size: .95rem; width: 100%; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 8px;
  background: #fff; color: var(--text);
}
textarea { min-height: 76px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.invalid { border-color: var(--problem) !important; }
.radio-row { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-card { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border-strong); border-radius: 8px; padding: 7px 11px; cursor: pointer; font-size: .92rem; background: #fff; }
.radio-card:has(input:checked) { border-color: var(--accent); background: var(--accent-weak); }
.radio-card input { margin: 0; accent-color: var(--accent); }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row > .field { flex: 1; min-width: 160px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* časová osa */
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .84rem; color: var(--text-2); align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 16px; height: 11px; border-radius: 2px; display: inline-block; flex: none; }
.a-D { background: var(--act-d); }
.a-W { background: var(--act-w); }
.a-A { background: var(--act-a); }
.a-R { background: var(--act-r); }
.a-U { background: repeating-linear-gradient(135deg, #fff 0 3px, #9aa7ae 3px 5px); box-shadow: inset 0 0 0 1px #8796a0; }
.a-X { background: repeating-linear-gradient(45deg, #f1f3f5 0 4px, #dde2e6 4px 6px); box-shadow: inset 0 0 0 1px #cfd6da; }

.bar { position: relative; height: 26px; background: #fbfcfc; border-radius: 4px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--border); }
.bar .s { position: absolute; bottom: 0; }
.bar .s.a-D { height: 100%; }
.bar .s.a-W { height: 74%; }
.bar .s.a-A { height: 52%; }
.bar .s.a-R { height: 30%; }
.bar .s.a-U, .bar .s.a-X { height: 100%; }
.bar .s.supp { box-shadow: inset 0 3px 0 #0d6b74; }
.s.man, .sw-man { background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .42) 0 3px, transparent 3px 8px); }
.sw-man { background-color: #8a96a0; }
.bar .s.conflict { outline: 2px solid var(--todo); outline-offset: -2px; }
.bar .grid-h { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(30, 50, 60, .07); }

/* měsíc */
.month { width: 100%; border-collapse: collapse; }
.month td { padding: 4px 8px; border-bottom: 1px solid #edf1f3; vertical-align: middle; }
.month tr.wk-start td { border-top: 2px solid var(--border-strong); }
.month tr.day { cursor: pointer; }
.month tr.day:hover td { background: #f6fafa; }
.month tr.day:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }
.month .d-date { width: 92px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.month .d-date b { font-weight: 600; }
.month .d-wd { color: var(--text-3); font-size: .85rem; margin-left: 4px; }
.month .weekend .d-wd { color: var(--accent); }
.month .d-bar { width: auto; min-width: 280px; }
.month .d-num { width: 64px; text-align: right; font-variant-numeric: tabular-nums; font-size: .9rem; color: var(--text-2); }
.month .d-flag { width: 120px; white-space: nowrap; text-align: right; }
.month th { font-weight: 600; font-size: .78rem; color: var(--text-3); padding: 6px 8px; text-align: right; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.month th.l { text-align: left; }
.hours-scale { position: relative; height: 16px; font-size: .7rem; color: var(--text-3); }
.hours-scale span { position: absolute; transform: translateX(-50%); }
.flag { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; font-weight: 600; padding: 1px 7px; border-radius: 999px; }
.flag.problem { color: var(--problem); background: var(--problem-bg); }
.flag.todo { color: var(--todo); background: var(--todo-bg); }

/* den */
.day-tl { padding: 14px 20px 6px; }
.tl-tools { display: flex; align-items: center; gap: 10px; justify-content: space-between; flex-wrap: wrap; margin-bottom: 10px; }
.tl-scroll { overflow-x: auto; padding-bottom: 6px; }
.tl-inner { position: relative; min-width: 100%; }
.tl-bar { position: relative; height: 64px; background: #fbfcfc; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--border); }
.tl-bar .s { position: absolute; bottom: 0; cursor: pointer; border-right: 1px solid rgba(255, 255, 255, .7); }
.tl-bar .s:hover { filter: brightness(1.08); }
.tl-bar .s.sel { outline: 3px solid var(--text); outline-offset: -1px; z-index: 2; }
.tl-bar .s.a-D { height: 100%; }
.tl-bar .s.a-W { height: 74%; }
.tl-bar .s.a-A { height: 52%; }
.tl-bar .s.a-R { height: 30%; }
.tl-bar .s.a-U, .tl-bar .s.a-X { height: 100%; }
.tl-bar .s.supp::after { content: ""; position: absolute; left: 0; right: 0; top: -6px; height: 4px; background: var(--accent); border-radius: 2px; }
.tl-bar .find { position: absolute; top: -14px; height: 6px; background: var(--problem); border-radius: 3px; opacity: .85; }
.tl-bar .find.todo { background: #e08a1e; }
.tl-ticks { position: relative; height: 22px; margin-top: 4px; font-size: .75rem; color: var(--text-3); }
.tl-ticks span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.tl-ticks i { position: absolute; top: calc(-1 * var(--tl-h, 70px)); height: calc(var(--tl-h, 70px) - 4px); width: 1px; background: rgba(30, 50, 60, .08); pointer-events: none; }
.tl-marks { position: relative; height: 18px; }
/* pruhy záznamů z karty pod osou činností */
.tl-wrap { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 8px; }
.tl-labels { font-size: .75rem; color: var(--text-3); }
.tl-lab-sp { height: 18px; }
.tl-lab { height: 24px; margin-top: 2px; display: flex; align-items: center; justify-content: flex-end; text-align: right; white-space: nowrap; }
.tl-lab-act { height: 64px; margin-top: 0; }
.tl-lanes { margin-top: 4px; }
.tl-lane { position: relative; height: 24px; margin-top: 2px; background: #fbfcfc; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--border); }
.lane-empty { position: absolute; left: 8px; top: 4px; font-size: .75rem; color: var(--text-3); }
.lm { position: absolute; top: 3px; height: 18px; font-size: .72rem; line-height: 18px; cursor: pointer; white-space: nowrap; }
.lm.iv { border-radius: 3px; overflow: hidden; color: #fff; padding: 0 5px; box-sizing: border-box; min-width: 2px; }
.lm.iv[class*="t-"] { color: #fff; } /* text v pruhu vždy bílý, barvy druhů platí pro body */
.lm.iv .lm-t { display: block; overflow: hidden; text-overflow: ellipsis; }
.lm.iv.cont-l { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.lm.iv.cont-r { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.lm.iv.open-l { box-shadow: inset 3px 0 0 rgba(255, 255, 255, .55); }
.lm.iv.open-r { box-shadow: inset -3px 0 0 rgba(255, 255, 255, .55); }
.lm.pt { display: flex; align-items: center; gap: 3px; z-index: 1; }
.lm.pt.flip { flex-direction: row-reverse; transform: translateX(-100%); }
.lm.pt .lm-dot { width: 8px; height: 8px; border-radius: 50%; margin-left: -4px; flex: none; background: currentColor; box-shadow: 0 0 0 2px #fff; }
.lm.pt.flip .lm-dot { margin-left: 0; margin-right: -4px; }
.lm.pt.manual .lm-dot { background: #fff; box-shadow: inset 0 0 0 2px currentColor, 0 0 0 1px #fff; }
.lm.pt .lm-t { font-weight: 600; }
.lm.pt.nolabel .lm-t { display: none; }
.lm.sel { outline: 2px solid var(--text); outline-offset: 1px; z-index: 3; }
.lm:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.lm.iv.t-card { background: #4b6472; }
.lm.iv.t-card.s-codriver { background: #7f98a6; }
.lm.t-place { color: #2f6b45; }
.lm.t-place.s-end { color: #4b5563; }
.lm.t-border { color: var(--accent); }
.lm.t-gnss { color: #5b7a88; }
.lm.t-gnss .lm-dot { width: 6px; height: 6px; margin-left: -3px; }
.lm.iv.t-condition.s-out { background: #a16207; }
.lm.iv.t-condition.s-ferry { background: #2563a8; }
.lm.t-condition { color: #2563a8; }
.lm.iv.t-event { background: #c2410c; }
.lm.t-event { color: #c2410c; }
.lm.iv.t-fault { background: #6b7280; }
.lm.t-fault { color: #6b7280; }
.lm.t-control { color: #1d4ed8; }
.lm.t-load { color: #8d5a2b; }
.lm.t-loadtype { color: #6d5f8d; }
.lm-legend { margin-top: 4px; }
.lm-sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: -1px; margin-right: 2px; flex: none; }
.lm-sw.t-card { background: #4b6472; }
.lm-sw.t-place { background: #2f6b45; border-radius: 50%; }
.lm-sw.t-border { background: var(--accent); border-radius: 50%; }
.lm-sw.t-gnss { background: #5b7a88; border-radius: 50%; width: 7px; height: 7px; }
.lm-sw.t-condition { background: linear-gradient(90deg, #a16207 50%, #2563a8 50%); }
.lm-sw.t-event { background: #c2410c; }
.lm-sw.t-fault { background: #6b7280; }
.lm-sw.t-control { background: #1d4ed8; border-radius: 50%; }
.lm-sw.t-load { background: #8d5a2b; border-radius: 50%; }
.place-line { margin-top: 3px; }
.place-line > span:first-child { color: var(--text-3); vertical-align: -2px; margin-right: 4px; }
.place-line a { white-space: nowrap; }
.place-near { padding-left: 18px; }
.place-note { margin: 0 16px 12px; }
.place-note > span:first-child { vertical-align: -2px; }
.lm-sw.t-loadtype { background: #6d5f8d; border-radius: 50%; }
.marks-list td:nth-child(3) { min-width: 260px; }
.mark-types dt { font-weight: 600; }
.mark-types dd { margin-bottom: 10px; }
@media (max-width: 640px) {
  .tl-wrap { grid-template-columns: 54px minmax(0, 1fr); gap: 6px; }
  .tl-labels { font-size: .66rem; }
  .marks-list td:nth-child(3) { min-width: 200px; }
}

.seg-list td { font-size: .92rem; }
.seg-list .act { display: inline-flex; align-items: center; gap: 7px; }
.chip { display: inline-block; font-size: .74rem; padding: 0 7px; border-radius: 999px; background: var(--neutral-bg); color: var(--text-2); margin-left: 4px; line-height: 1.7; white-space: nowrap; }
.chip.acc { background: var(--accent-weak); color: var(--accent-hover); }
.chip.warn { background: var(--todo-bg); color: var(--todo); }

/* nálezy */
.finding { border-bottom: 1px solid var(--border); }
.finding:last-child { border-bottom: none; }
.finding > summary { list-style: none; cursor: pointer; padding: 12px 20px; display: flex; gap: 12px; align-items: flex-start; }
.finding > summary::-webkit-details-marker { display: none; }
.finding > summary:hover { background: #f8fbfb; }
.finding .f-main { flex: 1; min-width: 0; }
.finding .f-title { font-weight: 550; }
.finding .f-meta { font-size: .85rem; color: var(--text-3); }
.finding .f-more { font-size: .85rem; color: var(--accent); white-space: nowrap; }
.finding[open] .f-more .open { display: none; }
.finding:not([open]) .f-more .close { display: none; }
.finding .f-body { padding: 0 20px 16px 20px; max-width: 980px; }
.finding > summary .ico .badge { white-space: nowrap; }
.kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 4px 14px; font-size: .92rem; margin: 6px 0 10px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; }
.kv-wide { grid-template-columns: 210px minmax(0, 1fr); }

/* boční panel */
.panel-back { position: fixed; inset: 0; background: rgba(15, 30, 36, .18); z-index: 40; }
.panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: 440px; max-width: 100vw; background: var(--surface); z-index: 41;
  box-shadow: var(--shadow-l); display: flex; flex-direction: column; border-left: 1px solid var(--border);
}
.panel-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.panel-body { padding: 16px 20px; overflow-y: auto; flex: 1; }
.panel-preview { padding: 10px 20px 0; border-top: 1px solid var(--border); max-height: 34vh; overflow-y: auto; }
.panel-preview .note { margin: 0 0 10px; font-size: .9rem; }
.panel-foot { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; background: var(--surface-2); }

/* pracovní doba */
.panel.panel-wide { width: 580px; }
[hidden] { display: none !important; }
input[type=time] { font: inherit; padding: 6px 8px; border: 1px solid var(--border-strong); border-radius: 8px; background: #fff; color: var(--text); }
.cz-table { font-size: .9rem; }
.cz-table td, .cz-table th { padding: 7px 8px; }
.cz-table tr.has-note td { border-bottom: none; }
.cz-table tr.cz-note td { font-size: .8rem; color: var(--text-3); padding-top: 0; }
.cz-table tr.cz-absence td, .cz-table tr.cz-standby td { background: var(--surface-2); }
.cz-table tfoot td { font-weight: 600; border-top: 2px solid var(--border-strong); border-bottom: none; }
.cz-table tr.cz-note td { line-height: 1.45; }
.cz-table tr.cz-note .sep-dot { color: var(--border-strong); }
.cz-weeks tr.cz-subrel td { border-top: none; padding-top: 2px; color: var(--text-2); }
.cz-weeks tr.cz-subrel td:first-child { padding-left: 34px; }
.sched-grid { max-height: 44vh; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; }
.sched-grid table.t td, .sched-grid table.t th, .sched-pat td, .sched-pat th { padding: 3px 6px; }
.sched-grid table.t th { position: sticky; top: 0; z-index: 1; }
.sched-grid tr.wk-start td { border-top: 2px solid var(--border-strong); }
.sched-grid .err { font-size: .8rem; text-align: left; }
.panel .wr-check { flex: none; align-items: flex-start; }
.panel .wr-check input { margin-top: 3px; }

/* nahrávání */
.drop {
  position: fixed; inset: 0; z-index: 60; background: rgba(22, 50, 79, .10); backdrop-filter: blur(1px);
  display: grid; place-items: center; pointer-events: none;
}
.drop-box { background: var(--surface); border: 2px dashed var(--accent); border-radius: 16px; padding: 34px 48px; text-align: center; box-shadow: var(--shadow-l); }
.drop-box h2 { color: var(--accent-hover); margin-bottom: 6px; }
.progress { height: 8px; border-radius: 999px; background: var(--neutral-bg); overflow: hidden; }
.progress > div { height: 100%; background: var(--accent); width: 0; transition: width .2s; }
.progress.indet > div { width: 35%; animation: indet 1.2s infinite ease-in-out; }
@keyframes indet { 0% { margin-left: -35%; } 100% { margin-left: 100%; } }

.empty { text-align: center; padding: 56px 24px 64px; }
.empty .ill { width: 74px; height: 74px; border-radius: 20px; background: var(--accent-weak); color: var(--accent); display: grid; place-items: center; margin: 0 auto 18px; }
.empty h1 { margin-bottom: 8px; }
.empty p { color: var(--text-2); max-width: 600px; margin: 0 auto 8px; }
.empty .actions { justify-content: center; margin-top: 18px; }
.empty-s { padding: 18px 20px; color: var(--text-3); font-size: .93rem; }

.toast-box { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: #1d3138; color: #fff; padding: 10px 16px; border-radius: 8px; box-shadow: var(--shadow-l); font-size: .93rem; max-width: 640px; }
.toast.err { background: var(--problem); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; flex-wrap: wrap; }
.tabs a, .tabs button { padding: 8px 14px; border: none; background: none; font: inherit; color: var(--text-2); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none; }
.tabs a.on, .tabs button.on { color: var(--accent-hover); border-bottom-color: var(--accent); font-weight: 600; }
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; }
.mono { font-family: Consolas, "Cascadia Mono", Menlo, monospace; font-size: .85rem; word-break: break-all; }
.loading { padding: 40px; text-align: center; color: var(--text-3); }
.spin { width: 18px; height: 18px; border: 2px solid var(--accent-line); border-top-color: var(--accent); border-radius: 50%; animation: sp .8s linear infinite; display: inline-block; vertical-align: -3px; }
@keyframes sp { to { transform: rotate(360deg); } }
.divider { height: 1px; background: var(--border); margin: 14px 0; }
.list-plain { margin: 0; padding-left: 18px; }
.list-plain li { margin: 2px 0; }
details.more > summary { cursor: pointer; color: var(--accent); font-size: .9rem; }
/* upozornění při čtení souboru */
.read-notes ul { list-style: none; padding-left: 0; margin: 6px 0 0; font-size: .86rem; }
.read-notes li { display: flex; gap: 8px; align-items: flex-start; margin: 7px 0; }
.read-notes li > span:first-child { flex: none; margin-top: 2px; }
.read-notes .rn-error > span:first-child { color: var(--problem); }
.read-notes .rn-warn > span:first-child { color: var(--todo); }
.read-notes .rn-info > span:first-child { color: var(--text-3); }
.read-notes .rn-raw { color: var(--text-3); font-size: .76rem; margin-top: 2px; overflow-wrap: anywhere; }
.t tr.has-rn > td { border-bottom: 0; }
.t tr.rn-row > td { padding-top: 0; }
.t .read-notes { max-width: min(820px, calc(100vw - 80px)); position: sticky; left: 20px; } /* na telefonu zůstane v pohledu i při posunu tabulky */
.week-table td, .week-table th { font-size: .9rem; }

/* stránka řidiče: celý měsíc pod sebou, lišta s obdobím a částmi zůstává nahoře */
.drv-top { position: sticky; top: 0; z-index: 20; background: var(--bg); margin: -8px 0 16px; padding: 8px 0 0; box-shadow: 0 8px 10px -10px rgba(20, 40, 50, .25); }
.drv-top .context { margin-bottom: 0; }
.drv-nav { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0 8px; }
.drv-tab { border: 1px solid var(--border); background: var(--surface); color: var(--text-2); border-radius: 999px; padding: 4px 12px; font: inherit; font-size: .86rem; line-height: 1.4; cursor: pointer; }
.drv-tab:hover { color: var(--text); border-color: var(--accent-line); }
.drv-tab.on { background: var(--accent-weak); color: var(--accent-hover); border-color: var(--accent-line); font-weight: 600; }
.drv-sec { scroll-margin-top: 118px; margin-bottom: 34px; }
.drv-sec-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin: 0 0 14px; padding-bottom: 8px; border-bottom: 2px solid var(--border-strong); }
.drv-sec-head h2 { font-size: 1.22rem; }
.drv-sec-head .grow { flex: 1; }
.drv-sec-head .btn { align-self: center; }
.drv-sec-head .btn + .btn { margin-left: -4px; }
.drv-wait { min-height: 320px; color: var(--text-3); padding: 18px 4px; }
.drv-tools { display: flex; justify-content: flex-end; margin: -6px 0 12px; }
.drv-mini h3 { font-size: 1rem; margin-bottom: 6px; }
.drv-mini p { margin: 0 0 8px; }
.drv-dl li { padding: 3px 0; }
@media (max-width: 980px) { .drv-top { position: static; margin: 0 0 14px; padding: 0; box-shadow: none; } .drv-sec { scroll-margin-top: 8px; } }

/* tiskové náhledy */
.print-toolbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.sheet { background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow); padding: 28px 34px; max-width: 1100px; margin: 0 auto; }
.sheet h1 { font-size: 1.35rem; margin-bottom: 4px; }
.sheet .rep-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 24px; font-size: .86rem; margin: 10px 0 14px; padding: 10px 0; border-top: 1px solid #333; border-bottom: 1px solid #bbb; }
.sheet .rep-meta div span { color: #555; }
.sheet table.t { font-size: .84rem; }
.sheet table.t th { background: #f0f2f3; color: #222; }
.sheet table.t td, .sheet table.t th { padding: 5px 8px; }
.sheet .stamp { display: inline-block; border: 2px solid #8a1b12; color: #8a1b12; font-weight: 700; padding: 2px 10px; letter-spacing: .04em; font-size: .85rem; }
.sheet .stamp.test { border-color: #16324f; color: #16324f; }
.sheet h2 { font-size: 1.02rem; margin: 18px 0 6px; }
.sheet .legend-p { font-size: .8rem; color: #444; margin-top: 12px; break-inside: avoid; }
.sheet h2 { break-after: avoid; }
.sheet table.t tr { break-inside: avoid; }
/* společná pravidla tabulek ve výkazech: čísla, data a časy se nelámou; text se láme jen v širokém sloupci */
.sheet table.t .small, .sheet table.t small { font-size: .92em; } /* drobné písmo je vždy menší než text tabulky, i v tisku */
.sheet .mono { font-size: .84em; }
.sheet table.t th { white-space: normal; vertical-align: bottom; line-height: 1.2; }
.sheet table.t th.num { text-align: right; }
.sheet table.t .fit { width: 1%; }
.sheet table.t td.fit, .sheet table.t td.nowrap { white-space: nowrap; }
.sheet .dt, .iv-n { white-space: nowrap; font-variant-numeric: tabular-nums; }
.sheet table.t tr.we > td { background: #f4f5f6; }
.sheet table.t td.det-c { min-width: 16em; }
.sheet .det { line-height: 1.3; }
.sheet .det + .det { margin-top: 1px; }
.sheet .det-l { color: #555; }
.sheet .det-note { color: #333; font-style: italic; }
.sheet table.t td .sub { display: block; font-size: .9em; color: #555; font-weight: 400; }
.sheet table.t tr.has-note > td { border-bottom: none; }
.sheet table.t tr.note-row > td { padding-top: 0; color: #444; font-size: .92em; }
.sheet table.tl-rep td { border-bottom: none; }
.sheet table.tl-rep tr.d0 > td { border-top: 1px solid #c4c9cc; }
.sheet .rep-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px 18px; align-items: start; }
/* logo dataZtacha v hlavičce sestavy: vlevo nahoře, 11 mm; v černobílém tisku černobílá verze */
.rep-logo { flex: none; }
.rep-logo img { display: block; height: 11mm; width: auto; }
.rep-logo .rep-logo-bw { display: none; }
@media print and (monochrome) { .rep-logo .rep-logo-c { display: none; } .rep-logo .rep-logo-bw { display: block; } }
.sheet .rep-head .pill-row { justify-content: flex-end; }
.sheet .t-auto { width: auto; min-width: 50%; }
.sheet .f-list { border-top: 1px solid var(--border); }
.sheet .f-item { padding: 6px 0 7px; border-bottom: 1px solid var(--border); break-inside: avoid; font-size: .86rem; }
.sheet .f-item .f-top { display: flex; gap: 4px 14px; justify-content: space-between; align-items: baseline; flex-wrap: wrap; }
.sheet .f-item .f-top strong { font-size: .95em; }
.sheet .f-item .f-st { white-space: nowrap; font-weight: 600; font-size: .92em; }
.sheet .f-item .f-meta { color: #555; font-size: .92em; }
.sheet .f-item .f-vals { margin-top: 2px; font-size: .92em; }
.sheet .f-item .f-vals span + span::before { content: " · "; color: #888; }
.sheet .f-item .f-ex { margin-top: 2px; font-size: .92em; }
@media screen and (max-width: 900px) { .sheet { overflow-x: auto; padding: 18px 16px; } }
@media (max-width: 640px) { .sheet .rep-head { grid-template-columns: minmax(0, 1fr); } .sheet .rep-head .pill-row { justify-content: flex-start; } }
@media screen and (max-width: 640px) { .rep-logo img { height: 32px; } }

/* výkaz práce řidiče */
.wr-form { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; }
.wr-field { display: flex; flex-direction: column; gap: 4px; }
.wr-field > label, .wr-field > .lbl { font-size: .82rem; color: var(--text-3); }
.wr-field.grow { flex: 1 1 240px; min-width: 200px; max-width: 380px; }
.wr-check { display: flex; align-items: center; gap: 8px; font-size: .92rem; flex: 1 1 100%; cursor: pointer; }
.wr-check input { width: auto; margin: 0; }
.wr-actions { display: flex; gap: 8px; flex-wrap: wrap; flex: 1 1 100%; }
.wr-form.compact .wr-check { flex: 1 1 auto; }
.wr-form.compact .wr-actions { flex: 0 0 auto; }
.wr-sheets > .sheet + .sheet { margin-top: 18px; }
.wr-sheet table.t { font-size: .8rem; }
.wr-sheet table.t td, .wr-sheet table.t th { padding: 4px 6px; }
.wr-sheet table.t th { white-space: normal; vertical-align: bottom; line-height: 1.2; hyphens: manual; }
.wr-sheet table.t th.num { text-align: right; }
.wr-sheet table.t td.nowrap { white-space: nowrap; }
.wr-sheet tr.wr-month td { font-weight: 600; background: #f7f9fa; padding-top: 7px; }
.wr-sheet tr.has-note td { border-bottom: none; }
.wr-sheet tr.wr-note td { font-size: .74rem; color: #555; padding-top: 0; }
.wr-sheet tr.wr-sub td { font-weight: 600; border-top: 1px solid #999; }
.wr-sheet tr.wr-sum td { font-weight: 700; border-top: 2px solid #333; border-bottom: none; }
.wr-sheet td.wr-total { font-weight: 600; }
.wr-notices { font-size: .82rem; margin-top: 10px; padding: 6px 10px; border-left: 3px solid #d98a2b; background: #fff8ec; break-inside: avoid; }
.wr-legend .rep-cite { margin: 10px 0 12px; }
.wr-legend .rep-cite .chip { margin-left: 8px; }

@page {
  size: A4;
  margin: 14mm 12mm 16mm;
  @bottom-right { content: "Strana " counter(page) " z " counter(pages); font-family: "Segoe UI", system-ui, Arial, sans-serif; font-size: 8.5pt; color: #444; }
  @bottom-left { content: "dataZtacha – výstup aplikace, není náhradou tachografického výtisku"; font-family: "Segoe UI", system-ui, Arial, sans-serif; font-size: 8pt; color: #666; }
}
@page landscape { size: A4 landscape; }

@media print {
  body { background: #fff; }
  a:not([class]) { text-decoration: none; }
  .side, .context, .print-toolbar, .toast-box, .panel, .panel-back, .no-print { display: none !important; }
  .content { padding: 0; max-width: none; }
  .sheet { border: none; box-shadow: none; padding: 0; max-width: none; }
  .sheet.landscape { page: landscape; }
  /* tisk všech výkazů: hustší řádky a stejné písmo; součty jen jednou na konci tabulky (ne na každé straně) */
  .sheet h1 { font-size: 14pt; }
  .sheet h2 { font-size: 10.5pt; margin: 12px 0 4px; }
  .sheet .rep-meta { font-size: 8.4pt; line-height: 1.35; margin: 5px 0 8px; padding: 5px 0; }
  .sheet table.t { font-size: 8.6pt; line-height: 1.22; }
  .sheet table.t td, .sheet table.t th { padding: 2px 6px; }
  .sheet table.t tfoot { display: table-row-group; }
  .sheet .f-item { font-size: 8.6pt; padding: 4px 0 5px; }
  .sheet > p, .sheet .f-list + p { font-size: 9pt; }
  .sheet .legend-p, .sheet > p.small, .sheet .rep-cite { font-size: 7.8pt; line-height: 1.35; }
  .wr-sheets > .sheet + .sheet { break-before: page; margin-top: 0; }
  .wr-sheet table.t { font-size: 8.4pt; line-height: 1.2; }
  .wr-sheet table.t td, .wr-sheet table.t th { padding: 1px 5px; }
  .wr-sheet table.t th { line-height: 1.15; }
  .wr-sheet tr.wr-note td { padding-top: 0; }
  .wr-sheet .rep-meta { margin: 5px 0 6px; padding: 5px 0; font-size: 8.4pt; line-height: 1.35; }
  .wr-sheet.landscape .rep-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wr-sheet h1 { font-size: 14pt; }
  .wr-sheet .legend-p { font-size: 7.6pt; line-height: 1.35; margin-top: 8px; }
  .wr-legend { font-size: 8pt; line-height: 1.32; columns: 2; column-gap: 26px; }
  .wr-legend > h2, .wr-legend > p { column-span: all; }
  .wr-legend .rep-cite { margin: 0 0 8px; }
  .wr-legend .small { font-size: 7.6pt; }
  table.t thead { display: table-header-group; }
  table.t tr { break-inside: avoid; }
  a { color: inherit; }
  .a-D { background: #222 !important; } .a-W { background: #777 !important; } .a-A { background: #aaa !important; } .a-R { background: #ddd !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* menší obrazovky a zvětšené zobrazení */
@media (max-width: 1180px) {
  .grid-main { grid-template-columns: minmax(0, 1fr); }
  .content { padding: 18px 20px 40px; }
}
@media (max-width: 980px) {
  :root { --side-w: 100%; }
  .layout { flex-direction: column; }
  .side { position: static; height: auto; width: 100%; flex: none; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; border-right: none; border-bottom: 1px solid var(--border); }
  .brand { padding: 0 8px 0 0; }
  .brand-logo { height: 30px; }
  .brand-co, .side-foot { display: none; }
  .side .btn-upload { width: auto; margin: 0; order: 3; }
  .nav { flex-direction: row; flex-wrap: wrap; gap: 2px; }
  .nav a { padding: 6px 9px; }
  .nav a svg { display: none; }
  .nav-sec { margin-top: 0; padding-top: 0; border-top: none; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .month .d-flag { width: auto; }
  .month .d-num.opt { display: none; }
  .kv { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------------- předpisy */
.law-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.law-card { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; color: var(--text); box-shadow: var(--shadow); }
.law-card:hover { border-color: var(--accent-line); text-decoration: none; background: #fbfdfd; }
.law-cite { font-weight: 600; color: var(--accent); margin-bottom: 2px; }
.law-info { margin-bottom: 14px; }
.law-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 18px; align-items: start; }
.law-toc { position: sticky; top: 12px; max-height: calc(100vh - 24px); display: flex; flex-direction: column; overflow: hidden; }
.law-toc .toc-list { list-style: none; margin: 0; padding: 0 8px 12px; overflow: auto; font-size: .86rem; }
.law-toc .toc-list li a { display: block; padding: 3px 8px; border-radius: 5px; color: var(--text-2); }
.law-toc .toc-list li a:hover { background: var(--accent-weak); text-decoration: none; color: var(--text); }
.law-toc .toc-h1 a { font-weight: 600; color: var(--text) !important; margin-top: 6px; }
.law-toc .toc-h2 a { font-weight: 550; padding-left: 14px !important; }
.law-toc .toc-h3 a { padding-left: 22px !important; }
.law-toc .toc-h4 a { padding-left: 30px !important; font-size: .82rem; }
.law-toc .toc-art a { padding-left: 30px !important; }
.law-toc .toc-list li.cur > a { background: var(--accent-weak); color: var(--text); font-weight: 600; }
.law-toc .toc-list li.ctx > a { color: var(--text-3); }
.hits sup { font-size: .7em; color: var(--text-3); }
.input-s { padding: 5px 9px; font-size: .88rem; }
.law-card-text { padding: 18px 24px 26px; }
.law-text { font-size: .97rem; line-height: 1.6; max-width: 900px; }
.law-text .lb { position: relative; padding: 2px 6px; border-radius: 6px; white-space: pre-line; scroll-margin-top: 80px; }
.law-text .lb + .lb { margin-top: 4px; }
.law-text .lb .perm { position: absolute; left: -18px; top: 2px; opacity: 0; color: var(--text-3); font-size: .85rem; text-decoration: none; }
.law-text .lb:hover > .perm { opacity: 1; }
.law-text .lbl { font-weight: 600; }
.law-text .k-h1 { margin-top: 26px; text-align: center; font-weight: 600; }
.law-text .k-h1 .lh, .law-text .k-h2 .lh { display: flex; flex-direction: column; gap: 2px; }
.law-text .k-h2 { margin-top: 20px; text-align: center; font-weight: 600; }
.law-text .k-h3, .law-text .k-h4 { margin-top: 16px; font-weight: 600; }
.law-text .k-h3 .lh .lbl, .law-text .k-h4 .lh .lbl { margin-right: 8px; }
.law-text .k-h1 .lt, .law-text .k-h2 .lt, .law-text .k-h3 .lt, .law-text .k-h4 .lt { font-weight: 400; text-align: left; margin-top: 6px; }
.law-text .k-art { margin-top: 18px; }
.law-text .k-art > .lh { display: flex; flex-direction: column; align-items: center; gap: 2px; font-weight: 600; margin-bottom: 4px; }
.law-text .k-art > .lt { display: block; }
.law-text .lv-7 { margin-left: 22px; }
.law-text .lv-8 { margin-left: 44px; }
.law-text .k-pp { margin-left: 0; }
.law-text .k-ip { margin-left: 22px; }
.law-text .k-note { font-size: .86rem; color: var(--text-2); }
.law-text .law-notice { margin: 4px 0 8px 6px; font-size: .88rem; }
.law-text .k-sign { font-style: italic; color: var(--text-2); }
.law-text .hl { background: #fff7d6; box-shadow: inset 3px 0 0 #e0b100; }
.law-text mark { background: #ffe58a; color: inherit; padding: 0 1px; border-radius: 2px; }
.law-text sup a { font-size: .72rem; text-decoration: none; margin-left: 1px; }
.law-text .flash { animation: lawflash 1.6s ease-out; }
@keyframes lawflash { from { background: #ffe58a; } to { background: transparent; } }
.hits { list-style: none; margin: 0; padding: 4px 0; }
.hits li { padding: 8px 20px; border-bottom: 1px solid var(--border); }
.hits li:last-child { border-bottom: none; }
.hits-s li { padding: 6px 2px; }
.hits mark, .cite mark { background: #ffe58a; color: inherit; }
.cite { border-left: 3px solid var(--accent-line); padding: 6px 0 6px 12px; margin: 8px 0; }
.cite.bad { border-left-color: var(--problem); }
.cite-head { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; font-weight: 550; }
.cite blockquote { margin: 4px 0 2px; font-size: .93rem; line-height: 1.5; color: var(--text); white-space: pre-line; }
.cites-h { margin: 14px 0 2px; font-size: .95rem; }
.cites-intro { margin: 2px 0 6px; max-width: 72ch; }
.cite.interp { border-left-color: #c9b8e6; }
.cite.sev { border-left-color: var(--todo-line); padding-top: 3px; padding-bottom: 3px; margin: 4px 0; }
.cite.sev blockquote { font-size: .88rem; }
.cite .chip { font-weight: 400; margin-left: 0; }
.cites-more { margin-top: 10px; }
.cites-more > summary { cursor: pointer; color: var(--accent); font-size: .9rem; }
.cite-links a { white-space: normal; }
.rep-cite { margin: 6px 0 8px; break-inside: avoid; }
.rep-cite .q { white-space: pre-line; font-style: italic; }
@media (max-width: 900px) {
  .law-layout { grid-template-columns: minmax(0, 1fr); }
  .law-toc { position: static; max-height: 320px; }
  .law-card-text { padding: 14px 16px 20px; }
  .law-text .lb .perm { display: none; }
}
@media print {
  .law-toc, .law-info .grow { display: none; }
}

/* vysvětlení předpisů (vzdělávací sekce) */
:root { --edu-rizeni: var(--act-d); --edu-prace: var(--act-w); --edu-pohotovost: var(--act-a); --edu-odpocinek: var(--act-r); --edu-nezname: #9aa3ad; --edu-chyba: var(--problem); --edu-ok: var(--ok); }
.a-B { background: #a9d4b3; }
.edu-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 18px; align-items: start; }
.edu-toc { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; padding: 12px 8px 14px; font-size: .9rem; }
.edu-toc ul { list-style: none; margin: 0 0 6px; padding: 0; }
.edu-toc li a { display: block; padding: 4px 10px; border-radius: 6px; color: var(--text-2); line-height: 1.35; }
.edu-toc li a:hover { background: var(--surface-2); text-decoration: none; color: var(--accent); }
.edu-toc li a.on { background: var(--accent-weak); color: var(--accent); font-weight: 600; }
.edu-toc-h { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); margin: 6px 10px 4px; font-weight: 600; }
.edu-toc-sec { font-size: .8rem; color: var(--text-3); margin: 8px 10px 2px; }
.edu-article { max-width: 900px; line-height: 1.6; }
.edu-article > p, .edu-article > .edu-ul, .edu-article .edu-call { max-width: 76ch; }
.edu-article p { margin: 0 0 12px; }
.edu-article h2.edu-h { margin: 28px 0 10px; font-size: 1.2rem; scroll-margin-top: 12px; }
.edu-article h2.edu-h:first-child { margin-top: 0; }
.edu-article h3.edu-h { margin: 20px 0 8px; font-size: 1.02rem; }
.edu-ul { margin: 0 0 12px; padding-left: 22px; }
.edu-ul li { margin: 3px 0; }
.edu-ref { text-decoration: underline dotted; text-underline-offset: 2px; }
.edu-rule { display: inline-flex; align-items: center; gap: 4px; margin: 2px 0 10px; padding: 2px 12px; border: 1px solid var(--accent-line); border-radius: 999px; background: var(--accent-weak); font-size: .86rem; font-weight: 550; }
.edu-rule::before { content: "⚙"; font-size: .85em; }
.edu-rule:hover { text-decoration: none; background: #d5e0ec; }
.edu-call .edu-rule { margin-bottom: 0; }
.edu-bad { color: var(--problem); text-decoration: underline wavy; }
.edu-call { border-left: 4px solid var(--border-strong); background: var(--surface-2); border-radius: 8px; padding: 10px 14px; margin: 14px 0; }
.edu-call > :last-child { margin-bottom: 0; }
.edu-call.edu-ex { background: var(--accent-weak); border-left-color: var(--accent); }
.edu-call.edu-warn { background: var(--todo-bg); border-left-color: #d98a2b; }
.edu-call.edu-unclear { background: #f4f0fb; border-left-color: #9b7fd0; }
.edu-table { margin: 6px 0 14px; border: 1px solid var(--border); border-radius: 8px; }
.edu-table table.t td, .edu-table table.t th { vertical-align: top; line-height: 1.45; }
.edu-fig { margin: 16px 0 18px; }
.edu-fig figcaption, .edu-osa figcaption { font-size: .85rem; color: var(--text-3); margin-top: 6px; }
.edu-svg { color: var(--text); max-width: 760px; }
.edu-svg svg { width: 100%; height: auto; display: block; overflow: visible; }
.edu-osa { margin: 14px 0 18px; }
.edu-osa-bar { display: flex; height: 26px; border-radius: 6px; overflow: hidden; border: 1px solid var(--border); max-width: 760px; }
.edu-osa-bar .seg { min-width: 5px; border-right: 1px solid rgba(255, 255, 255, .7); }
.edu-osa-bar .seg:last-child { border-right: none; }
.edu-osa-list { list-style: none; margin: 8px 0 0; padding: 0; columns: 2 300px; font-size: .88rem; }
.edu-osa-list li { display: flex; align-items: center; gap: 8px; padding: 1px 0; break-inside: avoid; }
.edu-osa-d { min-width: 44px; text-align: right; }
.edu-pre { background: var(--surface-2); padding: 10px 12px; border-radius: 8px; overflow: auto; }
.edu-pn { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.edu-pn-a { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.edu-pn-a:hover { border-color: var(--accent-line); background: #fbfdfd; text-decoration: none; }
.edu-pn-a.next { text-align: right; grid-column: 2; }
.edu-pn-t { font-weight: 600; }
.edu-card { display: flex; gap: 12px; align-items: flex-start; }
.edu-num { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-weak); color: var(--accent); font-weight: 700; display: grid; place-items: center; font-size: .9rem; }
@media (max-width: 900px) {
  .edu-layout { grid-template-columns: minmax(0, 1fr); }
  .edu-toc { position: static; max-height: none; }
  .edu-toc-all { display: none; }
  .edu-pn { grid-template-columns: 1fr; }
  .edu-pn-a.next { grid-column: 1; }
}
@media print {
  .edu-toc, .edu-pn { display: none; }
  .edu-layout { display: block; }
}

/* graf dne: čas vyjmutí karty v pruhu, sloučené body, výběr ze sloučených */
.lm.iv .lm-te { position: absolute; right: 0; top: 0; padding: 0 5px 0 10px; background: inherit; }
.lm.iv .lm-te.hide { display: none; }
.lm.pt.inclu { visibility: hidden; pointer-events: none; }
.lm.pt.lm-cl { z-index: 2; }
.lm.pt.lm-cl .lm-dot { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px currentColor; }
.lm.t-mixed { color: #374151; }
.lm-sw.t-place.s-end { background: #4b5563; }
.lm-sw.t-card.s-codriver { background: #7f98a6; }
.lm-sw.t-condition.s-out { background: #a16207; }
.lm-sw.t-condition.s-ferry, .lm-sw.t-condition.s-other { background: #2563a8; }
.lm-sw.t-manual { background: #fff; border-radius: 50%; box-shadow: inset 0 0 0 2px #4b5563; }
.cl-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 2px; }
.cl-pick { display: flex; gap: 8px; align-items: center; width: 100%; text-align: left; background: none; border: 0; padding: 4px 6px; border-radius: 6px; font: inherit; color: inherit; cursor: pointer; }
.cl-pick:hover, .cl-pick:focus-visible { background: var(--surface-2); }
.marks-list td:nth-child(2) { min-width: 220px; }
.marks-list td:nth-child(4) { min-width: 120px; }
/* na telefonu se řádky záznamů skládají pod sebe: čas | název, pod ním podrobnosti a zdroj */
@media (max-width: 640px) {
  .card table.t.marks-list thead { display: none; }
  .card table.t.marks-list tbody tr { display: grid; grid-template-columns: 90px minmax(0, 1fr); padding: 8px 0; border-bottom: 1px solid var(--border); }
  .card table.t.marks-list td { border: 0; padding: 1px 14px 1px 0; min-width: 0; }
  .card table.t.marks-list td:first-child { padding-left: 16px; }
  .card table.t.marks-list td:nth-child(3), .card table.t.marks-list td:nth-child(4) { grid-column: 2; }
}
.lm.pt.t-condition.s-out { color: #a16207; }

/* plán směn */
.plan-table td { vertical-align: top; }
.plan-table .center { text-align: center; }
.plan-table input[type=time] { width: 128px; }
.plan-table td:first-child { min-width: 210px; }
.plan-table td:nth-child(2) { min-width: 170px; }
.plan-table tr.plan-main td { border-bottom: 0; }
.plan-table tr.plan-sub td { padding-top: 0; }
.plan-table tr.plan-changed td { background: var(--accent-weak); }
.plan-msg { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: flex-start; }
.plan-note { font-size: .85rem; padding: 3px 8px; border-radius: 6px; }
.plan-note.b-problem { border: 1px solid var(--problem-line); }
.plan-warn { color: var(--todo); }
.plan-foot { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; border-top: 1px solid var(--border); }
.plan-foot .field { margin: 0; }
.plan-foot input[type=text] { width: 160px; }

/* plán směn na celý měsíc: řádky = dny, sloupce = zaměstnanci. Hlavička tabulky a lišta s uložením zůstávají
   při posunu stránky na očích; širší tabulka (mnoho zaměstnanců) dostane vlastní posun s pevným prvním sloupcem. */
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-s); overflow: hidden; background: var(--surface); }
.seg-b { padding: 5px 12px; font-size: .9rem; color: var(--text-2); }
.seg-b + .seg-b { border-left: 1px solid var(--border-strong); }
.seg-b:hover { text-decoration: none; background: var(--surface-2); }
.seg-b.active { background: var(--accent); color: #fff; }
.mp-wrap.mp-wide { overflow: auto; max-height: calc(100vh - 120px); min-height: 320px; }
table.mp-table { border-collapse: separate; border-spacing: 0; width: 100%; }
table.mp-table th, table.mp-table td { border-bottom: 1px solid var(--border); }
table.mp-table thead th { position: sticky; top: 0; z-index: 3; vertical-align: bottom; white-space: normal; padding: 8px; box-shadow: 0 1px 0 var(--border); }
table.mp-table .mp-daycol { min-width: 98px; width: 98px; text-align: left; font-weight: 500; font-size: .9rem; white-space: nowrap; padding: 4px 10px 4px 16px; color: var(--text); background: var(--surface); vertical-align: middle; }
table.mp-table thead .mp-daycol { background: var(--surface-2); color: var(--text-3); z-index: 4; vertical-align: bottom; }
table.mp-table tfoot th, table.mp-table tfoot td { background: var(--surface-2); border-top: 1px solid var(--border-strong); border-bottom: 0; }
.mp-wide table.mp-table .mp-daycol { position: sticky; left: 0; z-index: 2; }
.mp-wide table.mp-table thead .mp-daycol { z-index: 4; }
.mp-wide table.mp-table tfoot th, .mp-wide table.mp-table tfoot td { position: sticky; bottom: 0; z-index: 3; }
.mp-wide table.mp-table tfoot .mp-daycol { z-index: 4; }
.mp-emp { min-width: 150px; }
.mp-emp a { font-weight: 600; font-size: .92rem; color: var(--text); }
.mp-rel { font-size: .74rem; color: var(--text-3); font-weight: 400; line-height: 1.3; }
.mp-rel.plan-warn { color: var(--todo); }
table.mp-table td.mp-cell { padding: 3px 6px; min-width: 150px; vertical-align: middle; }
.mp-ci { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; }
table.mp-table input.mp-in { flex: 1 1 104px; min-width: 0; width: auto; height: 30px; padding: 3px 7px; font-size: .9rem; border: 1px solid var(--border); border-radius: var(--radius-s); background: var(--surface); color: var(--text); }
table.mp-table input.mp-in::placeholder { color: var(--border-strong); }
table.mp-table input.mp-in:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.mp-sub { flex: 0 0 auto; min-width: 62px; display: flex; gap: 5px; align-items: center; justify-content: flex-end; font-size: .74rem; color: var(--text-3); min-height: 1.2em; white-space: nowrap; }
.mp-ro { flex: 1 1 104px; padding: 4px 1px; color: var(--text-2); font-size: .9rem; min-height: 30px; }
td.mp-dirty input.mp-in { background: var(--accent-weak) !important; border-color: var(--accent-line) !important; }
td.mp-bad input.mp-in { background: var(--problem-bg) !important; border-color: var(--problem) !important; }
.mp-e { color: var(--problem); }
.mp-chg { color: var(--accent); font-weight: 600; }
.mp-w { display: inline-flex; width: 15px; height: 15px; border-radius: 50%; align-items: center; justify-content: center; font-weight: 700; color: #fff; font-size: .68rem; line-height: 1; }
.mp-w.t { background: var(--todo); }
.mp-w.p { background: var(--problem); }
table.mp-table tr.mp-we > th, table.mp-table tr.mp-we > td { background: var(--surface-2); }
table.mp-table tr.mp-hol > th, table.mp-table tr.mp-hol > td { background: #fdf5ea; }
table.mp-table tr.mp-today > th { box-shadow: inset 4px 0 0 var(--accent); }
table.mp-table tr.mp-past .mp-ro { color: var(--text-3); }
.mp-wd { display: inline-block; min-width: 1.7em; color: var(--text-3); font-weight: 400; }
.mp-holname { font-size: .72rem; color: var(--text-3); font-weight: 400; line-height: 1.25; white-space: normal; }
table.mp-table tr.mp-week > th, table.mp-table tr.mp-week > td { background: #eef3f4; border-bottom: 1px solid var(--border-strong); padding-top: 5px; padding-bottom: 5px; }
.mp-wsum { font-weight: 600; font-size: .9rem; }
.mp-wnote { font-size: .72rem; line-height: 1.3; }
.mp-wnote.todo { color: var(--todo); }
.mp-wnote.ok { color: var(--ok); }
.mp-below { display: grid; gap: 10px; border-top: 1px solid var(--border); }
.mp-below .help { line-height: 1.5; }
.mp-warns h3 { font-size: .95rem; margin: 2px 0 4px; }
.mp-wlist { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: .88rem; }
.plan-foot.mp-foot { display: block; position: sticky; bottom: 0; z-index: 5; padding: 8px 16px 10px; background: var(--surface); box-shadow: 0 -6px 14px rgba(20, 40, 50, .07); border-radius: 0 0 var(--radius) var(--radius); }
/* stavový řádek: vždy dva řádky textu, aby lišta při psaní neposkakovala; celé znění je v title */
.mp-status { font-size: .84rem; line-height: 1.4; color: var(--text-2); margin-bottom: 6px; }
.mp-status > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 1.4em; }
.mp-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.mp-l { font-size: .86rem; font-weight: 500; color: var(--text-2); }
.mp-ctl input[type=datetime-local] { width: auto; height: 34px; padding: 4px 8px; font-size: .9rem; }
.mp-ctl input[type=text] { width: 140px; height: 34px; padding: 4px 8px; font-size: .9rem; }
.mp-ctl .btn-primary { margin-left: 4px; }
.mp-foot > .err:not(:empty) { margin-top: 6px; font-size: .85rem; color: var(--problem); }
.mp-print-head { display: none; }
/* výchozí směna a předvyplnění nad tabulkou plánu */
.mp-def { padding: 12px 16px; margin-bottom: 14px; border-left: 4px solid var(--accent); }
.mp-def-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.mp-def-t { flex: 1 1 360px; min-width: 0; line-height: 1.45; }
.mp-def-b { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mp-def-w { margin-top: 8px; font-size: .86rem; line-height: 1.45; }
.mp-def-msg:not(:empty) { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border); font-size: .88rem; line-height: 1.45; color: var(--text-2); display: grid; gap: 3px; }
.mp-def-ok { color: var(--text); font-weight: 600; }
/* buňka, na kterou přejde kurzor, nesmí zůstat schovaná pod pevnou hlavičkou ani pod lištou s uložením */
html:has(.mp-foot) { scroll-padding-top: 70px; scroll-padding-bottom: 118px; }
.mp-wrap.mp-wide { scroll-padding: 70px 0 8px 112px; }
body:has(.mp-foot) .toast-box { bottom: 124px; }
@media print {
  .mp-wrap, .mp-wrap.mp-wide { max-height: none; overflow: visible; }
  table.mp-table thead th, table.mp-table tfoot th, table.mp-table tfoot td, table.mp-table .mp-daycol { position: static !important; box-shadow: none; }
  table.mp-table input.mp-in { border: 0; padding: 0; height: auto; background: none !important; box-shadow: none !important; font-size: 9pt; }
  .mp-sub .mp-w, .mp-sub .mp-chg, .mp-foot, .mp-below { display: none !important; }
  .mp-print-head { display: flex; align-items: flex-start; gap: 6px 18px; margin-bottom: 8px; }
  .mp-print-head h1 { font-size: 15pt; margin: 2px 0 3px; }
  .mp-print-warn:not(:empty) { margin-top: 4px; font-weight: 600; color: #a33; }
  table.mp-table td.mp-cell { min-width: 0; padding: 1px 4px; }
}
/* cestovní náhrady (začátek) */
.tn-first { border-left: 4px solid var(--accent); margin-bottom: 16px; }
.tn-val-s { font-size: 1.15rem; }
.tn-fx { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 12px 0; }
.tn-inline { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: flex-end; margin-top: 8px; }
.tn-inline .field { margin: 0; }
.tn-inline input[type=text] { width: 150px; }
.tn-inline input[type=datetime-local] { width: 200px; }
.tn-fix:empty { display: none; }
.tn-fix { margin-top: 6px; padding: 8px 10px; background: var(--neutral-bg); border-radius: 8px; }
.tn-btns { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.tn-trip { margin-top: 16px; }
.tn-trip .kv-wide dd { margin-bottom: 4px; }
.tn-days td, .tn-days th { white-space: nowrap; }
.tn-days tr.tn-excl td { color: var(--text-2); text-decoration: line-through; text-decoration-color: rgba(0, 0, 0, .3); }
.tn-days tr.tn-excl td:last-child { text-decoration: none; }
.tn-days tr.tn-det > td { background: var(--neutral-bg); white-space: normal; padding: 10px 14px; }
.tn-days tr.tn-sum td { border-top: 2px solid var(--border-strong); font-weight: 600; }
.tn-daybox { display: grid; gap: 10px; }
.tn-dayforms { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.tn-dayforms .tn-inline { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px; margin: 0; }
.tn-details > summary { cursor: pointer; list-style: none; }
.tn-details > summary::-webkit-details-marker { display: none; }
.tn-details > summary h2::before { content: "▸ "; color: var(--text-2); }
.tn-details[open] > summary h2::before { content: "▾ "; }
.tn-rates { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.tn-rates .chip { margin-left: 0; }
.tn-form { display: grid; gap: 10px; max-width: 860px; }
.tn-h { font-size: .98rem; margin: 14px 0 2px; padding-top: 12px; border-top: 1px solid var(--border); }
.tn-form > .tn-h:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.tn-prev:empty { display: none; }
.tn-prev { padding: 6px 10px; background: var(--accent-weak); border-radius: 6px; }
.tn-sug { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.tn-sheets > .sheet + .sheet { margin-top: 18px; }
.tn-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.tn-head > .tn-title { flex: 1 1 auto; min-width: 0; }
.tn-work { border: 2px solid #8a1b12; color: #8a1b12; padding: 6px 10px; margin: 10px 0; font-size: .86rem; }
.tn-work ul { margin: 4px 0 0 18px; padding: 0; }
.tn-ptrip { margin-top: 12px; break-inside: auto; }
.tn-ptrip h2 { margin-top: 12px; }
.tn-tot { margin-top: 14px; max-width: 520px; margin-left: auto; }
.tn-tot td:last-child { text-align: right; }
.tn-legend { margin-top: 14px; color: #444; line-height: 1.45; border-top: 1px solid #bbb; padding-top: 8px; }
.tn-legend p { margin: 0 0 6px; }
.tn-sign { display: flex; justify-content: space-between; gap: 30px; margin-top: 34px; font-size: .86rem; line-height: 2.2; break-inside: avoid; }
@media print {
  .tn-sheets > .sheet + .sheet { break-before: page; margin-top: 0; }
  .tn-sheet table.t { font-size: 8.2pt; line-height: 1.2; }
  .tn-sheet table.t td, .tn-sheet table.t th { padding: 1px 4px; }
  .tn-sheet h1 { font-size: 14pt; }
  .tn-sheet h2 { font-size: 10.5pt; margin: 8px 0 3px; }
  .tn-sheet .rep-meta { font-size: 8.4pt; margin: 5px 0 6px; padding: 5px 0; }
  .tn-legend { font-size: 7.6pt; line-height: 1.3; }
  .tn-work { font-size: 8.4pt; padding: 4px 8px; }
  .tn-sign { font-size: 9pt; margin-top: 24px; }
}
.tn-sheet table.t th.num, .tn-days th.num { text-align: right; }
/* cestovní náhrady (konec) */

/* ------------------------------------------------------------------ uzávěrka měsíce (etapa 5) */
.note.ok { background: var(--ok-bg); border-color: #b9dcc7; color: #174f35; }
.todo-list .ico.ok { background: var(--ok-bg); color: var(--ok); }
.todo-list.compact li { padding: 8px 20px; font-size: .92rem; }
.todo-list.compact .ico { width: 22px; height: 22px; }
.kv-tight { grid-template-columns: 118px minmax(0, 1fr); font-size: .88rem; margin: 0; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.cl-out { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cl-out .btn-s { padding: 2px 9px; font-size: .8rem; }
.cl-checks + .cl-checks { margin-top: 10px; }
.cl-checks > summary { cursor: pointer; font-size: .93rem; }
.cl-checks .checks { margin-top: 6px; border-top: 1px solid var(--border); }
.cl-checks .checks li { padding: 7px 0; }
.sheet .stamp.ok { border-color: var(--ok); color: var(--ok); }
.sheet .t-narrow { width: auto; min-width: 360px; }
.sign-row { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 46px; break-inside: avoid; }
.sign-row > div { border-top: 1px solid #333; padding-top: 4px; font-size: .82rem; color: #444; }
@media (max-width: 640px) { .sign-row { grid-template-columns: 1fr; gap: 36px; } .sheet .t-narrow { min-width: 0; width: 100%; } }
.btn-done { color: var(--ok); border-color: #b9dcc7; background: var(--ok-bg); }
.btn-done svg { margin-right: 4px; }
.cl-tiles { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.cl-tiles .value { font-size: 1.4rem; }

/* uzávěrka: skupiny stejných nálezů a vzetí na vědomí */
.todo-list .t1 .cnt, .card-head h2 .cnt { display: inline-block; margin-left: 8px; padding: 0 7px; border-radius: 999px; background: var(--neutral-bg); color: var(--text-2); font-size: .78rem; font-weight: 600; line-height: 1.6; vertical-align: 1px; }
.chip.ok { background: var(--ok-bg); color: var(--ok); margin-left: 0; }
.cl-occ { margin-top: 8px; }
.cl-occ > summary, .cl-acked > summary { cursor: pointer; color: var(--text-2); }
.cl-occ .occ-list { list-style: none; margin: 6px 0 0; padding: 0; }
.cl-occ .occ-list li { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: space-between; padding: 6px 0; border-top: 1px solid var(--border); }
.cl-occ .todo-list.compact li { padding: 8px 0; }
.cl-occ .todo-list.compact li:last-child { border-bottom: none; }
