/* PackLabs Provoz — design tokens převzaté z webu packlabs.cz (src/styles/global.css) */
:root {
  --primary: #1a1a2e;
  --accent: #e85d04;
  --accent-hover: #c44c03;
  --subtle: #f8f8f6;
  --muted: #6b7280;
  --text: #1a1a1a;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --ok: #15803d;   --ok-bg: #ecfdf3;
  --warn: #b45309; --warn-bg: #fff7ed;
  --bad: #b91c1c;  --bad-bg: #fef2f2;
  --radius: 16px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--text); background: var(--subtle);
  line-height: 1.5; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .container { padding: 0 24px; } }

/* ── wordmark (stejně jako hlavička webu) ── */
.wordmark { font-weight: 800; letter-spacing: -0.035em; font-size: 20px; text-decoration: none; white-space: nowrap; }
.wordmark .pack { color: var(--subtle); }
.wordmark .labs { color: var(--accent); }
.wordmark .tag { margin-left: 10px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: #9ca3af; border: 1px solid rgba(255,255,255,.2); border-radius: 6px; padding: 2px 6px; vertical-align: 3px; }
.wordmark.big { font-size: 40px; }

/* ── horní pás (tmavý jako hero na webu) ── */
.topbar { background: var(--primary); color: #fff; }
.topbar-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px;
  border-bottom: 1px solid rgba(255,255,255,.1); }
.who { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #d1d5db; }
.who span { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero { padding: 22px 16px 26px; }
.hero h1 { margin: 0; font-size: clamp(1.5rem, 4vw, 2.25rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { margin: 6px 0 0; color: #9ca3af; font-size: 15px; }
@media (max-width: 440px) { .who span { display: none; } .wordmark .tag { display: none; } }
@media (min-width: 640px) { .hero { padding: 28px 24px 34px; } }

.tabs { display: none; gap: 4px; }
.tabs a { color: #d1d5db; text-decoration: none; font-size: 14px; font-weight: 500; padding: 8px 12px; border-radius: 8px; }
.tabs a:hover { color: #fff; }
.tabs a.on { color: #fff; background: rgba(255,255,255,.1); }
.bottomnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; background: #fff;
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.bottomnav a { flex: 1; min-width: 0; text-align: center; text-decoration: none; color: var(--muted); font-size: 10.5px; font-weight: 600;
  padding: 8px 1px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bottomnav a svg { display: block; margin: 0 auto 2px; width: 22px; height: 22px; }
.bottomnav a.on { color: var(--accent); }
/* Scan štítku: samostatný blok vpravo v dolní liště */
.nav-scan { position: relative; flex: 0 0 76px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  margin: 6px 6px 6px 4px; padding: 6px 2px; border-radius: 14px; background: var(--accent); color: #fff; cursor: pointer;
  font-size: 10.5px; font-weight: 700; white-space: nowrap; box-shadow: 0 2px 8px rgba(232,93,4,.35); }
.nav-scan::before { content: ''; position: absolute; left: -5px; top: 4px; bottom: 4px; border-left: 1px solid var(--line); }
.nav-scan svg { width: 24px; height: 24px; }
.nav-scan:active { transform: scale(.96); }
.nav-badge { position: absolute; top: -6px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; border: 2px solid #fff;
  background: var(--primary); color: #fff; font-size: 11px; font-style: normal; font-weight: 800; line-height: 16px; text-align: center; }
.nav-badge.err { background: var(--bad); }
.desk-only { display: none !important; }
@media (min-width: 900px) { .desk-only { display: flex !important; } }
@media (min-width: 900px) {
  .tabs { display: flex; }
  .bottomnav { display: none; }
}

.content { padding-top: 20px; padding-bottom: 110px; }
@media (min-width: 900px) { .content { padding-bottom: 48px; } }

/* ── typografie ── */
h2 { font-size: 1.125rem; font-weight: 600; color: var(--primary); letter-spacing: -0.01em; margin: 28px 0 10px; }
h2:first-child { margin-top: 4px; }
h3 { font-size: 1rem; font-weight: 600; color: var(--primary); margin: 0; }
.muted { color: var(--muted); font-size: 14px; }
.small { font-size: 13px; }

/* ── layout ── */
.grid2 { display: grid; gap: 16px; }
.grid2 > *, .cards > *, .row > * { min-width: 0; }   /* tabulky nesmí roztáhnout mřížku na mobilu */
@media (min-width: 900px) { .grid2 { grid-template-columns: 1fr 1fr; align-items: start; } .grid2 > div > h2:first-child { margin-top: 4px; } }
.cards { display: grid; gap: 12px; }
@media (min-width: 700px) { .cards.cols { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .cards.cols { grid-template-columns: repeat(3, 1fr); } }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; min-width: 0; }
.between { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }

/* ── karty (jako formulář na webu: bílá, rounded-2xl, border, shadow-sm) ── */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
  box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.card + .card { margin-top: 12px; }
.cards .card + .card { margin-top: 0; }
.card.edge-ok { border-left: 4px solid var(--ok); }
.card.edge-warn { border-left: 4px solid #f59e0b; }
.card.edge-bad { border-left: 4px solid var(--bad); }
.note { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 8px; }
.empty { color: var(--muted); font-size: 14px; padding: 4px 0; }

/* ── formuláře ── */
label { display: block; font-size: 14px; font-weight: 500; color: #374151; margin: 14px 0 6px; }
label:first-child { margin-top: 0; }
input, select, textarea { width: 100%; font: inherit; font-size: 16px; color: var(--text); background: #fff;
  border: 1px solid var(--line-strong); border-radius: 10px; padding: 11px 12px; min-height: 46px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232,93,4,.2); }
input[type=checkbox] { width: 20px; min-height: 0; height: 20px; accent-color: var(--accent); vertical-align: -4px; margin-right: 6px; }
.check { display: flex; align-items: center; gap: 4px; font-weight: 500; }

/* ── tlačítka ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-size: 15px; font-weight: 600;
  border: 1px solid transparent; border-radius: 10px; padding: 11px 18px; cursor: pointer; text-decoration: none;
  background: #fff; color: var(--primary); border-color: var(--line-strong); transition: background .15s, color .15s; min-height: 44px; }
.btn:hover { background: var(--subtle); }
.btn-accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-dark { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-dark:hover { background: #2a2a44; }
.btn-ghost { background: transparent; color: #d1d5db; border-color: rgba(255,255,255,.3); }
.btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; }
.btn-sm { font-size: 13px; padding: 6px 12px; min-height: 34px; border-radius: 8px; }
.btn-block { width: 100%; padding: 15px; font-size: 17px; margin-top: 16px; }
.btn:disabled { opacity: .5; cursor: default; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { font: inherit; font-size: 14px; font-weight: 500; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: #fff; color: #374151; cursor: pointer; }
.chip:hover, .chip.on { border-color: var(--accent); color: var(--accent); }

/* ── docházka ── */
.clock { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.clock .time { font-size: 40px; font-weight: 700; letter-spacing: -0.02em; color: var(--primary); line-height: 1; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); margin-right: 6px;
  box-shadow: 0 0 0 4px var(--ok-bg); }

/* ── štítky, metriky, progress ── */
.badge { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px;
  background: #f3f4f6; color: #374151; white-space: nowrap; }
.b-ok { background: var(--ok-bg); color: var(--ok); }
.b-warn { background: var(--warn-bg); color: var(--warn); }
.b-bad { background: var(--bad-bg); color: var(--bad); }
.b-accent { background: #fff1e6; color: var(--accent-hover); }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 12px; }
@media (min-width: 700px) { .kpis.k4 { grid-template-columns: repeat(4, 1fr); } }
.kpi { background: var(--subtle); border-radius: 12px; padding: 12px; }
.kpi b { display: block; font-size: 22px; font-weight: 700; color: var(--primary); letter-spacing: -0.01em; line-height: 1.2; }
.kpi span { font-size: 12px; color: var(--muted); }
.bar { height: 8px; background: #f3f4f6; border-radius: 999px; overflow: hidden; margin-top: 10px; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.stars { color: var(--accent); font-size: 22px; letter-spacing: 2px; }
.stars .off { color: var(--line); }
.score { font-size: 44px; font-weight: 700; color: var(--primary); letter-spacing: -0.03em; line-height: 1; }

/* ── seznamy a tabulky ── */
.item { padding: 12px 0; border-top: 1px solid var(--line); }
.item:first-child { border-top: 0; padding-top: 0; }
.item:last-child { padding-bottom: 0; }
.day-title { font-weight: 700; color: var(--primary); margin-bottom: 10px; display: flex; gap: 8px; align-items: center; }
.ico { width: 18px; height: 18px; vertical-align: -3px; color: var(--muted); margin-right: 4px; }
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
tr:last-child td { border-bottom: 0; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rank { width: 28px; height: 28px; border-radius: 50%; background: var(--subtle); display: inline-flex; align-items: center;
  justify-content: center; font-weight: 700; font-size: 13px; color: var(--primary); }

/* ── podzáložky správy ── */
.seg { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 8px; scrollbar-width: none; }
.seg button { flex: 0 0 auto; font: inherit; font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: #fff; color: #374151; cursor: pointer; }
.seg button.on { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ── přihlášení ── */
.login { min-height: 100vh; background: var(--primary); display: flex; align-items: flex-start; justify-content: center; padding: 48px 16px; }
.login-card { width: 100%; max-width: 380px; text-align: center; }
.login-sub { color: #9ca3af; margin: 4px 0 24px; }
.login .card { text-align: left; }
.pin { text-align: center; font-size: 26px; letter-spacing: .5em; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.keypad button { font: inherit; font-size: 22px; font-weight: 600; padding: 14px 0; border-radius: 12px; border: 1px solid var(--line);
  background: var(--subtle); color: var(--primary); cursor: pointer; }
.keypad button:active { background: #eceae5; }

/* ── dialog, toast, progress ── */
dialog { border: 0; border-radius: var(--radius); padding: 0; width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
  box-shadow: 0 20px 50px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(26,26,46,.55); }
dialog form { padding: 20px; }
dialog h3 { font-size: 1.125rem; margin-bottom: 4px; }
.dlg-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
#toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 88px; z-index: 50; background: var(--primary); color: #fff;
  padding: 11px 18px; border-radius: 10px; font-size: 14px; max-width: calc(100vw - 32px); box-shadow: 0 8px 24px rgba(0,0,0,.2); }
#toast.err { background: var(--bad); }
@media (min-width: 900px) { #toast { bottom: 28px; } }
#progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; background: var(--accent);
  transform-origin: left; animation: prog 1.1s ease-in-out infinite; }
@keyframes prog { 0% { transform: scaleX(0); } 60% { transform: scaleX(.8); } 100% { transform: scaleX(1); opacity: 0; } }
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }

/* ── přepínač jazyka (CZ / UA) ── */
.lang { display: inline-flex; border: 1px solid rgba(255,255,255,.25); border-radius: 8px; overflow: hidden; }
.lang button { font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .04em; padding: 6px 9px; min-height: 32px;
  background: transparent; color: #d1d5db; border: 0; cursor: pointer; }
.lang button + button { border-left: 1px solid rgba(255,255,255,.25); }
.lang button.on { background: var(--accent); color: #fff; }
.login-lang { display: flex; justify-content: flex-end; margin-bottom: 8px; }

/* nákup a plán po týdnech */
.neg { color: var(--bad); }
.bar.over i { background: var(--bad); }
table.gantt th.now { color: var(--accent); }
table.gantt td { white-space: nowrap; }
table.gantt td:first-child { white-space: normal; min-width: 160px; }
.cell { display: inline-block; min-width: 44px; padding: 3px 6px; border-radius: 6px; background: #eef2ff; font-weight: 600; font-size: 13px; }
.cell.due { box-shadow: inset 0 0 0 2px var(--accent); }
.cell.late { background: var(--bad-bg); color: var(--bad); }

/* telefon: velká tlačítka a průvodce zápisem práce */
.center { text-align: center; }
.btn-xl { width: 100%; padding: 18px; font-size: 19px; border-radius: 14px; margin-top: 12px; min-height: 60px; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.tiles { display: grid; gap: 10px; }
.tile { font: inherit; text-align: left; padding: 14px 16px; border: 2px solid var(--line); border-radius: 14px; background: #fff; color: inherit;
  cursor: pointer; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; min-height: 56px; }
.tile b { font-size: 18px; }
.tile span { color: var(--muted, #6b7280); font-size: 14px; }
.tile.big { padding: 26px 18px; }
.tile.big b { font-size: 22px; }
.tile.on, .tile:active { border-color: var(--accent); background: #fff7f0; }
.person-pick { position: relative; }
.person-pick input { padding-right: 48px; font-size: 18px; font-weight: 600; }
.pick-clear { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; border-radius: 10px;
  background: transparent; color: var(--muted, #6b7280); font-size: 24px; line-height: 1; cursor: pointer; }
.pick-clear:active { background: var(--subtle); }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20; background: #fff; border: 2px solid var(--accent);
  border-radius: 14px; box-shadow: 0 10px 28px rgba(0,0,0,.18); overflow: hidden; max-height: 330px; overflow-y: auto; }
.sug { display: block; width: 100%; text-align: left; font: inherit; font-size: 18px; font-weight: 600; padding: 14px 16px; min-height: 52px;
  border: 0; border-bottom: 1px solid var(--line); background: #fff; color: inherit; cursor: pointer; }
.sug:last-child { border-bottom: 0; }
.sug.on, .sug:active, .sug:hover { background: #fff7f0; }
.sug-empty { padding: 14px 16px; color: var(--muted, #6b7280); }
dialog.wiz { width: min(520px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0 auto; border-radius: 0; }
@media (min-width: 600px) { dialog.wiz { height: auto; max-height: calc(100dvh - 48px); margin: auto; border-radius: var(--radius); } }
.wiz-body { padding: 14px 16px calc(24px + env(safe-area-inset-bottom)); }
.wiz-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.dots span { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--line); margin: 0 3px; }
.dots span.on { background: var(--accent); }
.wiz-q { font-size: 24px; margin: 4px 0 6px; }
.bignum { font-size: 52px; font-weight: 800; text-align: center; letter-spacing: -1px; margin: 10px 0 4px; }
.lotboxes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0 6px; }
.lotbox { font: inherit; color: inherit; background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 10px 8px; text-align: center; cursor: pointer; }
.lotbox span { display: block; font-size: 13px; font-weight: 700; letter-spacing: .06em; color: var(--muted, #6b7280); }
.lotbox b { display: block; font-size: 30px; font-weight: 800; letter-spacing: 1px; font-variant-numeric: tabular-nums; }
.lotbox b i { font-style: normal; color: #c7c9d1; }
.lotbox.on { border-color: var(--accent); background: #fff7f0; }
.lotbox.on span { color: var(--accent); }
.bignum small { font-size: 20px; font-weight: 600; color: var(--muted, #6b7280); }
.wiz .keypad button { padding: 16px 0; font-size: 24px; }
.chipgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); gap: 8px; margin-top: 12px; }
.chipgrid button { font: inherit; font-size: 17px; font-weight: 600; padding: 14px 0; border-radius: 12px; border: 2px solid var(--line); background: #fff; color: inherit; }
.chipgrid button.on { border-color: var(--accent); color: var(--accent); }
.sum { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin: 10px 0 12px; }
.sum-row { font: inherit; color: inherit; width: 100%; display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 10px; align-items: center; text-align: left;
  padding: 14px; background: #fff; border: 0; border-bottom: 1px solid var(--line); }
.sum-row:last-child { border-bottom: 0; }
.sum-row span { color: var(--muted, #6b7280); }
.sum-row b { font-size: 17px; }
.sum-row i { font-style: normal; color: var(--accent); font-size: 14px; font-weight: 600; }
.done-mark { width: 96px; height: 96px; border-radius: 50%; background: var(--ok-bg, #dcfce7); color: var(--ok, #15803d); font-size: 56px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; margin: 24px auto 8px; }

/* portál: kontroly, školení, nábor */
.tiles.cols2 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.tile.due { border-color: var(--warn); }
.tile.done { background: var(--subtle); border-color: var(--line); color: var(--muted); }
.tile.done b { color: var(--muted); }
/* scan štítku */
.scan-btn { display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.scan-list { display: grid; gap: 6px; margin-top: 8px; }
.scan-item { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.scan-item img, .scan-item .ph0 { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; background: var(--subtle); flex: none; }
.scan-item > div { flex: 1; min-width: 0; }
.scan-item.done { border-color: var(--ok); background: var(--ok-bg); }
.scan-item.err { border-color: var(--bad); background: var(--bad-bg); }
.scan-item.busy .small, .scan-item.wait .small { color: var(--muted); }
/* směny: kalendář měsíce + hodinové sloty */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin: 10px 0 6px; text-transform: capitalize; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-w { text-align: center; font-size: 12px; color: var(--muted); padding: 2px 0; }
.cal-d { position: relative; font: inherit; font-weight: 700; font-size: 16px; aspect-ratio: 1; border-radius: 10px; border: 2px solid transparent; background: var(--ok-bg); color: var(--text); cursor: pointer; padding: 0; }
.cal-d.part { background: #fff3e0; }
.cal-d.full { background: var(--bad-bg); color: var(--bad); }
.cal-d.off { background: transparent; color: var(--line-strong); cursor: default; }
.cal-d.today { border-color: var(--line-strong); }
.cal-d.sel { border-color: var(--accent); background: #fff; color: var(--accent); }
.dot-mine { position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%); width: 6px; height: 6px; border-radius: 50%; background: var(--primary); display: block; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 4px; }
.cal-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; position: static; transform: none; }
.cal-legend i.free { background: var(--ok-bg); border: 1px solid var(--ok); } .cal-legend i.part { background: #fff3e0; border: 1px solid var(--warn); } .cal-legend i.full { background: var(--bad-bg); border: 1px solid var(--bad); }
.cal-legend i.dot-mine { width: 8px; height: 8px; border-radius: 50%; }
.slots { display: grid; gap: 6px; margin: 8px 0 10px; }
.slot { font: inherit; display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; text-align: left; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--line); background: #fff; color: var(--text); cursor: pointer; }
.slot b { font-size: 17px; } .slot span { justify-self: end; font-size: 14px; color: var(--ok); font-weight: 600; }
.slot small { grid-column: 1 / -1; color: var(--muted); font-size: 12px; margin-top: 2px; }
.slot.part span { color: var(--warn); }
.slot.full { background: var(--bad-bg); border-color: transparent; cursor: not-allowed; } .slot.full span { color: var(--bad); }
.slot.past { opacity: .45; cursor: not-allowed; } .slot.past span { color: var(--muted); }
.slot:disabled { color: var(--text); }
.slot.full small.who-full { color: #7f1d1d; font-size: 13.5px; font-weight: 700; }
.slot.sel { border-color: var(--accent); background: #fff7f0; }
/* směny s vlastním časem: obsazenost dne 7–22 */
.daybar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--ok-bg); border: 1px solid var(--line); margin: 6px 0 2px; }
.daybar i { display: block; height: 100%; }
.daybar i.b1 { background: #fde7c7; } .daybar i.b2 { background: var(--bad); opacity: .75; }
.daybar-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
a.tile { text-decoration: none; }
.tile .ico { vertical-align: -4px; }
.fl { display: block; font-weight: 600; margin: 16px 0 6px; }
.req { color: var(--bad); }
.big-input { font-size: 26px !important; font-weight: 700; padding: 14px !important; }
.sig { width: 100%; height: 160px; border: 2px dashed var(--line-strong); border-radius: 12px; background: #fff; touch-action: none; display: block; margin-bottom: 6px; }
.sig-img { max-width: 100%; height: 90px; border: 1px solid var(--line); border-radius: 8px; margin-top: 6px; background: #fff; }
.rich { line-height: 1.55; margin: 10px 0 16px; }
.rich h3, .rich h4, .rich h5 { margin: 18px 0 6px; }
.rich ul { padding-left: 20px; margin: 6px 0; }
.rich p { margin: 6px 0; }
.todo { display: flex; gap: 12px; align-items: center; text-decoration: none; color: inherit; border-color: var(--warn); background: var(--warn-bg); margin-bottom: 12px; }
.todo .ico { width: 28px; height: 28px; color: var(--warn); flex: 0 0 auto; }
.todo b { display: block; }
table.access th { font-size: 12px; white-space: normal; min-width: 64px; }
table.access td.own { background: #fff7f0; font-weight: 700; }
table.access tr.def td { background: var(--subtle); }
table.access input { width: 22px; height: 22px; }
.check.decl { align-items: flex-start; line-height: 1.4; margin: 10px 0; }
.onb { max-width: 640px; margin: 0 auto; padding: 16px 16px 48px; }
.onb-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.onb .wordmark .pack { color: var(--primary); }
.onb-title { font-size: 28px; margin: 8px 0; }
.onb .card { margin-top: 14px; }

/* směny a práce domů */
.todo.info { border-color: var(--line); background: #fff; }
.todo.info .ico { color: var(--accent); }
.item.shift { padding: 12px 0; }
.item.shift.mine { border-left: 4px solid var(--accent); padding-left: 10px; }
.shift-time { font-size: 18px; }
.item.shift .btn-block { margin-top: 10px; padding: 13px; }
button.x { border: 0; background: var(--bad-bg); color: var(--bad); border-radius: 999px; width: 22px; height: 22px; line-height: 20px; font-weight: 700; cursor: pointer; padding: 0; }
select.sm { width: auto; padding: 6px 10px; font-size: 14px; }
.check.day { border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 12px; }
.photos { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.photos img { width: 88px; height: 88px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); display: block; }
.photos .ph { position: relative; }
.photos .ph .x { position: absolute; top: -6px; right: -6px; }

/* ── scany štítků (přehled vedoucího, Správa → Scany) ── */
.scan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.scan-tile { display: flex; flex-direction: column; justify-content: flex-end; min-height: 72px; border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; background: var(--subtle); color: var(--text); text-decoration: none; font-size: 12px; }
.scan-tile img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block; background: var(--line); }
.scan-tile span { padding: 4px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.scan-tile:hover { border-color: var(--accent); }

/* ── příjem materiálu ── */
.photos .pdf-tile { width: 88px; height: 88px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line);
  border-radius: 10px; background: var(--subtle); color: var(--muted); font-weight: 700; }
.rcv-line input:disabled { background: var(--subtle); color: var(--muted); }

/* ── rozpis směn: časová osa (řádek = den, sloupec = hodina, směna = pruh) ── */
.rs-bar { flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.tl { min-width: 860px; }
.tl-row { display: grid; grid-template-columns: 110px 1fr; border-top: 1px solid var(--line); }
.tl-row.tl-head { border-top: 0; position: sticky; top: 0; background: #fff; z-index: 2; }
.tl-day { padding: 6px 8px 6px 0; display: flex; flex-direction: column; justify-content: center; line-height: 1.3; }
.tl-day.we b { color: var(--warn); }
.tl-row.today .tl-day b { color: var(--accent); }
.tl-hours { display: grid; grid-template-columns: repeat(var(--n), 1fr); font-size: 12px; font-weight: 600; color: var(--muted); }
.tl-hours span { padding: 4px 0 4px 3px; border-left: 1px solid var(--line); }
.tl-track { position: relative; cursor: copy; min-height: 44px;
  background-image: linear-gradient(to right, var(--line) 1px, transparent 1px); background-size: calc(100% / var(--n)) 100%; }
.tl-row.past .tl-track { background-color: var(--subtle); }
.tl-row.today .tl-track { background-color: #fff8f2; }
.tl-track.over { outline: 2px dashed var(--accent); outline-offset: -2px; background-color: #fff4ec; }
.tl-bar { position: absolute; height: 28px; border-radius: 7px; color: #fff; font-size: 12px; line-height: 28px; padding: 0 8px;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: grab; user-select: none; touch-action: pan-x pan-y; box-sizing: border-box;
  box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.tl-bar span { pointer-events: none; }
.tl-bar em { font-style: normal; opacity: .8; font-variant-numeric: tabular-nums; }
.tl-bar.dragging { opacity: .85; cursor: grabbing; pointer-events: none; z-index: 5; box-shadow: 0 6px 16px rgba(0,0,0,.25); }
.tl-bar.open { background: var(--warn-bg); color: var(--warn); border: 1px dashed var(--warn); box-shadow: none; cursor: pointer; }
.tl-h { position: absolute; top: 0; bottom: 0; width: 8px; cursor: ew-resize; }
.tl-h-l { left: 0; } .tl-h-r { right: 0; }
.tl-bar:hover .tl-h { background: rgba(255,255,255,.25); }
.tl-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--accent); pointer-events: none; }
.tl-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; vertical-align: 0; }

/* Dotyk: Rozpis jen na čtení přetahováním — bez úchytů pro změnu délky, klepnutí otevře úpravu */
@media (pointer: coarse) { .tl-h { display: none; } .tl-bar { cursor: pointer; } }
