:root {
  --bg: #f4f5f2;
  --surface: #ffffff;
  --surface-2: #f9faf7;
  --ink: #17201c;
  --ink-2: #4b5650;
  --ink-3: #7c8680;
  --line: #e2e5df;
  --line-2: #d3d8d1;
  --brand: #0f5c4f;
  --brand-ink: #ffffff;
  --brand-soft: #e3f0ec;
  --ok: #1f7a4d;   --ok-soft: #e4f3ea;
  --warn: #9a5b00; --warn-soft: #fbefd9;
  --bad: #b3261e;  --bad-soft: #fbe5e3;
  --info: #1d4f91; --info-soft: #e5edf8;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20,30,25,.06), 0 4px 16px rgba(20,30,25,.05);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111614; --surface: #19201d; --surface-2: #1e2622; --ink: #e8ece9; --ink-2: #b4bdb8; --ink-3: #87918b;
    --line: #2a332f; --line-2: #36413c; --brand: #5fc2ab; --brand-ink: #0b1a16; --brand-soft: #1d3a33;
    --ok: #6fd19c; --ok-soft: #1a3426; --warn: #f0b552; --warn-soft: #3a2c14; --bad: #ff8a80; --bad-soft: #3d1d1b;
    --info: #8fb5ef; --info-soft: #1b2a40; --shadow: none;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.5; }
body { min-height: 100vh; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: 22px; font-weight: 700; }
h2 { font-size: 17px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 600; }
.num, .mono { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.mono { font-family: var(--mono); font-size: 13px; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.hidden { display: none !important; }

/* ── layout ── */
.shell { display: flex; min-height: 100vh; }
.side { width: 236px; flex: none; background: var(--surface); border-inline-end: 1px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; }
.brand .logo { width: 34px; height: 34px; border-radius: 9px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 800; font-size: 14px; letter-spacing: .5px; }
.brand b { display: block; font-size: 15px; }
.brand span { font-size: 12px; color: var(--ink-3); }
.nav-group { font-size: 11.5px; color: var(--ink-3); font-weight: 600; padding: 12px 10px 4px; letter-spacing: .3px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; color: var(--ink-2); text-decoration: none; font-weight: 500; min-height: 40px; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.nav a .badge { margin-inline-start: auto; }
.nav svg { width: 18px; height: 18px; flex: none; }
.side .me { margin-top: auto; padding: 12px 10px 4px; border-top: 1px solid var(--line); font-size: 13px; }
.main { flex: 1; min-width: 0; padding: 24px 28px 64px; }
.topbar { display: none; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { margin-inline-end: auto; }
.page-sub { color: var(--ink-3); font-size: 13.5px; margin-top: 2px; }

@media (max-width: 860px) {
  .shell { display: block; }
  .side { position: fixed; top: 0; bottom: 0; left: 0; z-index: 40; transform: translateX(-110%); transition: transform .2s; width: 270px; box-shadow: var(--shadow); }
  .side.open { transform: none; }
  .topbar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 30; background: var(--surface); border-bottom: 1px solid var(--line); padding: 10px 16px; }
  .topbar .top-who { margin-inline-end: auto; display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
  .topbar .top-who b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar .top-who span { font-size: 11.5px; color: var(--ink-3); }
  .topbar .top-out { color: var(--ink-2); gap: 6px; }
  .side { z-index: 50; height: auto; max-height: none; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
    padding-bottom: calc(28px + env(safe-area-inset-bottom)); will-change: transform; }
  .scrim { touch-action: none; }
  html.side-lock, html.side-lock body { overflow: hidden; }
  .side .me { display: none; }
  .main { padding: 16px 16px 72px; }
  .scrim { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 48; }
}

/* ── cards & grids ── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px; }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-head h2 { margin-inline-end: auto; }
.grid { display: grid; gap: 14px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.kpi .lbl { font-size: 12.5px; color: var(--ink-3); font-weight: 500; }
.kpi .val { font-size: 22px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; direction: ltr; text-align: end; unicode-bidi: isolate; }
.kpi .sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.kpi.good .val { color: var(--ok); } .kpi.bad .val { color: var(--bad); } .kpi.warn .val { color: var(--warn); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 1000px) { .two { grid-template-columns: 1fr; } }

/* ── buttons ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 16px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }
.btn.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }
.btn.sm { min-height: 32px; padding: 4px 10px; font-size: 13px; border-radius: 8px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.block { width: 100%; }
.btn svg { width: 16px; height: 16px; }

/* ── forms ── */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--ink-3); }
.input, select.input, textarea.input { width: 100%; min-height: 42px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface); outline: none; }
textarea.input { min-height: 72px; resize: vertical; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.input.ltr { direction: ltr; text-align: left; }
.input.sm { min-height: 34px; padding: 4px 8px; font-size: 13.5px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.form-grid .wide { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 10px; justify-content: flex-start; margin-top: 18px; flex-wrap: wrap; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { min-height: 42px; padding: 6px 14px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; font-weight: 600; color: var(--ink-2); }
.seg button.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.seg.num-seg button { min-width: 46px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 500; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; padding: 12px 18px; border-bottom: 1px solid var(--line); background: var(--surface-2); border-radius: var(--radius) var(--radius) 0 0; }
.filters .field { min-width: 140px; }

/* ── tables ── */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
.t th { text-align: start; font-size: 12px; font-weight: 600; color: var(--ink-3); padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; position: sticky; top: 0; }
.t td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tr:last-child td { border-bottom: none; }
.t tbody tr:hover td { background: var(--surface-2); }
.t td.n, .t th.n { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.t tr.click { cursor: pointer; }
.t tfoot td { font-weight: 700; background: var(--surface-2); border-top: 1px solid var(--line-2); }
.t .neg { color: var(--bad); } .t .pos { color: var(--ok); }
.matrix td, .matrix th { padding: 6px 8px; font-size: 12.5px; }
.matrix td.z { color: var(--line-2); }
.matrix thead .bank-row th { z-index: 3; vertical-align: bottom; white-space: nowrap; color: var(--ink); font-weight: 700; font-size: 13px; border-bottom: 2px solid var(--line-2); }
.matrix thead .bank-row th:first-child { white-space: nowrap; }
.empty { padding: 36px 18px; text-align: center; color: var(--ink-3); }

/* ── chips ── */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.chip.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.chip.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chip.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.chip.info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.badge { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }

/* ── queue cards ── */
.qcard { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 14px 16px; box-shadow: var(--shadow); }
.qcard + .qcard { margin-top: 12px; }
.qrow { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.qrow .who { font-weight: 700; font-size: 15.5px; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 16px; margin-top: 10px; font-size: 13.5px; }
.kv div span { display: block; font-size: 11.5px; color: var(--ink-3); }
.kv > div { min-width: 0; overflow-wrap: anywhere; }   /* long values (emails) wrap instead of running into the next column */
.kv > .kv-wide { grid-column: span 2; }
@media (max-width: 520px) { .kv > .kv-wide { grid-column: 1 / -1; } }
.pay-box { margin-top: 12px; padding: 12px; border-radius: 10px; background: var(--surface-2); border: 1px dashed var(--line-2); }
.pay-box h3 { margin-bottom: 8px; }

/* ── modal / toast ── */
.modal-bg { position: fixed; inset: 0; background: rgba(10,15,12,.45); z-index: 100; display: grid; place-items: center; padding: 16px; }
.modal { background: var(--surface); border-radius: 14px; width: min(640px, 100%); max-height: 92vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal.wide { width: min(980px, 100%); }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.modal-head h2 { margin-inline-end: auto; }
.modal-body { padding: 18px 20px; }
.toasts { position: fixed; bottom: 18px; inset-inline-start: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--ink); color: var(--bg); padding: 11px 16px; border-radius: 10px; font-weight: 500; box-shadow: var(--shadow); max-width: 380px; }
.toast.bad { background: var(--bad); color: #fff; }
.toast.ok { background: var(--ok); color: #fff; }

/* ── login ── */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login .card { width: min(400px, 100%); padding: 28px; }
.login .brand { justify-content: center; padding-bottom: 22px; }
.alert { padding: 10px 14px; border-radius: 10px; font-size: 14px; }
.alert.bad { background: var(--bad-soft); color: var(--bad); }
.alert.warn { background: var(--warn-soft); color: var(--warn); }
.alert.ok { background: var(--ok-soft); color: var(--ok); }
.alert.info { background: var(--info-soft); color: var(--info); }

/* ── charts ── */
.bars { display: flex; align-items: flex-end; gap: 3px; height: 160px; padding: 10px 4px 0; direction: ltr; }
.bars .b { flex: 1; background: var(--brand); border-radius: 3px 3px 0 0; min-height: 1px; opacity: .85; position: relative; }
.bars .b:hover { opacity: 1; }
.bars .b.today { background: var(--warn); }
.bars-x { display: flex; gap: 3px; direction: ltr; font-size: 10px; color: var(--ink-3); padding: 2px 4px 0; }
.bars-x span { flex: 1; text-align: center; }
.progress { height: 10px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.progress > div { height: 100%; background: var(--brand); }
.success-big { text-align: center; padding: 30px 16px; }
.success-big .tick { width: 64px; height: 64px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; margin: 0 auto 14px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button { padding: 10px 14px; border: none; background: none; border-bottom: 2px solid transparent; font-weight: 600; color: var(--ink-3); cursor: pointer; white-space: nowrap; min-height: 44px; }
.tabs button.on { color: var(--brand); border-bottom-color: var(--brand); }
.spin { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: s 0.8s linear infinite; margin: 40px auto; }
@keyframes s { to { transform: rotate(360deg); } }

/* ── date field (always DD/MM/YYYY) ── */
.datebox { position: relative; width: 100%; min-width: 150px; }
.datebox .input { padding-right: 42px; }
.datebox .input.bad { border-color: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.date-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; display: grid; place-items: center; color: var(--ink-3); border-radius: 7px; }
.date-btn:hover { background: var(--surface-2); color: var(--brand); }
.date-btn svg { width: 18px; height: 18px; pointer-events: none; }
.date-native { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; margin: 0; }
.date-native::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }

/* payroll slip */
.slip { font-size: 14px; }
.slip h3 { margin: 16px 0 8px; }
.slip-head { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 2px solid var(--line); }
.slip-t { width: 100%; }
.slip-t td, .slip-t th { padding: 6px 8px; }
.slip-t tr.tot td { font-weight: 700; border-top: 1px solid var(--line); }
@media print {
  body * { visibility: hidden !important; }
  .slip, .slip * { visibility: visible !important; }
  .slip { position: absolute; left: 0; top: 0; width: 100%; padding: 16px; color: #000; background: #fff; }
  .no-print { display: none !important; }
}

/* balances under payment forms */
.balance-box { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; margin-top: 12px; }
.balance-box .bal { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; opacity: .65; }
.balance-box .bal.on { opacity: 1; }
.balance-box .bal span { font-size: 12px; color: var(--muted); }

/* Stripe Tracking: green / yellow / red by payout day */
.t .c-ok { background: rgba(22, 163, 74, .16); }
.t .c-warn { background: rgba(234, 179, 8, .22); }
.t .c-bad { background: rgba(220, 38, 38, .18); }
.t .c-fut { background: rgba(100, 116, 139, .08); }
.legend { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 0 18px 12px; font-size: 13px; }
.legend > span { padding: 3px 10px; border-radius: 999px; }
.legend .c-ok { background: rgba(22, 163, 74, .16); } .legend .c-warn { background: rgba(234, 179, 8, .22); }
.legend .c-bad { background: rgba(220, 38, 38, .18); } .legend .c-fut { background: rgba(100, 116, 139, .12); }

/* Stripe Tracking money flow */
.flow { display: grid; gap: 2px; max-width: 640px; margin-bottom: 16px; }
.flow-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.flow-row.tot { font-size: 1.05em; border-bottom: 2px solid var(--line); }
.flow-row.tot span { font-weight: 700; }
.flow-row.warnrow b { color: var(--bad); }

/* navigation work areas */
button.nav-group { display: flex; width: 100%; align-items: center; justify-content: space-between; background: none; border: 0; cursor: pointer; text-align: start; font-family: inherit; text-transform: uppercase; }
button.nav-group:hover { color: var(--ink); }
.nav-group .caret { transition: transform .15s; font-size: 10px; }
button.nav-group[aria-expanded="false"] .caret { transform: rotate(-90deg); }
.nav-items.closed { display: none; }
.area-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: -4px 0 16px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.area-tabs a { white-space: nowrap; padding: 7px 12px; border-radius: 8px; text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: 14px; display: inline-flex; gap: 6px; align-items: center; }
.area-tabs a:hover { background: var(--surface-2); color: var(--ink); }
.area-tabs a.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }

/* Today */
.tasks { display: grid; }
.task { display: flex; justify-content: space-between; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--line); text-decoration: none; color: inherit; border-inline-start: 4px solid transparent; }
.task:hover { background: var(--surface-2); }
.task.bad { border-inline-start-color: var(--bad); } .task.warn { border-inline-start-color: #eab308; } .task.info { border-inline-start-color: var(--brand); }
.task-main { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.task-side { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; white-space: nowrap; }
.task-go { color: var(--brand); font-weight: 600; font-size: 13px; }
.table-foot { display: flex; justify-content: flex-end; padding: 4px 12px 6px; }
.table-export { font-size: 12px; opacity: .65; }
.table-export:hover { opacity: 1; }
.reloading { opacity: .6; transition: opacity .15s; pointer-events: none; }
html, body { overflow-anchor: none; }
.t tr.changed td { background: rgba(234,179,8,.12); }
.acc-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; margin-top: 10px; }
.partner-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line, #e5e7eb); }
.partner-line a { margin-inline-start: auto; }
.partner-cards { display: grid; gap: 14px; margin-bottom: 16px; }
.partner-card .kpis { padding: 0 16px 12px; margin: 0; }
.money-where { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 16px 14px; border-top: 1px solid var(--line, #e5e7eb); }
.link-card { margin-bottom: 16px; }
.link-amounts { flex-wrap: wrap; }
.link-opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--line, #e5e7eb); border-radius: 10px; margin-top: 6px; }
.link-opt.best { border-color: var(--ok, #16a34a); background: color-mix(in srgb, var(--ok, #16a34a) 6%, transparent); }
.link-opt.blocked { opacity: .55; }
.link-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px dashed var(--line, #e5e7eb); }
.link-amounts-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.other-amt { display: inline-flex; gap: 6px; align-items: center; }
.other-amt .input { width: 110px; }
/* price-list buttons on Send payment link */
.prod-group { margin-top: 12px; }
.prod-title { font-size: 12px; font-weight: 600; color: var(--ink-3, #6b7280); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 6px; }
.prod-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; color: var(--ink-2); }
.prod-btn:hover { border-color: var(--brand); }
.prod-btn .prod-what { font-size: 12px; font-weight: 500; }
.prod-btn .prod-amt { font-size: 16px; font-weight: 700; color: var(--ink, inherit); }
.prod-btn.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.prod-btn.on .prod-amt { color: var(--brand-ink); }

/* ───────────── phones: most sellers work from the phone ───────────── */
.bottom-nav { display: none; }
.slip-sec td { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); padding-top: 14px !important; }
.my-slip .slip-t { width: 100%; border-collapse: collapse; }
.my-slip .slip-t td { padding: 8px 16px; border-bottom: 1px solid var(--line); }
.my-slip .slip-t td.n { text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; }
.my-slip .slip-t tr.tot td { font-weight: 800; font-size: 16px; border-top: 2px solid var(--line-2); border-bottom: none; }
.my-slip .slip-t .neg { color: var(--bad); }
.slip-print-head { display: none; }
.pay-hero { margin-bottom: 14px; display: flex; flex-direction: column; gap: 6px; background: linear-gradient(135deg, var(--brand-soft), var(--surface)); }
.pay-big { font-size: 34px; font-weight: 800; letter-spacing: -.5px; color: var(--brand); line-height: 1.1; }
.pay-hero .chip { align-self: flex-start; }
.pay-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-top: 10px; }
.pay-meta div { display: flex; flex-direction: column; }
.pay-meta span { font-size: 12px; color: var(--ink-3); }
.pay-meta b.pos { color: var(--ok); } .pay-meta b.neg { color: var(--bad); }
.kpis-3 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
@media (min-width: 861px) { .kpis-3 { grid-template-columns: repeat(4, 1fr); } }
.cta-line { display: block; text-decoration: none; margin-bottom: 14px; font-weight: 600; }
.deals { display: grid; }
.deal { padding: 12px 16px; border-top: 1px solid var(--line); display: grid; gap: 3px; }
.deal:first-child { border-top: none; }
.deal-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.deal-bot { font-weight: 600; }
@media print { .my-slip .slip-print-head { display: block; padding: 0 0 10px; } .my-slip .card-head { display: none; } }

@media (max-width: 860px) {
  html, body { font-size: 16px; }
  /* 16px inputs: iOS doesn't zoom in; bigger touch targets */
  .input, select.input, textarea.input { font-size: 16px; min-height: 46px; }
  .btn { min-height: 44px; }
  .btn.sm { min-height: 38px; padding: 6px 12px; }
  .seg button { min-height: 46px; }
  .check input { width: 22px; height: 22px; }
  h1 { font-size: 21px; }
  .page-head { margin-bottom: 12px; }
  .page-head .btn { flex: 1 1 auto; }
  .form-grid { grid-template-columns: 1fr; gap: 12px; }
  .form-actions .btn { flex: 1 1 auto; }
  .card-pad { padding: 14px; }
  .card-head { padding: 12px 14px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 8px; }
  .kpi { padding: 10px 12px; }
  .kpi .val { font-size: 18px; text-align: start; }
  .prod-grid { grid-template-columns: repeat(2, 1fr); }
  .prod-btn { min-height: 60px; }
  .other-amt { display: flex; width: 100%; } .other-amt .input { flex: 1; width: auto; }
  .link-opt { flex-direction: column; align-items: stretch; }
  .link-opt .btn { width: 100%; }
  /* bottom tab bar */
  .bottom-nav { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: var(--surface); border-top: 1px solid var(--line);
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 16px rgba(0,0,0,.06); }
  .bottom-nav a, .bottom-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 54px; border: 0; background: none; color: var(--ink-3);
    text-decoration: none; font-size: 11.5px; font-weight: 600; border-radius: 10px; position: relative; cursor: pointer; font-family: inherit; }
  .bottom-nav svg { width: 22px; height: 22px; }
  .bottom-nav a.active { color: var(--brand); background: var(--brand-soft); }
  .bottom-nav .badge { position: absolute; top: 2px; right: 14%; min-width: 18px; height: 18px; font-size: 11px; padding: 0 5px; }
  .main { padding: 14px 14px calc(84px + env(safe-area-inset-bottom)); }
  .topbar .btn.primary { display: none; }
  .hide-phone { display: none !important; }
  .topbar { padding: 8px 12px calc(8px); padding-top: calc(8px + env(safe-area-inset-top)); }
  /* toasts above the tab bar, full width */
  .toasts { left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); inset-inline-start: 12px; }
  .toast { max-width: none; }
  /* dialogs = sheets from the bottom */
  .modal-bg { padding: 0; place-items: end stretch; }
  .modal, .modal.wide { width: 100%; max-height: 94dvh; border-radius: 16px 16px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .modal-body { padding: 14px; }
  .modal-head { padding: 12px 14px; }
  /* tables → cards (label: value per line) */
  table.t.cards thead { display: none; }
  table.t.cards, table.t.cards tbody, table.t.cards tr, table.t.cards td, table.t.cards tfoot { display: block; width: 100%; }
  table.t.cards tr { padding: 10px 14px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
  table.t.cards td { display: flex; flex-direction: column; align-items: flex-start; gap: 0; padding: 0; border: 0; text-align: start; min-width: 0; overflow-wrap: anywhere; }
  table.t.cards td.n { text-align: start; }
  table.t.cards td::before { content: attr(data-label); font-size: 11.5px; color: var(--ink-3); font-weight: 500; line-height: 1.3; }
  table.t.cards td[data-label=""]::before { content: none; }
  table.t.cards td[data-label=""] { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; gap: 6px; }
  table.t.cards td:first-child { grid-column: 1 / -1; font-weight: 600; }
  table.t.cards tbody tr:hover td { background: none; }
  table.t.cards tfoot tr { background: var(--surface-2); }
  .table-wrap { overflow-x: visible; }
  .table-wrap:has(table.t:not(.cards)) { overflow-x: auto; }
  .area-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .tabs { scrollbar-width: none; }
}
@media (max-width: 380px) { .kpis { grid-template-columns: 1fr; } }
.month-sum { margin-bottom: 14px; }
.sum-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.sum-row > div > span { font-weight: 500; }
.sum-row b { white-space: nowrap; font-size: 16px; }
.sum-row.neg b { color: var(--bad); } .sum-row.pos b { color: var(--ok); }
.sum-row.sub-tot { border-bottom: 2px solid var(--line-2); } .sum-row.sub-tot b, .sum-row.sub-tot span { font-weight: 700; }
.sum-row.tot { border-bottom: none; padding-top: 12px; } .sum-row.tot span { font-weight: 800; font-size: 16px; } .sum-row.tot b { font-size: 22px; color: var(--brand); font-weight: 800; }
.slip-link { width: 100%; text-align: start; background: none; border: 0; border-top: 1px solid var(--line); font: inherit; color: inherit; cursor: pointer; }
.slip-link:first-child { border-top: none; }
.slip-link:hover { background: var(--surface-2); }
.slip-link .deal-bot { display: flex; align-items: baseline; gap: 8px; }

/* ───────────── My commission: the pay cheque + the payslip stub ───────────── */
.cheque { --cq: #0c4a40; --cq-2: #0f5c4f; position: relative; color: #fff; background: linear-gradient(160deg, var(--cq-2) 0%, var(--cq) 70%); border-radius: 18px 18px 6px 6px;
  padding: 18px 18px 20px; margin-bottom: 26px; display: grid; gap: 4px; }
/* perforation: the slip below "tears off" here */
.cheque::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -9px; height: 9px;
  background: radial-gradient(circle at 6px 0, var(--cq) 4px, transparent 4.5px) 0 0 / 14px 9px repeat-x; }
.cheque-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13.5px; color: rgba(255,255,255,.78); }
.cheque-status { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,.14); color: #fff; white-space: nowrap; }
.cheque-amt { font-size: clamp(38px, 11vw, 54px); font-weight: 800; letter-spacing: -1.5px; line-height: 1.05; margin-top: 6px; }
.cheque-when { font-size: 14px; color: rgba(255,255,255,.85); font-weight: 500; }
.cheque-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.16); }
.cheque-meta div { display: flex; flex-direction: column; }
.cheque-meta span { font-size: 12px; color: rgba(255,255,255,.7); }
.cheque-meta b { font-size: 16px; font-weight: 700; }
.cheque-bar { margin-top: 12px; }
.cheque-bar .bar { height: 6px; border-radius: 99px; background: rgba(255,255,255,.18); overflow: hidden; }
.cheque-bar .bar i { display: block; height: 100%; background: #9fe3cf; border-radius: 99px; transition: width .6s ease; }
.cheque-bar .bar-lbl { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: rgba(255,255,255,.75); margin-top: 5px; }
@media (prefers-reduced-motion: reduce) { .cheque-bar .bar i { transition: none; } }

/* tiles: quiet, flat */
.kpis-3 .kpi { box-shadow: none; border-color: var(--line); padding: 12px 14px; }
.kpis-3 .kpi .lbl { color: var(--ink-2); }
.kpis-3 .kpi .val { text-align: start; font-size: 21px; letter-spacing: -.3px; }

/* summary: a ledger, not a card of cards */
.month-sum { box-shadow: none; }
.month-sum h2 { font-size: 16px; }
.sum-row > div > span { color: var(--ink); }

/* payslip: a real slip — solid paper card, tinted section bands, totals band */
.my-slip { box-shadow: var(--shadow); border-radius: 14px; overflow: hidden; }
.my-slip .card-head { background: var(--surface-2); }
.slip-sec td { background: var(--surface-2); text-transform: uppercase; letter-spacing: .04em; font-size: 11.5px; font-weight: 700; color: var(--ink-3);
  padding: 8px 16px !important; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line) !important; }
.my-slip .slip-t td { padding: 10px 16px; }
.my-slip .slip-t td:first-child { color: var(--ink); }
.my-slip .slip-t tr.tot td { background: var(--brand-soft); color: var(--brand); font-size: 17px; font-weight: 800; border-top: 2px solid color-mix(in srgb, var(--brand) 25%, transparent); }
.my-slip .slip-t tr.tot td:first-child { color: var(--brand); }
/* deals: one stripe says the status */
.deal { border-inline-start: 3px solid transparent; }
.deal.st-verified { border-inline-start-color: var(--ok); }
.deal.st-pending { border-inline-start-color: #e0a526; }
.deal.st-problem, .deal.st-refunded { border-inline-start-color: var(--bad); }
.deal-bot { font-size: 15.5px; }
@media (max-width: 860px) {
  .cheque { margin-left: -2px; margin-right: -2px; }
  .kpis-3 .kpi .val { font-size: 19px; }
}

/* Send payment link: the four steps */
.step { display: flex; align-items: center; gap: 10px; margin: 18px 0 10px; font-weight: 700; font-size: 15px; }
.step:first-child { margin-top: 0; }
.step-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; background: var(--brand-soft); color: var(--brand); flex: none; }
.step.done .step-n { background: var(--brand); color: var(--brand-ink); }

/* My sales: a day per card */
.day-group { overflow: hidden; }
.day-group + .day-group { margin-top: 12px; }
.day-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 11px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.deal-btn { width: 100%; text-align: start; background: none; border: 0; border-top: 1px solid var(--line); font: inherit; color: inherit; cursor: pointer; }
.deal-btn:first-child { border-top: 0; }
.deal-btn:hover { background: var(--surface-2); }
.deal-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }

/* My commission: day by day */
.day-chart { margin-bottom: 14px; }
.day-chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.day-chart-head h2 { font-size: 16px; }
.dbars { display: flex; align-items: flex-end; gap: 2px; height: 120px; direction: ltr; border-bottom: 1px solid var(--line-2); }
.dcol { flex: 1; height: 100%; display: flex; flex-direction: column-reverse; min-width: 0; border-radius: 3px 3px 0 0; }
.dcol i { display: block; width: 100%; }
.dcol i.v { background: var(--brand); border-radius: 3px 3px 0 0; }
.dcol i.w { background: color-mix(in srgb, #e0a526 55%, transparent); border-radius: 3px 3px 0 0; }
.dcol i.v + i.w[style*='height: 0'] {}
.dcol.today { background: color-mix(in srgb, var(--brand) 9%, transparent); }
.dcol.future { opacity: .35; }
.dbars-x { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-3); padding-top: 3px; direction: ltr; }
.dlegend { display: flex; gap: 14px; margin-top: 6px; }
.dlegend span { display: inline-flex; align-items: center; gap: 5px; }
.dlegend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.dlegend i.v { background: var(--brand); } .dlegend i.w { background: color-mix(in srgb, #e0a526 55%, transparent); }

/* New sale: the submit button stays in reach on phones */
@media (max-width: 860px) {
  .sale-submit { position: sticky; bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 5; background: linear-gradient(to top, var(--surface) 70%, transparent); padding-top: 10px; margin-inline: -14px; padding-inline: 14px; }
}
.slip-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 12px 16px; border-top: 1px dashed var(--line-2); font-size: 13.5px; color: var(--ink-2); }
@media (max-width: 860px) { .slip-foot .btn { width: 100%; } }

.brand-who { min-width: 0; flex: 1; }
.brand-who b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand .brand-out { margin-inline-start: auto; padding: 6px; color: var(--ink-3); }

/* ── renewals: call list cards ── */
.rn-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.rn-h { margin: 18px 0 8px; font-size: 14px; color: var(--ink-2); }
.rn-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; border-inline-start: 4px solid var(--line-2); display: flex; flex-direction: column; gap: 8px; }
.rn-card.soon { border-inline-start-color: var(--warn); }
.rn-card.ended { border-inline-start-color: var(--bad); }
.rn-top { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; }
.rn-who { display: flex; flex-direction: column; margin-inline-end: auto; min-width: 0; }
.rn-who b { font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rn-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 12.5px; color: var(--ink-2); }
.rn-note { font-size: 13px; color: var(--ink-2); background: var(--surface-2); border-radius: 8px; padding: 6px 9px; }
.rn-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.seg.wrap { flex-wrap: wrap; height: auto; }
.seg.wrap button { flex: 0 0 auto; }
.outcome-seg { margin-top: 4px; }
label.check { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; cursor: pointer; padding-bottom: 8px; }

/* ── customer card ── */
.cust-hero { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 12px; }
.cust-name { font-size: 19px; font-weight: 700; }
.cust-hero > div:first-child { margin-inline-end: auto; }
.cust-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.timeline { position: relative; padding-inline-start: 18px; }
.timeline::before { content: ""; position: absolute; inset-inline-start: 5px; top: 4px; bottom: 4px; width: 2px; background: var(--line); }
.tl-item { position: relative; display: flex; gap: 10px; padding: 7px 0; font-size: 13.5px; }
.tl-dot { position: absolute; inset-inline-start: -17px; top: 12px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); border: 2px solid var(--surface); }
.tl-item.call .tl-dot { background: var(--info); }
.tl-item.refund .tl-dot { background: var(--bad); }

/* ── competition podium ── */
.podium { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; align-items: end; }
.pod { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); text-align: center; padding: 14px 8px; }
.pod-1 { background: linear-gradient(180deg, #fff6d6, var(--surface)); border-color: #e9c95a; padding-top: 26px; }
.pod-2 { background: linear-gradient(180deg, #eef1f4, var(--surface)); padding-top: 20px; }
.pod-3 { background: linear-gradient(180deg, #f7e9df, var(--surface)); padding-top: 16px; }
.pod.me { outline: 2px solid var(--brand); }
.pod-medal { font-size: 28px; line-height: 1; }
.pod-4 .pod-medal { font-size: 18px; font-weight: 800; color: var(--ink-3); width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); display: inline-grid; place-items: center; }
.pod-name { font-weight: 700; margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod-num { font-size: 26px; font-weight: 800; }
.pod-lbl { font-size: 11.5px; color: var(--ink-3); }
@media (prefers-color-scheme: dark) { .pod-1, .pod-2, .pod-3 { background: var(--surface); } }
@media (max-width: 560px) {
  .rn-list { grid-template-columns: 1fr; }
  .podium { grid-template-columns: repeat(2, 1fr); }
  .rn-actions .btn { flex: 1 1 auto; justify-content: center; }
}
.pod-sub { font-size: 11px; color: var(--ink-3); margin-top: 4px; }
.deal-who { display: flex; flex-direction: column; min-width: 0; margin-inline-end: auto; }
.deal-phone { font-size: 12.5px; color: var(--ink-3); text-decoration: none; direction: ltr; text-align: start; }
.deal-search { padding: 12px 14px 0; }

/* My commission: month by month */
.seg.seg-sm button { min-height: 32px; padding: 4px 10px; font-size: 12.5px; border-radius: 8px; }
.mbars { display: flex; align-items: stretch; gap: 4px; height: 150px; direction: ltr; border-bottom: 1px solid var(--line-2); }
.mcol { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: stretch; background: none; border: 0; padding: 0; cursor: pointer; border-radius: 6px 6px 0 0; font-family: inherit; }
.mcol:hover, .mcol.on { background: color-mix(in srgb, var(--brand) 9%, transparent); }
.mcol.on .mlbl { color: var(--brand); font-weight: 700; }
.mval { font-size: 10.5px; color: var(--ink-2); text-align: center; height: 14px; line-height: 14px; white-space: nowrap; }
.mstack { flex: 1; display: flex; flex-direction: column-reverse; padding: 0 3px; }
.mstack i { display: block; width: 100%; }
.mstack i.v { background: var(--brand); border-radius: 3px 3px 0 0; }
.mstack i.w { background: color-mix(in srgb, #e0a526 55%, transparent); border-radius: 3px 3px 0 0; }
.mlbl { font-size: 10.5px; color: var(--ink-3); text-align: center; padding: 3px 0 2px; }
.rn-card.away { opacity: .55; filter: grayscale(.4); }
.chip.comp { background: #fff3cf; color: #7a5300; border-color: transparent; }
.alert.comp-banner { background: #fff8e1; color: #6b4a00; border: 1px solid #f0d77a; border-radius: 10px; padding: 10px 12px; }
@media (prefers-color-scheme: dark) { .chip.comp { background: #3a2c14; color: #f0b552; } .alert.comp-banner { background: #2e2410; color: #f0c770; border-color: #5a4518; } }
.acc-card.idle { border-inline-start-color: var(--line-2); }
.acc-card:not(.idle) { border-inline-start-color: var(--ok); }
.secret-box { margin-top: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: flex; gap: 10px; align-items: flex-start; }
.secret-box pre { margin: 0; flex: 1; white-space: pre-wrap; word-break: break-all; font-family: var(--mono); font-size: 14px; direction: ltr; text-align: left; }
.chip-btn { cursor: pointer; font-family: inherit; } .chip-btn:hover { filter: brightness(.95); }
.before-box summary { list-style: none; cursor: pointer; }
.before-box summary::-webkit-details-marker { display: none; }
.before-list { background: var(--surface-2); border-radius: 10px; padding: 6px 12px; margin: 6px 0; }
.before-month { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.before-month:last-child { border-bottom: 0; }
.before-head { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.before-line { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--ink-2); padding-inline-start: 10px; }

/* partner statement (My statement) */
.ps-hero { margin-bottom: 16px; }
.ps-hero .ps-t { color: var(--ink-3); font-size: 13px; font-weight: 600; }
.ps-total { font-size: 34px; font-weight: 800; color: var(--brand); margin: 4px 0 14px; font-variant-numeric: tabular-nums; }
.ps-total span { font-size: 15px; font-weight: 500; color: var(--ink-3); }
.ps-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.ps-tile { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surface-2); border-inline-start: 4px solid var(--line-2); }
.ps-tile.warn { border-inline-start-color: var(--warn); } .ps-tile.bad { border-inline-start-color: var(--bad); } .ps-tile.ok { border-inline-start-color: var(--ok); }
.ps-tile .ps-t { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.ps-big { font-size: 22px; font-weight: 800; margin: 2px 0; font-variant-numeric: tabular-nums; }
.ps-sub { font-size: 12.5px; color: var(--ink-2); }
.ps-steps { display: flex; flex-direction: column; }
.ps-step { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.ps-step b { white-space: nowrap; font-variant-numeric: tabular-nums; font-size: 15px; }
.ps-l { font-weight: 500; } .ps-n { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.ps-step.neg b { color: var(--bad); } .ps-step.pos b { color: var(--ok); }
.ps-step.sum { border-bottom: 2px solid var(--line-2); } .ps-step.sum .ps-l, .ps-step.sum b { font-weight: 700; }
.ps-step.tot { border-bottom: none; padding-top: 12px; } .ps-step.tot .ps-l { font-weight: 800; } .ps-step.tot b { font-size: 22px; color: var(--brand); font-weight: 800; }
.ps-month { display: flex; flex-direction: column; gap: 12px; }
.ps-month.running { border-top: 3px solid var(--brand); }
.ps-mhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.ps-mhead h2 { margin: 0; }
.ps-appr { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.ps-appr-top { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.ps-bar { height: 10px; border-radius: 99px; background: var(--warn-soft); overflow: hidden; }
.ps-bar > div { height: 100%; background: var(--ok); border-radius: 99px; }
.ps-appr-leg { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; margin-top: 6px; }
.ps-appr-leg .ok { color: var(--ok); } .ps-appr-leg .wait { color: var(--warn); } .ps-appr-leg .bad { color: var(--bad); }

/* USDT page */
.usdt-wait { border-inline-start: 4px solid var(--warn); margin-bottom: 16px; }
.usdt-wait h2 { margin: 0; }
.usdt-wait-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.usdt-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 16px; }
.usdt-act { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; font: inherit; color: inherit; min-height: 44px; }
.usdt-act:hover { border-color: var(--brand); background: var(--surface-2); }
.usdt-act-ic { font-size: 18px; margin-bottom: 2px; }

/* Bank page */
.bank-todo { border-top: 1px solid var(--line); padding: 12px 0; }
.bank-todo-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.bank-todo-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; align-items: end; }
.bank-todo-body .check { padding-bottom: 10px; }
.bank-next { display: flex; gap: 10px; flex-wrap: wrap; }
.bank-next > div { display: flex; flex-direction: column; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); min-width: 120px; }

/* sticky matrix headers: solid background under the colour so rows don't show through when scrolling */
.matrix thead th { background-color: var(--surface-2); box-shadow: 0 1px 0 var(--line); }
.matrix thead th.c-ok { background: linear-gradient(rgba(22, 163, 74, .16), rgba(22, 163, 74, .16)), var(--surface); }
.matrix thead th.c-warn { background: linear-gradient(rgba(234, 179, 8, .22), rgba(234, 179, 8, .22)), var(--surface); }
.matrix thead th.c-bad { background: linear-gradient(rgba(220, 38, 38, .18), rgba(220, 38, 38, .18)), var(--surface); }
.matrix thead th.c-fut { background: linear-gradient(rgba(100, 116, 139, .08), rgba(100, 116, 139, .08)), var(--surface); }
.matrix thead .bank-row th { box-shadow: 0 2px 0 var(--line-2), 0 4px 6px rgba(0, 0, 0, .06); }
.matrix .mh-d { font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
.matrix .mh-t { font-size: 13px; font-weight: 700; color: var(--ink); margin-top: 2px; }

/* Expenses: where the money went */
a.usdt-act { text-decoration: none; }
.exp-bars { display: flex; flex-direction: column; gap: 4px; }
.exp-bar { display: grid; grid-template-columns: minmax(120px, 210px) 1fr auto 44px; align-items: center; gap: 12px; padding: 7px 8px; border: 0; border-radius: 8px; background: none; cursor: pointer; font: inherit; color: inherit; text-align: start; }
.exp-bar:hover, .exp-bar.on { background: var(--surface-2); }
.exp-bar.dim { opacity: .45; }
.exp-bar-track { height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.exp-bar-track > span { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.exp-bar b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.exp-bar-p { text-align: end; }
@media (max-width: 620px) { .exp-bar { grid-template-columns: 1fr auto; } .exp-bar-track { grid-column: 1 / -1; order: 3; } .exp-bar-p { display: none; } }

/* Fixed expenses: grouped by when to pay */
.fx-group { margin-bottom: 14px; padding-bottom: 6px; }
.fx-group.fx-late { border-inline-start: 4px solid var(--bad); }
.fx-group.fx-soon { border-inline-start: 4px solid var(--warn); }
.fx-gh { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.fx-gh h2 { margin: 0; }
.fx-row { display: grid; grid-template-columns: 1fr auto 150px 64px; align-items: center; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); cursor: pointer; }
.fx-row:hover { background: var(--surface-2); }
.fx-row.done { opacity: .65; }
.fx-amt { text-align: end; font-variant-numeric: tabular-nums; }
.fx-st { text-align: end; }
@media (max-width: 620px) { .fx-row { grid-template-columns: 1fr auto; } .fx-st { text-align: start; } }

/* Settings */
.set-gh { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin: 0 0 8px; }
.set-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.set-card { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-decoration: none; color: inherit; }
.set-card:hover { border-color: var(--brand); background: var(--surface-2); }
.set-ic { font-size: 22px; margin-bottom: 4px; }
.set-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; align-items: center; }
.set-tab, .set-back { padding: 7px 12px; border-radius: 99px; text-decoration: none; color: var(--ink-2); font-size: 13.5px; border: 1px solid var(--line); background: var(--surface); }
.set-tab.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.set-back { border-style: dashed; }
.set-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.set-card-group h2 { margin-bottom: 4px; }
.set-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.set-ctl { display: inline-flex; align-items: center; gap: 8px; flex: none; }
input.switch { appearance: none; -webkit-appearance: none; width: 42px; height: 24px; border-radius: 99px; background: var(--line-2); position: relative; cursor: pointer; transition: background .15s; flex: none; }
input.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
input.switch:checked { background: var(--brand); }
input.switch:checked::after { left: 21px; }

/* Settings — inner sections */
.s-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.s-top > .muted { max-width: 720px; }
.s-group { margin-bottom: 14px; }
.s-gh { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.s-gh h2 { margin: 0; }
.s-line { display: flex; align-items: center; gap: 12px; padding: 10px 8px; margin: 0 -8px; border-top: 1px solid var(--line); cursor: pointer; border-radius: 8px; }
.s-line:hover { background: var(--surface-2); }
.s-line.dim { opacity: .55; }
.s-av { width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--brand); color: #fff; font-weight: 700; font-size: 13px; flex: none; }
.s-av.off { background: var(--line-2); }
.s-av.day { border-radius: 10px; background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.s-main { flex: 1; min-width: 0; }
.s-main .muted { overflow-wrap: anywhere; }
.s-side { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.s-amt { display: inline-flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; margin-inline-end: 6px; }
.s-go { color: var(--brand); font-size: 13px; font-weight: 600; white-space: nowrap; }
@media (max-width: 620px) { .s-line { flex-wrap: wrap; } .s-side { width: 100%; justify-content: flex-start; padding-inline-start: 50px; } .s-go { display: none; } }
.tier-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 8px; }
.tier { display: flex; flex-direction: column; gap: 4px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.tier-n { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.tier-in { display: flex; align-items: center; gap: 4px; }
.tier-in input { width: 100%; font-weight: 700; }
.price-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-top: 8px; }
.price-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; text-align: start; font: inherit; color: inherit; }
.price-tile:hover { border-color: var(--brand); background: var(--surface-2); }
.price-tile.off { opacity: .5; border-style: dashed; }
.price-amt { font-size: 22px; font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; }
.price-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
/* new user dialog steps */
.uf-step { display:flex; align-items:center; gap:8px; font-weight:700; margin:16px 0 8px; }
.uf-step:first-child { margin-top:0; }
.uf-n { width:22px; height:22px; border-radius:50%; background:var(--brand); color:var(--brand-ink); font-size:12px; display:inline-flex; align-items:center; justify-content:center; }
/* new user wizard */
.uw h3 { margin: 4px 0 12px; }
.uw-bar { display:flex; gap:6px; margin-bottom:18px; }
.uw-dot { flex:1; display:flex; align-items:center; gap:8px; padding:8px 10px; border-radius:10px; background:var(--surface-2); color:var(--muted); font-size:13px; font-weight:600; }
.uw-dot span { width:22px; height:22px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; background:var(--line); font-size:12px; color:var(--ink, inherit); }
.uw-dot.on { background:var(--brand-soft); color:var(--brand); }
.uw-dot.on span, .uw-dot.done span { background:var(--brand); color:var(--brand-ink); }
.uw-cards { display:grid; gap:10px; }
.uw-cards.three { grid-template-columns:repeat(3, minmax(0,1fr)); }
.uw-card, .uw-emp { display:flex; align-items:center; gap:12px; text-align:start; width:100%; padding:14px; border:1.5px solid var(--line); border-radius:12px; background:var(--surface); cursor:pointer; font:inherit; color:inherit; }
.uw-card > span:last-child, .uw-emp > span:last-child { display:flex; flex-direction:column; gap:2px; min-width:0; }
.uw-card:hover, .uw-emp:hover { border-color:var(--brand); }
.uw-card.on, .uw-emp.on { border-color:var(--brand); background:var(--brand-soft); }
.uw-ic { font-size:24px; flex:none; }
.uw-cards.three .uw-card { flex-direction:column; align-items:flex-start; gap:6px; }
.uw-list { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:8px; }
.uw-sub { font-weight:700; margin:16px 0 8px; font-size:13px; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); }
.uw-roles { display:grid; gap:6px; }
.uw-role { display:flex; gap:10px; align-items:flex-start; padding:10px 12px; border:1.5px solid var(--line); border-radius:10px; cursor:pointer; }
.uw-role > span { display:flex; flex-direction:column; }
.uw-role.on { border-color:var(--brand); background:var(--brand-soft); }
.uw-sum { margin-top:14px; padding:10px 12px; border-radius:10px; background:var(--surface-2); font-size:14px; }
.uw-nav { justify-content:space-between; }
.uw-done { text-align:center; margin-bottom:12px; }
.uw-big { width:52px; height:52px; margin:0 auto 8px; border-radius:50%; background:var(--ok-soft); color:var(--ok); font-size:28px; display:flex; align-items:center; justify-content:center; }
.uw-msg { background:var(--surface-2); border-radius:10px; padding:12px 14px; white-space:pre-wrap; font-size:15px; line-height:1.6; direction:ltr; text-align:left; }
@media (max-width: 640px) { .uw-cards.three, .uw-list { grid-template-columns:1fr; } .uw-dot { font-size:12px; padding:6px; } }
/* expenses paid for employees */
.emp-costs { display:grid; grid-template-columns:repeat(auto-fill, minmax(200px, 1fr)); gap:8px; }
.emp-cost { display:flex; flex-direction:column; align-items:flex-start; gap:2px; padding:12px 14px; border:1.5px solid var(--line); border-radius:12px; background:var(--surface); cursor:pointer; font:inherit; color:inherit; text-align:start; }
.emp-cost:hover, .emp-cost.on { border-color:var(--brand); }
.emp-cost.on { background:var(--brand-soft); }
.emp-cost-t { font-size:18px; margin-top:4px; }
/* employee leaving */
.leave-info { display:grid; gap:10px; margin-top:14px; }
.leave-row { display:flex; gap:12px; align-items:flex-start; padding:10px 12px; border-radius:10px; background:var(--surface-2); }
.leave-ic { font-size:20px; line-height:1.2; }
/* sortable tables */
table.t th.sortable { cursor:pointer; user-select:none; white-space:nowrap; }
table.t th.sortable:hover { color:var(--brand); }
table.t th.sorted { color:var(--brand); }
.sort-ic { font-size:10px; }
/* possible duplicates */
.dup-list { display:grid; gap:12px; }
.dup-head { margin-bottom:10px; }
.dup-grid { display:grid; grid-template-columns:1fr auto 1fr; gap:12px; align-items:stretch; }
.dup-side { display:flex; flex-direction:column; gap:4px; align-items:flex-start; padding:12px; border:1px solid var(--line); border-radius:10px; min-width:0; }
.dup-mail { overflow-wrap:anywhere; }
.dup-facts { display:flex; flex-wrap:wrap; gap:4px; margin:4px 0; }
.dup-vs { align-self:center; font-weight:700; color:var(--muted); }
.dup-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
@media (max-width: 640px) { .dup-grid { grid-template-columns:1fr; } .dup-vs { display:none; } }
/* provider accounts — supplied to an employee */
.sup-hero { margin-bottom:14px; }
.sup-hero-top { display:flex; align-items:flex-start; gap:12px; justify-content:space-between; flex-wrap:wrap; }
.sup-tiles { display:grid; grid-template-columns:repeat(auto-fit, minmax(130px, 1fr)); gap:8px; margin-top:14px; }
.sup-tile { display:flex; flex-direction:column; gap:2px; padding:10px 12px; border-radius:10px; background:var(--surface-2); }
.sup-tile span { font-size:12px; color:var(--muted); }
.sup-tile b { font-size:20px; }
.sup-tile.ok b { color:var(--ok); } .sup-tile.warn b { color:var(--warn); } .sup-tile.bad b { color:var(--bad); }
.sup-line { display:flex; gap:12px; align-items:flex-start; justify-content:space-between; padding:12px 4px; border-top:1px solid var(--line); cursor:pointer; }
.sup-line:hover { background:var(--surface-2); }
.sup-main { min-width:0; display:flex; flex-direction:column; gap:4px; }
.sup-chips { display:flex; flex-wrap:wrap; gap:4px; }
.sup-side { display:flex; flex-direction:column; align-items:flex-end; gap:3px; text-align:end; flex:none; }
@media (max-width: 640px) { .sup-line { flex-direction:column; } .sup-side { align-items:flex-start; text-align:start; } }
/* new version available */
.update-bar { position:fixed; left:50%; bottom:84px; transform:translateX(-50%); z-index:1000; display:flex; gap:12px; align-items:center; padding:10px 14px; border-radius:12px; background:var(--ink, #1c2422); color:#fff; box-shadow:0 8px 24px rgba(0,0,0,.25); font-size:14px; }
/* verify queue */
.q-summary { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-bottom:12px; padding:10px 14px; border-radius:12px; background:var(--surface); border:1px solid var(--line); }
.qcard.aging { border-inline-start:4px solid var(--warn); }
.qcard.late { border-inline-start:4px solid var(--bad); }
.q-warns { display:grid; gap:6px; margin-top:10px; }
.q-warns:empty { display:none; }
.q-warn { padding:8px 12px; border-radius:8px; background:var(--warn-soft); color:var(--warn); font-size:13px; font-weight:500; }
.btn.primary.warn { background:var(--warn); border-color:var(--warn); }
.q-warn-actions { display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
/* overview: the money we have (Cash, USDT wallet) stands out */
.kpi.money { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.kpi.money .val { color: var(--ok); }
.kpi.money .lbl { color: var(--ok); font-weight: 600; }
/* overview: ads money flow */
.mf-flow:hover { border-color: var(--brand); }
.mf-steps { display:flex; flex-wrap:wrap; gap:8px; align-items:stretch; }
.mf-step { flex:1 1 140px; display:flex; flex-direction:column; gap:2px; padding:10px 12px; border-radius:10px; background:var(--surface-2); }
.mf-step b { font-size:18px; }
.mf-l { font-size:12px; color:var(--muted); font-weight:600; }
.mf-s { font-size:12px; color:var(--muted); }
.mf-step.fb { background:#e8effd; } .mf-step.fb .mf-l { color:#1d4fb8; }
.mf-step.gg { background:#fdf1e3; } .mf-step.gg .mf-l { color:#9a5b00; }
.mf-arrow { align-self:center; color:var(--muted); font-size:18px; }
@media (prefers-color-scheme: dark) { .mf-step.fb { background:#1b2a44; } .mf-step.gg { background:#3a2c14; } }
@media (max-width: 640px) { .mf-arrow { display:none; } }
/* overview: spend & forecast */
.sf-tiles { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:10px; }
.sf-tile { display:flex; flex-direction:column; gap:2px; padding:12px 14px; border-radius:12px; background:var(--surface-2); }
.sf-tile span { font-size:12px; font-weight:600; color:var(--muted); }
.sf-tile b { font-size:22px; font-variant-numeric:tabular-nums; }
.sf-tile small { font-size:12px; color:var(--muted); }
.sf-tile.paid b { color:var(--brand); } .sf-tile.left b { color:var(--warn); }
.sf-bar { display:flex; height:12px; border-radius:99px; overflow:hidden; background:var(--surface-2); margin:14px 0 6px; }
.sf-bar .paid { background:var(--brand); } .sf-bar .left { background:var(--warn); opacity:.55; }
.sf-legend { display:flex; gap:16px; font-size:12px; color:var(--muted); margin-bottom:16px; }
.sf-legend i { display:inline-block; width:10px; height:10px; border-radius:3px; margin-inline-end:6px; vertical-align:-1px; }
.sf-legend i.paid { background:var(--brand); } .sf-legend i.left { background:var(--warn); opacity:.55; }
.sf-two { display:grid; grid-template-columns:1.3fr 1fr; gap:24px; }
.sf-two h3 { margin:0 0 8px; font-size:14px; }
.sf-rows { display:flex; flex-direction:column; }
.sf-row { display:flex; justify-content:space-between; align-items:baseline; gap:12px; padding:7px 0; border-bottom:1px dashed var(--line); font-size:14px; }
.sf-row span { display:flex; flex-direction:column; color:var(--muted); }
.sf-row small { font-size:11px; }
.sf-row b { font-variant-numeric:tabular-nums; white-space:nowrap; }
.sf-row.strong span { color:inherit; font-weight:600; }
.sf-row.strong b { font-size:16px; }
.sf-sep { height:10px; }
@media (max-width: 760px) { .sf-tiles, .sf-two { grid-template-columns:1fr; } }
/* ads money: baht line easier to read */
.mf-s { color:var(--ink, inherit); opacity:.75; font-weight:500; }
.sf-card .exp-bar { grid-template-columns: minmax(110px, 170px) 1fr 96px 38px; padding: 6px 4px; }
.sf-card .exp-bar b { text-align: end; }
.sf-card .exp-bar { grid-template-columns: minmax(120px, 200px) 1fr 96px 38px; }
.sf-card .exp-bar-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* balance box: the chosen source stands out */
.balance-box { grid-template-columns: 1fr auto 1fr minmax(120px, .7fr); align-items: stretch; }
.balance-box .bal.on { opacity: 1; border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); background: var(--brand-soft); }
.balance-box .bal.on b { font-size: 17px; }
.balance-box .bal.after b { color: var(--ok); }
.balance-box .bal.after.neg { background: var(--bad-soft); border-color: var(--bad); } .balance-box .bal.after.neg b { color: var(--bad); }
.balance-box .bal.other { opacity: .55; background: none; }
.balance-box .bal.other b { font-size: 13px; font-weight: 600; }
.balance-box .bal-arrow { align-self: center; color: var(--muted); font-size: 18px; }
@media (max-width: 560px) { .balance-box { grid-template-columns: 1fr auto 1fr; } .balance-box .bal.other { grid-column: 1 / -1; } }
.kpi .fee-line { color: var(--bad); }
/* overview: sales cards (Total sales, Net revenue) in blue — money we have is green */
.kpi.sales { background: #eaf1fd; border-color: #b9cdf3; }
.kpi.sales .lbl { color: #1d4fb8; font-weight: 600; }
.kpi.sales .val { color: #173f93; }
@media (prefers-color-scheme: dark) { .kpi.sales { background: #18243a; border-color: #2c4470; } .kpi.sales .lbl, .kpi.sales .val { color: #9cbcf5; } }
/* all sales */
.quick-ranges { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:12px; }
.chip-btn { border:1px solid var(--line); background:var(--surface); color:inherit; font:inherit; font-size:13px; font-weight:500; padding:6px 12px; border-radius:99px; cursor:pointer; }
.chip-btn:hover { border-color:var(--brand); }
.chip-btn.on { background:var(--brand); border-color:var(--brand); color:var(--brand-ink); }
.filters-row { display:grid; grid-template-columns: 150px 150px minmax(150px, 200px) 1fr auto; gap:10px; align-items:end; }
.sales-head { flex-wrap:wrap; gap:10px; }
@media (max-width: 760px) { .filters-row { grid-template-columns: 1fr 1fr; } }
/* refunds: cancellation requests */
.rq-box { margin-bottom: 16px; border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); }
.rq-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.rq-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surface); }
.rq-card.open { border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); background: var(--warn-soft); }
.rq-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rq-mid { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; font-size: 14px; }
.rq-reason { margin-top: 6px; font-style: italic; color: var(--ink-2); }
.today-acts { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
/* performance */
.pf-list { display:flex; flex-direction:column; }
.pf-row { display:grid; grid-template-columns: 34px 1fr auto; gap:12px; align-items:center; padding:12px 4px; border-top:1px solid var(--line); }
.pf-row:first-child { border-top:0; }
.pf-rank { font-size:20px; text-align:center; color:var(--muted); font-weight:700; }
.pf-top { display:flex; flex-wrap:wrap; gap:8px; align-items:baseline; }
.pf-nums { display:flex; flex-direction:column; align-items:flex-end; text-align:end; }
.pf-nums b { font-size:16px; font-variant-numeric:tabular-nums; }
/* payroll lines */
.pr-list { display:flex; flex-direction:column; }
.pr-line { display:flex; gap:14px; align-items:center; padding:12px 18px; border-top:1px solid var(--line); cursor:pointer; }
.pr-line:hover { background:var(--surface-2); }
.pr-line.done { opacity:.75; }
.pr-main { flex:1; min-width:0; display:flex; flex-direction:column; gap:3px; }
.pr-top { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.pr-bar { height:6px; border-radius:99px; background:var(--surface-2); overflow:hidden; margin-top:4px; max-width:420px; }
.pr-bar > span { display:block; height:100%; background:var(--ok); border-radius:99px; }
.pr-side { display:flex; flex-direction:column; align-items:flex-end; gap:4px; text-align:end; flex:none; }
.pr-side b { font-size:16px; }
@media (max-width: 640px) { .pr-line { flex-direction:column; align-items:stretch; } .pr-side { align-items:flex-start; text-align:start; } }

/* month close */
.close-hero { display:flex; flex-wrap:wrap; align-items:center; gap:12px 18px; margin-bottom:14px; border-inline-start:5px solid var(--ok); }
.close-hero.is-bad { border-inline-start-color: var(--bad); background: linear-gradient(90deg, var(--bad-soft), var(--surface) 60%); }
.close-hero.is-warn { border-inline-start-color: var(--warn); background: linear-gradient(90deg, var(--warn-soft), var(--surface) 60%); }
.close-hero.is-ok { background: linear-gradient(90deg, var(--ok-soft), var(--surface) 60%); }
.close-hero-t { flex:1 1 320px; display:flex; flex-direction:column; gap:4px; }
.close-hero-t b { font-size:18px; }
.close-pills { display:flex; gap:6px; flex-wrap:wrap; }
details.card.fold > summary { padding:14px 18px; cursor:pointer; list-style:none; }
details.card.fold > summary::-webkit-details-marker { display:none; }
details.card.fold > summary::before { content:"▸ "; color:var(--ink-3); }
details.card.fold[open] > summary::before { content:"▾ "; }
details.card.fold { margin-top:14px; }
/* VIP */
.vip-prog { margin-bottom:14px; }
.vip-prog-t { display:flex; flex-wrap:wrap; align-items:baseline; gap:10px; margin-bottom:8px; }
.vip-prog-t b { font-size:16px; color: var(--ok); }
.vip-bar { height:10px; border-radius:99px; background: var(--bad-soft); overflow:hidden; }
.vip-bar span { display:block; height:100%; background: var(--ok); border-radius:99px; }
/* how-it-works fold */
.how-box { margin: 0 0 12px; padding: 8px 14px; border-radius: 10px; background: var(--info-soft); }
.how-box summary { cursor:pointer; color: var(--info); font-size:13px; font-weight:600; }
.how-box[open] summary { margin-bottom:6px; }
.nowrap { white-space: nowrap; }
.price-fold > summary { display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.price-fold > summary .chip-btn { margin-inline-start:auto; }
/* payment parts (several accounts) */
.pay-add { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; }
.pay-parts { margin-top:10px; padding:12px; border:1px dashed var(--line-2); border-radius:12px; background:var(--surface-2); }
.pay-row { align-items:end; margin-bottom:8px; }
.pay-first { align-self:center; }
.pay-x { align-self:end; justify-self:start; }
.pay-sum { margin-top:4px; }
/* dashboard: money out / money in switch */
.flow-head { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; margin-bottom:8px; }
.flow-head h3 { margin:0 auto 0 0; }
.flow-head .seg button { padding:5px 12px; font-size:13px; }
.in-accs { margin:2px 0 8px 14px; padding-left:10px; border-left:2px solid var(--line); }
.in-accs .exp-bar { font-size:13px; }
.in-other { margin-top:12px; padding:10px 12px; border-radius:10px; background:var(--surface-2); border:1px dashed var(--line-2); }
.in-other-h { font-size:12.5px; font-weight:600; color:var(--ink-3); margin-bottom:6px; }
.in-other-r { display:flex; justify-content:space-between; gap:10px; font-size:13px; color:var(--ink-2); padding:2px 0; }
/* content requests */
.cr-actions { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:14px; }
.cr-top { margin-top:14px; }
.cr-toplist { display:flex; flex-direction:column; gap:4px; }
.cr-topr { display:flex; justify-content:space-between; align-items:center; gap:8px; border:0; background:var(--surface-2); border-radius:10px; padding:8px 10px; cursor:pointer; font:inherit; text-align:start; color:inherit; }
.cr-topr:hover { background:var(--brand-soft); }
.cr-days { display:flex; align-items:flex-end; gap:8px; height:96px; }
.cr-day { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; gap:2px; font-size:11.5px; }
.cr-day .cr-bar { width:100%; max-width:30px; background:var(--brand); border-radius:6px 6px 2px 2px; opacity:.85; }
.cr-day b { font-size:12px; } .cr-day small { color:var(--ink-3); }
.cr-list { display:flex; flex-direction:column; gap:10px; }
.cr-card { border:1px solid var(--line); border-radius:14px; padding:12px 14px; background:var(--surface); cursor:pointer; border-inline-start:4px solid var(--brand); }
.cr-card.k-issue { border-inline-start-color:#c2410c; } .cr-card.k-other { border-inline-start-color:var(--ink-3); }
.cr-card:hover { box-shadow:var(--shadow); }
.cr-card-top { display:flex; flex-wrap:wrap; align-items:center; gap:6px 8px; }
.cr-ic { font-size:17px; } .cr-title { font-size:15.5px; margin-inline-end:auto; }
.cr-card-mid { margin-top:3px; }
.cr-card-bot { display:flex; flex-wrap:wrap; align-items:center; gap:6px 8px; margin-top:8px; }
.cr-desc { margin-top:6px; font-size:13.5px; color:var(--ink-2); white-space:pre-wrap; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.cr-desc.big { -webkit-line-clamp:unset; display:block; background:var(--surface-2); border-radius:10px; padding:10px 12px; margin-top:10px; }
.chip.issue { background:#fff1e7; color:#c2410c; }
.cr-shot { max-width:220px; max-height:220px; border-radius:10px; border:1px solid var(--line); margin-top:10px; display:block; }
.cr-people { display:flex; flex-direction:column; gap:8px; }
.cr-person { display:flex; align-items:center; gap:10px; padding:8px 10px; border:1px solid var(--line); border-radius:10px; }
.cr-person > div { flex:1; min-width:0; }
.seg.wrap { display:flex; flex-wrap:wrap; }
.cr-filters { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; margin-bottom:12px; }
.cr-filters .seg { display:inline-flex; flex-wrap:wrap; width:auto; }

/* gifts */
.tl-item.gift .tl-dot { background: #b06ad9; }
.tl-item.gift.off { opacity: .55; } .tl-item.gift.off b { text-decoration: line-through; }
.gift-sale { margin-top: 14px; }
.gift-sale-body { margin-top: 10px; padding: 12px; border: 1px dashed var(--line); border-radius: 12px; background: var(--bg-2, #faf9f6); }
.gift-list { display: grid; gap: 10px; }
.gift-card { display: grid; gap: 4px; border-inline-start: 4px solid var(--warn); }
.gift-card.st-approved { border-inline-start-color: var(--ok); } .gift-card.st-rejected { border-inline-start-color: var(--bad); opacity: .8; }
.gift-top { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.gift-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.gift-actions .input { flex: 1 1 180px; min-width: 0; }
.gift-sum { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.gift-sum-row { display: grid; }

/* Hebrew (right-to-left) */
html[lang="he"] { --font: "Heebo", "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif; }
.lang-seg { margin-top: 10px; } .lang-seg button { min-height: 32px; padding: 4px 12px; font-size: 13px; }
[dir="rtl"] .datebox .input { padding-right: 12px; padding-left: 42px; }
[dir="rtl"] .date-btn { right: auto; left: 4px; }
[dir="rtl"] .bottom-nav .badge { right: auto; left: 14%; }
[dir="rtl"] .in-accs { margin: 2px 14px 8px 0; padding-left: 0; padding-right: 10px; border-left: 0; border-right: 2px solid var(--line); }
@media (max-width: 860px) { [dir="rtl"] .side { left: auto; right: 0; transform: translateX(110%); } [dir="rtl"] .side.open { transform: none; } }
/* numbers, phones, amounts and codes keep reading left-to-right inside Hebrew */
[dir="rtl"] .num, [dir="rtl"] .mono, [dir="rtl"] .kpi .val, [dir="rtl"] .t td.n { unicode-bidi: isolate; }
[dir="rtl"] .t td.n { direction: ltr; text-align: left; }
[dir="rtl"] table.t.cards td.n { text-align: right; }
[dir="rtl"] .me .muted, [dir="rtl"] .brand-who span { unicode-bidi: plaintext; }
.lang-btn { min-height: 30px; padding: 2px 9px; font-size: 12.5px; font-weight: 700; flex: none; }
.brand-who span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.input.bad { border-color: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.field-err { color: var(--bad); font-size: 12.5px; margin-top: 4px; font-weight: 500; }
.field-err:not(.hidden) + .hint { display: none; }
/* content requests: who is handling */
.cr-load { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.cr-load-b { display: inline-flex; gap: 6px; align-items: center; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font: inherit; font-size: 13px; cursor: pointer; color: inherit; }
.cr-load-b.on { border-color: var(--brand, #0f5c4f); box-shadow: 0 0 0 2px var(--brand-soft, #dcefe9); }
.cr-load-b.stuck { border-color: var(--bad); }
.chip.cr-who { font-weight: 600; }
.cr-hist { display: grid; gap: 3px; }
/* permissions */
.perm-group h3 { margin: 14px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.perm-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; cursor: pointer; background: var(--surface); }
.perm-row.changed { border-color: var(--warn); background: var(--warn-soft); }
.perm-matrix table { min-width: 900px; }
.perm-matrix th.perm-th { font-size: 11.5px; white-space: normal; min-width: 72px; text-align: center; vertical-align: bottom; }
.perm-matrix td.perm-cell { text-align: center; }
.perm-matrix td.perm-cell.changed { background: var(--warn-soft); }
.perm-matrix td.perm-name { position: sticky; inset-inline-start: 0; background: var(--surface); min-width: 130px; }
.perm-matrix input[type=checkbox] { width: 18px; height: 18px; cursor: pointer; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: start; }
.move-total { font-size: 13px; color: var(--ink-2); padding: 2px 2px 0; min-height: 0; }
.move-total:empty { display: none; }
/* permissions page */
.perm-page { display: grid; grid-template-columns: minmax(300px, 420px) 1fr; gap: 16px; align-items: start; }
.perm-list { display: grid; gap: 12px; }
.perm-lgroup { padding-bottom: 6px; }
.perm-line { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "who go" "sum sum"; gap: 4px 10px; width: 100%; text-align: start; padding: 10px 8px; border: 0; border-top: 1px solid var(--line); background: none; font: inherit; color: inherit; cursor: pointer; border-radius: 8px; }
.perm-line:hover { background: var(--surface-2); }
.perm-line.on { background: var(--brand-soft, #e3f1ec); }
.perm-who { grid-area: who; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.perm-sum { grid-area: sum; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 12.5px; }
.perm-line .s-go { grid-area: go; color: var(--ink-3); }
.perm-std { color: var(--ink-3); margin-inline-end: 4px; }
.perm-diff { font-size: 11.5px; }
.perm-card { position: sticky; top: 12px; }
.perm-card-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.perm-back { display: none; }
.perm-empty { text-align: center; padding: 40px 16px; }
@media (max-width: 900px) {
  .perm-page { grid-template-columns: 1fr; }
  .perm-page .perm-card { display: none; position: static; }
  .perm-page.has-pick .perm-list { display: none; }
  .perm-page.has-pick .perm-card { display: block; }
  .perm-back { display: inline-flex; width: 100%; justify-content: flex-start; }
}
[dir="rtl"] .perm-line .s-go { display: inline-block; transform: scaleX(-1); }
/* expenses by category */
.exp-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-top: 14px; }
.exp-cat { display: grid; gap: 6px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); color: inherit; text-decoration: none; }
.exp-cat:hover { border-color: var(--line-2); }
.exp-cat-top { display: flex; gap: 8px; align-items: center; }
.exp-cat-ic { font-size: 18px; }
.exp-cat-amt { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; unicode-bidi: isolate; }
.srv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-top: 14px; }
.srv-card { display: grid; gap: 6px; align-content: start; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); cursor: pointer; }
.srv-card:hover { border-color: var(--line-2); }
.srv-card.off { opacity: .6; }
.srv-top { display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; }
.srv-name { font-size: 15.5px; }
.srv-price b { font-size: 17px; }
.srv-line { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.srv-contact { direction: ltr; unicode-bidi: isolate; }
.srv-actions { margin-top: 4px; }
.exp-cat > .chip, .exp-cat > span { justify-self: start; }

/* ── expenses drill-down (overview hero, sparks, server/employee pages) ── */
.exp-hero { --c: var(--brand); border-top: 4px solid var(--c); }
.exp-hero-top { display: flex; gap: 18px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; }
.exp-hero-amt { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; unicode-bidi: isolate; line-height: 1.15; }
.exp-hero-side { display: flex; gap: 22px; flex-wrap: wrap; }
.exp-hero-side > div { display: flex; flex-direction: column; gap: 2px; }
.exp-hero-side b { font-size: 17px; font-variant-numeric: tabular-nums; unicode-bidi: isolate; }
.exp-split { display: flex; height: 12px; border-radius: 99px; overflow: hidden; margin-top: 16px; background: var(--surface-2); gap: 2px; }
.exp-split-seg { display: block; height: 100%; min-width: 4px; transition: opacity .15s; }
.exp-split-seg:hover { opacity: .8; }
.exp-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.exp-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-inline-end: 5px; vertical-align: middle; }
.exp-cat { --c: var(--brand); border-top: 3px solid var(--c); transition: transform .12s, box-shadow .12s; }
.exp-cat:hover { transform: translateY(-1px); }
.exp-cat-go { margin-inline-start: auto; color: var(--muted); }
[dir="rtl"] .exp-cat-go { transform: scaleX(-1); display: inline-block; }   /* arrow only; "Edit →" is translated with its own arrow, never mirrored */
.exp-cat .spark-b { background: var(--c); }
.delta { font-size: 12px; color: var(--muted); justify-self: start; }
.delta.up { color: var(--bad); }
.delta.down { color: var(--ok); }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 34px; }
.spark-c { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; min-width: 0; }
.spark-b { display: block; width: 100%; max-width: 26px; border-radius: 3px 3px 1px 1px; background: var(--brand); opacity: .35; }
.spark-c.now .spark-b { opacity: 1; }
.spark.big { height: 100px; gap: 8px; }
.spark.big .spark-b { max-width: 44px; background: var(--c, var(--brand)); }
.spark-v { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; margin-bottom: 3px; white-space: nowrap; }
.spark-l { font-size: 11.5px; color: var(--muted); margin-top: 4px; white-space: nowrap; }
.spark.big .spark-c { height: 100%; }
.spark.big .spark-c > .spark-b { flex: none; }
.srv-side.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.srv-side.two > .card { margin: 0; }
@media (max-width: 760px) { .srv-side.two { grid-template-columns: 1fr; } }
.srv-cal { display: flex; flex-direction: column; }
.srv-cal-row { display: grid; grid-template-columns: 54px 1fr auto; gap: 10px; align-items: center; padding: 7px 4px; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.srv-cal-row:first-child { border-top: 0; }
.srv-cal-row:hover { background: var(--surface-2); }
.srv-cal-d { font-size: 12.5px; font-weight: 700; padding: 2px 6px; border-radius: 6px; background: var(--surface-2); text-align: center; font-variant-numeric: tabular-nums; direction: ltr; }
.srv-cal-d.soon { background: var(--warn-soft); color: var(--warn); }
.srv-filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 16px; }
.srv-filters input[type="search"] { flex: 1; min-width: 200px; max-width: 340px; }
.srv-hero { --c: var(--brand); border-top: 4px solid var(--c); }
.srv-hero.off { opacity: .75; }
.srv-hero-top { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.srv-hero-act { display: flex; gap: 8px; flex-wrap: wrap; }
.srv-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-top: 16px; }
.srv-facts > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.srv-facts > div > span { font-size: 12px; color: var(--muted); }
.srv-facts b { font-size: 17px; font-variant-numeric: tabular-nums; unicode-bidi: isolate; }
.srv-contact-box { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; padding: 10px 12px; border: 1px dashed var(--line-2); border-radius: 10px; }
.srv-contact-box > div { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.srv-change { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-top: 1px solid var(--line); }
.srv-change:first-of-type { border-top: 0; }
.top-row { display: flex; justify-content: space-between; gap: 10px; width: 100%; padding: 8px 6px; border: 0; border-top: 1px solid var(--line); background: none; font: inherit; color: inherit; cursor: pointer; text-align: start; }
.top-row:hover { background: var(--surface-2); }
.top-row b.num { white-space: nowrap; unicode-bidi: isolate; }
.warn-t { color: var(--warn); }
.bad-t { color: var(--bad); }
.pr-name { color: inherit; text-decoration: none; }
.pr-name:hover b { text-decoration: underline; }
.pr-share { display: block; width: 90px; height: 4px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.pr-share > span { display: block; height: 100%; background: #0f8a6a; opacity: .6; }
.pe-break { display: flex; flex-direction: column; max-width: 520px; }
.pe-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--line); }
.pe-row:first-child { border-top: 0; }
.pe-row.tot { font-weight: 700; border-top: 2px solid var(--line-2); }
.pe-row b { unicode-bidi: isolate; }
.exp-cat-usdt, .exp-hero-usdt { font-size: 14px; font-weight: 600; color: var(--ink-2, var(--muted)); font-variant-numeric: tabular-nums; unicode-bidi: isolate; }
.exp-hero-usdt { font-size: 16px; margin-top: 2px; }
.srv-next { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.srv-next-t { font-size: 12.5px; font-weight: 700; color: var(--muted); margin-inline-end: 4px; }
.srv-next-i { display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; border-radius: 99px; background: var(--surface-2); color: inherit; text-decoration: none; font-size: 13px; }
.srv-next-i b { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.srv-next-i .num { color: var(--muted); unicode-bidi: isolate; }
.srv-next-i.soon { background: var(--warn-soft); }
.srv-next-i:hover { outline: 1px solid var(--line-2); }
.srv-thb { display: inline-block; margin-inline-start: 8px; font-size: 13px; color: var(--ink-2); font-weight: 600; unicode-bidi: isolate; }
.acc-plats { display: flex; gap: 4px; flex-wrap: wrap; }
/* ── account form ── */
.acc-form { display: flex; flex-direction: column; gap: 12px; }
.acc-top { display: flex; flex-direction: column; gap: 10px; }
.acc-sum { display: flex; gap: 6px; flex-wrap: wrap; min-height: 24px; }
.acc-sec { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: var(--surface); }
.acc-sec-h { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; flex-wrap: wrap; margin-bottom: 10px; }
.acc-sec-h h3 { margin: 0; }
.acc-sub { font-size: 12.5px; font-weight: 700; color: var(--muted); margin: 14px 0 6px; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 8px; margin-bottom: 8px; }
.st-grid.hidden { display: none; }
.st-pick { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid transparent; }
.st-pick[data-st="Active"] { border-color: var(--ok); background: var(--ok-soft); }
.st-pick[data-st="Blocked"] { border-color: var(--bad); background: var(--bad-soft); }
.st-name { font-weight: 700; font-size: 14px; }
.st-btns { display: flex; gap: 4px; flex-wrap: wrap; }
.st-b { flex: 1 1 auto; min-width: 0; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font: inherit; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.st-b:hover { border-color: var(--ink-3, var(--muted)); }
.st-b.on.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.st-b.on.bad { background: var(--bad); border-color: var(--bad); color: #fff; }
.st-b.on.off { background: var(--ink-2); border-color: var(--ink-2); color: var(--surface); }
.st-b.on.na { background: var(--surface); border-color: var(--ink-2); color: var(--ink); font-weight: 600; }
.link-row { display: grid; grid-template-columns: 110px 1fr auto auto auto; gap: 8px; align-items: center; margin-bottom: 6px; }
.link-amt { display: flex; align-items: center; gap: 4px; }
.link-amt span { color: var(--muted); font-weight: 700; }
.link-row .check { white-space: nowrap; }
@media (max-width: 620px) { .link-row { grid-template-columns: 90px 1fr auto; } .link-row > input { grid-column: 1 / -1; order: 5; } }
.kpi-usdt { font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.cat-hero { display: grid; grid-template-columns: minmax(200px, 1fr) 2fr; gap: 18px; align-items: start; }
.cat-hero-main { display: flex; flex-direction: column; gap: 2px; }
.cat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.cat-tile { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); }
.cat-tile-l { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.cat-tile b { font-size: 18px; font-variant-numeric: tabular-nums; unicode-bidi: isolate; }
.cat-tile-u { font-size: 13px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.cat-chart { margin-top: 14px; }
@media (max-width: 760px) { .cat-hero { grid-template-columns: 1fr; } }
.exp-prog { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin: 4px 0 2px; }
.exp-prog > span { display: block; height: 100%; background: var(--c, var(--ok)); border-radius: 99px; }
.exp-prog.big { height: 8px; max-width: 320px; margin-top: 8px; }
.exp-prog.big > span { background: var(--ok); }
.pf-pend { font-size: 12px; color: var(--warn); font-weight: 600; }
.usdt-month-h { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; }
.usdt-month-h h2 { margin: 0; }
.usdt-big { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin: 8px 0 12px; }
.usdt-big b { font-size: 26px; font-variant-numeric: tabular-nums; unicode-bidi: isolate; }
.usdt-big b.pos { color: var(--ok); } .usdt-big b.neg { color: var(--bad); }
.usdt-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.usdt-stats > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.usdt-stats span { font-size: 12px; color: var(--muted); }
.usdt-stats b { font-size: 17px; font-variant-numeric: tabular-nums; unicode-bidi: isolate; }
.usdt-conv { display: flex; flex-direction: column; margin-top: 10px; max-height: 260px; overflow: auto; }
.usdt-conv-row { display: grid; grid-template-columns: 48px 1fr auto 1fr auto; gap: 8px; align-items: center; padding: 6px 2px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.usdt-conv-row:first-child { border-top: 0; }
.uv { display: inline-flex; flex-direction: column; align-items: flex-end; unicode-bidi: isolate; }
.uv small { font-weight: 400; }
@media (max-width: 560px) { .usdt-stats { grid-template-columns: 1fr 1fr; } }
.ref-loss { padding: 8px 12px; border-radius: 8px; background: var(--surface-2); font-size: 13.5px; min-height: 0; }
.ref-loss:empty { display: none; }
.ref-loss b { unicode-bidi: isolate; }
.spark.pick .spark-c { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; border-radius: 6px; }
.spark.pick .spark-c:hover .spark-b { opacity: .85; }
.spark.pick .spark-c:hover { background: var(--surface-2); }
.spark.pick .spark-c:focus-visible { outline: 2px solid var(--brand); }

/* ── polish pass (11/10): one look for the money pages ── */
.area-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 2px; }
.area-tabs::-webkit-scrollbar { display: none; }
.area-tabs a { padding: 7px 11px; }
.area-tabs a .tab-ic { font-size: 14px; line-height: 1; }
.area-tabs a.on { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 25%, transparent); }

/* emoji badge: the emoji sits in a soft circle tinted with the category colour */
.emo { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; font-size: 18px; line-height: 1;
  background: color-mix(in srgb, var(--c, var(--brand)) 13%, var(--surface)); flex: none; }

/* change vs last month as a small pill */
.delta { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 600;
  background: var(--surface-2); color: var(--ink-3); width: fit-content; }
.delta.up { background: var(--bad-soft); color: var(--bad); }
.delta.down { background: var(--ok-soft); color: var(--ok); }

/* category cards */
.exp-cats { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.exp-cat { border-top: 0; padding: 16px; gap: 8px; position: relative; overflow: hidden; }
.exp-cat::before { content: ""; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 3px; background: var(--c); opacity: .85; }
.exp-cat:hover { box-shadow: 0 6px 18px rgba(0,0,0,.06); transform: translateY(-1px); }
.exp-cat-top { gap: 10px; }
.exp-cat-top b { font-size: 15px; }
.exp-cat-ic { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; font-size: 18px; background: color-mix(in srgb, var(--c) 13%, var(--surface)); }
.exp-cat-amt { font-size: 24px; letter-spacing: -.3px; margin-top: 2px; }
.exp-cat-usdt { font-size: 13px; margin-top: -4px; }
.exp-cat > .muted.small:last-child, .exp-cat > .chip:last-child { margin-top: 2px; padding-top: 8px; border-top: 1px dashed var(--line); width: 100%; border-radius: 0; background: none; border-left: 0; border-right: 0; border-bottom: 0; justify-content: flex-start; }
.exp-cat > .chip.ok:last-child { color: var(--ok); } .exp-cat > .chip.warn:last-child { color: var(--warn); } .exp-cat > .chip.bad:last-child { color: var(--bad); }

/* small charts: fixed height, a baseline, the chosen month in the category colour */
.spark { height: 40px; gap: 4px; border-bottom: 1px solid var(--line); padding-bottom: 1px; }
.spark-b { max-width: 22px; border-radius: 4px 4px 1px 1px; background: var(--c, var(--brand)); opacity: .25; }
.spark-c.now .spark-b { opacity: 1; }
.spark.big { height: 128px; gap: 10px; border-bottom: 1px solid var(--line-2); }
.spark.big .spark-b { max-width: 48px; }
.spark.big .spark-c.now .spark-l { color: var(--ink); font-weight: 700; }
.spark.big .spark-c.now .spark-v { color: var(--ink); font-weight: 700; }

/* hero card: no heavy top bar, a thin accent on the side instead */
.exp-hero, .srv-hero, .cat-hero { border-top: 1px solid var(--line) !important; position: relative; overflow: hidden; }
.exp-hero::before, .srv-hero::before { content: ""; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 4px; background: var(--c, var(--brand)); }
.exp-hero-amt { font-size: 32px; letter-spacing: -.5px; }
.exp-hero-side > div { padding: 10px 14px; border-radius: 10px; background: var(--surface-2); min-width: 150px; }
.exp-split { height: 14px; border-radius: 99px; gap: 3px; background: none; margin-top: 18px; }
.exp-split-seg { border-radius: 99px; }
.exp-legend { gap: 6px 8px; margin-top: 10px; }
.exp-legend > span { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); font-size: 12px; }
.exp-legend i { border-radius: 99px; }
@media (max-width: 620px) {
  .exp-hero-amt { font-size: 26px; }
  .exp-hero-side { width: 100%; } .exp-hero-side > div { flex: 1; min-width: 0; }
  .exp-cats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .exp-cat { padding: 12px; } .exp-cat-amt { font-size: 19px; }
}
@media (max-width: 380px) { .exp-cats { grid-template-columns: 1fr; } }
/* polish: cards align — header on top, footer pinned to bottom */
.exp-cat { display: flex; flex-direction: column; }
.exp-cat > .chip, .exp-cat > span, .exp-cat > .delta { align-self: flex-start; }
.exp-cat > .muted.small:last-child, .exp-cat > .chip:last-child { margin-top: auto; align-self: stretch; }
.exp-cat > .spark { margin-bottom: 6px; }
/* split bar v2 (11/10): one continuous strip + legend with amounts */
.exp-split { height: 12px; border-radius: 99px; gap: 0; background: var(--surface-2); margin-top: 18px; overflow: hidden; }
.exp-split-seg { border-radius: 0; min-width: 6px; }
.exp-split-seg + .exp-split-seg { box-shadow: inset 2px 0 0 var(--surface); }
[dir="rtl"] .exp-split-seg + .exp-split-seg { box-shadow: inset -2px 0 0 var(--surface); }
.exp-legend { gap: 6px 18px; margin-top: 10px; }
.exp-legend > a { display: inline-flex; align-items: center; gap: 5px; padding: 2px 0; background: none; border-radius: 0; color: var(--muted); font-size: 12.5px; text-decoration: none; }
.exp-legend > a:hover .lg-t { color: var(--ink); text-decoration: underline; }
.exp-legend i { width: 9px; height: 9px; border-radius: 99px; margin: 0; }
.exp-legend b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; unicode-bidi: isolate; }
.exp-legend .lg-p { opacity: .75; }
.exp-legend .lg-p::before { content: "· "; }
@media (max-width: 620px) { .exp-legend { gap: 4px 14px; } .exp-legend > a { font-size: 12px; } }
/* split bar v3: label (name · amount · %) under its own segment */
.exp-split { display: flex; height: auto; gap: 0; background: none; border-radius: 0; overflow: visible; margin-top: 18px; }
.exp-split-col { display: flex; flex-direction: column; min-width: 92px; color: inherit; text-decoration: none; }
.exp-split-col .exp-split-seg { display: block; height: 12px; min-width: 0; border-radius: 0; box-shadow: none; }
.exp-split-col + .exp-split-col .exp-split-seg { box-shadow: inset 2px 0 0 var(--surface); }
[dir="rtl"] .exp-split-col + .exp-split-col .exp-split-seg { box-shadow: inset -2px 0 0 var(--surface); }
.exp-split-col:first-child .exp-split-seg { border-start-start-radius: 99px; border-end-start-radius: 99px; }
.exp-split-col:last-child .exp-split-seg { border-start-end-radius: 99px; border-end-end-radius: 99px; }
.exp-split-col:hover .exp-split-seg { opacity: .8; }
.exp-split-lb { display: flex; flex-direction: column; gap: 1px; padding: 8px 6px 0; font-size: 12px; color: var(--muted); line-height: 1.3; }
.exp-split-lb .lg-t { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.exp-split-lb i { width: 8px; height: 8px; border-radius: 99px; flex: none; }
.exp-split-lb b { color: var(--ink); font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; unicode-bidi: isolate; white-space: nowrap; }
.exp-split-lb .lg-p { font-weight: 600; }
.exp-split-lb .lg-p::before { content: none; }
.exp-split-col:hover .lg-t { color: var(--ink); text-decoration: underline; }
.exp-split + .exp-legend { display: none; }
@media (max-width: 620px) {
  .exp-split-col { min-width: 0; }
  .exp-split-col .exp-split-lb { display: none; }
  .exp-split-col .exp-split-seg { height: 10px; }
  .exp-split + .exp-legend { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 8px; margin-top: 10px; }
  .exp-split + .exp-legend > a { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; font-size: 12px; line-height: 1.3; }
  .exp-split + .exp-legend .lg-t { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; order: 0; }
  .exp-split + .exp-legend > a > i { display: none; }
  .exp-split + .exp-legend .lg-t::before { content: ""; width: 8px; height: 8px; border-radius: 99px; background: var(--dot); }
  .exp-split + .exp-legend b { font-size: 13.5px; font-weight: 700; }
  .exp-split + .exp-legend .lg-p { font-weight: 600; opacity: 1; }
  .exp-split + .exp-legend .lg-p::before { content: none; }
}
/* polish: servers / providers (11/10) */
.rec-kpis .kpi { position: relative; overflow: hidden; }
.rec-kpis .kpi .val { text-align: start; }
.rec-kpis .kpi .lbl .emo { margin-inline-end: 2px; }
.rec-kpis .kpi:first-child::before { content: ""; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 3px; background: var(--c); }
.rec-prog { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: 8px; }
.rec-prog i { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
.rec-prog-t { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.srv-card { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 6px; --st: var(--line-2); }
.srv-card::before { content: ""; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 3px; background: var(--st); }
.srv-card.st-paid { --st: var(--ok); } .srv-card.st-open { --st: var(--warn); } .srv-card.st-late { --st: var(--bad); } .srv-card.st-off { --st: var(--line-2); }
.srv-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,.06); transform: translateY(-1px); transition: transform .12s, box-shadow .12s; }
.srv-top { align-items: center; }
.srv-top .srv-name { flex: 1; min-width: 0; }
.srv-top .chip { flex: none; }
.srv-av { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; font-size: 16px; flex: none; background: color-mix(in srgb, var(--st) 14%, var(--surface)); }
.srv-card.st-off .srv-av { background: var(--surface-2); }
.srv-price { margin-top: 2px; }
.srv-price b { font-size: 19px; letter-spacing: -.2px; }
.srv-actions { margin-top: auto; padding-top: 8px; }
.srv-actions .btn { width: 100%; justify-content: center; }
.srv-next-i b { padding: 1px 6px; border-radius: 6px; background: var(--surface); font-size: 12px; }
.srv-next-i.soon b { color: var(--warn); }
.srv-facts > div > span .emo { margin-inline-end: 2px; }
@media (max-width: 620px) { .srv-grid { grid-template-columns: 1fr; } .rec-kpis { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) {
  .rec-kpis .kpi:nth-child(3):last-child { grid-column: 1 / -1; }
  .srv-filters .seg { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .srv-filters .seg > * { flex: none; }
  .srv-filters input[type="search"] { max-width: none; }
}
/* polish: payroll (11/10) */
.pr-line { position: relative; --st: var(--line-2); }
.pr-line::before { content: ""; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 3px; background: var(--st); }
.pr-line.st-paid { --st: var(--ok); } .pr-line.st-part { --st: var(--warn); } .pr-line.st-open { --st: var(--warn); }
.pr-line.done { opacity: .85; }
.pr-av { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; flex: none; font-weight: 700; font-size: 15px; color: var(--ink); background: color-mix(in srgb, var(--st) 18%, var(--surface)); }
.pr-top b { font-size: 15px; }
.pr-bar { height: 7px; }
@media (max-width: 640px) { .pr-line { display: grid; grid-template-columns: 38px 1fr; } .pr-line > .pr-side { grid-column: 1 / -1; } }
.pe-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 14px; margin-top: 14px; }
.pe-grid.one { grid-template-columns: 1fr; }
.pe-grid > .card { margin: 0; }
.pe-chart .spark-b { background: var(--c); }
@media (max-width: 760px) { .pe-grid { grid-template-columns: 1fr; } }
.ok-t { color: var(--ok); }
.pe-chart { display: flex; flex-direction: column; }
.pe-chart .spark { margin-top: auto; padding-top: 28px; }
/* account type picker with prices (rentals) */
.ty-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ty-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 14px; border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--surface); cursor: pointer; text-align: start; color: var(--ink); font: inherit; }
.ty-opt b { font-size: 14px; }
.ty-price { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; unicode-bidi: isolate; }
.ty-price small { font-size: 12px; font-weight: 500; color: var(--muted); }
.ty-opt.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, var(--surface)); box-shadow: 0 0 0 1px var(--brand) inset; }
.ty-pay { margin: 10px 0 12px; padding: 10px 12px; border-radius: 10px; background: var(--ok-soft); color: var(--ink); font-size: 14px; }
.ty-pay b { font-size: 16px; color: var(--ok); unicode-bidi: isolate; }
@media (max-width: 420px) { .ty-pick { grid-template-columns: 1fr; } }
.exp-side-link { color: inherit; text-decoration: none; }
.exp-side-link:hover b { text-decoration: underline; }
.exp-hero-side > a.exp-side-link { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: 10px; background: var(--surface-2); min-width: 150px; border: 1px dashed var(--line-2); }
.exp-hero-side > a.exp-side-link b { color: var(--ink-2, var(--ink)); }
@media (max-width: 620px) { .exp-hero-side > a.exp-side-link { flex: 1; min-width: 0; } }
/* owner draws: last part of the expenses bar, hatched — not a business expense */
.exp-split-col.draw .exp-split-seg { background: repeating-linear-gradient(135deg, #7d8a84 0 5px, #b9c2be 5px 10px) !important; }
.exp-split-col.draw .lg-t, .exp-legend > a.draw .lg-t { font-style: italic; }
.exp-split-lb .lg-note, .exp-legend .lg-note { font-size: 11px; color: var(--muted); font-weight: 400; }
.exp-legend > a.draw .lg-t::before { background: repeating-linear-gradient(135deg, #7d8a84 0 2px, #b9c2be 2px 4px) !important; }
.seg button.seg-bad:not(.on) { border-color: color-mix(in srgb, var(--bad) 45%, var(--line-2)); color: var(--bad); }
.seg-scroll .seg { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.seg-scroll .seg > * { flex: none; }
/* account rentals: 4 states */
.acc-card { --st: var(--line-2); border-inline-start-color: var(--st) !important; }
.acc-card.st-use { --st: var(--ok); } .acc-card.st-ready { --st: #2f6fdb; } .acc-card.st-off { --st: var(--line-2); } .acc-card.st-blocked { --st: var(--bad); }
.acc-state { margin-inline-start: auto; flex: none; font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: var(--surface-2); white-space: nowrap; }
.acc-state.use { background: var(--ok-soft); color: var(--ok); } .acc-state.ready { background: #e8f0fd; color: #2456b5; } .acc-state.blocked { background: var(--bad-soft); color: var(--bad); }
.acc-states { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.acc-st { padding: 7px 6px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface); font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; text-align: center; line-height: 1.25; }
.acc-st.on { border-width: 2px; padding: 6px 5px; color: var(--ink); }
.acc-st.use.on { border-color: var(--ok); background: var(--ok-soft); } .acc-st.ready.on { border-color: #2f6fdb; background: #e8f0fd; }
.acc-st.off.on { border-color: var(--ink-3); background: var(--surface-2); } .acc-st.blocked.on { border-color: var(--bad); background: var(--bad-soft); }
@media (max-width: 520px) { .acc-states { grid-template-columns: 1fr 1fr; } }
@media (prefers-color-scheme: dark) { .acc-state.ready, .acc-st.ready.on { background: #1b2a44; color: #9dbcf5; } }
/* account login details */
.login-line { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; padding: 7px 10px; border: 1px dashed var(--line-2); border-radius: 9px; background: var(--surface-2); font: inherit; font-size: 12.5px; color: var(--ink-2); cursor: pointer; text-align: start; }
.login-line:hover { border-color: var(--brand); }
.ll-i { white-space: nowrap; }
.login-sec { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; }
.login-sec h3 { margin: 0 0 8px; font-size: 15px; }
.inp-copy { display: flex; gap: 6px; align-items: center; } .inp-copy .input, .inp-copy input { flex: 1; min-width: 0; }
.pw-row { display: flex; flex-direction: column; gap: 6px; }
.pw-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pw-shown { display: inline-flex; gap: 6px; align-items: center; }
.pw-val { direction: ltr; unicode-bidi: isolate; padding: 4px 8px; border-radius: 6px; background: var(--surface-2); font-size: 13px; }
.acc-states.three { grid-template-columns: repeat(3, 1fr); }
/* Eden: switch between his company's rented accounts and Connect's campaign accounts */
.acc-switch { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); margin-bottom: 14px; max-width: 100%; overflow-x: auto; }
.acc-sw { border: 0; background: none; padding: 9px 16px; border-radius: 9px; font: inherit; font-weight: 600; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.acc-sw.on { background: var(--brand); color: var(--brand-ink, #fff); box-shadow: var(--shadow); }
.acc-both { font-size: 12px; padding: 5px 9px; border-radius: 8px; background: #fff6e0; color: #7a5300; align-self: flex-start; }
@media (prefers-color-scheme: dark) { .acc-both { background: #3a2c14; color: #f0c56a; } }

/* 🎯 company target (Competition + seller home) */
.tgt-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.tgt-head h2 { margin: 0; }
.tgt-nums { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 4px 0 10px; }
.tgt-nums b { font-size: 28px; line-height: 1.1; }
.tgt-pct { margin-inline-start: auto; font-weight: 700; font-size: 20px; color: var(--brand); }
.tgt-bar { height: 16px; display: flex; }
.tgt-bar > div { flex: none; }
.tgt-bar > .tgt-pend { background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--brand) 35%, transparent) 0 6px, color-mix(in srgb, var(--brand) 18%, transparent) 6px 12px); }
.tgt-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 6px; }
.tgt-dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; background: var(--brand); margin-inline-end: 5px; vertical-align: middle; }
.tgt-dot.pend { background: color-mix(in srgb, var(--brand) 35%, transparent); }
.tgt-left { margin-top: 12px; display: grid; gap: 3px; }
.tgt-bonus { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.tgt-people { display: flex; gap: 6px; flex-wrap: wrap; }
.tgt-people .chip.me { outline: 2px solid var(--brand); outline-offset: 1px; }
.tgt.tgt-done { border-color: var(--ok); }
.tgt-slim { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 10px 14px; margin-bottom: 14px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: inherit; text-decoration: none; }
.tgt-slim:hover { border-color: var(--brand); }
.tgt-slim-t { font-weight: 700; white-space: nowrap; }
.tgt-slim .progress { display: block; }
@media (max-width: 640px) { .tgt-slim { grid-template-columns: 1fr auto; } .tgt-slim .progress { grid-column: 1 / -1; grid-row: 2; } .tgt-nums b { font-size: 24px; } }

/* ⭐ personal targets + performance insights */
.tgt-slim.tgt-mine { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); background: var(--brand-soft); }
.pf-click { cursor: pointer; }
.pf-click:hover { background: var(--surface-2); }
.pf-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.pi-sec { padding: 12px 0; border-top: 1px solid var(--line); }
.pi-sec:first-of-type { border-top: 0; padding-top: 0; }
.pi-sec h3 { margin: 0 0 8px; }
.pi-tgt { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.tg-list { display: grid; gap: 10px; margin-bottom: 10px; }
.tg-row { display: grid; grid-template-columns: 1.1fr 1.4fr 1fr; gap: 12px; align-items: end; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.tg-in { display: grid; gap: 6px; }
@media (max-width: 640px) { .tg-row { grid-template-columns: 1fr; } }

/* content requests — who has it, always visible */
.cr-card-who { margin-top: 6px; }
.cr-who { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-weight: 700; font-size: 13px; background: #e0ecff; color: #1d4ed8; }
.cr-who.mine { background: #d1fae5; color: #065f46; box-shadow: 0 0 0 2px #10b981 inset; }
.cr-who.free { background: transparent; color: var(--ink-3); font-weight: 600; padding-inline: 0; }
.cr-who.park { background: #f3f4f6; color: var(--ink-2, #374151); }
.cr-card.is-mine { border-inline-start-color: #10b981; background: linear-gradient(0deg, rgba(16,185,129,.05), rgba(16,185,129,.05)), var(--surface); }
.cr-card.is-taken { opacity: .92; }
.cr-card-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.cr-who-big { padding: 10px 12px; border-radius: 10px; background: #eef2ff; font-size: 15px; }
.cr-who-big.mine { background: #d1fae5; }
.cr-minebox { border: 2px solid #10b981; }
.tabs button .chip { margin-inline-start: 6px; }
@media (prefers-color-scheme: dark) {
  .cr-who { background: #1b2a44; color: #9dbcf5; } .cr-who.mine, .cr-who-big.mine { background: #12352a; color: #6ee7b7; }
  .cr-who.park { background: #2a2d33; color: #d1d5db; } .cr-who-big { background: #1e2433; }
}

/* content requests — tell the customer, step 2, readability, phone */
.cr-tabs { flex-wrap: wrap; overflow-x: visible; row-gap: 2px; }
.cr-tabs button { padding: 8px 12px; }
.cr-notify { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #fff7e6; border: 1px solid #f5d48a; cursor: default; }
.cr-notify.late { background: #fdecec; border-color: #f2a3a3; }
.cr-notify-t { font-weight: 700; margin-bottom: 2px; }
.cr-notify-p { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 8px; }
.cr-notify-p > span:first-child { margin-inline-end: auto; }
.cr-remind { display: block; width: 100%; text-align: start; margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; border: 1px solid #f5d48a; background: #fff7e6; font: inherit; font-weight: 600; color: inherit; cursor: pointer; }
.cr-sees { margin-top: 10px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2, #f4f6f5); }
.cr-st { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cr-saved { font-size: 15px; }
.cr-preview { white-space: pre-wrap; padding: 10px 12px; border-radius: 10px; background: var(--surface-2, #f4f6f5); border: 1px dashed var(--line); font-size: 14px; margin-bottom: 10px; }
.cr-person-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.cr-page .muted { color: var(--ink-2); }
.cr-card:focus-visible, .cr-page button:focus-visible, .cr-page a:focus-visible, .modal .cr-send a:focus-visible, .modal .cr-send button:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }
@media (max-width: 640px) {
  .cr-card-acts .btn, .cr-notify .btn, .cr-person-acts .btn { min-height: 44px; padding-inline: 14px; font-size: 15px; }
  .cr-tabs button { flex: 1 1 auto; min-height: 44px; }
  .cr-card { padding: 12px; }
}
@media (prefers-color-scheme: dark) {
  .cr-notify, .cr-remind { background: #33280f; border-color: #6b5420; } .cr-notify.late { background: #3a1a1a; border-color: #7a3333; }
}
.cr-cust-st { display: inline-block; padding: 1px 8px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); }
/* request window: the 3 actions */
.cr-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.cr-act { min-height: 48px; padding: 10px 16px; font-size: 15px; font-weight: 700; }
.cr-acts-more { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cr-more { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 640px) { .cr-acts .cr-act { flex: 1 1 100%; } }
/* owner: team statistics */
.cr-ranks { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; margin-bottom: 6px; }
.cr-rank { padding: 10px 12px; border-radius: 10px; background: var(--surface-2, #f4f6f5); }
/* owner: team — compact ranked list */
.cr-team { padding: 12px 14px; }
.cr-team-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cr-team-head h2 { margin: 0; font-size: 17px; margin-inline-end: auto; }
.cr-team-sort { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 10px; }
.seg.sm button { min-height: 32px; padding: 3px 10px; font-size: 13px; }
.cr-tm-list { display: flex; flex-direction: column; gap: 6px; }
.cr-tm { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: var(--surface); }
.cr-tm.top { border-color: #e8cf7a; }
.cr-tm:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }
.cr-tm-head { display: flex; align-items: center; gap: 8px; }
.cr-tm-rank { width: 28px; text-align: center; font-weight: 700; font-size: 16px; }
.cr-tm-name { font-size: 15px; }
.cr-tm-main { margin-inline-start: auto; font-weight: 800; font-size: 16px; }
.cr-tm-bar { height: 4px; border-radius: 4px; background: var(--surface-2, #eef1ef); margin: 6px 0 6px 36px; overflow: hidden; }
[dir="rtl"] .cr-tm-bar { margin: 6px 36px 6px 0; }
.cr-tm-bar span { display: block; height: 100%; background: var(--brand); border-radius: 4px; }
.cr-tm-stats { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; padding-inline-start: 36px; }
.cr-tm-s.warn b { color: #b45309; } .cr-tm-s.bad b { color: var(--bad); }
.cr-tm-more { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; padding: 6px 0 0 36px; margin-top: 6px; border-top: 1px dashed var(--line); }
[dir="rtl"] .cr-tm-more { padding: 6px 36px 0 0; }
.cr-sent.primary { background: #059669; border-color: #059669; color: #fff; }

/* two-step login (Authenticator) */
.login .card.mfa-card { width: min(460px, 100%); }
.mfa-title { font-size: 20px; margin: 0 0 6px; }
.mfa-step { border-top: 1px solid var(--line); padding: 14px 0 4px; margin-top: 12px; }
.mfa-step-h { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.mfa-stores { display: flex; gap: 8px; flex-wrap: wrap; }
.mfa-qr { display: block; width: 190px; height: 190px; margin: 10px auto; background: #fff; padding: 8px; border-radius: 10px; border: 1px solid var(--line); }
.mfa-more { margin-top: 10px; }
.mfa-more summary { cursor: pointer; color: var(--brand); font-size: 14px; }
.mfa-keyrow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mfa-secret { font-size: 14px; letter-spacing: .5px; padding: 6px 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; word-break: break-all; direction: ltr; }
.mfa-form { display: grid; gap: 10px; }
.mfa-code { font-size: 26px; letter-spacing: 8px; text-align: center; font-variant-numeric: tabular-nums; min-height: 56px; direction: ltr; }
.mfa-tip { margin-top: 10px; }
.mfa-foot { display: flex; justify-content: center; margin-top: 18px; }
