/* Astrateg payouts app. Brand: docs/brand/brand-guide.md
   Light working surface, navy app bar, bottom nav on phones, side nav on desktop. */
:root {
  --navy: #031432;
  --purple: #5302DF;
  --purple-deep: #3702AF;
  --pink: #F82272;

  --bg: #F4F5FA;
  --surface: #FFFFFF;
  --surface-2: #F8F9FD;
  --line: #DDE1EC;
  --line-strong: #8C96B3;   /* 3:1 on white for control edges */
  --text: #0B1530;
  --text-2: #36405C;
  --muted: #56607A;
  --accent: #5302DF;
  --accent-soft: #EFE8FD;
  --on-accent: #FFFFFF;
  --ok: #0F7B4B;
  --warn-bg: #FFF4DB;
  --warn-text: #6E4300;
  --danger: #B3123E;
  --danger-bg: #FDECEF;

  --radius: 14px;
  --radius-sm: 10px;
  --font: 'Rubik', system-ui, sans-serif;
  --appbar-h: 56px;
  --nav-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #020A1D;
    --surface: #07183A;
    --surface-2: #0B2150;
    --line: #1C3265;
    --line-strong: #4A6AA6;
    --text: #F1F3FA;
    --text-2: #C3CBE0;
    --muted: #A3AECB;
    --accent: #A980EF;
    --accent-soft: rgba(169, 128, 239, 0.16);
    --on-accent: #031432;
    --ok: #3DD68C;
    --warn-bg: #3A2A05;
    --warn-text: #FFD58A;
    --danger: #FF8FA6;
    --danger-bg: #3A0A18;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--appbar-h) + 64px);
  scroll-padding-bottom: calc(var(--nav-h) + var(--safe-b) + 72px);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--nav-h) + var(--safe-b) + 16px);
}
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.neg { color: var(--danger); font-weight: 600; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.warn-text { color: var(--warn-text); font-weight: 500; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.01em; margin: 0; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
p { margin: 0; }

.skip { position: absolute; inset-inline-start: 12px; top: -48px; z-index: 100; background: var(--surface); color: var(--text); padding: 10px 14px; border-radius: 8px; }
.skip:focus { top: 8px; }

/* ── App bar ─────────────────────────── */
.appbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: calc(var(--appbar-h) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
  background: var(--navy); color: #fff;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-chip { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: #fff; }
.brand-chip img { width: 26px; height: auto; }
.brand-name { font-weight: 600; letter-spacing: 0.01em; }
.brand-product { color: #C9B3F6; font-weight: 500; }
.appbar-btn {
  min-height: 44px; padding: 0 14px; border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.35); background: transparent; color: #fff; cursor: pointer;
}

/* ── Navigation ─────────────────────── */
.nav {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(7, 1fr); align-items: end;
  padding: 6px max(6px, env(safe-area-inset-right)) calc(6px + var(--safe-b)) max(6px, env(safe-area-inset-left));
  background: var(--surface); border-top: 1px solid var(--line);
}
.nav a, .nav-add {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 56px; padding: 4px 2px; border-radius: 12px;
  color: var(--muted); text-decoration: none; font-size: 12.5px; font-weight: 500;
  border: 0; background: none; cursor: pointer;
}
.nav svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav a[aria-current="page"] { color: var(--accent); }
.nav a[aria-current="page"] svg { stroke-width: 2.3; }
.nav a[aria-current="page"]::after { content: ''; width: 18px; height: 3px; border-radius: 3px; background: currentColor; }
.nav-add { color: var(--navy); }
.nav-add svg {
  width: 44px; height: 44px; padding: 10px; border-radius: 50%;
  background: var(--pink); stroke: var(--navy); stroke-width: 2.6;
  box-shadow: 0 4px 14px rgba(248, 34, 114, 0.35);
}
@media (prefers-color-scheme: dark) { .nav-add { color: var(--text); } }

/* ── Main ───────────────────────────── */
main { max-width: 1040px; margin: 0 auto; padding: 0 16px 24px; outline: none; }
.monthbar {
  position: sticky; top: calc(var(--appbar-h) + env(safe-area-inset-top, 0px)); z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin: 0 -16px 16px; padding: 8px 12px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.monthbar-title { font-size: 19px; display: flex; align-items: center; gap: 8px; }
.lock-tag { font-size: 13px; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: var(--warn-bg); color: var(--warn-text); }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; font-size: 22px;
}
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.state:empty { display: none; }
.state { margin: 16px 0; color: var(--muted); text-align: center; }

.stack { display: grid; gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 10px; }
.card.narrow, .login { max-width: 440px; margin: 24px auto; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.page-head { padding: 0 2px; }
.empty, .empty-state p { color: var(--muted); }
.empty-state { text-align: center; justify-items: center; padding: 28px 18px; }

.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 16px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.row > :first-child { min-width: 0; overflow-wrap: anywhere; }
.row > :last-child { justify-self: end; text-align: end; }
.row:last-child { border-bottom: 0; }
.row.sub { color: var(--text-2); font-size: 14.5px; padding-inline-start: 12px; }
.row.strong { font-weight: 600; border-bottom-style: solid; }
.row.total { font-weight: 700; font-size: 18px; border-top: 2px solid var(--text); border-bottom: 0; margin-top: 8px; padding-top: 10px; }

.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 379px) { .kpis { grid-template-columns: 1fr; } }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; min-width: 0; }
.kpi-k { color: var(--muted); font-size: 14px; }
.kpi-v { font-size: 22px; font-weight: 700; margin-top: 2px; overflow-wrap: anywhere; }
.kpi-s { color: var(--muted); font-size: 13px; margin-top: 2px; }

.banner { background: var(--warn-bg); color: var(--warn-text); border-radius: var(--radius-sm); padding: 12px 14px; }
.notices { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.notices li { border-radius: var(--radius-sm); padding: 10px 14px; font-size: 14.5px; }
.notices li.warn { background: var(--warn-bg); color: var(--warn-text); }
.notices li.error { background: var(--danger-bg); color: var(--danger); font-weight: 500; }
.notices li::before { content: '⚠ '; }

.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.list-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 52px; padding: 8px 12px; text-align: start;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer;
}
.list-btn small, .hist small { display: block; color: var(--muted); font-size: 13px; }
.list-btn:disabled { cursor: default; }
.list-btn:has(.deal-nums) { flex-direction: column; align-items: stretch; }
.list-btn .deal-nums > span { background: var(--surface); }
.deal-nums.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.list-main { display: grid; min-width: 0; overflow-wrap: anywhere; }
.hist { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--line); }

/* ── Buttons & inputs ───────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 14.5px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--pink); border-color: var(--pink); color: var(--navy); font-weight: 600; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-danger { color: var(--danger); border-color: var(--danger); margin-inline-start: auto; }
.btn-text { background: none; border: 0; color: var(--accent); padding: 10px 0; min-height: 44px; cursor: pointer; text-decoration: underline; }

.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-weight: 500; font-size: 14.5px; }
.hint { color: var(--muted); font-size: 13px; }
.field-err { color: var(--danger); font-size: 13.5px; font-weight: 500; }
.input {
  width: 100%; min-height: 46px; padding: 10px 12px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
}
textarea.input { min-height: 72px; resize: vertical; }
.input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.input-sm { width: auto; min-width: 72px; }
.form-err { background: var(--danger-bg); color: var(--danger); border-radius: var(--radius-sm); padding: 10px 12px; }
.form-ok { background: var(--accent-soft); border-radius: var(--radius-sm); padding: 10px 12px; }
.err-summary { background: var(--danger-bg); color: var(--danger); border: 2px solid var(--danger); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 12px; }
.err-summary ul { margin: 6px 0 0; padding-inline-start: 20px; }
.err-summary a { color: inherit; }
.note-info:empty { display: none; }
.note-info { background: var(--accent-soft); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 14.5px; }

.two-col, .three-col { display: grid; gap: 12px; }
@media (min-width: 560px) {
  .two-col { grid-template-columns: 1fr 1fr; }
  .three-col { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.group { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.group legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.choices { display: grid; gap: 8px; }
.choices.two { grid-template-columns: 1fr 1fr; }
.choice {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 12px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer;
}
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.choice input[type="radio"], .choice input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--accent); flex: none; margin: 0; }
.choice-body { display: grid; flex: 1; min-width: 0; }
.choice-label { font-weight: 500; }
.choice-sub { color: var(--muted); font-size: 13.5px; }
.choice.qty { cursor: default; }

.perk-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; }
.set-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.rows { display: grid; }
.item-block { display: grid; gap: 8px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.item-block:last-child { border-bottom: 0; }
.save-bar { position: sticky; bottom: calc(var(--nav-h) + var(--safe-b) + 8px); z-index: 5; display: flex; justify-content: center; }
.save-bar .btn { box-shadow: 0 6px 20px rgba(3, 20, 50, 0.18); }

/* ── Deals ──────────────────────────── */
.deals { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.deal {
  width: 100%; display: grid; gap: 10px; padding: 14px; text-align: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer;
}
.deal:disabled { cursor: default; }
.deal-main { display: grid; gap: 2px; }
.deal-client { font-weight: 600; font-size: 17px; }
.deal-pkg { color: var(--text-2); }
.deal-meta { color: var(--muted); font-size: 13.5px; }
.deal-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.deal-nums > span {
  display: grid; gap: 2px; align-content: start; justify-items: start; text-align: start; min-width: 0;
  padding: 8px 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.deal-nums > span > small:first-child { color: var(--muted); font-size: 12.5px; }
.deal-nums .num { font-weight: 600; font-size: 15px; }
.deal-nums .profit { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.deal-nums .margin { color: var(--ok); font-weight: 600; font-size: 12.5px; }
.deal-nums .margin.neg { color: var(--danger); }
@media (max-width: 399px) { .deal-nums { grid-template-columns: 1fr 1fr; } .deal-nums .profit { grid-column: 1 / -1; } }
.deal-nums .neg { display: flex; flex-wrap: wrap; column-gap: 4px; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 720px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { display: grid; gap: 2px; justify-items: start; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); min-width: 0; }
.tile small { color: var(--muted); font-size: 13px; }
.tile .num, .tile > span:last-child { font-weight: 700; font-size: 17px; }
.fig { display: inline-grid; gap: 2px; justify-items: start; text-align: start; min-width: 0; }
.fig > small:first-child { color: var(--muted); font-size: 12.5px; }
.fig > :last-child { font-weight: 600; }
.tile-neg .num { color: var(--danger); }
.preview .tiles { margin-block: 8px; }
.cancel-person { padding-block-start: 10px; border-block-start: 1px dashed var(--line); margin-block-start: 6px; }
.cancel-person h4 { margin: 0 0 6px; font-size: 14px; font-weight: 600; }
.preview .deal-nums { margin-block: 8px 4px; }
.preview-sub { margin: 10px 0 0; font-size: 13px; font-weight: 600; color: var(--muted); }
/* Settings sections fold on phones */
details.set-sec > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; min-height: 44px; }
details.set-sec > summary::-webkit-details-marker { display: none; }
details.set-sec > summary::after { content: '▾'; color: var(--muted); }
details.set-sec[open] > summary::after { content: '▴'; }
details.set-sec > summary h2 { margin: 0; }
details.set-sec[open] > summary { margin-bottom: 8px; }

/* ── Payouts ────────────────────────── */
.pay-group { display: grid; gap: 8px; }
.group-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 0 2px; }
.group-head h2 { margin: 0; }
.group-total { display: inline-flex; align-items: baseline; gap: 6px; font-size: 15px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.group-total .lbl { font-size: 13px; }
.pay-group > .hint { margin: -4px 2px 0; }
.payee { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.payee summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 56px; padding: 10px 14px; cursor: pointer; list-style: none;
}
.payee summary::-webkit-details-marker { display: none; }
.payee summary::after { content: '▾'; color: var(--muted); margin-inline-start: 4px; }
.payee[open] summary::after { content: '▴'; }
.payee-name { flex: 1; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.payee-amt { font-weight: 700; font-size: 17px; }
.payee-lines { list-style: none; margin: 0; padding: 0 14px 10px; display: grid; }
.payee-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px dashed var(--line); font-size: 14.5px; color: var(--text-2); }
.payee > .btn { margin: 0 14px 14px; }
.paybar {
  position: sticky; bottom: calc(var(--nav-h) + var(--safe-b) + 8px);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: var(--radius);
  background: var(--navy); color: #fff; font-weight: 600;
  box-shadow: 0 6px 20px rgba(3, 20, 50, 0.22);
}

/* ── Dialog / sheet ─────────────────── */
dialog {
  padding: 0; border: 0; background: var(--surface); color: var(--text);
  width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0;
}
dialog::backdrop { background: rgba(3, 20, 50, 0.55); }
.sheet { display: grid; grid-template-rows: auto 1fr auto; height: 100%; }
.sheet-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px; border-bottom: 1px solid var(--line);
}
.sheet-head h2 { font-size: 19px; }
.sheet-body { overflow-y: auto; padding: 16px; display: grid; gap: 16px; align-content: start; overscroll-behavior: contain; }
.sheet-foot {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px calc(12px + var(--safe-b));
  border-top: 1px solid var(--line); background: var(--surface);
}
.form-grid { display: grid; gap: 16px; }
.form-main { display: grid; gap: 16px; min-width: 0; }
.preview { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; }
.preview h3 { margin-bottom: 6px; }

@media (min-width: 720px) {
  dialog { width: min(560px, calc(100% - 48px)); height: auto; max-height: calc(100% - 48px); margin: auto; border-radius: 18px; }
  dialog.wide { width: min(980px, calc(100% - 48px)); }
  .sheet { max-height: calc(100vh - 48px); height: auto; }
  .sheet-head { padding-top: 12px; }
  dialog.wide .form-grid { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
  dialog.wide .form-side { position: sticky; top: 0; }
}

.paybar .lbl { display: grid; gap: 2px; min-width: 0; }
.paybar .lbl small { font-size: 12px; font-weight: 400; opacity: 0.85; }
.paybar-amt { font-size: 20px; white-space: nowrap; }
/* Top of the screen, so it never hides the sticky save and total bars. */
.toast {
  position: fixed; inset-inline: 16px; top: calc(env(safe-area-inset-top, 0px) + 12px); z-index: 60;
  max-width: 480px; margin: 0 auto; padding: 12px 16px; border-radius: 12px;
  background: var(--navy); color: #fff; text-align: center; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

/* ── Statement (shown to commission earners) ── */
.statement { display: grid; gap: 12px; background: #fff; color: #0B1530; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.statement .row { border-color: #DDE1EC; }
.statement .row.sub { color: #36405C; }
.statement .row.total { border-top-color: #0B1530; }
.st-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 12px; border-bottom: 2px solid #031432; }
.st-logo { width: 110px; height: auto; }
.st-title { font-size: 20px; font-weight: 700; }
.st-name { font-weight: 600; color: #5302DF; }
.st-row { display: grid; padding: 10px 0; border-bottom: 1px solid #DDE1EC; }
.st-client { font-weight: 600; display: grid; }
.st-client small { color: #56607A; font-weight: 400; }

/* ── Desktop: side navigation ───────── */
@media (min-width: 900px) {
  body { padding-bottom: 24px; padding-inline-start: 220px; }
  html { scroll-padding-bottom: 24px; }
  .nav {
    top: var(--appbar-h); bottom: 0; inset-inline-start: 0; inset-inline-end: auto; width: 220px;
    grid-template-columns: 1fr; align-content: start; align-items: stretch; gap: 4px;
    padding: 16px 12px; border-top: 0; border-inline-end: 1px solid var(--line);
  }
  .nav a, .nav-add { flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 48px; padding: 0 14px; font-size: 15px; }
  .nav a[aria-current="page"] { background: var(--accent-soft); }
  .nav a[aria-current="page"]::after { display: none; }
  .nav-add { order: -1; margin-bottom: 8px; background: var(--pink); color: var(--navy); font-weight: 600; }
  .nav-add svg { width: 24px; height: 24px; padding: 0; background: none; box-shadow: none; }
  body:not(.signed-in) { padding-inline-start: 0; }
  main { padding: 0 32px 32px; }
  .monthbar { margin: 0 -32px 20px; padding: 10px 32px; }
  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .save-bar, .paybar { bottom: 16px; }
  /* Wide screens: cards and payees side by side, so every amount stays close to its label. */
  .pay-group { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); align-items: start; }
  .pay-group > .group-head, .pay-group > .hint { grid-column: 1 / -1; }
  .group-head { justify-content: flex-start; gap: 16px; }
}
@media (min-width: 1100px) {
  .stack.cols { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .stack.cols > :not(.card) { grid-column: 1 / -1; }
}

/* ── Print: only the commission statement ── */
@media print {
  body { padding: 0; background: #fff; }
  body.print-statement > *:not(dialog) { display: none !important; }
  body.print-statement dialog { position: static; display: block; width: 100%; height: auto; max-height: none; border: 0; }
  body.print-statement .sheet-head, body.print-statement .sheet-foot, body.print-statement .no-print { display: none !important; }
  body.print-statement .sheet-body { overflow: visible; padding: 0; }
  body.print-statement .statement { border: 0; padding: 0; }
  .st-row { break-inside: avoid; }
}

@media (prefers-reduced-motion: no-preference) {
  .btn, .choice, .list-btn, .deal { transition: background-color 0.15s, border-color 0.15s; }
}
.st-sub { margin-top: 8px; font-size: 15px; }
.head-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.tag-cancel { display: inline-block; margin-inline-start: 8px; padding: 1px 8px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--danger-bg); color: var(--danger); vertical-align: middle; }
.emp-row { display: grid; gap: 8px; }
.choice.inline { min-height: 44px; border-style: dashed; }
.tag-cheques { display: inline-block; margin-inline-start: 8px; padding: 1px 8px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--accent-soft); color: var(--accent); vertical-align: middle; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.list-row small { display: block; color: var(--muted); font-size: 13px; }

/* Influencer tabs */
.nav .lbl-short { display: none; }
@media (max-width: 899px) {
  .nav a, .nav-add { font-size: 11.5px; padding: 4px 0; }
  .nav .lbl-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nav .lbl-short { display: inline; }
  .nav-add span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.task { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; justify-items: start; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.task.done { border-inline-start: 4px solid var(--ok); }
.task.void { border-inline-start: 4px dashed var(--muted); }
.task-main { display: grid; min-width: 0; }
.task-title { font-weight: 600; overflow-wrap: anywhere; }
.task-main small { color: var(--muted); font-size: 13px; }
.task-main { justify-self: stretch; }
.task-act { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.input-date { width: auto; min-width: 150px; }
