/* Nexal Pay Console — light theme matching Nexal Flow (white, slate, violet -> sky gradient, Inter) */
:root {
  --bg: #F6FFFA;
  --card: #FFFFFF;
  --soft: #F1F5F9;
  --line: #E2E8F0;
  --line-2: #CBD5E1;
  --text: #0B1F33;
  --text-2: #334155;
  --muted: #64748B;
  --violet: #047857;
  --sky: #0D9488;
  --sky-light: #14B8A6;
  --grad: linear-gradient(135deg, #064E3B 0%, #047857 50%, #0F766E 100%);
  --grad-soft: linear-gradient(135deg, rgba(4, 120, 87, .08), rgba(13, 148, 136, .08));
  --ok: #059669; --ok-bg: #ECFDF5;
  --warn: #B45309; --warn-bg: #FFFBEB;
  --bad: #DC2626; --bad-bg: #FEF2F2;
  --info: #0369A1; --info-bg: #F0F9FF;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -12px rgba(15, 23, 42, .12);
  --font: 'Inter Variable', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--text); background: var(--bg);
  background-image:
    radial-gradient(ellipse 60% 40% at 0% 0%, rgba(4, 120, 87, .07), transparent 60%),
    radial-gradient(ellipse 50% 40% at 100% 10%, rgba(13, 148, 136, .08), transparent 60%),
    linear-gradient(rgba(148, 163, 184, .09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .09) 1px, transparent 1px);
  background-size: auto, auto, 32px 32px, 32px 32px;
  background-attachment: fixed;
}
a { color: var(--sky); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--sky-light); outline-offset: 2px; }
.tnum { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Brand */
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -.02em; color: var(--text); text-decoration: none; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--grad); display: grid; place-items: center; box-shadow: 0 6px 16px -6px rgba(4, 120, 87, .6); }
.brand-mark svg { width: 18px; height: 18px; }
.brand b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card); color: var(--text); font-weight: 600; font-size: 14.5px; cursor: pointer; text-decoration: none;
  transition: transform .15s ease, box-shadow .2s ease, background .2s, border-color .2s; white-space: nowrap; }
.btn:hover { border-color: var(--line-2); background: #FBFCFE; }
.btn:active { transform: scale(.98); }
.btn-primary { border: 0; color: #fff; background: var(--grad); box-shadow: 0 8px 20px -10px rgba(5, 150, 105, .7); }
.btn-primary:hover { background: var(--grad); box-shadow: 0 10px 26px -10px rgba(5, 150, 105, .85); transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--soft); border-color: transparent; }
.btn-danger { color: var(--bad); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13.5px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }
.icon { width: 18px; height: 18px; flex-shrink: 0; }

/* Forms */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.field .hint { font-size: 12.5px; color: var(--muted); }
.field .err { font-size: 12.5px; color: var(--bad); font-weight: 600; }
.input { width: 100%; min-height: 46px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 12px; background: #fff; font-size: 16px; transition: border-color .15s, box-shadow .15s; }
.input:focus { outline: none; border-color: var(--sky-light); box-shadow: 0 0 0 4px rgba(13, 148, 136, .15); }
.input[aria-invalid="true"] { border-color: var(--bad); }
.input-prefix { position: relative; }
.input-prefix span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; }
.input-prefix .input { padding-left: 32px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; padding: 4px; background: var(--soft); border-radius: 12px; }
.seg label { display: grid; place-items: center; min-height: 38px; border-radius: 9px; font-weight: 600; font-size: 13.5px; color: var(--muted); cursor: pointer; text-align: center; padding: 0 6px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg input:checked + label { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.seg input:focus-visible + label { outline: 2px solid var(--sky-light); }
.form-error { display: none; padding: 10px 12px; border-radius: 10px; background: var(--bad-bg); color: var(--bad); font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.form-error.show { display: block; }

/* Auth pages */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-side { padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side h1 { font-size: clamp(34px, 4vw, 52px); line-height: 1.04; letter-spacing: -.035em; font-weight: 800; margin: 48px 0 14px; }
.auth-side h1 .g { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-side p { color: var(--muted); font-size: 17px; max-width: 460px; }
.auth-points { display: grid; gap: 12px; margin-top: 28px; padding: 0; list-style: none; }
.auth-points li { display: flex; gap: 10px; align-items: center; font-weight: 600; color: var(--text-2); }
.auth-points .tick { width: 24px; height: 24px; border-radius: 8px; background: var(--grad-soft); display: grid; place-items: center; color: var(--violet); }
.auth-main { display: grid; place-items: center; padding: 32px 20px; }
.auth-card { width: 100%; max-width: 440px; background: rgba(255, 255, 255, .9); backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 22px; padding: 32px; box-shadow: var(--shadow); }
.auth-card h2 { font-size: 26px; letter-spacing: -.02em; margin: 0 0 4px; }
.auth-card .sub { color: var(--muted); margin: 0 0 22px; }
.auth-switch { text-align: center; margin-top: 16px; color: var(--muted); font-size: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-side { padding: 24px 20px 0; }
  .auth-side h1 { margin-top: 24px; font-size: 32px; }
  .auth-side .auth-points, .auth-side .foot { display: none; }
  .auth-card { padding: 22px; }
}
@media (max-width: 480px) { .grid-2 { grid-template-columns: 1fr; gap: 0; } }

/* App layout */
.layout { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; padding: 20px 14px; border-right: 1px solid var(--line); background: rgba(255, 255, 255, .75); backdrop-filter: blur(12px); display: flex; flex-direction: column; gap: 22px; }
.side .brand { padding: 4px 8px; }
.nav { display: grid; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 12px; border-radius: 11px; color: var(--text-2); text-decoration: none; font-weight: 600; font-size: 14.5px; transition: background .15s, color .15s; }
.nav a:hover { background: var(--soft); }
.nav a[aria-current="page"] { background: var(--grad-soft); color: var(--violet); box-shadow: inset 0 0 0 1px rgba(4, 120, 87, .14); }
.side-foot { margin-top: auto; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.side-foot .who { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot .mail { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main { min-width: 0; padding: 28px clamp(16px, 3vw, 40px) 60px; }
.topbar { display: none; }
.tabbar { display: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 28px; letter-spacing: -.025em; margin: 0; line-height: 1.15; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .side { display: none; }
  .topbar { display: flex; position: sticky; top: 0; z-index: 20; align-items: center; justify-content: space-between; padding: 12px 16px; background: rgba(255, 255, 255, .85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
  .main { padding: 18px 16px 96px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: rgba(255, 255, 255, .95); backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { display: grid; justify-items: center; gap: 2px; padding: 6px 0; font-size: 11px; font-weight: 600; color: var(--muted); text-decoration: none; min-height: 48px; }
  .tabbar a[aria-current="page"] { color: var(--violet); }
  .page-head h1 { font-size: 23px; }
}

/* Cards & KPIs */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-head h2 { font-size: 16px; margin: 0; letter-spacing: -.01em; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.kpi { padding: 18px; position: relative; overflow: hidden; }
.kpi .label { font-size: 13px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.kpi .value { font-size: clamp(22px, 2.4vw, 30px); font-weight: 800; letter-spacing: -.03em; margin-top: 6px; }
.kpi .meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.kpi.hero { background: var(--grad); color: #fff; border: 0; }
.kpi.hero .label, .kpi.hero .meta { color: rgba(255, 255, 255, .85); }
.kpi.hero::after { content: ''; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.two-col { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 1100px) { .two-col { grid-template-columns: 1fr; } }

/* Chart */
.chart { padding: 8px 16px 14px; }
.chart svg { width: 100%; height: 220px; display: block; }
.chart .bar { transition: opacity .15s; cursor: default; }
.chart .bar:hover { opacity: .8; }
.chart-tip { font-size: 13px; color: var(--muted); min-height: 20px; padding: 0 4px; }

/* Chips */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.bad { background: var(--bad-bg); color: var(--bad); }
.chip.info { background: var(--info-bg); color: var(--info); }
.chip.mute { background: var(--soft); color: var(--muted); }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 10px 16px; background: #FBFCFE; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: #FAFBFF; }
tr.clickable { cursor: pointer; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--text); font-size: 16px; margin-bottom: 4px; }
/* Phones: tables become stacked cards */
@media (max-width: 700px) {
  table.stack thead { display: none; }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
  table.stack td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  table.stack td::before { content: attr(data-l); color: var(--muted); font-size: 12.5px; font-weight: 600; text-align: left; }
  table.stack td.num { text-align: right; }
}

/* Toolbar */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.toolbar .input { min-height: 40px; max-width: 280px; font-size: 14.5px; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filters button { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: 13px; color: var(--text-2); cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--text); color: #fff; border-color: var(--text); }

/* Banners */
.banner { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; margin-bottom: 16px; border: 1px solid; }
.banner.warn { background: var(--warn-bg); border-color: #FDE68A; color: #78350F; }
.banner.bad { background: var(--bad-bg); border-color: #FECACA; color: #7F1D1D; }
.banner.info { background: var(--info-bg); border-color: #BAE6FD; color: #0C4A6E; }
.banner b { display: block; margin-bottom: 2px; }
.banner p { margin: 0; font-size: 14px; }

/* Link creator */
.link-result { padding: 18px; border-radius: 14px; background: var(--grad-soft); border: 1px solid rgba(4, 120, 87, .18); display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: center; margin-top: 16px; }
.link-result img { width: 120px; height: 120px; background: #fff; border-radius: 12px; padding: 6px; border: 1px solid var(--line); }
.link-url { display: flex; gap: 8px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 6px 6px 6px 12px; margin: 8px 0 10px; }
.link-url span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
.share-row { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 520px) { .link-result { grid-template-columns: 1fr; justify-items: center; text-align: center; } .link-url { width: 100%; } .share-row { justify-content: center; } }

/* Drawer (HQ business details) */
.drawer-bg { position: fixed; inset: 0; background: rgba(15, 23, 42, .35); z-index: 50; opacity: 0; pointer-events: none; transition: opacity .2s; }
.drawer-bg.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--bg); z-index: 51; transform: translateX(100%); transition: transform .28s cubic-bezier(.22, 1, .36, 1); overflow-y: auto; box-shadow: -20px 0 40px -20px rgba(15, 23, 42, .3); }
.drawer.open { transform: none; }
.drawer-head { position: sticky; top: 0; background: rgba(248, 250, 252, .92); backdrop-filter: blur(10px); padding: 18px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; z-index: 1; }
.drawer-body { padding: 18px 20px 40px; display: grid; gap: 14px; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 12px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; word-break: break-word; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--text); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 900px) { .toast { bottom: 90px; } }

/* Code */
pre.code { background: #0F172A; color: #E2E8F0; border-radius: 12px; padding: 16px; overflow-x: auto; font-size: 13px; line-height: 1.6; margin: 0; }
.secret { display: flex; gap: 8px; align-items: center; }
.secret code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; background: var(--soft); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 13px; }

/* Motion: enter animations (respect reduced motion) */
.rise { animation: rise .5s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.skeleton { background: linear-gradient(90deg, var(--soft), #fff, var(--soft)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 8px; color: transparent !important; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .rise, .skeleton { animation: none; } .drawer, .toast { transition: none; } }

/* Public payment link page */
.pay-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.pay-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 30px 60px -30px rgba(15, 23, 42, .35); overflow: hidden; }
.pay-top { padding: 24px; background: var(--grad); color: #fff; position: relative; overflow: hidden; }
.pay-top::after { content: ''; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.pay-biz { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.pay-avatar { width: 46px; height: 46px; border-radius: 14px; background: rgba(255, 255, 255, .2); display: grid; place-items: center; font-weight: 800; font-size: 20px; }
.pay-amount { font-size: 40px; font-weight: 800; letter-spacing: -.03em; margin-top: 18px; position: relative; z-index: 1; }
.pay-body { padding: 22px 24px 24px; }
.pay-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14.5px; }
.pay-row:last-of-type { border-bottom: 0; }
.pay-apps { display: flex; justify-content: center; gap: 10px; margin: 16px 0 4px; color: var(--muted); font-size: 12.5px; align-items: center; flex-wrap: wrap; }
.pay-foot { text-align: center; color: var(--muted); font-size: 12.5px; padding: 14px; border-top: 1px solid var(--line); background: #FBFCFE; display: flex; align-items: center; justify-content: center; gap: 6px; }
.state-icon { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; margin: 6px auto 12px; }
.state-icon.ok { background: var(--ok-bg); color: var(--ok); }
.state-icon.bad { background: var(--bad-bg); color: var(--bad); }
.state-icon.mute { background: var(--soft); color: var(--muted); }

/* ===== v2: pro dashboard details ===== */
.page-head h1 { font-size: 26px; font-weight: 750; }
.head-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.range { display: inline-grid; grid-auto-flow: column; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.range button { min-height: 34px; min-width: 46px; padding: 0 10px; border: 0; border-radius: 9px; background: transparent; font-weight: 650; font-size: 13px; color: var(--muted); cursor: pointer; }
.range button[aria-pressed="true"] { background: var(--text); color: #fff; }
.live { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: 13px; font-weight: 650; color: var(--text-2); }
.live i { width: 8px; height: 8px; border-radius: 50%; background: #10B981; box-shadow: 0 0 0 0 rgba(16, 185, 129, .5); animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, .45); } 70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); } 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); } }
.kpi { display: flex; flex-direction: column; min-height: 132px; }
.kpi .row { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: auto; }
.delta { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.delta.up { color: #047857; background: #ECFDF5; }
.delta.down { color: #B91C1C; background: #FEF2F2; }
.delta.flat { color: var(--muted); background: var(--soft); }
.kpi.hero .delta { background: rgba(255, 255, 255, .18); color: #fff; }
.spark { width: 96px; height: 34px; flex-shrink: 0; }
.kpi .vs { font-size: 12px; color: var(--muted); margin-top: 4px; }
.kpi.hero .vs { color: rgba(255, 255, 255, .8); }
.area { position: relative; padding: 6px 16px 10px 8px; }
.area svg { width: 100%; height: 260px; display: block; overflow: visible; }
.area .tip { position: absolute; pointer-events: none; background: var(--text); color: #fff; font-size: 12.5px; padding: 8px 10px; border-radius: 10px; white-space: nowrap; transform: translate(-50%, -110%); opacity: 0; transition: opacity .12s; box-shadow: 0 8px 20px -8px rgba(15, 23, 42, .5); }
.area .tip b { display: block; font-size: 14px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.mixbar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--soft); margin: 14px 0 16px; }
.mixbar span { height: 100%; transition: width .6s cubic-bezier(.22, 1, .36, 1); }
.stat-list { display: grid; gap: 12px; }
.stat-list div { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.stat-list b { font-variant-numeric: tabular-nums; }
.av { width: 32px; height: 32px; border-radius: 10px; display: inline-grid; place-items: center; font-size: 12.5px; font-weight: 750; color: #065F46; background: #ECFDF5; flex-shrink: 0; }
.who-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who-cell div { min-width: 0; }
.who-cell .muted { font-size: 12.5px; }
.three-col { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 1100px) { .three-col { grid-template-columns: 1fr; } }
.share { height: 6px; border-radius: 99px; background: var(--soft); overflow: hidden; margin-top: 6px; min-width: 70px; }
.share i { display: block; height: 100%; background: var(--grad); border-radius: 99px; }
.demo-pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; background: #FFFBEB; color: #92400E; border: 1px solid #FDE68A; font-size: 12px; font-weight: 700; }
@media (max-width: 700px) { .head-actions { width: 100%; } .head-actions .btn-primary { flex: 1; } .area svg { height: 200px; } .kpi { min-height: 118px; } .spark { width: 70px; } }
@media (prefers-reduced-motion: reduce) { .live i { animation: none; } }

/* Phone: compact payment list instead of stacked table rows */
.plist { display: none; list-style: none; margin: 0; padding: 0; }
.plist li { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.plist li:last-child { border-bottom: 0; }
.pl-main { flex: 1; min-width: 0; display: grid; }
.pl-main b, .pl-main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-main .muted { font-size: 12.5px; }
.pl-side { display: grid; justify-items: end; gap: 4px; }
@media (max-width: 700px) {
  .plist { display: block; }
  .desk-only { display: none; }
  .kpi .spark { display: none; }
  .kpi .value { font-size: 24px; }
  .kpi .row { margin-top: 8px; }
  .page-head p { font-size: 14px; }
}

/* ===== v3: same Mint Gen Z look as the website (navy outlines, hard shadows, lemon pops, Bricolage headings) ===== */
:root {
  --ink: #0B1F33; --lemon: #FDE047; --mint: #10B981; --mint-deep: #047857;
  --display: 'Bricolage Grotesque Variable', 'Bricolage Grotesque', 'Inter Variable', sans-serif;
  --line: #CFE8DB; --shadow: 4px 4px 0 var(--ink);
}
body { background-color: #F6FFFA; background-image: linear-gradient(rgba(11,31,51,.045) 1.5px, transparent 1.5px), linear-gradient(90deg, rgba(11,31,51,.045) 1.5px, transparent 1.5px); background-size: 40px 40px; }
h1, h2, .kpi .value, .brand, .page-head h1, .pay-amount, .inv-title, .poster-name { font-family: var(--display); letter-spacing: -.03em; }
.brand-mark { background: var(--mint); border: 2.5px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.brand-mark svg { stroke: var(--ink); }
.brand b { background: linear-gradient(100deg, #047857, #10B981 55%, #0D9488); -webkit-background-clip: text; background-clip: text; color: transparent; }
.card { border: 2px solid var(--ink); box-shadow: var(--shadow); border-radius: 18px; }
.card-head { border-bottom: 2px solid var(--ink); }
th { background: #EFFBF5; border-bottom: 2px solid var(--ink); color: #2F4B40; }
td { border-bottom: 1.5px solid #DCEFE5; }
.kpi.hero { background: var(--mint); color: var(--ink); border: 2px solid var(--ink); }
.kpi.hero .label, .kpi.hero .meta, .kpi.hero .vs { color: rgba(11,31,51,.78); }
.kpi.hero::after { background: rgba(253,224,71,.45); top: auto; bottom: -70px; right: -50px; }
.kpi.hero > * { position: relative; z-index: 1; }
.kpi.hero .delta { background: var(--ink); color: var(--lemon); }
.btn { border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); border-radius: 12px; font-weight: 700; transition: transform .12s, box-shadow .12s; }
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); background: #fff; border-color: var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.btn-primary, .btn-primary:hover { background: var(--mint); color: var(--ink); }
.btn-ghost, .btn-ghost:hover { border-color: transparent; box-shadow: none; background: transparent; transform: none; }
.btn-ghost:hover { background: #E6FBF1; }
.btn-danger { color: #B91C1C; }
.input { border: 2px solid var(--ink); border-radius: 12px; }
.input:focus { border-color: var(--mint-deep); box-shadow: 0 0 0 4px rgba(16,185,129,.25); }
.seg { background: #E6FBF1; border: 2px solid var(--ink); }
.seg input:checked + label { background: var(--lemon); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.range { border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.range button[aria-pressed="true"] { background: var(--ink); color: var(--lemon); }
.live { border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.chip { border: 1.5px solid currentColor; }
.nav a[aria-current="page"] { background: var(--lemon); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink), 2px 2px 0 var(--ink); }
.nav a:hover { background: #E6FBF1; }
.nav-group { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #5B7A6C; padding: 14px 12px 4px; }
.side { border-right: 2px solid var(--ink); background: #FFFFFFD9; overflow-y: auto; }
.nav { gap: 2px; }
.nav a { min-height: 38px; font-size: 14px; }
.side-foot { border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.av { background: var(--lemon); color: var(--ink); border: 1.5px solid var(--ink); }
.banner { border-width: 2px; box-shadow: 3px 3px 0 var(--ink); }
.banner.warn { background: #FEFCE8; border-color: var(--ink); color: var(--ink); }
.toast { background: var(--ink); color: var(--lemon); border: 2px solid var(--lemon); }
.filters button { border: 2px solid var(--ink); font-weight: 700; }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--lemon); }
.kicker { display: inline-block; transform: rotate(-2deg); background: var(--lemon); border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); border-radius: 8px; padding: 2px 8px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.drawer { border-left: 2px solid var(--ink); }
.drawer-head { border-bottom: 2px solid var(--ink); }
pre.code { border: 2px solid var(--ink); }
.secret code { border: 2px solid var(--ink); }
.mixbar { border: 2px solid var(--ink); height: 14px; }
.link-result { border: 2px solid var(--ink); background: #FEFCE8; box-shadow: 3px 3px 0 var(--ink); }

/* App bar + search */
@media (min-width: 901px) { .layout { grid-template-columns: 252px 1fr; } }
.main-wrap { min-width: 0; display: flex; flex-direction: column; }
.appbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; padding: 12px clamp(16px, 3vw, 40px); background: rgba(246,255,250,.9); backdrop-filter: blur(10px); border-bottom: 2px solid var(--ink); }
.search { position: relative; flex: 1; max-width: 560px; }
.search .input { padding-left: 40px; min-height: 42px; font-size: 14.5px; }
.search-ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #5B7A6C; }
.search-results { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: #fff; border: 2px solid var(--ink); box-shadow: var(--shadow); border-radius: 14px; overflow: hidden; z-index: 40; }
.search-results a { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; text-decoration: none; color: var(--ink); border-bottom: 1.5px solid #DCEFE5; font-size: 14px; }
.search-results a:hover, .search-results a:focus { background: #FEFCE8; }
.mobile-only { display: none !important; }
.main { padding-top: 22px; }
@media (max-width: 900px) {
  .mobile-only { display: inline-flex !important; }
  .desk-only { display: none !important; }
  .appbar { padding: 10px 12px; }
  .tabbar { border-top: 2px solid var(--ink); }
  .tabbar a[aria-current="page"] { color: var(--mint-deep); }
}

/* Generic page bits */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.mini-stat { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.mini-stat .card { padding: 14px 16px; }
.mini-stat b { display: block; font-family: var(--display); font-size: 24px; letter-spacing: -.02em; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 160px; padding: 10px 6px 0; }
.bars div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.bars i { display: block; width: 100%; border-radius: 6px 6px 2px 2px; background: var(--mint); border: 1.5px solid var(--ink); min-height: 2px; transition: height .6s cubic-bezier(.22,1,.36,1); }
.bars i.hot { background: var(--lemon); }
.bars span { font-size: 10.5px; color: #5B7A6C; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.timeline li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; font-size: 14px; }
.timeline li i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink); background: var(--mint); margin-top: 3px; }
.timeline li.off i { background: #fff; }
.item-row { display: grid; grid-template-columns: 1fr 70px 110px 34px; gap: 8px; margin-bottom: 8px; }
@media (max-width: 560px) { .item-row { grid-template-columns: 1fr 56px 90px 34px; } }
.code-inline { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; background: #E6FBF1; border: 1.5px solid var(--ink); border-radius: 6px; padding: 1px 6px; }

/* Public: payment page, invoice, poster */
.pay-card { border: 2.5px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); }
.pay-top { background: var(--mint); color: var(--ink); border-bottom: 2.5px solid var(--ink); }
.pay-top::after { background: rgba(253,224,71,.6); }
.pay-avatar { background: var(--lemon); border: 2px solid var(--ink); color: var(--ink); }
.inv-wrap { padding: 32px 16px; display: grid; place-items: center; }
.inv { width: 100%; max-width: 820px; padding: 28px; }
.inv-head { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 18px; border-bottom: 2px solid var(--ink); }
.inv-title { font-size: 30px; font-weight: 800; }
.inv-parties { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 18px 0; }
@media (max-width: 640px) { .inv-parties { grid-template-columns: 1fr; } .inv { padding: 18px; } }
.inv-totals { margin: 16px 0 0 auto; max-width: 320px; display: grid; gap: 8px; }
.inv-totals div { display: flex; justify-content: space-between; }
.inv-total { border-top: 2px solid var(--ink); padding-top: 8px; font-size: 20px; }
.inv-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.poster-wrap { min-height: 100vh; display: grid; place-content: center; padding: 24px 16px; }
.poster { width: min(420px, 100%); background: #fff; border: 3px solid var(--ink); box-shadow: 10px 10px 0 var(--ink); border-radius: 28px; overflow: hidden; text-align: center; }
.poster-top { background: var(--mint); border-bottom: 3px solid var(--ink); padding: 24px 20px; }
.poster-name { font-size: 30px; font-weight: 800; line-height: 1.05; }
.poster-sub { margin-top: 6px; font-weight: 700; display: inline-block; background: var(--lemon); border: 2px solid var(--ink); border-radius: 999px; padding: 4px 12px; }
.poster-qr { padding: 24px 36px 8px; }
.poster-qr svg { width: 100%; height: auto; display: block; }
.poster-apps { font-weight: 700; color: #2F4B40; padding: 8px 16px 18px; }
.poster-foot { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px; border-top: 2px dashed var(--ink); font-size: 14px; }
.poster-foot .brand-mark { width: 26px; height: 26px; }
@media print { body { background: #fff !important; } .no-print, .appbar, .side, .tabbar { display: none !important; } .poster, .inv { box-shadow: none; } }

@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .search { max-width: none; }
  .appbar .brand-mark { width: 36px; height: 36px; }
  .main { padding: 16px 14px 100px; }
}

/* Confirm payments */
.confirm-list li { flex-wrap: wrap; }
.confirm-form { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.confirm-form .input { width: 150px; min-height: 40px; }
.steps-list { margin: 4px 0 14px; padding-left: 20px; display: grid; gap: 8px; }
.pair-qr { margin-top: 14px; display: grid; justify-items: start; gap: 8px; }
.pair-qr svg { width: 240px; height: 240px; border: 2px solid var(--ink); border-radius: 14px; background: #fff; padding: 8px; box-shadow: 4px 4px 0 var(--ink); }
@media (max-width: 600px) { .confirm-form { width: 100%; margin-left: 0; } .confirm-form .input { flex: 1; width: auto; } }

/* HQ: nav badge + support threads */
.nav a { position: relative; }
.nav-badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: #EF4444; color: #fff; font-size: 12px; display: inline-grid; place-items: center; border: 2px solid var(--ink); }
.thread { display: grid; gap: 10px; }
.msg { max-width: 88%; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 14px; background: #fff; white-space: pre-wrap; word-break: break-word; }
.msg.me { justify-self: end; background: #D1FAE5; }
.msg .who { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.ticket-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); cursor: pointer; text-align: left; background: none; border-left: 0; border-right: 0; border-top: 0; width: 100%; font: inherit; color: inherit; }
.ticket-row:hover { background: #F6FFFA; }
.ticket-row .last { grid-column: 1 / -1; color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 900px) { .tabbar a span { font-size: 10.5px; } }

/* ===== Desi theme kept — only the dark divider lines inside the layout are softened ===== */
.side { border-right: 1.5px solid #CFE8DB; }
.appbar { border-bottom: 1.5px solid #CFE8DB; }
.card-head { border-bottom: 1.5px solid #DCEFE5; }
th { border-bottom: 1.5px solid #CFE8DB; }
.drawer { border-left: 1.5px solid #CFE8DB; }
.drawer-head { border-bottom: 1.5px solid #DCEFE5; }
.inv-head { border-bottom: 1.5px solid #CFE8DB; }
.inv-total { border-top: 1.5px solid #CFE8DB; }
@media (max-width: 900px) { .tabbar { border-top: 1.5px solid #CFE8DB; } }
