/* Jasny motyw na bazie Bootstrap 5.3 – akcent morski z prototypu. */
:root {
  --acc: #0f766e; --acc-soft: #e6f2f0; --acc-ink: #0b5a54;
  --bg: #f4f6f3; --line: #e3e7e2; --ink: #1c2321; --mute: #5f6965;
  --ok: #2f8f4e; --warn: #d39b16; --bad: #c2410c; --inc: #2f8f4e;
  --bs-primary: #0f766e; --bs-primary-rgb: 15, 118, 110;
  /* Białe powierzchnie (karty, pola, panele) jak w menu; szare jest tylko tło strony (body). */
  --bs-body-bg: #ffffff; --bs-body-color: #1c2321;
  --bs-secondary-bg: #f4f6f3; --bs-tertiary-bg: #f8faf7;
  --bs-border-color: #e3e7e2; --bs-link-color: #0f766e; --bs-link-hover-color: #0b5a54; --bs-link-color-rgb: 15, 118, 110; --bs-link-hover-color-rgb: 11, 90, 84;
  --bs-secondary-color: #5f6965;
  --surface: #ffffff; --surface-2: #f7faf9; --ink-2: #3d4744; --acc-on: #ffffff;
  --bs-body-font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
body { background: var(--bg); color: var(--ink); font-size: 15px; -webkit-tap-highlight-color: transparent; }
.btn-primary {
  --bs-btn-bg: var(--acc); --bs-btn-border-color: var(--acc);
  --bs-btn-hover-bg: var(--acc-ink); --bs-btn-hover-border-color: var(--acc-ink);
  --bs-btn-active-bg: var(--acc-ink); --bs-btn-active-border-color: var(--acc-ink);
  --bs-btn-disabled-bg: var(--acc); --bs-btn-disabled-border-color: var(--acc);
  font-weight: 600;
}
.btn-soft { background: var(--acc-soft); color: var(--acc); font-weight: 600; border: 0; }
.btn-soft:hover, .btn-soft:active { background: #d4ebe7 !important; color: var(--acc-ink) !important; }
.btn-light { background: var(--surface); border-color: var(--line); }
.form-control:focus, .form-select:focus { border-color: var(--acc); box-shadow: 0 0 0 .2rem rgba(15,118,110,.15); }
.form-check-input:checked { background-color: var(--acc); border-color: var(--acc); }
.text-acc { color: var(--acc) !important; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.inc { color: var(--inc) !important; }
.neg, .warnline { color: var(--bad) !important; }
.warnline { font-size: 12px; font-weight: 600; }
.small2 { font-size: 12px; }

/* ---------- logowanie ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px;
  background: radial-gradient(1200px 500px at 50% -10%, #dff0ec 0%, var(--bg) 60%); }
.login-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  padding: 32px 24px 24px; box-shadow: 0 10px 40px rgba(15, 50, 45, .08); }
.brand-mark { width: 60px; height: 60px; border-radius: 18px; background: var(--acc); color: var(--acc-on); display: grid;
  place-items: center; font-size: 28px; box-shadow: 0 8px 20px rgba(15,118,110,.3); }
.brand-mark.sm { width: 36px; height: 36px; border-radius: 11px; font-size: 17px; box-shadow: none; }
.pw-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); color: var(--mute); z-index: 5; }

/* ---------- układ ---------- */
.app { max-width: 540px; margin: 0 auto; min-height: 100vh;
  padding: calc(env(safe-area-inset-top) + 8px) 16px calc(96px + env(safe-area-inset-bottom)); }
header.top { display: flex; align-items: flex-end; justify-content: space-between; padding: 8px 2px 12px; gap: 8px; }
header.top h1 { font-size: 22px; margin: 0; font-weight: 700; letter-spacing: -.01em; }
.mnav { display: flex; align-items: center; gap: 4px; }
.mnav .btn { width: 34px; height: 34px; padding: 0; border-radius: 10px; }
.mnav span { min-width: 112px; text-align: center; font-weight: 600; font-size: 14px; }

.card { border: 1px solid var(--line); border-radius: 16px; margin-bottom: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.02); }
.card > .card-body { padding: 14px 16px; }
.card-h { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--mute); margin: 0 0 10px;
  font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card-h a { text-transform: none; letter-spacing: 0; font-weight: 600; cursor: pointer; text-decoration: none; font-size: 13px; }

.hero { background: linear-gradient(135deg, #0f766e 0%, #13887e 100%); color: #fff; border: 0; }
.hero .lbl { opacity: .9; font-size: 13px; }
.hero .big { font-size: 34px; font-weight: 700; letter-spacing: -.02em; margin: 2px 0 4px; font-variant-numeric: tabular-nums; }
.hero .row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.25); }
.hero .row3 div { font-size: 12px; opacity: .92; }
.hero .row3 b { display: block; font-size: 15px; font-variant-numeric: tabular-nums; }

.stat .l { font-size: 12px; color: var(--mute); }
.stat .v { font-size: 18px; font-weight: 700; }

/* paski budżetu (Bootstrap progress) */
.progress { height: 8px; background: var(--line); border-radius: 6px; position: relative; overflow: visible; margin-top: 6px; }
.progress .progress-bar { border-radius: 6px; background: var(--ok); }
.progress .progress-bar.w { background: var(--warn); }
.progress .progress-bar.b { background: var(--bad); }
.progress .proj { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); opacity: .55; border-radius: 1px; }
.brow { padding: 9px 0; border-bottom: 1px solid var(--line); }
.brow:last-child { border-bottom: 0; }
.brow .t { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.brow .s { font-size: 12px; color: var(--mute); display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; }
.brow.click { cursor: pointer; }
.who-changed { font-size: 11px; color: var(--mute); margin-top: 2px; }

/* listy */
.list-group-flush .list-group-item { padding-left: 0; padding-right: 0; background: transparent; border-color: var(--line); }
.tx { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.tx .ic { width: 38px; height: 38px; border-radius: 11px; background: var(--acc-soft); display: grid; place-items: center; font-size: 18px; flex: 0 0 38px; color: var(--acc); }
.tx .mid { flex: 1; min-width: 0; }
.tx .mid b { display: block; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx .mid small { color: var(--mute); font-size: 12px; }
.tx .amt { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tx .amt.tr { color: var(--mute); }
.dayh { font-size: 12px; color: var(--mute); font-weight: 600; margin: 14px 2px 4px; text-transform: uppercase; letter-spacing: .05em; }
.pill-cash { font-size: 10px; padding: 1px 7px; border-radius: 20px; background: #fdf1d8; color: #8a5a00; font-weight: 600; margin-left: 4px; vertical-align: 1px; }
.pill-sav { background: var(--acc-soft); color: var(--acc); }
.empty { text-align: center; color: var(--mute); padding: 22px 8px; }

.who { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 6px; }
.who span { background: var(--bg); border-radius: 12px; padding: 8px; text-align: center; }
.who span b { display: block; font-size: 15px; }
.who span small { color: var(--mute); font-size: 11px; }

.banner { background: #fff7e0; border: 1px solid #f0d58a; color: #6b4e00; border-radius: 12px; padding: 10px 12px; font-size: 13px; margin-bottom: 12px; }

/* tabele */
table.t { width: 100%; font-size: 13px; margin: 0; }
table.t th { text-align: right; color: var(--mute); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; padding: 6px 4px; border-bottom: 1px solid var(--line); }
table.t td { white-space: nowrap; text-align: right; padding: 7px 4px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
table.t th:first-child, table.t td:first-child { text-align: left; }
table.t tr:last-child td { border-bottom: 0; }

.filters { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 8px; }
.filters .form-select { flex: 0 0 auto; width: auto; font-size: 13px; border-radius: 10px; }

/* dolna nawigacja i FAB */
.bottom-nav { background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom) !important; }
.bottom-nav .in { max-width: 540px; margin: 0 auto; width: 100%; display: grid; grid-template-columns: repeat(5, 1fr); }
.bottom-nav button { border: 0; background: none; padding: 8px 0 9px; font-size: 11px; color: var(--mute); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.bottom-nav button i { font-size: 19px; line-height: 1.1; }
.bottom-nav button.on { color: var(--acc); font-weight: 700; }
.fab { position: fixed; right: max(16px, calc(50% - 254px)); bottom: calc(76px + env(safe-area-inset-bottom)); width: 58px; height: 58px;
  border-radius: 18px; border: 0; background: var(--acc); color: var(--acc-on); font-size: 28px; box-shadow: 0 6px 18px rgba(15,118,110,.35); z-index: 1031; }
.fab:active { transform: scale(.96); }
.toast-pos { bottom: calc(150px + env(safe-area-inset-bottom)); z-index: 1100; }

/* bottom sheet */
.offcanvas-bottom.sheet { background: var(--surface); height: auto; max-height: 92vh; max-width: 540px; margin: 0 auto; border-radius: 20px 20px 0 0; border: 0; }
.sheet .offcanvas-body { padding: 10px 16px calc(18px + env(safe-area-inset-bottom)); }
.sheet .grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 0 auto 12px; }
.sheet h3 { font-size: 18px; font-weight: 700; margin: 0 0 12px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--bg); border-radius: 12px; padding: 3px; margin-bottom: 10px; }
.seg button { border: 0; background: none; padding: 8px 4px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--mute); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.amtin { width: 100%; font-size: 34px; font-weight: 700; text-align: center; border: 0; border-bottom: 2px solid var(--line); background: transparent; padding: 4px 0 8px; margin-bottom: 12px; outline: none; }
.amtin:focus { border-color: var(--acc); }
.chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px; }
.chip { border: 1px solid var(--line); background: var(--bg); border-radius: 12px; padding: 8px 2px; font-size: 11px; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; line-height: 1.15; }
.chip .e { font-size: 20px; }
.chip.on { border-color: var(--acc); background: var(--acc-soft); color: var(--acc); font-weight: 600; }
.subchips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.subchips button { border: 1px solid var(--line); background: var(--bg); border-radius: 20px; padding: 5px 11px; font-size: 13px; }
.subchips button.on { border-color: var(--acc); background: var(--acc-soft); color: var(--acc); font-weight: 600; }
label.f { display: block; font-size: 12px; color: var(--mute); margin: 8px 0 4px; font-weight: 600; }
.lim-in { width: 110px; text-align: right; }
.split { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.split span { background: var(--bg); border-radius: 10px; padding: 6px; text-align: center; font-size: 12px; }
.split b { display: block; font-size: 14px; }
.legend { display: flex; gap: 12px; font-size: 12px; color: var(--mute); margin-top: 4px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.min-w-0 { min-width: 0; }

/* ---------- elementy tylko na desktop (domyślnie ukryte) ---------- */
.side, .login-hero { display: none; }
.cols { display: block; }

/* =====================================================================
   DESKTOP (≥ 992 px): boczne menu, szersza treść, układ w kolumnach,
   formularze jako panel z prawej, transakcje jako tabela.
   ===================================================================== */
@media (min-width: 992px) {
  body { font-size: 14.5px; }

  /* logowanie: dwa panele */
  .login-wrap { gap: 0; padding: 40px; }
  .login-hero { display: flex; flex-direction: column; justify-content: center; width: 420px; min-height: 520px;
    background: linear-gradient(150deg, #0f766e 0%, #13887e 55%, #1b9c8f 100%); color: #fff;
    border-radius: 24px 0 0 24px; padding: 48px 44px; box-shadow: 0 10px 40px rgba(15, 50, 45, .12); }
  .login-hero .brand-mark { background: rgba(255,255,255,.18); box-shadow: none; }
  .login-hero h2 { font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; margin-bottom: 12px; }
  .login-hero p { opacity: .9; margin-bottom: 26px; }
  .login-hero ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; font-size: 14px; }
  .login-hero li i { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: rgba(255,255,255,.16); margin-right: 10px; }
  .login-card { max-width: 420px; min-height: 520px; display: flex; flex-direction: column; justify-content: center;
    border-radius: 0 24px 24px 0; border-left: 0; padding: 48px 44px; }

  /* boczne menu */
  .side { display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; width: 248px; background: var(--surface);
    border-right: 1px solid var(--line); padding: 20px 16px; z-index: 1030; }
  .side-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; margin: 0 4px 20px; }
  .side-nav { display: grid; gap: 2px; }
  .side-nav button { display: flex; align-items: center; gap: 12px; border: 0; background: none; text-align: left;
    padding: 10px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 500; font-size: 14.5px; }
  .side-nav button i { font-size: 17px; color: var(--mute); }
  .side-nav button:hover { background: var(--bg); }
  .side-nav .side-help { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--ink-2);
    font-weight: 500; font-size: 14.5px; text-decoration: none; margin-top: 6px; }
  .side-nav .side-help i { font-size: 17px; color: var(--mute); }
  .side-nav .side-help:hover { background: var(--bg); }
  .side-nav button.on { background: var(--acc-soft); color: var(--acc); font-weight: 700; }
  .side-nav button.on i { color: var(--acc); }
  .side-user { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 8px 0; border-top: 1px solid var(--line); }
  .avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--acc-soft); color: var(--acc); display: grid; place-items: center; font-weight: 700; flex: 0 0 36px; }

  .bottom-nav, .fab { display: none !important; }

  /* treść */
  .app { max-width: none; margin: 0 0 0 248px; padding: 24px 36px 40px; }
  .app > header.top, .app > main { max-width: 1180px; margin-left: auto; margin-right: auto; }
  header.top { padding: 4px 0 20px; align-items: center; }
  header.top h1 { font-size: 26px; }
  .mnav { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
  .mnav .btn { border: 0; }
  .mnav span { min-width: 130px; }

  .cols { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 20px; align-items: start; }
  .cols.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .cols.narrow-left { grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); }
  .cols .sticky { position: sticky; top: 20px; }
  .card { margin-bottom: 20px; }
  .card > .card-body { padding: 18px 20px; }

  .hero .big { font-size: 42px; }
  .hero .row3 b { font-size: 17px; }
  .who span { padding: 12px 8px; }

  /* limity w dwóch kolumnach */
  .lim-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; }
  .lim-grid .brow:nth-last-child(2):nth-child(odd) { border-bottom: 0; }

  /* transakcje: tabela zamiast listy */
  .toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
  .toolbar .input-group { max-width: 320px; margin: 0 !important; }
  .toolbar .filters { margin: 0; padding: 0; overflow: visible; }
  .toolbar .sumbox { margin-left: auto; display: flex; gap: 18px; font-size: 13px; color: var(--mute); }
  .toolbar .sumbox b { font-size: 16px; display: block; }
  table.txt { width: 100%; font-size: 14px; }
  table.txt th { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--mute); font-weight: 600;
    padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); position: sticky; top: 0; }
  table.txt td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
  table.txt tbody tr { cursor: pointer; }
  table.txt tbody tr:hover td { background: var(--surface-2); }
  table.txt tr.dayrow td { background: var(--bg) !important; font-size: 12px; font-weight: 600; color: var(--mute);
    text-transform: uppercase; letter-spacing: .05em; padding: 7px 14px; cursor: default; }
  table.txt .ic { width: 32px; height: 32px; border-radius: 9px; background: var(--acc-soft); display: inline-grid; place-items: center; margin-right: 10px; color: var(--acc); vertical-align: middle; }
  table.txt td.amt { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
  table.txt .muted { color: var(--mute); }

  /* formularze: panel z prawej zamiast arkusza od dołu */
  .offcanvas-end.sheet { width: 460px; max-width: 100vw; border-left: 1px solid var(--line); background: var(--surface); }
  .offcanvas-end.sheet .offcanvas-body { padding: 24px 24px; }
  .offcanvas-end.sheet .grab { display: none; }
  .offcanvas-end.sheet h3 { font-size: 20px; margin-bottom: 18px; }

  .toast-pos { bottom: 24px; left: auto !important; right: 24px; transform: none !important; }

  /* przyciski i hover */
  .list-group-item[data-a], .brow.click, [data-a="split"] { transition: background .12s; }
  .list-group-item[data-a]:hover { background: var(--surface-2) !important; }
}
/* mały laptop: boczne menu zostaje, karty w jednej kolumnie */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .cols { display: block; max-width: 760px; margin: 0 auto; }
  .cols .sticky { position: static; }
  .app > header.top { max-width: 760px; }
  .app { padding-left: 28px; padding-right: 28px; }
}

/* ---------- kreator pierwszego uruchomienia ---------- */
#wizardView { min-height: 100vh; background: radial-gradient(1200px 420px at 50% -10%, #dff0ec 0%, var(--bg) 60%); }
.wiz { max-width: 760px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 12px) 16px calc(24px + env(safe-area-inset-bottom)); }
.wiz-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.wiz-steps { list-style: none; display: flex; justify-content: space-between; padding: 0; margin: 0 0 8px; }
.wiz-steps li { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; font-size: 11px; color: var(--mute); }
.wiz-steps li span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px;
  background: var(--surface); border: 1px solid var(--line); color: var(--mute); }
.wiz-steps li em { font-style: normal; }
.wiz-steps li.on span { background: var(--acc); border-color: var(--acc); color: var(--acc-on); box-shadow: 0 4px 12px rgba(15,118,110,.3); }
.wiz-steps li.on { color: var(--ink); font-weight: 600; }
.wiz-steps li.done span { background: var(--acc-soft); border-color: var(--acc-soft); color: var(--acc); }
.wiz-progress { height: 4px; margin: 0 0 16px; }
.wiz-progress .progress-bar { background: var(--acc); }
.wiz-card > .card-body { padding: 20px 18px; }
.wiz-h { font-size: 21px; font-weight: 700; letter-spacing: -.01em; margin: 0 0 6px; }
.wiz-lead { color: var(--ink-2); font-size: 14px; margin-bottom: 16px; }
.wiz-plan { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.wiz-plan li { display: flex; gap: 12px; align-items: flex-start; background: var(--bg); border-radius: 12px; padding: 12px; }
.wiz-plan li i { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; background: var(--acc-soft); color: var(--acc); display: grid; place-items: center; font-size: 17px; }
.wiz-plan li b { display: block; font-size: 14px; }
.wiz-plan li span { font-size: 12.5px; color: var(--mute); }
.wiz-sec { margin-bottom: 18px; }
.wiz-sec-h { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; margin-bottom: 2px; }
.wiz-sec-h .num { color: var(--mute); font-size: 13px; }
.wiz-row { border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-bottom: 8px; background: var(--surface); }
.wiz-row.inactive { opacity: .55; }
.wiz-row label.f { margin-top: 0; font-size: 11px; }
.wiz-grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.wiz-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.wiz-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; font-weight: 600; }
.wiz-total b { font-size: 18px; }
.wiz-plan-box { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wiz-plan-box > div { background: var(--bg); border-radius: 12px; padding: 10px 12px; }
.wiz-plan-box span { display: block; font-size: 12px; color: var(--mute); margin-bottom: 2px; }
.wiz-plan-box b { font-size: 17px; }
.wiz-plan-box .wiz-left { background: var(--acc-soft); }
.wiz-lim { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.wiz-lim:last-child { border-bottom: 0; }
.wiz-nav { display: flex; justify-content: space-between; gap: 8px; margin-top: 16px; position: sticky; bottom: 0;
  padding: 12px 0 calc(4px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 70%, transparent); }
.wiz-ok { width: 64px; height: 64px; border-radius: 50%; background: var(--acc-soft); color: var(--acc); display: grid; place-items: center; font-size: 32px; margin: 4px auto 14px; }
.wiz-summary { display: grid; gap: 6px; }
.wiz-summary > div { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--bg); border-radius: 12px; }
.wiz-summary i { color: var(--acc); font-size: 17px; }
.wiz-summary span { flex: 1; }
@media (max-width: 400px) {
  .wiz-grid3 { grid-template-columns: 1fr 1fr; }
  .wiz-grid3 > div:last-child { grid-column: span 2; }
  .wiz-steps li em { display: none; }
}
@media (min-width: 992px) {
  .wiz { padding-top: 32px; }
  .wiz-card > .card-body { padding: 28px 32px; }
  .wiz-h { font-size: 24px; }
  .wiz-steps li { font-size: 12px; }
  .wiz-plan-box { grid-template-columns: repeat(4, 1fr); }
  .wiz-limits-cols { columns: 2; column-gap: 28px; }
  .wiz-row { padding: 12px 14px; }
  .wiz-summary { grid-template-columns: 1fr 1fr; }
}
.wiz-lim { break-inside: avoid; }

/* ---------- rejestracja i zaproszenia ---------- */
.pw-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.pw-meter i { height: 4px; border-radius: 2px; background: var(--line); }
.pw-meter i.weak { background: var(--bad); } .pw-meter i.fair { background: var(--warn); }
.pw-meter i.good { background: #6fb07f; } .pw-meter i.strong { background: var(--ok); }
.code-in { letter-spacing: .2em; font-weight: 700; }
.invite-banner { display: flex; gap: 10px; align-items: flex-start; background: var(--acc-soft); color: var(--acc-ink);
  border-radius: 12px; padding: 10px 12px; font-size: 13px; margin-bottom: 12px; }
.invite-banner i { font-size: 18px; line-height: 1.2; }
.invite-box { margin-top: 12px; padding: 12px; border: 1px dashed #b9d9d3; border-radius: 12px; background: var(--surface-2); }
.invite-code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 26px; font-weight: 700; letter-spacing: .12em; color: var(--acc-ink); margin: 2px 0 4px; }
.invite-code span { color: var(--mute); margin: 0 6px; }
.invite-nudge { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin-bottom: 12px; font-size: 13px; }
.invite-nudge > i { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 10px; background: var(--acc-soft); color: var(--acc); display: grid; place-items: center; font-size: 16px; }
.invite-nudge span { flex: 1; }
.login-pair { width: 100%; display: flex; justify-content: center; }
@media (min-width: 992px) {
  .login-pair { width: auto; align-items: stretch; filter: drop-shadow(0 10px 30px rgba(15, 50, 45, .10)); }
  .login-pair .login-hero, .login-pair .login-card { box-shadow: none; min-height: 560px; }
}
@media (min-width: 992px) {
  .login-pair .login-hero { flex: 0 0 420px; }
  .login-pair .login-card { flex: 0 0 420px; width: 420px; }
}

/* ---------- pozycje planu w kategorii ---------- */
.lim-sum { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap;
  background: var(--acc-soft); color: var(--acc-ink); border-radius: 8px; padding: 4px 10px; font-size: 13.5px; }
.lim-sum i { font-size: 13px; opacity: .8; }
.it-toggle { border: 0; background: none; color: var(--acc); font-weight: 600; font-size: 12.5px; padding: 4px 0; display: inline-flex; gap: 4px; align-items: center; }
.it-toggle:hover { color: var(--acc-ink); }
.items { margin-top: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 4px 12px 10px; background: var(--surface-2); }
.it { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.it[role="button"] { cursor: pointer; }
.it[role="button"]:hover b { color: var(--acc-ink); }
.it-main { flex: 1; min-width: 0; }
.it-main b { font-weight: 600; font-size: 14px; }
.it-main small { display: block; color: var(--mute); font-size: 12px; margin-top: 1px; }
.it > .num { font-size: 14px; padding-top: 1px; }
.it-tag { font-size: 10px; font-weight: 600; padding: 1px 7px; border-radius: 20px; background: #fdf1d8; color: #8a5a00; margin-left: 6px; vertical-align: 1px; }
.it-bar { height: 4px; background: var(--line); border-radius: 3px; margin-top: 5px; overflow: hidden; }
.it-bar i { display: block; height: 100%; background: var(--ok); border-radius: 3px; }
.it-bar i.w { background: var(--warn); } .it-bar i.b { background: var(--bad); }
.it-foot { display: flex; justify-content: space-between; padding: 8px 0 0; font-size: 13px; font-weight: 600; }
.it-foot.muted { font-weight: 400; color: var(--mute); padding-top: 4px; }
.subchips button.on { border-color: var(--acc); background: var(--acc-soft); color: var(--acc); font-weight: 600; }
@media (min-width: 992px) {
  .lim-grid .brow.wide { grid-column: 1 / -1; }
}

/* ---------- historia zmian budżetu ---------- */
.lg-day { font-size: 11px; font-weight: 600; color: var(--mute); text-transform: uppercase; letter-spacing: .05em; margin: 10px 0 2px; }
.lg-day:first-child { margin-top: 0; }
.lg-row { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.lg-row:last-child { border-bottom: 0; }
.lg-ic { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px; background: var(--acc-soft); color: var(--acc); display: grid; place-items: center; font-size: 14px; }
.lg-main { flex: 1; min-width: 0; }
.lg-text { font-size: 13.5px; line-height: 1.4; }
.lg-sub { display: block; font-size: 12px; color: var(--mute); }
.lg-meta { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--mute); margin-top: 3px; }
.lg-av { width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); display: inline-grid; place-items: center; font-size: 9px; font-weight: 700; color: var(--ink); }
.lg-delta { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 10px; white-space: nowrap; }
.lg-delta { background: var(--bg); color: var(--ink-2); border: 1px solid var(--line); }

/* ---------- dodawanie kategorii z formularza transakcji ---------- */
.chip-add { border-style: dashed; color: var(--acc); background: var(--surface); }
.chip-add .e { font-size: 18px; line-height: 24px; }
.sub-add { border: 1px dashed var(--acc) !important; background: var(--surface) !important; color: var(--acc); font-weight: 600; }
.sub-add.on { background: var(--acc-soft) !important; }
.newcat { display: flex; gap: 6px; align-items: center; margin: -2px 0 10px; padding: 8px; border-radius: 12px; background: var(--acc-soft); }
.newcat .nc-icon { width: 52px; flex: 0 0 52px; font-size: 16px; }
.newcat .form-control { background: var(--surface); }
textarea#tnote { resize: vertical; min-height: 44px; }

/* ---------- wybór ikony ---------- */
.ipick { display: inline-flex; }
.ipick-btn { width: 44px; height: 38px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 20px; line-height: 1;
  display: grid; place-items: center; padding: 0; position: relative; }
.ipick-btn::after { content: ""; position: absolute; right: 3px; bottom: 3px; border: 3px solid transparent; border-top-color: var(--mute); border-bottom: 0; }
.ipick-btn:hover, .ipick-btn[aria-expanded="true"] { border-color: var(--acc); background: var(--acc-soft); }
.ipick.sm .ipick-btn { width: 38px; height: 31px; font-size: 17px; border-radius: 8px; }
.ipick-panel { position: fixed; z-index: 1095; width: min(316px, calc(100vw - 16px)); max-height: min(380px, 70vh); overflow: auto; display: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgba(15, 50, 45, .18); padding: 8px 10px 10px; }
.ipick-panel.on { display: block; }
.ipick-g { font-size: 11px; font-weight: 600; color: var(--mute); text-transform: uppercase; letter-spacing: .05em; margin: 8px 2px 4px; }
.ipick-g:first-child { margin-top: 2px; }
.ipick-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.ipick-grid button { border: 0; background: none; font-size: 20px; height: 34px; border-radius: 8px; padding: 0; }
.ipick-grid button:hover { background: var(--bg); }
.ipick-grid button.on { background: var(--acc-soft); box-shadow: inset 0 0 0 1.5px var(--acc); }
.ipick-own { display: flex; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }

/* ---------- kreator: kategorie ---------- */
.wiz-cat .form-control.fw-semibold { min-width: 0; }
.wiz-subs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.wiz-sub { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); background: var(--bg); border-radius: 20px;
  padding: 3px 4px 3px 11px; font-size: 13px; }
.wiz-sub button { border: 0; background: none; color: var(--mute); width: 22px; height: 22px; border-radius: 50%; padding: 0; display: grid; place-items: center; }
.wiz-sub button:hover { background: #fdeee6; color: var(--bad); }
.wiz-subnew { display: inline-flex; gap: 4px; flex: 1 1 200px; max-width: 280px; }
.wiz-subnew .form-control { border-style: dashed; }

/* ---------- analiza (kwartał / rok) ---------- */
:root { --viz-inc: #0a8f7f; --viz-exp: #eb6834; }   /* para sprawdzona walidatorem (CVD, kontrast, nasycenie) */
.ana-seg { margin-bottom: 12px; }
.ana-nav .card-body { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; }
.ana-nav .btn { width: 36px; height: 36px; padding: 0; border-radius: 10px; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.kpi-l { font-size: 12px; color: var(--mute); display: flex; align-items: center; gap: 6px; }
.kpi-v { font-size: 20px; font-weight: 700; margin: 2px 0; letter-spacing: -.01em; }
.kpi-d { display: block; font-size: 11.5px; color: var(--mute); line-height: 1.3; }
.lg-sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: 0 0 10px; }
.lg-mark { display: inline-block; width: 2px; height: 12px; background: var(--ink); vertical-align: -2px; margin-right: 4px; }
.viz-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--ink-2); margin-bottom: 6px; align-items: center; }
.viz-legend span { display: inline-flex; align-items: center; gap: 6px; }
.viz { display: block; overflow: visible; }
.viz .viz-grid { stroke: var(--line); stroke-width: 1; }
.viz .viz-base { stroke: #b9c0bc; stroke-width: 1; }
.viz .viz-ax { font-size: 10px; fill: var(--mute); font-variant-numeric: tabular-nums; }
.viz .viz-inc { fill: var(--viz-inc); }
.viz .viz-exp { fill: var(--viz-exp); }
.viz .viz-hit { fill: transparent; cursor: default; }
.viz g:hover .viz-hit { fill: rgba(28, 35, 33, .05); }
.bva-sum { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; padding-bottom: 8px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.bva, .str { padding: 8px 0; border-bottom: 1px solid var(--line); }
.bva:last-child, .str:last-child { border-bottom: 0; }
.bva-t, .str-t { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; }
.bva-bar { position: relative; display: flex; gap: 2px; height: 8px; margin-top: 6px; background: var(--bg); border-radius: 4px; }
.bva-bar i { display: block; height: 100%; }
.bva-bar i.in { background: var(--viz-inc); border-radius: 4px; }
.bva-bar i.in:has(+ i.over) { border-radius: 4px 0 0 4px; }
.bva-bar i.over, .lg-over { background: repeating-linear-gradient(135deg, var(--bad) 0 2.5px, #f7d6c8 2.5px 5px); }
.bva-bar i.over { border-radius: 0 4px 4px 0; }
.bva-lim { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--ink); border-radius: 1px; }
.bva-s, .str-d { font-size: 11.5px; color: var(--mute); margin-top: 3px; }
.str-bar { height: 6px; margin-top: 5px; background: var(--bg); border-radius: 3px; }
.str-bar i { display: block; height: 100%; background: var(--viz-inc); border-radius: 3px; }
.viz-tip { position: fixed; z-index: 1100; pointer-events: none; background: #1c2321; color: #fff; font-size: 12px; line-height: 1.45;
  padding: 7px 10px; border-radius: 9px; box-shadow: 0 6px 18px rgba(0,0,0,.18); opacity: 0; transition: opacity .1s; max-width: 240px; }
.viz-tip.on { opacity: 1; }
.viz-tip b { display: block; margin-bottom: 2px; }
[data-tip] { cursor: default; }
@media (min-width: 992px) {
  .kpis { grid-template-columns: repeat(4, 1fr); }
  .kpi-v { font-size: 22px; }
}

/* ---------- moje konto ---------- */
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--acc-soft); color: var(--acc); display: grid; place-items: center; font-weight: 700; flex: 0 0 36px; }
.avatar.lg { width: 44px; height: 44px; flex-basis: 44px; font-size: 18px; }
.avatar.xl { width: 56px; height: 56px; flex-basis: 56px; font-size: 22px; background: var(--acc); color: var(--acc-on); }
.acct-link { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.acct-link:hover b { color: var(--acc-ink); }
.mem { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mem .avatar { margin-top: 2px; }
.mem .form-control { border-color: transparent; padding-left: 6px; margin-left: -6px; }
.mem .form-control:hover, .mem .form-control:focus { border-color: var(--line); }
.mem-add { display: flex; gap: 6px; margin-top: 12px; }
.side-user [data-tab="konto"] { cursor: pointer; }
.side-user.on { background: var(--acc-soft); border-radius: 12px; }
.side-user { border-radius: 12px; padding: 10px 8px !important; margin-top: auto; transition: background .12s; }
.side-user:hover { background: var(--bg); }

/* ---------- reset hasła ---------- */
.or-sep { display: flex; align-items: center; gap: 10px; color: var(--mute); font-size: 12px; margin: 14px 0; }
.or-sep::before, .or-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- bezpieczeństwo: 2FA, aktywność ---------- */
.sec-ic { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; }
.sec-ic.on { background: var(--acc-soft); color: var(--acc); }
.sec-ic.off { background: var(--bg); color: var(--mute); }
.qr-wrap { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.qr-box { width: 172px; height: 172px; flex: 0 0 172px; border: 1px solid var(--line); border-radius: 12px; display: grid; place-items: center; background: var(--surface); padding: 6px; }
.qr-box svg { width: 100%; height: 100%; }
.qr-wrap > div:last-child { flex: 1 1 160px; }
.secret { font-family: ui-monospace, Consolas, monospace; font-size: 13px; font-weight: 600; color: var(--ink); background: var(--bg); border-radius: 8px; padding: 6px 8px; margin-top: 4px; word-break: break-all; user-select: all; }
.bk-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.bk-codes code { font-size: 15px; font-weight: 600; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; text-align: center; letter-spacing: .04em; }
.act-h { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--mute); margin-bottom: 4px; }
.act { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.act:last-of-type { border-bottom: 0; }
.act > i { font-size: 15px; margin-top: 1px; }

/* ---------- informacja o wersji testowej (ekran logowania) ---------- */
.beta-note { background: #fff8e6; border: 1px solid #f0d58a; border-radius: 12px; padding: 10px 12px; font-size: 12px; line-height: 1.45; color: #5c4a12; }
.beta-note-h { font-weight: 700; font-size: 12.5px; margin-bottom: 4px; color: #6b4e00; }
.beta-note-h i { margin-right: 4px; }
.beta-note p { margin-bottom: 6px; }

/* ===================== Panel administratora ===================== */
.adm-kpis .kpi.adm-warn { border-color: #f3c2a8; background: #fff7f2; }
.adm-grid { display: grid; gap: 0 12px; }
@media (min-width: 1200px) { .adm-grid { grid-template-columns: 1.15fr 1fr; } }
.adm-chart { display: flex; align-items: flex-end; gap: 2px; height: 96px; padding-top: 4px; border-bottom: 1px solid var(--line); }
.adm-bar { flex: 1; height: 100%; display: flex; flex-direction: column-reverse; min-width: 3px; }
.adm-bar i { display: block; border-radius: 2px 2px 0 0; }
.adm-bar:hover i { filter: brightness(.85); }
.c1 { background: var(--acc); } .c2 { background: #5fb3a8; } .c3 { background: var(--bad); } .c4 { background: #c9cfcb; }
.adm-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--mute); margin-top: 2px; }
.adm-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; color: var(--mute); margin-top: 4px; }
.adm-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.adm-sub { font-size: 12px; font-weight: 600; color: var(--mute); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 6px; }
.adm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.adm-chips span { background: var(--bs-tertiary-bg); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; font-size: 12.5px; }
.adm-chips span.ban { background: #fff3ee; border-color: #f3c2a8; }
.adm-table { font-size: 13.5px; }
.adm-table th { font-size: 11.5px; font-weight: 600; color: var(--mute); text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; }
.adm-table td { padding-top: 7px; padding-bottom: 7px; }
.adm-break { word-break: break-all; }
.adm-tabs { margin-left: auto; }
.card-h .adm-tabs { float: right; }
.adm-sys { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin-bottom: 10px; }
.adm-sys > div { display: flex; flex-direction: column; font-size: 13.5px; min-width: 0; }
.adm-sys > div > span { font-size: 11.5px; }
.adm-meter { margin-bottom: 8px; }
.adm-meter .progress { height: 7px; margin-top: 3px; }
.adm-list > div { display: flex; align-items: center; gap: 8px 12px; justify-content: space-between; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.adm-list > div:last-child { border-bottom: 0; }
.adm-ev > div > code { flex: 1; }
.adm-jail { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.adm-ok { color: var(--ok); white-space: nowrap; }
.adm-checks > div { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.adm-checks > div:last-child { border-bottom: 0; }
/* polityka prywatności */
.legal-page { background: var(--bs-body-bg, #fff); }
.legal { max-width: 760px; margin: 0 auto; padding: 28px 16px 60px; line-height: 1.6; font-size: 15px; }
.legal h1 { font-size: 26px; font-weight: 800; margin: 18px 0 4px; }
.legal h2 { font-size: 17px; font-weight: 700; margin: 26px 0 8px; }
.legal ul { padding-left: 1.2rem; }
.legal li { margin-bottom: 4px; }
.legal-back { font-size: 14px; font-weight: 600; text-decoration: none; }
.legal-links { text-align: center; font-size: 12px; margin-top: 12px; }
.legal-links a { color: inherit; opacity: .75; }
/* import wyciągu CSV */
.offcanvas-bottom.sheet.sheet-wide { max-width: 860px; }
@media (min-width: 992px) { .offcanvas-end.sheet.sheet-wide { width: 760px; } }
.imp-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 26px 16px; border: 2px dashed var(--line); border-radius: 14px; cursor: pointer; margin-top: 6px; }
.imp-drop:hover { border-color: #0f766e; background: var(--surface-2); }
.imp-drop .bi { font-size: 30px; color: #0f766e; }
.imp-map { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.imp-sum { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.imp-list { max-height: 52vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; }
.imp-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.imp-row:last-child { border-bottom: 0; }
.imp-row .form-check-input { margin-top: 4px; flex: none; }
.imp-row .imp-main { flex: 1; min-width: 0; }
.imp-row.off { opacity: .55; }
.imp-row.dup { background: #fffaf0; }
.imp-row .form-select-sm { max-width: 320px; }
/* cele oszczędnościowe */
.goal { padding: 8px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.goal:last-child { border-bottom: 0; }
.goal-bar { height: 8px; border-radius: 8px; background: var(--acc-soft); margin: 6px 0 4px; overflow: hidden; }
.goal-bar i { display: block; height: 100%; background: var(--acc); border-radius: 8px; }
.goal.done .goal-bar i { background: var(--ok); }
/* reguły kategorii */
.rule-add { display: flex; gap: 6px; }
.rule-add .form-control { flex: 1 1 40%; } .rule-add .form-select { flex: 1 1 50%; min-width: 0; }
.rules code { color: var(--acc-ink); background: var(--acc-soft); padding: 1px 6px; border-radius: 6px; font-size: 12.5px; max-width: 40%; }

/* ---------- tryb ciemny (Ustawienia → Wygląd; js/theme.js ustawia data-theme na <html>) ---------- */
[data-theme="dark"] {
  color-scheme: dark;
  --acc: #2bb3a3; --acc-soft: #163a35; --acc-ink: #7fdcd0;
  --bg: #0f1412; --line: #2a3330; --ink: #e3e9e6; --mute: #9aa7a2; --ink-2: #c3ccc8;
  --ok: #4cc27a; --warn: #e3b23c; --bad: #f07a4a; --inc: #4cc27a;
  --surface: #171e1b; --surface-2: #1d2522; --acc-on: #08201d;
  --bs-primary: #2bb3a3; --bs-primary-rgb: 43, 179, 163;
  --bs-body-bg: #171e1b; --bs-body-color: #e3e9e6; --bs-secondary-bg: #1d2522; --bs-tertiary-bg: #1a221f;
  --bs-border-color: #2a3330; --bs-link-color: #4fd1c1; --bs-link-hover-color: #7fdcd0; --bs-link-color-rgb: 79, 209, 193; --bs-link-hover-color-rgb: 127, 220, 208;
  --bs-secondary-color: #9aa7a2; --bs-emphasis-color: #f2f6f4;
  --viz-inc: #2bb3a3; --viz-exp: #f07a4a;
}
[data-theme="dark"] .btn-primary { --bs-btn-color: #0b1412; --bs-btn-hover-color: #0b1412; --bs-btn-active-color: #0b1412; }
[data-theme="dark"] .btn-soft:hover, [data-theme="dark"] .btn-soft:active { background: #1f4a44 !important; }
[data-theme="dark"] .login-wrap, [data-theme="dark"] #wizardView { background: radial-gradient(1200px 500px at 50% -10%, #12302b 0%, var(--bg) 60%); }
[data-theme="dark"] .hero { background: linear-gradient(135deg, #0d5f58 0%, #127066 100%); }
[data-theme="dark"] .banner, [data-theme="dark"] .beta-note { background: #2b2412; border-color: #5c4a1c; color: #ecd9a4; }
[data-theme="dark"] .beta-note-h { color: #f2d27a; }
[data-theme="dark"] .pill-cash, [data-theme="dark"] .it-tag { background: #3a2e12; color: #f2c766; }
[data-theme="dark"] .imp-row.dup { background: #2a2414; }
[data-theme="dark"] .adm-kpis .kpi.adm-warn, [data-theme="dark"] .adm-chips span.ban { background: #2e1d15; border-color: #6b3a24; }
[data-theme="dark"] .invite-box { border-color: #2f5550; }
[data-theme="dark"] .wiz-sub button:hover { background: #3a2016; }
[data-theme="dark"] .viz .viz-base { stroke: #44504c; }
[data-theme="dark"] .viz g:hover .viz-hit { fill: rgba(255, 255, 255, .05); }
[data-theme="dark"] .viz-tip { background: #e3e9e6; color: #0f1412; }
[data-theme="dark"] .card, [data-theme="dark"] .kpi { box-shadow: none; }
.text-secondary { color: var(--mute) !important; }   /* w obu motywach: kontrast co najmniej 4,5:1 */
[data-theme="dark"] .form-control, [data-theme="dark"] .form-select { background-color: #121815; border-color: #2f3a36; color: var(--ink); }
[data-theme="dark"] .form-control::placeholder { color: #6f7c77; }
[data-theme="dark"] .form-floating > .form-control::placeholder { color: transparent; }   /* pływająca etykieta zamiast podpowiedzi */
[data-theme="dark"] .side-nav button:not(.on), [data-theme="dark"] .side a { color: var(--ink-2); }
[data-theme="dark"] .c4 { background: #4a5450; }
[data-theme="dark"] .btn-light {
  --bs-btn-color: var(--ink); --bs-btn-bg: var(--surface); --bs-btn-border-color: var(--line);
  --bs-btn-hover-color: #ffffff; --bs-btn-hover-bg: #26302c; --bs-btn-hover-border-color: #3a4642;
  --bs-btn-active-color: #ffffff; --bs-btn-active-bg: #2c3733; --bs-btn-active-border-color: #3a4642;
  --bs-btn-disabled-color: var(--mute); --bs-btn-disabled-bg: var(--surface);
  color: var(--ink);
}
[data-theme="dark"] .btn-light.text-danger, [data-theme="dark"] .text-danger { color: #ff8a8a !important; }
[data-theme="dark"] .btn-outline-danger { --bs-btn-color: #ff8a8a; --bs-btn-border-color: #c44b4b; --bs-btn-hover-bg: #c44b4b; --bs-btn-hover-border-color: #c44b4b; --bs-btn-hover-color: #fff; }
[data-theme="dark"] .bg-white { background-color: var(--surface) !important; }
[data-theme="dark"] .input-group-text { color: var(--mute); border-color: #2f3a36; }
[data-theme="dark"] .fab, [data-theme="dark"] .avatar.xl { color: var(--acc-on); }
/* przełącznik motywu w nagłówku */
.theme-btn { width: 34px; height: 34px; padding: 0; border-radius: 10px; }
.theme-menu .dropdown-item.active { background: var(--acc-soft); color: var(--acc-ink); }
/* strona pomocy */
.help-search { position: relative; margin: 14px 0 10px; }
.help-search .bi { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--mute); }
.help-search .form-control { padding-left: 36px; height: 44px; border-radius: 12px; }
.help-toc { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; margin: 8px 0 20px; }
.help-toc a { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 600; }
.help-toc a:hover { border-color: var(--acc); color: var(--acc); }
.help-toc .bi { color: var(--acc); }
.help h2 { display: flex; align-items: center; gap: 8px; scroll-margin-top: 12px; }
.help h2 .bi { color: var(--acc); }
.help details { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin-bottom: 8px; }
.help summary { padding: 11px 14px; cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.help summary::-webkit-details-marker { display: none; }
.help summary::after { content: "+"; color: var(--acc); font-weight: 700; }
.help details[open] summary::after { content: "−"; }
.help details > :not(summary) { padding: 0 14px; }
.help details > :last-child { padding-bottom: 12px; margin-bottom: 0; }
.help-contact { display: flex; gap: 12px; align-items: flex-start; margin-top: 28px; padding: 14px; border-radius: 14px; background: var(--acc-soft); }
.help-contact > .bi { font-size: 22px; color: var(--acc); }
.help-contact a { color: var(--acc-ink); }
/* stopka: pomoc, regulamin, polityka prywatności (aplikacja i strony informacyjne) */
.site-foot { max-width: 1180px; margin: 28px auto 0; padding: 16px 4px 4px;
  border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center;
  justify-content: space-between; font-size: 13px; color: var(--mute); }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-foot a { color: var(--mute); text-decoration: none; }
.site-foot a:hover { color: var(--acc); text-decoration: underline; }
body.legal-page > .site-foot { max-width: 760px; padding: 16px 16px 28px; margin-top: 0; }
/* strony błędów */
.err-page { max-width: 520px; margin: 0 auto; padding: 12vh 16px 32px; text-align: center; }
.err-page .brand-mark { margin: 0 auto 18px; }
.err-code { font-size: 64px; font-weight: 800; line-height: 1; color: var(--acc); letter-spacing: -.02em; }
.err-page h1 { font-size: 24px; font-weight: 700; margin: 10px 0 8px; }
body.legal-page > .site-foot { justify-content: center; }
/* przełącznik zakresu na banerze „Wolne środki” */
.hero-seg { display: inline-flex; background: rgba(255,255,255,.16); border-radius: 10px; padding: 2px; gap: 2px; }
.hero-seg button { border: 0; background: none; color: inherit; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 8px; opacity: .85; }
.hero-seg button.on { background: #fff; color: #0b5a54; opacity: 1; }
[data-theme="dark"] .hero-seg button.on { background: #e3e9e6; color: #0b3f3a; }
.hero-seg button:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
