/* ======================================================================
   Aurora v2 — warstwa wyglądu nad app.css.
   Zasady: granat zamiast czerni; zorza tylko w nagłówku strony (jedyny „głośny” moment);
   panele spokojne; stan pokazuje lampka (jak dioda w urządzeniu sieciowym) + słowo;
   gradient wyłącznie w zorzy, treściach AI i wykresach; ruch tylko w odpowiedzi na działanie;
   nagłówki w wąskim kroju Bricolage Grotesque; zdania, nie WERSALIKI.
   ====================================================================== */

:root {
  --font: "Instrument Sans", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --font-display: "Bricolage Grotesque", "Instrument Sans", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  /* skala typograficzna 1.25 od 15 px */
  --fs-xs: .8rem; --fs-sm: .9rem; --fs-md: 1rem; --fs-lg: 1.25rem; --fs-xl: 1.563rem; --fs-2xl: 1.953rem; --fs-3xl: 2.441rem;
  --signal: #2dd4bf;
  --amber: #f5b544;
  --coral: #f2667b;
  --violet: #a78bfa;
  --grad-ai: linear-gradient(120deg, #a78bfa, #22d3ee);
  --grad-action: var(--brand);
  --grad-ok: var(--signal);
  --grad-goal: linear-gradient(90deg, var(--brand), var(--signal));
  --radius: 10px;
  --radius-lg: 14px;
  --radius-float: 16px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  font-family: var(--font);
}

/* ---------- motyw ciemny (domyślny): granat ---------- */
:root:not([data-theme="light"]) {
  --accent: color-mix(in srgb, var(--brand) 60%, #fff);
  --accent-soft: color-mix(in srgb, var(--brand) 22%, transparent);
  --bg: #0e1626;
  --surface: #152036;
  --surface-solid: #182540;
  --surface-2: #1b2842;
  --surface-3: #23324f;
  --border: #263552;
  --border-strong: #34466a;
  --text: #e6ecf7; --text-2: #b6c1d6; --muted: #8d9ab3;
  --won: var(--signal); --won-soft: color-mix(in srgb, var(--signal) 16%, transparent);
  --lost: var(--coral); --lost-soft: color-mix(in srgb, var(--coral) 16%, transparent);
  --warn: var(--amber); --warn-soft: color-mix(in srgb, var(--amber) 15%, transparent);
  --info: #7ab4ff; --info-soft: color-mix(in srgb, #7ab4ff 15%, transparent);
  --shadow-sm: none;
  --shadow: none;
  --shadow-lg: 0 24px 60px -20px rgba(3, 8, 20, .7);
  --aurora-opacity: 1;
  color-scheme: dark;
}
/* ---------- motyw jasny ---------- */
:root[data-theme="light"] {
  --accent: color-mix(in srgb, var(--brand) 88%, #0e1626);
  --accent-soft: color-mix(in srgb, var(--brand) 10%, transparent);
  --bg: #f3f5fa;
  --surface: #ffffff;
  --surface-solid: #ffffff;
  --surface-2: #eef1f7;
  --surface-3: #e3e8f1;
  --border: #dde3ee;
  --border-strong: #c7d0df;
  --text: #0e1626; --text-2: #34405a; --muted: #5b6780;
  --signal: #0f8f80; --amber: #a86400; --coral: #c53d52;
  --won: var(--signal); --won-soft: #e2f5f2;
  --lost: var(--coral); --lost-soft: #fbe9ec;
  --warn: var(--amber); --warn-soft: #fff1da;
  --info: #2a62c9; --info-soft: #e5eefc;
  --shadow-sm: none;
  --shadow: none;
  --shadow-lg: 0 24px 60px -24px rgba(14, 22, 38, .3);
  --aurora-opacity: .7;
  color-scheme: light;
}
:root:not([data-theme="light"]) .theme-light { display: inline; }
:root:not([data-theme="light"]) .theme-dark { display: none; }
:root[data-theme="light"] .theme-light { display: none; }
:root[data-theme="light"] .theme-dark { display: inline; }

/* ---------- zorza: tylko pas nagłówka, przewija się razem ze stroną ---------- */
@keyframes aurora-drift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(3%, -2%, 0) scale(1.04); } }
body { background: var(--bg); font-family: var(--font); font-size: 15px; }
.app, .auth { position: relative; isolation: isolate; }
.app::before, .auth::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 480px; z-index: -1; pointer-events: none;
  opacity: var(--aurora-opacity);
  background:
    radial-gradient(38% 70% at 24% 18%, color-mix(in srgb, var(--brand) 78%, transparent), transparent 66%),
    radial-gradient(30% 60% at 58% 0%, color-mix(in srgb, var(--signal) 50%, transparent), transparent 66%),
    radial-gradient(30% 60% at 88% 22%, color-mix(in srgb, var(--violet) 46%, transparent), transparent 66%);
  filter: blur(40px) saturate(120%);
  -webkit-mask: linear-gradient(#000 30%, transparent); mask: linear-gradient(#000 30%, transparent);
  animation: aurora-drift 24s ease-in-out infinite alternate;
}

/* ---------- typografia ---------- */
h1, h2, .display { font-family: var(--font-display); }
h1 { font-size: var(--fs-2xl); font-weight: 700; font-stretch: 88%; letter-spacing: -.02em; line-height: 1.05; margin: 0 0 .35rem; }
h2 { font-size: var(--fs-md); font-weight: 650; font-stretch: 95%; letter-spacing: 0; margin: 0 0 .75rem; }
p { line-height: 1.55; }
.head p, .lede { max-width: 72ch; color: var(--text-2); }
code, kbd, .mono { font-family: var(--font-mono); font-size: .86em; }
/* dawne „eyebrow” i etykiety: zwykłe zdanie, bez wersalików i kroju mono */
.eyebrow, .nav-label, th, .section, .palette-group > span, .paper .label, .stat small, .kpi small {
  font-family: var(--font); text-transform: none; letter-spacing: 0; }
.eyebrow { font-size: var(--fs-sm); font-weight: 500; color: var(--text-2); }
.nav-label { font-size: .78rem; font-weight: 600; color: var(--muted); }
th { font-size: .8rem; font-weight: 600; color: var(--muted); }
.gtext { color: inherit; background: none; }
td.num, .num { font-variant-numeric: tabular-nums; }
:focus-visible { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--brand); }

/* ---------- powłoka ---------- */
.sidebar { background: color-mix(in srgb, var(--bg) 70%, #000 0%); border-right: 1px solid var(--border); }
:root[data-theme="light"] .sidebar { background: #fbfcfe; }
.logo { background: var(--brand); border-radius: 9px; font-family: var(--font-display); font-weight: 800; font-stretch: 85%; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-stretch: 90%; font-size: 1.05rem; }
.nav-item { border-radius: 8px; }
.nav-item.active { background: var(--accent-soft); color: var(--text); font-weight: 600; box-shadow: inset 2px 0 0 var(--brand); }
.nav-item.active .i { color: var(--accent); }
.topbar { background: color-mix(in srgb, var(--bg) 25%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom-color: transparent; }
.search-trigger, .icon-btn { background: var(--surface); border-color: var(--border); border-radius: 9px; }
.search-trigger:hover, .icon-btn:hover { background: var(--surface-2); border-color: var(--border-strong); }
.avatar { background: var(--surface-3); color: var(--text); }
.menu-panel, .palette { background: var(--surface-solid); border-color: var(--border); border-radius: var(--radius-float); box-shadow: var(--shadow-lg); }
.palette::backdrop { background: rgba(5, 10, 22, .55); backdrop-filter: blur(4px); }
.palette-hit:hover, .palette-hit:focus { background: var(--accent-soft); }
.content { max-width: 1600px; margin-inline: auto; padding: 2rem 2.5rem 3rem; }

/* ---------- powierzchnie: strona → panel → element pływający ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: none; }
.glass { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.head { align-items: flex-end; margin-bottom: 1.5rem; }
.head h1 { margin-top: .2rem; }

/* ---------- przyciski i pola ---------- */
.btn { border-radius: 9px; border: 1px solid transparent; color: #fff; background: var(--brand); font-weight: 600; box-shadow: none;
  transition: background .15s, border-color .15s; }
.btn:hover { background: color-mix(in srgb, var(--brand) 86%, #fff); filter: none; transform: none; }
.btn:active { background: color-mix(in srgb, var(--brand) 85%, #000); }
.btn.ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { background: var(--coral); }
input, select, textarea { background: var(--bg); border-color: var(--border-strong); border-radius: 8px; color: var(--text); }
:root[data-theme="light"] input, :root[data-theme="light"] select, :root[data-theme="light"] textarea { background: #fff; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--accent-soft); }
select option { background: var(--surface-solid); color: var(--text); }
.chip-filter, .chip, .pill { background: var(--surface); border-color: var(--border); }
.chip-filter.on, .pill.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.toggle { background: var(--surface-2); border-color: var(--border); border-radius: 10px; }
.toggle a.on { background: var(--surface-solid); }
.filterbar { gap: .5rem; }
.filterbar button.btn.small { display: none; } /* filtry działają od razu (app.js) */

/* ---------- lampki stanu (zamiast kolorowych pigułek) ---------- */
.badge, .tag2 { display: inline-flex; align-items: center; gap: .45rem; background: none; border: 0; border-radius: 0; padding: 0;
  font-size: .82rem; font-weight: 600; color: var(--text-2); white-space: nowrap; --led: var(--muted); }
.badge::before, .tag2::before { content: ""; width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; background: var(--led);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--led) 18%, transparent), 0 0 8px color-mix(in srgb, var(--led) 70%, transparent); }
.badge.status-won, .badge.status-rfq, .badge.inv-booked, .badge.inv-approved, .badge.wf-done, .tag2.ok { --led: var(--signal); }
.badge.status-lost, .badge.status-error, .badge.inv-rejected, .badge.wf-cancelled, .tag2.bad { --led: var(--coral); }
.badge.status-verify, .badge.status-new, .badge.inv-new, .tag2.warn { --led: var(--amber); }
.badge.status-thread, .badge.status-known, .badge.inv-review, .badge.wf-active, .tag2.info { --led: var(--info); }
.badge.status-stale, .badge.status-other, .badge.wf-draft { --led: var(--muted); }
/* „spóźnione”, „szkic” itp. obok tytułu zachowują rytm tekstu */
h1 .badge, h2 .badge { font-family: var(--font); vertical-align: middle; margin-left: .5rem; }

/* ---------- tabele, listy, kanban ---------- */
table.list thead th { background: var(--surface); border-bottom-color: var(--border-strong); }
table.list tbody tr:hover { background: var(--surface-2); }
td, th { border-bottom-color: var(--border); }
.toast { border-radius: 10px; background: var(--surface-solid); color: var(--text); border: 1px solid var(--border);
  box-shadow: inset 3px 0 0 var(--signal); }
.toast.error { box-shadow: inset 3px 0 0 var(--coral); background: var(--surface-solid); color: var(--text); }
.notice { background: var(--surface); border-color: var(--border); color: var(--text-2); }
.notice.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--amber) 30%, transparent); color: var(--text); }
.column { background: transparent; border: 0; border-radius: 0; padding: .2rem; border-top: 2px solid var(--border-strong); }
.column header strong { font-family: var(--font-display); font-stretch: 92%; font-size: 1rem; }
.deal { background: var(--surface); border-radius: 10px; box-shadow: none; }
.deal:hover { border-color: var(--border-strong); transform: none; }
.empty { color: var(--text-2); }
.bar { background: var(--surface-3); }
.bar div { background: var(--brand); }
.metric .bar div.full { background: var(--signal); }

/* ---------- ruch: jeden moment przy wejściu na stronę, poza tym reakcje na działanie ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes ai-spin { to { --ai-angle: 360deg; } }
@property --ai-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.rise { animation: rise .5s var(--ease) both; }
.ai-frame { background: linear-gradient(var(--surface), var(--surface)) padding-box,
  conic-gradient(from var(--ai-angle), #a78bfa, #22d3ee, #a78bfa) border-box;
  border: 1px solid transparent; animation: ai-spin 6s linear infinite; }
.ai-note { border-radius: 10px; padding: .8rem .95rem; background: var(--surface-2); color: var(--text-2); }
.ai-note strong { color: var(--text); }

/* ======================================================================
   Ekran „Dziś”
   ====================================================================== */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 1.5rem 2.5rem; margin: .5rem 0 2rem; }
.hero h1 { font-size: clamp(2.4rem, 4.6vw, 3.6rem); font-weight: 750; font-stretch: 78%; line-height: .95; letter-spacing: -.03em; margin: .5rem 0 0; }
.hero .lede { margin: .7rem 0 0; font-size: var(--fs-lg); color: var(--text-2); }
.hero .eyebrow { display: block; }
/* liczby jako jedna „listwa” podzielona liniami, nie zestaw kart */
.hero-stats { display: flex; flex-wrap: wrap; gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.hero-stats .card, .hero-stats .stat { background: none; border: 0; border-radius: 0; margin: 0; }
.hero-stats .stat + .stat { border-left: 1px solid var(--border); }
.stat { padding: .9rem 1.2rem; min-width: 170px; display: flex; flex-direction: column; gap: .4rem; }
.stat small { font-size: var(--fs-xs); color: var(--muted); font-weight: 500; }
.stat strong { font-family: var(--font-display); font-stretch: 85%; font-size: var(--fs-xl); font-weight: 700; letter-spacing: -.01em; line-height: 1; }
.stat .sub { font-size: var(--fs-xs); color: var(--text-2); }
a.stat:hover { background: var(--surface-2); text-decoration: none; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 40px; }
.bars span { flex: 1; min-height: 3px; border-radius: 3px; background: var(--surface-3); position: relative; }
.bars span.has { background: var(--signal); }
.bars span:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  white-space: nowrap; font-size: .72rem; padding: .15rem .45rem; border-radius: 6px; background: var(--surface-solid); border: 1px solid var(--border); }
.ring { --p: 0; width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0;
  background: conic-gradient(var(--signal) calc(var(--p) * 1%), var(--surface-3) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent 70%, #000 71%); mask: radial-gradient(farthest-side, transparent 70%, #000 71%); }

.today { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr); gap: 1.25rem; align-items: start; margin-bottom: 1.5rem; }
.queue { padding: .5rem; outline: none; margin: 0; }
.queue:focus-visible { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--brand); }
.queue-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; padding: .4rem .45rem .7rem; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 9px; background: var(--bg); border: 1px solid var(--border); }
.seg button { border: 0; background: none; color: var(--muted); font: 600 .84rem var(--font); padding: .3rem .75rem; border-radius: 7px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface-3); color: var(--text); }
.keys { font-size: .8rem; color: var(--muted); }
.q-item { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: .9rem; align-items: center; width: 100%;
  padding: .75rem .8rem; border: 0; border-radius: 10px; background: none; color: var(--text); font: inherit; text-align: left;
  cursor: pointer; transition: background .12s; }
.q-item + .q-item { box-shadow: inset 0 1px 0 var(--border); }
.q-item:hover { background: var(--surface-2); }
.q-item[aria-current="true"] { background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--brand); }
.q-item[hidden], .q-pager[hidden] { display: none; }
.q-pager { display: flex; justify-content: center; gap: .35rem; padding: .8rem .5rem .2rem; }
.q-pager button { min-width: 2.1rem; height: 2.1rem; border: 1px solid var(--border); border-radius: 8px; background: none;
  color: var(--muted); font: 600 .86rem var(--font); cursor: pointer; }
.q-pager button:hover { background: var(--surface-2); color: var(--text); }
.q-pager button[aria-current="page"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.q-ico { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; font: 700 .72rem var(--font);
  color: var(--tone); background: color-mix(in srgb, var(--tone) 16%, transparent); }
.tone-ksef { --tone: #7ab4ff; } .tone-crm { --tone: var(--violet); } .tone-proc { --tone: var(--signal); } .tone-warn { --tone: var(--amber); }
.q-main { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.q-main b { font-weight: 600; font-size: var(--fs-md); line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-meta { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; font-size: .82rem; color: var(--muted); }
.q-amount { font-family: var(--font-display); font-stretch: 85%; font-weight: 700; font-size: var(--fs-lg); white-space: nowrap; font-variant-numeric: tabular-nums; }
.q-detail { position: sticky; top: calc(var(--topbar-h) + 1rem); padding: 1.4rem; margin: 0; display: flex; flex-direction: column; gap: 1rem; }
.q-detail h2 { font-size: var(--fs-xl); font-stretch: 85%; line-height: 1.1; letter-spacing: -.01em; margin: 0; }
.q-detail dl { grid-template-columns: 140px 1fr; gap: .5rem .8rem; font-size: var(--fs-sm); }
.q-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.q-actions kbd { background: rgba(255, 255, 255, .18); border: 0; color: #fff; }
[data-panel] { display: contents; }
[data-panel][hidden] { display: none; }
.q-empty { padding: 2.5rem 1.5rem; text-align: left; display: grid; gap: .5rem; justify-items: start; }
.q-empty .display { font-size: var(--fs-2xl); font-weight: 700; font-stretch: 80%; }
.q-empty .q-empty-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; }
.stage-bars { display: flex; flex-direction: column; gap: .6rem; }
.stage-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: .8rem; align-items: center; font-size: var(--fs-sm); }
.stage-row .track { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.stage-row .track i { display: block; height: 100%; border-radius: 4px; background: var(--brand); }

/* ======================================================================
   Faktura KSeF
   ====================================================================== */
.inv-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr) 360px; gap: 1.25rem; align-items: start; }
.inv-queue { padding: .4rem; margin: 0; display: flex; flex-direction: column; }
.inv-queue a { display: flex; flex-direction: column; gap: .15rem; padding: .65rem .7rem; border-radius: 8px; color: var(--text); }
.inv-queue a + a { box-shadow: inset 0 1px 0 var(--border); }
.inv-queue a:hover { background: var(--surface-2); text-decoration: none; }
.inv-queue a.on { background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--brand); }
.inv-queue .row-between b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.paper { position: relative; overflow: hidden; background: #fbfbf8; color: #141b2b; border-radius: 6px; padding: 2.2rem 2.4rem;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .04), 0 30px 70px -30px rgba(0, 0, 0, .6); display: flex; flex-direction: column; gap: 1.4rem; }
.paper::after { content: ""; position: absolute; left: 0; right: 0; height: 60px; top: -60px; pointer-events: none;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--signal) 22%, transparent), transparent);
  animation: scan 1s .1s cubic-bezier(.4, 0, .2, 1) both; }
@keyframes scan { 0% { top: -60px; } 100% { top: 100%; } }
.paper .muted { color: #5b6780; }
.paper table td, .paper table th { border-color: #e4e7ee; color: #141b2b; }
.paper th { color: #5b6780; }
.paper .total { font-family: var(--font-display); font-stretch: 85%; font-size: var(--fs-2xl); font-weight: 750; }
.paper .parties { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; font-size: var(--fs-sm); }
.paper .label { font-size: .78rem; font-weight: 600; color: #5b6780; }
.inv-side { position: sticky; top: calc(var(--topbar-h) + 1rem); padding: 1.3rem; margin: 0; display: flex; flex-direction: column; gap: 1.1rem; }
.inv-side .amount { font-family: var(--font-display); font-stretch: 82%; font-size: var(--fs-3xl); font-weight: 750; letter-spacing: -.02em; line-height: 1; }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .45rem; font-size: var(--fs-sm); }
.checks li { display: flex; gap: .55rem; align-items: center; --led: var(--signal); }
.checks li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; background: var(--led);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--led) 18%, transparent), 0 0 8px color-mix(in srgb, var(--led) 70%, transparent); }
.checks li.no { --led: var(--amber); }
.path-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; font-size: var(--fs-sm); }
.path-steps li { display: flex; align-items: center; gap: .65rem; color: var(--muted); padding: .35rem 0; position: relative; }
.path-steps li + li::before { content: ""; position: absolute; left: 11px; top: -9px; height: 14px; width: 1px; background: var(--border-strong); }
.path-steps .dot { width: 23px; height: 23px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; font-weight: 700;
  background: var(--surface-3); color: var(--muted); flex-shrink: 0; }
.path-steps li.done .dot { background: color-mix(in srgb, var(--signal) 22%, transparent); color: var(--signal); }
.path-steps li.current { color: var(--text); font-weight: 600; }
.path-steps li.current .dot { background: var(--brand); color: #fff; }
.hold { position: relative; overflow: hidden; width: 100%; height: 48px; border-radius: 10px; border: 1px solid var(--brand); cursor: pointer;
  color: #fff; font: 600 1rem var(--font); background: color-mix(in srgb, var(--brand) 24%, var(--surface)); touch-action: none; user-select: none; }
:root[data-theme="light"] .hold { color: var(--text); }
.hold .fill { position: absolute; inset: 0; width: 0; background: var(--brand); transition: width .15s ease-out; }
.hold.down .fill { width: 100%; transition: width .9s linear; }
.hold.down, .hold.done { color: #fff; }
.hold.done { background: var(--signal); border-color: var(--signal); }
.hold span { position: relative; }
.decision textarea { width: 100%; min-height: 64px; }
.decision .others { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ---------- lista faktur ---------- */
.inv-table td { vertical-align: middle; }
.table-scroll table.list thead th { top: 0; }
.inv-table .seller b { display: block; font-weight: 600; }
.inv-table .seller small { color: var(--muted); }
.inv-table tr.due-late td:first-child { box-shadow: inset 2px 0 0 var(--coral); }

/* ---------- responsywność i ograniczenie ruchu ---------- */
@media (max-width: 1280px) {
  .inv-layout { grid-template-columns: minmax(0, 1fr) 340px; }
  .inv-queue { display: none; }
}
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .today, .inv-layout { grid-template-columns: 1fr; }
  .q-detail, .inv-side { position: static; }
  .stage-row { grid-template-columns: 110px minmax(0, 1fr) auto; }
  .content { padding: 1.25rem 1rem 2rem; }
  .hero-stats .stat + .stat { border-left: 0; border-top: 1px solid var(--border); }
  .hero-stats { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .app::before, .auth::before, .ai-frame, .rise, .paper::after { animation: none; }
  .hold.down .fill { transition: none; }
}

/* Dzwonek powiadomień */
.icon-btn.bell { position: relative; display: inline-grid; place-items: center; }
.bell-count { position: absolute; top: -5px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: #F2667B; color: #0E1626; font: 700 11px/18px "Instrument Sans", system-ui, sans-serif; text-align: center;
  box-shadow: 0 0 0 2px var(--bg, #0E1626); }

/* wersja aplikacji i bieżącego modułu: subtelnie w prawym dolnym rogu, nie przechwytuje kliknięć */
.version-badge { position: fixed; right: .75rem; bottom: .5rem; z-index: 5; font-size: .68rem; line-height: 1.2;
  color: var(--muted); opacity: .6; pointer-events: none; white-space: nowrap; }
@media print { .version-badge { display: none; } }
