@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(fonts/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: 200 800;
  font-display: swap;
  src: url(fonts/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;
}

@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url(fonts/source-sans-3-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: 'Source Sans 3';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url(fonts/source-sans-3-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;
}

/* ==========================================================================
   Obieg faktur — system stylów, §5.79 + §5.80 (koncepcja UX Cowork 2026-10-09:
   kolejka i decyzja obok siebie, trzy pytania przy fakturze, rutyna osobno od wyjątków).
   Materiał projektowy dla Astry (AK-66 i kolejne). Jeden arkusz, bez frameworka JS.
   Zasady: kolory wyłącznie przez tokeny; znaczenie koloru stałe w całej
   aplikacji i w mailu; tabela tylko tam, gdzie się porównuje (rejestr).
   ========================================================================== */

/* ---------- 1. Tokeny ---------- */
:root {
  /* tło i tekst — ciepłe neutralne (lekki odcień w stronę akcentu) */
  --bg: #f6f4f0;          /* tło strony */
  --fg: #1f1d1a;          /* tekst podstawowy */
  --muted: #6b645b;       /* tekst drugorzędny */
  --line: #e2ddd4;        /* linie, obramowania */
  --panel: #ffffff;       /* karty, pasek boczny */
  --panel-2: #efebe4;     /* tło pól, wyróżnień w karcie */
  /* akcent — jeden kolor marki (zieleń), tylko dla akcji i stanu „u Ciebie” */
  --accent: #1e6b52;
  --accent-fg: #ffffff;
  --accent-soft: #dff0e8;
  /* kolory znaczeniowe — niezależne od akcentu, te same w mailu */
  --ok: #1f7a4d;   --ok-soft: #dff3e8;    /* zaakceptowana, zgodne, propozycja automatu */
  --warn: #9a6700; --warn-soft: #fff1cc;  /* czeka, uwaga, przypomnienie 1 */
  --bad: #b42318;  --bad-soft: #fde3e1;   /* po terminie, odrzucona, konflikt */
  --info: #3b4d66; --info-soft: #e6ebf2;  /* neutralne: nowa, do wiadomości */
  /* kształt i cień */
  --radius: 14px; --radius-s: 8px;
  --shadow: 0 2px 10px rgba(50, 40, 20, .08);
  /* typografia */
  --font: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Manrope", var(--font);
  --fs-0: 13px; --fs-1: 15px; --fs-2: 17px; --fs-3: 20px; --fs-4: 26px; --fs-5: 34px;
  /* rytm odstępów (wielokrotności 4) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px;
  /* skorupa */
  --rail-w: 220px; --content-w: 1180px;
}
@media (prefers-color-scheme: dark) { :root {
  --bg: #17160f; --fg: #efeae0; --muted: #a69e90; --line: #2f2c24; --panel: #201e17; --panel-2: #2a2720;
  --accent: #7fd0ad; --accent-fg: #0f1f18; --accent-soft: #1e3a2f;
  --ok: #5fc48f; --ok-soft: #163626; --warn: #e2b43b; --warn-soft: #3b2f10; --bad: #f08a80; --bad-soft: #421c19; --info: #aab8cc; --info-soft: #232c38;
  --shadow: 0 2px 10px rgba(0, 0, 0, .45); color-scheme: dark;
} }


/* ---------- 2. Podstawa ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; }
body { margin: 0; min-height: 100%; background: var(--bg); color: var(--fg); font: 400 var(--fs-1)/1.45 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 700; text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: var(--fs-4); } h2 { font-size: var(--fs-3); } h3 { font-size: var(--fs-2); }
p { margin: 0; } p + p { margin-top: var(--s-2); }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
.num, td.num, .kwota { font-variant-numeric: tabular-nums; }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.muted, .instruction { color: var(--muted); }
.instruction { font-size: var(--fs-1); max-width: 70ch; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print { .no-print, .rail, .fab, .toast { display: none !important; } body { background: #fff; color: #000; } .card, .panel { box-shadow: none; border: 1px solid #ccc; } }

/* ---------- 3. Skorupa: pasek boczny + treść ---------- */
.shell { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); gap: var(--s-4); max-width: var(--content-w); margin: 0 auto; padding-inline: var(--s-4); padding-block: var(--s-4) calc(var(--s-6) + env(safe-area-inset-bottom, 0px)); }
.rail { position: sticky; top: var(--s-4); align-self: start; display: flex; flex-direction: column; gap: var(--s-1); background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: var(--s-4) var(--s-3); }
.rail .who { padding: 0 var(--s-2) var(--s-3); border-bottom: 1px solid var(--line); margin-bottom: var(--s-2); }
.rail .who b { display: block; font-family: var(--font-display); }
.rail a { display: flex; justify-content: space-between; align-items: center; gap: var(--s-2); padding: var(--s-2) var(--s-3); border-radius: 10px; color: var(--fg); font-weight: 600; }
.rail a:hover { background: var(--panel-2); text-decoration: none; }
.rail a[aria-current="page"] { background: var(--accent); color: var(--accent-fg); }
.rail a[aria-current="page"] .count { background: rgba(255, 255, 255, .25); color: inherit; }
.rail .count { font-size: var(--fs-0); background: var(--panel-2); border-radius: 999px; padding: 1px 8px; font-variant-numeric: tabular-nums; }
.rail .spacer { flex: 1; min-height: var(--s-3); }
.rail .quiet { font-weight: 500; color: var(--muted); }
.nav-section { margin: var(--s-4) var(--s-3) var(--s-1); padding-top: var(--s-3); border-top: 1px solid var(--line); font-size: var(--fs-0); color: var(--muted); }
.help-page { max-width: 900px; }
.help-page h2 { margin-top: var(--s-6); }
.help-page li { margin-block: var(--s-2); }
.help-page .help-contact { padding: var(--s-3); background: var(--info-soft); border-radius: var(--radius-s); overflow-wrap: anywhere; }
.main { min-width: 0; display: flex; flex-direction: column; gap: var(--s-4); }
.page-head { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: flex-end; justify-content: space-between; }
.page-head .sub { color: var(--muted); margin-top: var(--s-1); }
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .rail { position: static; flex-direction: row; flex-wrap: wrap; padding: var(--s-2); }
  .rail .who, .rail .spacer { display: none; }
  .rail a { padding: var(--s-2) var(--s-3); }
}
/* Nawigacja pomocnicza: powrót z karty i strony rejestru. */
.card-nav { display: flex; flex-wrap: wrap; gap: var(--s-1); }
.card-nav a { padding: var(--s-2) var(--s-3); border-radius: 999px; color: var(--fg); font-weight: 600; }
.card-nav a[aria-current="page"] { background: var(--accent); color: var(--accent-fg); }

/* ---------- 4. Kafelki liczników (filtry) ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--s-3); }
.kpi { text-align: left; background: var(--panel); border: 2px solid transparent; border-radius: var(--radius); padding: var(--s-3) var(--s-4); box-shadow: var(--shadow); cursor: pointer; color: var(--fg); font: inherit; }
.kpi b { display: block; font-family: var(--font-display); font-size: var(--fs-5); line-height: 1; margin-top: var(--s-1); font-variant-numeric: tabular-nums; }
.kpi[aria-pressed="true"] { border-color: var(--accent); }
.kpi.ok b { color: var(--ok); } .kpi.warn b { color: var(--warn); } .kpi.bad b { color: var(--bad); }

/* ---------- 5. Karty i panele ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: var(--s-3); }
.card, .panel, .card-section { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: var(--s-4); min-width: 0; }
.card { position: relative; display: flex; flex-direction: column; gap: var(--s-3); border: 1px solid var(--line); box-shadow: none; }
/* §5.80: stan faktury pokazuje kropka + plakietka, NIE pasek koloru na krawędzi karty */
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; background: var(--info); }
.dot.ok { background: var(--ok); } .dot.warn { background: var(--warn); } .dot.bad { background: var(--bad); } .dot.accent { background: var(--accent); }
.card .row { display: flex; justify-content: space-between; gap: var(--s-3); align-items: flex-start; flex-wrap: wrap; }
.card .amount { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-3); letter-spacing: -.01em; white-space: nowrap; }
.card .amount small { font-size: var(--fs-0); font-weight: 600; }
.card .why { background: var(--panel-2); border-radius: 10px; padding: var(--s-2) var(--s-3); }
.card .why.is-proposal { background: var(--accent-soft); }
.card .actions, .actions { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.card-section + .card-section { margin-top: var(--s-4); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s-3); }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s-3) var(--s-4); }

/* ---------- 6. Plakietki stanu ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 2px 10px; font-size: var(--fs-0); font-weight: 600; white-space: nowrap; background: var(--info-soft); color: var(--info); }
.pill.ok { background: var(--ok-soft); color: var(--ok); } .pill.warn { background: var(--warn-soft); color: var(--warn); } .pill.bad { background: var(--bad-soft); color: var(--bad); } .pill.accent { background: var(--accent-soft); color: var(--accent); }
/* mapa statusów faktury → plakietka (klasa = wartość InvoiceStatus małymi literami) */
.pill.nowa, .pill.przekazana_do_ksiegowosci { background: var(--info-soft); color: var(--info); }
.pill.w_trakcie_weryfikacji, .pill.do_akceptacji_dyrektora, .pill.do_akceptacji_koncowej { background: var(--accent-soft); color: var(--accent); }
.pill.oczekuje_na_korekte { background: var(--warn-soft); color: var(--warn); }
.pill.zaakceptowana { background: var(--ok-soft); color: var(--ok); }
.pill.odrzucona { background: var(--bad-soft); color: var(--bad); }
.pill.zakonczona { background: var(--panel-2); color: var(--muted); }

/* ---------- 7. Przyciski i formularze ---------- */
button, .button, .card-button { font: inherit; font-weight: 600; cursor: pointer; border: 1px solid var(--line); background: var(--panel); color: var(--fg); border-radius: 999px; padding: var(--s-2) var(--s-4); line-height: 1.3; min-height: 36px; }
button:hover, .button:hover, .card-button:hover { background: var(--panel-2); }
button:disabled { opacity: .55; cursor: not-allowed; }
.primary, button[type="submit"]:not(.secondary):not(.quiet):not(.danger) { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.primary:hover, button[type="submit"]:not(.secondary):not(.quiet):not(.danger):hover { filter: brightness(.95); background: var(--accent); }
.secondary { background: var(--panel); }
.quiet { background: transparent; border-color: transparent; }
.danger { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.block { width: 100%; }
label { display: block; font-weight: 600; font-size: var(--fs-0); color: var(--muted); }
input, select, textarea { font: inherit; color: var(--fg); background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-s); padding: var(--s-2) var(--s-3); width: 100%; min-height: 40px; }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; min-height: 0; accent-color: var(--accent); vertical-align: middle; }
.check { display: flex; align-items: center; gap: var(--s-2); font-weight: 500; color: var(--fg); }
.field { display: flex; flex-direction: column; gap: var(--s-1); }
.komunikat, .blad { color: var(--bad); font-size: var(--fs-0); min-height: 1.3em; }
.uwaga { background: var(--warn-soft); color: var(--fg); border-radius: var(--radius-s); padding: var(--s-3) var(--s-4); border-left: 4px solid var(--warn); }
.uwaga.bad { background: var(--bad-soft); border-left-color: var(--bad); }
.uwaga.ok { background: var(--ok-soft); border-left-color: var(--ok); }
.empty-state { text-align: center; color: var(--muted); padding: var(--s-6) var(--s-4); background: var(--panel); border-radius: var(--radius); border: 1px dashed var(--line); }
.dashboard-filters { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.dashboard-filters a, .chip { padding: var(--s-1) var(--s-3); border-radius: 999px; border: 1px solid var(--line); color: var(--fg); font-weight: 600; font-size: var(--fs-0); background: var(--panel); }
.dashboard-filters a[aria-current="true"], .chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* ---------- 8. Tabele (rejestr, lista reguł, partie KSeF) ---------- */
.table-scroll { overflow-x: auto; background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-1); }
th { text-align: left; font-size: var(--fs-0); font-weight: 600; color: var(--muted); padding: var(--s-2) var(--s-3); border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: var(--s-3); border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--panel-2); }
td.r, th.r { text-align: right; }

/* ---------- 9. Oś obiegu i historia ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.steps li { display: grid; grid-template-columns: 22px 1fr; gap: var(--s-3); align-items: start; padding: var(--s-2) 0; position: relative; }
.steps li::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); background: var(--panel); margin: 4px 0 0 3px; z-index: 1; }
.steps li::after { content: ""; position: absolute; left: 10px; top: 20px; bottom: -8px; width: 2px; background: var(--line); }
.steps li:last-child::after { display: none; }
.steps li.done::before { background: var(--ok); border-color: var(--ok); }
.steps li.now::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.steps small { display: block; color: var(--muted); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: var(--s-2) var(--s-4); }
.kv dt { margin: 0; color: var(--muted); } .kv dd { margin: 0; font-weight: 600; text-align: right; }
.history { list-style: none; margin: 0; padding: 0; }
.history li { display: grid; grid-template-columns: 96px 1fr; gap: var(--s-2); padding: var(--s-2) 0; border-bottom: 1px dashed var(--line); }
.history time { color: var(--muted); font-size: var(--fs-0); font-variant-numeric: tabular-nums; }

/* ---------- 10. Telefon: nagłówek kwoty i akcje pod kciukiem ---------- */
.hero { background: var(--panel); border-radius: var(--radius); padding: var(--s-4); box-shadow: var(--shadow); }
.hero .amount { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-5); letter-spacing: -.02em; line-height: 1.05; }
.fab { position: sticky; bottom: 0; margin-top: var(--s-4); padding: var(--s-3) 0 calc(var(--s-3) + env(safe-area-inset-bottom, 0px)); background: var(--bg); display: flex; flex-direction: column; gap: var(--s-2); }
.fab .primary { min-height: 48px; font-size: var(--fs-2); border-radius: 12px; }
.fab .row { display: flex; gap: var(--s-2); } .fab .row button { flex: 1; min-height: 44px; border-radius: 12px; }

/* ---------- 11. Okno wyboru i komunikat ---------- */
.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); display: flex; align-items: center; justify-content: center; padding: var(--s-4); z-index: 40; }
.modal .box { background: var(--panel); color: var(--fg); border-radius: var(--radius); width: min(520px, 100%); max-height: 85vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0, 0, 0, .4); }
.modal header { padding: var(--s-4); border-bottom: 1px solid var(--line); }
.modal header p { margin-top: var(--s-1); color: var(--muted); }
.modal .search { padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line); }
.modal ul { list-style: none; margin: 0; padding: var(--s-2); overflow: auto; }
.modal li { padding: var(--s-2) var(--s-3); border-radius: var(--radius-s); display: flex; justify-content: space-between; gap: var(--s-2); cursor: pointer; }
.modal li:hover, .modal li[aria-selected="true"] { background: var(--accent-soft); }
.modal .group { padding: var(--s-3) var(--s-3) var(--s-1); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.modal footer { padding: var(--s-3) var(--s-4); border-top: 1px solid var(--line); display: flex; gap: var(--s-2); justify-content: flex-end; }
.toast { position: fixed; left: 50%; bottom: calc(var(--s-5) + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--fg); color: var(--bg); padding: var(--s-3) var(--s-4); border-radius: 999px; font-weight: 600; z-index: 45; box-shadow: 0 8px 30px rgba(0, 0, 0, .35); }

/* ---------- 12. Biurko: kolejka + decyzja obok siebie (§5.80) ---------- */
/* Układ dla księgowości na biurku: pasek boczny | kolejka (.queue) | panel decyzji (.detail).
   Na telefonie kolejka i panel to osobne strony (lista → karta), ten sam HTML. */
.desk { display: flex; flex-wrap: wrap; min-height: 100vh; }
.queue { flex: 0 1 400px; min-width: 0; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--bg); }
.queue .head { padding: var(--s-5) var(--s-4) var(--s-3); display: flex; flex-direction: column; gap: var(--s-3); }
.queue .list { padding: var(--s-1) var(--s-3) var(--s-4); display: flex; flex-direction: column; gap: 2px; overflow: auto; }
.queue .group { display: flex; justify-content: space-between; align-items: center; gap: var(--s-2); padding: var(--s-3) var(--s-4) var(--s-1); font-size: var(--fs-0); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.queue .row { display: grid; grid-template-columns: 1fr auto; gap: var(--s-1) var(--s-3); padding: var(--s-3) var(--s-4); border-radius: 12px; border: 1px solid transparent; text-align: left; background: transparent; width: 100%; color: inherit; font: inherit; cursor: pointer; }
.queue .row:hover { background: var(--panel-2); }
.queue .row[aria-current="true"] { background: var(--panel); border-color: var(--line); box-shadow: var(--shadow); }
.queue .row .sup { display: flex; align-items: center; gap: var(--s-2); min-width: 0; font-weight: 700; }
.queue .row .sup b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue .row .amount { font-family: var(--font-display); font-weight: 700; font-variant-numeric: tabular-nums; }
.queue .row .sub { grid-column: 1 / -1; font-size: var(--fs-0); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.detail { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; background: var(--panel); }
.detail .body { padding: var(--s-5) var(--s-6) 0; display: flex; flex-direction: column; gap: var(--s-4); flex: 1; }
.detail .amount { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-5); letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
/* trzy pytania: „dlaczego tu jest” / „ten dostawca u nas” — dwa pola obok siebie */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
.fact { border-radius: var(--radius); padding: var(--s-4); background: var(--panel-2); display: flex; flex-direction: column; gap: 6px; }
.fact.ok { background: var(--ok-soft); } .fact.warn { background: var(--warn-soft); } .fact.bad { background: var(--bad-soft); } .fact.info { background: var(--info-soft); }
.fact .lab { font-size: var(--fs-0); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--muted); }
.fact .main { font-size: var(--fs-2); font-weight: 700; }
/* pasek decyzji — przyklejony u dołu panelu; przycisk główny mówi, co się stanie */
.decision-bar { position: sticky; bottom: 0; background: var(--panel); border-top: 1px solid var(--line); padding: var(--s-3) var(--s-6); display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.decision-bar .spacer { flex: 1; }
.kbd { display: inline-block; font: 600 11px/1 ui-monospace, Menlo, monospace; padding: 3px 6px; border-radius: 5px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }
.primary .kbd { background: rgba(255, 255, 255, .22); border-color: rgba(255, 255, 255, .35); color: inherit; }
.chip { border: 1px solid var(--line); background: var(--panel); color: var(--fg); border-radius: 999px; padding: 5px 12px; font-weight: 600; font-size: var(--fs-0); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
@media (max-width: 860px) { .queue, .detail { flex: 1 1 100%; } .queue { border-right: 0; } .facts { grid-template-columns: 1fr; } .detail .body, .decision-bar { padding-inline: var(--s-4); } }

/* ---------- 13. Droga faktury (poziomo, z wyjaśnieniem kroku) (§5.80) ---------- */
/* Każdy krok: pasek + nazwa + małe „dlaczego” (np. „pominięty — netto poniżej 10 000 zł”). Na telefonie zostaje pionowa .steps (sekcja 9). */
.path { display: flex; gap: var(--s-2); }
.path .step { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.path .bar { height: 4px; border-radius: 4px; background: var(--line); }
.path .lab { font-weight: 700; font-size: 14px; } .path .sub { font-size: var(--fs-0); color: var(--muted); }
.path .step.done .bar { background: var(--ok); }
.path .step.now .bar { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); } .path .step.now .lab { color: var(--accent); }
@media (max-width: 640px) { .path { display: none; } }

/* ---------- 14. Rutyna i wyjątki: wiersz z zaznaczeniem + pasek zbiorczy (§5.80) ---------- */
.trow { display: grid; grid-template-columns: 28px 1.6fr 1fr 1.3fr 110px auto; gap: var(--s-3); align-items: center; padding: var(--s-3) var(--s-4); background: var(--panel); border-radius: 12px; border: 1px solid var(--line); }
.trow[data-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.trow input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; }
.trow .sup { font-weight: 700; } .trow .sub { font-size: var(--fs-0); color: var(--muted); }
.trow .amount { font-family: var(--font-display); font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.section-title { display: flex; align-items: center; gap: var(--s-3); font-family: var(--font-display); font-size: var(--fs-2); font-weight: 800; }
.bulk-bar { position: sticky; bottom: 0; background: var(--fg); color: var(--bg); padding: var(--s-3) var(--s-6); display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.bulk-bar .muted { color: var(--line); }
.bulk-bar .spacer { flex: 1; }
.bulk-bar .primary { background: var(--ok); border-color: var(--ok); }
.bulk-bar .secondary { background: transparent; color: var(--bg); border-color: var(--muted); }
@media (max-width: 900px) { .trow { grid-template-columns: 28px 1fr auto; } .trow .hide { display: none; } .bulk-bar { padding-inline: var(--s-4); } }

/* ---------- 15. Arkusz dolny na telefonie: decyzja z uzasadnieniem (§5.80) ---------- */
/* „To nie moje” → jeden arkusz z wyborem (wiem czyja / nie wiem / błąd) i wymaganym uzasadnieniem. */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 40; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; background: var(--panel); border-radius: 22px 22px 0 0; padding: var(--s-3) var(--s-4) calc(var(--s-6) + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: var(--s-3); box-shadow: 0 -8px 30px rgba(40, 30, 10, .18); z-index: 41; max-height: 90vh; overflow: auto; }
.sheet .grip { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 0 auto var(--s-1); }
.opt { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-radius: 12px; background: var(--panel); text-align: left; width: 100%; min-height: 52px; color: var(--fg); font: inherit; font-weight: 600; cursor: pointer; }
.opt[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; background: var(--accent-soft); }
.opt small { display: block; font-weight: 400; color: var(--muted); font-size: var(--fs-0); }
.opt .radio { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.opt[aria-pressed="true"] .radio { border: 6px solid var(--accent); }
@media (min-width: 641px) { .sheet { left: 50%; right: auto; bottom: auto; top: 50%; transform: translate(-50%, -50%); width: min(520px, 100%); border-radius: var(--radius); } }

/* ---------- 16. Zgodność układów dotychczasowych ekranów ---------- */
    td.kwota { text-align: right; font-variant-numeric: tabular-nums; }
    .invoice-card { overflow-wrap: anywhere; }
    .invoice-card h1 { font-size: 1.65rem; margin: .8rem 0 .4rem; }
    .invoice-card h2 { font-size: 1.2rem; margin: 0 0 1rem; }
    .invoice-card h3 { font-size: 1rem; }
    .eyebrow, .event-meta, .invoice-card dt { color: var(--muted); font-size: .875rem; }
    .status { display: inline-block; background: var(--info-soft); color: var(--accent); padding: .3rem .6rem; border-radius: .3rem; margin-left: .5rem; }
    .invoice-number { font-size: 1.15rem; }
    .card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
    .parties { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .invoice-card dd { margin: .3rem 0 1rem; }
    .waiting { border-left: 3px solid var(--info); padding: .75rem 1rem; background: var(--info-soft); line-height: 1.65; }
    .card-actions { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; }
    .card-actions form { flex: 1 1 18rem; min-width: 0; }
    .card-actions label { display: block; font-weight: 600; margin: .5rem 0; }
    .card-actions textarea, .card-actions select { box-sizing: border-box; width: 100%; border: 1px solid var(--line); border-radius: .3rem; padding: .7rem; margin-bottom: .7rem; font: inherit; }
    .invoice-card td.kwota { white-space: nowrap; }
    .text-block { white-space: pre-wrap; line-height: 1.5; }
    .timeline { list-style: none; padding: 0 0 0 1rem; border-left: 2px solid var(--line); }
    .timeline li { margin: 0 0 1.5rem; }
    .event-meta { margin-bottom: .4rem; }
    /* Zakładki sekcji ustawień (`ustawienia.html`); pulpit zakładek nie ma. */
    .dashboard-tabs { display: flex; flex-wrap: wrap; gap: .5rem; border-bottom: 1px solid var(--line); padding-bottom: .75rem; }
    .dashboard-tabs a { padding: .6rem .8rem; text-decoration: none; border-radius: .4rem; }
    .dashboard-tabs a[aria-current] { background: var(--accent); color: var(--accent-fg); }
    .dashboard-filters { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1rem 0; }
    .dashboard-filters select, .dashboard-filters input[type=search] { display: block; box-sizing: border-box; width: 100%; font: inherit; padding: .7rem; margin-top: .4rem; border: 1px solid var(--line); border-radius: .3rem; background: var(--panel); }
    .dashboard-filters .search-field { flex: 1; min-width: 0; }
    @media (max-width: 600px) {
      .dashboard-filters { display: block; }
      .dashboard-filters label { display: block; margin-bottom: .8rem; }
      .card-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
      .card-actions { display: block; }
      .status { margin: .5rem 0 0; }
      .invoice-card .table-scroll table { min-width: 36rem; }
    }
    @media print {
      .no-print, .invoice-card form, .invoice-card button, .invoice-card nav { display: none !important; }
      .invoice-card table { table-layout: fixed; font-size: 9pt; }
      .invoice-card td.kwota { white-space: normal; }
      .invoice-card tr, .timeline li { break-inside: avoid; }
      .invoice-card h2, .invoice-card h3 { break-after: avoid; }
    }

  .settings h1 { margin-bottom: .4rem; }
  .settings h2 { margin-top: 0; font-size: 1.3rem; }
  .settings h3 { font-size: 1rem; }
  .settings a { color: var(--accent); }
  .settings label { display: block; font-size: .9rem; font-weight: 600; }
  .settings input:not([type=checkbox]), .settings select { box-sizing: border-box; width: 100%; padding: .65rem; margin-top: .4rem; border: 1px solid var(--line); border-radius: .3rem; font: inherit; background: var(--panel); color: inherit; }
  .settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.5rem; }
  .settings .schedule-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .settings fieldset { border: 0; padding: 0; margin: 1.4rem 0; }
  .settings legend { font-weight: 650; margin-bottom: .75rem; }
  .settings .weekdays { display: flex; flex-wrap: wrap; gap: 1rem; }
  .settings .check { display: flex; align-items: center; gap: .4rem; padding: .5rem 0; }
  .settings-save { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; }
  .settings-save button { flex-shrink: 0; }
  .settings .komunikat { margin: 0; }
  .settings details { background: var(--panel); border: 1px solid var(--line); border-radius: .5rem; margin: .75rem 0; }
  .settings summary { padding: 1rem 1.25rem; cursor: pointer; font-weight: 650; }
  .settings details form { border-top: 1px solid var(--line); padding: 1.25rem; }
  .settings summary small { color: var(--muted); font-weight: 400; margin-left: .75rem; }
  .describer-row { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; }
  .describer-row select { flex: 1; min-width: 0; }
  .settings button:not(.card-button) { font: inherit; padding: .5rem .7rem; background: var(--panel); border: 1px solid var(--line); border-radius: .3rem; cursor: pointer; }
  .settings ol { padding-left: 0; }
  .settings button:disabled { opacity: .5; cursor: default; }
  .settings .user-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto; align-items: center; gap: 1.25rem; padding: 1rem 0; border-top: 1px solid var(--line); }
  .settings .user-row form { min-width: 0; }
  .settings .user-row .settings-save { display: block; }
  .settings .user-row .komunikat { margin-top: .5rem; }
  .settings .user-email { overflow-wrap: anywhere; font-size: .85rem; color: var(--muted); }


/* Skorupa i logowanie; stare ekrany zachowują HTML i kolejność treści. */
.login-page { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; }
.login-shell { width: 100%; max-width: 480px; margin: auto; padding: var(--s-4); }
.login-card { display: flex; flex-direction: column; align-items: center; gap: var(--s-5); text-align: center; }
.login-card h1 { font-size: var(--fs-3); }
.login-card p { margin: 0; }
.login-icon { object-fit: contain; }
.login-badge { max-width: 100%; overflow-wrap: anywhere; background: var(--accent); color: var(--accent-fg); padding: var(--s-1) var(--s-3); border-radius: 999px; font-size: var(--fs-0); font-weight: 700; }
.login-card .login-microsoft { display: flex; align-items: center; justify-content: center; gap: var(--s-3); width: 100%; }
.login-microsoft svg { flex-shrink: 0; }
.login-card form { display: grid; gap: var(--s-4); }
.login-card input { margin-top: var(--s-2); }
.button, .card-button { display: inline-block; text-align: center; text-decoration: none; }
.card-button:not(.secondary) { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.card-tools, .card-nav { display: flex; gap: var(--s-3); align-items: center; flex-wrap: wrap; margin: var(--s-4) 0; }
.main > table { display: block; max-width: 100%; overflow-x: auto; }
.rail a { min-height: 44px; }
@media (max-width: 760px) {
  .settings-grid, .settings .schedule-grid, .settings .user-row { grid-template-columns: minmax(0, 1fr); }
  .settings-save { flex-wrap: wrap; }
  .main { overflow-wrap: anywhere; }
  .describer-row { flex-wrap: wrap; }
  .describer-row select { flex-basis: 100%; }
  button, .button, .card-button, input:not([type=checkbox]):not([type=radio]), select { min-height: 44px; }
}
@media print {
  :root { --bg: #fff; --fg: #000; --panel: #fff; --panel-2: #fff; --muted: #333; --line: #ccc; }
  .shell { display: block; max-width: none; padding: 0; }
  .card-section { box-shadow: none; }
}
/* Kwota pozostaje jednym ciągiem także w przewijanej tabeli na telefonie. */
td.kwota { white-space: nowrap; }
@media print { .invoice-card td.kwota { white-space: normal; } }

/* AK-67: dokument FA(3), lista do przypisania i wylogowanie. */
.assignment-page { --content-w: 1800px; }
.invoice-document { padding: var(--s-6); }
.document-head { display: flex; justify-content: space-between; gap: var(--s-5); border-bottom: 2px solid var(--fg); padding-bottom: var(--s-4); }
.document-brand { font-family: var(--font-display); font-weight: 700; }
.document-head > div { text-align: right; }
.document-head strong, .document-head span { display: block; }
.document-head strong { font-size: var(--fs-3); }
.document-parties { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-6); padding-block: var(--s-5); }
.document-parties h3 { margin-bottom: var(--s-3); }
.document-section { border-top: 1px solid var(--line); padding-top: var(--s-4); margin-top: var(--s-3); }
.invoice-document h3 { margin-bottom: var(--s-3); }
.document-details { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--s-5); }
.document-account { grid-column: 1 / -1; }
.document-total { text-align: right; margin: var(--s-4) 0; }
.invoice-document .document-total dd { font-size: var(--fs-4); font-weight: 700; }
.invoice-document .table-scroll { border-radius: 0; box-shadow: none; }
.invoice-document th { background: var(--panel-2); }
@media (max-width: 760px) {
  .invoice-document { padding: var(--s-4); }
  .document-head { flex-direction: column; gap: var(--s-2); }
  .document-parties, .document-details { grid-template-columns: 1fr; }
}
@media print {
  body { min-height: 0; }
  .invoice-document { --panel: #fff; --panel-2: #f4f4f4; --fg: #000; --muted: #444; --line: #aaa; color: var(--fg); background: var(--panel); box-shadow: none; border-radius: 0; padding: 0; }
  .invoice-card > :not(.invoice-document) { display: none !important; }
  .shell, .main, .invoice-card { display: block; max-width: none; margin: 0; padding: 0; }
  .document-head { flex-direction: row; }
  .document-parties, .document-details { grid-template-columns: 1fr 1fr; }
  .invoice-document .table-scroll { overflow: visible; }
  .invoice-document .table-scroll table { min-width: 0; }
  .invoice-document table { table-layout: auto; }
  .invoice-document th { white-space: normal; }
  .invoice-document { font-size: 10pt; line-height: 1.35; }
  .invoice-document h2 { font-size: 14pt; margin-bottom: 10pt; }
  .invoice-document h3 { font-size: 11pt; margin: 0 0 6pt; }
  .invoice-document dt { font-size: 9pt; }
  .invoice-document dd { margin-bottom: 6pt; }
  .document-head { padding-bottom: 10pt; }
  .document-parties { padding-block: 10pt; }
  .document-section { margin-top: 8pt; padding-top: 8pt; }
  .document-total { margin: 10pt 0; }
  .invoice-document th, .invoice-document td { padding: 5pt; }
  .document-head, .document-parties, .document-total { break-inside: avoid; }
  .invoice-document thead { display: table-header-group; }
}

/* AK-71: biurko, wspólna ramka przyszłych funkcji i nazwa w pasku. */
.rail-brand { padding: var(--s-2) var(--s-2) var(--s-4); display: flex; flex-direction: column; }
.rail-brand strong { font-family: var(--font-display); }
.rail-brand span { color: var(--muted); font-size: var(--fs-0); }
.after-pilot { background: var(--panel-2); border: 1px dashed var(--line); border-radius: var(--radius); padding: var(--s-4); color: var(--muted); }
.after-pilot h3 { margin: 0 0 var(--s-2); font-size: var(--fs-1); }
.after-pilot p { margin: 0; }
.assignment-desk { display: grid; grid-template-columns: minmax(338px, 442px) minmax(0, 1fr); min-height: 0; align-items: start; border: 1px solid var(--line); border-radius: var(--radius); }
.assignment-desk .queue { position: sticky; top: var(--s-4); max-height: calc(100dvh - 2 * var(--s-4)); border-radius: var(--radius) 0 0 var(--radius); }
.assignment-desk .queue h1 { font-size: var(--fs-3); margin: 0; }
.assignment-desk .queue .row { text-decoration: none; }
.assignment-desk .queue .amount { font-size: var(--fs-1); white-space: nowrap; }
.assignment-desk .detail { border-radius: 0 var(--radius) var(--radius) 0; }
.assignment-desk .detail .amount { line-height: 1.2; }
.assignment-desk .detail .amount small { font-size: var(--fs-2); }
.assignment-header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-4); }
.assignment-header h2 { font-size: var(--fs-4); margin: var(--s-3) 0; }
.assignment-dates { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-5); margin: 0; }
.assignment-dates dd { margin-bottom: 0; }
.assignment-desk .fact p { margin: var(--s-2) 0; }
.assignment-history { padding: var(--s-4) var(--s-6); }
.assignment-history summary { cursor: pointer; min-height: 44px; font-weight: 600; }
.assignment-desk .decision-bar { border-radius: 0 0 var(--radius) 0; z-index: 1; }
.assignment-desk .decision-bar form { min-width: 0; }
.assignment-desk .komunikat:empty { display: none; }
.assignment-modal { inset: 0; margin: auto; padding: 0; width: min(560px, calc(100% - 32px)); max-height: calc(100dvh - 32px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--fg); }
.assignment-modal:not([open]) { display: none; }
.assignment-modal[open] { display: block; }
.assignment-modal::backdrop { background: color-mix(in srgb, var(--fg) 45%, transparent); }
.assignment-modal .box { width: auto; max-height: none; box-shadow: none; }
.assignment-modal .box > p, .assignment-modal form { padding: 0 var(--s-4) var(--s-4); }
.assignment-modal header { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); }
.assignment-modal header h2 { margin: 0; }
@media (max-width: 1100px) {
  .assignment-desk { grid-template-columns: minmax(299px, 390px) minmax(0, 1fr); }
  .assignment-desk .facts { grid-template-columns: 1fr; }
  .assignment-desk .detail .body, .assignment-desk .decision-bar { padding-inline: var(--s-4); }
}
@media (max-width: 900px) {
  .assignment-desk { grid-template-columns: minmax(0, 1fr); }
  .assignment-desk .queue { position: static; max-height: 360px; border-right: 0; border-bottom: 1px solid var(--line); }
  /* Listy (AK-75) mają w nagłówku liczniki, instrukcję i filtry — limit biurka
     zjadłby je razem z wierszami, więc ich kolejka jest wyższa. */
  .assignment-desk .queue.queue-list { max-height: 70dvh; }
  .assignment-desk .detail { border-radius: 0 0 var(--radius) var(--radius); }
  .assignment-history { padding-inline: var(--s-4); }
  .assignment-desk .decision-bar { padding-bottom: max(var(--s-4), env(safe-area-inset-bottom, 0px)); }
}
@media screen and (max-width: 900px) {
  .assignment-page .main { padding-bottom: var(--assignment-bar-height, 0px); }
}
@media (max-width: 760px) { .rail-brand { flex-basis: 100%; padding-bottom: var(--s-2); } }
@media print {
  .assignment-desk, .assignment-desk .detail { display: block; border: 0; border-radius: 0; }
  .assignment-desk .detail > :not(.invoice-document) { display: none !important; }
}

/* AK-71/2: jedna karta, te same formularze na telefonie i komputerze. */
.invoice-detail .hero h1 { margin: var(--s-3) 0 var(--s-2); }
.invoice-detail .hero .amount small { font-size: var(--fs-2); }
.invoice-detail .hero .invoice-number { margin-bottom: var(--s-2); }
.invoice-detail .card-future { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); margin-bottom: var(--s-4); }
.invoice-detail .summary-lines { padding-left: var(--s-5); }
.invoice-detail .card-decision-bar { z-index: 2; padding-inline: var(--s-4); border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.card-decision-bar form > button { width: 100%; min-height: 48px; }
.card-decision-bar .row { flex-wrap: wrap; }
.invoice-detail .komunikat:empty { display: none; }
.invoice-dialog { inset: 0; margin: auto; transform: none; width: min(560px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: var(--s-4); border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--fg); }
.invoice-dialog:not([open]) { display: none; }
.invoice-dialog[open] { display: flex; flex-direction: column; gap: var(--s-4); align-items: stretch; justify-content: flex-start; }
.invoice-dialog::backdrop { background: color-mix(in srgb, var(--fg) 45%, transparent); }
.invoice-dialog header { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: 0 0 var(--s-3); }
.invoice-dialog header h2 { margin: 0; }
.invoice-dialog form { display: flex; flex-direction: column; gap: var(--s-2); }
.invoice-dialog .return-option form { margin-top: var(--s-3); }
.invoice-dialog .grip { display: none; }
@media screen {
  .invoice-detail-page .main { padding-bottom: var(--card-bar-height, 0px); }
  .invoice-detail :is(input, textarea, select, .komunikat, #faktura) { scroll-margin-block: var(--s-4) calc(var(--card-bar-height, 0px) + var(--s-4)); }
}
@media (max-width: 600px) {
  .invoice-detail .card-future { grid-template-columns: minmax(0, 1fr); }
  .invoice-detail .hero { padding: var(--s-4); }
  .invoice-dialog { inset: auto 0 0; margin: 0; width: 100%; max-height: 90dvh; border-radius: 22px 22px 0 0; padding-bottom: calc(var(--s-4) + env(safe-area-inset-bottom, 0px)); }
  .invoice-dialog .grip { display: block; }
}

/* AK-75: wspólna belka konta i menu telefonu; jedna widoczna nawigacja. */
.account-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); position: relative; }
.account-identity { color: var(--muted); font-size: var(--fs-0); overflow-wrap: anywhere; }
.account-bar > .card-button { display: inline-flex; align-items: center; flex: none; }
.mobile-home, .mobile-navigation { display: none; }
@media (max-width: 600px) {
  .shell > .rail { display: none; }
  .account-bar { gap: var(--s-2); }
  .account-identity, .invoice-back { display: none; }
  .mobile-home { display: flex; flex: 1; min-width: 0; font-size: var(--fs-0); font-weight: 700; }
  .mobile-home a { display: inline-flex; align-items: center; min-height: 44px; }
  .mobile-navigation { display: block; }
  .mobile-navigation > summary { display: flex; align-items: center; min-height: 44px; padding-inline: var(--s-2); cursor: pointer; font-weight: 600; list-style: none; border: 1px solid var(--line); border-radius: var(--radius-s); }
  .mobile-navigation > summary::-webkit-details-marker { display: none; }
  .mobile-navigation > summary::after { content: "▾"; margin-left: var(--s-1); }
  .mobile-navigation[open] > summary::after { content: "▴"; }
  .account-bar > .card-button { min-height: 44px; padding-inline: var(--s-3); }
  .mobile-menu { position: absolute; z-index: 30; top: calc(100% + var(--s-2)); inset-inline: 0; padding: var(--s-3); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
  .mobile-menu .who { display: flex; flex-direction: column; padding: var(--s-2); overflow-wrap: anywhere; }
  .mobile-menu .who span { color: var(--muted); font-size: var(--fs-0); }
  .mobile-menu a { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); padding: var(--s-2); min-height: 44px; border-radius: var(--radius-s); color: var(--fg); font-weight: 600; }
  .mobile-menu a[aria-current] { background: var(--accent); color: var(--accent-fg); }
  .mobile-menu .count { padding: 1px 8px; border-radius: 999px; background: var(--panel-2); color: var(--fg); font-variant-numeric: tabular-nums; }
}

/* AK-75: poziom przypomnienia zadania w ramce „Dlaczego tu jest” w panelu. */
.task-level { white-space: normal; font-size: 12.5px; }
.task-level.level-1 { background: var(--warn-soft); color: var(--warn); }
.task-level.level-2 { background: var(--bad-soft); color: var(--bad); }

/* AK-75: listy faktur w układzie biurka — filtry i liczniki w nagłówku kolejki. */
.assignment-desk .queue .dashboard-filters { margin: 0; gap: var(--s-2); }
.assignment-desk .queue .dashboard-filters label { font-weight: 600; }
.assignment-desk .queue .card-nav { padding: 0 var(--s-4) var(--s-4); margin: 0; }
.assignment-desk .queue .instruction { font-size: var(--fs-0); }
.assignment-desk .queue .instruction b { font-family: var(--font-display); font-size: var(--fs-1); }

/* Ustawienia: nawigacja sekcji z zachowaniem adresów #sekcja. */
.settings-navigation { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: stretch; margin-block: var(--s-5); }
.settings-tabs { flex: 1 1 600px; margin: 0; align-content: center; }
.settings-tabs a { min-height: 44px; display: inline-flex; align-items: center; }
.settings-navigation > .after-pilot { margin: 0; padding: var(--s-3); }
.settings-navigation > .after-pilot h3 { font-size: var(--fs-1); }
.settings > section[hidden] { display: none; }
