/*
 * panel.css — szata panelu dashboardów. Te same kolory i krój co szata PG dashboardów klientów
 * (`pg-dashboards/public/style.css`, blok `:root[data-theme="pg"]`), bez tamtejszego układu nagłówka, który jest spięty
 * z siatką dashboardu. Kolor spoza palety PG nie ma tu prawa stanąć — pilnuje tego
 * `test/front.test.js` (każdy kolor #RRGGBB z tego pliku musi być w bloku PG `style.css`).
 */

/*
 * Krój Manrope z własnego serwera (A17): pobranie z Google Fonts wysyłało Google adres IP każdego klienta.
 * Manrope — Copyright 2018 The Manrope Project Authors (https://github.com/sharanda/manrope), licencja SIL Open Font
 * License 1.1 (https://openfontlicense.org). Pliki: zestaw łaciński i łaciński rozszerzony (polskie litery), krój zmienny 400–800.
 */
@font-face {
  font-family: 'Manrope'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('manrope-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Manrope'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('manrope-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --navy: #191C62;
  --navy-2: #23266C;
  --violet: #935DDF;      /* PG „data" */
  --pink: #FD7FB2;        /* PG „create" */
  --pg-media: #EE492E;    /* PG „media" */

  --bg: #F1F1F7;
  --surface: #FFFFFF;
  --ink: #191C62;
  --ink-soft: #474981;
  --line: #D1D2E0;
  --line-soft: #E8E8F1;
  --row-hover: #F7F7FB;

  --accent-soft: #E8E6F8;
  --accent-hover: #DCD8F3;
  --bad: #C42B32;
  --bad-soft: #FDE6E6;
  --warn: #8A5F00;
  --warn-soft: #FFF4D3;
  --good: #12704F;
  --good-soft: #DDF2E8;

  --shadow: 0 1px 2px rgba(25, 28, 98, .04), 0 6px 18px rgba(25, 28, 98, .06);
  --radius: 14px;
  --radius-sm: 10px;
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* Animowane obwódki i poświaty („Zapytaj o wyniki", pomoc) — kolory PG przygaszone granatem (M.R., 25.10: „ciut
     ciemniejsza, żeby nie była zbyt oczojebna"). Każda nowa animowana obwódka / poświata bierze kolory stąd. */
  --glow-violet: color-mix(in srgb, var(--violet) 78%, var(--navy));
  --glow-pink: color-mix(in srgb, var(--pink) 70%, var(--navy));
  --glow-media: color-mix(in srgb, var(--pg-media) 70%, var(--navy));
  --glow-light: color-mix(in srgb, var(--surface) 62%, var(--violet));
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--font);
}
a { color: inherit; }
.muted { color: var(--ink-soft); }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.nowrap { white-space: nowrap; }

/* ------------------------------------------------------------------ układ: boczny panel + treść */

/* M.R., 2026-10-23: nawigacja w bocznym panelu po lewej, sekcje zarządzania jako jej pozycje. */
.app { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
/* Treść do 1680 px, od lewej przy menu (M.R., 24.10, wariant A „Szerzej"): na dużym monitorze lista i tabele nie
   kończą się w połowie ekranu; marginesy rosną z oknem. */
.content { padding: 32px clamp(36px, 2.6vw, 56px) 48px; max-width: 1680px; width: 100%; }

/*
 * Ekran wczytywania (`body.boot` w index.html, M.R., 28.10): do pierwszego `mount` bez bocznego panelu — panel.js
 * jeszcze nie wie, czy to zespół, klient, logowanie czy dashboard. Wskaźnik wchodzi dopiero po 0,4 s, więc szybkie
 * wczytanie nie miga niczym; po 8 s dochodzi zdanie, że trwa to dłużej (zimny start w chmurze). Miejsce na to zdanie
 * jest zajęte od początku — nic nie podskakuje, gdy się pojawi. Ruch ma tylko pasek, bo tylko tam coś się dzieje.
 */
.boot .side { display: none; }
.boot .app { grid-template-columns: minmax(0, 1fr); }
.boot-screen {
  position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; padding: 24px; text-align: center;
  animation: boot-in .45s cubic-bezier(.2, .7, .2, 1) .4s both;
}
.boot-mark { display: block; width: 34px; height: 40px; }
.boot-bar { position: relative; width: 136px; height: 3px; margin-top: 24px; border-radius: 3px; overflow: hidden; background: var(--line); }
.boot-bar::after {
  content: ''; position: absolute; inset: 0 auto 0 0; width: 44%; border-radius: inherit;
  background: linear-gradient(90deg, var(--glow-violet), var(--glow-pink), var(--glow-media));
  animation: boot-slide 1.4s cubic-bezier(.65, 0, .35, 1) infinite;
}
.boot-text { margin: 16px 0 0; font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--ink-soft); }
.boot-slow { margin: 6px 0 0; max-width: 32ch; font-size: 13px; color: var(--ink-soft); animation: boot-in .5s ease 8s both; }
@keyframes boot-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes boot-slide { from { transform: translateX(-100%); } to { transform: translateX(228%); } }
@keyframes boot-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .boot-screen, .boot-slow { animation-name: boot-fade; }
  .boot-bar::after { animation: none; width: 100%; }
}

.side {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 20px 14px 18px;
  background: var(--navy);
  color: #FFFFFF;
}
/* Nagłówek „Siatka danych" (M.R., 28.10): kropkowana siatka i wykres w tle, „Performance Group" u góry, tytuł na dole.
   Siatka i wykres to ozdoba — stoją; wykres rysuje się raz, przy wejściu na stronę (`.chart-in`, niżej). */
.side-brand {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  height: 168px;
  margin: -20px -14px 0;
  padding: 22px 24px;
  overflow: hidden;
  text-decoration: none;
  color: #FFFFFF;
  background: linear-gradient(180deg, var(--navy-2), var(--navy));
}
.side-brand::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .16) 1px, transparent 1.4px); background-size: 14px 14px;
  -webkit-mask-image: linear-gradient(200deg, var(--navy) 0%, transparent 70%); mask-image: linear-gradient(200deg, var(--navy) 0%, transparent 70%);
}
.side-brand:focus-visible { outline: 2px solid #FFFFFF; outline-offset: -4px; }
.side-chart { position: absolute; z-index: -1; right: -2px; top: 50px; width: 150px; height: 74px; pointer-events: none; }
.side-chart stop:first-child { stop-color: var(--violet); stop-opacity: .38; }
.side-chart stop:last-child { stop-color: var(--violet); stop-opacity: 0; }
.side-chart-area { fill: url(#side-chart-fill); }
.side-chart-line { fill: none; stroke: var(--glow-violet); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.side-chart-ring { fill: none; stroke: var(--glow-pink); stroke-width: 2; }
.side-chart-dot { fill: var(--pink); }

/* Wejście wykresu „Rysowanie" (M.R., 28.10, wybrane z 3 wersji na żywo): przy wejściu na stronę linia rysuje się od
   lewej, kropka wskakuje na końcu, pierścień raz się rozchodzi (`chartIntro` w panel.js; przy odświeżeniu nie gra).
   Stan końcowy = wykres jak stoi, więc zdjęcie klasy po animacji niczego nie przesuwa. */
.side-chart-ring, .side-chart-dot { transform-box: fill-box; transform-origin: center; }
.side-brand.chart-in .side-chart { animation: chart-draw 1.1s cubic-bezier(.45, 0, .2, 1) .1s both; }
.side-brand.chart-in .side-chart-dot { animation: chart-pop .35s cubic-bezier(.3, 1.6, .5, 1) 1.05s both; }
.side-brand.chart-in .side-chart-ring { animation: chart-ring .9s ease-out 1.15s both; }
@keyframes chart-draw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes chart-pop { from { transform: scale(0); } to { transform: none; } }
@keyframes chart-ring { 0% { transform: scale(.3); opacity: 0; } 45% { transform: scale(1.9); opacity: .85; } 100% { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .side-brand.chart-in .side-chart, .side-brand.chart-in .side-chart * { animation: none; }
}
.side-org {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .66);
}
.side-org img { display: block; width: 16px; height: auto; }
.side-name { font-size: 22px; font-weight: 800; line-height: 1.1; letter-spacing: -.015em; }

/* „Nowy dashboard" i dzwonek pod nagłówkiem (M.R., 28.10): najczęstsze działanie na wierzchu, oba po 42 px wysokości.
   Fiolet PG („data") z małą domieszką granatu, prawie płaski: z góry 84 %, na dole 76 % fioletu — biały napis ma kontrast
   ok. 5,2–5,7 : 1 (WCAG AA). Bez poświaty i mocnego połysku (M.R., 28.10: „za mocno błyszczy"). Biały przycisk odpada:
   biała jest wybrana pozycja menu; pomarańcz i róż z białym napisem nie mają 4,5 : 1. Bez ruchu. */
.side-actions { display: flex; gap: 8px; }
.side-link.side-cta {
  flex: 1; justify-content: center; gap: 9px; min-height: 42px; border-radius: 12px; font-weight: 800; color: #FFFFFF;
  background: linear-gradient(180deg, color-mix(in srgb, var(--violet) 84%, var(--navy)), color-mix(in srgb, var(--violet) 76%, var(--navy)));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 2px rgba(25, 28, 98, .35);
}
.side-link.side-cta .side-text { flex: none; }
/* Plus w jasnym kwadracie — znak działania, nie pozycji listy. */
.side-link.side-cta svg { width: 22px; height: 22px; padding: 3px; border-radius: 7px; background: rgba(255, 255, 255, .14); stroke-width: 2.4; }
.side-link.side-cta:hover {
  color: #FFFFFF;
  background: linear-gradient(180deg, color-mix(in srgb, var(--violet) 90%, var(--navy)), color-mix(in srgb, var(--violet) 82%, var(--navy)));
}
.side-link.side-cta[aria-current="page"] {
  color: #FFFFFF;
  background: linear-gradient(180deg, color-mix(in srgb, var(--violet) 84%, var(--navy)), color-mix(in srgb, var(--violet) 76%, var(--navy)));
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .7);
}
.side-link.side-bell--icon {
  position: relative; flex: none; width: 42px; min-height: 42px; padding: 0; justify-content: center; border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .06);
}
.side-bell--icon .side-text { display: none; }
.side-bell--icon .bell-count { position: absolute; top: -7px; right: -7px; min-width: 20px; padding: 1px 6px; text-align: center; box-shadow: 0 0 0 2px var(--navy); }

.side-group { display: flex; flex-direction: column; gap: 2px; }
.side-label {
  padding: 0 10px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .55);
}
.side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  color: rgba(255, 255, 255, .82);
}
.side-link svg { flex: none; width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side-link:hover { background: rgba(255, 255, 255, .08); color: #FFFFFF; }
.side-link[aria-current="page"] { background: #FFFFFF; color: var(--navy); }
.side-link:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 1px; }
.side-link .side-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Pozycja „w przygotowaniu" (Raporty miesięczne, M.R., 24.10): przygaszona, bez wejścia; po najechaniu dymek. */
.side-link--soon { color: rgba(255, 255, 255, .38); cursor: default; }
.side-link--soon:hover { background: rgba(255, 255, 255, .04); color: rgba(255, 255, 255, .5); }
/* Dymek przy pozycji menu (`soonTip` w panel.js) — biała karta ze strzałką do pozycji, poza przewijanym menu. */
.side-tip {
  position: fixed; z-index: 90; max-width: 240px; padding: 10px 14px; border-radius: 12px; pointer-events: none;
  background: var(--surface); color: var(--ink-soft); font-size: 13px; line-height: 1.4;
  box-shadow: 0 2px 4px rgba(25, 28, 98, .08), 0 12px 28px rgba(25, 28, 98, .22);
  animation: side-tip-in .14s ease-out;
}
.side-tip::before {
  content: ''; position: absolute; left: -5px; top: calc(50% - 5px); width: 10px; height: 10px;
  background: var(--surface); transform: rotate(45deg); border-radius: 2px;
}
.side-tip--below::before { left: 18px; top: -5px; }
.side-tip b { display: flex; align-items: center; gap: 7px; margin-bottom: 2px; color: var(--navy); font-size: 13px; font-weight: 800; }
.side-tip > span { display: block; }
.side-tip-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--violet); box-shadow: 0 0 0 3px var(--accent-soft); }
@keyframes side-tip-in { from { opacity: 0; transform: translateX(-4px); } to { opacity: 1; transform: none; } }
.side-tip--below { animation-name: side-tip-in-below; }
@keyframes side-tip-in-below { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .side-tip { animation: none; } }
.side-count {
  font-size: 12px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--navy-2);
  color: rgba(255, 255, 255, .85);
}
.side-link[aria-current="page"] .side-count { background: var(--accent-soft); color: var(--navy); }
/* Kropka stanu dashboardu: u klienta / roboczy / wpis z błędem. */
.dot { flex: none; width: 8px; height: 8px; border-radius: 50%; margin: 0 5px; background: var(--warn-soft); }
.dot--good { background: var(--good-soft); }
.dot--bad { background: var(--pg-media); }
.dot--off { background: var(--bad); box-shadow: 0 0 0 1px rgba(255, 255, 255, .55); }

.side-foot { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid var(--navy-2); font-size: 12px; color: rgba(255, 255, 255, .6); }
/* Administracja (Dostępy, Dziennik) przyklejona do dołu, tuż nad stopką. Bez niej stopkę spycha sama stopka. */
.side-group--admin { margin-top: auto; }
.side-group--admin + .side-foot { margin-top: 0; }

.side-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.side-top .side-brand { flex: 1; min-width: 0; }
.side-toggle, .side-topbell { display: none; }

@media (max-width: 860px) {
  /* minmax(0, …), nie samo 1fr: inaczej szeroka tabela rozpycha kolumnę i całą stronę na boki. */
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  /* U góry pasek: logo i „Menu"; menu wysuwa się pod nim i przewija, strona zostaje na miejscu. */
  /* Bez odstępu u góry: nagłówek zaczyna się przy krawędzi. Ujemny margines w górę w przewijanym menu ucinał „PERFORMANCE GROUP". */
  .side { position: sticky; top: 0; z-index: 30; height: auto; max-height: 100vh; gap: 14px; padding: 0 16px; }
  .side:not(.is-open) > :not(.side-top) { display: none; }
  .side.is-open { overflow-y: auto; padding-bottom: 18px; box-shadow: 0 12px 30px rgba(25, 28, 98, .35); }
  /* Otwarte menu zakrywa stronę — pływająca „Pomoc" zasłaniała w nim dół menu. */
  body:has(.side.is-open) .help-host { display: none; }
  /* Otwarte menu jest wyższe niż ekran: bez tego kolumna ściska swoje części (nagłówek do 32 px — ucięty) zamiast przewijać. */
  .side > * { flex-shrink: 0; }
  /* Mini-okładka (M.R., 24.10, wariant T1): ta sama okładka co na komputerze, niższa, obok dzwonek i przycisk menu.
   * Przyklejona do góry otwartego menu — przy przewijaniu dzwonek i „Zamknij" zostają pod ręką. */
  .side-top {
    position: sticky; top: 0; z-index: 2; overflow: hidden; margin: 0 -16px; padding: 18px 16px;
    background: linear-gradient(180deg, var(--navy-2), var(--navy));
  }
  /* Powiadomienia otwiera dzwonek w nagłówku — w menu na telefonie ta pozycja by się dublowała. */
  .side-group--main .side-bell, .side-actions .side-bell { display: none; }
  /* Na telefonie „Nowy dashboard" to wiersz listy, nie fioletowy blok na całą szerokość (M.R., 28.10: ciężki w otwartym
     menu) — jak pozostałe pozycje, z plusem w fioletowym kwadracie. W kreatorze biały jak każda wybrana pozycja. */
  .side-link.side-cta, .side-link.side-cta:hover { justify-content: flex-start; gap: 10px; min-height: 44px; padding: 8px 10px; font-weight: 700; background: none; box-shadow: none; }
  .side-link.side-cta:hover { background: rgba(255, 255, 255, .08); }
  /* Kwadrat 26 px na miejscu ikony 18 px: ujemny margines z obu stron — napis zaczyna się tam, gdzie w pozostałych wierszach. */
  .side-link.side-cta svg { width: 26px; height: 26px; margin: -4px; padding: 5px; border-radius: 8px; color: #FFFFFF;
    background: color-mix(in srgb, var(--violet) 80%, var(--navy)); }
  .side-link.side-cta[aria-current="page"] { background: #FFFFFF; color: var(--navy); box-shadow: none; }
  .side-brand { position: static; height: auto; margin: 0; padding: 0; overflow: visible; background: none; }
  .side-brand:focus-visible { outline-offset: 4px; border-radius: 6px; }
  /* Siatka i wykres na cały pasek (liczone od `.side-top`). Wykres to niski pas przy dolnej krawędzi na całą szerokość:
     pod tytułem nisko, rośnie w prawo i wychodzi spod przycisków — nie przecina ich w połowie (M.R., 28.10). Koniec linii
     poza krawędzią, bez kropki. */
  .side-brand::before { background-size: 12px 12px;
    -webkit-mask-image: linear-gradient(255deg, var(--navy) 0%, transparent 72%); mask-image: linear-gradient(255deg, var(--navy) 0%, transparent 72%); }
  .side-chart { top: auto; left: 0; right: auto; bottom: 0; width: 107%; height: 36px; }
  .side-chart-ring, .side-chart-dot { display: none; }
  .side-org { font-size: 9.5px; gap: 7px; white-space: nowrap; }
  .side-org img { width: 13px; }
  /* Na 320 px tytuł 19 px wchodził pod dzwonek — mniejszy krój na wąskim ekranie, od ~365 px pełne 19 px. */
  .side-name { margin-top: 8px; font-size: clamp(16px, 5.2vw, 19px); line-height: 1.15; white-space: nowrap; }
  .side-name br { display: none; }
  .side-toggle, .side-topbell {
    position: relative; flex: none; display: inline-grid; place-items: center; width: 42px; height: 42px; padding: 0;
    /* Tło nieprzezroczyste (ten sam odcień co dawne białe 10 % na granacie): wykres paska chowa się za przyciskiem, nie prześwituje. */
    border: 1px solid rgba(255, 255, 255, .18); border-radius: 12px; background: color-mix(in srgb, var(--navy) 88%, #FFFFFF); color: #FFFFFF; cursor: pointer;
  }
  .side-toggle[aria-expanded="true"], .side-topbell[aria-expanded="true"] { background: #FFFFFF; color: var(--navy); }
  .side-toggle:focus-visible, .side-topbell:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 2px; }
  /* Napisy „Menu" / „Zamknij" / „Powiadomienia" zostają dla czytnika ekranu, na ekranie sama ikona. */
  .side-toggle span, .side-topbell span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .side-toggle svg, .side-topbell svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; }
  .side-topbell.has-news::after { content: ''; position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--pg-media); box-shadow: 0 0 0 2px var(--navy); }
  .side-group--admin { margin-top: 0; }
  .side-link { min-height: 44px; }
  .content { padding: 20px 16px 40px; }
}

/* ------------------------------------------------------------------ nagłówek strony */

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { margin: 0; font-size: 30px; line-height: 1.15; font-weight: 800; letter-spacing: -.01em; }
.page-head p { margin: 4px 0 0; color: var(--ink-soft); }
/* Zakreślacz pod tytułem strony (M.R., 24.10, „Marker → Zakreślacz") zamiast trzech kresek: różowy pas lekko
   pochylony za dolną częścią liter, dokładnie na długość tytułu. */
.page-head h1 { position: relative; z-index: 0; display: inline-block; }
.page-head h1::before {
  /* Pas na linii bazowej (M.R., 24.10: „ciutkę niżej"): ok. 5 px nad nią, 7 px pod nią przy 30 px — zakrywa dół
     liter zamiast ich połowy, więc tytuł czyta się w całości, a pas dalej trzyma się liter. */
  content: ''; position: absolute; z-index: -1; left: -6px; right: -8px; bottom: -.02em; height: .40em; pointer-events: none;
  background: var(--pink); opacity: .42; border-radius: 6px 10px 8px 4px; transform: rotate(-1.2deg) skewX(-10deg);
}
.page-head > div:first-child > p { margin-top: 8px; }
.back { display: inline-block; margin-bottom: 8px; color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: 14px; }
.back:hover { color: var(--ink); }

/* ------------------------------------------------------------------ przyciski */

.btn {
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--navy);
  background: var(--navy);
  color: #FFFFFF;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn:hover { background: var(--navy-2); }
.btn:focus-visible, .icon:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.btn[disabled]:hover { background: var(--navy); }
.btn--ghost[disabled]:hover { background: transparent; }
.btn[disabled] { opacity: .5; cursor: default; }
.btn--ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn--ghost:hover { background: var(--accent-soft); }
.btn--danger { background: transparent; color: var(--bad); border-color: var(--line); }
.btn--danger:hover { background: var(--bad-soft); }
.btn--small { padding: 5px 12px; font-size: 13px; }
.btn--wide { width: 100%; justify-content: center; }
.link-btn {
  align-self: flex-start;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-soft);
  text-decoration: underline;
  cursor: pointer;
}
.link-btn:hover { color: var(--ink); }
.link-btn:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
/* Ikona na środku przycisku (M.R., 25.10: krzyżyk okna siedział za wysoko — svg stało jak litera w linii tekstu). */
.icon {
  font: inherit;
  display: inline-grid;
  place-items: center;
  padding: 0;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.icon:hover:not([disabled]) { background: var(--accent-soft); }
.icon[disabled] { opacity: .35; cursor: default; }

/* ------------------------------------------------------------------ karta i tabela */

.card {
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(25, 28, 98, .04), 0 8px 24px rgba(25, 28, 98, .07);
  padding: 20px;
  margin-bottom: 16px;
}
.card h2 { margin: 0 0 4px; font-size: 17px; font-weight: 800; }
.card > p.muted { margin: 0 0 14px; font-size: 14px; }

.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
/* Nagłówek tabeli panelu na delikatnym tle z zaokrąglonymi końcami (wariant D1). Tabele dashboardu klienta (`dv-…`) bez zmian. */
table:not([class*="dv-"]) > thead th { background: var(--row-hover); border-bottom: 0; }
table:not([class*="dv-"]) > thead tr:first-child > th:first-child { border-radius: 10px 0 0 10px; }
table:not([class*="dv-"]) > thead tr:first-child > th:last-child { border-radius: 0 10px 10px 0; }
td { padding: 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
tbody tr:hover { background: var(--row-hover); }
tbody tr:last-child td { border-bottom: 0; }
.row-link { font-weight: 700; text-decoration: none; }
.row-link:hover { text-decoration: underline; }
.cell-sub { display: block; color: var(--ink-soft); font-size: 13px; }

/* ------------------------------------------------------------------ znaczniki */

.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--ink);
  white-space: nowrap;
}
.tag--good { background: var(--good-soft); color: var(--good); }
.tag--warn { background: var(--warn-soft); color: var(--warn); }
.tag--bad { background: var(--bad-soft); color: var(--bad); }
/* Kropka stanu w plakietce (wariant D1): Aktywny / W przygotowaniu / błąd czyta się też bez rozróżniania kolorów tła. */
.tag--good::before, .tag--warn::before, .tag--bad::before {
  content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: currentColor; vertical-align: 1px;
}
.tag--off { background: var(--line-soft); color: var(--ink-soft); }
.src { display: block; white-space: nowrap; }
.src b { font-weight: 700; }

/* ------------------------------------------------------------------ komunikaty */

.notice { padding: 12px 16px; border-radius: var(--radius-sm); border: 1px solid color-mix(in srgb, var(--violet) 22%, transparent); background: var(--accent-soft); margin-bottom: 16px; font-size: 14px; }
/* „Jak chcesz zacząć?" w pierwszym kroku nowego dashboardu (M.R., 24.10). */
.b-starters-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; font-size: 14px; }
.b-starters-line .btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }
.start-choices { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.start-choices-h { margin: 0 0 8px; font-weight: 700; }
.start-choices-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 10px; }
.start-choice {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px; text-align: left; font: inherit; color: var(--ink); cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
}
.start-choice:hover { border-color: var(--navy); background: var(--accent-soft); }
.start-choice:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.start-choice b { display: block; font-size: 14px; }
.start-choice small { display: block; font-size: 12.5px; color: var(--ink-soft); line-height: 1.4; }
.start-choice-icon { flex: none; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--accent-soft); }
.start-choice-icon svg { width: 17px; height: 17px; stroke: var(--navy); fill: none; stroke-width: 2; }
.notice ul { margin: 6px 0 0; padding-left: 18px; }
.notice--bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 28%, transparent); }
.notice--good { background: var(--good-soft); border-color: color-mix(in srgb, var(--good) 28%, transparent); }
.notice--warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }

/* ------------------------------------------------------------------ formularz */

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
/* Na szerokim monitorze pola formularza dashboardu nie rozciągają się na cały ekran (M.R., 25.10: „Nazwa” miała 800 px). */
.dash-form .grid-2 { max-width: 1100px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field .label { font-size: 13px; font-weight: 700; }
.field .hint { font-size: 13px; color: var(--ink-soft); }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], select {
  font: inherit;
  font-size: 15px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  width: 100%;
}
input[readonly], input[disabled], select[disabled] { background: var(--row-hover); color: var(--ink-soft); }
.prefixed { display: flex; align-items: stretch; }
.prefixed span {
  display: flex; align-items: center; padding: 0 10px;
  border: 1px solid var(--line); border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  background: var(--row-hover); color: var(--ink-soft); font-size: 14px;
}
.prefixed input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px; }
.choice {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; background: var(--surface);
}
.choice:has(input:checked) { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); background: var(--accent-soft); }
.choice:has(input:disabled) { cursor: default; opacity: .7; }
.choice strong { display: block; }
.choice small { color: var(--ink-soft); font-size: 13px; }
.choice input { margin-top: 3px; accent-color: var(--navy); }
.choices + p.muted { margin: 12px 0 0; }

.tabs-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.tabs-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); }
.tabs-list li:last-child { border-bottom: 0; }
.tabs-list .pos { width: 22px; text-align: right; color: var(--ink-soft); font-size: 13px; }
.tabs-list .name { flex: 1; font-weight: 600; }
.tabs-list .name small { display: block; font-weight: 500; color: var(--ink-soft); }
.tabs-list .off .name { color: var(--ink-soft); }
.tabs-list input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--navy); }
.tabs-list .move { display: flex; gap: 4px; }

.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; cursor: pointer; background: var(--surface); }
.check:has(input:checked) { background: var(--accent-soft); border-color: var(--navy); }
.check input { accent-color: var(--navy); margin: 0; }

/* Wybór dashboardów przy osobie w Dostępach: skrót w wierszu, po „Wybierz” lista z wyszukiwarką. */
.picker { display: flex; flex-direction: column; gap: 8px; min-width: 220px; max-width: 320px; }
/* Rola w tabeli Dostępów: pełna nazwa („Administrator”), a nie ucięte „Administ…”. */
.cell-role select { min-width: 170px; }
/* Rola i obok mały wybór języka klienta (M.R., 24.10: „mniej miejsca") — jeden rząd, ta sama wysokość. */
.role-line { display: flex; align-items: center; gap: 6px; }
/* Wygląd jak lista roli obok: ta sama ramka, wysokość, strzałka i fiolet przy fokusie — para pól, nie obcy kafelek. */
.lang-pick-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 30px 0 11px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background-color: var(--surface);
  color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer; list-style: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%), linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%);
  background-position: calc(100% - 16px) 52%, calc(100% - 11px) 52%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.lang-pick-btn::-webkit-details-marker { display: none; }
.lang-pick-btn .flag { width: 20px; height: 14px; border-radius: 3px; }
.lang-pick-btn:hover { border-color: var(--ink-soft); }
.lang-pick[open] > .lang-pick-btn, .lang-pick-btn:focus-visible { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px var(--accent-soft); }
.lang-pick .page-more-menu { left: 0; right: auto; min-width: 240px; }
.lang-pick .page-more-item { align-items: center; }
.lang-pick .page-more-item > span { flex: 1; }
.lang-pick .page-more-item[aria-checked="true"] b { color: var(--navy); }
.lang-pick .page-more-item[aria-checked="true"]::after { content: "✓"; font-weight: 700; color: var(--violet); }
.lang-pick .page-more-item .flag { width: 20px; height: 14px; margin: 0; }
.lang-pick .flag rect { stroke: none; }
.lang-pick-head { display: block; padding: 6px 10px 4px; font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.lang-pick-note { display: block; padding: 6px 10px 4px; font-size: 12px; color: var(--ink-soft); }
/* „Dodaj osobę": e-mail, imię, rola, język na start (tylko klient), przycisk — jeden rząd; bez pola języka o kolumnę mniej. */
.add-row.add-row--access { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto; }
.add-row.add-row--access:has(> .field[hidden]) { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto; }
.add-row > .field[hidden] { display: none; }
.add-row > .btn { justify-content: center; }
@media (max-width: 760px) { .add-row.add-row--access, .add-row.add-row--access:has(> .field[hidden]) { grid-template-columns: minmax(0, 1fr); } }
.picker-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.picker-summary { font-size: 13px; }
.picker-search {
  font: inherit;
  font-size: 14px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  width: 100%;
}
.picker-search:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.picker-all { display: flex; align-items: center; gap: 8px; padding: 8px 10px; font-size: 13px; cursor: pointer; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.picker-all:hover { background: var(--row-hover); }
.picker-all > span { display: flex; flex-direction: column; }
.picker-all small { color: var(--ink-soft); }
.picker-all input { accent-color: var(--navy); margin: 0; }
.picker-list { list-style: none; margin: 0; padding: 4px 0; max-height: 220px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.picker-list label { display: flex; align-items: center; gap: 8px; padding: 6px 10px; font-size: 13px; cursor: pointer; }
.picker-list label:hover { background: var(--row-hover); }
.picker-list label small { margin-left: auto; color: var(--ink-soft); }
.picker-list input { accent-color: var(--navy); margin: 0; }
.picker-empty { padding: 8px 10px; font-size: 13px; color: var(--ink-soft); }

/* Krótki opis po najechaniu albo wejściu klawiaturą (rola, „Usuń” w Dostępach). Tekst z data-tip przez
   attr() — CSP nie wpuszcza stylów w atrybucie, ale treść z CSS-a jest dozwolona. visibility, a nie samo
   opacity: ukryta podpowiedź nie trafia do czytnika ekranu. */
.tip { position: relative; display: inline-block; }
/* Kółko „i" z opisem przy niejasnych polach (M.R., 24.10); kilka linii opisu — `white-space: pre-line`. */
.label-row { display: inline-flex; align-items: center; gap: 6px; }
.label-row > label, .label-row > .label { margin: 0; }
.info-tip { display: inline-flex; vertical-align: middle; cursor: help; border-radius: 50%; }
.info-tip-i { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid var(--ink-soft); color: var(--ink-soft); font-size: 10px; font-weight: 800; font-style: normal; line-height: 1; }
.info-tip:hover .info-tip-i, .info-tip:focus-visible .info-tip-i { border-color: var(--violet); color: var(--violet); }
.info-tip:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
/* Dymek kółka „i" jako element (dom.js `infoTip`): opcja = wiersz, nazwa opcji pogrubiona, odstęp między opcjami.
   Wygląd jak `.tip::after`; ukryty przez display: none — bez treści za krawędzią ekranu (przewijanie w bok na telefonie). */
.info-tip::after { display: none; }
/* Przy krawędzi okna (position: fixed, miejsce liczy `placeInfo` w dom.js) — przewijany panel (edytor wizualny) go nie ucina. */
.info-tip-box {
  display: none; position: fixed; top: var(--tip-y, 0); left: var(--tip-x, 0); z-index: 60;
  flex-direction: column; gap: 7px; width: max-content; max-width: 320px; padding: 10px 13px;
  border-radius: var(--radius-sm); background: var(--navy); color: #FFFFFF; box-shadow: 0 0 0 1px rgba(255, 255, 255, .28), var(--shadow);
  font-family: var(--font); font-size: 13px; font-weight: 500; line-height: 1.45; text-align: left; white-space: normal;
  pointer-events: none;
}
.info-tip-row b { font-weight: 800; }
.info-tip:hover .info-tip-box, .info-tip:focus-visible .info-tip-box { display: flex; animation: tip-in .12s ease .2s both; }
.info-tip.is-measuring .info-tip-box { display: flex; visibility: hidden; animation: none; }
@media (max-width: 420px) { .info-tip-box { max-width: min(280px, calc(100vw - 16px)); } }
.b-goal-mode { display: inline-flex; align-items: center; gap: 8px; }
/* Treść dymka dopiero przy pokazaniu: ukryty dymek z treścią zajmował miejsce za prawą krawędzią i na telefonie
   strona przewijała się w bok. Płynne pojawienie się — animacją, bo przejście nie działa na świeżym ::after. */
.tip::after {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 20;
  width: max-content;
  max-width: 260px;
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  background: var(--navy);
  color: #FFFFFF;
  /* Na przycisku dymek dziedziczyłby systemowy krój przycisku (Arial). */
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
  /* Jasna obwódka: granatowy dymek na granatowym pasku dashboardu zlewał się z nim (M.R., 25.10); na białym jej nie widać. */
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .28), var(--shadow);
  pointer-events: none;
}
/* Pływający dymek `[data-hint]` (dom.js `watchHints`) — wygląd jak `.tip::after`, położenie liczy skrypt. */
.float-tip {
  position: fixed; z-index: 1000; display: none; max-width: 280px; padding: 8px 11px;
  border-radius: var(--radius-sm); background: var(--navy); color: #FFFFFF; box-shadow: 0 0 0 1px rgba(255, 255, 255, .28), var(--shadow);
  font-family: var(--font); font-size: 13px; font-weight: 500; line-height: 1.4; text-align: left; pointer-events: none;
}
.float-tip.is-on { display: block; animation: tip-in .12s ease .2s both; }
.tip:hover::after, .tip:focus-visible::after, .tip:has(:focus-visible)::after { content: attr(data-tip); animation: tip-in .12s ease .2s both; }
@keyframes tip-in { from { opacity: 0; } to { opacity: 1; } }
/* Rozwinięta lista (rola, język na start…) — dymek znika, żeby jej nie zasłaniał. Osobne reguły: przeglądarka bez
   `:open` odrzuciłaby całą listę selektorów. */
.tip:has(select:focus:not(:focus-visible))::after, .tip:has([aria-expanded="true"])::after { content: none; }
.tip:has(select:open)::after { content: none; }
.tip--end::after { left: auto; right: 0; }
/* Przy krawędzi ekranu dymek w drugą stronę — klasy ustawia `watchTips` (dom.js) w chwili najechania. */
.tip.tip--to-left::after { left: auto; right: 0; }
.tip.tip--to-right::after { left: 0; right: auto; }
.tip.tip--up::after { top: auto; bottom: calc(100% + 6px); }
.tip::after { translate: var(--tip-shift, 0) 0; }
@media (max-width: 420px) { .tip::after { max-width: min(260px, calc(100vw - 16px)); } }
.field > .tip { display: block; }
.tip[data-tip=""]::after { display: none; }

.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 8px; }

.add-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; gap: 12px; align-items: end; }

/* ------------------------------------------------------------------ konta hasłowe w Dostępach */

.account { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.account-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.pw-chooser { display: flex; flex-direction: column; gap: 8px; min-width: 0; max-width: 240px; }
.pw-chooser .pw-own { width: 100%; min-width: 0; }
.pw-chooser .actions { margin-top: 0; }
.pw-chooser .notice { margin-bottom: 0; }

/* Tabela Dostępów: szeroka karta = tabela, wąska = kartka na osobę (e-mail i „Usuń” u góry, pod spodem
   pola z podpisem z data-label). Pyta o szerokość karty, nie okna — boczny pasek zabiera miejsce tylko
   na szerokim ekranie, więc ta sama szerokość okna daje różną szerokość tabeli. */
/* Lista dashboardów: kafelki-filtry, rodzaj, źródła z ikonami, akcje w wierszu. */
.list-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 10px; margin-bottom: 16px; }
/*
 * Kafle (M.R., 24.10, wariant D1): białe, bez paska z boku. Kafel-filtr (`--icon`) ma ikonkę w kolorowym kwadraciku,
 * wybrany jest granatowy. Kafel tylko z liczbą (`--static`) pokazuje stan kolorem liczby. `::after` zostaje wolne —
 * tam stoi dymek podpowiedzi (`.tip`, Rozliczenia).
 */
.list-stat {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px 16px; border: 1px solid transparent;
  border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); color: var(--ink); font: inherit; text-align: left; cursor: pointer;
}
.list-stat b { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.list-stat span { font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.list-stat:hover:not([disabled]) { border-color: var(--accent-hover); }
.list-stat[aria-pressed="true"] { border-color: var(--navy); background: var(--navy); color: #FFFFFF; }
.list-stat[aria-pressed="true"] span { color: rgba(255, 255, 255, .78); }
.list-stat[disabled] { opacity: .55; cursor: default; }
.list-stat--icon { display: grid; grid-template-columns: 40px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 14px; }
/* Ikonka zabiera 52 px: kafle-filtry szersze niż kafle z liczbą, inaczej „przygotowaniu" nie mieści się w kaflu (1024 px). */
.list-stats:has(> .list-stat--icon) { grid-template-columns: repeat(auto-fit, minmax(min(100%, 176px), 1fr)); }
/* Telefon: dwa kafle w rzędzie z mniejszą ikonką (jeden w rzędzie dawał pięć ekranów przewijania nad listą). */
@media (max-width: 600px) {
  /* Także kafle z samą liczbą (Oglądalność, Rozliczenia): w karcie na 375 px brakowało 1 px do dwóch kolumn
     i cztery liczby stały jedna pod drugą na pół ekranu (test 24.10). */
  .list-stats, .list-stats:has(> .list-stat--icon) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .list-stat--icon { grid-template-columns: 32px minmax(0, 1fr); column-gap: 10px; padding: 12px; }
  .list-stat--icon .list-stat-ic { width: 32px; height: 32px; border-radius: 10px; }
  .list-stat--icon .list-stat-ic svg { width: 17px; height: 17px; }
}
.list-stat--icon b, .list-stat--icon span:not(.list-stat-ic) { grid-column: 2; min-width: 0; }
.list-stat--icon b { font-size: 24px; line-height: 1; }
.list-stat--icon span:not(.list-stat-ic) { font-size: 12px; }
.list-stat-ic { grid-row: 1 / 3; grid-column: 1; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--navy); }
.list-stat-ic svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.list-stat--good .list-stat-ic { background: var(--good-soft); color: var(--good); }
.list-stat--warn .list-stat-ic { background: var(--warn-soft); color: var(--warn); }
.list-stat--bad .list-stat-ic { background: var(--bad-soft); color: var(--bad); }
.list-stat[aria-pressed="true"] .list-stat-ic { background: rgba(255, 255, 255, .14); color: #FFFFFF; }
.list-stat--static.list-stat--good b { color: var(--good); }
.list-stat--static.list-stat--warn b { color: var(--warn); }
.list-stat--static.list-stat--bad b { color: var(--bad); }
.kind { display: inline-block; white-space: nowrap; margin-top: 4px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--line-soft); color: var(--ink-soft); }
.kind--own { background: var(--accent-soft); color: var(--navy); }
/* Notka „liczby przykładowe" zamiast żółtego banera na każdej zakładce. */
.engine-note { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 6px 10px; border-radius: 8px; font-size: 13px; color: var(--warn); background: var(--warn-soft); }
.engine-note svg { flex: none; width: 16px; height: 16px; }
.engine-note span { flex: 1; }
.engine-note-x { border: 0; background: none; color: inherit; font-size: 18px; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.engine-note-x:hover { background: var(--surface); }
/* Etykiety dashboardu (pomysł 136): jedna spokojna linia pod rodzajem. */
.row-labels { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; margin-top: 4px; font-size: 12px; color: var(--ink-soft); }
/* Etykiety bez ramki (M.R., 25.10): ramka wcinała pola — Klient stoi równo pod Nazwą, Typ pod Adresem (kolumny jak .grid-2). */
.labels-box { border: 0; padding: 4px 0 0; margin: 0; min-width: 0; }
.labels-box legend { float: left; width: 100%; padding: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); }
.labels-grid { clear: both; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.src-list { display: flex; flex-direction: column; gap: 2px; }
.src-chips { display: flex; flex-wrap: wrap; gap: 4px; max-width: 240px; }
.src-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px 2px 6px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface); cursor: default; }
.src-chip svg { width: 13px; height: 13px; flex: none; }
.src-chip-n { color: var(--violet); font-size: 11px; }
.src-chip--pending { border-style: dashed; border-color: var(--warn); }
.src-chip--pending .src-chip-n { color: var(--warn); }
.src-pending { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
/* Długi napis („Nie mam jeszcze dostępu…") zawija się w karcie zamiast wypychać stronę w bok. */
.src-pending .check { white-space: normal; max-width: 100%; align-self: flex-start; border-radius: 12px; }
.src-list .src { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.cell-change { white-space: nowrap; font-size: 13px; }
.cell-change .cell-sub { font-size: 12px; white-space: normal; overflow-wrap: anywhere; max-width: 180px; }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; }
.row-action {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 9px;
  color: var(--ink); text-decoration: none; background: var(--surface);
}
.row-action span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.row-action svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.row-action:hover { border-color: var(--navy); background: var(--accent-soft); }
.row-action:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
@container (max-width: 760px) {
  .list-table .cell-actions { grid-column: 1 / -1; }
  .row-actions { justify-content: flex-start; flex-wrap: wrap; }
  .row-action { width: auto; padding: 0 10px; gap: 6px; }
  .row-action span { position: static; width: auto; height: auto; clip: auto; font-size: 13px; font-weight: 700; }
}

/* „Kanały i metryki": galeria elementów, karty platform, tabela porównania. */
.cat-elements { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 10px; margin-top: 8px; }
.cat-element { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); }
.cat-element > div { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.cat-element small { font-size: 12px; }
/* Galeria z podglądem (M.R., 23.10: „rodzaje elementów — zbuduj coś z mapą"): opis nad, element pod. */
.cat-elements--preview { grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 14px; }
.cat-elements--preview .cat-element { flex-direction: column; align-items: stretch; }
.cat-elements--preview .cat-element > .cat-element-head { flex-direction: row; gap: 12px; align-items: flex-start; }
.cat-element-head > div { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.cat-preview { pointer-events: none; padding: 8px; border-radius: var(--radius-sm); }
.cat-preview .dv-card { margin: 0; box-shadow: none; }
/* Wersje wyglądu w galerii (M.R., 24.10): strzałki z nazwą wersji i kolory PG pod podglądem. */
.cat-variant-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 8px 0; }
.cat-variant-nav { display: flex; align-items: center; gap: 6px; min-width: 0; }
.cat-variant-btn { min-width: 36px; padding: 4px 10px; font-size: 18px; line-height: 1; }
.cat-variant-label { font-size: 13px; min-width: 0; }
.swatch.swatch--small { width: 26px; height: 26px; padding: 3px; }
.cat-tools .list-tools { margin-bottom: 0; }
.cat-card .card-head h2 svg { width: 20px; height: 20px; }
.cat-facts { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 8px 16px; margin: 10px 0 12px; font-size: 14px; }
.cat-facts dt { font-size: 12px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-soft); padding-top: 2px; }
.cat-facts dd { margin: 0; }
@media (max-width: 720px) { .cat-facts { grid-template-columns: minmax(0, 1fr); gap: 2px; } .cat-facts dd { margin-bottom: 8px; } }
.cat-events { display: flex; flex-wrap: wrap; gap: 4px; }
.cat-events code { font-size: 12px; padding: 1px 7px; border-radius: 6px; background: var(--row-hover); border: 1px solid var(--line-soft); }
.cat-metrics summary { cursor: pointer; font-weight: 700; font-size: 14px; }
.cat-metrics[open] summary { margin-bottom: 8px; }
.cat-table td { vertical-align: top; }
.cat-tag { margin-left: 6px; font-size: 11px; }
.cat-uses { display: inline-flex; gap: 2px; flex-wrap: wrap; }
.cat-use { display: inline-flex; color: var(--violet); }
.cat-use svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.9; }
th.cat-p, td.cat-p { text-align: center; padding-left: 6px; padding-right: 6px; }
th.cat-p svg { width: 16px; height: 16px; }
td.cat-p { color: var(--line); font-weight: 800; }
td.cat-p.is-on { color: var(--good); }

/* Pasek zarządzania na otwartym dashboardzie (zespół PG z prawem zmiany). */
.dash-manage {
  position: sticky; top: 8px; z-index: 20; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; padding: 8px 10px;
  background: rgba(255, 255, 255, .95); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); backdrop-filter: blur(6px);
}
.dash-manage-name { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; min-width: 0; }
/* Źródła liczb pod paskiem zarządzania (A32) — jedna cicha linia, wyrównana z paskiem, zawija się na telefonie. */
.dash-calc-src { margin: -4px 20px 12px; font-size: 12.5px; overflow-wrap: anywhere; }
.dash-manage-tools { display: inline-flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.btn--alert { border-color: var(--pg-media); color: var(--bad); }
.dash-preview-as { width: auto; min-height: 32px; padding: 4px 30px 4px 10px; font-size: 13px; font-weight: 600; border-radius: 999px; }
@media (max-width: 600px) {
  .dash-manage-tools { margin-left: 0; width: 100%; }
  .dash-preview-as { flex: 1 1 100%; }
  /* Na telefonie same ikony (podpis zostaje dla czytnika ekranu i w dymku) — pasek w dwóch liniach zamiast pięciu. */
  .dash-manage-tools .btn--ghost:not(.btn--alert) { font-size: 0; gap: 0; min-width: 40px; min-height: 40px; justify-content: center; }
  .dash-manage-tools .btn--ghost:not(.btn--alert) svg { width: 18px; height: 18px; }
  .dash-manage-tools .btn:not(.btn--ghost) { flex: 1 1 auto; justify-content: center; }
}

/*
 * Pasek zarządzania — „cienki pasek z okruszkami" (M.R., 24.10, wybrany z trzech na żywym panelu): „← Panel / nazwa"
 * ze stanem, same ikony, „Podgląd jako" z okiem, „Edytuj" jako jedyny mocny przycisk; przykleja się u góry.
 * Każdy element z podpowiedzią `.tip` (wyskakuje w dół); licznik otwartych uwag jako kropka z liczbą.
 */
.dm .tip { display: inline-flex; }
/* Dymki paska: białe — granatowy dymek zlewał się z granatową okładką pod paskiem; tekst zawija się zawsze
   (przycisk „Edytuj" ma `nowrap` i dymek go dziedziczył — tekst wychodził poza tło, M.R., 24.10, zrzut). */
.dm .tip::after {
  white-space: normal; background: var(--surface); color: var(--ink); border: 1px solid var(--line-soft);
  box-shadow: 0 14px 30px -12px rgba(25, 28, 98, .4), 0 4px 10px -6px rgba(25, 28, 98, .2);
}
.dm-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--pg-media); color: #FFFFFF; font-size: 11px; font-weight: 800; line-height: 1; }
.dm-eye { position: relative; display: inline-flex; align-items: center; }
.dm-eye > svg { position: absolute; left: 11px; width: 16px; height: 16px; stroke: var(--violet); fill: none; stroke-width: 2; pointer-events: none; }
.dm-eye .dash-preview-as { padding-left: 34px; }

.dash-manage.dm { position: sticky; top: 8px; flex-wrap: nowrap; gap: 4px; padding: 5px 6px; border-color: var(--line-soft); border-radius: 16px; background: rgba(255, 255, 255, .82); backdrop-filter: blur(12px); }
/* Bez `overflow: hidden` na całym bloku nazwy — przycinałby dymek przy stanie; wielokropek ma sama nazwa. */
.dm .dash-manage-name { flex: 1 1 auto; gap: 8px; font-size: 14px; min-width: 0; }
.dm .dash-manage-name b { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm .dm-status { cursor: help; }
.dm .dm-sep { color: var(--line); font-weight: 400; }
.dm .dm-back { border-color: transparent; }
/* Narzędzia się nie ściskają (`flex: none`) — przy braku miejsca skraca się nazwa (wielokropek), a niżej zwijają się
   „Edytuj" i „Podgląd jako" do ikon. Wcześniej przy średniej szerokości „Edytuj" wypadał za krawędź (M.R., 24.10). */
.dm .dash-manage-tools { flex: none; flex-wrap: nowrap; gap: 2px; align-items: center; }
.dm .dash-manage-tools .btn--ghost { position: relative; width: 36px; min-height: 36px; padding: 0; justify-content: center; border-color: transparent; }
.dm .dash-manage-tools .btn--ghost:hover { background: var(--accent-soft); }
.dm .dash-manage-tools .btn--ghost .dm-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.dm .dash-manage-tools .btn--ghost .dm-badge { position: absolute; top: -2px; right: -2px; }
.dm .dash-manage-tools .btn--alert { color: var(--ink); }
.dm .dm-eye { margin: 0 4px 0 6px; }
.dm .dash-preview-as { min-height: 34px; border-color: var(--line-soft); }
.dm .dm-edit { margin-left: 4px; white-space: nowrap; }
/* Węższe okno (laptop, pół ekranu): „Edytuj" do samej ikony. */
@media (max-width: 1100px) {
  .dm .dm-edit .dm-label { display: none; }
  .dm .dm-edit { width: 38px; height: 38px; min-height: 38px; padding: 0; justify-content: center; flex: none; border-radius: 50%; }
}
/* Jeszcze węższe: „Podgląd jako" do samego oka, plakietka stanu znika (stan jest w Ustawieniach i na liście). */
@media (max-width: 960px) {
  .dm .dm-status, .dm .dash-manage-name .tag { display: none; }
  /* Sama ikona oka: chowamy tylko strzałkę i napis. Bez `appearance: none` — wyłączało stylowaną listę
     (`base-select`) i telefon pokazywał systemową, kwadratową z niebieskim podświetleniem (M.R., 24.10, zrzut). */
  /* `overflow: hidden` — niewidoczny tekst wybranej opcji („Ja (Administrator)", 131 px) wystawał za ekran i telefon
     przewijał stronę dashboardu w bok o ~11–19 px (test 24.10). */
  .dm .dm-eye .dash-preview-as { flex: none; width: 38px; padding: 0 0 0 34px; color: transparent; background-image: none; overflow: hidden; }
  /* Lista rozwija się w lewo od oka — przy prawej krawędzi wychodziłaby poza ekran. */
  .dm .dm-eye .dash-preview-as::picker(select) { position-area: bottom span-left; min-width: 200px; }
}
@media (max-width: 760px) {
  .dash-manage.dm { position: sticky; }
  .dm .dash-manage-tools { width: auto; margin-left: auto; }
  .dm .dm-back .dm-label, .dm .dm-sep { display: none; }
  /* `flex: none` — bez tego długa nazwa ściskała strzałkę do 21 px (trudno trafić palcem, test 24.10). */
  .dm .dm-back { flex: none; width: 36px; padding: 0; justify-content: center; }
}


/* Edycja na cały ekran (z otwartego dashboardu): bez menu panelu, cała szerokość. */
body.focus-edit .side { display: none; }
body.focus-edit .app { grid-template-columns: minmax(0, 1fr); }
body.focus-edit .content { max-width: none; padding-top: 16px; }
body.focus-edit .back, body.focus-edit .page-head, body.focus-edit .page-tabs { display: none; }
.focus-bar {
  position: sticky; top: 8px; z-index: 20; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; padding: 8px 12px;
  background: var(--navy); color: #FFFFFF; border-radius: var(--radius); box-shadow: var(--shadow);
}
.focus-bar .muted { color: rgba(255, 255, 255, .75); font-size: 13px; }
.focus-bar .link-btn { margin-left: auto; color: #FFFFFF; }
.focus-bar .btn--ghost { color: #FFFFFF; border-color: rgba(255, 255, 255, .4); }
.focus-bar .btn--ghost:hover { background: rgba(255, 255, 255, .12); }
/* Węższe okno (test 24.10): pasek miał ~100 px — podpowiedź o Ctrl+S wypychała link do drugiej linii, a przyklejony
   pasek zasłaniał edytor. Bez podpowiedzi (dotyk i tak nie ma Ctrl+S), nazwa z wielokropkiem; na telefonie bez
   przyklejania i bez nazwy (jest w okładce dashboardu pod spodem). */
.focus-bar b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1100px) { .focus-bar .muted { display: none; } }
@media (max-width: 600px) {
  .focus-bar { position: static; row-gap: 2px; }
  .focus-bar b { display: none; }
  .focus-bar .link-btn { margin-left: 4px; }
}

/* Lista dashboardów na wąskim ekranie: wiersz = kartka (nazwa i status u góry, reszta z podpisami). */
.list-card { container-type: inline-size; }
/*
 * Laptop 1280–1366 px (M.R., 24.10: „responsywnie wszędzie"): obok bocznego panelu tabela potrzebuje ~1000 px, karta
 * ma ~890 — kolumna przycisków chowała się za krawędzią. Ciaśniejsze komórki i nagłówki w dwóch liniach.
 */
@container (min-width: 761px) and (max-width: 1080px) {
  .list-table th, .list-table td { padding-left: 8px; padding-right: 8px; }
  .list-table th { white-space: normal; }
  .list-table .cell-change { white-space: normal; }
  .list-table .row-actions { gap: 2px; }
}
/* „klient jeszcze nie otworzył" w kolumnie Dostęp łamał się po jednym słowie. */
.list-table td[data-label="Dostęp"] { min-width: 112px; }
@container (max-width: 760px) {
  .list-table, .list-table tbody { display: block; }
  .list-table thead { display: none; }
  .list-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
  .list-table tr + tr { margin-top: 10px; }
  .list-table td { padding: 0; border: 0; }
  .list-table td[colspan] { grid-column: 1 / -1; }
  .list-table .cell-name { grid-row: 1; grid-column: 1; }
  .list-table .cell-status { grid-row: 1; grid-column: 2; }
  .list-table td[data-label] { grid-column: 1 / -1; display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 10px; align-items: baseline; font-size: 14px; }
  .list-table td[data-label]::before { content: attr(data-label); font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-soft); }
  /* Każda linia wartości w kolumnie wartości (druga linia nie wpada pod podpis), plakietki w swojej szerokości. */
  .list-table td[data-label] > * { grid-column: 2; justify-self: start; min-width: 0; }
  .list-table .src { white-space: normal; overflow-wrap: anywhere; }
  /* Zaznaczenie do zmian hurtem: pole w lewym górnym rogu kartki, zaznaczona kartka cała w kolorze. */
  .list-table tr { grid-template-columns: auto minmax(0, 1fr) auto; }
  .list-table .cell-pick { grid-row: 1; grid-column: 1; width: auto; padding-top: 2px; }
  /* Nazwa na całą szerokość kartki, znaczniki stanu pod nią — obok nazwy ściskały ją do kilku liter. */
  .list-table .cell-name { grid-column: 2 / -1; }
  .list-table .cell-status { grid-row: 2; grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-start; }
  .list-table .status-stack { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .list-table tr.is-picked { background: var(--accent-soft); border-color: var(--navy); }
  .list-table tr.is-picked td { background: transparent; }
}
.access-card { container-type: inline-size; }
/* Bez przewijania w bok: tabela mieści się do progu niżej, a przewijany pojemnik ucinałby podpowiedzi. */
.access-card .table-scroll { overflow: visible; }
.cell-email span { white-space: nowrap; }
/* Dostępy (M.R., 24.10): osoba = jeden wiersz — inicjały i e-mail, rzadsze akcje w „⋯". */
.acc-who { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.acc-av {
  flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent-soft); color: var(--navy); font-size: 12px; font-weight: 800; letter-spacing: .02em;
}
.acc-av--pg { background: var(--navy); color: #FFFFFF; }
/* Imię do powitania pod mailem (M.R., 27.10): klik = okienko; puste — „Dodaj imię" przygaszone. */
.acc-id { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-width: 0; }
.acc-name { padding: 0; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; text-align: left; }
.acc-name--empty { font-weight: 500; color: var(--ink-soft); }
.acc-name:hover { color: var(--violet); text-decoration: underline; text-underline-offset: 3px; }
.acc-name:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; border-radius: 4px; }
@media (max-width: 720px), (pointer: coarse) { .acc-name { min-height: 40px; } }
.access-table .cell-more { width: 1%; text-align: right; }
.acc-more > summary { min-width: 38px; justify-content: center; font-size: 18px; line-height: 1; letter-spacing: .05em; }
.acc-more .page-more-menu { text-align: left; }
.page-more-item--danger b { color: var(--bad); }
.page-more-item--danger:hover { background: var(--bad-soft); }

/* „Co może każda rola" (M.R., 25.10): zwinięta karta nad listą osób; w środku karta na rolę — może (ptaszek),
   akceptacja (tarcza), nie może (krzyżyk, przygaszone, za kreską). Zdania z serwera (`roleGuide`). */
details.role-guide:not(.as-card) > summary { align-items: flex-start; font-weight: 400; }
details.role-guide:not(.as-card) > summary::before { margin-top: 9px; }
details.role-guide > summary > div { flex: 1; min-width: 0; }
details.role-guide > summary h2 { margin: 0 0 4px; }
details.role-guide > summary p { margin: 0; font-size: 14px; }
details.role-guide[open] > summary { margin-bottom: 16px; }
.rg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px; }
.rg-role {
  display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 14px 14px 16px;
  border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: var(--surface);
}
.rg-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.rg-head h3 { margin: 0 0 2px; font-size: 15px; font-weight: 800; }
.rg-head small { display: block; color: var(--ink-soft); font-size: 12px; line-height: 1.4; }
.rg-count { flex: none; white-space: nowrap; }
.rg-login {
  display: flex; align-items: flex-start; gap: 6px; margin: 0; padding-bottom: 10px; border-bottom: 1px solid var(--line-soft);
  color: var(--ink-soft); font-size: 12px; line-height: 1.4;
}
.rg-login svg, .rg-item svg, .rg-admin svg { flex: none; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rg-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.rg-item { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; line-height: 1.45; }
.rg-item svg { margin-top: 2px; }
.rg-item--yes svg { color: var(--good); stroke-width: 2.4; }
.rg-item--note svg { color: var(--violet); }
.rg-item--no { color: var(--ink-soft); }
/* Pierwsze „nie może" oddzielone kreską od tego, co rola może. */
.rg-item:not(.rg-item--no) + .rg-item--no { margin-top: 2px; padding-top: 10px; border-top: 1px dashed var(--line); }
.rg-admin { display: flex; align-items: flex-start; gap: 8px; margin: 14px 0 0; color: var(--ink-soft); font-size: 13px; line-height: 1.45; }
.rg-admin svg, .rg-login svg { margin-top: 1px; }
.rg-admin b { color: var(--ink); }

/* Kartki dopiero na wąskiej karcie (telefon, tablet) — na laptopie tabela, wcześniej kartki zaczynały się już od 1040 px. */
@container (max-width: 760px) {
  .access-table, .access-table tbody { display: block; }
  .access-table thead { display: none; }
  .access-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px 16px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
  }
  .access-table tr + tr { margin-top: 12px; }
  .access-table tbody tr:hover { background: transparent; }
  .access-table td { padding: 0; border: 0; }
  .access-table td[colspan] { grid-column: 1 / -1; }
  /* Wprost do pierwszego wiersza: bez tego siatka stawia „Usuń” w pierwszym wolnym miejscu, czyli na dole. */
  .access-table .cell-email { grid-row: 1; grid-column: 1; align-self: center; font-weight: 700; }
  .access-table .cell-more { grid-row: 1; grid-column: 2; width: auto; }
  /* baseline: podpis stoi w linii z pierwszym wierszem pola — tekstem w liście, skrótem wyboru, statusem konta. */
  .access-table td[data-label] {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 12px;
    align-items: baseline;
  }
  .access-table td[data-label]::before {
    content: attr(data-label);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--ink-soft);
  }
  /* Rola z kwadracikiem języka w kolumnie pól (bez tego trafiały pod podpis „Rola”). */
  .access-table .cell-role .role-line { justify-self: start; grid-column: 2; }
}

@container (max-width: 480px) {
  .access-table td[data-label] { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .access-table .cell-role .role-line { justify-self: stretch; grid-column: 1; }
  .access-table .role-line > .tip { flex: 1; }
  .access-table .role-line > .tip select { width: 100%; }
  .access-table .cell-role select { min-width: 0; }
  .access-table .picker, .access-table .pw-chooser { min-width: 0; max-width: none; }
  .cell-email span { white-space: normal; overflow-wrap: anywhere; }
}

/* Hasło pokazane raz: duże, czytelne do przepisania, z przyciskiem „Kopiuj". */
.secret { padding: 16px 18px; border-radius: var(--radius-sm); border: 1px solid color-mix(in srgb, var(--good) 28%, transparent); background: var(--good-soft); margin-bottom: 16px; font-size: 14px; }
.secret p { margin: 8px 0 0; }
.secret > .btn { margin-top: 12px; }
.secret-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
/* Wiadomość z linkiem do ustawienia hasła — do skopiowania, długi link łamie się zamiast wypychać stronę w bok. */
.secret-message { margin: 10px 0 0; padding: 10px 14px; border-radius: var(--radius-sm); border: 1px dashed var(--good); background: var(--surface); color: var(--ink); font-family: inherit; font-size: 13px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; user-select: all; }
.secret-value {
  font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .08em;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--good);
  background: var(--surface);
  color: var(--ink);
  user-select: all;
}

/* ------------------------------------------------------------------ logowanie i strona klienta */

/* Bez bocznego panelu, na cały ekran (logowanie, „Twoje dashboardy"): granat z marką po lewej, treść po prawej. */
.bare .app { grid-template-columns: minmax(0, 1fr); }
.bare .side { display: none; }
.bare .content { max-width: none; padding: 0; }
.bare-wrap { position: relative; display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); min-height: 100vh; }

/* PL | EN w prawym górnym rogu — na komputerze nad formularzem, na telefonie w granatowej belce. */
.bare-lang {
  position: absolute;
  top: 24px;
  right: 32px;
  z-index: 1;
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}
.bare-lang button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  min-width: 38px;
  padding: 4px 10px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--ink-soft);
  cursor: pointer;
}
.bare-lang button:hover { color: var(--ink); background: var(--accent-soft); }
.bare-lang button[aria-pressed="true"] { background: var(--navy); color: #FFFFFF; cursor: default; }
.bare-lang button:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }

/* Flagi przy PL | EN (M.R., 23.10: flaga + skrót). Rysunek SVG, nie emoji — Windows emoji flag nie pokazuje.
   Barwy flag to drugi wyjątek od palety PG; test wpuszcza je wyłącznie w regułach `.flag--pl` / `.flag--en`. */
.flag { flex: none; width: 18px; height: 12px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(25, 28, 98, .18); }
.flag--pl .f-white { fill: #FFFFFF; }
.flag--pl .f-red { fill: #DC143C; }
.flag--en .f-blue { fill: #012169; }
.flag--en .f-white { stroke: #FFFFFF; }
.flag--en .f-red { stroke: #C8102E; }

/* 16 px w polach: przy mniejszej czcionce Safari na iPhonie przybliża stronę po dotknięciu pola. */
.bare input { font-size: 16px; }

.bare-brand {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  padding: 40px 48px 44px;
  background: var(--navy);
  color: #FFFFFF;
}
.bare-logo { display: block; max-width: 100%; height: auto; }
.bare-claim { position: relative; max-width: 440px; }
.bare-kicker { margin: 0 0 12px; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--pg-media); }
.bare-lead { margin: 0; font-size: clamp(30px, 3.4vw, 46px); line-height: 1.12; font-weight: 800; letter-spacing: -.02em; }
/* Znak PG w tle, przycięty krawędzią — sama faktura, nie treść. */
.bare-mark { position: absolute; right: -90px; bottom: -70px; width: 420px; height: auto; opacity: .07; pointer-events: none; }

.bare-body { display: flex; align-items: center; justify-content: center; padding: 48px 32px; }
.bare-inner { width: 100%; max-width: 420px; }
.bare-body h1 { margin: 0 0 6px; font-size: 32px; font-weight: 800; letter-spacing: -.02em; }
.bare-inner > p.muted { margin: 0 0 28px; font-size: 16px; overflow-wrap: anywhere; }
.bare-inner > .btn { margin-top: 4px; }

/* Telefon (M.R., 23.10): granatowa góra z marką, a pod nią biały arkusz z formularzem, który na granat
   nachodzi i wypełnia ekran do dołu — bez pustej połowy pod formularzem. */
@media (max-width: 860px) {
  .bare-wrap { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; min-height: 100vh; min-height: 100dvh; background: var(--navy); }
  .bare-brand { justify-content: flex-start; gap: 22px; padding: 20px 16px 52px; }
  .bare-logo { width: 154px; min-width: 0; }
  .bare-kicker { margin-bottom: 8px; font-size: 12px; }
  .bare-lead { font-size: 27px; }
  .bare-mark { right: -70px; bottom: -60px; width: 250px; }

  /* PL | EN na granacie: lekki biały tekst zamiast białej pigułki. */
  .bare-lang { top: 18px; right: 12px; padding: 0; border: 0; background: none; }
  .bare-lang button { color: var(--accent-soft); padding: 6px 8px; }
  .bare-lang button:hover { color: #FFFFFF; background: var(--navy-2); }
  .bare-lang button[aria-pressed="true"] { background: none; color: #FFFFFF; font-weight: 800; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }

  .bare-body {
    position: relative;
    z-index: 1;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    margin-top: -24px;
    padding: 28px 16px 20px;
    border-radius: 20px 20px 0 0;
    background: var(--surface);
  }
  .bare-inner { display: flex; flex: 1; flex-direction: column; max-width: none; }
  .bare-body h1 { font-size: 26px; }
  .bare-inner > p.muted { margin-bottom: 22px; font-size: 15px; }
  .bare .login-part input, .bare .login-part .btn { min-height: 48px; }
  /* Linia dla zespołu PG na dole arkusza: arkusz wypełniony od góry do dołu. */
  .bare-inner .login-pg { margin-top: auto; padding-top: 16px; }
  .login-part { margin-bottom: 28px; }
}

.login-part { display: flex; flex-direction: column; gap: 14px; }
.login-part .notice { margin-bottom: 0; }
.login-part .btn { margin-top: 4px; }
/* Pusty pojemnik na błąd nie dokłada odstępu w kolumnie. */
.login-part > div:empty { display: none; }
.field-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.field-head .link-btn { font-size: 13px; }
/* „Pokaż" siedzi w polu hasła, po prawej; pole zostawia mu miejsce. */
.password { position: relative; }
.password input { padding-right: 72px; }
.reveal {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 8px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--ink-soft);
  cursor: pointer;
}
.reveal:hover { color: var(--ink); background: var(--accent-soft); }
.reveal:focus-visible { outline: 2px solid var(--violet); outline-offset: 1px; }
.login-pg { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--line-soft); font-size: 14px; }
.login-pg a, .login-pg .link-btn { font-size: inherit; font-weight: 700; color: var(--navy); text-decoration: underline; }
.login-pg a:hover, .login-pg .link-btn:hover { color: var(--violet); }
.login-pg + div .notice { margin: 12px 0 0; }

/* ------------------------------------------------------------------ logowanie i strony bez panelu: wygląd „Panorama" */
/*
 * M.R., 28.10: wybrany z trzech wersji na żywo i dopracowany. Ten sam wygląd ma każda strona `bareCard` (logowanie,
 * dashboard klienta przed policzeniem) i strona 404 (`blad.js`). Po lewej granat z poświatą, logo u góry, napis na
 * środku wysokości, stopka na dole; po prawej biała karta. Na telefonie granat to belka, karta — biały arkusz.
 */

/* Formularz logowania: ikona w polu, oko zamiast „Pokaż", Caps Lock, przycisk ze strzałką i kółkiem przy logowaniu. */
.bare-wrap .login-input { position: relative; }
.bare-wrap .field-head { align-items: center; }
.bare-wrap .login-input > svg {
  position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; pointer-events: none;
  fill: none; stroke: var(--ink-soft); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: stroke .15s;
}
.bare-wrap .login-input:focus-within > svg { stroke: var(--violet); }
.bare-wrap .login-part input { min-height: 50px; padding-left: 44px; border-radius: 12px; transition: border-color .15s, box-shadow .15s; }
.bare-wrap .login-part input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px color-mix(in srgb, var(--violet) 16%, transparent); }
.bare-wrap .password input { padding-right: 52px; }
.bare-wrap .reveal.icon { right: 7px; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--ink-soft); }
.bare-wrap .reveal.icon svg { width: 19px; height: 19px; stroke-width: 1.8; }
.bare-wrap .reveal.icon:hover { color: var(--ink); background: var(--accent-soft); }
.bare-wrap .reveal[aria-pressed="true"] { color: var(--violet); }
.login-caps { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; font-size: 13px; font-weight: 700; color: var(--warn); }
.login-caps[hidden] { display: none; }
.login-caps svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bare-wrap .login-part .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; font-size: 15px;
  transition: transform .15s, box-shadow .15s;
}
.bare-wrap .login-part .btn svg { width: 18px; height: 18px; transition: transform .15s; }
.bare-wrap .login-part .btn:hover:not([disabled]) { transform: translateY(-1px); box-shadow: 0 12px 24px -12px color-mix(in srgb, var(--navy) 80%, transparent); }
.bare-wrap .login-part .btn:hover:not([disabled]) svg { transform: translateX(3px); }
.login-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--surface) 35%, transparent); border-top-color: var(--surface); animation: login-spin .8s linear infinite; }
@keyframes login-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .bare-wrap .login-part .btn, .bare-wrap .login-part .btn svg { transition: none; }
  .bare-wrap .login-part .btn:hover:not([disabled]), .bare-wrap .login-part .btn:hover:not([disabled]) svg { transform: none; }
}
/* Wejście karty tylko przy otwarciu strony (nie przy zmianie języka). */
.bare-wrap.is-intro .bare-inner { animation: login-rise .55s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes login-rise { from { opacity: 0; transform: translateY(18px); } }
@media (prefers-reduced-motion: reduce) { .bare-wrap.is-intro .bare-inner { animation: none; } }

/*
 * Poświata (M.R., 28.10: „podświetlenia wyglądają źle"): dwa światła w stałych wymiarach (nie w % panelu — tam
 * rozciągały się w słup i plamy): fiolet z prawego górnego rogu i ślad różu z lewego dolnego, bez pomarańczu (na
 * granacie brązowieje). Kilka przystanków na spadku — bez prążków na ciemnym tle.
 */
/* Ta sama poświata na granacie strony klienta (`.client-head`) — jedno źródło, logowanie i strona po nim się nie rozjeżdżają. */
:root {
  --scene-glow:
    radial-gradient(ellipse clamp(420px, 62vw, 1200px) clamp(360px, 70vh, 900px) at 100% 0%,
      color-mix(in srgb, var(--violet) 46%, transparent) 0%, color-mix(in srgb, var(--violet) 26%, transparent) 30%,
      color-mix(in srgb, var(--violet) 9%, transparent) 60%, transparent 85%),
    radial-gradient(ellipse clamp(320px, 40vw, 760px) clamp(260px, 45vh, 560px) at 0% 100%,
      color-mix(in srgb, var(--pink) 15%, transparent) 0%, color-mix(in srgb, var(--pink) 6%, transparent) 45%, transparent 80%);
  /* Telefon: pas jest niski — to samo światło co na komputerze zalewało go całego (M.R., 28.10: „ciut za jasne"). */
  --scene-glow-phone: radial-gradient(ellipse min(80vw, 440px) 240px at 100% 0%,
    color-mix(in srgb, var(--violet) 30%, transparent) 0%, color-mix(in srgb, var(--violet) 12%, transparent) 45%, transparent 85%);
}
.bare-wrap .bare-brand {
  background-color: var(--navy);
  background-image: var(--scene-glow);
  background-size: 100% 100%;
  background-position: 0 0;
  background-repeat: no-repeat;
}
/* Znak PG w rogu — sama faktura, przycięty krawędzią; na telefonie go nie ma (wchodził pod PL | EN). */
.bare-wrap .bare-mark { right: -4%; bottom: -10%; width: clamp(300px, 30vw, 560px); opacity: .055; }
.bare-wrap .bare-kicker { margin-bottom: 16px; color: var(--pink); }
/* Dwie linie zamiast czterech: kolumna szersza, linie wyrównane (`balance`), „w" nie zostaje samo (twarda spacja w i18n). */
.bare-wrap .bare-lead { max-width: 13em; font-size: clamp(34px, 3.3vw, 58px); line-height: 1.08; letter-spacing: -.025em; text-wrap: balance; }
/* Stopka: na komputerze na dole granatu (bez znaku — logo stoi u góry), na telefonie na dole arkusza ze znakiem PG. */
.bare-foot {
  display: flex; align-items: center; gap: 8px; margin: 0; padding: 0;
  font-size: 13px; font-weight: 600; color: color-mix(in srgb, var(--surface) 62%, var(--navy));
}
.bare-foot img { display: block; flex: none; width: 14px; height: auto; }
.bare-foot--sheet { display: none; }
/* Logo u góry, stopka u dołu, napis z punktami na środku wysokości — nie przyklejony do dołu. */
@media (min-width: 861px) {
  .bare-wrap .bare-brand {
    display: grid; grid-template-rows: auto 1fr auto; gap: 40px;
    padding: clamp(32px, 5vh, 52px) clamp(40px, 5vw, 104px) clamp(36px, 5.5vh, 56px);
  }
  .bare-wrap .bare-claim { align-self: center; max-width: none; }
}
/* Trzy punkty pod napisem logowania (M.R., 28.10): widok, asystent, raport — tylko to, co klient naprawdę ma. */
.login-points { display: grid; gap: 14px; margin: 36px 0 0; padding: 0; list-style: none; }
.login-points li { display: flex; align-items: center; gap: 14px; font-size: 16px; font-weight: 600; color: rgba(255, 255, 255, .9); }
.login-point-ico {
  display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .07);
}
.login-point-ico svg { width: 19px; height: 19px; fill: none; stroke: var(--glow-light); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.bare-wrap .bare-inner { max-width: 460px; padding: 40px 40px 30px; border-radius: 22px; background: var(--surface); box-shadow: 0 30px 70px -34px rgba(25, 28, 98, .45); }
.bare-wrap .bare-inner .login-pg { margin-top: 22px; }
@media (max-width: 860px) {
  .login-points { display: none; }
  .bare-wrap .bare-inner { padding: 0; border-radius: 0; box-shadow: none; max-width: none; }
  .bare-wrap .bare-mark, .bare-brand > .bare-foot { display: none; }
  /* Stopka na samym dole arkusza (nad paskiem iPhone'a), linia Google zostaje przy formularzu. */
  .bare-foot--sheet { display: flex; margin-top: auto; padding: 32px 0 env(safe-area-inset-bottom); color: var(--ink-soft); }
  .bare-wrap .bare-brand { background-image: var(--scene-glow-phone); }
  .bare-wrap .bare-lead { max-width: none; font-size: clamp(26px, 7.4vw, 32px); }
}

/* ------------------------------------------------------------------ strona 404 (`404.html`, `blad.js`) */

/* Układ logowania (`bare-wrap`): po prawej tytuł, zdanie z adresem i przyciski (M.R., 27.10 — bez lejka). */
/* Tekst z `404.html` jest dla przeglądarki bez skryptów — pokazuje się dopiero po 1,2 s; blad.js podmienia go wcześniej,
   więc przy odświeżaniu nie miga goły napis (M.R., 28.10). */
.nf-fallback { padding: 48px 24px; animation: boot-fade .3s ease 1.2s both; }
.nf-logo-link { display: block; align-self: flex-start; justify-self: start; border-radius: 6px; }
.nf-logo-link:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 4px; }
.nf-path { font: inherit; font-weight: 700; color: var(--ink); padding: 1px 6px; border-radius: 6px; background: var(--accent-soft); overflow-wrap: anywhere; }
/* Miejsce na przycisk jest od początku: napis zależy od `/api/ja`, a karta nie zmienia wysokości, gdy przyjdzie. */
.nf-actions { display: flex; flex-wrap: wrap; gap: 10px; min-height: 52px; margin-top: 8px; }
.nf-actions .btn { gap: 10px; min-height: 52px; font-size: 15px; animation: boot-fade .2s ease both; transition: transform .15s, box-shadow .15s; }
.nf-actions .btn svg { width: 18px; height: 18px; transition: transform .15s; }
.nf-actions .btn:hover { transform: translateY(-1px); box-shadow: 0 12px 24px -12px color-mix(in srgb, var(--navy) 80%, transparent); }
.nf-actions .btn:hover svg { transform: translateX(3px); }
@media (prefers-reduced-motion: reduce) { .nf-actions .btn, .nf-actions .btn svg { transition: none; } .nf-actions .btn:hover { transform: none; } }

@media (max-width: 860px) {
  .nf-actions .btn { flex: 1 1 auto; justify-content: center; min-height: 48px; }
}

.client-list { list-style: none; margin: 18px 0 12px; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.client-list li { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); }
.client-list li:last-child { border-bottom: 0; }

@media (max-width: 720px) {
  .grid-2, .add-row, .labels-grid { grid-template-columns: minmax(0, 1fr); }
  .page-head h1 { font-size: 22px; }
}

/* ------------------------------------------------------------------ kreator: dashboard własny */

textarea {
  font: inherit;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  width: 100%;
  resize: vertical;
}
textarea:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.hint--warn { color: var(--warn); }
.hint--bad { color: var(--bad); }
.btn--small { padding: 5px 12px; font-size: 13px; }

.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.card-head h2 { margin: 0; }

/* Przełącznik Układ / Podgląd. */
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line-soft); }
.seg button {
  font: inherit; font-size: 13px; font-weight: 700;
  padding: 6px 16px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-soft); cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--navy); color: #FFFFFF; }
.seg button:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }

.src-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; font-size: 13px; }
.platform { display: inline-flex; align-items: center; gap: 6px; }
.platform svg, svg.pi { flex: none; width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* Odpięta platforma w wyborze: nazwa w jednej linii, znak platformy obok, bez rozpychania pigułki. */
.check { white-space: nowrap; }
.check svg.pi { margin-left: -2px; }
/* Długi opis przy polu (np. „Dashboard pokazowy — na przetargi…") zawija się zamiast wychodzić poza okno. */
.check.check--wrap { white-space: normal; border-radius: 12px; align-items: flex-start; }

/* Kolory marek platform (M.R., 23.10) — jedyny wyjątek od palety PG. Test palety wpuszcza je wyłącznie
   w regułach `.pi--<platforma>`; ta sama barwa w innej regule pada. Kolejność ścieżek: `PLATFORM_ICONS` w panel.js. */
.pi--google_ads path:nth-child(1) { stroke: #4285F4; }
.pi--google_ads path:nth-child(2) { stroke: #FBBC04; }
.pi--google_ads path:nth-child(3) { stroke: #34A853; fill: #34A853; }
.pi--ga4 path:nth-child(1), .pi--ga4 path:nth-child(2) { stroke: #F9AB00; fill: #F9AB00; }
.pi--ga4 path:nth-child(3) { stroke: #E37400; }
.pi--meta path { stroke: #0081FB; }
.pi--tiktok path:nth-child(-n+2) { stroke: #25F4EE; }
.pi--tiktok path:nth-child(n+3):nth-child(-n+4) { stroke: #FE2C55; }
.pi--tiktok path:nth-child(n+5) { stroke: #000000; }
.pi--linkedin path { stroke: #FFFFFF; }
.pi--linkedin path:nth-child(1) { stroke: #0A66C2; fill: #0A66C2; }
.pi--microsoft_ads path { stroke: none; }
.pi--microsoft_ads path:nth-child(1) { fill: #F25022; }
.pi--microsoft_ads path:nth-child(2) { fill: #7FBA00; }
.pi--microsoft_ads path:nth-child(3) { fill: #00A4EF; }
.pi--microsoft_ads path:nth-child(4) { fill: #FFB900; }
.pi--dv360 path { stroke: #34A853; }
.pi--dv360 path:nth-child(2) { fill: #34A853; }

.src-soon { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); }
.src-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.src-head .icon { width: 26px; height: 26px; font-size: 12px; }

.list-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.list-tools input { flex: 1 1 280px; width: auto; }
.list-tools select { flex: 0 0 auto; width: auto; }
@media (max-width: 600px) { .list-tools select { flex: 1 1 calc(50% - 5px); min-width: 0; } }
.list-count { font-size: 13px; }
.journal-tools { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.journal-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.journal-row--dates { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.journal-row--dates .list-count { margin-left: auto; }
.journal-label { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); }
@media (max-width: 720px) { .journal-row { grid-template-columns: minmax(0, 1fr); } .journal-row--dates .list-count { margin-left: 0; } }
.date-filter { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--ink-soft); }
/* Zakres dat: dwa pola w jednej ramce jak jedno pole „od – do". */
.date-range { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.date-range:focus-within { border-color: var(--violet); box-shadow: 0 0 0 3px var(--accent-soft); }
.date-range input[type="date"] { border: 0; background-color: transparent; padding: 8px 34px 8px 10px; box-shadow: none; width: auto; }
.date-range input[type="date"]:focus-visible { box-shadow: none; }
.date-range-sep { color: var(--ink-soft); font-weight: 700; }
/* Pola dat w stylu pozostałych pól panelu (wcześniej systemowe). */
input[type="date"], input[type="month"] {
  font: inherit; font-size: 14px; padding: 8px 34px 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background-color: var(--surface); color: var(--ink); min-height: 40px; cursor: pointer;
  /* Ikonka kalendarza PG zamiast systemowej — klik otwiera kalendarz z `calendar.js`. */
  background-image: url("/kalendarz.svg"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px 16px;
}
input[type="date"]::-webkit-calendar-picker-indicator, input[type="month"]::-webkit-calendar-picker-indicator { display: none; }

.b-lock { border: 0; padding: 0; margin: 0; min-width: 0; }
.b-lock:disabled .b-add, .b-lock:disabled .b-goal-head .btn, .b-lock:disabled .add-row { display: none; }
.b-goals { display: flex; flex-direction: column; gap: 12px; }
.b-goal { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; }
.b-goal-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.b-goal-head input { flex: 1 1 220px; width: auto; font-weight: 700; }
.add-row--goal { grid-template-columns: minmax(0, 1fr) auto; }

.b-period { margin-bottom: 16px; }
.b-copy { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line-soft); }
.b-status .notice { margin-bottom: 14px; }

.b-sections { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.b-section { border: 1px solid var(--line); border-radius: var(--radius); background: var(--row-hover); padding: 14px; }
.b-section-head, .b-element-head { display: flex; align-items: center; gap: 10px; }
.b-section-head input { flex: 1; font-weight: 800; font-size: 16px; }
.b-section-head .pos {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--navy); color: #FFFFFF; font-weight: 800; font-size: 13px;
}
.b-section-head .move, .b-element-head .move { display: flex; gap: 4px; }
.b-elements { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.b-element { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 12px; box-shadow: var(--shadow); }
.b-element-head input { flex: 1; font-size: 14px; padding: 6px 10px; }
.b-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 12px; margin: 12px 0; }
.b-field--wide { grid-column: 1 / -1; }
.b-metrics .checks { margin-top: 2px; }
.b-empty { margin: 12px 0 0; font-size: 14px; }
.b-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; }
.check--stale { border-color: var(--bad); color: var(--bad); background: var(--bad-soft); }

@media (max-width: 720px) {
  .b-section-head, .b-element-head { flex-wrap: wrap; }
  .b-section-head input, .b-element-head input { flex-basis: 100%; order: 2; }
  .add-row--goal { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------ dashboard klienta (dash_view.js) */

/*
 * Widok dashboardu własnego — ten sam w podglądzie kreatora, w karcie podglądu i na stronie `#/dash/<adres>`.
 * Pasek jak w dashboardzie Synevo (M.R., 23.10): granat, tytuł = zakres dat, skróty, „Dane do", ↻, PDF, język.
 * Szerokość liczy się z kontenera (`container-type`), nie z okna: podgląd obok edycji jest wąski, choć okno szerokie.
 */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.dv {
  container-type: inline-size;
  position: relative;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 0 16px;
  overflow: hidden;
}
.dv--phone { max-width: 400px; margin: 0 auto; }

/*
 * Okładka „Poświata PG" (M.R., 24.10, opcja B z podglądu): jeden granatowy blok z marką, „Dane do", akcjami,
 * zakresem dat, porównaniem i skrótami; trzy linie PG wzdłuż dolnej krawędzi. Na granacie przygaszona poświata
 * (róż, fiolet, odrobina pomarańczu), która powoli płynie — najjaśniejsze miejsce zostaje ciemne
 * (M.R.: „czasem za jasno się robi"). Tekst stoi na granatowej, lewej części.
 */
.dv-top { position: relative; padding: 16px 20px 0; }
@keyframes dv-flow {
  0%, 100% { background-position: 0 100%, 100% 0%, 30% 100%, 70% 40%, 0% 50%, 0 0; }
  50% { background-position: 0 100%, 55% 35%, 85% 70%, 35% 75%, 100% 50%, 0 0; }
}
/* Linie PG i poświata jako tło (zaokrąglenie przycina je samo) — okładka bez `overflow: hidden`, więc lista
   języków i inne rozwijane okienka wychodzą poza nią, zamiast się ucinać. */
.dv-hero {
  position: relative; z-index: 6; border-radius: 22px; color: #FFFFFF;
  background-image:
    linear-gradient(90deg, var(--violet) 0 33.34%, var(--pink) 33.34% 66.67%, var(--pg-media) 66.67% 100%),
    radial-gradient(closest-side, rgba(253, 127, 178, .36), rgba(253, 127, 178, 0)),
    radial-gradient(closest-side, rgba(147, 93, 223, .45), rgba(147, 93, 223, 0)),
    radial-gradient(closest-side, rgba(238, 73, 46, .22), rgba(238, 73, 46, 0)),
    linear-gradient(115deg, rgba(25, 28, 98, 0) 0%, rgba(25, 28, 98, 0) 45%, rgba(35, 38, 108, .6) 65%, rgba(147, 93, 223, .55) 100%),
    linear-gradient(var(--navy), var(--navy));
  background-size: 100% 3px, 70% 220%, 60% 220%, 30% 140%, 220% 100%, 100% 100%;
  background-repeat: no-repeat;
  background-position: 0 100%, 100% 0%, 30% 100%, 70% 40%, 0% 50%, 0 0;
  /* Krótki granatowy cień przy krawędzi — fioletowy, długi (40 px) rozlewał się na wiersz „Konto" pod okładką
     i wyglądał jak poświata wychodząca poza nią (M.R., 24.10). */
  box-shadow: 0 10px 22px -14px rgba(25, 28, 98, .45);
  animation: dv-flow 16s ease-in-out infinite;
}
/* Wymiary paska z `pg-dashboards/public/style.css` (szata PG): 96 px, ikonka 40 px, „Dashboard" 700 + nazwa
   400 w 22 px, przyciski 40 px, „Dane do" 15 px. Pod paskiem, na tym samym granacie — zakres dat i skróty. */
/* `z-index`: pasek (z menu „⋯" i listą języków) zawsze nad rzędem tytułu. „Szklana" kapsuła okresów i treść po
   animacji wejścia mają własne warstwy — bez tego rysowały się na rozwiniętym menu (M.R., 24.10, zrzut). */
.dv-bar {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 12px 18px; flex-wrap: wrap;
  min-height: 96px; padding: 18px 26px 0 32px; color: #FFFFFF;
}
.dv-brand { display: flex; align-items: center; gap: 16px; min-width: 0; padding: 0; border: 0; background: transparent; cursor: pointer; font: inherit; text-align: left; }
.dv-brand:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 4px; border-radius: 6px; }
.dv-logo { display: block; height: 40px; width: auto; }
.dv-name { font-size: 22px; font-weight: 400; letter-spacing: -.02em; color: rgba(255, 255, 255, .82); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dv-name b { color: #FFFFFF; font-weight: 700; }
.tv-bar .dv-name { font-size: 15px; }
.tv-bar .dv-logo { height: 26px; }
.dv-meta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; font-size: 15px; color: rgba(255, 255, 255, .8); }
.dv-actions { display: inline-flex; gap: 8px; align-items: center; }
.dv-icon {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  min-width: 40px; height: 40px; padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, .3); border-radius: 10px;
  background: transparent; color: #FFFFFF; font: inherit; font-size: 19px; font-weight: 700; cursor: pointer;
}
.dv-icon svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.dv-icon--text { font-size: 13px; padding: 0 12px; letter-spacing: .02em; }
/* Przyciski w okładce „szklane": lekko jaśniejsze od granatu, z rozmyciem tła pod spodem. */
.dv-hero .dv-icon { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .22); backdrop-filter: blur(8px); }
@container (max-width: 760px) {
  .dv-bar { min-height: 0; padding: 16px 20px 0; }
}
@container (max-width: 560px) {
  .dv-logo { height: 32px; }
  .dv-name { font-size: 18px; }
  .dv-hero { border-radius: 20px; }
  .dv-meta { font-size: 13px; }
}
.dv-icon:hover, .dv-hero .dv-icon:hover { background: rgba(255, 255, 255, .18); }
.dv-icon:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 2px; }
.dv-lang--static { cursor: default; }
.dv-lang .flag { width: 20px; height: 14px; }
.dv-lang-wrap { position: relative; }
/*
 * Rozwijane listy w okładce — „⋯" i język — jedna karta (M.R., 24.10: „ładniej po rozwinięciu", „tak samo przy
 * języku"): zaokrąglona, z miękkim cieniem, wyskakuje sprężyście od prawego górnego rogu; znak pozycji w fioletowym
 * kwadraciku, wybrany język podświetlony (tło i kreska z lewej), kreska nad „Zgłoś uwagę".
 */
@keyframes dv-menu-pop { from { opacity: 0; transform: translateY(-6px) scale(.94); } to { opacity: 1; transform: none; } }
.dv-lang-list {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 5; list-style: none; margin: 0; padding: 6px;
  min-width: 200px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 16px;
  box-shadow: 0 24px 50px -16px rgba(25, 28, 98, .38), 0 8px 18px -8px rgba(25, 28, 98, .2);
  transform-origin: 100% 0; animation: dv-menu-pop .22s cubic-bezier(.2, .9, .25, 1.15) both;
}
.dv-lang-list button {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 6px 12px 6px 6px; border: 0; border-radius: 11px;
  background: transparent; color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; text-align: left; white-space: nowrap; cursor: pointer;
}
.dv-lang-list button:hover, .dv-lang-list button:focus-visible { background: var(--accent-soft); outline: none; }
/* Wybrany język — znacznik jak w listach wyboru panelu (tło, pogrubienie, kreska z lewej), bez ptaszka. */
.dv-lang-list button[aria-current="true"] { background: var(--accent-soft); font-weight: 800; box-shadow: inset 3px 0 0 var(--violet); }
.dv-lang-list button[aria-current="true"] .dv-more-glyph { background: var(--surface); }
.dv-menu-sep { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line-soft); }
@media (prefers-reduced-motion: reduce) { .dv-lang-list { animation: none; } }

/*
 * Rząd tytułu jak w Synevo: zakres dat po lewej, kapsuła okresów po prawej, wyrównana do dołu. Siatka zamiast
 * zawijania (M.R., 24.10: długi zakres „24 września – 23 października 2026" zrzucał okresy pod spód) — tytuł
 * maleje z szerokością, a gdy i tak się nie mieści, łamie się na dwie równe linie; okresy zostają po prawej.
 * Pod tytuł schodzą dopiero na wąskim ekranie (telefon, `@container` niżej).
 */
.dv-title { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 14px 28px; padding: 14px 26px 30px 32px; }
.dv-title-text { min-width: 0; }
.dv-range {
  display: inline; padding: 0; border: 0; background: transparent; color: #FFFFFF; text-wrap: balance;
  font: inherit; font-size: clamp(26px, 3.6cqi, 44px); font-weight: 600; line-height: 1.12; letter-spacing: -.035em; cursor: pointer; text-align: left;
}
.dv-range:hover { opacity: .88; }
.dv-range:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 4px; border-radius: 4px; }
.dv-caret { font-size: .5em; color: var(--ink-soft); }
.dv-hero .dv-caret { color: rgba(255, 255, 255, .7); }
.dv-range .dv-caret { display: inline-block; margin-left: 10px; vertical-align: .2em; }
.dv-compare { margin: 6px 0 0; font-size: 14px; color: rgba(255, 255, 255, .72); }
.dv-compare b { color: #FFFFFF; font-weight: 800; }
/* „⋯" w pasku: lista rzadszych akcji (odśwież, link, „Zgłoś uwagę") — wygląd listy języków. */
.dv-more-wrap { position: relative; }
.dv-more { font-size: 20px; line-height: 1; }
/* Klient: nowa odpowiedź na jego uwagę — kropka na „⋯", pozycja „Twoje uwagi" w środku (M.R., 27.10). */
.dv-more.has-news { position: relative; }
.dv-more.has-news::after { content: ''; position: absolute; top: 5px; right: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--pg-media); box-shadow: 0 0 0 2px var(--navy); }
.dv-more-list { min-width: 220px; }
.dv-more-glyph {
  display: inline-flex; flex: none; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 9px;
  /* Ikona w kolorze tekstu pozycji, jak w menu panelu (M.R., 25.10: „raz granat, raz fiolet") — pilnuje test „menu:". */
  background: var(--accent-soft); color: inherit; font-size: 16px; transition: background .15s;
}
.dv-lang-list button:hover .dv-more-glyph, .dv-lang-list button:focus-visible .dv-more-glyph { background: var(--surface); }
.dv-more-glyph svg:not(.flag) { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.dv-more-glyph .flag { width: 20px; height: 14px; border-radius: 2px; }
.dv-more-pdf { font-size: 9px; font-weight: 800; letter-spacing: .02em; }
/* Przyciski-pigułki (`.dv-qchip`) na jasnym tle — filtr konta i inne przełączniki pod okładką. */
.dv-qchip {
  padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  color: var(--ink); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
}
.dv-qchip:hover { border-color: var(--navy); }
.dv-qchip[aria-pressed="true"] { background: var(--navy); color: #FFFFFF; border-color: var(--navy); font-weight: 700; }
.dv-qchip:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
/* Skróty okresu w okładce: jedna „szklana" kapsuła, wybrany — biały. Na telefonie kapsuła na całą szerokość, przewijana. */
.dv-quick {
  display: inline-flex; gap: 2px; padding: 4px; max-width: 100%; overflow-x: auto; scrollbar-width: none;
  border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px; background: rgba(255, 255, 255, .1); backdrop-filter: blur(12px);
}
.dv-quick::-webkit-scrollbar { display: none; }
.dv-hero .dv-qchip { flex: none; padding: 7px 14px; border: 0; background: transparent; color: rgba(255, 255, 255, .88); white-space: nowrap; }
.dv-hero .dv-qchip:hover { background: rgba(255, 255, 255, .12); }
.dv-hero .dv-qchip[aria-pressed="true"] { background: #FFFFFF; color: var(--navy); box-shadow: 0 4px 14px -4px rgba(25, 28, 98, .5); }
.dv-hero .dv-qchip:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 2px; }
/* Po regułach podstawowych tytułu — inaczej one wygrywają (zapytanie o kontener nie podnosi ważności reguły). */
@container (max-width: 760px) {
  .dv-title { grid-template-columns: minmax(0, 1fr); padding: 12px 20px 22px; }
  .dv-quick { display: flex; justify-self: stretch; }
  .dv-quick .dv-qchip { flex: 1 0 auto; }
}
/* Telefon: pasek w jednym wierszu (marka, „⋯", język). M.R., 24.10 („popraw respo na mobile"): sama nazwa
   dashboardu bez doklejonego „Dashboard" (inaczej ucinała się po pierwszym słowie); okresy bez „Własny…" (własny
   zakres jest w panelu po kliknięciu daty) — cztery równe, bez przewijania; „Konto" w jednym przewijanym rzędzie. */
/* Telefon, druga runda (M.R., 24.10: „pozmniejszać niektóre rzeczy"): okładka o ok. 1/3 niższa — logo, „⋯" i flaga
   32 px, nazwa w jednej linii na całą wolną szerokość, za długa kończy się „…" (M.R., 24.10: „nie może się rozjeżdżać
   na 2 linie"), data 20–23 px, porównanie drobniej, niższa kapsuła okresów
   i niższa belka zakładek. Przyciski dalej ≥ 32 px (cel dotyku), okresy na całą szerokość. */
@container (max-width: 560px) {
  .dv-range { font-size: clamp(20px, 5.6cqi, 23px); letter-spacing: -.03em; }
  .dv-range .dv-caret { margin-left: 6px; }
  /* Cele dotyku (test 24.10: data 23 px, nazwa 26 px wysokości): większe pole kliknięcia, wygląd bez zmian —
     data jest `inline`, więc pionowy padding nie rusza linii; nazwa oddaje padding ujemnym marginesem. */
  .dv-range { padding: 8px 0; }
  .dv-bar { flex-wrap: nowrap; gap: 10px; padding: 12px 12px 0 14px; }
  .dv-brand { flex: 1 1 auto; gap: 10px; padding: 5px 0; margin: -5px 0; }
  .dv-logo { height: 26px; }
  .dv-meta { flex-wrap: nowrap; }
  .dv-actions { gap: 6px; }
  .dv-icon { min-width: 32px; height: 32px; padding: 0 7px; border-radius: 9px; font-size: 16px; }
  .dv-lang .flag { width: 18px; height: 12px; }
  /* Bez doklejonego „Dashboard"; zostaje, gdy to pierwsze słowo samej nazwy (`dv-name-lead`). */
  .dv-name b:not(.dv-name-lead) { display: none; }
  .dv-name b.dv-name-lead { font-weight: inherit; }
  .dv-name {
    color: #FFFFFF; font-size: 15px; font-weight: 600; line-height: 1.2; letter-spacing: -.01em;
    flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .dv-title { gap: 10px; padding: 8px 14px 14px; }
  .dv-compare { margin-top: 3px; font-size: 12px; }
  .dv-hero .dv-qchip--custom { display: none; }
  .dv-hero .dv-quick { overflow: visible; padding: 3px; }
  .dv-hero .dv-qchip { flex: 1 1 0; padding: 5px 4px; font-size: 12.5px; text-align: center; }
  .dv .dv-accounts { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -4px; padding: 2px 4px; }
  .dv .dv-accounts::-webkit-scrollbar { display: none; }
  .dv .dv-accounts .dv-qchip { flex: none; padding: 6px 13px; font-size: 13px; }
}
/* Bardzo wąski dashboard (podgląd w edytorze na telefonie 320 px): cztery okresy się nie mieszczą — „30 dni" dotykał
   krawędzi okładki. Kapsuła przewija się palcem zamiast ucinać (test 24.10). */
@container (max-width: 300px) {
  .dv-hero .dv-quick { overflow-x: auto; }
  .dv-hero .dv-qchip { flex: 1 0 auto; padding: 5px 9px; }
}
/* Telefon: mniejsze marginesy strony dashboardu (było ~30 px z każdej strony), pasek zarządzania w linii z okładką. */
@media (max-width: 600px) {
  body.dash-page .dash-page-wrap { padding-left: 8px; padding-right: 8px; }
  body.dash-page .dash-manage, body.dash-page .dash-calc-src { margin-left: 12px; margin-right: 12px; }
}

/*
 * Wejście (M.R., 24.10: „efekt wow jak to odpalasz"; tylko przy otwarciu — `intro` w `renderDashboard`):
 * okładka wyostrza się z rozmycia, jej treść i karty wjeżdżają po kolei (`--i` = kolejność karty),
 * wykresy rysują się od lewej, strzałki wyników wyskakują po nabiciu liczb (liczby — dash_view.js).
 */
@keyframes dv-in-hero { from { opacity: 0; filter: blur(14px); transform: scale(1.03); } to { opacity: 1; filter: none; transform: none; } }
@keyframes dv-in-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes dv-in-pop { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
@keyframes dv-in-reveal { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.dv--intro .dv-hero { animation: dv-in-hero 1s cubic-bezier(.2, .8, .2, 1) both, dv-flow 16s 1s ease-in-out infinite; }
.dv--intro .dv-bar > *, .dv--intro .dv-title > *, .dv--intro .dv-actionbar, .dv--intro .dv-sample, .dv--intro .dv-tabs, .dv--intro .dv-nav {
  animation: dv-in-rise .7s cubic-bezier(.2, .8, .2, 1) both;
}
.dv--intro .dv-bar > :first-child { animation-delay: .3s; }
.dv--intro .dv-bar > :last-child { animation-delay: .4s; }
.dv--intro .dv-title > :first-child { animation-delay: .45s; }
.dv--intro .dv-title > :last-child { animation-delay: .55s; }
.dv--intro .dv-actionbar, .dv--intro .dv-sample, .dv--intro .dv-tabs, .dv--intro .dv-nav { animation-delay: .6s; }
.dv--intro .dv-card { animation: dv-in-rise .7s calc(700ms + var(--i, 0) * 80ms) cubic-bezier(.2, .8, .2, 1) both; }
.dv--intro .dv-spark, .dv--intro .dv-chart { animation: dv-in-reveal 1.2s calc(900ms + var(--i, 0) * 80ms) cubic-bezier(.2, .8, .2, 1) both; }
.dv--intro .dv-delta { animation: dv-in-pop .5s calc(1750ms + var(--i, 0) * 80ms) cubic-bezier(.2, .9, .25, 1.15) both; }
@media (prefers-reduced-motion: reduce) { .dv-hero { animation: none; } }
/* Karta przerysowana po wyborze klienta (filtr, sortowanie, metryka) stoi — wejście tylko przy otwarciu dashboardu. */
.dv--intro .dv-card--redrawn, .dv--intro .dv-card--redrawn * { animation: none; }
/* „Wyłącz animacje" w „⋯" (wybór zapamiętany w przeglądarce): poświata stoi, bez wejścia, list i obrysu czatu. */
.dv--still, .dv--still * { animation: none !important; }

/*
 * Panel zakresu (M.R., 24.10: „UI i respo"): karta jak listy „⋯" i języka, otwiera się POD okładką (wcześniej
 * nachodziła na jej dół z liniami PG). Opcje jako całe klikalne wiersze z kółkiem w barwach PG, wybrany wiersz
 * podświetlony. Dolny pasek: zakres dostępnych danych (skróty miesięcy) i przyciski. Telefon — arkusz od dołu.
 */
.dv-panel {
  position: absolute; left: 20px; right: 20px; top: calc(100% + 10px); z-index: 6; max-width: 680px;
  padding: 18px 18px 14px; background: var(--surface); color: var(--ink); border: 1px solid var(--line-soft); border-radius: 18px;
  box-shadow: 0 24px 50px -16px rgba(25, 28, 98, .38), 0 8px 18px -8px rgba(25, 28, 98, .2);
  transform-origin: 30% 0; animation: dv-menu-pop .24s cubic-bezier(.2, .9, .25, 1.15) both;
}
.dv-panel-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.dv-panel-h { margin: 0 0 8px 10px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.dv-radios { display: flex; flex-direction: column; gap: 2px; }
.dv-radio { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 6px 10px; border-radius: 11px; font-size: 14px; font-weight: 500; cursor: pointer; transition: background .15s; }
.dv-radio:hover { background: var(--row-hover); }
.dv-radio:has(input:checked) { background: var(--accent-soft); font-weight: 700; }
/* Kółko w barwach PG zamiast systemowego: obrys, a wybrane — granatowa kropka w środku. */
.dv-radio input {
  appearance: none; flex: none; width: 18px; height: 18px; margin: 0; border: 2px solid var(--line); border-radius: 50%;
  background: var(--surface); display: grid; place-items: center; cursor: pointer; transition: border-color .15s;
}
.dv-radio input::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--navy); transform: scale(0); transition: transform .15s; }
.dv-radio input:checked { border-color: var(--navy); }
.dv-radio input:checked::before { transform: scale(1); }
.dv-radio input:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.dv-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 0; padding: 0 4px; }
.dv-dates[hidden], .dv-panel[hidden], .dv-lang-list[hidden] { display: none; }
.dv-dates label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.dv-dates input { font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); min-width: 0; }
.dv-dates input[aria-invalid] { border-color: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.dv-panel-actions { display: flex; align-items: center; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.dv-panel-note { margin: 0 auto 0 4px; font-size: 12px; color: var(--ink-soft); }
/* Telefon (okno, nie kontener — podgląd telefonu w kreatorze zostaje rozwijaną kartą): arkusz od dołu,
   przyciemnione tło, treść przewija się w środku, przyciski zawsze widoczne. */
@media (max-width: 600px) {
  .dv-top .dv-panel {
    position: fixed; left: 0; right: 0; top: auto; bottom: 0; z-index: 60; max-width: none; max-height: 86vh;
    display: flex; flex-direction: column; padding: 8px 0 0; border-radius: 22px 22px 0 0;
    box-shadow: 0 0 0 100vmax rgba(25, 28, 98, .45), 0 -12px 30px -12px rgba(25, 28, 98, .3);
    transform-origin: 50% 100%; animation: dv-sheet .28s cubic-bezier(.2, .8, .2, 1) both;
  }
  .dv-top .dv-panel[hidden] { display: none; }
  .dv-top .dv-panel::before { content: ''; flex: none; align-self: center; width: 40px; height: 4px; margin: 2px 0 10px; border-radius: 4px; background: var(--line); }
  .dv-panel-body { grid-template-columns: minmax(0, 1fr); gap: 16px; overflow-y: auto; padding: 0 14px 6px; overscroll-behavior: contain; }
  .dv-radio { min-height: 46px; font-size: 15px; }
  .dv-panel-actions { flex-wrap: wrap; margin: 0; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); background: var(--surface); }
  .dv-panel-note { flex: 1 1 100%; margin: 0 0 4px 4px; }
  .dv-panel-actions .btn { flex: 1 1 0; justify-content: center; min-height: 44px; }
}
@keyframes dv-sheet { from { transform: translateY(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .dv-panel, .dv-top .dv-panel { animation: none; } }

.dv-sample {
  margin: 12px 20px 0; padding: 6px 12px; border-radius: 999px; display: inline-block;
  background: var(--warn-soft); color: var(--warn); font-size: 12px; font-weight: 700;
}
.dv-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 20px 0; }
.dv-chip {
  font: inherit; font-size: 13px; font-weight: 700; padding: 5px 12px; border-radius: 999px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink);
}
.dv-chip:hover { border-color: var(--navy); }

.dv-section { margin: 22px 20px 0; scroll-margin-top: 12px; }
.dv-section-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.dv-section-head h2 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -.01em; flex: 1; min-width: 0; }
.dv-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
.dv-card {
  grid-column: span 12; position: relative; min-width: 0;
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px;
}
.dv-size--dwie_trzecie { grid-column: span 8; }
.dv-size--polowa { grid-column: span 6; }
.dv-size--tercja { grid-column: span 4; }
/* Tablet (dashboard 601–900 px): trzecia część to ~220 px — za mało na wykres z przełącznikami (wystawały za kartę).
   Tercja i dwie trzecie po połowie: para 2/3 + 1/3 zostaje parą, trzy tercje układają się 2 + 1 (test 24.10). */
@container (max-width: 900px) {
  .dv-size--dwie_trzecie, .dv-size--tercja { grid-column: span 6; }
}
@container (max-width: 600px) {
  .dv-size--dwie_trzecie, .dv-size--polowa, .dv-size--tercja { grid-column: span 12; }
  .dv-panel-body { grid-template-columns: 1fr; }
  /* Edytor na wąskim: tytuł sekcji w pierwszym wierszu, licznik i narzędzia pod nim — obok siebie zasłaniały tytuł. */
  .dv--edit .dv-section-head { flex-wrap: wrap; row-gap: 6px; }
  .dv--edit .dv-section-head h2 { flex: 1 1 calc(100% - 40px); }
  /* Zawijanie: siedem przycisków po 40 px (dotyk) nie mieściło się w rzędzie na telefonie 320 px. */
  .dv--edit .dv-section-head .dv-tools { order: 3; flex-wrap: wrap; max-width: 100%; }
}
.dv-card-head { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 12px; }
.dv-card-head h3 { margin: 0; flex: 1; min-width: 0; font-size: 15px; font-weight: 800; }
/* Znak platformy przed tytułem (M.R., 29.10) — na wysokości pierwszej linii tytułu, także gdy tytuł się zawija.
   18 px i grubsza kreska: przy pogrubionym tytule 15 px cienki znak 16 px ginął. */
.dv-src { flex: none; display: inline-flex; gap: 5px; padding-top: 3px; margin-right: -1px; }
.dv-src svg.pi { width: 18px; height: 18px; stroke-width: 2.4; }
/* Ta sama forma co „Wykres / Tabela" i strzałka zwijania — trzy przyciski w jednym rzędzie. */
.dv-card-feedback {
  flex: none; display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; margin: -4px 0;
  border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--ink-soft); cursor: pointer;
  opacity: 0; transition: opacity .15s;
}
.dv-card-feedback svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.dv-card:hover .dv-card-feedback, .dv-card-feedback:focus-visible { opacity: 1; }
.dv-card-feedback:hover { background: var(--row-hover); border-color: var(--line); color: var(--ink); }
.dv-card-feedback:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
@media (hover: none) { .dv-card-feedback { opacity: 1; } }

/* Kafle: flex z zawijaniem zamiast siatki — niepełny ostatni rząd rozciąga się na całą szerokość. W siatce
   3 kafle w 2 kolumnach (telefon, podgląd „Obok siebie") albo 5 w 3 zostawiały pustą dziurę (test 24.10). */
.dv-tiles { display: flex; flex-wrap: wrap; gap: 12px; }
.dv-tiles > .dv-tile { flex: 1 1 150px; min-width: 0; }
.dv--phone .dv-tiles { gap: 8px; }
.dv--phone .dv-tiles > .dv-tile { flex-basis: calc(50% - 4px); }
.dv-tile {
  display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--row-hover); min-width: 0;
}
.dv-tile:nth-child(3n+2) { border-top-color: var(--acc-2, var(--pink)); }
.dv-tile:nth-child(3n) { border-top-color: var(--acc-3, var(--pg-media)); }
.dv-tile--good { box-shadow: inset 0 0 0 1px var(--good); }
.dv-tile--bad { box-shadow: inset 0 0 0 1px var(--bad); background: var(--bad-soft); }
.dv-label { font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.dv-value { font-size: 24px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.dv--phone .dv-value { font-size: 19px; }
.dv-delta { align-self: flex-start; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--line-soft); color: var(--ink-soft); }
.dv-delta--good { background: var(--good-soft); color: var(--good); }
.dv-delta--bad { background: var(--bad-soft); color: var(--bad); }
.dv-threshold { font-size: 12px; font-weight: 700; }
.dv-tone--good { color: var(--good); }
.dv-tone--bad { color: var(--bad); }
.dv-spark { display: block; width: 100%; height: 30px; margin-top: 4px; }
.dv-spark-line { fill: none; stroke: var(--acc, var(--violet)); stroke-width: 1.75; }

.dv-legend { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13px; }
.dv-legend li { display: inline-flex; align-items: center; gap: 6px; }
.dv-key { width: 14px; height: 3px; border-radius: 2px; background: var(--acc, var(--violet)); }
.dv-key--2 { background: var(--acc-2, var(--pink)); }
.dv-key--bar { height: 10px; width: 10px; }
.dv-key--prev { background: none; border-top: 2px dashed var(--ink-soft); height: 0; }
.dv-key--prev.dv-key--bar { height: 10px; border: 0; background: var(--acc, var(--violet)); opacity: .3; }
/*
 * Wykres trendu jak w Synevo (M.R., 26.10): rysowany w szerokości karty, wysokość z `--dv-chart-h` (czyta ją JS),
 * linia z kółkami, porównanie przerywane, dymek `.dv-tt` jak `.tooltip.tt` w silniku.
 */
.dv-plot { --dv-chart-h: 250px; position: relative; min-height: 1px; }
.dv-chart { display: block; width: 100%; height: auto; overflow: visible; }
.dv-axis { stroke: var(--line); stroke-width: 1; }
.dv-line { fill: none; stroke: var(--acc, var(--violet)); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.dv-line--2 { stroke: var(--acc-2, var(--pink)); }
.dv-line--prev { stroke: var(--ink-soft); stroke-width: 1.6; stroke-dasharray: 5 4; opacity: .8; }
.dv-pt { fill: var(--surface); stroke: var(--acc, var(--violet)); stroke-width: 2; pointer-events: none; }
.dv-pt--2 { stroke: var(--acc-2, var(--pink)); }
.dv-pt--prev { stroke: var(--ink-soft); }
.dv-tbar { fill: var(--acc, var(--violet)); }
.dv-tick { fill: var(--ink-soft); font-family: var(--font); font-size: 11px; }
.dv-tt { position: absolute; z-index: 20; min-width: 180px; padding: 10px 12px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 28px rgba(25, 28, 98, .16); font-size: 13px; white-space: nowrap; pointer-events: none; }
.dv-tt[hidden] { display: none; }
.dv-tt-title { margin-bottom: 6px; font-weight: 700; }
.dv-tt-row { display: flex; align-items: center; gap: 8px; padding: 2px 0; }
.dv-tt-sw.dv-key { flex: none; }
.dv-tt-label { color: var(--ink-soft); }
.dv-tt-val { margin-left: auto; padding-left: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.dv-tt-note { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line-soft); font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.dv-tt-note--good { color: var(--good); }
.dv-tt-note--bad { color: var(--bad); }
.dv-axis-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-soft); margin-top: 4px; }
.dv-axis-labels span:only-child { margin: 0 auto; justify-content: center; }

.dv-table th, .dv-table td { padding: 9px 10px; }
.dv-table tfoot td { font-weight: 800; border-top: 2px solid var(--line); border-bottom: 0; }

.dv-cols { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; align-items: end; }
.dv-col { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.dv-col-value { font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dv-col-bar { display: block; width: 56%; height: 120px; }
.dv-col-fill, .dv-hbar-fill { fill: var(--acc, var(--violet)); }
.dv-col:nth-child(4n+2) .dv-col-fill, .dv-hbars li:nth-child(4n+2) .dv-hbar-fill { fill: var(--acc-2, var(--pink)); }
.dv-col:nth-child(4n+3) .dv-col-fill, .dv-hbars li:nth-child(4n+3) .dv-hbar-fill { fill: var(--acc-3, var(--pg-media)); }
.dv-col:nth-child(4n) .dv-col-fill, .dv-hbars li:nth-child(4n) .dv-hbar-fill { fill: var(--acc-4, var(--navy)); }
.dv-col-label { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--ink-soft); text-align: center; }
.dv-col-label svg, .dv-hbar-label svg { width: 14px; height: 14px; fill: none; stroke-width: 2; flex: none; }
.dv-hbars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.dv-hbars li { display: grid; grid-template-columns: minmax(90px, 140px) minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.dv-hbar-label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.dv-hbar { display: block; width: 100%; height: 14px; border-radius: 4px; background: var(--line-soft); }
.dv-hbar-value { font-variant-numeric: tabular-nums; font-size: 14px; white-space: nowrap; }
.dv-total { margin: 12px 0 0; font-size: 14px; color: var(--ink-soft); }
.dv-total b { color: var(--ink); }

.dv-plan-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.dv-plan-bar { display: block; width: 100%; height: 14px; border-radius: 7px; overflow: hidden; }
.dv-plan-track { fill: var(--line-soft); }
/* Pasek planu zawsze w kolorze elementu (M.R., 23.10: „nie zmienia mi koloru"); czy tempo jest dobre, mówi
   kolorowa prognoza pod paskiem i kreska tempa. */
.dv-plan-fill, .dv-plan-fill--good, .dv-plan-fill--bad { fill: var(--acc, var(--violet)); }
.dv-plan-pace { stroke: var(--navy); stroke-width: 2; }
.dv-plan-note { margin: 10px 0 0; font-size: 13px; }

/* Legenda obok pierścienia, a gdy w karcie nie ma na nią 220 px — pod nim. Liczy się szerokość karty, nie ekranu:
   w połówce na tablecie lista dostawała 109 px i nazwy (Komórka, Komputer…) znikały do zera (test 24.10). */
.dv-share { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; align-items: center; }
.dv-share > .dv-donut { flex: 0 1 170px; min-width: 120px; }
.dv-share > .dv-share-list { flex: 1 1 220px; min-width: 0; }
.dv-donut { position: relative; }
.dv-donut svg { display: block; width: 100%; height: auto; transform: rotate(0deg); }
.dv-arc-track { fill: none; stroke: var(--line-soft); stroke-width: 6; }
.dv-arc { fill: none; stroke-width: 6; }
.dv-donut-total { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 22%; }
.dv-donut-total b { font-size: 15px; font-variant-numeric: tabular-nums; }
.dv-donut-total small { font-size: 11px; color: var(--ink-soft); }
.dv-arc--1 { stroke: var(--acc, var(--violet)); color: var(--acc, var(--violet)); }
.dv-arc--2 { stroke: var(--acc-2, var(--pink)); color: var(--acc-2, var(--pink)); }
.dv-arc--3 { stroke: var(--acc-3, var(--pg-media)); color: var(--acc-3, var(--pg-media)); }
.dv-arc--4 { stroke: var(--acc-4, var(--navy)); color: var(--acc-4, var(--navy)); }
.dv-arc--5 { stroke: var(--ink-soft); color: var(--ink-soft); }
.dv-arc--6 { stroke: var(--good); color: var(--good); }
.dv-arc--other { stroke: var(--line); color: var(--line); }
.dv-share-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.dv-share-list li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 56px; gap: 8px; align-items: center; }
.dv-share-list .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dv-share-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dv-dot { width: 10px; height: 10px; border-radius: 3px; background: currentColor; }

.dv-funnel { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.dv-funnel-rate { display: block; text-align: center; font-size: 12px; font-weight: 700; color: var(--ink-soft); margin: 2px 0; }
.dv-funnel-step { position: relative; }
.dv-funnel-bar { display: block; width: 100%; height: 34px; }
.dv-funnel-fill { fill: var(--acc, var(--violet)); }
.dv-funnel-label {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 4px;
  font-size: 13px; color: #FFFFFF; text-shadow: 0 1px 2px rgba(25, 28, 98, .45); white-space: nowrap;
}

/*
 * Mapa województw (M.R., 23.10, pomysł 12): kafelkowa mapa Polski. Odcień jednego koloru PG („data") w pięciu
 * stopniach przezroczystości — bez nowych barw spoza palety. Od stopnia 4 liczba jest biała (kontrast).
 */
/* Mapa na całą szerokość karty, ranking pod nią; obok siebie tylko w elemencie na całą szerokość. */
.dv-map { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
.dv-size--pelna .dv-map { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px 24px; }
.dv-map-svg { display: block; width: 100%; height: auto; max-height: 340px; }
.dv-map-tile rect { fill: var(--acc, var(--violet)); stroke: var(--surface); stroke-width: .5; }
.dv-map-l0 rect { fill: var(--line-soft); }
.dv-map-l1 rect { fill-opacity: .14; }
.dv-map-l2 rect { fill-opacity: .3; }
.dv-map-l3 rect { fill-opacity: .5; }
.dv-map-l4 rect { fill-opacity: .72; }
.dv-map-l5 rect { fill-opacity: 1; }
.dv-map-short { font-size: 6.5px; font-weight: 800; fill: var(--ink); letter-spacing: .02em; }
.dv-map-value { font-size: 6px; font-weight: 600; fill: var(--ink); font-variant-numeric: tabular-nums; }
.dv-map-l4 text, .dv-map-l5 text { fill: #FFFFFF; }
/* Mapa geograficzna: te same odcienie na kształtach województw, biała granica między nimi. */
.dv-map-geo path { fill: var(--acc, var(--violet)); stroke: var(--surface); stroke-width: 1; stroke-linejoin: round; }
.dv-map-l0.dv-map-geo path { fill: var(--line-soft); }
.dv-map-l1.dv-map-geo path { fill-opacity: .14; }
.dv-map-l2.dv-map-geo path { fill-opacity: .3; }
.dv-map-l3.dv-map-geo path { fill-opacity: .5; }
.dv-map-l4.dv-map-geo path { fill-opacity: .72; }
.dv-map-geo:hover path { stroke: var(--navy); stroke-width: 1.5; }
.dv-map--geo .dv-map-short { font-size: 7.5px; }
.dv-map--geo .dv-map-value { font-size: 7px; }
.dv-map-h { margin: 0 0 6px; font-size: 12px; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; }
.dv-map-top { margin: 0; padding: 0 0 0 18px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.dv-map-top li { display: flex; justify-content: space-between; gap: 10px; }
.dv-map-top .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.dv-map-legend { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; font-size: 12px; color: var(--ink-soft); }
.dv-map-scale { display: inline-flex; gap: 2px; }
.dv-map-scale i { display: block; width: 14px; height: 10px; border-radius: 2px; background: var(--acc, var(--violet)); }
.dv-map-scale .dv-map-l1 { opacity: .14; }
.dv-map-scale .dv-map-l2 { opacity: .3; }
.dv-map-scale .dv-map-l3 { opacity: .5; }
.dv-map-scale .dv-map-l4 { opacity: .72; }
.dv-map-outside { margin: 8px 0 0; font-size: 12px; }
.dv--phone .dv-map { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 640px) { .dv-size--pelna .dv-map { grid-template-columns: minmax(0, 1fr); } }

/* Stopka jak w Synevo (`.pg-footer` w silniku): granatowa karta, znak PG i nota po lewej, źródła po prawej. */
.dv-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 32px;
  margin: 48px 20px 0; padding: 22px 26px; border-radius: var(--radius); background: var(--navy); color: rgba(255, 255, 255, .72); font-size: 13px;
}
.dv-foot-brand { display: flex; align-items: center; gap: 16px; }
.dv-foot-logo { display: block; height: 30px; width: auto; }
.dv-foot-note { color: #FFFFFF; font-weight: 600; }
.dv-foot-info { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; }
.dv-foot-fresh b { color: #FFFFFF; }
/* Wąski dashboard (telefon i podgląd telefonu, M.R., 24.10: „bardziej respo", „Raport przygotowany… w tej samej linijce
   co logo"): logo i nota obok siebie, pod kreską „Dane do"; bez pustego pola pod samotnym logo. */
@container (max-width: 520px) {
  .dv-foot { flex-direction: column; align-items: stretch; gap: 12px; margin-top: 28px; padding: 16px 18px; font-size: 12.5px; }
  .dv-foot-brand { gap: 12px; }
  .dv-foot-logo { flex: none; height: 24px; }
  .dv-foot-note { min-width: 0; line-height: 1.35; }
  .dv-foot-info { gap: 6px 14px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .14); }
}

/* Zakładki jak w Synevo: biała belka (karta) przyklejona u góry, wybrana granatem z fioletowym podkreśleniem. */
.dv-tabs {
  position: sticky; top: 8px; z-index: 5; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: thin;
  margin: 18px 20px 0; padding: 4px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.dv-tab {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 13px 16px; margin-bottom: -1px;
  border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--ink-soft); font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.dv-tab:hover { color: var(--ink); }
.dv-tab[aria-selected="true"] { color: var(--navy); font-weight: 700; border-bottom-color: var(--violet); }
.dv-tab:focus-visible { outline: 2px solid var(--violet); outline-offset: -2px; border-radius: 6px; }
.dv-tab--add { color: var(--violet); font-weight: 700; }
.dv-tab--add svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2.25; }
/* Telefon: niższa belka zakładek (po regułach podstawowych — inaczej one wygrywają). */
@container (max-width: 560px) {
  .dv-tabs { top: 6px; margin: 12px 12px 0; padding: 2px 6px; }
  .dv-tab { min-height: 38px; padding: 9px 11px; font-size: 14px; }
}
/* Z paskiem zarządzania (zespół PG) zakładki przyklejają się pod nim — oba miały `top: 8px` i po przewinięciu
   zakładki chowały się pod paskiem: nie dało się przełączyć zakładki bez powrotu na górę (test 24.10). */
body.dash-page:has(.dash-manage.dm) .dv-tabs { top: 62px; }
.dv-section--tab > .dv-section-head { display: none; }
/* „Dni i godziny" (mapa ciepła 7 × 24): kolor elementu, jasność ze stopnia; obok najlepsza godzina i skala. */
.dv-heat { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 16px; align-items: start; }
.dv-heat svg { display: block; width: 100%; height: auto; }
.dv-heat-cell { fill: var(--acc, var(--violet)); }
.dv-heat-axis { fill: var(--ink-soft); font-size: 10px; font-family: inherit; }
.dv-heat-side { display: flex; flex-direction: column; gap: 12px; font-size: 13px; }
.dv-heat-best { margin: 0; display: flex; flex-direction: column; gap: 2px; }
.dv-heat-best-label { font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); }
.dv-heat-scale { display: flex; align-items: center; gap: 3px; color: var(--ink-soft); font-size: 11px; }
.dv-heat-step { display: inline-block; width: 14px; height: 10px; border-radius: 2px; background: var(--acc, var(--violet)); }
.dv-heat-step--1 { opacity: .18; } .dv-heat-step--2 { opacity: .34; } .dv-heat-step--3 { opacity: .52; } .dv-heat-step--4 { opacity: .74; } .dv-heat-step--5 { opacity: 1; }
@container (max-width: 640px) { .dv-heat { grid-template-columns: minmax(0, 1fr); } }
/* Podzakładki jak w Synevo (Google Ads → Całe konto / Ecom / Local / Lead): pigułki nad elementami; wybrana — granat. */
.dv-subtabs { display: flex; gap: 8px; margin: 0 0 14px; padding: 2px 0; overflow-x: auto; scrollbar-width: none; }
/* Podzakładka w edytorze: pusta ma krzyżyk do usunięcia; dwuklik zmienia nazwę w miejscu. */
/* Pigułka podzakładki jako cel przeciągania elementu. */
.dv-subtab.is-drop { outline: 2px dashed var(--violet); outline-offset: 2px; background: var(--accent-soft); }
.dv-subtab-wrap { display: inline-flex; align-items: center; gap: 2px; }
.dv-subtab-x { width: 24px; height: 24px; border: 0; border-radius: 50%; background: none; color: var(--ink-soft); font-size: 16px; line-height: 1; cursor: pointer; }
.dv-subtab-x:hover { background: var(--bad-soft); color: var(--bad); }
.dv-subtabs--edit input.dv-subtab-rename { width: 160px; min-height: 32px; }
.dv-subform-hint { color: var(--ink-soft); }
/* Pasek podzakładek wewnątrz siatki — cały wiersz nad elementami, które przełącza. */
.dv-grid > .dv-subtabs { grid-column: 1 / -1; margin: 6px 0 0; }
.dv-subtab {
  flex: none; min-height: 38px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink-soft); font: inherit; font-size: 14px; font-weight: 500; white-space: nowrap; cursor: pointer;
}
.dv-subtab:hover { border-color: var(--navy); color: var(--ink); }
.dv-subtab[aria-selected="true"] { background: var(--navy); border-color: var(--navy); color: #FFFFFF; font-weight: 600; }
.dv-subtab:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
/* W edytorze: „+ Podzakładka" przerywaną ramką — widać, że to dodawanie, nie podzakładka klienta. */
.dv-subtabs--edit .dv-subtab { min-height: 32px; padding: 5px 12px; font-size: 13px; }
.dv-subtab--add { display: inline-flex; align-items: center; gap: 6px; border-style: dashed; color: var(--violet); font-weight: 700; }
.dv-subtab--add svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.25; }
/* Nazwa nowej podzakładki wpisywana w miejscu przycisku; w edytorze pasek się zawija, żeby pole nie uciekało w przewijanie. */
.dv-subtabs--edit { flex-wrap: wrap; overflow: visible; }
.dv-subform { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 8px; border: 1px dashed var(--violet); border-radius: 12px; background: var(--accent-soft); }
.dv-subform input.dv-subform-input { width: 220px; flex: 0 1 220px; max-width: 100%; min-height: 32px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 13px; }
.dv-subform-ideas { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.dv-subform-label { font-size: 12px; color: var(--ink-soft); }
.dv-subform-idea { min-height: 28px; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; background: #FFFFFF; color: var(--ink); font: inherit; font-size: 12px; cursor: pointer; }
.dv-subform-idea:hover { border-color: var(--violet); color: var(--violet); }
.dv-subform-msg { flex-basis: 100%; font-size: 12px; color: var(--bad); }
.dv-subform-msg:empty { display: none; }
/* Karta dashboardu ma własne `display: flex` (mocniejsza reguła) — ukrycie podzakładki musi być co najmniej tak samo mocne. */
.dv-grid > .dv-card.dv-subhidden { display: none; }
@media print { .dv-grid > .dv-card.dv-subhidden { display: flex; } .dv-subtabs { display: none; } }
.dv-group-chip { padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--navy); font-size: 11px; font-weight: 700; white-space: nowrap; }
.dv--tabs .dv-section { margin-top: 18px; }

/* Zwijanie elementów (jak `.collapse-btn` w silniku): strzałka w rogu, zwinięty element = sam tytuł. Druk rozwija. */
.dv-collapse {
  flex: none; display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; margin: -4px -6px -4px 0;
  border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--ink-soft); cursor: pointer;
}
.dv-collapse svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s ease; }
.dv-collapse:hover { background: var(--row-hover); border-color: var(--line); color: var(--ink); }
.dv-collapse:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.dv-card.is-collapsed .dv-collapse svg { transform: rotate(180deg); }
/* „Wykres / Tabela" — ta sama forma co strzałka zwijania, obok niej. */
.dv-view-toggle {
  flex: none; display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; margin: -4px 0;
  border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--ink-soft); cursor: pointer;
}
.dv-view-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.dv-view-toggle:hover { background: var(--row-hover); border-color: var(--line); color: var(--ink); }
.dv-view-toggle:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.dv-card.is-collapsed .dv-view-toggle { display: none; }
@media print { .dv-view-toggle { display: none; } }
.dv-card.is-collapsed > :not(.dv-card-head) { display: none; }
.dv-card.is-collapsed .dv-card-head { margin-bottom: 0; }
@media (prefers-reduced-motion: reduce) { .dv-collapse svg { transition: none; } }
/* Długa lista w karcie (M.R., 26.10): pierwsze 10 pozycji, reszta pod „Pokaż wszystkie (N)" (`foldLong` w dash_view.js).
   Bez przewijania w karcie — tabela w przewijanej stronie łapała kółko myszy i palec. Wydruk / PDF — całość. */
@media screen { .dv-fold:not(.is-open) .dv-extra { display: none; } }
.dv-fold-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 40px; margin-top: 10px;
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--ink);
  font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
.dv-fold-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transform: rotate(90deg); transition: transform .15s ease; }
.dv-fold.is-open .dv-fold-btn svg { transform: rotate(-90deg); }
.dv-fold-btn:hover { background: var(--row-hover); }
.dv-fold-btn:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .dv-fold-btn svg { transition: none; } }
@media print { .dv-fold-btn { display: none; } }

.dv-err { margin: 10px 0 0; font-size: 13px; color: var(--bad); font-weight: 600; }

/* --- tryb edycji (edytor wizualny) */
.dv--edit .dv-card { cursor: pointer; transition: box-shadow .12s, outline-color .12s; outline: 2px solid transparent; outline-offset: 2px; }
.dv--edit .dv-card:hover { outline-color: var(--accent-hover); }
.dv--edit .dv-card.is-selected, .dv--edit .dv-section.is-selected { outline: 2px solid var(--violet); outline-offset: 2px; border-radius: var(--radius); }
.dv--edit .dv-card.has-errors { outline-color: var(--bad); }
.dv--edit .dv-card.is-dragging { opacity: .45; }
.dv--edit .dv-card.drop-before { box-shadow: -4px 0 0 0 var(--violet), var(--shadow); }
.dv--edit .dv-card.drop-after { box-shadow: 4px 0 0 0 var(--violet), var(--shadow); }
.dv--edit .dv-section.drop-section { outline: 2px dashed var(--violet); outline-offset: 4px; border-radius: var(--radius); }
.dv-tools { display: flex; gap: 2px; flex: none; opacity: 0; transition: opacity .12s; }
/* Na karcie pasek narzędzi leży nad treścią (prawy górny róg), żeby nie ściskał tytułu. */
.dv-card .dv-tools {
  position: absolute; top: -14px; right: 10px; z-index: 3; padding: 3px; gap: 3px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow);
}
.dv--edit .dv-card:hover .dv-tools, .dv--edit .dv-card.is-selected .dv-tools, .dv--edit .dv-card:focus-within .dv-tools,
.dv--edit .dv-section-head:hover .dv-tools, .dv--edit .dv-section.is-selected > .dv-section-head .dv-tools { opacity: 1; }
@media (hover: none) { .dv-tools { opacity: 1; } }
/* Dotyk: pasek widać zawsze, a przyciski mają 40 px — leżąc nad kartą zakrywał jej tytuł (test 24.10). Tu stoi
   w nagłówku karty jako osobny pierwszy wiersz (nad tytułem) i zawija się na wąskiej karcie. */
@media (hover: none) {
  .dv--edit .dv-card .dv-card-head { flex-wrap: wrap; }
  .dv--edit .dv-card .dv-tools {
    position: static; order: -1; flex: 1 0 100%; flex-wrap: wrap; justify-content: flex-end;
    margin: -4px 0 6px; padding: 0; border: 0; background: none; box-shadow: none;
  }
}
.dv-tool {
  display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 1px solid var(--line);
  border-radius: 7px; background: var(--surface); color: var(--ink); cursor: pointer;
}
.dv-tool svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }
.dv-tool:hover:not([disabled]) { background: var(--accent-soft); border-color: var(--navy); }
.dv-tool--bad:hover:not([disabled]) { background: var(--bad-soft); color: var(--bad); border-color: var(--bad); }
.dv-tool[disabled] { opacity: .35; cursor: default; }
.dv-grip { display: inline-flex; color: var(--ink-soft); cursor: grab; padding: 2px; }
.dv-grip svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 3; stroke-linecap: round; }
.dv-add {
  grid-column: span 12; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px;
  border: 2px dashed var(--line); border-radius: var(--radius); background: transparent; color: var(--ink-soft);
  font: inherit; font-weight: 700; font-size: 14px; cursor: pointer;
}
.dv-add svg, .dv-add-section svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.25; }
.dv-add:hover { border-color: var(--violet); color: var(--navy); background: var(--accent-soft); }
/* „Wklej" ze schowka obok „Dodaj element" / „Dodaj sekcję" (pomysł 281). */
.dv-add-row { grid-column: span 12; display: flex; flex-wrap: wrap; gap: 8px; }
.dv-add-row > .dv-add { flex: 1 1 220px; min-width: 0; }
.dv-add--paste { border-style: solid; border-color: var(--violet); color: var(--navy); }
.dv-add--paste span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dv-add-section-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 20px 0; }
.dv-add-section-row > .dv-add-section { flex: 1 1 220px; width: auto; margin: 0; }
.dv-add-section {
  display: flex; align-items: center; justify-content: center; gap: 6px; width: calc(100% - 40px); margin: 14px 20px 0; padding: 4px;
  border: 0; border-top: 1px dashed transparent; background: transparent; color: transparent; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
}
.dv-add-section:hover, .dv-add-section:focus-visible, .dv-add-section--last { border-top-color: var(--line); color: var(--ink-soft); }
.dv-add-section--last { margin-top: 22px; padding: 12px; border: 2px dashed var(--line); border-radius: var(--radius); }
.dv-add-section:hover { color: var(--navy); }

/* --- okno „Zgłoś uwagę" */
.dv-overlay { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(25, 28, 98, .45); }
.dv-dialog { width: 100%; max-width: 520px; padding: 22px; background: var(--surface); color: var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.dv-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dv-dialog h2 { margin: 0; font-size: 20px; font-weight: 800; }
.dv-dialog p { margin: 0; }
.dv-dialog .dv-icon { color: var(--ink); border-color: var(--line); }
.dv-dialog .dv-icon:hover { background: var(--accent-soft); }
.dv-dialog-where { font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.dv-dialog .notice { margin: 0; }

/* Drukuj / PDF dashboardu: na wydruku zostaje sam dashboard, w kolorach PG. */
@media print {
  body.print-dv { background: #FFFFFF; }
  body.print-dv * { visibility: hidden; }
  body.print-dv .dv, body.print-dv .dv * { visibility: visible; }
  body.print-dv .dv { position: absolute; left: 0; top: 0; width: 100%; border: 0; background: #FFFFFF; }
  /* Napis „Liczby przykładowe" zostaje na wydruku: makieta u klienta nie może udawać jego wyników. */
  body.print-dv .dv-card { break-inside: avoid; box-shadow: none; }
  body.print-dv .dv-quick, body.print-dv .dv-actions, body.print-dv .dv-panel,
  body.print-dv .dv-tools, body.print-dv .dv-add, body.print-dv .dv-add-section, body.print-dv .dv-card-feedback { display: none; }
  body.print-dv * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  /* Wydruk w trakcie wejścia albo płynącej poświaty — od razu stan końcowy. */
  body.print-dv .dv-hero, body.print-dv .dv--intro * { animation: none !important; box-shadow: none; }
}

/* ------------------------------------------------------------------ kreator: widoki, panel boczny, asystent */

body.wide .content { max-width: none; }
.b-head-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* Widok kreatora z podpisem (M.R., 24.10: „żeby każdy rozumiał"); przyciski w dymkach `.tip` zostają jednym segmentem. */
.b-mode { display: inline-flex; align-items: center; gap: 8px; }
.b-mode-label { font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.seg--modes > .tip { display: inline-flex; }
.b-undo { display: inline-flex; gap: 2px; }
.b-undo .icon svg, .icon svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; flex: none; }
.btn { gap: 6px; }
.icon--bad:hover:not([disabled]) { background: var(--bad-soft); color: var(--bad); }
.seg--small button { padding: 4px 10px; display: inline-flex; align-items: center; }
.seg--small button svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }

.b-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 18px; align-items: start; }
.b-split-preview { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
.b-visual { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.b-preview-tools { display: flex; justify-content: flex-end; margin-bottom: 8px; }
/*
 * Telefon w podglądach (`public/phone_frame.js`; M.R., 24.10: „pokazuje jakby na iPhone"): ekran 390 × 844, obudowa
 * w granacie PG z przyciskami na bokach, pasek stanu z „wyspą" (treść przewija się pod nim), pasek „home", bez paska
 * przewijania. W edytorze wizualnym ekran ma wysokość okna — strona nie rośnie przy przełączeniu na telefon.
 */
.phone { position: relative; width: max-content; max-width: 100%; margin: 0 auto; padding: 0 3px; }
.phone::before, .phone::after { content: ''; position: absolute; width: 3px; background: var(--navy-2); }
/* Lewy bok: dwa przyciski głośności (drugi — cieniem), prawy: przycisk boczny. */
.phone::before { left: 0; top: 168px; height: 62px; border-radius: 2px 0 0 2px; box-shadow: 0 78px 0 var(--navy-2); }
.phone::after { right: 0; top: 220px; height: 96px; border-radius: 0 2px 2px 0; }
.phone-body {
  position: relative; box-sizing: content-box; width: 390px; max-width: calc(100vw - 72px); height: 844px; overflow: hidden;
  border: 12px solid var(--navy); border-radius: 58px; background: var(--bg);
  box-shadow: 0 0 0 1.5px var(--navy-2), 0 30px 60px -24px rgba(25, 28, 98, .45);
}
.phone-status {
  position: absolute; inset: 0 0 auto; z-index: 10; height: 50px; display: flex; align-items: center; justify-content: space-between;
  padding: 4px 26px 0 38px; color: var(--navy); font-size: 15px; font-weight: 700; letter-spacing: -.01em; pointer-events: none;
  background: rgba(241, 241, 247, .86); backdrop-filter: blur(12px);
  /* Rozmyte tło nie przycina się do zaokrąglenia obudowy (Chrome) — pasek ma własne rogi ekranu (58 − 12 px ramki). */
  border-radius: 46px 46px 0 0;
}
.phone-island { position: absolute; left: 50%; top: 11px; width: 122px; height: 34px; margin-left: -61px; border-radius: 20px; background: var(--navy); }
.phone-icons { display: inline-flex; align-items: center; gap: 6px; }
.phone-icons svg { display: block; fill: currentColor; }
.phone-battery .phone-battery-case { fill: none; stroke: currentColor; stroke-opacity: .45; }
.phone-screen { box-sizing: border-box; height: 100%; padding: 54px 0 30px; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: none; }
.phone-screen::-webkit-scrollbar { display: none; }
.phone-screen:focus-visible { outline: 3px solid var(--violet); outline-offset: -6px; border-radius: 46px; }
.phone-home { position: absolute; left: 50%; bottom: 8px; z-index: 10; width: 134px; height: 5px; margin-left: -67px; border-radius: 3px; background: var(--navy); opacity: .85; pointer-events: none; }
/* Na ekranie telefonu dashboard bez własnej ramki i rogów — jak u klienta na telefonie. */
.phone-screen .dv { margin: 0; overflow: clip; border: 0; border-radius: 0; }
.phone-screen .dv--phone { max-width: none; }
/* „Zapytaj o wyniki" w telefonie: okrągła ikona w rogu ekranu, jak u klienta (na dashboardzie `position: fixed`). */
.phone-screen .dv-chat { position: sticky; bottom: 16px; z-index: 5; margin: 16px; }
.phone-screen .dv-chat-launcher { width: 52px; height: 52px; padding: 0; justify-content: center; font-size: 0; gap: 0; }
.phone-screen .dv-chat-launcher svg { width: 22px; height: 22px; }
.phone-screen .dv-chat-panel { width: min(400px, 100%); }
.b-preview .phone-body { height: min(844px, calc(100vh - 170px)); min-height: 520px; }
/* Komputer: „Zapytaj" w linii z kartami (sekcje mają 20 px od krawędzi), nie przy samej krawędzi podglądu. */
.b-preview > .dv:not(.dv--phone) .dv-chat { margin-right: 20px; }
@media (max-width: 1100px) {
  .b-split, .b-visual { grid-template-columns: minmax(0, 1fr); }
  .b-split-preview { position: static; max-height: none; }
}
.b-inspector {
  position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto;
  padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow);
}
.b-inspector-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.b-inspector h3 { margin: 0; font-size: 16px; font-weight: 800; }
.b-inspector .b-fields { grid-template-columns: minmax(0, 1fr); }
.b-inspector--hint { background: var(--accent-soft); border-color: var(--accent-hover); }
.b-tips { margin: 8px 0 0; padding-left: 18px; font-size: 14px; display: flex; flex-direction: column; gap: 6px; }
.b-type-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
/* Karta po najechaniu na rodzaj elementu: nazwa, opis i podgląd (612 px rysunku w ramce ~306 px — skala 0,5). */
.type-hover {
  position: fixed; z-index: 60; width: 344px; padding: 12px 12px 10px; pointer-events: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 6px 14px rgba(25, 28, 98, .1), 0 18px 40px rgba(25, 28, 98, .18);
}
.type-hover > b { display: block; font-size: 15px; color: var(--navy); }
.type-hover > p { margin: 2px 0 8px; font-size: 13px; line-height: 1.45; color: var(--ink-soft); }
.type-hover-frame {
  height: 172px; overflow: hidden; border-radius: var(--radius-sm); background: var(--bg); padding: 6px;
  -webkit-mask-image: linear-gradient(180deg, var(--navy) 82%, transparent); mask-image: linear-gradient(180deg, var(--navy) 82%, transparent);
}
.type-hover-mini { width: 612px; transform: scale(.5); transform-origin: top left; padding: 0; border: 0; background: transparent; overflow: visible; }
.type-hover-mini .dv-card { margin: 0; box-shadow: none; }
@media (hover: none) { .type-hover { display: none; } }
.b-type-card {
  display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; column-gap: 10px; text-align: left;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer;
}
.b-type-card .b-type-icon { grid-row: span 2; font-size: 20px; color: var(--violet); }
.b-type-card small { color: var(--ink-soft); font-size: 12px; }
.b-type-card:hover:not([disabled]) { border-color: var(--navy); background: var(--accent-soft); }
.b-type-card[disabled] { opacity: .5; cursor: default; }
.b-type-icon { display: inline-block; width: 1.2em; text-align: center; color: var(--violet); font-weight: 800; }
.b-type { gap: 4px; }

.b-starters { margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: var(--row-hover); }
.b-starters summary { cursor: pointer; font-weight: 800; font-size: 14px; }
.b-starter-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 8px; margin-top: 10px; }
.b-starter {
  display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; cursor: pointer;
}
.b-starter small { color: var(--ink-soft); font-size: 12px; }
.b-starter:hover:not([disabled]) { border-color: var(--navy); background: var(--accent-soft); }

.b-list-tools { display: flex; gap: 14px; justify-content: flex-end; margin-bottom: 8px; font-size: 13px; }
/* Nagłówki sekcji i elementów zawijają się w wąskiej kolumnie (widok „Obok siebie") zamiast ucinać tytuł. */
.b-section-head, .b-element-head { flex-wrap: wrap; }
.b-section-titles { flex: 1 1 200px; }
.b-element-title { flex: 1 1 180px; }
.b-split-list .b-element-head .tag { order: -1; }
/* „Obok siebie": w każdym wierszu ten sam układ — rodzaj i przyciski w pierwszej linii, nazwa pod nimi na całą
   szerokość. Bez tego krótki rodzaj („Kafle KPI") ciągnął nazwę do pierwszej linii, a długi nie (test 24.10). */
.b-split-list .b-element-head .b-type-chip { margin-right: auto; }
.b-split-list .b-element-head .b-element-title { order: 5; flex-basis: 100%; }
.b-grip { display: inline-flex; color: var(--ink-soft); cursor: grab; }
.b-grip svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 3; stroke-linecap: round; }
/* `flex: 1 1 200px` (nie samo `flex: 1`) — samo `1` zerowało podstawę z reguły wyżej i w „Obok siebie" pola tytułu
   ściskały się do ~115 px („Podsumowa…") zamiast zejść do nowej linii (test 24.10). */
.b-section-titles { flex: 1 1 200px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.b-section-titles input { width: 100%; }
.b-title-en { font-size: 13px; }
.b-section.has-errors { border-color: var(--bad); }
.b-section.drop-section { outline: 2px dashed var(--violet); outline-offset: 2px; }
.b-section.is-dragging, .b-element.is-dragging { opacity: .45; }
.b-element.drop-before { box-shadow: 0 -3px 0 0 var(--violet); }
.b-element.has-errors { border-color: var(--bad); }
.b-element.is-open { border-color: var(--line); box-shadow: var(--shadow); }
.b-element-title {
  flex: 1 1 180px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left;
  padding: 2px 4px; border: 0; background: transparent; color: var(--ink); font: inherit; cursor: pointer; border-radius: 6px;
}
.b-element-title b { font-size: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-element-title small { font-size: 12px; color: var(--ink-soft); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-element-title:hover { background: var(--row-hover); }
.b-collapsed { margin: 8px 0 0; font-size: 13px; }
.b-form { margin-top: 10px; }
.b-toggles { display: flex; flex-wrap: wrap; gap: 8px 18px; }

.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-ui { position: relative; flex: none; width: 34px; height: 20px; border-radius: 999px; background: var(--line); transition: background .15s; }
.switch-ui::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #FFFFFF; transition: transform .15s; box-shadow: 0 1px 2px rgba(25, 28, 98, .25); }
.switch input:checked + .switch-ui { background: var(--navy); }
.switch input:checked + .switch-ui::after { transform: translateX(14px); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--violet); outline-offset: 2px; }
/* Opcja, która przy tych ustawieniach nie działa: wyszarzona, powód w dymku (`data-hint`). */
.switch.is-off { cursor: not-allowed; color: var(--ink-soft); }
.switch.is-off .switch-ui { opacity: .5; }
.switch--block { display: flex; align-items: flex-start; }
.switch--block .switch-ui { margin-top: 2px; }

.b-block { padding: 14px 0; border-top: 1px solid var(--line-soft); }
.b-block:first-child { border-top: 0; padding-top: 4px; }
.b-block h3 { margin: 0 0 8px; font-size: 15px; font-weight: 800; }
.b-block .grid-2 { margin-top: 12px; }
.b-block .hint { margin: 8px 0 0; font-size: 13px; color: var(--ink-soft); }
.radios { display: flex; flex-direction: column; gap: 6px; }
.radio { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.radio input { accent-color: var(--navy); margin: 0; }
.radio-inline { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.radio-inline input[type="date"] { font: inherit; font-size: 14px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); }

.b-goal-rows { display: flex; flex-direction: column; gap: 10px; }
.b-goal-row { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--row-hover); }
.b-goal-row--stale { background: var(--bad-soft); }
.b-goal-row-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.b-goal-row .hint { display: block; margin-top: 6px; font-size: 13px; }
.b-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font: inherit; font-size: 13px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink);
}
.chip-x { border: 0; background: transparent; color: var(--ink-soft); font-size: 15px; line-height: 1; cursor: pointer; padding: 0 2px; }
.chip-x:hover { color: var(--bad); }
.chip--add { cursor: pointer; }
.chip--add:hover { border-color: var(--navy); background: var(--accent-soft); }
.chip--known { border-color: var(--violet); }
.b-action-add { display: flex; gap: 8px; margin-top: 8px; }
.b-action-add input { flex: 1; }
.b-suggest { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.b-suggest .hint { margin: 0; flex-basis: 100%; }

/* --- zakładki strony dashboardu i pasek zapisu */
/* Zakładki w jednym rzędzie; gdy brakuje miejsca — przewijają się w bok, zamiast spadać do drugiej linii. */
.page-tabs { display: flex; gap: 4px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 0 16px; border-bottom: 1px solid var(--line); }
.page-tabs::-webkit-scrollbar { display: none; }
.page-tab { flex: none; white-space: nowrap; }
/* Nagłówek strony dashboardu: status, „Otwórz dashboard", „Więcej" w jednej linii po prawej. */
.page-head-side { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.page-head-side .btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }
.page-more { position: relative; }
/* Telefon: przycisk „Więcej" spada do lewej, menu przy prawej krawędzi wychodziło za ekran — menu na całą szerokość. */
@media (max-width: 720px) {
  .page-head-side { position: relative; }
  .page-more { position: static; }
  .page-head-side .page-more-menu { left: 0; right: 0; min-width: 0; }
}
.page-more > summary { display: inline-flex; gap: 6px; }
.page-more > summary::before { display: none; }
.page-more-caret { font-size: 11px; }
.page-more-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 25; min-width: 260px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow);
}
.page-more-item {
  display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: transparent;
  font: inherit; color: var(--ink); text-align: left; text-decoration: none; cursor: pointer;
}
.page-more-item:hover { background: var(--row-hover); }
.page-more-item svg { flex: none; width: 16px; height: 16px; margin-top: 2px; stroke: currentColor; fill: none; stroke-width: 2; }
.page-more-item b { display: block; font-size: 14px; }
.page-more-item small { display: block; font-size: 12px; color: var(--ink-soft); }
.page-tab {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; margin-bottom: -1px;
  border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--ink-soft);
  font: inherit; font-weight: 700; font-size: 14px; text-decoration: none; cursor: pointer;
}
.page-tab svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.page-tab:hover { color: var(--ink); }
.page-tab[aria-selected="true"] { color: var(--navy); border-bottom-color: var(--violet); }
.page-tab--link { margin-left: auto; }
.dash-form--visual > .card:not(.b-card-layout), .dash-form--visual > .form-toc { display: none; }
/* Asystent zostaje w edytorze wizualnym (M.R., 24.10): poprawki słowami tam, gdzie się układa dashboard. */
.dash-form--visual > .card.as-card { display: block; }
.dash-form--visual .b-card-layout > p.muted, .dash-form--visual .b-starters { display: none; }
.actions--sticky {
  position: sticky; bottom: 0; z-index: 10; margin: 8px -4px 0; padding: 12px 16px;
  background: rgba(255, 255, 255, .94); border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}
/* Bez zmian pasek jest spokojny i niski (nie zasłania formularza), po zmianie — pełny z granatowym przyciskiem. */
.actions--sticky.is-clean { padding-block: 6px; box-shadow: none; background: rgba(255, 255, 255, .8); }
.save-state { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.save-state::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--good); }
.save-state--dirty { color: var(--warn); }
.save-state--dirty::before { background: var(--pg-media); }

/* Spis kart ustawień: przyklejony u góry formularza, przewija się w bok na wąskim ekranie. */
.form-toc {
  position: sticky; top: 0; z-index: 9; display: flex; gap: 4px; overflow-x: auto; margin: 0 -4px 12px; padding: 8px;
  background: rgba(255, 255, 255, .94); border: 1px solid var(--line-soft); border-radius: var(--radius); backdrop-filter: blur(6px);
  scrollbar-width: none;
}
.form-toc::-webkit-scrollbar { display: none; }
.form-toc-link { flex: none; padding: 6px 12px; border: 0; border-radius: 999px; background: transparent; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-soft); cursor: pointer; white-space: nowrap; }
.form-toc-link:hover { background: var(--row-hover); color: var(--navy); }
.form-toc-link.is-active { background: var(--accent-soft); color: var(--navy); }
.dash-form > section.card { scroll-margin-top: 72px; }
/* Części ustawień jako zakładki (M.R., 24.10): widać jedną. Edytor wizualny ma własny widok i tego nie dziedziczy. */
.dash-form--parts:not(.dash-form--visual) > .card:not(.is-part-on) { display: none; }
.dash-form--parts > .form-toc { scroll-margin-top: 8px; }
.form-toc-link:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }

/* --- powiadomienia (dzwonek w pasku bocznym) */
/* Pozycja menu jak link (przycisk bez wyglądu przycisku): ikona, „Powiadomienia", licznik. */
button.side-link { width: 100%; border: 0; background: transparent; font: inherit; font-weight: 600; font-size: 14px; text-align: left; cursor: pointer; }
.side-bell[aria-expanded="true"] { background: rgba(255, 255, 255, .12); color: #FFFFFF; }
.side-link .bell-count, .side-link[aria-current="page"] .bell-count { background: var(--violet); color: #FFFFFF; }
.side-bell--bad .bell-count { background: var(--pg-media); }
.bell-count[hidden] { display: none; }
.notif {
  position: fixed; left: 270px; top: 14px; z-index: 60; width: min(400px, calc(100vw - 24px)); max-height: min(620px, calc(100vh - 28px));
  display: flex; flex-direction: column; overflow: hidden;
  padding: 14px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(25, 28, 98, .22);
}
/* Przewija się sama lista; nagłówek i „Ustawienia" zostają w oknie (M.R., 27.10). */
.notif > * { flex: none; }
.notif-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; margin: 0 -6px; padding: 0 6px 4px; overscroll-behavior: contain; }
.notif-scroll > .notif-group:first-child { margin-top: 4px; }
.notif .notif-prefs[open] { max-height: 48%; overflow-y: auto; flex-shrink: 0; }
.notif .notif-body > span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.notif-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.notif-head h2 { margin: 0; flex: 1; font-size: 17px; font-weight: 800; }
.notif-head .link-btn { font-size: 13px; }
.notif-group { margin: 12px 0 6px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.notif-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.notif-item, .toast {
  display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 12px;
  border-radius: var(--radius-sm); border: 1px solid var(--line-soft); text-decoration: none; color: var(--ink);
}
.notif-item:hover { background: var(--row-hover); }
.notif-row { position: relative; }
.notif-row .notif-item { padding-right: 36px; }
.notif-del {
  position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border: 0; border-radius: 7px; background: transparent; color: var(--ink-soft); cursor: pointer;
}
.notif-del svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.25; }
.notif-del:hover { background: var(--bad-soft); color: var(--bad); }
.notif-del:focus-visible { outline: 2px solid var(--violet); outline-offset: 1px; }
.notif-tools { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 4px; font-size: 13px; }
.link-btn--bad { color: var(--bad); }
.notif-foot { margin: 12px 0 0; font-size: 12px; color: var(--ink-soft); }
.notif-system { margin-top: 16px; border-top: 1px solid var(--line-soft); font-size: 13px; }
.notif-system .hint { margin: 4px 0 0; }
/* „Co i kiedy" pod przełącznikiem Windows (M.R., 26.10): rodzaje jako przełączane chipy, cisza w jednym wierszu. */
.notif-prefs { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.notif-prefs > summary { font-size: 14px; font-weight: 600; color: var(--navy); }
.notif-prefs-h { margin: 16px 0 8px; font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.notif-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.notif-kinds .check { white-space: normal; }
/* Dymki Windows po włączeniu: cisza i próbne jako jedna grupa na jasnym tle, elementy w naturalnej szerokości. */
.notif-windows { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 12px; padding: 12px; border-radius: 12px; background: var(--bg); }
.notif-windows .hint { margin: 0; }
.notif-quiet { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding-left: 4px; }
.notif-quiet select { width: auto; flex: none; min-width: 96px; }
/* Listy godzin obok przycisków-chipów tej samej wysokości (na dotyku zostaje 40 px). */
@media (min-width: 721px) and (pointer: fine) { .notif-quiet select { height: 32px; min-height: 0; padding-block: 0; } }
.notif-windows .btn { margin-top: 4px; background: var(--surface); }
/* Wyłączone (cisza wyłączona, alarmy zawsze włączone) — przygaszone, bez kursora klikania. */
.notif-prefs .check:has(input:disabled), .notif-quiet:has(select:disabled) { opacity: .55; cursor: default; }
.notif-quiet select:disabled { cursor: default; }
@media (max-width: 720px), (pointer: coarse) { .notif-prefs .check { min-height: 40px; } }
.notif-item--bad { background: var(--bad-soft); }
.notif-item.is-seen { border-left-color: var(--line); background: transparent; opacity: .8; }
.notif-icon { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 9px; background: var(--accent-soft); color: var(--navy); }
.notif-item--bad .notif-icon { background: #FFFFFF; color: var(--bad); }
.notif-icon svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2; }
.notif-body { display: flex; flex-direction: column; gap: 2px; font-size: 13px; min-width: 0; overflow-wrap: anywhere; }
.notif-body b { font-size: 14px; }
.notif-empty { margin: 8px 0; font-size: 14px; }
.toast {
  position: fixed; right: 18px; bottom: 18px; z-index: 70; width: min(380px, calc(100vw - 36px));
  background: var(--surface); box-shadow: 0 12px 40px rgba(25, 28, 98, .22);
}
@media (max-width: 860px) {
  button.side-link { width: auto; }
  .notif { left: 12px; right: 12px; top: 84px; width: auto; max-height: calc(100vh - 96px); max-height: calc(100dvh - 96px); }
}

/* --- wąski ekran (tablet w pionie, telefon) */
.seg button { white-space: nowrap; }
@media (max-width: 900px) {
  /* Dwie kolumny obok siebie i druga karta przeglądarki nie mają sensu na wąskim ekranie. */
  .seg-obok, .b-newtab { display: none; }
  .b-inspector--hint { display: none; }
  /* Ustawienia klikniętego elementu jako panel od dołu ekranu, nad paskiem zapisu. */
  .b-visual .b-inspector {
    position: fixed; left: 8px; right: 8px; bottom: 8px; top: auto; z-index: 30; max-height: 64vh;
    box-shadow: 0 -6px 30px rgba(25, 28, 98, .25);
  }
}
@media (max-width: 720px) {
  .card { padding: 16px; }
  .actions--sticky { padding: 8px 10px; margin: 8px -6px 0; gap: 8px; }
  .page-tabs > .page-tab { padding: 8px 10px; font-size: 13px; white-space: nowrap; }
  .page-tabs > .page-tab svg { display: none; }
  .page-tab--link { margin-left: 0; }
  .page-tabs-links { flex-basis: 100%; margin-left: 0; gap: 0 2px; border-top: 1px solid var(--line-soft); }
  .page-tabs-links .page-tab { padding: 8px 8px; font-size: 13px; white-space: nowrap; }
  .b-head-tools { width: 100%; justify-content: space-between; }
  /* Margines 12 px okładki, sekcji i stopki — w `@container (max-width: 560px)` przy `.dv-actionbar` (jeden próg
     dla wszystkich pasów dashboardu; tu, od szerokości okna, rozjeżdżał się z zakładkami i wierszem kont). */
  /* Pasek, tytuł i nazwa okładki na telefonie — w `@container (max-width: 560px)` (to samo też w ramce telefonu w podglądzie). */
  .dv-panel { left: 8px; right: 8px; }
  .as-msg { max-width: 100%; }
}

/* --- edytor wizualny i lista: szybkie akcje, panel boczny, struktura, pasek „Cofnij" */
.dv-tool--text { width: auto; min-width: 28px; padding: 0 7px; font: inherit; font-size: 12px; font-weight: 800; }
.dv-count { font-size: 12px; font-weight: 700; color: var(--ink-soft); padding: 2px 8px; border-radius: 999px; background: var(--line-soft); }
.dv-badge {
  flex: none; display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 999px;
  background: var(--pg-media); color: #FFFFFF; font-size: 12px; font-weight: 800;
}
.dv-badge svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2.25; }
.dv--edit .dv-editable-title { cursor: text; border-radius: 4px; }
.dv--edit .dv-card.is-selected .dv-editable-title:hover, .dv--edit .dv-section-head h2:hover { background: var(--accent-soft); box-shadow: 0 0 0 4px var(--accent-soft); }
.dv-inline {
  flex: 1; min-width: 0; font: inherit; font-size: 15px; font-weight: 800; padding: 4px 8px; margin: -5px -9px;
  border: 2px solid var(--violet); border-radius: 8px; color: var(--ink); background: var(--surface);
}
.dv-section-head .dv-inline { font-size: 19px; }
.dv-add--first { min-height: 120px; border-color: var(--violet); color: var(--navy); background: var(--accent-soft); }
@keyframes pg-flash { 0% { box-shadow: 0 0 0 4px var(--pink), var(--shadow); } 100% { box-shadow: var(--shadow); } }
.is-flash { animation: pg-flash 1.4s ease-out 1; }
@media (prefers-reduced-motion: reduce) { .is-flash { animation: none; outline: 2px solid var(--pink); } }

.b-preview-tools { gap: 8px; align-items: center; flex-wrap: wrap; }
/* Dymki nad podglądem w górę — pod spodem zaczyna się granatowy pasek dashboardu. */
.b-preview-tools .tip::after { top: auto; bottom: calc(100% + 6px); }
.b-preview-hint { margin-right: auto; font-size: 12px; }
.btn.is-on { background: var(--accent-soft); border-color: var(--navy); }
.b-kicker { margin: 0; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.b-inspector-head { align-items: center; }
.b-inspector-title { flex: 1; min-width: 0; }
.b-inspector-title h3 { overflow-wrap: anywhere; }
.b-type-icon--big { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); flex: none; }
.b-type-icon svg, .b-type-chip svg, .type-pick-btn svg, .b-type svg, .b-outline-item svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linejoin: round; stroke-linecap: round; flex: none; }
.b-inspector-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
/* Panel boczny kończy się nad przyklejonym paskiem zapisu — jego przyciski zawsze widać. */
.b-visual .b-inspector { max-height: calc(100vh - 112px); }
.b-inspector-actions { position: sticky; bottom: -16px; margin: 12px -16px -16px; padding: 12px 16px; background: var(--surface); border-top: 1px solid var(--line-soft); }
.b-group { border: 0; margin: 0 0 6px; padding: 12px 0 0; border-top: 1px solid var(--line-soft); min-width: 0; }
.b-group:first-child { border-top: 0; padding-top: 0; }
.b-group legend { padding: 0; margin-bottom: 8px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--violet); }
.b-group .b-fields { margin-top: 0; }
/* Progi KPI w ustawieniach elementu: zdanie o kolorach, pod nim pola z równym odstępem (M.R., 28.10: złe odległości). */
.b-thresholds { min-width: 0; }
.b-thresholds > summary { font-size: 14px; }
.b-thresholds .b-thresholds-hint { margin: 0 0 14px; }
.b-thresholds > summary + .b-thresholds-hint { margin-top: 10px; }
.b-group .b-thresholds .b-fields { margin: 0; }
.type-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.type-pick-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 6px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; text-align: center;
}
.type-pick-btn svg { width: 22px; height: 22px; color: var(--violet); }
.type-pick-btn:hover:not([disabled]) { border-color: var(--navy); }
.type-pick-btn[aria-checked="true"] { border-color: var(--navy); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--navy); }
.type-pick-btn[disabled] { opacity: .45; cursor: default; }
.seg--field { display: flex; flex-wrap: wrap; border-radius: var(--radius-sm); }
.seg--field button { display: inline-flex; align-items: center; gap: 6px; border-radius: 8px; padding: 6px 12px; }
.seg--field button svg.pi { width: 15px; height: 15px; }
.seg--field button[disabled] { opacity: .45; cursor: default; }
.b-outline { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.b-outline ul { list-style: none; margin: 4px 0 0 8px; padding: 0 0 0 8px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.b-outline-section, .b-outline-item {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border: 0; border-radius: 8px; background: transparent;
  color: var(--ink); font: inherit; font-size: 13px; text-align: left; cursor: pointer;
}
.b-outline-section { font-size: 14px; justify-content: space-between; }
.b-outline-item svg { width: 15px; height: 15px; color: var(--violet); }
.b-outline-item span:not(.dv-badge) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-outline-section:hover, .b-outline-item:hover { background: var(--row-hover); }
.b-outline-item.has-errors { color: var(--bad); }
.b-outline-empty { margin: 2px 0 0 18px; font-size: 12px; }
.b-shortcuts { margin-top: 14px; font-size: 13px; }
.b-shortcuts summary { cursor: pointer; font-weight: 700; color: var(--ink-soft); }
.b-shortcuts dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; margin: 10px 0 0; }
.b-shortcuts dd { margin: 0; color: var(--ink-soft); }
kbd { font: inherit; font-size: 11px; font-weight: 700; padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; background: var(--surface); white-space: nowrap; }
.b-remarks { margin: 10px 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--bad-soft); border: 1px solid color-mix(in srgb, var(--pg-media) 30%, transparent); }
.b-remarks-h { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; font-size: 13px; font-weight: 800; }
.b-remarks-h svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }
.b-remarks ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.b-remarks li p { margin: 0; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.b-remarks-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.b-type-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 7px; border-radius: 999px; background: var(--accent-soft); font-size: 12px; font-weight: 700; color: var(--navy); white-space: nowrap; }
.b-type-chip svg { width: 15px; height: 15px; color: var(--violet); }
.size-chip {
  flex: none; min-width: 42px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
  color: var(--ink); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer;
}
.size-chip:hover { border-color: var(--navy); background: var(--accent-soft); }
.b-insert { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; padding: 10px; border: 2px dashed var(--violet); border-radius: var(--radius-sm); background: var(--accent-soft); font-size: 13px; }
.snack-host { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 40; }
.snack {
  display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 16px; border-radius: 12px; background: var(--navy); color: #FFFFFF;
  font-size: 14px; box-shadow: 0 10px 30px rgba(25, 28, 98, .3); max-width: calc(100vw - 32px);
}
.snack-undo { border: 0; background: #FFFFFF; color: var(--navy); font: inherit; font-weight: 800; font-size: 13px; padding: 6px 12px; border-radius: 8px; cursor: pointer; }
.snack-close { display: inline-flex; border: 0; background: transparent; color: rgba(255, 255, 255, .8); cursor: pointer; padding: 4px; }
.snack-close svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.25; }
@media (max-width: 900px) { .b-inspector--outline { display: none; } }

/* --- edytor wizualny szablonu silnika (Synevo, Pstryk): pasek zakładek jak u klienta */
.card--tabs-visual { display: none; }
.dash-form--visual .card--tabs-visual { display: block; }
.dash-form--visual .card--tabs-visual > p.muted { display: block; }
.tv { display: grid; gap: 16px; }
.tv-scope { display: grid; gap: 6px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--row-hover); border: 1px solid var(--line-soft); font-size: 14px; }
.tv-scope p { display: flex; gap: 8px; align-items: flex-start; margin: 0; }
.tv-scope p svg { flex: none; width: 16px; height: 16px; margin-top: 2px; stroke: var(--violet); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tv-scope details { font-size: 13px; color: var(--ink-soft); }
.tv-scope summary { cursor: pointer; font-weight: 700; color: var(--ink); width: fit-content; }
.tv-scope ul { margin: 6px 0 0; padding-left: 20px; }
.tv-preview { display: grid; gap: 0; }
.tv-preview > .label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); margin-bottom: 6px; }
.tv-preview > small { margin-top: 6px; }
.tv-bar { padding: 14px 18px; border-radius: var(--radius) var(--radius) 0 0; background: var(--navy); color: #FFFFFF; }
.tv-strip {
  display: flex; gap: 4px; overflow-x: auto; padding: 0 10px; min-height: 46px; align-items: stretch;
  background: #FFFFFF; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius);
}
.tv-strip-tab {
  flex: none; border: 0; background: none; padding: 0 12px; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink-soft);
  border-bottom: 3px solid transparent; cursor: pointer; white-space: nowrap;
}
.tv-strip-tab:hover { color: var(--ink); }
.tv-strip-tab.is-active { color: var(--navy); font-weight: 800; border-bottom-color: var(--violet); }
.tv-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.tv-tools-row { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.tv-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.tvr-group {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 8px 14px; background: var(--row-hover);
  font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); border-top: 1px solid var(--line-soft);
}
.tvr-group:first-child { border-top: 0; }
.tvr-group small { font-size: 12px; font-weight: 500; text-transform: none; letter-spacing: 0; }
.tvr {
  display: grid; grid-template-columns: 20px 24px minmax(0, 1fr) auto 72px; align-items: center; gap: 10px;
  padding: 10px 14px; background: #FFFFFF; border-top: 1px solid var(--line-soft);
}
.tvr[draggable="true"] { cursor: grab; }
.tvr.is-dragging { opacity: .5; }
.tvr.drop-before { box-shadow: inset 0 3px 0 0 var(--pink); }
.tvr-handle { color: var(--ink-soft); display: inline-flex; }
.tvr-handle svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 3; stroke-linecap: round; }
.tvr-pos {
  display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent-soft); color: var(--navy); font-size: 12px; font-weight: 800;
}
.tvr-pos:empty { background: none; }
.tvr-main { display: grid; gap: 2px; min-width: 0; }
.tvr-main b { font-size: 15px; }
.tvr-main small { font-size: 13px; color: var(--ink-soft); }
.tvr-reason { display: inline-flex; align-items: center; gap: 4px; color: var(--warn) !important; }
.tvr-reason svg { width: 14px; height: 14px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tvr.is-off .tvr-main b { color: var(--ink-soft); }
.tvr.is-missing { background: var(--row-hover); }
.tvr-switch { font-size: 13px; font-weight: 700; }
.tvr-state { min-width: 62px; }
.tvr-switch input:disabled + .switch-ui { opacity: .5; cursor: not-allowed; }
.tvr-move { display: inline-flex; gap: 4px; justify-content: flex-end; }
.tvr-move .icon svg { width: 16px; height: 16px; }
.tabs-summary { display: grid; gap: 10px; justify-items: start; }
.tabs-summary-list { margin: 0; padding-left: 22px; display: grid; gap: 2px; font-weight: 700; }
.tabs-summary p { margin: 0; }
@media (max-width: 640px) {
  .tvr { grid-template-columns: 24px minmax(0, 1fr) auto; grid-template-areas: "pos main move" "pos switch switch"; row-gap: 6px; }
  .tvr-handle { display: none; }
  .tvr-pos { grid-area: pos; align-self: start; }
  .tvr-main { grid-area: main; }
  .tvr-switch { grid-area: switch; }
  .tvr-move { grid-area: move; align-self: start; }
  .tv-tools-row { margin-left: 0; }
}
.chip[disabled] { opacity: .55; cursor: default; }

/* --- asystent */
.as-card summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; }
.as-card summary::-webkit-details-marker { display: none; }
.as-title { display: inline-flex; align-items: center; gap: 8px; font-size: 17px; }
.as-title svg { width: 20px; height: 20px; stroke: var(--violet); fill: none; stroke-width: 2; }
.as-card[open] summary { margin-bottom: 8px; }
.as-card > p { margin: 0 0 8px; font-size: 14px; }
.as-log { list-style: none; margin: 10px 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 360px; overflow-y: auto; }
.as-msg { max-width: 88%; padding: 10px 14px; border-radius: 14px; font-size: 14px; }
.as-msg p { margin: 4px 0 0; white-space: pre-wrap; }
.as-msg--user { align-self: flex-end; background: var(--navy); color: #FFFFFF; border-bottom-right-radius: 4px; }
.as-msg--assistant { align-self: flex-start; background: var(--accent-soft); border-bottom-left-radius: 4px; }
.as-who { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .75; }
.as-list { margin: 6px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; }
.as-applied { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 13px; }
.as-input { display: flex; flex-direction: column; gap: 8px; }
.as-send { display: flex; align-items: center; gap: 10px; }

/* --- uwagi klientów */
.side-count--bad, .side-link[aria-current="page"] .side-count--bad { background: var(--pg-media); color: #FFFFFF; }
/*
 * Skrzynka uwag (M.R., 24.10: „efekt wow, pełna profeska") — `public/feedback_inbox.js`. Trzy kolumny: lista
 * rozmów, rozmowa z polem pisania, kontekst. Układ od szerokości
 * skrzynki (container), nie okna — obok bocznego panelu skrzynka jest węższa niż okno.
 */
.ib { --ib-h: clamp(560px, calc(100vh - 220px), 960px); position: relative; container-type: inline-size; }

.ib-shell {
  display: grid; grid-template-columns: 316px minmax(0, 1fr) 288px; height: var(--ib-h); overflow: hidden;
  border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow);
}
.ib svg { stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* lista rozmów */
.ib-side { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line-soft); }
.ib-tabs { display: flex; gap: 2px; padding: 6px 8px 0; border-bottom: 1px solid var(--line-soft); }
.ib-tab {
  flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 5px; margin-bottom: -1px; padding: 11px 4px 12px;
  border: 0; border-bottom: 2px solid transparent; background: transparent; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--ink-soft);
  white-space: nowrap; cursor: pointer;
}
.ib-tab:hover { color: var(--ink); }
.ib-tab[aria-selected="true"] { border-bottom-color: var(--violet); color: var(--navy); }
.ib-tab:focus-visible { outline: 2px solid var(--violet); outline-offset: -2px; border-radius: 6px; }
.ib-count { min-width: 18px; padding: 0 5px; border-radius: 999px; background: var(--line-soft); font-size: 11px; line-height: 18px; color: var(--ink-soft); }
.ib-tab[aria-selected="true"] .ib-count { background: var(--navy); color: #FFFFFF; }
.ib-count.is-hot, .ib-tab[aria-selected="true"] .ib-count.is-hot { background: var(--pg-media); color: #FFFFFF; }

/* Jeden kolor na status w całej skrzynce (lista, nagłówek, menu, historia): Nowa = pomarańcz „media",
   W realizacji = fiolet „data", Zrobione = zieleń, Odrzucone = szarość. */
.ib-pill--bad, .ib-status--bad, .ib-event--bad { --ib-tone: var(--pg-media); --ib-tint: rgba(238, 73, 46, .12); }
.ib-pill--warn, .ib-status--warn, .ib-event--warn { --ib-tone: var(--violet); --ib-tint: rgba(147, 93, 223, .16); }
.ib-pill--good, .ib-status--good, .ib-event--good { --ib-tone: var(--good); --ib-tint: var(--good-soft); }
.ib-pill--off, .ib-status--off, .ib-event--off { --ib-tone: var(--ink-soft); --ib-tint: var(--line-soft); }
.ib-tools { display: flex; gap: 8px; padding: 10px; border-bottom: 1px solid var(--line-soft); }
.ib-search { position: relative; flex: 1; min-width: 0; }
.ib-search svg { position: absolute; top: 50%; left: 11px; width: 15px; height: 15px; transform: translateY(-50%); color: var(--ink-soft); pointer-events: none; }
.ib-search input { width: 100%; height: 34px; padding: 0 10px 0 32px; border: 1px solid transparent; border-radius: 999px; background: var(--bg); font-size: 13.5px; }
.ib-search input:focus { border-color: var(--violet); background: var(--surface); outline: none; }
.ib-dash {
  width: auto; max-width: 128px; height: 34px; padding: 0 26px 0 12px; overflow: hidden; line-height: 32px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  white-space: nowrap; text-overflow: ellipsis; background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%;
}
.ib-list { flex: 1; min-height: 0; overflow-y: auto; padding: 6px; }
.ib-row {
  position: relative; display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 10px; width: 100%; padding: 12px 22px 12px 10px;
  border: 0; border-radius: 12px; background: transparent; font: inherit; color: var(--ink); text-align: left; cursor: pointer; transition: background .15s;
}
.ib-row + .ib-row { margin-top: 2px; }
.ib-row:hover { background: var(--row-hover); }
.ib-row[aria-selected="true"] { background: var(--accent-soft); }
.ib-row[aria-selected="true"]::before { content: ''; position: absolute; top: 12px; bottom: 12px; left: 0; width: 3px; border-radius: 3px; background: var(--violet); }
.ib-row:focus-visible { outline: 2px solid var(--violet); outline-offset: -2px; }
.ib-row.is-new::after { content: ''; position: absolute; top: 50%; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--pg-media); box-shadow: 0 0 0 3px rgba(238, 73, 46, .16); }
.ib-row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ib-row-top { display: flex; align-items: baseline; gap: 8px; }
.ib-row-name { flex: 1; min-width: 0; overflow: hidden; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.ib-row.is-new .ib-row-name { font-weight: 800; }
.ib-row-time { font-size: 12px; color: var(--ink-soft); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ib-row-time.is-late { font-weight: 700; color: var(--bad); }
.ib-row-dash { overflow: hidden; font-size: 12px; font-weight: 700; color: var(--violet); text-overflow: ellipsis; white-space: nowrap; }
.ib-row-text { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 13px; line-height: 1.4; color: var(--ink-soft); }
.ib-row.is-new .ib-row-text { color: var(--ink); }
.ib-row-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 5px; }
.ib-pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 999px; background: var(--ib-tint, var(--line-soft));
  font-size: 11px; font-weight: 700; color: var(--ink);
}
.ib-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ib-tone, var(--ink-soft)); }
.ib-row[aria-selected="true"] .ib-pill { background: var(--surface); }
.ib-flag { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; color: var(--ink-soft); }
.ib-flag svg { width: 13px; height: 13px; }
.ib-flag--good { color: var(--good); }
.ib-flag--bad { color: var(--bad); }

/* kółka osób — ten sam adres zawsze w tym samym kolorze */
.ib-av { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: #FFFFFF; font-size: 13px; font-weight: 800; letter-spacing: .02em; }
/* Kółka z inicjałami w odcieniach granatu (M.R., 27.10: „nie pomarańcz, bardziej granat"). */
.ib-av--0 { background: var(--navy); }
.ib-av--1 { background: linear-gradient(135deg, var(--navy-2), var(--navy)); }
.ib-av--2 { background: linear-gradient(135deg, var(--glow-violet), var(--navy)); }
.ib-av--3 { background: linear-gradient(135deg, var(--ink-soft), var(--navy)); }
.ib-av--pg { background: var(--navy); font-size: 12px; }
/* „Moje zgłoszenia" (M.R., 24.10) — skrzynka jak Uwagi klientów; zamiast osoby ikona rodzaju zgłoszenia. */
.ib-av--kind { background: var(--accent-soft); color: var(--navy); }
.ib-av--kind svg { width: 17px; height: 17px; }
.ib-av--kind.ib-av--big svg { width: 24px; height: 24px; }
.ib-av--blad { background: var(--bad-soft); color: var(--bad); }
.ib-av--pomysl { background: var(--good-soft); color: var(--good); }
.ib-av--pytanie { background: var(--accent-soft); color: var(--violet); }
.ib--reports .ib-row-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rq-title { display: block; margin-bottom: 4px; font-size: 15px; }
.rq-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.rq-text--none { opacity: .75; font-style: italic; }
.rq-shot { display: block; align-self: flex-end; max-width: 320px; margin-top: 6px; border: 1px solid var(--line-soft); border-radius: 12px; overflow: hidden; }
.rq-shot img { display: block; width: 100%; height: auto; }
.rq-wait { display: flex; align-items: center; gap: 8px; align-self: flex-start; padding: 8px 12px; border: 1px dashed var(--line); border-radius: 12px; font-size: 13px; color: var(--ink-soft); }
.rq-wait svg { flex: none; width: 15px; height: 15px; }
.rq-tech { align-self: stretch; margin-top: 6px; font-size: 13px; }
.rq-status { cursor: default; }
.rq-foot { flex-wrap: wrap; text-align: center; }
.rq-foot .btn { margin-left: 4px; }
.rq-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 12px; margin: 0; font-size: 13px; }
.rq-facts dt { color: var(--ink-soft); }
.rq-facts dd { margin: 0; font-weight: 600; }
.ib-av--big { width: 56px; height: 56px; font-size: 18px; box-shadow: 0 6px 16px rgba(25, 28, 98, .18); }

/* rozmowa */
.ib-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--row-hover); }
.ib-in .ib-head, .ib-in .ib-thread { animation: ib-in .24s ease-out; }
.ib-in .ib-msg { animation: ib-pop .32s ease-out backwards; }
.ib-in .ib-msg:nth-child(3) { animation-delay: .06s; }
.ib-in .ib-msg:nth-child(n+4) { animation-delay: .12s; }
@keyframes ib-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes ib-pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.ib-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); background: var(--surface); }
.ib-icon.ib-back { display: none; }
.ib-title { flex: 1 1 220px; min-width: 0; }
.ib-title h2 { display: flex; align-items: center; gap: 6px; margin: 0; overflow: hidden; font-size: 16px; font-weight: 800; white-space: nowrap; }
.ib-title h2 > * { overflow: hidden; text-overflow: ellipsis; }
.ib-title h2 a { color: var(--navy); text-decoration: none; }
.ib-title h2 a:hover { text-decoration: underline; text-decoration-color: var(--violet); }
.ib-sep { flex: none; color: var(--line); }
.ib-title p { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 3px 0 0; font-size: 12.5px; color: var(--ink-soft); }
.ib-head-actions { display: flex; align-items: center; gap: 8px; }
.ib-status-wrap { position: relative; }
.ib-status {
  white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 10px 0 12px; border: 1px solid transparent; border-radius: 999px;
  background: var(--ib-tint, var(--surface)); font: inherit; font-size: 13px; font-weight: 700; color: var(--ink); cursor: pointer; transition: border-color .15s;
}
.ib-status:hover:not([disabled]) { border-color: var(--ib-tone, var(--ink-soft)); }
.ib-status[disabled] { cursor: default; }
.ib-status > svg { width: 14px; height: 14px; color: var(--ink-soft); }
.ib-status[disabled] > svg { display: none; }
.ib-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ib-tone, var(--line)); }
.ib-menu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 20; min-width: 210px; padding: 6px; border: 1px solid var(--line-soft); border-radius: 12px;
  background: var(--surface); box-shadow: 0 14px 34px rgba(25, 28, 98, .18); animation: dv-menu-pop .16s ease-out;
}
.ib-menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent;
  font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink); text-align: left; cursor: pointer;
}
.ib-menu-item:hover, .ib-menu-item:focus-visible { background: var(--accent-soft); outline: none; }
.ib-menu-item[aria-checked="true"] { font-weight: 800; }
.ib-menu-item kbd { margin-left: auto; }
.ib-primary {
  white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 15px; border: 0; border-radius: 999px; background: var(--good);
  font: inherit; font-size: 13px; font-weight: 800; color: #FFFFFF; cursor: pointer; box-shadow: 0 4px 12px rgba(18, 112, 79, .25); transition: transform .1s;
}
.ib-primary:active { transform: scale(.97); }
.ib-primary--ghost { border: 1px solid var(--line); background: var(--surface); color: var(--navy); box-shadow: none; }
.ib-primary svg, .ib-send svg { width: 15px; height: 15px; }
.ib-nav { display: inline-flex; align-items: center; gap: 2px; padding-left: 6px; border-left: 1px solid var(--line-soft); }
.ib-pos { min-width: 30px; font-size: 12px; color: var(--ink-soft); text-align: center; font-variant-numeric: tabular-nums; }
.ib-icon { display: inline-grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-soft); cursor: pointer; }
.ib-icon svg { width: 16px; height: 16px; }
.ib-icon:hover:not([disabled]) { background: var(--accent-soft); color: var(--navy); }
.ib-icon[disabled] { opacity: .35; cursor: default; }
.ib-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 22px 10px; }
.ib-thread { display: flex; flex-direction: column; gap: 14px; max-width: 760px; margin: 0 auto; }
.ib-day { display: flex; align-items: center; gap: 12px; font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-soft); }
.ib-day::before, .ib-day::after { content: ''; flex: 1; height: 1px; background: var(--line-soft); }
/* Kółko równo z nazwą nad dymkiem, nazwa w linii z krawędzią dymka (M.R., 27.10: „odległości się nie zgadzają"). */
.ib-msg { display: flex; align-items: flex-start; gap: 12px; }
.ib-msg--out { justify-content: flex-end; }
.ib-msg-col { display: flex; flex-direction: column; min-width: 0; max-width: min(560px, 82%); }
.ib-msg--out .ib-msg-col { align-items: flex-end; }
.ib-msg-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-height: 20px; margin: 0 2px 6px; font-size: 12px; color: var(--ink-soft); }
.ib-msg-meta b { font-size: 12.5px; color: var(--ink); }
.ib-who { padding: 0 7px; border-radius: 999px; background: var(--line-soft); font-size: 10.5px; font-weight: 800; line-height: 17px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); }
.ib-who--client { background: rgba(253, 127, 178, .22); color: var(--navy); }
.ib-bubble {
  margin: 0; padding: 12px 16px; border: 1px solid var(--line-soft); border-radius: 18px 18px 18px 6px; background: var(--surface);
  box-shadow: 0 1px 2px rgba(25, 28, 98, .05); font-size: 15px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere;
}
.ib-msg--out .ib-bubble { border-color: transparent; border-radius: 18px 18px 6px 18px; background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #FFFFFF; box-shadow: 0 8px 20px rgba(25, 28, 98, .2); }
.ib-seen { display: inline-flex; align-items: center; color: var(--ink-soft); opacity: .75; }
.ib-seen svg { width: 14px; height: 14px; }
/* Poprawka własnej wiadomości (M.R., 27.10): ołówek przy godzinie — po najechaniu na wiadomość albo fokusie; na ekranie
   dotykowym stale, przygaszony. „edytowano" kursywą przy godzinie. */
.ib-msg-edit { width: 30px; height: 30px; margin: -6px 0; border-color: transparent; background: transparent; color: var(--ink-soft); opacity: 0; transition: opacity .15s; }
.ib-msg-edit svg { width: 17px; height: 17px; }
.ib-msg-edit:hover { background: var(--accent-soft); color: var(--navy); }
.ib-msg:hover .ib-msg-edit, .ib-msg-edit:focus-visible { opacity: 1; }
.ib-edited { font-style: italic; }
/* Pole poprawki na pełną szerokość dymka — nie zwęża się do długości starej treści. */
.ib-msg-col:has(.ib-edit-box) { flex: 1; max-width: 560px; }
.ib-edit-box { display: flex; flex-direction: column; gap: 8px; width: 100%; }
/* Ten sam krój, rozmiar, odstępy i podziały linii co dymek (`.ib-bubble`) — poprawiany tekst wygląda jak wysłany. */
.ib-edit-box textarea { display: block; width: 100%; min-height: 48px; padding: 12px 16px; overflow: hidden; border: 1px solid var(--violet); border-radius: 18px; background: var(--surface); box-shadow: 0 0 0 4px var(--accent-soft); font: inherit; font-size: 15px; line-height: 1.5; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; resize: none; }
.ib-edit-box textarea:focus { outline: none; }
.ib-edit-actions { display: flex; justify-content: flex-end; gap: 8px; }
.ib-edit-err:empty { display: none; }
/* Zmiana statusu = cicha linijka między wiadomościami, nie kolejny dymek. */
.ib-event {
  align-self: center; display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 2px 7px; margin: -4px 0; padding: 2px 10px;
  font-size: 12px; color: var(--ink-soft);
}
.ib-event b { font-weight: 700; color: var(--ink); }
.ib-event .ib-dot { width: 6px; height: 6px; }
.ib-event-meta { opacity: .8; }

/* pole pisania: odpowiedź dla klienta albo notatka wewnętrzna (żółta, z kłódką) */
.ib-composer { padding: 10px 18px 14px; border-top: 1px solid var(--line-soft); background: var(--row-hover); }
.ib-composer--off { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 16px; font-size: 13px; color: var(--ink-soft); }
.ib-composer--off svg { width: 15px; height: 15px; }
.ib-box {
  max-width: 760px; margin: 0 auto; border: 1px solid var(--line); border-radius: 16px; background: var(--surface);
  box-shadow: 0 4px 16px rgba(25, 28, 98, .06); transition: border-color .15s, box-shadow .15s;
}
.ib-box:focus-within { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(147, 93, 223, .14); }
.ib .ib-input {
  display: block; width: 100%; min-height: 52px; max-height: 220px; padding: 12px 14px 4px; border: 0; border-radius: 16px 16px 0 0; background: transparent;
  box-shadow: none; outline: none; resize: none; font: inherit; font-size: 15px; line-height: 1.5; color: var(--ink);
}
.ib-box-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 10px; padding: 6px 8px 8px 12px; }
.ib-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.ib-chip {
  padding: 4px 10px; border: 1px solid var(--line-soft); border-radius: 999px; background: var(--bg); font: inherit; font-size: 12px; font-weight: 700;
  color: var(--navy); cursor: pointer; transition: background .15s, border-color .15s;
}
.ib-chip:hover { border-color: var(--accent-hover); background: var(--accent-soft); }
.ib-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.ib-kbd-hint { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; color: var(--ink-soft); }
.ib-send {
  white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--navy);
  font: inherit; font-size: 13px; font-weight: 800; color: #FFFFFF; cursor: pointer; transition: transform .1s, opacity .15s;
}
.ib-send:active:not([disabled]) { transform: scale(.97); }
.ib-send[disabled] { background: var(--line-soft); color: var(--ink-soft); cursor: default; }
/* Skrót klawiszowy dopiero przy pisaniu — w spoczynku pole jest spokojniejsze. */
.ib-box:not(:focus-within) .ib-actions .ib-kbd-hint { display: none; }
.ib-send--close { background: var(--good); }
.ib-err { max-width: 760px; margin: 8px auto 0; }
.ib-err:empty { display: none; }
.ib-err .notice { margin: 0; }

/* puste stany */
.ib-blank, .ib-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 40px 16px; font-size: 13px; color: var(--ink-soft); text-align: center; }
.ib-blank { flex: 1; }
.ib-blank b, .ib-empty b { font-size: 15px; color: var(--ink); }
.ib-empty .link-btn { align-self: center; }
.ib-empty-ic { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 6px; border-radius: 16px; background: var(--accent-soft); color: var(--violet); }
.ib-empty-ic svg { width: 24px; height: 24px; }
.ib-empty--good .ib-empty-ic { background: var(--good-soft); color: var(--good); }

/* kontekst */
.ib-ctx { display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow-y: auto; padding: 14px; border-left: 1px solid var(--line-soft); }
/* Panel kontekstu (M.R., 27.10: „odstępy i ułożenie"): karty z tym samym wcięciem 16 px i odstępem 12 px w środku. */
.ib-ctx-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 14px; background: var(--row-hover); }
.ib-ctx-card h3 { margin: 0; font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-soft); }
.ib-ctx-person { align-items: center; text-align: center; background: linear-gradient(180deg, var(--accent-soft), var(--row-hover)); }
.ib-ctx-id { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; }
.ib-ctx-idtext { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; min-width: 0; }
.ib-ctx-name { font-size: 16px; line-height: 1.25; }
/* Mail łamie się tylko po „@" (<wbr> w kodzie), nie w środku domeny. */
.ib-ctx-mail { max-width: 100%; font-size: 12px; line-height: 1.4; color: var(--ink-soft); overflow-wrap: anywhere; }
.ib-ctx-stats { display: grid; grid-template-columns: 1fr 1fr; width: 100%; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.ib-ctx-stats span { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; color: var(--ink-soft); }
.ib-ctx-stats span + span { border-left: 1px solid var(--line-soft); }
.ib-ctx-stats b { font-size: 20px; line-height: 1.1; color: var(--ink); }
.ib-ctx-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 36px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font: inherit; font-size: 12.5px; font-weight: 700; color: var(--navy); white-space: nowrap; cursor: pointer;
}
.ib-ctx-btn:hover { background: var(--accent-soft); border-color: var(--accent-hover); }
.ib-ctx-btn svg { width: 14px; height: 14px; }
/* Karta dashboardu (M.R., 27.10: „średnio") — jedna warstwa: nazwa w jednej linii, pod nią źródła, lekka lista przejść. */
.ib-ctx-head { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding-bottom: 4px; }
.ib-ctx-dashname { overflow: hidden; font-size: 16px; font-weight: 800; line-height: 1.3; white-space: nowrap; text-overflow: ellipsis; }
.ib-ctx-plat { display: flex; flex-wrap: wrap; gap: 6px; }
.ib-plat { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line-soft); border-radius: 8px; background: var(--surface); }
.ib-plat svg { width: 16px; height: 16px; }
.ib-ctx-links { display: flex; flex-direction: column; margin: 0 -8px; }
.ib-ctx-links a { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 8px; border-radius: 10px; font-size: 13px; font-weight: 700; color: var(--navy); white-space: nowrap; text-decoration: none; }
.ib-ctx-links a:hover { background: var(--surface); }
.ib-ctx-links a:focus-visible { outline: 2px solid var(--violet); outline-offset: -2px; }
.ib-ctx-ic, .ib-ctx-go { display: flex; flex: none; }
.ib-ctx-ic { color: var(--ink-soft); }
.ib-ctx-links a:hover .ib-ctx-ic { color: var(--navy); }
.ib-ctx-go { margin-left: auto; color: var(--ink-soft); opacity: .6; transition: opacity .15s, transform .15s; }
.ib-ctx-links a:hover .ib-ctx-go { opacity: 1; transform: translateX(2px); }
.ib-ctx-links svg, .ib-ctx-cta svg { width: 16px; height: 16px; }
.ib-ctx-go svg { width: 14px; height: 14px; }
.ib-ctx-where { margin: 0; font-size: 14px; font-weight: 700; }
.ib-ctx-cta { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px; background: var(--navy); font-size: 12.5px; font-weight: 800; color: #FFFFFF; text-decoration: none; }

/* komunikat po zapisie z „Cofnij" — na dole ekranu, jak w skrzynkach pocztowych */
.ib-toast {
  position: fixed; bottom: 28px; left: 50%; z-index: 60; display: flex; align-items: center; gap: 16px; max-width: min(640px, calc(100vw - 32px));
  padding: 12px 12px 12px 18px; border-radius: 14px; background: var(--navy); font-size: 14px; font-weight: 600; color: #FFFFFF;
  box-shadow: 0 18px 40px rgba(25, 28, 98, .32); opacity: 0; pointer-events: none; transform: translate(-50%, 140%);
  transition: transform .28s cubic-bezier(.2, .9, .3, 1.2), opacity .2s;
}
.ib-toast.on { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.ib-toast button { flex: none; padding: 6px 14px; border: 0; border-radius: 999px; background: var(--pink); font: inherit; font-size: 13px; font-weight: 800; color: var(--navy); cursor: pointer; }
@media (prefers-reduced-motion: reduce) {
  .ib-in .ib-head, .ib-in .ib-thread, .ib-in .ib-msg, .ib-menu { animation: none; }
  .ib-toast { transition: none; }
}


.ib--bare .ib-shell { grid-template-columns: 316px minmax(0, 1fr); }
.ib--bare .ib-ctx { display: none; }
.ib-blank--done .ib-empty-ic { width: 64px; height: 64px; border-radius: 20px; background: var(--good-soft); color: var(--good); }
.ib-blank--done .ib-empty-ic svg { width: 30px; height: 30px; }
.ib-blank--done b { font-size: 20px; font-weight: 800; }
.ib-blank--done > span:not(.ib-empty-ic) { max-width: 340px; line-height: 1.5; }
.ib-blank--done .ib-primary { margin-top: 10px; }
@media (hover: none) { .ib-actions .ib-kbd-hint { display: none; } }

/* Węższa skrzynka: kontekst chowa się (dashboard i miejsce są w nagłówku rozmowy). `.ib .ib-shell` = ta sama siła co
   `.ib--bare .ib-shell` — bez tego pusta skrzynka zostawałaby w dwóch kolumnach także na telefonie. */
@container (max-width: 1040px) {
  .ib .ib-shell, .ib--bare .ib-shell { grid-template-columns: 316px minmax(0, 1fr); }
  .ib-ctx { display: none; }
}
/* Laptop 1024 z bocznym menu, tablet: dalej lista obok rozmowy, lista węższa. */
@container (max-width: 860px) {
  .ib .ib-shell, .ib--bare .ib-shell { grid-template-columns: 284px minmax(0, 1fr); }
  .ib-row { grid-template-columns: 34px minmax(0, 1fr); gap: 8px; }
  .ib-row .ib-av { width: 34px; height: 34px; font-size: 12px; }
  .ib-tabs { padding: 6px 4px 0; gap: 0; }
  .ib-tab { padding: 11px 3px 12px; font-size: 12px; gap: 4px; }
  .ib-count { min-width: 16px; padding: 0 4px; }
  .ib-head { padding: 12px 14px; }
  .ib-head-actions { flex-wrap: wrap; }
  .ib-pos { display: none; }
  .ib-scroll { padding: 16px 14px 8px; }
  .ib-composer { padding: 10px 12px 12px; }
}
/* Telefon: lista albo rozmowa, „←" wraca do listy. */
@container (max-width: 600px) {
  .ib .ib-shell, .ib--bare .ib-shell { grid-template-columns: minmax(0, 1fr); height: auto; min-height: 60vh; }
  .ib[data-view="list"] .ib-main { display: none; }
  .ib[data-view="detail"] .ib-side { display: none; }
  .ib[data-view="detail"] .ib-shell { height: var(--ib-h); }
  .ib-icon.ib-back { display: inline-grid; }
  .ib-head { padding: 10px 12px; }
  .ib-head-actions { width: 100%; }
  /* Poprzednia / następna nie mieszczą się obok statusu; na telefonie wraca się „←" do listy. */
  .ib-nav { display: none; }
  .ib-scroll { padding: 14px 12px 8px; }
  .ib-msg-col { max-width: 90%; }
  .ib-msg--in > .ib-av, .ib-msg--out > .ib-av { display: none; }
  .ib-composer { padding: 8px 10px 10px; }
  .ib-actions .ib-kbd-hint { display: none; }
  .ib-box-foot { flex-direction: column; align-items: stretch; min-width: 0; padding: 6px 8px 8px; }
  .ib-box, .ib-composer { min-width: 0; }
  /* Gotowe odpowiedzi w jednym przewijanym rzędzie; wygaszenie z prawej mówi, że jest ich więcej. */
  .ib-quick { flex-wrap: nowrap; min-width: 0; max-width: 100%; overflow-x: auto; scrollbar-width: none; padding-right: 24px; mask-image: linear-gradient(90deg, var(--navy) 85%, transparent); }
  .ib-chip { flex: none; }
  .ib-actions { margin-left: 0; }
  .ib-actions .ib-send { flex: 1; justify-content: center; }
  /* Palcem: większe cele dotyku przy „Edytuj" i „Pokaż wszystkie". */
}
/* Rozmowa na telefonie = cały ekran pod górnym paskiem panelu (87 px), jak w aplikacji — tylko gdy panel ma górny
   pasek zamiast bocznego menu (≤ 860 px okna); przy bocznym menu rozmowa zostaje w skrzynce. */
@media (max-width: 860px) {
  @container (max-width: 600px) {
    .ib[data-view="detail"] .ib-shell { position: fixed; inset: 87px 0 0; z-index: 25; height: auto; border: 0; border-radius: 0; }
  }
}
.client-dash { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.client-feedback h2 { margin: 18px 0 8px; font-size: 17px; font-weight: 800; }
.client-fb { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.client-fb li { padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); }
.client-fb p { margin: 6px 0 0; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.client-fb-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; }
/* Rozmowa klienta z PG (M.R., 27.10): klient po prawej, Performance Group po lewej, jak w czacie. */
.client-fb-item.is-new { border-color: var(--violet); box-shadow: inset 3px 0 0 var(--violet); }
.client-thread { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.client-msg { max-width: min(80%, 640px); padding: 8px 12px; border-radius: 12px; }
.client-fb .client-msg p { margin: 0; }
.client-msg small { font-size: 11px; color: var(--ink-soft); }
.client-msg-foot { display: flex; align-items: center; gap: 6px; min-height: 22px; margin-top: 4px; }
.client-msg--me .client-msg-foot { justify-content: flex-end; }
.client-msg-edited { font-style: italic; }
.client-msg-edit { width: 28px; height: 28px; margin: -4px 0; border-color: transparent; background: transparent; color: var(--ink-soft); opacity: 0; transition: opacity .15s; }
.client-msg-edit svg { width: 16px; height: 16px; }
.client-msg-edit:hover { background: var(--surface); color: var(--navy); }
.client-msg:hover .client-msg-edit, .client-msg-edit:focus-visible { opacity: 1; }
.client-msg.is-editing { width: min(100%, 640px); max-width: 100%; }
.client-msg.is-editing .client-fb-form-actions { justify-content: flex-end; }
.client-fb-form .client-msg-input { display: block; width: 100%; min-height: 40px; padding: 8px 12px; overflow: hidden; border: 1px solid var(--violet); border-radius: 12px; background: var(--surface); font: inherit; font-size: 14px; line-height: 1.5; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; resize: none; }
.client-fb-form .client-msg-input:focus { outline: none; box-shadow: 0 0 0 4px var(--accent-soft); }
@media (max-width: 720px), (pointer: coarse) {
  .ib-msg-edit, .client-msg-edit { width: 40px; height: 40px; margin: -9px; opacity: .7; }
}
.client-msg--me { align-self: flex-end; background: var(--accent-soft); border-bottom-right-radius: 4px; }
.client-msg--pg { align-self: flex-start; background: var(--good-soft); border-bottom-left-radius: 4px; }
.client-msg-who { display: block; margin-bottom: 2px; font-size: 12px; font-weight: 800; color: var(--navy); }
.client-fb-slot { margin-top: 10px; }
.client-fb-form { display: flex; flex-direction: column; gap: 8px; }
.client-fb-form textarea { width: 100%; min-height: 76px; resize: vertical; font: inherit; }
.client-fb-form-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.client-fb-err:empty { display: none; }
.client-fb-closed > summary { padding: 6px 0; font-size: 14px; color: var(--navy); }
.client-fb-closed .client-fb { margin-top: 8px; }
.tag--new { background: var(--accent-soft); color: var(--navy); }
.tag--new::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--violet); vertical-align: 1px; }
.tag[hidden] { display: none; }

/* --- dashboard na cały ekran i karta podglądu */
body.dash-page { background: var(--bg); }
/* Na cały ekran dashboard nie potrzebuje ramki podglądu — wygląda jak u klienta. */
body.dash-page .dv { border: 0; background: transparent; overflow: visible; }
.dash-page-wrap { max-width: 1240px; margin: 0 auto; padding: 16px; }
.dash-page-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; font-size: 14px; }
.dash-page-bar .seg { margin-left: auto; }

/* ------------------------------------------------------------------ co pobierze job */

details.b-card-needs > summary { cursor: pointer; font-size: 15px; }
details.b-card-needs[open] > summary { margin-bottom: 10px; }
.needs { list-style: none; margin: 0; padding: 0; }
.needs li { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.needs li:last-child { border-bottom: 0; }
.needs small { display: block; color: var(--ink-soft); font-size: 13px; }
@media (max-width: 720px) { .needs li { grid-template-columns: 1fr; gap: 2px; } }

/* ================================================================== 23.10 wieczorem (M.R.) */

/*
 * Wszystko, co się rozwija, w jednym stylu (M.R., 23.10: „popraw UI elementów, co się rozwijają — spójnie"):
 * listy wyboru z jedną strzałką (rysowaną gradientem — CSP nie wpuszcza obrazków `data:`), ta sama ramka, ten sam
 * fiolet przy fokusie; w Chrome i Edge także sama rozwinięta lista (customizable select), w innych — systemowa.
 * Bloki `details` mają ten sam znak „›", który obraca się przy rozwinięciu.
 */
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 36px;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%), linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  transition: border-color .12s ease, box-shadow .12s ease;
}
select:hover:not([disabled]), input[type="text"]:hover:not([readonly]), input[type="search"]:hover, input[type="email"]:hover { border-color: var(--ink-soft); }
select:focus-visible, input[type="text"]:focus-visible, input[type="search"]:focus-visible, input[type="email"]:focus-visible, input[type="password"]:focus-visible, input[type="date"]:focus-visible {
  outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px var(--accent-soft);
}
select[disabled] { cursor: default; }
optgroup { font-weight: 800; color: var(--ink-soft); font-style: normal; }
option { color: var(--ink); font-weight: 500; }
@supports (appearance: base-select) {
  select { appearance: base-select; }
  select::picker-icon { display: none; }
  /* Rozwinięta lista jak listy „⋯" i języka na dashboardzie: karta 14 px z miękkim cieniem. */
  select::picker(select) {
    appearance: base-select;
    border: 1px solid var(--line-soft); border-radius: 14px; padding: 6px;
    background: var(--surface); margin-top: 6px; max-height: 340px;
    box-shadow: 0 24px 50px -16px rgba(25, 28, 98, .32), 0 8px 18px -8px rgba(25, 28, 98, .18);
  }
  select option { padding: 9px 12px 9px 14px; border-radius: 10px; font-size: 14px; }
  select option:hover, select option:focus-visible { background: var(--row-hover); outline: none; }
  /* Wybrana pozycja (M.R., 24.10: „nie jestem przekonany do ptaszka"): fioletowe tło, pogrubienie i kreska
     z lewej — ten sam znacznik w każdej liście panelu i dashboardu; ptaszek przeglądarki schowany. */
  select option:checked { background: var(--accent-soft); font-weight: 700; box-shadow: inset 3px 0 0 var(--violet); }
  select option::checkmark { display: none; }
  /* Napis wybranej opcji na środku wysokości (M.R., 25.10: „Ja (Administrator)" 2,5 px nad okiem i strzałką) —
     lista `base-select` wyższa niż linia tekstu (min-height) trzymała napis u góry. */
  select { align-items: center; align-content: center; }
  select optgroup { padding: 6px 4px 2px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
}

details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details:not(.as-card) > summary { display: flex; align-items: center; gap: 8px; font-weight: 700; }
details:not(.as-card) > summary::before {
  content: ''; flex: none; width: 7px; height: 7px; margin: 0 2px 0 1px;
  border-right: 2px solid var(--ink-soft); border-bottom: 2px solid var(--ink-soft);
  transform: rotate(-45deg); transition: transform .15s ease;
}
details[open]:not(.as-card) > summary::before { transform: rotate(45deg); }
details:not(.as-card) > summary:hover { color: var(--navy); }
details > summary:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { details > summary::before { transition: none; } }
/* Rodzaje elementów zwinięte: tytuł jak h2 karty, pod nim nazwy w jednej linii (do rozwinięcia). */

/* Nowy dashboard w krokach: pasek kroków z numerami, ptaszek przy uzupełnionych, opis kroku pod spodem. */
.wizard-head { position: sticky; top: 0; z-index: 20; margin: 0 0 16px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow); }
.wizard-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; counter-reset: none; }
.wizard-step {
  width: 100%; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent;
  font: inherit; font-weight: 700; font-size: 14px; color: var(--ink-soft); cursor: pointer; text-align: left; position: relative;
}
.wizard-step::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; border-radius: 2px; background: var(--line-soft); }
.wizard-step:hover { background: var(--row-hover); color: var(--ink); }
.wizard-step.is-current { color: var(--navy); background: var(--accent-soft); }
.wizard-step.is-current::after { background: var(--violet); }
.wizard-step.is-done::after { background: var(--good); }
.wizard-step:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.wizard-n { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); font-size: 13px; }
.wizard-step.is-current .wizard-n { background: var(--navy); border-color: var(--navy); color: #FFFFFF; }
.wizard-step.is-done .wizard-n { background: var(--good-soft); border-color: var(--good); color: var(--good); }
.wizard-n svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.5; }
.wizard-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wizard-hint { margin: 10px 2px 0; font-size: 14px; color: var(--ink-soft); }
.dash-form--wizard > [hidden], .dash-form--wizard .actions--sticky > [hidden] { display: none !important; }
/* Krok, który ktoś minął, a coś w nim blokuje zapis — czerwony „!" zamiast numeru. */
.wizard-step.is-bad::after { background: var(--bad); }
.wizard-step.is-bad .wizard-n { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); font-weight: 800; }
/* Karta zwinięta w pasek: tytuł, jedno zdanie streszczenia i „zmień". */
.wizard-fold { padding: 0; }
.wizard-fold > summary { display: flex; align-items: baseline; gap: 12px; padding: 14px 18px; cursor: pointer; list-style: none; }
.wizard-fold > summary::-webkit-details-marker { display: none; }
.wizard-fold > summary b { flex: none; }
.wizard-fold-sum { flex: 1; min-width: 0; color: var(--ink-soft); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wizard-fold-more { flex: none; margin-left: auto; color: var(--violet); font-weight: 700; font-size: 14px; text-decoration: underline; }
.wizard-fold[open] .wizard-fold-more { visibility: hidden; }
.wizard-fold > .is-folded { margin: 0; border: 0; box-shadow: none; padding-top: 0; }
.wizard-fold > .is-folded > h2:first-child { display: none; }
.field-error { margin: 6px 0 0; color: var(--bad); font-size: 13.5px; font-weight: 600; }
.start-choice[aria-pressed="true"] { border-color: var(--navy); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--navy); }
.start-note { margin: 10px 0 0; padding: 8px 12px; border-radius: 8px; background: var(--good-soft); color: var(--good); font-weight: 600; font-size: 14px; }
.rv-check--server ul { margin: 4px 0 0; padding-left: 18px; color: var(--ink-soft); font-size: 13px; line-height: 1.45; }
/* Sześć kroków na laptopie: nazwa zawija się do dwóch linii zamiast „Sprawdź i ut…" (test 24.10, 1280 px). */
@media (max-width: 1400px) { .wizard-label { white-space: normal; line-height: 1.2; } }
@media (max-width: 1100px) {
  .wizard-step { flex-direction: column; gap: 4px; padding: 6px 2px 8px; font-size: 12px; text-align: center; }
}
/* Na telefonie pasek menu jest przyklejony u góry (`.side`) — przyklejony pasek kroków wchodził pod niego i razem
   zabierały trzecią część ekranu. Tu kroki przewijają się ze stroną. */
@media (max-width: 860px) { .wizard-head { position: static; } }
@media (max-width: 720px) {
  .wizard-head { padding: 8px; }
  .wizard-steps { gap: 2px; }
  .wizard-step { flex-direction: column; gap: 4px; padding: 6px 2px 8px; font-size: 11px; text-align: center; }
  .wizard-label { white-space: normal; line-height: 1.2; }
}

/* Etap „Sprawdź i utwórz" (M.R., 24.10): dwie karty obok siebie — gotowość po lewej, komputer i telefon na środku. */
/* Układ zależy od szerokości karty, nie okna (container queries): obok siebie tylko wtedy, gdy podgląd komputera ma
   co najmniej ~600 px — węższy byłby nieczytelny (test 24.10: na 1280 px wychodziło 242 px, skala 0,19). */
.card.card--ready { background: none; box-shadow: none; padding: 0; container-type: inline-size; }
.rv { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
.rv-side, .rv-main { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); padding: 22px 24px; container-type: inline-size; }
@container (min-width: 1300px) {
  .rv { grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); }
  .rv-side { position: sticky; top: 132px; }
}
.rv-side-head h2 { margin: 0 0 14px; }
.rv-score { display: flex; align-items: center; gap: 16px; padding-bottom: 18px; margin-bottom: 6px; border-bottom: 1px solid var(--line-soft); }
.rv-score p { margin: 2px 0 0; font-size: 13px; line-height: 1.45; }
.rv-verdict { display: block; font-size: 19px; font-weight: 800; color: var(--navy); }
.rv-verdict.is-bad { color: var(--bad); }
.rv-ring { position: relative; flex: none; width: 92px; height: 92px; display: grid; place-items: center; }
.rv-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.rv-ring circle { fill: none; stroke-width: 9; }
.rv-ring-bg { stroke: var(--line-soft); }
.rv-ring-fg { stroke: var(--violet); stroke-linecap: round; transition: stroke-dasharray .5s ease; }
.rv-ring--good .rv-ring-fg { stroke: var(--good); }
.rv-ring--bad .rv-ring-fg { stroke: var(--bad); }
.rv-ring b { font-size: 21px; font-weight: 800; color: var(--navy); }
.rv-checks { list-style: none; margin: 0 0 4px; padding: 0; }
.rv-check { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.rv-check:last-child { border-bottom: 0; }
.rv-check-ic { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; }
.rv-check-ic svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.6; }
.rv-check--ok .rv-check-ic { background: var(--good-soft); color: var(--good); }
.rv-check--warn .rv-check-ic { background: var(--warn-soft); color: var(--warn); }
.rv-check--bad .rv-check-ic { background: var(--bad-soft); color: var(--bad); }
.rv-check-body b { display: block; font-size: 15px; }
.rv-check-body small { display: block; color: var(--ink-soft); font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.rv-go { display: inline-flex; align-items: center; gap: 3px; padding: 2px 4px; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 700; color: var(--violet); cursor: pointer; white-space: nowrap; border-radius: 6px; }
.rv-go svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.4; }
.rv-go:hover { background: var(--accent-soft); }
/* Palec potrzebuje ~40 px — na ekranie dotykowym „Przejdź" jest wyższe, bez zmiany wyglądu. */
@media (pointer: coarse) { .rv-go { min-height: 40px; padding: 0 8px; margin: -8px -8px -8px 0; } }
/* Gotowość nad podglądem (szeroka karta): punkty w dwóch kolumnach zamiast długiej listy. */
@container (min-width: 640px) {
  .rv-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
  .rv-check:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
  .rv-score { padding-bottom: 14px; }
}
.rv-go:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.rv-main h2 { margin: 0 0 2px; }
.rv-lead { margin: 0 0 16px; font-size: 14px; }
.rv-devices { display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 250px); gap: 22px; align-items: start; }
.rv-device { margin: 0; min-width: 0; }
.rv-device figcaption { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.rv-device figcaption svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
/* Ramka przewija się w środku (bez paska przewijania — zabrałby szerokość skali). */
.rv-frame { overflow-y: auto; overflow-x: hidden; scrollbar-width: none; background: var(--bg); }
.rv-frame::-webkit-scrollbar { display: none; }
.rv-frame--komputer { aspect-ratio: 16 / 10.5; border: 1px solid var(--line); border-radius: 12px; }
/* Telefon: cały telefon z `phone_frame.js` pomniejszony w ramce — ramka bez własnej obudowy i bez przewijania. */
.rv-frame--telefon { overflow: visible; background: none; }
.rv-zoom .dv { margin: 0; }
/* „Zapytaj o wyniki" jak na prawdziwym ekranie (M.R., 24.10: w podglądzie „wyświetla się źle"): na dashboardzie stoi
   w rogu okna (`position: fixed`), więc w ramce — przyklejony do jej prawego dolnego rogu przy przewijaniu,
   z tymi samymi odstępami; w ramce telefonu okrągła ikona jak na telefonie (52 px, 16 px od krawędzi). */
/* `clip` zamiast `hidden` z `.dv` — przycina tak samo, ale nie łapie `sticky` (przycisk przyklejałby się do `.dv`). */
.rv-zoom .dv { overflow: clip; }
.rv-frame--komputer .dv-chat { position: sticky; bottom: 24px; z-index: 5; margin: 16px 24px 24px; }
.rv-frame--komputer .dv-chat-panel { width: min(400px, 100%); }
/* Wąska karta (tablet): komputer na całą szerokość, telefon pod nim. */
@container (max-width: 700px) {
  .rv-devices { grid-template-columns: minmax(0, 1fr); }
  .rv-device--telefon { width: 100%; max-width: 280px; margin: 0 auto; }
}
/* Telefon: pomniejszony komputer byłby nieczytelny — sam podgląd telefonu. */
@media (max-width: 720px) {
  .rv-device--komputer { display: none; }
  .rv-side, .rv-main { padding: 18px 16px; }
}

/* Lista z wpisywaniem (`public/combo.js`) — wygląda jak lista wyboru, rozwinięta lista jak `::picker(select)`. */
.combo { position: relative; min-width: 0; }
.combo-input {
  width: 100%; padding-right: 56px !important;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%), linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.combo-clear { position: absolute; right: 30px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; border: 0; border-radius: 50%; background: var(--line-soft); color: var(--ink-soft); font-size: 15px; line-height: 1; cursor: pointer; }
.combo-clear:hover { background: var(--accent-hover); color: var(--ink); }
.combo-clear[hidden] { display: none; }
.combo-list {
  position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 6px; list-style: none;
  max-height: 300px; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow);
}
.combo-list[hidden] { display: none; }
.combo-option { padding: 8px 12px; border-radius: 8px; font-size: 14px; cursor: pointer; overflow-wrap: anywhere; }
.combo-option.is-active, .combo-option:hover { background: var(--row-hover); }
.combo-option[aria-selected="true"] { background: var(--accent-soft); font-weight: 700; box-shadow: inset 3px 0 0 var(--violet); }
.combo-empty { padding: 8px 12px; font-size: 14px; color: var(--ink-soft); }

/* Wybór z listy z opisem pod spodem (kreator: dane od, język, sekcje). */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: minmax(0, 1fr); } }
.b-choice-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.b-choice-row select { flex: 1 1 200px; }
.b-choice-row input[type="date"] { flex: 0 1 170px; }
.b-choice-field .hint { min-height: 2.6em; }

/*
 * Kolor wykresu (M.R., 24.10: „zmienia się tylko jeden kolor, reszta stoi"): wybrany kolor jest pierwszy, kolejne
 * serie (kafle, wycinki udziału, słupki kanałów i rozbicia) idą dalej po czterech barwach PG bez powtórzeń.
 * Fiolet „data" = kolejność sprzed zmiany (fiolet, róż, pomarańcz, granat), więc istniejące dashboardy się nie zmieniają.
 */
.dv-card, .swatch { --acc: var(--violet); --acc-2: var(--pink); --acc-3: var(--pg-media); --acc-4: var(--navy); }
.dv-acc--data { --acc: var(--violet); --acc-2: var(--pink); --acc-3: var(--pg-media); --acc-4: var(--navy); }
.dv-acc--create { --acc: var(--pink); --acc-2: var(--violet); --acc-3: var(--pg-media); --acc-4: var(--navy); }
.dv-acc--media { --acc: var(--pg-media); --acc-2: var(--navy); --acc-3: var(--violet); --acc-4: var(--pink); }
.dv-acc--granat { --acc: var(--navy); --acc-2: var(--violet); --acc-3: var(--pink); --acc-4: var(--pg-media); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); padding: 4px; cursor: pointer; }
.swatch-dot { display: block; width: 100%; height: 100%; border-radius: 50%; background: var(--acc); }
.swatch[aria-checked="true"] { border-color: var(--navy); box-shadow: 0 0 0 3px var(--accent-soft); }
.swatch:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }

/* Nowe elementy dashboardu: najlepsze i najsłabsze, ten okres i poprzedni, wykres według rozbicia. */
.dv-ranks { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px 18px; }
.dv-size--pelna .dv-ranks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dv-rank-metric { grid-column: 1 / -1; margin: 0; font-size: 13px; font-weight: 700; }
.dv-rank { border-top: 3px solid var(--line); padding-top: 8px; min-width: 0; }
.dv-rank--good { border-top-color: var(--good); }
.dv-rank--bad { border-top-color: var(--pg-media); }
.dv-rank-h { margin: 0 0 6px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); }
.dv-rank ol { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13px; }
.dv-rank li { display: flex; justify-content: space-between; gap: 8px; }
.dv-rank-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dv-rank .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.dv--phone .dv-ranks { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 640px) { .dv-size--pelna .dv-ranks { grid-template-columns: minmax(0, 1fr); } }
.dv-periods td:first-child { font-weight: 700; }
.dv-hbars--split li { grid-template-columns: minmax(80px, 38%) minmax(0, 1fr) auto; }
.dv-hbars--split .dv-hbar-label { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dv-hbars--split li .dv-hbar-fill { fill: var(--acc); }

/* Pasek boczny: dół menu — grupa „Pomoc" (zwijana jak „Ustawienia panelu"), „Wyloguj" na jej końcu. */
.side-bottom { position: relative; margin-top: auto; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .12); }
/* Pomoc przypięta do dołu, tuż nad stopką (M.R., 24.10): dwa `margin-top: auto` dzieliły wolne miejsce i pomoc wisiała pośrodku. */
.side-bottom ~ .side-foot { margin-top: 12px; }
.side-support .side-link { width: 100%; text-align: left; border: 0; background: transparent; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }
/* Wybrana pozycja („Moje zgłoszenia") znikała: granatowy napis bez białego tła, które ta grupa zdejmowała (M.R., 24.10). */
.side-support .side-link[aria-current="page"] { background: #FFFFFF; color: var(--navy); }
.side-report { width: 100%; text-align: left; border: 0; background: transparent; font: inherit; cursor: pointer; }
.side-group--admin + .side-bottom { margin-top: 0; }
/* Stopka bez maila i roli (M.R., 27.10): „Zobacz panel jako" jak pozycje w „Pomocy". */
.side-foot .side-link, .side-preview--compact .side-link { width: 100%; text-align: left; border: 0; background: transparent; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }
.side-preview.side-preview--compact { margin-bottom: 0; }
@media (max-width: 860px) { .side-bottom { margin-top: 0; } }

/* ======================================================================== wariant D1 „Połączona z menu" (M.R., 24.10)
 * Jasna scena u góry strony, znak PG w tle, a wybrana pozycja menu wpływa w stronę jak zakładka w segregatorze.
 * Scena przechodzi w tło do 250 px — pozycje menu leżą niżej, więc zakładka (kolor tła) zlewa się ze stroną.
 * Dashboard klienta (`dash-page`, `showcase`), strony bez menu (`bare`) i ekran wczytywania (`boot` — jeszcze nie
 * wiadomo, czy to zespół; M.R., 28.10: bez znaku w rogu) zostają bez sceny.
 */
body:not(.dash-page):not(.bare):not(.showcase):not(.boot) {
  background: linear-gradient(180deg, var(--accent-soft) 0, var(--accent-soft) 120px, var(--bg) 250px) no-repeat, var(--bg);
}
/* Znak PG w prawym dolnym rogu okna (M.R., 24.10, „fiolet w prawym rogu"): jeden, fioletowy, ucięty przez krawędzie
   i stojący w miejscu przy przewijaniu. Kolor z maski — sam kształt znaku, barwa z palety PG.
   z-index -1: znak pod treścią, ale nad tłem strony (`.app` nie tworzy własnego kontekstu warstw). */
body:not(.dash-page):not(.bare):not(.showcase):not(.boot) .app::after {
  content: ''; position: fixed; z-index: -1; right: -110px; bottom: -150px; width: 480px; height: 563px; pointer-events: none;
  background: var(--violet); opacity: .10;
  -webkit-mask: url(logo_pg_icon.svg) no-repeat center / contain; mask: url(logo_pg_icon.svg) no-repeat center / contain;
}
@media (min-width: 861px) {
  .side .side-link[aria-current="page"] {
    position: relative; margin-right: -14px; border-radius: 12px 0 0 12px; background: var(--bg); color: var(--navy); font-weight: 800;
    /* Szerokość wprost: w „Pomocy" link ma `width: 100%`, a wtedy sam ujemny margines go nie wydłuża
     * (zakładka kończyła się przed krawędzią menu, narożniki wisiały w powietrzu — M.R., 24.10). */
    width: calc(100% + 14px);
  }
  /* Wklęsłe narożniki nad i pod zakładką — cień w kolorze tła wypełnia róg poza zaokrągleniem. */
  .side .side-link[aria-current="page"]::before, .side .side-link[aria-current="page"]::after {
    content: ''; position: absolute; right: 0; width: 14px; height: 14px; background: transparent; pointer-events: none;
  }
  .side .side-link[aria-current="page"]::before { top: -14px; border-bottom-right-radius: 12px; box-shadow: 4px 4px 0 4px var(--bg); }
  .side .side-link[aria-current="page"]::after { bottom: -14px; border-top-right-radius: 12px; box-shadow: 4px -4px 0 4px var(--bg); }
  .side .side-link[aria-current="page"] > :last-child:not(.side-text) { margin-right: 14px; }
  /* „Nowy dashboard" to przycisk, nie pozycja listy: w kreatorze zostaje fioletowy, w rzędzie z dzwonkiem, bez zakładki
     doklejonej do treści (28.10: zakładka wypychała go pod dzwonek). */
  .side .side-link.side-cta[aria-current="page"] {
    margin-right: 0; width: auto; border-radius: 12px; font-weight: 800; color: #FFFFFF;
    background: linear-gradient(180deg, color-mix(in srgb, var(--violet) 84%, var(--navy)), color-mix(in srgb, var(--violet) 76%, var(--navy)));
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .7);
  }
  .side .side-link.side-cta[aria-current="page"]::before, .side .side-link.side-cta[aria-current="page"]::after { content: none; }
  /* Pasek przewijania stał między zakładką a stroną — menu przewija się kółkiem i dotykiem. */
  .side { scrollbar-width: none; }
  .side::-webkit-scrollbar { display: none; }
  /* Kropka stanu otwartego dashboardu na jasnej zakładce: pełny kolor zamiast bladego. */
  .side-link[aria-current="page"] .dot { background: var(--warn); }
  .side-link[aria-current="page"] .dot--good { background: var(--good); }
  .side-link[aria-current="page"] .dot--bad { background: var(--pg-media); }
  .side-link[aria-current="page"] .dot--off { background: var(--bad); }
}
@media (max-width: 860px) {
  body:not(.dash-page):not(.bare):not(.showcase):not(.boot) .app::after { right: -70px; bottom: -90px; width: 260px; height: 305px; }
}

/* Okna modalne (zgłoszenie, biblioteka, podglądy). */
.modal-overlay { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; background: rgba(25, 28, 98, .45); overflow-y: auto; }
.modal { width: 100%; max-width: 620px; padding: 22px; background: var(--surface); color: var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.modal--wide { max-width: 1120px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-head h2 { margin: 0; font-size: 20px; font-weight: 800; }
.modal p { margin: 0; }
.modal .notice { margin: 0; }
.modal-form { display: flex; flex-direction: column; gap: 14px; }
/* Pytanie / komunikat / pole tekstowe w miejsce okien przeglądarki (`ask`, `tell`, `askText` w tour.js). */
.modal.modal--ask { max-width: 460px; margin-top: 12vh; gap: 10px; animation: modal-in .16s ease-out; }
.modal--ask .modal-head h2 { font-size: 18px; line-height: 1.3; }
.modal-text { color: var(--ink-soft); font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.modal-label { font-size: 13px; font-weight: 700; margin-top: 4px; }
.modal--ask .modal-input { width: 100%; }
.modal--ask .modal-actions { margin-top: 8px; }
.btn.btn--bad { background: var(--bad); border-color: var(--bad); color: #FFFFFF; }
.btn.btn--bad:hover { background: var(--bad); filter: brightness(.92); }
.btn.btn--bad:focus-visible { outline: 2px solid var(--bad); outline-offset: 2px; }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .modal.modal--ask { animation: none; } }
@media (max-width: 600px) {
  .modal.modal--ask { margin-top: auto; }
  .modal--ask .modal-actions { flex-direction: column-reverse; }
  .modal--ask .modal-actions .btn { width: 100%; justify-content: center; }
}
.r-shot { min-height: 40px; display: flex; align-items: center; }
.r-shot-item { display: flex; align-items: center; gap: 10px; }
.r-shot-item img { max-width: 160px; max-height: 90px; border-radius: 8px; border: 1px solid var(--line); object-fit: cover; }
.r-shot-pick { position: relative; cursor: pointer; }
.r-tech { font-size: 13px; color: var(--ink-soft); }
.r-tech-list { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 2px; word-break: break-word; }
@media (max-width: 640px) { .modal { padding: 16px; } .modal-overlay { padding-top: 16px; } }

/* Kontakt do administratora (e-mail, Teams). */
.contact { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; }
.contact-title { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 14px; }
.contact-title svg, .contact-row svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; flex: none; }
.contact-row { display: flex; flex-wrap: wrap; gap: 8px; }
.contact-row .btn { word-break: break-all; }

/*
 * Pomoc „gdzie to znajdę" — przycisk i okno w prawym dolnym rogu. Wygląd „Poświata PG" (M.R., 24.10): pierścień
 * w barwach PG wokół przycisku, nagłówek z gradientem granat → fiolet i różową poświatą, okno wyskakuje sprężyście.
 * Tekst nagłówka stoi na granatowej części gradientu (kontrast bieli); róż tylko w prawym górnym rogu.
 */
@property --help-ang { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes help-spin { to { --help-ang: 360deg; } }
@keyframes help-pop { from { opacity: 0; transform: translateY(16px) scale(.86); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes help-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes help-aurora { from { background-position: 0 0, 0% 50%; } to { background-position: 0 0, 100% 50%; } }
@keyframes help-pulse { 70% { box-shadow: 0 0 0 7px rgba(255, 255, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); } }
.help-host { position: fixed; right: 18px; bottom: 18px; z-index: 55; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.help-fab {
  --fab-fill: var(--navy);
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; border: 2px solid transparent; cursor: pointer;
  background: linear-gradient(var(--fab-fill), var(--fab-fill)) padding-box,
    conic-gradient(from var(--help-ang), var(--glow-violet), var(--glow-pink), var(--glow-media), var(--glow-violet)) border-box;
  color: #FFFFFF; font: inherit; font-weight: 800; box-shadow: 0 8px 22px -6px rgba(147, 93, 223, .35), var(--shadow);
  animation: help-spin 6s linear infinite;
}
.help-fab svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.help-fab:hover, .help-fab.is-open { --fab-fill: var(--navy-2); }
.help-fab:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }
.help-panel {
  width: min(380px, calc(100vw - 36px)); max-height: min(640px, calc(100vh - 110px)); display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: 22px; overflow: hidden; transform-origin: 100% 100%;
  box-shadow: 0 24px 60px -12px rgba(25, 28, 98, .35), 0 8px 20px -8px rgba(25, 28, 98, .2);
  animation: help-pop .55s cubic-bezier(.2, .9, .25, 1.15) both;
}
.help-panel[hidden] { display: none; }
.help-head {
  position: relative; flex: none; padding: 14px 16px 26px; color: #FFFFFF; overflow: hidden;
  background: radial-gradient(90% 120% at 100% 0%, rgba(253, 127, 178, .36) 0%, rgba(253, 127, 178, 0) 60%),
    linear-gradient(115deg, var(--navy) 0%, var(--navy) 40%, var(--glow-violet) 100%);
  background-size: 100% 100%, 220% 100%;
  animation: help-aurora 9s ease-in-out infinite alternate;
}
.help-top { display: flex; align-items: center; gap: 10px; }
.help-title { font-size: 15px; }
.help-orb {
  width: 38px; height: 38px; border-radius: 50%; padding: 2.5px; flex: none;
  background: conic-gradient(from var(--help-ang), var(--glow-light), var(--glow-pink), var(--glow-media), var(--glow-light)); animation: help-spin 5s linear infinite;
}
.help-orb > span { width: 100%; height: 100%; border-radius: 50%; background: var(--navy); display: grid; place-items: center; }
.help-orb svg { width: 19px; height: 19px; fill: none; stroke: #FFFFFF; stroke-width: 1.8; stroke-linejoin: round; }
.help-x {
  margin-left: auto; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; cursor: pointer;
  color: #FFFFFF; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .3);
}
.help-x:hover { background: rgba(255, 255, 255, .2); }
.help-x:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 2px; }
.help-x svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.help-hello { margin: 14px 0 2px; font-size: 24px; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.help-sub { margin: 0; font-size: 14px; line-height: 1.45; color: rgba(255, 255, 255, .9); max-width: 34ch; }
.help-live { display: inline-flex; align-items: center; gap: 7px; margin-top: 12px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: rgba(255, 255, 255, .14); }
.help-live i { width: 7px; height: 7px; border-radius: 50%; background: #FFFFFF; animation: help-pulse 1.8s infinite; }
/* Po pierwszym pytaniu nagłówek zwija się do paska — miejsce dla rozmowy. */
.help-panel.is-chatting .help-head { padding-bottom: 24px; }
.help-panel.is-chatting :is(.help-hello, .help-sub, .help-live) { display: none; }
.help-body {
  position: relative; z-index: 1; margin-top: -14px; border-radius: 18px 18px 0 0; background: var(--surface);
  flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column;
}
.help-starters[hidden] { display: none; }
.help-starters { padding: 14px 10px 4px; }
.help-label { margin: 0 6px 6px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.help-q {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 8px; border: 0; border-radius: 12px; cursor: pointer;
  background: transparent; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); text-align: left; transition: background .15s, transform .15s;
  animation: help-rise .45s cubic-bezier(.2, .8, .2, 1) both;
}
.help-q:nth-of-type(1) { animation-delay: .2s; } .help-q:nth-of-type(2) { animation-delay: .27s; }
.help-q:nth-of-type(3) { animation-delay: .34s; } .help-q:nth-of-type(4) { animation-delay: .41s; }
.help-q:hover { background: var(--bg); transform: translateX(2px); }
.help-q:focus-visible { outline: 2px solid var(--violet); outline-offset: 0; }
.help-q > svg { margin-left: auto; width: 16px; height: 16px; flex: none; fill: none; stroke: var(--line); stroke-width: 2; transition: stroke .15s; }
.help-q:hover > svg { stroke: var(--violet); }
.help-q-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.help-q-ic svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; }
.help-q--0 .help-q-ic { background: var(--accent-soft); color: var(--violet); }
.help-q--1 .help-q-ic { background: rgba(253, 127, 178, .18); color: var(--navy); }
.help-q--2 .help-q-ic { background: rgba(238, 73, 46, .12); color: var(--pg-media); }
.help-q--3 .help-q-ic { background: var(--bg); color: var(--navy); }
.help-log:empty { display: none; }
.help-log { list-style: none; margin: 0; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.help-msg { max-width: 92%; padding: 9px 12px; border-radius: 12px; font-size: 14px; }
.help-msg p { margin: 0 0 6px; } .help-msg p:last-child { margin-bottom: 0; }
.help-msg--user { align-self: flex-end; background: var(--navy); color: #FFFFFF; }
.help-msg--bot { align-self: flex-start; background: var(--bg); display: flex; flex-direction: column; gap: 8px; }
.help-item { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 10px; padding: 8px 10px; }
.help-item b { display: block; margin-bottom: 2px; }
.help-item p { color: var(--ink-soft); }
.help-item .link-btn svg { width: 14px; height: 14px; vertical-align: -2px; fill: none; stroke: currentColor; stroke-width: 2; }
.help-go {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line-soft); color: var(--ink); font-size: 13.5px; font-weight: 700;
}
.help-go:hover { border-color: var(--violet); }
.help-go:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.help-go svg { margin-left: auto; width: 15px; height: 15px; flex: none; fill: none; stroke: var(--violet); stroke-width: 2; }
.help-not { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.help-not svg { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; }
.help-note { display: flex; align-items: flex-start; gap: 6px; font-size: 12px; line-height: 1.4; color: var(--ink-soft); }
.help-note svg { width: 14px; height: 14px; flex: none; margin-top: 1px; fill: none; stroke: var(--violet); stroke-width: 1.8; stroke-linejoin: round; }
.help-input {
  flex: none; display: flex; align-items: center; gap: 8px; margin: 8px 14px 10px; padding: 5px 5px 5px 14px;
  border: 1.5px solid var(--line); border-radius: 999px; transition: border-color .2s, box-shadow .2s;
}
.help-input:focus-within { border-color: var(--violet); box-shadow: 0 0 0 3px var(--accent-soft); }
/* Obwódka zaznaczenia jest na całej „pigułce" — ogólna obwódka pola tekstowego dawała w środku drugi, prostokątny pierścień. */
.help-input input[type="text"], .help-input input[type="text"]:focus-visible { flex: 1; min-width: 0; padding: 6px 0; border: 0; border-radius: 0; background: transparent; font-size: 14px; outline: 0; box-shadow: none; }
.help-send {
  width: 36px; height: 36px; flex: none; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: #FFFFFF;
  background: linear-gradient(135deg, var(--violet), var(--pink)); transition: transform .15s;
}
.help-send:hover { transform: scale(1.06); }
.help-send:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.help-send svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.help-foot { flex: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; padding: 0 14px 12px; font-size: 12.5px; }
.help-foot svg { width: 15px; height: 15px; vertical-align: -3px; margin-right: 4px; fill: none; stroke: currentColor; stroke-width: 2; }
/* Pod paskiem „Podgląd jako…" okno jest niższe o jego wysokość — krzyżyk i nagłówek nie chowają się pod paskiem. */
.has-preview .help-panel { max-height: min(640px, calc(100vh - 110px - var(--preview-h, 52px))); }
/*
 * Telefon (M.R., 24.10: „mniej miejsca"): panel wysuwany od dołu na całą szerokość, najwyżej 70% wysokości ekranu —
 * góra strony zostaje widoczna. Przycisk „Pomoc" chowa się, gdy okno jest otwarte (zamyka krzyżyk w nagłówku).
 */
@keyframes help-sheet { from { transform: translateY(100%); } to { transform: none; } }
@media (max-width: 640px) {
  .help-host { right: 12px; bottom: 12px; }
  .help-fab span { display: none; }
  .help-fab { padding: 11px; }
  .help-fab.is-open { display: none; }
  .help-panel, .has-preview .help-panel {
    position: fixed; left: 0; right: 0; bottom: 0; width: 100%; max-height: min(70dvh, calc(100dvh - var(--preview-h, 0px) - 16px));
    border-radius: 22px 22px 0 0; border-bottom: 0; animation: help-sheet .35s cubic-bezier(.2, .85, .25, 1) both;
  }
  .help-head { padding: 12px 16px 22px; }
  .help-hello { margin-top: 10px; font-size: 21px; }
  .help-live { display: none; }
  .help-q { padding: 6px 8px; }
  .help-foot { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
}
/* Niskie okno (laptop z paskami przeglądarki, telefon poziomo): mniejsze powitanie, pytania przewijają się w środku. */
@media (max-height: 640px) {
  .help-hello { margin-top: 8px; font-size: 20px; }
  .help-sub, .help-live { display: none; }
}
@media (max-height: 480px) { .help-hello { display: none; } .help-head { padding-bottom: 24px; } }
@media (prefers-reduced-motion: reduce) {
  .help-fab, .help-orb, .help-head, .help-panel, .has-preview .help-panel, .help-q, .help-live i { animation: none; }
  .help-q, .help-q:hover, .help-send:hover { transition: none; transform: none; }
}
/* „Pomoc" zawsze w tym samym rogu (M.R., 24.10: nie skacze między zakładkami). Przyklejony pasek zapisu i pasek
   zmian hurtem robią mu miejsce z prawej, żeby nie zasłaniał „Zapisz zmiany". */
body:has(.help-host) .actions--sticky, body:has(.help-host) .bulk-bar { padding-right: 150px; }
@media (max-width: 640px) { body:has(.help-host) .actions--sticky, body:has(.help-host) .bulk-bar { padding-right: 64px; } }
/* Pływający „Pomoc" nie przykrywa ostatniego wiersza: pod treścią zostaje miejsce na przycisk (M.R., 24.10, telefon). */
body:has(.help-host) .content { padding-bottom: 96px; }
@media (max-width: 640px) {
  body:has(.help-host) .content { padding-bottom: 80px; }
  /* iPhone z paskiem gestów: przycisk nad paskiem, nie na nim. */
  .help-host { bottom: calc(12px + env(safe-area-inset-bottom)); }
}
@media print { .help-host { display: none; } }

/*
 * Biblioteka układów (M.R., 23.10: „zobaczę, jak dobrze zaprojektujesz tę sekcję"). Karta = miniatura układu
 * (schemat sekcji i elementów w siatce 12 kolumn, w barwach PG) + opis + platformy + akcja. Kategorie jako
 * przyciski z liczbą układów; kolor kategorii z trzech linii PG (data / create / media) i granatu.
 */
.lib-tools { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.lib-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.lib-cat-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 8px 7px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; font-weight: 700;
}
.lib-cat-btn:hover:not([disabled]) { border-color: var(--navy); }
.lib-cat-btn[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #FFFFFF; }
.lib-cat-btn[disabled] { opacity: .45; cursor: default; }
.lib-cat-btn:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.lib-cat-n { min-width: 24px; padding: 1px 7px; border-radius: 999px; background: var(--bg); color: var(--ink-soft); font-size: 12px; text-align: center; }
.lib-cat-btn[aria-pressed="true"] .lib-cat-n { background: var(--navy-2); color: #FFFFFF; }
.lib-search { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.lib-search input { flex: 1 1 260px; }
.lib-search select { flex: 0 1 220px; width: auto; }

.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 18px; }
.lib-card {
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow);
  display: flex; flex-direction: column; overflow: hidden; transition: transform .15s ease, box-shadow .15s ease;
}
.lib-card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(25, 28, 98, .05), 0 14px 30px rgba(25, 28, 98, .1); }
.lib-card.has-errors { border-color: var(--bad); }
@media (prefers-reduced-motion: reduce) { .lib-card, .lib-card:hover { transition: none; transform: none; } }
/*
 * Schemat układu dopiero po najechaniu (M.R., 24.10: „za bardzo nieczytelne"): karta = nazwa, opis, platformy;
 * miniatura wyskakuje nad kartą jako dymek (mysz albo Tab). Na ekranie dotykowym jej nie ma — jest „Podgląd".
 */
@media (hover: hover) {
  .lib-card { position: relative; overflow: visible; }
  .lib-card > .lib-thumb-btn {
    position: absolute; left: 10px; right: 10px; bottom: calc(100% - 6px); z-index: 20;
    border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 4px 10px rgba(25, 28, 98, .08), 0 18px 40px rgba(25, 28, 98, .18);
    opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .16s ease-out, transform .16s ease-out;
  }
  .lib-card:hover > .lib-thumb-btn, .lib-card:focus-within > .lib-thumb-btn { opacity: 1; transform: none; pointer-events: auto; }
}
@media (hover: none) { .lib-card > .lib-thumb-btn { display: none; } }
@media (prefers-reduced-motion: reduce) { .lib-card > .lib-thumb-btn { transition: none; transform: none; } }
.lib-card-body { padding: 14px 18px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.lib-card h2 { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.lib-card p { margin: 0; }
.lib-desc { color: var(--ink-soft); font-size: 14px; }
.lib-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 28px; }
.lib-cat { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--violet); }
.lib-cat--leady { color: var(--pg-media); }
.lib-cat--zasieg { color: var(--pink); }
.lib-cat--przeglad, .lib-cat--lokalne { color: var(--navy); }
.lib-admin { display: inline-flex; gap: 4px; }
.icon--bad:hover { border-color: var(--bad); color: var(--bad); }
.lib-facts { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }
.lib-platforms { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.lib-platform { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px 2px 6px; border-radius: 999px; background: var(--bg); font-size: 12px; font-weight: 700; }
.lib-platforms svg { width: 15px; height: 15px; }
.lib-meta { font-size: 12px; color: var(--ink-soft); }
.lib-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 8px; }

/* Miniatura: granatowy pasek jak w dashboardzie, pod nim sekcje z klockami elementów. */
.lib-thumb-btn { position: relative; display: block; width: 100%; padding: 14px 16px 12px; border: 0; border-bottom: 1px solid var(--line-soft); background: var(--bg); cursor: zoom-in; text-align: left; font: inherit; color: inherit; }
.lib-thumb-btn:focus-visible { outline: 2px solid var(--violet); outline-offset: -2px; }
/* Stała wysokość: karty w rzędzie zaczynają opis na tej samej linii; dłuższy układ wygasa na dole. */
.lib-thumb {
  display: flex; flex-direction: column; gap: 8px; height: 168px; overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, var(--navy) 78%, transparent); mask-image: linear-gradient(180deg, var(--navy) 78%, transparent);
}
/* Miniatura na żywo: prawdziwe sekcje dashboardu (800 px) pomniejszone do szerokości dymka (`scale` z JS). */
.lib-thumb--live { display: block; position: relative; height: 240px; }
.lib-thumb--live .lib-mini {
  width: 800px; transform-origin: top left; padding: 0; border: 0; background: transparent; overflow: visible; pointer-events: none;
}
.lib-thumb--live .lib-mini .dv-section { margin-top: 0; }
.lib-thumb--live .lib-mini .dv-section + .dv-section { margin-top: 18px; }
.lib-thumb-bar { display: flex; align-items: center; gap: 6px; height: 18px; padding: 0 8px; border-radius: 6px; background: var(--navy);
  background-image: linear-gradient(90deg, var(--violet) 0 33.34%, var(--pink) 33.34% 66.67%, var(--pg-media) 66.67% 100%); background-size: 100% 2px; background-repeat: no-repeat; background-position: bottom; }
.lib-thumb-logo { width: 8px; height: 8px; border-radius: 2px; background: var(--pg-media); }
.lib-thumb-line { width: 40%; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .55); }
.lib-thumb-section { display: flex; flex-direction: column; gap: 4px; }
.lib-thumb-title { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
.lib-thumb-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; }
.lib-thumb-el {
  --acc: var(--violet);
  display: flex; align-items: center; justify-content: center; height: 26px; border-radius: 5px; background: var(--surface);
  border: 1px solid var(--line-soft); color: var(--acc); position: relative;
}
.lib-thumb-el svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.lib-thumb-span-12 { grid-column: span 12; }
.lib-thumb-span-6 { grid-column: span 6; }
.lib-thumb-span-4 { grid-column: span 4; }
.lib-thumb-more { font-size: 11px; font-weight: 700; color: var(--ink-soft); }
.lib-thumb-hover {
  position: absolute; right: 10px; top: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px;
  background: var(--navy); color: #FFFFFF; font-size: 12px; font-weight: 700; opacity: 0; transition: opacity .15s ease;
}
.lib-thumb-hover svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.lib-thumb-btn:hover .lib-thumb-hover, .lib-thumb-btn:focus-visible .lib-thumb-hover { opacity: 1; }
@media (hover: none) { .lib-thumb-hover { opacity: 1; } }
.lib-tabs { margin-bottom: 10px; }
.lib-tabs .lib-cat-n { margin-left: 6px; }
.lib-client { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--navy); }
.lib-client svg { width: 16px; height: 16px; fill: none; stroke: var(--violet); stroke-width: 2; }
/* Pokaz na przetarg: bez przycisku pomocy, spokojny pasek nad dashboardem, dopisek o danych przykładowych w szarości. */
body.showcase .help-host { display: none; }
.showcase-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 12px; padding: 8px 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line-soft); }
.showcase-bar .btn:last-child { margin-left: auto; }
:fullscreen .showcase-bar { display: none; }
.dv-sample--showcase { background: transparent; color: var(--ink-soft); border: 0; font-weight: 600; }
@media print { .showcase-bar { display: none; } }
.lib-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 32px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--ink-soft); }
/* Porównanie dwóch wersji obok siebie (historia); na wąskim ekranie jedna pod drugą. */
.modal:has(.ver-compare) { max-width: min(1600px, 96vw); }
.ver-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; min-width: 0; }
.ver-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ver-pick { align-self: flex-start; max-width: 100%; }
.ver-pane { max-height: 62vh; }
.ver-diff .version-changes { margin: 4px 0 0; }
.ver-diff-head { margin: 0; font-weight: 700; }
@media (max-width: 900px) { .ver-compare { grid-template-columns: 1fr; } .ver-pane { max-height: 50vh; } }
.lib-preview { background: var(--bg); border-radius: var(--radius-sm); padding: 8px; max-height: 75vh; overflow-y: auto; }
.b-starter--library { border-style: dashed; border-color: var(--violet); }
.b-starter--library b { display: inline-flex; align-items: center; gap: 6px; }
.b-starter--library svg { width: 16px; height: 16px; fill: none; stroke: var(--violet); stroke-width: 2; }

/* Zgłoszenia. */
.rep-list { display: flex; flex-direction: column; gap: 8px; }
.rep-item { border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: var(--surface); }
.rep-head { width: 100%; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 12px; border: 0; background: transparent; font: inherit; color: inherit; text-align: left; cursor: pointer; border-radius: var(--radius-sm); }
.rep-head:hover { background: var(--row-hover); }
.rep-head:focus-visible { outline: 2px solid var(--violet); outline-offset: -2px; }
.rep-title { flex: 1 1 220px; min-width: 0; }
.rep-meta { font-size: 13px; }
.rep-caret svg { width: 16px; height: 16px; fill: none; stroke: var(--ink-soft); stroke-width: 2; transition: transform .15s ease; }
.rep-item.is-open .rep-caret svg { transform: rotate(180deg); }
.rep-detail { padding: 4px 14px 14px; display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line-soft); }
.rep-text { white-space: pre-wrap; margin: 8px 0 0; }
.rep-shot img { max-width: min(100%, 520px); border-radius: 8px; border: 1px solid var(--line); }
.rep-answer { display: grid; grid-template-columns: 200px minmax(0, 1fr) auto auto; gap: 10px; align-items: end; }
@media (max-width: 860px) { .rep-answer { grid-template-columns: minmax(0, 1fr); } }

/* Historia logowań. */
.login-table td { vertical-align: top; }
/* E-mail do lewej i łamany przy kropce/@, a nie wyśrodkowany w pół słowa. */
.login-table .cell-email .link-btn { text-align: left; overflow-wrap: anywhere; }
.login-table .num { text-align: right; }
/* Na wąskim ekranie wiersz osoby staje się kartką z podpisami pól — jak w Dostępach. */
.login-card { container-type: inline-size; }
@container (max-width: 760px) {
  .login-table, .login-table tbody { display: block; }
  .login-table thead { display: none; }
  .login-table tr { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
  .login-table tr + tr { margin-top: 10px; }
  .login-table td, .login-table .num { padding: 0; border: 0; text-align: left; }
  .login-table .cell-email { font-weight: 700; word-break: break-all; }
  .login-table td[data-label] { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px; align-items: baseline; }
  .login-table td[data-label]::before { content: attr(data-label); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-soft); }
  .login-table td[data-label] > * { grid-column: 2; justify-self: start; min-width: 0; }
}
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.timeline li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.timeline li:last-child { border-bottom: 0; }

/* Źródła danych. */
.src-id { display: inline-flex; align-items: center; gap: 4px; }
.src-table .cell-name { min-width: 150px; }
.src-table .cell-name .platform { white-space: nowrap; }
/* Na wąskim ekranie konto = kartka: platforma i przyciski u góry, pola z podpisami pod spodem. */
.src-card { container-type: inline-size; }
@container (max-width: 860px) {
  .src-card .table-scroll { overflow: visible; }
  .src-table, .src-table tbody { display: block; }
  .src-table thead { display: none; }
  .src-table tbody > tr:not(.src-detail) { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); margin-top: 10px; }
  .src-table tr.is-open { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
  .src-table td { padding: 0; border: 0; }
  .src-table .cell-name { grid-row: 1; grid-column: 1; min-width: 0; }
  .src-table .cell-actions { grid-row: 1; grid-column: 2; }
  /* Flex, nie siatka: wartość bywa samym tekstem („rejestr panelu") — w siatce spadałaby pod podpis. */
  .src-table td[data-label] { grid-column: 1 / -1; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; padding-left: 130px; text-indent: 0; position: relative; }
  .src-table td[data-label]::before { content: attr(data-label); position: absolute; left: 0; width: 120px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-soft); }
  .src-table td[data-label] > * { min-width: 0; }
  .src-table .src-detail { display: block; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
  .src-table .src-detail td { display: block; padding: 10px 14px; }
  .src-actions { min-width: 0; width: 100%; }
  /* Nagłówek grupy (dashboard) — pasek na całą szerokość, nie kartka konta. */
  .src-table tbody > tr.src-group { display: block; padding: 0; border: 0; margin-top: 16px; }
  .src-table tr.src-group td { display: block; border: 1px solid var(--line); border-radius: var(--radius-sm); }
  .src-group-toggle { flex-wrap: wrap; text-align: left; }
}
/* Telefon: podpis nad wartością — obok niej długie ID konta (act_…) nie mieści się w kartce. */
@container (max-width: 420px) {
  .src-table td[data-label] { padding-left: 0; flex-direction: column; align-items: flex-start; gap: 2px; }
  .src-table td[data-label]::before { position: static; width: auto; }
}
.src-id { flex-wrap: wrap; overflow-wrap: anywhere; min-width: 0; }
/* W tabeli (szeroko) ID i „Kopiuj" w jednej linii — przy act_… przycisk spadał pod numer (M.R., 27.10). */
@container (min-width: 861px) { .src-id { flex-wrap: nowrap; } }
.icon--small { width: 28px; height: 28px; padding: 4px; }
.icon--small svg { width: 15px; height: 15px; }
.icon.is-done { border-color: var(--good); color: var(--good); }
.src-dash { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.src-table tr.is-open td { border-bottom-color: transparent; }
.src-detail td { background: var(--row-hover); }
.src-detail-body { display: flex; flex-direction: column; gap: 10px; padding: 4px 2px; }
.src-detail-body h3 { margin: 0; font-size: 14px; }
.src-actions { width: auto; min-width: 320px; font-size: 13px; }
.src-actions th, .src-actions td { padding: 5px 10px; }
.acc-check:empty { display: none; }
.acc-check { font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.acc-check-row { display: flex; align-items: flex-start; gap: 6px; padding: 7px 10px; border-radius: 8px; background: var(--bg); }
.acc-check-row svg { width: 16px; height: 16px; flex: none; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 2; }
.acc-check--good { background: var(--good-soft); color: var(--good); }
.acc-check--warn { background: var(--warn-soft); color: var(--warn); }
.acc-check--bad { background: var(--bad-soft); color: var(--bad); }
.acc-check-btn { align-self: flex-start; font-size: 13px; }
.acc-check-btn svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; fill: none; stroke: currentColor; stroke-width: 2; }

/* „Zobacz jako klient". */
.as-client-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 10px 14px; margin-bottom: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.as-client-bar select { width: auto; min-width: 240px; }
.as-client-who { display: inline-flex; align-items: center; gap: 6px; }
.as-client-who svg { width: 18px; height: 18px; fill: none; stroke: var(--violet); stroke-width: 2; }
.as-client-home { margin-bottom: 14px; }

/* Wersja robocza: żółty pasek nad formularzem. */
.draft-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 16px; margin-bottom: 16px; border-radius: var(--radius-sm); background: var(--warn-soft); border: 1px solid var(--warn); }
.draft-bar-text { flex: 1 1 320px; font-size: 14px; }
.draft-bar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
/* `.link-btn` ma `align-self: flex-start` — „Odrzuć" stał wyżej niż przyciski obok. */
.draft-bar-actions .link-btn { align-self: center; }
.draft-bar > div:last-child:empty { display: none; }
.draft-bar .notice { flex-basis: 100%; margin: 0; }
.tag--draft { margin-left: 6px; text-decoration: none; }
.status-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.status-stack .tag { margin: 0; white-space: nowrap; }

/* Historia wersji. */
.versions { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.version { border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 10px 14px; display: flex; flex-direction: column; gap: 6px; }
.version.is-current { border-color: var(--good); }
.version-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 14px; }
.version-n { font-weight: 800; color: var(--violet); }
.version-changes { margin: 0; padding-left: 18px; font-size: 14px; color: var(--ink-soft); }
.version-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Oglądalność. */
.list-stat--static { cursor: default; }
.list-stat--static:hover { border-color: transparent; }
.views-wrap { margin: 6px 0 14px; }
.views-chart { display: block; width: 100%; height: 70px; }
.views-bar { fill: var(--violet); }

/* Zakładki strony dashboardu: linki po prawej. */
.page-tabs-links { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-left: auto; }
.page-tabs-links button.page-tab { border: 0; background: transparent; font: inherit; cursor: pointer; }

/* Zmiany hurtem na liście. */
.cell-pick { width: 36px; }
.cell-pick input { width: 18px; height: 18px; accent-color: var(--navy); cursor: pointer; }
tr.is-picked td { background: var(--accent-soft); }
.bulk-bar {
  position: sticky; bottom: 12px; z-index: 30; display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-top: 12px; padding: 10px 14px; border-radius: var(--radius); background: var(--navy); color: #FFFFFF; box-shadow: var(--shadow);
}
.bulk-bar select { width: auto; min-width: 180px; }
.bulk-bar .btn--ghost { color: #FFFFFF; border-color: rgba(255, 255, 255, .35); }
.bulk-bar .btn--ghost:hover { background: var(--navy-2); }
.bulk-bar .btn--ghost svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.bulk-bar .link-btn { color: #FFFFFF; }
.bulk-count { margin-right: 4px; }
.bulk-result { flex-basis: 100%; }
.bulk-result:empty { display: none; }
@media (max-width: 720px) { .bulk-bar select { flex: 1 1 100%; } }

/* Asystent: załączniki i prośby spoza zasad. */
.as-attach { position: relative; cursor: pointer; }
.as-attach svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
/* Załączniki pod przyciskami z tym samym odstępem co rząd nad nimi (M.R., 29.10: pigułka kleiła się do przycisków);
   „×" w pigułce bez własnej ramki — okrągły, na środku wysokości. */
.as-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.as-files:empty { display: none; }
.as-file { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 4px 4px 6px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; background: var(--surface); }
.as-file img { width: 26px; height: 26px; border-radius: 999px; object-fit: cover; }
.as-file > .icon { width: 26px; height: 26px; border: 0; border-radius: 999px; background: none; color: var(--ink-soft); }
.as-file > .icon:hover:not([disabled]) { background: var(--accent-soft); color: var(--navy); }
.as-file > svg { width: 16px; height: 16px; fill: none; stroke: var(--ink-soft); stroke-width: 2; }
.as-file-name { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.as-card.is-drop { outline: 2px dashed var(--violet); outline-offset: 4px; }
/* Odpowiedź asystenta (M.R., 24.10: „lepiej sformatuj"): zmiany jako lista, „Do zrobienia" i „Tego nie zrobię" w ramkach. */
.as-todo, .as-unsupported { margin-top: 8px; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 14px; background: var(--surface); border: 1px solid var(--line); }
.as-todo > b, .as-unsupported > b { display: block; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.as-todo > b { color: var(--warn); }
.as-unsupported > b { color: var(--bad); }
.as-todo ul, .as-unsupported ul { margin: 4px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 2px; }
.as-next { margin: 10px 0 6px; font-weight: 600; }
.as-next-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.as-next-actions .btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }
.client-dash-actions { display: inline-flex; flex-wrap: wrap; gap: 6px; }

/* ======================================================================== 23.10 wieczór: rozbudowa 3
 * Metryki własne, kilka kont, doradca, „Zapytaj dashboard", przewodnik, RODO, „Co nowego", przenosiny, WCAG.
 * Kolory wyłącznie ze zmiennych palety PG (test palety). */

/* --- dostępność: przejdź do treści, fokus widoczny wszędzie, mniej ruchu na życzenie */
.skip-link {
  position: fixed; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border: 0; border-radius: var(--radius-sm);
  background: var(--navy); color: #FFFFFF; font: inherit; font-weight: 800; cursor: pointer; transition: top .12s;
}
.skip-link:focus, .skip-link:focus-visible { top: 12px; outline: 3px solid var(--pink); outline-offset: 2px; }
a:focus-visible, button:focus-visible, summary:focus-visible, textarea:focus-visible, [tabindex]:focus-visible, .dv-qchip:focus-visible, .chip:focus-visible {
  outline: 2px solid var(--violet); outline-offset: 2px;
}
main h1[tabindex="-1"]:focus, #main:focus { outline: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* --- metryki własne w kreatorze */
.b-custom { display: flex; flex-direction: column; gap: 12px; }
.b-custom-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.b-custom-add .chip small { color: var(--ink-soft); font-weight: 500; }
.b-custom-formula { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: start; margin-top: 10px; }
.b-custom-div { align-self: center; font-size: 26px; font-weight: 800; color: var(--violet); }
.b-custom-side { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.b-custom-side .b-action-add { display: flex; flex-wrap: wrap; gap: 6px; }
.b-custom-side .b-action-add select { flex: 1 1 140px; min-width: 0; }
.b-custom-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.b-custom-meta .field { min-width: 180px; }
.b-custom-item .chip svg { width: 14px; height: 14px; }
@media (max-width: 720px) { .b-custom-formula { grid-template-columns: 1fr; } .b-custom-div { justify-self: center; } }

/* --- doradca układu */
.b-tips { margin: 0 0 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.b-tips summary { display: flex; align-items: center; gap: 8px; padding: 10px 14px; cursor: pointer; }
.b-tips summary svg { width: 18px; height: 18px; fill: none; stroke: var(--violet); stroke-width: 2; flex: none; }
.b-tips ul { margin: 0; padding: 0 14px 12px 36px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.b-tips li { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.b-tips li .link-btn { font-size: 13px; }
.b-tips li { align-items: center; justify-content: flex-start; }
.b-tip-actions { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.b-tip-actions .btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.25; }
.b-tips summary .b-tips-hide-all { margin-left: auto; }

/* --- kilka kont jednej platformy (formularz) */
.src-more { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; padding: 10px; border: 1px dashed var(--line); border-radius: var(--radius-sm); background: var(--row-hover); }
.src-more-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.src-more-gap { width: 32px; }
.src-more-n { font-size: 13px; font-weight: 800; color: var(--ink-soft); text-align: right; }
@media (max-width: 520px) { .src-more-row { grid-template-columns: 22px minmax(0, 1fr) auto; } .src-more-row input:nth-of-type(2) { grid-column: 2 / 3; } }

/* --- Źródła danych dashboardu własnego: kafle platform + karta z kontami (M.R., 26.10) */

/* konta jednej platformy */
.src-accs { display: flex; flex-direction: column; gap: 8px; }
.src-acc { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px 8px; align-items: center; }
.src-acc--multi { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; }
.src-acc--multi > span[aria-hidden] { width: 30px; }
.src-acc-check { grid-column: 1 / -1; }
.src-acc-check:has(.acc-check:empty) { display: none; }
.src-acc-cols > span:last-child { width: 30px; }
.src-acc-cols span { font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.src-acc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.src-acc-actions:empty { display: none; }
.src-later { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--warn-soft); color: var(--warn); font-size: 13px; }
.src-later svg { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.src-later > span { flex: 1 1 200px; }
.src-later .btn { margin-left: auto; }

/* kafle */
.src-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.src-tiles--soon { display: flex; flex-wrap: wrap; align-items: center; margin-top: 10px; gap: 8px; }
.src-tiles--soon .src-tile { flex: 0 1 190px; }
.src-accs .hint { font-size: 13px; }
.src-soon-h { font-size: 12px; font-weight: 700; color: var(--ink-soft); padding-right: 4px; }
.src-tile { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px; text-align: left; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; }
.src-tile:hover { border-color: var(--violet); }
.src-tile:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.src-tile.is-on { background: var(--accent-soft); border-color: var(--accent-soft); box-shadow: inset 3px 0 0 var(--violet); }
.src-tile--soon { min-height: 44px; padding: 6px 10px; border-style: dashed; }
.src-tile--soon .src-tile-ic { width: 26px; height: 26px; }
.src-tile-ic { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--row-hover); }
.src-tile.is-on .src-tile-ic { background: var(--surface); }
.src-tile-ic svg { width: 18px; height: 18px; }
.src-tile-tx { display: flex; flex-direction: column; min-width: 0; }
.src-tile-tx b { font-size: 14px; }
.src-tile.is-on .src-tile-tx b { font-weight: 800; }
.src-tile-tx small { font-size: 12px; color: var(--ink-soft); }
.src-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 14px; margin-top: 18px; align-items: start; }
.src-card2 { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.src-card2-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.src-acc .icon svg, .src-card2-head .icon svg { width: 15px; height: 15px; stroke-width: 2.2; stroke-linecap: round; }

@media (max-width: 720px) {
  .src-acc--multi { grid-template-columns: minmax(0, 1fr) auto; }
  .src-acc--multi > input:first-child { grid-column: 1 / -1; }
  .src-acc-cols { display: none; }
  .src-tiles--soon .src-tile { flex: 1 1 140px; }
  .src-soon-h { flex-basis: 100%; }
}
@media (max-width: 720px), (pointer: coarse) {
  .src-tile--soon { min-height: 40px; }
  .src-acc .icon, .src-card2-head .icon { width: 40px; height: 40px; }
  .src-acc--multi > span[aria-hidden], .src-acc-cols > span:last-child { width: 40px; }
}

/* --- dashboard: filtr konta i „Zapytaj dashboard" */
/* Pasek narzędzi pod nagłówkiem: konto po lewej, „Zapytaj dashboard" i „Zgłoś uwagę" po prawej — nic nie wisi nad danymi. */
.dv-actionbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 14px 4px 0; }
.dv-actionbar-right { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.dv-accounts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dv-accounts-label { font-size: 13px; font-weight: 800; color: var(--ink-soft); }
.dv-ask {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border: 2px solid var(--navy); border-radius: 999px;
  background: var(--surface); color: var(--navy); font: inherit; font-weight: 800; font-size: 14px; cursor: pointer;
}
.dv-ask-panel { margin: 10px 20px 0 auto; }
.dv-ask svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
.dv-ask:hover, .dv-ask[aria-expanded="true"] { background: var(--accent-soft); }
.dv-ask-panel { width: min(380px, calc(100vw - 48px)); padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.dv-ask-panel[hidden] { display: none; }
.dv-ask-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dv-ask-head .dv-icon { color: var(--ink); border-color: var(--line); }
.dv-ask-hint { margin: 0; font-size: 13px; color: var(--ink-soft); }
.dv-ask-out p { margin: 0 0 6px; font-size: 14px; }
.dv-ask-q { font-weight: 700; }
.dv-ask-a { padding: 8px 10px; border-radius: 10px; background: var(--bg); }
.dv-ask-row { display: flex; gap: 8px; }
.dv-ask-row input { flex: 1; min-width: 0; }
/* Telefon: pasek narzędzi w dwóch wierszach (konto, potem przyciski na całą szerokość), okno pytania na całą szerokość. */
@media (max-width: 640px) {
  .dv-actionbar-right { margin-left: 0; width: 100%; }
  .dv-actionbar-right > * { flex: 1 1 auto; justify-content: center; }
  .dv-ask-panel { margin: 10px 12px 0; width: auto; }
}
/* Pomoc panelu na stronie dashboardu — sama ikona w rogu, żeby nie zasłaniała liczb. */
body.dash-page .help-fab span { display: none; }
body.dash-page .help-fab { padding: 12px; }
/* Telefon: pasek zarządzania (zespół PG) ma kilka wierszy — na górze strony, bez przyklejania nad liczbami. */
@media (max-width: 760px) { .dash-manage { position: static; } }
/* Pasek zarządzania w linii z dashboardem pod nim (sekcje dashboardu mają 20 px od krawędzi). */
body.dash-page .dash-manage, body.dash-page .dash-calc-src { margin-left: 20px; margin-right: 20px; }
/* Telefon: ta sama reguła stała niżej niż telefoniczne 12 px i je nadpisywała — pasek bez zawijania rozpychał stronę
   o ~11 px (przycisk „Zapytaj" ucięty z prawej, test 24.10). Tu, po regule ogólnej, wygrywa; na bardzo wąskim
   ekranie ikony narzędzi o 4 px węższe. */
/* 576 px = dashboard 560 px (próg pasów dashboardu) + 2 × 8 px odstępu strony — pasek przełącza się razem z kartami. */
@media (max-width: 576px) { body.dash-page .dash-manage, body.dash-page .dash-calc-src { margin-left: 12px; margin-right: 12px; } }
/* Pasek pokazu i podglądu układu z Biblioteki — w linii z okładką i kartami, jak pasek zarządzania (był o 12–20 px
   szerszy z każdej strony, test 24.10). */
body.dash-page .showcase-bar { margin-left: 20px; margin-right: 20px; }
@media (max-width: 576px) { body.dash-page .showcase-bar { margin-left: 12px; margin-right: 12px; } }
@media (min-width: 577px) and (max-width: 600px) { body.dash-page .dash-manage, body.dash-page .dash-calc-src { margin-left: 20px; margin-right: 20px; } }
@media (max-width: 380px) { .dm .dash-manage-tools .btn--ghost { width: 32px; } }
/* Szablon silnika (Synevo, Pstryk): komunikat i „Otwórz w hubie" w linii z paskiem zarządzania. */
.dash-engine { display: grid; justify-items: start; gap: 4px; margin: 0 20px; }
.dash-engine .notice { justify-self: stretch; }
@media (max-width: 600px) { .dash-engine { margin: 0 12px; } }
/* Telefon: pasek zakładek przewija się palcem — szary pasek przewijania pod nim tylko zabierał miejsce. */
@media (max-width: 720px) { .dv-tabs, .page-tabs { scrollbar-width: none; } }
.dv-icon.is-done { background: var(--good-soft); color: var(--good); }
.dv-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; }

/* --- przewodnik „Pierwsze kroki" */
.tour { position: fixed; inset: 0; z-index: 90; pointer-events: none; }
.tour-ring {
  position: fixed; display: none; border-radius: 12px; pointer-events: none;
  box-shadow: 0 0 0 3px var(--pink), 0 0 0 9999px rgba(25, 28, 98, .55); transition: top .2s, left .2s, width .2s, height .2s;
}
.tour-card {
  position: fixed; width: min(360px, calc(100vw - 24px)); padding: 18px; pointer-events: auto;
  background: var(--surface); color: var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line);
}
.tour-card--center { top: 50% !important; left: 50% !important; bottom: auto !important; transform: translate(-50%, -50%); }
.tour:has(.tour-card--center) { background: rgba(25, 28, 98, .55); }
.tour-card h2 { margin: 2px 0 6px; font-size: 18px; font-weight: 800; }
.tour-card p { margin: 0; font-size: 14px; line-height: 1.5; }
.tour-card .tour-step { font-size: 12px; font-weight: 800; color: var(--violet); text-transform: uppercase; letter-spacing: .04em; }
.tour-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.tour-nav { display: inline-flex; gap: 8px; }
.tour-skip { font-size: 13px; }
@media (max-width: 640px) {
  .tour-card:not(.tour-card--center) { left: 12px !important; right: 12px; bottom: 12px !important; top: auto !important; width: auto; }
}

/* --- okna: przyciski, nowości, RODO, komunikat */
.modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.news-item { padding: 12px 0; border-top: 1px solid var(--line-soft); }
.news-item:first-of-type { border-top: 0; padding-top: 0; }
.news-item h3 { margin: 2px 0 6px; font-size: 16px; font-weight: 800; }
.news-item ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.modal .news-date { font-size: 12px; font-weight: 800; color: var(--violet); }
/* „Co nowego" (M.R., 24.10): wiersz do czytania (~720 px), okno w wysokości ekranu, przewija się sama lista. */
.modal.modal--news { max-width: 720px; max-height: calc(100dvh - 6vh - 16px); overflow: hidden; }
.modal--news .news-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin: 0 -22px; padding: 0 22px 4px; scrollbar-width: thin; }
.modal--news .news-list:focus-visible { outline: 2px solid var(--violet); outline-offset: -2px; }
.modal--news .modal-actions { margin: 0 -22px -22px; padding: 12px 22px; border-top: 1px solid var(--line-soft); }
.modal--news .news-date { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.modal--news .news-item h3 { overflow-wrap: anywhere; line-height: 1.3; }
@media (max-width: 640px) {
  .modal.modal--news { max-height: calc(100dvh - 32px); }
  .modal--news .news-list { margin: 0 -16px; padding: 0 16px 4px; }
  .modal--news .modal-actions { margin: 0 -16px -16px; padding: 12px 16px; }
  .modal--news .modal-actions .btn { flex: 1; justify-content: center; }
  .modal--news .news-item h3 { font-size: 15px; }
  .modal--news .news-item ul { font-size: 13.5px; }
}
.privacy-body { max-height: min(60vh, 520px); overflow-y: auto; padding: 4px 6px 4px 0; display: flex; flex-direction: column; gap: 12px; }
.privacy-body h3 { margin: 0 0 3px; font-size: 15px; font-weight: 800; }
.privacy-body p { font-size: 14px; line-height: 1.55; color: var(--ink); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 95; padding: 10px 16px; border-radius: 999px; background: var(--navy); color: #FFFFFF; font-weight: 700; box-shadow: var(--shadow); }
.client-links { display: flex; flex-wrap: wrap; gap: 14px; margin: 4px 0 12px; }
.client-links .link-btn svg { width: 16px; height: 16px; vertical-align: -3px; margin-right: 5px; fill: none; stroke: currentColor; stroke-width: 2; }

/* --- przenosiny raportów */
.mig-drop {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 16px; text-align: center; cursor: pointer;
  border: 2px dashed var(--line); border-radius: var(--radius); background: var(--row-hover); color: var(--ink);
}
.mig-drop svg { width: 30px; height: 30px; fill: none; stroke: var(--violet); stroke-width: 2; }
.mig-drop:hover, .mig-drop.is-over { border-color: var(--violet); background: var(--accent-soft); }
.mig-pending { margin-top: 12px; }
.mig-rows { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.mig-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 8px; align-items: center; }
.mig-file { font-size: 13px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mig-send { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 14px; }
.mig-send .btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; vertical-align: -3px; margin-right: 6px; }
.mig-progress { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.mig-bar { width: 100%; height: 10px; border: 0; border-radius: 999px; background: var(--line-soft); overflow: hidden; appearance: none; }
.mig-bar::-webkit-progress-bar { background: var(--line-soft); border-radius: 999px; }
.mig-bar::-webkit-progress-value { background: var(--violet); border-radius: 999px; }
.mig-bar::-moz-progress-bar { background: var(--violet); border-radius: 999px; }
.mig-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mig-item { padding: 12px 14px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: var(--surface); }
.mig-item-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.mig-item .hint { margin: 6px 0 0; }
.mig-item-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.mig-item-actions .btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; vertical-align: -3px; margin-right: 5px; }
@media (max-width: 560px) { .mig-row { grid-template-columns: minmax(0, 1fr) auto; } .mig-file { grid-column: 1 / -1; } }

/* --- przenosiny: kroki procesu, oryginał obok projektu */
/* Instrukcja przenosin z Looker Studio — zwinięta na start, kroki numerowane jak w pasku procesu. */
.mig-guide summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; }
.mig-guide summary::-webkit-details-marker { display: none; }
.mig-guide summary::after { content: "Rozwiń"; margin-left: auto; font-size: 13px; font-weight: 700; color: var(--violet); }
.mig-guide[open] summary::after { content: "Zwiń"; }
.mig-guide-title { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; }
.mig-guide-title svg { width: 20px; height: 20px; stroke: var(--violet); fill: none; stroke-width: 2; }
.mig-guide-steps { margin: 14px 0 0; padding-left: 22px; display: grid; gap: 12px; }
.mig-guide-steps li::marker { font-weight: 800; color: var(--navy); }
.mig-guide-steps p { margin: 2px 0 0; font-size: 14px; color: var(--ink-soft); }
.mig-guide-note { margin-top: 14px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--accent-soft); font-size: 14px; }
/* Dane → Konta: grupa = dashboard, zwijana; nagłówek grupy z ikonami platform i stanem sprawdzeń. */
/* Białe wiersze grup (znaczki stanu mają jasnofioletowe tło — na fioletowym wierszu znikały); rozwinięta — pasek z lewej. */
.src-group td { padding: 0; background: var(--surface); border-top: 1px solid var(--line); }
.src-group.is-open td { box-shadow: inset 3px 0 0 var(--violet); }
.src-group-head .link-btn, .list-tools > .link-btn { align-self: center; }
.src-group-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 12px; }
.src-group-toggle { display: inline-flex; align-items: center; gap: 8px; padding: 4px 6px; border: 0; background: none; font: inherit; color: var(--ink); cursor: pointer; border-radius: var(--radius-sm); }
.src-group-toggle:hover b { text-decoration: underline; }
.src-group-toggle:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.src-group-toggle > svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.src-group-tags { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.src-id .mono { white-space: nowrap; }
/* Dane → Konta jak lista dashboardów (M.R., 24.10): pasek filtrów na górze karty, tabela pod nim, źródło i „Ustawienia" po prawej. */
.card.src-card { padding: 0; }
.src-card .table-scroll { padding: 4px 16px 14px; }
.src-tools .dc-search { max-width: 360px; }
.src-group-end { margin-left: auto; display: inline-flex; align-items: center; gap: 12px; }
.src-group-toggle > svg { color: var(--violet); }
.src-group-toggle > svg, .src-row .icon[aria-expanded] svg { transition: transform .15s ease; }
.src-group-toggle[aria-expanded="true"] > svg, .src-row .icon[aria-expanded="true"] svg { transform: rotate(90deg); }
.src-detail-body p { margin: 0; }
.src-row .row-actions { justify-content: flex-end; flex-wrap: nowrap; }
.src-row .btn[disabled] { cursor: not-allowed; }
/* Rozliczenia (administrator): tabela dashboardów, szczegóły w rozwijanym wierszu, małe tabelki wpłat i kosztów. */
.bill-status { align-self: center; font-size: 13px; }
.bill-table td { vertical-align: top; }
.bill-name { font-weight: 700; text-align: left; }
.bill-detail-row > td { background: var(--accent-soft); }
.bill-details { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) minmax(0, 1.8fr); gap: 20px; padding: 6px 4px; }
.bill-details h3 { margin: 0 0 8px; font-size: 14px; }
.bill-details .field { margin-bottom: 10px; }
.bill-mini { width: 100%; border-collapse: collapse; font-size: 13px; }
.bill-mini td, .bill-mini th { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.bill-mini .num, .bill-mini th.num { text-align: right; white-space: nowrap; }
.bill-add { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.bill-add input, .bill-add select { min-height: 34px; padding: 4px 8px; font-size: 13px; width: auto; flex: 1 1 110px; min-width: 0; }
.bill-add input[type="date"], .bill-add input[type="month"] { flex: 0 1 150px; }
.bill-money { max-width: 160px; }
.bill-price { width: 80px; min-height: 30px; padding: 2px 6px; text-align: right; font-size: 13px; }
.bill-settings { display: flex; flex-wrap: wrap; gap: 16px; margin: 12px 0; }
.bill-block > .hint { margin-top: 6px; }
@media (max-width: 1100px) { .bill-details { grid-template-columns: minmax(0, 1fr); } }
/* Kalendarz PG (`calendar.js`) — okienko pod polem daty / miesiąca. */
.cal { position: fixed; z-index: 1000; width: 288px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); font-size: 14px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.cal-head b { font-size: 15px; color: var(--ink); text-transform: capitalize; }
.cal-nav { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink); cursor: pointer; }
.cal-nav:hover { border-color: var(--violet); color: var(--violet); }
.cal-nav svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.cal-grid--months { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.cal-week span { padding: 4px 0; text-align: center; font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.cal-day { height: 34px; border: 0; border-radius: 8px; background: none; font: inherit; color: var(--ink); cursor: pointer; }
.cal-grid--months .cal-day { height: 40px; }
.cal-day:hover:not(:disabled) { background: var(--accent-soft); }
.cal-day.is-out { color: var(--ink-soft); opacity: .55; }
.cal-day.is-today { box-shadow: inset 0 0 0 1.5px var(--violet); font-weight: 700; }
.cal-day.is-picked { background: var(--navy); color: #FFFFFF; font-weight: 700; opacity: 1; }
.cal-day:disabled { opacity: .3; cursor: default; }
.cal-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
/* Filtr kampanii: w ustawieniach elementu (typy jako pigułki, frazy nazwy) i podpis na dashboardzie. */
.b-campaigns > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer; }
.b-campaigns > summary .hint { margin: 0; text-align: right; }
.b-campaign-types { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.b-campaign-names { display: grid; gap: 4px 0; margin-top: 6px; }
.b-campaign-names label { font-size: 13px; font-weight: 600; margin-top: 6px; }
/* Pigułki nad tabelą (jak w Synevo): produkty — miesiąc / kanał / kampania, tabela kampanii — rodzaj; włączony filtr w fiolecie PG. */
.dv-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.dv-fpill {
  display: inline-flex; align-items: center; gap: 4px; max-width: 100%; min-height: 34px; padding: 0 4px 0 13px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); cursor: pointer;
}
.dv-fpill:hover { border-color: var(--ink-soft); }
.dv-fpill.is-on { background: var(--accent-soft); border-color: var(--violet); }
.dv-fpill-label { flex: none; font-size: 13px; color: var(--ink-soft); }
.dv-fpill-label::after { content: ':'; }
select.dv-fselect {
  width: auto; min-width: 0; max-width: 240px; height: 32px; padding: 0 26px 0 2px; border: 0; background-color: transparent;
  font-size: 13.5px; font-weight: 700; color: var(--navy); cursor: pointer; text-overflow: ellipsis;
  background-repeat: no-repeat; background-size: 5px 5px, 5px 5px;
  background-image: linear-gradient(45deg, transparent 50%, var(--navy) 50%), linear-gradient(135deg, var(--navy) 50%, transparent 50%);
  background-position: calc(100% - 14px) 54%, calc(100% - 9px) 54%;
}
.dv-fpill--wide select.dv-fselect { max-width: 340px; }
select.dv-fselect:focus-visible { box-shadow: none; text-decoration: underline; }
@supports (appearance: base-select) {
  .dv-fselect::picker(select) { min-width: 260px; max-width: min(420px, calc(100vw - 32px)); }
  /* Kwota przy kanale i kampanii — w rozwiniętej liście po prawej, szara (w zamkniętej pigułce sama nazwa). */
  .dv-fselect option[data-note] { display: flex; gap: 16px; }
  .dv-fselect option[data-note]::after { content: attr(data-note); margin-left: auto; font-weight: 500; color: var(--ink-soft); white-space: nowrap; }
}
/* Urządzenia (M.R., 28.10): kafel na urządzenie jak kafle KPI — ikona w kolorze elementu, liczba, udział i zmiana; pod spodem tabela. */
.dv-dev-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 0 0 14px; }
.dv-dev {
  display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); container-type: inline-size;
}
.dv-dev-head { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.dv-dev-head span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dv-dev-head svg { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--acc, var(--violet)); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dv-dev .dv-value { font-size: clamp(20px, 14cqi, 30px); font-weight: 600; line-height: 1.05; letter-spacing: -.03em; }
.dv-dev-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.dv-dev-share { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.dv-dev .dv-delta { padding: 3px 10px; font-size: 11.5px; font-weight: 600; }
.dv--phone .dv-dev-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 520px) { .dv-dev-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .dv-dev { padding: 12px; } }
/* Wyszukiwarka w pigułce: lupa i pole bez ramki, szerokie na tyle, żeby nazwa kampanii się mieściła. */
.dv-search { flex: 0 1 260px; gap: 6px; padding-right: 12px; cursor: text; }
.dv-search svg { flex: none; width: 15px; height: 15px; fill: none; stroke: var(--ink-soft); stroke-width: 2; stroke-linecap: round; }
.dv-search input { flex: 1; min-width: 0; height: 32px; padding: 0; border: 0; background: transparent; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--navy); }
.dv-search input:focus { outline: none; box-shadow: none; }
.dv-search:focus-within { border-color: var(--violet); }
/* Kolumna z tekstem obok nazwy (np. „Rodzaj" przy kampanii) w jednej linii — „Pozyskiwanie leadów" podwajało wysokość wiersza. */
.dv-table tbody td:not(:first-child):not(.num) { white-space: nowrap; }
/* Progi KPI w tabeli: komórka w normie zielona, poza normą czerwona; pod tabelą — które progi. */
.dv-table td.dv-kpi { font-weight: 700; }
.dv-table-note { margin: 8px 0 0; font-size: 12px; }
.dv-prod-hint { margin: 0 0 10px; font-size: 12px; }
.dv-prod-empty { margin: 8px 0; }
@media (max-width: 720px), (pointer: coarse) {
  .dv-fpill { min-height: 40px; }
  select.dv-fselect { height: 38px; }
}
@media (max-width: 520px) {
  .dv-fpill { flex: 1 1 100%; justify-content: space-between; }
  select.dv-fselect, .dv-fpill--wide select.dv-fselect { max-width: none; flex: 1; min-width: 0; }
}
.dv-filter-note { display: flex; align-items: flex-start; gap: 6px; margin: -4px 0 10px; font-size: 12px; color: var(--ink-soft); }
.dv-filter-note svg { flex: none; width: 13px; height: 13px; margin-top: 2px; stroke: currentColor; fill: none; stroke-width: 2; }
/* Przewodniki — karty zwijane: nazwa, dla kogo i liczba kroków w nagłówku. */
.guide-sum { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; }
.guide-sum::-webkit-details-marker { display: none; }
.guide-sum h2 { margin: 0 0 4px; }
.guide-sum p { margin: 0; }
.guide-sum .tag { flex: none; }
/* Nagłówek zwiniętej karty: opis zwykłą czcionką, strzałka przy tytule (ogólny styl rozwijanych bloków jest pogrubiony). */
details.guide > .guide-sum { align-items: flex-start; font-weight: 400; }
details.guide > .guide-sum > div { flex: 1; min-width: 0; }
details.guide > .guide-sum::before { margin-top: 10px; }
details.guide { margin-bottom: 10px; }
details.guide[open] > .guide-sum { margin-bottom: 12px; }
.mig-steps { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 8px; }
.mig-step { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line-soft); }
.mig-step.is-done { border-color: color-mix(in srgb, var(--good) 40%, transparent); }
.mig-step.is-now { border-top-color: var(--violet); background: var(--accent-soft); }
.mig-step-n { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #FFFFFF; font-weight: 800; font-size: 13px; }
.mig-step.is-done .mig-step-n { background: var(--good); }
.mig-step-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mig-step-body small { color: var(--ink-soft); font-size: 12px; line-height: 1.4; }
.mig-counts { display: flex; flex-wrap: wrap; gap: 6px; }
.mig-item-name { font-weight: 800; color: var(--ink); text-decoration: none; }
.mig-item-name:hover { text-decoration: underline; }
.mig-summary { margin: 6px 0 0; font-size: 14px; }
.mig-platforms { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0 0; font-size: 13px; color: var(--ink-soft); }
.mig-platforms .chip svg { width: 14px; height: 14px; }
.mig-compare { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 980px) { .mig-compare { grid-template-columns: 1fr; } }
.mig-original-img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.mig-original-file { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 16px; border: 1px dashed var(--line); border-radius: var(--radius-sm); }
.mig-original-file svg { width: 24px; height: 24px; fill: none; stroke: var(--violet); stroke-width: 2; }
.mig-outline { margin: 8px 0 14px; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.mig-outline ul { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: 14px; }
.mig-outline ul li { display: flex; align-items: center; gap: 6px; }
.mig-outline svg { width: 15px; height: 15px; flex: none; fill: none; stroke: var(--violet); stroke-width: 2; }
.mig-todo { margin: 6px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.mig-preview { overflow-x: auto; }
.mig-preview--phone { display: flex; justify-content: center; padding: 6px 0 4px; overflow: hidden; }

/* --- przewodniki (Administracja) */
.guides { display: flex; flex-direction: column; gap: 16px; }
.guide-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.guide-head h2 { margin: 0 0 4px; }
.guide-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.guide-tools .btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; vertical-align: -3px; margin-right: 6px; }
.guide-steps { margin: 14px 0 0; padding-left: 22px; display: flex; flex-direction: column; gap: 12px; }
.guide-steps li::marker { font-weight: 800; color: var(--violet); }
.guide-steps p { margin: 2px 0; font-size: 14px; color: var(--ink); }

/* --- menu: rozwijana grupa „Ustawienia panelu" (strony administratora, których będzie przybywać) */
/* Odstęp ikona–napis jak w każdej pozycji menu (10 px) — napisy „Pomoc" i „Więcej" w linii z resztą menu. */
.side-more > summary.side-more-sum { gap: 10px; font-weight: 600; }
.side-more > summary.side-more-sum::before { display: none; }
.side-more > summary.side-more-sum::after {
  content: ''; margin-left: auto; width: 7px; height: 7px; flex: none;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s ease; opacity: .8;
}
.side-more[open] > summary.side-more-sum::after { transform: rotate(45deg); }
.side-more > summary.side-more-sum:hover { color: #FFFFFF; }
.side-more > summary.side-more-sum:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 1px; }
.side-more-list { display: flex; flex-direction: column; gap: 2px; padding-left: 14px; margin-top: 2px; border-left: 1px solid rgba(255, 255, 255, .18); margin-left: 18px; }

/* --- raport miesięczny */
.mr-card .grid-2 { margin-bottom: 4px; }
.mr-examples { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.mr-pick-wrap { margin: 4px 0 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.mr-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 10px; margin-top: 10px; }
.mr-sec { margin: 0; padding: 8px 10px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mr-sec legend { padding: 0 4px; font-weight: 800; font-size: 13px; color: var(--navy); }
.mr-sec .check { display: flex; align-items: flex-start; gap: 6px; font-size: 14px; white-space: normal; height: auto; min-height: 0; border-radius: 10px; line-height: 1.35; }
.mr-sec .check input { margin-top: 2px; }
.mr-sec .check svg { width: 15px; height: 15px; flex: none; fill: none; stroke: var(--violet); stroke-width: 2; }
.mr-formats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 760px) { .mr-formats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mr-format {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px; text-align: left; cursor: pointer;
  border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: inherit;
}
.mr-format svg { width: 20px; height: 20px; fill: none; stroke: var(--violet); stroke-width: 2; }
.mr-format small { color: var(--ink-soft); font-size: 12px; line-height: 1.35; }
.mr-format:hover { border-color: var(--violet); }
.mr-format[aria-checked="true"] { border-color: var(--navy); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--navy); }
.mr-go { display: flex; gap: 10px; margin-top: 12px; }
.mr-go .btn svg, .mr-row-actions .btn svg, .mr-new .btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; vertical-align: -3px; margin-right: 6px; }
.mr-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mr-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 14px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: var(--surface); }
.mr-row-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mr-row-body .tag { align-self: flex-start; }
.mr-comment { font-size: 13px; color: var(--ink); border-left: 1px solid var(--violet); padding-left: 8px; }
.mr-row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: flex-end; }
.mr-fmt { display: inline-grid; place-items: center; min-width: 74px; padding: 6px 8px; border-radius: 8px; font-size: 12px; font-weight: 800; color: #FFFFFF; background: var(--navy); }
.mr-fmt--xlsx { background: var(--good); }
.mr-fmt--docx { background: var(--violet); }
.mr-fmt--pptx { background: var(--pg-media); }
.mr-new { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 640px) { .mr-row { grid-template-columns: 1fr; } .mr-row-actions { justify-content: flex-start; } }

/* --- historia uwag */
.fh-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.fh-item { padding: 10px 14px; border-radius: var(--radius-sm); background: var(--row-hover); }
.fh-head { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--ink-soft); }
.fh-when { font-variant-numeric: tabular-nums; }
.fh-who { font-weight: 700; color: var(--ink); }
.fh-dash { font-weight: 700; color: var(--navy); }
.fh-what { margin: 4px 0 0; font-size: 14px; }
.fh-text { margin: 4px 0 0; font-size: 13px; color: var(--ink-soft); }

/* --- akceptacje administratora */
.draft-bar--pending { border-left-color: var(--pink); }
/* Karta prośby (M.R., 27.10): ikona rodzaju | treść; stopka z trzema przyciskami tej samej wysokości. */
.ap-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ap-item { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; padding: 16px 18px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: var(--surface); }
/* Oczekująca prośba — kreska „media" z lewej; stan pokazuje plakietka. */
.ap-item--czeka { border-color: var(--line); border-left: 3px solid var(--pg-media); padding-left: 16px; }
.ap-kind { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--navy); }
.ap-kind svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.ap-main { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.ap-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px 16px; }
.ap-head > .tag { flex: none; margin-top: 2px; }
.ap-title { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ap-name { font-size: 16px; font-weight: 800; line-height: 1.3; color: var(--navy); text-decoration: none; overflow-wrap: anywhere; }
a.ap-name:hover { text-decoration: underline; }
.ap-meta { margin: 0; font-size: 13px; line-height: 1.45; color: var(--ink-soft); overflow-wrap: anywhere; }
.ap-meta b { font-weight: 700; color: var(--ink); }
.ap-history-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.ap-history-head h2 { margin: 0; }
.ap-link { color: var(--violet); font-weight: 600; }
.ap-risks { list-style: none; margin: 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--bg); display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.45; }
.ap-risks li { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 8px; align-items: start; }
.ap-risks svg { width: 16px; height: 16px; margin-top: 2px; fill: none; stroke: var(--warn); stroke-width: 2; }
.ap-changes { font-size: 13px; }
.ap-changes ul { margin: 6px 0 0; padding-left: 20px; }
.ap-comment { margin: 0; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.ap-main > .notice { margin: 0; }
.ap-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.ap-actions .btn { min-height: 36px; }
.ap-actions .btn svg { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; }
@media (max-width: 720px), (pointer: coarse) { .ap-actions .btn { min-height: 40px; } }
@media (max-width: 560px) {
  .ap-item { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 14px; }
  .ap-item--czeka { padding-left: 12px; }
  .ap-kind { display: none; }
  .ap-head { flex-direction: column-reverse; align-items: flex-start; }
  .ap-actions { flex-direction: column; align-items: stretch; }
  .ap-actions .btn { justify-content: center; }
  /* Filtr historii w dwóch równych kolumnach zamiast zawiniętej „pigułki". */
  .ap-history-head .seg { display: grid; grid-template-columns: 1fr 1fr; width: 100%; border-radius: 14px; }
  .ap-history-head .seg button { border-radius: 10px; }
}

/* --- menu w grupach: Praca / Tworzenie / Dane, zwijany szybki dostęp do dashboardów */
.side-group--main .side-label { margin-top: 10px; }
.side-group--main .side-bell + .side-label { margin-top: 12px; }
.side-quick > summary.side-quick-sum { display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; font-weight: 800; }
.side-quick > summary.side-quick-sum::before { display: none; }
/* Ogólne „najechanie" na rozwijany nagłówek daje granat — w granatowym menu napis by znikał. */
.side-quick > summary.side-quick-sum:hover { color: #FFFFFF; }
.side-quick > summary.side-quick-sum::after {
  content: ''; width: 6px; height: 6px; margin-right: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); transition: transform .15s ease; opacity: .8;
}
.side-quick[open] > summary.side-quick-sum::after { transform: rotate(45deg); }
.side-quick > summary.side-quick-sum:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 2px; border-radius: 6px; }
/* Ponad 5 dashboardów (M.R., 27.10): reszta, z Wyłączonymi na końcu, pod jedną pozycją „Pokaż wszystkie (N)"; rozwinięta — „Zwiń". */
.side-quick-rest > summary.side-quick-rest-sum { font-size: 13px; opacity: .85; cursor: pointer; list-style: none; }
.side-quick-rest > summary.side-quick-rest-sum::-webkit-details-marker { display: none; }
.side-quick-rest > summary.side-quick-rest-sum::before { display: none; }
.side-quick-rest > summary.side-quick-rest-sum::after {
  content: ''; margin-left: auto; margin-right: 6px; width: 6px; height: 6px; flex: none;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .15s ease; opacity: .8;
}
.side-quick-rest[open] > summary.side-quick-rest-sum::after { transform: rotate(-135deg); }
.side-quick-rest > summary.side-quick-rest-sum:hover { color: #FFFFFF; }
.side-quick-rest > summary.side-quick-rest-sum:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 1px; }
.side-quick-rest-list { display: flex; flex-direction: column; }
/* Pinezka przy dashboardzie (M.R., 26.10): przypięty ma ją zawsze, pozostałe po najechaniu albo z klawiatury.
   Bez animacji — pojawia się od razu. Tekst robi jej miejsce, żeby się nie nakładał. */
.side-pinrow { position: relative; }
.side-pin {
  position: absolute; top: 50%; right: 4px; translate: 0 -50%; display: inline-grid; place-items: center;
  width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: rgba(255, 255, 255, .7);
  cursor: pointer; opacity: 0;
}
.side-pin svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.side-pinrow:hover .side-pin, .side-pin:focus-visible, .side-pinrow.pinned .side-pin { opacity: 1; }
.side-pin:hover { background: rgba(255, 255, 255, .12); color: #FFFFFF; }
.side-pin:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 0; }
.side-pinrow.pinned .side-pin svg { fill: currentColor; }
.side-pinrow:hover .side-link, .side-pinrow:focus-within .side-link, .side-pinrow.pinned .side-link { padding-right: 36px; }
/* Na jasnej zakładce otwartego dashboardu pinezka w kolorze tekstu. */
.side-pinrow .side-link[aria-current="page"] + .side-pin { color: var(--navy); }
.side-pinrow .side-link[aria-current="page"] + .side-pin:hover { background: var(--accent-soft); }
/* Dotyk: bez najeżdżania — pinezka tylko przy przypiętych (przypinanie z „⋯" na liście Dashboardy), cel 40 px. */
@media (max-width: 720px), (pointer: coarse) {
  .side-pin { width: 40px; height: 40px; right: 2px; }
  .side-pinrow:hover:not(.pinned) .side-pin { opacity: 0; pointer-events: none; }
  .side-pinrow:hover:not(.pinned) .side-link { padding-right: 10px; }
  .side-pinrow.pinned .side-link { padding-right: 46px; }
}
/* Administracja zwijana (M.R., 24.10): licznik spraw czekających tylko przy zwiniętej. */
.side-admin-title { flex: 1; }
/* Praca i Narzędzia zwijane tak samo (M.R., 28.10): w Pracy licznik nowych uwag tylko przy zwiniętej. */
.side-admin > summary .side-admin-n, .side-fold > summary .side-admin-n { margin: 0 8px 0 0; }
.side-admin[open] > summary .side-admin-n, .side-fold[open] > summary .side-admin-n { display: none; }
/* Lista dashboardów: etykieta konta (kilka kont jednej platformy). */
.src-label { margin-left: 6px; padding: 1px 6px; border-radius: 999px; background: var(--accent-soft); color: var(--navy); font-size: 11px; font-weight: 700; }

/* --- portal klienta: pasek, powitanie, siatka kart dashboardów, uwagi, stopka (baza; wygląd „Poświata" — niżej) */
body.client-portal-page { background: var(--bg); }
.client-portal { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.client-top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 14px clamp(16px, 4vw, 48px); background: var(--navy); color: #FFFFFF;
  background-image: linear-gradient(90deg, var(--violet) 0 33.34%, var(--pink) 33.34% 66.67%, var(--pg-media) 66.67% 100%); background-size: 100% 4px; background-repeat: no-repeat; background-position: bottom;
}
.client-top-logo { height: 34px; width: auto; flex: none; }
.client-top-right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.client-top .bare-lang { position: static; }
.client-top-out { padding: 7px 14px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; background: transparent; color: #FFFFFF; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.client-top-out:hover { background: rgba(255, 255, 255, .12); }
/* Dzwonek klienta (M.R., 27.10): tylko odpowiedzi na jego uwagi; liczba stoi, nie pulsuje. */
.client-bell {
  position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0;
  border: 1px solid rgba(255, 255, 255, .35); border-radius: 50%; background: transparent; color: #FFFFFF; cursor: pointer;
}
.client-bell:hover, .client-bell[aria-expanded="true"] { background: rgba(255, 255, 255, .12); }
.client-bell:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 2px; }
.client-bell svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
.client-bell-count {
  position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
  background: var(--pg-media); color: #FFFFFF; font-size: 11px; font-weight: 800; line-height: 19px; text-align: center; box-shadow: 0 0 0 2px var(--navy);
}
.client-bell-count[hidden] { display: none; }
.notif.client-notif { left: auto; right: max(16px, calc((100vw - 1180px) / 2 + 16px)); top: 70px; }
.client-notif .notif-item { width: 100%; font: inherit; text-align: left; background: var(--surface); cursor: pointer; }
.client-notif .notif-item:hover { background: var(--row-hover); }
.client-notif .notif-item.is-seen { background: transparent; }
@media (max-width: 720px) {
  .notif.client-notif { left: 12px; right: 12px; top: 64px; width: auto; max-height: calc(100dvh - 76px); }
}
.client-main { width: 100%; max-width: 1180px; margin: 0 auto; padding: 36px clamp(16px, 4vw, 48px) 48px; display: flex; flex-direction: column; gap: 28px; flex: 1; }
.client-hello h1 { margin: 2px 0 6px; font-size: clamp(28px, 4vw, 38px); font-weight: 800; letter-spacing: -.02em; }
.client-hello .muted { margin: 0; font-size: 16px; }
.client-portal .client-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 18px; list-style: none; padding: 0; margin: 0; border: 0; border-radius: 0; }
.client-card {
  display: flex; flex-direction: column; gap: 10px; padding: 22px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.client-card h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.client-card .client-dash-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 8px; }
.client-card .client-dash-actions .btn { flex: 1 1 auto; justify-content: center; }
.client-card .client-dash-actions .btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; vertical-align: -3px; margin-right: 6px; }
.client-feedback { padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.client-feedback h2 { margin: 0 0 12px; font-size: 18px; }
/* Stopka zawsze przy dole ekranu (M.R., 25.10): przy krótkiej liście `margin-top: auto` spycha ją w dół `.client-main`,
   przy długiej stoi pod treścią — nie przypięta nad kartami, bo na telefonie zasłaniałaby je. */
.client-foot { display: flex; flex-direction: column; gap: 10px; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line); }
.client-foot .muted { margin: 0; font-size: 13px; }
@media (max-width: 640px) {
  .client-portal .client-list { grid-template-columns: 1fr; }
  .client-top-logo { height: 30px; }
}

/*
 * Strona startowa klienta — wariant „Poświata" (M.R., 27.10; wybór z trzech wersji na żywo i poprawki na podglądzie).
 * Nadpisuje bazę powyżej w tej kolejności, w jakiej zatwierdzał ją M.R.: menu i powitanie to jeden granatowy blok,
 * karty (kafelek „Stopka") wchodzą 48 px na jego krawędź, „Twoje uwagi" jako skrzynka rozmów, zwarty dzwonek, ☰ na
 * telefonie, stopka ze znakiem PG, znak PG w rogu okna od 1024 px. Kolory tylko z tokenów PG.
 */
/* --- karty: cała karta klikalna, „Otwórz →" w naturalnej szerokości; data nad powitaniem */
.client-date { margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: .02em; color: var(--glow-light); }
.client-date::first-letter { text-transform: uppercase; }
.client-portal .client-card .client-dash-actions { flex-wrap: nowrap; align-items: stretch; }
.client-portal .client-open { flex: 1 1 auto; justify-content: center; min-height: 42px; }
.client-portal .client-open svg { margin: 0 0 0 4px !important; transition: transform .2s ease; }
.client-portal .client-card:hover .client-open svg, .client-portal .client-open:focus-visible svg { transform: translateX(3px); }
.client-portal-page .client-card {
  cursor: pointer; border: 0; border-radius: 18px; padding: 24px; gap: 14px;
  box-shadow: 0 1px 2px rgba(25, 28, 98, .06), 0 16px 38px -14px rgba(25, 28, 98, .28);
  transition: transform .2s ease, box-shadow .2s ease;
}
.client-portal-page .client-card:hover { transform: translateY(-3px); box-shadow: 0 1px 2px rgba(25, 28, 98, .06), 0 22px 44px -14px rgba(25, 28, 98, .34); }
.client-portal-page .client-card h2 { font-size: 24px; line-height: 1.25; }
.client-portal-page .client-card .client-dash-actions { padding-top: 8px; }

/* Siatka i odstępy w jednej skali: karty co 20 px, sekcje co 32 px, karta 24 px w środku i 16 px między wierszami. */
.client-portal-page .client-card { gap: 16px; }
.client-portal-page .client-main { gap: 32px; }
.client-portal-page .client-portal .client-list, .client-portal-page .client-list { gap: 20px; }
.client-portal-page .client-list.client-cols-2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.client-portal-page .client-list.client-cols-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.client-card-info { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.client-portal-page .client-card .client-dash-actions { margin-top: auto; }
/* „Otwórz" w naturalnej szerokości — rozciągnięty na pół ekranu wyglądał jak pasek, nie przycisk. */
.client-portal-page .client-portal .client-open, .client-portal-page .client-open { flex: 0 1 auto; min-width: 168px; padding: 0 28px; }

/* Jeden dashboard: szeroka karta na całą kolumnę — nazwa i źródła po lewej, „Otwórz" po prawej. */
.client-portal-page .client-list.client-cols-1 { grid-template-columns: minmax(0, 1fr); }
.client-cols-1 .client-card { flex-direction: row; align-items: center; justify-content: space-between; gap: 32px; padding: 32px 36px; }
.client-cols-1 .client-card h2 { font-size: clamp(26px, 3vw, 34px); letter-spacing: -.02em; }
.client-cols-1 .client-card .client-dash-actions { margin: 0; padding: 0; flex: none; }
.client-cols-1 .client-open { min-height: 52px; min-width: 220px; font-size: 16px; }
@media (max-width: 720px) {
  .client-cols-1 .client-card { flex-direction: column; align-items: stretch; gap: 24px; padding: 24px; }
}
@media (max-width: 560px) {
  .client-portal-page .client-open, .client-portal-page .client-portal .client-open { flex: 1 1 auto; min-width: 0; }
}

/* --- jeden granatowy blok: menu + powitanie, poświata stoi (bez ruchu). Poświata jak na logowaniu (`--scene-glow`,
   M.R., 28.10): fiolet z prawego górnego rogu i ślad różu, bez pomarańczowej plamy i bez linii PG na krawędzi. */
.client-head {
  position: relative; color: #FFFFFF;
  background-color: var(--navy);
  background-image: var(--scene-glow);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: 0 0;
}
/* Menu na tej samej krawędzi co powitanie i karty (kolumna 1180 px), nie przy brzegu ekranu. */
.client-portal-page .client-top {
  background: none; padding-top: 18px; padding-bottom: 18px;
  padding-inline: max(clamp(16px, 4vw, 48px), calc((100% - 1180px) / 2 + clamp(16px, 4vw, 48px)));
}
/* Logo większe (M.R., 27.10) — w proporcji do dużego powitania. */
.client-portal-page .client-top-logo { height: 44px; }
.client-hero { padding: clamp(20px, 4vw, 44px) 0 120px; }
.client-hero-in { max-width: 1180px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); }
.client-portal-page .client-hello h1 { color: #FFFFFF; font-size: clamp(32px, 5vw, 54px); letter-spacing: -.025em; margin: 0 0 10px; }
.client-portal-page .client-hello .muted { color: rgba(255, 255, 255, .78); font-size: 17px; margin: 0; }
.client-portal-page .client-main { margin-top: -84px; position: relative; padding-top: 0; }

/* --- prawa strona menu: dzwonek, język i „Wyloguj" w jednym stylu — półprzezroczyste na granacie, wysokość 36 px */
.client-portal-page .client-top-right { gap: 10px; }
.client-portal-page .client-bell { width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; }
.client-portal-page .client-bell:hover, .client-portal-page .client-bell[aria-expanded="true"] { background: rgba(255, 255, 255, .12); }
.client-portal-page .client-bell-count { top: 1px; right: 1px; min-width: 17px; height: 17px; line-height: 17px; font-size: 10px; }
.client-portal-page .client-top .bare-lang { height: 36px; align-items: center; padding: 3px; border: 1px solid rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .06); }
.client-portal-page .client-top .bare-lang button { height: 28px; color: rgba(255, 255, 255, .8); }
.client-portal-page .client-top .bare-lang button:hover { color: #FFFFFF; background: rgba(255, 255, 255, .12); }
.client-portal-page .client-top .bare-lang button[aria-pressed="true"] { background: #FFFFFF; color: var(--navy); }
.client-portal-page .client-top-out { height: 36px; padding: 0 16px; border-color: rgba(255, 255, 255, .28); }

/* --- „Twoje uwagi" zwinięte pod dashboardami; przy nagłówku stan (nowa odpowiedź / otwarte) */
.client-portal-page .client-feedback { border: 0; border-radius: 18px; padding: 0; box-shadow: 0 1px 2px rgba(25, 28, 98, .05), 0 10px 26px -18px rgba(25, 28, 98, .3); }
.client-fb-fold > summary { padding: 18px 22px; gap: 12px !important; border-radius: 18px; }
.client-fb-fold > summary:hover { background: var(--row-hover); }
.client-fb-fold > summary h2 { margin: 0 !important; font-size: 18px; }
.client-fb-tags { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.client-fb-body { padding: 0 22px 22px; }

/* --- wejście z animacją tylko przy otwarciu strony */
@keyframes client-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes client-fade { from { opacity: 0; filter: blur(8px); } to { opacity: 1; filter: none; } }
.client-intro .client-hello { animation: client-fade .6s ease both; }
.client-intro .client-card { animation: client-rise .6s cubic-bezier(.2, .7, .2, 1) both; }
.client-intro .client-card:nth-child(2) { animation-delay: .07s; }
.client-intro .client-card:nth-child(3) { animation-delay: .14s; }
.client-intro .client-card:nth-child(4) { animation-delay: .21s; }
.client-intro .client-card:nth-child(n+5) { animation-delay: .28s; }
@media (prefers-reduced-motion: reduce) {
  .client-intro .client-card, .client-intro .client-hello { animation: none; }
  .client-portal-page .client-card, .client-portal .client-open svg { transition: none; }
}

/* Logo = link na start: bez podkreślenia, obwódka tylko z klawiatury. */
.client-top-home { display: inline-flex; flex: none; border-radius: 8px; }
.client-top-home:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 4px; }
.client-portal-page .client-top { flex-wrap: nowrap; }
.client-portal-page .client-top-out { display: inline-flex; align-items: center; gap: 8px; }
.client-portal-page .client-top-out svg { display: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.client-portal-page .client-top .bare-lang button[aria-pressed="true"] { text-decoration: none; font-weight: 700; }

/* Telefon i dotyk: przyciski menu co najmniej 40 px. */
@media (max-width: 720px), (pointer: coarse) {
  .client-portal-page .client-bell, .client-portal-page .client-top-out, .client-portal-page .client-top .bare-lang { height: 40px; }
  .client-portal-page .client-bell { width: 40px; }
  .client-portal-page .client-top .bare-lang button { height: 32px; }
}
@media (max-width: 640px) {
  .client-hero { padding-bottom: 100px; }
  .client-portal-page .client-main { margin-top: -72px; }
}

/* Granat zachodzi tylko na górny pas kart (48 px) i bez linii PG na krawędzi — linia przecinała kartę w połowie
   wysokości, a przy jednej karcie granat zakrywał ponad połowę (M.R., 27.10: „czy to powinno najeżdżać?"). */
.client-hero, .client-portal-page .client-hero { padding-bottom: 88px; }
.client-portal-page .client-main, .client-portal-page.client-portal-page .client-main { margin-top: -48px; }

/* 3 · Stopka: źródła z nazwami, na dole pasek — „Zgłoś uwagę" słowami po lewej, „Otwórz" po prawej. */
.client-portal-page .client-card, .client-portal-page .client-cols-1 .client-card { flex-direction: column; align-items: stretch; gap: 0; padding: 0; }
.client-portal-page .client-card-info { padding: 24px 24px 20px; gap: 14px; }
.client-sources { display: flex; flex-wrap: wrap; gap: 6px; }
.client-source { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 6px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line-soft); font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.client-source svg { width: 16px; height: 16px; }
.client-portal-page .client-card .client-dash-actions.client-card-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding: 14px 24px; border-top: 1px solid var(--line-soft); }
.client-fb-link { display: inline-flex; align-items: center; gap: 6px; align-self: center; text-decoration: none; min-height: 40px; }
.client-fb-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.client-fb-link:hover { color: var(--navy); text-decoration: underline; }
.client-portal-page .client-cols-1 .client-card-info { padding: 32px 36px 24px; }
.client-portal-page .client-cols-1 .client-card .client-dash-actions.client-card-bar { padding: 16px 36px; }

/* ===== „Twoje uwagi" jak skrzynka: wiersz na rozmowę, rozmowa rozwija się po kliknięciu, pole odpowiedzi pod nią ===== */
.client-fb-body .client-fb { gap: 0; margin: 0; border-top: 1px solid var(--line-soft); }
.client-fb-body .client-fb > li { padding: 0; border: 0; border-bottom: 1px solid var(--line-soft); border-radius: 0; }
.client-fb-body .client-fb-item.is-new { border-color: var(--line-soft); box-shadow: inset 3px 0 0 var(--violet); }
.client-conv > summary { gap: 12px !important; align-items: flex-start !important; padding: 16px 8px 16px 10px; border-radius: 10px; }
.client-conv > summary::before { margin-top: 7px !important; }
.client-conv > summary:hover { background: var(--row-hover); }
.client-conv-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.client-conv-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.client-conv-top b { font-size: 15px; color: var(--navy); }
.client-conv-date { flex: none; margin-top: 2px; font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.client-conv-body { padding: 4px 8px 20px 30px; }
.client-thread { gap: 6px; margin-top: 4px; }
.client-msg-row { display: flex; align-items: flex-end; gap: 8px; }
.client-msg-row--me { justify-content: flex-end; }
.client-msg-row--me + .client-msg-row--pg, .client-msg-row--pg + .client-msg-row--me { margin-top: 8px; }
.client-msg-avatar { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; }
.client-msg-avatar:not(:empty) { background: var(--navy); }
.client-msg-avatar img { width: 13px; height: auto; }
.client-conv .client-msg { max-width: min(78%, 560px); padding: 10px 14px; border-radius: 16px; }
.client-conv .client-msg p { margin: 0; font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.client-conv .client-msg--me { background: var(--navy); color: #FFFFFF; border-bottom-right-radius: 4px; }
.client-conv .client-msg--me small { color: rgba(255, 255, 255, .7); }
.client-conv .client-msg--pg { background: var(--bg); border: 1px solid var(--line-soft); border-bottom-left-radius: 4px; }
.client-conv .client-msg-who { margin-bottom: 3px; }
.client-conv .client-fb-slot { margin-top: 16px; }
.client-composer { display: flex; align-items: flex-end; gap: 8px; }
.client-composer textarea { flex: 1; min-width: 0; min-height: 44px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; resize: vertical; font: inherit; font-size: 14px; }
.client-composer .btn { flex: none; min-height: 44px; }
.client-fb-body .client-fb-closed { margin-top: 4px; }
.client-fb-body .client-fb-closed > summary { padding: 14px 10px 10px; font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.client-fb-body .client-fb-closed .client-fb { margin-top: 0; }
@media (max-width: 560px) {
  .client-conv-body { padding-left: 4px; padding-right: 0; }
  .client-conv .client-msg { max-width: 86%; }
  .client-conv > summary { flex-wrap: wrap; }
}

/* --- runda: wyrównanie rozmowy i długie rozmowy (M.R., 27.10) */
/* Jedna lewa krawędź: strzałka sekcji = strzałka rozmowy = „Zakończone"; treść rozmowy (znak PG, pole odpowiedzi)
   od linii nazwy dashboardu; prawa krawędź dymków i „Wyślij" = prawa krawędź daty. */
.client-fb-fold > summary { padding: 18px 22px; }
.client-fb-body { padding: 0 22px 12px; }
.client-conv > summary { padding: 16px 0; border-radius: 0; }
.client-conv > summary:hover { background: none; }
.client-conv > summary:hover b { text-decoration: underline; text-underline-offset: 3px; }
.client-conv > summary::before { margin: 7px 2px 0 1px !important; }
.client-conv-body { padding: 0 0 20px 24px; }
.client-fb-body .client-fb-closed > summary { padding: 14px 0 10px; }
.client-fb-body .client-fb-item.is-new { box-shadow: none; }
.client-msg-row[hidden] { display: none; }
.client-thread-more { display: inline-flex; align-items: center; gap: 6px; align-self: center; margin: 0 0 8px; min-height: 32px; font-size: 13px; text-decoration: none; }
.client-thread-more svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; transform: rotate(-90deg); }
.client-thread-more:hover { color: var(--navy); text-decoration: underline; }
/* Pole odpowiedzi = jedna linia o wysokości „Wyślij" (44 px), rośnie z tekstem. */
.client-composer { align-items: flex-end; }
.client-composer textarea { height: 44px; min-height: 44px; max-height: 160px; padding: 11px 14px; line-height: 20px; resize: none; overflow-y: auto; }
.client-composer .btn { height: 44px; padding: 0 18px; }
@media (max-width: 560px) {
  .client-fb-fold > summary { padding: 16px; }
  .client-fb-body { padding: 0 16px 8px; }
  .client-conv-body { padding-left: 0; }
}

/* Dzwonek klienta: „Oznacz wszystkie…" i „Wyczyść wszystkie" w jednym rzędzie, usuwanie po prawej. */
.client-notif .notif-tools { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 16px; }
.client-notif .notif-tools .link-btn--bad { margin-left: auto; }
/* Nowa odpowiedź = sam znacznik „Nowa odpowiedź" (kropka przed nazwą mówiła to samo drugi raz). */
.client-conv > summary { align-items: center !important; }
.client-conv > summary::before { margin-top: 0 !important; }
.client-notif .notif-tools { flex-wrap: nowrap; }
.client-notif .notif-tools .link-btn { white-space: nowrap; }
.client-fb-body .client-fb-closed > summary .tag { margin-left: 4px; }

/* „Pokaż zakończone (N)" = wycentrowane działanie ze strzałką (jak „Pokaż wcześniejsze wiadomości"), nie wiersz listy;
   po rozwinięciu „Ukryj zakończone" na dole i etykieta grupy nad rozmowami. */
.client-fb-body .client-fb-closed { display: flex; flex-direction: column; margin-top: 0; }
.client-fb-body .client-fb-closed > summary {
  order: 3; align-self: center; justify-content: center; gap: 6px !important; margin: 12px 0 6px; padding: 8px 14px !important;
  border: 1px solid var(--line); border-radius: 999px; font-size: 13px !important; font-weight: 700; color: var(--navy) !important;
}
.client-fb-body .client-fb-closed > summary:hover { background: var(--accent-soft); }
.client-fb-body .client-fb-closed > summary::before { order: 2; margin: 0 0 0 2px !important; transform: rotate(45deg) translate(-2px, -2px); border-color: var(--navy); }
.client-fb-body .client-fb-closed[open] > summary::before { transform: rotate(-135deg) translate(-2px, -2px); }
.client-fb-body .client-fb-closed > summary .tag { order: 3; margin-left: 4px; }
.client-fb-closed-hide, .client-fb-closed[open] .client-fb-closed-show { display: none; }
.client-fb-closed[open] .client-fb-closed-hide { display: inline; }
.client-fb-body .client-fb-closed > .client-fb-group { order: 1; margin: 18px 0 2px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.client-fb-body .client-fb-closed > .client-fb { order: 2; }
.client-fb-body .client-fb-closed .client-conv-top b { color: var(--ink-soft); }

/* Tytuł rozmowy = pierwsze pytanie klienta w jednej linii (…); pod nim nazwa dashboardu, gdy klient ma kilka. */
.client-conv-top { flex-wrap: nowrap; min-width: 0; }
.client-conv-top .tag { flex: none; }
.client-conv-title { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.client-conv-dash { font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.client-conv[open] .client-conv-title { white-space: normal; }
@media (max-width: 560px) {
  .client-conv-top { flex-wrap: wrap; }
  .client-conv-title { flex: 1 1 100%; }
}
/* Tytuł najwyżej ~40 znaków, dalej „…" — też na szerokim ekranie i po rozwinięciu (pełna treść jest w rozmowie). */
.client-conv-title { max-width: 40ch; }
.client-conv[open] .client-conv-title { white-space: nowrap; }
@media (max-width: 560px) { .client-conv-title { max-width: 100%; } }

/* ======================= PRZEGLĄD RESPONSYWNOŚCI (M.R., 27.10) ======================= */

/* --- Dzwonek klienta: zwarte wiersze (~60 px zamiast ~110), bez osobnego rzędu działań. */
.client-notif .notif-head { margin-bottom: 4px; }
.client-notif .notif-head .client-notif-clear { flex: none; font-size: 13px; white-space: nowrap; }
.client-notif .notif-tools { display: none; }
.client-notif-group { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.client-notif-group .notif-group { margin: 12px 0 6px; }
.client-notif-group .link-btn { font-size: 13px; white-space: nowrap; }
.client-notif .notif-list { gap: 4px; }
.client-notif .notif-item { grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px 36px 8px 10px; }
.client-notif .notif-icon { width: 28px; height: 28px; border-radius: 8px; }
.client-notif .notif-icon svg { width: 15px; height: 15px; }
.client-notif .notif-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; row-gap: 1px; overflow-wrap: normal; }
.client-notif .notif-body b { grid-column: 1; font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.client-notif .notif-body small { grid-column: 2; grid-row: 1; font-size: 11px; white-space: nowrap; align-self: center; }
.client-notif .notif-body > span { grid-column: 1 / -1; display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; color: var(--ink-soft); }
.client-notif .notif-del { top: 50%; transform: translateY(-50%); }
@media (max-width: 720px) {
  .notif.client-notif { max-height: min(70dvh, 520px); }
}

/* --- Karty na telefonie: mniejsze marginesy wewnętrzne i nazwa, „Zgłoś uwagę" zawsze w jednej linii. */
.client-fb-link { white-space: nowrap; }
@media (max-width: 560px) {
  .client-portal-page .client-card-info, .client-portal-page .client-cols-1 .client-card-info { padding: 20px 20px 16px; gap: 12px; }
  .client-portal-page .client-card .client-dash-actions.client-card-bar, .client-portal-page .client-cols-1 .client-card .client-dash-actions.client-card-bar { padding: 10px 12px 10px 20px; }
  .client-portal-page .client-card h2, .client-cols-1 .client-card h2 { font-size: 21px; }
  .client-portal-page .client-card-bar .client-open, .client-cols-1 .client-open { min-width: 0; min-height: 42px; padding: 0 20px; font-size: 14px; }
  .client-source { padding: 3px 9px 3px 5px; font-size: 12px; }
  .client-portal-page .client-list, .client-portal-page .client-portal .client-list { gap: 16px; }
  .client-portal-page .client-main { gap: 24px; }
}

/* --- „Twoje uwagi": znaczniki nie łamią się w środku; na wąskim ekranie przechodzą pod nagłówek. */
.client-fb-fold > summary { flex-wrap: wrap; }
.client-fb-tags { flex-wrap: wrap; }
.client-fb-tags .tag, .client-conv-top .tag { white-space: nowrap; }

/* --- Wiersz rozmowy: strzałka i data w linii z tytułem (nie w środku dwóch linii). */
.client-conv > summary { align-items: flex-start !important; }
.client-conv > summary::before { margin-top: 8px !important; }
.client-conv-date { margin-top: 3px; }
.client-conv-main { gap: 2px; }
/* Telefon: data przechodzi do linii z nazwą dashboardu / pod tytuł — tytuł ma całą szerokość. */
@media (max-width: 560px) {
  .client-conv > summary { display: grid !important; grid-template-columns: 12px minmax(0, 1fr); column-gap: 10px !important; row-gap: 2px; }
  .client-conv > summary::before { grid-row: 1; margin-top: 8px !important; }
  .client-conv-main { grid-column: 2; }
  .client-conv-date { grid-column: 2; margin-top: 0; font-size: 11px; }
  .client-conv-top { flex-wrap: wrap; row-gap: 4px; }
  .client-conv-title { flex: 1 1 100%; max-width: 100%; }
  .client-conv-body { padding: 0 0 16px; }
  .client-conv .client-msg { max-width: 88%; padding: 9px 12px; }
  .client-msg-avatar { width: 24px; height: 24px; }
  .client-msg-row { gap: 6px; }
}

/* --- Cele dotyku ≥ 40 px na telefonie i ekranie dotykowym. */
@media (max-width: 720px), (pointer: coarse) {
  .client-thread-more, .client-fb-body .client-fb-closed > summary { min-height: 40px; }
  .client-fb-link { min-height: 40px; }
  .client-notif .notif-del { width: 36px; height: 36px; }
}

/* Wiersz rozmowy w dwóch liniach: tytuł + status / „dashboard · data" (bez daty po prawej). */
.client-conv-dash { font-size: 12px; font-weight: 600; color: var(--ink-soft); }
@media (max-width: 560px) {
  .client-conv-top { flex-wrap: nowrap; }
  .client-conv-title { flex: 0 1 auto; }
}
/* Dzwonek na telefonie: tytuł na całą szerokość, data przed cytatem w drugiej linii. */
@media (max-width: 560px) {
  .client-notif .notif-body { grid-template-columns: auto minmax(0, 1fr); }
  .client-notif .notif-body b { grid-column: 1 / -1; grid-row: 1; }
  .client-notif .notif-body small { grid-column: 1; grid-row: 2; align-self: baseline; }
  .client-notif .notif-body > span { grid-column: 2; grid-row: 2; }
}

/* Menu: logo i ikony na jednej osi; na telefonie ostatnia ikona kończy się na krawędzi kart (pole dotyku 40 px
   wystaje poza nią), ikony 20 px, „PL/EN" lżejsze — ta sama waga optyczna co ikony. */
.client-top-home { align-items: center; }
.client-top-home picture, .client-top-home img { display: block; }

/* ===== Telefon: w pasku dzwonek i ☰ (M.R., 27.10), logo większe ===== */
.client-menu-btn { display: none; }
@media (max-width: 560px) {
  .client-portal-page .client-top .bare-lang, .client-portal-page .client-top-out { display: none !important; }
  .client-portal-page .client-top-right { margin-right: -8px; gap: 4px; }
  .client-portal-page .client-menu-btn, .client-portal-page .client-bell {
    display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0;
    border: 0; border-radius: 10px; background: transparent; color: #FFFFFF;
  }
  .client-portal-page .client-menu-btn:hover, .client-portal-page .client-menu-btn[aria-expanded="true"],
  .client-portal-page .client-bell:hover, .client-portal-page .client-bell[aria-expanded="true"] { background: rgba(255, 255, 255, .14); }
  .client-portal-page .client-menu-btn:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 2px; }
  .client-portal-page .client-menu-btn svg, .client-portal-page .client-bell svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; }
  .client-portal-page .client-top-logo { height: 36px !important; }
  .client-portal-page .client-top { padding-top: 16px; padding-bottom: 16px; }
}
/* Okienko pod ☰: język (wybrany jak w każdej liście panelu — tło, pogrubienie, kreska fioletu) i „Wyloguj". */
.client-menu {
  position: fixed; z-index: 60; top: 64px; right: 12px; width: min(240px, calc(100vw - 24px)); padding: 6px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(25, 28, 98, .22);
}
.client-menu-label { margin: 6px 10px 4px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.client-menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px;
  background: transparent; color: var(--navy); font: inherit; font-size: 15px; font-weight: 600; text-align: left; cursor: pointer;
}
.client-menu-item:hover { background: var(--row-hover); }
.client-menu-item[aria-checked="true"] { background: var(--accent-soft); font-weight: 700; box-shadow: inset 3px 0 0 var(--violet); }
.client-menu-item .flag { width: 20px; height: 14px; border-radius: 2px; flex: none; }
.client-menu-item svg:not(.flag) { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; flex: none; }
.client-menu-sep { margin: 6px 4px; border: 0; border-top: 1px solid var(--line-soft); }

/* Stopka: jedna linia — znak PG i „© rok Performance Group" po lewej, „Przewodnik · Twoje dane" po prawej;
   linki bez podkreślenia (podkreślenie po najechaniu); na telefonie dwa wycentrowane wiersze. */
.client-portal-page .client-foot {
  flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px;
  margin-top: auto; padding: 20px 0 4px; border-top: 1px solid var(--line);
}
.client-foot-brand { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.client-foot-brand img { width: 14px; height: auto; display: block; }
.client-portal-page .client-links { margin: 0; gap: 4px 20px; }
.client-portal-page .client-links .link-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-soft); text-decoration: none; }
.client-portal-page .client-links .link-btn:hover { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.client-portal-page .client-links .link-btn svg { margin: 0 !important; width: 15px; height: 15px; vertical-align: 0; }
.client-portal-page .client-main { padding-bottom: 28px; }
@media (max-width: 560px) {
  .client-portal-page .client-foot { flex-direction: column-reverse; justify-content: center; gap: 10px; padding-top: 16px; }
  .client-portal-page .client-links { justify-content: center; }
  .client-portal-page .client-links .link-btn { min-height: 40px; }
}

/* Znak PG w prawym dolnym rogu (M.R., 27.10): jasny fiolet na tle strony, ucięty krawędzią, nieruchomy, pod treścią;
   kształt z `logo_pg_icon.svg` jako maska. Tylko komputer — na telefonie i tablecie zasłaniałby karty. */
.client-portal { position: relative; overflow-x: clip; }
.client-mark { display: none; }
@media (min-width: 1024px) {
  .client-mark {
    display: block; position: absolute; z-index: 0; right: -60px; bottom: -40px; width: clamp(300px, 28vw, 440px); aspect-ratio: 29.66 / 34.78;
    background: var(--violet); opacity: .09; pointer-events: none;
    -webkit-mask: url(logo_pg_icon.svg) no-repeat center / contain; mask: url(logo_pg_icon.svg) no-repeat center / contain;
  }
  .client-portal { overflow-y: clip; }
  .client-portal-page .client-main { z-index: 1; }
}

/* Nazwa ↔ źródła: więcej oddechu (M.R., 27.10: „ciut większy odstęp"); rzędy źródeł 8 px od siebie. */
.client-portal-page .client-card-info, .client-portal-page .client-cols-1 .client-card-info { gap: 18px; }
.client-sources { gap: 8px 6px; }
@media (max-width: 560px) {
  .client-portal-page .client-card-info, .client-portal-page .client-cols-1 .client-card-info { gap: 16px; }
}

/* Znak w rogu jak w panelu zespołu (M.R., 27.10: „jak w panelu") — te same wartości co `.app::after` w panel.css:
   przypięty do rogu okna (stoi przy przewijaniu), 480 × 563, ucięty krawędziami, fiolet 10%. Pod treścią i nad tłem. */
@media (min-width: 1024px) {
  .client-mark { position: fixed; right: -110px; bottom: -150px; width: 480px; height: 563px; aspect-ratio: auto; opacity: .10; }
  .client-head { z-index: 1; }
}

/* --- podgląd roli (administrator) */
/* Z paskiem podglądu: menu boczne przyklejone pod nim i krótsze o jego wysokość, strona też (bez przewijania o pasek). */
.has-preview .side { top: var(--preview-h, 52px); height: calc(100vh - var(--preview-h, 52px)); }
.has-preview .app { min-height: calc(100vh - var(--preview-h, 52px)); }
@media (max-width: 860px) {
  /* Telefon: pasek menu u góry pod paskiem podglądu, rozwinięte menu mieści się w oknie. */
  .has-preview .side { height: auto; max-height: calc(100vh - var(--preview-h, 52px)); }
}
.preview-banner {
  position: sticky; top: 0; z-index: 70; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 16px;
  padding: 10px 16px; background: var(--pink); color: var(--navy); font-size: 14px; text-align: center;
}
.preview-banner-short { display: none; }
/* Telefon: jeden niski wiersz — „Podgląd jako Edytor" po lewej, „Wróć" po prawej (M.R., 24.10: respo). */
@media (max-width: 600px) {
  .preview-banner { flex-wrap: nowrap; justify-content: space-between; gap: 10px; padding: 8px 12px; font-size: 13px; text-align: left; }
  .preview-banner-txt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .preview-banner-more, .preview-banner-long { display: none; }
  .preview-banner-short { display: inline; }
  .preview-banner .btn { flex: none; min-height: 32px; }
}
/* „Zobacz panel jako" — przycisk na dole menu i okienko nad nim (role + wyszukiwanie osoby). */
.side-preview { position: relative; margin-bottom: 8px; }
.side-preview-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 1px solid rgba(255, 255, 255, .3); border-radius: var(--radius-sm); background: var(--navy-2); color: #FFFFFF; font: inherit; text-align: left; cursor: pointer; }
.side-preview-btn:hover { border-color: rgba(255, 255, 255, .6); }
.side-preview-btn:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 1px; }
.side-preview-btn > svg { flex: none; width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; opacity: .8; }
.side-preview-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.side-preview-txt small { font-size: 11px; color: rgba(255, 255, 255, .65); }
.side-preview-txt b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-preview-pop { position: fixed; z-index: 60; width: 300px; max-width: calc(100vw - 24px); padding: 12px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); font-size: 14px; }
.side-preview-label { margin: 0 0 6px; font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.side-preview-label + .side-preview-roles, .side-preview-roles + .side-preview-label { margin-top: 0; }
.side-preview-roles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 12px; }
.side-preview-role { padding: 7px 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.side-preview-role:hover { border-color: var(--violet); }
.side-preview-role[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #FFFFFF; }
.side-preview-search { width: 100%; }
.side-preview-results { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.side-preview-person { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 7px 8px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--ink); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.side-preview-person:hover:not(:disabled) { background: var(--accent-soft); }
.side-preview-person:disabled { opacity: .5; cursor: default; }
.side-preview-mail { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-preview-empty, .side-preview-hint { margin: 6px 0 0; padding: 0 2px; font-size: 12px; color: var(--ink-soft); list-style: none; }
.side-role { width: 100%; margin-bottom: 8px; padding: 8px 10px; border-radius: var(--radius-sm); border: 1px solid rgba(255, 255, 255, .3); background: var(--navy-2); color: #FFFFFF; font: inherit; font-size: 13px; }
.side-role option { color: var(--ink); background: var(--surface); }

/* --- moje układy */
.lib-cats[hidden] { display: none; }
.lib-cat--moj { background: var(--accent-soft); color: var(--navy); }
.lib-card--mine { border-top-color: var(--pink); }

/* ======================================================================== dashboard w stylu Synevo (M.R., 23.10)
 * Kafle: biała karta, kropka w kolorze akcentu, etykieta wersalikami, duża liczba, zmiana w pigułce; próg — znacznik,
 * nie kolor całego kafla. Karty: większy tytuł, więcej oddechu. Czat „Zapytaj o wyniki" w rogu jak w Synevo. */
.dv-card { padding: 20px 22px; border-color: var(--line); }
.dv-card-head { margin-bottom: 16px; }
.dv-card-head h3 { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.dv-tiles { gap: 14px; }
.dv-tiles > .dv-tile { flex-basis: 170px; }
.dv-tile, .dv-tile:nth-child(3n+2), .dv-tile:nth-child(3n) {
  padding: 16px 18px; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: none;
}
.dv-tile--good, .dv-tile--bad { background: var(--surface); box-shadow: none; }
/* Etykieta i liczba jak w kaflach Synevo (`.kpi` w szacie PG silnika, M.R., 24.10): 13 px zwykłymi literami,
   liczba 34 px w grubości 600. */
.dv-tile .dv-label {
  display: flex; align-items: center; gap: 8px; min-height: 22px;
  font-size: 13px; font-weight: 700; color: var(--ink-soft);
}
.dv-tile .dv-label::before { content: ''; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--acc, var(--violet)); }
/* Długie słowo („Częstotliwość", „zaangażowania") w kaflu na telefonie 320 px wychodziło poza kafel — dzielimy
   je (polskie przenoszenie), a gdy przeglądarka nie umie, łamiemy w dowolnym miejscu (test 24.10). */
.dv-tile .dv-label, .dv-tile .dv-label > span { min-width: 0; overflow-wrap: anywhere; hyphens: auto; }
/* Kafel ~120 px (dwa w rzędzie na telefonie 320 px): etykieta 12 px i ciaśniej — „Częstotliwość" mieści się w całości. */
@container (max-width: 130px) {
  .dv-tile .dv-label { gap: 6px; font-size: 12px; }
}
.dv-tile:nth-child(3n+2) .dv-label::before { background: var(--acc-2, var(--pink)); }
.dv-tile:nth-child(3n) .dv-label::before { background: var(--acc-3, var(--pg-media)); }
.dv-tile .dv-value { font-size: 34px; font-weight: 600; line-height: 1.05; letter-spacing: -.03em; margin: 2px 0 4px; }
.dv--phone .dv-tile .dv-value { font-size: 24px; }
.dv-tile .dv-delta { padding: 3px 10px; font-size: 11.5px; font-weight: 600; }
.dv-tile .dv-threshold { display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 12px; font-weight: 600; }
.dv-tile .dv-threshold::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.dv-tile .dv-spark { height: 40px; margin-top: 10px; overflow: visible; }
.dv-tile .dv-spark-line { stroke: var(--acc, var(--violet)); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.dv-tile .dv-spark-area { fill: var(--acc, var(--violet)); fill-opacity: .1; stroke: none; }
.dv-tile:nth-child(3n+2) .dv-spark-line { stroke: var(--acc-2, var(--pink)); }
.dv-tile:nth-child(3n+2) .dv-spark-area { fill: var(--acc-2, var(--pink)); }
.dv-tile:nth-child(3n) .dv-spark-line { stroke: var(--acc-3, var(--pg-media)); }
.dv-tile:nth-child(3n) .dv-spark-area { fill: var(--acc-3, var(--pg-media)); }

/* Porównanie kanałów: węższe, zaokrąglone słupki ze ścieżką tła (stała skala). */
.dv-cols { gap: 18px; padding-top: 4px; }
.dv-col { gap: 8px; }
.dv-col-value { font-size: 15px; font-weight: 700; }
.dv-col-bar { width: 44px; height: 154px; }
.dv-col-track { fill: var(--line-soft); }
.dv-col-label { font-size: 13px; }
.dv-total { margin: 14px 0 0; padding-top: 10px; border-top: 1px solid var(--line-soft); font-size: 14px; color: var(--ink-soft); }
.dv-total b { color: var(--ink); }

/* Pasek: wiersz konta w linii daty; flaga bez białego obrysu ikon. */
.dv-actionbar { margin: 14px 20px 0; }
/* Wąski dashboard (telefon, ramka telefonu w podglądzie): wszystkie pasy 12 px od krawędzi — okładka, konta,
   „Liczby przykładowe", zakładki, sekcje i stopka w jednej linii. Wcześniej konta i plakietka stały o 8 px głębiej
   niż karty, a w ramce telefonu zakładki wystawały o 8 px poza okładkę (test 24.10). */
@container (max-width: 560px) {
  .dv-top { padding: 12px 12px 0; }
  .dv-actionbar, .dv-nav { margin-left: 12px; margin-right: 12px; }
  .dv-sample { margin-left: 12px; margin-right: 12px; }
  .dv-section { margin-left: 12px; margin-right: 12px; }
  .dv-foot { margin-left: 12px; margin-right: 12px; }
}
.dv-icon .flag rect, .dv-lang-list .flag rect { stroke: none; }

/* Czat „Zapytaj o wyniki" (jak `chat_ui.js` w Synevo). W podglądzie kreatora pod dashboardem; na pełnym ekranie w rogu. */
.dv-chat { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; margin-top: 16px; }
/* Wygląd „Poświata PG" jak pomoc panelu (M.R., 24.10) — te same animacje (`help-*`) i ta sama zasada kontrastu:
 * tekst nagłówka na granatowej części gradientu, róż tylko w prawym górnym rogu. */
.dv-chat-launcher {
  --fab-fill: var(--navy);
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px 10px 14px; border: 2px solid transparent; border-radius: 999px;
  background: linear-gradient(var(--fab-fill), var(--fab-fill)) padding-box,
    conic-gradient(from var(--help-ang), var(--glow-violet), var(--glow-pink), var(--glow-media), var(--glow-violet)) border-box;
  color: #FFFFFF; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer;
  box-shadow: 0 8px 22px -6px rgba(147, 93, 223, .35), 0 6px 20px rgba(25, 28, 98, .2); animation: help-spin 6s linear infinite;
}
.dv-chat-launcher svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.dv-chat-launcher:hover { --fab-fill: var(--navy-2); }
.dv-chat-launcher:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }
.dv-chat-launcher.is-open { display: none; }
.dv-chat-panel {
  display: flex; flex-direction: column; width: min(400px, calc(100vw - 32px)); max-height: min(600px, calc(100vh - 48px));
  background: var(--surface); color: var(--ink); border: 1px solid var(--line-soft); border-radius: 22px; overflow: hidden; transform-origin: 100% 100%;
  box-shadow: 0 24px 60px -12px rgba(25, 28, 98, .35), 0 8px 20px -8px rgba(25, 28, 98, .2);
  animation: help-pop .55s cubic-bezier(.2, .9, .25, 1.15) both;
}
.dv-chat-panel[hidden] { display: none; }
body.dash-page .dv-chat-launcher, body.showcase .dv-chat-launcher { position: fixed; right: 24px; bottom: 24px; z-index: 40; }
body.dash-page .dv-chat-panel, body.showcase .dv-chat-panel { position: fixed; right: 24px; bottom: 24px; z-index: 41; }
.dv-chat-head {
  flex: none; padding: 14px 16px 26px; color: #FFFFFF;
  background: radial-gradient(90% 120% at 100% 0%, rgba(253, 127, 178, .36) 0%, rgba(253, 127, 178, 0) 60%),
    linear-gradient(115deg, var(--navy) 0%, var(--navy) 40%, var(--glow-violet) 100%);
  background-size: 100% 100%, 220% 100%; animation: help-aurora 9s ease-in-out infinite alternate;
}
.dv-chat-top { display: flex; align-items: center; gap: 10px; }
.dv-chat-top strong { font-size: 15px; }
.dv-chat-orb {
  width: 38px; height: 38px; border-radius: 50%; padding: 2.5px; flex: none;
  background: conic-gradient(from var(--help-ang), var(--glow-light), var(--glow-pink), var(--glow-media), var(--glow-light)); animation: help-spin 5s linear infinite;
}
.dv-chat-orb > span { width: 100%; height: 100%; border-radius: 50%; background: var(--navy); display: grid; place-items: center; }
.dv-chat-orb svg { width: 19px; height: 19px; fill: none; stroke: #FFFFFF; stroke-width: 1.8; stroke-linejoin: round; }
.dv-chat-close {
  margin-left: auto; display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 10px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .1); color: #FFFFFF;
}
.dv-chat-close:hover { background: rgba(255, 255, 255, .2); }
.dv-chat-close:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 2px; }
.dv-chat-close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.dv-chat-hello { margin: 14px 0 2px; font-size: 23px; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.dv-chat-sub { margin: 0; font-size: 14px; line-height: 1.45; color: rgba(255, 255, 255, .9); max-width: 36ch; }
.dv-chat-pill { display: inline-block; margin-top: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .14); font-size: 12px; font-weight: 700; }
/* Po pierwszym pytaniu nagłówek zwija się do paska — miejsce dla rozmowy. */
.dv-chat-panel.is-chatting .dv-chat-head { padding-bottom: 24px; }
.dv-chat-panel.is-chatting :is(.dv-chat-hello, .dv-chat-sub, .dv-chat-pill) { display: none; }
.dv-chat-body {
  position: relative; z-index: 1; margin-top: -14px; border-radius: 18px 18px 0 0; background: var(--surface);
  flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column;
}
.dv-chat-log { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.dv-chat-log:empty { display: none; }
.dv-chat-chips { padding: 14px 10px 4px; }
.dv-chat-chips[hidden] { display: none; }
.dv-chat-chips-label { margin: 0 6px 6px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.dv-chat-chip {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 0; border-radius: 12px; background: transparent; cursor: pointer;
  color: var(--ink); text-align: left; font: inherit; font-size: 14px; font-weight: 600; transition: background .15s, transform .15s;
  animation: help-rise .45s cubic-bezier(.2, .8, .2, 1) both;
}
.dv-chat-chip:nth-of-type(1) { animation-delay: .2s; } .dv-chat-chip:nth-of-type(2) { animation-delay: .27s; } .dv-chat-chip:nth-of-type(3) { animation-delay: .34s; }
.dv-chat-chip:hover { background: var(--bg); transform: translateX(2px); }
.dv-chat-chip:focus-visible { outline: 2px solid var(--violet); outline-offset: 0; }
.dv-chat-chip > svg { margin-left: auto; width: 16px; height: 16px; flex: none; fill: none; stroke: var(--line); stroke-width: 2; transition: stroke .15s; }
.dv-chat-chip:hover > svg { stroke: var(--violet); }
.dv-chat-chip-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.dv-chat-chip-ic svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; }
.dv-chat-chip--0 .dv-chat-chip-ic { background: var(--accent-soft); color: var(--violet); }
.dv-chat-chip--1 .dv-chat-chip-ic { background: rgba(253, 127, 178, .18); color: var(--navy); }
.dv-chat-chip--2 .dv-chat-chip-ic { background: rgba(238, 73, 46, .12); color: var(--pg-media); }
.dv-chat-msg { max-width: 88%; padding: 10px 13px; border-radius: 14px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.dv-chat-msg--user { align-self: flex-end; background: var(--navy); color: #FFFFFF; border-bottom-right-radius: 4px; }
.dv-chat-msg--bot { align-self: flex-start; background: var(--bg); color: var(--ink); border-bottom-left-radius: 4px; }
.dv-chat-typing { display: inline-flex; gap: 4px; padding: 13px 14px; }
.dv-chat-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--violet); animation: dv-chat-blink 1.2s infinite; }
.dv-chat-typing span:nth-child(2) { animation-delay: .15s; } .dv-chat-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes dv-chat-blink { 0%, 60%, 100% { opacity: .25; transform: none; } 30% { opacity: 1; transform: translateY(-2px); } }
.dv-chat-form {
  flex: none; display: flex; align-items: flex-end; gap: 8px; margin: 8px 14px 6px; padding: 4px 4px 4px 14px;
  border: 1.5px solid var(--line); border-radius: 22px; transition: border-color .2s, box-shadow .2s;
}
.dv-chat-form:focus-within { border-color: var(--violet); box-shadow: 0 0 0 3px var(--accent-soft); }
.dv-chat-input, .dv-chat-input:focus-visible {
  flex: 1; min-width: 0; resize: none; min-height: 36px; max-height: 120px; padding: 8px 0; border: 0; border-radius: 0; outline: 0; box-shadow: none;
  background: transparent; color: var(--ink); font: inherit; font-size: 14px; line-height: 1.4;
}
.dv-chat-send {
  display: grid; place-items: center; flex: none; width: 36px; height: 36px; border: 0; border-radius: 50%; color: #FFFFFF; cursor: pointer;
  background: linear-gradient(135deg, var(--violet), var(--pink)); transition: transform .15s;
}
.dv-chat-send:hover { transform: scale(1.06); }
.dv-chat-send:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.dv-chat-send svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.dv-chat-foot { flex: none; margin: 0; padding: 2px 16px 12px; color: var(--ink-soft); font-size: 11.5px; line-height: 1.4; text-align: center; }
@media (max-height: 600px) { .dv-chat-sub { display: none; } .dv-chat-hello { margin-top: 8px; font-size: 20px; } }
@media (max-width: 560px) {
  body.dash-page .dv-chat-launcher, body.showcase .dv-chat-launcher { right: 16px; bottom: 16px; }
  /* Telefon: wysuwa się od dołu, najwyżej ~¾ ekranu — liczby nad nim zostają widoczne. */
  body.dash-page .dv-chat-panel, body.showcase .dv-chat-panel {
    right: 0; bottom: 0; width: 100vw; max-height: min(78dvh, 640px); border-radius: 22px 22px 0 0; border-bottom: 0;
    transform-origin: 50% 100%; animation: help-sheet .4s cubic-bezier(.2, .85, .25, 1) both;
  }
  .dv-chat-hello { margin-top: 10px; font-size: 21px; }
  .dv-chat-foot { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  .dv-chat-launcher, .dv-chat-orb, .dv-chat-head, .dv-chat-panel, .dv-chat-chip, .dv-chat-typing span,
  body.dash-page .dv-chat-panel, body.showcase .dv-chat-panel { animation: none; }
  .dv-chat-chip, .dv-chat-chip:hover, .dv-chat-send:hover { transition: none; transform: none; }
}
@media print { .dv-chat { display: none !important; } }
/* Na stronie dashboardu róg należy do czatu — pomoc panelu jest na pozostałych stronach. */
body.dash-page .help-host { display: none; }

/* Biblioteka: spokojniejsze miniatury — szare bloki z ikoną, akcent tylko cienką kreską (M.R.: „oczojebne"). */
.lib-thumb-el { height: 22px; border: 1px solid var(--line-soft); border-top: 1px solid var(--line-soft); background: var(--surface); color: var(--ink-soft); box-shadow: inset 0 2px 0 var(--accent-soft); }
.lib-thumb-el svg { width: 12px; height: 12px; opacity: .7; }
.lib-thumb-bar { height: 14px; background-size: 100% 2px; }
.lib-thumb-title { font-size: 9px; color: var(--ink-soft); opacity: .8; }
.lib-thumb { gap: 6px; height: 150px; }
.lib-thumb-btn { padding: 12px 14px 10px; background: var(--row-hover); }

/* ======================================================================== elementy dashboardu — przegląd UX (23.10)
 * Liczby mieszczą się w kaflu (rozmiar od szerokości kafla), kafle w linii, tabele z liczbami do prawej i stałą
 * pierwszą kolumną, lejek z napisem nad paskiem (kontrast), karty o połowie szerokości bez pustego pola. */
.dv-tile { container-type: inline-size; }
.dv-tile .dv-value { font-size: clamp(20px, 15cqi, 32px); }
.dv-tile .dv-label { align-items: flex-start; min-height: 2.8em; line-height: 1.4; letter-spacing: .06em; }
.dv-tile .dv-label::before { margin-top: .45em; }
/* Odstęp nad wykresikiem poza jego wysokością (content-box): przy border-box 10 px zjadało rysunek do 18 px (M.R., 26.10). */
.dv-tile .dv-spark { margin-top: auto; padding-top: 10px; box-sizing: content-box; }
/* Skrót nazwy w wąskim kaflu; pełna nazwa zostaje dla czytnika ekranu i w podpowiedzi. */
.dv-label-short { display: none; }
@container (max-width: 230px) {
  .dv-label-short { display: inline; }
  .dv-label-full { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* Kafle jak w Synevo (M.R., 23.10): kolory po kolei (fiolet, róż, pomarańcz), nazwa zwykłymi literami, strzałka
 * w pigułce zmiany i przerywana linia okresu porównania w mini-wykresie. */
.dv-tile .dv-label { text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--ink); min-height: 1.4em; }
/* „Jeden kolor dla wszystkich kafli": kropka i mini-wykres każdego kafla w kolorze elementu. */
.dv-mono .dv-tile:nth-child(n) .dv-label::before { background: var(--acc, var(--violet)); }
.dv-mono .dv-tile:nth-child(n) .dv-spark-line { stroke: var(--acc, var(--violet)); }
.dv-mono .dv-tile:nth-child(n) .dv-spark-area { fill: var(--acc, var(--violet)); }
.dv-delta { display: inline-flex; align-items: center; gap: 4px; }
.dv-delta-arrow { font-size: 9px; line-height: 1; }
/* Trend „jak w Synevo": metryka jako lista w tytule, przełączniki po prawej, słupki parami, daty pod słupkami. */
.dv-card-head:has(.dv-trend-head) h3:not(.sr-only) { display: none; }
.dv-trend-head { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; min-width: 0; }
.dv-trend-pick {
  /* Strzałka listy to dwie warstwy tła (dwa trójkąty) — każda ma swoje położenie; jedno wspólne gniotło ją w kreskę. */
  width: auto; max-width: 100%; padding: 4px 34px 4px 8px; border: 0; background-color: transparent;
  background-position: calc(100% - 16px) 54%, calc(100% - 11px) 54%; background-size: 6px 6px, 6px 6px;
  font-size: 18px; font-weight: 700; color: var(--ink); cursor: pointer; border-radius: 8px;
}
.dv-trend-pick:hover { background-color: var(--row-hover); }
.dv-trend-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.dv-seg { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: 12px; background: var(--row-hover); }
.dv-seg-btn {
  display: inline-flex; align-items: center; justify-content: center; min-width: 34px; min-height: 30px; padding: 0 12px; border: 0; border-radius: 9px;
  background: transparent; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-soft); cursor: pointer;
}
.dv-seg-btn svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* Rodzaj wykresu i podział czasu w jednej linii (M.R., 24.10): przycisk z samą ikoną bez szerokiego odstępu, napisy
   ciaśniej — razem ok. 290 px, mieszczą się w wąskiej karcie; zawijają się dopiero, gdy naprawdę brak miejsca. */
.dv-trend-tools .dv-seg-btn { padding: 0 10px; }
.dv-trend-tools .dv-seg-btn:has(> svg) { padding: 0 8px; }
.dv-seg-btn[aria-pressed="true"] { background: var(--surface); color: var(--navy); box-shadow: 0 1px 3px rgba(25, 28, 98, .12); }
.dv-tbar--prev { fill: var(--acc, var(--violet)); fill-opacity: .28; }
.dv-spark-prev { fill: none; stroke: var(--ink-soft); stroke-width: 1.2; stroke-dasharray: 3 3; opacity: .45; }
@container (max-width: 420px) {
  /* Dwa w rzędzie; nieparzysty ostatni rozciąga się na całą szerokość (flex), bez dziury obok. */
  .dv-tiles { gap: 8px; }
  .dv-tiles > .dv-tile { flex-basis: calc(50% - 4px); }
  .dv-tile, .dv-tile:nth-child(3n+2), .dv-tile:nth-child(3n) { padding: 12px; }
  .dv-tile .dv-spark { height: 34px; }
  /* Telefon 360 px: kafel ma ~90 px na liczbę — „115 298 zł" w 20 px wystawało. Mniejsza liczba, nie ucięta. */
  .dv-tile .dv-value { font-size: clamp(15px, 18cqi, 24px); letter-spacing: -.02em; }
}
@container (max-width: 300px) { .dv-tiles > .dv-tile { flex-basis: 100%; } }

.dv-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dv-table th { white-space: normal; min-width: 8ch; vertical-align: bottom; }
/* Nagłówek kolumny z liczbami też się zawija — `.num { nowrap }` wygrywał i „Konwersje — Kontakt" (169 px)
   wypychał trzecią kolumnę za kartę na telefonie, choć liczby są krótkie (test 24.10). */
.dv-table th.num { white-space: normal; }
.dv-table td:first-child, .dv-table th:first-child {
  max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  position: sticky; left: 0; z-index: 1; background: var(--surface);
}
/* Sortowanie po kliknięciu nagłówka (jak w Synevo): nagłówek to przycisk na całą komórkę, strzałka przy aktywnej
   kolumnie, przygaszona podwójna przy pozostałych. Kolumna z liczbami — napis i strzałka do prawej, nad liczbami. */
.dv-table th.dv-th-sort { padding: 0; }
.dv-th-btn {
  display: inline-flex; align-items: flex-end; justify-content: flex-start; gap: 4px; width: 100%; min-height: 100%;
  padding: 9px 10px; border: 0; background: none; font: inherit; color: inherit; text-align: left; text-transform: inherit;
  letter-spacing: inherit; cursor: pointer; border-radius: 6px;
}
.dv-table th.num .dv-th-btn { justify-content: flex-end; text-align: right; }
.dv-table th:first-child .dv-th-btn { overflow: hidden; }
.dv-th-btn > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.dv-th-btn svg { flex: none; width: 12px; height: 12px; margin-bottom: 1px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: .35; }
.dv-th-btn:hover { color: var(--navy); }
.dv-th-btn:hover svg { opacity: .7; }
.dv-th-btn:focus-visible { outline: 2px solid var(--violet); outline-offset: -2px; }
.dv-table th.is-sorted { color: var(--navy); }
.dv-table th.is-sorted .dv-th-btn svg { opacity: 1; color: var(--violet); }
.dv--zwarty .dv-table th.dv-th-sort .dv-th-btn { padding: 5px 8px; }
@media (max-width: 720px), (pointer: coarse) { .dv-th-btn { min-height: 40px; } }
.dv-row--self td { font-weight: 700; background: var(--accent-soft); }
.dv-row--self td:first-child { background: var(--accent-soft); }
.dv-card .table-scroll {
  background: linear-gradient(to left, var(--surface) 30%, transparent) right / 28px 100% no-repeat local,
              radial-gradient(farthest-side at 100% 50%, rgba(25, 28, 98, .14), transparent) right / 12px 100% no-repeat scroll;
}

.dv-funnel-step { display: flex; flex-direction: column; gap: 3px; }
.dv-funnel-label { position: static; justify-content: flex-start; color: var(--ink); text-shadow: none; white-space: normal; font-size: 13px; }
.dv-funnel-bar { height: 18px; }
.dv-funnel-fill--2, .dv-funnel-fill--3, .dv-funnel-fill--4 { fill: var(--acc, var(--violet)); }
.dv-funnel-fill--2 { fill-opacity: .75; }
.dv-funnel-fill--3 { fill-opacity: .55; }
.dv-funnel-fill--4 { fill-opacity: .4; }

.dv-card { display: flex; flex-direction: column; }
.dv-donut { width: 100%; max-width: 190px; justify-self: center; }
.dv-card--slupki .dv-rank-metric { margin: 0 0 10px; font-weight: 600; color: var(--ink-soft); }
/* „+ Dodaj element" w widoku listy: jeden przycisk, rodzaje po rozwinięciu. */
.b-add-more { margin-top: 12px; }
.b-add-more > summary { display: inline-flex; width: auto; gap: 6px; font-weight: 600; }
.b-add-more > summary::before { display: none; }
.b-add-more[open] > summary { background: var(--accent-soft); color: var(--navy); }
.b-add-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: 6px; margin-top: 8px; }
.b-add-grid .b-type { justify-content: flex-start; width: 100%; }
/* Paleta elementów w edytorze wizualnym: kafelki do przeciągnięcia na dashboard. */
.b-palette { margin: 4px 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line-soft); }
.b-palette-h { margin: 0 0 8px; font-size: 13px; }
.b-palette-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.b-palette-item {
  display: flex; align-items: center; gap: 8px; padding: 7px 8px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink); text-align: left; cursor: grab;
}
.b-palette-item:hover:not([disabled]) { border-color: var(--violet); background: var(--accent-soft); }
.b-palette-item:active:not([disabled]) { cursor: grabbing; }
.b-palette-item[disabled] { opacity: .45; cursor: not-allowed; }
.b-palette-item .b-type-icon { flex: none; width: 26px; height: 26px; }
/* Plan na miesiące: siatka „miesiąc — kwota"; bieżący miesiąc wyróżniony. */
.plan-months { margin-top: 10px; }
.plan-months > summary { font-size: 13px; }
.plan-months-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 6px 12px; margin-top: 6px; }
.plan-month { display: grid; grid-template-columns: minmax(0, 1fr) 110px; align-items: center; gap: 8px; font-size: 13px; }
.plan-month span { color: var(--ink-soft); }
.plan-month--now span { color: var(--navy); font-weight: 700; }
.plan-month input { padding: 6px 8px; font-size: 13px; }
input.is-bad { border-color: var(--bad); }
.b-funnel-order { margin: 8px 0 0; padding: 0 0 0 20px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.b-funnel-order li { display: flex; align-items: center; gap: 6px; }
.b-funnel-order li span { flex: 1; min-width: 0; }
.b-funnel-order .icon { width: 30px; height: 30px; }
/* Wysokość elementu (pomysł 203): wykresy, mapa i tabele niższe albo wyższe. */
.dv-h--niski .dv-plot { --dv-chart-h: 160px; }
.dv-h--wysoki .dv-plot { --dv-chart-h: 340px; }
.dv-h--niski .dv-col-bar { height: 90px; }
.dv-h--wysoki .dv-col-bar { height: 220px; }
.dv-h--niski .dv-map-svg { max-height: 220px; }
.dv-h--wysoki .dv-map-svg { max-height: 480px; }
.dv-h--niski .dv-donut { max-width: 130px; }
.dv-h--wysoki .dv-donut { max-width: 240px; }
.dv-h--niski .dv-share > .dv-donut { flex-basis: 130px; }
.dv-h--wysoki .dv-share > .dv-donut { flex-basis: 240px; }
.dv-h--niski .table-scroll { max-height: 240px; overflow-y: auto; }
/* Gęstość „zwarty" (pomysł 204): mniejsze odstępy i niższe wykresy, ta sama szata PG. */
.dv--zwarty .dv-card { padding: 12px 14px; }
.dv--zwarty .dv-card-head { margin-bottom: 8px; }
.dv--zwarty .dv-card-head h3 { font-size: 15px; }
.dv--zwarty .dv-tiles, .dv--zwarty .dv-grid { gap: 8px; }
.dv--zwarty .dv-tile, .dv--zwarty .dv-tile:nth-child(3n+2), .dv--zwarty .dv-tile:nth-child(3n) { padding: 10px 12px; gap: 3px; }
.dv--zwarty .dv-tile .dv-value { font-size: clamp(18px, 13cqi, 26px); }
.dv--zwarty .dv-plot { --dv-chart-h: 190px; }
.dv--zwarty .dv-table th, .dv--zwarty .dv-table td { padding: 5px 8px; }
.dv-hit { fill: transparent; cursor: pointer; }
.dv-map-all { margin-top: 8px; font-size: 13px; }
.dv-map-all > summary { font-weight: 600; color: var(--ink-soft); }
.dv-map-all .dv-map-top { margin-top: 6px; }

/* „Zapytaj o wyniki": na telefonie sama okrągła ikona; strona ma miejsce pod spodem, żeby przycisk nie zasłaniał kart. */
body.dash-page .dash-page-wrap, body.showcase .dash-page-wrap { padding-bottom: 84px; }
@media (max-width: 600px) {
  body.dash-page .dv-chat-launcher, body.showcase .dv-chat-launcher { right: 16px; bottom: 16px; width: 52px; height: 52px; padding: 0; justify-content: center; font-size: 0; gap: 0; }
  body.dash-page .dv-chat-launcher svg, body.showcase .dv-chat-launcher svg { width: 22px; height: 22px; }
}

/* ======================================================================== przegląd całości (impeccable, 23.10)
 * Bez grubych pasków z boku i u góry kart (zmienione u źródła): stan pokazuje plakietka. Kafle-liczniki listy pokazują
 * stan ikonką albo kolorem liczby (wariant D1, M.R., 24.10). W miniaturze układu kolor elementu to cienka linia w środku klocka. */
/* Pasek narzędzi listy: w jednej linii, gdy się mieści; przy wielu filtrach etykiet przyciski schodzą niżej, nie za kartę. */
.list-card .list-tools input { flex: 1 1 200px; min-width: 160px; }
.list-chips { flex: none; flex-wrap: nowrap; gap: 6px; }
.list-chips .lib-cat-btn { padding: 7px 12px; font-size: 13px; white-space: nowrap; }
.lib-thumb-el::after { content: ''; position: absolute; left: 6px; right: 6px; top: 3px; height: 2px; border-radius: 2px; background: var(--acc); }

/*
 * Cele dotyku (M.R., 24.10: „responsywnie wszędzie, do perfekcji"): na telefonie i ekranie dotykowym przyciski
 * mają co najmniej 40 px — ikonki 26–30 px i podkreślone przyciski-linki wysokości tekstu trudno trafić palcem.
 * Na komputerze z myszą wymiary zostają.
 */
@media (max-width: 720px), (pointer: coarse) {
  .icon, .icon--small, .row-action, .dv-tool, .dv-card-feedback, .cat-variant-btn, .engine-note-x { min-width: 40px; min-height: 40px; }
  /* Krzyżyk w etykiecie: większy, ale w granicach etykiety (ta ma 40 px). */
  .chip-x { min-width: 32px; min-height: 32px; }
  .bare-lang button, .reveal { min-height: 40px; }
  .link-btn, .back { display: inline-flex; align-items: center; min-height: 40px; }
  .seg button, .chip, .btn--small, .page-more-item { min-height: 40px; }
  .swatch.swatch--small { width: 36px; height: 36px; }
  .cell-pick input, .check input[type="checkbox"], .choice input { width: 20px; height: 20px; }
}

/*
 * Karta na telefonie (test 24.10): trzy przyciski w rogu (uwaga, wykres/tabela, zwiń) zabierały połowę szerokości
 * i tytuł łamał się na 4–5 linii. Przyciski stykają się bez przerw (każdy 36 × 40 — cel dotyku zostaje, ujemny margines
 * nie podnosi nagłówka), mniejszy odstęp w karcie i tytuł 16 px — tytuł ma ok. 50 px więcej.
 */
@container (max-width: 480px) {
  .dv-card { padding: 16px 14px; }
  .dv-card-head { gap: 4px; margin-bottom: 12px; }
  .dv-card-head h3 { font-size: 16px; }
  .dv-card-head .dv-card-feedback, .dv-card-head .dv-view-toggle, .dv-card-head .dv-collapse {
    width: 36px; min-width: 36px; height: 40px; min-height: 40px; margin: -9px 0;
  }
  .dv-card-head .dv-card-feedback + .dv-view-toggle, .dv-card-head .dv-card-feedback + .dv-collapse,
  .dv-card-head .dv-view-toggle + .dv-collapse { margin-left: -4px; }
  .dv-card-head .dv-collapse { margin-right: -6px; }
  .dv-trend-pick { font-size: 16px; }
  /* Trend na telefonie (M.R., 26.10): rodzaj wykresu i podział czasu w jednej linii pod tytułem, na całą szerokość
     karty — obok ikon w rogu miały ok. 200 px i podział spadał do drugiej linii. Wiersz 1: metryka + ikony. */
  .dv-card-head:has(.dv-trend-tools) { flex-wrap: wrap; }
  .dv-card-head:has(.dv-trend-tools) .dv-trend-head { display: contents; }
  .dv-card-head:has(.dv-trend-tools) .dv-trend-pick { flex: 0 1 auto; min-width: 0; margin-right: auto; }
  .dv-trend-tools { order: 1; flex: 1 0 100%; gap: 6px; margin-top: 6px; }
  .dv-trend-tools .dv-seg-btn { padding: 0 8px; }
  .dv-trend-tools .dv-seg-btn:has(> svg) { padding: 0 7px; }
  /* Podział czasu dobija do prawej krawędzi karty; na 320 px (nie mieści się obok) — sam w linii, na całą szerokość. */
  .dv-trend-tools .dv-seg:last-child { flex: 1 0 auto; }
  .dv-trend-tools .dv-seg:last-child .dv-seg-btn { flex: 1; }
}

/* ======================================================================== lista dashboardów „bez szumu" (M.R., 24.10, wariant C)
 * Filtry w jednej linii, niski wiersz, szczegóły w dymkach: liczba kont przy ikonce, kto ma dostęp, kto zmienił,
 * powód przy statusie. Progi liczy się od szerokości karty (`@container dclist`), nie ekranu — obok bocznego panelu
 * karta jest węższa, niż mówi szerokość okna.
 */
.card.dc-card { padding: 0; container: dclist / inline-size; }
/* Strony długich list (M.R., 27.10: Dashboardy po 15, Dziennik po 50) — „1–15 z 24" po lewej, numery po prawej. */
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: 4px; padding: 14px 0 2px; border-top: 1px solid var(--line-soft); }
.dc-card .pager { margin: 0; padding: 12px 16px; }
.pager-info { font-size: 13px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.pager-pages { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.pager-btn { font: inherit; display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--line-soft); background: var(--surface); color: var(--navy); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; }
.pager-btn.icon { width: 34px; padding: 0; }
.pager-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.25; }
.pager-btn:hover:not([disabled]):not([aria-current="page"]) { background: var(--row-hover); }
.pager-btn[aria-current="page"] { background: var(--navy); border-color: var(--navy); color: #FFFFFF; cursor: default; }
.pager-btn:focus-visible { outline: 2px solid var(--violet); outline-offset: 1px; }
.pager-gap { min-width: 18px; text-align: center; color: var(--ink-soft); }
@media (max-width: 720px), (pointer: coarse) {
  .pager-btn { min-width: 40px; height: 40px; }
  .pager-btn.icon { width: 40px; }
}
@media (max-width: 480px) { .pager { justify-content: center; } .pager-info { width: 100%; text-align: center; } }
.dc-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); min-height: 66px; }
.dc-search { position: relative; flex: 1 1 220px; max-width: 300px; }
.dc-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ink-soft); fill: none; stroke: currentColor; stroke-width: 2; pointer-events: none; }
.dc-tools .dc-search input { width: 100%; height: 36px; padding: 0 12px 0 36px; border-radius: 999px; border: 1px solid transparent; background: var(--bg); font-size: 14px; }
.dc-tools .dc-search input:focus { background: var(--surface); border-color: var(--violet); }
.dc-tools select.dc-pill, .dc-bulk select.dc-pill {
  width: auto; max-width: 150px; height: 34px; padding: 0 30px 0 13px; border: 1px solid var(--line); border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--navy); cursor: pointer;
  background-color: var(--surface); background-repeat: no-repeat; background-size: 5px 5px, 5px 5px;
  background-image: linear-gradient(45deg, transparent 50%, var(--navy) 50%), linear-gradient(135deg, var(--navy) 50%, transparent 50%);
  background-position: calc(100% - 17px) 54%, calc(100% - 12px) 54%;
  display: inline-flex; align-items: center; text-overflow: ellipsis;
}
.dc-tools select.dc-pill:hover { border-color: var(--ink-soft); }
.dc-tools select.dc-pill.on { background-color: var(--accent-soft); border-color: var(--violet); }
.dc-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.dc-right .list-count { font-size: 13px; white-space: nowrap; }
.dc-sort-label { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; color: var(--ink-soft); white-space: nowrap; }
.dc-tools select.dc-sort {
  width: auto; border: 0; padding: 6px 20px 6px 4px; font-size: 13.5px; font-weight: 700; color: var(--navy); cursor: pointer; display: inline-flex; align-items: center;
  background-color: transparent; background-repeat: no-repeat; background-size: 5px 5px, 5px 5px;
  background-image: linear-gradient(45deg, transparent 50%, var(--navy) 50%), linear-gradient(135deg, var(--navy) 50%, transparent 50%);
  background-position: calc(100% - 8px) 54%, calc(100% - 3px) 54%;
}
.dc-tools select.dc-sort:focus-visible { box-shadow: none; text-decoration: underline; }
@supports (appearance: base-select) {
  .dc-sort::picker(select) { position-area: bottom span-left; min-width: 210px; }
  .dc-pill::picker(select) { min-width: 200px; }
}
.dc-clear { border: 0; background: none; padding: 0 4px; color: var(--violet); font: inherit; font-weight: 700; cursor: pointer; }
.dc-clear:hover { text-decoration: underline; }

/* Zmiany hurtem: pasek w miejscu filtrów, jasny, w tej samej karcie. */
.dc-card .bulk-bar.dc-bulk { position: static; margin: 0; padding: 14px 16px; border-radius: 16px 16px 0 0; background: var(--accent-soft); color: var(--navy); box-shadow: none; border-bottom: 1px solid var(--accent-hover); }
.dc-card .bulk-bar.dc-bulk .bulk-count { font-size: 14px; margin-right: 6px; }
.dc-card .bulk-bar.dc-bulk .btn--ghost { color: var(--navy); border-color: var(--line); background: var(--surface); }
.dc-card .bulk-bar.dc-bulk .btn--ghost:hover { background: var(--row-hover); }
.dc-card .bulk-bar.dc-bulk .link-btn { margin-left: auto; color: var(--violet); font-weight: 700; }
.dc-card .bulk-bar.dc-bulk select.dc-pill { max-width: none; min-width: 0; }

/* Tabela */
table.dc { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.dc col.c-ck { width: 46px; } .dc col.c-src { width: 150px; } .dc col.c-acc { width: 118px; } .dc col.c-chg { width: 122px; } .dc col.c-st { width: 176px; } .dc col.c-act { width: 124px; }
.dc th { text-align: left; font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-soft); padding: 12px 12px 10px; white-space: nowrap; border-bottom: 1px solid var(--line-soft); }
.dc td { padding: 14px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; font-size: 14px; }
.dc th:first-child, .dc td:first-child { padding-left: 18px; }
.dc th:last-child, .dc td:last-child { padding-right: 14px; }
.dc tbody tr:last-child td { border-bottom: 0; }
.dc tbody tr:last-child td:first-child { border-radius: 0 0 0 16px; }
.dc tbody tr:last-child td:last-child { border-radius: 0 0 16px 0; }
.dc tbody tr:hover td { background: var(--row-hover); }
.dc tbody tr.picked td { background: var(--accent-soft); }
.dc input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--violet); cursor: pointer; vertical-align: middle; }

.dc-name { min-width: 0; }
.dc-nm { display: flex; align-items: center; gap: 8px; min-width: 0; }
.dc-nm > a:first-child { display: block; min-width: 0; font-weight: 700; font-size: 15px; color: var(--navy); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-nm > a:first-child:hover { text-decoration: underline; text-underline-offset: 3px; }
.dc-meta { display: block; margin-top: 2px; font-size: 12.5px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-fb { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 20px; min-width: 20px; padding: 0 7px 0 6px; border-radius: 999px; background: var(--bad-soft); color: var(--bad); font-size: 11.5px; font-weight: 800; line-height: 1; text-decoration: none; font-variant-numeric: tabular-nums; transition: background .12s, color .12s; }
.dc-fb svg { width: 12px; height: 12px; display: block; fill: none; stroke: currentColor; stroke-width: 2.2; }
.dc-fb:hover { background: var(--bad); color: #FFFFFF; }
.dc-none { color: var(--line); }

/* Dymki listy — jedna jasna karta (ikonki źródeł, przyciski akcji, powód przy statusie). */
.dc-si[data-tip]:hover::after, .dc-si[data-tip]:focus-visible::after, .dc-ib[data-tip]:hover::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); z-index: 6; pointer-events: none;
  background: var(--surface); color: var(--navy); border: 1px solid var(--line-soft); border-radius: 9px; padding: 6px 10px; font-size: 12.5px; font-weight: 700; white-space: nowrap;
  box-shadow: 0 12px 28px -10px rgba(25, 28, 98, .28), 0 4px 10px -4px rgba(25, 28, 98, .14);
}

/* Źródła: ikonki, liczba kont w dymku; „+N" z listą pozostałych. */
.dc-src { display: flex; gap: 6px; }
.dc-src > .dc-si { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 9px; background: var(--bg); cursor: default; }
.dc-src > .dc-si svg { width: 18px; height: 18px; stroke-width: 2.6; }
.mp-row svg.pi { stroke-width: 2.4; }
.dc-src > .dc-si:hover, .dc-src > .dc-si:focus-visible { background: var(--accent-soft); outline: none; }
.dc-src > .dc-more { font-size: 12.5px; font-weight: 800; color: var(--navy); }
.dc-more-pop { position: absolute; left: 50%; top: calc(100% + 6px); z-index: 25; min-width: 190px; display: grid; gap: 2px; padding: 6px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 12px; box-shadow: var(--shadow-lg, 0 18px 40px -14px rgba(25, 28, 98, .3)); opacity: 0; visibility: hidden; transform: translate(-50%, -4px); transition: opacity .12s, transform .12s, visibility .12s; cursor: default; }
.dc-more:hover .dc-more-pop, .dc-more:focus .dc-more-pop { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.mp-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; font-size: 13.5px; white-space: nowrap; }
.mp-row svg { width: 17px; height: 17px; flex: none; }
.mp-row b { font-weight: 700; color: var(--navy); }
.mp-row small { margin-left: auto; padding-left: 12px; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }

/* Dostęp: liczba osób; kto — w karcie po najechaniu albo dotknięciu. */
.dc-ppl { position: relative; display: inline-flex; align-items: center; gap: 6px; margin-left: -6px; padding: 4px 8px 4px 6px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 14px; color: var(--ink-soft); cursor: default; }
.dc-ppl > svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.dc-ppl b { color: var(--navy); font-weight: 700; }
.dc-ppl:hover, .dc-ppl:focus-visible { background: var(--accent-soft); outline: none; }
.dc-pop { position: absolute; left: 0; top: calc(100% + 6px); z-index: 25; width: max-content; min-width: 250px; max-width: 360px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 10px; text-align: left; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 14px; box-shadow: 0 18px 40px -14px rgba(25, 28, 98, .3), 0 6px 14px -6px rgba(25, 28, 98, .16); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .12s, transform .12s, visibility .12s; }
.dc-ppl:hover .dc-pop, .dc-ppl:focus .dc-pop { opacity: 1; visibility: visible; transform: none; }
.pp-sec { min-width: 0; }
.pp-sec > span { display: block; margin: 0 4px 4px; font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-soft); }
.pp-sec i { display: block; padding: 2px 4px; font-size: 13px; font-style: normal; color: var(--ink-soft); }
.pp-row { display: flex; align-items: center; gap: 8px; padding: 4px; font-size: 13.5px; font-weight: 600; color: var(--navy); white-space: nowrap; min-width: 0; overflow: hidden; }
.pp-mail { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pp-row small { margin-left: auto; padding-left: 8px; font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.pp-av { flex: none; width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11px; font-weight: 800; background: var(--accent-soft); color: var(--violet); }
.pp-av--pg { background: var(--navy); color: #FFFFFF; }
.pp-foot { padding: 8px 4px 0; border-top: 1px solid var(--line-soft); font-size: 12.5px; font-weight: 600; color: var(--navy); }

/* Zmiana: data; kto i kiedy dokładnie — w karcie. */
.dc-when { position: relative; display: inline-block; margin-left: -6px; padding: 2px 6px; border-radius: 6px; font-weight: 600; white-space: nowrap; cursor: default; }
.dc-when:hover, .dc-when:focus-visible { background: var(--accent-soft); outline: none; }
.dc-tt { position: absolute; left: 50%; top: calc(100% + 9px); z-index: 25; display: flex; align-items: center; gap: 10px; padding: 9px 14px 9px 9px; white-space: nowrap; pointer-events: none; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 12px; box-shadow: 0 18px 40px -14px rgba(25, 28, 98, .3), 0 6px 14px -6px rgba(25, 28, 98, .16); opacity: 0; visibility: hidden; transform: translate(-50%, -4px); transition: opacity .14s, transform .14s, visibility .14s; }
.dc-tt::before { content: ''; position: absolute; top: -6px; left: 50%; width: 10px; height: 10px; background: var(--surface); border-left: 1px solid var(--line-soft); border-top: 1px solid var(--line-soft); transform: translateX(-50%) rotate(45deg); }
.dc-tt .pp-av { width: 32px; height: 32px; font-size: 12px; letter-spacing: .02em; }
.pp-av--soft { background: var(--accent-soft); color: var(--violet); }
.pp-av--soft svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dc-tt b { display: block; font-size: 14px; font-weight: 700; color: var(--navy); line-height: 1.25; }
.dc-tt small { display: block; font-size: 12px; font-weight: 500; color: var(--ink-soft); line-height: 1.35; }
.dc-tt small:first-child { font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.dc-when:hover .dc-tt, .dc-when:focus .dc-tt { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* Status: jeden znacznik; powód (błąd, wersja robocza, szkic) jako ikonka, tekst w karcie. */
.dc-stat-cell { position: relative; display: flex; align-items: center; gap: 6px; }
.dc-stat-cell .tag { margin: 0; white-space: nowrap; }
.dc-flag { flex: none; width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--warn-soft); color: var(--warn); text-decoration: none; }
.dc-flag svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; }
.dc-flag.bad { background: var(--bad-soft); color: var(--bad); }
.dc-flag:hover { background: var(--warn); color: #FFFFFF; }
.dc-flag.bad:hover { background: var(--bad); }
.dc-flag .t { position: absolute; left: 0; top: calc(100% + 8px); z-index: 6; max-width: 320px; white-space: normal; background: var(--surface); color: var(--navy); border: 1px solid var(--line-soft); border-radius: 9px; padding: 6px 10px; font-size: 12.5px; font-weight: 700; box-shadow: 0 12px 28px -10px rgba(25, 28, 98, .28), 0 4px 10px -4px rgba(25, 28, 98, .14); opacity: 0; visibility: hidden; transform: translateY(-3px); transition: opacity .12s, transform .12s, visibility .12s; pointer-events: none; width: max-content; }
.dc-stat-cell:hover .t, .dc-flag:focus .t { opacity: 1; visibility: visible; transform: none; }

/* Akcje: bez ramek; „⋯" z menu. */
.dc-acts { position: relative; display: flex; gap: 2px; justify-content: flex-end; opacity: .6; transition: opacity .12s; }
.dc tbody tr:hover .dc-acts, .dc-acts:focus-within, .dc-acts.open { opacity: 1; }
.dc-ib { position: relative; width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 9px; background: none; color: var(--navy); cursor: pointer; }
.dc-ib svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dc-ib[aria-haspopup] svg { stroke-width: 3.2; }
.dc-ib:hover, .dc-ib[aria-expanded="true"] { background: var(--accent-soft); }
.dc-ib:focus-visible { outline: 2px solid var(--violet); outline-offset: 1px; }
.dc-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 220px; display: grid; padding: 6px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 12px; box-shadow: 0 18px 40px -14px rgba(25, 28, 98, .3), 0 6px 14px -6px rgba(25, 28, 98, .16); }
.dc-menu.up { top: auto; bottom: calc(100% + 4px); }
.dc-menu a, .dc-menu button { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--navy); text-decoration: none; white-space: nowrap; }
.dc-menu button { width: 100%; border: 0; background: transparent; font-family: inherit; text-align: left; cursor: pointer; }
.dc-menu a:hover, .dc-menu a:focus-visible, .dc-menu button:hover, .dc-menu button:focus-visible { background: var(--accent-soft); outline: none; }
.dc-menu svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; }
/* „Zrezygnuj z dostępu" (M.R., 28.10): odebranie czegoś — czerwień jak przy usuwaniu, oddzielone kreską od reszty. */
.dc-menu .dc-menu-bad { margin-top: 4px; border-top: 1px solid var(--line-soft); border-radius: 0 0 8px 8px; color: var(--bad); }
.dc-menu .dc-menu-bad:hover, .dc-menu .dc-menu-bad:focus-visible { background: var(--bad-soft); }
.page-more-item--sep { border-top: 1px solid var(--line-soft); }
.page-more-item--danger svg { color: var(--bad); }

/* Wyłączone — zwinięta grupa na dole; pusty wynik. */
.dc-group td { padding: 0 !important; background: var(--row-hover); }
.dc-group button { width: 100%; display: flex; align-items: center; gap: 8px; padding: 11px 18px; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 800; color: var(--ink-soft); cursor: pointer; text-align: left; }
.dc-group button:hover { color: var(--navy); }
.dc-group button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; transform: rotate(-90deg); transition: transform .15s; }
.dc-group button[aria-expanded="true"] svg { transform: none; }
.dc-group small { margin-left: 4px; font-weight: 600; }
.dc-n { display: inline-grid; place-items: center; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 999px; background: var(--line-soft); color: var(--navy); font-size: 11.5px; font-weight: 800; }
.dc-empty td { padding: 44px 12px !important; text-align: center; color: var(--ink-soft); }
.dc-empty b { display: block; margin-bottom: 4px; font-size: 16px; color: var(--navy); }

/* Dotyk bez myszy: akcje w pełnym kolorze. */
@media (hover: none) { .dc-acts { opacity: 1; } }

/* Duży ekran (karta od ~1300 px): kolumny pomocnicze trochę szersze — wiersz zostaje zrównoważony, nie sama nazwa
   rośnie; wyszukiwarka mieści dłuższą frazę. */
@container dclist (min-width: 1300px) {
  .dc col.c-src { width: 190px; } .dc col.c-acc { width: 150px; } .dc col.c-chg { width: 160px; } .dc col.c-st { width: 220px; } .dc col.c-act { width: 140px; }
  .dc-search { max-width: 420px; }
}
/* Laptop (karta ~880–1060 px): węższe kolumny pomocnicze — miejsce idzie do nazwy. */
@container dclist (max-width: 1060px) {
  .dc col.c-src { width: 146px; } .dc col.c-acc { width: 104px; } .dc col.c-chg { width: 120px; } .dc col.c-st { width: 172px; } .dc col.c-act { width: 124px; }
  .dc td { padding-left: 10px; padding-right: 10px; }
  .dc-ib { width: 32px; height: 32px; }
  .dc-src { gap: 4px; }
}
/* Wąska karta (tablet, telefon, laptop z wąskim oknem): wiersz = zwarta kartka w trzech liniach. */
@container dclist (max-width: 860px) {
  .dc colgroup, .dc thead { display: none; }
  table.dc, .dc tbody { display: block; }
  .dc tbody tr { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto auto; grid-template-areas: "ck name name acts" ". st chg chg" ". src acc acc"; column-gap: 12px; row-gap: 8px; align-items: center; padding: 14px 12px 14px 16px; border-bottom: 1px solid var(--line-soft); }
  .dc tbody tr:last-child { border-bottom: 0; }
  .dc td { display: block; min-width: 0; padding: 0 !important; border: 0 !important; background: none !important; }
  .dc tbody tr:hover { background: var(--row-hover); }
  .dc tbody tr.picked { background: var(--accent-soft); }
  .dc td:nth-child(1) { grid-area: ck; }
  .dc td:nth-child(2) { grid-area: name; }
  .dc td:nth-child(3) { grid-area: src; position: relative; }
  .dc td:nth-child(4) { grid-area: acc; justify-self: end; }
  .dc td:nth-child(5) { grid-area: chg; justify-self: end; }
  .dc td:nth-child(6) { grid-area: st; }
  .dc td:nth-child(7) { grid-area: acts; }
  .dc td:nth-child(6) .dc-stat-cell { flex-wrap: wrap; gap: 4px 8px; }
  .dc-none { display: none; }
  .dc-when { margin: 0 -6px 0 0; font-size: 12.5px; color: var(--ink-soft); }
  .dc-tt { left: auto; right: -6px; transform: translateY(-4px); }
  .dc-when:hover .dc-tt, .dc-when:focus .dc-tt { transform: none; }
  .dc-tt::before { left: auto; right: 18px; transform: rotate(45deg); }
  .dc-ppl { margin: 0 -8px 0 0; font-size: 13px; }
  .dc-pop { left: auto; right: 0; min-width: 0; max-width: calc(100vw - 48px); }
  /* Bez najeżdżania na telefonie: powód przy statusie od razu jako tekst. */
  .dc-flag, .dc-flag:hover, .dc-flag.bad:hover { width: auto; height: auto; border-radius: 0; background: none; display: inline-flex; align-items: center; gap: 4px; color: var(--warn); }
  .dc-flag.bad, .dc-flag.bad:hover { color: var(--bad); background: none; }
  .dc-flag .t { position: static; opacity: 1; visibility: visible; transform: none; width: auto; max-width: none; min-width: 0; white-space: normal; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: inherit; font-size: 12.5px; font-weight: 600; }
  /* Długi powód („niezapisany szkic z …") zawija się w swojej kolumnie, zamiast wchodzić na datę obok. */
  .dc-flag { min-width: 0; max-width: 100%; }
  .dc-flag svg { flex: none; }
  .dc td:nth-child(6) .dc-stat-cell { min-width: 0; }
  .dc-acts { opacity: 1; }
  .dc-ib[data-tip]:hover::after { display: none; }
  .dc-src > .dc-more { position: static; }
  .dc-more-pop { left: 0; transform: translateY(-4px); }
  .dc-more:hover .dc-more-pop, .dc-more:focus .dc-more-pop { transform: none; }
  .dc tr.dc-group, .dc tbody tr.dc-empty { display: block; padding: 0; }
  .dc tr.dc-group td, .dc tr.dc-empty td { display: block; }
  .dc tbody tr:last-child td:first-child, .dc tbody tr:last-child td:last-child { border-radius: 0; }
  .dc-card .bulk-bar.dc-bulk { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: center; }
  .dc-card .bulk-bar.dc-bulk .bulk-count { grid-column: 1; grid-row: 1; margin: 0; }
  .dc-card .bulk-bar.dc-bulk .link-btn { grid-column: 2; grid-row: 1; justify-self: end; margin: 0; }
  .dc-card .bulk-bar.dc-bulk select.dc-pill { width: 100%; }
  /* Lista osób ma długie pozycje — w połowie wiersza „Nadaj dostęp osobie…" ucinało się do „osob". */
  .dc-card .bulk-bar.dc-bulk select.dc-pill[aria-label="Nadaj dostęp osobie"] { grid-column: 1 / -1; }
  .dc-card .bulk-bar.dc-bulk > .btn, .dc-card .bulk-bar.dc-bulk .bulk-result { grid-column: 1 / -1; justify-content: center; }
}
@container dclist (max-width: 520px) {
  .dc-search { flex: 1 1 100%; max-width: none; }
  .dc-tools { padding: 12px; }
  .dc tbody tr { grid-template-columns: 22px minmax(0, 1fr) auto auto; column-gap: 10px; }
  .dc td:nth-child(7) .dc-acts > .dc-ib:not([aria-haspopup]) { display: none; }
}
/* Menu „⋯" w wierszu elementu kreatora (zamiast rzędu pięciu ikon). */
.b-el-menu > summary { list-style: none; cursor: pointer; font-size: 18px; line-height: 1; }
.b-el-menu > summary::-webkit-details-marker { display: none; }
.b-el-menu[open] > summary { background: var(--accent-soft); }
.b-el-menu .page-more-menu { min-width: 230px; }
.b-el-menu .page-more-item:disabled { opacity: .45; cursor: default; background: transparent; }

/* ======================================================================== „Wybierz z gotowych" — lista i podgląd (M.R., 24.10) */
/* Okno na prawie całą wysokość ekranu — im wyższe, tym większy podgląd. */
.modal-overlay:has(.modal--lib) { padding-top: 24px; padding-bottom: 24px; }
.modal--lib { height: calc(100vh - 48px); min-height: 600px; }
/* Szczegóły układu mają własne przewijanie (78vh) — okno na pełną wysokość zostawiało pod nimi pusty pas. */
.modal--lib:has(.lb-detail) { height: auto; min-height: 0; }
.lp-filters { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.lp-search { display: flex; gap: 8px; width: min(460px, 100%); }
.lp-search input { flex: 1 1 220px; min-width: 0; }
.lp-search select { flex: 0 1 200px; width: auto; }
.lp-cats { display: flex; flex-wrap: wrap; gap: 6px; }
/* Wyszukiwarka i „kto dał układ" w jednej linii (M.R., 24.10: układy opublikowane przez zespół w oknie wyboru). */
.lp-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; align-self: stretch; }
.lp-source { box-shadow: none; padding: 3px; }
.lp-source .lb-source-btn { padding: 5px 6px 5px 12px; font-size: 13px; }
.lp-by { font-size: 12px; font-weight: 600; }
.lp-row-by { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--violet); font-weight: 600; }
.lp-cats .lib-cat-btn { padding: 5px 10px; font-size: 13px; }
/* Podgląd wersji w Historii — ten sam podgląd co w „Wybierz z gotowych", na całą wysokość okna. */
.modal--ver .lp-detail.ver-preview { flex: 1; }
.modal--ver .lp-detail-title p { margin: 0; }
.lp { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 16px; flex: 1; min-height: 0; min-width: 0; }
.lp-list { position: relative; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; padding-right: 4px; }
.lp-row { display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 9px 12px; border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; font: inherit; color: var(--ink); cursor: pointer; }
.lp-row:hover { background: var(--row-hover); }
.lp-row[aria-selected="true"] { background: var(--accent-soft); border-color: var(--accent-hover); box-shadow: inset 3px 0 0 var(--violet); }
.lp-row:focus-visible { outline: 2px solid var(--violet); outline-offset: 1px; }
.lp-row b { font-size: 14px; }
.lp-row-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-soft); }
.lp-detail { display: flex; flex-direction: column; gap: 12px; min-height: 0; min-width: 0; padding: 14px 16px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--surface); }
.lp-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.lp-detail-title { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.lp-detail-title h3 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.lp-detail-title p { font-size: 13px; }
.lp-detail-tools { display: flex; align-items: center; gap: 10px; flex: none; }
.lp-device { flex: none; }
.lp-detail-tools .tip { display: inline-flex; }
.lp-device button { padding: 6px 12px; }
.lp-device button svg { width: 17px; height: 17px; }
/* Scena: tło, na którym stoi okno przeglądarki albo telefon. `contain` — podgląd nie rozpycha okna wyboru. */
.lp-stage { flex: 1; min-height: 0; contain: inline-size; border-radius: var(--radius-sm); background: linear-gradient(160deg, var(--bg), var(--accent-soft)); }
.lp-stage--komputer { display: flex; padding: 16px 18px; }
.lp-stage--telefon { display: flex; justify-content: center; padding: 16px 0; overflow: hidden; }
/* Okno przeglądarki: pasek z kropkami PG i adresem, pod nim dashboard. */
.lp-browser { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; border-radius: 12px; background: var(--surface);
  box-shadow: 0 0 0 1px var(--line), 0 24px 48px -24px rgba(25, 28, 98, .4); }
.lp-browser-bar { display: flex; align-items: center; gap: 14px; height: 36px; padding: 0 14px; flex: none; background: var(--surface); border-bottom: 1px solid var(--line-soft); }
.lp-browser-dots { display: inline-flex; gap: 6px; }
.lp-browser-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--pg-media); opacity: .8; }
.lp-browser-dots i:nth-child(2) { background: var(--pink); }
.lp-browser-dots i:nth-child(3) { background: var(--violet); }
.lp-browser-url { display: inline-flex; align-items: center; gap: 6px; flex: 0 1 380px; min-width: 0; margin: 0 auto; padding: 3px 12px; border-radius: 999px; background: var(--bg); color: var(--ink-soft); font-size: 12px; }
.lp-browser-url span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-browser-url svg { flex: none; width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; }
.lp-browser-screen { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; background: var(--bg); scrollbar-width: thin; }
.lp-browser-screen:focus-visible { outline: 2px solid var(--violet); outline-offset: -2px; }
.lp-zoom { width: 1280px; }
.lp-zoom .dv { margin: 0; }
/* Dopisek „Liczby przykładowe…" zbędny w oknie wyboru (M.R., 24.10) — zostaje w nowej karcie i na dashboardzie. */
.lp-stage .dv-sample { display: none; }
.lp-zoom .dv-chat { position: sticky; bottom: 24px; z-index: 5; margin: 16px 24px 24px; }
.lp-foot { display: flex; align-items: center; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.lp-foot-info { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 13px; min-width: 0; }
.lp-foot .btn { margin-left: auto; white-space: nowrap; }

@media (max-width: 760px) {
  .modal--lib { height: auto; min-height: 0; }
  .lp { grid-template-columns: 1fr; }
  .lp-list { max-height: 180px; }
  .lp-stage { height: 460px; flex: none; }
  .lp-detail-head { flex-direction: column; }
  .lp-search { flex-wrap: wrap; }
}

/* ======================================================================== Biblioteka — nowy wygląd (M.R., 24.10) */
/* Karta = okładka z prawdziwym dashboardem w pomniejszeniu, kto dał układ, ile razy użyty; klik = szczegóły. */
.lb-head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.lb-source-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 2px 0 16px; }
.lb-source-row:has(> .lb-source[hidden]) { display: none; }
.lb-source { display: inline-flex; gap: 2px; padding: 4px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.lb-source[hidden] { display: none; }
.lb-source-btn { display: inline-flex; align-items: center; gap: 8px; padding: 7px 8px 7px 14px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-soft); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.lb-source-btn:hover { background: var(--row-hover); color: var(--navy); }
.lb-source-btn[aria-pressed="true"] { background: var(--navy); color: #FFFFFF; }
.lb-source-btn[aria-pressed="true"] .lib-cat-n { background: var(--navy-2); color: #FFFFFF; }
.lb-source-btn:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.lb-source-btn { position: relative; }
.lb-tip {
  position: absolute; top: calc(100% + 10px); left: 50%; z-index: 30; width: max-content; max-width: 260px; padding: 9px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 600; line-height: 1.4; text-align: left; white-space: normal;
  box-shadow: 0 8px 22px rgba(25, 28, 98, .16); opacity: 0; visibility: hidden; transform: translate(-50%, -4px); transition: opacity .14s ease-out, transform .14s ease-out, visibility .14s; pointer-events: none;
}
.lb-source-btn:hover .lb-tip, .lb-source-btn:focus-visible .lb-tip { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: .25s; }
@media (hover: none) { .lb-tip { display: none; } }
@media (prefers-reduced-motion: reduce) { .lb-tip { transition: none; } }
.lb-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.lb-tools input { flex: 1 1 280px; }
.lb-tools select { flex: 0 1 210px; width: auto; }
.lb-tools + .lib-cats { margin-bottom: 22px; }
.lb-tools + .lib-cats .lib-cat-btn { padding: 5px 7px 5px 12px; font-size: 13px; }

.lb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 22px; }
.lb-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden; background: var(--surface);
  border: 1px solid var(--line-soft); border-radius: 16px; box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.lb-card:hover { transform: translateY(-3px); border-color: var(--accent-hover); box-shadow: 0 2px 4px rgba(25, 28, 98, .05), 0 18px 38px rgba(25, 28, 98, .13); }
.lb-card.has-errors { border-color: var(--bad); }
/* Bez kolorowego paska nad okładką według rodzaju (M.R., 25.10: wyglądał jak błąd) — rodzaj mówi zakładka i przełącznik. */
@media (prefers-reduced-motion: reduce) { .lb-card, .lb-card:hover { transition: none; transform: none; } }

.lb-cover {
  position: relative; display: block; width: 100%; height: 196px; padding: 16px 16px 0; overflow: hidden; cursor: zoom-in;
  border: 0; border-bottom: 1px solid var(--line-soft); background: var(--bg); font: inherit; color: inherit; text-align: left;
}
.lb-cover .lib-thumb--live { height: 100%; -webkit-mask-image: linear-gradient(180deg, var(--navy) 70%, transparent); mask-image: linear-gradient(180deg, var(--navy) 70%, transparent); }
.lb-cover .lib-thumb--live:empty { border-radius: 10px; background: linear-gradient(100deg, var(--line-soft) 40%, var(--surface) 50%, var(--line-soft) 60%); background-size: 300% 100%; animation: lb-shimmer 1.4s linear infinite; }
@keyframes lb-shimmer { to { background-position: -150% 0; } }
@media (prefers-reduced-motion: reduce) { .lb-cover .lib-thumb--live:empty { animation: none; } }
.lb-cover-hover {
  position: absolute; left: 50%; bottom: 14px; z-index: 1; display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px;
  border-radius: 999px; background: var(--navy); color: #FFFFFF; font-size: 13px; font-weight: 700; box-shadow: 0 6px 18px rgba(25, 28, 98, .25);
  opacity: 0; transform: translate(-50%, 6px); transition: opacity .16s ease-out, transform .16s ease-out;
}
.lb-cover-hover svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }
.lb-cover:hover .lb-cover-hover, .lb-cover:focus-visible .lb-cover-hover { opacity: 1; transform: translate(-50%, 0); }
.lb-cover:focus-visible { outline: 2px solid var(--violet); outline-offset: -2px; }
@media (hover: none) { .lb-cover-hover { display: none; } }

.lb-body { display: flex; flex: 1; flex-direction: column; gap: 8px; padding: 14px 18px 16px; }
/* Kategoria zawsze w granacie PG (M.R., 24.10) — kolor nie rozróżnia kategorii, robi to napis. */
.lb-card .lib-cat, .lb-detail .lib-cat { color: var(--navy); }
.lb-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 24px; }
.lb-body h2 { margin: 0; font-size: 18px; line-height: 1.3; font-weight: 800; letter-spacing: -.01em; }
.lb-title { padding: 0; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.lb-title:hover { color: var(--violet); }
.lb-title:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; border-radius: 4px; }
.lb-desc { margin: 0; color: var(--ink-soft); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lb-err { margin: 0; color: var(--bad); font-size: 13px; font-weight: 700; }
.lb-plat { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--bg); }
.lb-plat svg { width: 15px; height: 15px; }
/* Dymek w szacie PG zamiast systemowego okienka z `title` (M.R., 24.10: „źle się wyświetla"): nazwa platformy, rodzaj elementu. */
.lb-tipped { position: relative; }
.lb-tipped::after {
  content: attr(data-tip); position: absolute; top: calc(100% + 6px); left: 50%; z-index: 6; padding: 5px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--ink); font-size: 12px; font-weight: 700; line-height: 1.3; white-space: nowrap; box-shadow: 0 6px 16px rgba(25, 28, 98, .14);
  opacity: 0; visibility: hidden; transform: translate(-50%, -3px); transition: opacity .12s ease-out, transform .12s ease-out, visibility .12s; pointer-events: none;
}
.lb-tipped:hover::after { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: .2s; }
.lb-top .lb-tipped::after { left: auto; right: 0; transform: translateY(-3px); }
.lb-top .lb-tipped:hover::after { transform: none; }
@media (prefers-reduced-motion: reduce) { .lb-tipped::after { transition: none; } }
.lb-plat-more { position: relative; width: auto; min-width: 26px; padding: 0 6px; background: var(--accent-soft); color: var(--navy); font-size: 12px; font-weight: 800; cursor: default; }
.lb-plat-more:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.lb-plat-tip {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 5; display: flex; flex-direction: column; gap: 7px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 700; white-space: nowrap;
  box-shadow: 0 8px 22px rgba(25, 28, 98, .16); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .14s ease-out, transform .14s ease-out, visibility .14s;
}
.lb-plat-tip > span { display: flex; align-items: center; gap: 8px; }
.lb-plat-tip svg { width: 15px; height: 15px; }
.lb-plat-more:hover .lb-plat-tip, .lb-plat-more:focus-visible .lb-plat-tip { opacity: 1; visibility: visible; transform: none; }
@media (prefers-reduced-motion: reduce) { .lb-plat-tip { transition: none; } }
.lb-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 10px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.lb-meta { font-size: 12px; color: var(--ink-soft); }
.lb-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }

.lb-by { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.lb-by > span:last-child { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.lb-by b { font-size: 13px; }
.lb-by small { font-size: 11px; color: var(--ink-soft); }
.lb-av, .lb-pg { width: 28px; height: 28px; font-size: 11px; }
.lb-pg { flex: none; display: grid; place-items: center; border-radius: 8px; background: var(--navy); color: #FFFFFF; font-weight: 800; letter-spacing: .02em; box-shadow: inset 0 -3px 0 var(--pg-media); }
.lb-av--big { width: 38px; height: 38px; font-size: 13px; }
.lb-pill { padding: 2px 10px; border-radius: 999px; background: var(--bg); color: var(--ink-soft); font-size: 12px; font-weight: 700; white-space: nowrap; }
.lb-pill--on { background: var(--good-soft); color: var(--good); }

.lb-share {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 300px; padding: 24px;
  border: 2px dashed var(--line); background: transparent; box-shadow: none; color: var(--ink-soft); font: inherit; font-size: 14px; text-align: center; cursor: pointer;
}
.lb-share b { color: var(--navy); font-size: 17px; }
.lb-share:hover { border-color: var(--violet); background: var(--surface); }
.lb-share:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.lb-share-ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--navy); color: #FFFFFF; box-shadow: 0 6px 16px rgba(25, 28, 98, .22); }
.lb-share-ic svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; }
.lb-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 48px 24px; border: 2px dashed var(--line); border-radius: 16px; text-align: center; }
.lb-empty h3 { margin: 4px 0 0; font-size: 20px; font-weight: 800; }
.lb-empty p { margin: 0 0 6px; max-width: 520px; color: var(--ink-soft); }

.lb-label { margin: 6px 0 0; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
.lb-kinds { display: inline-flex; gap: 3px; }
.lb-kind { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--accent-soft); color: var(--navy); }
.lb-kind svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; }

/* Szczegóły układu: podgląd na liczbach przykładowych + kolumna z opisem, sekcjami i akcjami. */
.modal.modal--lib { max-width: min(1500px, 96vw); padding: 18px 20px; }
.lb-detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.lb-detail-main { min-width: 0; max-height: 78vh; overflow-y: auto; padding: 0 8px 8px; border-radius: 12px; background: var(--bg); }
.lb-detail-bar { position: sticky; top: 0; z-index: 3; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 8px 0; background: var(--bg); }
.lb-detail-bar > a { justify-self: end; }
.lb-page-bar .seg { margin-left: auto; }
.lb-page-bar .seg + .btn { margin-left: 0; }
.lb-page-phone { display: flex; justify-content: center; padding-top: 4px; }
.lb-detail-preview--phone { display: flex; justify-content: center; padding: 6px 0 4px; }
.lb-phone-zoom { width: max-content; }
.lb-detail-bar .seg button, .lb-page-bar .seg button { gap: 6px; }
.lb-detail-side { position: sticky; top: 0; display: flex; flex-direction: column; gap: 10px; max-height: 78vh; overflow-y: auto; padding-right: 2px; }
.lb-detail-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lb-detail-desc { color: var(--ink-soft); font-size: 15px; }
.lb-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.lb-stats > div { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 10px; background: var(--bg); }
.lb-stats b { font-size: 22px; line-height: 1.1; font-weight: 800; color: var(--navy); }
.lb-stats span { font-size: 12px; color: var(--ink-soft); }
.lb-detail-actions { display: flex; flex-direction: column; gap: 8px; }
.lb-detail-actions .btn { justify-content: center; }
.lb-secs { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; counter-reset: lb-sec; }
.lb-secs li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; grid-template-areas: "n t k" "n s k"; align-items: center; column-gap: 8px; padding: 8px 10px; border: 1px solid var(--line-soft); border-radius: 10px; counter-increment: lb-sec; }
.lb-secs li::before { content: counter(lb-sec); grid-area: n; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--navy); color: #FFFFFF; font-size: 11px; font-weight: 800; }
.lb-secs b { grid-area: t; font-size: 14px; }
.lb-secs small { grid-area: s; font-size: 12px; color: var(--ink-soft); }
.lb-secs .lb-kinds { grid-area: k; flex-wrap: wrap; justify-content: flex-end; max-width: 120px; }
.lb-goals { font-size: 14px; font-weight: 700; color: var(--navy); }
.lb-manage { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.lb-manage .btn { min-height: 34px; }
.lb-danger { color: var(--bad); }
.lb-danger:hover { border-color: var(--bad); color: var(--bad); }

/* Co trafia do Biblioteki, a co nie (okno publikacji i szczegóły). */
.pub-rules { display: grid; grid-template-columns: 1fr; gap: 6px; }
.pub-rules ul { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.pub-rules li { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.pub-rules svg { flex: none; width: 16px; height: 16px; padding: 2px; border-radius: 50%; fill: none; stroke: currentColor; stroke-width: 3; }
.pub-keep svg { background: var(--good-soft); color: var(--good); }
.pub-drop li { color: var(--ink-soft); }
.pub-drop svg { background: var(--bad-soft); color: var(--bad); }

/* Okno publikacji: formularz po lewej, podgląd „tak zobaczy go zespół" i lista po prawej. */
.modal.modal--pub { max-width: 980px; }
.pub { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 22px; align-items: start; }
.pub-form { display: flex; flex-direction: column; gap: 12px; }
.pub-form .field small { font-size: 12px; }
.pub-side { display: flex; flex-direction: column; gap: 14px; }
.pub-preview { position: relative; height: 230px; overflow: hidden; padding: 14px 14px 0; border-radius: 12px; background: var(--bg); }
.pub-preview .lib-thumb--live { height: 100%; -webkit-mask-image: linear-gradient(180deg, var(--navy) 72%, transparent); mask-image: linear-gradient(180deg, var(--navy) 72%, transparent); }
.pub-preview > p { margin: 0; padding: 60px 10px; text-align: center; font-size: 14px; }
.pub-preview-note { position: absolute; left: 12px; bottom: 10px; padding: 3px 10px; border-radius: 999px; background: var(--surface); color: var(--ink-soft); font-size: 12px; font-weight: 700; box-shadow: var(--shadow); }
.pub-vis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pub-vis-opt { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.pub-vis-opt > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.pub-vis-opt small { font-size: 12px; color: var(--ink-soft); line-height: 1.35; }
.pub-vis-opt:hover { border-color: var(--navy); }
.pub-vis-opt[aria-checked="true"] { border-color: var(--violet); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--violet); }
.pub-vis-opt:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.pub-vis-ic { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--bg); color: var(--navy); }
.pub-vis-opt[aria-checked="true"] .pub-vis-ic { background: var(--violet); color: #FFFFFF; }
.pub-vis-ic svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; }

@media (max-width: 900px) {
  .lb-detail, .pub { grid-template-columns: 1fr; }
  .lb-detail-side { position: static; max-height: none; }
  .lb-detail-main { max-height: 60vh; }
  .pub-vis { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .lb-source { display: flex; width: 100%; }
  .lb-source-btn { flex: 1; justify-content: center; padding: 7px 6px; font-size: 13px; }
  .lb-source-btn { white-space: nowrap; }
  .lb-source-btn .lib-cat-n { display: none; }
  .lb-tools + .lib-cats { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding: 2px 16px; }
  .lb-tools + .lib-cats .lib-cat-btn { flex: none; }
  .lb-head-actions { width: 100%; }
  .lb-head-actions > * { flex: 1; justify-content: center; }
  .lb-tools select { flex: 1 1 140px; }
}

/* ======================================================================== Przegląd responsywności (24.10) */
/* Wąski ekran: nic nie wystaje w bok — pigułki, przełączniki i dymki mieszczą się w szerokości ekranu. */
.b-tips summary { flex-wrap: wrap; }
@media (max-width: 600px) {
  .check { max-width: 100%; white-space: normal; line-height: 1.35; border-radius: 12px; }
  .check input { flex: none; }
  .seg { max-width: 100%; }
  .seg button { min-width: 0; white-space: normal; line-height: 1.25; text-align: center; }
  .b-goal-mode { flex-wrap: wrap; max-width: 100%; }
  .tag { max-width: 100%; white-space: normal; }
  /* Dymek nad przyciskiem nie mieści się na wąskim ekranie (i tak nie ma tu najechania myszą). */
  .lb-tip { display: none; }
  /* Podgląd dashboardu w edytorze prawie do krawędzi karty — w wąskiej ramce nazwa i okresy się nie mieściły. */
  .b-card-layout .b-preview { margin-inline: -10px; }
  .b-preview .dv-lang-list { min-width: 0; }
}
/* Rozliczenia na telefonie: wiersz dashboardu jako kartka z podpisami pól — jak w Dostępach i Logowaniach (tabela wychodziła w bok). */
.bill-card { container-type: inline-size; }
@container (max-width: 640px) {
  .bill-table, .bill-table tbody { display: block; }
  .bill-table thead { display: none; }
  .bill-table tr:not(.bill-detail-row) {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px;
    padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  }
  .bill-table tr + tr { margin-top: 10px; }
  .bill-table tbody tr:hover { background: transparent; }
  .bill-table td, .bill-table .num { padding: 0; border: 0; text-align: left; }
  .bill-table .cell-name { grid-row: 1; grid-column: 1; align-self: center; }
  .bill-table .cell-actions { grid-row: 1; grid-column: 2; }
  .bill-table td[data-label] { grid-column: 1 / -1; display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 2px 10px; align-items: baseline; }
  .bill-table td[data-label]::before { content: attr(data-label); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-soft); }
  .bill-table td[data-label] > * { grid-column: 2; min-width: 0; }
  .bill-detail-row, .bill-detail-row > td { display: block; }
  .bill-detail-row > td { padding: 12px; border-radius: var(--radius-sm); }
}
.bill-mini .mono { white-space: nowrap; }
/* Dziennik na telefonie: zdarzenie jako kartka — kiedy i co w pierwszej linii, niżej kto, czego dotyczy, szczegóły. */
.journal-card { container-type: inline-size; }
@container (max-width: 900px) {
  .journal-table, .journal-table tbody { display: block; }
  .journal-table thead { display: none; }
  .journal-table tr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
  .journal-table tr + tr { margin-top: 10px; }
  .journal-table tbody tr:hover { background: transparent; }
  .journal-table td { padding: 0; border: 0; min-width: 0; }
  /* Pierwsza linia: data i rodzaj; za długi rodzaj spada pod datę zamiast na nią nachodzić. */
  .journal-table .j-when { flex: 1 0 auto; font-size: 13px; color: var(--ink-soft); }
  .journal-table .j-kind { flex: none; }
  .journal-table td[data-label], .journal-table td[colspan] { flex: 1 1 100%; }
  .journal-table td[data-label] { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 10px; align-items: baseline; overflow-wrap: anywhere; }
  .journal-table td[data-label]::before { content: attr(data-label); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-soft); }
  .journal-table .j-desc { flex: 1 1 100%; font-size: 13px; }
  .journal-table .j-desc--none { display: none; }
}
/* Pigułka w tabeli zostaje w jednej linii — zawija się tylko poza tabelą. */
td .tag { white-space: nowrap; }
/* Lista wyboru w jednej linii z „…" — `base-select` łamał długi wybór na dwie linie i pole obok było niższe. */
@supports (appearance: base-select) { select { white-space: nowrap; overflow: clip; overflow-clip-margin: content-box; } }
/* Skrzynka uwag: w wąskiej liście (tablet) wyszukiwarka nad filtrem — obok siebie ucinało „Szukaj w uwagach". */
.ib-tools { flex-wrap: wrap; }
.ib-search { flex: 1 1 170px; }
/* Telefon: status w swojej linii, pod nim „Otwórz dashboard" i „Więcej" obok siebie — przy dłuższym statusie
   „Więcej" spadało samo do drugiej linii. */
@media (max-width: 480px) {
  .page-head-side { display: grid; grid-template-columns: auto auto; justify-content: start; }
  .page-head-side > .tag:first-child { grid-column: 1 / -1; justify-self: start; }
}
/* Szczegóły układu w Bibliotece: ukryte dymki nie rozpychają panelu w bok; na telefonie przełącznik urządzenia
   i „W nowej karcie" w jednym rzędzie bez pustej kolumny (trzy kolumny wychodziły poza okno). */
.lb-detail-side { overflow-x: hidden; }
@media (max-width: 600px) {
  .lb-detail-bar { display: flex; flex-wrap: wrap; justify-content: space-between; }
  .lb-detail-bar > span:empty { display: none; }
  .lb-detail-bar .seg button { padding-inline: 10px; }
}
/* „Wybierz z gotowych": kategorie na całą szerokość; na telefonie jeden przewijany rząd jak w Bibliotece
   (było po jednej w linii i lista układów spadała pod ekran). */
.lp-cats { align-self: stretch; }
@media (max-width: 600px) {
  .lp-cats { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .lp-cats .lib-cat-btn { flex: none; }
  .lp-detail-tools .btn { white-space: nowrap; }
}
/* Asystent na telefonie: „Ułóż dashboard" i „Dołącz plik" każdy w jednej linii (łamały się na dwie);
   przykłady jako zaokrąglone kartki, nie pigułki rozciągnięte na trzy linie. */
@media (max-width: 480px) {
  .as-send { flex-wrap: wrap; }
  .as-send > .btn { white-space: nowrap; }
  .as-hints .chip { border-radius: 12px; }
}
/* Kreator na telefonie: pasek Wstecz · Dalej · Anuluj w jednym rzędzie (był w dwóch i zasłaniał pół ekranu). */
@media (max-width: 480px) {
  .wiz-back-label, .wiz-next-step { display: none; }
  .wiz-back { padding-inline: 12px; }
}
@media (max-width: 360px) { .actions--sticky .btn { padding-inline: 12px; } }
/* „Pilne? Napisz od razu" jako samodzielny blok strony (Moje zgłoszenia): karta jak reszta strony i odstęp
   od listy pod spodem — była przyklejona do karty z wyszukiwarką (M.R., 24.10, zrzut). */
main > .contact { margin-bottom: 16px; padding: 16px 20px; border-color: transparent; border-radius: 16px; box-shadow: 0 1px 2px rgba(25, 28, 98, .04), 0 8px 24px rgba(25, 28, 98, .07); }
/* Skróty klawiatury nic nie mówią na ekranie dotykowym. */
@media (max-width: 720px), (hover: none) { .b-preview-hint { display: none; } }
/* Telefon: rozmowa „Zapytaj o wyniki" na szerokość ekranu bez paska przewijania (100vw go wliczało). */
@media (max-width: 560px) {
  body.dash-page .dv-chat-panel, body.showcase .dv-chat-panel { left: 0; width: auto; }
}

/* ================================================================== Przenieś raport — nowy wygląd (25.10, wersja A) */

/* Ikony w przyciskach i znacznikach tej strony (`:where` — szczegółowe rozmiary niżej wygrywają; wykresy podglądu nietknięte). */
:where(.mig-page, .mig-pip, .mig-veil) :where(.btn, .link-btn, .icon, .mig-seg-btn, .mig-badge, .mig-stats li, .mig-cta-text, .mig-thumb--empty, .mig-hero-icon, .mig-veil-box, .mig-how-ic, .mig-how-n, .mig-how-col-title, .mig-done summary) > svg {
  width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
:is(.mig-page, .mig-pip) .link-btn { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- miniatura projektu (rysowana z układu) */
.mig-thumb { display: block; width: 100%; height: auto; }
.mig-thumb .th-paper { fill: var(--surface); stroke: var(--line-soft); }
.mig-thumb .th-hero { fill: var(--navy); }
.mig-thumb .th-hero-t { fill: #FFFFFF; opacity: .9; }
.mig-thumb .th-hero-s { fill: #FFFFFF; opacity: .4; }
.mig-thumb .th-v { fill: var(--violet); } .mig-thumb .th-p { fill: var(--pink); } .mig-thumb .th-m { fill: var(--pg-media); }
.mig-thumb .th-tab { fill: var(--line-soft); }
.mig-thumb .th-tab--on { fill: var(--violet); }
.mig-thumb .th-box { fill: var(--surface); stroke: var(--line); stroke-width: .8; }
.mig-thumb .th-ink { fill: var(--line); }
.mig-thumb .th-num { fill: var(--navy); }
.mig-thumb .th-row { fill: var(--line-soft); }
.mig-thumb .th-line { fill: none; stroke: var(--violet); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mig-thumb .th-donut { fill: none; stroke: var(--pink); stroke-width: 3.5; }
.mig-thumb.is-ghost { opacity: .55; }
.mig-thumb--scan .th-skel { fill: var(--line-soft); animation: migSkel 1.4s ease-in-out infinite alternate; }
.mig-thumb--scan .th-scan-line { fill: var(--violet); }
.mig-thumb--scan .th-scan-glow { fill: var(--violet); opacity: .14; }
.mig-thumb--scan .th-scan { animation: migScan 1.8s cubic-bezier(.45, 0, .55, 1) infinite alternate; }
@keyframes migScan { from { transform: translateY(8px); } to { transform: translateY(118px); } }
@keyframes migSkel { from { opacity: 1; } to { opacity: .45; } }
.mig-thumb--empty {
  aspect-ratio: 200 / 125; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border-radius: 9px; border: 1px dashed var(--line); font-size: 13px; font-weight: 700;
}
.mig-page .mig-thumb--empty > svg { width: 26px; height: 26px; }
.mig-thumb--do_recznego { background: var(--warn-soft); color: var(--warn); }
.mig-thumb--blad { background: var(--bad-soft); color: var(--bad); }
.mig-thumb--orig { position: relative; aspect-ratio: 200 / 125; border-radius: 9px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.mig-thumb--orig img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top left; filter: grayscale(.4); opacity: .75; }

/* ---------- stan pozycji */
.mig-since { font-variant-numeric: tabular-nums; }
.mig-pulse { flex: none; width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; background: var(--violet); animation: migPulse 1.4s ease-out infinite; }
@keyframes migPulse { 0% { box-shadow: 0 0 0 0 rgba(147, 93, 223, .55); } 100% { box-shadow: 0 0 0 9px rgba(147, 93, 223, 0); } }
.mig-sending { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font-weight: 700; color: var(--violet); }
.mig-sending .mig-pulse { margin-top: 0; }
.mig-upload-status:empty { display: none; }
.mig-del { flex: none; color: var(--ink-soft); }
.mig-del:hover { color: var(--bad); }

/* wejście karty i jeden błysk „gotowe" */
.is-in { animation: migIn .45s cubic-bezier(.2, .8, .2, 1) both; }
.is-in:nth-child(2) { animation-delay: .05s; } .is-in:nth-child(3) { animation-delay: .1s; } .is-in:nth-child(4) { animation-delay: .15s; }
.is-in:nth-child(5) { animation-delay: .2s; } .is-in:nth-child(n+6) { animation-delay: .25s; }
@keyframes migIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.is-fresh { animation: migIn .45s cubic-bezier(.2, .8, .2, 1) both, migFresh 1.6s ease-out .2s 2; }
@keyframes migFresh { 0% { box-shadow: 0 0 0 0 rgba(147, 93, 223, .55); } 100% { box-shadow: 0 0 0 14px rgba(147, 93, 223, 0); } }

/* przełącznik segmentowy */
.mig-seg { display: inline-flex; flex-wrap: wrap; padding: 3px; gap: 2px; border-radius: 999px; background: var(--line-soft); }
.mig-seg-btn { font: inherit; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-soft); cursor: pointer; }
.mig-seg-btn:hover { color: var(--ink); }
.mig-seg-btn[aria-pressed="true"] { background: var(--surface); color: var(--navy); box-shadow: 0 1px 3px rgba(25, 28, 98, .14); }
.mig-seg-btn:focus-visible { outline: 2px solid var(--violet); outline-offset: 1px; }

/* zasłona przy przeciąganiu pliku nad stronę */
.mig-veil {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px; pointer-events: none; opacity: 0;
  background: rgba(25, 28, 98, .72); backdrop-filter: blur(3px); transition: opacity .15s;
}
.mig-veil.is-on { opacity: 1; pointer-events: auto; }
.mig-veil-box {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 44px 64px; border-radius: 24px; color: #FFFFFF; text-align: center;
  border: 2px dashed rgba(255, 255, 255, .7); background: rgba(147, 93, 223, .18); transform: scale(.96); transition: transform .2s;
}
.mig-veil.is-on .mig-veil-box { transform: none; }
.mig-veil .mig-veil-box > svg { width: 44px; height: 44px; margin-bottom: 4px; animation: migBob 1s ease-in-out infinite alternate; }
.mig-veil-box b { font-size: 22px; }
@keyframes migBob { from { transform: translateY(-4px); } to { transform: translateY(4px); } }

/* ---------- duże pole na górze */
.mig-hero-wrap { margin-bottom: 26px; }
.mig-hero {
  position: relative; overflow: hidden; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 22px;
  padding: 34px 34px 36px; border-radius: 22px; color: #FFFFFF; cursor: pointer; outline: none;
  background-image:
    linear-gradient(90deg, var(--violet) 0 33.34%, var(--pink) 33.34% 66.67%, var(--pg-media) 66.67% 100%),
    radial-gradient(closest-side, rgba(253, 127, 178, .16), rgba(253, 127, 178, 0)),
    radial-gradient(closest-side, rgba(147, 93, 223, .28), rgba(147, 93, 223, 0)),
    linear-gradient(var(--navy), var(--navy));
  /* Poświata stała i spokojna (M.R., 25.10: „niech się nie rusza, statyczna i subtelna"). */
  background-size: 100% 4px, 55% 220%, 50% 220%, 100% 100%;
  background-repeat: no-repeat;
  background-position: 0 100%, 100% 20%, 25% 100%, 0 0;
  box-shadow: 0 14px 34px rgba(25, 28, 98, .22);
  transition: transform .2s, box-shadow .2s;
}
.mig-hero::after { content: ""; position: absolute; inset: 12px; border-radius: 14px; border: 2px dashed rgba(255, 255, 255, .22); pointer-events: none; transition: border-color .2s; }
.mig-hero:hover { transform: translateY(-2px); box-shadow: 0 20px 40px rgba(25, 28, 98, .3); }
.mig-hero:hover::after, .mig-hero:focus-visible::after { border-color: rgba(255, 255, 255, .6); }
.mig-hero-icon { position: relative; display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.mig-page .mig-hero-icon > svg { width: 32px; height: 32px; stroke-width: 2.2; }
.mig-hero-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mig-hero-title { font-size: 26px; line-height: 1.15; letter-spacing: -.01em; }
.mig-hero-sub { color: rgba(255, 255, 255, .8); font-size: 15px; max-width: 620px; }
.mig-hero-btn.btn { background: #FFFFFF; color: var(--navy); border-color: #FFFFFF; padding: 12px 22px; font-size: 15px; pointer-events: none; }
.mig-hero-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin-top: 14px; }
.mig-flowline { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 14px; color: var(--ink-soft); }
.mig-flowline li { display: inline-flex; align-items: center; gap: 8px; }
.mig-flowline li + li::before { content: ""; width: 12px; height: 2px; border-radius: 2px; background: var(--line); margin-right: 2px; }
.mig-flowline .mig-step-n { width: 22px; height: 22px; font-size: 12px; display: inline-grid; place-items: center; border-radius: 50%; background: var(--navy); color: #FFFFFF; font-weight: 800; }
.mig-page .mig-how-link { color: var(--violet); font-weight: 700; text-decoration: none; }
.mig-page .mig-how-link:hover { text-decoration: underline; }

/* ---------- karty raportów */
.mig-list-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 6px 0 12px; }
.mig-list-head h2 { margin: 0; font-size: 20px; }
.mig-list-head:empty { display: none; }
.mig-counts { display: flex; flex-wrap: wrap; gap: 6px; }
.mig-cards { list-style: none; margin: 0 0 22px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.mig-card { display: flex; flex-direction: column; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s; }
.mig-card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(25, 28, 98, .05), 0 14px 30px rgba(25, 28, 98, .12); }
.mig-card-thumb { display: block; padding: 14px 14px 0; border-radius: var(--radius) var(--radius) 0 0; background: linear-gradient(var(--bg), var(--surface)); text-decoration: none; }
.mig-card-thumb .mig-thumb { filter: drop-shadow(0 4px 10px rgba(25, 28, 98, .1)); }
.mig-card-body { display: flex; flex-direction: column; padding: 12px 16px 16px; flex: 1; }
.mig-card-top { display: flex; align-items: center; min-height: 30px; justify-content: space-between; gap: 8px; }
.mig-card .cell-sub { margin: 2px 0 0; }
.mig-card .mig-item-actions { margin-top: auto; padding-top: 14px; gap: 10px; }
.mig-card .mig-item-actions .btn { min-height: 34px; }
.mig-card .mig-item-actions .btn svg { margin-right: 0; vertical-align: 0; }
.mig-card--gotowe { box-shadow: inset 0 3px 0 var(--good), var(--shadow); }
.mig-card--do_recznego { box-shadow: inset 0 3px 0 var(--warn), var(--shadow); }
.mig-card--blad { box-shadow: inset 0 3px 0 var(--bad), var(--shadow); }
.mig-card--w_toku, .mig-card--w_kolejce { box-shadow: inset 0 3px 0 var(--violet), var(--shadow); }
.mig-platforms .chip svg, .mig-facts .chip svg { width: 14px; height: 14px; }
.mig-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 16px 32px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); margin-bottom: 22px; }
.mig-empty .mig-thumb { width: 200px; margin-bottom: 6px; }
.mig-empty[hidden] { display: none; }

/* założone — zwinięte pod listą do skończenia */
.mig-done[hidden] { display: none; }
.mig-done { margin-bottom: 22px; }
.mig-done summary {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 12px 16px; border-radius: var(--radius); cursor: pointer; list-style: none;
  background: var(--surface); box-shadow: var(--shadow); font-weight: 700;
}
.mig-done summary::-webkit-details-marker { display: none; }
.mig-done summary > svg { color: var(--good); }
.mig-done summary .muted { font-weight: 500; font-size: 14px; }
.mig-done summary::after { content: "Pokaż"; margin-left: auto; font-size: 13px; font-weight: 700; color: var(--violet); }
.mig-done[open] summary::after { content: "Schowaj"; }
.mig-done[open] summary { margin-bottom: 14px; }
.mig-cards--done .mig-card { opacity: .9; }
.mig-cards--done .mig-card-thumb { filter: saturate(.6); }

/* ---------- jak przygotować raport */
.mig-how { padding: 0; overflow: hidden; }
.mig-how > summary { display: flex; align-items: center; gap: 14px; padding: 18px 22px; cursor: pointer; list-style: none; }
.mig-how > summary::-webkit-details-marker { display: none; }
.mig-how > summary::after { content: "Rozwiń"; margin-left: auto; font-size: 13px; font-weight: 700; color: var(--violet); }
.mig-how[open] > summary::after { content: "Zwiń"; }
.mig-how-ic { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--violet); }
.mig-page .mig-how-ic > svg { width: 22px; height: 22px; }
.mig-how-head { display: flex; flex-direction: column; gap: 2px; }
.mig-how-head b { font-size: 17px; }
.mig-how-head .muted { font-size: 14px; }
.mig-how-body { padding: 4px 22px 22px; border-top: 1px solid var(--line-soft); }
.mig-how-src { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 16px 0 18px; }
.mig-how-label { font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-soft); }
.mig-how-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; counter-reset: none; }
.mig-how-step { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: var(--radius-sm); background: var(--bg); }
.mig-how-step:not(:last-child)::after {
  content: ""; position: absolute; top: 34px; right: -12px; width: 12px; height: 2px; background: var(--line);
}
.mig-how-n { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 4px; color: var(--violet); }
.mig-how-n b { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: #FFFFFF; font-size: 13px; }
.mig-page .mig-how-n > svg { width: 18px; height: 18px; }
.mig-how-title { font-size: 15px; }
.mig-how-step p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-soft); }
.mig-how-step:first-child { animation: migIn .3s ease both; }
.mig-how-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.mig-how-col { padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line-soft); }
.mig-how-col-title { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.mig-how-col--yes .mig-how-col-title { color: var(--good); }
.mig-how-col--no .mig-how-col-title { color: var(--ink-soft); }
.mig-how-col ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; }
.mig-how-col--yes { background: var(--good-soft); border-color: transparent; }
.mig-how-foot { margin: 12px 0 0; font-size: 13px; }

/* ---------- strona raportu: projekt + oryginał w okienku */
.mig-facts { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.mig-facts li { display: flex; align-items: baseline; gap: 6px; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow); color: var(--ink-soft); }
.mig-facts li > b { font-size: 24px; color: var(--navy); }
.mig-facts .mig-facts-wide { align-items: center; flex-wrap: wrap; }
.mig-facts-label { font-size: 13px; font-weight: 700; }
.mig-facts-chips { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.mig-a-preview { padding-bottom: 18px; }
.mig-a-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.mig-a-bar h2 { margin: 0; }
.mig-a-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
/* Propozycje ulepszeń (M.R., 27.10): wierna kopia + zmiany po jednej. Zastosowana = jak wybrana pozycja listy
   (tło --accent-soft, kreska fioletu z lewej, pogrubienie). Bez animacji — nic się tu nie dzieje samo. */
.mig-ideas-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 16px; }
.mig-ideas-head h2 { margin: 0; display: inline-flex; align-items: center; gap: 8px; }
.mig-ideas-head h2 svg { width: 18px; height: 18px; stroke: var(--violet); fill: none; stroke-width: 2; }
.mig-ideas-head p { margin: 4px 0 0; font-size: 14px; }
.mig-ideas-list { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.mig-idea { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 10px 12px 10px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-soft); }
.mig-idea.is-on { background: var(--accent-soft); border-color: transparent; box-shadow: inset 3px 0 0 var(--violet); }
.mig-idea-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; max-width: 80ch; }
.mig-idea-text b { color: var(--navy); font-weight: 700; }
.mig-idea.is-on .mig-idea-text b { font-weight: 800; }
.mig-idea-text .muted { font-size: 13px; line-height: 1.45; }
.mig-ideas-all, .mig-idea-actions { display: flex; flex-wrap: wrap; gap: 8px; flex: none; }
.mig-idea .btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; vertical-align: -3px; margin-right: 5px; }
/* Odrzucone — zwinięte na dole karty, przygaszone; „Przywróć" wraca je na listę. */
.mig-ideas-rejected { margin-top: 12px; }
.mig-ideas-rejected > summary { cursor: pointer; font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.mig-ideas-rejected .mig-ideas-list { margin-top: 8px; }
.mig-idea--off .mig-idea-text b { color: var(--ink-soft); font-weight: 600; }
@media (max-width: 560px) { .mig-idea { flex-direction: column; align-items: stretch; } }
.mig-a-reply summary { cursor: pointer; font-weight: 700; }
/* Zdanie = punkt, wiersz do ~80 znaków — na szerokim ekranie bez jednej linii przez całą stronę. */
.mig-reply-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-width: 80ch; color: var(--ink-soft); font-size: 14px; line-height: 1.55; }
.mig-reply-list li { position: relative; padding-left: 18px; }
.mig-reply-list li::before { content: ''; position: absolute; left: 2px; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--violet); }
.mig-reply-todo { max-width: 80ch; margin-top: 12px; background: var(--warn-soft); border-color: transparent; }
.mig-reply-todo ul { line-height: 1.5; }
.mig-wait { display: flex; align-items: center; gap: 20px; }
.mig-wait .mig-thumb { width: 180px; flex: none; }
.mig-cta {
  position: sticky; bottom: 14px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
  margin-top: 16px; padding: 12px 14px 12px 20px; border-radius: 999px; background: var(--navy); color: #FFFFFF; box-shadow: 0 12px 30px rgba(25, 28, 98, .3);
}
.mig-cta-text { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.mig-cta-text > svg { color: var(--pink); }
.mig-cta .btn { background: #FFFFFF; color: var(--navy); border-color: #FFFFFF; }
.mig-cta .btn:hover { background: var(--accent-soft); }
.mig-pip {
  position: fixed; right: 20px; bottom: 20px; z-index: 40; display: none; flex-direction: column; width: 380px; max-height: 60vh;
  border-radius: 16px; background: var(--surface); box-shadow: 0 18px 50px rgba(25, 28, 98, .32); overflow: hidden; border: 1px solid var(--line-soft);
}
.mig-pip.is-on { display: flex; animation: migPip .3s cubic-bezier(.2, .8, .2, 1); }
.mig-pip--big { width: min(720px, 46vw); max-height: 82vh; }
@keyframes migPip { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
.mig-pip-head { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.mig-pip-head .muted { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mig-pip-body { overflow: auto; padding: 10px; background: var(--bg); }
.mig-pip-body .mig-pdf { height: 52vh; }
.mig-pip--big .mig-pip-body .mig-pdf { height: 74vh; }
.mig-pdf { display: block; width: 100%; height: 70vh; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
@media (min-width: 981px) {
  body.mig-pip-small .mig-cta { margin-right: 400px; }
  body.mig-pip-big .mig-cta { margin-right: calc(min(720px, 46vw) + 20px); }
}

/* ---------- węższe ekrany */
@media (max-width: 1180px) {
  .mig-how-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mig-how-step::after { display: none; }
}
@media (max-width: 980px) {
  .mig-pip { left: 0; right: 0; bottom: 0; width: auto; max-height: 60vh; border-radius: 18px 18px 0 0; }
  .mig-pip--big { width: auto; max-height: 88vh; }
}
@media (max-width: 720px) {
  .mig-hero { grid-template-columns: 1fr; justify-items: start; gap: 14px; padding: 24px 22px 26px; }
  .mig-hero-icon { width: 56px; height: 56px; }
  .mig-hero-title { font-size: 22px; }
  .mig-how-steps, .mig-how-cols { grid-template-columns: 1fr; }
  .mig-how > summary { padding: 16px; }
  .mig-how-body { padding: 4px 16px 18px; }
  .mig-cta { border-radius: var(--radius); }
  .mig-wait { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .mig-thumb--scan .th-scan, .mig-thumb--scan .th-skel, .mig-pulse, .mig-veil .mig-veil-box > svg,
  .is-in, .is-fresh, .mig-pip.is-on, .mig-how-step:first-child { animation: none; }
  .mig-card, .mig-hero { transition: none; }
}

/* Platformy na karcie: wygląd z Biblioteki (lb-plat), tu tylko podpis i odstępy. */
.mig-card .mig-platforms { gap: 8px; margin-top: 8px; }
.mig-pf-label { font-size: 13px; color: var(--ink-soft); }

/* Karta: plakietka stanu na miniaturze, liczby projektu, jedno zdanie „co dalej" (M.R., 25.10). */
.mig-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px;
  font-size: 12px; font-weight: 800; letter-spacing: .01em; background: var(--surface); 
}
.mig-page .mig-badge > svg { width: 14px; height: 14px; stroke-width: 2.4; }
.mig-badge .mig-pulse { margin-top: 0; width: 8px; height: 8px; }
.mig-badge--good { color: var(--good); background: var(--good-soft); }
.mig-badge--warn { color: var(--warn); background: var(--warn-soft); }
.mig-badge--bad { color: var(--bad); background: var(--bad-soft); }
.mig-badge--busy { color: var(--violet); background: var(--accent-soft); }
.mig-badge--off { color: var(--ink-soft); background: var(--line-soft); }
.mig-stats { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.mig-stats li { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px 4px 8px; border-radius: 8px; background: var(--bg); font-size: 13px; color: var(--ink-soft); }
.mig-page .mig-stats li > svg { width: 14px; height: 14px; color: var(--violet); }
.mig-stats b { color: var(--navy); font-size: 14px; }
.mig-next { margin: 10px 0 0; font-size: 13px; line-height: 1.45; color: var(--ink-soft); }
.mig-next b { color: var(--ink); font-weight: 700; }
.mig-next--warn { color: var(--warn); }
.mig-next--bad { color: var(--bad); }
.mig-flowline .mig-flow-last b { color: var(--navy); margin-left: 3px; }


/* Do dokończenia — na górze Dashboardów (M.R., 25.10): niezapisane szkice, projekty z raportów, zmiany do opublikowania. */
.wip { margin: 0 0 18px; padding: 14px 18px 16px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.wip[hidden] { display: none; }
.wip-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wip-head h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 17px; }
.wip-count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: var(--navy); color: #FFFFFF; font-size: 12px; font-weight: 800; }
.wip-toggle { flex: none; color: var(--violet); font-weight: 700; text-decoration: none; }
.wip-toggle:hover { text-decoration: underline; }
.wip-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; }
.wip-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.wip-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--violet); }
.wip-ic svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wip-row--szkic .wip-ic { background: rgba(253, 127, 178, .18); color: var(--navy); }
.wip-row--publikacja .wip-ic { background: var(--line-soft); color: var(--navy); }
.wip-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.wip-name { font-weight: 800; color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wip-name:hover { text-decoration: underline; }
.wip-what { font-size: 13px; color: var(--ink-soft); }
.wip-date { font-size: 12px; color: var(--ink-soft); white-space: nowrap; }
.wip-acts { display: inline-flex; align-items: center; gap: 6px; }
.wip-del { color: var(--ink-soft); }
.wip-del:hover { color: var(--bad); }
.wip-more { margin-top: 8px; color: var(--violet); font-weight: 700; text-decoration: none; }
@media (max-width: 720px) {
  .wip-row { grid-template-columns: 34px minmax(0, 1fr); gap: 6px 12px; }
  .wip-date { grid-column: 2; }
  .wip-acts { grid-column: 2; }
  .wip-name { white-space: normal; }
}

.mig-card .mig-item-name { display: block; margin-top: 8px; font-size: 16px; line-height: 1.3; }

/* Dymki przycisków w okienku z oryginałem — pod przyciskiem, do prawej (nad nim ucina je brzeg okienka). */
.mig-pip-head .dc-ib[data-tip]:hover::after { top: calc(100% + 8px); bottom: auto; left: auto; right: 0; transform: none; }
.mig-del svg { width: 16px; height: 16px; }
/* Kosz na końcu wiersza / karty — dymek wyrównany do prawej, nie wystaje poza kartę. */
.wip-del[data-tip]:hover::after, .mig-del[data-tip]:hover::after { left: auto; right: 0; transform: none; }
.mig-more { display: block; margin: -8px 0 22px; color: var(--violet); font-weight: 700; text-decoration: none; }
.mig-more:hover { text-decoration: underline; }
.mig-more[hidden] { display: none; }

/*
 * Lista kreatora — „Zakładki i elementy" (M.R., 25.10: „źle odległości i wielkości"). Ustawienia elementu w kolumnach
 * od 300 px (przy 180 px lista „Konto" / „Zmiana" i przyciski „Wykres" się ucinały), przełączniki opcji tak szerokie
 * jak ich przyciski, „⋯" i zwijanie sekcji jako ikony na środku przycisku, kolejność kafli jako zwarta lista z numerami.
 */
.b-form .b-fields { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 14px 20px; }
.b-inspector .b-form .b-fields { grid-template-columns: minmax(0, 1fr); }
.b-form .b-metrics { grid-column: 1 / -1; }
.b-form .seg--field { width: fit-content; max-width: 100%; }
.b-form .field > select { width: 100%; }
.b-form .b-fields > .hint { margin: 0; font-size: 13px; color: var(--ink-soft); }
.b-form .check { max-width: 100%; }
.b-campaigns > summary { justify-content: flex-start; }
.b-campaigns > summary .hint { margin-left: 2px; text-align: left; }
.b-el-menu > summary { display: inline-grid; place-items: center; font-size: 0; }
.b-el-menu > summary svg, .b-collapse svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.b-collapse svg { width: 16px; height: 16px; stroke-width: 2; transition: rotate .15s ease; }
.b-collapse[aria-expanded="true"] svg { rotate: 90deg; }
@media (prefers-reduced-motion: reduce) { .b-collapse svg { transition: none; } }
.b-element-head .size-chip { height: 30px; }
.b-order { margin-top: 12px; }
.b-funnel-order { max-width: 440px; padding: 0; counter-reset: b-order; font-size: 14px; }
.b-funnel-order li {
  counter-increment: b-order; gap: 8px; padding: 4px 4px 4px 10px; border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm); background: var(--surface);
}
.b-funnel-order li::before { content: counter(b-order) "."; min-width: 18px; color: var(--ink-soft); font-size: 13px; font-weight: 700; }
.b-funnel-order .icon { width: 28px; height: 28px; }
/* Pasek „Liczby są przykładowe" (M.R., 25.10: „lekko ładniej") — trójkąt obrysem jak inne ikony, krzyżyk jako ikona. */
.engine-note {
  gap: 10px; padding: 9px 8px 9px 14px; border: 1px solid var(--warn-soft); border-radius: var(--radius-sm);
  box-shadow: inset 3px 0 0 var(--warn); font-size: 13.5px; line-height: 1.4;
}
.engine-note b { font-weight: 800; }
.engine-note > svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.engine-note-x { display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0; border-radius: 8px; }
.engine-note-x svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; }

/* ======================================================================== menu boczne, wariant A (M.R., 25.10)
 * Praca → Twoje dashboardy → Tworzenie (`renderSide` w panel.js). Stan dashboardu kształtem, nie tylko bladym kolorem:
 * pełna = Aktywny, pusty krążek = W przygotowaniu, pomarańcz = błąd, kreska = Wyłączony. Tylko w menu — `.dot` na
 * jasnych stronach zostaje, jak był.
 */
.side .dot { width: 9px; height: 9px; background: transparent; box-shadow: inset 0 0 0 2px var(--warn-soft); }
.side .dot--good { background: var(--good-soft); box-shadow: none; }
.side .dot--bad { background: var(--pg-media); box-shadow: none; }
.side .dot--off { height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .5); box-shadow: none; }
.side .side-link[aria-current="page"] .dot { background: transparent; box-shadow: inset 0 0 0 2px var(--warn); }
.side .side-link[aria-current="page"] .dot--good { background: var(--good); box-shadow: none; }
.side .side-link[aria-current="page"] .dot--bad { background: var(--pg-media); box-shadow: none; }
.side .side-link[aria-current="page"] .dot--off { background: var(--ink-soft); box-shadow: none; }
/* Nagłówki grup czytelniejsze: jaśniejsze, mniej rozstrzelone. */
.side .side-label { color: rgba(255, 255, 255, .62); letter-spacing: .06em; }

/* Ikony zamiast znaków ⋯ ▾ × ✕ (25.10, reguła w CLAUDE.md, test „ikony:"): krzyżyki, „więcej" i strzałki list
   z `icons.js`, na środku przycisku, w kolorze tekstu. Strzałka listy = `szewron` obrócony w dół. */
.chip-x, .combo-clear, .dv-subtab-x { display: inline-grid; place-items: center; }
.chip-x svg, .combo-clear svg, .dv-subtab-x svg, .src-more-row .icon svg, .src-head .icon svg, .rv-check-ic svg {
  width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2.6; stroke-linecap: round;
}
.dv-subtab-x svg { width: 13px; height: 13px; }
.src-more-row .icon svg, .src-head .icon svg { width: 15px; height: 15px; stroke-width: 2.2; }
.dv-more svg, .acc-more > summary svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.8; stroke-linecap: round; }
.dv-caret, .page-more-caret { display: inline-grid; place-items: center; }
/* Rozmiar od kroju napisu: przy dużej dacie w pasku większa strzałka, przy fladze i „Więcej" — 12 px. */
.dv-caret svg, .page-more-caret svg { width: max(12px, 1em); height: max(12px, 1em); rotate: 90deg; stroke: currentColor; fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.dv-range .dv-caret { display: inline-grid; vertical-align: middle; }
/* Przycisk „⋯" na środku kwadratu (M.R., 25.10: kropki były przy lewej krawędzi). Ogólna reguła rozwijanych bloków
   (`details:not(.as-card) > summary` — flex do lewej) była silniejsza niż `.icon`; każdy `summary.icon` = ikona na środku. */
details:not(.as-card) > summary.icon { display: inline-grid; place-items: center; gap: 0; padding: 0; font-size: 0; }
details:not(.as-card) > summary.icon::before { display: none; }
.acc-more > summary { display: inline-flex; justify-content: center; }

/*
 * Wybrana pozycja listy — wszędzie jak w liście rozwijanej (M.R., 25.10: „jak coś jest wybrane z listy, to formatowanie
 * wszędzie tak"): fioletowe tło, pogrubienie, kreska fioletu z lewej; bez ptaszka. Nowa lista z wyborem (`role: 'option'`
 * albo `'menuitemradio'`) dostaje ten sam zapis — pilnuje test „wybór:" w test/front.test.js.
 */
.lang-pick .page-more-item[aria-checked="true"], .ib-menu-item[aria-checked="true"], .dv-radio:has(input:checked),
.dv-lang-list button[aria-current="true"] {
  background: var(--accent-soft); font-weight: 700; box-shadow: inset 3px 0 0 var(--violet);
}
.lang-pick .page-more-item[aria-checked="true"]::after { content: none; }

/* Karta asystenta jest rozwijana, ale nie miała znaku (M.R., 25.10: „chyba nie ma ikonki, że się to rozwija") — ogólny
   znak bloków `details` ją pomija (`:not(.as-card)`), więc własna strzałka po prawej: w dół zwinięta, w górę rozwinięta. */
.as-card > summary { justify-content: flex-start; }
.as-card > summary > .tag { margin-left: auto; }
.as-card > summary::after {
  content: ''; flex: none; width: 8px; height: 8px; margin: -4px 8px 0 6px;
  border-right: 2px solid var(--ink-soft); border-bottom: 2px solid var(--ink-soft);
  transform: rotate(45deg); transition: transform .15s ease;
}
.as-card[open] > summary::after { margin-top: 4px; transform: rotate(225deg); }
.as-card > summary:hover::after { border-color: var(--navy); }
@media (prefers-reduced-motion: reduce) { .as-card > summary::after { transition: none; } }

/* ------------------------------------------------------------------ Tempo wydatków (M.R., 25.10, `pacing_page.js`) */

.pc-team { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.pc-team svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }
.pc-month { display: inline-flex; align-items: center; gap: 6px; }
.pc-month-label { min-width: 132px; text-align: center; font-size: 15px; }
.pc-month .icon svg { width: 18px; height: 18px; }

/* Lista tablic */
/* Lista tablic (M.R., 27.10): pasek filtrów jak na Dashboardach, sekcje „Moje" / „Udostępnione mi" / „Pozostałe". */
.pc-tools { padding: 0; margin: 0 0 18px; }
.pc-tools .dc-tools { border-bottom: 0; }
.pc-sections { display: flex; flex-direction: column; gap: 26px; }
.pc-section-title { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 15px; font-weight: 800; }
.pc-section-n { min-width: 22px; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--navy); font-size: 12px; font-weight: 800; text-align: center; }
@media (max-width: 720px) { .pc-tools .dc-search { flex-basis: 100%; max-width: none; } }
.pc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 14px; }
.pc-card { display: flex; flex-direction: column; gap: 6px; margin: 0; text-decoration: none; color: inherit; transition: border-color .15s ease, box-shadow .15s ease; }
.pc-card:hover { border-color: var(--accent-hover); box-shadow: 0 1px 2px rgba(25, 28, 98, .06), 0 10px 26px rgba(25, 28, 98, .1); }
.pc-card:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.pc-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.pc-card-name { font-size: 16px; line-height: 1.3; }
.pc-card p { margin: 0; }
.pc-card-num b { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.pc-card-num span { color: var(--ink-soft); font-size: 14px; }
.pc-card-sub { font-size: 13px; }
.pc-card-media { list-style: none; margin: 6px 0 0; padding: 8px 0 0; border-top: 1px solid var(--line-soft); display: grid; gap: 6px; }
.pc-card-media li { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 8px; font-size: 14px; }
.pc-card-media .pi { width: 16px; height: 16px; }
.pc-card-adv { font-size: 13px; font-weight: 700; color: var(--navy); background: var(--accent-soft); border-radius: var(--radius-sm); padding: 8px 10px; }
.pc-status { white-space: nowrap; }

/* Karta główna: zakres, status i wykres narastający */
.pc-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 16px; }
.pc-scope { flex-wrap: wrap; border-radius: var(--radius-sm); }
.pc-scope button { display: inline-flex; align-items: center; gap: 6px; border-radius: 8px; }
.pc-scope .pi { width: 15px; height: 15px; }
.pc-curve { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; }
.pc-hero-grid { display: grid; grid-template-columns: minmax(250px, 320px) minmax(0, 1fr); gap: 24px; align-items: start; }
.pc-hero-status { display: flex; flex-direction: column; gap: 10px; }
.pc-hero-status p { margin: 0; }
.pc-hero-name { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--ink-soft); font-size: 14px; }
.pc-hero-name .pi { width: 16px; height: 16px; }
.pc-verdict { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 6px 14px 6px 10px; border-radius: 999px; font-size: 18px; }
.pc-verdict-dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.pc-verdict--good { background: var(--good-soft); color: var(--good); }
.pc-verdict--warn { background: var(--warn-soft); color: var(--warn); }
.pc-verdict--bad { background: var(--bad-soft); color: var(--bad); }
.pc-verdict--off { background: var(--line-soft); color: var(--ink-soft); }
.pc-big { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.pc-big small { font-size: 15px; font-weight: 600; color: var(--ink-soft); letter-spacing: 0; }
.pc-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; margin: 0; font-size: 14px; }
.pc-facts dt { color: var(--ink-soft); }
.pc-facts dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.pc-action { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--violet); }
.pc-action-h { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.pc-action b { font-size: 15px; line-height: 1.35; }
.pc-action small { font-size: 12.5px; color: var(--ink-soft); line-height: 1.4; }
.pc-action--down, .pc-action--stop { background: var(--bad-soft); box-shadow: inset 3px 0 0 var(--bad); }
.pc-action--up { background: var(--warn-soft); box-shadow: inset 3px 0 0 var(--warn); }
.pc-action--ok { background: var(--good-soft); box-shadow: inset 3px 0 0 var(--good); }
.pc-hero-chart h2, .pc-hero-chart .pc-legend { margin-bottom: 6px; }
.pc-stats { margin-top: 16px; }

/* Wykresy (jedna oś, cienkie linie, legenda; dymek z kreską dnia) */
.pc-legend { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--ink-soft); }
.pc-legend li { display: inline-flex; align-items: center; gap: 6px; }
.pc-key { display: inline-block; width: 16px; height: 0; border-top: 2px solid; }
.pc-key--spent { border-color: var(--navy); border-top-width: 3px; }
.pc-key--plan { border-color: var(--violet); }
.pc-key--forecast { border-color: var(--navy); border-top-style: dashed; }
.pc-key--rec { border-color: var(--pink); border-top-style: dashed; border-top-width: 3px; }
.pc-key--band { height: 10px; border: 0; border-radius: 3px; background: color-mix(in srgb, var(--violet) 16%, transparent); }
.pc-key--bar { width: 10px; height: 12px; border: 0; border-radius: 2px; background: color-mix(in srgb, var(--navy) 72%, var(--surface)); }
.pc-chart { position: relative; min-width: 0; }
.pc-chart-wrap { position: relative; }
.pc-svg { display: block; max-width: 100%; height: auto; touch-action: pan-y; }
.pc-svg:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; border-radius: 6px; }
.pc-grid { stroke: var(--line-soft); stroke-width: 1; }
.pc-tick { fill: var(--ink-soft); font: 600 11px var(--font); }
.pc-band { fill: color-mix(in srgb, var(--violet) 14%, transparent); }
.pc-budget { stroke: var(--ink-soft); stroke-width: 1; stroke-dasharray: 2 4; }
.pc-budget-label { fill: var(--ink-soft); font: 700 11px var(--font); }
.pc-today { stroke: var(--line); stroke-width: 1; }
.pc-today-label { fill: var(--ink-soft); font: 700 11px var(--font); }
.pc-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.pc-line--plan { stroke: var(--violet); }
.pc-line--thin { stroke-width: 1.5; }
.pc-line--spent { stroke: var(--navy); stroke-width: 3; }
.pc-line--forecast { stroke: var(--navy); stroke-dasharray: 5 5; }
.pc-line--rec { stroke: var(--pink); stroke-width: 2.5; stroke-dasharray: 6 4; }
.pc-dot { fill: var(--navy); stroke: var(--surface); stroke-width: 2; }
.pc-bar { fill: color-mix(in srgb, var(--navy) 72%, var(--surface)); }
.pc-cross { stroke: var(--ink-soft); stroke-width: 1; stroke-dasharray: 3 3; pointer-events: none; }
.pc-tip { position: absolute; z-index: 5; display: grid; gap: 3px; min-width: 150px; padding: 8px 11px; border-radius: var(--radius-sm); background: var(--navy); color: #FFFFFF; font-size: 13px; pointer-events: none; box-shadow: var(--shadow); }
.pc-tip-row { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.pc-tip .pc-key--spent, .pc-tip .pc-key--forecast { border-color: #FFFFFF; }
.pc-tip-row b { margin-left: auto; padding-left: 10px; }

/* Tabela mediów i kampanii (bez pasków przy liczbach — proporcję mówi liczba) */
.pc-table-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; margin-bottom: 10px; }
.pc-table-head h2, .pc-table-head p { margin: 0; }
.pc-table { min-width: 860px; }
.pc-table td { vertical-align: top; }
.pc-table th .label-row { font: inherit; }
.pc-row { cursor: pointer; }
.pc-row:hover > td { background: var(--row-hover); }
.pc-row:focus-visible { outline: 2px solid var(--violet); outline-offset: -2px; }
.pc-row.is-picked > td { background: var(--accent-soft); }
.pc-row.is-picked > td:first-child { box-shadow: inset 3px 0 0 var(--violet); }
.pc-row--calosc .pc-name, .pc-row--medium .pc-name { font-weight: 800; }
.pc-row--calosc > td { border-bottom: 2px solid var(--line); }
.pc-row--kampania .pc-name { padding-left: 34px; }
.pc-name { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.pc-name .pi { width: 16px; height: 16px; flex: none; }
.pc-name .cell-sub { flex-basis: 100%; }
.pc-dev--over { color: var(--bad); }
.pc-dev--under { color: var(--warn); }
.pc-dev--ok { color: var(--good); }
.pc-adv { max-width: 260px; margin-top: 4px; font-weight: 600; }
.pc-adv--down, .pc-adv--stop { color: var(--bad); }
.pc-adv--up { color: var(--warn); }

/* Budżety miesięcy */
.pc-budget-table { min-width: 760px; }
.pc-budget-table td { vertical-align: middle; }
.pc-budget-table .pc-money { width: 100%; min-width: 96px; text-align: right; font-variant-numeric: tabular-nums; }
.pc-budget-table select { min-width: 210px; }
.pc-budget-table tfoot th { padding-top: 12px; border-top: 2px solid var(--line); font-weight: 800; }
.pc-budget-table .cell-name { white-space: nowrap; }
.pc-budget-table .cell-name .tag { margin-left: 8px; }
.pc-budget-table .cell-actions { display: flex; gap: 4px; justify-content: flex-end; }
.pc-current > td { background: color-mix(in srgb, var(--accent-soft) 55%, var(--surface)); }
.pc-current > td:first-child { box-shadow: inset 3px 0 0 var(--violet); }
.pc-th-platform { display: inline-flex; align-items: center; gap: 6px; }
.pc-th-platform .pi { width: 15px; height: 15px; }
.pc-check { margin-left: 6px; cursor: help; }
.pc-details { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(240px, 1fr); gap: 24px; padding: 8px 4px; }
.pc-details h3 { margin: 0 0 6px; font-size: 14px; }
.pc-details .hint { margin: 0 0 8px; }
.pc-details textarea { width: 100%; }
.pc-camp input[type="date"] { min-width: 140px; }
.pc-camp .pc-money { width: 120px; }
.pc-copy { margin-top: 12px; flex-wrap: wrap; }

/* Ustawienia i nowa tablica */
.pc-settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px 18px; margin: 12px 0 14px; }
.pc-platforms { display: flex; flex-wrap: wrap; gap: 8px; }
.pc-platforms .pi { width: 15px; height: 15px; }
.pc-curves { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 10px; margin: 12px 0 4px; }
.pc-curve-opt { display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: inherit; font: inherit; cursor: pointer; }
.pc-curve-opt:hover:not([disabled]) { border-color: var(--navy); background: var(--row-hover); }
.pc-curve-opt:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.pc-curve-opt[aria-checked="true"] { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--violet); border-color: var(--accent-hover); }
.pc-curve-opt[aria-checked="true"] b { font-weight: 800; }
.pc-curve-opt b { display: block; font-size: 14px; font-weight: 700; }
.pc-curve-opt small { display: block; font-size: 12.5px; line-height: 1.4; color: var(--ink-soft); }
.pc-curve-mini { flex: none; width: 60px; height: 24px; }
.pc-curve-mini rect { fill: var(--violet); }
.pc-tol { max-width: 120px; }
.pc-remove { margin-left: auto; color: var(--bad); }
.pc-remove:hover { background: var(--bad-soft); }

/* Nowy dashboard: inny rodzaj — tempo wydatków */
.start-choices-h--other { margin-top: 14px; font-size: 13px; color: var(--ink-soft); }
.start-choice--other { text-decoration: none; color: inherit; max-width: 520px; }

@media (max-width: 900px) {
  .pc-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .pc-details { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px), (pointer: coarse) {
  .pc-month .icon { width: 40px; height: 40px; }
  .pc-scope button { min-height: 40px; }
  .pc-month-label { min-width: 0; flex: 1; }
  .pc-big { font-size: 26px; }
}
@media (max-width: 520px) {
  .page-head-side:has(.pc-month) { width: 100%; }
  .pc-month { width: 100%; }
}

/* Tempo wydatków — poprawki po przeglądzie UX (25.10) */
.pc-tip[hidden] { display: none; }
.page-head .pc-team { display: flex; width: fit-content; margin-top: 8px; padding: 3px 10px 3px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-soft); }
.pc-table .num, .pc-table th.num, .pc-budget-table .num, .pc-budget-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.pc-table td.num > span:first-child { white-space: nowrap; }
.pc-table td.num .cell-sub { white-space: nowrap; }
.pc-table th .label-row { justify-content: flex-end; }
.pc-table th:first-child .label-row, .pc-table th:last-child .label-row { justify-content: flex-start; }
.pc-facts dd { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.3; }
.pc-facts dd small { font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.pc-facts dt { padding-top: 1px; }
.pc-facts { row-gap: 8px; }
.pc-table td.num { white-space: nowrap; }
.pc-name-cell { min-width: 210px; }
.pc-row--kampania .pc-name-cell .pc-name { padding-left: 26px; }
.pc-row--kampania .pc-name { padding-left: 0; }
.pc-row.is-picked > td.pc-name-cell { box-shadow: inset 3px 0 0 var(--violet); }
.pc-budget-table { min-width: 720px; }
.pc-budget-table select { min-width: 0; width: 100%; max-width: 180px; }
.pc-budget-table .pc-money { min-width: 0; max-width: 120px; }
.pc-budget-table td.num { white-space: nowrap; }
.pc-budget-table td { padding-left: 6px; padding-right: 6px; }
.pc-detail-row > td { white-space: normal; }
.pc-details { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.pc-copy .btn { flex: 1 1 auto; justify-content: center; }
/* Tempo wydatków — Dostępy tablicy */
.pc-access-list { display: grid; gap: 0; margin: 12px 0 4px; border-top: 1px solid var(--line-soft); }
.pc-person { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.pc-avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--navy); font-weight: 800; }
.pc-person-who { display: flex; flex-direction: column; min-width: 0; }
.pc-person-who b { overflow-wrap: anywhere; font-size: 14px; }
.pc-person-who small { color: var(--ink-soft); font-size: 12.5px; }
.pc-person-right { display: inline-flex; align-items: center; gap: 8px; }
.pc-level button[disabled]:not([aria-pressed="true"]) { opacity: .45; cursor: default; }
.pc-access-add { margin-top: 16px; padding: 14px; border-radius: var(--radius-sm); background: var(--row-hover); }
.pc-add { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; }
.pc-add-who { flex: 1 1 280px; }
.pc-add-who select { width: 100%; }
.pc-add .btn { min-height: 40px; }
.pc-access-legend { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 4px; font-size: 13px; color: var(--ink-soft); }
@media (max-width: 520px) { .pc-person { grid-template-columns: 36px minmax(0, 1fr); } .pc-person-right { grid-column: 2; } }
/* Budżety miesięcy — zwarty wiersz (4+ media na jednym ekranie) */
.pc-budget-table { min-width: 0; }
.pc-budget-table .pc-money { width: 104px; max-width: none; }
.pc-budget-table select { width: 150px; max-width: none; }
.pc-month-cell { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.pc-month-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 4px; border: 0; background: transparent; color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; border-radius: 8px; }
.pc-month-btn:hover { color: var(--violet); }
.pc-month-btn:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.pc-month-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; transition: transform .15s ease; }
.pc-month-btn[aria-expanded="true"] svg { transform: rotate(90deg); }
.pc-month-go { margin-left: auto; }
.pc-spent-cell { min-width: 150px; }
.pc-spent-cell > * { display: block; width: fit-content; }
.pc-spent-cell .tag { margin-top: 4px; }
.pc-spent { white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .pc-month-btn svg { transition: none; } }
/* Tempo wydatków na telefonie: tabela mediów jako karty, pasek miesiąca na całą szerokość */
@media (max-width: 720px) {
  .page-head-side:has(.pc-month) { width: 100%; }
  .page-head-side:has(.pc-month) > .btn { flex: 1 1 auto; justify-content: center; }
  .pc-month { flex: 1 1 100%; flex-wrap: wrap; justify-content: space-between; }
  .pc-table { min-width: 0; }
  .pc-table thead { display: none; }
  .pc-table, .pc-table tbody, .pc-table tr, .pc-table td { display: block; }
  .pc-table tr { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); }
  .pc-table td { padding: 2px 0; border: 0; white-space: normal; }
  .pc-table td.num { text-align: left; }
  .pc-table td[data-label] { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 8px; align-items: baseline; font-size: 14px; }
  .pc-table td[data-label]::before { content: attr(data-label); font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-soft); }
  .pc-table td[data-label] > * { grid-column: 2; justify-self: start; }
  .pc-table td[data-label]:has(> .muted:only-child) { display: none; }
  .pc-table td.pc-name-cell { min-width: 0; padding-bottom: 6px; }
  .pc-row--kampania .pc-name-cell .pc-name { padding-left: 0; }
  .pc-row--kampania { padding-left: 26px; }
  .pc-row--calosc > td { border-bottom: 0; }
  .pc-row.is-picked { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--violet); }
  .pc-row.is-picked > td, .pc-row:hover > td { background: transparent; }
  .pc-row.is-picked > td.pc-name-cell { box-shadow: none; }
  .pc-adv { max-width: none; }
}

/* ------------------------------------------------------------------ Tempo wydatków: układ 4 zakładek (M.R., 25.10) */

.pc-head h1 { margin-bottom: 0; }
.pc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.pc-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-soft); font-size: 12.5px; font-weight: 700; color: var(--ink-soft); }
.pc-chip svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; }
.pc-chip--warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 25%, transparent); color: var(--warn); }
.page-head .pc-chips .pc-team { margin: 0; }

.pc-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin: 0 0 16px; }
.pc-subtabs { display: inline-flex; flex-wrap: wrap; border-radius: 12px; }
.pc-subtabs a { display: inline-flex; align-items: center; min-height: 34px; padding: 6px 14px; border-radius: 9px; font-size: 14px; font-weight: 700; color: var(--ink-soft); text-decoration: none; }
.pc-subtabs a:hover { color: var(--ink); background: var(--row-hover); }
.pc-subtabs a.is-on { background: var(--navy); color: #FFFFFF; }
.pc-subtabs a:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.pc-ai-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.pc-nav-gap { display: inline-block; width: 40px; }

/* Lista */
.pc-card-adv { display: flex; align-items: center; gap: 6px; }
.pc-card-adv svg, .pc-card-ok svg { width: 15px; height: 15px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; }
.pc-card-adv { background: var(--warn-soft); color: var(--warn); }
.pc-card-ok { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--good); }
.pc-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto !important; padding-top: 8px; border-top: 1px solid var(--line-soft); }
.pc-card-sources { display: inline-flex; gap: 6px; }
.pc-card-sources .pi { width: 16px; height: 16px; }
.pc-empty { text-align: center; padding: 32px 20px; }
.pc-empty h2 { margin-bottom: 6px; }
.card.pc-empty .muted { max-width: 560px; margin: 0 auto 16px; }
.pc-empty--start { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 44px 20px; }
.pc-empty--start h2 { margin: 0; }
.card.pc-empty--start .muted { margin: -8px auto 0; }
.pc-empty-ic { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--accent-soft); color: var(--violet); }
.pc-empty-ic svg { width: 28px; height: 28px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pc-empty-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

/* Tempo */
.pc-scope-row { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; margin-bottom: 14px; }
.pc-scope-row .pc-curve { margin-left: auto; }
.pc-crumb { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.pc-crumb svg { width: 14px; height: 14px; stroke: var(--ink-soft); fill: none; stroke-width: 2; }
.pc-el-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; margin-bottom: 8px; }
.pc-el-head h2 { margin: 0; }
.pc-el-tools { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pc-el-hint { font-size: 13px; }
.pc-hide { color: var(--ink-soft); }
.pc-hide svg { width: 15px; height: 15px; }
.pc-hero-status .pc-el-head { position: absolute; top: 0; right: 0; margin: 0; }
.pc-hero-status { position: relative; }
.pc-hero--one .pc-hero-grid { grid-template-columns: minmax(0, 1fr); }
.pc-hero--one .pc-hero-status { max-width: 560px; }
.pc-hidden-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--surface); border: 1px dashed var(--line); font-size: 13px; color: var(--ink-soft); }
.pc-hidden-bar svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }
.pc-drill { display: inline-flex; align-items: center; gap: 2px; margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.pc-drill svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
.pc-row--medium .pc-name { width: 100%; }
.pc-strip-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.pc-strip-list li { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-soft); font-size: 14px; }
.pc-strip-list .num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Wydatki */
.pc-periodbar { display: flex; align-items: flex-end; gap: 10px 16px; flex-wrap: wrap; margin: 0 0 12px; }
.pc-periods { display: flex; flex-wrap: wrap; gap: 6px; }
.pc-fchip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.pc-fchip:hover { border-color: var(--navy); background: var(--row-hover); }
.pc-fchip:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.pc-fchip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--violet); box-shadow: inset 0 0 0 1px var(--violet); font-weight: 800; }
.pc-fchip .pi { width: 15px; height: 15px; }
.pc-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin: 0 0 14px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line-soft); }
.pc-fgroup { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pc-flabel { font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-soft); margin-right: 2px; }
.pc-fgroup--search { margin-left: auto; }
.pc-search { min-width: 220px; }
.pc-dates { display: flex; flex-wrap: wrap; gap: 10px; }
.pc-dates .field { min-width: 150px; }
.pc-dates--inline .field { gap: 2px; }
.pc-sub { margin: 2px 0 0; font-size: 13px; }
.pc-spend-table th, .pc-spend-table td { white-space: nowrap; }
.pc-spend-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.pc-spend-table thead a { color: inherit; text-decoration: none; }
.pc-spend-table thead a:hover { color: var(--violet); }
.pc-spend-scroll .pc-spend-table th:first-child, .pc-spend-scroll .pc-spend-table td:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: 1px 0 0 var(--line-soft); }
.pc-spend-table tfoot th { border-top: 2px solid var(--line); font-weight: 800; padding-top: 10px; }
.pc-spend-table--range { width: 100%; }
.pc-srow--kanal > td { font-weight: 800; background: var(--row-hover); }
.pc-srow--kanal > td:first-child { background: var(--row-hover); }
.pc-srow--konto .pc-sname { padding-left: 26px; font-weight: 700; }
.pc-srow--kampania .pc-sname { padding-left: 44px; }
.pc-srow--konto + .pc-srow--kampania .pc-sname, .pc-srow--konto ~ .pc-srow--kampania .pc-sname { padding-left: 52px; }
.pc-stotal { font-weight: 800; }
.pc-tree-btn { display: inline-flex; align-items: center; gap: 8px; padding: 2px 4px; border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; border-radius: 6px; }
.pc-tree-btn:hover { color: var(--violet); }
.pc-tree-btn:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.pc-tree-btn > svg:first-child { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; transition: transform .15s ease; }
.pc-tree-btn[aria-expanded="true"] > svg:first-child { transform: rotate(90deg); }
.pc-tree-btn .pi, .pc-tree-leaf .pi { width: 16px; height: 16px; }
.pc-tree-btn small { padding: 1px 7px; border-radius: 999px; background: var(--line-soft); font-size: 11.5px; font-weight: 700; color: var(--ink-soft); }
.pc-tree-leaf { display: inline-flex; align-items: center; gap: 8px; }
.pc-tree-leaf small { font-size: 12px; color: var(--ink-soft); }
.pc-none { padding: 18px 4px; }
@media (prefers-reduced-motion: reduce) { .pc-tree-btn > svg:first-child { transition: none; } }

/* Plan: okresy kampanii */
.pc-camp-group th { padding-top: 12px; background: transparent !important; border-radius: 0 !important; font-size: 12.5px; color: var(--ink-soft); }
.pc-flights { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 14px; }
.pc-flight { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.pc-flight-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.pc-flight-head h3 { margin: 0; font-size: 17px; }
.pc-flight-head p { margin: 2px 0 0; font-size: 13px; }
.pc-camp-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pc-camp-chips li { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--row-hover); border: 1px solid var(--line-soft); font-size: 13px; }
.pc-camp-chips .pi { width: 14px; height: 14px; }
.pc-camp-chips--edit { margin-bottom: 8px; }
.pc-camp-chips--edit li { padding-right: 4px; }
.pc-facts--row { grid-template-columns: repeat(3, auto minmax(0, 1fr)); gap: 4px 10px; }
.pc-action--inline { margin: 0; padding: 8px 12px; }
.pc-action--inline b { font-size: 14px; }
.pc-flight-foot { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-top: auto; }
.pc-flight-foot details { flex: 1; min-width: 0; }
.pc-flight-chart > summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13.5px; font-weight: 700; color: var(--navy); list-style: none; }
.pc-flight-chart > summary::-webkit-details-marker { display: none; }
.pc-flight-chart > summary::before { content: ''; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s ease; }
.pc-flight-chart[open] > summary::before { transform: rotate(45deg); }
.pc-flight-chart[open] .pc-chart { margin-top: 10px; }
.pc-flight-tools { display: inline-flex; gap: 6px; align-items: center; }

/* Okna: formularz, wyszukiwanie, asystent */
.pc-form { display: grid; gap: 14px; }
.pc-picker { width: 100%; }
.pc-picker .combo-input { width: 100%; }
.pc-opt { display: flex; align-items: center; gap: 10px; }
.pc-opt .pi { width: 16px; height: 16px; flex: none; }
.pc-opt span { display: flex; flex-direction: column; min-width: 0; }
.pc-opt small { font-size: 12px; color: var(--ink-soft); font-weight: 500; }
.pc-opt--bad { cursor: default; }
.pc-opt--bad small { color: var(--bad); }
.pc-picked { margin: 6px 0 0; font-size: 14px; }
.pc-picked small { color: var(--ink-soft); }
.pc-ai { display: grid; gap: 12px; }
.pc-ai > p { margin: 0; }
.pc-ai-text { width: 100%; min-height: 110px; font: inherit; }
.pc-ai-examples { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; }
.pc-ai-run { display: flex; gap: 10px; flex-wrap: wrap; }
.pc-ai-run .btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.pc-ai-out { display: grid; gap: 10px; }
.pc-ai-block { padding: 10px 14px; border-radius: var(--radius-sm); }
.pc-ai-block h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.pc-ai-block h3 svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }
.pc-ai-block ul { margin: 0; padding-left: 18px; font-size: 14px; display: grid; gap: 3px; }
.pc-ai-block--ok { background: var(--good-soft); color: var(--good); }
.pc-ai-block--ok ul, .pc-ai-block--info ul, .pc-ai-block--ask ul { color: var(--ink); }
.pc-ai-block--info { background: var(--accent-soft); color: var(--navy); }
.pc-ai-block--ask { background: var(--warn-soft); color: var(--warn); }

/* Ustawienia */
.pc-sources { display: grid; gap: 8px; max-width: 640px; }
.pc-source-row { display: grid; grid-template-columns: 22px minmax(140px, 200px) minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.pc-source-icon .pi { width: 18px; height: 18px; }
.pc-source-row input.is-required { border-color: var(--warn); }
.pc-add-source { justify-self: start; }
.pc-tol-field { margin-top: 14px; }
.pc-tol-seg button { min-width: 64px; justify-content: center; }
.pc-elements { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 10px; margin-top: 10px; }
.pc-element { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.pc-element:hover { border-color: var(--navy); }
.pc-element:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.pc-element b { display: block; font-size: 14px; }
.pc-element small { display: block; font-size: 12.5px; color: var(--ink-soft); line-height: 1.4; }
.pc-element-icon { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--line-soft); color: var(--ink-soft); }
.pc-element-icon svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
.pc-element[aria-checked="true"] { background: var(--accent-soft); border-color: var(--accent-hover); box-shadow: inset 3px 0 0 var(--violet); }
.pc-element[aria-checked="true"] .pc-element-icon { background: var(--surface); color: var(--navy); }
.pc-switch { position: relative; width: 36px; height: 20px; border-radius: 999px; background: var(--line); transition: background .15s ease; }
.pc-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); transition: transform .15s ease; }
.pc-element[aria-checked="true"] .pc-switch { background: var(--violet); }
.pc-element[aria-checked="true"] .pc-switch::after { transform: translateX(16px); }
@media (prefers-reduced-motion: reduce) { .pc-switch, .pc-switch::after { transition: none; } }
.pc-owner .pc-person { border-bottom: 0; }
.pc-owner-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.pc-owner-actions .btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }
.pc-access-add h3 { margin: 0 0 8px; font-size: 14px; }
.pc-access-add .hint { margin: 10px 0 0; }

/* Nowa tablica: 3 kroki */
.pc-wizard-head .wizard-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pc-wizard-actions { display: flex; gap: 10px; justify-content: flex-end; }
.pc-wizard-actions .btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.pc-gap { margin-top: 16px; }
.pc-fromdash { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.pc-fromdash > summary { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; font-weight: 700; color: var(--navy); list-style: none; }
.pc-fromdash > summary::-webkit-details-marker { display: none; }
.pc-fromdash > summary::before { content: ''; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s ease; }
.pc-fromdash[open] > summary::before { transform: rotate(45deg); }
.pc-fromdash select { margin-top: 10px; max-width: 420px; width: 100%; }

@media (max-width: 720px), (pointer: coarse) {
  .pc-fchip, .pc-subtabs a { min-height: 40px; }
  .pc-tree-btn { min-height: 40px; }
}
@media (max-width: 720px) {
  .pc-scope-row .pc-curve { margin-left: 0; }
  .pc-fgroup--search { margin-left: 0; width: 100%; }
  .pc-search { min-width: 0; width: 100%; }
  .pc-strip-list li { grid-template-columns: minmax(0, 1fr) auto; }
  .pc-facts--row { grid-template-columns: auto minmax(0, 1fr); }
  .pc-source-row { grid-template-columns: 22px minmax(0, 1fr) auto; }
  .pc-source-row input { grid-column: 2 / 4; }
  .pc-wizard-actions { justify-content: stretch; }
  .pc-wizard-actions .btn { flex: 1; justify-content: center; }
  .pc-toolbar { align-items: stretch; }
}
.pc-toolbar-right { display: inline-flex; align-items: center; gap: 12px; margin-left: auto; }
.pc-chip--curve { padding: 1px 8px; font-size: 11.5px; }
.pc-curve-field { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.pc-curve-field select { flex: 1; max-width: 260px; }
.pc-mini-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.pc-mini-stat { display: flex; flex-direction: column; gap: 1px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--row-hover); }
.pc-mini-stat span { font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.pc-mini-stat b { font-size: 18px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.pc-mini-stat small { font-size: 12px; color: var(--ink-soft); }
.pc-budget-table .pc-money { width: 100px; }

/* Tempo bez wykresu (M.R., 25.10: „tak pusto to wygląda bez wykresu") — status w jednym poziomym pasie. */
.pc-hero--one .pc-hero-status { display: grid; grid-template-columns: minmax(200px, max-content) minmax(0, 1fr) minmax(240px, 360px); column-gap: 32px; row-gap: 6px; align-items: start; max-width: none; padding-right: 40px; }
.pc-hero--one .pc-hero-status > .pc-hero-name, .pc-hero--one .pc-hero-status > .pc-verdict, .pc-hero--one .pc-hero-status > .pc-big { grid-column: 1; }
.pc-hero--one .pc-hero-status > .pc-facts, .pc-hero--one .pc-hero-status > p.muted { grid-column: 2; grid-row: 1 / span 3; align-self: center; max-width: 420px; }
.pc-hero--one .pc-hero-status > .pc-action { grid-column: 3; grid-row: 1 / span 3; align-self: center; }
@media (max-width: 900px) {
  .pc-hero--one .pc-hero-status { display: flex; flex-direction: column; padding-right: 0; }
}
/* Asystent: odpowiedzi o budżet dzienny */
.pc-ai-block--answer { background: var(--accent-soft); color: var(--navy); }
.pc-ai-block--answer ul { color: var(--ink); }
.pc-chip-type { font-weight: 700; }
.pc-srow--zestaw .pc-sname { padding-left: 66px; color: var(--ink-soft); }
.pc-srow--zestaw > td { font-size: 13.5px; }
.pc-srow--kampania .pc-tree-btn { font-weight: 600; }
.pc-wizard-actions [hidden] { display: none; }
.pc-source-row { grid-template-columns: 22px minmax(130px, 170px) minmax(170px, 1fr) minmax(140px, 1fr) auto; align-items: start; }
.pc-sources { max-width: 820px; }
.pc-source-head span { font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-soft); }
.pc-source-icon { padding-top: 10px; }
.pc-source-id { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pc-source-id input { width: 100%; }
.pc-source-row input.is-bad { border-color: var(--bad); }
.pc-source-err { font-size: 12px; color: var(--bad); }
.pc-source-err[hidden] { display: none; }
.pc-acc-id { flex-basis: 100%; font-variant-numeric: tabular-nums; }
.pc-missing-ids a { font-weight: 700; }
@media (max-width: 720px) { .pc-source-row { grid-template-columns: 22px minmax(0, 1fr) auto; } .pc-source-head { display: none; } .pc-source-row > .pc-source-id, .pc-source-row > input { grid-column: 2 / 4; } }

/* --- własność i dostęp do dashboardu (M.R., 26.10) — zakładka „Dostęp", poziom przy dashboardzie w Dostępach */
/* Wąska kolumna: wybór poziomu schodzi pod nazwę (wcięty do tekstu), zamiast łamać nazwę na kilka wierszy. */
.picker-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; padding-right: 10px; }
.picker-row > label { flex: 1 1 200px; min-width: 0; }
.picker-row > .tag { flex: none; }
.picker-level { flex: none; width: auto; min-width: 104px; margin: 0 0 6px 31px; font-size: 13px; padding: 4px 8px; }
.picker-level[hidden] { display: none; }
.pc-my-level { display: flex; align-items: center; gap: 8px; margin: 4px 0 0; font-weight: 600; }
.pc-my-level svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; flex: none; }
.pc-danger h2 { margin-bottom: 6px; }
.pc-danger .btn { margin-top: 4px; }
.not-added .actions { margin: -4px 0 12px; }

/* --- link do zakładki tempa */
.pc-link { display: flex; flex-direction: column; gap: 12px; }
.pc-link p { margin: 0; }
.pc-link-row { display: flex; gap: 8px; align-items: stretch; }
.pc-link-url { flex: 1 1 auto; min-width: 0; font-size: 13px; }
@media (max-width: 520px) { .pc-link-row { flex-direction: column; } }
@media (max-width: 720px), (pointer: coarse) { .picker-level { min-height: 40px; } }
.link-dead { display: grid; place-items: center; min-height: 100vh; margin: 0; padding: 16px; background: var(--bg); }
.link-dead main { max-width: 460px; padding: 28px; }
.link-dead h1 { margin: 0 0 8px; font-size: 22px; }

/* Poprawka własnej wiadomości w granatowym dymku klienta: ołówek jasny na granacie; w trakcie edycji dymek jasny
   (pole i przyciski czytelne); na ekranie dotykowym ołówek widać zawsze — bez myszy nie ma „najechania". */
.client-conv .client-msg--me .client-msg-edit { color: rgba(255, 255, 255, .8); }
.client-conv .client-msg--me .client-msg-edit:hover { background: rgba(255, 255, 255, .16); color: #FFFFFF; }
.client-conv .client-msg--me.is-editing { background: var(--surface); color: var(--ink); border: 1px solid var(--line-soft); }
@media (hover: none) { .client-msg-edit { opacity: 1; } }
/* Telefon, prawdziwe dane (27.10): tytuł rozmowy zawsze ponad pół wiersza, znaczniki w razie potrzeby niżej;
   „Pokaż zakończone" z „Nowa odpowiedź" na całą szerokość, w jednej linii (pigułka łamała się w środku). */
@media (max-width: 560px) {
  .client-conv-top { flex-wrap: wrap; row-gap: 4px; }
  .client-conv-title { flex: 1 1 auto; min-width: 55%; }
  .client-fb-body .client-fb-closed > summary { align-self: stretch; border-radius: 14px; flex-wrap: nowrap; }
  .client-fb-closed > summary > span, .client-fb-closed > summary .tag { white-space: nowrap; }
}
/* Poświata na telefonie jak na logowaniu (M.R., 27.10: „dziwnie się wyświetla", 28.10: „ciut za jasne"). */
@media (max-width: 720px) {
  .client-head { background-image: var(--scene-glow-phone); }
  /* Bez zdania pod powitaniem (28.10) 50 px pod nim wyglądało jak dziura przy 20 px nad datą — 32 px. */
  .client-hero, .client-portal-page .client-hero { padding-bottom: 70px; }
}

/* Karta sama w rzędzie (`soloInRow` w panel_view.js) — na całą szerokość; zapisany rozmiar zostaje (M.R., 29.10). */
.dv-grid > .dv-card.dv-fill { grid-column: 1 / -1; }

/* ------------------------------------------------------------------ strona „Poznaj panel" (`/poznaj`, poznaj.js) */
/*
 * Historia panelu do wysłania linkiem (M.R., 29.10). Granat z poświatą jak logowanie (`--scene-glow`), sceny na tle
 * panelu, prawdziwe ekrany w ramce przeglądarki (`poznaj_*.jpg`). Ruch tylko tam, gdzie coś się dzieje: scena wchodzi
 * raz, ramka wskazuje miejsce na ekranie, elementy schodzą się w jeden dashboard. Nic nie pulsuje w tle.
 */
html:has(> body.pz-page) { scroll-behavior: smooth; }
.pz-page { overflow-x: clip; }
:where(.pz-page svg[viewBox="0 0 24 24"]:not(.pi)) { flex: none; width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pz-page svg.pi { width: 18px; height: 18px; }

.pz-hero {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  min-height: 100vh; min-height: 100svh; padding: 40px clamp(16px, 5vw, 72px) 36px;
  background-color: var(--navy); background-image: var(--scene-glow); color: #FFFFFF;
}
.pz-hero-logo { position: relative; z-index: 1; display: inline-block; width: max-content; }
.pz-hero-logo img { display: block; width: 192px; height: auto; }
.pz-hero-claim { position: relative; z-index: 1; max-width: 780px; }
.pz-hero-claim > * { animation: pz-rise .8s cubic-bezier(.2, .7, .2, 1) both; }
.pz-hero-claim > :nth-child(2) { animation-delay: .08s; }
.pz-hero-claim > :nth-child(3) { animation-delay: .16s; }
.pz-hero-claim > :nth-child(4) { animation-delay: .24s; }
.pz-hero-kicker { margin: 0 0 14px; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--pg-media); }
.pz-hero-title { margin: 0; font-size: clamp(36px, 6vw, 76px); line-height: 1.04; font-weight: 800; letter-spacing: -.03em; }
.pz-hero-lead { margin: 20px 0 0; max-width: 40ch; font-size: clamp(17px, 1.6vw, 21px); line-height: 1.5; color: var(--accent-soft); }
.pz-hero-foot { position: relative; z-index: 1; margin: 0; font-size: 13px; font-weight: 600; color: var(--accent-soft); }
.pz-hero-mark { position: absolute; right: -90px; bottom: -80px; width: 460px; height: auto; opacity: .07; pointer-events: none; }
/* Prawdziwy dashboard po prawej, lekko obrócony — tylko na szerokim ekranie. */
.pz-hero-art { position: absolute; z-index: 1; top: 50%; right: clamp(24px, 4vw, 64px); width: min(620px, 42vw); transform: translateY(-50%) perspective(1600px) rotateY(-9deg); animation: pz-rise 1s cubic-bezier(.2, .7, .2, 1) .3s both; }
.pz-hero-art .pz-shot { box-shadow: 0 30px 70px rgba(8, 9, 40, .55); }
@media (max-width: 1179px) { .pz-hero-art { display: none; } }
@media (min-width: 1180px) {
  .pz-hero-claim { max-width: calc(100% - min(620px, 42vw) - 72px); }
  .pz-hero-title { font-size: clamp(44px, 4.6vw, 72px); }
}
@keyframes pz-rise { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }

.pz-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.pz-actions .btn, .pz-player .btn { min-height: 46px; padding: 10px 22px; font-size: 15px; }
.pz-btn-light { background: #FFFFFF; border-color: #FFFFFF; color: var(--navy); }
.pz-btn-light:hover { background: var(--accent-soft); }
.pz-btn-line { background: transparent; border-color: color-mix(in srgb, #FFFFFF 40%, transparent); color: #FFFFFF; }
.pz-btn-line:hover { background: color-mix(in srgb, #FFFFFF 10%, transparent); }

/* Pasek rozdziałów — wjeżdża po zejściu z pierwszego ekranu. */
.pz-toc {
  position: fixed; top: 12px; left: 50%; z-index: 20; display: flex; align-items: center; gap: 8px; max-width: calc(100vw - 32px);
  padding: 5px 14px 5px 6px; border: 1px solid var(--line-soft); border-radius: 999px; background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: var(--shadow); backdrop-filter: blur(10px); opacity: 0; pointer-events: none; transform: translate(-50%, -140%); transition: transform .35s ease, opacity .35s ease;
}
.pz-toc.is-shown { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.pz-toc-logo { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--navy); }
.pz-toc-list { display: flex; gap: 2px; margin: 0; padding: 0; list-style: none; }
.pz-toc-list a { display: block; padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--ink-soft); text-decoration: none; white-space: nowrap; }
.pz-toc-list a:hover { background: var(--row-hover); color: var(--navy); }
.pz-toc-list a[aria-current] { background: var(--accent-soft); color: var(--navy); font-weight: 800; }
.pz-toc-list a:focus-visible, .pz-toc-logo:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.pz-toc-count { font-size: 12px; font-weight: 700; color: var(--ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Scena: zdania po jednej stronie, ekran po drugiej; co druga na odwrót. Wchodzi raz (`is-on`). */
.pz-scene {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); align-items: center; gap: clamp(32px, 5vw, 80px);
  max-width: 1320px; min-height: 80vh; margin: 0 auto; padding: clamp(56px, 8vh, 96px) clamp(16px, 4vw, 48px);
}
.pz-scene:nth-of-type(even) { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); }
.pz-scene:nth-of-type(even) .pz-copy { order: 2; }
.pz-kicker { margin: 0 0 14px; font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--violet); }
.pz-copy h2 { margin: 0; font-size: clamp(30px, 3.4vw, 46px); line-height: 1.08; font-weight: 800; letter-spacing: -.025em; }
.pz-text { margin: 18px 0 0; max-width: 42ch; font-size: 18px; line-height: 1.6; color: var(--ink-soft); }
.pz-art { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.pz-art > * { width: 100%; }
.pz-copy, .pz-art { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.pz-art { transition-delay: .15s; }
.pz-scene.is-on .pz-copy, .pz-scene.is-on .pz-art { opacity: 1; transform: none; }
.pz-card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 18px; box-shadow: var(--shadow); }

/* Prawdziwy ekran w ramce przeglądarki. Ramki (`pz-spot`) wskazują miejsce — pojawiają się po kolei. */
.pz-shot { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 18px 50px color-mix(in srgb, var(--navy) 16%, transparent); }
.pz-shot-bar { display: flex; align-items: center; gap: 12px; height: 32px; padding: 0 12px; border-bottom: 1px solid var(--line-soft); background: var(--row-hover); }
.pz-shot-dots { display: flex; gap: 6px; }
.pz-shot-dots span { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.pz-shot-url { overflow: hidden; padding: 3px 12px; border-radius: 999px; background: var(--surface); font-size: 11px; font-weight: 600; color: var(--ink-soft); text-overflow: ellipsis; white-space: nowrap; }
.pz-shot-view { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.pz-shot-view:focus-visible { outline: 3px solid var(--violet); outline-offset: -3px; }
.pz-shot-view img { display: block; width: 100%; height: auto; }
.pz-spot { position: absolute; border: 2px solid var(--glow-violet); border-radius: 10px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--violet) 18%, transparent); opacity: 0; transform: scale(1.04); transition: opacity .5s ease .9s, transform .5s ease .9s; pointer-events: none; }
.pz-spot--n1 { transition-delay: 2.4s; }
.is-on .pz-spot { opacity: 1; transform: none; }
.pz-spot-label { position: absolute; left: -2px; bottom: calc(100% + 6px); padding: 4px 10px; border-radius: 999px; background: var(--navy); color: #FFFFFF; font-size: 12px; font-weight: 700; white-space: nowrap; box-shadow: var(--shadow); }
.pz-spot--below .pz-spot-label { top: calc(100% + 6px); bottom: auto; }
.pz-spot--end .pz-spot-label { right: -2px; left: auto; }
.pz-spot--panel-0 { top: 12.8%; left: 20.9%; width: 76.5%; height: 8.1%; }
.pz-spot--panel-1 { top: 21.1%; left: 1%; width: 12.9%; height: 4.7%; }
.pz-spot--zrodla-0 { top: 30.7%; left: 20.9%; width: 76.5%; height: 29.4%; }
.pz-spot--kreator-0 { top: 17.4%; left: 21.9%; width: 48.9%; height: 4.7%; }
.pz-spot--kreator-1 { top: 65.3%; left: 22.4%; width: 73.6%; height: 9.1%; }
.pz-spot--asystent-0 { top: 70.4%; left: 22.4%; width: 61.9%; height: 22%; }
.pz-spot--biblioteka-0 { top: 42.2%; left: 20.9%; width: 76.5%; height: 47.1%; }
.pz-spot--przenosiny-0 { top: 12.8%; left: 20.9%; width: 76.5%; height: 15.6%; }
.pz-spot--edytor-0 { top: 8.3%; left: 5.3%; width: 31.1%; height: 38.9%; }
.pz-spot--edytor-1 { top: 4.4%; left: 71%; width: 24.9%; height: 84.4%; }
.pz-spot--katalog-0 { top: 25.8%; left: 22.4%; width: 36.3%; height: 54%; }
.pz-spot--publikacja-0 { top: 6.8%; left: 20.9%; width: 76.5%; height: 7.6%; }
.pz-spot--dashboard-0 { top: 19.2%; left: 58.8%; width: 30%; height: 5%; }
.pz-spot--dashboard-1 { top: 49.8%; left: 11%; width: 77.9%; height: 18.8%; }
.pz-spot--zapytaj-0 { top: 46.4%; left: 70.6%; width: 27.6%; height: 50.9%; }
.pz-spot--uwagi-0 { top: 19.7%; left: 20.9%; width: 56.4%; height: 75.3%; }
.pz-spot--tempo-0 { top: 28.7%; left: 20.9%; width: 76.5%; height: 48.2%; }
.pz-spot--pomoc-0 { top: 20.8%; left: 72.4%; width: 26.3%; height: 70.9%; }
.pz-platforms { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 16px; }

.pz-film { display: block; width: 100%; height: auto; aspect-ratio: 1280 / 800; background: var(--bg); }

/* Telefon: film z ekranu 390 × 844 w obudowie (pasek stanu nad ekranem), obok cztery rzeczy, które klient zrobi jednym ruchem. */
.pz-phone-wrap { display: flex; align-items: center; justify-content: center; gap: clamp(20px, 4vw, 48px); }
.pz-device { position: relative; flex: none; width: min(300px, 72vw); overflow: hidden; padding-top: 34px; border: 9px solid var(--navy); border-radius: 48px; background: var(--navy); box-shadow: 0 0 0 1px var(--navy-2), 0 30px 70px color-mix(in srgb, var(--navy) 32%, transparent); }
.pz-device .pz-film { aspect-ratio: 390 / 844; border-radius: 0 0 38px 38px; }
.pz-device-island { position: absolute; top: 9px; left: 50%; z-index: 1; width: 88px; height: 24px; margin-left: -44px; border-radius: 14px; background: #FFFFFF; opacity: .08; }
.pz-phone-side { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.pz-side-chip { display: flex; align-items: center; gap: 10px; padding: 10px 16px 10px 10px; border: 1px solid var(--line-soft); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); font-size: 14px; font-weight: 700; white-space: nowrap; opacity: 0; transform: translateX(-10px); transition: opacity .4s ease, transform .4s ease; }
.pz-scene.is-on .pz-side-chip { opacity: 1; transform: none; }
.pz-scene.is-on .pz-side-chip:nth-child(1) { transition-delay: .8s; }
.pz-scene.is-on .pz-side-chip:nth-child(2) { transition-delay: 1.1s; }
.pz-scene.is-on .pz-side-chip:nth-child(3) { transition-delay: 1.4s; }
.pz-scene.is-on .pz-side-chip:nth-child(4) { transition-delay: 1.7s; }
.pz-trio-icon--sm { flex: none; width: 32px; height: 32px; margin: 0; border-radius: 9px; }
.pz-trio-icon--sm svg { width: 17px; height: 17px; }

/* Powiększenie zrzutu. */
.pz-zoom { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; background: color-mix(in srgb, var(--navy) 90%, transparent); cursor: zoom-out; }
.pz-zoom[hidden] { display: none; }
.pz-zoom-body { display: grid; place-items: center; width: 100%; height: 100%; min-height: 0; }
.pz-zoom-body > img, .pz-zoom-body > video { max-width: 100%; max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); width: auto; height: auto; border-radius: 12px; box-shadow: 0 30px 80px rgba(8, 9, 40, .6); }
.pz-zoom-close { position: absolute; top: 16px; right: 16px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: #FFFFFF; color: var(--navy); cursor: pointer; }
.pz-zoom-close:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }

/* 01 — źródła rozsypane po ekranie schodzą się w jedną kartę. */
.pz-gather { padding: 28px 24px 22px; border: 1px solid transparent; border-radius: 22px; text-align: center; transition: background-color .5s ease 1.2s, border-color .5s ease 1.2s, box-shadow .5s ease 1.2s; }
.pz-scene.is-on .pz-gather { background: var(--surface); border-color: var(--line-soft); box-shadow: var(--shadow); }
.pz-gather-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.pz-chip { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); font-size: 14px; font-weight: 700; }
.pz-chip--sm { padding: 6px 10px; font-size: 13px; box-shadow: none; }
.pz-gather .pz-chip { transition: transform 1s cubic-bezier(.2, .7, .2, 1) .5s; }
.pz-gather .pz-chip:nth-child(1) { transform: translate(-30px, -70px) rotate(-8deg); }
.pz-gather .pz-chip:nth-child(2) { transform: translate(40px, 60px) rotate(6deg); }
.pz-gather .pz-chip:nth-child(3) { transform: translate(-10px, 90px) rotate(-4deg); }
.pz-gather .pz-chip:nth-child(4) { transform: translate(50px, -80px) rotate(9deg); }
.pz-gather .pz-chip:nth-child(5) { transform: translate(-60px, 40px) rotate(-6deg); }
.pz-scene.is-on .pz-gather .pz-chip { transform: none; }
.pz-gather-label { display: inline-flex; align-items: center; gap: 8px; margin: 22px 0 0; font-weight: 800; opacity: 0; transition: opacity .5s ease 1.4s; }
.pz-scene.is-on .pz-gather-label { opacity: 1; }

/* Bezpieczeństwo i „Co to daje" — trzy karty po kolei. */
.pz-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pz-trio-card { display: flex; flex-direction: column; gap: 6px; padding: 20px 18px; opacity: 0; transform: translateY(12px); transition: opacity .5s ease, transform .5s ease; }
.pz-trio-card b { font-size: 16px; }
.pz-trio-card > span:last-child { font-size: 14px; line-height: 1.45; color: var(--ink-soft); }
.pz-trio-icon { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 8px; border-radius: 12px; background: var(--accent-soft); color: var(--navy); }
.pz-trio-icon svg { width: 22px; height: 22px; }
.pz-scene.is-on .pz-trio-card { opacity: 1; transform: none; }
.pz-scene.is-on .pz-trio-card:nth-child(1) { transition-delay: .4s; }
.pz-scene.is-on .pz-trio-card:nth-child(2) { transition-delay: .7s; }
.pz-scene.is-on .pz-trio-card:nth-child(3) { transition-delay: 1s; }

/* „Spróbuj sam" — mini edytor do klikania: przeciągnij, szerokość, dodaj, tytuł w miejscu. */
.pz-toy { padding: 16px; }
.pz-toy-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; border-bottom: 1px solid var(--line-soft); }
.pz-tab { padding: 8px 12px; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.pz-tab.is-current { color: var(--navy); font-weight: 800; box-shadow: inset 0 -2px 0 var(--violet); }
.pz-toy-note { padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); font-size: 12px; font-weight: 700; white-space: nowrap; }
.pz-toy-count { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--ink-soft); white-space: nowrap; }
.pz-toy-canvas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
.pz-toy-blk { position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; min-height: 118px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: grab; transition: border-color .15s ease, box-shadow .15s ease, opacity .15s ease; }
.pz-toy-blk.is-wide { grid-column: 1 / -1; }
.pz-toy-blk:hover { border-color: color-mix(in srgb, var(--violet) 45%, var(--line)); }
.pz-toy-blk.is-sel { border-color: var(--violet); box-shadow: 0 0 0 2px var(--violet); }
.pz-toy-blk.is-drag { opacity: .4; }
.pz-toy-blk.is-over { outline: 2px dashed var(--violet); outline-offset: 3px; }
.pz-toy-blk:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; }
.pz-toy-head { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; font-weight: 800; }
.pz-toy-grip { display: grid; color: var(--ink-soft); }
.pz-toy-title { min-width: 0; margin: -2px -4px; padding: 2px 4px; overflow: hidden; border-radius: 6px; text-overflow: ellipsis; white-space: nowrap; cursor: text; outline: none; }
.pz-toy-title:hover { background: var(--row-hover); }
.pz-toy-title:focus { background: var(--accent-soft); box-shadow: inset 0 -2px 0 var(--violet); }
.pz-toy-tools { position: absolute; top: -19px; right: 10px; z-index: 2; display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--navy); box-shadow: var(--shadow); }
.pz-toy-tools .icon { display: grid; place-items: center; width: 30px; height: 28px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: #FFFFFF; cursor: pointer; }
.pz-toy-tools .icon:hover { background: var(--navy-2); }
.pz-toy-tools .icon:focus-visible { outline: 2px solid var(--pink); outline-offset: 1px; }
.pz-toy-tools svg { width: 15px; height: 15px; }
.pz-toy-kafle { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pz-toy-kafle > span { display: flex; flex-direction: column; min-width: 0; padding: 8px 10px; border-radius: 9px; background: var(--row-hover); }
.pz-toy-kafle small { font-size: 11px; font-weight: 600; color: var(--ink-soft); }
.pz-toy-kafle b { overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pz-toy-svg { display: block; width: 100%; height: 60px; }
.pz-toy-line { fill: none; stroke: var(--violet); stroke-width: 2.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.pz-toy-bars { display: flex; align-items: flex-end; justify-content: center; gap: 28px; min-height: 76px; }
.pz-toy-col { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; }
.pz-toy-bar { width: 28px; border-radius: 6px 6px 0 0; }
.pz-toy-bar--a { height: 44px; background: var(--violet); }
.pz-toy-bar--b { height: 32px; background: var(--pink); }
.pz-toy-table { display: flex; flex-direction: column; font-size: 12px; }
.pz-toy-table > span { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-top: 1px solid var(--line-soft); }
.pz-toy-table b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pz-toy-funnel { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pz-toy-funnel > span { padding: 5px 8px; border-radius: 6px; background: color-mix(in srgb, var(--violet) 18%, var(--surface)); font-size: 11px; font-weight: 700; text-align: center; }
.pz-toy-funnel > span:nth-child(1) { width: 100%; }
.pz-toy-funnel > span:nth-child(2) { width: 74%; background: color-mix(in srgb, var(--violet) 36%, var(--surface)); }
.pz-toy-funnel > span:nth-child(3) { width: 48%; background: var(--violet); color: #FFFFFF; }
.pz-toy-map { display: block; width: 100%; max-height: 130px; }
.pz-map-r { fill: var(--line-soft); stroke: var(--surface); stroke-width: 1; }
.pz-map-r--1 { fill: color-mix(in srgb, var(--violet) 22%, var(--surface)); }
.pz-map-r--2 { fill: color-mix(in srgb, var(--violet) 42%, var(--surface)); }
.pz-map-r--3 { fill: color-mix(in srgb, var(--violet) 68%, var(--surface)); }
.pz-map-r--4 { fill: var(--violet); }
.pz-toy-donut { display: block; align-self: center; width: 76px; height: 76px; }
.pz-toy-donut circle { fill: none; stroke-width: 7; }
.pz-toy-donut-bg { stroke: var(--pink); }
.pz-toy-donut-a { stroke: var(--violet); }
.pz-toy-plan { display: flex; flex-direction: column; gap: 8px; }
.pz-toy-plan-bar { display: block; height: 10px; overflow: hidden; border-radius: 999px; background: var(--line-soft); }
.pz-toy-plan-bar > span { display: block; width: 58%; height: 100%; border-radius: inherit; background: var(--violet); }
.pz-toy-plan small { font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.pz-toy-empty { grid-column: 1 / -1; margin: 0; padding: 28px 0; text-align: center; color: var(--ink-soft); }
.pz-toy-foot { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.pz-toy-foot .btn { min-height: 40px; }
.pz-toy-addwrap { position: relative; }
.pz-toy-menu { position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 5; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; width: 360px; max-width: calc(100vw - 64px); padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 12px 30px rgba(25, 28, 98, .18); }
.pz-toy-menu[hidden] { display: none; }
.pz-toy-menu button { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--navy); font: inherit; font-size: 13px; font-weight: 700; text-align: left; cursor: pointer; }
.pz-toy-menu button:hover, .pz-toy-menu button:focus-visible { background: var(--accent-soft); outline: none; }
.pz-toy-menu svg { width: 17px; height: 17px; }

/* Koniec i stopka. */
.pz-end { display: flex; flex-direction: column; align-items: center; padding: clamp(72px, 12vh, 140px) 16px; background-color: var(--navy); background-image: var(--scene-glow); color: #FFFFFF; text-align: center; }
.pz-end h2 { margin: 0; font-size: clamp(32px, 4.4vw, 56px); font-weight: 800; letter-spacing: -.025em; }
.pz-end p { margin: 14px 0 0; max-width: 46ch; font-size: 18px; color: var(--accent-soft); }
.pz-end .pz-actions { justify-content: center; }
.pz-foot { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 18px 16px; border-top: 1px solid var(--navy-2); background: var(--navy); color: var(--accent-soft); font-size: 13px; }

/* „Odtwórz sam": pasek na dole, widoczny tylko w czasie odtwarzania. */
.pz-player {
  position: fixed; left: 50%; bottom: 16px; z-index: 10; display: flex; align-items: center; gap: 14px; max-width: calc(100vw - 32px);
  padding: 6px 6px 6px 18px; border-radius: 999px; background: var(--navy); color: #FFFFFF; box-shadow: 0 10px 30px rgba(25, 28, 98, .3);
  font-size: 14px; font-weight: 700; white-space: nowrap; opacity: 0; pointer-events: none; transform: translate(-50%, 140%); transition: transform .35s ease, opacity .35s ease;
}
.pz-player.is-playing { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.pz-player .btn { min-height: 40px; padding: 8px 18px; }

/* Strzałka w dół — następna scena (też klawisz ↓). Znika na końcu i w czasie „Odtwórz sam". */
.pz-next {
  position: fixed; right: 20px; bottom: 20px; z-index: 9; display: grid; place-items: center; width: 48px; height: 48px; padding: 0;
  border: 1px solid color-mix(in srgb, var(--navy) 18%, transparent); border-radius: 50%; background: var(--surface); color: var(--navy);
  box-shadow: var(--shadow); cursor: pointer; transition: opacity .3s ease, transform .3s ease, background-color .15s ease;
}
.pz-next:hover { background: var(--accent-soft); }
.pz-next:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.pz-next svg { width: 22px; height: 22px; }
.pz-next.is-hidden { opacity: 0; pointer-events: none; transform: translateY(8px); }

@media (max-width: 1023px) { .pz-hero-mark { display: none; } }
@media (max-width: 960px) {
  .pz-scene, .pz-scene:nth-of-type(even) { grid-template-columns: minmax(0, 1fr); gap: 28px; min-height: 0; padding: 64px 16px; }
  .pz-scene:nth-of-type(even) .pz-copy { order: 0; }
  .pz-text { font-size: 16px; }
  /* Na wąskim ekranie bez rozdziałów w pasku — tylko bieżący. */
  .pz-toc-list li:not(:has([aria-current])) { display: none; }
}
@media (max-width: 760px) { .pz-trio { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
  .pz-hero { padding: 20px 16px 24px; }
  .pz-hero-logo img { width: 154px; }
  .pz-actions .btn { flex: 1 1 auto; justify-content: center; }
  .pz-gather .pz-chip:nth-child(n) { transform: none; }
  .pz-spot-label { font-size: 10px; padding: 3px 8px; }
  .pz-shot-url { display: none; }
  .pz-toy-canvas { grid-template-columns: minmax(0, 1fr); }
  .pz-phone-wrap { flex-direction: column; }
  .pz-phone-side { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .pz-side-chip { font-size: 13px; }
  .pz-toy-kafle { gap: 6px; }
  .pz-toy-kafle > span { padding: 6px 8px; }
  .pz-toy-kafle b { font-size: 13px; }
  .pz-next { right: 12px; bottom: 12px; }
}
@media (max-width: 420px) { .pz-toy-note { display: none; } }
@media (max-width: 720px), (pointer: coarse) {
  .pz-toy-tools .icon { width: 40px; height: 40px; }
  .pz-toy-tools { top: -24px; }
}
@media (prefers-reduced-motion: reduce) {
  html:has(> body.pz-page) { scroll-behavior: auto; }
  .pz-page *, .pz-page *::before, .pz-page *::after { animation: none !important; transition-duration: 0s !important; transition-delay: 0s !important; }
}
