:root {
    color-scheme: light;
    --bg: #eceafb;
    --surface: #ffffff;
    --surface-2: #f1effd;
    --text: #1b1848;
    --muted: #62607f;
    --border: #e1dff1;
    --field-border: #cfcce3;
    --accent: #3a31b4;
    --accent-hover: #2e2696;
    --accent-text: #ffffff;
    --accent-soft: #e5e2fb;
    --ok: #14742f;
    --ok-dot: #22a447;
    --ok-soft: #dcf5e3;
    --open: #1a4fb8;
    --open-dot: #2563eb;
    --open-soft: #dbe8fd;
    --warn: #8a4b00;
    --warn-soft: #fdeed3;
    --err: #a3221b;
    --err-soft: #fbe3e1;
    --off: #55536b;
    --off-dot: #8a889d;
    --off-soft: #ecebf2;
    --radius: 16px;
    --tabbar-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
    margin: 0;
    background: var(--surface);
    color: var(--text);
    font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    -webkit-text-size-adjust: 100%;
}
body.guest { background: var(--bg); }

h1 { font-size: 1.75rem; line-height: 1.2; margin: 0; }
h2 { font-size: 1.15rem; line-height: 1.3; margin: 0; }
h3 { font-size: 1rem; margin: 0; }
p { margin: 0; }
a { color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.nowrap { white-space: nowrap; }
svg.ico { width: 22px; height: 22px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Rozvržení: na telefonu horní lišta a spodní záložky, na širší obrazovce boční menu. */
.app { min-height: 100dvh; }
.side { display: flex; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; white-space: nowrap; color: var(--text); text-decoration: none; }
.brand svg { width: 28px; height: 28px; color: var(--accent); }

.container {
    max-width: 1040px;
    min-width: 0;
    padding: 20px 16px calc(var(--tabbar-h) + 32px + env(safe-area-inset-bottom));
    display: grid;
    gap: 16px;
    align-content: start;
}
.guest .container { max-width: 400px; margin: 0 auto; padding-top: 12vh; }

.nav {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 10;
    display: flex;
    gap: 4px;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: var(--surface);
    border-top: 1px solid var(--border);
}
.nav a {
    flex: 1;
    min-width: 0;
    min-height: calc(var(--tabbar-h) - 12px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border-radius: 12px;
    font-size: .75rem;
    color: var(--text);
    text-decoration: none;
}
.nav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

@media (min-width: 760px) {
    body { background: var(--bg); padding: 20px; }
    .app { display: grid; grid-template-columns: 224px minmax(0, 1fr); max-width: 1240px; min-height: calc(100dvh - 40px); margin: 0 auto; background: var(--surface); border-radius: 24px; overflow: hidden; box-shadow: 0 12px 40px rgb(58 49 180 / .08); }
    .side { flex-direction: column; align-items: stretch; gap: 4px; padding: 24px 12px; border-bottom: 0; border-right: 1px solid var(--border); }
    .side .brand { padding: 0 10px 20px; }
    .nav { position: static; flex: 1; flex-direction: column; padding: 0; border: 0; background: none; }
    .nav a { flex: none; flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 0; padding: 11px 12px; font-size: 1rem; }
    .nav a:hover { background: var(--surface-2); }
    .nav a.active:hover { background: var(--accent-soft); }
    .nav a.end { margin-top: auto; }
    .container { padding: 28px 28px 40px; }
    .guest .container { padding-top: 12vh; }
}

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.head-tools { display: flex; gap: 8px; flex-wrap: wrap; }

/* Karty a řádky */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    display: grid;
    gap: 12px;
}
.rows { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.rows > li + li { border-top: 1px solid var(--border); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; color: inherit; text-decoration: none; }
a.row:hover { background: var(--surface-2); }
.row-main { min-width: 0; display: grid; gap: 2px; }
.row-main strong { overflow-wrap: anywhere; }
.row-side { text-align: right; flex-shrink: 0; display: grid; gap: 2px; justify-items: end; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 16px 12px; }
.empty { padding: 24px 16px; text-align: center; color: var(--muted); }

.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .75rem; font-weight: 600; background: var(--off-soft); color: var(--off); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.err { background: var(--err-soft); color: var(--err); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }

.flash { padding: 12px 16px; border-radius: 12px; font-weight: 500; }
.flash.ok { background: var(--ok-soft); color: var(--ok); }
.flash.err { background: var(--err-soft); color: var(--err); }
.notice { padding: 12px 16px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); }

/* Tlačítka a formuláře */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--field-border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.danger { color: var(--err); border-color: var(--err); }
.btn.block { width: 100%; }
.btn.lg { min-height: 52px; padding: 0 22px; font-size: 1.05rem; }
.btn.sm { min-height: 40px; padding: 0 12px; font-size: .875rem; }
.btn.icon { width: 44px; padding: 0; }
.btn[disabled] { opacity: .5; cursor: default; }
.link { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

.form { display: grid; gap: 14px; }
.field { display: grid; gap: 4px; }
.field > label, .field > span.label { font-weight: 600; font-size: .9rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=search], input[type=date], input[type=time], input[type=datetime-local], select, textarea {
    width: 100%;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid var(--field-border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.check { display: flex; align-items: center; gap: 8px; }
/* Zaškrtávátko ve vzhledu aplikace, ne prohlížeče. */
.check input { appearance: none; -webkit-appearance: none; flex: none; width: 22px; height: 22px; margin: 0; border: 1px solid var(--field-border); border-radius: 7px; background: var(--surface); display: inline-grid; place-content: center; cursor: pointer; }
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { content: ""; width: 11px; height: 6px; border: solid var(--accent-text); border-width: 0 0 2px 2px; transform: translate(0, -1px) rotate(-45deg); }
.hint { font-size: .85rem; color: var(--muted); }
.error { font-size: .85rem; color: var(--err); font-weight: 500; }

.tabs { display: flex; gap: 4px; background: var(--surface-2); border-radius: 12px; padding: 4px; width: fit-content; max-width: 100%; }
.tabs a { padding: 6px 14px; border-radius: 9px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .9rem; white-space: nowrap; }
.tabs a.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgb(27 24 72 / .12); }

/* Rozpis */
.weekbar { display: grid; grid-template-columns: 36px repeat(7, 1fr) 36px; gap: 4px; align-items: stretch; }
.weekbar a { display: grid; place-items: center; padding: 6px 0; border-radius: 12px; text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--border); }
.weekbar a.day { grid-template-rows: auto auto; line-height: 1.2; }
.weekbar a.day span { font-size: .7rem; text-transform: uppercase; color: var(--muted); }
.weekbar a.today { border-color: var(--accent); }
.weekbar a.active { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.weekbar a.active span { color: inherit; }

.lane { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; display: grid; gap: 8px; }
.lane-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.track { position: relative; height: 34px; border-radius: 8px; background: var(--surface-2); overflow: hidden; }
.track .tick { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--border); }
.track .now { position: absolute; top: 0; bottom: 0; width: 2px; background: #cf3a30; z-index: 2; }
.track .block { position: absolute; top: 3px; bottom: 3px; border-radius: 6px; background: var(--accent); color: var(--accent-text); font-size: .75rem; font-weight: 600; padding: 0 6px; display: flex; align-items: center; overflow: hidden; white-space: nowrap; text-decoration: none; z-index: 1; }
.scale { position: relative; height: 16px; font-size: .7rem; color: var(--muted); }
.scale span { position: absolute; transform: translateX(-50%); }
.scale span:first-child { transform: none; }
.scale span:last-child { transform: translateX(-100%); }
.lane-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: .9rem; }
.lane-list a { display: flex; gap: 8px; color: inherit; text-decoration: none; }
.lane-list a:hover strong { text-decoration: underline; }

/* Kód pronájmu */
.code { font: 700 2.4rem/1.1 ui-monospace, "SF Mono", Consolas, monospace; letter-spacing: .12em; overflow-wrap: anywhere; }
.code.off { text-decoration: line-through; color: var(--muted); }
.code-card { text-align: center; justify-items: center; }
dl.meta { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; }
dl.meta dt { color: var(--muted); }
dl.meta dd { margin: 0; overflow-wrap: anywhere; }

.battery { width: 72px; height: 8px; border-radius: 4px; background: var(--off-soft); overflow: hidden; }
.battery i { display: block; height: 100%; background: var(--ok-dot); }
.battery.warn i { background: #d98200; }
.battery.low i { background: #cf3a30; }

/* Přehled dveří */
.filters { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .filters.with-group { grid-template-columns: minmax(0, 1fr) 200px; } }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px; margin: -2px; scrollbar-width: none; }
.chip { flex-shrink: 0; min-height: 40px; padding: 0 14px; border: 1px solid var(--field-border); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; }
.chip b { margin-left: 4px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chip[aria-pressed=true] { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.chip[aria-pressed=true] b { color: inherit; }

.door-group { display: grid; gap: 10px; }
.group-title { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; }
.group-title span { font-size: .875rem; font-weight: 500; color: var(--muted); }
.doors { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.tile { display: flex; align-items: center; gap: 6px; padding: 6px 8px 6px 6px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.tile[data-state=unlocked] { border-color: var(--open-dot); background: #f6f9ff; }
.tile-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 10px; color: inherit; text-decoration: none; }
.tile-main:hover { background: var(--surface-2); }
.tile-ico { flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--off-soft); color: var(--off); }
.tile[data-state=locked] .tile-ico { background: var(--ok-soft); color: var(--ok); }
.tile[data-state=unlocked] .tile-ico { background: var(--open-soft); color: var(--open); }
.tile-text { min-width: 0; display: grid; }
.tile-name { font-weight: 650; line-height: 1.25; overflow-wrap: anywhere; }
.tile-sub { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.tile-sub.warn { color: var(--warn); font-weight: 600; }
.tile-sub.low { color: var(--err); font-weight: 600; }
.no-match { padding: 32px 16px; border: 1px dashed var(--field-border); border-radius: 14px; text-align: center; color: var(--muted); display: grid; gap: 12px; justify-items: center; }

.pill { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 999px; font-weight: 700; background: var(--off-soft); color: var(--off); }
.pill i { width: 10px; height: 10px; border-radius: 50%; background: var(--off-dot); }
.pill.locked { background: var(--ok-soft); color: var(--ok); }
.pill.locked i { background: var(--ok-dot); }
.pill.unlocked { background: var(--open-soft); color: var(--open); }
.pill.unlocked i { background: var(--open-dot); }

/* Okno jedněch dveří */
dialog { color: var(--text); }
dialog::backdrop { background: rgb(27 24 72 / .45); }
dialog.detail { width: min(880px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: 24px; background: var(--surface); overflow: hidden; }
dialog.detail[open] { display: flex; flex-direction: column; }
#door-content { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.detail-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.detail-head h2 { font-size: 1.5rem; line-height: 1.2; overflow-wrap: anywhere; }
.detail-body { flex: 1; min-height: 0; overflow-y: auto; padding: 20px; display: grid; gap: 14px; grid-template-columns: repeat(6, minmax(0, 1fr)); align-items: start; align-content: start; }
.detail-body > .flash { grid-column: 1 / -1; }
.panel { grid-column: span 3; border: 1px solid var(--border); border-radius: 16px; padding: 16px; display: grid; gap: 12px; align-content: start; }
.panel.wide { grid-column: span 4; }
.panel.narrow { grid-column: span 2; }
.panel.full { grid-column: 1 / -1; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (max-width: 759px) {
    dialog.detail { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
    .detail-body { grid-template-columns: minmax(0, 1fr); padding: 16px; }
    .panel, .panel.wide, .panel.narrow { grid-column: 1 / -1; }
}

.hero { border: 0; background: var(--surface-2); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px; }
.hero[data-state=unlocked] { background: #eaf1fe; }
.hero-text { display: grid; gap: 10px; justify-items: start; min-width: 0; }
.hero-note { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: .875rem; color: var(--muted); }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.ring { flex-shrink: 0; width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center; border: 6px solid #c9c4f3; background: #e2defa; color: #2a2385; }
.hero[data-state=unlocked] .ring { border-color: #a9c5f8; background: #d6e4fd; color: var(--open); }
.hero[data-state=offline] .ring, .hero[data-state=nogw] .ring { border-color: #d5d3e0; background: var(--off-soft); color: var(--off); }
.ring svg { width: 52px; height: 52px; }
@media (max-width: 480px) { .ring { width: 80px; height: 80px; border-width: 5px; } .ring svg { width: 38px; height: 38px; } }

.big { font-size: 1.9rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.bar { height: 10px; border-radius: 5px; background: var(--off-soft); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 5px; background: var(--ok-dot); }
.bar.warn i { background: #d98200; }
.bar.low i { background: #cf3a30; }
.conn { display: flex; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.conn i { flex-shrink: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--off-dot); }
.conn.on i { background: var(--ok-dot); }

.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; }
.list > li:first-child { padding-top: 0; }
.list > li:last-child { padding-bottom: 0; }
.list > li + li { border-top: 1px solid var(--border); }
.list .main-col { min-width: 0; display: grid; overflow-wrap: anywhere; }
.list .side-col { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.list .with-dot { display: flex; align-items: center; gap: 12px; min-width: 0; }
.list .dot { flex-shrink: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--off-dot); }
.list .dot.ok { background: var(--ok-dot); }
.list .dot.open { background: var(--open-dot); }
.list .dot.err { background: #cf3a30; }
.time { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pin { font: 700 1.05rem/1.2 ui-monospace, "SF Mono", Consolas, monospace; letter-spacing: .08em; white-space: nowrap; }
.result { padding: 12px 14px; border-radius: 12px; background: var(--ok-soft); color: var(--ok); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.result .pin { display: block; font-size: 1.4rem; color: var(--text); }

.setting { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.setting > div { min-width: 0; display: grid; }
.setting-form { display: flex; gap: 8px; }
.setting-form select, .setting-form input { min-width: 0; }
.switch { flex-shrink: 0; width: 52px; height: 32px; padding: 3px; border: 0; border-radius: 999px; background: #b9b6d0; cursor: pointer; }
.switch::after { content: ""; display: block; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: transform .15s; }
.switch[aria-checked=true] { background: var(--accent); }
.switch[aria-checked=true]::after { transform: translateX(20px); }
.switch[disabled] { opacity: .5; cursor: default; }
@media (prefers-reduced-motion: reduce) { .switch::after { transition: none; } }

/* Přístupy: čipy, eKlíče, kódy a otisky */
.access-grid { display: grid; gap: 20px 28px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); align-items: start; }
.access-group { display: grid; gap: 10px; align-content: start; min-width: 0; }
.access-group h4 { margin: 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); display: flex; align-items: baseline; gap: 8px; }
.access-group h4 span { padding: 0 8px; border-radius: 999px; background: var(--surface-2); color: var(--text); letter-spacing: 0; font-variant-numeric: tabular-nums; }
.list > li.access-row:has(details) { display: block; }
.access-row summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; list-style: none; cursor: pointer; border-radius: 8px; }
.access-row summary::-webkit-details-marker { display: none; }
.access-row .chev { flex-shrink: 0; color: var(--muted); transition: transform .15s; }
.access-row details[open] .chev { transform: rotate(180deg); }
.access-edit { display: grid; gap: 10px; margin-top: 10px; padding: 14px; border-radius: 12px; background: var(--surface-2); }
.access-add > summary { list-style: none; width: fit-content; }
.access-add > summary::-webkit-details-marker { display: none; }
.access-add[open] > summary { margin-bottom: 10px; }
.access-add > .form { padding: 14px; border-radius: 12px; background: var(--surface-2); }
.tag { flex-shrink: 0; padding: 2px 8px; border-radius: 999px; background: var(--off-soft); color: var(--off); font-size: .78rem; font-weight: 700; white-space: nowrap; }
.tag.err { background: var(--err-soft); color: var(--err); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
@media (max-width: 420px) { .access-edit .field-row, .access-add .field-row { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .access-row .chev { transition: none; } }

dialog.confirm { width: min(400px, calc(100vw - 32px)); padding: 20px; border: 0; border-radius: 20px; background: var(--surface); }
dialog.confirm form { display: grid; gap: 12px; }
dialog.confirm .actions { justify-content: flex-end; }


.center { text-align: center; }

/* Zvoneček oznámení v pravém horním rohu obsahu. */
.container { position: relative; }
.bell { position: absolute; top: 14px; right: 14px; z-index: 5; }
.bell:empty { display: none; }
.app .container > h1:first-of-type, .app .container > .page-head { padding-right: 48px; }
@media (min-width: 760px) { .bell { top: 24px; right: 24px; } }

/* Roletka: vlastní seznam místo systémového (public/js/vyber.js, barvy pro public/css/vyber.css). */
:root {
    --gray-50: var(--surface-2); --gray-100: var(--surface-2); --gray-200: var(--border); --gray-500: var(--muted);
    --gray-700: var(--text); --gray-900: var(--text); --gray-950: var(--text);
    --primary-400: var(--accent); --primary-600: var(--accent);
}
.simren-vyber { min-height: 44px; padding: 8px 10px 8px 12px; border: 1px solid var(--field-border); border-radius: 12px; background: var(--surface); color: var(--text); font-size: 1rem; }
.simren-vyber:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.simren-vyber-panel { border-radius: 12px; font-size: .95rem; }
.simren-vyber-moznost { padding: 9px 10px; border-radius: 8px; }

/* Výběr data a času (public/js/datum.js). */
.datum { position: relative; display: block; min-width: 0; }
.datum-pole { width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--field-border); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.datum-pole.je-prazdne { color: var(--muted); }
.datum-pole.je-chyba { border-color: var(--err); }
.datum-panel { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; width: 292px; max-width: calc(100vw - 32px); padding: 12px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: 0 12px 32px rgb(27 24 72 / .18); }
.datum-panel.vpravo { left: auto; right: 0; }
.datum-panel button { border: 0; border-radius: 9px; background: none; color: var(--text); font: inherit; cursor: pointer; }
.datum-panel button:hover { background: var(--surface-2); }
.datum-panel button[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); font-weight: 600; }
.datum-hlava { display: grid; grid-template-columns: 36px 1fr 36px; align-items: center; text-align: center; margin-bottom: 6px; }
.datum-hlava button { height: 36px; font-size: 1.2rem; }
.datum-hlava strong { text-transform: capitalize; font-size: .95rem; }
.datum-dny { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.datum-dny span { text-align: center; font-size: .75rem; color: var(--muted); padding: 4px 0; }
.datum-dny button { height: 36px; font-size: .9rem; }
.datum-dny button.je-dnes:not([aria-pressed="true"]) { box-shadow: inset 0 0 0 1px var(--accent); }
.datum-cas { display: grid; gap: 4px; }
.datum-dny + .datum-cas { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.datum-cas > span { font-size: .75rem; color: var(--muted); }
.datum-hodiny { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.datum-minuty { display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px; }
.datum-cas button { height: 32px; font-size: .85rem; font-variant-numeric: tabular-nums; }
.datum-pata { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; }
.datum-pata button { padding: 8px 12px; font-weight: 600; color: var(--accent); }
.datum-pata .datum-hotovo { background: var(--accent-soft); }
