/* Heimdall 2 – vlastní styly bez frameworku */

:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --border: #e3e6eb;
  --text: #171a21;
  --muted: #687082;
  --accent: #3b5bfd;
  --accent-soft: #e8ecff;
  --accent-text: #2a44d4;
  --ok: #12996b;
  --ok-soft: #e1f6ee;
  --warn: #b26a00;
  --warn-soft: #fff1d9;
  --danger: #d23b3b;
  --danger-soft: #fde7e7;
  --info: #0a7fa8;
  --info-soft: #e0f3fa;
  --shadow: 0 1px 2px rgb(16 24 40 / .05), 0 1px 3px rgb(16 24 40 / .06);
  --shadow-lg: 0 12px 32px -12px rgb(16 24 40 / .18);
  --radius: 14px;
  --radius-sm: 9px;
  --font: "Inter", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", ui-monospace, Consolas, monospace;
  --bifrost: linear-gradient(90deg, #ff8a5b, #ffd166, #7ee0c3, #3b5bfd);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1116;
    --surface: #161a21;
    --surface-2: #1d222b;
    --border: #2a303b;
    --text: #e8eaef;
    --muted: #8d95a5;
    --accent: #6f86ff;
    --accent-soft: #1f2849;
    --accent-text: #a6b4ff;
    --ok: #3ccf98;
    --ok-soft: #12302a;
    --warn: #f2b14c;
    --warn-soft: #33270f;
    --danger: #ff7171;
    --danger-soft: #3a1b1d;
    --info: #4cc3ec;
    --info-soft: #102d39;
    --shadow: 0 1px 2px rgb(0 0 0 / .4);
    --shadow-lg: 0 12px 32px -12px rgb(0 0 0 / .6);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 15px/1.5 var(--font);
  background: var(--bg);
  color: var(--text);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 1.75rem; font-weight: 700; }
h2 { font-size: 1rem; font-weight: 650; }
h3 { font-size: .9rem; font-weight: 650; }
p { margin: 0; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { width: min(1240px, 100% - 2rem); margin-inline: auto; }
.main { padding-block: 1.75rem 3rem; display: grid; gap: 1.25rem; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: .85em; }
.tnum, .num, .bigclock, .stat-value { font-variant-numeric: tabular-nums; }
.hint { color: var(--muted); font-size: .82rem; }
.empty { padding: 2rem; text-align: center; color: var(--muted); }
.icon { width: 18px; height: 18px; flex: none; }
.icon-sm { width: 14px; height: 14px; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar::before { content: ""; display: block; height: 3px; background: var(--bifrost); }
.topbar-in { display: flex; align-items: center; gap: 1.5rem; min-height: 60px; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--text); font-weight: 700; font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 9px; }
.brand small { display: block; font-size: .7rem; font-weight: 500; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.nav { display: flex; gap: .25rem; flex: 1; overflow-x: auto; }
.nav a {
  display: flex; align-items: center; gap: .45rem; white-space: nowrap;
  padding: .45rem .8rem; border-radius: 999px; color: var(--muted); font-weight: 550; font-size: .92rem;
}
.nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav a.is-active { background: var(--accent-soft); color: var(--accent-text); }
.me { display: flex; align-items: center; gap: .6rem; }
.me-name { font-weight: 550; font-size: .9rem; }
.icon-btn {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer;
}
.icon-btn:hover { color: var(--danger); border-color: var(--danger); }

@media (max-width: 760px) {
  .topbar-in { flex-wrap: wrap; gap: .5rem 1rem; padding-block: .5rem; }
  .nav { order: 3; flex-basis: 100%; }
  .nav a span { display: none; }
  .nav-single { display: none; }
  .nav a { padding: .5rem .7rem; }
  .me-name { display: none; }
  .me { margin-left: auto; }
}

.foot { padding: 1rem 0 2rem; color: var(--muted); font-size: .8rem; text-align: center; }

/* ---------- Avatary, badge, tečky ---------- */
.avatar {
  display: inline-grid; place-items: center; flex: none;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-text);
  font-weight: 700; font-size: .75rem; letter-spacing: .02em;
}
.avatar-sm { width: 26px; height: 26px; font-size: .65rem; }
.avatar-lg { width: 44px; height: 44px; font-size: .9rem; }
.avatar-xl { width: 64px; height: 64px; font-size: 1.2rem; }

.badge {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .12rem .55rem; border-radius: 999px; font-size: .74rem; font-weight: 600; white-space: nowrap;
  background: var(--surface-2); color: var(--muted);
}
.b-ok { background: var(--ok-soft); color: var(--ok); }
.b-warn { background: var(--warn-soft); color: var(--warn); }
.b-info { background: var(--info-soft); color: var(--info); }
.b-danger { background: var(--danger-soft); color: var(--danger); }
.b-accent { background: var(--accent-soft); color: var(--accent-text); }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); opacity: .6; }
.dot-live { background: var(--ok); opacity: 1; box-shadow: 0 0 0 0 var(--ok); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .dot-live { animation: none; } }

/* ---------- Tlačítka ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .6rem 1.05rem; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-weight: 600; font-size: .92rem; line-height: 1.2; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 88%, #000); }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-ghost.danger { color: var(--danger); }
.btn-ghost.danger:hover { background: var(--danger-soft); border-color: transparent; }
.btn-sm { padding: .38rem .7rem; font-size: .82rem; }
.btn-xl { padding: 1rem 1.6rem; font-size: 1.1rem; border-radius: 12px; }
.btn-xl .icon { width: 22px; height: 22px; }
.btn-block { width: 100%; }

/* ---------- Formuláře ---------- */
.stack { display: grid; gap: .9rem; }
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .75rem; }
.field { display: grid; gap: .35rem; }
.field > span { font-size: .82rem; font-weight: 600; color: var(--muted); }
.field small { font-weight: 400; }
input:not([type=checkbox]):not([type=radio]), select {
  width: 100%; padding: .6rem .75rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface); min-height: 42px; min-width: 0;
}
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 16px; height: 16px; }
.check { display: flex; align-items: center; gap: .55rem; cursor: pointer; font-size: .9rem; }
.inline-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: end; }
.inline-form label { display: grid; gap: .2rem; font-size: .75rem; color: var(--muted); font-weight: 600; }
.inline-form input, .inline-form select { min-height: 36px; padding: .4rem .55rem; }
.inline-form .grow { flex: 1 1 160px; }

/* ---------- Karty, mřížky ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.15rem 1.25rem; display: grid; gap: 1rem; align-content: start; min-width: 0;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.card-head h2 { display: flex; align-items: center; gap: .5rem; }
.card-collapsible > summary { cursor: pointer; list-style: none; }
.card-collapsible > summary::-webkit-details-marker { display: none; }
.card-collapsible > summary::after { content: "›"; font-size: 1.3rem; color: var(--muted); transition: transform .15s; line-height: 1; }
.card-collapsible[open] > summary::after { transform: rotate(90deg); }
.card-collapsible:not([open]) { gap: 0; }

.grid-main { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.25rem; align-items: start; }
.grid-side { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.side { display: grid; gap: 1.25rem; min-width: 0; }
.field { min-width: 0; }
@media (max-width: 1000px) {
  .grid-main, .grid-side { grid-template-columns: 1fr; }
}

.page-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.page-head .actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.eyebrow { color: var(--muted); font-size: .82rem; font-weight: 550; margin-bottom: .25rem; }
.eyebrow a { color: inherit; }
.who-head { display: flex; align-items: center; gap: 1rem; }
.status { display: flex; align-items: center; gap: .5rem; color: var(--muted); font-size: .92rem; margin-top: .35rem; flex-wrap: wrap; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem 1.1rem; box-shadow: var(--shadow); display: grid; gap: .15rem; }
.stat-label { color: var(--muted); font-size: .8rem; font-weight: 550; }
.stat-value { font-size: 1.55rem; font-weight: 700; letter-spacing: -.02em; }
.stat-value small { font-size: .85rem; font-weight: 550; color: var(--muted); }
.stat-warn { border-color: color-mix(in srgb, var(--warn) 45%, var(--border)); background: var(--warn-soft); }

/* ---------- Hlášky ---------- */
.flashes { display: grid; gap: .5rem; }
.flash, .notice {
  display: flex; align-items: center; gap: .65rem; padding: .75rem 1rem; border-radius: var(--radius-sm);
  font-weight: 550; font-size: .92rem; border: 1px solid transparent;
}
.flash { cursor: pointer; animation: slidein .25s ease-out; }
@keyframes slidein { from { opacity: 0; transform: translateY(-4px); } }
.flash-success { background: var(--ok-soft); color: var(--ok); }
.flash-error { background: var(--danger-soft); color: var(--danger); }
.flash-warning, .notice-warning { background: var(--warn-soft); color: var(--warn); }
.flash-info, .notice-info { background: var(--info-soft); color: var(--info); }
.notice span { color: var(--text); font-weight: 450; }
.review { display: block; }
.review > summary { display: flex; align-items: center; gap: .65rem; cursor: pointer; list-style: none; }
.review > summary::-webkit-details-marker { display: none; }
.review-list { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .25rem; }
.review-list a {
  display: flex; align-items: center; gap: .6rem; padding: .45rem .6rem; border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 70%, transparent); color: var(--text); font-weight: 450;
}
.review-list a:hover { background: var(--surface); text-decoration: none; }
.review-list .muted { margin-left: auto; font-variant-numeric: tabular-nums; }

/* ---------- Tabulky ---------- */
.table-wrap { overflow-x: auto; margin-inline: -1.25rem; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: .55rem 1.25rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table thead th { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; background: var(--surface-2); }
.table tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.table tfoot th, .table tfoot td { border-bottom: 0; font-size: .95rem; padding-top: .8rem; }
.table .num { text-align: right; white-space: nowrap; }
.table tr.is-off td { color: var(--muted); }
.who-cell { display: inline-flex; align-items: center; gap: .55rem; color: var(--text); font-weight: 550; }

.month .col-day { width: 1%; white-space: nowrap; }
.month tr.is-off { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.month tr.is-today { box-shadow: inset 3px 0 0 var(--accent); }
.month tr.is-future td { opacity: .55; }
.day-num { display: inline-block; min-width: 2.2ch; font-weight: 700; font-variant-numeric: tabular-nums; }
.day-name { color: var(--muted); margin-right: .35rem; display: inline-block; width: 2ch; }
.events { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.event {
  display: inline-flex; align-items: center; gap: .45rem; padding: .22rem .6rem; border-radius: 8px;
  background: var(--surface-2); font-variant-numeric: tabular-nums; font-size: .86rem; font-weight: 550;
}
.event .note { color: var(--muted); font-weight: 450; max-width: 18ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event.is-open { background: var(--ok-soft); color: var(--ok); }
.event.is-bad { background: var(--danger-soft); color: var(--danger); }
.event-add { color: var(--muted); padding: .22rem .4rem; opacity: 0; transition: opacity .15s; }
tr:hover .event-add, .event-edit.add[open] .event-add { opacity: 1; }
@media (hover: none) { .event-add { opacity: 1; } }
.event-edit > summary { list-style: none; cursor: pointer; }
.event-edit > summary::-webkit-details-marker { display: none; }
.event-edit > summary .icon { opacity: .45; }
.event-edit > summary:hover { outline: 1px solid var(--border); }
.event-edit[open] { flex-basis: 100%; }
.month tr, .event-edit { scroll-margin-top: 110px; }
.event-edit:target > summary, tr:target { animation: flash-target 2.4s ease-out; }
.event-edit:target[open] > form { box-shadow: 0 0 0 2px var(--danger); }
@keyframes flash-target { 0%, 40% { background: var(--warn-soft); } }
.stat-link { color: inherit; }
.stat-link:hover { text-decoration: none; border-color: var(--warn); }
.event-edit[open] > form { margin-top: .5rem; padding: .75rem; background: var(--surface-2); border-radius: var(--radius-sm); }

/* ---------- Výběr období ---------- */
.period { display: grid; gap: .5rem; }
.pills { display: flex; flex-wrap: wrap; gap: .3rem; }
.pill {
  padding: .3rem .7rem; border-radius: 999px; font-size: .82rem; font-weight: 600;
  color: var(--muted); background: var(--surface-2); border: 1px solid transparent;
}
.pill:hover { color: var(--text); text-decoration: none; border-color: var(--border); }
.pill.is-active { background: var(--accent); color: #fff; }

/* ---------- Seznamy ---------- */
.list, .checklist, .taglist { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .45rem 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.list li:last-child { border-bottom: 0; }
.list a { display: flex; align-items: center; gap: .5rem; color: var(--text); }
.checklist { display: grid; gap: .1rem; max-height: 320px; overflow-y: auto; margin: .25rem 0 .75rem; }
.checklist li { padding: .3rem .25rem; border-radius: 6px; font-variant-numeric: tabular-nums; }
.checklist li:hover { background: var(--surface-2); }
.check-all { font-weight: 600; color: var(--muted); font-size: .82rem; }
.taglist { display: flex; flex-wrap: wrap; gap: .35rem; }
.tag { padding: .25rem .6rem; border-radius: 8px; background: var(--warn-soft); color: var(--warn); font-size: .82rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.tag.is-past { background: var(--surface-2); color: var(--muted); }

/* ---------- Píchačka (dashboard) ---------- */
.clock-card {
  position: relative; overflow: hidden;
  display: flex; justify-content: space-between; align-items: center; gap: 2rem; flex-wrap: wrap;
  padding: 1.75rem 2rem; border-radius: 20px; border: 1px solid var(--border);
  background:
    radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 55%),
    var(--surface);
  box-shadow: var(--shadow-lg);
}
.clock-card.is-in {
  background:
    radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--ok) 16%, transparent), transparent 55%),
    var(--surface);
}
.clock-card h1 { font-size: 2rem; }
.clock-action { display: grid; gap: 1rem; justify-items: end; }
.clock-form { display: grid; gap: .9rem; justify-items: end; }
.bigclock { font-size: 3.2rem; font-weight: 750; letter-spacing: -.03em; line-height: 1; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: flex-end; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block; padding: .35rem .8rem; border-radius: 999px; font-size: .84rem; font-weight: 600;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer;
}
.chip input:checked + span { background: var(--text); color: var(--surface); border-color: var(--text); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 700px) {
  .clock-card { padding: 1.4rem; }
  .clock-action, .clock-form { justify-items: stretch; width: 100%; }
  .chips { justify-content: flex-start; }
  .bigclock { font-size: 2.6rem; }
}

/* ---------- Přehled vedoucího ---------- */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.person {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); display: grid; overflow: hidden; transition: border-color .15s, box-shadow .15s;
}
.person:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); box-shadow: var(--shadow-lg); }
.person.is-in { border-top: 3px solid var(--ok); }
.person-main { display: flex; gap: .85rem; align-items: center; padding: 1rem 1.1rem; color: var(--text); }
.person-main:hover { text-decoration: none; }
.person-text { display: grid; gap: .3rem; justify-items: start; }
.person-foot { display: flex; justify-content: space-between; align-items: center; padding: .6rem 1.1rem; background: var(--surface-2); font-size: .85rem; }

/* ---------- Roční kalendář dovolených ---------- */
.legend { display: flex; flex-wrap: wrap; gap: 1rem; font-size: .8rem; color: var(--muted); margin-bottom: .75rem; }
.legend span { display: inline-flex; align-items: center; gap: .4rem; }
.sw { display: inline-block; width: 14px; height: 14px; border-radius: 4px; }
.sw-weekend { background: var(--surface-2); border: 1px solid var(--border); }
.sw-holiday { background: var(--info-soft); border: 1px solid var(--info); }
.sw-vacation { background: var(--warn-soft); border: 1px solid var(--warn); }
.sw-today { box-shadow: inset 0 0 0 2px var(--accent); }
.months { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.mcal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem; box-shadow: var(--shadow); }
.mcal h3 { margin-bottom: .6rem; }
.mcal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.mcal-h { text-align: center; font-size: .66rem; color: var(--muted); font-weight: 650; padding-bottom: .15rem; }
.mcal-d {
  aspect-ratio: 1 / 1.05; border-radius: 6px; display: grid; align-content: center; justify-items: center;
  font-size: .76rem; font-variant-numeric: tabular-nums; position: relative; cursor: default;
  min-width: 0; overflow: hidden; padding: 0 2px;
}
.mcal-d b { font-weight: 550; }
.mcal-d.is-weekend { background: var(--surface-2); color: var(--muted); }
.mcal-d.is-holiday { background: var(--info-soft); color: var(--info); font-weight: 700; }
.mcal-d.has-people { background: var(--warn-soft); color: var(--warn); }
.mcal-d.is-today { box-shadow: inset 0 0 0 2px var(--accent); }
.mcal-d .who { display: block; max-width: 100%; font-style: normal; font-size: .54rem; font-weight: 750; line-height: 1.05; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Přihlášení / chyby ---------- */
body.bare { min-height: 100dvh; }
.auth {
  min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 1rem; padding: 1.5rem;
  background:
    radial-gradient(60% 50% at 20% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent),
    radial-gradient(50% 40% at 100% 100%, color-mix(in srgb, #0e9f8e 14%, transparent), transparent),
    var(--bg);
}
.auth-card {
  width: min(400px, calc(100vw - 2rem)); background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 2rem; box-shadow: var(--shadow-lg); display: grid; gap: 1.4rem;
}
.auth-card.center { text-align: center; justify-items: center; }
.auth-brand { display: flex; gap: .9rem; align-items: center; }
.auth-brand img { border-radius: 13px; }
.auth-brand h1 { font-size: 1.5rem; }
.auth-brand p { color: var(--muted); font-size: .88rem; }
.auth-alt { display: inline-flex; gap: .4rem; align-items: center; color: var(--muted); font-size: .88rem; }
.err-code { font-size: 4rem; font-weight: 800; letter-spacing: -.04em; background: var(--bifrost); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }
.lead { font-size: 1.05rem; }

/* ---------- Kiosek ---------- */
body.kiosk-body { background: #0b0e13; color: #eef1f6; color-scheme: dark;
  --surface: #151a22; --surface-2: #1d232d; --border: #2a313d; --text: #eef1f6; --muted: #8d97a8;
  --accent: #6f86ff; --accent-soft: #1f2849; --ok: #3ccf98; --ok-soft: #12302a; --danger: #ff7171; --danger-soft: #3a1b1d; --warn: #f2b14c;
}
.kiosk { min-height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; padding: 1.5rem 2rem 2rem; gap: 1.5rem;
  background: radial-gradient(70% 60% at 50% 0%, rgb(59 91 253 / .18), transparent 70%); }
.kiosk::before { content: ""; position: fixed; inset: 0 0 auto; height: 4px; background: var(--bifrost); }
.kiosk-head { display: flex; justify-content: space-between; align-items: center; }
.kiosk-head .brand { color: var(--text); font-size: 1.2rem; }
.kiosk-time { text-align: right; }
.kiosk-time .bigclock { font-size: 2.6rem; }
.kiosk-center { align-self: center; justify-self: center; width: min(560px, 100%); display: grid; gap: 1.75rem; justify-items: center; text-align: center; }
.kiosk-title { font-size: 1.6rem; font-weight: 600; color: var(--muted); }
.kiosk-result { width: 100%; display: grid; gap: 1.25rem; justify-items: center; animation: slidein .2s ease-out; }
.kiosk.has-result .keypad { display: none; }
.kiosk.has-result .kiosk-form input { font-size: 1.2rem !important; min-height: 54px !important; letter-spacing: .2em; opacity: .85; }
.kiosk-result.is-note::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233ccf98' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
.kiosk-form { display: grid; gap: 1rem; width: min(360px, 100%); }
.kiosk-form input {
  text-align: center; font-size: 2rem !important; letter-spacing: .4em; min-height: 70px !important;
  background: var(--surface) !important; border-radius: 16px !important;
}
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.key {
  min-height: 74px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface);
  font-size: 1.6rem; font-weight: 650; cursor: pointer; transition: background .1s, transform .05s;
}
.key:active { transform: scale(.97); background: var(--surface-2); }
.key-muted { font-size: 1rem; color: var(--muted); }
.key-go { background: var(--accent); border-color: var(--accent); color: #fff; font-size: 1.2rem; }
.kiosk-result h1 { font-size: 2.6rem; }
.kiosk-result p { font-size: 1.2rem; color: var(--muted); }
.kiosk-result strong { color: var(--text); }
.kiosk-result::before {
  content: ""; width: 96px; height: 96px; border-radius: 50%; display: block;
  background: var(--ok-soft) center / 48px no-repeat;
  box-shadow: 0 0 0 10px color-mix(in srgb, var(--ok) 12%, transparent);
}
.kiosk-result.is-in::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233ccf98' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
.kiosk-result.is-out::before { background-color: var(--accent-soft); box-shadow: 0 0 0 10px rgb(111 134 255 / .12);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236f86ff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h4.5A1.5 1.5 0 0 1 20 5.5v13a1.5 1.5 0 0 1-1.5 1.5H14M10 8l-4 4 4 4M6 12h10'/%3E%3C/svg%3E"); }
.kiosk-result.is-error::before { background-color: var(--danger-soft); box-shadow: 0 0 0 10px rgb(255 113 113 / .12);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ff7171' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7 7 17'/%3E%3C/svg%3E"); }
.kiosk-notes { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; width: 100%; }
.kiosk-notes form:not(.kiosk-other) .btn { width: 100%; }
.kiosk-other { grid-column: 1 / -1; display: flex; gap: .6rem; }
.kiosk-other input { min-height: 58px !important; font-size: 1.1rem; }
.kiosk-foot { display: flex; justify-content: center; }
.kiosk-login {
  display: inline-flex; align-items: center; gap: .5rem; padding: .65rem 1.2rem; border-radius: 999px;
  color: var(--muted); border: 1px solid var(--border); font-weight: 600; font-size: .95rem;
}
.kiosk-login:hover { color: var(--text); background: var(--surface); text-decoration: none; }
.kiosk-warn { color: var(--warn) !important; font-size: 1rem !important; }
