/* Akademia Dystrybutora Hocell — kolorystyka wg hocell.pl
   złoto #CCAB6E (akcent), krem #F5F0E8 / piasek #EFE6DA (tła), głęboka czerń #07071A (tekst, ciemne pasy)
   nagłówki: Red Hat Display · tekst: Manrope · przyciski w kształcie pastylki */
:root {
  --gold: #ccab6e;
  --gold-600: #b8994f;
  --gold-ink: #85652a;      /* złoto do tekstu na jasnym tle (czytelny kontrast) */
  --cream: #f5f0e8;
  --sand: #efe6da;
  --night: #07071a;
  --night-2: #1b1a24;
  --ink: var(--night);
  --ink-2: #45455a;
  --ink-3: #7e7b84;
  --line: #ebe2d4;
  --bg: #faf7f2;
  --card: #ffffff;
  --ok: #2f7d4f;
  --ok-50: #e9f4ec;
  --warn: #9a5b00;
  --warn-50: #fbf0dc;
  --bad: #b3332d;
  --bad-50: #fbeceb;
  --todo: #fff0a6;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(7, 7, 26, .05), 0 6px 20px rgba(82, 65, 35, .07);
  --font-head: "Red Hat Display", Manrope, "Segoe UI", system-ui, sans-serif;
  font-family: Manrope, "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); line-height: 1.6; font-size: 16px; }
a { color: var(--gold-ink); }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 1.9rem; letter-spacing: -.025em; }
h2 { font-size: 1.32rem; letter-spacing: -.015em; }
h3 { font-size: 1.08rem; font-weight: 600; }
button, input, select, textarea { font: inherit; }
mark.todo { background: var(--todo); color: #5c4a00; border-radius: 4px; padding: 0 .3em; font-size: .92em; }

/* --- logo słowne --- */
.wordmark { font-family: var(--font-head); font-weight: 300; letter-spacing: .32em; font-size: 1.35rem; line-height: 1; white-space: nowrap; }
.wordmark sup { font-size: .42em; letter-spacing: 0; margin-left: -.25em; }
.eyebrow { color: var(--gold); text-transform: uppercase; letter-spacing: .2em; font-size: .72rem; font-weight: 700; }

/* --- pasek górny (ciemny, jak nagłówek hocell.pl) --- */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 24px; padding: 12px 28px; background: var(--night); border-bottom: 3px solid var(--gold); }
.brand { display: flex; flex-direction: column; gap: 5px; text-decoration: none; color: #fff; }
.brand .eyebrow { font-size: .62rem; letter-spacing: .24em; }
.mainnav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.mainnav a { white-space: nowrap; padding: 7px 14px; border-radius: 999px; color: rgba(255, 255, 255, .72); text-decoration: none; font-size: .93rem; font-weight: 500; }
.mainnav a:hover { background: rgba(204, 171, 110, .16); color: #fff; }
.mainnav a.active { background: var(--gold); color: var(--night); font-weight: 700; }
.userbox { display: flex; align-items: center; gap: 10px; font-size: .9rem; color: rgba(255, 255, 255, .82); }
.userbox .btn.ghost { color: rgba(255, 255, 255, .75); }
.userbox .btn.ghost:hover { background: rgba(204, 171, 110, .16); color: #fff; }
.draft-banner { background: var(--cream); border-bottom: 1px solid var(--sand); color: #6b5520; padding: 6px 28px; font-size: .86rem; }

.app { max-width: 1180px; margin: 0 auto; padding: 30px 28px 80px; }

/* --- elementy wspólne --- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.btn { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; padding: 11px 22px; border-radius: 999px; border: 1px solid transparent; background: var(--gold); color: var(--night); font-weight: 700; cursor: pointer; text-decoration: none; transition: background .15s, color .15s; }
.btn:hover { background: var(--gold-600); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.secondary { background: var(--cream); color: var(--night); border-color: var(--sand); }
.btn.secondary:hover { background: var(--sand); }
.btn.dark { background: var(--night); color: #fff; }
.btn.dark:hover { background: var(--night-2); }
.btn.ghost { background: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--cream); color: var(--night); }
.btn.small { padding: 6px 14px; font-size: .86rem; }
.btn.danger { background: var(--bad); color: #fff; }
/* „Sprawdź odpowiedź” w lekcji — wyraźny przycisk (granat + złota obwódka), po sprawdzeniu zielony lub czerwony */
.btn.check { background: var(--night); color: #fff; border: 2px solid var(--gold); box-shadow: 0 2px 6px rgba(7, 7, 26, .18); }
.btn.check::before { content: '✓'; color: var(--gold); font-weight: 800; }
.btn.check:hover { background: var(--gold); color: var(--night); }
.btn.check:hover::before { color: var(--night); }
.btn.check.done-ok { background: var(--ok); border-color: var(--ok); }
.btn.check.done-bad { background: var(--bad); border-color: var(--bad); }
.btn.check.done-ok::before, .btn.check.done-bad::before { color: #fff; }
.muted { color: var(--ink-3); }
.small { font-size: .88rem; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--cream); color: var(--gold-ink); border: 1px solid var(--sand); white-space: nowrap; }
.pill.ok { background: var(--ok-50); color: var(--ok); border-color: #cfe6d7; }
.pill.warn { background: var(--warn-50); color: var(--warn); border-color: #efd9ad; }
.pill.bad { background: var(--bad-50); color: var(--bad); border-color: #f0c9c6; }
.pill.grey { background: #f1efeb; color: var(--ink-3); border-color: #e6e2da; }
.progress { height: 8px; background: var(--sand); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-600), var(--gold)); border-radius: 999px; transition: width .4s; }
.notice { border-radius: 14px; padding: 14px 16px; background: var(--cream); color: var(--ink); border: 1px solid var(--sand); }
.notice.ok { background: var(--ok-50); border-color: #cfe6d7; }
.notice.warn { background: var(--warn-50); border-color: #efd9ad; }
.notice.bad { background: var(--bad-50); border-color: #f0c9c6; }
.crumbs { font-size: .88rem; color: var(--ink-3); margin-bottom: 10px; }
.crumbs a { color: var(--ink-3); text-decoration: none; }
.crumbs a:hover { color: var(--gold-ink); }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th, table.data td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { font-size: .74rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); font-weight: 700; background: var(--cream); }
.table-wrap { overflow-x: auto; }
input[type=text], input[type=email], input[type=password], select, textarea { width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(204, 171, 110, .25); border-color: var(--gold); }
label.field, div.field { display: block; margin-bottom: 14px; font-size: .9rem; color: var(--ink-2); }
label.field > span, div.field > span { display: block; margin-bottom: 4px; font-weight: 600; }

/* --- logowanie --- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-hero { background: radial-gradient(110% 80% at 90% 100%, rgba(204, 171, 110, .5), transparent 60%), linear-gradient(160deg, #07071a 0%, #1d1a17 55%, #4a3d24 100%); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-hero .wordmark { font-size: 1.7rem; }
.login-hero h1 { font-size: 2.6rem; max-width: 14ch; color: #fff; margin-top: 14px; }
.login-hero p { max-width: 42ch; color: rgba(255, 255, 255, .82); }
.login-hero p.eyebrow { color: var(--gold); }
.login-form { display: grid; place-items: center; padding: 40px; background: var(--cream); }

/* --- pulpit --- */
.hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: stretch; margin-bottom: 28px; }
.hero .card h1 { margin-bottom: 6px; }
.hero-visual { display: flex; flex-direction: column; justify-content: space-between; background: radial-gradient(90% 70% at 70% 30%, rgba(204, 171, 110, .35), transparent 70%), linear-gradient(160deg, #fffdf9, var(--cream)); }
.hero-visual img { mix-blend-mode: multiply; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 18px; }
.step { border: 1px solid var(--line); border-radius: 14px; padding: 12px; font-size: .88rem; background: var(--bg); }
.step b { display: block; font-size: .95rem; margin-bottom: 2px; font-family: var(--font-head); }
.step.done { border-color: #cfe6d7; background: var(--ok-50); }
.step.now { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(204, 171, 110, .22); background: #fff; }
.modules { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.module-card { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s, border-color .15s; }
.module-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(82, 65, 35, .14); border-color: var(--gold); }
.module-card.locked { opacity: .55; pointer-events: none; }
.module-code { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--night); color: var(--gold); flex: none; font-family: var(--font-head); }
.module-card.safety .module-code { background: var(--gold); color: var(--night); }
.module-card.complete .module-code { background: var(--ok); color: #fff; }

/* --- lekcja --- */
.lesson-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 28px; align-items: start; }
.side { position: sticky; top: 90px; }
.side ol { list-style: none; margin: 0; padding: 0; }
.side li a { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 12px; text-decoration: none; color: var(--ink-2); font-size: .9rem; }
.side li a:hover { background: var(--cream); }
.side li a.current { background: var(--cream); color: var(--night); font-weight: 700; box-shadow: inset 3px 0 0 var(--gold); }
.dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--sand); flex: none; margin-top: 1px; display: grid; place-items: center; font-size: .7rem; color: #fff; }
.dot.done { background: var(--ok); border-color: var(--ok); }
.lesson { max-width: 780px; }
.lesson-head { margin-bottom: 18px; }
.prose { font-size: 1.02rem; }
.prose table { border-collapse: collapse; width: 100%; margin: 14px 0; font-size: .93rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.prose th { background: var(--cream); }
.prose blockquote { margin: 14px 0; padding: 12px 16px; border-left: 4px solid var(--gold); background: var(--cream); border-radius: 0 12px 12px 0; }
.prose code { background: var(--cream); padding: 1px 6px; border-radius: 6px; font-size: .9em; word-break: break-word; }
.prose ul, .prose ol { padding-left: 1.3em; }
.box { border-radius: var(--radius); padding: 16px 20px; margin: 20px 0; }
.box h3 { font-family: Manrope, sans-serif; font-size: .76rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 800; margin-bottom: 8px; }
.box.goals { background: var(--cream); border: 1px solid var(--sand); }
.box.goals h3 { color: var(--gold-ink); }
.box.media { border: 1.5px dashed #d9c9a8; background: #fffdf9; color: var(--ink-2); font-size: .92rem; }
.box.media h3 { color: var(--ink-3); }
.box.remember { background: var(--night); color: #efe9df; border: 1px solid var(--night); }
.box.remember h3 { color: var(--gold); }
.box.remember a, .box.remember strong { color: #fff; }
.box p:last-child, .box ul:last-child { margin-bottom: 0; }

/* --- pytania --- */
.q { border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-bottom: 12px; background: #fff; }
.q-text { font-weight: 700; margin-bottom: 10px; }
.q-type { font-size: .76rem; color: var(--ink-3); font-weight: 500; margin-left: 6px; }
.opt { display: flex; gap: 10px; align-items: flex-start; padding: 9px 14px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 6px; cursor: pointer; background: #fff; }
.opt:hover { border-color: var(--gold); background: #fffdf8; }
.opt input { margin-top: 4px; accent-color: var(--gold-ink); }
.opt.right { border-color: #9cd0b0; background: var(--ok-50); }
.opt.wrong { border-color: #ecb3ae; background: var(--bad-50); }
.q-feedback { margin-top: 8px; font-size: .9rem; font-weight: 700; }
.q-feedback.ok { color: var(--ok); }
.q-feedback.bad { color: var(--bad); }
.lesson-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }

/* --- egzamin --- */
.exam-bar { position: sticky; top: 70px; z-index: 10; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 10px 16px; margin-bottom: 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; box-shadow: var(--shadow); }
.exam-bar > div:first-child { white-space: nowrap; }
.timer { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 1.15rem; font-family: var(--font-head); }
.timer.low { color: var(--bad); }
.qnav { display: flex; flex-wrap: wrap; gap: 4px; }
.qnav a { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; font-size: .76rem; text-decoration: none; border: 1px solid var(--line); color: var(--ink-3); }
.qnav a.answered { background: var(--gold); border-color: var(--gold); color: var(--night); font-weight: 700; }
.score-big { font-size: 3rem; font-weight: 700; line-height: 1; font-family: var(--font-head); }

/* --- certyfikat --- */
.cert { background: #fffdf9; border: 10px solid var(--night); outline: 1px solid var(--gold); outline-offset: -20px; padding: 56px; text-align: center; max-width: 900px; margin: 0 auto; }
.cert .wordmark { font-size: 1.9rem; color: var(--night); }
.cert h1 { font-size: 2.2rem; color: var(--night); }
/* logo Hocell (złote, z pliku hocel_logo 4 kolory.pdf) — zawsze na ciemnym tle */
.logo { display: block; height: auto; max-width: 100%; }
.logo-nav { width: 128px; }
.logo-hero { width: 180px; }
.cert-logo { background: var(--night); margin: -56px -56px 22px; padding: 26px 0 22px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.cert-logo .logo { width: 230px; margin: 0 auto; }
.cert .rule { width: 80px; height: 2px; background: var(--gold); margin: 18px auto; border: 0; }
.cert .name { font-family: var(--font-head); font-size: 2.1rem; font-weight: 700; margin: 18px 0 4px; }
.cert .meta { display: flex; justify-content: center; gap: 40px; margin-top: 28px; color: var(--ink-2); flex-wrap: wrap; }
.cert .meta b { color: var(--gold-ink); text-transform: uppercase; font-size: .74rem; letter-spacing: .12em; }

/* --- drobne --- */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--night); border: 1px solid var(--gold); color: #fff; padding: 10px 20px; border-radius: 999px; box-shadow: var(--shadow); z-index: 50; max-width: 90vw; }
.toast.bad { background: var(--bad); border-color: var(--bad); }
.temp-pass { font-family: Consolas, monospace; font-size: 1.1rem; background: var(--cream); padding: 6px 10px; border-radius: 8px; user-select: all; }
.checklist label { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.checklist .k { color: var(--bad); font-weight: 700; font-size: .8rem; }
video { width: 100%; border-radius: 14px; background: #000; max-height: 420px; }
.empty { text-align: center; padding: 40px; color: var(--ink-3); }
details summary { cursor: pointer; }

@media (max-width: 900px) {
  .topbar { padding: 10px 16px; gap: 12px; flex-wrap: wrap; }
  .mainnav { order: 3; flex: 1 1 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .brand { flex: 1; }
  .userbox span { display: none; }
  .app { padding: 18px 16px 60px; }
  .hero, .grid-2, .grid-3, .lesson-layout, .login { grid-template-columns: 1fr; }
  .side { position: static; }
  .steps { grid-template-columns: 1fr 1fr; }
  .login-hero { padding: 32px; min-height: 280px; }
  .cert { padding: 28px; }
  .cert-logo { margin: -28px -28px 18px; }
  .logo-nav { width: 108px; }
  .exam-bar { top: 110px; flex-wrap: wrap; }
}

@media print {
  .topbar, .draft-banner, .no-print, .toast { display: none !important; }
  body { background: #fff; }
  .app { padding: 0; max-width: none; }
  .card { box-shadow: none; border: none; }
}

/* --- wybór języka --- */
/* flaga obok wyboru języka — podpowiedź dla obcojęzycznych, że tu zmienia się język */
.lang-pick { display: inline-flex; align-items: center; gap: 7px; }
.flag { width: 24px; height: 16px; flex: none; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .18), 0 1px 2px rgba(0, 0, 0, .2); }
.lang-pick .flag { cursor: pointer; }
.lang-picker { width: auto; padding: 5px 28px 5px 10px; border-radius: 999px; font-size: .82rem; font-weight: 600; cursor: pointer; }
.userbox .lang-picker { background: var(--night); color: rgba(255, 255, 255, .85); border: 1px solid rgba(204, 171, 110, .45); }
.userbox .lang-picker option { color: var(--night); background: #fff; }
.login-hero .lang-picker { background: #15152b; color: #fff; border: 1px solid rgba(204, 171, 110, .5); }
.login-hero .lang-picker option { color: var(--night); background: #fff; }

/* wyszukiwarka uczestników w panelu */
.search-card { border: 2px solid var(--gold); }
.search-input { font-size: 1.05rem; padding: 12px 16px; border: 1px solid var(--sand); border-radius: 999px; }
.search-input:focus { outline: 2px solid var(--gold); border-color: var(--gold); }

/* --- przełącznik trybu nocnego (po lewej stronie wyboru języka) --- */
.theme-toggle { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(204, 171, 110, .5); background: transparent; color: var(--gold); cursor: pointer; padding: 0; }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle:hover { background: rgba(204, 171, 110, .16); }

/* --- tryb nocny: te same zmienne, ciemne tła; certyfikat zostaje jasny (dokument do druku) --- */
:root[data-theme="dark"] {
  --ink: #ece6da;
  --ink-2: #c4bdb1;
  --ink-3: #9a948a;
  --gold-ink: #dcbf86;
  --cream: #1d1c2e;
  --sand: #2c2b40;
  --line: #2a293d;
  --bg: #0b0b18;
  --card: #15152a;
  --ok: #6cc896;
  --ok-50: #12281c;
  --warn: #e8ad55;
  --warn-50: #2c2314;
  --bad: #f08a83;
  --bad-50: #2f1716;
  --todo: #5c4a00;
  --shadow: 0 1px 2px rgba(0, 0, 0, .45), 0 6px 20px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
[data-theme="dark"] mark.todo { color: #ffe9a3; }
[data-theme="dark"] input[type=text], [data-theme="dark"] input[type=email], [data-theme="dark"] input[type=password], [data-theme="dark"] select, [data-theme="dark"] textarea { background: #10101f; color: var(--ink); border-color: var(--sand); }
[data-theme="dark"] .step.now, [data-theme="dark"] .q, [data-theme="dark"] .opt, [data-theme="dark"] .exam-bar { background: var(--card); }
[data-theme="dark"] .opt:hover { background: #1c1b33; }
[data-theme="dark"] .btn.secondary { color: var(--ink); }
[data-theme="dark"] .btn.ghost:hover, [data-theme="dark"] .side li a.current { color: var(--ink); }
[data-theme="dark"] .btn.dark, [data-theme="dark"] .btn.check { border-color: var(--gold); }
[data-theme="dark"] .pill.grey { background: #222136; border-color: #33324a; }
[data-theme="dark"] .pill.ok, [data-theme="dark"] .notice.ok, [data-theme="dark"] .step.done { border-color: #24533a; }
[data-theme="dark"] .pill.warn, [data-theme="dark"] .notice.warn { border-color: #5a4320; }
[data-theme="dark"] .pill.bad, [data-theme="dark"] .notice.bad { border-color: #5e2a27; }
[data-theme="dark"] .opt.right { border-color: #2f6b49; }
[data-theme="dark"] .opt.wrong { border-color: #7a3631; }
[data-theme="dark"] .box.media { background: #141325; border-color: #4a4130; }
[data-theme="dark"] .box.remember { background: #050510; border-color: var(--sand); }
[data-theme="dark"] .hero-visual { background: radial-gradient(90% 70% at 70% 30%, rgba(204, 171, 110, .22), transparent 70%), linear-gradient(160deg, #1a1930, var(--cream)); }
[data-theme="dark"] .hero-visual img { mix-blend-mode: normal; border-radius: 14px; }
[data-theme="dark"] .draft-banner { color: #d9c08a; }
[data-theme="dark"] .module-code { border: 1px solid rgba(204, 171, 110, .45); }
[data-theme="dark"] .cert { color: var(--night); }
[data-theme="dark"] .cert .muted, [data-theme="dark"] .cert .meta { color: #45455a; }

/* --- telefon: nic nie wystaje poza ekran (17.10.2026) --- */
@media (max-width: 900px) {
  .hero > *, .grid-2 > *, .grid-3 > *, .lesson-layout > * { min-width: 0; }
}
@media (max-width: 600px) {
  .userbox { flex: 1 1 100%; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
  .userbox .lang-picker { max-width: 140px; }
  .btn { white-space: normal; text-align: center; justify-content: center; }
  .card { padding: 18px; }
  .login-hero { padding: 24px; }
  h1 { font-size: 1.6rem; }
  .login-hero h1 { font-size: 2rem; }
}

/* --- panel: karty z liczbami (pulpit administratora) --- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat-row:empty { display: none; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow); }
.stat b { font-family: var(--font-head); font-size: 1.7rem; line-height: 1.1; }
.stat span { font-size: .86rem; color: var(--ink-2); }
.stat small { font-size: .76rem; color: var(--ink-3); }
.stat.warn { border-color: var(--gold); background: var(--warn-50); }

/* --- palety alternatywne (podgląd 17.10.2026, do wyboru przez Hocell) ----------------------------------
   Włączanie: adres z ?paleta=grafit | jasna | espresso (zapamiętane w przeglądarce), ?paleta=granat wraca do obecnej.
   Kolory wg materiałów Hocell 10.2026 (oferty PRO/PREMIUM, książeczka serwisowa):
   czerń #151515, złoto #D4B165 / #B8913D, ciepłe szarości #4A463F #5D584F #8C8678, złamana biel #F6F5F1 #FAF9F6. */

/* B. Grafit i złoto — jak druki Hocell 10.2026: neutralna czerń zamiast granatu */
:root[data-palette="grafit"] {
  --gold: #d4b165; --gold-600: #b8913d; --gold-ink: #85651f;
  --cream: #f6f5f1; --sand: #ebe6dc; --night: #151515; --night-2: #232323;
  --ink: #151515; --ink-2: #4a463f; --ink-3: #7a746a; --line: #e7e2d8; --bg: #faf9f6;
  --shadow: 0 1px 2px rgba(21, 21, 21, .05), 0 6px 20px rgba(74, 70, 63, .08);
}
:root[data-palette="grafit"][data-theme="dark"] {
  --ink: #efebe3; --ink-2: #c9c3b7; --ink-3: #9a958a; --gold-ink: #dcbf7a;
  --cream: #1f1f1f; --sand: #2e2c29; --line: #2a2826; --bg: #0e0e0e; --card: #191919;
}
[data-palette="grafit"] .login-hero { background: radial-gradient(110% 80% at 90% 100%, rgba(212, 177, 101, .42), transparent 60%), linear-gradient(160deg, #151515 0%, #1e1c19 55%, #4a3f27 100%); }
[data-palette="grafit"] .login-hero .lang-picker { background: #1e1e1e; }
[data-palette="grafit"][data-theme="dark"] input[type=text], [data-palette="grafit"][data-theme="dark"] input[type=email], [data-palette="grafit"][data-theme="dark"] input[type=password], [data-palette="grafit"][data-theme="dark"] select, [data-palette="grafit"][data-theme="dark"] textarea { background: #121212; }
[data-palette="grafit"][data-theme="dark"] .opt:hover { background: #222; }
[data-palette="grafit"][data-theme="dark"] .pill.grey { background: #232323; border-color: #34322e; }
[data-palette="grafit"][data-theme="dark"] .box.remember { background: #080808; }

/* C. Jasna — biel i złoto: jasny nagłówek (logo w wariancie złotym na białym), ciemne akcenty zostają */
:root[data-palette="jasna"] {
  --gold: #d4b165; --gold-600: #b8913d; --gold-ink: #85651f;
  --cream: #f6f5f1; --sand: #ece7de; --night: #151515; --night-2: #232323;
  --ink: #151515; --ink-2: #4a463f; --ink-3: #7a746a; --line: #ebe6dd; --bg: #ffffff;
  --shadow: 0 1px 2px rgba(21, 21, 21, .04), 0 8px 24px rgba(74, 70, 63, .07);
}
:root[data-palette="jasna"]:not([data-theme="dark"]) .topbar { background: #fff; border-bottom: 2px solid var(--gold); box-shadow: 0 6px 18px rgba(21, 21, 21, .05); }
:root[data-palette="jasna"]:not([data-theme="dark"]) .brand { color: var(--ink); }
:root[data-palette="jasna"]:not([data-theme="dark"]) .brand .eyebrow { color: var(--gold-ink); }
:root[data-palette="jasna"]:not([data-theme="dark"]) .mainnav a { color: var(--ink-2); }
:root[data-palette="jasna"]:not([data-theme="dark"]) .mainnav a:hover { background: var(--cream); color: var(--ink); }
:root[data-palette="jasna"]:not([data-theme="dark"]) .mainnav a.active { background: var(--night); color: #fff; }
:root[data-palette="jasna"]:not([data-theme="dark"]) .userbox, :root[data-palette="jasna"]:not([data-theme="dark"]) .userbox .btn.ghost { color: var(--ink-2); }
:root[data-palette="jasna"]:not([data-theme="dark"]) .userbox .btn.ghost:hover { background: var(--cream); color: var(--ink); }
:root[data-palette="jasna"]:not([data-theme="dark"]) .userbox .lang-picker { background: #fff; color: var(--ink); border-color: var(--line); }
:root[data-palette="jasna"]:not([data-theme="dark"]) .theme-toggle { color: var(--gold-ink); border-color: var(--line); }
:root[data-palette="jasna"]:not([data-theme="dark"]) .login-hero { background: radial-gradient(100% 80% at 90% 100%, rgba(212, 177, 101, .38), transparent 62%), linear-gradient(160deg, #ffffff 0%, #f6f5f1 60%, #ece3cf 100%); color: var(--ink); border-right: 1px solid var(--line); }
:root[data-palette="jasna"]:not([data-theme="dark"]) .login-hero h1 { color: var(--ink); }
:root[data-palette="jasna"]:not([data-theme="dark"]) .login-hero p { color: var(--ink-2); }
:root[data-palette="jasna"]:not([data-theme="dark"]) .login-hero .lang-picker { background: #fff; color: var(--ink); border-color: var(--line); }
:root[data-palette="jasna"]:not([data-theme="dark"]) .login-hero .eyebrow { color: var(--gold-ink); }
:root[data-palette="jasna"]:not([data-theme="dark"]) .login-form form { border-color: var(--line); }
:root[data-palette="jasna"][data-theme="dark"] {
  --ink: #efebe3; --ink-2: #c9c3b7; --ink-3: #9a958a; --gold-ink: #dcbf7a;
  --cream: #1f1f1f; --sand: #2e2c29; --line: #2a2826; --bg: #0e0e0e; --card: #191919;
}

/* D. Espresso — ciepła czerń i złoto, z wnętrz na zdjęciach produktu (drewno, beż) */
:root[data-palette="espresso"] {
  --gold: #cdae6c; --gold-600: #b8913d; --gold-ink: #7d5f25;
  --cream: #f3ece2; --sand: #e7dccb; --night: #221c17; --night-2: #30281f;
  --ink: #221c17; --ink-2: #5d5148; --ink-3: #807364; --line: #e6dac9; --bg: #f8f3ec;
  --shadow: 0 1px 2px rgba(34, 28, 23, .06), 0 6px 20px rgba(93, 81, 72, .1);
}
:root[data-palette="espresso"][data-theme="dark"] {
  --ink: #f0e8dc; --ink-2: #cbbfae; --ink-3: #a0927f; --gold-ink: #dcbf86;
  --cream: #2a221c; --sand: #3a3028; --line: #342a21; --bg: #14100d; --card: #1e1814;
}
[data-palette="espresso"] .login-hero { background: radial-gradient(110% 80% at 90% 100%, rgba(205, 174, 108, .45), transparent 60%), linear-gradient(160deg, #221c17 0%, #3a2c20 55%, #6b5232 100%); }
[data-palette="espresso"] .login-hero .lang-picker { background: #2c241d; }
[data-palette="espresso"][data-theme="dark"] input[type=text], [data-palette="espresso"][data-theme="dark"] input[type=email], [data-palette="espresso"][data-theme="dark"] input[type=password], [data-palette="espresso"][data-theme="dark"] select, [data-palette="espresso"][data-theme="dark"] textarea { background: #18130f; }
[data-palette="espresso"][data-theme="dark"] .opt:hover { background: #2a221c; }
[data-palette="espresso"][data-theme="dark"] .pill.grey { background: #2a221c; border-color: #3d3229; }
[data-palette="espresso"][data-theme="dark"] .box.remember { background: #0d0a08; }
[data-palette="espresso"] .pill.grey { background: #efe7db; border-color: #e3d7c5; }
/* C nocą = B nocą */
[data-palette="jasna"][data-theme="dark"] .login-hero { background: radial-gradient(110% 80% at 90% 100%, rgba(212, 177, 101, .42), transparent 60%), linear-gradient(160deg, #151515 0%, #1e1c19 55%, #4a3f27 100%); }
[data-palette="jasna"][data-theme="dark"] .login-hero .lang-picker, [data-palette="jasna"][data-theme="dark"] .userbox .lang-picker { background: #1e1e1e; }
[data-palette="jasna"][data-theme="dark"] input[type=text], [data-palette="jasna"][data-theme="dark"] input[type=email], [data-palette="jasna"][data-theme="dark"] input[type=password], [data-palette="jasna"][data-theme="dark"] select, [data-palette="jasna"][data-theme="dark"] textarea { background: #121212; }
[data-palette="jasna"][data-theme="dark"] .opt:hover { background: #222; }
[data-palette="jasna"][data-theme="dark"] .pill.grey { background: #232323; border-color: #34322e; }
[data-palette="jasna"][data-theme="dark"] .box.remember { background: #080808; }


/* === logowanie wg makiet Hocell (17.10.2026) — wspólne dla wersji 1 (klasycznej) i 2 (premium) === */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; }
.login-hero { position: relative; overflow: hidden; color: #fff; padding: 44px 56px 40px; display: flex; flex-direction: column; gap: 0; justify-content: flex-start;
  background: radial-gradient(60% 45% at 66% 82%, rgba(212, 177, 101, .32), transparent 70%), radial-gradient(120% 90% at 0% 0%, #1f1c18 0%, #0d0d0d 55%, #060606 100%); }
.login-hero::before { content: ''; position: absolute; inset: 0; background: url(/img/molekuly.svg) center / cover no-repeat; pointer-events: none; }
.login-hero > * { position: relative; z-index: 1; }
.login-hero .logo-hero { width: 300px; max-width: 70%; }
.lh-eyebrow { letter-spacing: .42em; font-size: .78rem; color: var(--gold); margin: 40px 0 16px; }
.login-hero h1.lh-title { font-size: clamp(2.4rem, 4.3vw, 4.1rem); line-height: 1.04; letter-spacing: -.02em; max-width: 12ch; color: #fff; margin: 0 0 20px; font-weight: 700; }
.lh-title em { font-style: normal; color: var(--gold); display: block; }
.login-hero p.lh-lead { font-size: 1.15rem; color: rgba(255, 255, 255, .82); max-width: 30ch; margin: 0; }
.lh-device { position: absolute !important; z-index: 1; right: 3%; bottom: 5%; width: 50%; max-width: 480px; height: auto; -webkit-mask-image: linear-gradient(to bottom, #000 86%, transparent 99%); mask-image: linear-gradient(to bottom, #000 86%, transparent 99%); }
.lh-bottom { margin-top: auto; z-index: 2; max-width: 50%; padding-top: 32px; }
.lh-features { list-style: none; margin: 0; padding: 0; display: inline-flex; }
.lh-features li { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 6px 22px; color: #fff; font-size: 1rem; text-align: center; white-space: nowrap; }
.lh-features li + li { border-left: 1px solid rgba(212, 177, 101, .35); }
.lh-features svg { width: 46px; height: 46px; color: var(--gold); }
.login-hero p.lh-note { margin: 16px 0 0; font-size: .76rem; color: rgba(255, 255, 255, .55); max-width: 46ch; }

.login-form { display: flex; flex-direction: column; padding: 34px 56px 26px; background: var(--cream); place-items: initial; }
.lf-top { display: flex; justify-content: flex-end; align-items: center; gap: 12px; flex-wrap: wrap; }
.lf-sep { width: 1px; height: 26px; background: var(--sand); }
.lf-body { flex: 1; display: flex; align-items: center; }
.lf-body > form { width: 100%; max-width: 480px; margin: 30px auto; }
.lf-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .8rem; color: var(--ink-3); max-width: 480px; width: 100%; margin: 0 auto; }
.lf-foot a { color: var(--gold-ink); text-decoration: none; }
.lf-foot a:hover { text-decoration: underline; }
.login-form .eyebrow.lf-eyebrow { color: var(--gold-ink); letter-spacing: .32em; font-size: .78rem; margin: 0 0 14px; }
.lf-title { font-size: clamp(2rem, 3.2vw, 2.85rem); letter-spacing: -.025em; margin: 0 0 8px; }
.lf-lead { color: var(--ink-2); font-size: 1.1rem; margin: 0 0 26px; }
.auth-form label.field > span:first-child { color: var(--ink); font-weight: 500; font-size: .98rem; margin-bottom: 8px; }
.auth-form input[type=email], .auth-form input[type=password], .auth-form input[type=text] { padding: 16px 18px; font-size: 1.02rem; border-radius: 10px; background: var(--card); }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 54px !important; }
.pw-eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; display: grid; place-items: center; border-radius: 8px; }
.pw-eye:hover { color: var(--ink); background: var(--cream); }
.pw-eye svg { width: 22px; height: 22px; }
.lf-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 2px 0 22px; flex-wrap: wrap; }
.lf-row a { color: var(--gold-ink); font-weight: 500; }
label.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; color: var(--ink); }
label.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--gold-600); }
.btn-login { width: 100%; justify-content: center; padding: 17px 22px; font-size: 1.1rem; }
.btn .arrow { width: 20px; height: 20px; flex: none; }
.lf-divider { display: flex; align-items: center; gap: 14px; margin: 24px 0 18px; color: var(--ink-3); font-size: .92rem; }
.lf-divider::before, .lf-divider::after { content: ''; flex: 1; height: 1px; background: var(--sand); }
.btn.btn-outline { width: 100%; justify-content: center; padding: 15px 22px; background: transparent; border: 1.5px solid var(--gold); color: var(--gold-ink); font-size: 1.02rem; }
.btn.btn-outline:hover { background: rgba(212, 177, 101, .12); }
.lf-help { display: flex; justify-content: center; align-items: center; gap: 10px; margin: 26px 0 0; color: var(--ink-2); font-size: .95rem; text-align: center; }
.lf-help svg { width: 22px; height: 22px; color: var(--gold-ink); flex: none; }
.lf-help a { color: var(--gold-ink); font-weight: 700; text-decoration: none; }
/* wybór języka i trybu po jasnej stronie */
.login-form .lang-picker { width: auto; background: transparent; border: 1px solid transparent; color: var(--ink); font-weight: 500; padding: 7px 10px; border-radius: 999px; }
.login-form .lang-picker option { color: var(--night); background: #fff; }
.login-form .theme-toggle { color: var(--ink); border-color: transparent; }
.login-form .theme-toggle:hover { background: var(--sand); }

/* przełącznik wersji 1 / 2 */
.style-switch { display: inline-flex; border: 1px solid var(--sand); border-radius: 999px; padding: 2px; gap: 2px; color: var(--ink-2); flex: none; }
.style-switch button { border: 0; background: transparent; min-width: 26px; height: 24px; padding: 0 8px; border-radius: 999px; font: inherit; font-weight: 700; font-size: .78rem; color: inherit; cursor: pointer; }
.style-switch button[aria-pressed="true"] { background: var(--gold); color: #151515; }
.style-switch button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.userbox .style-switch { border-color: rgba(212, 177, 101, .45); color: rgba(255, 255, 255, .85); }
:root[data-palette="jasna"]:not([data-theme="dark"]) .userbox .style-switch { border-color: var(--line); color: var(--ink-2); }


/* === wersja 2: premium — cały portal (gradienty, cienie, podkreślone pola) === */
[data-styl="premium"] h1, [data-styl="premium"] h2 { font-weight: 800; }
[data-styl="premium"] .btn:not(.secondary):not(.dark):not(.ghost):not(.danger):not(.check):not(.btn-outline) { background: linear-gradient(180deg, #edd9a8 0%, #d4b165 46%, #b38b3b 100%); color: #1a1408; box-shadow: 0 10px 22px rgba(184, 145, 61, .3), inset 0 1px 0 rgba(255, 255, 255, .5); }
[data-styl="premium"] .btn:not(.secondary):not(.dark):not(.ghost):not(.danger):not(.check):not(.btn-outline):hover { filter: brightness(1.05); }
[data-styl="premium"] .btn.btn-outline { border-width: 2px; background: var(--card); box-shadow: 0 4px 12px rgba(21, 21, 21, .05); }
[data-styl="premium"] .btn.dark { background: linear-gradient(180deg, var(--night-2), var(--night)); box-shadow: 0 6px 16px rgba(0, 0, 0, .18); }
[data-styl="premium"] input[type=text], [data-styl="premium"] input[type=email], [data-styl="premium"] input[type=password], [data-styl="premium"] select:not(.lang-picker), [data-styl="premium"] textarea { border: 1px solid var(--line); border-bottom: 3px solid var(--night); box-shadow: 0 6px 14px rgba(21, 21, 21, .06); }
[data-styl="premium"][data-theme="dark"] input[type=text], [data-styl="premium"][data-theme="dark"] input[type=email], [data-styl="premium"][data-theme="dark"] input[type=password], [data-styl="premium"][data-theme="dark"] select:not(.lang-picker), [data-styl="premium"][data-theme="dark"] textarea { border-bottom-color: var(--gold-600); box-shadow: none; }
[data-styl="premium"] .card { background: linear-gradient(180deg, var(--card) 0%, color-mix(in srgb, var(--card) 95%, var(--gold) 5%) 100%); border-color: color-mix(in srgb, var(--line) 75%, var(--gold) 25%); box-shadow: 0 2px 4px rgba(21, 21, 21, .04), 0 16px 36px rgba(74, 70, 63, .12); }
[data-styl="premium"] .eyebrow:not(.brand .eyebrow)::before { content: ''; display: inline-block; width: 28px; height: 2px; background: currentColor; vertical-align: middle; margin: -2px 12px 0 0; }
[data-styl="premium"] .topbar { background: linear-gradient(180deg, var(--night-2) 0%, var(--night) 100%); border-bottom: 2px solid var(--gold); box-shadow: 0 10px 30px rgba(0, 0, 0, .22); }
[data-styl="premium"] .mainnav a.active { background: linear-gradient(180deg, #edd9a8, #d4b165 50%, #b38b3b); box-shadow: 0 4px 12px rgba(212, 177, 101, .35); }
[data-styl="premium"] .userbox .lang-picker, [data-styl="premium"] .theme-toggle { border-radius: 999px; }
[data-styl="premium"] .login-form .lang-picker { background: var(--card); border: 1px solid var(--sand); padding: 9px 14px; box-shadow: 0 2px 8px rgba(21, 21, 21, .05); }
[data-styl="premium"] .login-form .theme-toggle { width: 42px; height: 42px; background: var(--card); border: 1px solid var(--sand); box-shadow: 0 2px 8px rgba(21, 21, 21, .06); }
[data-styl="premium"] .login-form { background: radial-gradient(70% 55% at 100% 0%, rgba(212, 177, 101, .12), transparent 62%), var(--cream); }
[data-styl="premium"] .lh-features { border: 1px solid rgba(212, 177, 101, .4); border-radius: 22px; padding: 18px 10px; background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02)); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
[data-styl="premium"] .lh-title em { background: linear-gradient(180deg, #f2dfb0 0%, #d4b165 55%, #a8843a 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
[data-styl="premium"] .module-code { box-shadow: inset 0 0 0 1.5px var(--gold), 0 4px 10px rgba(0, 0, 0, .14); }
[data-styl="premium"] .progress > span { background: linear-gradient(90deg, #b38b3b, #edd9a8); box-shadow: 0 0 8px rgba(212, 177, 101, .5); }
[data-styl="premium"] .stat, [data-styl="premium"] .step.now { box-shadow: 0 8px 20px rgba(74, 70, 63, .1); }

@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; }
  .login-hero { padding: 28px 24px 24px; min-height: 0; }
  .login-hero .logo-hero { width: 200px; }
  .lh-eyebrow { margin-top: 24px; }
  .lh-device { position: relative !important; right: auto; bottom: auto; width: 56%; max-width: 280px; margin: 18px auto 0; display: block; }
  .lh-bottom { max-width: 100%; padding-top: 18px; }
  .lh-features li { padding: 6px 14px; font-size: .9rem; }
  .lh-features svg { width: 36px; height: 36px; }
  .login-form { padding: 22px 20px 20px; }
  .lf-body > form { margin: 22px auto; }
}

/* karta z urządzeniem na pulpicie — ta sama ciemna scena co na logowaniu (17.10.2026) */
.card.hero-visual { position: relative; overflow: hidden; color: rgba(255, 255, 255, .82); border-color: transparent; background: radial-gradient(60% 50% at 50% 62%, rgba(212, 177, 101, .3), transparent 70%), radial-gradient(120% 90% at 0% 0%, #1f1c18 0%, #0d0d0d 60%, #060606 100%); }
.card.hero-visual::before { content: ''; position: absolute; inset: 0; background: url(/img/molekuly.svg) right top / 120% auto no-repeat; opacity: .7; pointer-events: none; }
.card.hero-visual > * { position: relative; }
.card.hero-visual img { mix-blend-mode: normal; display: block; width: auto; height: 220px; max-width: 100%; margin: 0 auto; object-fit: contain; -webkit-mask-image: linear-gradient(to bottom, #000 86%, transparent 99%); mask-image: linear-gradient(to bottom, #000 86%, transparent 99%); }
.card.hero-visual p.muted { color: rgba(255, 255, 255, .72); }
.card.hero-visual p b { color: var(--gold); }
[data-theme="dark"] .card.hero-visual { background: radial-gradient(60% 50% at 50% 62%, rgba(212, 177, 101, .24), transparent 70%), radial-gradient(120% 90% at 0% 0%, #1f1c18 0%, #0a0a0a 60%, #040404 100%); border-color: var(--line); }
[data-styl="premium"] .card.hero-visual { border: 1px solid rgba(212, 177, 101, .35); }
/* logowanie na telefonie: nic nie wystaje, formularz bliżej góry */
.login > *, .lf-body, .lf-body > form { min-width: 0; }
.login-form .lang-picker { max-width: 46vw; }
@media (max-width: 600px) {
  .lh-device { display: none !important; }
  .login-hero h1.lh-title { font-size: 2.2rem; }
  .login-hero p.lh-lead { font-size: 1rem; }
  .lf-top { justify-content: center; }
}

/* logowanie mieści się w oknie bez przewijania (17.10.2026) — rozmiary zależne od wysokości okna; np. 1920×1080 ze skalowaniem 125% = ok. 1536×730 */
@media (min-width: 901px) {
  .login-hero { padding: clamp(18px, 4.5vh, 44px) 56px clamp(16px, 4vh, 40px); }
  .login-hero .logo-hero { width: clamp(160px, 26vh, 300px); }
  .lh-eyebrow { margin: clamp(12px, 4vh, 40px) 0 clamp(8px, 1.6vh, 16px); }
  .login-hero h1.lh-title { font-size: clamp(2rem, min(4.3vw, 7.2vh), 4.1rem); margin-bottom: clamp(8px, 2vh, 20px); }
  .login-hero p.lh-lead { font-size: clamp(.95rem, 1.9vh, 1.15rem); }
  .lh-device { width: auto; height: clamp(240px, 56vh, 620px); max-width: 46%; right: 2%; bottom: 3%; }
  .lh-bottom { padding-top: clamp(10px, 3vh, 32px); }
  .lh-features li { padding: clamp(2px, .8vh, 6px) 20px; gap: clamp(4px, 1vh, 10px); }
  .lh-features svg { width: clamp(28px, 4.6vh, 46px); height: clamp(28px, 4.6vh, 46px); }
  [data-styl="premium"] .lh-features { padding: clamp(8px, 1.8vh, 18px) 10px; }
  .login-hero p.lh-note { margin-top: clamp(6px, 1.6vh, 16px); }

  .login-form { padding: clamp(14px, 3.4vh, 34px) 56px clamp(12px, 2.6vh, 26px); }
  .lf-body > form { margin: clamp(6px, 3vh, 30px) auto; }
  .login-form .eyebrow.lf-eyebrow { margin-bottom: clamp(6px, 1.4vh, 14px); }
  .lf-title { font-size: clamp(1.7rem, min(3.2vw, 5.6vh), 2.85rem); }
  .lf-lead { font-size: clamp(.95rem, 1.9vh, 1.1rem); margin-bottom: clamp(10px, 2.6vh, 26px); }
  .auth-form label.field { margin-bottom: clamp(8px, 1.4vh, 14px); }
  .auth-form label.field > span:first-child { margin-bottom: clamp(3px, .8vh, 8px); }
  .auth-form input[type=email], .auth-form input[type=password], .auth-form input[type=text] { padding-top: clamp(9px, 1.6vh, 16px); padding-bottom: clamp(9px, 1.6vh, 16px); }
  .lf-row { margin-bottom: clamp(10px, 2.2vh, 22px); }
  .btn-login { padding-top: clamp(10px, 1.7vh, 17px); padding-bottom: clamp(10px, 1.7vh, 17px); }
  .lf-divider { margin: clamp(10px, 2.4vh, 24px) 0 clamp(8px, 1.8vh, 18px); }
  .btn.btn-outline { padding-top: clamp(9px, 1.5vh, 15px); padding-bottom: clamp(9px, 1.5vh, 15px); }
  .lf-help { margin-top: clamp(10px, 2.6vh, 26px); }
}
@media (min-width: 901px) and (max-height: 800px) {
  .lh-eyebrow { letter-spacing: .28em; }
  .login-hero .logo-hero { width: clamp(140px, 20vh, 220px); }
  .login-hero h1.lh-title { font-size: clamp(1.8rem, min(3.6vw, 6.2vh), 3.2rem); }
  .login-hero p.lh-lead { font-size: .92rem; line-height: 1.45; }
  .lh-features li { font-size: .9rem; }
  .login-hero p.lh-note { font-size: .7rem; line-height: 1.35; }
  .lf-title { font-size: clamp(1.5rem, min(2.8vw, 4.6vh), 2.3rem); }
  .lf-body > form { max-width: 520px; }
  .lf-help { margin-top: 8px; }
  .lf-foot { font-size: .74rem; }
}
@media (min-width: 901px) and (max-height: 700px) {
  .login-hero .logo-hero { width: 130px; }
  .lh-eyebrow { margin-top: 10px; }
  .lh-features svg { width: 24px; height: 24px; }
  [data-styl="premium"] .lh-features { padding: 6px 8px; }
  .lf-lead { margin-bottom: 8px; }
  .lf-divider { margin: 8px 0; }
}

/* --- wybór języka z flagami w liście (17.10.2026) --- */
.lang-dd { position: relative; display: inline-flex; }
.lang-btn { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px 5px 8px; font: inherit; font-size: .82rem; font-weight: 600; line-height: 1.4; cursor: pointer; white-space: nowrap; max-width: 100%; }
.lang-btn .lang-name { overflow: hidden; text-overflow: ellipsis; }
.lang-btn .chev { width: 15px; height: 15px; flex: none; opacity: .7; transition: transform .15s; }
.lang-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.lang-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.lang-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 60; min-width: 230px; max-height: min(360px, 70vh); overflow-y: auto; margin: 0; padding: 6px; list-style: none; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 34px rgba(0, 0, 0, .18); }
.lang-menu:focus { outline: none; }
.lang-menu li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; cursor: pointer; font-size: .92rem; font-weight: 500; white-space: nowrap; }
.lang-menu li.active { background: var(--cream); }
.lang-menu li[aria-selected="true"] { font-weight: 700; }
.lang-menu li[aria-selected="true"]::after { content: '✓'; margin-left: auto; padding-left: 12px; color: var(--gold-ink); font-weight: 800; }
.lang-menu .flag { width: 24px; height: 16px; }
.login-form .lang-dd .lang-btn { padding: 7px 12px 7px 10px; font-size: .92rem; font-weight: 500; }
[data-styl="premium"] .login-form .lang-dd .lang-btn { padding: 9px 14px 9px 12px; }
.field .lang-dd { display: flex; }
.field .lang-btn { width: 100%; justify-content: flex-start; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font-size: .95rem; font-weight: 500; }
.field .lang-btn .chev { margin-left: auto; }
.field .lang-menu { left: 0; right: auto; }
[data-styl="premium"] .lang-menu { border-color: color-mix(in srgb, var(--line) 60%, var(--gold) 40%); box-shadow: 0 18px 40px rgba(0, 0, 0, .22); }
@media (max-width: 600px) { .lang-menu { right: auto; left: 50%; transform: translateX(-50%); } .field .lang-menu { left: 0; transform: none; } }

/* --- stopka z polityką prywatności na każdej stronie (17.10.2026) --- */
body { display: flex; flex-direction: column; min-height: 100vh; }
body > main { flex: 1 0 auto; width: 100%; }
.site-foot { display: flex; justify-content: center; align-items: center; gap: 10px 18px; flex-wrap: wrap; padding: 18px 28px 22px; border-top: 1px solid var(--line); font-size: .82rem; color: var(--ink-3); }
.site-foot[hidden] { display: none; }
.site-foot a { color: var(--gold-ink); text-decoration: none; font-weight: 600; }
.site-foot a:hover { text-decoration: underline; }
@media print { .site-foot { display: none !important; } }


/* =====================================================================================================
   Odświeżenie wyglądu — kroki A i B z dla_AI/ANALIZA_WYGLADU_PORTALU.md (17.10.2026)
   telefon: kompaktowy nagłówek z ☰ i dolny pasek · cele dotykowe 44 px · :focus-visible · mniej ruchu
   pulpit: stepper z ikonami, ikony modułów i dokumentów · lekcja: pasek postępu, przyklejone „Dalej / Wstecz”, tabele przewijane
   Ekran logowania (.login) bez zmian.
   ===================================================================================================== */

/* --- nagłówek: na komputerze bez zmian (panel „przezroczysty” dla układu), ☰ i dolny pasek tylko na telefonie --- */
.nav-panel { display: contents; }
.userbox .ub-tools, .userbox .ub-acc { display: contents; }
.userbox .ub-name { order: 1; }
.userbox .ub-acc > * { order: 2; }
.menu-btn { display: none; }
.bottomnav { display: none; }
.read-progress { position: absolute; left: 0; right: 0; bottom: -3px; height: 3px; background: color-mix(in srgb, var(--gold) 30%, var(--night)); pointer-events: none; }
.read-progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-600), #f0dcaa); transform: scaleX(0); transform-origin: left center; transition: transform .12s linear; }
[data-styl="premium"] .read-progress { bottom: -2px; height: 2px; }
.exam-bar { top: calc(var(--topbar-h, 80px) + 8px); }

@media (max-width: 900px) {
  .topbar { flex-wrap: nowrap; padding: 8px 12px 8px 16px; gap: 12px; }
  .brand { flex: 1; flex-direction: row; align-items: center; gap: 10px; min-width: 0; }
  .logo-nav { width: 92px; }
  .brand .eyebrow { font-size: .58rem; letter-spacing: .2em; line-height: 1.3; max-width: 13ch; white-space: normal; }
  .menu-btn { display: grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; border-radius: 12px; border: 1px solid rgba(212, 177, 101, .5); background: transparent; color: var(--gold); cursor: pointer; }
  .menu-btn svg { width: 24px; height: 24px; }
  .menu-btn path { transition: transform .2s, opacity .2s; transform-origin: 12px 12px; }
  .topbar.menu-open .menu-btn { background: rgba(212, 177, 101, .16); }
  .topbar.menu-open .mb-1 { transform: translateY(5px) rotate(45deg); }
  .topbar.menu-open .mb-2 { opacity: 0; }
  .topbar.menu-open .mb-3 { transform: translateY(-5px) rotate(-45deg); }

  /* rozwijany panel pod nagłówkiem */
  .nav-panel { display: none; }
  .topbar.menu-open .nav-panel { display: flex; flex-direction: column; gap: 14px; position: absolute; left: 0; right: 0; top: calc(100% + 3px); padding: 14px 16px 18px; background: var(--night); border-bottom: 2px solid var(--gold); box-shadow: 0 18px 36px rgba(0, 0, 0, .35); }
  .nav-panel .userbox { display: contents; }
  .nav-panel .userbox .ub-name { order: 0; display: block; color: #fff; font-weight: 700; font-family: var(--font-head); }
  .nav-panel .userbox .ub-tools { order: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
  .nav-panel .mainnav { order: 2; flex: none; flex-direction: column; flex-wrap: nowrap; overflow: visible; gap: 2px; }
  .nav-panel .mainnav a { display: flex; align-items: center; min-height: 44px; padding: 10px 14px; border-radius: 12px; font-size: 1rem; }
  .nav-panel .userbox .ub-acc { order: 3; display: flex; gap: 8px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .12); }
  .nav-panel .userbox .ub-acc > .btn { flex: 1; justify-content: center; border: 1px solid rgba(212, 177, 101, .35); }
  .nav-panel .userbox .lang-name { display: inline; }
  .nav-panel .userbox .lang-picker { max-width: none; }
  .nav-panel .lang-menu { left: 0; right: auto; transform: none; }
  :root[data-palette="jasna"]:not([data-theme="dark"]) .topbar.menu-open .nav-panel { background: #fff; }
  :root[data-palette="jasna"]:not([data-theme="dark"]) .nav-panel .userbox .ub-name { color: var(--ink); }
  [data-styl="premium"] .topbar.menu-open .nav-panel { background: linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%); }

  /* dolny pasek: Pulpit, Egzamin, Dokumenty, Certyfikat */
  .bottomnav:not([hidden]) { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: var(--night); border-top: 2px solid var(--gold); padding-bottom: env(safe-area-inset-bottom, 0px); box-shadow: 0 -8px 24px rgba(0, 0, 0, .18); }
  .bottomnav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 60px; padding: 6px 2px; color: rgba(255, 255, 255, .7); text-decoration: none; font-size: .72rem; font-weight: 600; line-height: 1.15; text-align: center; position: relative; min-width: 0; }
  .bottomnav a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
  .bottomnav svg { width: 24px; height: 24px; }
  .bottomnav a.active { color: var(--gold); }
  .bottomnav a.active::before { content: ''; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--gold); }
  [data-styl="premium"] .bottomnav:not([hidden]) { background: linear-gradient(180deg, var(--night-2) 0%, var(--night) 100%); }
  [data-styl="premium"] .bottomnav a.active svg { filter: drop-shadow(0 0 6px rgba(212, 177, 101, .55)); }
  :root[data-palette="jasna"]:not([data-theme="dark"]) .bottomnav:not([hidden]) { background: #fff; }
  :root[data-palette="jasna"]:not([data-theme="dark"]) .bottomnav a { color: var(--ink-2); }
  :root[data-palette="jasna"]:not([data-theme="dark"]) .bottomnav a.active { color: var(--gold-ink); }
  /* miejsce na dolny pasek (pod treścią jest stopka; gdy jej nie ma — zapas w samej treści) */
  .app { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  .app:has(~ .site-foot:not([hidden])) { padding-bottom: 32px; }
  .site-foot { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  .toast { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }

  /* pasek egzaminu: numery pytań w jednym przewijanym wierszu */
  .exam-bar .qnav { order: 3; flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; }
  .exam-bar .qnav a { flex: none; }
}

/* --- cele dotykowe min. 44 px (telefon / ekran dotykowy); logowanie ma własne rozmiary --- */
@media (max-width: 900px), (pointer: coarse) {
  .app .btn, .topbar .btn { min-height: 44px; }
  .topbar .theme-toggle, .app .theme-toggle { width: 44px; height: 44px; }
  .topbar .style-switch button { min-width: 44px; height: 40px; }
  .topbar .lang-btn, .app .lang-btn { min-height: 44px; }
  .side li a { min-height: 44px; align-items: center; }
  .side .dot { margin-top: 0; }
  .qnav a { width: 44px; height: 44px; font-size: .86rem; }
  .app .opt { min-height: 44px; align-items: center; }
  .app .opt input { margin-top: 0; width: 20px; height: 20px; flex: none; }
  .crumbs a { display: inline-block; padding: 10px 0; }
  .lesson-nav .btn { min-width: 44px; justify-content: center; }
}

/* --- widoczny fokus z klawiatury (złota obwódka) --- */
:where(.topbar, .app, .bottomnav, .site-foot) :focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
:where(.topbar, .bottomnav) :focus-visible { outline-color: #f0dcaa; }
.app input:focus-visible, .app select:focus-visible, .app textarea:focus-visible { outline: 3px solid var(--gold); outline-offset: 1px; border-color: var(--gold); }
.app .btn:focus-visible { box-shadow: 0 0 0 5px rgba(212, 177, 101, .25); }
.app .opt:focus-within { border-color: var(--gold); }

/* --- mniej ruchu, gdy system o to prosi --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .module-card:hover { transform: none; }
}

/* --- pulpit: stepper z ikonami --- */
.stepper { list-style: none; margin: 22px 0 0; padding: 0; display: flex; }
.stepper li { flex: 1 1 0; min-width: 0; position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 6px; text-align: center; }
.stepper li::before { content: ''; position: absolute; top: 21px; left: calc(-50% + 30px); right: calc(50% + 30px); height: 2px; border-radius: 2px; background: var(--sand); }
.stepper li:first-child::before { display: none; }
.stepper li.done::before, .stepper li.now::before { background: var(--gold); }
.st-ico { position: relative; z-index: 1; width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--sand); background: var(--card); color: var(--ink-3); }
.st-ico svg { width: 22px; height: 22px; }
.stepper li.done .st-ico { background: var(--ok); border-color: var(--ok); color: #fff; }
.stepper li.now .st-ico { border-color: var(--gold); color: var(--gold-ink); box-shadow: 0 0 0 4px rgba(212, 177, 101, .22); }
.st-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.st-t { font-family: var(--font-head); font-size: .92rem; font-weight: 700; color: var(--ink); line-height: 1.25; }
.st-d { font-size: .8rem; color: var(--ink-3); line-height: 1.35; }
.stepper li.now .st-d { color: var(--gold-ink); font-weight: 600; }
[data-styl="premium"] .stepper li.now .st-ico { border-color: transparent; color: #1a1408; background: linear-gradient(180deg, #edd9a8 0%, #d4b165 50%, #b38b3b 100%); box-shadow: 0 0 0 4px rgba(212, 177, 101, .2), 0 8px 18px rgba(184, 145, 61, .35); }
[data-styl="premium"] .stepper li.done .st-ico { box-shadow: 0 6px 14px rgba(47, 125, 79, .25); }
[data-styl="premium"] .stepper li.done::before, [data-styl="premium"] .stepper li.now::before { background: linear-gradient(90deg, #b38b3b, #edd9a8); }
[data-theme="dark"] .stepper li.done .st-ico { background: #1f5c3b; border-color: #2f7d4f; color: #d9f3e3; }
@media (max-width: 600px) {
  .stepper { flex-direction: column; gap: 0; }
  .stepper li { flex-direction: row; align-items: center; gap: 12px; padding: 5px 0; text-align: left; }
  .stepper li::before { top: -5px; left: 21px; right: auto; width: 2px; height: 10px; }
}

/* --- ikony modułów i dokumentów --- */
.module-code svg { width: 24px; height: 24px; }
.module-card.complete .module-code { background: var(--night); color: var(--gold); position: relative; }
.module-card.safety.complete .module-code { background: var(--gold); color: var(--night); }
.module-card.complete .module-code::after { content: '✓'; position: absolute; right: -4px; bottom: -4px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #fff; font-size: .7rem; font-weight: 800; border: 2px solid var(--card); }
.module-tag { display: block; font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-ink); margin-bottom: 2px; }
.module-tag .mt-ok { color: var(--ok); letter-spacing: .06em; }
.doc-card { flex-direction: row; align-items: flex-start; gap: 14px; }
.doc-ico { width: 46px; height: 46px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--cream); border: 1px solid var(--sand); color: var(--gold-ink); }
.doc-ico svg { width: 24px; height: 24px; }
.doc-card:hover .doc-ico { border-color: var(--gold); }
[data-styl="premium"] .doc-ico { background: linear-gradient(180deg, var(--night-2), var(--night)); border-color: rgba(212, 177, 101, .45); color: var(--gold); box-shadow: 0 4px 10px rgba(0, 0, 0, .14); }
[data-theme="dark"] .doc-ico { color: var(--gold); }

/* --- lekcja: przyklejone „Wstecz / Dalej” --- */
.lesson-nav { position: sticky; bottom: 0; z-index: 15; align-items: center; margin: 28px -14px 0; padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px)); background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-top: 1px solid var(--line); flex-wrap: nowrap; }
.lesson-nav .row { flex-wrap: nowrap; }
.ln-pos { font-size: .82rem; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
[data-styl="premium"] .lesson-nav { border-top: 1px solid color-mix(in srgb, var(--line) 60%, var(--gold) 40%); box-shadow: 0 -10px 24px rgba(21, 21, 21, .06); }
@media (max-width: 900px) {
  .lesson-nav { bottom: calc(62px + env(safe-area-inset-bottom, 0px)); padding: 10px 16px; margin: 22px -16px 0; }
}
@media (max-width: 600px) {
  .lesson-nav .btn { padding: 10px 16px; }
  .lesson-nav #completeBtn { white-space: normal; line-height: 1.25; }
}

/* --- tabele w treści: przewijanie w poziomie z cieniem krawędzi --- */
.tscroll { position: relative; margin: 14px 0; }
.tscroll-in { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; border-radius: 10px; }
.tscroll-in:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.prose .tscroll table { display: table; margin: 0; }
.tscroll::before, .tscroll::after { content: ''; position: absolute; top: 0; bottom: 0; width: 22px; pointer-events: none; opacity: 0; transition: opacity .15s; z-index: 1; }
.tscroll::before { left: 0; background: linear-gradient(90deg, rgba(0, 0, 0, .16), transparent); border-radius: 10px 0 0 10px; }
.tscroll::after { right: 0; background: linear-gradient(270deg, rgba(0, 0, 0, .16), transparent); border-radius: 0 10px 10px 0; }
.tscroll.can-l::before, .tscroll.can-r::after { opacity: 1; }
[data-theme="dark"] .tscroll::before { background: linear-gradient(90deg, rgba(0, 0, 0, .55), transparent); }
[data-theme="dark"] .tscroll::after { background: linear-gradient(270deg, rgba(0, 0, 0, .55), transparent); }
@media (max-width: 600px) {
  .prose .tscroll th, .prose .tscroll td { min-width: 9em; }
  .prose .tscroll th:first-child, .prose .tscroll td:first-child { min-width: 7em; }
}
/* spis lekcji przyklejony tuż pod nagłówkiem (jego wysokość mierzy app.js → --topbar-h) */
@media (min-width: 901px) { .side { top: calc(var(--topbar-h, 80px) + 16px); max-height: calc(100vh - var(--topbar-h, 80px) - 32px); overflow-y: auto; } }

/* --- zakładki kont według ról (17.10.2026) --- */
.role-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: -6px 0 16px; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.role-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .9rem; }
.role-tabs a span { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--cream); color: var(--ink-3); font-size: .75rem; text-align: center; }
.role-tabs a:hover { background: var(--cream); color: var(--ink); }
.role-tabs a.on { background: var(--night); color: #fff; }
.role-tabs a.on span { background: var(--gold); color: #151515; }
[data-theme="dark"] .role-tabs a.on { background: var(--gold); color: #151515; }
[data-theme="dark"] .role-tabs a.on span { background: #151515; color: var(--gold); }
[data-styl="premium"] .role-tabs { box-shadow: 0 8px 20px rgba(74, 70, 63, .08); }
[data-styl="premium"] .role-tabs a.on { background: linear-gradient(180deg, var(--night-2), var(--night)); box-shadow: inset 0 -2px 0 var(--gold); }
[data-styl="premium"][data-theme="dark"] .role-tabs a.on { background: linear-gradient(180deg, #edd9a8, #d4b165 50%, #b38b3b); color: #151515; box-shadow: none; }
.kind-info { margin: 0 0 16px; max-width: 80ch; }
@media (max-width: 600px) { .role-tabs { flex-wrap: nowrap; overflow-x: auto; } .role-tabs a { white-space: nowrap; } }

/* --- panel → Certyfikat: edytor obok podglądu (18.10.2026) --- */
.cert-editor { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 20px; align-items: start; }
.cert-form textarea { width: 100%; resize: vertical; font: inherit; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); }
.cert-form .grid-3 { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.cert-preview { position: sticky; top: 90px; }
.cert-preview .cert { transform-origin: top center; }
.cert-sign { margin: 30px auto 0; width: 260px; font-size: .9rem; color: var(--ink-2); }
.cert-sign span { display: block; border-top: 1px solid var(--gold); margin-bottom: 6px; }
@media (max-width: 1100px) { .cert-editor { grid-template-columns: 1fr; } .cert-preview { position: static; } }

/* --- 18.10.2026: lekcje zatwierdzone przez administratora, grupa i notatki trenera --- */
.les-chip { cursor: pointer; font: inherit; font-size: .78rem; font-weight: 700; }
.les-chip:hover { outline: 2px solid var(--gold); outline-offset: 1px; }
.pill.approved { background: var(--gold); color: #151515; border-color: var(--gold-600); }
.grp-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 16px; }
.notes { list-style: none; margin: 12px 0 0; padding: 0; }
.notes li { border-top: 1px solid var(--line); padding: 10px 0; }
.note-text { white-space: pre-wrap; margin-top: 2px; }
.linkish { background: none; border: 0; padding: 0; color: var(--gold-ink); cursor: pointer; font: inherit; text-decoration: underline; }

/* drzewo uprawnień (panel → Uprawnienia) */
.perm-tree td:not(:first-child), .perm-tree th:not(:first-child) { text-align: center; width: 120px; }
.perm-tree .perm-group th { text-align: left; background: var(--sand); color: var(--ink-2); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.perm-tree .perm-na { color: var(--ink-3); }

/* --- belka górna (19.10.2026): niższa — logo i napis w jednym rzędzie, menu w jednej linii, imię skracane --- */
@media (min-width: 901px) {
  .topbar { padding: 6px 24px; gap: 18px; }
  .brand { flex-direction: row; align-items: center; gap: 10px; flex: none; }
  .logo-nav { width: 96px; height: auto; }
  .brand .eyebrow { font-size: .56rem; letter-spacing: .18em; line-height: 1.25; max-width: none; width: min-content; white-space: normal; }
  .mainnav { flex-wrap: nowrap; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .mainnav::-webkit-scrollbar { display: none; }
  .mainnav a { padding: 6px 12px; font-size: .9rem; }
  .userbox { flex-wrap: nowrap; gap: 8px; }
  .userbox .ub-name { white-space: nowrap; max-width: 18ch; overflow: hidden; text-overflow: ellipsis; }
  .userbox .btn.small { white-space: nowrap; }
}
@media (min-width: 901px) and (max-width: 1280px) {
  .brand .eyebrow, .userbox .ub-name { display: none; }
  .topbar { gap: 12px; padding: 6px 16px; }
  .mainnav a { padding: 6px 10px; }
}
