/* #BEGO – system wizualny v3. Plik generowany: tools/components.css + tools/tokens.css. */
/* =========================================================
   #BEGO – system wizualny v3
   Wszystkie kolory pochodzą z tokenów motywu (sekcja TOKENS).
   Skala odstępów: 4 / 8 / 12 / 16 / 24 (+ 32/48 dla sekcji).
   ========================================================= */

/* ---------- FONTY (lokalne, OFL – assets/fonts/OFL-*.txt) ---------- */
@font-face { font-family: "Outfit"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("fonts/outfit-latin-ext-wght-normal.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Outfit"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("fonts/outfit-latin-wght-normal.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: "Plus Jakarta Sans"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url("fonts/plus-jakarta-sans-latin-ext-wght-normal.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url("fonts/plus-jakarta-sans-latin-wght-normal.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; }

/* ---------- STAŁE (niezależne od motywu) ---------- */
:root {
  --font-display: "Outfit", "Plus Jakarta Sans", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --r-sm: 14px; --r: 20px; --r-lg: 28px; --r-pill: 999px;
  --container: 1200px;
  --side-w: 280px; --side-w-mini: 88px; --top-h: 72px;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ok-bg: #d5f5df; --ok-ink: #0d4a2b; --warn-bg: #fff0bf; --warn-ink: #5c3f00;
  --err-bg: #ffe0e3; --err-ink: #8a1426; --info-bg: #dce9ff; --info-ink: #133a78;
  --outline: #24123d;
}
html[data-theme="dark"] {
  --ok-bg: #12402a; --ok-ink: #c3f5d4; --warn-bg: #46360a; --warn-ink: #ffe9a6;
  --err-bg: #4d1520; --err-ink: #ffd0d6; --info-bg: #14305e; --info-ink: #d4e4ff;
  --outline: #0b0814;
}


/* ---------- TOKENY MOTYWÓW ---------- */
/* --- standard --- */
body {
  color-scheme: light;
  --bg: #f4f1ff;
  --bg2: #e5ddfc;
  --surface: #ffffff;
  --surface2: #ebe5ff;
  --ink: #1c1233;
  --ink2: #4f4566;
  --line: #e5ddfa;
  --p: #5b2be0;
  --p2: #1f5fe0;
  --pink: #ffffff;
  --accent: #ffcf3f;
  --accentink: #1c1233;
  --link: #5b2be0;
  --side1: #2a1170;
  --side2: #14307e;
  --sideink: #ffffff;
  --sideink2: #c3bcd7;
  --t1: #ffe08a;
  --t2: #c9f2e4;
  --t3: #ffd3e6;
  --t4: #d6e4ff;
  --tink: #1c1233;
  --glow1: #d2c5f8;
  --glow2: #ced7f9;
  --focus: #5b2be0;
  --chip: #f2eefd;
}
html[data-theme="dark"] body {
  color-scheme: dark;
  --bg: #12092d;
  --bg2: #1b0d42;
  --surface: #191033;
  --surface2: #201446;
  --ink: #f5f0ff;
  --ink2: #c9bfe0;
  --line: #393150;
  --p: #683ce2;
  --p2: #1f5fe0;
  --pink: #ffffff;
  --accent: #ffcf3f;
  --accentink: #1c1233;
  --link: #b5a0f1;
  --side1: #1d0c4e;
  --side2: #0e2258;
  --sideink: #ffffff;
  --sideink2: #c3bcd7;
  --t1: #4c3b4f;
  --t2: #403f63;
  --t3: #4c3963;
  --t4: #433c68;
  --tink: #f5f0ff;
  --glow1: #281363;
  --glow2: #151e5a;
  --focus: #ad95f0;
  --chip: #2b1863;
}

/* --- purple --- */
body.season-standard.palette-purple {
  color-scheme: light;
  --bg: #f8f0ff;
  --bg2: #ebdbfb;
  --surface: #ffffff;
  --surface2: #efe0ff;
  --ink: #1c1233;
  --ink2: #4f4566;
  --line: #eadcf8;
  --p: #7a22d6;
  --p2: #a3168f;
  --pink: #ffffff;
  --accent: #ffcf3f;
  --accentink: #1c1233;
  --link: #7a22d6;
  --side1: #3d0f6e;
  --side2: #5e0f5c;
  --sideink: #ffffff;
  --sideink2: #c9bcd6;
  --t1: #f0d4ff;
  --t2: #ffe08a;
  --t3: #d6f5e9;
  --t4: #ffd6ea;
  --tink: #1c1233;
  --glow1: #dcc3f6;
  --glow2: #e9c9eb;
  --focus: #7a22d6;
  --chip: #f4edfc;
}
html[data-theme="dark"] body.season-standard.palette-purple {
  color-scheme: dark;
  --bg: #18082c;
  --bg2: #240b40;
  --surface: #1d1033;
  --surface2: #271346;
  --ink: #f5f0ff;
  --ink2: #c9bfe0;
  --line: #3d3150;
  --p: #8534d9;
  --p2: #a3168f;
  --pink: #ffffff;
  --accent: #ffcf3f;
  --accentink: #1c1233;
  --link: #c39ced;
  --side1: #2b0a4d;
  --side2: #420a40;
  --sideink: #ffffff;
  --sideink2: #c9bcd6;
  --t1: #4f3868;
  --t2: #533b4f;
  --t3: #4a3f64;
  --t4: #533864;
  --tink: #f5f0ff;
  --glow1: #35105f;
  --glow2: #3b0c45;
  --focus: #bc90ea;
  --chip: #371561;
}

/* --- pink --- */
body.season-standard.palette-pink {
  color-scheme: light;
  --bg: #fff2f7;
  --bg2: #f9dce7;
  --surface: #ffffff;
  --surface2: #ffe1ee;
  --ink: #1c1233;
  --ink2: #4f4566;
  --line: #f5dae5;
  --p: #c2185b;
  --p2: #8e24aa;
  --pink: #ffffff;
  --accent: #ffd23f;
  --accentink: #1c1233;
  --link: #c2185b;
  --side1: #5b0f35;
  --side2: #3d0f5c;
  --sideink: #ffffff;
  --sideink2: #d1bcc6;
  --t1: #ffd1e3;
  --t2: #ffe9a8;
  --t3: #e3dbff;
  --t4: #c9f2e4;
  --tink: #1c1233;
  --glow1: #f2c2d5;
  --glow2: #ebcde9;
  --focus: #c2185b;
  --chip: #faedf2;
}
html[data-theme="dark"] body.season-standard.palette-pink {
  color-scheme: dark;
  --bg: #22081a;
  --bg2: #350a22;
  --surface: #241026;
  --surface2: #311332;
  --ink: #f5f0ff;
  --ink2: #c9bfe0;
  --line: #433144;
  --p: #c72a68;
  --p2: #8e24aa;
  --pink: #ffffff;
  --accent: #ffd23f;
  --accentink: #1c1233;
  --link: #e497b5;
  --side1: #400a25;
  --side2: #2b0a40;
  --sideink: #ffffff;
  --sideink2: #d1bcc6;
  --t1: #5e374e;
  --t2: #5e3d41;
  --t3: #573a54;
  --t4: #523f4e;
  --tink: #f5f0ff;
  --glow1: #520d2e;
  --glow2: #3d0f3e;
  --focus: #e08cad;
  --chip: #501235;
}

/* --- blue --- */
body.season-standard.palette-blue {
  color-scheme: light;
  --bg: #eef5ff;
  --bg2: #d9e6fb;
  --surface: #ffffff;
  --surface2: #dde9ff;
  --ink: #1c1233;
  --ink2: #4f4566;
  --line: #dbe5f9;
  --p: #1d5fd8;
  --p2: #0e7490;
  --pink: #ffffff;
  --accent: #ffd23f;
  --accentink: #1c1233;
  --link: #1d5fd8;
  --side1: #0c2a6b;
  --side2: #0b4a5e;
  --sideink: #ffffff;
  --sideink2: #bbc3d6;
  --t1: #cfe2ff;
  --t2: #c7f0f5;
  --t3: #ffe08a;
  --t4: #e3dbff;
  --tink: #1c1233;
  --glow1: #c0d4f6;
  --glow2: #c6deeb;
  --focus: #1d5fd8;
  --chip: #edf2fc;
}
html[data-theme="dark"] body.season-standard.palette-blue {
  color-scheme: dark;
  --bg: #09112b;
  --bg2: #0b1a40;
  --surface: #121632;
  --surface2: #161c45;
  --ink: #f5f0ff;
  --ink2: #c9bfe0;
  --line: #33374f;
  --p: #2f6cdb;
  --p2: #0e7490;
  --pink: #ffffff;
  --accent: #ffd23f;
  --accentink: #1c1233;
  --link: #99b7ed;
  --side1: #081d4b;
  --side2: #083442;
  --sideink: #ffffff;
  --sideink2: #bbc3d6;
  --t1: #374467;
  --t2: #354865;
  --t3: #41444d;
  --t4: #3b4367;
  --tink: #f5f0ff;
  --glow1: #0f285f;
  --glow2: #0a2a44;
  --focus: #8eafec;
  --chip: #152a60;
}

/* --- halloween --- */
body.season-halloween {
  color-scheme: light;
  --bg: #fff4e6;
  --bg2: #f9e2d0;
  --surface: #ffffff;
  --surface2: #ffe6cc;
  --ink: #1c1233;
  --ink2: #4f4566;
  --line: #f5e1d8;
  --p: #c2410c;
  --p2: #6b21a8;
  --pink: #ffffff;
  --accent: #ffb020;
  --accentink: #1c1233;
  --link: #c2410c;
  --side1: #2a1240;
  --side2: #3b1408;
  --sideink: #ffffff;
  --sideink2: #c3bdca;
  --t1: #ffd3a8;
  --t2: #e3d1ff;
  --t3: #d9f2c4;
  --t4: #ffe08a;
  --tink: #1c1233;
  --glow1: #f2cdb6;
  --glow2: #e4cedb;
  --focus: #c2410c;
  --chip: #faf0ec;
}
html[data-theme="dark"] body.season-halloween {
  color-scheme: dark;
  --bg: #12091d;
  --bg2: #27101b;
  --surface: #191029;
  --surface2: #201436;
  --ink: #f5f0ff;
  --ink2: #c9bfe0;
  --line: #393147;
  --p: #c7501f;
  --p2: #6b21a8;
  --pink: #ffffff;
  --accent: #ffb020;
  --accentink: #1c1233;
  --link: #e4aa92;
  --side1: #1d0d2d;
  --side2: #290e06;
  --sideink: #ffffff;
  --sideink2: #c3bdca;
  --t1: #4c3945;
  --t2: #463858;
  --t3: #443f4b;
  --t4: #4c3b3e;
  --tink: #f5f0ff;
  --glow1: #471a18;
  --glow2: #280f40;
  --focus: #e0a086;
  --chip: #481e21;
}

/* --- christmas --- */
body.season-christmas {
  color-scheme: light;
  --bg: #f6f9ff;
  --bg2: #f1e4ea;
  --surface: #ffffff;
  --surface2: #e6effb;
  --ink: #1c1233;
  --ink2: #4f4566;
  --line: #f6dddd;
  --p: #c62828;
  --p2: #1b5e20;
  --pink: #ffffff;
  --accent: #ffd23f;
  --accentink: #1c1233;
  --link: #c62828;
  --side1: #6b0f1a;
  --side2: #0f3d1e;
  --sideink: #ffffff;
  --sideink2: #d6bcbf;
  --t1: #ffd6d6;
  --t2: #cfeed8;
  --t3: #fff0b3;
  --t4: #dbe8ff;
  --tink: #1c1233;
  --glow1: #ebcbd0;
  --glow2: #cfddd7;
  --focus: #c62828;
  --chip: #faeeee;
}
html[data-theme="dark"] body.season-christmas {
  color-scheme: dark;
  --bg: #270811;
  --bg2: #3a0c14;
  --surface: #271020;
  --surface2: #371328;
  --ink: #f5f0ff;
  --ink2: #c9bfe0;
  --line: #45313f;
  --p: #cb3939;
  --p2: #1b5e20;
  --pink: #ffffff;
  --accent: #ffd23f;
  --accentink: #1c1233;
  --link: #e59e9e;
  --side1: #4b0a12;
  --side2: #0a2b15;
  --sideink: #ffffff;
  --sideink2: #d6bcbf;
  --t1: #633842;
  --t2: #583e42;
  --t3: #633e3a;
  --t4: #5b3c4b;
  --tink: #f5f0ff;
  --glow1: #571218;
  --glow2: #241e15;
  --focus: #e29494;
  --chip: #541722;
}

/* --- easter --- */
body.season-easter {
  color-scheme: light;
  --bg: #fffaf0;
  --bg2: #f2e7f0;
  --surface: #ffffff;
  --surface2: #fff0d6;
  --ink: #1c1233;
  --ink2: #4f4566;
  --line: #eadffc;
  --p: #7c3aed;
  --p2: #be185d;
  --pink: #ffffff;
  --accent: #ffe066;
  --accentink: #1c1233;
  --link: #7c3aed;
  --side1: #4c2a85;
  --side2: #7a2457;
  --sideink: #ffffff;
  --sideink2: #cdc3dd;
  --t1: #e7dcff;
  --t2: #d3f5e3;
  --t3: #ffe3ef;
  --t4: #fff1a8;
  --tink: #1c1233;
  --glow1: #e2d0ef;
  --glow2: #f3d1d6;
  --focus: #7c3aed;
  --chip: #f5effe;
}
html[data-theme="dark"] body.season-easter {
  color-scheme: dark;
  --bg: #1d1133;
  --bg2: #281649;
  --surface: #201638;
  --surface2: #2c1c4e;
  --ink: #f5f0ff;
  --ink2: #c9bfe0;
  --line: #3f3754;
  --p: #864aee;
  --p2: #be185d;
  --pink: #ffffff;
  --accent: #ffe066;
  --accentink: #1c1233;
  --link: #c4a6f7;
  --side1: #351d5d;
  --side2: #55193d;
  --sideink: #ffffff;
  --sideink2: #cdc3dd;
  --t1: #534370;
  --t2: #4e496a;
  --t3: #58456d;
  --t4: #58485d;
  --tink: #f5f0ff;
  --glow1: #391d6b;
  --glow2: #45133e;
  --focus: #be9cf6;
  --chip: #3a206b;
}

/* --- summer --- */
body.season-summer {
  color-scheme: light;
  --bg: #fffaeb;
  --bg2: #e7ede2;
  --surface: #ffffff;
  --surface2: #fff0c7;
  --ink: #1c1233;
  --ink2: #4f4566;
  --line: #d8e9ed;
  --p: #0e7490;
  --p2: #c2410c;
  --pink: #ffffff;
  --accent: #ffd23f;
  --accentink: #1c1233;
  --link: #0e7490;
  --side1: #0b4a5e;
  --side2: #123a5c;
  --sideink: #ffffff;
  --sideink2: #bbccd2;
  --t1: #c6f1f7;
  --t2: #ffe08a;
  --t3: #ffd6c7;
  --t4: #d4f5d9;
  --tink: #1c1233;
  --glow1: #caddd7;
  --glow2: #f4d9c3;
  --focus: #0e7490;
  --chip: #ecf4f6;
}
html[data-theme="dark"] body.season-summer {
  color-scheme: dark;
  --bg: #081b27;
  --bg2: #092634;
  --surface: #121d2f;
  --surface2: #152840;
  --ink: #f5f0ff;
  --ink2: #c9bfe0;
  --line: #333d4c;
  --p: #217f99;
  --p2: #c2410c;
  --pink: #ffffff;
  --accent: #ffd23f;
  --accentink: #1c1233;
  --link: #93c0cd;
  --side1: #083442;
  --side2: #0c2a40;
  --sideink: #ffffff;
  --sideink2: #bbccd2;
  --t1: #355360;
  --t2: #414f48;
  --t3: #414d56;
  --t4: #38545a;
  --tink: #f5f0ff;
  --glow1: #0a3646;
  --glow2: #362420;
  --focus: #86bac8;
  --chip: #11354a;
}

/* --- zieloni --- */
body.theme-zieloni, body.palette-green {
  color-scheme: light;
  --bg: #effbf2;
  --bg2: #d9efe0;
  --surface: #ffffff;
  --surface2: #dcf5e3;
  --ink: #1c1233;
  --ink2: #4f4566;
  --line: #daebe0;
  --p: #15803d;
  --p2: #0f766e;
  --pink: #ffffff;
  --accent: #ffd23f;
  --accentink: #1c1233;
  --link: #15803d;
  --side1: #0f3d24;
  --side2: #0b3b38;
  --sideink: #ffffff;
  --sideink2: #bcc9c2;
  --t1: #c8f2d3;
  --t2: #e6f7b0;
  --t3: #c9efe9;
  --t4: #ffe7a8;
  --tink: #1c1233;
  --glow1: #bfe0ca;
  --glow2: #c7e3da;
  --focus: #15803d;
  --chip: #ecf5ef;
}
html[data-theme="dark"] body.theme-zieloni, html[data-theme="dark"] body.palette-green {
  color-scheme: dark;
  --bg: #0a1714;
  --bg2: #0b2419;
  --surface: #131a22;
  --surface2: #17232c;
  --ink: #f5f0ff;
  --ink2: #c9bfe0;
  --line: #343a41;
  --p: #15803d;
  --p2: #0f766e;
  --pink: #ffffff;
  --accent: #ffd23f;
  --accentink: #1c1233;
  --link: #96c6a8;
  --side1: #0a2b19;
  --side2: #082927;
  --sideink: #ffffff;
  --sideink2: #bcc9c2;
  --t1: #364e44;
  --t2: #3d4f3d;
  --t3: #364e49;
  --t4: #424c3b;
  --tink: #f5f0ff;
  --glow1: #0d3620;
  --glow2: #0b2f2a;
  --focus: #8ac09e;
  --chip: #14372a;
}
/* ---------- BAZA ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body {
  margin: 0; min-height: 100vh; overflow-x: hidden;
  font: 400 16px/1.55 var(--font-body); color: var(--ink);
  background:
    radial-gradient(900px 520px at 100% -10%, var(--glow1), transparent 70%),
    radial-gradient(700px 480px at -10% 110%, var(--glow2), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.12; margin: 0 0 var(--s3); letter-spacing: -.01em; }
h1 { font-size: clamp(28px, 4.2vw, 44px); font-weight: 800; }
h2 { font-size: clamp(22px, 2.6vw, 28px); font-weight: 800; }
h3 { font-size: 19px; font-weight: 700; }
p { margin: 0 0 var(--s3); }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 2px; }
a:hover { text-decoration-color: var(--p2); }
img, svg { max-width: 100%; }
small { font-size: 13px; }
hr { border: 0; border-top: 2px dashed var(--line); margin: var(--s5) 0; }
::selection { background: var(--accent); color: #1c1233; }
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 10px; }
.icon { width: 22px; height: 22px; flex: none; vertical-align: middle; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 12px 18px; border-radius: var(--r-pill); background: var(--surface); color: var(--ink); font-weight: 700; }
.skip-link:focus { top: 12px; }
.muted { color: var(--ink2); }
.kicker { font: 800 12px/1 var(--font-display); letter-spacing: .14em; text-transform: uppercase; color: var(--p); margin-bottom: var(--s2); }
html[data-theme="dark"] .kicker { color: var(--link); }
[hidden] { display: none !important; }

/* ---------- SHELL ---------- */
.app-shell { position: relative; z-index: 1; display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.app-main { min-width: 0; display: flex; flex-direction: column; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--s5) var(--s7); min-width: 0; }

/* Sidebar w kolorach motywu */
/* Kolumna ciągnie się na całą wysokość strony; zawartość jest sticky na wysokość okna, karta użytkownika na dole. */
.sidebar {
  position: relative; align-self: stretch; min-height: 100vh; color: var(--sideink);
  background: linear-gradient(180deg, var(--side1), var(--side2) 900px, var(--side2));
  border-radius: 0 var(--r-lg) var(--r-lg) 0; overflow: clip;
}
.side-inner {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: var(--s4);
  padding: var(--s5) var(--s4); overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; z-index: 1;
}
.sidebar::after { content: ""; position: absolute; right: -40px; bottom: -40px; width: 180px; height: 180px; border-radius: 50%; background: var(--p2); opacity: .35; pointer-events: none; }
.brand-chip { display: flex; align-items: center; justify-content: center; min-height: 64px; padding: var(--s3) var(--s4); border-radius: var(--r); background: rgba(0, 0, 0, .34); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .14); transition: transform .35s var(--spring); }
.brand-chip:hover { transform: rotate(-2deg) scale(1.03); }
.brand-chip img { display: block; max-height: 40px; width: auto; }
.brand-chip--light { background: #fff; box-shadow: 0 6px 0 rgba(0, 0, 0, .18); }
.topbar-brand.brand-chip--light { background: #fff; }
.side-nav { display: flex; flex-direction: column; gap: var(--s4); position: relative; z-index: 1; }
.nav-group { display: flex; flex-direction: column; gap: var(--s1); }
.nav-group-label { margin: 0 0 var(--s1) var(--s3); font: 800 11px/1 var(--font-display); letter-spacing: .16em; text-transform: uppercase; color: var(--sideink2); }
.nav-link {
  position: relative; display: flex; align-items: center; gap: var(--s3); min-height: 48px; padding: var(--s2) var(--s3);
  border-radius: var(--r-sm); color: var(--sideink); text-decoration: none; font-weight: 650;
  transition: background .2s, transform .3s var(--spring);
}
.nav-ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: rgba(255, 255, 255, .1); flex: none; transition: transform .35s var(--spring), background .2s; }
.nav-ico .icon { width: 22px; height: 22px; }
.nav-link:hover { background: rgba(255, 255, 255, .1); transform: translateX(3px); }
.nav-link:hover .nav-ico { transform: rotate(-8deg) scale(1.08); }
.nav-link.is-active { background: #fff; color: var(--side1); box-shadow: 0 6px 0 rgba(0, 0, 0, .2); }
.nav-link.is-active .nav-ico { background: var(--accent); color: #1c1233; }
.nav-label { flex: 1; min-width: 0; line-height: 1.2; overflow-wrap: break-word; hyphens: auto; font-size: 15px; letter-spacing: -.005em; }
.nav-badge { min-width: 24px; height: 24px; padding: 0 7px; border-radius: var(--r-pill); display: inline-grid; place-items: center; font: 800 12px/1 var(--font-display); background: var(--accent); color: #1c1233; border: 2px solid var(--outline); }
.nav-link.is-active .nav-badge { border-color: var(--side1); }
.side-spacer { flex: 1; }
.side-user { position: relative; z-index: 1; display: flex; align-items: center; gap: var(--s3); padding: var(--s3); border-radius: var(--r); background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .12); }
.avatar { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 16px; flex: none; font: 800 16px/1 var(--font-display); color: #1c1233; background: var(--accent); transform: rotate(-4deg); border: 2px solid var(--outline); }
.side-user-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.side-user-copy strong { font: 700 15px/1.2 var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user-copy small { color: var(--sideink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user .icon-btn { color: var(--sideink); background: rgba(255, 255, 255, .12); border-color: transparent; }

/* Górny pasek */
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: var(--s3);
  min-height: var(--top-h); padding: var(--s3) var(--s5);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
}
.topbar-brand { display: none; min-height: 48px; padding: var(--s2) var(--s3); background: linear-gradient(135deg, var(--side1), var(--side2)); }
.topbar-brand img { max-height: 28px; }
.topbar-date { margin: 0; display: inline-flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s4); border-radius: var(--r-pill); background: var(--surface); box-shadow: inset 0 0 0 2px var(--line); font-weight: 700; font-size: 14px; color: var(--ink); }
.topbar-date .icon { width: 18px; height: 18px; color: var(--p); }
html[data-theme="dark"] .topbar-date .icon { color: var(--link); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: var(--s2); }
.icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 48px; height: 48px; padding: 0; flex: none;
  border-radius: 16px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer;
  text-decoration: none; transition: transform .35s var(--spring), background .2s, border-color .2s; list-style: none;
}
.icon-btn::-webkit-details-marker { display: none; }
.icon-btn:hover { transform: translateY(-2px) rotate(-4deg); border-color: var(--p); }
.icon-btn:active { transform: scale(.94); }
.dot-badge { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--r-pill); display: grid; place-items: center; font: 800 11px/1 var(--font-display); background: #e11d48; color: #fff; border: 2px solid var(--surface); animation: badge-pop .6s var(--spring) both; }
@keyframes badge-pop { from { transform: scale(0); } to { transform: scale(1); } }
.theme-toggle .ico-sun { display: none; }
html[data-theme="dark"] .theme-toggle .ico-sun { display: block; }
html[data-theme="dark"] .theme-toggle .ico-moon { display: none; }
.menu-ico-phone { display: none; }

/* Popovery: dzwonek i menu ustawień (details/summary – działa bez JS) */
.pop-wrap { position: relative; }
.pop-wrap > summary { list-style: none; }
.pop {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 40; width: min(380px, calc(100vw - 24px));
  padding: var(--s3); border-radius: var(--r); background: var(--surface); color: var(--ink);
  border: 2px solid var(--line); box-shadow: 0 24px 60px -20px rgba(20, 8, 40, .45), 0 6px 0 var(--line);
  transform-origin: top right; animation: pop-in .35s var(--spring);
}
@keyframes pop-in { from { opacity: 0; transform: translateY(-6px) scale(.96); } to { opacity: 1; transform: none; } }
.pop-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s1) var(--s2) var(--s3); }
.pop-head strong { font: 800 18px/1.2 var(--font-display); }
.pop-head a { font-weight: 700; font-size: 14px; }
.bell-group { margin: var(--s3) var(--s2) var(--s2); font: 800 11px/1 var(--font-display); letter-spacing: .14em; text-transform: uppercase; color: var(--ink2); }
.bell-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s1); max-height: min(60vh, 420px); overflow-y: auto; }
.bell-item a, .bell-item > div { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3); border-radius: var(--r-sm); text-decoration: none; color: var(--ink); transition: background .2s; }
.bell-item a:hover { background: var(--surface2); }
.bell-ico { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 14px; background: var(--t1); color: #1c1233; flex: none; }
html[data-theme="dark"] .bell-ico { color: var(--tink); }
.bell-item:nth-child(3n+2) .bell-ico { background: var(--t2); }
.bell-item:nth-child(3n+3) .bell-ico { background: var(--t3); }
.bell-ico .icon { width: 20px; height: 20px; }
.bell-copy { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bell-copy strong { font-weight: 750; line-height: 1.3; }
.bell-copy small { color: var(--ink2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.bell-copy time { font-size: 12px; font-weight: 700; color: var(--ink2); }
.bell-item.is-unread .bell-ico::after { content: ""; position: absolute; top: -3px; right: -3px; width: 12px; height: 12px; border-radius: 50%; background: #e11d48; border: 2px solid var(--surface); }
.bell-item.is-unread strong::after { content: " • nowe"; color: #c0123c; font-size: 12px; font-weight: 800; }
html[data-theme="dark"] .bell-item.is-unread strong::after { color: #ff9cb0; }
.bell-empty { display: grid; justify-items: center; gap: var(--s2); padding: var(--s5) var(--s3); text-align: center; color: var(--ink2); }
.bell-empty .icon { width: 36px; height: 36px; color: var(--p); }
.menu-panel { width: min(300px, calc(100vw - 24px)); display: flex; flex-direction: column; gap: 2px; }
.menu-panel a, .menu-panel .menu-item { display: flex; align-items: center; gap: var(--s3); min-height: 44px; padding: var(--s2) var(--s3); border-radius: 12px; color: var(--ink); text-decoration: none; font-weight: 650; }
.menu-panel .menu-item { width: 100%; background: transparent; border: 0; font: inherit; font-weight: 650; text-align: left; cursor: pointer; }
.menu-panel a:hover, .menu-panel .menu-item:hover { background: var(--surface2); }
.menu-panel a .icon { width: 20px; height: 20px; color: var(--p); }
html[data-theme="dark"] .menu-panel a .icon { color: var(--link); }
.menu-panel .menu-sep { height: 2px; background: var(--line); margin: var(--s2) 0; border: 0; }
.menu-user { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s3) var(--s3); }
.menu-user .avatar { width: 40px; height: 40px; }
.menu-user span { display: flex; flex-direction: column; min-width: 0; }
.menu-user strong { font-family: var(--font-display); }
.menu-user small { color: var(--ink2); }
.menu-panel .menu-danger, .menu-panel .menu-danger .icon { color: var(--err-ink); }

/* Pasek ikon na telefonie (zawsze widoczny, przewijany w poziomie) */
.quicknav { display: none; }

/* Baner strony */
.page-banner {
  position: relative; overflow: hidden; isolation: isolate;
  max-width: calc(var(--container) - 2 * var(--s5)); width: calc(100% - 2 * var(--s5)); margin: var(--s2) auto var(--s4);
  min-height: 168px; padding: var(--s6) var(--s6); border-radius: var(--r-lg);
  color: #fff; background: linear-gradient(120deg, var(--p) 0%, var(--p2) 100%);
  box-shadow: 0 8px 0 color-mix(in srgb, var(--side1) 70%, transparent);
}
.page-banner::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .18;
  background-image: radial-gradient(circle at 1.5px 1.5px, #fff 1.5px, transparent 2px); background-size: 22px 22px; }
.page-banner::after { content: ""; position: absolute; z-index: -1; width: 340px; height: 340px; right: -80px; top: -150px; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.banner-copy { position: relative; z-index: 2; max-width: min(640px, 62%); }
.banner-copy h1 { margin: var(--s2) 0 var(--s2); color: #fff; text-shadow: 0 3px 0 rgba(0, 0, 0, .18); }
.banner-sub { margin: 0; font-weight: 650; color: #fff; opacity: .95; }
.banner-art { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.banner-art .art { position: absolute; display: block; background: no-repeat center / contain; will-change: transform; }
.banner-art .a1 { right: 4%; bottom: -14px; width: 170px; height: 170px; }
.banner-art .a2 { right: calc(4% + 170px); top: 14px; width: 74px; height: 74px; animation: bob 5s ease-in-out infinite; }
.banner-art .a3 { right: calc(4% + 140px); bottom: 10px; width: 90px; height: 64px; animation: bob 6s ease-in-out -2s infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-10px) rotate(4deg); } }
.last-login { max-width: var(--container); width: 100%; margin: 0 auto var(--s4); padding: 0 var(--s5); display: flex; align-items: center; gap: var(--s2); font-size: 13px; font-weight: 600; color: var(--ink2); }
.last-login .icon { width: 16px; height: 16px; }

/* ---------- KOMPONENTY ---------- */
/* Przyciski: gradientowa pigułka ze sprężystym hoverem */
.btn, button:not(.icon-btn, .chip-btn, .sg-swatch, .toast-close, .menu-item, .day-toggle), input[type="submit"] {
  --b1: var(--p); --b2: var(--p2);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 48px; padding: 0 var(--s5); border: 0; border-radius: var(--r-pill); cursor: pointer;
  font: 750 15px/1 var(--font-body); letter-spacing: .01em; text-decoration: none; color: #fff;
  background: linear-gradient(120deg, var(--b1), var(--b2)); background-size: 140% 100%; background-position: 0 0;
  box-shadow: 0 5px 0 color-mix(in srgb, var(--b1) 55%, #000), 0 14px 24px -14px var(--b1);
  transition: transform .4s var(--spring), box-shadow .2s, background-position .4s var(--ease);
}
.btn:hover, button:not(.icon-btn, .chip-btn, .sg-swatch, .toast-close, .menu-item, .day-toggle):hover, input[type="submit"]:hover {
  transform: translateY(-3px) scale(1.03) rotate(-.6deg); background-position: 100% 0; color: #fff;
  box-shadow: 0 8px 0 color-mix(in srgb, var(--b1) 55%, #000), 0 20px 30px -14px var(--b1);
}
.btn:active, button:not(.icon-btn, .chip-btn, .sg-swatch, .toast-close, .menu-item, .day-toggle):active { transform: translateY(3px) scale(.98); box-shadow: 0 2px 0 color-mix(in srgb, var(--b1) 55%, #000); }
.btn .icon, button .icon { width: 20px; height: 20px; }
.btn.ghost, button.ghost, .btn-ghost {
  color: var(--ink); background: var(--surface); box-shadow: inset 0 0 0 2px var(--line), 0 4px 0 var(--line);
}
.btn.ghost:hover, button.ghost:hover, .btn-ghost:hover { color: var(--ink); box-shadow: inset 0 0 0 2px var(--p), 0 6px 0 var(--line); }
.btn-soft { color: #1c1233 !important; background: var(--accent) !important; box-shadow: 0 5px 0 var(--outline) !important; border: 2px solid var(--outline) !important; }
.btn-danger, button.danger { --b1: #be123c; --b2: #9f1239; }
.btn-sm { min-height: 44px; padding: 0 var(--s4); font-size: 14px; }
.btn-lg { min-height: 56px; padding: 0 var(--s6); font-size: 17px; }
button:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none !important; }
.actions, .btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin-top: var(--s4); }

/* Pola */
label { display: block; font-weight: 700; font-size: 14px; color: var(--ink); margin-bottom: var(--s4); }
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="hidden"]), select, textarea {
  display: block; width: 100%; min-height: 48px; margin-top: 6px; padding: 10px 14px;
  font: 500 16px/1.4 var(--font-body); color: var(--ink); background: var(--surface);
  border: 2px solid var(--line); border-radius: var(--r-sm); transition: border-color .2s, box-shadow .2s, transform .3s var(--spring);
}
textarea { min-height: 120px; resize: vertical; }
input:not([type="checkbox"]):not([type="radio"]):hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--p) 45%, var(--line)); }
input:not([type="checkbox"]):not([type="radio"]):focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--p); box-shadow: 0 0 0 4px color-mix(in srgb, var(--p) 25%, transparent); }
input[type="file"] { padding: 10px; }
input[type="checkbox"], input[type="radio"] { width: 22px; height: 22px; accent-color: var(--p); vertical-align: middle; margin: 0 var(--s2) 0 0; }
.check-row, .checkbox-label { display: flex; align-items: center; gap: var(--s2); min-height: 44px; font-weight: 600; }
.field-hint { display: block; margin-top: 6px; font-size: 13px; font-weight: 500; color: var(--ink2); }
.field-error input, .field-error select, .field-error textarea { border-color: #c0123c !important; }
.field-error .field-hint { color: var(--err-ink); font-weight: 700; }
.form-grid, .grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s4); }
.form-grid .span-2, .grid-2 .span-2 { grid-column: 1 / -1; }

/* Chipy i naklejki */
.chip, .pill { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 4px 12px; border-radius: var(--r-pill); font: 700 13px/1.2 var(--font-body); background: var(--chip); color: var(--ink); white-space: nowrap; }
.chip .icon { width: 16px; height: 16px; }
.chip--ok { background: var(--ok-bg); color: var(--ok-ink); }
.chip--warn { background: var(--warn-bg); color: var(--warn-ink); }
.chip--err { background: var(--err-bg); color: var(--err-ink); }
.chip--info { background: var(--info-bg); color: var(--info-ink); }
.chip-btn { cursor: pointer; border: 2px solid var(--line); min-height: 44px; background: var(--surface); color: var(--ink); border-radius: var(--r-pill); padding: 6px 16px; font: 700 14px/1 var(--font-body); transition: transform .3s var(--spring); }
.chip-btn:hover { transform: translateY(-2px); }
.chip-btn[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.sticker {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 12px;
  font: 800 13px/1 var(--font-display); letter-spacing: .02em; text-transform: uppercase;
  color: #1c1233; background: var(--accent); border: 2px solid var(--outline); box-shadow: 3px 3px 0 var(--outline);
  transform: rotate(-3deg);
}
.sticker:nth-of-type(2n) { transform: rotate(2.5deg); background: var(--t3); }
.sticker--mint { background: var(--t2); color: #1c1233; }
html[data-theme="dark"] .sticker:nth-of-type(2n), html[data-theme="dark"] .sticker--mint { color: var(--tink); }
.sticker .icon { width: 16px; height: 16px; }
.page-banner .sticker { box-shadow: 3px 3px 0 rgba(0, 0, 0, .35); }

/* Karty i panele */
.card, .panel {
  position: relative; background: var(--surface); color: var(--ink); border-radius: var(--r-lg); padding: var(--s5);
  margin-bottom: var(--s4); border: 2px solid var(--line); box-shadow: 0 6px 0 var(--line);
}
.card-head, .section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s4); }
.card-head h2, .card-head h3, .section-heading h2 { margin: 0; }
.card--tint { background: var(--surface2); }
.stack > * + * { margin-top: var(--s4); }
.grid { display: grid; gap: var(--s4); }
.grid-cards { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* Bento */
.bento { display: grid; gap: var(--s4); grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: minmax(150px, auto); margin-bottom: var(--s5); }
.tile {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: var(--s3);
  grid-column: span 3; padding: var(--s5); border-radius: var(--r-lg); text-decoration: none;
  background: var(--t1); color: var(--tink); border: 2px solid var(--outline); box-shadow: 0 6px 0 var(--outline);
  transition: transform .45s var(--spring), box-shadow .2s;
}
.tile:nth-child(4n+2) { background: var(--t2); }
.tile:nth-child(4n+3) { background: var(--t3); }
.tile:nth-child(4n+4) { background: var(--t4); }
a.tile:hover { transform: translateY(-5px) rotate(-1.2deg); box-shadow: 0 11px 0 var(--outline); color: var(--tink); }
a.tile:nth-child(2n):hover { transform: translateY(-5px) rotate(1.2deg); }
.tile--wide { grid-column: span 6; }
.tile--tall { grid-row: span 2; }
.tile--hero { grid-column: span 6; grid-row: span 2; color: #fff; background: linear-gradient(140deg, var(--p), var(--p2)) !important; }
.tile--hero .tile-desc { color: #fff; }
.tile-ico { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: #fff; color: #1c1233; border: 2px solid var(--outline); transition: transform .45s var(--spring); }
.tile-ico .icon { width: 30px; height: 30px; }
a.tile:hover .tile-ico { transform: rotate(-10deg) scale(1.1); }
.tile-arrow { position: absolute; top: var(--s4); right: var(--s4); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .7); color: #1c1233; transition: transform .45s var(--spring); }
a.tile:hover .tile-arrow { transform: rotate(-45deg); }
.tile-title { font: 800 22px/1.1 var(--font-display); font-size: clamp(16px, 10.6cqi, 22px); overflow-wrap: break-word; hyphens: auto; min-width: 0; }
.tile { container-type: inline-size; }
.tile-desc { font-size: 14px; font-weight: 550; color: var(--tink); opacity: .9; }
.tile .count { font: 800 clamp(40px, 6vw, 64px)/1 var(--font-display); letter-spacing: -.03em; }
.tile .sticker { position: absolute; right: var(--s4); bottom: var(--s4); }

/* Statystyki z licznikami */
.stats { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: var(--s5); }
.stat { display: flex; align-items: center; gap: var(--s4); padding: var(--s4) var(--s5); border-radius: var(--r); background: var(--surface); border: 2px solid var(--line); box-shadow: 0 5px 0 var(--line); }
.stat-ico { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--t2); color: #1c1233; transform: rotate(-5deg); }
html[data-theme="dark"] .stat-ico { color: var(--tink); }
.stat:nth-child(2) .stat-ico { background: var(--t3); transform: rotate(4deg); }
.stat:nth-child(3) .stat-ico { background: var(--t1); }
.stat strong { display: block; font: 800 34px/1 var(--font-display); }
.stat small { display: block; color: var(--ink2); font-weight: 650; }

/* Tabele */
.table-wrap { width: 100%; overflow-x: auto; border-radius: var(--r); border: 2px solid var(--line); background: var(--surface); -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 15px; }
th, td { padding: 12px 16px; text-align: left; vertical-align: middle; border-bottom: 2px solid var(--line); }
th { font: 800 12px/1.2 var(--font-display); letter-spacing: .1em; text-transform: uppercase; color: var(--ink2); background: var(--surface2); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: color-mix(in srgb, var(--surface2) 60%, transparent); }
td .chip { vertical-align: middle; }

/* Alerty inline (bez JS) */
.alert, .flash, .error, .ok, .status-notice { display: flex; align-items: flex-start; gap: var(--s3); padding: var(--s3) var(--s4); border-radius: var(--r); font-weight: 650; margin: 0 0 var(--s4); border: 2px solid currentColor; }
.flash, .ok, .alert--ok { background: var(--ok-bg); color: var(--ok-ink); }
.error, .alert--err { background: var(--err-bg); color: var(--err-ink); }
.status-notice, .alert--warn { background: var(--warn-bg); color: var(--warn-ink); }
.alert--info { background: var(--info-bg); color: var(--info-ink); }

/* Toasty */
.toast-region { display: flex; flex-direction: column; gap: var(--s3); margin-bottom: var(--s4); }
.js .toast-region { position: fixed; z-index: 80; right: var(--s5); bottom: var(--s5); width: min(400px, calc(100vw - 32px)); margin: 0; pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: flex-start; gap: var(--s3); margin: 0; padding: var(--s3) var(--s3) var(--s3) var(--s4);
  border-radius: var(--r); border: 2px solid var(--outline); box-shadow: 0 6px 0 var(--outline), 0 24px 40px -20px rgba(0, 0, 0, .5);
  font-weight: 650; background: var(--ok-bg); color: var(--ok-ink);
}
.js .toast { animation: toast-in .5s var(--spring) both; }
.toast.is-leaving { animation: toast-out .3s var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(.9) rotate(-2deg); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(30px) scale(.95); } }
.toast > .icon { width: 24px; height: 24px; margin-top: 2px; }
.toast p { flex: 1; margin: 2px 0 0; }
.toast-error { background: var(--err-bg); color: var(--err-ink); }
.toast-warning { background: var(--warn-bg); color: var(--warn-ink); }
.toast-info { background: var(--info-bg); color: var(--info-ink); }
.toast-close { display: grid; place-items: center; width: 44px; height: 44px; margin: -8px -4px -8px 0; border: 0; border-radius: 12px; background: transparent; color: inherit; cursor: pointer; }
.toast-close:hover { background: rgba(0, 0, 0, .08); }

/* Modal potwierdzenia */
.modal { width: min(440px, calc(100vw - 32px)); padding: 0; border: 2px solid var(--outline); border-radius: var(--r-lg); background: var(--surface); color: var(--ink); box-shadow: 0 8px 0 var(--outline), 0 40px 80px -30px rgba(0, 0, 0, .6); }
.modal::backdrop { background: rgba(18, 8, 36, .55); backdrop-filter: blur(4px); }
.modal[open] { animation: pop-in .4s var(--spring); }
.modal-body { padding: var(--s5); text-align: center; }
.modal-ico { display: inline-grid; place-items: center; width: 72px; height: 72px; margin-bottom: var(--s3); border-radius: 24px; background: var(--err-bg); color: var(--err-ink); transform: rotate(-6deg); border: 2px solid var(--outline); }
.modal-ico .icon { width: 36px; height: 36px; }
.modal h2 { font-size: 24px; }
.modal-body p { color: var(--ink2); }
.modal-actions { display: flex; gap: var(--s3); justify-content: center; flex-wrap: wrap; padding: 0 var(--s5) var(--s5); }
.modal-static { position: static; display: block; margin: 0; }

/* Pusty stan */
.empty-state { display: grid; justify-items: center; gap: var(--s2); padding: var(--s6) var(--s4); text-align: center; color: var(--ink2); }
.empty-state img { width: 120px; height: 120px; }

/* Komunikat prywatności */
.privacy-notice {
  position: fixed; z-index: 90; left: 50%; bottom: var(--s4); transform: translateX(-50%);
  width: min(720px, calc(100vw - 24px)); display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap;
  padding: var(--s4) var(--s5); border-radius: var(--r-lg); background: var(--surface); color: var(--ink);
  border: 2px solid var(--outline); box-shadow: 0 6px 0 var(--outline), 0 30px 60px -20px rgba(0, 0, 0, .5);
}
.privacy-notice-copy { flex: 1 1 320px; font-size: 14px; }
.privacy-notice-copy strong { display: block; font: 800 16px/1.3 var(--font-display); margin-bottom: 4px; }
.privacy-notice-copy p { margin: 0; color: var(--ink2); }

/* Logowanie (publiczny układ) */
.wrap-login { position: relative; z-index: 1; min-height: 100vh; display: grid; place-items: center; padding: var(--s5) var(--s4); }
.login-mascot { display: block; width: 150px; height: 164px; margin: 0 auto calc(-1 * var(--s3)); position: relative; z-index: 2; animation: bob 4s ease-in-out infinite; }
.login-screen { width: min(440px, 100%); text-align: center; }
.login-logo { max-width: 220px; margin: var(--s4) auto var(--s4); display: block; }
.login-card { text-align: left; }
.wrap { max-width: var(--container); margin: 0 auto; padding: 0 var(--s4); }
.topbar-public { display: flex; justify-content: center; padding: var(--s4); }

/* ---------- KOMPATYBILNOŚĆ ze starymi klasami (do czasu przebudowy podstron) ---------- */
.glass { background: var(--surface); }
.hero, .home-hero { padding: var(--s5); border-radius: var(--r-lg); background: var(--surface2); margin-bottom: var(--s4); }
.home-hero img { max-height: 60px; }
.dashboard-stats { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: var(--s4); }
.stat-card { display: flex; gap: var(--s3); align-items: center; padding: var(--s4); border-radius: var(--r); border: 2px solid var(--line); }
.stat-card strong { display: block; font: 800 26px/1 var(--font-display); }
.tile-grid { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-bottom: var(--s5); }
.tile-grid .tile { grid-column: auto; }
.tile-grid .tile-icon { font-size: 26px; }
.tile-grid .tile-description { font-size: 14px; }
.split { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.recent-announcement-grid { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.recent-announcement { display: flex; gap: var(--s3); padding: var(--s4); border-radius: var(--r); border: 2px solid var(--line); color: var(--ink); text-decoration: none; }
.recent-announcement span { display: flex; flex-direction: column; }
details > summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
@media (min-width: 768px) { .phone-only { display: none !important; } }

/* ---------- STYLEGUIDE ---------- */
.sg-switcher { position: sticky; top: calc(var(--top-h) + 8px); z-index: 20; display: flex; flex-wrap: wrap; gap: var(--s3) var(--s5); align-items: center; padding: var(--s3) var(--s4); margin-bottom: var(--s5); border-radius: var(--r); background: var(--surface); border: 2px solid var(--outline); box-shadow: 0 5px 0 var(--outline); }
.sg-switcher fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.sg-switcher legend { float: left; margin-right: var(--s2); font: 800 12px/44px var(--font-display); letter-spacing: .1em; text-transform: uppercase; color: var(--ink2); }
.sg-section { margin-bottom: var(--s6); }
.sg-section > h2 { display: flex; align-items: center; gap: var(--s3); }
.sg-row { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; margin-bottom: var(--s4); }
.sg-swatches { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.sg-swatch { display: flex; flex-direction: column; justify-content: flex-end; min-height: 92px; padding: var(--s3); border-radius: var(--r-sm); border: 2px solid var(--outline); font: 700 12px/1.2 var(--font-body); color: #1c1233; }
.sg-swatch.sw-p { background: var(--p); color: #fff; } .sg-swatch.sw-p2 { background: var(--p2); color: #fff; }
.sg-swatch.sw-accent { background: var(--accent); } .sg-swatch.sw-bg { background: var(--bg); color: var(--ink); }
.sg-swatch.sw-surface2 { background: var(--surface2); color: var(--ink); } .sg-swatch.sw-side { background: linear-gradient(135deg, var(--side1), var(--side2)); color: #fff; }
.sg-swatch.sw-t1 { background: var(--t1); color: var(--tink); } .sg-swatch.sw-t2 { background: var(--t2); color: var(--tink); }
.sg-swatch.sw-t3 { background: var(--t3); color: var(--tink); } .sg-swatch.sw-t4 { background: var(--t4); color: var(--tink); }
.sg-type .t-h1 { font: 800 44px/1.05 var(--font-display); margin: 0; }
.sg-demo-pop { position: relative; height: auto; }
.sg-demo-pop .pop { position: static; animation: none; width: 100%; max-width: 380px; }
.sg-demo-toasts { display: grid; gap: var(--s3); max-width: 420px; }
.sg-demo-toasts .toast { animation: none; }
.sg-art { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.sg-art img { width: 100%; height: 96px; object-fit: contain; padding: var(--s2); border-radius: var(--r-sm); background: var(--surface2); }

/* ---------- DEKORACJE SEZONOWE (tło, nie łapią kliknięć) ---------- */
.decor { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.decor i { position: absolute; display: none; background: no-repeat center / contain; will-change: transform; }
.season-lights { display: none; position: fixed; z-index: 35; left: 0; right: 0; top: 0; height: 30px; pointer-events: none; background: url("themes/christmas/lights.svg") repeat-x 0 0 / 160px 32px; }

/* standard */
body.season-standard .decor .d1 { display: block; width: 320px; height: 320px; right: -90px; top: 40%; opacity: .16; background-image: url("themes/standard/blob-a.svg"); animation: drift 22s ease-in-out infinite; }
body.season-standard .decor .d2 { display: block; width: 260px; height: 260px; left: 18%; bottom: -110px; opacity: .14; background-image: url("themes/standard/blob-b.svg"); animation: drift 26s ease-in-out -6s infinite; }
body.season-standard .decor .d3 { display: block; width: 44px; height: 44px; right: 6%; top: 18%; opacity: .7; background-image: url("themes/standard/spark.svg"); animation: twinkle 4s ease-in-out infinite; }
body.season-standard .decor .d4 { display: block; width: 36px; height: 36px; left: 30%; top: 84%; opacity: .55; background-image: url("themes/standard/star.svg"); animation: twinkle 5s ease-in-out -2s infinite; }

/* halloween */
body.season-halloween .decor .d1 { display: block; width: 220px; height: 220px; right: -6px; top: -6px; opacity: .55; background-image: url("themes/halloween/cobweb.svg"); }
body.season-halloween .decor .d2, body.season-halloween .decor .d3 { display: block; width: 84px; height: 96px; background-image: url("themes/halloween/ghost.svg"); opacity: .8; animation: ghost-float 9s ease-in-out infinite; }
body.season-halloween .decor .d2 { right: 6%; top: 58%; }
body.season-halloween .decor .d3 { left: 22%; top: 76%; width: 60px; height: 70px; animation-delay: -4s; opacity: .55; }
body.season-halloween .decor .d4, body.season-halloween .decor .d5 { display: block; width: 74px; height: 44px; background-image: url("themes/halloween/bat.svg"); animation: bat-fly 14s linear infinite; }
body.season-halloween .decor .d4 { top: 20%; left: -80px; }
body.season-halloween .decor .d5 { top: 36%; left: -80px; width: 54px; height: 32px; animation-delay: -7s; animation-duration: 18s; }
body.season-halloween .decor .d6 { display: block; width: 110px; height: 100px; right: 3%; bottom: 3%; background-image: url("themes/halloween/pumpkin.svg"); animation: wobble 3.5s ease-in-out infinite; transform-origin: 50% 100%; }
body.season-halloween .decor .d7 { display: block; width: 90px; height: 90px; left: 44%; top: 8%; opacity: .5; background-image: url("themes/halloween/moon.svg"); animation: drift 20s ease-in-out infinite; }

/* christmas */
body.season-christmas .season-lights { display: block; animation: lights-blink 1.6s steps(2) infinite; }
body.season-christmas .decor .d1 { display: block; width: 120px; height: 150px; right: 2%; bottom: 2%; background-image: url("themes/christmas/tree.svg"); animation: wobble 6s ease-in-out infinite; transform-origin: 50% 100%; }
body.season-christmas .decor .d2 { display: block; width: 110px; height: 110px; left: 20%; bottom: -8px; background-image: url("themes/christmas/santa.svg"); animation: hop 3s ease-in-out infinite; }
body.season-christmas .decor .d3 { display: block; width: 120px; height: 100px; bottom: 26%; left: -140px; background-image: url("themes/christmas/reindeer.svg"); animation: run-across 24s linear infinite; }
body.season-christmas .decor .d4 { display: block; width: 76px; height: 90px; right: 13%; bottom: 3%; background-image: url("themes/christmas/elf.svg"); animation: hop 2.4s ease-in-out -1s infinite; }
body.season-christmas .decor .d5 { display: block; width: 56px; height: 76px; right: 28%; top: 30px; background-image: url("themes/christmas/bauble.svg"); transform-origin: 50% 0; animation: swing 3s ease-in-out infinite; }
body.season-christmas .decor .snow { display: block; top: -30px; width: 18px; height: 18px; background-image: url("themes/christmas/snowflake.svg"); opacity: .85; animation: snow-fall 12s linear infinite; }
html[data-theme="dark"] body.season-christmas .decor .snow, body.season-christmas .decor .snow { filter: drop-shadow(0 0 1px rgba(30, 20, 60, .6)); }
.decor .snow { display: none; }
.decor .s1 { left: 4%; animation-delay: -1s; } .decor .s2 { left: 12%; animation-delay: -6s; width: 12px; height: 12px; }
.decor .s3 { left: 21%; animation-delay: -3s; } .decor .s4 { left: 30%; animation-delay: -9s; width: 14px; height: 14px; }
.decor .s5 { left: 39%; animation-delay: -2s; } .decor .s6 { left: 48%; animation-delay: -7s; width: 12px; height: 12px; }
.decor .s7 { left: 57%; animation-delay: -4s; } .decor .s8 { left: 66%; animation-delay: -10s; width: 14px; height: 14px; }
.decor .s9 { left: 75%; animation-delay: -5s; } .decor .s10 { left: 84%; animation-delay: -8s; width: 12px; height: 12px; }
.decor .s11 { left: 92%; animation-delay: -11s; } .decor .s12 { left: 97%; animation-delay: -3.5s; width: 10px; height: 10px; }

/* easter */
body.season-easter .decor .d1 { display: block; width: 110px; height: 130px; right: 3%; bottom: 2%; background-image: url("themes/easter/bunny.svg"); animation: hop 2.6s ease-in-out infinite; }
body.season-easter .decor .d2 { display: block; width: 70px; height: 70px; left: 22%; bottom: 2%; background-image: url("themes/easter/chick.svg"); animation: wobble 2.2s ease-in-out infinite; transform-origin: 50% 100%; }
body.season-easter .decor .d3 { display: block; width: 50px; height: 62px; right: 15%; bottom: 3%; background-image: url("themes/easter/egg-a.svg"); animation: wobble 4s ease-in-out -1s infinite; transform-origin: 50% 100%; }
body.season-easter .decor .d4 { display: block; width: 44px; height: 56px; right: 7%; top: 22%; opacity: .7; background-image: url("themes/easter/egg-b.svg"); animation: drift 14s ease-in-out infinite; }
body.season-easter .decor .d5, body.season-easter .decor .d6 { display: block; width: 56px; height: 90px; bottom: -6px; background-image: url("themes/easter/tulip.svg"); transform-origin: 50% 100%; animation: sway 4s ease-in-out infinite; }
body.season-easter .decor .d5 { left: 30%; } body.season-easter .decor .d6 { right: 22%; animation-delay: -2s; }

/* summer */
body.season-summer .decor .d1 { display: block; width: 180px; height: 180px; right: -40px; top: 60px; background-image: url("themes/summer/sun-rays.svg"); opacity: .8; animation: spin 40s linear infinite; }
body.season-summer .decor .d2 { display: block; width: 100px; height: 100px; right: 0; top: 100px; background-image: url("themes/summer/sun-face.svg"); }
body.season-summer .decor .d3 { display: block; left: 0; right: 0; bottom: -4px; width: 200%; height: 46px; background: url("themes/summer/wave.svg") repeat-x 0 0 / 400px 46px; opacity: .7; animation: wave-move 14s linear infinite; }
body.season-summer .decor .d4 { display: block; width: 64px; height: 100px; left: 22%; bottom: 30px; background-image: url("themes/summer/icecream.svg"); animation: wobble 3s ease-in-out infinite; transform-origin: 50% 100%; }
body.season-summer .decor .d5 { display: block; width: 90px; height: 40px; right: 10%; bottom: 28%; opacity: .75; background-image: url("themes/summer/sunglasses.svg"); animation: drift 12s ease-in-out infinite; }
body.season-summer .decor .d6 { display: block; width: 56px; height: 50px; right: 18%; bottom: 30px; background-image: url("themes/summer/shell.svg"); }
body.season-summer .decor .d7 { display: block; width: 150px; height: 150px; left: -30px; top: 40%; opacity: .25; background-image: url("themes/summer/palm-leaf.svg"); transform-origin: 0 50%; animation: sway 6s ease-in-out infinite; }

/* #Zieloni – liście (zawsze, bo motyw wymusza sezon standard) */
body.theme-zieloni .decor .d1, body.theme-zieloni .decor .d2, body.theme-zieloni .decor .d3, body.theme-zieloni .decor .d4 { display: none; }
body.theme-zieloni .decor .d9, body.theme-zieloni .decor .d10, body.palette-green .decor .d9, body.palette-green .decor .d10 { display: block; width: 70px; height: 70px; top: -80px; background-image: url("themes/zieloni/leaf.svg"); animation: leaf-fall 16s linear infinite; }
body.theme-zieloni .decor .d9, body.palette-green .decor .d9 { left: 70%; }
body.theme-zieloni .decor .d10, body.palette-green .decor .d10 { left: 30%; width: 50px; height: 50px; background-image: url("themes/zieloni/leaf-b.svg"); animation-delay: -8s; animation-duration: 20s; }
body.theme-zieloni .decor .d8, body.palette-green .decor .d8 { display: block; width: 100px; height: 100px; right: 3%; bottom: 0; background-image: url("themes/zieloni/sprout.svg"); transform-origin: 50% 100%; animation: sway 5s ease-in-out infinite; }

@keyframes drift { 0%, 100% { transform: translate(0, 0) rotate(0); } 50% { transform: translate(-24px, -30px) rotate(12deg); } }
@keyframes twinkle { 0%, 100% { transform: scale(.7) rotate(0); opacity: .35; } 50% { transform: scale(1.1) rotate(30deg); opacity: .9; } }
@keyframes ghost-float { 0%, 100% { transform: translate(0, 0) rotate(-4deg); } 50% { transform: translate(-20px, -36px) rotate(5deg); } }
@keyframes bat-fly { 0% { transform: translate(0, 0) scaleY(1); } 10% { transform: translate(12vw, -30px) scaleY(.6); } 20% { transform: translate(24vw, 10px) scaleY(1); } 50% { transform: translate(60vw, -40px) scaleY(.6); } 100% { transform: translate(115vw, 0) scaleY(1); } }
@keyframes wobble { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
@keyframes hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-18px); } 60% { transform: translateY(-18px) rotate(3deg); } }
@keyframes run-across { from { transform: translateX(0); } to { transform: translateX(calc(100vw + 280px)); } }
@keyframes swing { 0%, 100% { transform: rotate(-12deg); } 50% { transform: rotate(12deg); } }
@keyframes snow-fall { 0% { transform: translate(0, 0) rotate(0); } 50% { transform: translate(24px, 55vh) rotate(180deg); } 100% { transform: translate(-10px, 110vh) rotate(360deg); } }
@keyframes lights-blink { 0% { opacity: 1; } 100% { opacity: .65; } }
@keyframes sway { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes wave-move { to { transform: translateX(-400px); } }
@keyframes leaf-fall { 0% { transform: translate(0, 0) rotate(0); } 25% { transform: translate(-50px, 30vh) rotate(70deg); } 50% { transform: translate(30px, 60vh) rotate(150deg); } 100% { transform: translate(-30px, 115vh) rotate(320deg); } }

/* Grafiki banera per motyw */
.banner-art .a1 { background-image: url("themes/standard/mascot.svg"); }
.banner-art .a2 { background-image: url("themes/standard/star.svg"); }
.banner-art .a3 { background-image: url("themes/standard/squiggle.svg"); }
body.season-halloween .banner-art .a1 { background-image: url("themes/halloween/pumpkin.svg"); }
body.season-halloween .banner-art .a2 { background-image: url("themes/halloween/bat.svg"); }
body.season-halloween .banner-art .a3 { background-image: url("themes/halloween/ghost.svg"); }
body.season-christmas .banner-art .a1 { background-image: url("themes/christmas/santa.svg"); }
body.season-christmas .banner-art .a2 { background-image: url("themes/christmas/bauble.svg"); }
body.season-christmas .banner-art .a3 { background-image: url("themes/christmas/tree.svg"); }
body.season-easter .banner-art .a1 { background-image: url("themes/easter/bunny.svg"); }
body.season-easter .banner-art .a2 { background-image: url("themes/easter/egg-a.svg"); }
body.season-easter .banner-art .a3 { background-image: url("themes/easter/chick.svg"); }
body.season-summer .banner-art .a1 { background-image: url("themes/summer/sun-face.svg"); }
body.season-summer .banner-art .a2 { background-image: url("themes/summer/sunglasses.svg"); }
body.season-summer .banner-art .a3 { background-image: url("themes/summer/icecream.svg"); }
body.theme-zieloni .banner-art .a1, body.palette-green .banner-art .a1 { background-image: url("themes/zieloni/sprout.svg"); }
body.theme-zieloni .banner-art .a2, body.palette-green .banner-art .a2 { background-image: url("themes/zieloni/leaf.svg"); }
body.theme-zieloni .banner-art .a3, body.palette-green .banner-art .a3 { background-image: url("themes/zieloni/leaf-b.svg"); }

/* ---------- RESPONSYWNOŚĆ ---------- */
@media (max-width: 1099px) and (min-width: 768px) {
  .app-shell { grid-template-columns: var(--side-w-mini) minmax(0, 1fr); }
  .sidebar { overflow: visible; z-index: 50; }
  .side-inner { padding: var(--s4) var(--s3); overflow: visible; }
  .sidebar::after { display: none; }
  .brand-chip { min-height: 56px; padding: var(--s2); }
  .brand-chip img { max-height: 22px; }
  .nav-group-label { text-align: center; margin: 0; font-size: 9px; letter-spacing: .06em; }
  .nav-link { justify-content: center; padding: var(--s1); min-height: 56px; }
  .nav-link:hover { transform: none; }
  .nav-ico { width: 44px; height: 44px; }
  .nav-label {
    position: absolute; left: calc(100% + 14px); top: 50%; z-index: 60; flex: none; padding: 8px 14px; border-radius: 12px;
    background: var(--ink); color: var(--surface); font-size: 14px; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .5);
    opacity: 0; transform: translate(-6px, -50%); pointer-events: none; transition: opacity .2s, transform .3s var(--spring);
  }
  .nav-link:hover .nav-label, .nav-link:focus-visible .nav-label { opacity: 1; transform: translate(0, -50%); }
  .nav-badge { position: absolute; top: 2px; right: 2px; min-width: 20px; height: 20px; font-size: 10px; padding: 0 5px; }
  .side-user { flex-direction: column; padding: var(--s2); gap: var(--s2); }
  .side-user-copy { display: none; }
  .bento { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .tile, .tile--wide { grid-column: span 3; }
  .tile--hero { grid-column: span 6; grid-row: span 1; }
}
@media (max-width: 767px) {
  :root { --top-h: 64px; }
  .app-shell { display: block; }
  .sidebar { display: none; }
  .topbar { padding: var(--s2) var(--s3); gap: var(--s2); }
  .topbar-brand { display: flex; }
  .topbar-date { display: none; }
  .platform-btn { display: none; }
  .menu-ico-phone { display: block; }
  .menu-ico-desk { display: none; }
  .icon-btn { width: 44px; height: 44px; border-radius: 14px; }
  .quicknav {
    display: flex; gap: var(--s2); position: sticky; top: var(--top-h); z-index: 25; padding: var(--s1) var(--s3) var(--s3);
    overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; scroll-snap-type: x proximity;
    background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  }
  .quicknav::-webkit-scrollbar { display: none; }
  .quicknav .nav-link { flex: none; flex-direction: column; gap: 4px; min-height: 0; min-width: 76px; padding: var(--s2) var(--s2); scroll-snap-align: start; color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: var(--r-sm); }
  .quicknav .nav-link:hover { transform: none; }
  .quicknav .nav-ico { width: 40px; height: 40px; background: var(--surface2); }
  .quicknav .nav-label { font-size: 11px; font-weight: 700; text-align: center; white-space: nowrap; }
  .quicknav .nav-link.is-active { background: linear-gradient(140deg, var(--side1), var(--side2)); color: #fff; border-color: transparent; box-shadow: 0 4px 0 var(--outline); }
  .quicknav .nav-badge { position: absolute; top: 4px; right: 6px; min-width: 20px; height: 20px; font-size: 10px; padding: 0 5px; }
  .container { padding: 0 var(--s3) var(--s6); }
  .page-banner { width: calc(100% - 2 * var(--s3)); padding: var(--s5) var(--s4); min-height: 136px; border-radius: var(--r); }
  .banner-copy { max-width: 72%; }
  .banner-art .a1 { width: 104px; height: 104px; right: -8px; bottom: -12px; }
  .banner-art .a2 { right: 12px; top: 10px; width: 40px; height: 40px; }
  .banner-art .a3 { display: none; }
  .last-login { padding: 0 var(--s3); }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); grid-auto-rows: minmax(130px, auto); }
  .tile, .tile--wide, .tile--hero { grid-column: span 1; grid-row: span 1; padding: var(--s4); }
  .tile--hero, .tile--wide { grid-column: span 2; }
  .tile-title { font-size: clamp(14px, 11cqi, 18px); letter-spacing: -.015em; }
  .tile-ico { width: 48px; height: 48px; }
  .card, .panel { padding: var(--s4); border-radius: var(--r); }
  .form-grid, .grid-2 { grid-template-columns: 1fr; }
  .js .toast-region { left: var(--s3); right: var(--s3); bottom: var(--s3); width: auto; }
  .pop { position: fixed; left: var(--s3); right: var(--s3); top: calc(var(--top-h) + 4px); width: auto; }
  .decor .d4, .decor .d5, .decor .d7, .decor .s7, .decor .s8, .decor .s9, .decor .s10, .decor .s11, .decor .s12 { display: none !important; }
  .decor i { transform-origin: center; }
  body.season-halloween .decor .d1 { width: 120px; height: 120px; }
  body.season-christmas .decor .d1, body.season-christmas .decor .d2, body.season-easter .decor .d1, body.season-halloween .decor .d6 { width: 72px; height: 84px; }
  .desk-only { display: none; }
  .sg-switcher { position: static; }
  th, td { padding: 10px 12px; }
}
@media (hover: none) { .nav-label { transition: none; } }

/* ---------- RUCH ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .decor, .season-lights { display: none !important; }
  .banner-art .art { transform: none !important; }
}

/* ---------- DRUK ---------- */
@media print {
  :root { --bg: #fff; --surface: #fff; --ink: #000; --ink2: #333; --line: #bbb; }
  body { background: #fff !important; color: #000; font-size: 11pt; }
  .sidebar, .topbar, .quicknav, .decor, .season-lights, .banner-art, .toast-region, .privacy-notice, .skip-link, .actions, .btn, button, .last-login, .sg-switcher, dialog { display: none !important; }
  .app-shell { display: block; }
  .page-banner { background: none !important; color: #000; box-shadow: none; padding: 0; min-height: 0; margin: 0 0 12pt; }
  .banner-copy h1, .banner-sub { color: #000; text-shadow: none; }
  .card, .panel, .tile, .stat, .table-wrap { box-shadow: none !important; border: 1px solid #999 !important; background: #fff !important; color: #000 !important; break-inside: avoid; }
  .container { max-width: none; padding: 0; }
  a { color: #000; text-decoration: underline; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; }
}

/* ---------- Runda 2: motywy sezonowe bez nachodzenia na treść ---------- */
/* Treść stron publicznych nad dekoracjami (dekoracje mają z-index 0). */
.wrap { position: relative; z-index: 1; }
/* W panelu treść wypełnia całą szerokość – pływające dekoracje chowałyby się za tekst. Motyw niosą: grafika w banerze, kolory, lampki i śnieg. */
body:has(.app-shell) .decor i:not(.snow) { display: none; }
/* Lampki świąteczne nie zasłaniają górnego paska i logo. */
body.season-christmas .topbar { padding-top: calc(var(--s3) + 18px); }
body.season-christmas .side-inner { padding-top: calc(var(--s5) + 14px); }
body.season-christmas .wrap-login, body.season-christmas .topbar-public { padding-top: 34px; }
/* Fale letnie: zapas pod ostatnim elementem strony. */
body.season-summer .wrap { padding-bottom: 64px; }
/* Logo na ekranie logowania: kontrastowe tło niezależnie od trybu. */
html[data-theme="dark"] .login-logo:not(.is-white), .login-logo.is-white { padding: 10px 18px; border-radius: var(--r); box-sizing: border-box; }
html[data-theme="dark"] .login-logo:not(.is-white) { background: #fff; }
.login-logo.is-white { background: linear-gradient(165deg, var(--side1), var(--side2)); }
@media (max-width: 767px) {
  body.season-christmas { --top-h: 86px; }
  body.season-christmas .topbar { padding-top: 26px; }
}
/* Strony publiczne: dekoracje na całą wysokość dokumentu (fale/kurczaki na dole strony, a nie na środku dłuższego formularza). */
body:not(:has(.app-shell)) { position: relative; min-height: 100vh; }
body:not(:has(.app-shell)) .decor { position: absolute; }

/* ===== Strony ===== */
/* Start */
.home-bento .tile--hero { justify-content: flex-start; min-height: 320px; }
.home-bento .tile--hero .sticker { position: static; align-self: flex-start; }
.home-bento .tile--hero .tile-title { font-size: clamp(28px, 3.4vw, 40px); }
.home-bento .tile--hero .tile-desc { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); font-size: 16px; }
.home-bento .tile--hero .actions { margin-top: auto; }
.home-bento .tile--hero .btn { background: #fff; color: #1c1233; }
.home-bento .stat.tile { grid-column: span 3; flex-direction: row; justify-content: flex-start; padding: var(--s5); }
.home-bento .stat.tile:last-child { grid-column: span 6; }
.home-bento .stat.tile small { display: block; font-weight: 700; color: var(--tink); opacity: .85; }
.home-bento .stat.tile strong { display: block; font: 800 28px/1.1 var(--font-display); color: var(--tink); }
.home-bento .stat.tile .count { font-size: clamp(36px, 5vw, 56px); }
.card--link { display: flex; flex-direction: column; gap: var(--s2); text-decoration: none; color: var(--ink); transition: transform .4s var(--spring); }
.card--link:hover { transform: translateY(-4px) rotate(-.6deg); color: var(--ink); }
.card--link .chip { align-self: flex-start; }
@media (max-width: 1099px) {
  .home-bento .stat.tile, .home-bento .stat.tile:last-child { grid-column: span 2; }
}
@media (max-width: 767px) {
  .home-bento .tile--hero { min-height: 0; }
  .home-bento .stat.tile { grid-column: span 1; flex-direction: column; align-items: flex-start; }
  .home-bento .stat.tile:last-child { grid-column: span 2; flex-direction: row; }
}

/* Wspólne dla podstron */
.page-actions { display: flex; flex-wrap: wrap; gap: var(--s3); justify-content: flex-end; margin-bottom: var(--s4); }
.page-actions .btn .icon, .btn .icon, button .icon { width: 20px; height: 20px; }
.empty-art { width: 160px !important; height: 160px !important; pointer-events: none; }
.empty-state h2 { margin: var(--s2) 0 0; color: var(--ink); }
.empty-state p { max-width: 46ch; margin: 0; }
.prose { max-width: 72ch; line-height: 1.65; overflow-wrap: anywhere; }
.badge-podcaster { position: static; transform: rotate(-2deg); margin-left: 4px; vertical-align: middle; }
details.card > summary { display: flex; align-items: center; gap: var(--s2); min-height: 44px; cursor: pointer; list-style: none; }
details.card > summary::-webkit-details-marker { display: none; }
details.card[open] > summary { margin-bottom: var(--s4); }

/* Podcasty */
.episodes .episode-tile { grid-column: span 4; min-height: 210px; }
.episode-num { font: 800 14px/1 var(--font-display); letter-spacing: .08em; color: var(--tink); opacity: .8; }
.episode-tile .chip { align-self: flex-start; }
.episode-tile .tile-desc { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.episode-tile .tile-desc .icon { width: 16px; height: 16px; }
.podcast-head .tile--hero { grid-row: span 1; min-height: 200px; justify-content: flex-start; }
.podcast-head .tile--hero .sticker { position: static; align-self: flex-start; }
.podcast-head .stat.tile { grid-column: span 3; flex-direction: row; }
.podcast-head .stat.tile strong { font-size: 20px; color: var(--tink); }
.podcast-head .stat.tile small { color: var(--tink); opacity: .85; }
.podcast-cols { display: grid; gap: var(--s4); grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: var(--s4); }
.segment-list, .link-list { list-style: none; margin: 0 0 var(--s4); padding: 0; display: grid; gap: var(--s2); }
.segment, .link-list li { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s2) var(--s2) var(--s3); border-radius: var(--r); background: var(--surface2); }
.segment-time { flex: 0 0 auto; min-width: 64px; padding: 6px 10px; border-radius: var(--r-pill); background: var(--ink); color: var(--surface); font: 800 14px/1 var(--font-display); text-align: center; font-variant-numeric: tabular-nums; }
.segment-copy, .link-list a { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow-wrap: anywhere; }
.link-list a { flex-direction: row; align-items: center; gap: var(--s2); min-height: 44px; color: var(--ink); text-decoration: none; }
.link-list a span { display: flex; flex-direction: column; min-width: 0; }
.segment-copy small, .link-list small { color: var(--ink2); }
.segment-form { display: grid; gap: 0 var(--s3); grid-template-columns: 120px minmax(0, 1fr); }
.segment-form .span-2 { grid-column: 1 / -1; }
@media (max-width: 1099px) {
  .episodes .episode-tile { grid-column: span 3; }
  .podcast-head .stat.tile { grid-column: span 3; }
  .podcast-cols { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .episodes .episode-tile, .podcast-head .tile--hero, .podcast-head .stat.tile { grid-column: 1 / -1; }
  .form-grid, .grid-2 { grid-template-columns: 1fr; }
}
.panel-narrow { max-width: 680px; display: grid; gap: var(--s4); }
.panel-narrow > .card { margin: 0; }
.card-head .stat-ico { flex: 0 0 auto; }
.error .icon, .ok .icon, .flash .icon { flex: 0 0 auto; width: 22px; height: 22px; }

/* Kalendarz: lista na telefonie, siatka od 768 px */
.cal-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s4); }
.cal-title { flex: 1 1 240px; }
.cal-title h2 { margin: 0; font-size: clamp(24px, 3vw, 32px); }
.cal-title p { margin: 4px 0 0; }
.cal-nav { display: flex; align-items: center; gap: var(--s2); }
.cal-legend { display: flex; flex-wrap: wrap; gap: var(--s2); margin: 0; flex-basis: 100%; }
.ev-rehearsal { --ev: var(--t2); }
.ev-performance { --ev: var(--t1); }
.ev-workshop { --ev: var(--t3); }
.ev-other { --ev: var(--t4); }
.cal-legend .chip { background: var(--ev); color: var(--tink); }
.cal-list { display: grid; gap: var(--s4); margin-bottom: var(--s5); }
.cal-list-date { display: flex; align-items: center; gap: var(--s3); margin: 0 0 var(--s2); font-size: 17px; }
.cal-list-num { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--surface); border: 2px solid var(--line); font: 800 18px/1 var(--font-display); transform: rotate(-4deg); }
.is-today .cal-list-num { background: var(--p); color: #fff; border-color: var(--p); }
.cal-list ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.ev-card { display: flex; align-items: center; gap: var(--s3); min-height: 64px; padding: var(--s3); border-radius: var(--r); background: var(--surface); border: 2px solid var(--line); border-left: 8px solid var(--ev); color: var(--ink); text-decoration: none; transition: transform .35s var(--spring); }
.ev-card:hover { transform: translateX(4px); color: var(--ink); }
.ev-ico { flex: 0 0 auto; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--ev); color: var(--tink); }
.ev-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.ev-copy small { color: var(--ink2); }
.cal-desktop { display: none; }
.cal-grid-card { padding: var(--s4); overflow: hidden; }
.weekdays, .cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.weekdays span { padding: 0 6px 6px; font: 800 12px/1 var(--font-display); letter-spacing: .1em; text-transform: uppercase; color: var(--ink2); }
.day { position: relative; min-height: 104px; padding: 6px; border-radius: 14px; background: var(--surface2); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.day.out { background: transparent; }
.day.today { background: var(--surface); box-shadow: inset 0 0 0 3px var(--p); }
.day-number { font: 800 15px/1 var(--font-display); }
.day-today { position: absolute; top: 6px; right: 6px; padding: 2px 8px; border-radius: var(--r-pill); background: var(--p); color: #fff; font: 800 11px/1.4 var(--font-body); }
.event-pill { position: relative; display: flex; flex-direction: column; padding: 4px 8px; border-radius: 10px; background: var(--ev); color: var(--tink); text-decoration: none; font-size: 12px; line-height: 1.25; min-height: 36px; justify-content: center; }
.event-pill .when { font-weight: 800; }
.event-pill .what { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-pill:hover, .event-pill:focus-visible { color: var(--tink); }
.event-preview { position: absolute; z-index: 20; left: 0; top: calc(100% + 6px); width: 240px; padding: var(--s3); border-radius: var(--r); background: var(--surface); color: var(--ink); border: 2px solid var(--outline); box-shadow: 0 6px 0 var(--outline); display: flex; flex-direction: column; gap: 4px; font-size: 13px; opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity .2s, transform .2s; }
.event-pill:hover .event-preview, .event-pill:focus-visible .event-preview { opacity: 1; transform: none; }
.cal .day:nth-child(7n) .event-preview, .cal .day:nth-child(7n-1) .event-preview { left: auto; right: 0; }
.agenda { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.agenda-item { display: flex; align-items: center; gap: var(--s3); }
.agenda-item a { display: flex; flex-direction: column; min-width: 0; color: var(--ink); text-decoration: none; padding: var(--s2) 0; }
.agenda-date { flex: 0 0 auto; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--t4); color: var(--tink); font: 800 20px/1 var(--font-display); }
.agenda-date small { font: 700 11px/1 var(--font-body); text-transform: uppercase; }
.agenda-card .sticker { position: static; }
.calendar-create > summary { gap: var(--s3); }
.calendar-create > summary > span:last-child { display: flex; flex-direction: column; }
@media (min-width: 768px) {
  .cal-list { display: none; }
  .cal-desktop { display: grid; gap: var(--s4); grid-template-columns: minmax(0, 1fr); margin-bottom: var(--s5); }
  .cal-legend { flex-basis: auto; }
}
@media (min-width: 768px) {
  .agenda-card .agenda { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s2) var(--s4); }
}
@media print {
  .cal-desktop { display: grid !important; grid-template-columns: 1fr !important; }
  .cal-list, .calendar-create, .cal-nav { display: none !important; }
}

/* Styleguide */
.sg-icons { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
.sg-icons li { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: var(--s3) var(--s2); border-radius: var(--r-sm); background: var(--surface2); text-align: center; }
.sg-icons .icon { width: 28px; height: 28px; }
.sg-icons small { font-size: 12px; color: var(--ink2); overflow-wrap: anywhere; }
.sg-note { margin: 0; font-size: 13px; }
.sg-section > h2 .icon, .sg-section h2 .icon { width: 26px; height: 26px; }

/* 404 */
.public-main { max-width: 560px; margin: 0 auto; padding: 10vh var(--s4) var(--s6); }
.notfound h1 { font: 800 clamp(28px, 6vw, 40px)/1.1 var(--font-display); margin: var(--s3) 0 var(--s2); }

/* Wydarzenie */
.event-head { display: grid; gap: var(--s3); justify-items: start; margin-bottom: var(--s5); }
.event-meta { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); margin: 0; font-weight: 600; }
.event-meta span { display: inline-flex; align-items: center; gap: 6px; }
.event-meta .icon { width: 18px; height: 18px; color: var(--p); }
.event-head .actions .btn .icon, .print-builder button .icon { width: 18px; height: 18px; }

/* Ogłoszenia / wydruki / poczta */
.announcement-tag .icon { width: 16px; height: 16px; }
.summary-icon .icon { width: 20px; height: 20px; }
.print-builder-head { display: flex; align-items: center; gap: var(--s3); }
.mail-table .muted .icon { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }

.announcement-card { display: flex; flex-direction: column; gap: var(--s2); margin: 0; }
.announcement-card h2 { font-size: 20px; margin: 0; }
.announcement-card p { margin: 0; }
.announcement-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); flex-wrap: wrap; }
.announcement-top time { font-size: 13px; color: var(--ink2); }
.announcement-delete { margin-top: auto; }
.announcement-grid { margin-bottom: var(--s5); }
.announcement-create > summary > span:last-child { display: flex; flex-direction: column; }
.announcement-create > summary small { color: var(--ink2); font-weight: 500; }

/* Poczta */
.mail-app { display: grid; gap: var(--s4); min-width: 0; }
.mail-main { min-width: 0; }
.mail-folders { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.mail-folders a:not(.btn) { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 var(--s4); border-radius: 999px; background: var(--surface); border: 2px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 700; }
.mail-folders a:not(.btn) .icon { width: 18px; height: 18px; }
.mail-folders a.on { background: var(--surface2); border-color: var(--p); color: var(--ink); box-shadow: inset 0 0 0 1px var(--p); }
.mail-folders b { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #1c1233; font-size: 12px; display: inline-grid; place-items: center; }
.mail-folders .btn .icon, .mail-toolbar .btn .icon { width: 18px; height: 18px; }
.mail-toolbar { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; margin-bottom: var(--s3); }
.mail-toolbar h2 { margin: 0; flex: 1 1 auto; }
.mail-toolbar input[type="search"] { flex: 1 1 100%; }
.mail-new-mobile { display: none; }
.mail-list-card { padding: var(--s3); overflow: hidden; }
.mail-table { width: 100%; border-collapse: collapse; }
.mail-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink2); padding: var(--s2) var(--s3); }
.mail-table td { padding: var(--s3); border-top: 2px solid var(--line); vertical-align: top; }
.mail-table td a { color: var(--ink); text-decoration: none; display: block; min-height: 24px; }
.mail-table tr.unread td a { font-weight: 800; }
.mail-table tr.unread td:first-child { box-shadow: inset 4px 0 0 var(--p); }
.mail-table tr:hover td { background: var(--surface2); }
.recipient-count { margin-left: 6px; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--surface2); }
.mail-read .actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s4); }
.mail-read .actions form { margin: 0; }
.mail-quote { border-left: 4px solid var(--line); padding-left: var(--s3); color: var(--ink2); }
.mail-body { white-space: normal; line-height: 1.6; }
@media (max-width: 767px) {
  .mail-folders > .btn { display: none; }
  .mail-new-mobile { display: inline-flex; }
  .mail-table th:nth-child(3), .mail-table td:nth-child(3) { white-space: nowrap; }
  .mail-table td { padding: var(--s2); font-size: 14px; }
}
@media (min-width: 1024px) {
  .mail-app { grid-template-columns: 220px minmax(0, 1fr); align-items: start; }
  .mail-folders { flex-direction: column; align-items: stretch; position: sticky; top: var(--s4); }
  .mail-folders a:not(.btn) { border-radius: var(--r-sm); }
  .mail-toolbar input[type="search"] { flex: 0 1 280px; }
}

/* Listy z dawnych stron: usprawiedliwienia, frekwencja (telefon), historia powiadomień, proste agendy */
.excuse-list, .notice-list, .freq-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.excuse-list > li { background: var(--surface2); border: 2px solid var(--line); border-radius: var(--r); padding: var(--s4); display: grid; gap: var(--s2); }
.excuse-list p { margin: 0; }
.excuse-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2); }
.pill.pending { background: var(--warn-bg); color: var(--warn-ink); }
.pill.accepted { background: var(--ok-bg); color: var(--ok-ink); }
.pill.rejected { background: var(--err-bg); color: var(--err-ink); }
.excuse-list .review, .excuse-list .actions { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: flex-end; }
.excuse-list .review label { flex: 1 1 100%; }
.name-grid { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.name-card { background: var(--surface); border: 2px solid var(--line); border-radius: var(--r); padding: var(--s3) var(--s4); }
.name-card summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: var(--s2); font-weight: 800; }
.name-card[open] summary { margin-bottom: var(--s3); }
.freq-card { display: flex; align-items: center; gap: var(--s3); background: var(--surface2); border: 2px solid var(--line); border-radius: var(--r); padding: var(--s3); }
.freq-when { flex: 0 0 auto; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--surface); border: 2px solid var(--line); }
.freq-when strong { font: 800 17px/1 var(--font-display); }
.freq-when span { font-size: 12px; color: var(--ink2); }
.freq-main { display: grid; gap: 2px; min-width: 0; flex: 1 1 auto; }
.freq-main span { color: var(--ink2); font-size: 14px; }
.freq-pill { flex: 0 0 auto; padding: 4px 10px; border-radius: var(--r-pill); font: 700 12px/1.2 var(--font-body); background: var(--chip); color: var(--ink); }
.freq-pill.att-present { background: var(--ok-bg); color: var(--ok-ink); }
.freq-pill.att-absent, .freq-pill.att-unexcused { background: var(--err-bg); color: var(--err-ink); }
.freq-pill.att-late { background: var(--warn-bg); color: var(--warn-ink); }
.freq-pill.att-excused { background: var(--info-bg); color: var(--info-ink); }
.notice-list a { display: grid; gap: 2px; padding: var(--s3) var(--s4); border-radius: var(--r); border: 2px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; transition: transform .2s ease; }
.notice-list a:hover { transform: translateY(-1px); }
.notice-list span { color: var(--ink2); }
.notice-list small { color: var(--ink2); font-size: 13px; }
.notice-list li.unread a { background: var(--surface2); box-shadow: inset 4px 0 0 var(--p); }
.agenda > li:not([class*="agenda-"]) { padding: var(--s3) 0; border-bottom: 2px solid var(--line); }
.agenda > li:not([class*="agenda-"]):last-child { border-bottom: 0; }
.agenda > li.split { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s2); }
.agenda > li .actions { margin-top: var(--s2); }
.leave-card { background: var(--surface2); border: 2px solid var(--line); border-radius: var(--r); padding: var(--s4); display: grid; gap: var(--s2); }
.leave-card + .leave-card { margin-top: var(--s3); }
.leave-card p { margin: 0; }
.leave-card > .split { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s2); }
.leave-card form { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: flex-end; }
.leave-card form label { flex: 1 1 220px; }
.leave-decide .actions { display: flex; flex-wrap: wrap; gap: var(--s2); }

/* =====================================================================
   RUNDA 3 – zdjęcia profilowe, poczta, obecność, frekwencja, użytkownicy,
   typy wydarzeń, samouczek. Plik źródłowy: tools/runda3.css
   ===================================================================== */

.is-hidden { display: none !important; }
.small { font-size: 13px; }
.notice { display: flex; align-items: flex-start; gap: var(--s3); padding: var(--s3) var(--s4); border-radius: var(--r-sm); background: var(--info-bg); color: var(--info-ink); font-weight: 650; margin: 0 0 var(--s4); }
.notice .icon { flex: none; width: 20px; height: 20px; }
.section-title { font-size: 20px; margin: 0 0 var(--s3); }
.error .icon { flex: none; }

/* ---------- Awatary ---------- */
.avatar { overflow: hidden; }
.avatar--sm { width: 32px; height: 32px; border-radius: 11px; font-size: 12px; border-width: 2px; }
.avatar--md { width: 44px; height: 44px; }
.avatar--lg { width: 64px; height: 64px; border-radius: 20px; font-size: 22px; }
.avatar--xl { width: 128px; height: 128px; border-radius: 36px; font-size: 42px; border-width: 3px; }
.avatar.has-photo { background: var(--surface2); padding: 0; }
.avatar.has-photo img { display: block; width: 100%; height: 100%; object-fit: cover; transform: rotate(4deg) scale(1.12); }
.avatar.is-live-photo { cursor: pointer; }
.avatar-live-video { display: none; width: 100%; height: 100%; object-fit: cover; transform: rotate(4deg) scale(1.12); }
.avatar.is-playing img { display: none; }
.avatar.is-playing .avatar-live-video { display: block; }
.avatar-h0 { background: #ffcf3f; color: #1c1233; }
.avatar-h1 { background: #9be7cf; color: #1c1233; }
.avatar-h2 { background: #ffb3d1; color: #1c1233; }
.avatar-h3 { background: #b9cdff; color: #1c1233; }
.avatar-h4 { background: #d7c6ff; color: #1c1233; }
.avatar-h5 { background: #ffd0a8; color: #1c1233; }
.side-user .avatar, .menu-user .avatar { width: 40px; height: 40px; }

/* ---------- Typy wydarzeń: kolory i ikony ---------- */
.ev-meeting { --ev: hsl(210 82% 87%); --ev-strong: hsl(210 60% 34%); }
html[data-theme="dark"] .ev-meeting { --ev: hsl(210 28% 27%); --ev-strong: hsl(210 70% 78%); }
.ev-gathering { --ev: hsl(280 82% 87%); --ev-strong: hsl(280 60% 34%); }
html[data-theme="dark"] .ev-gathering { --ev: hsl(280 28% 27%); --ev-strong: hsl(280 70% 78%); }
.ev-training { --ev: hsl(28 82% 87%); --ev-strong: hsl(28 60% 34%); }
html[data-theme="dark"] .ev-training { --ev: hsl(28 28% 27%); --ev-strong: hsl(28 70% 78%); }
.ev-trip { --ev: hsl(188 82% 87%); --ev-strong: hsl(188 60% 34%); }
html[data-theme="dark"] .ev-trip { --ev: hsl(188 28% 27%); --ev-strong: hsl(188 70% 78%); }
.ev-conference { --ev: hsl(232 82% 87%); --ev-strong: hsl(232 60% 34%); }
html[data-theme="dark"] .ev-conference { --ev: hsl(232 28% 27%); --ev-strong: hsl(232 70% 78%); }
.ev-film { --ev: hsl(340 82% 87%); --ev-strong: hsl(340 60% 34%); }
html[data-theme="dark"] .ev-film { --ev: hsl(340 28% 27%); --ev-strong: hsl(340 70% 78%); }
.ev-volunteering { --ev: hsl(140 82% 87%); --ev-strong: hsl(140 60% 34%); }
html[data-theme="dark"] .ev-volunteering { --ev: hsl(140 28% 27%); --ev-strong: hsl(140 70% 78%); }
.ev-party { --ev: hsl(318 82% 87%); --ev-strong: hsl(318 60% 34%); }
html[data-theme="dark"] .ev-party { --ev: hsl(318 28% 27%); --ev-strong: hsl(318 70% 78%); }
.ev-camp { --ev: hsl(96 82% 87%); --ev-strong: hsl(96 60% 34%); }
html[data-theme="dark"] .ev-camp { --ev: hsl(96 28% 27%); --ev-strong: hsl(96 70% 78%); }
.ev-online { --ev: hsl(258 82% 87%); --ev-strong: hsl(258 60% 34%); }
html[data-theme="dark"] .ev-online { --ev: hsl(258 28% 27%); --ev-strong: hsl(258 70% 78%); }
.ev-podcast { --ev: hsl(8 82% 87%); --ev-strong: hsl(8 60% 34%); }
html[data-theme="dark"] .ev-podcast { --ev: hsl(8 28% 27%); --ev-strong: hsl(8 70% 78%); }
.ev-chip { background: var(--ev); color: var(--tink); }
.ev-chip .icon { width: 16px; height: 16px; }
.ev-dot { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 4px; vertical-align: -3px; }
.ev-dot .icon { width: 14px; height: 14px; }
.event-pill .when { display: inline-flex; align-items: center; }
.event-pill { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 2px; }
.event-pill .what { flex: 1 1 100%; }
.ev-sticker { background: var(--ev) !important; color: var(--tink) !important; }
.cal-list-day { display: grid; gap: var(--s2); }
.cal-list-day.is-today > :first-child { color: var(--p); }

.type-field { display: block; }
.type-select { position: relative; display: block; margin-top: 6px; }
.type-select select { margin-top: 0; padding-left: 60px; padding-right: 44px; appearance: none; -webkit-appearance: none; font-weight: 650; border-left: 8px solid var(--ev); cursor: pointer; }
.type-select-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--ev); color: var(--tink); pointer-events: none; }
.type-select-ico .tsi { display: none; }
.type-select-ico .icon { width: 20px; height: 20px; }
.type-select.ev-rehearsal .tsi-rehearsal, .type-select.ev-performance .tsi-performance, .type-select.ev-workshop .tsi-workshop, .type-select.ev-other .tsi-other, .type-select.ev-meeting .tsi-meeting, .type-select.ev-gathering .tsi-gathering, .type-select.ev-training .tsi-training, .type-select.ev-trip .tsi-trip, .type-select.ev-conference .tsi-conference, .type-select.ev-film .tsi-film, .type-select.ev-volunteering .tsi-volunteering, .type-select.ev-party .tsi-party, .type-select.ev-camp .tsi-camp, .type-select.ev-online .tsi-online, .type-select.ev-podcast .tsi-podcast { display: grid; }
.type-select-chev { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--ink2); pointer-events: none; }

/* ---------- Zakładki (frekwencja, użytkownicy) ---------- */
.tabbar { display: flex; flex-wrap: wrap; gap: var(--s2); margin: 0 0 var(--s5); padding: 6px; border-radius: var(--r-pill); background: var(--surface); border: 2px solid var(--line); width: fit-content; max-width: 100%; }
.tab { display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; padding: 0 var(--s4); border-radius: var(--r-pill); color: var(--ink); text-decoration: none; font-weight: 750; white-space: nowrap; transition: background .2s; }
.tab .icon { width: 18px; height: 18px; color: var(--p); }
html[data-theme="dark"] .tab .icon { color: var(--link); }
.tab:hover { background: var(--surface2); color: var(--ink); }
.tab.is-on { background: linear-gradient(120deg, var(--p), var(--p2)); color: #fff; }
.tab.is-on .icon { color: #fff; }
.tab-num { min-width: 24px; height: 24px; padding: 0 7px; border-radius: var(--r-pill); display: inline-grid; place-items: center; font: 800 12px/1 var(--font-display); background: var(--chip); color: var(--ink); }
.tab.is-on .tab-num { background: rgba(255, 255, 255, .22); color: #fff; }

/* ---------- Obecność: kody O / N / S / NN / U ---------- */
.att-o { --att: #15803d; }
.att-n { --att: #be123c; }
.att-s { --att: #a14d06; }
.att-nn { --att: #7e1d4f; }
.att-u { --att: #1d4ed8; }
.att-none { --att: #5b5470; }
html[data-theme="dark"] .att-o { --att: #15803d; }
html[data-theme="dark"] .att-nn { --att: #9d2763; }
html[data-theme="dark"] .att-u { --att: #2f5fe0; }
html[data-theme="dark"] .att-none { --att: #6b6485; }
.att-box, .att-key { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 9px; background: var(--att, var(--chip)); color: #fff; font: 800 13px/1 var(--font-display); letter-spacing: .02em; }
.att-legend { list-style: none; margin: var(--s3) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); font-size: 14px; font-weight: 650; color: var(--ink2); }
.att-legend li { display: inline-flex; align-items: center; gap: var(--s2); }
.att-picker { margin-bottom: var(--s4); }
.att-picker-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s3); }
.att-picker-form label, .att-picker-label { flex: 1 1 280px; margin: 0; }
.att-summary { display: grid; gap: var(--s4); margin-bottom: var(--s4); }
.att-summary-title h2 { margin: 0; }
.att-summary-title p { margin: 4px 0 0; }
.att-counts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: var(--s2); }
.att-count { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: var(--s3); border-radius: var(--r-sm); background: color-mix(in srgb, var(--att) 12%, var(--surface)); border: 2px solid color-mix(in srgb, var(--att) 30%, var(--line)); }
.att-count b { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 6px; border-radius: 12px; background: var(--att); color: #fff; font: 800 18px/1 var(--font-display); }
.att-count span { font-size: 13px; font-weight: 700; line-height: 1.2; color: var(--ink); }
.att-form { display: grid; gap: var(--s3); }
.att-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); }
.att-list { display: grid; gap: var(--s3); }
.att-person { display: grid; grid-template-columns: 1fr; align-items: center; gap: var(--s3) var(--s4); padding: var(--s3) var(--s4); border-radius: var(--r); background: var(--surface); border: 2px solid var(--line); box-shadow: inset 6px 0 0 var(--line); transition: box-shadow .2s, border-color .2s; }
.att-person.is-marked { box-shadow: inset 6px 0 0 var(--p); }
.att-person.is-inactive { opacity: .78; background: var(--surface2); }
.att-meta { display: flex; align-items: center; gap: var(--s3); min-width: 0; }
.att-index { flex: none; width: 26px; text-align: right; font: 800 13px/1 var(--font-display); color: var(--ink2); }
.att-who { display: flex; flex-wrap: wrap; align-items: center; gap: 2px var(--s2); min-width: 0; }
.att-who strong { flex: 1 1 100%; font-family: var(--font-display); overflow-wrap: anywhere; }
.att-when { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.att-when .icon { width: 14px; height: 14px; }
.att-note, .att-skip { grid-column: 1 / -1; margin: 0; display: flex; gap: var(--s2); align-items: flex-start; font-size: 14px; }
.att-note { padding: var(--s2) var(--s3); border-radius: var(--r-sm); background: var(--surface2); }
.att-note .icon { flex: none; width: 18px; height: 18px; color: var(--p); }
.att-choices { display: flex; flex-wrap: wrap; gap: 6px; padding-left: 38px !important; margin: 0; padding: 0; border: 0; min-width: 0; }
.att-choice { flex: 1 1 auto; justify-content: flex-start; position: relative; display: inline-flex; align-items: center; gap: var(--s2); min-height: 48px; margin: 0; padding: 4px 14px 4px 6px; border-radius: var(--r-pill); background: var(--surface); border: 2px solid color-mix(in srgb, var(--att) 35%, var(--line)); color: var(--ink); font-size: 14px; font-weight: 700; cursor: pointer; user-select: none; transition: background .2s, border-color .2s, transform .25s var(--spring); }
.att-choice:hover { transform: translateY(-1px); border-color: var(--att); }
.att-radio { position: absolute; inset: 0; width: 100% !important; height: 100% !important; margin: 0 !important; opacity: 0; cursor: pointer; }
.att-choice .att-box { min-width: 36px; height: 36px; border-radius: 50%; background: color-mix(in srgb, var(--att) 14%, var(--surface)); color: var(--att); border: 2px solid var(--att); }
html[data-theme="dark"] .att-choice .att-box { color: #fff; background: color-mix(in srgb, var(--att) 35%, var(--surface)); }
.att-choice.on, .att-choice:has(.att-radio:checked) { background: var(--att); border-color: var(--att); color: #fff; box-shadow: 0 4px 0 color-mix(in srgb, var(--att) 55%, #000); }
.att-choice.on .att-box, .att-choice:has(.att-radio:checked) .att-box { background: #fff; color: var(--att); border-color: #fff; }
.att-choice:has(.att-radio:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
.att-save { position: sticky; bottom: var(--s3); z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--s3); padding: var(--s3) var(--s4); border-radius: var(--r-pill); background: var(--surface); border: 2px solid var(--line); box-shadow: 0 12px 28px -14px rgba(20, 8, 40, .45); }
.att-save [data-att-dirty] { font-weight: 700; color: var(--warn-ink); background: var(--warn-bg); padding: 6px 12px; border-radius: var(--r-pill); }
.attendance-exports { margin: var(--s4) 0; }
.att-log { margin-top: var(--s4); }
.att-log > summary { cursor: pointer; font-weight: 800; min-height: 44px; display: flex; align-items: center; }
.att-log-list { list-style: none; margin: var(--s3) 0 0; padding: 0; display: grid; gap: var(--s2); font-size: 14px; }
.att-log-list li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); padding: var(--s2) 0; border-top: 2px solid var(--line); }
@media (min-width: 1500px) { .att-person { grid-template-columns: minmax(220px, 1fr) auto; } .att-choices { padding-left: 0 !important; } .att-choice { flex: 0 1 auto; } }
@media (max-width: 767px) {
  .att-person { padding: var(--s3); }
  .att-index { display: none; }
  .att-choices { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; padding-left: 0 !important; }
  .att-choice { justify-content: center; padding: 4px; min-height: 52px; border-radius: 16px; }
  .att-choice .att-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .att-choice .att-box { min-width: 40px; height: 40px; }
  .att-save { border-radius: var(--r); justify-content: stretch; }
  .att-save button { flex: 1 1 auto; }
  .att-counts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .att-count { padding: var(--s2); }
  .att-count span { font-size: 12px; overflow-wrap: anywhere; }
}

/* ---------- Frekwencja ---------- */
.freq-summary { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: var(--s4); margin-bottom: var(--s4); }
.freq-summary .freq-bar { grid-column: 1 / -1; }
.freq-rate { display: grid; place-items: center; width: 112px; height: 112px; border-radius: 36px; background: linear-gradient(140deg, var(--p), var(--p2)); color: #fff; text-align: center; transform: rotate(-4deg); }
.freq-rate b { font: 800 32px/1 var(--font-display); }
.freq-rate span { font-size: 12px; font-weight: 700; padding: 0 6px; }
.freq-bar { display: block; width: 100%; height: 12px; border-radius: var(--r-pill); overflow: hidden; background: var(--surface2); }
.seg-o { fill: #15803d; } .seg-n { fill: #be123c; } .seg-s { fill: #c2610c; } .seg-nn { fill: #7e1d4f; } .seg-u { fill: #1d4ed8; }
.freq-card { border-left: 8px solid var(--ev, var(--line)); background: var(--surface); }
.freq-main strong { overflow-wrap: anywhere; }
.freq-main .muted { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.freq-main .muted .icon { width: 16px; height: 16px; }
.freq-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 4px; min-height: 36px; font-size: 13px; background: color-mix(in srgb, var(--att, var(--chip)) 14%, var(--surface)); color: var(--ink); border: 2px solid color-mix(in srgb, var(--att, var(--line)) 40%, var(--line)); }
.freq-pill .att-key { min-width: 28px; height: 28px; border-radius: 50%; }
.freq-card--event { flex-wrap: wrap; }
.freq-card--event .freq-main { flex: 1 1 220px; }
.freq-card--event .freq-bar { height: 8px; margin-top: 6px; }
.freq-mini { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.freq-mini .att-key { min-width: 0; height: 28px; padding: 0 8px; gap: 4px; display: inline-flex; font-size: 12px; }
.freq-mini .att-key b { font-weight: 800; }
@media (max-width: 767px) {
  .freq-summary { grid-template-columns: 1fr; justify-items: start; }
  .freq-rate { width: 96px; height: 96px; }
  .freq-card { flex-wrap: wrap; }
  .freq-pill { margin-left: 68px; }
}
.behavior-layout { display: grid; gap: var(--s4); grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); align-items: start; }
.behavior-form { position: sticky; top: calc(var(--top-h) + var(--s3)); }
.behavior-list { display: grid; gap: var(--s3); min-width: 0; }
.note-card > header { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s2); }
.note-card > header > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.note-card > header form { margin: 0; }
.note-line { display: flex; gap: var(--s2); align-items: flex-start; margin: var(--s2) 0 0; padding: var(--s2) var(--s3); border-radius: var(--r-sm); }
.note-line .icon { flex: none; width: 18px; height: 18px; margin-top: 2px; }
.note-line--ok { background: var(--ok-bg); color: var(--ok-ink); }
.note-line--info { background: var(--info-bg); color: var(--info-ink); }
@media (max-width: 1099px) { .behavior-layout { grid-template-columns: 1fr; } .behavior-form { position: static; } }

/* ---------- Poczta ---------- */
.mail-read-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s4); }
.mail-read-actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
.mail-read-actions form { margin: 0; }
.mail-subject { margin: 0 0 var(--s3); font-size: clamp(20px, 3vw, 28px); overflow-wrap: anywhere; }
.mail-from { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s4); }
.mail-from > div { display: flex; flex-direction: column; min-width: 0; }
.mail-from .muted { font-size: 14px; }
.mail-recipients { margin-bottom: var(--s4); }
.mail-recipients > summary { display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; cursor: pointer; font-weight: 700; }
.mail-recipients > summary .icon { width: 18px; height: 18px; }
.mail-recipients ol { margin: var(--s2) 0 0; padding-left: var(--s5); display: grid; gap: 6px; }
.mail-body { padding: var(--s4); border-radius: var(--r); background: var(--surface2); overflow-wrap: anywhere; }
.mail-text { white-space: normal; line-height: 1.6; }
.mail-quote { margin: var(--s3) 0 0; padding: var(--s2) 0 var(--s2) var(--s4); border-left: 4px solid color-mix(in srgb, var(--p) 45%, var(--line)); color: var(--ink2); font-size: 15px; }
.mail-quote .mail-quote { margin-top: var(--s2); }
.mail-quote-head { display: flex; align-items: center; gap: var(--s2); margin: 0 0 var(--s2); font-weight: 700; font-size: 14px; color: var(--ink2); }
.mail-quote-head .icon { flex: none; width: 16px; height: 16px; color: var(--p); }
html[data-theme="dark"] .mail-quote-head .icon { color: var(--link); }
.mail-attachment { display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; margin-top: var(--s3); padding: 0 var(--s4); border-radius: var(--r-pill); background: var(--surface); border: 2px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 700; max-width: 100%; }
.mail-attachment span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-attachment .icon { flex: none; width: 18px; height: 18px; color: var(--p); }
.mail-attachment:hover { border-color: var(--p); color: var(--ink); }
.mail-thread { margin-top: var(--s5); display: grid; gap: var(--s3); }
.mail-thread h3 { display: flex; align-items: center; gap: var(--s2); margin: 0; font-size: 18px; }
.mail-thread-item { padding: var(--s3) var(--s4); border-radius: var(--r); background: var(--surface); border: 2px solid var(--line); max-width: 92%; }
.mail-thread-item.mine { margin-left: auto; background: var(--surface2); }
.mail-thread-item.is-current { border-color: var(--p); }
.mail-thread-item > header { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s2); }
.mail-thread-item > header time { margin-left: auto; font-size: 13px; color: var(--ink2); }
.mail-quote-toggle { margin-top: var(--s2); }
.mail-quote-toggle > summary { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; font-size: 14px; font-weight: 700; color: var(--link); }
.mail-reply { margin-top: var(--s5); padding-top: var(--s5); border-top: 2px solid var(--line); }
.mail-reply h2 { display: flex; align-items: center; gap: var(--s2); font-size: 20px; }
.mail-quote-preview { margin: 0 0 var(--s3); padding: var(--s3) var(--s4); border-radius: var(--r-sm); border: 2px dashed var(--line); max-height: 280px; overflow: auto; font-size: 14px; }
.mail-quote-preview .mail-quote { margin-top: 0; }
.mail-quote-note { margin: 0 0 var(--s2); font-size: 13px; font-weight: 700; }
.mail-picker-tools { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin-bottom: var(--s3); }
.mail-picker-tools input { flex: 1 1 220px; margin-top: 0; }
.mail-who { display: flex !important; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.mail-clip { width: 16px; height: 16px; color: var(--ink2); }
.file-field { display: grid; gap: 6px; padding: var(--s3); border-radius: var(--r-sm); border: 2px dashed color-mix(in srgb, var(--p) 40%, var(--line)); background: var(--surface); }
.file-field > span { display: inline-flex; align-items: center; flex-wrap: wrap; gap: var(--s2); }
.file-field .icon { width: 18px; height: 18px; color: var(--p); }
html[data-theme="dark"] .file-field .icon { color: var(--link); }
.file-field input[type="file"] { margin-top: 0; min-height: 44px; cursor: pointer; }
.file-field input[type="file"]::file-selector-button { min-height: 36px; margin-right: var(--s3); padding: 0 var(--s4); border-radius: var(--r-pill); border: 0; background: var(--chip); color: var(--ink); font: 700 14px/1 var(--font-body); cursor: pointer; }
@media (max-width: 767px) { .mail-thread-item { max-width: 100%; } .mail-read-bar .btn { flex: 1 1 auto; } }

/* ---------- Użytkownicy ---------- */
.welcome-card-note { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); }
.add-card { margin-bottom: var(--s4); padding: 0; overflow: hidden; }
.add-card > summary { display: flex; align-items: center; gap: var(--s3); min-height: 72px; padding: var(--s4) var(--s5); cursor: pointer; list-style: none; }
.add-card > summary::-webkit-details-marker { display: none; }
.add-card > summary > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.add-card > summary strong { font: 800 18px/1.2 var(--font-display); }
.add-card-chev { width: 24px; height: 24px; transition: transform .3s var(--spring); }
.add-card[open] .add-card-chev { transform: rotate(180deg); }
.add-card-body { padding: 0 var(--s5) var(--s5); gap: var(--s4); }
.add-form { padding: var(--s4); border-radius: var(--r); background: var(--surface2); }
.add-form h2 { display: flex; align-items: center; gap: var(--s2); font-size: 18px; margin: 0 0 4px; }
.checks { display: flex; flex-wrap: wrap; gap: var(--s2); margin: 0 0 var(--s4); padding: 0; border: 0; }
.checks legend { font-weight: 700; font-size: 14px; margin-bottom: 6px; padding: 0; }
.check-pill { display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; margin: 0; padding: 0 var(--s4) 0 var(--s3); border-radius: var(--r-pill); background: var(--surface); border: 2px solid var(--line); cursor: pointer; }
.check-pill input { margin: 0 !important; }
.check-pill:has(input:checked) { border-color: var(--p); background: color-mix(in srgb, var(--p) 10%, var(--surface)); }
.people-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s4); }
.people-toolbar .tabbar { margin: 0; }
.inline-search { display: flex; gap: var(--s2); align-items: center; flex: 0 1 340px; margin: 0; }
.inline-search input { margin-top: 0; }
.people-grid { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); align-items: start; }
.people-grid > .empty-state { grid-column: 1 / -1; }
.person-card { position: relative; display: grid; gap: var(--s3); padding: var(--s4); border-radius: var(--r); background: var(--surface); border: 2px solid var(--line); box-shadow: 0 4px 0 var(--line); min-width: 0; }
.person-card.is-muted { background: var(--surface2); }
.person-main { display: flex; align-items: flex-start; gap: var(--s3); }
.person-copy { flex: 1; min-width: 0; }
.person-copy h3 { margin: 0 0 6px; font-size: 18px; overflow-wrap: anywhere; }
.person-sub, .person-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; }
.person-badges:empty { display: none; }
.role-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 3px 10px; border-radius: var(--r-pill); font: 800 12px/1.2 var(--font-body); background: var(--t2); color: var(--tink); }
.role-chip .icon { width: 14px; height: 14px; }
.role-chip--parent { background: var(--t3); }
.role-chip--staff { background: var(--t1); }
.badge-podcaster { background: #2a1170; color: #fff; }
html[data-theme="dark"] .badge-podcaster { background: #b5a0f1; color: #1c1233; }
.person-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: var(--s2); margin: 0; padding: var(--s3); border-radius: var(--r-sm); background: var(--surface2); }
.person-card.is-muted .person-facts { background: var(--surface); }
.person-facts div { min-width: 0; }
.person-facts dt { font: 800 11px/1.2 var(--font-display); letter-spacing: .1em; text-transform: uppercase; color: var(--ink2); }
.person-facts dd { margin: 2px 0 0; font-size: 14px; font-weight: 650; overflow-wrap: anywhere; }
.person-menu { flex: none; }
.person-menu .pop { width: min(290px, calc(100vw - 24px)); }
.person-menu .menu-panel form { margin: 0; }
.person-menu .menu-item .icon { width: 20px; height: 20px; color: var(--p); }
html[data-theme="dark"] .person-menu .menu-item .icon { color: var(--link); }
.person-menu .menu-danger .icon { color: var(--err-ink); }
.menu-note { margin: 0; padding: var(--s2) var(--s3); font-size: 14px; }
.edit-card > summary.edit-toggle { display: flex; align-items: center; gap: var(--s2); min-height: 44px; padding: 0 var(--s3); border-radius: var(--r-sm); cursor: pointer; list-style: none; font-weight: 750; color: var(--link); border: 2px dashed var(--line); }
.edit-card > summary.edit-toggle::-webkit-details-marker { display: none; }
.edit-toggle .icon { width: 18px; height: 18px; }
.edit-toggle > span { flex: 1; }
.edit-chev { transition: transform .3s var(--spring); }
.edit-card[open] .edit-chev { transform: rotate(180deg); }
.edit-card[open] > summary.edit-toggle { border-style: solid; border-color: var(--p); }
.edit-form { margin-top: var(--s3); }
.status-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--warn-ink); }
.status-dot.is-on { background: var(--ok-ink); }
.links-layout { display: grid; gap: var(--s4); grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); align-items: start; }
.links-layout h2 { display: flex; align-items: center; gap: var(--s2); font-size: 20px; }
.link-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.link-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2); padding: var(--s2) 0; border-top: 2px solid var(--line); }
.link-list li:first-child { border-top: 0; }
.link-list form { margin: 0; }
.link-pair { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--s2); min-width: 0; }
.link-pair .icon { width: 16px; height: 16px; color: var(--ink2); }
.photo-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.photo-tile { display: grid; justify-items: center; gap: 6px; padding: var(--s4); border-radius: var(--r); background: var(--surface2); text-align: center; }
.photo-tile form { margin: var(--s2) 0 0; }
.photo-tile strong { overflow-wrap: anywhere; }
@media (max-width: 1099px) { .links-layout { grid-template-columns: 1fr; } }
@media (max-width: 767px) {
  .add-card > summary { padding: var(--s3) var(--s4); }
  .add-card-body { padding: 0 var(--s3) var(--s3); }
  .people-toolbar .tabbar { width: 100%; border-radius: var(--r); flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .inline-search { flex: 1 1 100%; }
  .person-menu .pop { position: absolute; left: auto; right: 0; top: calc(100% + 8px); width: min(290px, calc(100vw - 32px)); }
}

/* ---------- Konto ---------- */
.account-layout { display: grid; gap: var(--s4); grid-template-columns: minmax(280px, 400px) minmax(0, 1fr); align-items: start; }
.account-layout .account-help { grid-column: 1 / -1; }
.account-layout h2 { display: flex; align-items: center; gap: var(--s2); font-size: 20px; }
.account-photo-row { display: flex; align-items: center; gap: var(--s4); margin-bottom: var(--s4); }
.account-photo-row p { margin: 0 0 6px; }
.photo-form { display: grid; gap: var(--s3); margin-bottom: var(--s3); }
.photo-form .file-field { margin: 0; }
.account-photo form { margin: 0; }
.account-form .actions { margin-top: 0; }
@media (max-width: 1099px) { .account-layout { grid-template-columns: 1fr; } }
@media (max-width: 767px) { .account-photo-row { flex-direction: column; align-items: flex-start; } }

/* ---------- Inne strony bez stylów (audyt klas) ---------- */
.status-card { display: grid; gap: var(--s3); }
.status-card-message { font: 700 18px/1.4 var(--font-display); margin: 0; }
.status-card-photo { width: 100%; max-width: 640px; height: auto; border-radius: var(--r); }
.print-options { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s3); }
.excuse-source { font-size: 14px; }
.last-login-row { display: block; color: var(--ink2); font-size: 13px; }
.panel-medium { max-width: 640px; }
.settings-logo { max-width: 260px; height: auto; padding: var(--s3); border-radius: var(--r-sm); background: var(--surface2); }
.logout-card { max-width: 520px; margin-inline: auto; text-align: center; }
.leave-form { max-width: 760px; }

/* ---------- Samouczek ---------- */
.tutorial { width: min(520px, calc(100vw - 24px)); }
.tutorial-form { margin: 0; }
.tutorial-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s3) var(--s4) 0 var(--s5); }
.tutorial-count { font: 800 13px/1 var(--font-display); letter-spacing: .1em; text-transform: uppercase; color: var(--ink2); }
.tutorial-step { padding: var(--s4) var(--s5) var(--s3); text-align: center; }
.tutorial-step[hidden] { display: none; }
.tutorial-step h2 { margin: var(--s3) 0 var(--s2); }
.tutorial-step p { margin: 0; color: var(--ink2); line-height: 1.6; }
.tutorial-ico { display: inline-grid; place-items: center; width: 84px; height: 84px; border-radius: 28px; background: var(--t1); color: var(--tink); border: 2px solid var(--outline); transform: rotate(-6deg); }
.tutorial-ico--1 { background: var(--t2); transform: rotate(5deg); }
.tutorial-ico--2 { background: var(--t3); }
.tutorial-ico--3 { background: var(--t4); transform: rotate(4deg); }
.tutorial-ico .icon { width: 40px; height: 40px; }
.tutorial-dots { list-style: none; margin: 0; padding: var(--s2) 0 var(--s4); display: flex; justify-content: center; gap: 6px; }
.tutorial-dots li { width: 8px; height: 8px; border-radius: var(--r-pill); background: var(--line); transition: width .3s var(--spring), background .2s; }
.tutorial-dots li.is-on { width: 24px; background: var(--p); }
html[data-theme="dark"] .tutorial-dots li.is-on { background: var(--link); }
.tutorial-actions [hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .tutorial-dots li, .add-card-chev, .edit-chev { transition: none; } }
.freq-main > .chip, .freq-main > .freq-mini { justify-self: start; }
.freq-summary .att-counts { grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); }
.print-icon { background: var(--t3); }
.tutorial-skip { flex: none; }
@media (max-width: 767px) {
  .people-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .people-stats .stat { padding: var(--s3); }
}
.file-field { grid-template-columns: auto 1fr; align-items: center; column-gap: var(--s2); }
.file-field > input[type="file"] { grid-column: 1 / -1; }
.account-photo .photo-form + form { margin-top: var(--s3); }
.avatar-crop-modal { width: min(94vw, 460px); }
.avatar-crop-stage { width: min(100%, 280px); aspect-ratio: 1; margin: var(--s4) auto; overflow: hidden; border-radius: var(--r); background: #17121f; touch-action: none; }
.avatar-crop-stage canvas { display: block; width: 100%; height: 100%; cursor: grab; }
.avatar-crop-stage canvas:active { cursor: grabbing; }
.avatar-zoom { display: grid; gap: var(--s2); }
.avatar-zoom input { width: 100%; }
@media (max-width: 767px) {
  .freq-summary > .att-counts { justify-self: stretch; width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .att-counts, .freq-summary > .att-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.person-card.is-muted .edit-card > summary.edit-toggle { background: var(--surface); }

/* Runda 3d: wyszukiwalne listy wyboru (powiązania rodzic ↔ dziecko) i wnioski bez zgody rodzica. */
.links-layout { grid-template-columns: minmax(0, 1fr) minmax(320px, 460px); }
@media (max-width: 1099px) { .links-layout { grid-template-columns: 1fr; } }
.link-side { display: grid; gap: var(--s4); min-width: 0; }
.link-form { scroll-margin-top: 90px; }
.pick { border: 0; margin: 0 0 var(--s4); padding: 0; min-width: 0; }
.pick legend { font-weight: 800; margin-bottom: var(--s2); padding: 0; }
.pick-filter { width: 100%; min-height: 44px; margin-bottom: var(--s2); }
.pick-list { display: grid; gap: 4px; max-height: 300px; overflow-y: auto; padding: 4px; border: 2px solid var(--line); border-radius: var(--r); background: var(--surface); overscroll-behavior: contain; }
.pick-row { display: flex; align-items: center; gap: var(--s3); min-height: 48px; padding: 6px var(--s3); border-radius: calc(var(--r) - 4px); cursor: pointer; color: var(--ink); font-weight: 600; }
.pick-row:hover { background: var(--surface2); }
.pick-row:has(input:checked) { background: var(--surface2); box-shadow: inset 0 0 0 2px var(--p); }
.pick-row input { flex: 0 0 auto; width: 22px; height: 22px; margin: 0; accent-color: var(--p); }
.pick-row .chip { margin-left: auto; flex: 0 0 auto; }
.pick-copy { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.pick-copy small { color: var(--ink2); font-weight: 500; font-size: 13px; }
.pick-row[hidden], .pick-none[hidden] { display: none; }
.person-links { align-items: center; }
.person-links .btn { min-height: 44px; }
.role-fix .link-list li { align-items: center; }
.role-fix .link-pair { flex-direction: column; align-items: flex-start; gap: 0; flex: 1 1 200px; }
.leave-wait { display: flex; align-items: center; gap: var(--s2); margin: var(--s2) 0; padding: var(--s2) var(--s3); border-radius: var(--r); background: var(--warn-bg); color: var(--warn-ink); font-weight: 700; }
.leave-wait .icon { width: 18px; height: 18px; flex: 0 0 auto; }
.leave-skip .actions { flex-wrap: wrap; }

/* ========== RUNDA 4: centrum powiadomień, poczta (grupy, odczyty, cofanie), podcasty ========== */
.n-msg { --nc-bg: var(--info-bg); --nc-ink: var(--info-ink); }
.n-off { --nc-bg: var(--err-bg); --nc-ink: var(--err-ink); }
.n-cal, .n-att { --nc-bg: var(--ok-bg); --nc-ink: var(--ok-ink); }
.n-req { --nc-bg: var(--warn-bg); --nc-ink: var(--warn-ink); }
.n-ann { --nc-bg: #ffe7c2; --nc-ink: #5a2a00; }
.n-pod { --nc-bg: #ece4ff; --nc-ink: #3b1d8f; }
.n-other { --nc-bg: var(--surface2); --nc-ink: var(--ink); }
html[data-theme="dark"] .n-ann { --nc-bg: #4a2c0b; --nc-ink: #ffe0b8; }
html[data-theme="dark"] .n-pod { --nc-bg: #2e2257; --nc-ink: #dccfff; }
.nc-ico, .bell-list .bell-item .bell-ico.nc-ico { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 14px; background: var(--nc-bg, var(--surface2)); color: var(--nc-ink, var(--ink)); }
.nc-ico .icon { width: 20px; height: 20px; }
.bell-item.is-unread .bell-ico::after, .bell-item.is-unread strong::after { content: none; display: none; }
.nc-dot { flex: none; align-self: center; width: 10px; height: 10px; border-radius: 50%; background: var(--p); box-shadow: 0 0 0 3px var(--surface); }
.nc-more { display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: var(--r-pill); background: var(--surface2); font-size: 12px; font-weight: 800; color: var(--ink); }

/* dzwonek */
.nc-pop { padding: 0; overflow: hidden; }
.nc-pop-head { padding: var(--s4) var(--s4) var(--s2); }
.nc-count { padding: 4px 10px; border-radius: var(--r-pill); background: var(--p); color: #fff; font: 800 12px/1 var(--font-display); }
.nc-pop-scroll { max-height: min(62vh, 460px); overflow-y: auto; padding: 0 var(--s2) var(--s2); overscroll-behavior: contain; }
.nc-pop .bell-list { max-height: none; overflow: visible; }
.nc-pop .bell-item a { align-items: center; min-height: 44px; }
.nc-pop .bell-item.is-unread a { background: var(--surface2); box-shadow: inset 4px 0 0 var(--p); }
.nc-pop-foot { display: flex; flex-wrap: wrap; gap: var(--s2); justify-content: space-between; align-items: center; padding: var(--s2) var(--s3); border-top: 2px solid var(--line); background: var(--surface); }
.nc-pop-foot form { margin: 0; }
.nc-pop-foot button, .nc-pop-foot .btn { min-height: 44px; }

/* centrum powiadomień */
.nc { padding: var(--s5); }
.nc-head { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: flex-end; justify-content: space-between; margin-bottom: var(--s4); }
.nc-head h2 { margin: 0; }
.nc-head-actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
.nc-head-actions form { margin: 0; }
.nc-filters { display: flex; gap: var(--s2); overflow-x: auto; padding: 2px 2px var(--s3); margin-bottom: var(--s2); scrollbar-width: thin; }
.nc-filter { display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; padding: 0 var(--s4); border-radius: var(--r-pill); border: 2px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 700; text-decoration: none; white-space: nowrap; }
.nc-filter:hover { border-color: var(--p); }
.nc-filter.is-on { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.nc-filter-n { min-width: 24px; padding: 2px 8px; border-radius: var(--r-pill); background: var(--surface2); color: var(--ink); font-size: 12px; font-weight: 800; text-align: center; }
.nc-filter.is-on .nc-filter-n { background: var(--surface); color: var(--ink); }
.nc-day { margin: var(--s5) 0 var(--s2); font: 800 12px/1 var(--font-display); letter-spacing: .14em; text-transform: uppercase; color: var(--ink2); }
.nc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.nc-item { border-radius: var(--r); background: var(--surface); border: 2px solid var(--line); overflow: hidden; }
.nc-item.is-unread { border-color: var(--p); background: var(--surface2); }
.nc-link { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); min-height: 64px; color: var(--ink); text-decoration: none; }
.nc-link:hover .nc-top strong { text-decoration: underline; }
.nc-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.nc-top { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: baseline; }
.nc-top strong { font-weight: 800; }
.nc-item:not(.is-unread) .nc-top strong { font-weight: 650; }
.nc-type { font-size: 12px; font-weight: 700; color: var(--ink2); }
.nc-body { color: var(--ink2); overflow-wrap: anywhere; }
.nc-copy time { font-size: 13px; font-weight: 700; color: var(--ink2); }
.nc-item.is-retracted .nc-body { font-style: italic; }
.nc-stack { margin: 0 var(--s4) var(--s3) calc(44px + var(--s3) + var(--s4)); }
.nc-stack > summary { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; font-weight: 700; color: var(--link); }
.nc-stack ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.nc-stack li a { display: flex; justify-content: space-between; gap: var(--s3); min-height: 44px; align-items: center; padding: 0 var(--s3); border-radius: var(--r-sm); color: var(--ink); text-decoration: none; }
.nc-stack li a:hover { background: var(--surface2); }
.nc-stack li.is-unread a { font-weight: 800; }
.nc-stack time { flex: none; font-size: 13px; color: var(--ink2); }
.nc-empty { display: grid; justify-items: center; gap: var(--s2); padding: var(--s6) var(--s3); text-align: center; }
.nc-empty h3 { margin: 0; }

/* paski postępu (bez style=""): klasy w0…w100 */
.meter { display: inline-block; position: relative; width: 72px; height: 8px; border-radius: var(--r-pill); background: var(--line); overflow: hidden; vertical-align: middle; }
.meter-fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: var(--p); }
.meter-fill.w10 { width: 10%; } .meter-fill.w20 { width: 20%; } .meter-fill.w30 { width: 30%; } .meter-fill.w40 { width: 40%; } .meter-fill.w50 { width: 50%; }
.meter-fill.w60 { width: 60%; } .meter-fill.w70 { width: 70%; } .meter-fill.w80 { width: 80%; } .meter-fill.w90 { width: 90%; } .meter-fill.w100 { width: 100%; background: #1f8a4c; }
html[data-theme="dark"] .meter-fill.w100 { background: #5fd18f; }

/* poczta: lista */
.mail-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.mail-row { border-radius: var(--r); background: var(--surface); border: 2px solid var(--line); overflow: hidden; }
.mail-row.unread { border-color: var(--p); box-shadow: inset 4px 0 0 var(--p); }
.mail-row-link { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); min-height: 64px; color: var(--ink); text-decoration: none; }
.mail-row-link:hover { background: var(--surface2); }
.mail-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mail-row-who { font-weight: 700; overflow-wrap: anywhere; }
.mail-row.unread .mail-row-who, .mail-row.unread .mail-row-subject { font-weight: 850; }
.mail-row-to .icon { width: 14px; height: 14px; vertical-align: -2px; }
.mail-row-subject { color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-row-subject .icon { width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; }
.mail-row.is-retracted .mail-row-subject { text-decoration: line-through; text-decoration-thickness: 1px; }
.mail-row-meta { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 13px; font-weight: 700; color: var(--ink2); }
.mail-group-ava { display: grid; place-items: center; background: var(--info-bg); color: var(--info-ink); }
.mail-group-ava .icon { width: 18px; height: 18px; }
.mail-row > .receipts { margin: 0 var(--s4) var(--s3); }

/* lista odbiorców z godziną odczytu */
.receipts { border-radius: var(--r-sm); background: var(--surface2); padding: 0 var(--s3); }
.receipts > summary { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); min-height: 44px; cursor: pointer; font-weight: 700; }
.receipts-sum { display: inline-flex; align-items: center; gap: 6px; }
.receipts-sum .icon { width: 18px; height: 18px; }
.receipts-meter { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink2); }
.receipts-meter b { color: var(--ink); }
.receipt-list { list-style: none; margin: 0; padding: 0 0 var(--s3); display: grid; gap: 4px; }
.receipt-list li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); padding: 6px var(--s2); border-radius: 12px; background: var(--surface); }
.receipt-name { flex: 1 1 140px; font-weight: 700; overflow-wrap: anywhere; }
.receipt-note { flex-basis: 100%; }
.receipt-list form { margin: 0 0 0 auto; }
.receipt-undo { min-height: 44px; }
.mail-read .receipts { margin-bottom: var(--s4); }
.receipt-single { margin: 0 0 var(--s4); }
.mail-retracted-flag { display: flex; gap: var(--s2); align-items: flex-start; padding: var(--s3) var(--s4); border-radius: var(--r-sm); background: var(--err-bg); color: var(--err-ink); }
.mail-retracted-flag .icon { flex: none; width: 20px; height: 20px; margin-top: 2px; }
.mail-body.is-retracted { opacity: .85; border-left: 4px solid var(--err-ink); padding-left: var(--s3); }
.mail-retracted-card { display: flex; gap: var(--s4); align-items: flex-start; padding: var(--s5); border-radius: var(--r); border: 2px dashed var(--line); background: var(--surface2); }
.mail-retracted-card h2 { margin: 0 0 var(--s2); font-size: 20px; }
.mail-retracted-card p { margin: 0 0 var(--s1); }
.mail-retracted-ico { display: grid; place-items: center; flex: none; width: 56px; height: 56px; border-radius: 18px; background: var(--err-bg); color: var(--err-ink); }
.mail-retracted-ico .icon { width: 28px; height: 28px; }
.mail-thread-item.is-retracted { opacity: .9; }
.mail-thread-item .mail-text .icon { width: 16px; height: 16px; vertical-align: -3px; }

/* podcasty */
.pod-hero { display: flex; gap: var(--s5); align-items: center; }
.pod-hero-art img { display: block; width: 160px; height: 160px; object-fit: cover; border-radius: var(--r); background: var(--surface2); }
.pod-hero-copy { min-width: 0; flex: 1; }
.pod-hero-copy h2 { margin: 0 0 var(--s2); font-size: clamp(24px, 3vw, 34px); overflow-wrap: anywhere; }
.pod-desc { color: var(--ink2); margin: 0 0 var(--s3); }
.pod-facts { display: flex; flex-wrap: wrap; gap: var(--s2); margin: 0 0 var(--s3); }
.pod-publish { margin-top: var(--s1); }
.pod-steps { margin: var(--s4) 0; overflow-x: auto; padding-bottom: 4px; }
.pod-steps ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(110px, 1fr)); gap: var(--s2); counter-reset: none; }
.pod-steps form { margin: 0; height: 100%; }
button.pod-step-btn { width: 100%; height: 100%; min-height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: var(--s2); border-radius: var(--r-sm); border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: 700 14px/1.2 var(--font-body); cursor: pointer; box-shadow: none; }
button.pod-step-btn:hover, button.pod-step-btn:active { border-color: var(--p); transform: none; box-shadow: none; background: var(--surface); color: var(--ink); }
.pod-step-ico { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--surface2); }
.pod-step-ico .icon { width: 18px; height: 18px; }
.pod-step.is-done button.pod-step-btn { background: var(--ok-bg); color: var(--ok-ink); border-color: transparent; }
.pod-step.is-done .pod-step-ico { background: var(--surface); color: var(--ok-ink); }
.pod-step.is-now button.pod-step-btn { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.pod-step.is-now .pod-step-ico { background: var(--surface); color: var(--ink); }
.pod-people, .pod-tasks { list-style: none; margin: 0 0 var(--s4); padding: 0; display: grid; gap: var(--s2); }
.pod-people li { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s2) var(--s2) var(--s3); border-radius: var(--r); background: var(--surface2); }
.pod-role-ico { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--surface); color: var(--p); }
html[data-theme="dark"] .pod-role-ico { color: var(--ink); }
.pod-role-ico .icon { width: 20px; height: 20px; }
.pod-person { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pod-person small { color: var(--ink2); }
.pod-people form, .pod-tasks form { margin: 0; }
.pod-when { display: flex; align-items: center; gap: var(--s2); font-size: 18px; }
.pod-event-link { text-decoration: none; min-height: 44px; }
.pod-meter { display: block; width: 100%; margin-bottom: var(--s3); }
.pod-tasks li { display: flex; align-items: center; gap: var(--s2); }
.pod-tasks li > form:first-child { flex: 1; min-width: 0; }
button.pod-task-btn { width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: flex-start; gap: var(--s3); padding: var(--s2) var(--s3); border-radius: var(--r-sm); border: 2px solid var(--line); background: var(--surface); color: var(--ink); text-align: left; font: 600 15px/1.3 var(--font-body); cursor: pointer; box-shadow: none; }
button.pod-task-btn:hover, button.pod-task-btn:active { border-color: var(--p); transform: none; box-shadow: none; background: var(--surface); color: var(--ink); }
.pod-check { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--ink2); background: var(--surface); }
.pod-check .icon { width: 18px; height: 18px; }
.pod-tasks li.is-done .pod-check { background: #1f8a4c; border-color: #1f8a4c; color: #fff; }
html[data-theme="dark"] .pod-tasks li.is-done .pod-check { background: #5fd18f; border-color: #5fd18f; color: #0b2316; }
.pod-tasks li.is-done .pod-task-label { text-decoration: line-through; color: var(--ink2); }
.pod-task-label { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.pod-task-label small { text-decoration: none; display: inline-block; font-size: 12px; }
.inline-add { display: flex; gap: var(--s2); }
.inline-add input { flex: 1; min-width: 0; }
.pod-pipeline { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s2); margin-bottom: var(--s3); }
.pod-stage { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 92px; padding: var(--s3); border-radius: var(--r); border: 2px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; }
.pod-stage:hover { border-color: var(--p); }
.pod-stage.is-on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.pod-stage-ico .icon { width: 22px; height: 22px; }
.pod-stage strong { font: 800 26px/1 var(--font-display); }
.pod-stage small { font-weight: 700; }
.pod-agenda .agenda-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.agenda-list a { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s3); min-height: 60px; border-radius: var(--r-sm); background: var(--surface2); color: var(--ink); text-decoration: none; }
.agenda-list a:hover .agenda-copy strong { text-decoration: underline; }
.agenda-date { display: grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 14px; background: var(--ink); color: var(--surface); line-height: 1; }
.agenda-date b { font: 800 20px/1 var(--font-display); }
.agenda-date small { font-size: 11px; font-weight: 800; text-transform: uppercase; }
.agenda-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow-wrap: anywhere; }
.agenda-copy small { color: var(--ink2); }
.pod-section { margin: var(--s5) 0; }
.pod-section-h { display: flex; align-items: center; gap: var(--s2); font-size: 16px; margin: 0 0 var(--s3); }
.pod-section-h small { color: var(--ink2); font-weight: 800; }
.pod-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s3); }
.pod-card { display: flex; flex-direction: column; gap: var(--s2); height: 100%; padding: var(--s4); border-radius: var(--r); border: 2px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; transition: transform .3s var(--spring), border-color .2s; }
.pod-card:hover { transform: translateY(-3px); border-color: var(--p); }
.pod-card-top { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); }
.pod-card .episode-num { color: var(--ink2); opacity: 1; }
.pod-card-title { font: 800 19px/1.25 var(--font-display); overflow-wrap: anywhere; }
.pod-card-meta { display: flex; align-items: center; gap: 6px; color: var(--ink2); font-size: 14px; font-weight: 600; }
.pod-card-meta .icon { flex: none; width: 16px; height: 16px; }
.pod-card-progress { display: flex; align-items: center; gap: var(--s2); margin-top: auto; font-weight: 700; color: var(--ink2); }
.pod-card-progress .meter { flex: 1; }

body.theme-zieloni .nc-filter.is-on, body.palette-green .nc-filter.is-on, body.theme-zieloni .pod-step.is-now button.pod-step-btn, body.palette-green .pod-step.is-now button.pod-step-btn, body.theme-zieloni .pod-stage.is-on, body.palette-green .pod-stage.is-on { background: var(--ink); color: var(--surface); }

@media (max-width: 900px) {
  .pod-pipeline { grid-template-columns: repeat(5, minmax(96px, 1fr)); overflow-x: auto; }
}
@media (max-width: 640px) {
  .nc { padding: var(--s4); }
  .nc-link { padding: var(--s3); }
  .nc-stack { margin-left: var(--s3); }
  .mail-row-link { padding: var(--s3); }
  .mail-row-meta { font-size: 12px; }
  .mail-row-meta .chip { min-height: 26px; padding: 2px 8px; font-size: 12px; }
  .pod-hero { flex-direction: column; align-items: flex-start; }
  .pod-hero-art img { width: 112px; height: 112px; }
  .pod-steps ol { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pod-pipeline { grid-template-columns: repeat(3, minmax(0, 1fr)); overflow-x: visible; }
  .pod-stage { min-height: 80px; padding: var(--s2) var(--s3); }
  .mail-retracted-card { flex-direction: column; padding: var(--s4); }
  .inline-add { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .pod-card, .pod-card:hover { transition: none; transform: none; }
  .nc-pop { animation: none; }
}
