/* ============================================================
   GROWZY DESIGN SYSTEM — premium fintech UI
   Dark (default) + light themes via [data-theme]
   ============================================================ */
:root, [data-theme="dark"] {
  --bg: #0b0d12; --bg-elev: #12141b; --surface: #14171f; --surface-2: #191d27;
  --border: #23262f; --border-soft: #1d202a;
  --text: #e7e9ee; --text-muted: #8b90a0; --text-faint: #6b7280;
  --primary: #6366f1; --primary-strong: #4f46e5; --primary-text: #c7d2fe;
  --green: #34d399; --red: #f87171; --amber: #fbbf24; --blue: #60a5fa; --violet: #a78bfa;
  --focus-ring: rgba(99,102,241,.45);
  --shadow: 0 8px 28px rgba(0,0,0,.35);
  --radius: 12px; --radius-sm: 8px;
}
[data-theme="light"] {
  --bg: #f4f5f8; --bg-elev: #ffffff; --surface: #ffffff; --surface-2: #f0f1f6;
  --border: #e2e4ea; --border-soft: #e9ebf0;
  --text: #191c23; --text-muted: #5b6070; --text-faint: #8b90a0;
  --primary: #4f46e5; --primary-strong: #4338ca; --primary-text: #4f46e5;
  --focus-ring: rgba(79,70,229,.3);
  --shadow: 0 8px 24px rgba(25,28,35,.08);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.6 -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
a.link { color: var(--primary); font-weight: 500; }
code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .92em; background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 5px; padding: 1px 5px; word-break: break-all; }
h1,h2,h3,h4 { margin: 0 0 .4em; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1.02rem; } h4 { font-size: .9rem; }
p { margin: .35em 0; }
.muted { color: var(--text-muted); }
.small { font-size: .82rem; }
.center { text-align: center; }
.mt { margin-top: 16px; }
.wrap { word-break: break-word; }
.text-green { color: var(--green); } .text-red { color: var(--red); }
.icon { vertical-align: -3px; flex-shrink: 0; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--primary); color: #fff; padding: 8px 14px; border-radius: 0 0 8px 0; z-index: 200; }
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 9px 16px; font-size: .9rem; font-weight: 600; cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .05s ease;
  text-decoration: none !important; font-family: inherit; color: var(--text);
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary-strong); color: #fff; }
.btn-primary:hover { background: var(--primary); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: #b91c1c; color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-danger-ghost { background: transparent; border-color: var(--border); color: var(--red); }
.btn-danger-ghost:hover { border-color: var(--red); }
.btn-lg { padding: 12px 24px; font-size: 1rem; }
.btn-sm { padding: 6px 12px; font-size: .82rem; }
.btn-xs { padding: 3px 9px; font-size: .78rem; }
.btn-block { width: 100%; }
.icon-btn { background: transparent; border: 1px solid transparent; color: var(--text-muted); border-radius: var(--radius-sm); padding: 7px; cursor: pointer; position: relative; display: inline-flex; }
.icon-btn:hover { color: var(--text); background: var(--surface-2); }

/* ---- Cards ---- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.card-inset { background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: 10px 14px; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 10px; flex-wrap: wrap; }
.table-card { padding: 0; overflow-x: auto; }
.form-card { max-width: 520px; }
.secret-card { border-color: var(--primary); }

/* ---- Layout: app shell ---- */
.app-body { display: flex; min-height: 100vh; }
.sidebar {
  width: 232px; flex-shrink: 0; background: var(--bg-elev); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar nav { flex: 1; padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a, .nav-btn {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--text-muted); font-weight: 500; font-size: .9rem; text-decoration: none !important;
  background: none; border: none; cursor: pointer; width: 100%; font-family: inherit; text-align: left;
}
.sidebar nav a:hover, .nav-btn:hover { background: var(--surface-2); color: var(--text); }
.sidebar nav a.active { background: var(--surface-2); color: var(--primary-text); }
.sidebar nav a.active .icon { color: var(--primary); }
.sidebar-footer { border-top: 1px solid var(--border); padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.pill { background: var(--primary); color: #fff; border-radius: 99px; font-size: .7rem; padding: 1px 7px; margin-left: 6px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.02rem; color: var(--text); text-decoration: none !important; padding: 18px 16px 10px; }
.brand .icon { color: var(--primary); }
.admin-identity { display: flex; gap: 10px; align-items: center; padding: 10px 12px; font-size: .85rem; }
.admin-identity .icon { color: var(--primary); }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-topbar {
  display: flex; align-items: center; gap: 12px; padding: 10px 22px;
  border-bottom: 1px solid var(--border); background: var(--bg-elev); position: sticky; top: 0; z-index: 40;
}
.topbar-spacer { flex: 1; }
.topbar-balance { font-weight: 700; font-size: .95rem; }
.topbar-balance .muted { font-weight: 400; font-size: .78rem; margin-left: 4px; }
.dot { position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.app-content { padding: 24px; flex: 1; max-width: 1200px; width: 100%; }

/* ---- Page header / stats ---- */
.page-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; gap: 14px; align-items: center; }
.stat-icon { width: 42px; height: 42px; border-radius: 10px; background: var(--surface-2); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.stat-label { color: var(--text-muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
.stat-value { font-size: 1.25rem; font-weight: 700; }
.stat-sub { font-size: .78rem; }
.greeting { margin-bottom: 14px; }
.balance-hero { text-align: center; padding: 30px 20px; margin-bottom: 20px; }
.balance-label { color: var(--text-muted); text-transform: uppercase; font-size: .75rem; letter-spacing: .08em; }
.balance-amount { font-size: 2.4rem; font-weight: 800; letter-spacing: -.02em; margin: 6px 0; }
.balance-actions { display: flex; gap: 12px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }

/* ---- Tables ---- */
.table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.table th { text-align: left; padding: 12px 16px; color: var(--text-muted); font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--border); }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: none; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---- Badges / alerts ---- */
.badge { display: inline-block; border-radius: 99px; font-size: .72rem; font-weight: 700; padding: 3px 10px; letter-spacing: .02em; }
.b-green { background: rgba(52,211,153,.14); color: var(--green); }
.b-red { background: rgba(248,113,113,.14); color: var(--red); }
.b-amber { background: rgba(251,191,36,.14); color: var(--amber); }
.b-blue { background: rgba(96,165,250,.14); color: var(--blue); }
.b-gray { background: var(--surface-2); color: var(--text-muted); }
.b-violet { background: rgba(167,139,250,.16); color: var(--violet); }
.scope-chip { display: inline-block; background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 5px; font-size: .72rem; padding: 1px 6px; margin: 1px 3px 1px 0; }
.alert { border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 16px; border: 1px solid var(--border); background: var(--surface); }
.alert-success { border-color: rgba(52,211,153,.4); background: rgba(52,211,153,.08); color: var(--green); }
.alert-error { border-color: rgba(248,113,113,.4); background: rgba(248,113,113,.08); color: var(--red); }
.alert-info { border-color: rgba(96,165,250,.4); background: rgba(96,165,250,.08); color: var(--blue); }

/* ---- Forms ---- */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: .82rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.form-input {
  width: 100%; background: var(--bg-elev); color: var(--text); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px; font-size: .92rem; font-family: inherit;
  transition: border-color .15s ease;
}
.form-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--focus-ring); }
.form-error { color: var(--red); font-size: .8rem; margin: 5px 0 0; }
.form-check { display: flex; align-items: center; gap: 9px; margin: 7px 0; font-size: .88rem; }
.form-check input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); }
fieldset { border: none; padding: 0; margin: 0 0 16px; }
legend.form-label { margin-bottom: 8px; }
.filter-card { margin-bottom: 16px; padding: 14px; }
.filter-form { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.filter-form .form-group { margin-bottom: 0; min-width: 170px; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.inline-form .form-input { max-width: 240px; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.admin-actions { display: flex; flex-direction: column; gap: 12px; }

/* ---- Detail lists / steps ---- */
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.detail-list { display: grid; grid-template-columns: 150px 1fr; gap: 10px 18px; margin: 0; }
.detail-list dt { color: var(--text-muted); font-size: .85rem; }
.detail-list dd { margin: 0; word-break: break-word; }
.steps { padding-left: 20px; margin: 10px 0; }
.steps li { margin: 6px 0; }
.dev-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.balance-mini { margin-bottom: 14px; font-size: .9rem; }
.fee-preview { margin-bottom: 16px; }
.cred-list { margin: 6px 0; padding-left: 18px; }
.masked { letter-spacing: 2px; color: var(--text-muted); }

/* ---- Empty states / pagination / notifications ---- */
.empty-state { text-align: center; padding: 54px 20px; background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); }
.empty-icon { color: var(--text-faint); margin-bottom: 12px; }
.empty-inline { padding: 30px; text-align: center; }
.pagination { display: flex; gap: 6px; margin: 16px 0; flex-wrap: wrap; }
.pagination a { padding: 6px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-muted); font-size: .85rem; }
.pagination a.current { background: var(--primary-strong); border-color: var(--primary-strong); color: #fff; }
.notif-list { display: flex; flex-direction: column; gap: 8px; }
.notif-item { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 13px 16px; color: var(--text); text-decoration: none !important; }
.notif-item:hover { border-color: var(--primary); }
.notif-item .notif-dot { width: 8px; height: 8px; border-radius: 50%; background: transparent; margin-top: 8px; flex-shrink: 0; }
.notif-item.unread .notif-dot { background: var(--primary); }
.notif-item span:nth-child(2) { flex: 1; min-width: 0; }
.notif-time { font-size: .78rem; white-space: nowrap; }

/* ---- Tickets ---- */
.ticket-thread { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.ticket-msg { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 16px; }
.ticket-msg.user { border-left: 3px solid var(--primary); }
.ticket-msg.admin { border-left: 3px solid var(--green); }
.ticket-meta { font-size: .8rem; margin-bottom: 5px; }
.ticket-body { white-space: pre-wrap; }

/* ---- Modal / toast ---- */
.modal { position: fixed; inset: 0; background: rgba(5,7,10,.66); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modal[hidden] { display: none; }
.modal-box { max-width: 480px; width: 100%; max-height: 88vh; overflow-y: auto; box-shadow: var(--shadow); }
.toast-region { position: fixed; bottom: 18px; right: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 120; }
.toast { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--primary); border-radius: var(--radius-sm); padding: 12px 16px; min-width: 240px; max-width: 360px; box-shadow: var(--shadow); font-size: .88rem; animation: slide-in .18s ease; }
.toast.toast-success { border-left-color: var(--green); }
.toast.toast-error { border-left-color: var(--red); }

/* ---- Charts ---- */
.chart { width: 100%; min-height: 220px; }
.chart svg { width: 100%; height: 220px; }
.chart .bar { fill: var(--primary); opacity: .85; rx: 3; }
.chart .bar:hover { opacity: 1; }
.chart .axis { stroke: var(--border); }
.chart .lbl { fill: var(--text-muted); font-size: 10px; }

/* ---- Auth pages ---- */
.auth-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; background: radial-gradient(ellipse at 50% -20%, rgba(99,102,241,.12), transparent 60%), var(--bg); }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { margin-top: 8px; }
.auth-links { text-align: center; margin-top: 14px; }
.auth-foot { margin-top: 18px; font-size: .78rem; text-align: center; }

/* ---- Checkout ---- */
.checkout-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 16px; }
.checkout-card {
  width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 30px 26px; box-shadow: var(--shadow); text-align: center;
}
.checkout-brand { display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 800; margin-bottom: 18px; }
.checkout-brand .icon { color: var(--primary); }
.checkout-amount { font-size: 2.5rem; font-weight: 800; letter-spacing: -.02em; margin: 6px 0 2px; }
.checkout-ref { margin-bottom: 18px; }
.checkout-qr { display: flex; justify-content: center; margin: 8px 0 4px; }
.checkout-qr img { border-radius: 12px; background: #fff; padding: 10px; border: 1px solid var(--border); }
.checkout-qr.fallback { border: 1px dashed var(--border); border-radius: 12px; padding: 20px; margin: 10px 0; }
.upi-vpa { font-size: 1.05rem; }
.checkout-countdown { display: inline-flex; align-items: center; gap: 7px; color: var(--amber); font-weight: 700; margin: 14px 0; }
.cd-time { font-variant-numeric: tabular-nums; }
.checkout-utr { margin-top: 18px; text-align: left; border-top: 1px solid var(--border-soft); padding-top: 16px; }
.utr-title { font-weight: 700; margin-bottom: 8px; }
.checkout-utr form { display: flex; flex-direction: column; gap: 10px; }
.checkout-state { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 16px; border-radius: var(--radius-sm); margin: 12px 0; font-weight: 600; }
.checkout-state.ok { background: rgba(52,211,153,.1); color: var(--green); }
.checkout-state.wait { background: rgba(96,165,250,.1); color: var(--blue); }
.checkout-state.bad { background: rgba(248,113,113,.1); color: var(--red); }
.checkout-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--border-soft); color: var(--text-faint); font-size: .78rem; }
.checkout-foot span { display: inline-flex; gap: 6px; align-items: center; }

/* ---- Payment link public page ---- */
.paylink { display: flex; justify-content: center; padding: 40px 16px; }
.paylink-card { max-width: 440px; width: 100%; text-align: center; }
.paylink-form { margin-top: 18px; text-align: left; }

/* ---- Public site ---- */
.public-nav { display: flex; justify-content: space-between; align-items: center; padding: 14px 24px; border-bottom: 1px solid var(--border); background: var(--bg-elev); position: sticky; top: 0; z-index: 50; }
.public-links { display: flex; align-items: center; gap: 20px; font-weight: 500; }
.public-links a { color: var(--text-muted); text-decoration: none; }
.public-links a:hover { color: var(--text); }
.hero { text-align: center; padding: 90px 20px 60px; max-width: 860px; margin: 0 auto; }
.hero h1 { font-size: clamp(1.8rem, 5vw, 3rem); letter-spacing: -.03em; }
.hero .accent { color: var(--primary); }
.hero-sub { color: var(--text-muted); font-size: 1.05rem; max-width: 640px; margin: 14px auto 0; }
.hero-cta { display: flex; gap: 14px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.section { padding: 56px 24px; max-width: 1120px; margin: 0 auto; }
.section.narrow { max-width: 820px; }
.section-title { text-align: center; font-size: 1.4rem; margin-bottom: 30px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.feature-card { text-align: left; }
.feature-icon { width: 44px; height: 44px; border-radius: 10px; background: var(--surface-2); color: var(--primary); display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.pricing-card { text-align: center; }
.price { font-size: 1.5rem; font-weight: 800; margin: 10px 0; }
.ticks { list-style: none; padding: 0; margin: 12px 0; }
.ticks li { padding: 6px 0; border-bottom: 1px solid var(--border-soft); }
.ticks li:before { content: "✓"; color: var(--green); font-weight: 700; margin-right: 8px; }
.cta { text-align: center; }
.cta .btn { margin-top: 10px; }
.public-footer { border-top: 1px solid var(--border); background: var(--bg-elev); padding: 40px 24px 30px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; max-width: 1120px; margin: 0 auto 24px; }
.footer-grid h4 { margin-bottom: 10px; font-size: .85rem; }
.footer-grid a { display: block; color: var(--text-muted); padding: 3px 0; font-size: .88rem; text-decoration: none; }
.footer-grid a:hover { color: var(--text); }
.footer-note { text-align: center; font-size: .8rem; max-width: 760px; margin: 0 auto; }

/* ---- Flow diagram (landing) ---- */
.flow { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.flow-node { display: flex; flex-direction: column; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 13px; min-width: 96px; font-size: .78rem; font-weight: 600; color: var(--text-muted); }
.flow-node .icon { color: var(--primary); }
.flow-arrow { width: 26px; height: 2px; background: var(--border); position: relative; margin-top: -28px; }
.flow-arrow:after { content: ""; position: absolute; right: -1px; top: -3px; border: 4px solid transparent; border-left-color: var(--border); }

/* ---- Docs ---- */
.docs-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.docs-nav a { background: var(--surface); border: 1px solid var(--border); border-radius: 99px; padding: 5px 13px; font-size: .82rem; color: var(--text-muted); }
.docs-nav a:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.code-block { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; overflow-x: auto; font-size: .82rem; line-height: 1.6; margin: 12px 0; }
.code-block code { background: none; border: none; padding: 0; }
.code-tabs .tab-btns { display: flex; gap: 4px; flex-wrap: wrap; }
.tab-btn { background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted); border-radius: var(--radius-sm) var(--radius-sm) 0 0; padding: 6px 14px; font-size: .8rem; cursor: pointer; font-family: inherit; }
.tab-btn.active { color: var(--primary); border-color: var(--border); background: var(--bg-elev); border-bottom-color: transparent; }
.code-block.active { display: block; }
.code-block:not(.active) { display: none; }

/* ---- Error pages ---- */
.error-page { max-width: 480px; text-align: center; margin: 60px auto; padding: 40px; }
.error-code { font-size: 3.6rem; font-weight: 800; color: var(--primary); letter-spacing: -.04em; }
.maintenance-icon { color: var(--primary); margin-bottom: 10px; }

/* ---- Bottom nav (mobile) ---- */
.bottom-nav { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: var(--bg-elev); border-top: 1px solid var(--border); z-index: 60; padding: 6px 0 max(6px, env(safe-area-inset-bottom)); justify-content: space-around; }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .62rem; color: var(--text-muted); text-decoration: none !important; padding: 4px 10px; }
.bottom-nav a:hover { color: var(--text); }

/* ---- Theme toggle ---- */
.theme-toggle { background: none; border: none; color: var(--text-muted); cursor: pointer; display: inline-flex; align-items: center; }
.theme-toggle:hover { color: var(--text); }

/* ---- Animations ---- */
@keyframes slide-in { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation-duration: .001s !important; transition-duration: .001s !important; }
}

/* ---- Responsive ---- */
.mobile-only { display: none; }
@media (max-width: 960px) {
  .sidebar { position: fixed; left: -240px; transition: left .2s ease; z-index: 90; height: 100dvh; }
  .sidebar.open { left: 0; box-shadow: var(--shadow); }
  .mobile-only { display: inline-flex; }
  .app-content { padding: 16px 14px 90px; }
  .bottom-nav { display: flex; }
  .public-links a:not(.btn) { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .detail-list { grid-template-columns: 1fr; gap: 2px 0; }
  .detail-list dt { margin-top: 10px; }
  .detail-list dd { margin-bottom: 2px; }
  /* tables collapse into cards */
  .table-card { border: 1px solid var(--border); border-radius: var(--radius); }
  .table thead { display: none; }
  .table tr { display: block; border-bottom: 1px solid var(--border); padding: 8px 0; }
  .table td { display: flex; justify-content: space-between; gap: 12px; border: none; padding: 5px 14px; }
  .table td:before { content: attr(data-label); color: var(--text-muted); font-size: .75rem; font-weight: 600; }
  .flow-arrow { margin-top: 0; width: 2px; height: 20px; }
  .hero { padding: 56px 16px 30px; }
}
@media (max-width: 480px) {
  .app-content { padding: 12px 10px 90px; }
  .page-header { align-items: flex-start; flex-direction: column; }
  .checkout-amount { font-size: 2rem; }
  .balance-amount { font-size: 1.8rem; }
  .footer-grid { grid-template-columns: 1fr; }
}
