/* =====================================================================
   panel.css — Panel zarządzania SUPERKIDS (demo)
   Terapeutyczny Punkt Przedszkolny, Rumia & Gdynia. Samowystarczalny (własne :root).
   Layout: granatowy „peleryna" sidebar + jasny, czytelny workspace.
   Motyw: SUPERKIDS — Akademia Superbohaterów (czerwień/granat/żółć, Baloo 2).
   ===================================================================== */

:root {
  /* --- Paleta marki SUPERKIDS (z superkids.edu.pl) --- */
  --cream:        #fff7ec;
  --cream-2:      #fdeede;
  --cream-3:      #fbe3d4;
  --ink:          #1b1d40;
  --ink-soft:     #5d6189;
  --ink-faint:    #8b90b5;
  --honey:        #ffc400;   /* żółć — akcent „gwiazda/supermoc" */
  --honey-deep:   #ffb200;
  --honey-soft:   #ffe79e;
  --terracotta:   #ee2447;   /* czerwień — primary „peleryna" */
  --terracotta-d: #c8163a;
  --brown:        #14163d;   /* głęboki granat — ciemny tekst/akcent */
  --sage:         #3f63d6;   /* błękit superkids */
  --sage-deep:    #2e3192;   /* granat z logo */
  --mint:         #d6f7e8;
  --mint-deep:    #b9efd6;
  --sky:          #dbeaff;
  --white:        #ffffff;

  /* --- Aliasy tokenów panelu (mapowanie ze starego stacku) --- */
  --navy-900:   #14163d;   /* sidebar „granat/peleryna" + ciemny tekst */
  --navy:       #2e3192;   /* akcent granatowy */
  --red:        #ee2447;   /* primary (czerwień) */
  --red-600:    #d31a3b;
  --red-700:    #b3122f;
  --yellow:     #ffc400;   /* żółć */
  --line:       #ece6da;   /* ciepła ramka na kremowym tle */
  --grid-line:  rgba(255,255,255,.10);
  --muted:      #5f6590;   /* przyciemnione do kontrastu AA na jasnym tle */
  --up:         #25c281;   /* pozytyw */
  --up-on-dark: #9af0cf;

  --font-head: "Baloo 2", "Segoe UI", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-hand: "Baloo 2", "Segoe UI", sans-serif;

  --r:     20px;
  --r-sm:  13px;
  --r-lg:  30px;
  --shadow-sm: 0 4px 14px rgba(20, 22, 61, .07);
  --shadow:    0 14px 40px rgba(20, 22, 61, .10);
  --shadow-lg: 0 30px 70px rgba(20, 22, 61, .18);
  --ease-out: cubic-bezier(.22, .61, .36, 1);

  --grad-navy: linear-gradient(120deg, #3f63d6 0%, var(--sage-deep) 100%);
  --grad-red:  linear-gradient(120deg, #ff5269 0%, var(--terracotta) 100%);
  --grad-sun:  linear-gradient(120deg, var(--honey-soft) 0%, var(--honey) 100%);
  --side-bg:   linear-gradient(185deg, #232566 0%, #1a1c52 60%, #14163d 100%);
}

* , *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body.pnl-body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; }
::selection { background: var(--honey-soft); color: var(--brown); }

.pnl { display: grid; grid-template-columns: 268px 1fr; min-height: 100vh; }

/* ---------- Sidebar (gniazdo) ---------- */
.pnl-side { background: var(--side-bg); color: #d6daf7; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 18px 14px; }
.pnl-side__brand { display: flex; align-items: center; gap: 11px; padding: 6px 8px 16px; border-bottom: 1px solid var(--grid-line); margin-bottom: 12px; }
.pnl-side__brand .bird { width: 38px; height: 38px; flex: none; }
.pnl-side__brand b { font-family: var(--font-head); color: #fff; font-size: 1rem; line-height: 1.05; display: block; }
.pnl-side__brand small { display: block; font-size: .62rem; letter-spacing: .14em; color: #969cd6; text-transform: uppercase; margin-top: 2px; }
.pnl-nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
.pnl-nav::-webkit-scrollbar { width: 7px; }
.pnl-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); border-radius: 99px; }
.pnl-nav > button, .pnl-group__list button { display: flex; align-items: center; gap: 11px; text-align: left; padding: 10px 12px; border-radius: var(--r-sm); color: #b6bcea; font-family: var(--font-head); font-weight: 500; font-size: .9rem; transition: background .2s, color .2s; width: 100%; }
.pnl-nav button svg.ic { width: 18px; height: 18px; flex: none; opacity: .85; }
.pnl-nav button:hover { background: rgba(255,255,255,.06); color: #fff; }
.pnl-nav button.active { background: linear-gradient(100deg, var(--honey) 0%, var(--honey-deep) 100%); color: #14163d; box-shadow: 0 6px 16px rgba(255,196,0,.4); }
.pnl-nav button.active svg.ic { opacity: 1; }
.pnl-nav button .badge { margin-left: auto; background: var(--terracotta); color: #fff; font-size: .62rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.pnl-nav button.active .badge { background: rgba(20,22,61,.16); color: #14163d; }
/* grupy menu (akordeon) */
.pnl-group { display: flex; flex-direction: column; }
.pnl-group__h { color: #7e85c4; font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; padding: 13px 12px 6px; gap: 9px; display: flex; align-items: center; width: 100%; }
.pnl-group__h:hover { color: #b6bcea; }
.pnl-group__ic { display: inline-grid; place-items: center; flex: none; }
.pnl-group__ic svg { width: 15px; height: 15px; opacity: .9; }
.pnl-group__chev { margin-left: auto; width: 14px; height: 14px; transition: transform .25s; opacity: .6; }
.pnl-group.is-open .pnl-group__chev { transform: rotate(180deg); }
.pnl-group__list { display: none; flex-direction: column; gap: 2px; padding-bottom: 6px; }
.pnl-group.is-open .pnl-group__list { display: flex; }
.pnl-group__list button { padding-left: 16px; font-size: .86rem; }
.pnl-side__foot { padding-top: 12px; border-top: 1px solid var(--grid-line); }
.pnl-side__foot a { display: flex; align-items: center; gap: 8px; color: #969cd6; font-size: .82rem; padding: 8px 12px; border-radius: var(--r-sm); }
.pnl-side__foot a:hover { background: rgba(255,255,255,.06); color: #fff; }
.pnl-side__foot a svg { width: 16px; height: 16px; }
.pnl-credit { margin-top: 10px; padding: 10px 12px; font-size: .66rem; line-height: 1.5; color: #7e85c4; border-top: 1px dashed var(--grid-line); }
.pnl-credit b { color: #b6bcea; font-family: var(--font-head); font-size: .74rem; }
.pnl-credit a { display: inline; padding: 0; color: #969cd6; }
.pnl-credit a:hover { color: #fff; text-decoration: underline; }

/* ---------- Topbar ---------- */
.pnl-main { display: flex; flex-direction: column; min-width: 0; }
.pnl-top { display: flex; align-items: center; gap: 16px; padding: 15px 28px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.pnl-top h1 { font-family: var(--font-head); font-size: 1.3rem; font-weight: 500; margin: 0; }
.pnl-top .sync { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--muted); }
.pnl-top .sync .live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--up); animation: liveBlink 1.6s infinite; }
@keyframes liveBlink { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
.pnl-burger { display: none; }
.pnl-user { display: inline-flex; align-items: center; gap: 9px; }
.pnl-user .av { width: 36px; height: 36px; border-radius: 50%; background: var(--grad-red); color: #fff; display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; font-size: .82rem; }
.pnl-user b { font-size: .86rem; } .pnl-user small { display: block; color: var(--muted); font-size: .72rem; }
/* przełącznik placówki (Rumia/Gdynia) */
.loc-switch { display: inline-flex; gap: 3px; background: var(--cream-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.loc-switch button { font-family: var(--font-head); font-weight: 600; font-size: .8rem; color: var(--ink-soft); padding: 5px 14px; border-radius: 999px; transition: background .2s, color .2s; }
.loc-switch button.active { background: var(--grad-navy); color: #fff; box-shadow: 0 4px 12px rgba(46,49,146,.25); }
@media (max-width: 720px){ .loc-switch { display: none; } }

/* ---------- Workspace ---------- */
.pnl-work { padding: 26px 28px 70px; max-width: 1280px; }
.pnl-sec { display: none; }
.pnl-sec.active { display: block; animation: pnlFade .35s ease; }
@keyframes pnlFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.pnl-h { font-family: var(--font-head); font-size: 1.18rem; font-weight: 500; margin: 30px 0 14px; display: flex; align-items: center; gap: 10px; }
.pnl-h:first-child { margin-top: 0; }
.pnl-h svg { width: 20px; height: 20px; color: var(--terracotta); }
.pnl-sub { color: var(--ink-soft); margin: -6px 0 18px; max-width: 74ch; }

/* dev-note baner */
.dev-note { display: flex; align-items: center; gap: 14px; padding: 14px 18px; background: linear-gradient(100deg, var(--mint) 0%, #EAF4EF 100%); border: 1px solid var(--mint-deep); border-radius: var(--r); margin-bottom: 22px; }
.dev-note__ic { width: 40px; height: 40px; border-radius: 12px; background: #fff; display: grid; place-items: center; color: var(--sage-deep); flex: none; box-shadow: var(--shadow-sm); }
.dev-note__ic svg { width: 22px; height: 22px; }
.dev-note__b { flex: 1; } .dev-note__b b { display: block; font-family: var(--font-head); }
.dev-note__b span { color: var(--ink-soft); font-size: .88rem; }
.dev-note__badge { display: inline-flex; align-items: center; gap: 7px; font-size: .72rem; font-weight: 700; color: var(--sage-deep); background: #fff; padding: 6px 11px; border-radius: 999px; flex: none; }
.dev-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--up); animation: liveBlink 1.6s infinite; }

/* karty / siatki */
.pcards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.pcard { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow-sm); }
.kpi2 { position: relative; overflow: hidden; }
.kpi2__lbl { font-family: var(--font-head); font-size: .76rem; letter-spacing: .02em; color: var(--muted); }
.kpi2__val { font-weight: 700; font-size: 1.8rem; color: var(--navy-900); margin-top: 8px; font-variant-numeric: tabular-nums; font-family: var(--font-head); }
.kpi2__d { font-size: .8rem; font-weight: 600; margin-top: 6px; }
.kpi2__d.up { color: var(--up); } .kpi2__d.down { color: var(--red-700); } .kpi2__d.flat { color: var(--muted); }
.kpi2__ic { position: absolute; top: 16px; right: 16px; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: #fff; }
.kpi2__ic svg { width: 20px; height: 20px; }
.ic-red { background: var(--grad-red); } .ic-mint { background: var(--grad-navy); }
.ic-navy { background: linear-gradient(120deg, #8C6B4A, var(--brown)); } .ic-sun { background: var(--grad-sun); color: var(--brown); }
.ic-sky { background: linear-gradient(120deg, var(--sky), var(--mint-deep)); color: var(--sage-deep); }

.prow { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }
.prow.even { grid-template-columns: 1fr 1fr; }
@media (max-width: 1100px) { .prow, .prow.even { grid-template-columns: 1fr; } }

/* tabele */
.ptable-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); }
.ptable { width: 100%; border-collapse: collapse; font-size: .9rem; }
.ptable th { text-align: left; font-family: var(--font-head); font-weight: 600; font-size: .72rem; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ptable td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ptable tbody tr:last-child td { border-bottom: none; }
.ptable .num { font-variant-numeric: tabular-nums; }
.ptable tbody tr:hover { background: var(--cream); }
.ptable .ta-r { text-align: right; } .ptable .ta-c { text-align: center; }

/* badge / status */
.pbadge { display: inline-flex; align-items: center; gap: 6px; font-size: .7rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; letter-spacing: .01em; }
.pbadge.ok, .pbadge.active, .pbadge.present { color: var(--up); background: color-mix(in srgb, var(--up) 14%, #fff); }
.pbadge.warn, .pbadge.paused { color: var(--honey-deep); background: color-mix(in srgb, var(--honey) 20%, #fff); }
.pbadge.bad, .pbadge.absent { color: var(--terracotta-d); background: color-mix(in srgb, var(--terracotta) 16%, #fff); }
.pbadge.info { color: var(--sage-deep); background: color-mix(in srgb, var(--sage) 22%, #fff); }
.pbadge.neutral { color: var(--ink-soft); background: var(--cream-2); }
.pbadge .d { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pbadge.active .d, .pbadge.present .d { animation: liveBlink 1.6s infinite; }

/* przyciski */
.pbtn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-head); font-weight: 600; font-size: .86rem; padding: 9px 16px; border-radius: var(--r-sm); border: 1px solid var(--line); background: #fff; color: var(--navy-900); cursor: pointer; transition: .2s; }
.pbtn:hover { border-color: var(--sage); background: var(--cream); }
.pbtn--primary { background: var(--grad-red); color: #fff; border-color: transparent; box-shadow: 0 8px 18px rgba(201,105,60,.24); }
.pbtn--primary:hover { filter: brightness(1.04); background: var(--grad-red); border-color: transparent; }
.pbtn--sage { background: var(--sage-deep); color: #fff; border-color: var(--sage-deep); }
.pbtn--sage:hover { background: #4e6a49; border-color: #4e6a49; }
.pbtn--ghost { background: transparent; }
.pbtn svg { width: 16px; height: 16px; }
.pbtn--icon { padding: 8px; }
.pbtn--sm { padding: 6px 11px; font-size: .8rem; }
.pchip { font-size: .78rem; font-weight: 600; padding: 5px 12px; border-radius: 999px; background: var(--cream-2); color: var(--ink-soft); cursor: pointer; border: 1px solid transparent; transition: .15s; }
.pchip:hover { background: var(--cream-3); }
.pchip.on { background: var(--sage-deep); color: #fff; }

/* segmenty/filtry */
.pseg { display: inline-flex; gap: 4px; background: var(--cream-2); padding: 4px; border-radius: 999px; flex-wrap: wrap; }
.pseg button { padding: 6px 14px; border-radius: 999px; font-family: var(--font-head); font-weight: 600; font-size: .82rem; color: var(--ink-soft); }
.pseg button.on { background: #fff; color: var(--terracotta); box-shadow: var(--shadow-sm); }

/* toolbar */
.ptoolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.psearch { flex: 1 1 240px; position: relative; max-width: 420px; }
.psearch svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--muted); }
.psearch input { width: 100%; padding: 11px 14px 11px 40px; border: 1px solid var(--line); border-radius: 999px; font: inherit; background: #fff; }
.psearch input:focus { outline: none; border-color: var(--sage); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sage) 22%, transparent); }

/* pola formularzy */
.field { margin-bottom: 13px; }
.field label { display: block; font-family: var(--font-head); font-weight: 600; font-size: .82rem; color: var(--ink); margin-bottom: 5px; }
.field input, .field select, .field textarea { width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--cream); font: inherit; color: var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--sage); background: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--sage) 18%, transparent); }
.field textarea { min-height: 90px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px){ .field-row { grid-template-columns: 1fr; } }

/* listy ogólne kafelki */
.tile { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.tile + .tile { margin-top: 12px; }
.tile__h { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.tile__h b { font-family: var(--font-head); font-size: .98rem; }
.tile__h > svg { width: 18px; height: 18px; flex: none; }
.notif-card .tile__h > svg { color: var(--terracotta); }

/* wykres słupkowy */
.barchart { display: flex; align-items: flex-end; gap: 10px; height: 160px; padding: 10px 0 24px; }
.barchart .bar { flex: 1; background: var(--grad-navy); border-radius: 6px 6px 0 0; position: relative; min-height: 4px; transition: height .6s var(--ease-out); }
.barchart .bar span { position: absolute; top: -19px; left: 0; right: 0; text-align: center; font-size: .66rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.barchart .bar small { position: absolute; bottom: -22px; left: 0; right: 0; text-align: center; font-size: .68rem; color: var(--muted); }
.barchart .bar.hot { background: var(--grad-red); }

/* Social media — tagi kanałów + mini-ikony (port z przeciwnaduzyciom) */
.ic-tri { width: .7em; height: .7em; vertical-align: -.02em; margin-right: 3px; flex: none; }
.ic-pp  { width: 1.05em; height: 1.05em; vertical-align: -.22em; }
.chan { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; }
.chan svg { width: 16px; height: 16px; flex: none; }
.chan.fb { color: #1877F2; } .chan.ig { color: #d6249f; } .chan.yt { color: #FF0000; } .chan.google { color: #4285F4; }

/* ---------- Pasek postępu ---------- */
.pbar { height: 9px; background: var(--cream-2); border-radius: 999px; overflow: hidden; }
.pbar > span { display: block; height: 100%; border-radius: 999px; background: var(--grad-navy); }
.pbar.warn > span { background: var(--grad-sun); }
.pbar.bad > span { background: var(--grad-red); }

/* ---------- Avatar dziecka / osoby ---------- */
.av-kid { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-family: var(--font-head); font-weight: 700; font-size: .8rem; flex: none; }
.av-row { display: inline-flex; align-items: center; gap: 10px; }
.av-row b { font-weight: 600; }
.av-row small { display: block; color: var(--muted); font-size: .76rem; }

/* ---------- Sfery rozwoju (tagi) ---------- */
.sphere { display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.sphere::before { content:""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.sphere.zp { color: #B85A30; background: #FBEbe0; }   /* życie praktyczne */
.sphere.se { color: #9A7A1E; background: #FaF1d8; }   /* sensoryka */
.sphere.je { color: #2E7D6B; background: #DcF0EA; }   /* język */
.sphere.ma { color: #4A6FA5; background: #E1EAF6; }   /* matematyka */
.sphere.ko { color: #5E7C58; background: #E6F0E2; }   /* edukacja kosmiczna */

/* ---------- Rejestr prezentacji (status materiału) ---------- */
.mstat { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 700; }
.mstat::before { content:""; width: 9px; height: 9px; border-radius: 50%; }
.mstat.pres::before { background: var(--honey); }       /* zaprezentowano */
.mstat.prac::before { background: var(--sky); }         /* w ćwiczeniu */
.mstat.done::before { background: var(--up); }          /* opanowane */
.mstat.pres { color: var(--honey-deep); } .mstat.prac { color: var(--sage-deep); } .mstat.done { color: var(--up); }
.mtrack { display: inline-flex; gap: 4px; }
.mtrack i { width: 22px; height: 7px; border-radius: 999px; background: var(--cream-3); }
.mtrack i.on1 { background: var(--honey); } .mtrack i.on2 { background: var(--sky); } .mtrack i.on3 { background: var(--up); }

/* ---------- Rytm dnia (oś) ---------- */
.rhythm { position: relative; padding-left: 26px; }
.rhythm::before { content:""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: var(--cream-3); }
.rhythm__it { position: relative; padding: 10px 0 10px 4px; display: flex; gap: 14px; align-items: flex-start; }
.rhythm__it::before { content:""; position: absolute; left: -22px; top: 16px; width: 13px; height: 13px; border-radius: 50%; background: #fff; border: 3px solid var(--sage); }
.rhythm__it.work::before { border-color: var(--terracotta); }
.rhythm__it.meal::before { border-color: var(--honey); }
.rhythm__it.rest::before { border-color: var(--sky); }
.rhythm__time { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink); min-width: 92px; font-family: var(--font-head); }
.rhythm__b b { display: block; } .rhythm__b small { color: var(--muted); }

/* ---------- Lejek rekrutacji ---------- */
.funnel { display: flex; flex-direction: column; gap: 8px; }
.funnel__row { display: flex; align-items: center; gap: 12px; }
.funnel__bar { height: 40px; border-radius: var(--r-sm); display: flex; align-items: center; padding: 0 14px; color: #fff; font-weight: 700; font-family: var(--font-head); }
.funnel__row small { color: var(--muted); white-space: nowrap; }

/* ---------- Jadłospis ---------- */
.menu-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.menu-day { background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-sm); }
.menu-day__h { background: var(--grad-navy); color: #fff; padding: 9px 12px; font-family: var(--font-head); font-weight: 700; font-size: .86rem; text-align: center; }
.menu-day__b { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.menu-meal b { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--terracotta); }
.menu-meal span { font-size: .86rem; color: var(--ink); }
.allergen { display: inline-block; font-size: .64rem; font-weight: 700; color: var(--honey-deep); background: var(--honey-soft); border-radius: 5px; padding: 1px 5px; margin: 2px 2px 0 0; }
@media (max-width: 900px) { .menu-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Czat + zespół ---------- */
.chat { display: flex; flex-direction: column; height: 520px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-sm); }
.chat__head { padding: 11px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; }
.chat__head svg { width: 18px; height: 18px; flex: none; color: var(--terracotta); }
.chat__head .ch-sub { margin-left: auto; font-family: var(--font-body); font-weight: 500; font-size: .74rem; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.chat__head .ch-sub .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--up); flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--up) 22%, transparent); }
.chat__body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--cream); }
.chat__day { text-align: center; margin: 2px 0 6px; }
.chat__day span { font-size: .7rem; color: var(--muted); background: var(--cream-2); padding: 3px 12px; border-radius: 999px; }
.chat__msg { max-width: 80%; display: flex; gap: 9px; align-items: flex-end; }
.chat__av { width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; font-family: var(--font-head); font-weight: 700; font-size: .68rem; }
.chat__msgbody { min-width: 0; }
.chat__msg .who { font-size: .72rem; color: var(--muted); margin-bottom: 3px; font-weight: 600; }
.chat__msg .who .t { color: var(--muted); font-weight: 500; margin-left: 7px; font-size: .68rem; font-variant-numeric: tabular-nums; }
.chat__msg .bub { background: #fff; border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; padding: 10px 14px; font-size: .9rem; line-height: 1.45; word-wrap: break-word; }
.chat__msg.me { align-self: flex-end; flex-direction: row-reverse; }
.chat__msg.me .who { text-align: right; }
.chat__msg.me .bub { background: var(--sage-deep); color: #fff; border: 0; border-radius: 14px 14px 4px 14px; }
.chat__typing { display: flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--muted); padding: 0 4px; }
.chat__typing i { display: inline-flex; gap: 3px; }
.chat__typing i b { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); display: inline-block; animation: chatDot 1.2s infinite; }
.chat__typing i b:nth-child(2) { animation-delay: .2s; }
.chat__typing i b:nth-child(3) { animation-delay: .4s; }
@keyframes chatDot { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.chat__input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); align-items: center; }
.chat__input input { flex: 1; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--cream); font: inherit; }
.chat__input input:focus { outline: none; border-color: var(--sage); }
.chat__tool { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; color: var(--ink-soft); cursor: pointer; transition: background .15s, color .15s; }
.chat__tool:hover { background: var(--cream-2); color: var(--terracotta); }
.chat__tool svg { width: 18px; height: 18px; }
.chan-list { display: flex; flex-direction: column; gap: 4px; }
.chan-list button { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 8px 11px; border-radius: var(--r-sm); font-weight: 600; color: var(--ink-soft); }
.chan-list button .cl-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.chan-list button .cl-desc { font-size: .72rem; color: var(--muted); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chan-list button .cl-unread { margin-left: auto; flex: none; background: var(--terracotta); color: #fff; font-size: .66rem; font-weight: 700; min-width: 19px; height: 19px; border-radius: 999px; display: grid; place-items: center; padding: 0 5px; }
.chan-list button.on { background: var(--cream-2); color: var(--terracotta); }
.chan-list button.on .cl-desc { color: var(--terracotta-d); }
.team { display: flex; flex-direction: column; gap: 8px; }
.team__m { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; }
.team__m .av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-family: var(--font-head); font-weight: 700; font-size: .76rem; flex: none; }
.team__m .on { width: 8px; height: 8px; border-radius: 50%; background: var(--up); margin-left: auto; }
.team__m .off { width: 8px; height: 8px; border-radius: 50%; background: #c9c0b2; margin-left: auto; }

/* ---------- Zadania ---------- */
.task { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-left: 4px solid var(--sage); border-radius: var(--r-sm); background: #fff; margin-bottom: 9px; box-shadow: var(--shadow-sm); }
.task.p-high { border-left-color: var(--terracotta); }
.task.p-low { border-left-color: var(--sky); }
.task.done { opacity: .6; }
.task.done .task__t { text-decoration: line-through; }
.task__chk { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--sage); flex: none; display: grid; place-items: center; cursor: pointer; }
.task.done .task__chk { background: var(--up); border-color: var(--up); color: #fff; }
.task__chk svg { width: 14px; height: 14px; }
.task__t { flex: 1; font-weight: 600; }
.task__meta { font-size: .76rem; color: var(--muted); display: flex; gap: 10px; align-items: center; }

/* ---------- Kanban ---------- */
.kan { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.kan__col { background: var(--cream); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; }
.kan__h { font-family: var(--font-head); font-weight: 700; font-size: .82rem; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.kan__h .c { margin-left: auto; font-size: .7rem; color: var(--muted); }
.kan__card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 11px 13px; font-size: .86rem; margin-bottom: 8px; box-shadow: var(--shadow-sm); }
.kan__card .tag { font-size: .64rem; color: var(--terracotta); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }

/* ---------- Galeria / media ---------- */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.media-it { border-radius: var(--r-sm); overflow: hidden; position: relative; aspect-ratio: 1; background: var(--cream-2); border: 1px solid var(--line); }
.media-it img { width: 100%; height: 100%; object-fit: cover; }
.media-it .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 10px; background: linear-gradient(transparent, rgba(46,36,25,.7)); color: #fff; font-size: .74rem; }

/* ---------- Dokumenty ---------- */
.doc { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; margin-bottom: 8px; }
.doc__ic { width: 40px; height: 40px; border-radius: 10px; background: var(--cream-2); color: var(--terracotta); display: grid; place-items: center; flex: none; }
.doc__ic svg { width: 20px; height: 20px; }
.doc__b { flex: 1; } .doc__b b { display: block; font-weight: 600; } .doc__b small { color: var(--muted); }

/* ---------- Integracje / konektory ---------- */
.conn { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 10px; background: #fff; box-shadow: var(--shadow-sm); }
.conn__ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; color: #fff; flex: none; font-family: var(--font-head); font-weight: 800; }
.conn__b { flex: 1; } .conn__b b { display: block; } .conn__b small { color: var(--muted); }
.flow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .84rem; color: var(--navy-900); background: var(--cream); border: 1px dashed var(--sage); border-radius: var(--r); padding: 16px; }
.flow .node { background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 12px; font-weight: 600; }
.flow .arr { color: var(--terracotta); font-weight: 700; display: inline-flex; }
.flow .arr svg { width: 18px; height: 18px; }

/* ---------- Notatka/uwaga ---------- */
.note { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r); margin-bottom: 14px; }
.note.warn { background: color-mix(in srgb, var(--honey) 14%, #fff); border: 1px solid var(--honey-soft); }
.note.info { background: var(--mint); border: 1px solid var(--mint-deep); }
.note svg { width: 20px; height: 20px; flex: none; margin-top: 2px; }
.note.warn svg { color: var(--honey-deep); } .note.info svg { color: var(--sage-deep); }
.note b { font-family: var(--font-head); }

/* ---------- Pomoc ---------- */
.tip { display: flex; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; margin-bottom: 10px; }
.tip .n { width: 28px; height: 28px; border-radius: 8px; background: var(--grad-sun); color: var(--brown); display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; flex: none; }

/* ---------- Toast ---------- */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--navy-900); color: #fff; padding: 13px 22px; border-radius: var(--r); box-shadow: var(--shadow-lg); font-weight: 600; opacity: 0; pointer-events: none; transition: .3s; z-index: 200; display: flex; align-items: center; gap: 10px; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast svg { width: 18px; height: 18px; color: var(--up-on-dark); }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 250; background: rgba(46,36,25,.5); display: none; place-items: center; padding: 24px; backdrop-filter: blur(3px); }
.modal.show { display: grid; animation: pnlFade .25s ease; }
.modal__card { background: #fff; border-radius: var(--r-lg); padding: 26px 28px; max-width: 560px; width: 100%; max-height: 88vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
.modal__h { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.modal__h h3 { font-family: var(--font-head); font-weight: 500; font-size: 1.25rem; }
.modal__h .x { margin-left: auto; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--cream-2); }
.modal__h .x:hover { background: var(--cream-3); }
.modal__foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }

/* ---------- Pusty stan ---------- */
.empty { text-align: center; color: var(--muted); padding: 44px 20px; background: #fff; border: 1px dashed var(--line); border-radius: var(--r); }
.empty .bird { width: 60px; height: 60px; margin: 0 auto 12px; opacity: .8; }

/* ---------- Login overlay ---------- */
.pnl-login { position: fixed; inset: 0; z-index: 300; background: radial-gradient(130% 100% at 50% -10%, #2e3192, #1a1c52 55%, #14163d); display: grid; place-items: center; padding: 24px; }
.pnl-login.hidden { display: none; }
.pnl-login__card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: var(--r-lg); padding: 40px 36px; max-width: 400px; width: 100%; text-align: center; backdrop-filter: blur(12px); }
.pnl-login__card .bird { width: 64px; height: 64px; margin: 0 auto 16px; }
.pnl-login__card h2 { color: #fff; font-size: 1.4rem; font-family: var(--font-head); font-weight: 500; }
.pnl-login__card p { color: #b6bcea; font-size: .9rem; margin: 8px 0 22px; }
.pnl-login__card .field { text-align: left; margin-bottom: 12px; }
.pnl-login__card label { color: #b6bcea; font-size: .8rem; }
.pnl-login__card input { width: 100%; padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.08); color: #fff; font: inherit; margin-top: 5px; }
.pnl-login__card input::placeholder { color: #9DB091; }
.pnl-login__note { color: #7e85c4; font-size: .72rem; margin-top: 16px; }

/* ---------- Pulpit: powitanie ---------- */
.hero-hi { background: linear-gradient(115deg, var(--cream-2) 0%, #fff 60%); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 24px; display: flex; align-items: center; gap: 20px; margin-bottom: 20px; overflow: hidden; position: relative; }
.hero-hi .bird { width: 84px; height: 84px; flex: none; }
.hero-hi h2 { font-family: var(--font-head); font-weight: 500; font-size: 1.5rem; }
.hero-hi .hand { font-family: var(--font-hand); font-size: 1.5rem; color: var(--terracotta); }
.hero-hi p { color: var(--ink-soft); margin-top: 4px; }

/* myśl */
.spirit { background: linear-gradient(120deg, #fff, var(--mint) 130%); border: 1px solid var(--mint-deep); }
.spirit__h { display: flex; align-items: center; gap: 9px; font-family: var(--font-head); font-weight: 700; font-size: .9rem; color: var(--sage-deep); margin-bottom: 10px; }
.spirit__h svg { width: 18px; height: 18px; }
.spirit blockquote { font-family: var(--font-head); font-style: italic; font-size: 1.05rem; line-height: 1.45; color: var(--ink); }
.spirit cite { display: block; margin-top: 8px; font-size: .82rem; color: var(--muted); font-style: normal; }

/* ---------- Responsywność ---------- */
@media (max-width: 980px) {
  .pnl { grid-template-columns: 1fr; }
  .pnl-side { position: fixed; left: 0; top: 0; z-index: 60; width: 268px; transform: translateX(-100%); transition: transform .3s; }
  .pnl.nav-open .pnl-side { transform: none; box-shadow: var(--shadow-lg); }
  .pnl.nav-open::after { content:""; position: fixed; inset: 0; background: rgba(46,36,25,.4); z-index: 55; }
  .pnl-burger { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: var(--r-sm); border: 1px solid var(--line); }
  .pnl-burger svg { width: 20px; height: 20px; }
  .pcards { grid-template-columns: repeat(2, 1fr); }
  .kan { grid-template-columns: 1fr; }
  .pnl-top h1 { font-size: 1.1rem; }
  .pnl-user small { display: none; }
}
@media (max-width: 560px) {
  .pcards { grid-template-columns: 1fr; }
  .pnl-work { padding: 18px 16px 60px; }
  .ptable { font-size: .82rem; }
  .menu-grid { grid-template-columns: 1fr; }
  .hero-hi { flex-direction: column; text-align: center; }
}

/* ===================================================================
   Baza promptów (biblioteka promptów AI)
   =================================================================== */
.prompt-toolbar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.prompt-search { flex: 1 1 240px; position: relative; max-width: 360px; }
.prompt-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--muted); }
.prompt-search input { width: 100%; padding: 11px 14px 11px 40px; border: 1px solid var(--line); border-radius: 999px; font: inherit; background: #fff; }
.prompt-search input:focus { outline: none; border-color: var(--sage); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sage) 20%, transparent); }
.prompt-actions { display: flex; gap: 8px; }
.prompt-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.ptag { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-family: var(--font-head); font-weight: 600; font-size: .82rem; color: var(--ink-soft); transition: .15s; }
.ptag svg { width: 14px; height: 14px; }
.ptag:hover { border-color: var(--sage); color: var(--ink); }
.ptag.on { background: var(--sage-deep); color: #fff; border-color: var(--sage-deep); }
.prompt-meta { color: var(--muted); font-size: .82rem; margin-bottom: 14px; }
.prompt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; align-items: start; }
.prompt-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.prompt-card__h { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.prompt-card__h b { font-size: .96rem; font-family: var(--font-head); flex: 1; min-width: 0; }
.prompt-card__acts { display: inline-flex; gap: 4px; align-items: center; }
.prompt-card pre { font-family: var(--font-body); font-size: .85rem; line-height: 1.5; background: var(--cream); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px; white-space: pre-wrap; color: var(--ink); margin: 0; }
.prompt-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; flex: none; background: var(--sage-deep); }
.prompt-ic svg { width: 18px; height: 18px; }
.prompt-ic.t-chatgpt { background: #10a37f; }
.prompt-ic.t-gemini { background: linear-gradient(135deg, #4285F4, #9b72f2); }
.prompt-ic.t-imagen { background: linear-gradient(135deg, #ea4335, #fbbc05); }
.prompt-ic.t-grafika { background: linear-gradient(135deg, var(--honey), var(--terracotta)); }
.prompt-ic.t-news { background: var(--brown); }
.prompt-ic.t-strona { background: var(--sage-deep); }
.prompt-ic.t-social { background: #1877F2; }
.prompt-ic.t-rekrutacja { background: var(--terracotta); }
.prompt-ic.t-rodzice { background: var(--honey-deep); }
.prompt-ic.t-dydaktyka { background: #4A6FA5; }
.prompt-ic.t-dokumenty { background: var(--ink-soft); }
.prompt-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.prompt-chip { font-family: var(--font-head); font-weight: 600; font-size: .68rem; padding: 2px 9px; border-radius: 999px; background: var(--cream-2); color: var(--ink-soft); }
.prompt-chip.t-chatgpt { background: color-mix(in srgb, #10a37f 16%, #fff); color: #0b7a5e; }
.prompt-chip.t-gemini { background: color-mix(in srgb, #4285F4 16%, #fff); color: #3367d6; }
.prompt-chip.t-imagen { background: color-mix(in srgb, #ea4335 14%, #fff); color: #c5221f; }
.prompt-chip.t-grafika { background: color-mix(in srgb, var(--honey) 22%, #fff); color: var(--honey-deep); }
.prompt-chip.t-news { background: color-mix(in srgb, var(--brown) 14%, #fff); color: var(--brown); }
.prompt-chip.cat { background: var(--mint); color: var(--sage-deep); }
.pic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); border: 1px solid transparent; }
.pic:hover { background: var(--cream-2); color: var(--ink); }
.pic svg { width: 15px; height: 15px; }
.pic--del:hover { background: color-mix(in srgb, var(--terracotta) 14%, #fff); color: var(--terracotta-d); }
.prompt-copy { padding: 6px 11px; font-size: .8rem; }
.prompt-empty { text-align: center; color: var(--muted); padding: 40px; background: #fff; border: 1px dashed var(--line); border-radius: var(--r); }
@media (max-width: 720px) { .prompt-grid { grid-template-columns: 1fr; } }

/* ===================================================================
   Baza wiedzy
   =================================================================== */
.kb-cats { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.kb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; align-items: start; }
.kb-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 0; box-shadow: var(--shadow-sm); overflow: hidden; border-top: 4px solid var(--sage); }
.kb-card.c-pedagogika { border-top-color: var(--terracotta); }
.kb-card.c-obserwacja { border-top-color: var(--sage-deep); }
.kb-card.c-rodzice { border-top-color: var(--honey); }
.kb-card.c-rodo { border-top-color: var(--ink-soft); }
.kb-card.c-rekrutacja { border-top-color: var(--brown); }
.kb-card.c-zywienie { border-top-color: var(--honey-deep); }
.kb-card.c-kadra { border-top-color: #4A6FA5; }
.kb-card__h { padding: 16px 18px 0; }
.kb-card__h b { font-family: var(--font-head); font-size: 1.02rem; display: block; line-height: 1.25; }
.kb-cat { display: inline-block; font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--sage-deep); background: var(--mint); padding: 2px 9px; border-radius: 999px; margin-bottom: 8px; }
.kb-card__sum { padding: 8px 18px 0; color: var(--ink-soft); font-size: .9rem; }
.kb-points { padding: 12px 18px 4px; margin: 0; }
.kb-points li { position: relative; padding: 4px 0 4px 22px; font-size: .88rem; color: var(--ink); }
.kb-points li::before { content: ""; position: absolute; left: 4px; top: 12px; width: 7px; height: 7px; border-radius: 50%; background: var(--honey); }
.kb-body { padding: 0 18px; max-height: 0; overflow: hidden; transition: max-height .35s var(--ease-out); color: var(--ink-soft); font-size: .9rem; }
.kb-card.open .kb-body { max-height: 600px; padding: 8px 18px 4px; }
.kb-body p { margin-bottom: 10px; }
.kb-card__foot { padding: 10px 18px 16px; display: flex; gap: 8px; align-items: center; }
.kb-toggle { font-family: var(--font-head); font-weight: 600; font-size: .82rem; color: var(--terracotta); display: inline-flex; align-items: center; gap: 6px; }
.kb-toggle svg { width: 15px; height: 15px; transition: transform .3s; }
.kb-card.open .kb-toggle svg { transform: rotate(180deg); }
.kb-empty { text-align: center; color: var(--muted); padding: 40px; background: #fff; border: 1px dashed var(--line); border-radius: var(--r); }
@media (max-width: 720px) { .kb-grid { grid-template-columns: 1fr; } }


/* ===== Planner postow / Social media (port z przeciwnaduzyciom.pl) ===== */
.pl { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #fff; }
.pl-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.pl-nav { display: flex; align-items: center; gap: 6px; }
.pl-nav b { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; min-width: 150px; text-align: center; }
.pl-nav .iconbtn { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--navy-900); }
.pl-nav .iconbtn:hover { background: var(--cream); }
.pl-nav .iconbtn svg { width: 16px; height: 16px; }
.pl-today { font-size: .82rem; padding: 7px 13px; }
.pl-views { display: inline-flex; gap: 2px; background: var(--cream); border-radius: 8px; padding: 3px; }
.pl-views button { padding: 7px 14px; border-radius: 6px; font-family: var(--font-head); font-weight: 600; font-size: .82rem; color: var(--muted); }
.pl-views button.on { background: #fff; color: var(--navy-900); box-shadow: var(--shadow-sm); }
.pl-legend { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.pl-leg { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: .78rem; font-family: var(--font-head); font-weight: 600; color: var(--navy-900); }
.pl-leg.on { background: var(--navy-900); color: #fff; border-color: var(--navy-900); }
.pl-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.pl-bar .pbtn--primary { margin-left: 4px; }
.pl-cal { padding: 12px 14px 16px; }
.pl-wd { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 6px; }
.pl-wd span { font-family: var(--font-head); font-weight: 700; font-size: .72rem; text-transform: uppercase; color: var(--muted); text-align: center; letter-spacing: .04em; }
.pl-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.pl-day { min-height: 106px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 5px; background: #fff; display: flex; flex-direction: column; }
.pl-day.is-other { background: #fafbfe; }
.pl-day.is-other .pl-day__n { color: var(--line); }
.pl-day.is-today { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); }
.pl-day__h { display: flex; align-items: center; justify-content: space-between; }
.pl-day__n { font-family: var(--font-mono); font-size: .76rem; font-weight: 600; color: var(--navy-900); padding: 2px 5px; }
.pl-day.is-today .pl-day__n { background: var(--navy); color: #fff; border-radius: 6px; }
.pl-day__add { width: 20px; height: 20px; border-radius: 5px; color: var(--muted); font-size: 1.1rem; line-height: 1; opacity: 0; transition: opacity .15s; }
.pl-day:hover .pl-day__add { opacity: 1; }
.pl-day__add:hover { background: var(--navy); color: #fff; }
.pl-day__posts { display: flex; flex-direction: column; gap: 3px; margin-top: 3px; overflow: hidden; }
.pl-chip { display: flex; align-items: center; gap: 5px; padding: 3px 5px; border-radius: 5px; background: var(--cream); border-left: 3px solid var(--line); width: 100%; text-align: left; font-size: .68rem; line-height: 1.2; }
.pl-chip.s-sched { border-left-color: var(--navy); }
.pl-chip.s-draft { border-left-color: var(--muted); }
.pl-chip.s-pub { border-left-color: var(--up, #2faa46); }
.pl-chip:hover { background: color-mix(in srgb, var(--navy) 8%, #fff); }
.pl-chip__img { width: 22px; height: 22px; border-radius: 4px; background-size: cover; background-position: center; flex: none; }
.pl-chip__dots { display: inline-flex; gap: 2px; flex: none; }
.pl-chip__dots .pl-dot { width: 7px; height: 7px; }
.pl-chip__t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--navy-900); }
.pl-chip__t b { font-family: var(--font-mono); }
.pl-list { padding: 10px 14px 16px; }
.pl-listday { font-family: var(--font-head); font-weight: 700; font-size: .8rem; color: var(--muted); text-transform: capitalize; margin: 14px 0 8px; }
.pl-lrow { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); width: 100%; text-align: left; margin-bottom: 6px; }
.pl-lrow:hover { background: var(--cream); }
.pl-lrow__img { width: 44px; height: 44px; border-radius: 8px; background-size: cover; background-position: center; flex: none; }
.pl-lrow__img--none { display: grid; place-items: center; background: var(--cream-2, #eef1fb); gap: 3px; grid-auto-flow: column; }
.pl-lrow__b { flex: 1; min-width: 0; }
.pl-lrow__t { font-weight: 600; color: var(--navy-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-lrow__m { display: flex; align-items: center; gap: 6px; font-size: .76rem; color: var(--muted); margin-top: 3px; }
.pl-lrow__m b { font-family: var(--font-mono); }
.pl-stat { font-family: var(--font-head); font-weight: 600; font-size: .72rem; padding: 4px 10px; border-radius: 999px; flex: none; }
.pl-stat.s-sched { background: color-mix(in srgb, var(--navy) 10%, #fff); color: var(--navy); }
.pl-stat.s-draft { background: var(--cream); color: var(--muted); }
.pl-stat.s-pub { background: color-mix(in srgb, var(--up, #2faa46) 16%, #fff); color: #1c7c43; }

/* Post promowany jako reklama */
.pl-promote { background: var(--grad-navy); color: #fff; border-color: transparent; }
.pl-promote:hover { filter: brightness(1.06); background: var(--grad-navy); border-color: transparent; }
.pl-promote.is-done { background: var(--cream-2); color: var(--terracotta-d); border-color: var(--line); }
.pl-promote.is-done:hover { filter: none; background: var(--cream-2); }

/* Kreator postów — zakładki + karty podglądu (styl FB) */
.pl-tabs { display: flex; gap: 4px; margin: 2px 0 18px; border-bottom: 2px solid var(--line); }
.pl-tabs button { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; font-family: var(--font-head); font-weight: 700; color: var(--ink-soft); background: transparent; border: none; border-bottom: 3px solid transparent; cursor: pointer; position: relative; top: 2px; }
.pl-tabs button:hover { color: var(--ink); }
.pl-tabs button.on { color: var(--terracotta); border-bottom-color: var(--terracotta); }
.pl-tabs svg { width: 17px; height: 17px; flex: none; }
.pl-tabs .badge { font-size: .62rem; }

.kc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px; }
.kc-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--shadow-sm); overflow: hidden; display: flex; flex-direction: column; }
.kc-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px 10px; }
.kc-av { width: 40px; height: 40px; border-radius: 50%; background: var(--grad-navy); color: #fff; display: grid; place-items: center; font-family: var(--font-head); font-weight: 800; font-size: .82rem; flex: none; }
.kc-id { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.kc-id b { font-size: .88rem; color: var(--navy-900); }
.kc-id small { color: var(--muted); font-size: .72rem; }
.kc-cat { margin-left: auto; flex: none; font-size: .66rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, var(--honey) 24%, #fff); color: var(--honey-deep); }
.kc-text { padding: 0 14px 12px; font-size: .9rem; line-height: 1.5; color: var(--ink); white-space: pre-wrap; }
.kc-media { position: relative; aspect-ratio: 1 / 1; background: var(--grad-navy); display: grid; place-items: center; }
.kc-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.kc-ph { color: #fff; text-align: center; font-weight: 700; font-size: .92rem; opacity: .92; padding: 10px; }
.kc-ph small { font-family: var(--font-mono); font-weight: 400; opacity: .85; }
.kc-meta { display: flex; align-items: center; gap: 8px; padding: 10px 14px 0; flex-wrap: wrap; }
.kc-chans { display: inline-flex; gap: 4px; }
.kc-chans .pl-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.kc-actions { display: flex; gap: 8px; padding: 12px 14px; flex-wrap: wrap; }
.kc-actions--sec { padding-top: 0; }
.kc-actions .pbtn { flex: 1 1 auto; justify-content: center; }
.kc-fb { background: #1877F2; color: #fff; border-color: transparent; }
.kc-fb:hover { filter: brightness(1.05); background: #1877F2; border-color: transparent; }
.kc-actions .pbtn[disabled] { opacity: .45; cursor: default; }

/* Leady — kanban + karty + źródła */
.lead-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.lead-srcf { display: flex; gap: 6px; flex-wrap: wrap; }
.lead-srcf .ptag svg { width: 14px; height: 14px; flex: none; vertical-align: -2px; }
.lead-src { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; font-size: .82rem; }
.lead-src svg { width: 15px; height: 15px; flex: none; }
.kan { display: grid; grid-template-columns: repeat(5, minmax(180px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 6px; align-items: start; }
.kan-col { background: var(--cream-2); border-radius: var(--r-sm); padding: 8px; min-width: 0; }
.kan-col__h { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-family: var(--font-head); font-weight: 700; font-size: .82rem; padding: 6px 8px 10px; border-bottom: 2px solid; margin-bottom: 8px; }
.kan-col__c { background: #fff; color: var(--ink-soft); border-radius: 999px; padding: 1px 8px; font-size: .72rem; flex: none; }
.kan-col__body { display: flex; flex-direction: column; gap: 8px; min-height: 44px; border-radius: 10px; transition: background .15s; }
.kan-col__body.over { background: color-mix(in srgb, var(--honey) 25%, transparent); outline: 2px dashed var(--honey-deep); outline-offset: 2px; }
.lead-card { background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 10px 11px; box-shadow: var(--shadow-sm); cursor: grab; }
.lead-card.drag { opacity: .5; }
.lead-card__top { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 6px; }
.lead-loc { font-size: .68rem; font-weight: 700; color: var(--ink-soft); background: var(--cream-2); padding: 2px 7px; border-radius: 999px; flex: none; }
.lead-card__name { font-size: .9rem; color: var(--navy-900); margin-bottom: 3px; }
.lead-card__name small { color: var(--muted); font-weight: 500; }
.lead-card__topic { font-size: .82rem; font-weight: 600; color: var(--terracotta); margin-bottom: 3px; }
.lead-card__note { font-size: .76rem; color: var(--ink-soft); line-height: 1.4; }
.lead-card__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 7px; }
.lead-date { font-size: .72rem; color: var(--muted); }
.lead-grip { color: var(--ink-faint); font-size: .8rem; cursor: grab; }
.lead-stage { font-family: inherit; font-size: .8rem; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }

/* Budżet — KSeF */
.ksef { border-left: 4px solid #1c7c43; }
.ksef__h { display: flex; align-items: center; gap: 12px; }
.ksef__ic { width: 42px; height: 42px; border-radius: 12px; background: color-mix(in srgb, #1c7c43 14%, #fff); color: #1c7c43; display: grid; place-items: center; flex: none; }
.ksef__ic svg { width: 22px; height: 22px; }
.ksef__h small { color: var(--muted); font-size: .8rem; }
.ksef__row { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: .86rem; color: var(--ink-soft); }
.ksef-chk { width: 18px; height: 18px; }

/* Kreator — edycja posta (modal) + karuzela / wideo w karcie */
.kc-edit { background: var(--grad-navy); color: #fff; border-color: transparent; }
.kc-edit:hover { filter: brightness(1.06); background: var(--grad-navy); border-color: transparent; }
.kc-edited { color: var(--muted); font-size: .74rem; font-weight: 600; }
.kc-carousel .kc-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.kc-carousel .kc-slide.on { opacity: 1; }
.kc-tag { position: absolute; top: 8px; left: 8px; z-index: 2; background: rgba(20,22,61,.78); color: #fff; font-size: .7rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.kc-dots { position: absolute; bottom: 8px; left: 0; right: 0; z-index: 2; display: flex; justify-content: center; gap: 6px; }
.kc-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.55); border: none; cursor: pointer; padding: 0; }
.kc-dot.on { background: #fff; }
.kc-media--video .kc-play { position: absolute; inset: 0; margin: auto; width: 54px; height: 54px; border-radius: 50%; background: rgba(0,0,0,.5); color: #fff; display: grid; place-items: center; z-index: 2; }
.kc-media--video .kc-play svg { width: 26px; height: 26px; margin-left: 3px; }
.ke { display: flex; flex-direction: column; gap: 6px; }
.ke-lbl { font-family: var(--font-head); font-weight: 700; font-size: .82rem; color: var(--navy-900); margin-top: 8px; }
.ke-text, .ke-input { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit; color: var(--ink); resize: vertical; background: #fff; }
.ke-hint { font-size: .78rem; color: var(--muted); }
.ke-pool { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.ke-thumb { position: relative; aspect-ratio: 1 / 1; border-radius: 10px; background-size: cover; background-position: center; border: 2px solid transparent; cursor: pointer; padding: 0; }
.ke-thumb.on { border-color: var(--terracotta); box-shadow: 0 0 0 2px color-mix(in srgb, var(--terracotta) 30%, transparent); }
.ke-ord { position: absolute; top: 4px; left: 4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: var(--terracotta); color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center; }
.ke-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.lf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Centrum powiadomień o leadach — suwaki + kanały */
.tgl { position: relative; display: inline-block; width: 42px; height: 24px; flex: none; }
.tgl input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; }
.tgl-track { position: absolute; inset: 0; background: var(--line); border-radius: 999px; transition: background .2s; pointer-events: none; }
.tgl-track::before { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.tgl input:checked + .tgl-track { background: #1c7c43; }
.tgl input:checked + .tgl-track::before { transform: translateX(18px); }
.tgl input:focus-visible + .tgl-track { outline: 3px solid var(--navy); outline-offset: 2px; }
.notif-card { margin-bottom: 16px; }
.notif-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.notif-row { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--cream); cursor: pointer; }
.notif-row:hover { border-color: var(--cream-3); }
.notif-ic { width: 30px; height: 30px; display: grid; place-items: center; flex: none; }
.notif-ic svg { width: 22px; height: 22px; }
.notif-name { font-weight: 700; color: var(--navy-900); flex: 1; }

/* ===== a11y — focus, skip-link, kontrast (WCAG AA) ===== */
.skip-link { position: fixed; left: 10px; top: -64px; z-index: 2000; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 10px; font-family: var(--font-head); font-weight: 700; text-decoration: none; box-shadow: var(--shadow); transition: top .16s var(--ease-out); }
.skip-link:focus { top: 10px; }
:where(a, button, [role="button"], input, select, textarea, summary, [tabindex]):focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; border-radius: 6px; }
.pnl-side :where(a, button):focus-visible, .pnl-nav :where(a, button):focus-visible, .pl-tabs :where(button):focus-visible, .kc-fb:focus-visible, .pbtn--primary:focus-visible { outline-color: var(--honey); }
.pbadge.warn, .pbadge.paused { color: #8a5600; }
.pbadge.ok, .pbadge.active, .pbadge.present { color: #0e7a3d; }
.menu-meal b { color: var(--red-700); }
.sphere.zp { color: #9a4117; }
.sphere.se { color: #7c6212; }
.pl-day.is-other .pl-day__n { color: var(--muted); }

/* Asystent — podgląd propozycji + Analizy AI w plannerze */
.ai-prev { margin-top: 12px; background: var(--cream-2); border-radius: var(--r-sm); padding: 14px 16px; }
.ai-prev__loc { display: inline-block; font-size: .72rem; font-weight: 700; color: var(--terracotta-d); margin-bottom: 6px; letter-spacing: .02em; }
.ai-prev p { color: var(--ink); line-height: 1.6; margin: 0; }
.anz-list { display: flex; flex-direction: column; gap: 10px; }
.anz-rec { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; box-shadow: var(--shadow-sm); }
.anz-rec .pbadge { flex: none; margin-top: 2px; }
.anz-rec__b b { color: var(--navy-900); }
.anz-why { font-size: .86rem; color: var(--ink-soft); margin-top: 3px; }
.anz-act { font-size: .86rem; color: var(--terracotta-d); font-weight: 600; margin-top: 5px; }
.pl-promo { color: var(--terracotta-d); font-weight: 700; white-space: nowrap; }
.pl-chip.is-promo { outline: 2px solid color-mix(in srgb, var(--terracotta) 50%, transparent); outline-offset: -2px; }
.pl-help { margin-top: 16px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; padding: 16px 18px; }
.pl-help__h { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; color: var(--navy-900); }
.pl-help__h svg { width: 19px; height: 19px; color: var(--navy); }
.pl-help__b { display: none; margin-top: 14px; color: var(--ink); font-size: .9rem; line-height: 1.6; }
.pl-help.open .pl-help__b { display: block; }
.pl-help__b h4 { font-family: var(--font-head); font-size: .92rem; color: var(--navy-900); margin: 16px 0 6px; }
.pl-help__b ul { margin: 0 0 8px; padding-left: 2px; list-style: none; }
.pl-help__b li { margin-bottom: 8px; padding-left: 2px; }
.pl-help__b li .pl-dot { margin-right: 6px; }
.pl-help__b code { font-family: var(--font-mono); font-size: .82em; background: var(--cream); padding: 1px 5px; border-radius: 4px; }
.pl-help__note { background: color-mix(in srgb, var(--yellow) 14%, #fff); border-radius: var(--r-sm); padding: 10px 12px; font-size: .84rem; }
.pl-help__t { margin-top: 12px; font-family: var(--font-head); font-weight: 600; font-size: .84rem; color: var(--navy); }
.pl-help__t:hover { text-decoration: underline; }
.pl-modal { position: fixed; inset: 0; z-index: 300; display: none; align-items: center; justify-content: center; padding: 20px; }
.pl-modal.open { display: flex; }
.pl-modal__scrim { position: absolute; inset: 0; background: rgba(8,12,30,.5); backdrop-filter: blur(3px); }
.pl-modal__card { position: relative; background: #fff; border-radius: var(--r); box-shadow: var(--shadow-lg); width: 540px; max-width: 100%; max-height: 90vh; overflow-y: auto; padding: 20px; }
.pl-modal__h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.pl-modal__h b { font-family: var(--font-head); font-size: 1.1rem; }
.pl-modal__h .iconbtn { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); }
.pl-modal__h .iconbtn:hover { background: var(--cream); }
.pl-f { margin-bottom: 14px; }
.pl-f > label { display: flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 600; color: var(--navy-900); margin-bottom: 7px; }
.pl-f input, .pl-f textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--cream); font: inherit; }
.pl-f textarea { resize: vertical; }
.pl-row { display: flex; gap: 12px; } .pl-row .pl-f { flex: 1; }
.pl-chans { display: flex; gap: 8px; flex-wrap: wrap; }
.pl-chan { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-family: var(--font-head); font-weight: 600; font-size: .82rem; color: var(--navy-900); }
.pl-chan svg { width: 15px; height: 15px; }
.pl-chan.on { color: #fff; }
.pl-chan[data-c="fb"].on { background: #1877F2; border-color: #1877F2; }
.pl-chan[data-c="ig"].on { background: #dc2743; border-color: #dc2743; }
.pl-chan[data-c="li"].on { background: #0a66c2; border-color: #0a66c2; }
.pl-chan[data-c="x"].on { background: #111; border-color: #111; }
.pl-ai { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-head); font-weight: 600; font-size: .76rem; color: #8b3dff; border: 1px solid color-mix(in srgb, #8b3dff 30%, var(--line)); border-radius: 999px; padding: 4px 10px; }
.pl-ai:hover { background: color-mix(in srgb, #8b3dff 10%, #fff); }
.pl-ai svg { width: 13px; height: 13px; }
.pl-thumbs { display: flex; gap: 6px; flex-wrap: wrap; }
.pl-thumb { width: 54px; height: 54px; border-radius: 8px; border: 1px solid var(--line); background-size: cover; background-position: center; font-size: .62rem; color: var(--muted); display: grid; place-items: center; text-align: center; padding: 3px; }
.pl-thumb.on { outline: 2px solid var(--navy); outline-offset: 1px; }
.pl-thumb--img { color: transparent; }
.pl-seg { display: inline-flex; gap: 2px; background: var(--cream); border-radius: 8px; padding: 3px; }
.pl-seg button { padding: 7px 13px; border-radius: 6px; font-family: var(--font-head); font-weight: 600; font-size: .8rem; color: var(--navy-900); }
.pl-seg button.on { background: var(--navy-900); color: #fff; }
.pl-modal__foot { display: flex; align-items: center; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
@media (max-width: 900px) {
  .pl-day { min-height: 76px; }
  .pl-chip__t { display: none; }
  .pl-legend { margin-left: 0; width: 100%; }
}
