/* WhatSales partner portal. It uses the WhatSales app's own style (the planner pages, e.g. Refunds Insights): Inter,
   a page header with a coloured icon tile and a 26px title, white 14px cards on the #f0f2f5 canvas with a real shadow,
   tinted icon chips, soft status pills, 13px/600 buttons. Only the colour scheme is its own: emerald, for money. */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
:root {
    --ink: #0f172a; --ink-2: #334155; --body: #344767; --muted: #64748b; --faint: #94a3b8; --line: #e2e8f0; --line-2: #d0d5dd; --hair: #eef2f6; --soft: #f8fafc; --canvas: #f0f2f5;
    --accent: #059669; --accent-deep: #047857; --accent-soft: #ecfdf5; --accent-line: #a7f3d0; --accent-ring: rgba(5,150,105,.14);
    --indigo: #4f46e5; --indigo-soft: #eef2ff; --blue: #2563eb; --blue-soft: #eff6ff; --violet: #7c3aed; --violet-soft: #f5f3ff;
    --amber: #d97706; --amber-soft: #fffbeb; --red: #dc2626; --red-soft: #fef2f2; --slate-soft: #f1f5f9;
    --card-shadow: 0 4px 6px -1px rgba(0,0,0,.10), 0 2px 4px -1px rgba(0,0,0,.06);
    --ease: cubic-bezier(.22, .61, .36, 1);
    color-scheme: light;
}
body { font-family: Inter, "Helvetica Neue", Arial, sans-serif; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); background: var(--canvas); -webkit-font-smoothing: antialiased; }
b, strong { font-weight: 600; color: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-deep); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.tnum, .amt, .big, .mstep b, .refs td, .payout { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot img { height: 32px; opacity: .5; }

/* tones for icon chips: the WhatSales tinted square */
.t-emerald { --tone: #059669; --tone-soft: #ecfdf5; }
.t-blue { --tone: #2563eb; --tone-soft: #eff6ff; }
.t-indigo { --tone: #4f46e5; --tone-soft: #eef2ff; }
.t-violet { --tone: #7c3aed; --tone-soft: #f5f3ff; }
.t-amber { --tone: #d97706; --tone-soft: #fffbeb; }
.t-rose { --tone: #e11d48; --tone-soft: #fff1f2; }
.t-slate { --tone: #475569; --tone-soft: #f1f5f9; }

/* ---------------------------------------------------------------- buttons, pills */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 7px 14px; border-radius: 7px; border: 1px solid transparent; font-weight: 600; font-size: 13px; line-height: 1.4; white-space: nowrap; background: none; text-decoration: none !important; transition: background .15s, border-color .15s, box-shadow .15s; }
.btn i { font-size: 15px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn-ghost { background: #fff; border-color: var(--line-2); color: #475467; }
.btn-ghost:hover { border-color: #98a2b3; color: #344054; box-shadow: 0 0 0 3px rgba(152,162,179,.12); }
.btn-sm { min-height: 30px; padding: 5px 10px; font-size: 12.5px; }
.btn-lg { min-height: 44px; padding: 10px 18px; font-size: 14px; border-radius: 8px; }
.btn[disabled] { opacity: .55; cursor: default; }
.link-btn { display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; font-weight: 600; color: var(--accent-deep); }

.chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px; background: var(--slate-soft); color: #475569; font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip i { font-size: 13px; }
.st-paying { background: var(--accent-soft); color: var(--accent-deep); }
.st-trial { background: var(--blue-soft); color: var(--blue); }
.st-demo { background: var(--violet-soft); color: var(--violet); }
.st-signup { background: var(--indigo-soft); color: var(--indigo); }
.st-lead { background: var(--slate-soft); color: #475569; }
.st-ended, .st-lost { background: var(--slate-soft); color: var(--faint); }
.chip-good { background: var(--accent-soft); color: var(--accent-deep); }
.chip-brand { background: var(--accent-soft); color: var(--accent-deep); }
.chip-grey { background: var(--slate-soft); color: var(--muted); }

/* ---------------------------------------------------------------- cards */
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--card-shadow); padding: 18px 20px; min-width: 0; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-h h3 { margin: 0; font-size: 14.5px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.card-h h3 i { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 8px; font-size: 16px; background: var(--tone-soft, var(--accent-soft)); color: var(--tone, var(--accent)); }
.card-h .sub { color: var(--muted); font-size: 12.5px; }
.eyebrow { display: block; font-size: 12px; font-weight: 600; color: #475569; }

/* ---------------------------------------------------------------- app shell */
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 14px 16px; gap: 16px; overflow-x: hidden; overflow-y: auto; }
.side-logo { display: flex; align-items: center; gap: 8px; padding: 2px 4px 4px; min-width: 0; }
.side-logo img { height: 23px; min-width: 0; }
.side-logo span { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-deep); background: var(--accent-soft); padding: 3px 6px; flex: none; border-radius: 6px; }
.me-chip { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; border: 1px solid var(--line); text-decoration: none !important; transition: border-color .15s, background .15s; }
.me-chip:hover { background: var(--soft); border-color: #cbd5e1; }
.me-chip b { display: block; font-size: 13.5px; }
.me-chip small { color: var(--muted); font-size: 12px; }
.ava { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 13px; color: #fff; flex: none; background: linear-gradient(135deg, #10b981, #047857); }
.side-lead { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; border: 0; border-radius: 10px; background: linear-gradient(135deg, #10b981, #047857); color: #fff; text-align: left; box-shadow: 0 6px 16px rgba(5,150,105,.28); transition: transform .15s var(--ease), box-shadow .15s; }
.side-lead:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(5,150,105,.34); }
.side-lead i { font-size: 20px; flex: none; }
.side-lead span { display: flex; flex-direction: column; font-weight: 600; font-size: 14px; line-height: 1.3; }
.side-lead small { font-size: 11.5px; font-weight: 400; opacity: .9; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 11px; padding: 7px 8px; border-radius: 9px; text-decoration: none; font-weight: 600; font-size: 13.5px; color: #475569; transition: background .15s, color .15s; }
.side-nav a i { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 8px; font-size: 16px; background: var(--tone-soft); color: var(--tone); }
.side-nav a:hover { background: var(--soft); color: var(--ink); }
.side-nav a.on { background: var(--slate-soft); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.side-link { margin-top: auto; border: 1px solid var(--line); background: var(--soft); border-radius: 10px; padding: 12px; }
.side-link small { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.side-link .url { color: var(--ink); font-size: 12.5px; font-weight: 500; overflow-wrap: anywhere; }
.side-link .btn { width: 100%; margin-top: 10px; background: #fff; border-color: var(--line-2); color: #475467; }
.side-link .btn:hover { border-color: #98a2b3; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 max(28px, env(safe-area-inset-right, 0px)) 0 28px; background: #fff; box-shadow: 0 1px 0 var(--line), 0 4px 12px -8px rgba(15,23,42,.12); }
.top .grow { flex: 1; }
.top-logo { display: none; height: 24px; }
.top-lead { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 7px 14px; border: 0; border-radius: 7px; background: var(--accent); color: #fff; font-weight: 600; font-size: 13px; transition: background .15s; }
.top-lead:hover { background: var(--accent-deep); }
.top-lead i { font-size: 15px; }
.top-me { display: flex; align-items: center; gap: 10px; padding-left: 14px; margin-left: 4px; border-left: 1px solid var(--line); text-decoration: none !important; }
.top-me span:not(.ava) { display: flex; flex-direction: column; text-align: right; line-height: 1.25; }
.top-me small { color: var(--muted); font-size: 11.5px; }
.top-me b { font-size: 13.5px; }
.page { padding: 26px max(28px, env(safe-area-inset-right, 0px)) 44px 28px; width: 100%; display: flex; flex-direction: column; gap: 22px; }
.page.enter > * { animation: rise .4s var(--ease) both; }
.page.enter > *:nth-child(2) { animation-delay: .04s; }
.page.enter > *:nth-child(3) { animation-delay: .08s; }
.page.enter > *:nth-child(4) { animation-delay: .12s; }
.page.enter > *:nth-child(5) { animation-delay: .16s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.tabbar { display: none; }
.grid { display: grid; gap: 22px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-wide { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.stack { display: flex; flex-direction: column; gap: 22px; min-width: 0; }

/* the WhatSales page header: icon tile, 26px title, grey line under it */
.page-head { display: flex; align-items: center; gap: 14px; margin-bottom: -4px; }
.page-mark { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 10px; color: #fff; font-size: 20px; background: linear-gradient(135deg, #10b981, #047857); box-shadow: 0 6px 16px rgba(5,150,105,.26); }
.page-head h1 { margin: 0; color: var(--ink); font-size: 26px; font-weight: 700; line-height: 1.2; }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

/* ---------------------------------------------------------------- Add a lead strip */
.leadstrip { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 14px; border: 1px solid var(--accent-line); background: linear-gradient(120deg, #ecfdf5, #f0fdfa 60%, #fff); box-shadow: var(--card-shadow); }
.leadstrip .ls-ic { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 10px; font-size: 22px; color: #fff; background: linear-gradient(135deg, #10b981, #047857); box-shadow: 0 6px 16px rgba(5,150,105,.26); }
.leadstrip .ls-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.leadstrip .ls-t b { font-size: 15px; }
.leadstrip .ls-t span { font-size: 13px; color: var(--ink-2); }
.leadstrip .ls-t small { margin-top: 5px; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--accent-deep); }
.leadstrip .ls-btn { flex: none; min-height: 40px; padding: 8px 18px; background: var(--accent); border-color: var(--accent); color: #fff; font-size: 13.5px; }
.leadstrip .ls-btn:hover { background: var(--accent-deep); }
.notice { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: 12px; background: var(--amber-soft); border: 1px solid #fde68a; font-size: 13px; color: #92400e; }
.notice i { font-size: 18px; color: var(--amber); flex: none; }

/* ---------------------------------------------------------------- home */
.amt { font-size: 40px; font-weight: 600; color: var(--ink); line-height: 1.1; }
.amt-sub { margin-top: 4px; color: var(--muted); font-size: 13px; }
.payout { margin-top: 16px; padding: 12px 14px; border-radius: 11px; border: 1px solid var(--hair); background: var(--soft); }
.payout .lab { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink); }
.payout .lab span:last-child { color: var(--muted); font-weight: 500; }
.payout small { display: block; margin-top: 3px; color: var(--muted); font-size: 12.5px; }
.year { margin-top: 12px; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 11px; background: var(--accent-soft); border: 1px solid #d1fae5; }
.year i { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 9px; background: #fff; color: var(--accent); font-size: 17px; }
.year b { display: block; font-size: 17px; }
.year small { color: var(--accent-deep); font-size: 12px; font-weight: 500; }
.coming div { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin-top: 8px; border: 1px solid var(--hair); border-radius: 11px; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.coming div:first-child { margin-top: 0; }
.coming div .chip { min-width: 78px; justify-content: center; }
.coming div small { margin-left: auto; color: var(--muted); font-weight: 400; font-size: 12.5px; text-align: right; }
.linkrow { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 11px; background: var(--soft); border: 1px solid var(--hair); margin-bottom: 14px; flex-wrap: wrap; }
.linkrow i.ic { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: var(--violet-soft); color: var(--violet); font-size: 16px; }
.linkrow .grow { flex: 1; min-width: 160px; }
.link-card .url { font-size: 14px; font-weight: 600; color: var(--ink); word-break: break-all; }
.linkrow small { color: var(--muted); font-size: 12.5px; }
.chart { position: relative; }
.chart svg { width: 100%; height: 200px; display: block; overflow: visible; font-family: inherit; }
.chart .tip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 600; padding: 6px 10px; border-radius: 8px; transform: translate(-50%, -115%); white-space: nowrap; opacity: 0; transition: opacity .15s; }
.chart .tip small { display: block; color: #cbd5e1; font-weight: 400; font-size: 11.5px; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 12px; border: 1px dashed #cbd5e1; border-radius: 12px; color: var(--muted); font-size: 13px; text-align: center; }
.empty i { font-size: 22px; color: var(--faint); }

/* ---------------------------------------------------------------- sellers, earnings */
.pipe { margin: 0 0 14px; display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 11px; background: var(--accent-soft); border: 1px solid #d1fae5; font-size: 13px; color: var(--ink-2); }
.pipe i { color: var(--accent); font-size: 16px; flex: none; }
.tablewrap { overflow-x: auto; }
.refs { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.refs th { text-align: left; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; background: var(--soft); border-bottom: 1px solid var(--line); white-space: nowrap; }
.refs th:first-child { border-radius: 8px 0 0 0; }
.refs th:last-child { border-radius: 0 8px 0 0; }
.refs td { padding: 12px; border-bottom: 1px solid var(--hair); color: var(--ink-2); vertical-align: middle; }
.refs tr:last-child td { border-bottom: 0; }
.refs .when { color: var(--muted); font-size: 12.5px; margin-left: 8px; }
.refs .note { display: block; color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.refs .r, .ledger td.amt { text-align: right; white-space: nowrap; }
.ledger td.amt { font-size: 13.5px; line-height: 1.45; }
.ledger td.neg b { color: var(--red); }
.money-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.mstep { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px 13px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.mstep small { font-size: 12px; font-weight: 600; color: #475569; margin-bottom: 4px; }
.mstep b { font-size: 24px; font-weight: 700; line-height: 1.15; color: var(--ink); }
.mstep p { margin: 0; font-size: 12px; color: var(--muted); }
.mstep.hot { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.mstep.hot b { color: var(--accent-deep); }
.demo-note { margin: 14px 0 0; display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; border-radius: 11px; border: 1px solid var(--hair); font-size: 13px; color: var(--ink-2); }
.demo-note i { color: var(--violet); font-size: 17px; flex: none; margin-top: 1px; }
.payhero .eyebrow { margin-bottom: 4px; }
.payhero .big { font-size: 40px; font-weight: 600; color: var(--ink); line-height: 1.1; }
.payhero p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }

/* ---------------------------------------------------------------- account */
.prof { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.prof .ava { width: 60px; height: 60px; font-size: 20px; }
.prof .grow { flex: 1; min-width: 200px; }
.prof h2 { margin: 0; font-size: 19px; font-weight: 700; color: var(--ink); }
.prof .meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 5px; color: var(--muted); font-size: 13px; }
.prof .meta span { display: inline-flex; gap: 5px; align-items: center; }
.tierbox { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 11px; background: var(--accent-soft); border: 1px solid #d1fae5; }
.tierbox .md { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; font-size: 18px; background: #fff; color: var(--accent); flex: none; }
.tierbox b { font-size: 14.5px; display: block; }
.rules { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; font-size: 13px; color: var(--ink-2); }
.rules li { padding: 9px 0 9px 24px; border-bottom: 1px solid var(--hair); position: relative; }
.rules li:last-child { border-bottom: 0; }
.rules li::before { content: "\2713"; position: absolute; left: 4px; top: 9px; color: var(--accent); font-weight: 700; font-size: 12px; }
.acct-form .acts { display: flex; gap: 10px; justify-content: flex-end; }
.signout { align-self: flex-start; }

/* ---------------------------------------------------------------- forms */
.field { display: block; font-size: 12.5px; font-weight: 600; color: #475569; margin: 0 0 14px; }
.field input:not([type=radio]):not([type=checkbox]), .field select, .lead-f input, .si-box input { display: block; width: 100%; height: 40px; margin-top: 6px; border-radius: 7px; border: 1px solid var(--line-2); padding: 0 12px; font-size: 13.5px; font-weight: 400; color: var(--ink); background: #fff; outline: 0; transition: border-color .15s, box-shadow .15s; }
.field input:not([type=radio]):focus, .field select:focus, .lead-f input:focus, .si-box input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.field small { display: block; margin-top: 5px; color: var(--muted); font-weight: 400; font-size: 12px; }
.field .slug { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: 7px; margin-top: 6px; background: #fff; overflow: hidden; }
.field .slug:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.field .slug span { padding: 0 2px 0 12px; color: var(--muted); font-weight: 400; white-space: nowrap; }
.field .slug input:not([type=radio]) { border: 0; margin: 0; padding-left: 0; height: 38px; min-width: 0; box-shadow: none !important; }
.field .ok { color: var(--accent-deep); }
.field .no, .err, .form-err { color: var(--red); }
.err, .form-err { font-size: 13px; font-weight: 500; margin: 10px 0 0; min-height: 1em; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.kinds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.kinds label { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 9px; border: 1px solid var(--line-2); cursor: pointer; font-weight: 600; font-size: 13px; color: var(--ink-2); background: #fff; transition: border-color .15s, background .15s; }
.kinds label i { font-size: 17px; color: var(--muted); }
.kinds label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent-ring); }
.kinds input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; flex: none; }
.terms { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--ink-2); margin: 6px 0 18px; }
.terms input { margin-top: 2px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }

/* ---------------------------------------------------------------- modal, toasts */
.scrim { position: fixed; inset: 0; z-index: 80; background: rgba(15,23,42,.45); display: grid; place-items: center; padding: 20px; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } }
.modal { width: 100%; max-width: 460px; background: #fff; border-radius: 14px; padding: 24px; position: relative; box-shadow: 0 24px 48px -12px rgba(15,23,42,.35); animation: pop .25s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.modal .x { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 7px; border: 0; background: none; display: grid; place-items: center; font-size: 16px; color: var(--muted); }
.modal .x:hover { background: var(--slate-soft); color: var(--ink); }
.lead-f h2 { margin: 0 0 4px; font-size: 18px; font-weight: 700; color: var(--ink); }
.lead-f > p { margin: 0 0 18px; color: var(--muted); font-size: 13px; }
.lead-f label { display: block; font-size: 12.5px; font-weight: 600; color: #475569; margin: 0 0 12px; }
.modal .acts { display: flex; gap: 10px; margin-top: 16px; }
.modal .acts .btn { flex: 1; }
.toasts { position: fixed; z-index: 90; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 10px; background: var(--ink); color: #fff; font-weight: 500; font-size: 13.5px; box-shadow: 0 12px 28px -10px rgba(0,0,0,.45); animation: pop .25s var(--ease); }
.toast i { font-size: 17px; color: #6ee7b7; }
.toast.out { animation: toastout .3s ease forwards; }
@keyframes toastout { to { opacity: 0; transform: translateY(8px); } }

/* ---------------------------------------------------------------- sign in and join */
.signin { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); background: #fff; }
.si-art { position: relative; overflow: hidden; background: linear-gradient(150deg, #064e3b, #047857 55%, #059669); color: #fff; padding: 40px 52px; display: flex; flex-direction: column; }
.si-art img.logo { height: 28px; align-self: flex-start; filter: brightness(0) invert(1); }
.si-art h1 { font-size: 42px; line-height: 1.12; font-weight: 700; margin: auto 0 14px; max-width: 520px; text-wrap: balance; }
.si-art h1 em { font-style: normal; color: #a7f3d0; }
.si-art p { color: rgba(255,255,255,.82); font-size: 15px; max-width: 460px; margin: 0; line-height: 1.6; }
.si-art .steps { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; max-width: 460px; }
.si-art .steps li { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 11px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); font-size: 14px; color: rgba(255,255,255,.85); }
.si-art .steps li i { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 9px; background: rgba(255,255,255,.14); color: #fff; font-size: 17px; }
.si-art .steps li b { color: #fff; }
.si-form { display: flex; align-items: center; justify-content: center; padding: 40px max(24px, env(safe-area-inset-right, 0px)) 40px max(24px, env(safe-area-inset-left, 0px)); }
.si-box { width: 100%; max-width: 380px; }
.si-box h2 { font-size: 26px; font-weight: 700; color: var(--ink); margin: 0 0 4px; }
.si-box > p { color: var(--muted); margin: 0 0 24px; font-size: 13.5px; }
.si-box label { font-size: 12.5px; font-weight: 600; color: #475569; display: block; }
.si-box input { height: 44px; }
.si-box .btn-primary { width: 100%; margin-top: 12px; min-height: 44px; font-size: 14px; }
.si-box .fine { margin-top: 20px; font-size: 12.5px; color: var(--muted); text-align: center; }
.si-box .sent { padding: 12px 14px; border-radius: 10px; background: var(--accent-soft); border: 1px solid #d1fae5; font-size: 13px; margin-top: 14px; color: var(--ink-2); }
.si-box .sent a { word-break: break-all; }
.si-box #gbtn { display: flex; justify-content: center; min-height: 44px; }
.prov { display: flex; flex-direction: column; gap: 10px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 12px; margin: 18px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.join { max-width: 640px; margin: 0 auto; padding: 36px 16px 64px; }
.join .head { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.join .head img { height: 28px; }
.join h1 { margin: 0 0 4px; font-size: 26px; font-weight: 700; color: var(--ink); }
.join .lead { margin: 0 0 20px; color: var(--muted); font-size: 13.5px; }
.join .fine { font-size: 13px; color: var(--muted); }

/* ---------------------------------------------------------------- smaller screens */
/* ---------------------------------------------------------------- Share */
.linkrow .acts { display: flex; gap: 8px; }
.share-grid { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 22px; align-items: start; }
.post-card { display: flex; flex-direction: column; gap: 10px; }
.post-img { aspect-ratio: 4 / 5; border-radius: 11px; overflow: hidden; background: var(--slate-soft); }
.post-img img { width: 100%; height: 100%; display: block; }
.cap-l { font-size: 12.5px; font-weight: 600; color: var(--ink); margin-top: 4px; }
.post-card textarea { width: 100%; min-height: 96px; resize: vertical; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; font-size: 13px; line-height: 1.5; }
.post-card textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.post-card .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.plats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.plat { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; text-align: left; min-width: 0; transition: border-color .15s, box-shadow .15s; }
.plat:hover { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.plat .pi { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 9px; color: #fff; font-size: 19px; }
.plat .pt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.plat .pt b { font-size: 13.5px; }
.plat .pt small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plat .pc { flex: none; font-size: 12px; font-weight: 600; color: var(--accent-deep); background: var(--accent-soft); border-radius: 999px; padding: 2px 8px; }
.lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; }
.lib-it { display: flex; flex-direction: column; gap: 7px; padding: 0; border: 0; background: none; text-align: left; min-width: 0; }
.lib-it .th { aspect-ratio: 1; border-radius: 10px; padding: 12px; color: #fff; font-weight: 700; font-size: 14px; line-height: 1.25; display: flex; align-items: flex-start; border: 2px solid transparent; box-shadow: var(--card-shadow); }
.lib-it b { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.lib-it.on .th { border-color: #fff; box-shadow: 0 0 0 3px var(--accent); }
.lib-it.on b { color: var(--accent-deep); }
.srcs { display: flex; flex-direction: column; gap: 10px; }
.src { display: grid; grid-template-columns: 130px minmax(0, 1fr) 40px; align-items: center; gap: 12px; font-size: 13px; }
.src .bar { height: 8px; border-radius: 999px; background: var(--hair); overflow: hidden; }
.src .bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.src b { text-align: right; }

@media (max-width: 1199px) {
    .money-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
    .g-wide { grid-template-columns: minmax(0, 1fr); }
    .share-grid { grid-template-columns: minmax(0, 1fr); }
    .share-grid .post-card { max-width: 460px; }
}
@media (max-width: 860px) {
    .app { grid-template-columns: minmax(0, 1fr); }
    .side { display: none; }
    .top { height: 56px; padding: 0 max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); top: env(safe-area-inset-top, 0px); }
    .top-logo { display: block; }
    .top-lead, .top-me span:not(.ava) { display: none; }
    .top-me { border-left: 0; padding-left: 0; }
    .page { padding: 18px max(16px, env(safe-area-inset-right, 0px)) 100px max(16px, env(safe-area-inset-left, 0px)); gap: 16px; }
    .grid, .stack { gap: 16px; }
    .page-head h1 { font-size: 22px; }
    .tabbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: 6px max(6px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px)); }
    .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; font-size: 11px; font-weight: 600; color: var(--muted); text-decoration: none; }
    .tabbar a i { font-size: 21px; }
    .tabbar a.on { color: var(--accent-deep); }
    .tabbar a.mid i { width: 48px; height: 48px; margin-top: -22px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #10b981, #047857); color: #fff; box-shadow: 0 8px 18px rgba(5,150,105,.35); border: 4px solid #fff; font-size: 22px; }
    .toasts { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
    .signin { grid-template-columns: minmax(0, 1fr); }
    .si-art { padding: 26px 20px 30px; }
    .si-art h1 { font-size: 30px; margin-top: 34px; }
}
@media (max-width: 640px) {
    .g2, .two, .kinds, .money-steps { grid-template-columns: minmax(0, 1fr); }
    .card { padding: 16px; }
    .card-h .sub { display: none; }
    .leadstrip { flex-wrap: wrap; padding: 16px; gap: 12px; }
    .leadstrip .ls-t { flex-basis: calc(100% - 60px); }
    .leadstrip .ls-btn { width: 100%; }
    .amt, .payhero .big { font-size: 34px; }
    /* tables become one block per row: name and amount on top, where they are under it */
    .refs thead { display: none; }
    .refs tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--hair); }
    .refs tr:last-child { border-bottom: 0; }
    .refs td { padding: 0; border: 0 !important; }
    .refs td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
    .refs td:nth-child(3) { grid-column: 1 / -1; grid-row: 3; color: var(--muted); font-size: 12.5px; }
    .refs td:nth-child(4) { grid-column: 2; grid-row: 1; text-align: right; }
    .refs .when { margin-left: 6px; }
    .refs td.noplan { display: none; }
    .coming div { flex-wrap: wrap; gap: 4px 10px; }
    .coming div small { flex-basis: 100%; margin-left: 0; text-align: left; }
    .chart svg text { display: none; }
    .chart svg { height: 140px !important; }
    .plats { grid-template-columns: minmax(0, 1fr); }
    .lib { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .src { grid-template-columns: 104px minmax(0, 1fr) 34px; }
    .linkrow .acts { width: 100%; }
    .linkrow .acts .btn { flex: 1; }
}
