/* ==========================================================================
   Asystent Kontraktu - szkielet (granatowy pasek boczny z podręcznym menu obszarów,
   przełącznik kontraktu, paleta poleceń, „+ Nowe”) i pulpity: Pulpit (docs/16),
   „Dziś”, „Moje biuro”. Wrzesień 2026.

   Zasady kolorów: czerwień = zaległość lub awaria, bursztyn = do decyzji
   albo termin w tygodniu, zieleń = spokój; każdy taki znak ma obok etykietę
   słowną. Kolor kontraktu (kwadrat z kodem) jest TOŻSAMOŚCIĄ, nigdy oceną.
   ========================================================================== */

:root {
    --sb-w: 248px;
    --navy: #0d1b2a;
    --navy-2: #142639;
    --amber: #e8871a;
}

/* ---------------------------------------------------------------- Układ */

body.has-shell { background: var(--bg); }
.shell { display: grid; grid-template-columns: var(--sb-w) minmax(0, 1fr); min-height: 100vh; }
.shell-main { min-width: 0; display: flex; flex-direction: column; }
/* Strona w kolumnie flex z marginesem auto kurczyła się do treści - siatka kafelków stawała w jednej wąskiej
   kolumnie (Dokumentacja projektowa, 7.10.2026). Szerokość pełna, a granicę trzyma max-width strony. */
.shell-main > .page { width: 100%; }

/* Strona gościa harmonogramu (docs/27): bez paska bocznego, w górnym pasku tylko znak, tytuł i wylogowanie. */
.shell.guest-shell { grid-template-columns: minmax(0, 1fr); }
.guest-bar { display: flex; align-items: center; }
.guest-bar .logo { color: var(--ink); display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 15px; flex: none; }
.guest-bar .logo:hover { text-decoration: none; }
.guest-bar .marka-tekst .lzejsze { color: var(--muted); font-weight: 500; }
.guest-bar .crumbs { flex: 1; }
.guest-bar .guest-who { margin-left: auto; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (max-width: 720px) { .guest-bar .crumbs, .guest-bar .guest-who { display: none; } .guest-bar .logo { margin-right: auto; } }

/* ---------------------------------------------------------------- Pasek boczny */

/* z-index jest konieczny: sticky zakłada własną warstwę, więc podręczne menu (.fly) nie wyjdzie
   ponad nią, a bez numeru ta warstwa leży pod każdą kartą treści z position: relative
   (/Dzis, /Todo). 50 = nad górnym paskiem (40), pod oknami i paletą z <body> (55-90). */
.sb {
    position: sticky; top: 0; z-index: 50; height: 100vh; overflow-y: auto;
    background: var(--navy); color: #dbe5ef;
    display: flex; flex-direction: column; gap: 6px;
    padding: 14px 12px 12px;
    scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent;
}
.sb-brand { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 10px; }
.sb-brand .logo { display: flex; align-items: center; gap: 9px; color: #fff; font-weight: 700; font-size: 15px; }
.sb-brand .logo:hover { text-decoration: none; }
.sb-brand .marka-znak { outline: 1px solid rgba(255, 255, 255, .14); width: 28px; height: 28px; }
.sb-brand .marka-tekst .lzejsze { color: #b8cbe0; }
.sb-close { display: none; background: none; border: 0; color: #b8cbe0; font-size: 22px; cursor: pointer; padding: 0 6px; }

.ctx {
    display: grid; grid-template-columns: 34px minmax(0, 1fr) 14px; gap: 9px; align-items: center;
    background: var(--navy-2); border: 1px solid rgba(255,255,255,.12); border-radius: 9px;
    padding: 8px 9px; color: #fff; text-align: left; cursor: pointer; font-family: inherit; width: 100%;
    transition: background .12s;
}
.ctx:hover, .ctx[aria-expanded="true"] { background: #1a3149; }
.ctx:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.ctx .code, .ccode {
    width: 34px; height: 34px; border-radius: 8px; flex: none;
    background: var(--c, #2f6f9f); color: #fff;
    font-family: var(--mono); font-weight: 600; font-size: 12.5px; letter-spacing: .02em;
    display: inline-flex; align-items: center; justify-content: center;
}
.ccode.sm { width: 26px; height: 26px; border-radius: 7px; font-size: 10.5px; }
.ccode.xs { width: 20px; height: 20px; border-radius: 5px; font-size: 9px; }
.ctx .who { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.ctx b { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctx small { color: #a9bdd2; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctx .chev { color: #a9bdd2; font-size: 12px; }
.ctx.office .code { background: #4b5a6b; }

.sb-nav { display: flex; flex-direction: column; gap: 1px; margin-top: 6px; }
.sb-nav .g { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: #7f93a8; padding: 12px 8px 4px; }
.sb-nav .g:first-child { padding-top: 4px; }
.sb-nav a {
    display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px;
    color: #d3dfeb; font-size: 13px; line-height: 1.3;
}
.sb-nav a:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.sb-nav a.on { background: rgba(255,255,255,.12); color: #fff; font-weight: 600; }
.sb-nav a.locked { color: #7f93a8; }
.sb-nav a.locked:hover { background: none; color: #7f93a8; cursor: not-allowed; }
.sb-nav a svg { width: 15px; height: 15px; flex: none; color: #8ea3b8; }
.sb-nav a.on svg { color: #f0a04b; }
.sb-nav a .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-nav a .cnt { font-family: var(--mono); font-size: 11px; color: #9fb3c8; }
.sb-nav a .bd { font-family: var(--mono); font-size: 11px; padding: 1px 7px; border-radius: 999px; font-weight: 500; }
.sb-nav a .bd.crit { background: #c9302c; color: #fff; }
.sb-nav a .bd.warn { background: #f0c46a; color: #3b2a00; }
.sb-nav a .lock { font-size: 11px; color: #7f93a8; }
.sb-nav .ni { display: flex; flex-direction: column; }
.sb-nav .kids { display: none; flex-direction: column; gap: 1px; margin-left: 14px; border-left: 1px solid rgba(255,255,255,.1); padding-left: 4px; }
.sb-nav .ni.open > .kids { display: flex; }
.sb-nav a.lvl1, .sb-nav a.lvl2 { padding-top: 5px; padding-bottom: 5px; font-size: 12.5px; }
.sb-nav a.lvl1 svg, .sb-nav a.lvl2 svg { width: 13px; height: 13px; }
.sb-nav a .t small { display: block; font-size: 10.5px; color: #8ea3b8; font-weight: 400; overflow: hidden; text-overflow: ellipsis; }
.sb-nav a.on .t small { color: #c9d6e3; }
.sb-nav a .car { flex: none; background: none; border: 0; color: #8ea3b8; cursor: pointer; padding: 0 2px; font-size: 12px; line-height: 1; transition: transform .15s; }
.sb-nav a .car.open { transform: rotate(90deg); }
.sb-nav a:hover .car { color: #fff; }

.sb-foot { margin-top: auto; border-top: 1px solid rgba(255,255,255,.1); padding-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.sb-foot a { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; color: #d3dfeb; font-size: 13px; }
.sb-foot a:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.sb-foot a svg { width: 15px; height: 15px; color: #8ea3b8; }
.sb-foot .recent { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: #7f93a8; padding: 8px 8px 2px; }
.sb-foot a .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-foot a .bd { margin-left: auto; font-family: var(--mono); font-size: 11px; padding: 1px 7px; border-radius: 999px; font-weight: 500; }
.sb-foot a .bd.crit { background: #c9302c; color: #fff; }
.sb-foot a .bd.warn { background: #f0c46a; color: #3b2a00; }

/* ---------------------------------------------------------------- Górny pasek (jasny) */

.topbar {
    background: var(--surface); color: var(--ink);
    height: 56px; padding: 0 22px; gap: 14px;
    border-bottom: 1px solid var(--line); box-shadow: none;
    position: sticky; top: 0; z-index: 40;
}
.tb-menu { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; width: 34px; height: 34px; font-size: 16px; cursor: pointer; color: var(--ink-2); }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); min-width: 0; white-space: nowrap; overflow: hidden; }
.crumbs a { color: var(--ink-2); }
.crumbs a:hover { color: var(--brand); }
.crumbs b { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.crumbs .sep { color: #b3bdc8; }
.tb-search {
    margin-left: auto; flex: 0 1 380px; min-width: 0;
    display: flex; align-items: center; gap: 8px;
    border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px;
    background: #fafbfc; color: var(--muted); font-size: 12.5px; font-family: inherit; cursor: text; text-align: left;
}
.tb-search:hover { border-color: var(--brand); }
.tb-search .ico { font-size: 14px; }
.tb-search .lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-search .kbd { font-family: var(--mono); font-size: 10.5px; border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; background: #fff; color: var(--muted); }
.tb-bell { position: relative; width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--ink-2); font-size: 15px; flex: none; }
.tb-bell:hover { text-decoration: none; border-color: var(--brand); }
.tb-bell i { position: absolute; top: -6px; right: -6px; background: #c9302c; color: #fff; font-family: var(--mono); font-size: 10.5px; border-radius: 999px; padding: 0 5px; font-style: normal; line-height: 16px; }

/* Znacznik wersji próbnej: nowe konto ma cały panel otwarty przez 90 dni, więc to jedyne
   miejsce, w którym widać, na czym się pracuje i ile zostało. */
.tb-trial {
    flex: none; white-space: nowrap;
    border: 1px solid #cddcec; border-radius: 999px; padding: 5px 11px;
    background: var(--info-bg); color: var(--brand-dark); font-size: 12px;
}
.tb-trial.low { background: var(--warn-bg); border-color: #f0dca6; color: #6d4a00; }
.tb-trial.out { background: var(--danger); border-color: var(--danger); color: #fff; font-weight: 600; }

/* Menu konta na jasnym pasku: ten sam komponent co dotąd, inne kolory. */
.topbar .acct { background: #fff; border-color: var(--line); color: var(--ink); }
.topbar .acct:hover, .topbar .acct[aria-expanded="true"] { background: var(--brand-light); }
.topbar .acct .nm { color: var(--ink); }
.topbar .acct .co, .topbar .acct .car { color: var(--muted); }
.topbar .acct:focus-visible { outline-color: var(--brand); }

/* ---------------------------------------------------------------- Przełącznik kontraktu */

.switcher {
    position: fixed; z-index: 70; left: 12px; top: 64px; width: 400px; max-width: calc(100vw - 24px);
    background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 14px 36px rgba(13,27,42,.22);
    overflow: hidden; color: var(--ink); font-size: 13px;
}
.switcher .sf { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); }
.switcher .sf input { border: 0; outline: 0; flex: 1; font-size: 14px; font-family: inherit; padding: 2px 0; background: transparent; }
.switcher .sf .kbd { font-family: var(--mono); font-size: 10.5px; border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; color: var(--muted); }
.switcher .list { max-height: 50vh; overflow-y: auto; }
.switcher .g { font-family: var(--mono); font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding: 9px 12px 3px; }
.switcher .it {
    display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center;
    padding: 7px 12px; cursor: pointer; color: inherit;
}
.switcher .it:hover, .switcher .it.sel { background: var(--info-bg); text-decoration: none; }
.switcher .it .ccode { width: 30px; height: 30px; font-size: 11.5px; border-radius: 7px; }
.switcher .it b { display: block; font-weight: 600; font-size: 13px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.switcher .it small { display: block; color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.switcher .it .st { font-size: 11.5px; font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.switcher .it .st i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }
.switcher .it .st.crit { color: var(--danger); }
.switcher .it .st.warn { color: var(--warn); }
.switcher .it .st.ok { color: var(--ok); }
.switcher .it .st.new { color: var(--muted); }
.switcher .empty { padding: 16px 12px; color: var(--muted); }
.switcher .ft { display: flex; gap: 14px; flex-wrap: wrap; padding: 9px 12px; border-top: 1px solid var(--line-soft); font-size: 12.5px; }
.switcher .ft a { color: var(--brand); font-weight: 600; }
.switcher .ft span { color: var(--muted); margin-left: auto; font-family: var(--mono); font-size: 10.5px; }

/* ---------------------------------------------------------------- Paleta poleceń */

.palette-back { position: fixed; inset: 0; z-index: 80; background: rgba(13,27,42,.45); display: flex; align-items: flex-start; justify-content: center; padding: 10vh 16px 0; }
.palette {
    width: 640px; max-width: 100%; background: #fff; border-radius: 12px; box-shadow: 0 20px 50px rgba(13,27,42,.35);
    overflow: hidden; color: var(--ink); font-size: 13.5px;
}
.palette .sf { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); }
.palette .sf .ico { font-size: 16px; color: var(--muted); }
.palette .sf input { border: 0; outline: 0; flex: 1; font-size: 16px; font-family: inherit; background: transparent; }
.palette .sf .kbd { font-family: var(--mono); font-size: 10.5px; border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; color: var(--muted); }
.palette .list { max-height: 60vh; overflow-y: auto; }
.palette .g { font-family: var(--mono); font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding: 10px 14px 3px; }
.palette .it { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 14px; cursor: pointer; color: inherit; }
.palette .it:hover, .palette .it.sel { background: var(--info-bg); text-decoration: none; }
.palette .it .ic { width: 30px; height: 30px; border-radius: 7px; background: var(--line-soft); color: var(--ink-2); display: flex; align-items: center; justify-content: center; font-size: 13px; }
.palette .it b { display: block; font-weight: 600; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette .it small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette .it .kb { font-family: var(--mono); font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.palette .empty { padding: 18px 14px; color: var(--muted); }
.palette .ft { display: flex; gap: 14px; padding: 9px 14px; border-top: 1px solid var(--line-soft); font-size: 12px; color: var(--muted); }
.palette .ft span { margin-left: auto; font-family: var(--mono); font-size: 10.5px; }

/* ---------------------------------------------------------------- Telefon i wąskie okno */

.sb-backdrop { position: fixed; inset: 0; z-index: 55; background: rgba(13,27,42,.45); }

@media (max-width: 960px) {
    .shell { grid-template-columns: 1fr; }
    .sb { position: fixed; top: 0; left: 0; bottom: 0; width: 272px; height: auto; z-index: 60; transform: translateX(-100%); transition: transform .18s ease; box-shadow: 0 0 40px rgba(0,0,0,.35); }
    body.sb-open .sb { transform: none; }
    .sb-close { display: block; }
    .tb-menu { display: inline-flex; align-items: center; justify-content: center; }
    .topbar { padding: 0 14px; gap: 10px; }
    .tb-search { flex: 1; }
    .tb-search .kbd { display: none; }
    .crumbs { display: none; }
    .switcher { left: 8px; top: 60px; }
    .tb-trial { padding: 4px 8px; font-size: 11px; }
}
@media (max-width: 560px) {
    .tb-trial { display: none; }
    .tb-search .lbl { display: none; }
    .tb-search { flex: 0 0 auto; padding: 7px 9px; }
}
@media (prefers-reduced-motion: reduce) { .sb { transition: none; } }

/* ==========================================================================
   Pulpity
   ========================================================================== */

.dash { max-width: 1440px; margin: 0 auto; padding: 18px 22px 60px; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.dash.one { grid-template-columns: minmax(0, 1fr); }
.dash-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
/* Szyna jest przyklejona i ma wysokość okna: czat z kontraktem (ostatni element) rozciąga
   się do dolnej krawędzi, a rozmowa przewija się w środku, nie razem ze stroną. */
.dash-rail { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 72px; height: calc(100vh - 88px); min-height: 480px; }
@media (max-width: 1180px) { .dash { grid-template-columns: 1fr; } .dash-rail { position: static; height: auto; min-height: 0; } }
@media (max-width: 960px) { .dash { padding: 14px 14px 50px; } }

.dash-hd { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.dash-hd h1 { font-size: 22px; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.dash-hd .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.dash-hd .sub b { color: var(--danger); font-weight: 600; }

.health { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; font-weight: 600; font-size: 12.5px; white-space: nowrap; }
.health i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.health.crit { background: var(--danger-bg); color: var(--danger); }
.health.warn { background: var(--warn-bg); color: var(--warn); }
.health.ok { background: var(--ok-bg); color: var(--ok); }
.health.new { background: var(--line-soft); color: var(--ink-2); }
.health.sm { padding: 3px 9px; font-size: 11.5px; }

/* --- faza kontraktu */
.phasebar { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; font-size: 12.5px; }
.phasebar .lbl { color: var(--muted); }
.phasebar .lbl b { color: var(--ink); font-weight: 600; }
.phasebar .bar { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: var(--line-soft); position: relative; overflow: visible; }
.phasebar .bar i { position: absolute; inset: 0 auto 0 0; background: var(--brand); border-radius: 4px; }
.phasebar .bar em { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--amber); }
.phasebar .ticks { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 10px; font-family: var(--mono); font-size: 10.5px; color: var(--muted); flex-wrap: wrap; }
.phasebar .ticks span.done { color: var(--ok); }
.phasebar .ticks span.past { color: #b3bdc8; }
@media (max-width: 720px) { .phasebar { grid-template-columns: 1fr; } }

/* --- sekcja (karta) pulpitu */
.dcard { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.dcard > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.dcard > header h2 { font-size: 13.5px; font-weight: 600; margin: 0; }
.dcard > header h2 small { font-family: var(--mono); font-weight: 400; font-size: 11px; color: var(--muted); margin-left: 8px; }
.dcard > header a { font-size: 12px; }
.dcard > .in { padding: 10px 14px; }
.dcard > .in.tight { padding: 0; }
.dcard .none { padding: 16px 14px; color: var(--muted); font-size: 12.5px; }
.dash-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .dash-two { grid-template-columns: 1fr; } }

/* --- pilne */
.urgent { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.ucard { position: relative; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--danger); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.ucard.p2 { border-left-color: #d97706; }
.ucard .kind { display: flex; gap: 6px; align-items: center; font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ucard .kind .due { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--danger); }
.ucard .kind .due.today { color: var(--warn); }
.ucard .t { font-weight: 600; font-size: 13.5px; line-height: 1.3; }
.ucard .d { font-size: 12px; color: var(--ink-2); }
.ucard .why { font-size: 12px; color: var(--muted); font-style: italic; }
.ucard .why::before { content: "✦ "; color: var(--brand); font-style: normal; }
.ucard .acts { display: flex; gap: 6px; margin-top: 2px; flex-wrap: wrap; }

/* --- listy wierszy (do decyzji, w toku) */
.drow { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 14px; border-bottom: 1px solid var(--line-soft); }
.drow:last-child { border-bottom: 0; }
.drow .ic { width: 28px; height: 28px; border-radius: 7px; display: flex; align-items: center; justify-content: center; background: var(--line-soft); color: var(--ink-2); font-size: 13px; }
.drow .ic.warn { background: var(--warn-bg); color: var(--warn); }
.drow .ic.crit { background: var(--danger-bg); color: var(--danger); }
.drow .ic.ok { background: var(--ok-bg); color: var(--ok); }
.drow .ic.info { background: var(--info-bg); color: var(--brand); }
.drow .t { font-weight: 600; font-size: 13px; line-height: 1.3; }
.drow .d { font-size: 12px; color: var(--muted); }
.drow .d b { color: var(--ink-2); font-weight: 600; }
.drow .r { font-size: 12px; color: var(--muted); text-align: right; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.prog { height: 6px; border-radius: 3px; background: var(--line-soft); overflow: hidden; width: 96px; }
.prog i { display: block; height: 100%; background: var(--brand); border-radius: 3px; }
.prog.pulse i { background: repeating-linear-gradient(90deg, var(--brand) 0 6px, #7fa5c9 6px 12px); animation: prog-move 1.2s linear infinite; }
@keyframes prog-move { from { background-position: 0 0; } to { background-position: 24px 0; } }
@media (prefers-reduced-motion: reduce) { .prog.pulse i { animation: none; } }

/* --- najbliższe dni */
.day { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; padding: 8px 14px; border-bottom: 1px solid var(--line-soft); }
.day:last-child { border-bottom: 0; }
.day .dt { font-family: var(--mono); font-size: 11.5px; color: var(--muted); line-height: 1.3; padding-top: 2px; }
.day .dt b { display: block; color: var(--ink); font-weight: 600; font-size: 12.5px; }
.day .dt.today b { color: var(--warn); }
.day .dt.past b { color: var(--danger); }
.day .items { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.day .it { display: flex; align-items: center; gap: 8px; font-size: 12.5px; min-width: 0; }
.day .it a { color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.day .it .k { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--line-soft); padding: 1px 6px; border-radius: 4px; white-space: nowrap; flex: none; }
.day .it .k.crit { background: var(--danger-bg); color: var(--danger); }
.day .it .k.warn { background: var(--warn-bg); color: var(--warn); }
.day .it .who { margin-left: auto; color: var(--muted); font-size: 11.5px; white-space: nowrap; flex: none; }

/* --- obszary */
.areas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.area { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); border-right: 1px solid var(--line-soft); align-items: start; color: inherit; }
.area:hover { background: #fafbfc; text-decoration: none; }
.area:nth-child(2n) { border-right: 0; }
.area:nth-last-child(-n+2) { border-bottom: 0; }
.area .ic { width: 28px; height: 28px; border-radius: 7px; background: var(--info-bg); color: var(--brand); display: flex; align-items: center; justify-content: center; }
.area .ic svg { width: 15px; height: 15px; }
.area.locked .ic { background: var(--line-soft); color: var(--muted); }
.area .t { font-weight: 600; font-size: 13px; }
.area .s { font-size: 12px; color: var(--muted); line-height: 1.35; }
.area .s.crit { color: var(--danger); font-weight: 600; }
.area .s.warn { color: var(--warn); font-weight: 600; }
.area .s.ok { color: var(--ink-2); }
@media (max-width: 560px) { .areas { grid-template-columns: 1fr; } .area { border-right: 0; } .area:nth-last-child(2) { border-bottom: 1px solid var(--line-soft); } }

/* --- kronika */
.ev { display: grid; grid-template-columns: 92px 22px minmax(0, 1fr); gap: 10px; padding: 7px 14px; border-bottom: 1px solid var(--line-soft); font-size: 12.5px; align-items: start; }
.ev:last-child { border-bottom: 0; }
.ev .w { font-family: var(--mono); font-size: 11px; color: var(--muted); padding-top: 2px; white-space: nowrap; }
.ev .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); margin: 6px auto 0; }
.ev .dot.ai { background: var(--amber); }
.ev .dot.mail { background: #7048e8; }
.ev .dot.file { background: var(--brand); }
.ev .dot.ok { background: var(--ok); }
.ev .dot.alert { background: var(--danger); }
.ev .x a { color: var(--ink); }
.ev .x .ccode { margin-right: 6px; vertical-align: -5px; }
@media (max-width: 560px) { .ev { grid-template-columns: 22px minmax(0, 1fr); } .ev .w { grid-column: 2; padding-top: 0; } }

/* --- szyna: skróty, czat z kontraktem */
.ask { background: var(--navy); color: #dbe5ef; border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; flex: 1; min-height: 300px; }
.ask h3 { font-size: 13.5px; font-weight: 600; color: #fff; margin: 0 0 8px; display: flex; align-items: center; justify-content: space-between; }
.ask h3 .lnk { background: none; border: 0; color: #8ea3b8; font-size: 11.5px; cursor: pointer; font-family: inherit; padding: 2px 4px; }
.ask h3 .lnk:hover { color: #fff; }
.ask .log { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 2px 2px 8px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
.ask .msg { font-size: 12.5px; line-height: 1.5; border-radius: 10px; padding: 8px 11px; max-width: 94%; white-space: pre-wrap; word-break: break-word; }
.ask .msg.me { align-self: flex-end; background: var(--amber); color: #16395a; font-weight: 600; border-bottom-right-radius: 3px; }
.ask .msg.ai { align-self: flex-start; background: rgba(255,255,255,.08); color: #e8eef5; border-bottom-left-radius: 3px; }
.ask .msg.ai.wait { color: #a9bdd2; }
.ask .msg .src { margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.12); font-size: 11.5px; color: #cfdceb; white-space: normal; }
.ask .msg .src a { color: #f0c46a; }
.ask .msg .follow { margin-top: 6px; color: #f0c46a; font-size: 12px; }
.ask .msg .lnk { background: none; border: 0; padding: 0; color: #f0c46a; font: inherit; text-decoration: underline; cursor: pointer; }
.ask .msg .lnk:disabled { opacity: .5; cursor: default; }
.ask form { display: flex; gap: 6px; align-items: flex-end; margin-top: 4px; }
.ask textarea { flex: 1; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 8px; padding: 8px 10px; font-size: 12.5px; color: #fff; resize: none; min-height: 38px; max-height: 120px; font-family: inherit; line-height: 1.4; }
.ask textarea::placeholder { color: #a9bdd2; }
.ask textarea:focus { outline: 2px solid var(--amber); border-color: transparent; }
.ask .go { background: var(--amber); color: #16395a; font-weight: 700; padding: 8px 12px; border-radius: 8px; border: 0; cursor: pointer; font-family: inherit; font-size: 12.5px; }
.ask .go:disabled { opacity: .6; cursor: default; }
.ask .hint { font-size: 11px; color: #8ea3b8; margin-top: 6px; }
.ask .chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 8px; }
.ask .chips button { font-size: 11px; padding: 3px 8px; border-radius: 999px; border: 1px solid rgba(255,255,255,.16); color: #cfdceb; background: none; cursor: pointer; font-family: inherit; }
.ask .chips button:hover { background: rgba(255,255,255,.1); }
.ask .spinner { border-color: rgba(255,255,255,.25); border-top-color: #fff; }
@media (max-width: 1180px) { .ask { min-height: 0; } .ask .log { max-height: 50vh; } }

.short .avs { display: inline-flex; }
.short .avs .av { margin-right: -6px; border: 2px solid #fff; }

.short { display: flex; flex-direction: column; }
.short a { display: flex; align-items: center; gap: 9px; padding: 8px 14px; border-bottom: 1px solid var(--line-soft); font-size: 12.5px; color: var(--ink); font-weight: 600; }
.short a:last-child { border-bottom: 0; }
.short a:hover { background: #fafbfc; text-decoration: none; }
.short a .ic { width: 20px; text-align: center; color: var(--brand); }
.short a .kb { margin-left: auto; font-family: var(--mono); font-size: 10.5px; color: var(--muted); font-weight: 400; }
.short .av { width: 22px; height: 22px; border-radius: 50%; color: #fff; font-size: 9px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }

.checklist { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; }
.checklist a { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ink); }
.checklist .ck { width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-size: 10px; color: #fff; flex: none; }
.checklist .ck.on { background: var(--ok); border-color: var(--ok); }
.checklist a.done { color: var(--muted); text-decoration: line-through; }

/* --- Moje biuro: karty kontraktów */
.pf { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.pc { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; border-top: 3px solid var(--c, var(--brand)); }
.pc .hd2 { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; align-items: center; }
.pc .nm { font-weight: 600; font-size: 13.5px; line-height: 1.25; }
.pc .nm a { color: var(--ink); }
.pc .no { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.pc .health { align-self: flex-start; }
.pc .kv { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; font-size: 12px; color: var(--ink-2); }
.pc .kv span { display: flex; justify-content: space-between; gap: 6px; border-bottom: 1px dotted var(--line); padding: 2px 0; }
.pc .kv span b { font-family: var(--mono); font-weight: 500; color: var(--ink); }
.pc .kv span b.crit { color: var(--danger); font-weight: 700; }
.pc .kv span b.warn { color: var(--warn); font-weight: 700; }
.pc .last { font-size: 11.5px; color: var(--muted); border-top: 1px solid var(--line-soft); padding-top: 7px; margin-top: 2px; }
.pc .last b { color: var(--ink-2); font-weight: 600; }
.pc .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.pc.new { border-top-color: var(--line); }
.pc.new .no { color: var(--ink-2); }
.pc .newlist { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; }
.pc .newlist .ok { color: var(--ok); }

/* --- oś 14 dni */
.strip { display: grid; grid-template-columns: repeat(15, minmax(0, 1fr)); gap: 3px; padding: 12px 14px 8px; }
.strip .dcol { display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; border-radius: 6px; padding: 2px 0; }
.strip .dcol:hover, .strip .dcol.sel { background: var(--line-soft); }
.strip .dcol .dl { font-family: var(--mono); font-size: 10px; color: var(--muted); }
.strip .dcol .dl.wk { color: #b3bdc8; }
.strip .dcol .dl.today { color: var(--warn); font-weight: 600; }
.strip .dcol .dl.past { color: var(--danger); }
.strip .dcol .dots { display: flex; flex-direction: column-reverse; gap: 2px; min-height: 44px; justify-content: flex-start; }
.strip .dcol .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--brand)); display: block; }
.strip .dcol .dots i.crit { background: var(--danger); }
.strip .dcol .dots i.warn { background: #d97706; }
.strip .dcol .dots .more { font-family: var(--mono); font-size: 9px; color: var(--muted); }
.legend { display: flex; gap: 14px; padding: 0 14px 10px; font-size: 11.5px; color: var(--muted); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.strip-day { border-top: 1px solid var(--line-soft); }

/* --- zakładki Moje biuro */
.biuro-tabs { max-width: 1440px; margin: 0 auto; padding: 16px 22px 0; }
@media (max-width: 960px) { .biuro-tabs { padding: 12px 14px 0; } }

/* --- lista zadań: piąta kolumna (zamówienia) */
.todo-board { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1400px) { .todo-board { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1000px) { .todo-board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px)  { .todo-board { grid-template-columns: 1fr; } }
.todo-kind.order { background: #fdf3e3; color: #b45309; }

/* ==========================================================================
   Pasek boczny bez akordeonu (docs/16, wrzesień 2026): obszar to jeden wiersz,
   po najechaniu (albo dotknięciu na telefonie) podręczne menu z funkcjami, ich
   stanem i głównym działaniem; kliknięcie wiersza otwiera pierwszą funkcję.
   Plakietki tylko dla zaległości i decyzji: zwykła liczba nie jest alarmem.
   ========================================================================== */

.sb-nav .ni.grp { position: relative; margin-top: 1px; }
.sb-nav a.ga { font-weight: 500; color: #dbe5ef; }
.sb-nav a.ga .car { flex: none; color: #6f859b; font-size: 11px; line-height: 1; transition: transform .15s, color .15s; }
.sb-nav .ni.grp:hover > a.ga .car, .sb-nav .ni.grp.open > a.ga .car { color: #fff; transform: translateX(2px); }
.sb-nav a .dot { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 11px; font-weight: 600; }
.sb-nav a .dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.sb-nav a .dot.crit { color: #ff8a8a; }
.sb-nav a .dot.warn { color: #f0c46a; }
.sb-nav a .cnt { font-family: var(--mono); font-size: 11px; color: #7f93a8; }

/* Podręczne menu jest przypięte do okna (position: fixed), bo pasek przewija się i obcina
   wszystko, co wystaje poza jego krawędź; położenie ustawia app.js przy najechaniu. */
.sb-nav .fly {
    position: fixed; left: calc(var(--sb-w) + 4px); top: 0; width: 304px; z-index: 65;
    background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 12px;
    box-shadow: 0 14px 36px rgba(13,27,42,.24); padding: 10px; display: none;
}
/* Mostek między wierszem paska a menu: szeroki na całą szczelinę (padding paska + odstęp),
   żeby ruch kursora w prawo nie chował menu. Klasa .stay trzyma menu chwilę po zjechaniu
   z wiersza (ruch po skosie przecina sąsiedni wiersz) - ustawia ją app.js. */
.sb-nav .fly::before { content: ""; position: absolute; left: -28px; top: -8px; bottom: -8px; width: 28px; }
.sb-nav .ni.grp:hover > .fly, .sb-nav .ni.grp.stay > .fly, .sb-nav .ni.grp:focus-within > .fly { display: block; }
.sb-nav .fly h4 { margin: 2px 8px 8px; font: 600 10.5px/1 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.sb-nav .fly a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 8px 10px; border-radius: 8px; align-items: center; color: var(--ink); font-size: 13.5px; }
.sb-nav .fly a:hover { background: var(--info-bg); color: var(--ink); }
.sb-nav .fly a.on { background: var(--brand-light); }
.sb-nav .fly a.locked { color: var(--muted); }
.sb-nav .fly a b { display: block; font-weight: 600; line-height: 1.25; }
.sb-nav .fly a small { display: block; color: var(--muted); font-size: 12px; line-height: 1.3; }
.sb-nav .fly a.on small { color: var(--ink-2); }
.sb-nav .fly a .dot.crit { color: var(--danger); }
.sb-nav .fly a .dot.warn { color: var(--warn); }
.sb-nav .fly a .lock { font-size: 12px; }
.sb-nav .fly .act { margin: 8px 4px 2px; border-top: 1px solid var(--line-soft); padding-top: 10px; }
.sb-nav .fly .act a { display: flex; justify-content: center; padding: 8px 12px; border-radius: 8px; background: var(--brand); color: #fff; font-weight: 600; font-size: 13px; }
.sb-nav .fly .act a:hover { background: var(--brand-dark); }

/* Telefon i wąskie okno: zamiast podręcznego menu funkcje rozwijają się pod wierszem. */
.sb-nav .kids { display: none; flex-direction: column; gap: 1px; margin-left: 14px; border-left: 1px solid rgba(255,255,255,.1); padding-left: 4px; }
.sb-nav .ni.grp.open > .kids { display: flex; }
@media (max-width: 960px) { .sb-nav .fly { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .sb-nav a.ga .car { transition: none; } }

/* ---------------------------------------------------------------- Pasek górny: „+ Nowe” */

.tb-new { position: relative; flex: none; }
.tb-new-btn {
    display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px 0 10px; border-radius: 8px;
    background: var(--brand); color: #fff; border: 1px solid var(--brand); font: 600 13px var(--font); cursor: pointer;
}
.tb-new-btn:hover, .tb-new-btn[aria-expanded="true"] { background: var(--brand-dark); }
.tb-new-btn span:first-child { font-size: 17px; line-height: 1; font-weight: 500; }
.tb-new-menu {
    position: absolute; top: calc(100% + 8px); right: 0; width: 272px; z-index: 70;
    background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 36px rgba(13,27,42,.22); padding: 8px;
}
.tb-new-menu .g { font-family: var(--mono); font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding: 8px 10px 4px; }
.tb-new-menu a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; font-size: 13.5px; color: var(--ink); }
.tb-new-menu a:hover { background: var(--info-bg); text-decoration: none; }
.tb-new-menu a svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
@media (max-width: 560px) { .tb-new-btn .lbl { display: none; } .tb-new-btn { padding: 0 9px; } }

/* ==========================================================================
   Pulpit kontraktu, wersja druga (docs/16): siatka dwunastu kolumn, karty liczb,
   „Wymaga Twojej uwagi”, 14 dni, wykresy, płaskie karty obszarów, kronika z mapą.
   Barwy serii wykresów (--s1..--s4) sprawdzone walidatorem na ślepotę barw;
   kolory oceny (czerwień, bursztyn, zieleń) tylko dla oceny, nigdy jako seria.
   ========================================================================== */

:root {
    --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #4a3aa7;
    --seq-1: #dbe8f8; --seq-2: #86b6ef; --seq-3: #2a78d6; --seq-4: #184f95;
    --grid: #e6ebf0; --axis: #c5ced8; --de: #c9d2dc;
}

.pulpit-dash { max-width: none; padding: 0; gap: 0; grid-template-columns: minmax(0, 1fr) 360px; align-items: stretch; }
.pulpit-dash .dash-col { gap: 18px; width: 100%; max-width: 1320px; margin: 0 auto; padding: 22px 24px 60px; }
.pulpit-dash .dash-rail {
    gap: 0; position: sticky; top: 56px; height: calc(100vh - 56px); min-height: 0;
    background: var(--navy); border-left: 1px solid rgba(255,255,255,.08);
}
.pulpit-dash .dash-rail .ask { flex: 1; min-height: 0; height: 100%; border-radius: 0; padding: 14px 16px; }
.pulpit-dash.one { grid-template-columns: minmax(0, 1fr); }
.pulpit-dash .hd-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pulpit-dash .hd-acts .btn .n { margin-left: 4px; color: var(--danger); font-family: var(--disp); }
@media (max-width: 1180px) {
    .pulpit-dash { grid-template-columns: 1fr; }
    .pulpit-dash .dash-rail { position: static; height: auto; background: none; border-left: 0; padding: 0 24px 40px; }
    .pulpit-dash .dash-rail .ask { border-radius: 10px; min-height: 360px; }
}
@media (max-width: 960px) { .pulpit-dash .dash-col { padding: 14px 14px 40px; } .pulpit-dash .dash-rail { padding: 0 14px 40px; } }

/* --- nagłówek */
.p2-hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.p2-hd h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; margin: 0; }
.p2-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); background: var(--surface); }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.plain::before { display: none; }
.chip.crit { background: var(--danger-bg); color: var(--danger); border-color: transparent; font-weight: 600; }
.chip.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; font-weight: 600; }
.chip.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; font-weight: 600; }
.chip.new { background: var(--line-soft); color: var(--ink-2); border-color: transparent; font-weight: 600; }

/* --- siatka kart: dwanaście kolumn, karta mówi, ile zajmuje (--span) */
.p2-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; grid-auto-flow: dense; align-items: stretch; }
.p2-grid .empty { grid-column: 1 / -1; }
.p2-card { grid-column: span var(--span, 12); min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 1px 2px rgba(13,27,42,.04), 0 2px 8px rgba(13,27,42,.05); display: flex; flex-direction: column; }
.p2-card.bare { background: none; border: 0; box-shadow: none; }
.p2-card > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px 0; flex-wrap: wrap; }
.p2-card > header h2 { font-size: 15.5px; font-weight: 700; margin: 0; min-width: 0; }
.p2-card > header h2 small { white-space: nowrap; }
.p2-card > header h2 small { font: 500 12.5px var(--font); color: var(--muted); margin-left: 8px; }
.p2-card > header a { font-size: 13px; color: var(--brand-dark); font-weight: 600; }
.p2-card > .in { padding: 12px 18px 16px; flex: 1; min-width: 0; }
.p2-card .none { padding: 14px 0; color: var(--muted); font-size: 13px; }

/* --- podpowiedzi „co to jest”: przegląd panelu dla kogoś, kto wszedł pierwszy raz.
   Ton informacyjny, nie ostrzegawczy, i zawsze POD nagłówkiem karty, żeby liczby zostały
   na swoim miejscu. Znika przyciskiem „Podpowiedzi” w nagłówku pulpitu. */
.p2-hint {
    margin: 10px 18px 0; padding: 9px 12px;
    background: var(--info-bg); border-left: 3px solid #a8c6e0; border-radius: 0 8px 8px 0;
    color: var(--ink-2); font-size: 12.5px; line-height: 1.5;
}
.p2-card.kpi .p2-hint { margin: 0 14px 14px; }
.start-tile .p2-hint { margin: 0; }
.p2-card.bare .p2-hint { margin: 0 0 4px; }
.ask .p2-hint { margin: 0 0 10px; }
#hintsBtn.on { background: var(--brand-light); border-color: var(--brand); color: var(--brand-dark); }
.p2-card .more { display: block; padding-top: 10px; font-size: 13px; font-weight: 600; color: var(--brand-dark); }
@media (max-width: 1400px) { .p2-card[data-card="time"], .p2-card[data-card="money"], .p2-card[data-card="schedule"], .p2-card[data-card="mail"] { --span: 6; } .p2-card[data-card="progress"], .p2-card[data-card="correspondence"] { --span: 6; } .p2-card[data-card="cards"] { --span: 12; } }
@media (max-width: 1000px) { .p2-card[data-card="attention"], .p2-card[data-card="upcoming"] { --span: 12; } }
@media (max-width: 640px) { .p2-card { --span: 12 !important; } }

/* --- start nowego kontraktu (checklista) */
.start-tile { padding: 14px 18px 12px; gap: 10px; }
.start-tile .ph { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: center; }
.start-tile .ph .ic { width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, #b45309, #e8871a); color: #fff; display: flex; align-items: center; justify-content: center; }
.start-tile .ph .ic svg { width: 19px; height: 19px; }
.start-tile .ph h2 { font-size: 16px; font-weight: 700; margin: 0; }
.start-tile .ph .st { font-size: 12px; color: var(--muted); margin-top: 3px; display: flex; align-items: center; gap: 6px; }
.start-tile .ph .st i { width: 7px; height: 7px; border-radius: 50%; background: #d97706; }
.start-tile .checklist { padding: 4px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 18px; }

/* --- Generator KZM: jedyny kafelek pulpitu w kolorach marki. Wyróżnienie jest zamierzone -
   to funkcja, po którą użytkownik przychodzi i którą reklamujemy na zewnątrz. */
.kzm-tile {
    display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 16px; align-items: center;
    padding: 16px 18px; color: #fff; border: 0;
    background: linear-gradient(120deg, var(--brand-dark) 0%, var(--brand) 55%, #2f6fa6 100%);
    box-shadow: 0 2px 6px rgba(13, 27, 42, .12), 0 8px 22px rgba(31, 78, 121, .18);
    transition: transform .12s ease, box-shadow .12s ease;
}
.kzm-tile:hover { transform: translateY(-1px); box-shadow: 0 3px 8px rgba(13, 27, 42, .16), 0 12px 28px rgba(31, 78, 121, .24); }
.kzm-tile .ic {
    width: 46px; height: 46px; border-radius: 13px; display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22);
}
.kzm-tile .ic svg { width: 23px; height: 23px; }
.kzm-tile .tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kzm-tile .tx strong { font-family: var(--disp); font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.kzm-tile .tx em { font-style: normal; font-size: 13.5px; font-weight: 600; color: #d6e5f2; }
.kzm-tile .tx small { font-size: 12.5px; color: #bcd3e8; line-height: 1.45; max-width: 74ch; }
.kzm-tile .go { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; text-align: right; flex: none; }
.kzm-tile .go b {
    font-size: 13.5px; font-weight: 700; color: var(--brand-dark); background: #fff;
    padding: 8px 16px; border-radius: 999px; white-space: nowrap;
}
.kzm-tile .go small { font-size: 11.5px; color: #bcd3e8; }
.kzm-tile.locked { background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.kzm-tile.locked:hover { transform: none; }
.kzm-tile.locked .ic { background: var(--brand-light); border-color: var(--line); color: var(--brand); }
.kzm-tile.locked .tx em { color: var(--ink-2); }
.kzm-tile.locked .tx small, .kzm-tile.locked .go small { color: var(--muted); }
.kzm-tile.locked .go b { background: var(--brand-light); color: var(--brand-dark); }

@media (max-width: 720px) {
    .kzm-tile { grid-template-columns: 40px minmax(0, 1fr); }
    .kzm-tile .ic { width: 40px; height: 40px; border-radius: 11px; }
    .kzm-tile .go { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; text-align: left; }
}

/* --- karty liczb */
.p2-card.kpi { padding: 16px 18px 14px; gap: 6px; min-height: 152px; }
.kpi .l { font-family: var(--mono); font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); font-weight: 500; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.kpi .l a { font-family: var(--font); color: var(--brand-dark); text-transform: none; letter-spacing: 0; font-weight: 600; font-size: 12.5px; }
.kpi .v { font-family: var(--disp); font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; min-height: 32px; }
.kpi .v small { font-family: var(--font); font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-left: 6px; }
.kpi .d { font-size: 13px; color: var(--ink-2); display: flex; gap: 6px 12px; flex-wrap: wrap; min-height: 18px; }
.kpi .d .crit { color: var(--danger); font-weight: 600; }
.kpi .d .warn { color: var(--warn); font-weight: 600; }
.kpi .d .ok { color: var(--ok); font-weight: 600; }
.kpi .viz { margin-top: auto; padding-top: 8px; }
.meter { height: 8px; border-radius: 4px; background: var(--seq-1); position: relative; }
.meter i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--seq-3); }
.meter b { position: absolute; top: -3px; width: 1px; height: 14px; background: var(--axis); }
.meter em { position: absolute; top: -3px; width: 2px; height: 14px; background: var(--ink); border-radius: 1px; margin-left: -1px; }
.ticks { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--muted); margin-top: 6px; }
.stack { display: flex; height: 10px; border-radius: 5px; overflow: hidden; gap: 2px; }
.stack i { display: block; height: 100%; }
.leg { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--ink-2); margin-top: 8px; }
.leg span { display: inline-flex; align-items: center; gap: 6px; }
.leg span::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }
.leg span.ln::before { height: 2px; width: 14px; border-radius: 1px; }
.leg span.dash::before { background: repeating-linear-gradient(90deg, var(--c) 0 4px, transparent 4px 7px); }

/* --- wymaga uwagi */
.att { display: flex; flex-direction: column; }
.att > a { display: grid; grid-template-columns: 4px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line-soft); color: var(--ink); }
.att > a:first-child { border-top: 0; }
.att > a:hover { text-decoration: none; }
.att > a:hover b { color: var(--brand-dark); }
.att i { width: 4px; align-self: stretch; min-height: 34px; border-radius: 2px; background: #d97706; }
.att i.crit { background: var(--danger); }
.att b { display: block; font-weight: 600; font-size: 14px; line-height: 1.3; }
.att small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.att .tag { font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; color: var(--warn); margin-right: 8px; }
.att .tag.crit { color: var(--danger); }
.att .btn.sm { white-space: nowrap; }

/* --- Listy „Do zrobienia" (docs/22): kafelek na listę, na samej górze pulpitu */
.p2-lists { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.p2-lists > a, .p2-lists > button.new { display: block; border: 1px solid var(--line); border-left: 4px solid var(--c, var(--brand)); border-radius: 10px; padding: 12px 14px; color: var(--ink); background: var(--surface); }
.p2-lists > a:hover, .p2-lists > button.new:hover { text-decoration: none; border-color: var(--brand); box-shadow: 0 2px 8px rgba(13,27,42,.06); }
.p2-lists .nm { font-weight: 700; font-size: 14.5px; line-height: 1.3; }
.p2-lists .cnt { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.p2-lists .cnt b { color: var(--danger); }
.p2-lists ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.p2-lists li { font-size: 12.5px; color: var(--ink-2); line-height: 1.35; display: flex; gap: 6px; align-items: baseline; }
.p2-lists li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--line); flex: none; transform: translateY(-2px); }
.p2-lists li.crit::before { background: var(--danger); }
.p2-lists li .ph { color: var(--muted); }
.p2-lists .more { display: block; font-size: 12px; color: var(--muted); margin-top: 6px; }
.p2-lists > a.new, .p2-lists > button.new {
    border-style: dashed; border-left-style: dashed; border-color: var(--line); color: var(--muted);
    display: flex; align-items: center; justify-content: center; min-height: 92px;
    font-family: inherit; font-weight: 600; font-size: 13.5px; width: 100%; cursor: pointer;
}
.p2-lists > a.new:hover, .p2-lists > button.new:hover { color: var(--brand-dark); border-color: var(--brand); }

/* --- Do zrobienia (docs/21): moje zadania i zlecone innym obok siebie */
.p2-task { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 22px; }
.p2-task > section { min-width: 0; }
.p2-task h3 { margin: 0 0 6px; font-size: 12.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.p2-task .tlist { display: flex; flex-direction: column; }
.p2-task .tlist > .row { display: grid; grid-template-columns: 4px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line-soft); }
.p2-task .tlist > .row:first-child { border-top: 0; }
.p2-task .tlist i { width: 4px; align-self: stretch; min-height: 30px; border-radius: 2px; background: var(--line); }
.p2-task .tlist i.warn { background: #d97706; }
.p2-task .tlist i.crit { background: var(--danger); }
.p2-task .tt { min-width: 0; }
.p2-task .tt b { display: block; font-weight: 600; font-size: 13.5px; line-height: 1.3; color: var(--ink); }
.p2-task .tt small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.p2-task .due { font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.p2-task .due.crit { color: var(--danger); font-weight: 600; }
.p2-task .who { display: flex; flex-direction: column; }
.p2-task .who > a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line-soft); color: var(--ink); }
.p2-task .who > a:first-child { border-top: 0; }
.p2-task .who > a:hover { text-decoration: none; }
.p2-task .who > a:hover b { color: var(--brand-dark); }
.p2-task .who b { display: block; font-weight: 600; font-size: 13.5px; }
.p2-task .who small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.p2-task .who .n { font-family: var(--mono); font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.p2-task .who .n.crit { color: var(--danger); font-weight: 700; }
@media (max-width: 900px) { .p2-task { grid-template-columns: minmax(0, 1fr); } }

/* --- 14 dni */
.nx { display: flex; flex-direction: column; margin-top: 6px; }
.nx a { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-top: 1px solid var(--line-soft); align-items: baseline; color: var(--ink); }
.nx a:first-child { border-top: 0; }
.nx a:hover { text-decoration: none; }
.nx a:hover b { color: var(--brand-dark); }
.nx .dt { font-family: var(--disp); font-weight: 700; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.nx .dt.today { color: var(--danger); }
.nx b { font-weight: 600; font-size: 13.5px; display: block; line-height: 1.3; }
.nx small { color: var(--muted); font-size: 12px; }

/* --- wykresy (charts.js) */
/* Rysunek nigdy nie wychodzi poza swoje pole: przy skrajnych danych słupek potrafił wejść
   na nagłówek karty i zasłonić przełącznik „wykres / tabela”. */
.chart { position: relative; min-width: 0; overflow: hidden; }
.chart svg { width: 100%; height: auto; display: block; }
.chart.tall svg { max-height: 240px; }
.chart text { font-family: var(--font); font-size: 11.5px; fill: var(--muted); }
.chart text.dl { font-weight: 600; fill: var(--ink-2); font-size: 12px; }
.chart text.dl.mu { fill: var(--muted); font-weight: 500; }
.chart text.hl { fill: var(--s2); font-weight: 700; }
.chart text.mu { fill: #b3bdc8; }
.chart .gl { stroke: var(--grid); stroke-width: 1; }
.chart .ax { stroke: var(--axis); stroke-width: 1; }
.chart .cross { stroke: var(--axis); stroke-width: 1; }
.chart .hit { fill: transparent; outline: none; }
.chart .hit:hover, .chart .hit:focus { fill: rgba(42,120,214,.06); }
.chart-none { padding: 18px 0; color: var(--muted); font-size: 13px; }
.chart-none a { font-weight: 600; }
.chart-tip { position: fixed; z-index: 99; pointer-events: none; background: var(--ink); color: #fff; padding: 7px 10px; border-radius: 8px; font-size: 12.5px; line-height: 1.4; box-shadow: 0 8px 24px rgba(13,27,42,.3); max-width: 280px; }
.chart-tip b { display: block; font-weight: 700; margin-bottom: 1px; }
.chart-table { overflow-x: auto; }
.chart-tbl { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 4px; }
.chart-tbl th, .chart-tbl td { padding: 6px 8px; border-bottom: 1px solid var(--line-soft); text-align: right; font-variant-numeric: tabular-nums; }
.chart-tbl th:first-child, .chart-tbl td:first-child { text-align: left; }
.chart-tbl th { color: var(--muted); font-weight: 600; font-size: 12px; }
.tgl { display: inline-flex; border: 1px solid var(--line); border-radius: 7px; overflow: hidden;
    position: relative; z-index: 1; background: var(--card, #fff); }
.tgl:empty { display: none; }
.tgl button { padding: 4px 9px; font-size: 12px; color: var(--muted); font-weight: 600; background: none; border: 0; cursor: pointer; font-family: inherit; }
.tgl button.on { background: var(--brand-light); color: var(--brand-dark); }

/* --- karty i zamówienia: poziome słupki */
.hbars { display: flex; flex-direction: column; gap: 10px; }
.hb { display: grid; grid-template-columns: minmax(120px, 150px) minmax(0, 1fr) 40px; gap: 12px; align-items: center; font-size: 13px; color: var(--ink); }
.hb:hover { text-decoration: none; }
.hb:hover > span:first-child { color: var(--brand-dark); }
.hb small { display: block; color: var(--muted); font-size: 11.5px; }
.hb .bar { height: 10px; border-radius: 5px; background: var(--seq-1); position: relative; overflow: hidden; }
.hb .bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: var(--seq-3); }
.hb .bar i.crit { background: var(--danger); }
.hb .bar i.warn { background: #d97706; }
.hb .n { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; font-family: var(--disp); }
.hb .n.crit { color: var(--danger); }
.hb .n.warn { color: var(--warn); }

/* --- obszary jako płaskie karty */
.p2-sec { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.p2-sec h2 { font-size: 15.5px; font-weight: 700; margin: 0; }
.p2-sec small { font-size: 12.5px; color: var(--muted); }
.p2-areas { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1400px) { .p2-areas { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .p2-areas { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .p2-areas { grid-template-columns: 1fr; } }
.area-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 14px 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; box-shadow: 0 1px 2px rgba(13,27,42,.04), 0 2px 8px rgba(13,27,42,.05); transition: transform .12s, box-shadow .12s; }
.area-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -16px rgba(13,27,42,.4); }
.area-card.locked { background: #fbfcfd; border-style: dashed; box-shadow: none; }
.area-card .ih { display: flex; align-items: center; gap: 10px; color: var(--ink); min-width: 0; }
.area-card .ih:hover { text-decoration: none; }
.area-card .ih:hover h3 { color: var(--brand-dark); }
.area-card .ico { width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center; background: var(--info-bg); color: var(--brand); flex: none; }
.area-card .ico svg { width: 17px; height: 17px; }
.area-card.locked .ico { background: var(--line-soft); color: var(--muted); }
.area-card h3 { font-size: 14px; font-weight: 700; line-height: 1.2; margin: 0; min-width: 0; overflow-wrap: anywhere; }
.area-card .st { font-size: 12px; color: var(--muted); min-height: 16px; line-height: 1.35; }
.area-card .st.crit { color: var(--danger); font-weight: 600; }
.area-card .st.warn { color: var(--warn); font-weight: 600; }
.area-card ul { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.area-card li a { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--ink-2); padding: 3px 0; min-width: 0; }
.area-card li a:hover { color: var(--brand-dark); text-decoration: none; }
.area-card li a.locked { color: var(--muted); }
.area-card li a span { color: #9aa6b4; font-variant-numeric: tabular-nums; font-size: 12px; flex: none; }
.area-card li a span.crit { color: var(--danger); font-weight: 700; }
.area-card li a span.warn { color: var(--warn); font-weight: 700; }
.area-card .act { margin-top: auto; padding-top: 8px; font-size: 12.5px; font-weight: 600; color: var(--brand-dark); }
@media (prefers-reduced-motion: reduce) { .area-card { transition: none; } .area-card:hover { transform: none; } }

/* --- kronika z mapą aktywności */
.kron { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 24px; align-items: start; }
@media (max-width: 760px) { .kron { grid-template-columns: 1fr; } }
.ev2 { display: flex; flex-direction: column; }
.ev2 a { display: grid; grid-template-columns: 86px 14px minmax(0, 1fr); gap: 10px; padding: 7px 0; font-size: 13px; align-items: baseline; border-top: 1px solid var(--line-soft); color: var(--ink); }
.ev2 a:first-child { border-top: 0; }
.ev2 a:hover { text-decoration: none; color: var(--brand-dark); }
.ev2 .t { font-family: var(--mono); color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.ev2 .k { width: 8px; height: 8px; border-radius: 50%; background: var(--line); display: inline-block; position: relative; top: -1px; }
.ev2 .k.ai { background: var(--amber); }
.ev2 .k.mail { background: var(--s4); }
.ev2 .k.file { background: var(--s1); }
.ev2 .k.ok { background: var(--ok); }
.ev2 .k.alert { background: var(--danger); }
.ev2 .k.user { background: var(--s2); }

/*
   Zdarzenie spoza spraw widza. Serwer nie przysyła ani treści, ani adresu (patrz EventFeed),
   więc tu zostaje sam pasek - nie ma czego rozmywać filtrem i nie ma czego wyjąć ze źródła
   strony. Kursor domyślny i brak odnośnika mówią, że nie ma tu dokąd kliknąć.
*/
.ev2 .ev-hid { display: grid; grid-template-columns: 86px 14px minmax(0, 1fr); gap: 10px;
    padding: 7px 0; font-size: 13px; align-items: center; border-top: 1px solid var(--line-soft);
    cursor: default; }
.ev2 .ev-hid:first-child { border-top: 0; }
.ev2 .ev-hid .t { color: var(--muted); opacity: .75; }
.ev2 .ev-hid .k { width: 8px; height: 8px; border-radius: 50%; background: var(--line);
    display: inline-block; }
.ev2 .ev-hid .bar { height: 9px; border-radius: 5px;
    background: repeating-linear-gradient(90deg, var(--line) 0 14px, var(--line-soft) 14px 22px);
    filter: blur(1.5px); opacity: .85; }
.heat { --cell: 18px; display: grid; grid-auto-rows: var(--cell); gap: 3px; justify-content: start; }
.heat i { display: block; border-radius: 4px; background: var(--seq-1); outline: none; }
.heat i.void { background: transparent; }
.heat i[data-l="1"] { background: var(--seq-2); }
.heat i[data-l="2"] { background: var(--seq-3); }
.heat i[data-l="3"] { background: var(--seq-4); }
.heat i:hover, .heat i:focus { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--ink); }
.heat-l { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 6px; width: calc(8 * 18px + 7 * 3px); }
.heatwrap .leg { margin-top: 8px; }

/* --- Dostosuj: lista kart */
.p2-layout { display: flex; flex-direction: column; gap: 4px; }
.p2-layout .row { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.p2-layout .row:hover { background: #fafbfc; }
.p2-layout .row .t { font-weight: 600; font-size: 13.5px; }
.p2-layout .row:has(input:not(:checked)) .t { color: var(--muted); font-weight: 500; }
.p2-layout .mv { display: inline-flex; gap: 4px; }
.p2-layout .mv button { width: 26px; height: 26px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink-2); cursor: pointer; font-size: 11px; }
.p2-layout .mv button:hover { border-color: var(--brand); color: var(--brand); }

/* --- pierwsze wejście do poczty: trzy kroki (Mail.cshtml) */
.firstrun { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.firstrun li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.firstrun li .no { width: 28px; height: 28px; border-radius: 50%; background: var(--line-soft); display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 12px; }
.firstrun li.done .no { background: var(--ok); color: #fff; }
.firstrun li.done b { color: var(--muted); text-decoration: line-through; }
.firstrun li.now { border-color: var(--brand); background: var(--info-bg); }
.firstrun li.now .no { background: var(--brand); color: #fff; }
.firstrun li b { display: block; font-size: 13.5px; }
.firstrun li small { display: block; font-size: 12px; color: var(--muted); }
@media (max-width: 560px) { .firstrun li { grid-template-columns: 28px minmax(0, 1fr); } .firstrun li > .btn, .firstrun li > a { grid-column: 2; justify-self: start; } }

/* ------------------------------------------------------------------ Tryb podglądu modułu
   Moduł, który w tej wersji instalacji nie przyjmuje zapisu (docs/22). Pozycja w pasku ZOSTAJE
   klikalna - ma się dać wejść i zobaczyć, co tam jest - tylko przygasza się razem z kłódką.
   Wyszarzone są dopiero czynności w środku strony. */
.sb-nav a.frozen .t,
.fly a.frozen b { opacity: .62; }
.sb-nav a.frozen .lock,
.fly a.frozen .lock { opacity: .7; }

.freeze-bar { display: flex; align-items: center; gap: 10px; margin: 0 0 2px;
    padding: 10px 22px; background: var(--amber-soft, #fdf6e7); color: var(--ink-2);
    border-bottom: 1px solid var(--line); font-size: 13px; line-height: 1.45; }
.freeze-bar .lock { flex: none; font-size: 15px; }

/* Wyłączona czynność ma wyglądać na wyłączoną, a nie na zepsutą: bez kursora „nie wolno”,
   bo to nie jest błąd użytkownika. */
.shell-main button.frozen,
.shell-main input.frozen,
.shell-main select.frozen,
.shell-main textarea.frozen { opacity: .5; cursor: default; }
.shell-main button.frozen:hover { filter: none; }

/* ==========================================================================
   Okno wyboru wyglądu panelu po zalogowaniu (app.js, KZM.ui), 7.10.2026.
   Dwie karty z małym szkicem układu: nowy (kafelki po bokach, czat w środku) i dotychczasowy
   (pasek boczny, karty pulpitu). Przedrostek uiw-, żeby nie zderzyć się z klasami stron.
   ========================================================================== */
.uiw-back { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; padding: 16px; background: rgba(13, 27, 42, .5); }
.uiw { position: relative; width: min(620px, 100%); background: #fff; border-radius: 20px; padding: 26px 26px 20px; box-shadow: 0 30px 70px -18px rgba(13, 27, 42, .5); }
.uiw h2 { margin: 0 0 4px; font-family: var(--disp, inherit); font-size: 21px; color: var(--ink); }
.uiw > p { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.uiw-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.uiw-opt { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 12px 12px 14px; border: 2px solid var(--line); border-radius: 16px; background: #fff; font: inherit; color: var(--ink); cursor: pointer; transition: border-color .15s, transform .2s, box-shadow .2s; }
.uiw-opt:hover, .uiw-opt:focus-visible { border-color: var(--brand); transform: translateY(-2px); box-shadow: 0 12px 26px -14px rgba(31, 78, 121, .5); outline: none; }
.uiw-opt.on { border-color: var(--brand); background: var(--brand-light); }
.uiw-opt b { font-size: 16px; }
.uiw-opt > span:last-child { font-size: 13px; color: var(--muted); line-height: 1.4; }
.uiw-pic { display: grid; gap: 4px; height: 92px; padding: 8px; border-radius: 10px; background: var(--bg); margin-bottom: 4px; }
.uiw-pic i { display: block; border-radius: 5px; background: #fff; border: 1px solid var(--line); }
.uiw-pic.new { grid-template-columns: 1fr 2.2fr 1fr; grid-template-rows: 1fr 1fr; }
.uiw-pic.new .t { background: linear-gradient(135deg, #6d5ff5, #38bdf8); border: 0; opacity: .75; }
.uiw-pic.new .t:nth-child(2) { grid-column: 1; grid-row: 2; }
.uiw-pic.new .c { grid-column: 2; grid-row: 1 / 3; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; padding: 6px; }
.uiw-pic.new .c u { display: block; height: 7px; border-radius: 4px; background: #e5e9ef; }
.uiw-pic.new .c u:nth-child(2) { width: 60%; align-self: flex-end; background: #dfe7f1; }
.uiw-pic.new .c u:last-child { height: 12px; border: 1px solid var(--line); background: #fff; border-radius: 7px; }
.uiw-pic.new .t:nth-child(4) { grid-column: 3; grid-row: 1; }
.uiw-pic.new .t:nth-child(5) { grid-column: 3; grid-row: 2; }
.uiw-pic.old { grid-template-columns: .8fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
.uiw-pic.old .s { grid-row: 1 / 3; background: #1a3149; border: 0; }
.uiw-keep { display: flex; align-items: center; gap: 8px; margin-top: 16px; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.uiw-keep input { width: 17px; height: 17px; accent-color: var(--brand); }
.uiw-x { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; }
@media (max-width: 560px) { .uiw-opts { grid-template-columns: 1fr; } .uiw-pic { height: 70px; } }
