/* Koupaliště: pool-deck design system. Tokens first, then base, then components. */

@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("../fonts/barlow-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("../fonts/barlow-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url("../fonts/barlow-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url("../fonts/barlow-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url("../fonts/barlow-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url("../fonts/barlow-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-weight: 700; font-display: swap; src: url("../fonts/barlow-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow"; font-weight: 700; font-display: swap; src: url("../fonts/barlow-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url("../fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url("../fonts/barlow-condensed-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url("../fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url("../fonts/barlow-condensed-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
    /* Pool tile */
    --tile: #eef3f3;           /* page ground */
    --tile-line: #dde7e8;      /* grout */
    --deck: #ffffff;           /* raised surfaces: tables, forms */
    --deck-2: #f6f9f9;         /* zebra / subtle fill */
    --rule: #c9d6d8;           /* 1px dividers */
    --rule-strong: #14191d;    /* ink rule */

    /* Shell: deep pool teal */
    --pool: #0a4f66;
    --pool-deep: #073a4b;
    --pool-ink: #e8f4f6;       /* text on pool */
    --pool-ink-2: #a9d0d9;     /* secondary text on pool */
    --pool-wash: #dceef2;      /* light teal fill */

    /* Ink */
    --ink: #14191d;
    --ink-2: #44525a;          /* secondary, 7.9:1 on tile */
    --ink-3: #5d6b73;          /* tertiary, 5.2:1 on tile */

    /* Lifeguard orange: primary action and "yours" */
    --buoy: #ff6b2c;
    --buoy-hover: #ff8148;
    --buoy-ink: #14191d;       /* ink on buoy, 7.4:1 */
    --buoy-wash: #ffe7dc;
    --buoy-text: #b23d0a;      /* orange as text on light, 5.0:1 */

    /* Occupancy states (always paired with a label and a meter form) */
    --free: #1d7a4a;
    --free-wash: #ddf1e5;
    --busy: #9a6500;
    --busy-fill: #e8a317;
    --busy-wash: #fbefd3;
    --full: #b8242b;
    --full-wash: #fbe0e1;

    --focus: #ff6b2c;

    --font-ui: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-paint: "Barlow Condensed", "Barlow", system-ui, sans-serif;

    --r: 4px;                  /* tile corner, used everywhere */
    --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
    --shell-h: 64px;
    --maxw: 1280px;
    --shadow: 0 1px 2px rgb(10 79 102 / .08), 0 4px 12px rgb(10 79 102 / .06);
    --ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font-ui);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--ink);
    background-color: var(--tile);
    /* tile grid on the ground only */
    background-image:
        linear-gradient(var(--tile-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--tile-line) 1px, transparent 1px);
    background-size: 32px 32px;
    background-position: -1px -1px;
    font-variant-numeric: lining-nums;
    -webkit-font-smoothing: antialiased;
}
::selection { background: var(--buoy); color: var(--buoy-ink); }
input, textarea { caret-color: var(--buoy-text); }
* { scrollbar-color: var(--rule) transparent; }

h1, h2, h3 { font-family: var(--font-paint); font-weight: 700; line-height: 1.05; letter-spacing: 0; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); text-transform: uppercase; }
h2 { font-size: 1.5rem; text-transform: uppercase; }
h3 { font-size: 1.25rem; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--pool); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--pool-deep); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
h1:focus { outline: none; }
.num { font-variant-numeric: tabular-nums lining-nums; }
.muted { color: var(--ink-2); }
.small { font-size: .875rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ph { font-size: 1.25em; line-height: 1; vertical-align: -0.2em; }

/* Patička vždy dole, i na krátkých stránkách */
#app { min-height: 100dvh; display: flex; flex-direction: column; }
#app > main { flex: 1; }

/* ---------- Shell ---------- */
.shell { position: sticky; top: 0; z-index: 20; background: var(--pool); color: var(--pool-ink); border-bottom: 4px solid var(--pool-deep); }
.shell-inner { max-width: var(--maxw); margin: 0 auto; height: var(--shell-h); padding: 0 var(--s5); display: flex; align-items: center; gap: var(--s6); }
.wordmark { display: flex; align-items: center; gap: var(--s2); color: var(--pool-ink); text-decoration: none; font-family: var(--font-paint); font-weight: 700; font-size: 1.625rem; letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; }
.wordmark:hover { color: #fff; text-decoration: none; }
.wordmark-mark { width: 28px; height: 28px; display: grid; place-items: center; background: var(--buoy); color: var(--buoy-ink); border-radius: var(--r); font-size: 1rem; }
.shell-nav { display: flex; align-items: stretch; height: 100%; gap: var(--s1); flex: 1; min-width: 0; }
.shell-nav a { display: flex; align-items: center; gap: var(--s2); padding: 0 var(--s3); color: var(--pool-ink-2); text-decoration: none; font-weight: 600; white-space: nowrap; border-bottom: 4px solid transparent; margin-bottom: -4px; }
.shell-nav a:hover { color: #fff; }
.shell-nav a.active { color: #fff; border-bottom-color: var(--buoy); }
.shell-end { display: flex; align-items: center; gap: var(--s3); margin-left: auto; }
.shell-user { color: var(--pool-ink-2); font-size: .875rem; text-align: right; line-height: 1.2; }
.shell-user strong { display: block; color: var(--pool-ink); font-weight: 600; font-size: 1rem; }
.shell-toggle { display: none; background: none; border: 1px solid var(--pool-ink-2); color: var(--pool-ink); border-radius: var(--r); width: 44px; height: 44px; cursor: pointer; }

/* Role sub-navigation (customer / staff / admin areas) */
.subnav { background: var(--deck); border-bottom: 1px solid var(--rule); }
.subnav-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--s5); display: flex; align-items: center; gap: var(--s1); overflow-x: auto; }
.subnav-label { font-family: var(--font-paint); font-weight: 700; text-transform: uppercase; font-size: 1rem; letter-spacing: .04em; color: var(--pool); padding-right: var(--s4); margin-right: var(--s2); border-right: 1px solid var(--rule); white-space: nowrap; }
.subnav a { display: flex; align-items: center; gap: var(--s2); padding: var(--s3) var(--s3); color: var(--ink-2); text-decoration: none; font-weight: 600; white-space: nowrap; border-bottom: 3px solid transparent; }
.subnav a:hover { color: var(--ink); }
.subnav a.active { color: var(--ink); border-bottom-color: var(--pool); }

.page { max-width: var(--maxw); margin: 0 auto; padding: var(--s6) var(--s5) var(--s8); }
.page-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--s4); margin-bottom: var(--s5); }
.page-head p { color: var(--ink-2); margin-top: var(--s2); max-width: 65ch; }
.footer { border-top: 1px solid var(--rule); background: var(--deck); }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: var(--s5); display: flex; flex-wrap: wrap; gap: var(--s5); justify-content: space-between; color: var(--ink-2); font-size: .875rem; }

@media (max-width: 900px) {
    .shell-toggle { display: grid; place-items: center; }
    .shell-inner { gap: var(--s3); padding: 0 var(--s4); }
    .shell-nav { display: none; position: absolute; top: calc(var(--shell-h) + 4px); left: 0; right: 0; height: auto; flex-direction: column; background: var(--pool-deep); padding: var(--s2) 0; }
    .shell.open .shell-nav { display: flex; }
    .shell-nav a { padding: var(--s3) var(--s4); border-bottom: 0; margin: 0; border-left: 4px solid transparent; min-height: 48px; }
    .shell-nav a.active { border-left-color: var(--buoy); }
    .shell-user { display: none; }
    .page { padding: var(--s5) var(--s4) var(--s7); }
    .subnav-inner { padding: 0 var(--s4); }
    /* náznak, že pás jde posunout do strany */
    .subnav-inner { mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); padding-right: var(--s7); }
}

/* ---------- Layout helpers ---------- */
.grid-main { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: var(--s6); align-items: start; }
.stack { display: grid; gap: var(--s4); }
.stack-lg { display: grid; gap: var(--s6); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); }
.spread { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); }
@media (max-width: 960px) { .grid-main { grid-template-columns: 1fr; } }

/* Panel: a raised deck slab. Use sparingly, never nested. */
.panel { background: var(--deck); border: 1px solid var(--rule); border-radius: var(--r); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s4) var(--s5); border-bottom: 1px solid var(--rule); }
.panel-head h2 { font-size: 1.25rem; }
.panel-body { padding: var(--s5); }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); padding-bottom: var(--s2); border-bottom: 2px solid var(--ink); margin-bottom: var(--s4); }
.section-title h2 { font-size: 1.375rem; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 44px; padding: 0 var(--s4); border: 1px solid transparent; border-radius: var(--r); font: 600 1rem/1 var(--font-ui); text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color .15s, border-color .15s, transform .1s; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { cursor: not-allowed; opacity: .5; }
.btn-primary { background: var(--buoy); color: var(--buoy-ink); border-color: #e55513; }
.btn-primary:hover:not(:disabled) { background: var(--buoy-hover); color: var(--buoy-ink); text-decoration: none; }
.btn-pool { background: var(--pool); color: #fff; }
.btn-pool:hover:not(:disabled) { background: var(--pool-deep); color: #fff; text-decoration: none; }
.btn-ghost { background: var(--deck); color: var(--ink); border-color: var(--rule); }
.btn-ghost:hover:not(:disabled) { border-color: var(--ink); color: var(--ink); text-decoration: none; }
.btn-on-pool { background: transparent; color: var(--pool-ink); border-color: var(--pool-ink-2); }
.btn-on-pool:hover { color: #fff; border-color: #fff; text-decoration: none; }
/* Destructive: outline, isolated by layout, filled only on hover/focus */
.btn-danger { background: transparent; color: var(--full); border-color: var(--full); }
.btn-danger:hover:not(:disabled), .btn-danger:focus-visible { background: var(--full); color: #fff; }
.btn-sm { min-height: 36px; padding: 0 var(--s3); font-size: .875rem; }
.btn-icon { width: 40px; min-height: 40px; padding: 0; }
.danger-zone { margin-top: var(--s7); padding-top: var(--s5); border-top: 1px dashed var(--rule); display: flex; justify-content: flex-end; }

/* ---------- Forms ---------- */
.field, .field-group { display: grid; gap: var(--s2); }   /* field-group: obal několika polí (role=group) */
.field label, .label { font-weight: 600; font-size: .9375rem; }
.field .hint, .field-group .hint { font-size: .875rem; color: var(--ink-3); }
.field .error, .field-group .error, .validation-message { font-size: .875rem; color: var(--full); font-weight: 500; }
.input, .field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea {
    width: 100%; min-height: 44px; padding: var(--s2) var(--s3); font: 400 1rem/1.4 var(--font-ui); color: var(--ink);
    background: var(--deck); border: 1px solid #9fb1b5; border-radius: var(--r);
}
.field textarea { min-height: 96px; resize: vertical; }
.input:hover, .field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink-2); }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--pool); box-shadow: 0 0 0 3px rgb(10 79 102 / .2); }
.field .invalid, .invalid { border-color: var(--full) !important; }
::placeholder { color: var(--ink-3); opacity: 1; }
.field label .req, .field .label .req, .field-group .label .req, .form-legend .req { color: var(--full); font-weight: 700; margin-left: 2px; }
.field label .opt, .field .label .opt { color: var(--ink-3); font-weight: 400; font-size: .875rem; margin-left: var(--s1); }
.form-legend { font-size: .875rem; color: var(--ink-2); margin: 0; }
.form-legend .req { margin: 0 2px 0 0; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s4); }
.form-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s5); }
.check { display: flex; align-items: center; gap: var(--s2); min-height: 44px; }
.check input { width: 20px; height: 20px; accent-color: var(--pool); }

/* Segmented choice (ticket type, filters) */
.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: var(--r); background: var(--deck); overflow: hidden; flex-wrap: wrap; }
.seg button, .seg a { min-height: 40px; padding: 0 var(--s4); background: none; border: 0; border-right: 1px solid var(--rule); font: 600 .9375rem var(--font-ui); color: var(--ink-2); cursor: pointer; text-decoration: none; display: flex; align-items: center; }
.seg :last-child { border-right: 0; }
.seg [aria-pressed="true"], .seg .active { background: var(--pool); color: #fff; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; background: var(--deck); border: 1px solid var(--rule); border-radius: var(--r); }
table.data { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums lining-nums; }
table.data th { text-align: left; font-size: .8125rem; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; padding: var(--s3) var(--s4); border-bottom: 2px solid var(--ink); white-space: nowrap; background: var(--deck); }
table.data td { padding: var(--s3) var(--s4); border-bottom: 1px solid var(--rule); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--deck-2); }
table.data .actions { text-align: right; white-space: nowrap; }
table.data .r { text-align: right; }
th button.sort { all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
th button.sort:focus-visible { outline: 3px solid var(--focus); }
/* Na telefonu se řádky tabulky skládají pod sebe: <table class="data reflow">, buňky s data-label="…". */
@media (max-width: 640px) {
    .table-wrap:has(.reflow) { overflow: visible; }
    table.data.reflow thead { display: none; }
    table.data.reflow, .reflow tbody, .reflow tr, .reflow td { display: block; width: 100%; }
    .reflow tr { padding: var(--s3) 0; border-bottom: 1px solid var(--rule); }
    .reflow tr:last-child { border-bottom: 0; }
    table.data.reflow td { display: block; padding: var(--s1) var(--s4); border: 0; text-align: right; overflow: hidden; }
    .reflow td[data-label]::before { content: attr(data-label); float: left; margin-right: var(--s4); text-align: left; font-size: .8125rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
    .reflow td.actions { padding-top: var(--s2); }
}

/* ---------- Tags / codes ---------- */
.code { display: inline-flex; align-items: center; justify-content: center; min-width: 2.5em; height: 1.75em; padding: 0 .4em; font: 700 .9375rem/1 var(--font-paint); letter-spacing: .04em; color: #fff; background: var(--ink); border-radius: 2px; }
.tag { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 var(--s2); font-size: .8125rem; font-weight: 600; border-radius: 2px; background: var(--deck-2); color: var(--ink-2); border: 1px solid var(--rule); white-space: nowrap; }
.tag-free { background: var(--free-wash); color: var(--free); border-color: transparent; }
.tag-busy { background: var(--busy-wash); color: var(--busy); border-color: transparent; }
.tag-full { background: var(--full-wash); color: var(--full); border-color: transparent; }
.tag-mine { background: var(--buoy-wash); color: var(--buoy-text); border-color: transparent; }
.tag-pool { background: var(--pool-wash); color: var(--pool); border-color: transparent; }
.tag-struck { text-decoration: line-through; }

/* ---------- Lane meter: the signature ---------- */
/* A pool-floor lane line: dark stripe with T-ends, filled along its length. */
.lane { --pct: 0; --fill: var(--free); position: relative; height: 14px; display: block; min-width: 96px; }
.lane::before { content: ""; position: absolute; inset: 5px 6px; background: var(--tile-line); border-radius: 1px; }
.lane-fill { position: absolute; top: 5px; bottom: 5px; left: 6px; width: calc((100% - 12px) * var(--pct) / 100); background: var(--fill); border-radius: 1px; transition: width 900ms var(--ease-out), background-color .3s; }
.lane-t { position: absolute; top: 0; bottom: 0; width: 4px; background: var(--rule); }
.lane-t.start { left: 0; }
.lane-t.end { right: 0; }
.lane.busy { --fill: var(--busy-fill); }
.lane.full { --fill: var(--full); }
.lane.full .lane-t.end { background: var(--full); width: 6px; }
/* reserved portion (time-slot reservations) hatched, not coloured */
.lane-reserved { position: absolute; top: 5px; bottom: 5px; left: calc(6px + (100% - 12px) * var(--pct) / 100); width: calc((100% - 12px) * var(--res, 0) / 100); background: repeating-linear-gradient(135deg, var(--ink-3) 0 2px, transparent 2px 6px); }
.lane-lg { height: 22px; }
.lane-lg::before, .lane-lg .lane-fill, .lane-lg .lane-reserved { top: 7px; bottom: 7px; }
/* Klidová hodnota je vidět hned; animuje se jen změna obsazenosti při obnovení. */
@media (prefers-reduced-motion: reduce) { .lane-fill { transition: none; } * { scroll-behavior: auto !important; } }

/* Painted deck numeral */
.paint { font-family: var(--font-paint); font-weight: 700; line-height: .9; letter-spacing: -.01em; font-variant-numeric: tabular-nums lining-nums; }
.paint-xl { font-size: clamp(3rem, 2rem + 4vw, 4.75rem); }
.paint-lg { font-size: 2.5rem; }
.paint-md { font-size: 1.75rem; }
.paint .of { color: var(--ink-3); font-size: .5em; font-weight: 600; margin-left: .1em; }

/* State label: word + glyph, never colour alone */
.state { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .9375rem; }
.state-free { color: var(--free); }
.state-busy { color: var(--busy); }
.state-full { color: var(--full); }
.state-closed { color: var(--ink-3); }

/* ---------- Pool board (public occupancy rows) ---------- */
.board { background: var(--deck); border: 1px solid var(--rule); border-radius: var(--r); }
.board-row { display: grid; grid-template-columns: 56px minmax(0, 1.2fr) minmax(150px, auto) minmax(200px, 1.4fr); align-items: center; gap: var(--s5); padding: var(--s5); border-bottom: 1px solid var(--rule); }
.board-row:last-child { border-bottom: 0; }
.board-row .pool-name { font-family: var(--font-paint); font-weight: 700; font-size: 1.5rem; text-transform: uppercase; line-height: 1; }
.board-row .facts { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); margin-top: var(--s2); color: var(--ink-2); font-size: .9375rem; }
.board-row .facts span { display: inline-flex; align-items: center; gap: 4px; }
.board-row .meter { display: grid; gap: var(--s2); }
.board-row.is-full { background: #fdf3f3; }
@media (max-width: 720px) {
    .board-row { grid-template-columns: 44px 1fr auto; gap: var(--s3) var(--s4); padding: var(--s4); }
    .board-row .meter { grid-column: 1 / -1; }
    .board-row .pool-name { font-size: 1.25rem; }
}

/* ---------- Timetable (courses) ---------- */
.timetable { background: var(--deck); border: 1px solid var(--rule); border-radius: var(--r); }
.tt-hour { display: grid; grid-template-columns: 64px 1fr; border-bottom: 1px solid var(--rule); }
.tt-hour:last-child { border-bottom: 0; }
.tt-h { font-family: var(--font-paint); font-weight: 700; font-size: 2rem; line-height: 1; padding: var(--s3) var(--s3); color: var(--pool); border-right: 2px solid var(--ink); font-variant-numeric: tabular-nums; }
.tt-items { display: grid; }
.tt-item { display: grid; grid-template-columns: 3ch 1fr; gap: var(--s3); align-items: baseline; padding: var(--s3) var(--s4); border-bottom: 1px dashed var(--rule); color: inherit; text-decoration: none; }
.tt-item:last-child { border-bottom: 0; }
.tt-item > :nth-child(n+3) { grid-column: 2; }
a.tt-item:hover { background: var(--deck-2); text-decoration: none; color: inherit; }
.tt-min { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.tt-title { font-weight: 600; }
.tt-sub { display: block; font-size: .875rem; color: var(--ink-2); font-weight: 400; }
.tt-item.mine, a.tt-item.mine:hover { background: var(--buoy-wash); }

/* ---------- Stat strip (staff/admin) ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); background: var(--deck); border: 1px solid var(--rule); border-radius: var(--r); }
.stat { padding: var(--s4) var(--s5); border-right: 1px solid var(--rule); }
.stat:last-child { border-right: 0; }
.stat .label { color: var(--ink-2); font-size: .875rem; font-weight: 600; }

/* ---------- Alerts ---------- */
.alert { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3) var(--s4); border-radius: var(--r); border: 1px solid; font-weight: 500; }
.alert .ph { margin-top: 2px; }
.alert-full { background: var(--full-wash); border-color: #efb3b6; color: #7f1419; }
.alert-busy { background: var(--busy-wash); border-color: #ecd08f; color: #5f3e00; }
.alert-ok { background: var(--free-wash); border-color: #a7d8bb; color: #10512f; }
.alert-info { background: var(--pool-wash); border-color: #a9d0d9; color: var(--pool-deep); }

/* ---------- Tickets (customer's own: orange layer) ---------- */
.pass { position: relative; display: grid; grid-template-columns: 1fr auto; gap: var(--s3); padding: var(--s4) var(--s5); background: var(--deck); border: 1px solid var(--buoy); border-radius: var(--r); }
.pass.used { border-color: var(--rule); color: var(--ink-2); }
.pass.used .pass-title { text-decoration: line-through; }
.pass-title { font-family: var(--font-paint); font-weight: 700; font-size: 1.375rem; text-transform: uppercase; line-height: 1.1; }
.pass-punches { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--s2); }
.pass-punches i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--buoy-text); display: block; }
.pass-punches i.used { background: var(--rule); border-color: var(--rule); }

/* Choice cards for buying tickets */
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--s4); }
.choice { position: relative; display: grid; gap: var(--s2); padding: var(--s5); text-align: left; background: var(--deck); border: 1px solid var(--rule); border-radius: var(--r); cursor: pointer; font: inherit; color: inherit; }
.choice:hover { border-color: var(--ink); }
.choice[aria-pressed="true"], .choice.selected { border-color: var(--buoy); box-shadow: 0 0 0 2px var(--buoy); }
.choice .price { font-family: var(--font-paint); font-weight: 700; font-size: 2.25rem; line-height: 1; }

/* ---------- Empty / loading ---------- */
.empty { display: grid; justify-items: start; gap: var(--s3); padding: var(--s6) var(--s5); background: var(--deck); border: 1px dashed var(--rule); border-radius: var(--r); color: var(--ink-2); }
.empty .ph { font-size: 2rem; color: var(--pool); }
.empty strong { color: var(--ink); font-size: 1.125rem; }
.skeleton { background: linear-gradient(90deg, var(--deck-2) 0, var(--tile-line) 50%, var(--deck-2) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; border-radius: var(--r); }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }

/* Dialog (native <dialog>) */
dialog.sheet { border: 1px solid var(--rule); border-radius: var(--r); padding: 0; width: min(560px, calc(100vw - 32px)); box-shadow: 0 12px 40px rgb(7 58 75 / .25); }
dialog.sheet::backdrop { background: rgb(7 58 75 / .45); }

/* Hours list */
.hours { display: grid; grid-template-columns: auto 1fr; gap: var(--s2) var(--s5); font-variant-numeric: tabular-nums; }
.hours .today { font-weight: 700; color: var(--pool); }

/* Toast */
.toast { position: fixed; bottom: var(--s5); left: 50%; transform: translateX(-50%); z-index: 40; min-width: 280px; max-width: calc(100vw - 32px); box-shadow: var(--shadow); }

/* Blazor plumbing */
#blazor-error-ui { color-scheme: light only; background: var(--busy-wash); border-top: 2px solid var(--busy-fill); bottom: 0; display: none; left: 0; padding: var(--s3) var(--s5); position: fixed; width: 100%; z-index: 1000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: var(--s4); top: var(--s3); }
.blazor-error-boundary { background: var(--full-wash); color: var(--full); padding: var(--s4); border-radius: var(--r); }
.blazor-error-boundary::after { content: "Něco se pokazilo. Zkuste stránku načíst znovu."; }
.boot { min-height: 100dvh; display: grid; place-items: center; background: var(--pool); color: var(--pool-ink); font: 700 1.75rem var(--font-paint); text-transform: uppercase; letter-spacing: .04em; }
.boot .lane { width: 220px; margin-top: var(--s4); }
.boot .lane::before { background: var(--pool-deep); }
.boot .lane-fill { --pct: calc(var(--blazor-load-percentage, 0%) / 1%); background: var(--buoy); }
.boot .lane-t { background: var(--pool-ink-2); }

/* Upozornění na blížící se odhlášení pro nečinnost */
.idle-warning { position: fixed; bottom: var(--s5); right: var(--s5); z-index: 45; width: min(380px, calc(100vw - 32px)); display: grid; gap: var(--s3); padding: var(--s4); background: var(--busy-wash); border: 1px solid var(--busy-fill); border-left-width: 4px; border-radius: var(--r); color: #5f3e00; box-shadow: var(--shadow); }
.idle-warning strong { font-family: var(--font-paint); font-size: 1.125rem; text-transform: uppercase; }

/* Výběr ze seznamu (zákazník, vstupenka u pokladny) */
.pick-list { list-style: none; margin: 0; padding: 0; background: var(--deck); border: 1px solid var(--rule); border-radius: var(--r); max-height: 15rem; overflow-y: auto; }
.pick-list li + li { border-top: 1px solid var(--rule); }
.pick-list button { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); width: 100%; min-height: 44px; padding: var(--s2) var(--s3); background: none; border: 0; font: 600 1rem var(--font-ui); color: var(--ink); text-align: left; cursor: pointer; }
.pick-list button:hover { background: var(--deck-2); }
.picked { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s3) var(--s4); background: var(--pool-wash); border: 1px solid #a9d0d9; border-radius: var(--r); }
