/* AeroPay (formerly IndPay) — AeroGyan family look (docs: AeroGyan design-family-2026): calm neutral layers, hairlines, soft shadows,
   AeroPay's deep teal for actions and marigold for the one hero action (Scan & pay). Light and dark are both designed.
   Trust first: amounts, payees and UPI IDs are large; scam warnings are red, in plain words, and outrank everything.
   Charts: one teal ramp for magnitude (checked for contrast in both themes), status colours only with icon + words. */

:root {
  color-scheme: light;
  --ag-font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Devanagari", "Kohinoor Devanagari", "Noto Sans", sans-serif;
  --ag-font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ag-radius-sm: 8px; --ag-radius: 12px; --ag-radius-lg: 16px; --ag-radius-xl: 24px;
  --ag-ease: cubic-bezier(.2,.8,.2,1);
  --ag-accent: #e8a33d; --ag-accent-2: #0f5e55; --ag-accent-contrast: #2a1a00;
  --ag-bg: #f7f8fb; --ag-surface: #ffffff; --ag-raised: #ffffff; --ag-sunken: #f0f2f6;
  --ag-line: rgba(15,23,42,.08); --ag-line-2: rgba(15,23,42,.14);
  --ag-text: #0f172a; --ag-text-2: #334155; --ag-muted: #5b6478;
  --ag-ok: #16a34a; --ag-warn: #d97706; --ag-err: #dc2626; --ag-info: #2563eb;
  --ag-shadow-1: 0 1px 2px rgba(15,23,42,.06), 0 1px 1px rgba(15,23,42,.04);
  --ag-shadow-2: 0 8px 24px -6px rgba(15,23,42,.18), 0 2px 6px rgba(15,23,42,.06);
  --ag-topbar: rgba(247,248,251,.82);
  /* AeroPay roles */
  --brand: #0f5e55; --brand-ink: #ffffff; --brand-soft: #e2f1ee; --brand-text: #0f5e55;
  --accent: #e8a33d; --accent-ink: #2a1a00;
  --focus: #0f5e55;
  --good: #15803d; --good-bg: #ecfdf3; --warn: #a14a04; --warn-bg: #fff6e5; --danger: #b91c1c; --danger-bg: #fef2f2; --danger-line: #fca5a5;
  --alarm: #b91c1c; --alarm-ink: #ffffff; --info: #1d4ed8; --info-bg: #eff4ff;
  --hero-1: #0f5e55; --hero-2: #0a4640; --hero-ink: #ffffff; --hero-dim: rgba(255,255,255,.78);
  /* charts: one teal ramp for magnitude */
  --bar: #8fd3c6; --bar-strong: #0f7a6d; --grid: rgba(15,23,42,.08); --track: #eef1f5;
  --h1: #cdeee7; --h2: #8fd3c6; --h3: #6cc4b6; --h4: #1f8476; --h5: #0f5e55; --dnum: #334155; --dnum-inv: #ffffff;
  --st-good: #16a34a; --st-warn: #f2b01e; --st-serious: #ea7a45; --st-crit: #dc2626;
  /* legacy names used across the app */
  --bg: var(--ag-bg); --surface: var(--ag-surface); --surface-2: var(--ag-sunken); --line: var(--ag-line);
  --ink: var(--ag-text); --ink-2: var(--ag-text-2); --ink-3: var(--ag-muted);
  --radius: var(--ag-radius-lg); --shadow: var(--ag-shadow-1);
  --font: var(--ag-font);
  --bar-h: 64px; --top-h: 60px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ag-accent: #f0b65a; --ag-accent-contrast: #2a1a00;
    --ag-bg: #0b0f17; --ag-surface: #121826; --ag-raised: #182033; --ag-sunken: #0f1420;
    --ag-line: rgba(255,255,255,.08); --ag-line-2: rgba(255,255,255,.14);
    --ag-text: #e8ecf4; --ag-text-2: #c3cad8; --ag-muted: #98a2b8;
    --ag-ok: #22c55e; --ag-warn: #f59e0b; --ag-err: #ef4444; --ag-info: #60a5fa;
    --ag-shadow-1: 0 1px 2px rgba(0,0,0,.4); --ag-shadow-2: 0 12px 32px -8px rgba(0,0,0,.6), 0 2px 6px rgba(0,0,0,.35);
    --ag-topbar: rgba(11,15,23,.8);
    --brand: #5cc4b6; --brand-ink: #04201c; --brand-soft: rgba(92,196,182,.14); --brand-text: #7fd6ca;
    --accent: #f0b65a; --accent-ink: #2a1a00; --focus: #f0b65a;
    --good: #4ade80; --good-bg: rgba(34,197,94,.13); --warn: #fbbf24; --warn-bg: rgba(245,158,11,.14); --danger: #fca5a5; --danger-bg: rgba(239,68,68,.15); --danger-line: rgba(248,113,113,.5);
    --alarm: #c81e1e; --alarm-ink: #ffffff; --info: #93c5fd; --info-bg: rgba(59,130,246,.15);
    --hero-1: #0f5249; --hero-2: #0a2e2b;
    --bar: #1f5f57; --bar-strong: #4fc1b2; --grid: rgba(255,255,255,.08); --track: #1c2436;
    --h1: #163b38; --h2: #1d5d55; --h3: #22705f; --h4: #4fb3a5; --h5: #9fe0d4; --dnum: #e8ecf4; --dnum-inv: #0b0f17;
    --st-good: #22c55e; --st-warn: #f5b82e; --st-serious: #f08a5d; --st-crit: #ef4444;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ag-accent: #f0b65a; --ag-accent-contrast: #2a1a00;
  --ag-bg: #0b0f17; --ag-surface: #121826; --ag-raised: #182033; --ag-sunken: #0f1420;
  --ag-line: rgba(255,255,255,.08); --ag-line-2: rgba(255,255,255,.14);
  --ag-text: #e8ecf4; --ag-text-2: #c3cad8; --ag-muted: #98a2b8;
  --ag-ok: #22c55e; --ag-warn: #f59e0b; --ag-err: #ef4444; --ag-info: #60a5fa;
  --ag-shadow-1: 0 1px 2px rgba(0,0,0,.4); --ag-shadow-2: 0 12px 32px -8px rgba(0,0,0,.6), 0 2px 6px rgba(0,0,0,.35);
  --ag-topbar: rgba(11,15,23,.8);
  --brand: #5cc4b6; --brand-ink: #04201c; --brand-soft: rgba(92,196,182,.14); --brand-text: #7fd6ca;
  --accent: #f0b65a; --accent-ink: #2a1a00; --focus: #f0b65a;
  --good: #4ade80; --good-bg: rgba(34,197,94,.13); --warn: #fbbf24; --warn-bg: rgba(245,158,11,.14); --danger: #fca5a5; --danger-bg: rgba(239,68,68,.15); --danger-line: rgba(248,113,113,.5);
  --alarm: #c81e1e; --alarm-ink: #ffffff; --info: #93c5fd; --info-bg: rgba(59,130,246,.15);
  --hero-1: #0f5249; --hero-2: #0a2e2b;
  --bar: #1f5f57; --bar-strong: #4fc1b2; --grid: rgba(255,255,255,.08); --track: #1c2436;
  --h1: #163b38; --h2: #1d5d55; --h3: #22705f; --h4: #4fb3a5; --h5: #9fe0d4; --dnum: #e8ecf4; --dnum-inv: #0b0f17;
  --st-good: #22c55e; --st-warn: #f5b82e; --st-serious: #f08a5d; --st-crit: #ef4444;
}

/* ------------------------------------------------------------ base */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--ag-bg); }
body { margin: 0; background: var(--ag-bg); color: var(--ag-text); font: 16px/1.5 var(--ag-font); min-height: 100vh; padding-bottom: calc(var(--bar-h) + 20px + env(safe-area-inset-bottom)); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
a { color: var(--brand-text); text-underline-offset: 3px; }
h1 { font-size: 1.5rem; margin: .2em 0 .6em; line-height: 1.2; letter-spacing: -.015em; font-weight: 750; }
h2 { font-size: 1.0625rem; margin: .1em 0 .55em; line-height: 1.25; letter-spacing: -.005em; font-weight: 700; display: flex; align-items: center; gap: 8px; }
h3 { font-size: .95rem; margin: 1.1em 0 .35em; display: flex; align-items: center; gap: 6px; }
p { margin: .4em 0; }
code { font-family: var(--ag-font-mono); font-size: .9em; overflow-wrap: anywhere; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
::selection { background: color-mix(in srgb, var(--brand) 25%, transparent); }
.skip { position: absolute; left: -999px; top: 0; background: var(--ag-surface); padding: 8px 12px; z-index: 50; border-radius: 8px; }
.skip:focus { left: 8px; top: 8px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.boot { padding: 40px 16px; text-align: center; color: var(--ag-muted); }
.ic { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic.dots { stroke-width: 3.4; }
.flip { display: inline-flex; transform: scaleX(-1); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-property: opacity !important; scroll-behavior: auto !important; } }

/* ------------------------------------------------------------ top bar */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: var(--top-h);
  padding: calc(8px + env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left));
  background: var(--ag-bg); border-bottom: 1px solid var(--ag-line); }
@supports ((backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px))) {
  .top { background: var(--ag-topbar); -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px); }
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.125rem; color: var(--ag-text); text-decoration: none; letter-spacing: -.02em; min-height: 44px; border-radius: 10px; }
.brand img { border-radius: 9px; box-shadow: var(--ag-shadow-1); }
.topacts { display: flex; align-items: center; gap: 2px; }
.brand { min-width: 0; } .brandname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brandmark { position: relative; display: inline-flex; flex: none; }
.syncdot { position: absolute; right: -5px; bottom: -5px; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--ag-surface); color: var(--ag-muted); box-shadow: 0 0 0 2px var(--ag-bg); }
.syncdot.ok { color: var(--good); } .syncdot.busy { color: var(--brand); } .syncdot.busy .ic { animation: spin 1.2s linear infinite; } .syncdot.err { color: var(--warn); }
@keyframes spin { to { transform: rotate(360deg); } }
.langbtn { font: 700 .82rem var(--ag-font); letter-spacing: .01em; }
@media (max-width: 371px) { .brand .brandname { display: none; } }

/* ------------------------------------------------------------ main navigation: bottom bar on phones, side rail on computers */
.tabs { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; display: flex; justify-content: center; align-items: flex-end;
  background: var(--ag-surface); border-top: 1px solid var(--ag-line); box-shadow: 0 -6px 24px -12px rgba(15,23,42,.16);
  padding: 0 max(4px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(4px, env(safe-area-inset-left)); }
.tab { position: relative; flex: 1; max-width: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 8px 2px 8px; min-height: var(--bar-h);
  font-size: .72rem; font-weight: 600; color: var(--ag-muted); text-decoration: none; border-radius: 12px; transition: color .16s var(--ag-ease); -webkit-tap-highlight-color: transparent; }
.tab .tabic { display: grid; place-items: center; width: 52px; height: 30px; border-radius: 999px; transition: background .18s var(--ag-ease); }
.tab[aria-current="page"] { color: var(--brand-text); }
.tab[aria-current="page"] .tabic { background: var(--brand-soft); }
.tab[aria-current="page"] .ic { stroke-width: 2.2; }
.tab:active .tabic { transform: scale(.96); }
/* the scan tab: the raised marigold button in the middle */
.tab.scan .tabic { width: 58px; height: 58px; margin-top: -26px; border-radius: 20px; background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 20px -6px rgba(232,163,61,.55), 0 0 0 4px var(--ag-surface); }
.tab.scan[aria-current="page"] .tabic { background: var(--accent); }
.tab.scan { color: var(--ag-text); }
.tab.scan[aria-current="page"] { color: var(--brand-text); font-weight: 750; }
.tabtrust { display: none; }
main { display: block; max-width: 720px; margin: 0 auto; padding: 16px 16px 28px; outline: none; }

@media (min-width: 1024px) {
  body { padding-bottom: 0; }
  .tabs { top: var(--top-h); bottom: 0; right: auto; width: 232px; flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 4px;
    padding: 20px 14px; border-top: 0; border-right: 1px solid var(--ag-line); box-shadow: none; background: var(--ag-bg); }
  .tab { flex: none; max-width: none; flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 46px; padding: 6px 12px; font-size: .95rem; color: var(--ag-text-2); }
  .tab .tabic { width: auto; height: auto; background: none !important; }
  .tab:hover { background: var(--ag-sunken); color: var(--ag-text); }
  .tab[aria-current="page"] { background: var(--brand-soft); color: var(--brand-text); }
  .tab.scan { order: -1; margin-bottom: 12px; min-height: 52px; justify-content: center; background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 20px -10px rgba(232,163,61,.8); font-weight: 700; }
  .tab.scan .tabic { width: auto; height: auto; margin: 0; box-shadow: none; border-radius: 0; background: none; }
  .tab.scan:hover, .tab.scan[aria-current="page"] { background: color-mix(in srgb, var(--accent) 88%, #000); color: var(--accent-ink); }
  .tabtrust { display: flex; gap: 8px; align-items: flex-start; margin-top: auto; padding: 12px; border-radius: 12px; background: var(--brand-soft); color: var(--ag-text-2); font-size: .8rem; line-height: 1.4; }
  .tabtrust .ic { color: var(--brand-text); margin-top: 1px; }
  main { max-width: none; margin: 0 0 0 232px; padding: 28px clamp(24px, 3.5vw, 56px) 56px; }
  main > .view { max-width: 1080px; margin: 0 auto; }
  main > .view.narrow, main > .view.pay, main > .view.scan, main > .view.group, main > .view.legal, main > .view.lock, main > .view.form { max-width: 720px; }
  .toast { left: auto; right: 24px; bottom: 24px; transform: translateY(20px); }
  .toast.show { transform: none; }
}

/* ------------------------------------------------------------ building blocks */
.card { display: block; width: 100%; background: var(--ag-surface); border: 1px solid var(--ag-line); border-radius: var(--ag-radius-lg); padding: 16px 18px; margin: 12px 0; box-shadow: var(--ag-shadow-1); color: inherit; text-align: left; font: inherit; }
button.card { cursor: pointer; transition: box-shadow .18s var(--ag-ease), transform .18s var(--ag-ease); }
button.card:hover { box-shadow: var(--ag-shadow-2); transform: translateY(-1px); }
.row { display: flex; align-items: center; gap: 8px; } .row.wrap { flex-wrap: wrap; } .row.between { justify-content: space-between; } .row.end { justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; } .row.center, .center { justify-content: center; text-align: center; }
.row.between > h1, .row.between > h2 { margin-bottom: 0; }
.col { display: flex; flex-direction: column; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 420px) { .grid2 { grid-template-columns: 1fr; } }
.muted { color: var(--ag-muted); } .small { font-size: .875rem; } .block { display: block; } .pre { white-space: pre-line; }
.err { color: var(--danger); font-weight: 600; min-height: 0; } .err:empty { display: none; }
.neg { color: var(--danger); } .pos { color: var(--good); }
.view > h1:first-child { margin-top: 4px; }
.lead { color: var(--ag-muted); margin-top: -.3em; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 12px; border: 1px solid var(--brand); background: var(--brand); color: var(--brand-ink);
  font: 650 .95rem var(--ag-font); cursor: pointer; text-decoration: none; transition: background .16s var(--ag-ease), box-shadow .16s var(--ag-ease), transform .1s var(--ag-ease); -webkit-tap-highlight-color: transparent; }
.btn:hover { background: color-mix(in srgb, var(--brand) 88%, #000); }
.btn:active { transform: scale(.98); }
.btn.ghost { background: var(--ag-surface); color: var(--ag-text); border-color: var(--ag-line-2); }
.btn.ghost:hover { background: var(--ag-sunken); }
.btn.ghost .ic { color: var(--brand-text); }
.btn.small { min-height: 40px; padding: 6px 14px; font-size: .875rem; border-radius: 10px; }
.btn.wide { width: 100%; margin-top: 12px; }
.btn.danger { background: var(--alarm); border-color: var(--alarm); color: var(--alarm-ink); }
.btn.danger:hover { background: color-mix(in srgb, var(--alarm) 88%, #000); }
.btn.ghost.danger { background: transparent; color: var(--danger); border-color: var(--danger-line); }
.btn.ghost.danger .ic { color: var(--danger); }
.btn.ghost.danger:hover { background: var(--danger-bg); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn.busy { position: relative; color: transparent !important; pointer-events: none; }
.btn.busy::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--brand-ink); border-right-color: transparent; animation: spin .7s linear infinite; }
@media (pointer: coarse) { .btn.small { min-height: 44px; } }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; background: transparent; color: var(--ag-text-2); border-radius: 12px; cursor: pointer; transition: background .16s var(--ag-ease); }
.iconbtn:hover { background: var(--ag-sunken); color: var(--ag-text); } .iconbtn:disabled { opacity: .35; }
.iconbtn[aria-expanded="true"] { background: var(--brand-soft); color: var(--brand-text); }
.linkbtn { background: none; border: 0; color: var(--brand-text); font: inherit; font-weight: 600; cursor: pointer; padding: 10px 4px; min-height: 44px; display: inline-flex; gap: 6px; align-items: center; text-decoration: underline; text-underline-offset: 3px; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--ag-sunken); color: var(--ag-text-2); }
.badge.ok { background: var(--good-bg); color: var(--good); } .badge.warn { background: var(--warn-bg); color: var(--warn); }
.tag { display: inline-flex; align-items: center; margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-text); font-size: .75rem; font-weight: 650; }
.sechead { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 22px 0 8px; }
.sechead h2 { margin: 0; }
.sechead a { font-size: .875rem; font-weight: 600; text-decoration: none; padding: 10px 4px; }

/* skeleton loading */
.skel { display: grid; gap: 12px; margin: 12px 0; }
.skel i { display: block; height: 64px; border-radius: var(--ag-radius-lg); background: linear-gradient(90deg, var(--ag-sunken) 0%, var(--ag-surface) 50%, var(--ag-sunken) 100%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; border: 1px solid var(--ag-line); }
.skel i:first-child { height: 96px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* empty states */
.empty { text-align: center; padding: 22px 18px; }
.empty .art { display: block; margin: 0 auto 8px; width: 112px; height: auto; }
.empty .art .a1 { fill: var(--brand-soft); } .empty .art .a2 { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; } .empty .art .a3 { fill: var(--accent); } .empty .art .a4 { fill: none; stroke: var(--accent-ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.empty p { color: var(--ag-muted); max-width: 46ch; margin: 6px auto 12px; }
.empty .row { justify-content: center; }

/* ------------------------------------------------------------ forms */
.field { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.lbl { font-size: .875rem; font-weight: 650; color: var(--ag-text-2); }
.hint { font-size: .8rem; color: var(--ag-muted); }
input[type=text], input[type=email], input[type=search], input[type=password], input[type=number], input[type=url], input[type=date], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--ag-line-2); border-radius: 12px; background: var(--ag-surface); color: var(--ag-text); font: 1rem var(--ag-font);
  transition: border-color .16s var(--ag-ease), box-shadow .16s var(--ag-ease); }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--ag-muted) 80%, transparent); }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
input[readonly] { background: var(--ag-sunken); }
input[type=file] { font: .9rem var(--ag-font); color: var(--ag-text-2); max-width: 100%; }
input[type=file]::file-selector-button { font: 600 .9rem var(--ag-font); border: 1px solid var(--ag-line-2); background: var(--ag-surface); color: var(--ag-text); border-radius: 10px; padding: 10px 14px; margin-right: 10px; cursor: pointer; }
.rupee { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 1.1rem; }
.rupee input { font-weight: 700; }
.check-row { display: flex; gap: 12px; align-items: flex-start; margin: 12px 0; font-size: .95rem; padding: 12px 14px; border-radius: 12px; background: var(--ag-sunken); cursor: pointer; }
.check-row input { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--brand); flex: none; }
.toggle { display: flex; align-items: center; gap: 12px; margin: 12px 0; min-height: 44px; cursor: pointer; }
.toggle input { -webkit-appearance: none; appearance: none; position: relative; width: 48px; height: 28px; margin: 0; border-radius: 999px; background: var(--ag-line-2); flex: none; cursor: pointer; transition: background .18s var(--ag-ease); }
.toggle input::before { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .18s var(--ag-ease); }
.toggle input:checked { background: var(--brand); }
.toggle input:checked::before { transform: translateX(20px); }
.toggle input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px; background: var(--ag-sunken); border: 1px solid var(--ag-line); }
.seg button { border: 0; background: transparent; color: var(--ag-text-2); padding: 8px 14px; font: 600 .875rem var(--ag-font); cursor: pointer; min-height: 38px; border-radius: 9px; transition: background .16s var(--ag-ease); }
.seg button[aria-pressed="true"] { background: var(--ag-surface); color: var(--ag-text); box-shadow: var(--ag-shadow-1); }
@media (pointer: coarse) { .seg button { min-height: 44px; } }
.card .row.between + .row.between { margin-top: 12px; }
details summary { cursor: pointer; padding: 10px 0; font-weight: 600; color: var(--brand-text); min-height: 44px; }

/* ------------------------------------------------------------ home */
.home .hcol { min-width: 0; }
/* phones: one column in the order that matters — trust line, Scan & pay, people, this month, bills, latest, a tip */
@media (max-width: 1023px) {
  .home { display: flex; flex-direction: column; }
  .home .hcol { display: contents; }
  .home .legalline { order: 1; } .home .movecard { order: 2; } .home .hero { order: 3; } .home .shortcuts { order: 4; } .home .peoplehead { order: 5; } .home .people { order: 6; }
  .home .summary { order: 7; margin-top: 18px; } .home .duecard { order: 8; } .home .latest { order: 9; } .home .tipcard { order: 10; }
}
.home .hside > .card:first-child { margin-top: 0; }
@media (min-width: 1024px) {
  .home { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr); gap: 0 28px; align-items: start; }
  .home .hside { position: sticky; top: calc(var(--top-h) + 16px); }
}
.legalline { display: flex; align-items: center; gap: 10px; font-size: .875rem; color: var(--ag-text-2); background: var(--ag-surface); border: 1px solid var(--ag-line); padding: 10px 14px; border-radius: 14px; margin: 0 0 14px; box-shadow: var(--ag-shadow-1); }
.legalline .shield { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-text); flex: none; }
.hero { position: relative; overflow: hidden; border-radius: var(--ag-radius-xl); padding: 20px; color: var(--hero-ink); isolation: isolate;
  background: radial-gradient(120% 90% at 100% 0%, rgba(232,163,61,.28), transparent 55%), linear-gradient(150deg, var(--hero-1), var(--hero-2)); box-shadow: var(--ag-shadow-2); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px); background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(160deg, #000, transparent 70%); mask-image: linear-gradient(160deg, #000, transparent 70%); }
.hero h1 { font-size: 1.375rem; margin: 0 0 4px; color: var(--hero-ink); }
.hero .sub { margin: 0 0 16px; color: var(--hero-dim); font-size: .9rem; max-width: 44ch; }
.scanhero { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 76px; padding: 12px 18px 12px 12px; border: 0; border-radius: 20px; cursor: pointer; text-align: left;
  background: var(--accent); color: var(--accent-ink); font: inherit; box-shadow: 0 12px 28px -12px rgba(0,0,0,.5); transition: transform .12s var(--ag-ease), box-shadow .16s var(--ag-ease); }
.scanhero:hover { box-shadow: 0 16px 32px -12px rgba(0,0,0,.6); }
.scanhero:active { transform: scale(.985); }
.scanhero:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.scanhero .sic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: rgba(42,26,0,.12); flex: none; }
.scanhero b { display: block; font-size: 1.2rem; letter-spacing: -.01em; }
.scanhero small { display: block; font-size: .82rem; opacity: .85; font-weight: 600; }
.scanhero .go { margin-left: auto; display: inline-flex; }
.actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 14px 0 0; }
.action { display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 84px; padding: 10px 2px 8px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.08); color: var(--hero-ink);
  font: 650 .8rem/1.25 var(--ag-font); cursor: pointer; text-align: center; border-radius: 16px; transition: background .16s var(--ag-ease); }
.action:hover { background: rgba(255,255,255,.16); }
.action:active { transform: scale(.97); }
.action:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.aic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; background: rgba(255,255,255,.14); }
.people { list-style: none; display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 -2px; scrollbar-width: none; scroll-snap-type: x proximity; }
.people::-webkit-scrollbar { display: none; }
.person { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 76px; min-height: 92px; padding: 8px 2px; border: 0; background: none; color: var(--ag-text); font: 600 .8rem var(--ag-font); cursor: pointer; border-radius: 14px; scroll-snap-align: start; }
.person:hover { background: var(--ag-sunken); }
.person span.nm { max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person .fav { position: absolute; top: 4px; right: 10px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 2px var(--ag-bg); }
.person .fav .ic { fill: currentColor; stroke-width: 1.2; }
.person.new .avatar { background: var(--ag-surface); color: var(--brand-text); border: 1.5px dashed var(--ag-line-2); }
.avatar { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-text); font-weight: 800; flex: none; }
.avatar.lg { width: 52px; height: 52px; font-size: 1.15rem; }
.avatar.xl { width: 72px; height: 72px; font-size: 1.75rem; }
.avatar.sm { width: 28px; height: 28px; font-size: .8rem; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; margin: 0; list-style: none; scrollbar-width: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 14px 6px 6px; border-radius: 999px; border: 1px solid var(--ag-line); background: var(--ag-surface); color: var(--ag-text); font: 600 .875rem var(--ag-font); cursor: pointer; white-space: nowrap; }
.summary { display: flex; flex-direction: column; gap: 2px; }
.summary .tv { font-size: 2.25rem; letter-spacing: -.03em; line-height: 1.1; margin: 4px 0 2px; }
.tl { font-size: .82rem; color: var(--ag-muted); font-weight: 650; } .tv { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; } .ts { font-size: .82rem; color: var(--ag-muted); }
.summary .badge { margin-top: 8px; align-self: flex-start; }
.vs { display: inline-flex; align-items: center; gap: 4px; font-size: .82rem; font-weight: 650; color: var(--ag-text-2); }
.stack { display: flex; gap: 2px; height: 10px; border-radius: 999px; overflow: hidden; margin: 14px 0 10px; background: var(--track); }
.stack i { display: block; height: 100%; background: var(--c, var(--ag-muted)); }
.stack i:first-child { border-radius: 999px 0 0 999px; } .stack i:last-child { border-radius: 0 999px 999px 0; }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.legend li { display: flex; align-items: center; gap: 8px; font-size: .875rem; color: var(--ag-text-2); }
.legend li b { margin-left: auto; color: var(--ag-text); font-variant-numeric: tabular-nums; }
.legend .sw { width: 10px; height: 10px; border-radius: 3px; background: var(--c, var(--ag-muted)); flex: none; }
.tip h2 { display: flex; align-items: center; gap: 8px; }
.tip h2 .ic { color: var(--brand-text); }
.tipcard { background: linear-gradient(160deg, var(--brand-soft), var(--ag-surface) 70%); }

/* ------------------------------------------------------------ lists */
.list, .txns, .payees { list-style: none; margin: 0; padding: 0; }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--ag-line); }
.item:has(.btn) { flex-wrap: wrap; }
.item:has(.btn) > .grow { min-width: 150px; }
.item:last-child { border-bottom: 0; }
.item.full { width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; flex-wrap: nowrap; min-height: 56px; border-radius: 0; }
.item.full:hover { background: var(--ag-sunken); }
.txnbox { padding: 4px 16px; }
.txns .day { font-size: .75rem; font-weight: 700; color: var(--ag-muted); padding: 14px 0 4px; text-transform: uppercase; letter-spacing: .06em; }
.txns .day:first-child { padding-top: 8px; }
.txn, .payee { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 10px 4px; border: 0; border-bottom: 1px solid var(--ag-line); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: 0; transition: background .14s var(--ag-ease); }
.txn:hover, .payee:hover { background: var(--ag-sunken); }
.txns li:last-child .txn, .payees li:last-child .payee { border-bottom: 0; }
.txn b, .payee b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.txn small, .payee small { display: block; font-size: .82rem; }
.payee small.tag { display: inline-flex; margin: 4px 6px 0 0; }
.payee > .ic { color: var(--accent); fill: currentColor; }
.amt { font-weight: 750; white-space: nowrap; font-variant-numeric: tabular-nums; } .amt.in { color: var(--good); } .amt.failed { text-decoration: line-through; color: var(--ag-muted); }
.cdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; background: var(--c, var(--ag-muted)); flex: none; vertical-align: middle; }
.cdot.big { position: relative; width: 42px; height: 42px; margin: 0; border-radius: 13px; background: color-mix(in srgb, var(--c, #888) 16%, var(--ag-surface)); }
.cdot.big::after { content: ""; position: absolute; inset: 15px; border-radius: 50%; background: var(--c, var(--ag-muted)); }
[data-cat=food]{--c:#e2733c}[data-cat=groceries]{--c:#2f9e6a}[data-cat=shopping]{--c:#c2559a}[data-cat=transport]{--c:#3d7bd1}[data-cat=fuel]{--c:#a0692f}
[data-cat=bills]{--c:#d1a12b}[data-cat=recharge]{--c:#5a6fd6}[data-cat=rent]{--c:#7a4ccf}[data-cat=emi]{--c:#b8423f}[data-cat=insurance]{--c:#2a8f9b}
[data-cat=health]{--c:#d14b6f}[data-cat=education]{--c:#3a8f3a}[data-cat=entertainment]{--c:#e05aa0}[data-cat=subscriptions]{--c:#6950b8}[data-cat=investment]{--c:#167a63}
[data-cat=people]{--c:#d88a1d}[data-cat=personal]{--c:#b46ad0}[data-cat=home]{--c:#8a8660}[data-cat=gifts]{--c:#d4495b}[data-cat=income]{--c:#16a34a}
.filters { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 8px; margin-bottom: 8px; }
@media (max-width: 420px) { .filters { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ scan */
.scan .lead { margin-bottom: 14px; }
.viewfinder { position: relative; aspect-ratio: 1; max-width: 440px; margin: 0 auto 16px; background: #05080d; border-radius: var(--ag-radius-xl); overflow: hidden; box-shadow: var(--ag-shadow-2); }
.viewfinder video { width: 100%; height: 100%; object-fit: cover; display: block; }
.frame { position: absolute; inset: 15%; border-radius: 20px; box-shadow: 0 0 0 999px rgba(5,8,13,.42); }
.frame::before, .frame::after { content: ""; position: absolute; inset: -2px; border-radius: 22px; pointer-events: none;
  background: linear-gradient(var(--accent), var(--accent)) top left / 34px 4px no-repeat, linear-gradient(var(--accent), var(--accent)) top left / 4px 34px no-repeat,
    linear-gradient(var(--accent), var(--accent)) top right / 34px 4px no-repeat, linear-gradient(var(--accent), var(--accent)) top right / 4px 34px no-repeat,
    linear-gradient(var(--accent), var(--accent)) bottom left / 34px 4px no-repeat, linear-gradient(var(--accent), var(--accent)) bottom left / 4px 34px no-repeat,
    linear-gradient(var(--accent), var(--accent)) bottom right / 34px 4px no-repeat, linear-gradient(var(--accent), var(--accent)) bottom right / 4px 34px no-repeat; }
.frame::after { background: linear-gradient(90deg, transparent, var(--accent), transparent) 0 0 / 100% 2px no-repeat; inset: 8px; border-radius: 0; opacity: .85; animation: sweep 2.4s var(--ag-ease) infinite alternate; }
@keyframes sweep { from { background-position: 0 0; } to { background-position: 0 100%; } }
.vfhint { position: absolute; left: 0; right: 0; top: 16px; text-align: center; color: rgba(255,255,255,.85); font-size: .85rem; font-weight: 600; text-shadow: 0 1px 2px rgba(0,0,0,.6); pointer-events: none; }
.camerr { position: absolute; left: 12px; right: 12px; bottom: 12px; color: #fff; background: rgba(5,8,13,.82); padding: 12px; border-radius: 12px; font-size: .9rem; margin: 0; }
.scanopts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-width: 440px; margin: 0 auto; }
.scanopts .btn { flex-direction: column; gap: 6px; min-height: 76px; padding: 10px 6px; font-size: .85rem; text-align: center; border-radius: 16px; }
.scanopts .btn .ic { width: 24px; height: 24px; }
.scannote { display: flex; gap: 8px; align-items: center; justify-content: center; max-width: 440px; margin: 14px auto 0; }

/* ------------------------------------------------------------ pay: who, how much, is it safe */
.pay { display: flex; flex-direction: column; }
.pay > h1 { order: -3; font-size: 1rem; color: var(--ag-muted); font-weight: 650; letter-spacing: .02em; text-transform: uppercase; margin: 2px 0 10px; }
.paycard { background: var(--ag-surface); border: 1px solid var(--ag-line); border-radius: var(--ag-radius-xl); box-shadow: var(--ag-shadow-1); padding: 20px 18px 16px; margin-bottom: 12px; }
.payee.big { flex-direction: column; text-align: center; gap: 10px; border: 0; cursor: default; padding: 0 0 14px; min-height: 0; border-bottom: 1px dashed var(--ag-line-2); border-radius: 0; }
.payee.big:hover { background: none; }
.payee.big > div { min-width: 0; width: 100%; }
.payee.big b { font-size: 1.5rem; line-height: 1.2; white-space: normal; letter-spacing: -.015em; overflow-wrap: anywhere; }
.payee.big code { display: inline-block; margin-top: 8px; padding: 6px 12px; border-radius: 999px; background: var(--ag-sunken); border: 1px solid var(--ag-line); font-size: 1rem; font-weight: 600; color: var(--ag-text); }
.payee.big .tags { display: flex; justify-content: center; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.payee.big .tags .tag { margin: 0; }
.amount { align-items: center; text-align: center; margin: 14px 0 4px; }
.amount .lbl { display: inline-flex; align-items: center; gap: 6px; }
.amount .rupee { justify-content: center; font-size: 2.25rem; font-weight: 800; letter-spacing: -.03em; gap: 2px; }
.amount .rupee input { font-size: 2.75rem; font-weight: 800; letter-spacing: -.03em; min-height: 64px; width: 4ch; max-width: 100%; min-width: 3ch; text-align: center; padding: 4px 8px; border: 0; border-bottom: 2px solid var(--ag-line-2); border-radius: 0; background: transparent; font-variant-numeric: tabular-nums; }
.amount .rupee input:focus { border-bottom-color: var(--brand); box-shadow: none; }
.amount .rupee input[readonly] { border-bottom-color: transparent; background: transparent; }
.amount .hint { text-align: center; }
.fixedtag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: var(--ag-sunken); font-size: .75rem; font-weight: 650; color: var(--ag-text-2); }
.checks { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 12px; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; font-size: .925rem; background: var(--info-bg); color: var(--info); line-height: 1.45; }
.check .ic { margin-top: 1px; }
.check.danger { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-line); font-size: 1rem; }
.check.warn { background: var(--warn-bg); color: var(--warn); } .check.ok { background: var(--good-bg); color: var(--good); font-weight: 650; align-items: center; }
.check b { font-weight: 800; }
/* a scam: the warning goes to the very top, in red, and stays there until the person leaves this screen */
.pay.alarm .checks { order: -2; margin: 0 0 14px; padding: 0 0 12px; border-radius: var(--ag-radius-xl); background: var(--danger-bg); border: 2px solid var(--alarm); overflow: hidden; box-shadow: 0 10px 30px -12px rgba(185,28,28,.45); }
.pay.alarm .checks .check { margin: 0 12px; background: var(--ag-surface); }
.alarmhead { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: var(--alarm); color: var(--alarm-ink); }
.alarmhead b { display: block; font-size: 1.2rem; line-height: 1.25; }
.alarmhead span { display: block; font-size: .9rem; opacity: .95; margin-top: 2px; }
.alarmhead .ic { margin-top: 2px; }
.paybtn { font-size: 1.1rem; min-height: 58px; border-radius: 16px; box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--brand) 80%, transparent); }
.paybtn.danger { box-shadow: 0 10px 24px -12px rgba(185,28,28,.7); }
.payarea .legal { display: flex; gap: 8px; align-items: flex-start; justify-content: center; text-align: center; margin: 12px 4px 4px; }
.payarea .legal .ic { color: var(--brand-text); margin-top: 2px; }
.apps { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.legal { color: var(--ag-muted); }
.qrwrap { width: min(260px, 72vw); margin: 8px auto; background: #fff; border-radius: 16px; padding: 10px; box-shadow: inset 0 0 0 1px rgba(15,23,42,.08); }
.qrsvg { display: block; width: 100%; height: auto; }
.qrcap { text-align: center; margin: 6px 0 12px; }
.qrcap b { font-size: 1.125rem; }
.qrcap code { font-size: .95rem; }
.deskpay { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.payfoot { justify-content: center; gap: 4px 16px; }
code.big { font-size: 1.25rem; font-weight: 700; }
.mobnum { padding: 12px 16px; border-radius: 12px; background: var(--ag-sunken); }

/* ------------------------------------------------------------ sheets, dialogs and toasts */
.backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(5,8,13,.5); display: flex; align-items: flex-end; justify-content: center; animation: fade .18s var(--ag-ease); }
.sheet { width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; background: var(--ag-raised); color: var(--ag-text); border-radius: 24px 24px 0 0; padding: 12px 20px calc(20px + env(safe-area-inset-bottom)); box-shadow: var(--ag-shadow-2); outline: none; animation: up .24s var(--ag-ease); border: 1px solid var(--ag-line); }
.sheet::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--ag-line-2); margin: 0 auto 14px; }
.sheet h2 { font-size: 1.25rem; margin-top: 4px; }
.sheet .col .btn { width: 100%; min-height: 50px; }
.sheet.alarmsheet { border: 2px solid var(--alarm); padding-top: 0; }
.sheet.alarmsheet::before { display: none; }
.sheet.alarmsheet .alarmhead { margin: 0 -20px 14px; border-radius: 22px 22px 0 0; }
.sheet.alarmsheet .col .btn.ghost { min-height: 46px; }
@media (min-width: 700px) { .backdrop { align-items: center; } .sheet { border-radius: 20px; padding: 20px 24px 22px; } .sheet::before { display: none; } .sheet.alarmsheet .alarmhead { margin: 0 -24px 14px; border-radius: 18px 18px 0 0; } }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(24px); opacity: .6; } }
.toast { position: fixed; left: 50%; bottom: calc(var(--bar-h) + 24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); z-index: 60; max-width: min(92vw, 520px); background: var(--ag-text); color: var(--ag-bg);
  padding: 12px 18px; border-radius: 14px; font-size: .925rem; font-weight: 550; opacity: 0; pointer-events: none; transition: opacity .2s var(--ag-ease), transform .2s var(--ag-ease); box-shadow: var(--ag-shadow-2); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.warn { background: var(--warn-bg); color: var(--warn); border: 1px solid currentColor; }
@media (min-width: 1024px) { .toast { left: auto; right: 24px; bottom: 24px; transform: translateY(20px); } .toast.show { transform: none; } }

/* ------------------------------------------------------------ AeroGyan apps switcher */
.apps-pop { position: fixed; z-index: 70; width: 344px; max-width: calc(100vw - 16px); background: var(--ag-raised); border: 1px solid var(--ag-line-2); border-radius: var(--ag-radius-lg); box-shadow: var(--ag-shadow-2); padding: 12px; color: var(--ag-text); animation: up .18s var(--ag-ease); }
.apps-head { display: grid; gap: 1px; padding: 2px 6px 10px; }
.apps-head b { font-size: .875rem; } .apps-head small { color: var(--ag-muted); font-size: .75rem; }
.apps-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.app-tile { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 4px; border-radius: 12px; text-decoration: none; color: var(--ag-text); text-align: center; min-height: 92px; }
.app-tile:hover { background: var(--ag-sunken); }
.app-tile b { font-size: .8rem; line-height: 1.2; } .app-tile small { font-size: .68rem; color: var(--ag-muted); line-height: 1.25; }
.app-tile.here { background: var(--brand-soft); }
.app-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; color: #fff; font-weight: 800; font-size: 1rem; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.apps-all { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 8px; padding: 12px 8px 4px; border-top: 1px solid var(--ag-line); color: var(--brand-text); text-decoration: none; font-size: .82rem; font-weight: 650; }
.apps-all:hover { text-decoration: underline; }

/* ------------------------------------------------------------ money (insights) */
.monthnav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.monthnav h1 { margin: 0; font-size: 1.375rem; }
.monthnav .iconbtn { background: var(--ag-surface); border: 1px solid var(--ag-line); }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--ag-surface); border: 1px solid var(--ag-line); border-radius: var(--ag-radius-lg); box-shadow: var(--ag-shadow-1); margin: 12px 0; overflow: hidden; }
.tile { padding: 14px 16px; display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.tile + .tile { border-left: 1px solid var(--ag-line); }
.tile .tv { font-size: 1.25rem; }
.tile.wide { background: var(--ag-surface); border: 1px solid var(--ag-line); border-radius: var(--ag-radius-lg); box-shadow: var(--ag-shadow-1); margin: 12px 0; padding: 18px; }
.tile.wide .tv { font-size: 1.75rem; }
@media (max-width: 400px) { .tiles .tile { padding: 12px 10px; } .tiles .tile .tv { font-size: 1.02rem; } }
@media (min-width: 1024px) {
  .money { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 20px; align-items: start; }
  .money > .monthnav, .money > .tiles, .money > .ask, .money > .moneyacts { grid-column: 1 / -1; }
  .money > .tiles .tv { font-size: 1.75rem; }
}
.moneyacts { margin-top: 8px; }
.ask .row input { flex: 1; }
.answer:empty { display: none; }
.answer { margin-top: 10px; padding: 12px 14px; background: var(--brand-soft); border-radius: 12px; }
.bigamt { font-size: 2.5rem; font-weight: 800; letter-spacing: -.03em; margin: 8px 0 0; font-variant-numeric: tabular-nums; } .bigamt.in { color: var(--good); }
.txnhead { padding: 22px 16px 10px; }
.txnhead h1 { margin-bottom: 0; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 14px 0; font-size: .925rem; background: var(--ag-surface); border: 1px solid var(--ag-line); border-radius: var(--ag-radius-lg); padding: 16px 18px; }
.facts dt { color: var(--ag-muted); } .facts dd { margin: 0; overflow-wrap: anywhere; font-weight: 600; }
.goal { padding: 12px 0; border-bottom: 1px solid var(--ag-line); } .goal:last-child { border-bottom: 0; }
.budgets .item { flex-wrap: nowrap; }
.budgets .rupee input { width: 120px; text-align: right; }
.budgets .cdot { margin-right: 0; }

/* ------------------------------------------------------------ charts */
.chartbox { margin: 0; }
.chartbox figcaption { font-weight: 700; font-size: 1.0625rem; margin-bottom: 10px; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--grid); stroke-width: 1; }
.chart .axis { fill: var(--ag-muted); font-size: 10px; font-family: var(--ag-font); }
.chart .val { fill: var(--ag-text); font-size: 11px; font-weight: 700; font-family: var(--ag-font); }
.chart .bar { fill: var(--bar); } .chart .bar.strong { fill: var(--bar-strong); }
.chart .mark { cursor: pointer; outline: none; } .chart .mark:focus-visible .bar, .chart .mark:hover .bar { filter: brightness(.92); }
.chart .mark:focus-visible rect.hc, .chart .mark:hover rect.hc { stroke: var(--ag-text); stroke-width: 2; }
.heat { max-width: 340px; margin: 0 auto; }
.hc { fill: var(--track); } .hc.h1 { fill: var(--h1); } .hc.h2 { fill: var(--h2); } .hc.h3 { fill: var(--h3); } .hc.h4 { fill: var(--h4); } .hc.h5 { fill: var(--h5); }
.dnum { fill: var(--dnum); font-size: 10px; font-family: var(--ag-font); } .dnum.inv { fill: var(--dnum-inv); }
.heatlegend { display: flex; align-items: center; justify-content: center; gap: 4px; font-size: .75rem; color: var(--ag-muted); margin-top: 8px; }
.heatlegend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; }
.heatlegend i.hc { background: var(--track); } .heatlegend i.h1 { background: var(--h1); } .heatlegend i.h2 { background: var(--h2); } .heatlegend i.h3 { background: var(--h3); } .heatlegend i.h4 { background: var(--h4); } .heatlegend i.h5 { background: var(--h5); }
.catbars { list-style: none; margin: 0; padding: 0; }
.catrow { display: grid; grid-template-columns: 1fr auto; gap: 6px 8px; width: 100%; padding: 10px 4px; min-height: 44px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: 10px; }
.catrow:hover { background: var(--ag-sunken); }
.cname { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .cval { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ctrack { grid-column: 1 / -1; height: 8px; background: var(--track); border-radius: 4px; overflow: hidden; }
.cfill { display: block; height: 100%; background: var(--bar-strong); border-radius: 0 4px 4px 0; }
.tableview { margin-top: 8px; font-size: .875rem; } .tableview summary { cursor: pointer; color: var(--brand-text); min-height: 0; padding: 8px 0; }
.tableview table { width: 100%; border-collapse: collapse; margin-top: 6px; } .tableview th, .tableview td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--ag-line); } .tableview td { text-align: right; font-variant-numeric: tabular-nums; }
.tip[role=tooltip] { position: absolute; z-index: 70; display: none; background: var(--ag-text); color: var(--ag-bg); padding: 8px 12px; border-radius: 10px; font-size: .8rem; pointer-events: none; max-width: 220px; box-shadow: var(--ag-shadow-2); }
.meter { padding: 10px 0 12px; border-bottom: 1px solid var(--ag-line); } .meter:last-child { border-bottom: 0; }
.mhead { display: flex; justify-content: space-between; gap: 8px; font-size: .925rem; } .mname { font-weight: 650; } .mval { color: var(--ag-text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.mtrack { height: 10px; background: var(--track); border-radius: 5px; overflow: hidden; margin: 8px 0 6px; }
.mfill { height: 100%; background: var(--st-good); border-radius: 0 5px 5px 0; }
.meter.warning .mfill { background: var(--st-warn); } .meter.pace .mfill { background: var(--st-serious); } .meter.critical .mfill { background: var(--st-crit); }
.goal .mfill { background: var(--bar-strong); }
.mstate { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--ag-text-2); }
.meter.critical .mstate { color: var(--danger); font-weight: 700; } .meter.warning .mstate, .meter.pace .mstate { color: var(--warn); font-weight: 650; }

/* ------------------------------------------------------------ receive */
.receive .qrcard { padding: 0; overflow: hidden; text-align: center; }
.qrcard .qrtop { padding: 16px 18px 52px; color: var(--hero-ink); background: radial-gradient(120% 120% at 100% 0%, rgba(232,163,61,.3), transparent 55%), linear-gradient(150deg, var(--hero-1), var(--hero-2)); }
.qrcard .qrtop span { display: block; font-size: .82rem; color: var(--hero-dim); font-weight: 600; }
.qrcard .qrtop b { display: block; font-size: 1.25rem; letter-spacing: -.01em; }
.qrcard .qrwrap { margin-top: -40px; position: relative; box-shadow: var(--ag-shadow-2); }
.qrcard .row.center { padding: 0 14px 16px; }
@media (min-width: 1024px) {
  .receive { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 0 24px; align-items: start; }
  .receive > h1, .receive > form { grid-column: 1 / -1; }
  .receive > .qrcard { grid-row: span 3; }
}
.posterprev img { width: 100%; max-width: 420px; display: block; margin: 12px auto; border: 1px solid var(--ag-line); border-radius: 12px; box-shadow: var(--ag-shadow-2); }
.receive .card.center .row { margin-top: 6px; }

/* ------------------------------------------------------------ split */
.splitrows { margin: 8px 0; }
.splitrow { display: flex; align-items: center; gap: 10px; padding: 6px 0; min-height: 44px; }
.splitrow input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--brand); }
.splitrow input[type=text] { width: 110px; min-height: 40px; }
.group .tile.wide { background: linear-gradient(160deg, var(--brand-soft), var(--ag-surface) 75%); }
.group .tile.wide .tv.neg { color: var(--danger); } .group .tile.wide .tv.pos { color: var(--good); }
.group .list .item .btn { flex: none; }

/* ------------------------------------------------------------ more / settings */
.menu { display: flex; flex-direction: column; background: var(--ag-surface); border: 1px solid var(--ag-line); border-radius: var(--ag-radius-lg); margin: 12px 0; box-shadow: var(--ag-shadow-1); overflow: hidden; }
.menuitem { display: flex; align-items: center; gap: 14px; padding: 10px 16px; color: var(--ag-text); text-decoration: none; border-bottom: 1px solid var(--ag-line); min-height: 56px; font-weight: 600; transition: background .14s var(--ag-ease); }
.menuitem:hover { background: var(--ag-sunken); }
.menuitem:last-child { border-bottom: 0; }
.menuitem .mic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--brand-soft); color: var(--brand-text); flex: none; }
.menuitem .flip { color: var(--ag-muted); }
@media (min-width: 1024px) {
  .more { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 20px; align-items: start; }
  .more > h1, .more > p { grid-column: 1 / -1; }
}
.cards { display: grid; grid-template-columns: 1fr; gap: 0; }
@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; gap: 0 12px; } }
.lock { text-align: center; padding-top: 10vh; max-width: 380px; margin: 0 auto; }
.lockicon { display: inline-grid; place-items: center; width: 88px; height: 88px; border-radius: 28px; background: var(--brand-soft); color: var(--brand-text); margin-bottom: 8px; }
.lock input { text-align: center; font-size: 1.5rem; letter-spacing: .3em; min-height: 56px; }
.legal li { margin: 10px 0; }

/* Sign in with AeroGyan (identity only; the email code stays) */
.agid { margin: 12px 0 4px; }
.agid .agid-btn { background: var(--ag-surface); color: var(--ag-text); border-color: var(--ag-line-2); }
.agid-or { display: flex; align-items: center; gap: 10px; margin: 14px 0 4px; color: var(--ag-muted); font-size: .875rem; }
.agid-or::before, .agid-or::after { content: ""; flex: 1; border-top: 1px solid var(--ag-line); }

/* ------------------------------------------------------------ AeroPay hubs (2026-11-22) */
/* tints for hub icons: one hue per kind, always as a soft tile with the icon in a darker shade (both themes) */
.kic, .scic, .bic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; flex: none;
  background: color-mix(in srgb, var(--k, var(--brand)) 14%, var(--ag-surface)); color: color-mix(in srgb, var(--k, var(--brand)) 78%, var(--ag-text)); }
.kic.lg { width: 60px; height: 60px; border-radius: 18px; } .kic.sm { width: 32px; height: 32px; border-radius: 10px; }
[data-kind=mobile], [data-sc=recharge] { --k: #5a6fd6; } [data-kind=dth] { --k: #8b5cf6; } [data-kind=electricity] { --k: #d1a12b; } [data-kind=water] { --k: #2b8fd1; }
[data-kind=gas] { --k: #e2733c; } [data-kind=internet] { --k: #3d7bd1; } [data-kind=card] { --k: #b8423f; } [data-kind=rent] { --k: #7a4ccf; } [data-kind=fastag] { --k: #3a8f3a; }
[data-kind=emi] { --k: #b8423f; } [data-kind=fees] { --k: #3a8f3a; } [data-kind=insurance] { --k: #2a8f9b; } [data-kind=subscription] { --k: #6950b8; } [data-kind=self], [data-sc=self] { --k: #167a63; }
[data-kind=other] { --k: #7b8494; }
[data-sc=bills] { --k: #d1a12b; } [data-sc=split] { --k: #d88a1d; } [data-sc=shop] { --k: #c2559a; } [data-sc=budgets] { --k: #0f7a6d; } [data-sc=goals] { --k: #16a34a; }
[data-sc=calc] { --k: #3d7bd1; } [data-sc=safety] { --k: #b91c1c; } [data-sc=rewards] { --k: #c98a10; } [data-sc=learn] { --k: #8b5cf6; } [data-sc=worth] { --k: #2a8f9b; }

/* home: every hub in a grid of big tiles */
.shortcuts .sechead { margin-top: 20px; }
.scgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; background: var(--ag-surface); border: 1px solid var(--ag-line); border-radius: var(--ag-radius-xl); padding: 10px 6px; box-shadow: var(--ag-shadow-1); }
.sc { display: flex; flex-direction: column; align-items: center; gap: 7px; min-height: 92px; padding: 8px 2px; border-radius: 16px; color: var(--ag-text); text-decoration: none; text-align: center; font: 650 .78rem/1.25 var(--ag-font); transition: background .14s var(--ag-ease); -webkit-tap-highlight-color: transparent; }
.sc:hover { background: var(--ag-sunken); } .sc:active { transform: scale(.97); }
.sc .scic { width: 48px; height: 48px; border-radius: 16px; }
@media (min-width: 560px) { .scgrid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.movecard { border-color: color-mix(in srgb, var(--accent) 55%, var(--ag-line)); background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 14%, var(--ag-surface)), var(--ag-surface) 70%); }
.movecard h2 .ic { color: var(--brand-text); }

/* common bits */
.secttl { margin: 20px 0 10px; }
.backlink { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 650; text-decoration: none; margin: -6px 0 6px; }
.noteline { display: flex; gap: 8px; align-items: flex-start; color: var(--ag-text-2); }
.noteline .ic { color: var(--brand-text); margin-top: 2px; }
.infoonly { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--info-bg); color: var(--info); font-size: .9rem; font-weight: 600; margin: 12px 0; }
.infoonly .ic { margin-top: 1px; }
.amt.due, .tv.due { color: var(--warn); }
.tv.big { font-size: 2rem; display: block; }
.linkish { display: block; text-align: left; background: none; border: 0; padding: 4px 0; color: inherit; font: inherit; cursor: pointer; min-height: 44px; }
.linkish b { display: inline-flex; align-items: center; gap: 6px; }
.favstar { display: inline-grid; color: var(--accent); } .favstar .ic { fill: currentColor; stroke-width: 1.2; }
.chips.moneychips { flex-wrap: nowrap; margin: 4px 0 8px; }
.chip { text-decoration: none; }
.chipic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-text); }
.hubmenu .mic .ic { width: 20px; height: 20px; }

/* bills */
.kindgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; background: var(--ag-surface); border: 1px solid var(--ag-line); border-radius: var(--ag-radius-xl); padding: 8px 6px; box-shadow: var(--ag-shadow-1); }
@media (min-width: 560px) { .kindgrid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.kindtile { display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 88px; padding: 8px 2px; border-radius: 16px; border: 0; background: none;
  color: var(--ag-text); font: 650 .78rem/1.25 var(--ag-font); text-align: center; cursor: pointer; transition: background .14s var(--ag-ease); }
.kindtile:hover { background: var(--ag-sunken); } .kindtile:active { transform: scale(.97); }
.billlist .item { flex-wrap: wrap; }
.billlink { color: inherit; text-decoration: none; min-height: 44px; display: flex; flex-direction: column; justify-content: center; }
.billlink:hover b { text-decoration: underline; }
.rem.overdue .billlink small { color: var(--danger); font-weight: 650; }
.billhead { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: center; margin: 4px 0 10px; }
.billhead h1 { margin: 0 0 4px; }
.billhead .bigamt, .billhead > p { grid-column: 1 / -1; margin: 2px 0 0; }
.billacts { margin: 8px 0 4px; }
.facts.plain { background: none; border: 0; padding: 0; margin: 10px 0 0; }

/* shop mode */
.shop > h1 { display: flex; align-items: center; gap: 8px; }
.shoptabs { display: flex; width: 100%; margin: 4px 0 10px; } .shoptabs button { flex: 1; }
.salescard .tv.big { margin: 2px 0; }
.modes { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 14px 0 8px; padding: 0; }
.modes li { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 12px; background: var(--ag-sunken); font-size: .8rem; min-width: 0; }
.modes b { font-size: .95rem; overflow-wrap: anywhere; }
.weekbars { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; align-items: end; height: 110px; margin-top: 12px; }
.wb { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; min-width: 0; }
.wb i { display: block; width: 100%; max-width: 30px; min-height: 3px; border-radius: 6px 6px 2px 2px; background: var(--bar); }
.wb i.now { background: var(--bar-strong); }
.wb small { font-size: .68rem; color: var(--ag-muted); white-space: nowrap; }
.shoppanel > .row.between { flex-wrap: wrap; } .shoppanel > .row.between input { flex: 1 1 180px; }
.khatabal { background: linear-gradient(160deg, var(--brand-soft), var(--ag-surface) 75%); }
.khatabal.owes .tv { color: var(--warn); } .khatabal.adv .tv { color: var(--good); }
.khataacts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.khataacts .btn { min-height: 54px; font-size: 1rem; }
.btn.gave { background: var(--alarm); border-color: var(--alarm); color: var(--alarm-ink); } .btn.gave:hover { background: color-mix(in srgb, var(--alarm) 88%, #000); }
.btn.got { background: #15803d; border-color: #15803d; color: #fff; } .btn.got:hover { background: #126c33; }
.kdir { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; flex: none; }
.kdir.gave { background: var(--danger-bg); color: var(--danger); } .kdir.got { background: var(--good-bg); color: var(--good); }
.remindcard h2 .ic { color: var(--good); }

/* calculators, learn, badges */
.toolgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 12px 0; }
.tooltile { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: var(--ag-radius-lg); background: var(--ag-surface); border: 1px solid var(--ag-line); box-shadow: var(--ag-shadow-1);
  color: var(--ag-text); text-decoration: none; min-height: 120px; transition: box-shadow .16s var(--ag-ease), transform .16s var(--ag-ease); }
.tooltile:hover { box-shadow: var(--ag-shadow-2); transform: translateY(-1px); }
.tooltile small { color: var(--ag-muted); font-size: .8rem; line-height: 1.35; }
.calc > h1, .learn > h1, .rewards > h1, .safety > h1 { display: flex; align-items: center; gap: 8px; }
.calcform .field { margin: 10px 0; }
.resultcard { background: linear-gradient(160deg, var(--brand-soft), var(--ag-surface) 70%); }
.resultcard .tv.big { font-size: 2.1rem; }
.splitbar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--track); margin: 6px 0 12px; }
.splitbar i.inv { background: var(--bar); } .splitbar i.gain { background: var(--bar-strong); }
.better { margin: 8px 0 0; }
.taxcols { align-items: start; } .taxcols .card { margin: 8px 0; }
.topic summary { display: flex; align-items: center; gap: 12px; color: var(--ag-text); font-size: 1.02rem; }
.topic ul { padding-left: 20px; margin: 8px 0; } .topic li { margin: 8px 0; }
.badges { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.badgecard { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: var(--ag-radius-lg); background: var(--ag-surface); border: 1px solid var(--ag-line); box-shadow: var(--ag-shadow-1); opacity: .78; }
.badgecard.earned { opacity: 1; border-color: color-mix(in srgb, var(--accent) 60%, var(--ag-line)); background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 16%, var(--ag-surface)), var(--ag-surface) 70%); }
.badgecard .bic { --k: #7b8494; } .badgecard.earned .bic { --k: #c98a10; }
.badgecard small { font-size: .8rem; line-height: 1.35; }

/* safety centre */
.sosc { border: 2px solid var(--danger-line); background: linear-gradient(160deg, var(--danger-bg), var(--ag-surface) 75%); }
.sosc h2 .ic { color: var(--danger); }
.pinguide ol, .steps { padding-left: 22px; margin: 8px 0; } .pinguide li, .steps li { margin: 10px 0; }
.safety .card h2 .ic { color: var(--brand-text); }
.paymeta { align-items: end; }

/* print: only the QR card (Receive → Print) */
@media print {
  body.printing-qr { padding: 0; background: #fff; }
  body.printing-qr .top, body.printing-qr .tabs, body.printing-qr .toast, body.printing-qr #main > .view > :not(.qrcard), body.printing-qr .qrcard .row { display: none !important; }
  body.printing-qr main { margin: 0; padding: 0; } body.printing-qr .qrcard { box-shadow: none; border: 1px solid #000; max-width: 420px; margin: 0 auto; }
}
