/* Tourna Pay UI — one design system for landing, auth, merchant panel and admin. Light + dark. */
:root {
  --bg: #f5f6fb;
  --bg-2: #eceff7;
  --surface: #ffffff;
  --surface-2: #f4f5fa;
  --line: #e4e7f0;
  --text: #0f1222;
  --text-2: #4a5170;
  --muted: #7a82a0;
  --brand: #6366f1;
  --brand-2: #8b5cf6;
  --brand-3: #ec4899;
  --brand-ink: #ffffff;
  --brand-soft: #eef0ff;
  --ok: #10b981;  --ok-soft: #e7f8f1;
  --bad: #ef4444; --bad-soft: #fdecec;
  --warn: #f59e0b; --warn-soft: #fef5e4;
  --info: #0ea5e9; --info-soft: #e6f5fd;
  --side: #0c0f1d;
  --side-2: #151a2e;
  --side-text: #a9b0cc;
  --shadow-sm: 0 1px 2px rgba(15,18,34,.05);
  --shadow: 0 1px 2px rgba(15,18,34,.04), 0 10px 30px -10px rgba(15,18,34,.12);
  --shadow-lg: 0 24px 60px -20px rgba(49,46,129,.35);
  --r: 18px;
  --r-sm: 12px;
  --grad: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 55%, var(--brand-3) 100%);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #080a14;
    --bg-2: #0e1120;
    --surface: #111527;
    --surface-2: #171c33;
    --line: #232a45;
    --text: #eef0fb;
    --text-2: #b7bddb;
    --muted: #7d86ab;
    --brand: #818cf8;
    --brand-2: #a78bfa;
    --brand-3: #f472b6;
    --brand-ink: #0b0d1a;
    --brand-soft: #1c2150;
    --ok: #34d399;  --ok-soft: #0f2f25;
    --bad: #f87171; --bad-soft: #3a1618;
    --warn: #fbbf24; --warn-soft: #33270b;
    --info: #38bdf8; --info-soft: #0b2a3a;
    --side: #06070f;
    --side-2: #10142a;
    --shadow: 0 1px 2px rgba(0,0,0,.35), 0 10px 30px -10px rgba(0,0,0,.5);
    --shadow-lg: 0 24px 60px -20px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 10px; letter-spacing: -.02em; line-height: 1.2; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 650; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
.break { word-break: break-all; }
.center { text-align: center; }
.right { text-align: right; }
[hidden] { display: none !important; }
.sprite { display: none; }
svg { width: 20px; height: 20px; flex: none; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 650; font-size: 14.5px; line-height: 1;
  border-radius: 12px; padding: 12px 18px; border: 1px solid transparent; cursor: pointer;
  text-decoration: none !important; transition: transform .08s, box-shadow .2s, background .2s, opacity .2s; white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn[disabled] { opacity: .55; cursor: progress; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--brand) 70%, transparent); }
.btn-primary:hover { box-shadow: 0 12px 28px -10px color-mix(in srgb, var(--brand) 80%, transparent); }
.btn-dark { background: var(--text); color: var(--bg); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: var(--bad-soft); color: var(--bad); }
.btn-ok { background: var(--ok-soft); color: var(--ok); }
.btn-sm { padding: 8px 12px; font-size: 13px; border-radius: 10px; }
.btn-lg { padding: 15px 22px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; }
.icon-btn { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; }

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span, .label { font-size: 13px; color: var(--text-2); font-weight: 600; }
.field .hint { font-size: 12.5px; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=url], input[type=number], input[type=search], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1.5px solid var(--line);
  border-radius: 12px; padding: 11px 14px; outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent); }
input[type=color] { width: 48px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: none; padding: 3px; }
.input-group { display: flex; gap: 8px; }
.input-group > input { flex: 1; min-width: 0; }
.prefix { position: relative; }
.prefix > b { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; }
.prefix > input { padding-left: 32px; }
.check-row { display: flex; align-items: center; gap: 10px; font-size: 14px; margin: 6px 0 14px; }
.check-row input { width: 18px; height: 18px; accent-color: var(--brand); }

/* ---------- cards / layout helpers ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); min-width: 0; }
.card + .card { margin-top: 18px; }
.grid > .card + .card { margin-top: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.grid { display: grid; gap: 18px; }
.grid > * { min-width: 0; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.stack > * + * { margin-top: 12px; }
.divider { height: 1px; background: var(--line); margin: 18px 0; border: 0; }

.flash { padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; font-weight: 550; animation: drop .3s ease; }
.flash-ok { background: var(--ok-soft); color: var(--ok); }
.flash-bad { background: var(--bad-soft); color: var(--bad); }
.alert { padding: 12px 14px; border-radius: 12px; font-size: 14px; margin-bottom: 14px; }
.alert-bad { background: var(--bad-soft); color: var(--bad); }
.alert-ok { background: var(--ok-soft); color: var(--ok); }
.alert-warn { background: var(--warn-soft); color: color-mix(in srgb, var(--warn) 70%, var(--text)); }
.alert-info { background: var(--info-soft); color: color-mix(in srgb, var(--info) 70%, var(--text)); }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; text-transform: capitalize; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.paid, .pill.active, .pill.delivered, .pill.published, .pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.pending, .pill.queued, .pill.draft { background: var(--brand-soft); color: var(--brand); }
.pill.expired, .pill.failed, .pill.suspended, .pill.gave_up, .pill.invalid, .pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.mismatch, .pill.paused, .pill.warn { background: var(--warn-soft); color: var(--warn); }
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--text-2); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 -22px; padding: 0 22px; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
.t th { text-align: left; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr { transition: background .15s; }
.t tbody tr:hover { background: color-mix(in srgb, var(--brand) 4%, transparent); }
.t .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.t a.rowlink { color: inherit; font-weight: 600; }
.empty { text-align: center; padding: 36px 12px; color: var(--muted); }
.empty svg { width: 40px; height: 40px; opacity: .5; margin-bottom: 8px; }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 10px 18px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; word-break: break-word; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar input[type=search] { max-width: 320px; }
.toolbar select { width: auto; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-size: 13px; color: var(--muted); }

/* ---------- panel shell ---------- */
.shell { display: flex; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; width: 256px; flex: none; display: flex; flex-direction: column;
  background: radial-gradient(120% 60% at 0% 0%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 60%), var(--side);
  color: var(--side-text); padding: 20px 14px; z-index: 30;
}
.is-admin .side { background: radial-gradient(120% 60% at 0% 0%, rgba(236,72,153,.22), transparent 60%), var(--side); }
.logo { display: flex; align-items: center; gap: 10px; white-space: nowrap; color: #fff; font-weight: 800; font-size: 17px; letter-spacing: -.01em; padding: 4px 8px 20px; text-decoration: none !important; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--grad); box-shadow: 0 6px 18px -6px var(--brand); }
.logo-mark svg { color: #fff; width: 18px; height: 18px; }
.logo-tag { font-style: normal; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin-left: 8px; padding: 2px 7px; border-radius: 6px; background: rgba(236,72,153,.2); color: #f9a8d4; vertical-align: 2px; }
.nav { display: grid; gap: 3px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; color: var(--side-text); font-weight: 560; font-size: 14.5px; text-decoration: none !important; transition: background .15s, color .15s; }
.nav a svg { width: 19px; height: 19px; opacity: .85; }
.nav a:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav a.on { background: linear-gradient(90deg, color-mix(in srgb, var(--brand) 30%, transparent), rgba(255,255,255,.04)); color: #fff; box-shadow: inset 2px 0 0 var(--brand-2); }
.side-foot { margin-top: auto; display: grid; gap: 6px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.07); }
.side-help, .side-out { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--side-text); font: inherit; font-size: 14px; background: none; border: 0; cursor: pointer; width: 100%; text-decoration: none !important; }
.side-help:hover, .side-out:hover { background: rgba(255,255,255,.05); color: #fff; }
.side-help svg, .side-out svg { width: 18px; height: 18px; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 14px 28px; background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--line); }
.top-title { font-size: 19px; margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-right { display: flex; align-items: center; gap: 10px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 800; }
.menu-btn { display: none; }
.content { padding: 26px 28px 60px; width: 100%; max-width: 1240px; }
.scrim { display: none; }
@media (max-width: 900px) {
  .side { position: fixed; left: 0; top: 0; transform: translateX(-105%); transition: transform .25s ease; box-shadow: var(--shadow-lg); }
  .side.open { transform: none; }
  .scrim.open { display: block; position: fixed; inset: 0; background: rgba(5,6,15,.5); z-index: 25; }
  .menu-btn { display: inline-grid; }
  .top { padding: 12px 16px; }
  .content { padding: 18px 16px 48px; }
  .table-wrap { margin: 0 -22px; }
}

/* ---------- stat tiles ---------- */
.stat { position: relative; overflow: hidden; }
.stat .label { display: flex; align-items: center; gap: 8px; font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.stat .value { font-size: 28px; font-weight: 800; letter-spacing: -.03em; margin-top: 8px; font-variant-numeric: tabular-nums; }
.stat .sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.stat .ico { position: absolute; right: 18px; top: 18px; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.stat.hero { background: var(--grad); color: #fff; border: 0; }
.stat.hero .label, .stat.hero .sub { color: rgba(255,255,255,.8); }
.stat.hero .ico { background: rgba(255,255,255,.18); color: #fff; }

.chart { width: 100%; height: 190px; display: block; }
.chart .bar { fill: color-mix(in srgb, var(--brand) 75%, transparent); transition: fill .15s; }
.chart .bar:hover { fill: var(--brand-2); }
.chart .axis { fill: var(--muted); font-size: 10px; }
.chart .grid-line { stroke: var(--line); stroke-dasharray: 3 4; }
.chart-tip { position: fixed; pointer-events: none; background: var(--text); color: var(--bg); font-size: 12.5px; font-weight: 600; padding: 6px 10px; border-radius: 8px; transform: translate(-50%, -120%); z-index: 50; white-space: nowrap; }

/* ---------- onboarding steps ---------- */
.steps { display: grid; gap: 10px; counter-reset: s; }
.step { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.step .n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--surface); border: 1.5px solid var(--line); color: var(--muted); flex: none; }
.step.done .n { background: var(--ok); border-color: var(--ok); color: #fff; }
.step .grow { flex: 1; min-width: 0; }
.step b { display: block; }

/* ---------- provider cards ---------- */
.providers { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.prov { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; font: inherit; color: var(--text); text-align: left; }
.prov.on { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent); }
.prov[disabled] { opacity: .5; cursor: not-allowed; }
.prov .soon { position: absolute; top: 10px; right: 10px; font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.prov-logo { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-weight: 900; color: #fff; font-size: 13px; }
.pl-paytm { background: linear-gradient(135deg, #00b9f1, #002970); }
.pl-phonepe { background: linear-gradient(135deg, #7e3fbf, #5f259f); }
.pl-bharatpe { background: linear-gradient(135deg, #00d09c, #0a7c62); }
.pl-gpay { background: linear-gradient(135deg, #4285f4, #34a853); }
.pl-freecharge { background: linear-gradient(135deg, #f26b3a, #c2410c); }

.acct { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.acct:last-child { border-bottom: 0; }
.acct .grow { flex: 1; min-width: 180px; }

/* ---------- theme gallery ---------- */
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.theme-card { position: relative; border-radius: 18px; overflow: hidden; border: 2px solid var(--line); background: var(--surface); transition: transform .2s, box-shadow .2s, border-color .2s; }
.theme-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.theme-card.on { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.theme-card .prev { aspect-ratio: 9/14; position: relative; overflow: hidden; background: var(--surface-2); }
.theme-card .prev img.bg { width: 100%; height: 100%; object-fit: cover; display: block; }
.theme-card .meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; }
.theme-card .on-badge { position: absolute; top: 10px; left: 10px; background: var(--ok); color: #fff; font-size: 11px; font-weight: 800; border-radius: 99px; padding: 3px 9px; z-index: 2; }
.mini-qr { position: absolute; background: #fff; border-radius: 6px; display: grid; place-items: center; }
.mini-qr svg { width: 88%; height: 88%; color: #111; }
/* built-in theme thumbnails */
.bt { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px; }
.bt .bt-amt { font-weight: 800; font-size: 18px; }
.bt .bt-qr { width: 58%; aspect-ratio: 1; border-radius: 12px; background: #fff; display: grid; place-items: center; }
.bt .bt-qr svg { width: 82%; height: 82%; color: #111; }
.bt-aurora { background: radial-gradient(90% 60% at 20% 10%, #a5b4fc, transparent), radial-gradient(80% 60% at 90% 90%, #f9a8d4, transparent), #eef0ff; color: #1e1b4b; }
.bt-midnight { background: radial-gradient(80% 50% at 50% 0%, rgba(34,211,238,.35), transparent), #070b17; color: #e0f2fe; }
.bt-arcade { background: linear-gradient(160deg, #1a0633, #3b0764 50%, #7f1d1d); color: #fde68a; }
.bt-arcade .bt-qr { box-shadow: 0 0 0 3px #f43f5e, 0 0 24px #f43f5e; }
.bt-clean { background: #fff; color: #0f172a; }
.bt-clean .bt-qr { box-shadow: 0 0 0 1px #e2e8f0; }

/* ---------- theme editor (admin) ---------- */
.editor { display: grid; grid-template-columns: minmax(0, 420px) 1fr; gap: 22px; align-items: start; }
@media (max-width: 900px) { .editor { grid-template-columns: 1fr; } }
.stage { position: relative; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-lg); user-select: none; touch-action: none; background: #000; }
.stage img.bg { width: 100%; display: block; }
.qr-box { position: absolute; border: 2px dashed var(--brand-3); background: rgba(255,255,255,.92); border-radius: 8px; cursor: move; display: grid; place-items: center; box-shadow: 0 0 0 9999px rgba(0,0,0,.08); }
.qr-box svg { width: 90%; height: 90%; color: #111; pointer-events: none; }
.qr-box .handle { position: absolute; right: -9px; bottom: -9px; width: 20px; height: 20px; border-radius: 50%; background: var(--brand-3); border: 3px solid #fff; cursor: nwse-resize; }

/* ---------- code / docs ---------- */
pre.code { background: #0d1022; color: #e2e8ff; border-radius: 14px; padding: 16px 18px; overflow-x: auto; font-size: 13px; line-height: 1.6; margin: 0 0 16px; border: 1px solid #1f2544; }
.secret { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px dashed var(--line); border-radius: 12px; padding: 10px 12px; }
.secret code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 13px; }
.reveal { background: linear-gradient(135deg, var(--ok-soft), var(--brand-soft)); border: 1px solid color-mix(in srgb, var(--ok) 40%, transparent); border-radius: 16px; padding: 18px; margin-bottom: 18px; }

/* ---------- auth pages ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-art {
  position: relative; overflow: hidden; color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(70% 50% at 20% 10%, rgba(139,92,246,.55), transparent 60%), radial-gradient(60% 50% at 90% 90%, rgba(236,72,153,.45), transparent 60%), #0a0c1a;
}
.auth-art .logo { padding: 0; }
.auth-art h2 { font-size: 40px; line-height: 1.05; letter-spacing: -.035em; max-width: 460px; margin-bottom: 14px; }
.auth-art p { color: rgba(255,255,255,.72); max-width: 420px; font-size: 16px; }
.auth-points { display: grid; gap: 12px; margin-top: 22px; }
.auth-points div { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.9); font-weight: 550; }
.auth-points svg { color: #86efac; width: 20px; height: 20px; }
.floaty { position: absolute; right: -40px; bottom: 90px; width: 260px; transform: rotate(-8deg); border-radius: 22px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); backdrop-filter: blur(10px); padding: 18px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.6); animation: bob 6s ease-in-out infinite; }
.floaty .fq { background: #fff; border-radius: 14px; aspect-ratio: 1; display: grid; place-items: center; }
.floaty .fq svg { width: 80%; height: 80%; color: #111; }
.floaty .fa { font-weight: 800; font-size: 22px; margin-bottom: 10px; }
.floaty .fs { margin-top: 10px; display: flex; align-items: center; gap: 8px; font-size: 13px; color: #86efac; font-weight: 700; }
.auth-form { display: grid; place-items: center; padding: 32px 20px; }
.auth-box { width: 100%; max-width: 420px; }
.auth-box h1 { font-size: 30px; }
.auth-box .sub { color: var(--muted); margin-bottom: 24px; }
.auth-foot { margin-top: 18px; font-size: 14px; color: var(--muted); text-align: center; }
.pw-step { animation: drop .35s ease; }
.mobile-logo { display: none; }
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .mobile-logo { display: flex; color: var(--text); padding: 0 0 22px; }
}

/* ---------- landing ---------- */
.land-nav { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; background: color-mix(in srgb, var(--bg) 75%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.land-nav .logo { color: var(--text); padding: 0; }
.land-hero { position: relative; overflow: hidden; padding: 84px 24px 64px; text-align: center; }
.land-hero::before { content: ""; position: absolute; inset: -30% -10% auto; height: 520px; background: radial-gradient(40% 50% at 30% 40%, color-mix(in srgb, var(--brand) 30%, transparent), transparent), radial-gradient(35% 45% at 70% 30%, color-mix(in srgb, var(--brand-3) 25%, transparent), transparent); filter: blur(10px); z-index: -1; }
.land-hero h1 { font-size: clamp(36px, 6vw, 64px); letter-spacing: -.045em; line-height: 1.02; max-width: 880px; margin: 0 auto 18px; }
.land-hero p { font-size: clamp(16px, 2vw, 19px); color: var(--text-2); max-width: 620px; margin: 0 auto 28px; }
.land-hero .row { justify-content: center; }
.badge-top { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 650; margin-bottom: 22px; box-shadow: var(--shadow-sm); }
.badge-top .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.features { max-width: 1120px; margin: 0 auto; padding: 20px 24px 70px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 860px) { .features { grid-template-columns: 1fr; } }
.feature .fi { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--grad); color: #fff; margin-bottom: 14px; }
.feature p { color: var(--text-2); margin: 0; }
.how { max-width: 1120px; margin: 0 auto; padding: 0 24px 90px; }
.how-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 860px) { .how-steps { grid-template-columns: 1fr; } }
.how-steps .n { font-size: 44px; font-weight: 900; letter-spacing: -.04em; line-height: 1; margin-bottom: 8px; }
.land-foot { text-align: center; padding: 30px 16px 40px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }

/* ---------- misc ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--text); color: var(--bg); padding: 11px 18px; border-radius: 12px; font-size: 14px; font-weight: 600; transition: .25s; z-index: 60; box-shadow: var(--shadow-lg); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.copyable { cursor: pointer; }
details.raw summary { cursor: pointer; font-weight: 650; color: var(--brand); }
details.raw pre { margin-top: 10px; }
.page404 { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 24px; }
.page404 .big { font-size: 90px; font-weight: 900; letter-spacing: -.06em; line-height: 1; }

@keyframes drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes bob { 0%, 100% { transform: rotate(-8deg) translateY(0); } 50% { transform: rotate(-6deg) translateY(-12px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* utilities (CSP forbids inline style attributes) */
.mb-18 { margin-bottom: 18px; } .mt-18 { margin-top: 18px; } .mt-8 { margin-top: 8px; } .mt-4 { margin-top: 4px; } .m-0 { margin: 0; }
.h-hello { font-size: 24px; margin: 0; }
.input-sm { width: 200px; padding: 8px 12px; }
.input-xs { width: 70px; padding: 6px 8px; }
.login-dark { background: radial-gradient(60% 50% at 50% 0%, rgba(236,72,153,.18), transparent), var(--bg); }
.admin-login { min-height: 100vh; }
.admin-login .auth-box { max-width: 380px; }
.admin-logo { color: var(--text); padding: 0 0 18px; }
.docs { max-width: 860px; margin: 0 auto; padding: 32px 20px 80px; }
.docs-h1 { font-size: 36px; letter-spacing: -.03em; margin-bottom: 14px; }
.docs .docs-h { margin-top: 34px; }
.docs h3.docs-h { margin-top: 22px; }
.docs p, .docs li { color: var(--text-2); }
.docs code.mono { background: var(--surface-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; font-size: 13px; }
.docs .table-wrap { margin: 0 0 16px; padding: 0; }
.prefix.wide > input { padding-left: 52px; }
.floaty { right: 44px; bottom: 110px; width: 230px; }
@media (max-width: 1200px) { .floaty { display: none; } }
.code-input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 26px; letter-spacing: .45em; text-align: center; font-weight: 700; }

.pill.paid_late { background: var(--ok-soft); color: var(--ok); }
.pill.needs_review { background: var(--warn-soft); color: var(--warn); }
.pill.rejected { background: var(--bad-soft); color: var(--bad); }
.review-box { border: 1.5px solid color-mix(in srgb, var(--warn) 50%, transparent); background: var(--warn-soft); border-radius: 14px; padding: 16px; }

/* ---------- phones (device-backed providers) ---------- */
.pl-upi { background: linear-gradient(135deg, #ffb800, #ff6a00); }
.ico-w { width: 18px; height: 18px; color: #fff; }
.pair { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.pair-qr { width: 220px; height: 220px; background: #fff; border-radius: 14px; padding: 8px; border: 1px solid var(--line); }
.pair ol { flex: 1; min-width: 200px; margin: 0; padding-left: 18px; line-height: 1.7; }
.pair.is-expired .pair-qr { filter: blur(6px); opacity: .4; }
.stack-sm { display: flex; flex-direction: column; gap: 6px; min-width: 170px; }
.stack-sm .input-sm { width: 100%; }
[data-prov-form][hidden] { display: none; }
.pair-code { font-size: 28px; font-weight: 800; letter-spacing: .18em; margin: 6px 0 8px; }
.prov .soon-best { color: var(--ok); }
.prov .muted.small { font-weight: 500; }
.prov-group { grid-column: 1 / -1; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }

/* compact provider picker with real app icons */
.providers.compact { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.providers.compact .prov { flex-direction: row; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; }
.prov-img { width: 36px; height: 36px; border-radius: 10px; flex: none; object-fit: cover; }
.acct .prov-img { width: 40px; height: 40px; }
.prov-txt { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.prov-txt b { font-size: 13.5px; }
.prov-txt .muted { font-size: 11.5px; font-weight: 600; }
.providers.compact .prov-group { margin-top: 10px; }

.getapp { background: linear-gradient(135deg, var(--brand-soft), var(--surface)); }
.getapp-row { display: flex; gap: 14px; align-items: center; }
.getapp-icon { border-radius: 14px; flex: none; }
.getapp-steps { margin: 12px 0; padding-left: 18px; line-height: 1.7; }
/* provider form opened inline, right under the tapped tile's row */
.providers > .prov-form { grid-column: 1 / -1; padding: 14px; border: 1.5px solid var(--brand); border-radius: 12px; background: var(--surface); margin: 2px 0 6px; }
.providers > .prov-form .field:first-of-type { margin-top: 0; }

/* Email Connect */
.email-box { margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.email-addr { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.email-addr code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; font-weight: 700; word-break: break-all; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.fwd-code { font-size: 24px; font-weight: 800; letter-spacing: .12em; margin: 4px 0; }
.guide-step { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.guide-step:last-child { border-bottom: 0; }
.guide-step h3 { margin: 0 0 6px; font-size: 16px; }
.guide-step ol, .guide-step ul { margin: 6px 0 0; padding-left: 18px; line-height: 1.7; }
.guide-fig { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 8px; }
.guide-fig svg { display: block; width: 100%; height: auto; }
.guide-n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; font-size: 13px; margin-right: 8px; }
@media (max-width: 760px) { .guide-step { grid-template-columns: 1fr; } }
.email-steps form.inline { display: inline; margin-left: 6px; }

/* ---- Connect page: account card (header row, badge pinned right) ---- */
.acct-card { display: block; }
.acct-head { display: flex; align-items: flex-start; gap: 12px; }
.acct-head .acct-title { flex: 1; min-width: 0; }
.acct-head > .pill { flex-shrink: 0; margin-top: 2px; }
.acct-note { margin-top: 8px; }
.acct-actions { margin-top: 10px; }
.wrap, .email-box code, .email-box b { overflow-wrap: anywhere; word-break: break-word; }

/* ---- Email Connect box ---- */
.email-box { box-sizing: border-box; max-width: 100%; }
.eb-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.eb-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 99px; font-size: 12px; font-weight: 800; }
.eb-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.eb-chip.ok { background: var(--ok-soft); color: var(--ok); }
.eb-chip.wait { background: var(--warn-soft); color: color-mix(in srgb, var(--warn) 75%, var(--text)); }
.eb-chip .show-sm { display: none; }
.eb-note { font-size: 12px; color: var(--muted); }
.eb-addr { margin-top: 10px; }
.eb-label { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.email-addr code { min-width: 0; max-width: 100%; box-sizing: border-box; }

.esteps { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 2px; }
.es { display: grid; grid-template-columns: 24px 1fr; gap: 10px; padding: 7px 0; }
.es + .es { border-top: 1px dashed var(--line); }
.es-main { min-width: 0; }
.es-dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 800; margin-top: 1px;
  border: 1.5px solid var(--line); color: var(--muted); background: var(--surface); }
.es-dot svg { width: 13px; height: 13px; }
.es.done .es-dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.es.cur .es-dot { border-color: var(--brand); color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent); }
.es-t { font-size: 13.5px; font-weight: 700; color: var(--text); display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.es.todo .es-t { color: var(--muted); font-weight: 600; }
.es-s { font-size: 12px; color: var(--muted); line-height: 1.45; overflow-wrap: anywhere; }
.es.todo .es-s { display: none; }
.es-body { margin-top: 8px; font-size: 13px; line-height: 1.6; color: var(--text-2); }
.es-body p { margin: 0 0 6px; }
.es-body code { font-size: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.es-tips { margin: 4px 0 6px; padding-left: 18px; font-size: 12.5px; color: var(--text-2); }
.es-tips li { margin: 2px 0; }
.es-more { font-size: 12px; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; font-size: 12px; font-weight: 700; color: var(--brand); cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }

.eb-foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.btn-xs { padding: 5px 10px; font-size: 12px; border-radius: 8px; font-weight: 700; }
.btn-outline-bad { background: transparent; color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 55%, transparent); }
.btn-outline-bad:hover { background: var(--bad-soft); }

/* Google-side forwarding confirmation */
.gconfirm { margin: 8px 0 10px; padding: 12px 14px; border-radius: 14px; display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start;
  color: var(--text); border: 1.5px solid transparent; box-sizing: border-box; max-width: 100%;
  background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box;
  box-shadow: 0 14px 32px -22px color-mix(in srgb, var(--brand) 70%, transparent); }
.gconfirm > * { min-width: 0; }
.gconfirm .gc-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.gconfirm .gc-ico svg { width: 20px; height: 20px; }
.gconfirm h4 { margin: 0; font-size: 14px; font-weight: 800; letter-spacing: -.01em; }
.gconfirm p { margin: 3px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--text-2); }
.gconfirm .gc-btn { margin-top: 10px; min-height: 42px; padding: 0 16px; font-size: 14px; font-weight: 800; border-radius: 12px; line-height: 1.2;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; box-sizing: border-box; max-width: 100%; white-space: nowrap; }
.gconfirm .gc-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.gconfirm .gc-code { margin-top: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gconfirm .gc-code .fwd-code { margin: 0; font-size: 20px; }
.gconfirm .gc-hint { margin-top: 8px; font-size: 11.5px; color: var(--muted); }
.gconfirm.compact { grid-template-columns: 1fr; padding: 10px 12px; }
.gconfirm.compact .gc-ico { display: none; }
.gconfirm.compact .gc-btn { min-height: 36px; font-size: 13px; margin-top: 8px; }
.gc-bind { display: inline-block; box-sizing: border-box; max-width: 100%; white-space: normal; text-align: center; height: auto; line-height: 1.35; padding-top: 7px; padding-bottom: 7px; }
.gc-bind svg { display: inline-block; vertical-align: -3px; margin-right: 4px; }
.gc-bind .gc-mail { display: inline-block; overflow-wrap: anywhere; }

@media (max-width: 560px) {
  .acct-head .prov-img, .acct-head .prov-logo { width: 32px; height: 32px; }
  .gconfirm { grid-template-columns: 1fr; padding: 12px; }
  .gconfirm .gc-ico { display: none; }
  .gconfirm .gc-btn, .gc-bind { width: 100%; }
  .email-box { padding: 12px; }
  .eb-chip { font-size: 11.5px; padding: 4px 9px; }
  .eb-chip { white-space: nowrap; }
  .eb-chip .hide-sm { display: none; }
  .eb-chip .show-sm { display: inline; }
  .gconfirm .gc-btn { font-size: 13.5px; padding: 0 12px; }
}

.gc-line { margin: 6px 0 8px; font-size: 12px; color: var(--muted); }
.gc-line a { font-weight: 700; }

.gc-newest { margin: 8px 0 0; font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.gm-check { margin: 10px 0; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 12px; background: var(--surface); }
.gm-check p { margin: 0 0 6px; font-size: 12.5px; }
.gm-check .btn { margin: 2px 0 6px; }
