/* Zdrofi — shared web styles (landing, patient portal, doctor panel, admin).
   Language: iOS 26/27 + apple.com. White and system grays, one teal brand accent,
   Liquid Glass only on navigation layers (bars, floating controls), Health-style header washes. */

:root {
  /* Neutrals */
  --bg: #f2f2f7;            /* grouped app background */
  --bg-page: #ffffff;       /* marketing page */
  --band: #f5f5f7;          /* marketing gray band */
  --surface: #ffffff;       /* cards, grouped sections */
  --surface-2: #f2f2f7;     /* inner wells on white */
  --surface-3: #e9e9ee;
  --label: #1d1d1f;
  --label-2: rgba(60, 60, 67, .64);
  --label-3: rgba(60, 60, 67, .34);
  --separator: rgba(60, 60, 67, .16);
  --fill: rgba(118, 118, 128, .12);
  --fill-2: rgba(118, 118, 128, .2);

  /* Brand + interaction */
  --brand: #2a7bff;          /* Wizyty24 blue (start of the logo gradient): buttons, links, selection */
  --brand-ink: #1a62d9;      /* blue text on white (AA) */
  --brand-soft: #e3eeff;     /* tinted button / selection fill */
  --brand-hi: #6ee2ee;       /* logo cyan: light end of gradients */
  --brand-mid: #4fb0fb;      /* middle of the logo gradient */
  --brand-navy: #172a45;     /* logo wordmark */
  --brand-grad: linear-gradient(135deg, #2a7bff, #4fb0fb 55%, #6ee2ee);  /* = logo gradient */

  /* Services (category colors, Health-style) */
  --rx: #0d9488;  --rx-soft: #dff4f1; --rx-ink: #0b7a70;  /* e-recepta (teal category, no longer = brand) */
  --l4: #5856d6;  --l4-soft: #e8e7fb;     /* zwolnienie */
  --gp: #007aff;  --gp-soft: #dcebff;     /* konsultacja */
  --hv: #f27a1a;  --hv-soft: #ffeedd; --hv-ink: #b34d00;  /* wizyta domowa */
  --night: #5e5ce6;

  /* Semantic */
  --ok: #34c759;   --ok-ink: #1f8a3c;   --ok-soft: #e1f6e6;
  --warn: #ff9500; --warn-ink: #b35900; --warn-soft: #fff1dc;
  --bad: #ff3b30;  --bad-ink: #d70015;  --bad-soft: #ffe5e3;
  --info: #007aff; --info-ink: #0062cc; --info-soft: #dcebff;
  --pink: #ff2d55; --orange: #ff9500; --yellow: #ffcc00; --purple: #af52de; --cyan: #32ade6; --mint: #00c7be;

  /* Glass */
  --glass: rgba(255, 255, 255, .66);
  --glass-strong: rgba(255, 255, 255, .82);
  --glass-edge: rgba(255, 255, 255, .9);
  --glass-line: rgba(0, 0, 0, .07);
  --glass-shadow: 0 10px 34px rgba(0, 0, 0, .10), 0 1px 3px rgba(0, 0, 0, .07);

  --shadow-card: 0 1px 2px rgba(0, 0, 0, .04);
  --shadow-pop: 0 18px 50px -12px rgba(0, 0, 0, .22), 0 2px 6px rgba(0, 0, 0, .06);

  /* Type */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-rounded: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Shape */
  --r-xs: 8px; --r-sm: 12px; --r-md: 16px; --r-lg: 22px; --r-xl: 28px; --r-pill: 999px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --bg-page: #000000; --band: #0f0f10; --surface: #1c1c1e; --surface-2: #2c2c2e; --surface-3: #3a3a3c;
    --label: #f5f5f7; --label-2: rgba(235, 235, 245, .62); --label-3: rgba(235, 235, 245, .3);
    --separator: rgba(84, 84, 88, .55); --fill: rgba(118, 118, 128, .24); --fill-2: rgba(118, 118, 128, .32);
    --brand: #3d8bff; --brand-ink: #7db3ff; --brand-soft: #0e2244; --brand-hi: #7ee8f2; --brand-mid: #5dbafc; --brand-navy: #dce6f5;
    --rx: #119c8e; --rx-soft: #0f2f2c; --rx-ink: #40d6c4; --l4: #7d7aff; --l4-soft: #23224a; --gp: #0a84ff; --gp-soft: #0b2747; --night: #7d7aff; --hv: #ff9f43; --hv-soft: #3a2410; --hv-ink: #ffb36b;
    --ok: #30d158; --ok-ink: #30d158; --ok-soft: #10301a; --warn: #ff9f0a; --warn-ink: #ffb340; --warn-soft: #3a2608;
    --bad: #ff453a; --bad-ink: #ff6961; --bad-soft: #3d1311; --info: #0a84ff; --info-ink: #409cff; --info-soft: #0b2747;
    --glass: rgba(36, 36, 40, .58); --glass-strong: rgba(36, 36, 40, .8); --glass-edge: rgba(255, 255, 255, .14); --glass-line: rgba(255, 255, 255, .08);
    --glass-shadow: 0 10px 34px rgba(0, 0, 0, .5), 0 1px 3px rgba(0, 0, 0, .4);
    --shadow-card: 0 0 0 .5px rgba(255, 255, 255, .06);
    --shadow-pop: 0 18px 50px -12px rgba(0, 0, 0, .8), 0 0 0 .5px rgba(255, 255, 255, .08);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000; --bg-page: #000000; --band: #0f0f10; --surface: #1c1c1e; --surface-2: #2c2c2e; --surface-3: #3a3a3c;
  --label: #f5f5f7; --label-2: rgba(235, 235, 245, .62); --label-3: rgba(235, 235, 245, .3);
  --separator: rgba(84, 84, 88, .55); --fill: rgba(118, 118, 128, .24); --fill-2: rgba(118, 118, 128, .32);
  --brand: #3d8bff; --brand-ink: #7db3ff; --brand-soft: #0e2244; --brand-hi: #7ee8f2; --brand-mid: #5dbafc; --brand-navy: #dce6f5;
  --rx: #119c8e; --rx-soft: #0f2f2c; --rx-ink: #40d6c4; --l4: #7d7aff; --l4-soft: #23224a; --gp: #0a84ff; --gp-soft: #0b2747; --night: #7d7aff; --hv: #ff9f43; --hv-soft: #3a2410; --hv-ink: #ffb36b;
  --ok: #30d158; --ok-ink: #30d158; --ok-soft: #10301a; --warn: #ff9f0a; --warn-ink: #ffb340; --warn-soft: #3a2608;
  --bad: #ff453a; --bad-ink: #ff6961; --bad-soft: #3d1311; --info: #0a84ff; --info-ink: #409cff; --info-soft: #0b2747;
  --glass: rgba(36, 36, 40, .58); --glass-strong: rgba(36, 36, 40, .8); --glass-edge: rgba(255, 255, 255, .14); --glass-line: rgba(255, 255, 255, .08);
  --glass-shadow: 0 10px 34px rgba(0, 0, 0, .5), 0 1px 3px rgba(0, 0, 0, .4);
  --shadow-card: 0 0 0 .5px rgba(255, 255, 255, .06);
  --shadow-pop: 0 18px 50px -12px rgba(0, 0, 0, .8), 0 0 0 .5px rgba(255, 255, 255, .08);
  color-scheme: dark;
}

/* ───────── Base ───────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--label);
  font: 400 15px/1.45 var(--font); letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
body.page { background: var(--bg-page); font-size: 17px; line-height: 1.47; letter-spacing: -.022em; }
a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; border-radius: 10px; }
[hidden] { display: none !important; }
.num, .tnum { font-variant-numeric: tabular-nums; }
.rounded { font-family: var(--font-rounded); }
.muted { color: var(--label-2); }
.faint { color: var(--label-3); }
.ink-brand { color: var(--brand-ink); }
.nowrap { white-space: nowrap; }

/* Type scale (app) */
.t-large { font-size: 34px; line-height: 41px; font-weight: 700; letter-spacing: -.025em; margin: 0; text-wrap: balance; }
.t-title1 { font-size: 28px; line-height: 34px; font-weight: 700; letter-spacing: -.022em; margin: 0; text-wrap: balance; }
.t-title2 { font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: -.02em; margin: 0; text-wrap: balance; }
.t-title3 { font-size: 19px; line-height: 25px; font-weight: 600; letter-spacing: -.018em; margin: 0; }
.t-headline { font-size: 16px; line-height: 21px; font-weight: 600; margin: 0; }
.t-body { font-size: 15px; line-height: 21px; }
.t-sub { font-size: 14px; line-height: 19px; color: var(--label-2); }
.t-foot { font-size: 13px; line-height: 18px; color: var(--label-2); }
.t-cap { font-size: 12px; line-height: 16px; color: var(--label-2); }
/* Type scale (marketing, apple.com) */
.t-hero { font-size: clamp(40px, 6.4vw, 80px); line-height: 1.05; font-weight: 700; letter-spacing: -.035em; margin: 0; text-wrap: balance; }
.t-display { font-size: clamp(32px, 4.4vw, 56px); line-height: 1.07; font-weight: 700; letter-spacing: -.03em; margin: 0; text-wrap: balance; }
.t-intro { font-size: clamp(19px, 1.8vw, 24px); line-height: 1.38; font-weight: 500; letter-spacing: -.02em; color: var(--label-2); margin: 0; text-wrap: pretty; }
.t-eyebrow { font-size: 17px; font-weight: 600; color: var(--brand-ink); margin: 0; letter-spacing: -.01em; }

/* ───────── Icons (SF Symbols via mask, see sf.css) ───────── */
.sf { display: inline-block; width: 1em; height: 1em; flex: none; background-color: currentColor;
  -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; vertical-align: -.125em; }

/* Settings-style icon tile: <span class="tile rx"><i class="sf sf-pills-fill"></i></span> */
.tile { --c: var(--brand); width: 30px; height: 30px; border-radius: 8px; flex: none; display: inline-grid; place-items: center;
  color: #fff; font-size: 17px; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 82%, #fff) 0%, var(--c) 100%); }
.tile.lg { width: 44px; height: 44px; border-radius: 12px; font-size: 23px; }
.tile.xl { width: 60px; height: 60px; border-radius: 16px; font-size: 31px; }
.tile.soft { background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }
.tile.round { border-radius: 50%; }
.rx { --c: var(--rx); } .l4 { --c: var(--l4); } .gp { --c: var(--gp); } .hv { --c: var(--hv); } .night { --c: var(--night); }
.ok { --c: var(--ok); } .warn { --c: var(--warn); } .bad { --c: var(--bad); } .info { --c: var(--info); }
.pink { --c: var(--pink); } .orange { --c: var(--orange); } .purple { --c: var(--purple); } .cyan { --c: var(--cyan); }
.gray { --c: #8e8e93; } .mint { --c: var(--mint); } .yellow { --c: #f5b800; }

/* ───────── Layout ───────── */
.wrap { max-width: 1200px; margin-inline: auto; padding-inline: 24px; }
.wrap-narrow { max-width: 880px; margin-inline: auto; padding-inline: 24px; }
.stack { display: flex; flex-direction: column; gap: var(--gap, 12px); }
.row-flex { display: flex; align-items: center; gap: var(--gap, 12px); }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grid { display: grid; gap: var(--gap, 16px); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } .wrap, .wrap-narrow { padding-inline: 16px; } }
.min0 { min-width: 0; }

/* Health-style header wash: a soft color fading down into the background */
.wash { --w1: var(--brand-hi); --w2: var(--gp); position: relative; isolation: isolate; }
.wash::before { content: ""; position: absolute; inset: 0 0 auto 0; height: var(--wash-h, 360px); z-index: -1; pointer-events: none;
  background:
    linear-gradient(180deg, transparent 0%, var(--bg) 100%),
    linear-gradient(90deg, color-mix(in srgb, var(--w1) 34%, var(--bg)) 0%, color-mix(in srgb, var(--w2) 26%, var(--bg)) 100%); }
.wash.rxw { --w1: var(--rx); --w2: var(--brand-hi); }
.wash.l4w { --w1: var(--l4); --w2: var(--night); }
.wash.gpw { --w1: var(--gp); --w2: var(--cyan); }
.wash.hvw { --w1: var(--hv); --w2: var(--yellow); }
/* ───────── Health Wash (design system Mikołaja z Figmy, 22.10.2026; wartości: wizyty24-brief/HEALTH-WASH-tla.md) ─────────
   Jedna poświata u góry strony, H = 320 px, prekomponowane stopy sRGB (bez opacity, blur, nakładek), baza = ostatni stop.
   Użycie: <body class="wash hw-page"> + klasa wariantu na body (hw-blekit, hw-turkus…). Bez wariantu: samo tło bazy. */
.hw-page { --hw-base: #F2F1F6; background-color: var(--hw-base); }
.hw-page.wash::before { height: 320px; background: none; }
.hw-page.hw-roz { --hw-base: #F2F2F6; }
/* 22.10 (Mikołaj): pełne pastele Health Wash były za mocne → wszędzie łagodna poświata jak w dyspozytorni admina (.wash.hvw):
   dwa kolory w poziomie (34% i 26% z bazą), zanikające w dół. Każdy widok zostaje przy swoim kolorze. Pełne stopy z Figmy: HEALTH-WASH-tla.md. */
.hw-page:is(.hw-lawenda, .hw-roz, .hw-turkus, .hw-zolty, .hw-zielen, .hw-szmaragd, .hw-blekit, .hw-koral, .hw-morela, .hw-hvw)::before { height: 360px;
  background: linear-gradient(180deg, transparent 0%, var(--hw-base) 100%), linear-gradient(90deg, color-mix(in srgb, var(--hw1) 34%, var(--hw-base)) 0%, color-mix(in srgb, var(--hw2) 26%, var(--hw-base)) 100%); }
.hw-page.hw-blekit { --hw1: var(--gp); --hw2: var(--cyan); }
.hw-page.hw-turkus { --hw1: var(--rx); --hw2: var(--brand-hi); }
.hw-page.hw-lawenda { --hw1: var(--l4); --hw2: var(--night); }
.hw-page.hw-szmaragd { --hw1: var(--ok); --hw2: var(--mint); }
.hw-page.hw-zielen { --hw1: var(--ok); --hw2: var(--yellow); }
.hw-page.hw-koral { --hw1: var(--bad); --hw2: var(--pink); }
.hw-page.hw-zolty { --hw1: var(--warn); --hw2: var(--yellow); }
.hw-page.hw-roz { --hw1: var(--pink); --hw2: var(--purple); }
.hw-page:is(.hw-morela, .hw-hvw) { --hw1: var(--hv); --hw2: var(--yellow); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hw-page { background-color: var(--bg); } :root:not([data-theme="light"]) .hw-page.wash::before { display: none; } }
:root[data-theme="dark"] .hw-page { background-color: var(--bg); } :root[data-theme="dark"] .hw-page.wash::before { display: none; }

/* tła sekcji dopasowane do kolorów ikon w pasku bocznym */
.wash.calw { --w1: #ff6b81; --w2: #ffb38a; }
.wash.inw { --w1: #5856d6; --w2: #8ec5ff; }
.wash.grw { --w1: #8e8e93; --w2: #c7d2e0; }
.wash.amw { --w1: #ffb340; --w2: #ffd60a; }
.wash.page-bg::before { background: linear-gradient(180deg, transparent 0%, var(--bg-page) 100%), linear-gradient(90deg, color-mix(in srgb, var(--w1) 30%, var(--bg-page)) 0%, color-mix(in srgb, var(--w2) 22%, var(--bg-page)) 100%); }

/* ───────── Liquid Glass ───────── */
.glass { position: relative; background: var(--glass); -webkit-backdrop-filter: blur(22px) saturate(190%); backdrop-filter: blur(22px) saturate(190%);
  box-shadow: inset 0 1px 0 var(--glass-edge), inset 0 0 0 .5px var(--glass-line), var(--glass-shadow); }
.glass::after { /* specular rim, brighter top-left like iOS 26 */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; padding: 1px;
  background: linear-gradient(135deg, var(--glass-edge), transparent 38%, transparent 62%, color-mix(in srgb, var(--glass-edge) 50%, transparent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }

/* Floating top bar (landing + patient portal) */
.topbar { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 12px); z-index: 50; margin: 12px auto 0; max-width: 1200px; padding-inline: 16px; }
.topbar-in { display: flex; align-items: center; gap: 8px; height: 56px; padding: 0 8px 0 18px; border-radius: var(--r-pill); }
.topbar .brand { margin-right: 10px; }
.topbar .spacer { flex: 1; }
.navtabs { display: flex; gap: 2px; padding: 4px; border-radius: var(--r-pill); }
.navtabs a { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: var(--r-pill);
  color: var(--label); font-size: 14px; font-weight: 500; white-space: nowrap; text-decoration: none; transition: background .2s; }
.navtabs a:hover { background: var(--fill); }
.navtabs a.on { background: var(--surface); color: var(--brand-ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 0 0 .5px rgba(0,0,0,.04); }
@media (max-width: 860px) { .navtabs .lbl { display: none; } .navtabs a { padding: 0 11px; } }

/* Brand lockup: <a class="brand" href="..."><span data-logo></span><b>zdrofi</b></a> */
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--label); text-decoration: none !important; }
.brand b { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } /* wordmark is inside the logo SVG */
.brand [data-logo] { display: block; line-height: 0; }
.brand svg { height: 26px; width: auto; display: block; }
.brand small { font-size: 12px; font-weight: 600; color: var(--label-2); padding: 3px 8px; border-radius: 99px; background: var(--fill); margin-left: 2px; }

/* Sidebar shell (doctor + admin): floating glass sidebar like iPadOS 26 */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .28s var(--ease, ease); }
/* Zwijany pasek boczny (panel lekarza i admin). Zwijanie jest płynne: zmienia się tylko szerokość kolumny,
   ikony zostają dokładnie w tym samym miejscu, podpisy łagodnie znikają (nic nie przeskakuje).
   Przełącznik: ikona paska bocznego obok logo (w trybie zwiniętym w miejscu logo po najechaniu) albo klawisz [. */
.side-top { display: flex; align-items: center; gap: 4px; }
.side-top .brand { min-width: 0; }
.side-top { position: relative; }
.side-toggle { margin-left: auto; flex: none; width: 32px; height: 32px; border: 0; border-radius: 10px; background: none; color: var(--label-2); display: grid; place-items: center; cursor: pointer; transition: background .15s, color .15s, opacity .2s; }
.side-toggle:hover { background: var(--fill); color: var(--label); }
.side-toggle:active { transform: scale(.92); }
.side-toggle .sf { font-size: 17px; }
@media (min-width: 901px) {
  .shell { transition: grid-template-columns .32s cubic-bezier(.2, .75, .2, 1); }
  .shell > .main { grid-column: 2; }
  .sidebar-in { overflow-x: hidden; }
  .side-t, .side-a .count, .side-a .s-t, .side-h, .sidebar .brand b, .sidebar .brand small, .me-row > :not(.avatar), .side-live, .me > :not(.avatar) { transition: opacity .22s ease .12s; }
  .side-foot .duty, .side-foot .me-row, .side-foot .me, .side-live { min-width: 222px; }
  .sidebar-in > * { flex-shrink: 0; }
  .sidebar .brand { overflow: hidden; }
  .sidebar .brand [data-logo] { display: block; flex: none; max-width: 140px; overflow: hidden; transition: max-width .32s cubic-bezier(.2, .75, .2, 1); }
  .side-a.sub { transition: height .32s cubic-bezier(.2, .75, .2, 1), opacity .2s ease; overflow: hidden; }
  .side-foot .duty { max-height: 320px; overflow: hidden; transition: max-height .32s cubic-bezier(.2, .75, .2, 1), opacity .22s ease .12s, padding .32s, margin .32s; }
  html.side-mini .shell { grid-template-columns: 78px minmax(0, 1fr); }
  html.side-mini .side-toggle { position: absolute; left: 50%; top: 50%; margin: 0; transform: translate(-50%, -50%); opacity: 0; background: var(--surface); box-shadow: 0 1px 4px rgba(23, 42, 69, .14); }
  html.side-mini .side-top:hover .side-toggle, html.side-mini .side-toggle:focus-visible { opacity: 1; }
  html.side-mini .side-top:hover .brand { opacity: 0; }
  .side-top .brand { transition: opacity .2s; }
  html.side-mini .side-t, html.side-mini .side-a .count, html.side-mini .side-a .s-t, html.side-mini .side-h, html.side-mini .sidebar .brand b,
  html.side-mini .sidebar .brand small, html.side-mini .me-row > :not(.avatar), html.side-mini .side-live, html.side-mini .me > :not(.avatar) { opacity: 0; pointer-events: none; }
  html.side-mini .sidebar .brand [data-logo] { max-width: 27px; }
  html.side-mini .side-t, html.side-mini .side-a .count, html.side-mini .side-a .s-t, html.side-mini .side-h, html.side-mini .sidebar .brand b, html.side-mini .sidebar .brand small,
  html.side-mini .me-row > :not(.avatar), html.side-mini .side-live, html.side-mini .me > :not(.avatar) { transition: opacity .1s ease; }
  html.side-mini .side-foot .duty { transition: max-height .32s cubic-bezier(.2, .75, .2, 1), opacity .1s ease, padding .32s, margin .32s; }
  html.side-mini .sidebar .side-a.sub { height: 0; opacity: 0; }
  html.side-mini .side-foot .duty { max-height: 0; opacity: 0; padding-top: 0; padding-bottom: 0; margin: 0; border-width: 0; }
  html.side-mini .side-a .badge { position: absolute; left: 31px; top: 5px; min-width: 9px; height: 9px; padding: 0; font-size: 0; box-shadow: 0 0 0 2px var(--surface); }
  html.side-mini .side-a .badge.w { background: var(--warn); }
  html.side-mini .side-a .live-dot { position: absolute; left: 36px; top: 6px; margin: 0; }
  html.side-mini .sidebar .brand { cursor: pointer; }
}

.sidebar { position: sticky; top: 0; height: 100vh; padding: 10px 0 10px 10px; }
.sidebar-in { height: 100%; border-radius: 24px; padding: 16px 10px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.sidebar .brand { padding: 4px 10px 14px; }
.side-h { font-size: 12px; font-weight: 600; color: var(--label-2); padding: 14px 12px 6px; }
.side-a { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 12px; white-space: nowrap; min-width: 0; border-radius: 12px; color: var(--label); font-size: 15px; font-weight: 500; text-decoration: none !important; }
@media (min-width: 901px) and (max-height: 960px) { .side-a { height: 34px; } .side-h { padding-top: 10px; padding-bottom: 4px; } }   /* 04.11: niższe okna (laptop 900 px): menu i karta dyżuru mieszczą się bez przewijania */
.side-a .sf { color: var(--brand); font-size: 18px; width: 22px; }
.side-a .count { margin-left: auto; font-size: 13px; color: var(--label-2); font-variant-numeric: tabular-nums; }
.side-a:hover { background: var(--fill); }
/* Zaznaczenie jak w pasku bocznym iPadOS: delikatne tło w kolorze marki, tekst i ikona w kolorze marki.
   Ikony zawsze w kolorze marki, liczniki NIE zmieniają koloru po zaznaczeniu. */
.side-a { --c: var(--brand); --ci: var(--brand-ink); }
.side-a.on { background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--ci); font-weight: 600; }
.side-a.on:hover { background: color-mix(in srgb, var(--c) 19%, transparent); }
.side-a.on .sf { color: var(--c); }
.side-a.on .count { color: var(--ci); }
/* kolor sekcji (ikona, podświetlenie zaznaczenia, tekst zaznaczenia) */
.side-a:has(.sf-car-fill), .side-a:has(.sf-house-fill) { --c: #f27a1a; --ci: #b55500; }
.side-a:has(.sf-square-and-pencil), .side-a:has(.sf-tag-fill) { --c: #ff9500; --ci: #9c5a00; }
.side-a:has(.sf-list-bullet-clipboard-fill), .side-a:has(.sf-list-bullet-rectangle-fill) { --c: #5856d6; --ci: #4240b8; }
.side-a:has(.sf-calendar) { --c: #ff2d55; --ci: #c41e3d; }
.side-a:has(.sf-gearshape-fill) { --c: #636366; --ci: #3a3a3c; }
.side-a:has(.sf-stethoscope) { --c: #0d9488; --ci: #0b7a70; }
.side-a:has(.sf-person-2-fill), .side-a:has(.sf-network) { --c: #007aff; --ci: #0062cc; }
.side-a:has(.sf-creditcard-fill), .side-a:has(.sf-banknote-fill), .side-a:has(.sf-checkmark-seal-fill) { --c: #1f9d55; --ci: #167a42; }
.side-a:has(.sf-eye-fill) { --c: #8e44d6; --ci: #6f2fb3; }
.side-a:has(.sf-exclamationmark-bubble-fill) { --c: #ff3b30; --ci: #c4231b; }
.side-a:has(.sf-chart-bar-xaxis) { --c: #bf5af2; --ci: #9a3cc8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .side-a { --ci: color-mix(in srgb, var(--c) 70%, #fff); } }
:root[data-theme="dark"] .side-a { --ci: color-mix(in srgb, var(--c) 70%, #fff); }
.side-a .badge { background: var(--brand); color: #fff; }
/* Ikony w pasku bocznym: same kolorowe symbole z gradientem (jak SF Symbols), BEZ kafelków pod spodem.
   Kolor ikony nie zmienia się po zaznaczeniu pozycji. */
.side-ic { width: 22px; height: 22px; flex: none; display: grid; place-items: center; }
.side-ic .sf { width: 1em; height: 1em; font-size: 18px; background: var(--g, var(--brand)); }
.side-ic .sf-tray-full-fill, .side-ic .sf-gauge-with-dots-needle-67percent { --g: linear-gradient(160deg, #6ee2ee, #2a7bff 70%); }
.side-ic .sf-car-fill, .side-ic .sf-house-fill { --g: linear-gradient(160deg, #ffc35c, #f27a1a 75%); }
.side-ic .sf-square-and-pencil, .side-ic .sf-tag-fill { --g: linear-gradient(160deg, #ffd60a, #ff9500 75%); }
.side-ic .sf-list-bullet-clipboard-fill, .side-ic .sf-list-bullet-rectangle-fill { --g: linear-gradient(160deg, #a5a3ff, #5856d6 75%); }
.side-ic .sf-calendar { --g: linear-gradient(160deg, #ff7a7a, #ff2d55 75%); }
.side-ic .sf-gearshape-fill { --g: linear-gradient(160deg, #aeaeb2, #636366 75%); }
.side-ic .sf-stethoscope { --g: linear-gradient(160deg, #5ee0c8, #0d9488 75%); }
.side-ic .sf-person-2-fill, .side-ic .sf-network { --g: linear-gradient(160deg, #64d2ff, #007aff 75%); }
.side-ic .sf-creditcard-fill, .side-ic .sf-banknote-fill, .side-ic .sf-checkmark-seal-fill { --g: linear-gradient(160deg, #5be27c, #1f9d55 75%); }
.side-ic .sf-eye-fill { --g: linear-gradient(160deg, #da8fff, #8e44d6 75%); }
.side-ic .sf-exclamationmark-bubble-fill { --g: linear-gradient(160deg, #ffa95c, #ff3b30 75%); }
.side-ic .sf-chart-bar-xaxis { --g: linear-gradient(160deg, #ff8ad8, #bf5af2 75%); }
.side-a .badge.w { background: var(--warn-soft); color: var(--warn-ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 35%, transparent); }
.main { padding: 22px 32px 120px; min-width: 0; }
.main-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 18px 0 22px; flex-wrap: wrap; }
@media (max-width: 900px) { .side-toggle { display: none; } .shell { grid-template-columns: minmax(0, 1fr); } .sidebar { position: static; height: auto; padding: 10px; } .sidebar-in { flex-direction: row; flex-wrap: wrap; } .side-h { display: none; } .main { padding: 12px 16px 120px; } }

/* ───────── Buttons ───────── */
.btn { --c: var(--brand); display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 40px; padding: 0 18px;
  border: 0; border-radius: var(--r-pill); font-size: 15px; font-weight: 600; white-space: nowrap; text-decoration: none !important;
  background: var(--fill); color: var(--label); transition: transform .12s, filter .15s, background .15s; }
.btn:hover { filter: brightness(.97); }
.btn:active { transform: scale(.97); }
.btn .sf { font-size: 1.05em; }
.btn-primary { background: var(--c); color: #fff; }
.btn-primary:hover { filter: brightness(1.06); }
.btn-tinted { background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }
.btn-tinted:not([class*=" gp"]):not(.l4):not(.bad):not(.hv):not(.rx) { color: var(--brand-ink); } .btn-tinted.rx { color: var(--rx-ink); }
.btn-tinted.l4 { color: var(--l4); } .btn-tinted.hv { color: var(--hv-ink); } .btn-tinted.gp { color: var(--gp); } .btn-tinted.bad { color: var(--bad-ink); }
.btn-gray { background: var(--fill); color: var(--label); }
.btn-plain { background: transparent; color: var(--brand-ink); padding-inline: 8px; }
.btn-glass { background: var(--glass); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  box-shadow: inset 0 1px 0 var(--glass-edge), inset 0 0 0 .5px var(--glass-line), 0 4px 16px rgba(0,0,0,.08); color: var(--label); }
.btn-white { background: var(--surface); color: var(--label); box-shadow: 0 0 0 .5px var(--separator), var(--shadow-card); }
.btn-danger { background: var(--bad-soft); color: var(--bad-ink); }
.btn-lg { height: 52px; padding: 0 26px; font-size: 17px; }
.btn-sm { height: 32px; padding: 0 13px; font-size: 13px; gap: 5px; }
.btn-block { display: flex; width: 100%; }
.btn-icon { width: 40px; padding: 0; }
.btn-icon.btn-sm { width: 32px; } .btn-icon.btn-lg { width: 52px; }
.btn[disabled], .btn.is-disabled { opacity: .4; pointer-events: none; }
.btn-group { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--r-pill); }

/* ───────── Cards ───────── */
.card { background: var(--surface); border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--shadow-card); min-width: 0; }
.card.pad-lg { padding: 26px 28px; }
.card.flush { padding: 0; overflow: hidden; }
.card.well { background: var(--surface-2); box-shadow: none; }
.card-glass { border-radius: var(--r-lg); padding: 18px 20px; }
/* Health-style card header: colored icon + colored category, meta on the right */
.card-head { display: flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 600; color: var(--c, var(--brand-ink)); margin-bottom: 10px; }
.card-head .sf { font-size: 16px; }
.card-head .meta { margin-left: auto; font-size: 14px; font-weight: 400; color: var(--label-2); display: inline-flex; align-items: center; gap: 4px; }
.card-head .meta .sf { font-size: 12px; color: var(--label-3); }
.card-head.rx { color: var(--rx-ink); } .card-head.l4 { color: var(--l4); } .card-head.gp { color: var(--gp); } .card-head.hv { color: var(--hv-ink); }
.card-head.ok { color: var(--ok-ink); } .card-head.warn { color: var(--warn-ink); } .card-head.bad { color: var(--bad-ink); } .card-head.night { color: var(--night); }
.section-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 30px 2px 12px; }
.section-h h2, .section-h h3 { font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: -.02em; margin: 0; }
.section-h a { font-size: 15px; font-weight: 500; }

/* Big Health-style metric: <div class="metric"><b>3</b><span>min</span></div> */
.metric { display: flex; align-items: baseline; gap: 4px; font-family: var(--font-rounded); }
.metric b { font-size: 34px; line-height: 1.05; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--label); }
.metric span { font-size: 15px; font-weight: 600; color: var(--label-2); }
.metric.sm b { font-size: 26px; } .metric.lg b { font-size: 48px; }

/* ───────── Grouped lists (Settings) ───────── */
.group { background: var(--surface); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-card); }
.group-h { font-size: 13px; color: var(--label-2); padding: 0 18px 7px; margin-top: 22px; }
.group-f { font-size: 13px; color: var(--label-2); padding: 7px 18px 0; }
.li { display: flex; align-items: center; gap: 13px; min-height: 52px; padding: 10px 18px; position: relative; color: var(--label); text-decoration: none !important; }
.li + .li::before { content: ""; position: absolute; top: 0; right: 0; left: var(--sep-inset, 18px); border-top: .5px solid var(--separator); }
.li.has-tile { --sep-inset: 61px; }
.li.has-tile-lg { --sep-inset: 75px; }
.li .li-main { flex: 1; min-width: 0; }
.li .li-t { font-size: 16px; line-height: 21px; font-weight: 500; }
.li .li-s { font-size: 14px; line-height: 19px; color: var(--label-2); overflow: hidden; text-overflow: ellipsis; }
.li .li-v { font-size: 15px; color: var(--label-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.li .chev { color: var(--label-3); font-size: 13px; }
a.li:hover, button.li:hover { background: color-mix(in srgb, var(--fill) 50%, transparent); }
button.li { width: 100%; border: 0; background: none; text-align: left; font: inherit; }

/* ───────── Pills, badges, chips ───────── */
.pill { --c: var(--label-2); display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: var(--r-pill);
  font-size: 12.5px; font-weight: 600; white-space: nowrap; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { color: var(--ok-ink); background: var(--ok-soft); } .pill.warn { color: var(--warn-ink); background: var(--warn-soft); }
.pill.bad { color: var(--bad-ink); background: var(--bad-soft); } .pill.info { color: var(--info-ink); background: var(--info-soft); }
.pill.rx { color: var(--rx-ink); background: var(--rx-soft); } .pill.hv { color: var(--hv-ink); background: var(--hv-soft); } .pill.l4 { color: var(--l4); background: var(--l4-soft); } .pill.gp { color: var(--gp); background: var(--gp-soft); }
.pill.gray { color: var(--label-2); background: var(--fill); } .pill.night { color: var(--night); background: var(--l4-soft); }
.pill.solid { background: var(--c); color: #fff; }
.pill.lg { height: 30px; padding: 0 13px; font-size: 14px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); animation: pulse 2s infinite; flex: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 55%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 15px; border-radius: var(--r-pill); background: var(--surface); color: var(--label);
  font-size: 14px; font-weight: 500; box-shadow: 0 0 0 .5px var(--separator); white-space: nowrap; border: 0; text-decoration: none !important; }
.chip .sf { color: var(--c, var(--brand)); }
.chip.on { background: var(--brand); color: #fff; box-shadow: none; } .chip.on .sf { color: #fff; }

/* ───────── Controls ───────── */
.seg { display: inline-flex; padding: 3px; border-radius: var(--r-pill); background: var(--fill); gap: 2px; }
.seg button, .seg a { height: 32px; padding: 0 15px; border: 0; border-radius: var(--r-pill); background: transparent; font-size: 14px; font-weight: 500; color: var(--label); white-space: nowrap; text-decoration: none !important; display: inline-flex; align-items: center; gap: 6px; }
.seg .on { background: var(--surface); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.1), 0 0 0 .5px rgba(0,0,0,.04); }
.seg.block { display: flex; } .seg.block > * { flex: 1; justify-content: center; }

.search { display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 14px; border-radius: var(--r-pill); background: var(--fill); color: var(--label-2); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 15px; color: var(--label); }
.search input::placeholder { color: var(--label-2); }
.search .sf { font-size: 16px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: 13px; font-weight: 600; color: var(--label-2); }
.input, .select, .textarea { width: 100%; min-height: 46px; padding: 11px 14px; border-radius: 13px; border: 0; background: var(--surface-2); color: var(--label); font-size: 16px; outline: 0; box-shadow: inset 0 0 0 .5px var(--separator); }
.card .input, .card .select, .card .textarea { background: var(--surface-2); }
.input:focus, .select:focus, .textarea:focus { box-shadow: inset 0 0 0 2px var(--brand); }
.textarea { min-height: 96px; resize: vertical; line-height: 1.4; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--label-2) 50%), linear-gradient(135deg, var(--label-2) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }

/* iOS 26 switch: <button class="switch on" role="switch" aria-checked="true"></button> */
.switch { width: 52px; height: 30px; border-radius: 15px; border: 0; padding: 0; background: var(--fill-2); position: relative; flex: none; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 34px; height: 26px; border-radius: 13px; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.18), 0 0 0 .5px rgba(0,0,0,.04); transition: transform .25s cubic-bezier(.3,1.4,.5,1); }
.switch.on { background: var(--ok); }
.switch.on::after { transform: translateX(14px); }

/* Radio-style selectable rows / option cards */
.option { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 18px; background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 14px -6px rgba(0,0,0,.1); /* 24.10: bez obrysu, karta = tło + cień */ cursor: pointer; border: 0; width: 100%; text-align: left; color: var(--label); }
.option.on { box-shadow: 0 0 0 2px var(--brand); background: color-mix(in srgb, var(--brand) 5%, var(--surface)); }
.check { width: 24px; height: 24px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1.5px var(--label-3); display: grid; place-items: center; color: #fff; font-size: 12px; }
.on > .check, .check.on { background: var(--brand); box-shadow: none; }
.on > .check::before, .check.on::before { content: ""; width: 11px; height: 6px; border-left: 2.2px solid #fff; border-bottom: 2.2px solid #fff; transform: translateY(-1px) rotate(-45deg); }

/* ───────── Avatars ───────── */
.avatar { --a1: #a8b0bd; --a2: #858b96; width: 40px; height: 40px; border-radius: 50%; flex: none; display: inline-grid; place-items: center; color: #fff;
  font-family: var(--font-rounded); font-weight: 600; font-size: 15px; letter-spacing: .01em; background: linear-gradient(180deg, var(--a1), var(--a2)); position: relative; }
.avatar.sm { width: 30px; height: 30px; font-size: 12px; } .avatar.lg { width: 56px; height: 56px; font-size: 21px; } .avatar.xl { width: 84px; height: 84px; font-size: 32px; }
.avatar.c1 { --a1: #5ee0cf; --a2: #0d9488; } .avatar.c2 { --a1: #8fb8ff; --a2: #3d7bf0; } .avatar.c3 { --a1: #b3a9ff; --a2: #6a5ae0; }
.avatar.c4 { --a1: #ffb38a; --a2: #f2733a; } .avatar.c5 { --a1: #ff9fb6; --a2: #e8476f; } .avatar.c6 { --a1: #9fdc8c; --a2: #43a047; }
.avatar .presence { position: absolute; right: -1px; bottom: -1px; width: 30%; height: 30%; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 2.5px var(--surface); }

/* ───────── Status timeline (vertical) ───────── */
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.timeline li { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; position: relative; padding-bottom: 18px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: 13px; top: 26px; bottom: 0; width: 2px; background: var(--fill-2); border-radius: 1px; }
.timeline li:last-child::before { display: none; }
.timeline .node { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--label-3); font-size: 13px; box-shadow: inset 0 0 0 1.5px var(--fill-2); z-index: 1; }
.timeline .done .node { background: var(--brand); color: #fff; box-shadow: none; }
.timeline .done::before { background: var(--brand); }
.timeline .now .node { background: var(--surface); color: var(--brand); box-shadow: inset 0 0 0 2px var(--brand), 0 0 0 5px color-mix(in srgb, var(--brand) 18%, transparent); }
.timeline .tl-t { font-weight: 600; font-size: 15px; line-height: 20px; }
.timeline .tl-s { font-size: 13px; color: var(--label-2); line-height: 18px; }
.timeline .tl-time { font-size: 13px; color: var(--label-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.timeline .todo .tl-t { color: var(--label-2); font-weight: 500; }

/* Horizontal stepper for multi-step flows */
.steps { display: flex; gap: 6px; align-items: center; }
.steps .st { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--label-2); white-space: nowrap; }
.steps .st i { font-style: normal; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--fill); color: var(--label-2); font-variant-numeric: tabular-nums; }
.steps .st.done i { background: var(--brand); color: #fff; } .steps .st.now { color: var(--label); font-weight: 600; } .steps .st.now i { background: var(--label); color: var(--bg); }
.steps .bar { flex: 1; min-width: 16px; height: 2px; border-radius: 1px; background: var(--fill-2); } .steps .bar.done { background: var(--brand); }
.progress { height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; } .progress > span { display: block; height: 100%; border-radius: 3px; background: var(--brand); }

/* ───────── Chat ───────── */
.chat { display: flex; flex-direction: column; gap: 6px; }
.msg { max-width: 76%; padding: 9px 14px; border-radius: 20px; font-size: 15px; line-height: 20px; background: var(--surface-2); color: var(--label); align-self: flex-start; }
.msg.me { align-self: flex-end; background: var(--brand); color: #fff; }
.msg-meta { font-size: 11.5px; color: var(--label-2); padding: 2px 10px 8px; }
.msg-meta.me { align-self: flex-end; }
.msg-sys { align-self: center; font-size: 12px; color: var(--label-2); padding: 6px 0; text-align: center; }
.composer { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 16px; border-radius: var(--r-pill); background: var(--surface-2); box-shadow: inset 0 0 0 .5px var(--separator); }
.composer input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 15px; height: 32px; }

/* ───────── Tables ───────── */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--label-2); padding: 10px 14px; border-bottom: .5px solid var(--separator); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: .5px solid var(--separator); vertical-align: middle; font-variant-numeric: tabular-nums; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: color-mix(in srgb, var(--fill) 45%, transparent); }
.table .r { text-align: right; }

/* ───────── Misc ───────── */
.divider { height: .5px; background: var(--separator); border: 0; margin: 14px 0; }
.kbd { font: 600 12px var(--font); padding: 2px 6px; border-radius: 6px; background: var(--fill); color: var(--label-2); }
.code-digits { display: inline-flex; gap: 6px; }
.code-digits span { width: 46px; height: 58px; border-radius: 14px; background: var(--surface-2); display: grid; place-items: center; font: 700 30px var(--font-rounded); font-variant-numeric: tabular-nums; color: var(--label); box-shadow: inset 0 0 0 .5px var(--separator); }
.qr { width: 160px; height: 160px; padding: 10px; background: #fff; border-radius: 16px; box-shadow: 0 0 0 .5px rgba(0,0,0,.08); }
.qr canvas, .qr img { width: 100% !important; height: 100% !important; image-rendering: pixelated; }
.empty { text-align: center; padding: 40px 20px; color: var(--label-2); }
/* Stany danych z W24State (zdrofi.js): szkielet, pusto, błąd, nie doręczono. Ikona bez kafelka, bez obramowań. */
.st-row > td { padding: 0 !important; border: 0 !important; }
.st-note-r > td { padding: 10px 12px 0 !important; } li.st-note-r { list-style: none; }
.st-skel { display: flex; flex-direction: column; gap: 2px; padding: 6px 0; }
.st-skel-r { display: flex; flex-direction: column; gap: 8px; padding: 13px 18px; }
.st-skel-r span { display: block; height: 11px; border-radius: 6px; background: var(--fill); }
.st-skel-r span + span { height: 9px; opacity: .7; }
@media (prefers-reduced-motion: no-preference) {
  .st-skel-r span { background: linear-gradient(90deg, var(--fill) 0%, color-mix(in srgb, var(--fill) 35%, transparent) 50%, var(--fill) 100%) 0 0 / 300% 100%; animation: st-shimmer 1.4s ease-in-out infinite; }
}
@keyframes st-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
.st-empty, .st-err { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 34px 20px; }
.st-empty > .sf, .st-err > .sf { font-size: 30px; color: var(--label-3); margin-bottom: 4px; }
.st-err > .sf { color: var(--warn); }
.st-empty .st-t, .st-err .st-t { margin: 0; font-size: 16px; font-weight: 600; color: var(--label); }
.st-empty .st-x, .st-err .st-x { margin: 0; font-size: 14px; line-height: 19px; color: var(--label-2); max-width: 340px; text-wrap: pretty; }
.st-empty .btn, .st-err .btn { margin-top: 10px; }
.st-note { display: flex; align-items: center; gap: 11px; padding: 11px 14px; margin-bottom: 10px; border-radius: 14px; background: var(--warn-soft); color: var(--warn-ink); text-align: left; }
.st-note > .sf { font-size: 18px; color: var(--warn); }
.st-note-m { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; font-size: 13px; line-height: 18px; }
.st-note-m b { font-size: 14px; font-weight: 600; color: var(--label); }
.st-note-m span { color: var(--label-2); }
@media (max-width: 600px) { .st-note { flex-wrap: wrap; } .st-note .btn { margin-left: 29px; } }
/* opcja dla stron pacjenta i www (zasada 24.10): <body class="icons-bare"> albo na kontenerze → .tile bez kwadratowej podkładki, sam kolorowy symbol */
.icons-bare .tile { background: none !important; box-shadow: none !important; color: var(--c); }
.icons-bare .tile > .sf { background: linear-gradient(180deg, color-mix(in srgb, var(--c) 62%, #fff), var(--c)); }
.icons-bare .tile.lg { font-size: 26px; } .icons-bare .tile.xl { font-size: 36px; }
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); padding: 12px 18px; border-radius: var(--r-pill); font-size: 14px; font-weight: 600; z-index: 90; display: flex; align-items: center; gap: 8px; }
.spark { display: block; width: 100%; height: 44px; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 140px; }
.bars > span { flex: 1; border-radius: 6px 6px 3px 3px; background: var(--brand); min-height: 4px; position: relative; }
.bars > span.dim { background: color-mix(in srgb, var(--brand) 28%, var(--surface-2)); }

/* Demo (zdrofi.js, 07.11): przycisk „Demo” nad „Uwagami” (assets/uwagi.js) i panel nad nim — nie są częścią produktu */
.proto-fab { position: fixed; right: 16px; bottom: calc(env(safe-area-inset-bottom, 0px) + 66px); z-index: 2147482990; display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 15px 0 12px; border: 0; border-radius: 999px; background: #1d1d1f; color: #fff; font: 600 13.5px/1 var(--font, -apple-system, BlinkMacSystemFont, sans-serif); box-shadow: 0 8px 24px -8px rgba(0, 0, 0, .45); cursor: pointer; }
.proto-fab .sf { font-size: 16px; }
.proto-fab b { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--brand); color: #fff; font-size: 12px; display: inline-grid; place-items: center; }
.proto-fab.on { background: var(--brand); } .proto-fab.on b { background: #fff; color: var(--brand); }
.proto { position: fixed; right: 16px; bottom: calc(env(safe-area-inset-bottom, 0px) + 116px); z-index: 2147482991; width: min(340px, calc(100vw - 24px)); max-height: min(70vh, 640px); overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 22px; background: var(--surface); color: var(--label); box-shadow: 0 24px 60px -16px rgba(0, 0, 0, .38), 0 0 0 .5px rgba(0, 0, 0, .08); }
.proto[hidden] { display: none; }
.proto .proto-l { order: 0; display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 0 10px; padding: 2px 2px 6px 6px; }
.proto .proto-l b { font-size: 17px; font-weight: 700; }
.proto .proto-l small { grid-column: 1; font-size: 12.5px; line-height: 16px; color: var(--label-2); }
.proto .proto-x { grid-column: 2; grid-row: 1 / span 2; width: 30px; height: 30px; border: 0; border-radius: 50%; background: var(--fill); color: var(--label-2); display: grid; place-items: center; cursor: pointer; }
.proto .proto-sh { font-size: 12px; font-weight: 600; color: var(--label-2); padding: 8px 6px 4px; }
.proto .proto-here { order: 1; }
.proto .proto-here-in { display: flex; flex-direction: column; gap: 6px; }
.proto .proto-here .c-demo { display: flex; flex-direction: column; align-items: stretch; gap: 6px; margin: 0; padding: 0; border: 0; background: none; font-size: 12.5px; color: var(--label-2); }
.proto .proto-here .c-demo > span { display: none; } /* opis kroku zastępuje nagłówek „Na tym ekranie” */
.proto .proto-here .c-demo-b { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.proto .proto-here .c-demo .btn, .proto .proto-here .cz-demo { width: 100%; justify-content: flex-start; text-align: left; white-space: normal; margin: 0 !important; flex: none; }
.proto .proto-here .c-demo .btn { min-height: 40px; height: auto; padding: 8px 12px; border-radius: 14px; background: color-mix(in srgb, var(--info) 10%, var(--surface)); box-shadow: none; font-size: 14px; font-weight: 600; color: var(--label); }
.proto .proto-here .c-scen-s { width: 100%; }
.proto .proto-here .cz-demo { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 12px; border: 0; border-radius: 14px; background: color-mix(in srgb, var(--info) 10%, var(--surface)); color: var(--label); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.proto .proto-here .cz-demo .cz-tag { display: none; }
.proto > .proto-sw, .proto > .proto-st { order: 2; display: flex; align-items: center; gap: 9px; min-height: 40px; padding: 8px 12px; border: 0; border-radius: 14px; background: var(--fill); color: var(--label); font: inherit; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; }
.proto > .proto-sw:hover, .proto > .proto-st:hover { background: color-mix(in srgb, var(--label) 10%, var(--surface)); }
.proto > .proto-sw .sf, .proto > .proto-st .sf { color: var(--brand); font-size: 16px; }
.proto > .proto-sw .lbl { flex: 1; }
.proto > .proto-sw .switch { transform: scale(.8); margin: -4px -6px; pointer-events: none; }
.proto > .proto-st.on { background: var(--warn-soft); color: var(--warn-ink); }
.proto > .proto-st::after { content: ""; width: 7px; height: 7px; margin: -4px 4px 0 0; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); opacity: .45; pointer-events: none; }
.proto > .proto-st select { flex: 1; min-width: 0; appearance: none; -webkit-appearance: none; border: 0; background: transparent; font: inherit; font-weight: 600; color: inherit; cursor: pointer; outline: 0; }
.proto > .proto-re { order: 3; background: none; box-shadow: inset 0 0 0 1px var(--separator); }
.proto .proto-views { order: 4; }
.proto .proto-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.proto .proto-grid a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px 9px; border-radius: 14px; background: var(--fill); font-size: 12.5px; font-weight: 600; color: var(--label); text-decoration: none !important; }
.proto .proto-grid a .sf { font-size: 18px; color: var(--brand); }
.proto .proto-grid a:hover { background: color-mix(in srgb, var(--label) 10%, var(--surface)); }
.proto .proto-grid a.on { background: var(--label); color: var(--bg-page); } .proto .proto-grid a.on .sf { color: inherit; }
.demo-slot { display: inline-block; width: 0; height: 0; }
@media (max-width: 700px) {
  .proto-fab { right: 12px; bottom: calc(env(safe-area-inset-bottom, 0px) + 146px); height: 42px; padding: 0 11px; opacity: .92; }
  .proto-fab > span { display: none; }
  .proto { right: 12px; left: 12px; width: auto; bottom: calc(env(safe-area-inset-bottom, 0px) + 196px); max-height: 60vh; }
}
@media print { .proto, .proto-fab { display: none !important; } }
/* propozycja „wybór wizyt”: elementy widoczne tylko po włączeniu (html.wybor) albo tylko bez niej */
html:not(.wybor) [data-wybor-only] { display: none !important; }
html.wybor [data-wybor-hide] { display: none !important; }
/* propozycja „model zamawiania v4” (25.10): html.v4 */
html:not(.v4) [data-v4-only] { display: none !important; }
/* wersja czysta (27.10): html.czysta — bez przykładowych danych; [data-pelna-only] tylko w pełnej makiecie, [data-czysta-only] tylko w czystej */
html.czysta [data-pelna-only] { display: none !important; }
html:not(.czysta) [data-czysta-only] { display: none !important; }
html.v4 [data-v4-hide] { display: none !important; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Payment acceptance marks: <span class="paymark apple"><img src="assets/pay/applepay.svg" alt="Apple Pay"></span> */
.paymarks { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; vertical-align: middle; }
.paymark { display: inline-grid; place-items: center; height: 34px; min-width: 54px; padding: 0 9px; border-radius: 9px; background: #fff; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); flex: none; }
.paymark img { display: block; width: auto; height: 18px; }
.paymark.apple img { height: 21px; } .paymark.gpay img { height: 21px; } .paymark.visa img { height: 12px; } .paymark.mc img { height: 21px; }
.paymark.blik { padding: 0; min-width: 0; background: transparent; box-shadow: none; } .paymark.blik img { height: 34px; }
.paymark.sm { height: 26px; min-width: 42px; padding: 0 7px; border-radius: 7px; } .paymark.sm img { height: 14px; } .paymark.sm.visa img { height: 9px; } .paymark.blik.sm img { height: 26px; }
.paymark.on { box-shadow: 0 0 0 2px var(--brand); }

/* ───────── Ruch w panelach (22.10.2026, Mikołaj: „wszystko tak sucho”) ─────────
   Lekkie, krótkie przejścia: wejście ekranu, zakładek i list, płynne zaznaczanie, sprężyste kliknięcie.
   Tylko gdy system nie prosi o ograniczenie ruchu. */
@media (prefers-reduced-motion: no-preference) {
  .main > [data-view]:not([hidden]):not(.sheet-layer) { animation: w24-view .34s cubic-bezier(.2, .8, .3, 1) both; }
  .side-a, .option, .qtab, .seg button, .seg a, .chip, .li, .qrow, .md-doc, .set-nav a { transition: background-color .18s ease, box-shadow .2s ease, color .18s ease, transform .15s ease; }
  .option:active, .qrow:active, .qn-card:active, .md-doc:active, .side-a:active { transform: scale(.985); }
  .on > .check, .check.on { animation: w24-pop .28s cubic-bezier(.3, 1.5, .5, 1); }
  .switch::after { transition: transform .26s cubic-bezier(.3, 1.35, .5, 1), width .2s; }
  .switch:active::after { width: 40px; }
  .switch.on:active::after { transform: translateX(8px); }
  .toast[data-anim-in]:not([hidden]) { animation: w24-toast .32s cubic-bezier(.2, .9, .3, 1.15) both; } /* tylko toasty pokazywane przez hidden (panel lekarza); portal ma własne .show */
}
@keyframes w24-view { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes w24-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes w24-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes w24-pop { from { transform: scale(.6); } to { transform: scale(1); } }
@keyframes w24-toast { from { opacity: 0; transform: translate(-50%, 12px) scale(.96); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }

/* ───────── Przyciski w kolorach spraw (wspólne dla paneli i portalu, od 23.10; wcześniej tylko w lekarz.html) ─────────
   Delikatne wypełnienie, ikona i tekst w kolorze sprawy; pełny kolor (.solid) tylko dla jednego głównego przycisku. */
.c-btn { background: color-mix(in srgb, var(--c) 12%, var(--surface)); color: color-mix(in srgb, var(--c) 72%, #000); font-weight: 600; }
.c-btn .sf { color: var(--c); }
.c-btn:hover { background: color-mix(in srgb, var(--c) 18%, var(--surface)); }
.c-btn.ok { --c: var(--ok); } .c-btn.info { --c: var(--info); } .c-btn.bad { --c: var(--bad); } .c-btn.rx { --c: var(--rx); } .c-btn.l4 { --c: var(--l4); }
.c-btn.mint { --c: #1f9d72; } .c-btn.pink { --c: var(--pink); } .c-btn.purple { --c: var(--purple); } .c-btn.gray { --c: #8e8e93; } .c-btn.gp { --c: var(--gp); }
.c-btn.hv { --c: var(--hv); } .c-btn.warn { --c: var(--warn); }
.c-btn.solid, .c-btn.on { background: linear-gradient(160deg, color-mix(in srgb, var(--c) 78%, #fff), var(--c) 70%); color: #fff; }
.c-btn.solid .sf, .c-btn.on .sf { color: #fff; }
.c-btn.solid:hover, .c-btn.on:hover { filter: brightness(1.04); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .c-btn:not(.solid):not(.on) { color: color-mix(in srgb, var(--c) 70%, #fff); } }
:root[data-theme="dark"] .c-btn:not(.solid):not(.on) { color: color-mix(in srgb, var(--c) 70%, #fff); }
/* portal pacjenta: widoki to <main class="view"> bezpośrednio w body */
@media (prefers-reduced-motion: no-preference) { body > main.view:not([hidden]) { animation: w24-view .34s cubic-bezier(.2, .8, .3, 1) both; } }

/* ───────── Potwierdzenie: zielone kółko z rysowanym ptaszkiem (wspólne od 23.10; wcześniej w lekarz.html) ───────── */
.okc { position: relative; display: block; width: 84px; height: 84px; margin: 4px auto 18px; }
.okc::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: color-mix(in srgb, var(--ok) 26%, transparent); animation: okc-halo 1.1s cubic-bezier(.2, .7, .3, 1) .18s both; }
.okc i { position: absolute; inset: 0; border-radius: 50%; background: linear-gradient(160deg, color-mix(in srgb, var(--ok) 70%, #fff), var(--ok) 72%); box-shadow: 0 10px 26px -10px color-mix(in srgb, var(--ok) 80%, transparent); animation: okc-pop .55s cubic-bezier(.25, 1.5, .45, 1) both; }
.okc:not(.lot) svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.okc:not(.lot) path { fill: none; stroke: #fff; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 64; stroke-dashoffset: 64; animation: okc-draw .42s cubic-bezier(.65, 0, .35, 1) .34s forwards; }
.okc.lot { width: 132px; height: 132px; margin: -14px auto 2px; } .okc.lot::before { display: none; }
.okc.lot.sm { width: 104px; height: 104px; margin: -10px auto 0; }
.okc.sm { width: 64px; height: 64px; margin-bottom: 14px; }
.okc.sm:not(.lot) path { stroke-width: 6.5; }
@keyframes okc-pop { from { transform: scale(.35); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes okc-draw { to { stroke-dashoffset: 0; } }
@keyframes okc-halo { from { transform: scale(.7); opacity: 1; } to { transform: scale(1.75); opacity: 0; } }
.okc::before { display: none; }
.okc i, .done-hero h2, .done-hero p, .done-code, .done-in, .done-code b { animation: none; }
.okc:not(.lot) path { animation: none; stroke-dashoffset: 0; }
.okc.bad::before { background: color-mix(in srgb, var(--bad) 24%, transparent); }
.okc.bad i { background: linear-gradient(160deg, color-mix(in srgb, var(--bad) 70%, #fff), var(--bad) 72%); box-shadow: 0 10px 26px -10px color-mix(in srgb, var(--bad) 80%, transparent); }
.okc.bad path { stroke-dasharray: 34; stroke-dashoffset: 0; animation-duration: .3s; }
.okc.bad path + path { animation-delay: .56s; }
@media (prefers-reduced-motion: reduce) { .okc::before { display: none; } .okc i { animation: none; } .okc:not(.lot) path { animation: none; stroke-dashoffset: 0; } }

/* Stan nagły / 112 (12.11.2026, Mikołaj: „to ma być czerwony kafelek zawsze, tak jak w szablonach e-mail”): jeden wygląd w portalu, panelach i na stronie
   = czerwona ramka 112 z e-maili (serwer/src/maile-wspolne.mjs RAMKI.alarm): jasnoczerwone tło #fff2f1, czerwona ikona, tytuł i „112 lub 999” ciemnoczerwone #b3261e. */
.note.sos112 { background: #fff2f1; color: #3c3c43; }
.note.sos112 > .sf { color: var(--bad, #ff3b30); }
.note.sos112 b { color: #b3261e; font-weight: 600; }
