/* ============================================================
   Izabell Salon Fryzjerski: wygląd aplikacji
   Bodoni Moda (nagłówki) + Inter (interfejs), jeden akcent: szminka.
   ============================================================ */

@font-face { font-family: 'Bodoni Moda'; font-style: normal; font-weight: 400 600; font-display: swap; src: url(fonts/bodoni-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Bodoni Moda'; font-style: normal; font-weight: 400 600; font-display: swap; src: url(fonts/bodoni-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/inter-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/inter-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #FAFAF8; --surface: #FFFFFF; --surface-2: #F3F2F0; --line: #E6E3E0; --line-2: #EFEDEA;
  --text: #141214; --text-2: #6B6468; --text-3: #9A9396;
  --accent: #C0466A; --accent-soft: #F7E4EA; --on-accent: #FFFFFF;
  --success: #2F7D5B; --success-soft: #E3F1EA; --warning: #B7791F; --warning-soft: #FBF0DC; --danger: #B23A3A; --danger-soft: #F8E3E3; --info-soft: #E6EFF7;
  --offhours: #F5F4F2; --ink: #141214; --on-ink: #FFFFFF;
  --e1: 0 1px 2px rgba(20,18,20,.06); --e2: 0 8px 28px rgba(20,18,20,.14);
  --serif: 'Bodoni Moda', 'Didot', 'Bodoni 72', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(.2,.8,.2,1);
  --tab-h: 64px; --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --gutter: 16px;
  /* Kolory pracowników: tło / pasek */
  --s1: #FBE9EE; --s1b: #C0466A; --s2: #E8F1EA; --s2b: #5E8A6B; --s3: #E6EFF7; --s3b: #4F7BA6; --s4: #F6EEDF; --s4b: #B08A4A;
  --s5: #EEEAF6; --s5b: #7C68A8; --s6: #F7E7E0; --s6b: #B4654A; --s7: #E3F2F1; --s7b: #3F8C88; --s8: #ECECEE; --s8b: #5D5F66;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --dark: 1; } }
:root[data-theme="dark"], :root.dark {
  --bg: #121112; --surface: #1C1A1C; --surface-2: #252225; --line: #2F2B2F; --line-2: #262326;
  --text: #F2EEEF; --text-2: #A79FA3; --text-3: #7A7276;
  --accent: #E07A98; --accent-soft: #3A2029; --on-accent: #1A0F13;
  --success: #5BB08A; --success-soft: #1D2F26; --warning: #DDA24B; --warning-soft: #3A2E1A; --danger: #E06A6A; --danger-soft: #3A1E1E; --info-soft: #1C2633;
  --offhours: #171517; --ink: #F2EEEF; --on-ink: #121112;
  --e1: 0 0 0 1px var(--line); --e2: 0 0 0 1px var(--line), 0 12px 32px rgba(0,0,0,.5);
  --s1: #3A2029; --s2: #1F2D23; --s3: #1C2633; --s4: #332A1C; --s5: #27223A; --s6: #36231D; --s7: #1A2E2D; --s8: #26272A;
  --s1b: #E07A98; --s2b: #7FB08D; --s3b: #7FA6CF; --s4b: #D2AE6E; --s5b: #A592D0; --s6b: #D98D70; --s7b: #6CB8B3; --s8b: #9A9CA3;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 400 16px/1.5 var(--sans); font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
.tnum { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------- Marka ---------- */
.wordmark { font: 400 56px/1 var(--serif); letter-spacing: -.01em; font-variation-settings: "opsz" 96; }
.kicker { font: 600 11px/16px var(--sans); letter-spacing: .3em; text-transform: uppercase; color: var(--text-2); }
.splash { min-height: 100vh; display: grid; place-content: center; text-align: center; gap: 8px; animation: fade .6s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }

/* ---------- Przyciski i pola ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; transition: transform .12s var(--ease), background .18s; white-space: nowrap; }
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn--ink { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.btn--ghost { background: transparent; }
.btn--text { background: none; border: 0; padding: 0 8px; color: var(--text-2); }
.btn--danger { color: var(--danger); border-color: var(--danger-soft); background: var(--surface); }
.btn--lg { min-height: 52px; width: 100%; font-size: 16px; }
.btn--sm { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn:disabled { opacity: .5; pointer-events: none; }
.iconbtn { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 12px; border: 0; background: transparent; cursor: pointer; color: var(--text); flex: none; }
.iconbtn:active { background: var(--surface-2); }
.iconbtn.is-on { color: var(--accent); }
.ico { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico--sm { width: 16px; height: 16px; }

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span, .label { font: 600 12px/16px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
.input, select.input, textarea.input { width: 100%; min-height: 52px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 16px; transition: border-color .15s, box-shadow .15s; }
textarea.input { min-height: 88px; resize: vertical; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.row { display: flex; gap: 10px; align-items: center; }
.row > * { min-width: 0; }
.grow { flex: 1; }
.grid2 { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px; }
.chips { position: relative; }
.grid3 { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 10px; }
.check { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line-2); cursor: pointer; font-size: 16px; }
.check input { width: 26px; height: 26px; accent-color: var(--accent); flex: none; margin: 0; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; cursor: pointer; }
.switch input { appearance: none; width: 48px; height: 28px; border-radius: 99px; background: var(--line); position: relative; cursor: pointer; transition: background .18s; flex: none; margin: 0; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: var(--e1); transition: transform .2s var(--ease); }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(20px); }
.switch small { display: block; color: var(--text-2); font-size: 13px; line-height: 18px; }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.chips::-webkit-scrollbar { display: none; }
.chips--wrap { flex-wrap: wrap; overflow: visible; }
.chip { flex: none; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; color: var(--text); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; }
.chip small { opacity: .7; font-size: 12px; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; font: 600 11px/18px var(--sans); letter-spacing: .04em; text-transform: uppercase; background: var(--surface-2); color: var(--text-2); }
.pill--accent { background: var(--accent-soft); color: var(--accent); }
.pill--ok { background: var(--success-soft); color: var(--success); }
.pill--warn { background: var(--warning-soft); color: var(--warning); }
.pill--bad { background: var(--danger-soft); color: var(--danger); }
.seg { display: flex; background: var(--surface-2); border-radius: 12px; padding: 3px; gap: 2px; }
.seg button { flex: 1; min-height: 38px; border: 0; background: none; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--text-2); cursor: pointer; }
.seg button.is-on { background: var(--surface); color: var(--text); box-shadow: var(--e1); }
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--accent); color: var(--on-accent); font: 700 11px/18px var(--sans); text-align: center; }

/* ---------- Układ: pasek boczny (tablet/komputer) i dolne zakładki (telefon) ---------- */
.shell { min-height: 100vh; }
.side { display: none; }
.main { min-height: 100vh; padding-bottom: calc(var(--tab-h) + var(--safe-b)); }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b); display: flex; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--text-2); font: 500 11px/14px var(--sans); position: relative; }
.tab.is-on { color: var(--accent); }
.tab.is-on::before { content: ''; position: absolute; top: 6px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.tab .badge { position: absolute; top: 8px; left: calc(50% + 6px); }
@media (min-width: 768px) {
  .shell { display: grid; grid-template-columns: 72px 1fr; }
  .tabbar { display: none; }
  .main { padding-bottom: 0; min-width: 0; }
  .side { display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--line); background: var(--surface); padding: 16px 10px; gap: 4px; }
  .side__brand { text-align: center; padding: 6px 0 22px; }
  .side__brand .wordmark { font-size: 0; }
  .side__brand .wordmark::first-letter { font-size: 34px; }
  .side__brand .kicker { display: none; }
  .side a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 14px; border-radius: 12px; text-decoration: none; color: var(--text-2); font-weight: 500; position: relative; justify-content: center; }
  .side a span.lbl { display: none; }
  .side a.is-on { color: var(--accent); background: var(--accent-soft); }
  .side a .badge { position: absolute; top: 6px; right: 6px; }
  .side__foot { margin-top: auto; }
}
@media (min-width: 1200px) {
  .shell { grid-template-columns: 232px 1fr; }
  .side { padding: 24px 16px; }
  .side__brand { text-align: left; padding: 0 14px 28px; }
  .side__brand .wordmark, .side__brand .wordmark::first-letter { font-size: 40px; }
  .side__brand .kicker { display: block; font-size: 9px; margin-top: 4px; }
  .side a { justify-content: flex-start; }
  .side a span.lbl { display: inline; }
  .side a .badge { position: static; margin-left: auto; }
  .side__me { display: flex; align-items: center; gap: 10px; padding: 12px 14px; color: var(--text-2); font-size: 14px; }
}
.side__me { display: none; }

/* ---------- Nagłówki stron ---------- */
.page { padding: calc(16px + var(--safe-t)) var(--gutter) 24px; max-width: 920px; margin: 0 auto; }
.page__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 8px 0 18px; }
.h1 { font: 500 30px/36px var(--serif); margin: 0; letter-spacing: -.01em; }
.h2 { font: 600 18px/24px var(--sans); margin: 24px 0 10px; }
.muted { color: var(--text-2); }
.small { font-size: 13px; line-height: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.card + .card { margin-top: 12px; }
.list { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.li { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 16px; border-bottom: 1px solid var(--line-2); text-decoration: none; color: inherit; cursor: pointer; background: none; border-left: 0; border-right: 0; border-top: 0; width: 100%; text-align: left; }
.li:last-child { border-bottom: 0; }
.li:active { background: var(--surface-2); }
.li__main { flex: 1; min-width: 0; }
.li__title { font-weight: 600; font-size: 16px; line-height: 22px; }
.li__sub { color: var(--text-2); font-size: 13px; line-height: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font: 600 14px/1 var(--sans); flex: none; color: var(--text); }
.letter { position: sticky; top: 0; z-index: 2; padding: 6px 16px; background: var(--surface-2); font: 500 15px/20px var(--serif); color: var(--text-2); }
.empty { text-align: center; padding: 48px 16px; color: var(--text-2); }
.empty .serif { font: 400 26px/32px var(--serif); color: var(--text); margin-bottom: 6px; }
.search { position: relative; }
.search .ico { position: absolute; left: 14px; top: 15px; color: var(--text-3); }
.search .input { padding-left: 44px; }

/* ---------- Grafik ---------- */
.sch { display: flex; flex-direction: column; height: calc(100vh - var(--tab-h) - var(--safe-b)); height: calc(100dvh - var(--tab-h) - var(--safe-b)); }
@media (min-width: 768px) { .sch { height: 100vh; height: 100dvh; } }
.sch__top { padding: calc(8px + var(--safe-t)) 12px 0; background: var(--bg); border-bottom: 1px solid var(--line); flex: none; }
.sch__bar { display: flex; align-items: center; gap: 4px; min-height: 52px; }
.sch__date { font: 500 22px/28px var(--serif); background: none; border: 0; padding: 4px 6px; cursor: pointer; text-align: left; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sch__date small { display: block; font: 500 11px/14px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); }
.week { display: grid; grid-template-columns: 32px repeat(7, 1fr) 32px; align-items: center; gap: 2px; padding: 4px 0 8px; touch-action: pan-y; }
.week__nav { width: 32px; height: 44px; border: 0; background: none; color: var(--text-2); cursor: pointer; display: grid; place-items: center; padding: 0; }
.wday { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 0 5px; border-radius: 12px; border: 0; background: none; cursor: pointer; color: var(--text); min-height: 56px; position: relative; }
.wday small { font: 600 10px/12px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
.wday b { font: 600 17px/22px var(--sans); font-variant-numeric: tabular-nums; }
.wday i { font: 600 10px/12px var(--sans); font-style: normal; color: var(--text-3); height: 12px; }
.wday.is-today b { color: var(--accent); }
.wday.is-today::after { content: ''; position: absolute; inset: 2px; border: 1.5px solid var(--accent); border-radius: 12px; pointer-events: none; }
.wday.is-sel { background: var(--ink); }
.wday.is-sel small, .wday.is-sel b, .wday.is-sel i { color: var(--on-ink); }
.wday.is-sel.is-today::after { display: none; }
.dur { display: flex; align-items: center; gap: 8px; padding: 0 0 10px; }
.dur .label { flex: none; font-size: 10px; }

.grid-wrap { scroll-padding-left: 48px; flex: 1; overflow: auto; position: relative; overscroll-behavior: contain; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.grid { display: grid; position: relative; min-height: 100%; }
.g-corner { position: sticky; left: 0; top: 0; z-index: 6; background: var(--bg); border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.g-head { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); height: 52px; display: flex; align-items: center; gap: 8px; padding: 0 10px; scroll-snap-align: start; cursor: pointer; border-left: 1px solid var(--line-2); min-width: 0; }
.g-head .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.g-head b { font: 600 15px/18px var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-head small { margin-left: auto; color: var(--text-2); font-size: 12px; font-variant-numeric: tabular-nums; flex: none; }
.g-head.is-me b { box-shadow: inset 0 -2px 0 var(--accent); }
.g-axis { position: sticky; left: 0; z-index: 4; background: var(--bg); border-right: 1px solid var(--line); }
.g-hour { position: absolute; left: 0; right: 0; font: 500 12px/1 var(--sans); font-variant-numeric: tabular-nums; color: var(--text-2); text-align: right; padding-right: 7px; transform: translateY(-6px); }
.g-hour.is-half { color: var(--text-3); font-size: 10px; }
.g-col { position: relative; border-left: 1px solid var(--line-2); cursor: copy; touch-action: pan-x pan-y; }
.g-col .off { position: absolute; left: 0; right: 0; background: var(--offhours); pointer-events: none; }
.g-line { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid var(--line-2); pointer-events: none; }
.g-line.is-hour { border-top-color: var(--line); }
.g-line.is-q { border-top-style: dotted; opacity: .7; }
.g-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--accent); z-index: 3; pointer-events: none; }
.g-now::before { content: ''; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.g-nowpill { position: absolute; right: 3px; z-index: 5; transform: translateY(-50%); background: var(--accent); color: var(--on-accent); font: 700 10px/16px var(--sans); font-variant-numeric: tabular-nums; padding: 0 5px; border-radius: 99px; pointer-events: none; }

.ap { position: absolute; z-index: 2; border-radius: 8px; padding: 4px 7px 4px 9px; overflow: hidden; cursor: pointer; background: var(--tint); color: var(--text); border: 1px solid color-mix(in srgb, var(--bar) 18%, transparent); box-shadow: inset 3px 0 0 var(--bar); font-size: 13px; line-height: 17px; transition: box-shadow .15s, transform .15s; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
.ap:active { transform: scale(.985); }
.ap::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 0; }
.ap__t { font-weight: 600; font-variant-numeric: tabular-nums; font-size: 12px; color: var(--text-2); }
.ap__n { font-weight: 650; font-size: 15px; line-height: 19px; overflow-wrap: break-word; }
.ap.is-narrow { padding: 3px 4px 3px 7px; }
.ap.is-narrow .ap__n { font-size: 13px; line-height: 16px; overflow-wrap: anywhere; }
.ap.is-narrow .ap__t { font-size: 11px; }
.ap.is-narrow.has-st { padding-right: 4px; padding-top: 20px; }
.m-long { display: none; } @media (min-width: 480px) { .m-long { display: inline; } .m-short { display: none; } }
.ap__s { color: var(--text-2); font-size: 13px; }
.ap__note { color: var(--text-2); font-size: 12px; line-height: 16px; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ap__price { position: absolute; right: 7px; bottom: 4px; font: 600 12px/1 var(--sans); color: var(--text-2); font-variant-numeric: tabular-nums; }
.ap__st { position: absolute; top: 4px; right: 4px; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; }
.ap__st .ico { width: 14px; height: 14px; stroke-width: 2.2; }
.ap__st.is-ok { color: var(--success); }
.ap__st.is-wait { color: var(--warning); }
.ap__st.is-bad { color: var(--danger); }
.ap__st.is-none { color: var(--text-3); }
.ap.has-st { padding-right: 22px; }
.ap.is-xs { padding-top: 1px; padding-bottom: 1px; display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.ap.is-xs .ap__n { font-size: 12px; line-height: 15px; white-space: nowrap; overflow: hidden; text-overflow: clip; }
.ap.is-xs .ap__st { top: 50%; transform: translateY(-50%); }
.ap.is-sm .ap__n { font-size: 13px; line-height: 16px; }
.ap .new { display: inline-block; margin-left: 4px; vertical-align: 1px; font: 700 9px/14px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.ap.is-cancel { opacity: .55; background: repeating-linear-gradient(-45deg, var(--tint), var(--tint) 6px, transparent 6px, transparent 9px); }
.ap.is-cancel .ap__n { text-decoration: line-through; }
.ap.is-block { background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 7px, var(--offhours) 7px, var(--offhours) 14px); box-shadow: none; border: 1px solid var(--line); display: grid; place-items: center; text-align: center; }
.ap.is-block .ap__n { font: 600 11px/14px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); }
.ap.is-lifted { z-index: 20; transform: scale(1.03); box-shadow: inset 3px 0 0 var(--bar), var(--e2); opacity: .95; cursor: grabbing; }
.ghost { position: absolute; z-index: 15; border: 2px dashed var(--accent); background: color-mix(in srgb, var(--accent-soft) 70%, transparent); border-radius: 8px; touch-action: none; cursor: ns-resize; animation: pop .18s var(--ease); }
@keyframes pop { from { transform: scale(.94); opacity: 0; } }
.ghost__lbl { position: absolute; left: 6px; top: 4px; font: 700 13px/16px var(--sans); font-variant-numeric: tabular-nums; color: var(--accent); }
.ghost__go { position: absolute; right: 4px; top: 4px; z-index: 16; white-space: nowrap; box-shadow: var(--e1); min-height: 32px; padding: 0 10px; }
.ghost__lbl { right: 80px; }
.movetip { position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); top: calc(12px + var(--safe-t)); background: var(--ink); color: var(--on-ink); padding: 8px 16px; border-radius: 99px; font: 600 14px/20px var(--sans); font-variant-numeric: tabular-nums; box-shadow: var(--e2); pointer-events: none; }
.cancelchip { margin-left: 4px; }

.fab { position: fixed; right: 16px; bottom: calc(var(--tab-h) + var(--safe-b) + 16px); z-index: 30; width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--accent); color: var(--on-accent); box-shadow: var(--e2); display: grid; place-items: center; cursor: pointer; transition: transform .15s var(--ease); }
.fab:active { transform: scale(.94); }
.fab .ico { width: 26px; height: 26px; stroke-width: 2; }
@media (min-width: 768px) { .fab { bottom: 24px; right: 24px; } }

/* ---------- Arkusz (bottom sheet / panel boczny) ---------- */
.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(20,18,20,.32); animation: fadein .2s var(--ease); }
@keyframes fadein { from { opacity: 0; } }
.sheet { position: fixed; z-index: 51; left: 0; right: 0; bottom: 0; max-height: 92vh; max-height: 92dvh; background: var(--surface); border-radius: 20px 20px 0 0; box-shadow: var(--e2); display: flex; flex-direction: column; animation: up .28s var(--ease); }
@keyframes up { from { transform: translateY(40px); opacity: .4; } }
.sheet__grab { width: 40px; height: 5px; border-radius: 99px; background: var(--line); margin: 8px auto 0; flex: none; }
.sheet__head { display: flex; align-items: center; gap: 8px; padding: 8px 12px 8px 20px; flex: none; }
.sheet__title { font: 500 22px/28px var(--serif); flex: 1; min-width: 0; }
.sheet__body { overflow-y: auto; padding: 4px 20px 20px; overscroll-behavior: contain; flex: 1; }
.sheet__foot { padding: 12px 20px calc(12px + var(--safe-b)); border-top: 1px solid var(--line); display: flex; gap: 10px; flex: none; background: var(--surface); border-radius: 0 0 20px 20px; }
.sheet--small .sheet__body { padding-bottom: calc(20px + var(--safe-b)); }
@media (min-width: 768px) {
  .sheet { left: auto; top: 0; right: 0; bottom: 0; width: 440px; max-height: none; height: 100vh; border-radius: 0; animation: slide .28s var(--ease); }
  .sheet--small { top: 50%; left: 50%; right: auto; bottom: auto; height: auto; max-height: 86vh; transform: translate(-50%, -50%); border-radius: 20px; width: 420px; animation: fadein .2s var(--ease); }
  .sheet__grab { display: none; }
  .sheet__foot { border-radius: 0; }
}
@keyframes slide { from { transform: translateX(40px); opacity: .4; } }

.warn { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--warning-soft); color: var(--text); font-size: 14px; line-height: 20px; margin-bottom: 14px; }
.warn .ico { color: var(--warning); margin-top: 1px; }
.warn--bad { background: var(--danger-soft); }
.warn--bad .ico { color: var(--danger); }
.warn--ok { background: var(--success-soft); }
.warn--ok .ico { color: var(--success); }
.stepper { display: flex; gap: 4px; margin-top: 6px; }
.stepper button { flex: 1; min-height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); font: 600 13px/1 var(--sans); cursor: pointer; font-variant-numeric: tabular-nums; }
.input--time { font: 600 20px/1 var(--sans); font-variant-numeric: tabular-nums; text-align: center; padding: 10px 6px; }
.picked { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.results { border: 1px solid var(--line); border-radius: 12px; margin-top: 6px; overflow: hidden; background: var(--surface); }
.results .li { min-height: 52px; }
.mini-log { font-size: 13px; line-height: 18px; color: var(--text-2); border-left: 2px solid var(--line); padding-left: 12px; margin: 8px 0 0; }
.mini-log div { margin-bottom: 8px; }
.mini-log b { color: var(--text); font-weight: 600; }
.menu { display: grid; gap: 8px; }

/* ---------- Historia ---------- */
.tl-day { font: 500 18px/24px var(--serif); margin: 22px 0 8px; position: sticky; top: 0; background: var(--bg); padding: 6px 0; z-index: 2; }
.tl { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.tl__ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--text-2); }
.tl__ic .ico { width: 17px; height: 17px; }
.tl__ic.t-new { background: var(--accent-soft); color: var(--accent); }
.tl__ic.t-move { background: var(--info-soft); color: var(--s3b); }
.tl__ic.t-bad { background: var(--danger-soft); color: var(--danger); }
.tl__ic.t-ok { background: var(--success-soft); color: var(--success); }
.tl__ic.t-wait { background: var(--warning-soft); color: var(--warning); }
.tl__txt { font-size: 15px; line-height: 21px; }
.tl__meta { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.tl__diff { font-size: 13px; color: var(--text-2); margin-top: 4px; font-variant-numeric: tabular-nums; }

/* ---------- Klient ---------- */
.client-head { display: flex; align-items: center; gap: 14px; margin: 6px 0 18px; }
.client-head .h1 { font-size: 28px; line-height: 32px; }
.consent { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.consent:last-child { border-bottom: 0; }
.visit-row { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.visit-row .when { width: 64px; flex: none; text-align: center; }
.visit-row .when b { display: block; font: 500 22px/24px var(--serif); }
.visit-row .when small { color: var(--text-2); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }

/* ---------- Logowanie ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 20px calc(24px + var(--safe-b)); }
.auth__box { width: 100%; max-width: 360px; animation: fade .5s var(--ease); }
.auth__brand { text-align: center; margin-bottom: 36px; }
.auth__brand .wordmark { font-size: 64px; }
.auth__brand hr { width: 56px; border: 0; border-top: 1px solid var(--text); margin: 18px auto 0; }
.auth h1 { font: 400 26px/32px var(--serif); text-align: center; margin: 0 0 20px; }
.auth .lead { text-align: center; color: var(--text-2); margin: -10px 0 24px; }
.auth__alt { text-align: center; margin-top: 18px; }
.remember { display: flex; align-items: center; gap: 10px; margin: 2px 0 18px; color: var(--text-2); font-size: 15px; cursor: pointer; }
.remember input { width: 20px; height: 20px; accent-color: var(--accent); }

/* ---------- Powiadomienia ---------- */
.toast { position: fixed; z-index: 70; left: 50%; bottom: calc(var(--tab-h) + var(--safe-b) + 84px); transform: translateX(-50%); background: var(--ink); color: var(--on-ink); padding: 12px 8px 12px 18px; border-radius: 14px; box-shadow: var(--e2); display: flex; align-items: center; gap: 12px; font-size: 15px; max-width: calc(100vw - 32px); animation: up .25s var(--ease); }
.toast button { background: none; border: 0; color: var(--accent); font-weight: 700; padding: 6px 10px; cursor: pointer; }
:root.dark .toast button, :root[data-theme="dark"] .toast button { color: var(--accent-soft); }
.toast.is-err { background: var(--danger); color: #fff; }
@media (min-width: 768px) { .toast { bottom: 24px; } }

/* ---------- Strony dla klientów ---------- */
.public { background: var(--bg); }
.pub { max-width: 520px; margin: 0 auto; padding: calc(32px + var(--safe-t)) 20px 32px; }
.pub__brand { text-align: center; margin-bottom: 28px; }
.pub__brand .wordmark { font-size: 54px; }
.pub__card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px 20px; }
.pub__card h1 { font: 400 26px/32px var(--serif); margin: 6px 0 12px; }
.pub__card h2 { font: 600 17px/24px var(--sans); margin: 20px 0 8px; }
.pub__date { font: 400 32px/38px var(--serif) !important; }
.pub__date span { display: block; font-size: 56px; line-height: 64px; color: var(--accent); }
.pub__meta { color: var(--text-2); }
.pub__hint { color: var(--text-2); font-size: 14px; line-height: 20px; }
.pub__actions { display: grid; gap: 10px; margin-top: 18px; }
.pub__state { padding: 16px; border-radius: 14px; background: var(--surface-2); margin: 14px 0; line-height: 22px; }
.pub__state.is-yes { background: var(--success-soft); }
.pub__state.is-no { background: var(--danger-soft); }
.pub__alert { color: var(--danger); }
.pub__clause { margin: 12px 0; font-size: 14px; line-height: 21px; color: var(--text-2); }
.pub__clause summary { cursor: pointer; font-weight: 600; color: var(--text); padding: 10px 0; }
.pub__clause h2 { font-size: 15px; color: var(--text); }
.pub__clause ul { padding-left: 18px; }
.pub__consents .btn { margin-top: 18px; }
.pub__foot { text-align: center; color: var(--text-3); font-size: 12px; margin-top: 24px; line-height: 18px; }
.is-kiosk { font-size: 18px; }
.is-kiosk .check { font-size: 19px; line-height: 27px; padding: 18px 0; }
.is-kiosk .check input { width: 32px; height: 32px; }

/* ---------- Podpis i kod SMS ---------- */
.sig { position: relative; border: 1.5px dashed var(--line); border-radius: 14px; background: #fff; height: 190px; margin-top: 8px; transition: border-color .2s; }
.sig canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; border-radius: 14px; }
.sig__line { position: absolute; left: 20px; right: 20px; bottom: 34px; border-top: 1px solid #D9D5D2; padding-top: 4px; font-size: 12px; color: #9A9396; pointer-events: none; }
.sig__clear { position: absolute; top: 6px; right: 6px; }
.sig.is-err { border-color: var(--danger); animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.is-kiosk .sig { height: 240px; }
.otp { text-align: center; font: 600 34px/1 var(--sans); letter-spacing: .5em; font-variant-numeric: tabular-nums; min-height: 68px; }

/* ---------- Dowód zgody (wydruk) ---------- */
.proof { max-width: 760px; margin: 0 auto; padding: 32px 24px; background: #fff; color: #141214; }
.proof h1 { font: 400 28px/34px var(--serif); margin: 0 0 4px; }
.proof table { width: 100%; border-collapse: collapse; margin: 12px 0 20px; font-size: 14px; }
.proof th, .proof td { text-align: left; vertical-align: top; padding: 7px 8px; border-bottom: 1px solid #E6E3E0; }
.proof th { width: 34%; color: #6B6468; font-weight: 600; }
.proof .yes { color: #2F7D5B; font-weight: 700; }
.proof .no { color: #9A9396; }
.proof .sigimg { max-width: 100%; height: 150px; object-fit: contain; border: 1px solid #E6E3E0; border-radius: 10px; display: block; }
.proof code { font: 12px/18px ui-monospace, Menlo, monospace; word-break: break-all; }
.proof .chain { padding: 12px 14px; border-radius: 12px; margin: 16px 0; font-size: 14px; }
.proof .chain.ok { background: #E3F1EA; }
.proof .chain.bad { background: #F8E3E3; }
.proof .h { font: 600 15px/20px var(--sans); margin: 22px 0 4px; text-transform: uppercase; letter-spacing: .08em; color: #6B6468; }
.noprint { margin: 16px 0; display: flex; gap: 10px; flex-wrap: wrap; }
@media print {
  .noprint { display: none !important; }
  body, .public { background: #fff !important; }
  .proof { padding: 0; }
  @page { margin: 16mm; }
}
