:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --border: #e3e6ee;
  --text: #1a1d29;
  --ink: #0d0e1a;
  --muted: #6b7080;
  --accent: #4f46e5;
  --accent-2: #7c3aed;
  --accent-3: #f5a623;
  --good: #0f9d58;
  --warn: #b45309;
  --bad: #d33;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(20, 20, 60, 0.06), 0 1px 2px rgba(20, 20, 60, 0.04);
  --shadow-md: 0 8px 24px rgba(30, 20, 90, 0.08);
  --shadow-lg: 0 24px 60px rgba(30, 20, 90, 0.16);
  --font-display: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  /* .hero-premium below breaks out of .container's 1080px max-width using a
   * 100vw trick; 100vw includes the scrollbar's width in most browsers,
   * which can cause a 1px-ish horizontal overflow. This is the safety net. */
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* 2026-10-08 type refresh (Dhiren: "better fonts on the whole website",
   reference: light, tightly-tracked "Welcome Dhiren, where to today?"):
   Inter Tight for headings and figures, Inter for body text. */
h1, h2, h3, .font-display { font-family: var(--font-display); letter-spacing: -0.025em; font-weight: 600; }
h1 { font-weight: 500; letter-spacing: -0.035em; }

/* ---------------------------------------------------------------- topbar */
/* 2026-09-02, at Dhiren's request ("make something like this on the
   top... looks beautiful and premium") — a dark, rounded "floating pill"
   bar replacing the old plain white one, modeled on a reference screenshot
   (PointsFly.ai's navbar). Reuses the deep teal/ink palette flights.css
   already established (--fl-ink etc.) rather than inventing a second dark
   palette, so this reads as one consistent app rather than two. Secondary
   destinations (Transactions, Wallet, Settings) became icon-only buttons
   with a small CSS tooltip instead of text links, matching the reference's
   sparse middle nav + icon cluster instead of a long row of text links. */
:root {
  --nav-ink: #0b2027;
  --nav-ink-2: #16323b;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  padding: 14px 20px 0;
}
.topbar-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 10px 8px 18px;
  background: linear-gradient(180deg, var(--nav-ink-2), var(--nav-ink));
  border-radius: 999px;
  box-shadow: 0 14px 32px rgba(11, 32, 39, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}
.topbar .brand { font-weight: 700; font-size: 1.1rem; color: #fff; display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.topbar .brand-logo { height: 26px; width: auto; display: block; border-radius: 50%; }
/* Logo (2026-08-30, Dhiren-supplied artwork; icon swapped 2026-09-02 for a
   new purple wallet mark, same source pattern): the wordmark in that image
   is stacked under the icon, which doesn't fit a slim horizontal navbar, so
   the icon mark (src/public/icon-mark.png, cropped from the supplied image)
   pairs with this real HTML text instead. Recolored white (was a solid
   blue tuned for the old white bar) for contrast on the dark pill. */
.brand-word { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; color: #fff; }
.topbar nav { display: flex; align-items: center; gap: 2px; font-size: 0.88rem; }
.topbar nav a:not(.btn):not(.topbar-icon-btn) {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 700;
  padding: 9px 16px;
  border-radius: 999px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.topbar nav a:not(.btn):not(.topbar-icon-btn):hover { background: rgba(255, 255, 255, 0.1); color: #fff; text-decoration: none; }
.topbar .muted { color: rgba(255, 255, 255, 0.6); }
.topbar-divider { width: 1px; height: 20px; background: rgba(255, 255, 255, 0.16); margin: 0 4px; }
.topbar-email { font-size: 0.82rem; padding: 0 4px; color: rgba(255, 255, 255, 0.72); }
.topbar .btn-sm { padding: 8px 18px; font-size: 0.85rem; }
.topbar nav a.btn.btn-sm { background: #fff; color: var(--nav-ink); font-weight: 700; }
.topbar nav a.btn.btn-sm:hover { background: rgba(255, 255, 255, 0.88); }
.topbar nav a:not(.btn.btn-sm)[href="/login"] { color: rgba(255, 255, 255, 0.72); }

/* Icon-only utility buttons (Transactions / Wallet / Settings) — a real
   circular button, not a text link, with a small dark tooltip chip that
   fades in on hover/focus instead of relying on the native title tooltip. */
.topbar-icons { display: flex; align-items: center; gap: 4px; }
.topbar-icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.82);
  flex: 0 0 auto;
}
.topbar-icon-btn svg { width: 17px; height: 17px; }
.topbar-icon-btn:hover, .topbar-icon-btn:focus-visible { background: rgba(255, 255, 255, 0.18); color: #fff; text-decoration: none; outline: none; }
.topbar-icon-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: var(--nav-ink);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s, transform 0.12s;
  box-shadow: 0 6px 16px rgba(11, 32, 39, 0.35);
  z-index: 5;
}
.topbar-icon-btn:hover::after, .topbar-icon-btn:focus-visible::after { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 2026-10-08, at Dhiren's request ("top bar on mobile looks unaligned,
   not fitting and spilling below. All should be in one line"): the bar no
   longer wraps to a second row on phones. Instead it slims down: "Add card"
   moves into the account menu, the Ask CredPo pill shows just its icon, and
   the round buttons get a little smaller, so logo + Ask + 3 icons + avatar
   fit on one line down to 360px wide (the wordmark hides below that). */
.account-dropdown-addcard { display: none; }
@media (max-width: 720px) {
  .topbar { padding: 10px 12px 0; }
  .topbar-inner { flex-wrap: nowrap; gap: 10px; padding: 7px 8px 7px 14px; }
  .topbar nav { flex-wrap: nowrap; gap: 4px; font-size: 0.84rem; }
  .topbar nav a:not(.btn):not(.topbar-icon-btn) { padding: 7px 11px; }
  .topbar-divider { display: none; }
  .topbar-email { display: none; }
  .topbar-icon-btn::after { display: none; }
  .topbar nav a.topbar-addcard { display: none; }
  .account-dropdown-addcard { display: block; }
  .topbar-icons { gap: 4px; }
  .topbar-icon-btn { width: 36px; height: 36px; }
  .topbar .brand { gap: 7px; min-width: 0; }
  .brand-word { font-size: 1.05rem; }
}

@media (max-width: 480px) {
  /* Logged-out nav: drop "Pricing" so Log in + Sign up fit beside the logo
     (it's one tap away from the home page and the auth screens). */
  .topbar nav a[href="/pricing"] { display: none; }
}

@media (max-width: 374px) {
  .brand-word { display: none; }
}

.container { max-width: 1080px; margin: 0 auto; padding: 28px 20px 80px; }

/* --------------------------------------------------------------- footer */
/* 2026-09-02, at Dhiren's request ("Add privacy policy and terms page")
   the site had no footer at all, so /privacy and /terms had no discoverable
   link anywhere in the UI beyond a direct URL. This adds a minimal, quiet
   footer to every page. */
.site-footer { border-top: 1px solid var(--border); margin-top: 24px; }
.site-footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px 20px 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  font-size: 0.85rem;
  color: var(--muted);
}
.site-footer-inner a { color: var(--muted); }
.site-footer-inner a:hover { color: var(--text); }

h1 { font-size: 1.6rem; margin: 0 0 6px; }
h2 { font-size: 1.2rem; margin: 0 0 12px; }
h3 { font-size: 1rem; margin: 0 0 8px; }
p.subtitle { color: var(--muted); margin-top: 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 18px;
}

.copy-box { display: flex; align-items: center; gap: 10px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin: 10px 0; flex-wrap: wrap; }
.copy-box code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.86rem; word-break: break-all; flex: 1 1 auto; }
.copy-box button { flex: 0 0 auto; padding: 6px 14px; font-size: 0.82rem; }
.setup-steps { display: grid; gap: 14px; grid-template-columns: 1fr; margin: 16px 0; }
@media (min-width: 720px) { .setup-steps { grid-template-columns: repeat(3, 1fr); } }
.setup-steps li { list-style: none; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
.setup-steps .step-num { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 0.78rem; font-weight: 700; margin-bottom: 8px; }
.setup-steps strong { display: block; margin-bottom: 4px; }
.setup-steps p { margin: 0; color: var(--muted); font-size: 0.85rem; }

.card-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .card-grid { grid-template-columns: 1fr 1fr; } }

.card-header { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 10px; flex-wrap: wrap; }
.card-header .bank { color: var(--muted); font-size: 0.85rem; }
.card-header .variant { font-weight: 700; font-size: 1.05rem; }
.card-header .last4 { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); }
.card-visual { flex: 0 0 auto; width: 200px; max-width: 42%; }
.card-visual svg { width: 100%; height: auto; display: block; border-radius: 10px; box-shadow: 0 2px 8px rgba(20, 20, 40, 0.18); }
.card-visual a { display: block; }
.card-header-info { flex: 1 1 220px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; min-width: 0; }
@media (max-width: 480px) { .card-visual { width: 160px; } }

/* 2026-09-03, at Dhiren's request: the statement's headline numbers (Total
   Credit Limit, Available Credit Limit, Amount Due, Due Date), sitting as
   its own flex child between .card-visual and .card-header-info in
   .card-header above — added, not inserted into either of those two, so
   neither one's own internal alignment (bank/variant/last4 left, balance
   right) changes at all. Renders nothing when there's no statement parsed
   yet (see cardView.ts's renderStatementSummary), so an unaffected card's
   header layout is pixel-identical to before this was added. */
.card-statement-summary { flex: 1 1 200px; display: flex; flex-direction: column; justify-content: center; gap: 7px; padding: 2px 0; border-left: 1px solid var(--border); border-right: 1px solid var(--border); padding-left: 16px; padding-right: 16px; }
.card-statement-summary .stat-row { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; font-size: 0.82rem; }
.card-statement-summary .stat-row span { color: var(--muted); }
.card-statement-summary .stat-row strong { font-weight: 700; white-space: nowrap; }
@media (max-width: 720px) { .card-statement-summary { border-left: none; border-right: none; padding-left: 0; padding-right: 0; } }

.card-picker { max-height: 480px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; padding: 14px; background: var(--bg); }
.card-picker-bank { margin-bottom: 16px; }
.card-picker-bank:last-child { margin-bottom: 0; }
.card-picker-bank h3 { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin: 0 0 8px; }
.card-picker-bank h3 svg { border-radius: 5px; flex: 0 0 auto; }
.card-picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; align-items: start; }
.card-tile { position: relative; border-radius: 12px; background: var(--surface); overflow: hidden; }
.card-tile-select { position: relative; border: 2px solid transparent; border-radius: 12px 12px 0 0; padding: 6px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; transition: border-color 0.15s, background 0.15s; }
.card-tile:has(.card-tile-select:hover) { background: #eef0f7; }
.card-tile-select input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.card-tile:has(input:checked) { box-shadow: 0 0 0 2px var(--accent); }
.card-tile:has(input:checked) .card-tile-select { border-color: var(--accent); background: #eef0ff; }
.card-tile-art svg, .card-tile-art img { width: 100%; height: auto; display: block; border-radius: 8px; box-shadow: 0 1px 4px rgba(20, 20, 40, 0.18); }
.card-tile-name { font-size: 0.76rem; text-align: center; font-weight: 600; line-height: 1.25; }
.card-tile[hidden], .card-picker-bank[hidden] { display: none; }

.card-tile-rewards { border-top: 1px solid var(--border); }
.card-tile-rewards summary {
  cursor: pointer;
  list-style: none;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  text-align: center;
  padding: 5px 6px;
  user-select: none;
}
.card-tile-rewards summary::-webkit-details-marker { display: none; }
.card-tile-rewards summary::before { content: "▾ "; }
.card-tile-rewards[open] summary::before { content: "▴ "; }
.card-tile-rewards-body {
  padding: 2px 10px 10px;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--text);
  max-height: 260px;
  overflow-y: auto;
}
.card-tile-rewards-body p { margin: 0 0 6px; }
.card-reward-base { color: var(--text); }
.card-reward-milestones { margin: 0 0 6px; padding-left: 16px; }
.card-reward-milestones li { margin-bottom: 4px; }
.card-reward-excluded, .card-reward-nomilestones { color: var(--muted); }
.card-reward-notes { color: var(--muted); font-size: 0.7rem; }

.points-balance { font-size: 1.9rem; font-weight: 700; color: var(--accent); }
.points-label { color: var(--muted); font-size: 0.82rem; }

.progress-track { background: #eef0f7; border-radius: 999px; height: 8px; overflow: hidden; margin: 6px 0; }
.progress-fill { background: linear-gradient(90deg, var(--accent), var(--accent-2)); height: 100%; }
.progress-row { font-size: 0.82rem; color: var(--muted); display: flex; justify-content: space-between; margin-top: 2px; }

.milestone { border-top: 1px dashed var(--border); padding-top: 8px; margin-top: 8px; }
.milestone-title { font-size: 0.88rem; display: flex; justify-content: space-between; }
.milestone.achieved .milestone-title { color: var(--good); font-weight: 600; }
/* Limited-time offers (renderPromotions in routes/cardView.ts) */
.promo { border-top: 1px dashed var(--border); padding-top: 10px; margin-top: 10px; }
.promo-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.promo-badge { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); padding: 2px 8px; border-radius: 999px; }
.promo-window { font-size: 0.78rem; color: var(--muted); }
.promo.achieved .milestone-title { color: var(--good); font-weight: 600; }
.promo-track { position: relative; overflow: visible; }
.promo-track .progress-fill { border-radius: 999px; }
.promo-marker { position: absolute; top: 50%; width: 10px; height: 10px; margin-left: -5px; transform: translateY(-50%); border-radius: 50%; background: var(--surface); border: 2px solid var(--muted); box-sizing: border-box; }
.promo-marker.reached { border-color: var(--good); background: var(--good); }
.promo-levels { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 2px; }
.promo-level { font-size: 0.76rem; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); }
.promo-level.reached { border-color: var(--good); color: var(--good); font-weight: 600; }
.promo-terms { margin-top: 4px; }

form.stack { display: flex; flex-direction: column; gap: 12px; max-width: 420px; }
.inline-form { display: inline; }
label { font-size: 0.85rem; font-weight: 600; color: var(--text); }
input, select {
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  background: var(--surface);
  color: var(--text);
  width: 100%;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

button, .btn {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-block;
}
button:hover, .btn:hover { background: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%); text-decoration: none; }
button.secondary { background: transparent; color: var(--accent); border: 1px solid var(--border); }
button.danger { background: transparent; color: var(--bad); border: 1px solid var(--border); padding: 4px 10px; font-size: 0.8rem; }
.link-btn { background: none; border: none; color: var(--muted); cursor: pointer; padding: 0; font: inherit; }
.link-btn:hover { color: var(--accent); }

/* Premium gradient CTA button — used on the hero and other high-emphasis spots. */
.btn-glow {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.35);
  border: none;
}
.btn-glow:hover { background: linear-gradient(135deg, var(--accent-2) 0%, var(--accent) 100%); box-shadow: 0 10px 24px rgba(79, 70, 229, 0.45); }
.btn-ghost-light {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
}
.btn-ghost-light:hover { background: rgba(255, 255, 255, 0.24); }

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; }
td.amount { font-variant-numeric: tabular-nums; }
/* 2026-09-02: card-image thumbnail (renderCardThumb, cardArt.ts) dropped
   into a table cell on the Transactions page — vertically centers it
   against the row's text instead of the default top-alignment table cells
   get. */
td.txn-card-cell { vertical-align: middle; }
td.txn-card-cell > span:first-child { vertical-align: middle; margin-right: 2px; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 0.72rem; font-weight: 600; }
.tag-manual { background: #eef0f7; color: var(--muted); }
.tag-gmail { background: #e6f4ea; color: var(--good); }
.tag-excluded { background: #fdeceb; color: var(--bad); }

.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; font-size: 0.9rem; }
.flash-error { background: #fdeceb; color: var(--bad); }
.flash-success { background: #e6f4ea; color: var(--good); }

.empty-state { text-align: center; color: var(--muted); padding: 40px 20px; }

/* ---------------------------------------------------------------- /loyalty account rows */
/* 2026-09-02, at Dhiren's request ("redesign this page with brand logos
   and better alignment") — replaces the old plain <table> (Program /
   Category / Tier / Points balance / blank columns, which didn't align
   well once program names got long) with a logo-led row list, same
   left-brand / right-number layout as the wallet card tiles and the
   Flights/Hotels program cards elsewhere in the app. Uses flights.css's
   .fl-tag for the Airline/Hotel pill (this page loads flights.css as an
   extra stylesheet just for that + the logo SVGs' own sizing). */
.loy-list { margin-top: 8px; }
.loy-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 2px;
  border-bottom: 1px solid var(--border);
}
.loy-row:last-child { border-bottom: none; }
.loy-row-brand { display: flex; align-items: center; gap: 12px; flex: 1 1 auto; min-width: 0; }
.loy-row-brand svg { flex: 0 0 auto; }
.loy-row-text { min-width: 0; }
.loy-row-name { font-weight: 700; font-size: 0.95rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.loy-row-meta { display: flex; align-items: center; gap: 8px; margin-top: 5px; }
.loy-row-tier { font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.loy-row-balance { font-weight: 700; font-family: var(--font-display); font-size: 1.05rem; color: var(--text); text-align: right; white-space: nowrap; flex: 0 0 auto; min-width: 100px; }
.loy-row-unit { display: block; font-size: 0.66rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
.loy-row-remove-form { flex: 0 0 auto; }
.loy-row-remove { font-size: 0.78rem; padding: 6px 12px; }
@media (max-width: 640px) {
  .loy-row { flex-wrap: wrap; }
  .loy-row-balance { order: 3; min-width: 0; text-align: left; margin-left: 50px; }
  .loy-row-remove-form { order: 4; margin-left: 50px; margin-top: 2px; }
}

.hero { text-align: center; padding: 60px 20px; }
.hero h1 { font-size: 2.2rem; }
.hero p { color: var(--muted); max-width: 560px; margin: 12px auto 28px; }

.catalog-group { margin-bottom: 6px; }
.helper-text { font-size: 0.8rem; color: var(--muted); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.plain-list { list-style: none; margin: 6px 0 0; padding: 0; font-size: 0.85rem; }
.plain-list li { padding: 3px 0; border-bottom: 1px solid var(--border); }
.plain-list li:last-child { border-bottom: none; }

/* ---------------------------------------------------------------- premium hero
 * Full-bleed gradient "mesh" hero used on the logged-out landing page and the
 * logged-in dashboard's "Welcome back" header. Deliberately generated (a
 * layered gradient + a faint dot-grid + two soft glow blobs), not a stock
 * photo — nothing to source/license, and it reads as its own visual identity
 * rather than a copy of any reference site's hero photography. Pulls the
 * page's floating panel up over its bottom edge the same way a bank/fintech
 * app oversells a "premium" feel: content that overlaps the color block.
 */
.hero-premium {
  position: relative;
  /* Break out of the parent <main class="container"> (max-width: 1080px)
   * so the gradient spans the full browser width instead of stopping at
   * the container's edges. calc(50% - 50vw) as a margin shifts the box's
   * edge from the container's edge out to the true viewport edge. */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: -28px;
  padding: 56px 20px 96px;
  overflow: hidden;
  background:
    radial-gradient(1100px 520px at 12% -10%, rgba(245, 166, 35, 0.35), transparent 60%),
    radial-gradient(900px 480px at 105% 10%, rgba(124, 58, 237, 0.55), transparent 55%),
    linear-gradient(135deg, #312e81 0%, #4f46e5 45%, #7c3aed 100%);
  color: #fff;
}
.hero-premium::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
}
.hero-premium-inner { position: relative; max-width: 1040px; margin: 0 auto; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fde9c2;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero-premium h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 400;
  line-height: 1.08;
  margin: 0 0 16px;
  letter-spacing: -0.045em;
  max-width: 760px;
}
.hero-premium p.hero-sub {
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 0 26px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 8px; }
.hero-actions .btn { padding: 12px 22px; font-size: 0.95rem; border-radius: 10px; }

/* The floating panel: pulled up over the hero's bottom edge via negative
 * margin, so it visually "sits on" the color block — stats or feature
 * highlights depending on the page. */
.hero-floating-panel {
  position: relative;
  max-width: 1040px;
  margin: -64px auto 32px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 22px 24px;
  display: grid;
  gap: 18px;
}
@media (min-width: 720px) { .hero-floating-panel { grid-template-columns: repeat(var(--panel-cols, 3), 1fr); padding: 26px 30px; } }

.stat-item { display: flex; align-items: center; gap: 14px; }
.stat-icon {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: linear-gradient(135deg, #eef0ff, #f6ecff);
  color: var(--accent);
}
.stat-value { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--ink); line-height: 1.15; }
.stat-label { color: var(--muted); font-size: 0.8rem; }

.hero-quick-links { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 4px; border-top: 1px solid var(--border); margin-top: 4px; grid-column: 1 / -1; }
.hero-quick-links a {
  font-weight: 700;
  font-size: 0.84rem;
  color: var(--accent);
  background: #f4f4fd;
  padding: 8px 14px;
  border-radius: 999px;
}
.hero-quick-links a:hover { background: #eaeaff; text-decoration: none; }

@media (max-width: 640px) {
  .hero-premium { padding: 40px 16px 72px; }
  .hero-floating-panel { margin: -48px 4px 24px; padding: 18px; }
}

.feature-item { display: flex; gap: 14px; align-items: flex-start; }
.feature-item .stat-icon { background: linear-gradient(135deg, #fff3df, #ffe6c2); color: var(--warn); }
.feature-item h3 { margin: 0 0 3px; font-size: 0.95rem; }
.feature-item p { margin: 0; color: var(--muted); font-size: 0.84rem; line-height: 1.45; }

.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 4px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- account menu (topbar avatar + dropdown) */
.account-menu { position: relative; }
.account-avatar { background: none; border: none; padding: 0; cursor: pointer; display: flex; align-items: center; border-radius: 999px; }
.avatar-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  font-family: var(--font-display);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
}
.avatar-circle-lg { width: 44px; height: 44px; font-size: 1rem; flex: 0 0 auto; }
.account-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 260px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  z-index: 30;
}
.account-dropdown[hidden] { display: none; }
.account-dropdown-header { display: flex; align-items: center; gap: 10px; padding: 10px 8px 12px; }
.account-dropdown-name { font-weight: 700; font-size: 0.92rem; color: var(--ink); }
.account-dropdown-email { font-size: 0.78rem; color: var(--muted); word-break: break-all; }
.account-dropdown a, .account-dropdown-signout {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 8px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}
.account-dropdown a:hover, .account-dropdown-signout:hover { background: #f0f1fb; text-decoration: none; color: var(--accent); }
.account-dropdown-signout { color: var(--bad); }
.account-dropdown-signout:hover { background: #fdeceb; color: var(--bad); }
.account-dropdown hr { border: none; border-top: 1px solid var(--border); margin: 6px 0; }

/* ---------------------------------------------------------------- account settings page */
.account-page-grid { display: grid; gap: 22px; grid-template-columns: 1fr; margin-top: 18px; }
@media (min-width: 820px) { .account-page-grid { grid-template-columns: 180px 1fr; align-items: start; } }
.account-tabs { display: flex; flex-direction: row; gap: 6px; overflow-x: auto; }
@media (min-width: 820px) { .account-tabs { position: sticky; top: 84px; flex-direction: column; } }
.account-tab-link { padding: 9px 12px; border-radius: 8px; font-weight: 600; font-size: 0.88rem; color: var(--muted); white-space: nowrap; }
.account-tab-link:hover { background: #f0f1fb; color: var(--accent); text-decoration: none; }
.account-sections { min-width: 0; }
.account-section { scroll-margin-top: 84px; }
.account-settings-row, .account-plan-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.account-settings-row-title { font-weight: 700; font-size: 0.92rem; }
.account-settings-row-sub { color: var(--muted); font-size: 0.82rem; margin-top: 2px; }

/* ---------------------------------------------------------------- My Wallet page */
.wallet-header { align-items: flex-end; }
.wallet-value-pill {
  background: linear-gradient(135deg, #eef0ff, #f6ecff);
  color: var(--accent);
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 1.05rem;
  padding: 10px 18px;
  border-radius: 999px;
  white-space: nowrap;
}
.wallet-value-pill span { font-weight: 600; font-size: 0.72rem; color: var(--muted); font-family: "Inter", sans-serif; margin-left: 4px; }

.wallet-stats-row { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 18px 0 22px; }
@media (min-width: 820px) { .wallet-stats-row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 820px) { .wallet-stats-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.wallet-stat-card { margin-bottom: 0; padding: 16px; }

.wallet-main-grid { display: grid; gap: 18px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 980px) { .wallet-main-grid { grid-template-columns: 1fr 320px; } }

/* 2026-09-02, at Dhiren's request ("combine loyalty under wallet only"):
   the loyalty accounts panel folded onto this page from the old /loyalty
   page — see wallet.ts's loyaltySectionHtml. Sits full-width below the
   cards grid + donut, same top margin as the gap between those two. */
.wallet-loyalty-panel { margin-top: 18px; }

.wallet-cards-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.wallet-filters { display: flex; align-items: center; gap: 10px; }
.wallet-filters select { width: auto; padding: 8px 10px; font-size: 0.85rem; }

.wallet-card-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.wallet-tile {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  transition: box-shadow 0.15s, transform 0.15s;
  color: inherit;
}
.wallet-tile:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); text-decoration: none; }
.wallet-tile-art { padding: 14px 14px 0; }
.wallet-tile-body { padding: 12px 14px 16px; }
.wallet-tile-bank { display: inline-flex; align-items: center; gap: 6px; font-size: 0.72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
.wallet-tile-bank img, .wallet-tile-bank svg { border-radius: 4px; flex: 0 0 auto; }
.wallet-tile-name { font-weight: 700; font-size: 0.98rem; margin-top: 4px; }
.wallet-tile-last4 { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); font-size: 0.82rem; margin-top: 2px; }
.wallet-tile-footer { display: flex; align-items: baseline; gap: 5px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); }
.wallet-tile-points { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.wallet-tile-unit { color: var(--muted); font-size: 0.78rem; }
.wallet-tile-milestone { margin-left: auto; font-size: 0.78rem; }
.wallet-tile[hidden] { display: none; }

.wallet-side-panel { text-align: left; }
.wallet-side-panel-head { font-size: 0.74rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 10px; }
.wallet-donut-wrap { display: flex; justify-content: center; padding: 6px 0; }
.wallet-donut-value { font-family: var(--font-display); font-weight: 700; font-size: 0.92rem; fill: var(--ink); }
.wallet-donut-label { font-size: 0.55rem; font-weight: 700; letter-spacing: 0.05em; fill: var(--muted); }
.wallet-legend { display: flex; flex-direction: column; gap: 8px; }
.wallet-legend-row { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; }
.wallet-legend-dot { width: 9px; height: 9px; border-radius: 999px; flex: 0 0 auto; }
.wallet-legend-label { flex: 1; color: var(--text); }
.wallet-legend-pct { color: var(--muted); font-weight: 600; font-size: 0.8rem; }
.wallet-side-links { display: flex; flex-direction: column; gap: 6px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.wallet-side-links a { font-weight: 700; font-size: 0.85rem; }

/* ------------------------------------------------------- home page (dashboard) */
/* 2026-09-02, at Dhiren's request ("Home page should be similar to
   app.pointsfly.ai... Booking Page can be made the home page"): /dashboard
   opens with the Flights page's own hero+search (renderHeroSearch, shared
   between both routes — see flights.ts). The hero itself (.fl-hero, in
   flights.css) already breaks out to the full viewport width on its own —
   this wrapper just cancels .container's own padding above/beside it so
   nothing else pushes the full-bleed hero down; the rest of the home page
   stays inside the normal .container padding below it. */
.home-hero-wrap { margin: -28px -20px 0; }
.home-hero-wrap .fl-searchcard { max-width: none; }

/* 2026-09-02, full redesign pass ("revamp the whole design of home page",
   matching pointsfly.ai's reference screenshots more closely): "My Points"
   and "A glimpse of your spending" moved off the plain bordered `.card`
   container onto this softer `.home-section` — white, rounded, a subtle
   shadow instead of a hard border, closer to how the reference sections
   sit almost directly on the page background. */
.home-section { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 26px 28px; margin-top: 20px; }
.home-section-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 4px; }
.home-section-head-plain { margin-bottom: 0; }
.home-section-icon { width: 46px; height: 46px; border-radius: 13px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.home-section-icon svg { width: 22px; height: 22px; }
.home-section-head-text { flex: 1 1 auto; min-width: 0; }
.home-section-head-text h2 { margin: 0; font-size: 1.5rem; }
.home-section-head-text .subtitle { margin: 4px 0 0; }
.home-section-head-plain h2 { font-size: 1.7rem; }
.home-points-count { font-size: 0.82rem; font-weight: 700; color: var(--muted); white-space: nowrap; padding-top: 4px; }

.home-points-total { margin: 20px 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.home-points-total-figures { min-width: 0; }
.home-points-total-num { font-family: var(--font-display); font-weight: 700; font-size: 2.4rem; color: var(--ink); line-height: 1.1; }
.home-points-total-label { color: var(--muted); font-size: 0.85rem; margin-top: 2px; }
.home-points-total-value { margin-top: 10px; font-weight: 700; color: var(--accent); padding-top: 10px; border-top: 1px solid var(--border); display: inline-block; }
.home-points-total-value span { font-weight: 600; font-size: 0.78rem; color: var(--muted); }
/* 2026-09-02: decorative illustration (Dhiren-supplied, cropped tight and
   background-removed locally — see src/public/images/ — the original
   hotlinked source was a mostly-blank 1366x768 slide image, which is why an
   earlier pass showed it in an awkward white box). Purely decorative, so
   it's the first thing to go on a narrow screen. */
.home-points-total-img { width: 168px; height: auto; flex: 0 0 auto; }
@media (max-width: 640px) { .home-points-total-img { display: none; } }
.home-points-list-head { font-size: 0.74rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin: 4px 0 12px; }

/* Shared "elevated row" treatment for both the points rows and the recent
   activity rows — a real card (rounded, subtle shadow) per row instead of
   one plain divided list, matching the reference's card-shaped rows. Layered
   onto the existing .loy-row / .home-activity-row classes (rather than
   replacing them) so /loyalty's own plain list rows are untouched. */
.home-row-list { display: flex; flex-direction: column; gap: 10px; }
.home-row-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  padding: 12px 16px;
  margin: 0;
}
a.home-row-card { text-decoration: none; color: inherit; display: flex; align-items: center; justify-content: space-between; gap: 12px; transition: box-shadow 0.15s, transform 0.15s; }
a.home-row-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.home-row-card .loy-row-name { text-transform: uppercase; letter-spacing: 0.01em; font-size: 0.88rem; }
.home-row-right { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.home-row-chevron { color: var(--muted); font-size: 1.3rem; line-height: 1; }

.home-view-all-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
  padding: 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: box-shadow 0.15s, transform 0.15s;
}
.home-view-all-btn:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); text-decoration: none; }

/* "A glimpse of your spending": illustration + stat tiles row, activity
   list, and (on wide screens) a right-hand column for the card-art fan —
   .home-spend-body is the two-column split, .home-spend-main the left
   (text) column that gets all the remaining width. */
.home-spend-body { display: flex; gap: 24px; align-items: flex-start; margin-top: 18px; }
.home-spend-main { flex: 1 1 auto; min-width: 0; }
.home-spend-stats-row { display: flex; align-items: center; gap: 24px; margin: 0 0 6px; flex-wrap: wrap; }
.home-spend-illustration { width: 150px; height: auto; flex: 0 0 auto; }
@media (max-width: 640px) { .home-spend-illustration { display: none; } }
.home-spend-stats { display: flex; gap: 14px; flex-wrap: wrap; margin: 0; flex: 1 1 auto; }
.home-stat-tile { background: var(--bg); border-radius: 12px; padding: 12px 18px; flex: 1 1 100px; }
.home-spend-stat-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 700; }
.home-spend-stat-value { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: var(--ink); margin-top: 2px; }
.home-activity-head { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 0.74rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 10px; }
.home-activity-row { display: flex; align-items: center; gap: 12px; }
.home-activity-icon { width: 38px; height: 38px; border-radius: 11px; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 1.05rem; flex: 0 0 auto; }
.home-activity-body { flex: 1 1 auto; min-width: 0; }
.home-activity-merchant { font-weight: 700; font-size: 0.9rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-activity-meta { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }
.home-activity-right { text-align: right; flex: 0 0 auto; }
.home-activity-amount { font-weight: 700; font-size: 0.92rem; color: var(--text); }
.home-activity-pts { display: block; font-size: 0.74rem; font-weight: 700; color: var(--good, #0f9d58); margin-top: 2px; }
.home-activity-card-tag { display: block; font-size: 0.7rem; font-weight: 700; color: var(--muted); margin-top: 2px; }

/* Transactions page's own "Points earned" column (2026-09-03, Dhiren's
   request: "+96 should be in green"). Scoped to its own class rather than
   reusing .home-activity-pts, since that one's shared with the home page's
   recent-activity list and Dhiren's ask was specifically for this page. */
.points-earned-value { color: var(--good, #0f9d58); font-weight: 700; }

/* Decorative fan of the user's own generated card art (never a stock
   photo — see cardArt.ts) standing in for pointsfly.ai's large fanned-cards
   photo, which bleeds off the right edge of its section there. This column
   only has room to breathe on wide screens; a phone or narrow tablet just
   drops it rather than squeezing the text column. */
.home-spend-fan-wrap { flex: 0 0 220px; display: flex; align-items: center; justify-content: center; align-self: stretch; }
@media (max-width: 900px) { .home-spend-fan-wrap { display: none; } }
.home-fan { position: relative; width: 190px; height: 210px; }
.home-fan-card { position: absolute; top: 0; left: 0; width: 170px; border-radius: 6px; overflow: hidden; box-shadow: 0 10px 24px rgba(20,20,60,0.22); transform-origin: bottom left; }
.home-fan-card svg, .home-fan-card img { display: block; width: 100%; height: auto; }
@media (max-width: 640px) { .home-fan { display: none; } }

/* ---------------------------------------------------------------- card detail: rewards & transfer partners */
.reward-rate-rows { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.reward-rate-row { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; flex-wrap: wrap; }
.reward-rate-tag {
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  background: #eef0f7;
  padding: 3px 9px;
  border-radius: 999px;
  min-width: 84px;
  text-align: center;
}
.reward-rate-tag-accent { color: var(--accent); background: #eef0ff; }
.reward-portal-note { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border); font-size: 0.88rem; color: var(--text); }

/* ---------------------------------------------------------------- transactions / spend intelligence page */
.muted { color: var(--muted); }
.range-pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 2px; }
.range-pill {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  background: #eef0f7;
  white-space: nowrap;
}
.range-pill:hover { color: var(--accent); text-decoration: none; background: #e4e6f5; }
.range-pill.is-active { color: #fff; background: var(--accent); }

/* Transactions page: history filter (card + time period) */
.txn-filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; margin: 10px 0 0; }
.txn-filter-field { display: flex; flex-direction: column; min-width: 150px; flex: 1 1 150px; }
.txn-filter-field label { font-size: 0.8rem; margin-bottom: 4px; }
.txn-filter-actions { display: flex; align-items: center; gap: 12px; padding-bottom: 2px; }
.txn-filter-summary { margin: 12px 0 8px; padding: 10px 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; font-size: 0.9rem; }
.txn-fx { font-size: 0.75rem; color: var(--muted); font-weight: 400; white-space: nowrap; }

/* Installable app: /install page and the mobile install banner (2026-09-29) */
.install-page { max-width: 820px; margin: 0 auto; }
.install-hero { text-align: center; }
.install-icon { width: 88px; height: 88px; border-radius: 20px; box-shadow: var(--shadow-md); }
.install-done { color: var(--good); font-weight: 600; }
.install-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.install-steps { padding-left: 20px; line-height: 1.7; }
.install-steps li { margin-bottom: 6px; }
.install-notes { padding-left: 20px; line-height: 1.7; }
.install-btn { margin-bottom: 12px; }
.install-banner {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 1000;
  display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg);
  max-width: 520px; margin: 0 auto;
}
.install-banner img { width: 36px; height: 36px; border-radius: 9px; flex: none; }
.install-banner-text { flex: 1; font-size: 0.88rem; line-height: 1.35; color: var(--text); }
.install-banner-action { flex: none; padding: 8px 14px; font-size: 0.85rem; }
.install-banner-close { flex: none; background: transparent; color: var(--muted); border: 0; font-size: 1.4rem; line-height: 1; padding: 4px 8px; box-shadow: none; }
.install-banner-close:hover { color: var(--text); background: transparent; }

/* ------------------------------------------------------------ Ask CredPo */
/* AI chat (routes/ask.ts): full page at /ask and a side panel on Home and
   flight search. 2026-10-08. */
.topbar nav a.topbar-ask { display: inline-flex; align-items: center; gap: 6px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-weight: 700; margin-right: 6px; }
.topbar nav a.topbar-ask:hover { background: linear-gradient(135deg, #5b53ef, #8b4cf0); }
.topbar nav a.topbar-ask svg { width: 15px; height: 15px; }
@media (max-width: 720px) {
  /* Phone: icon-only round button, same size as the other topbar icons. */
  .topbar nav a.topbar-ask:not(.btn):not(.topbar-icon-btn) { font-size: 0; gap: 0; width: 36px; height: 36px; padding: 0; margin-right: 0; justify-content: center; flex: 0 0 auto; }
  .topbar nav a.topbar-ask svg { width: 17px; height: 17px; }
}

.ask { display: flex; flex-direction: column; background: var(--surface); min-height: 0; }
.ask-page .ask { height: calc(100vh - 170px); height: calc(100dvh - 170px); min-height: 480px; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); border: 1px solid var(--border); overflow: hidden; }
.ask-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.ask-title { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.ask-logo { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.ask-logo svg { width: 17px; height: 17px; }
.ask-head-actions { display: flex; align-items: center; gap: 6px; }
.ask-new { font: inherit; font-size: 0.82rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.ask-new:hover { border-color: var(--accent); color: var(--accent); }
.ask-icon-btn { width: 32px; height: 32px; border-radius: 50%; border: none; background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.ask-icon-btn:hover { background: var(--bg); color: var(--text); text-decoration: none; }
.ask-icon-btn svg { width: 17px; height: 17px; }

.ask-scroll { flex: 1 1 auto; overflow-y: auto; padding: 20px 18px 8px; scroll-behavior: smooth; }
.ask-page .ask-scroll { padding: 28px max(18px, calc((100% - 760px) / 2)) 8px; }
.ask-welcome { text-align: center; padding: 24px 8px 8px; }
.ask-welcome[hidden] { display: none; }
.ask-welcome-logo { width: 52px; height: 52px; border-radius: 16px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--shadow-md); }
.ask-welcome-logo svg { width: 28px; height: 28px; }
.ask-welcome h2 { margin: 14px 0 6px; font-size: 1.45rem; }
.ask-welcome p { margin: 0 auto; color: var(--muted); max-width: 440px; }
.ask-starters { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 22px auto 0; max-width: 620px; text-align: left; }
.ask-starter { font: inherit; font-size: 0.88rem; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--bg); color: var(--text); cursor: pointer; text-align: left; line-height: 1.35; }
.ask-starter:hover { border-color: var(--accent); background: #f1f0fe; }

.ask-messages { display: flex; flex-direction: column; gap: 16px; }
.ask-msg { display: flex; gap: 10px; max-width: 100%; }
.ask-msg-user { justify-content: flex-end; }
.ask-msg-user .ask-bubble { background: var(--accent); color: #fff; border-radius: 18px 18px 4px 18px; padding: 10px 14px; max-width: 80%; white-space: pre-wrap; overflow-wrap: anywhere; }
.ask-avatar { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; display: inline-flex; align-items: center; justify-content: center; margin-top: 2px; }
.ask-avatar svg { width: 15px; height: 15px; }
.ask-msg-assistant .ask-bubble { flex: 1 1 auto; min-width: 0; padding-top: 3px; }
.ask-text p { margin: 0 0 10px; }
.ask-text p:last-child { margin-bottom: 0; }
.ask-text ul, .ask-text ol { margin: 4px 0 10px; padding-left: 20px; }
.ask-text li { margin: 3px 0; }
.ask-picks { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.ask-pick { border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px; background: var(--surface); }
.ask-pick-top { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08); }
.ask-pick-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ask-pick-name { flex: 1 1 140px; min-width: 0; font-weight: 700; line-height: 1.25; }
.ask-pick-rank { display: block; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.ask-pick-top .ask-pick-rank { color: var(--accent); }
.ask-pick-last4 { font-weight: 500; font-size: 0.8rem; color: var(--muted); }
.ask-pick-est { font-weight: 700; color: var(--good); font-size: 0.92rem; }
.ask-pick-reason { margin: 6px 0 0; font-size: 0.9rem; }
.ask-nudge { margin: 4px 0 0; font-size: 0.82rem; color: var(--warn); }
.ask-avoid { margin-top: 10px; font-size: 0.86rem; color: var(--muted); }
.ask-avoid strong { color: var(--bad); }
.ask-tips { margin: 10px 0 0; padding-left: 18px; font-size: 0.85rem; color: var(--muted); }
.ask-notice { margin: 0 0 8px; font-size: 0.82rem; color: var(--muted); }
.ask-error { color: var(--bad); margin: 0; }
.ask-typing { display: inline-flex; gap: 4px; padding: 10px 0; }
.ask-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); opacity: 0.4; animation: ask-blink 1.2s infinite; }
.ask-typing span:nth-child(2) { animation-delay: 0.2s; }
.ask-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes ask-blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }

.ask-composer { display: flex; align-items: flex-end; gap: 8px; margin: 8px 14px 4px; padding: 8px 8px 8px 14px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sm); }
.ask-page .ask-composer { margin: 8px max(14px, calc((100% - 760px) / 2)) 4px; }
.ask-composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12); }
.ask-composer textarea { flex: 1 1 auto; border: none; outline: none; resize: none; font: inherit; font-size: 0.97rem; line-height: 1.45; max-height: 160px; padding: 6px 0; background: transparent; color: var(--text); }
.ask-send { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; border: none; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.ask-send svg { width: 18px; height: 18px; }
.ask-send:disabled { opacity: 0.4; cursor: default; }
.ask-foot { margin: 2px 16px 10px; font-size: 0.72rem; color: var(--muted); text-align: center; }

/* Side panel + launcher (Home, flight search) */
.ask-launcher { position: fixed; right: 22px; bottom: 22px; z-index: 40; display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border: none; border-radius: 999px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font: inherit; font-weight: 700; box-shadow: var(--shadow-lg); cursor: pointer; }
.ask-launcher svg { width: 18px; height: 18px; }
.ask-launcher:hover { transform: translateY(-1px); }
.ask-launcher[hidden] { display: none; }
.ask-drawer { position: fixed; top: 92px; right: 16px; bottom: 16px; width: min(420px, calc(100vw - 32px)); z-index: 45; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); border: 1px solid var(--border); overflow: hidden; background: var(--surface); display: flex; }
.ask-drawer[hidden] { display: none; }
.ask-drawer .ask { flex: 1 1 auto; height: 100%; }
@media (min-width: 1280px) {
  /* Wide screens: the panel docks beside the page instead of covering it. */
  body.ask-docked main.container { margin-right: 452px; margin-left: max(20px, calc((100vw - 452px - 1080px) / 2)); }
}
@media (max-width: 700px) {
  .ask-drawer { top: 0; right: 0; bottom: 0; width: 100vw; border-radius: 0; border: none; }
  .ask-launcher { right: 14px; bottom: 14px; padding: 11px 15px; }
  .ask-page .ask { height: calc(100dvh - 120px); border-radius: 14px; }
}

/* Override the global button styles for the chat's own controls. */
.ask-send, .ask-icon-btn { padding: 0; }
.ask-send:hover { background: var(--accent-2); }
.ask-new:hover { background: #f1f0fe; }
.ask-starter:hover { color: var(--text); }
.ask-launcher:hover { background: linear-gradient(135deg, #5b53ef, #8b4cf0); }
.ask-scroll { min-height: 0; }
.ask-pick-route { margin: 6px 0 0; font-size: 0.8rem; font-weight: 600; color: var(--accent); }
.ask-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ask-link-btn { display: inline-flex; align-items: center; padding: 8px 14px; border-radius: 999px; background: #f1f0fe; color: var(--accent); font-weight: 600; font-size: 0.86rem; }
.ask-link-btn:hover { background: #e4e2fd; text-decoration: none; }

/* ------------------------------------------------- phone layout fixes */
/* 2026-10-08, from Dhiren's iPhone screenshots: the Wallet and
   Transactions stat tiles ran off the right edge with real-size numbers
   (₹16,66,283), wide tables widened the whole page, and the Ask CredPo page
   looked cut off because iOS zooms the page in when you tap a text box
   whose font is under 16px. */
.wallet-stat-card, .wallet-main-grid > *, .account-page-grid > *, .stat-item > div { min-width: 0; }
.table-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 720px) {
  input, select, textarea { font-size: 16px !important; }
}
@media (max-width: 480px) {
  .wallet-stats-row { gap: 10px; }
  .wallet-stat-card { padding: 12px; }
  /* Icon above the figure so a big number like ₹16,66,283 gets the tile's full width. */
  .wallet-stat-card .stat-item { flex-direction: column; align-items: flex-start; gap: 8px; }
  .wallet-stat-card .stat-icon { width: 34px; height: 34px; font-size: 1rem; border-radius: 10px; flex: 0 0 auto; }
  .wallet-stat-card .stat-value { font-size: clamp(1.05rem, 5.4vw, 1.3rem); overflow-wrap: anywhere; }
  .wallet-stat-card .stat-label { font-size: 0.74rem; line-height: 1.3; }
  .ask-starters { grid-template-columns: 1fr; }
}
.txn-refund { color: var(--good); font-weight: 600; }

/* Gmail sync progress (routes/gmail.ts, app.js startGmailSync) — 2026-10-09 */
.sync-progress { margin-top: 16px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg); }
.sync-progress[hidden] { display: none; }
.sync-bar { height: 10px; border-radius: 999px; background: #e7e6fb; overflow: hidden; }
.sync-bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 0.6s ease; }
.sync-bar-done span { background: var(--good); }
.sync-bar-indeterminate span { width: 35%; animation: sync-slide 1.2s ease-in-out infinite; }
@keyframes sync-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }
.sync-text { margin: 10px 0 0; font-size: 0.9rem; }
.sync-error { color: var(--bad); font-weight: 600; }

/* Transactions: spends that earned above the base rate (2026-10-10) */
tr.txn-accelerated td { background: #ecfdf3; }
tr.txn-accelerated td:first-child { box-shadow: inset 4px 0 0 var(--good); }
.txn-accel-tag { display: block; margin-top: 2px; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--good); }
.txn-accel-why { display: block; font-size: 0.72rem; color: var(--muted); white-space: nowrap; }

/* Transactions history table + summary bar (2026-10-10, Dhiren: "the card
   name column is spilling... it should be a straight line, same with date
   and other columns" and "the bar needs to be more beautiful"). */
.txn-table td, .txn-table th { white-space: nowrap; vertical-align: middle; }
.txn-table td { padding-top: 10px; padding-bottom: 10px; }
.txn-date { color: var(--muted); font-variant-numeric: tabular-nums; }
.txn-card { display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; max-width: 230px; }
.txn-card:hover .txn-card-name { color: var(--accent); }
.txn-card > span:first-child { flex: 0 0 auto; }
.txn-card-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.txn-card-last4 { color: var(--muted); font-size: 0.82rem; flex: 0 0 auto; }
.txn-merchant { display: inline-block; max-width: 170px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.txn-table .txn-fx { display: inline; color: var(--muted); font-size: 0.78rem; }
.txn-accel-pill { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: #d1fae5; color: #047857; font-size: 0.74rem; font-weight: 700; }

.txn-summary-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 14px 0 10px; padding: 16px 20px; border-radius: 16px; color: #fff; background: linear-gradient(120deg, #4338ca 0%, #6d28d9 55%, #a21caf 100%); box-shadow: 0 10px 24px rgba(79, 70, 229, 0.25); }
.txn-summary-card { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }
.txn-summary-dates { font-size: 0.85rem; opacity: 0.85; margin-top: 2px; }
.txn-summary-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.txn-summary-stat { display: flex; flex-direction: column; min-width: 96px; padding: 8px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.22); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.04em; opacity: 0.95; }
.txn-summary-stat span { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; text-transform: none; letter-spacing: -0.01em; }
@media (max-width: 600px) {
  .txn-summary-bar { padding: 14px; }
  .txn-summary-stats { width: 100%; }
  .txn-summary-stat { flex: 1 1 0; min-width: 0; padding: 8px 10px; }
  .txn-summary-stat span { font-size: 0.92rem; }
}
.txn-table { font-size: 0.88rem; }
.txn-table td, .txn-table th { padding-left: 8px; padding-right: 8px; }
.txn-actions { text-align: right; }
.txn-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; margin-left: 2px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; vertical-align: middle; }
.txn-icon-btn svg { width: 15px; height: 15px; pointer-events: none; }
.txn-icon-btn:hover { color: var(--accent); border-color: var(--accent); background: var(--surface); text-decoration: none; }
.txn-icon-danger:hover { color: var(--bad); border-color: var(--bad); background: #fff5f5; }
@media (max-width: 600px) {
  .txn-summary-stat { font-size: 0.6rem; letter-spacing: 0.02em; overflow: hidden; }
}

/* ---- Transactions: colourful KPI tiles (2026-10-09) ---- */
.txn-kpi-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 18px 0 22px; }
@media (min-width: 820px) { .txn-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.txn-kpi {
  --k1: #6366f1; --k2: #818cf8; --kt: #eef2ff;
  position: relative; overflow: hidden; min-width: 0;
  display: flex; align-items: center; gap: 14px;
  padding: 18px 18px; border-radius: 18px;
  background: linear-gradient(140deg, var(--kt) 0%, #fff 72%);
  border: 1px solid color-mix(in srgb, var(--k1) 18%, #fff);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px -14px color-mix(in srgb, var(--k1) 45%, transparent);
  transition: transform .15s ease, box-shadow .15s ease;
}
.txn-kpi:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(16,24,40,.05), 0 14px 30px -14px color-mix(in srgb, var(--k1) 55%, transparent); }
.txn-kpi::after {
  content: ""; position: absolute; right: -36px; top: -36px; width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--k2) 30%, transparent) 0%, transparent 70%);
  pointer-events: none;
}
.txn-kpi-icon {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--k1), var(--k2));
  box-shadow: 0 6px 14px -6px var(--k1);
}
.txn-kpi-icon svg { width: 22px; height: 22px; }
.txn-kpi-body { min-width: 0; position: relative; z-index: 1; }
.txn-kpi-period { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--k1); margin-bottom: 2px; }
.txn-kpi-value { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; color: var(--ink, #1a1d29); line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.txn-kpi-label { font-size: 0.86rem; color: var(--muted); margin-top: 2px; }
.txn-kpi-indigo  { --k1: #4f46e5; --k2: #818cf8; --kt: #eef2ff; }
.txn-kpi-violet  { --k1: #9333ea; --k2: #c084fc; --kt: #f5edff; }
.txn-kpi-sky     { --k1: #0284c7; --k2: #38bdf8; --kt: #e8f6fe; }
.txn-kpi-emerald { --k1: #059669; --k2: #34d399; --kt: #e7f8f1; }
.txn-kpi-amber   { --k1: #d97706; --k2: #fbbf24; --kt: #fff6e5; }
.txn-kpi-rose    { --k1: #e11d48; --k2: #fb7185; --kt: #ffeef1; }
@media (max-width: 640px) {
  .txn-kpi-grid { gap: 10px; }
  .txn-kpi { padding: 14px 12px; gap: 10px; flex-direction: column; align-items: flex-start; border-radius: 16px; }
  .txn-kpi-icon { width: 36px; height: 36px; border-radius: 11px; }
  .txn-kpi-icon svg { width: 18px; height: 18px; }
  .txn-kpi-value { font-size: clamp(1.05rem, 5.4vw, 1.3rem); }
  .txn-kpi-label { font-size: 0.76rem; }
  .txn-kpi-period { font-size: 0.6rem; }
}

/* ---- Transactions: Spend by card ---- */
.spend-panel-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-bottom: 18px; }
.spend-panel-head .range-pills { margin: 0; }
.spend-grid { display: grid; gap: 24px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 980px) { .spend-grid { grid-template-columns: minmax(0, 1fr) 280px; } }
.spend-list { min-width: 0; }
.spend-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 104px 84px 132px; align-items: center; gap: 14px;
  padding: 10px 12px; border-radius: 12px; transition: background .12s ease;
}
.spend-row + .spend-row { margin-top: 2px; }
.spend-row:not(.spend-row-head):hover { background: color-mix(in srgb, var(--seg) 7%, #fff); }
.spend-row-head { padding-top: 0; padding-bottom: 8px; border-bottom: 1px solid var(--border); border-radius: 0; margin-bottom: 6px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.spend-card-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.spend-thumb { display: inline-flex; flex: 0 0 auto; }
.spend-dot { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; background: var(--seg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--seg) 20%, #fff); }
.spend-card-name { font-weight: 600; color: var(--ink, #1a1d29); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.spend-card-last4 { flex: 0 0 auto; color: var(--muted); font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.spend-amt, .spend-pts { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.spend-amt { font-weight: 700; color: var(--ink, #1a1d29); }
.spend-pts { color: #475069; }
.spend-pts-unit { display: none; color: var(--muted); font-size: 0.8rem; }
.spend-row-head .spend-amt, .spend-row-head .spend-pts { font-weight: 700; color: var(--muted); }
.spend-share { display: flex; align-items: center; gap: 10px; }
.spend-row-head .spend-share { justify-content: flex-start; }
.spend-bar { flex: 1 1 auto; height: 8px; border-radius: 99px; background: #eef0f7; overflow: hidden; }
.spend-bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, color-mix(in srgb, var(--seg) 70%, #fff), var(--seg)); min-width: 0; }
.spend-pct { flex: 0 0 38px; text-align: right; font-weight: 700; font-size: 0.86rem; color: var(--ink, #1a1d29); font-variant-numeric: tabular-nums; }
.spend-row.is-zero { opacity: 0.5; }
.spend-row.is-zero .spend-dot { box-shadow: none; }
.spend-row.is-zero:hover { background: #f6f7fb; }

.spend-chart {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 22px 18px; border-radius: 18px;
  background: radial-gradient(120% 80% at 50% 0%, #f3f1ff 0%, #fafbff 55%, #fff 100%);
  border: 1px solid #ecebfb;
}
.spend-donut { width: 210px; height: 210px; max-width: 100%; filter: drop-shadow(0 10px 18px rgba(79, 70, 229, 0.12)); }
.spend-arc { transition: stroke-width .15s ease; cursor: default; }
.spend-arc:hover { stroke-width: 30; }
.spend-donut-value { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -0.02em; fill: var(--ink, #1a1d29); }
.spend-donut-label { font-size: 9.5px; font-weight: 700; letter-spacing: 0.12em; fill: var(--muted); }
.spend-chart-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.spend-chart-stats > div { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; text-align: center; font-size: 0.76rem; color: var(--muted); }
.spend-chart-stats span { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--ink, #1a1d29); }
.spend-chart-stats small { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.spend-chart-top { margin: 0; font-size: 0.82rem; color: var(--muted); text-align: center; }
.spend-chart-top strong { color: var(--ink, #1a1d29); }
.spend-chart-empty { text-align: center; }

@media (max-width: 640px) {
  .spend-grid { gap: 16px; }
  .spend-chart { order: -1; }
  .spend-row { grid-template-columns: minmax(0, 1fr) 96px; grid-template-areas: "card amt" "share pts"; gap: 8px 12px; padding: 12px 4px; }
  .spend-thumb { display: none; }
  .spend-card-cell { gap: 8px; }
  .spend-card-last4 { font-size: 0.76rem; }
  .spend-pts-unit { display: inline; }
  .spend-row + .spend-row { border-top: 1px solid #f0f1f6; border-radius: 0; margin-top: 0; }
  .spend-row-head { display: none; }
  .spend-row + .spend-row:nth-child(2) { border-top: 0; }
  .spend-card-cell { grid-area: card; }
  .spend-amt { grid-area: amt; }
  .spend-pts { grid-area: pts; font-size: 0.86rem; }
  .spend-share { grid-area: share; }
  .spend-chart { padding: 18px 12px; }
}

/* =====================================================================
   Polish pass (2026-10-09): Home, Wallet, Add card, Account, menu
   ===================================================================== */

/* Primary buttons get the gradient via the base `button, .btn` rule above. */
.btn.secondary, a.btn.secondary { background: #fff; color: var(--accent); border: 1px solid #dcdcf5; box-shadow: none; }
.btn.secondary:hover, a.btn.secondary:hover { background: #f3f2ff; }

/* ---- Account dropdown: links were inheriting the topbar's white text ---- */
.account-dropdown { width: 280px; padding: 8px; border-radius: 18px; border-color: #ececf6; box-shadow: 0 24px 60px -12px rgba(30, 20, 90, 0.28); }
.account-dropdown-header { margin: 0 0 6px; padding: 14px 12px; border-radius: 13px; background: linear-gradient(135deg, #eef2ff, #f5edff); }
.topbar nav .account-dropdown a:not(.btn):not(.topbar-icon-btn), .account-dropdown-signout {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 10px 12px; border-radius: 10px; font-size: 0.9rem; font-weight: 600; color: var(--text); white-space: nowrap;
}
.topbar nav .account-dropdown a:not(.btn):not(.topbar-icon-btn) svg { color: #8b8fa7; flex: 0 0 auto; }
.topbar nav .account-dropdown a:not(.btn):not(.topbar-icon-btn):hover { background: #f3f2ff; color: var(--accent); }
.topbar nav .account-dropdown a:not(.btn):not(.topbar-icon-btn):hover svg { color: var(--accent); }
.topbar nav .account-dropdown a.account-dropdown-addcard:not(.btn):not(.topbar-icon-btn) { display: none; }
@media (max-width: 640px) { .topbar nav .account-dropdown a.account-dropdown-addcard:not(.btn):not(.topbar-icon-btn) { display: flex; } }
.account-dropdown-signout { color: var(--bad); }
.account-dropdown-signout svg { color: var(--bad); }
.account-dropdown-signout:hover { background: #fff1f1; color: var(--bad); }

/* ---- Home: My Points hero ---- */
.home-section { border: 1px solid #ececf4; box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 12px 32px -20px rgba(30,20,90,.18); border-radius: 24px; }
.home-points-hero {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 28px 30px; border-radius: 20px; color: #fff; margin-bottom: 22px;
  background:
    radial-gradient(60% 120% at 100% 0%, rgba(236, 72, 153, 0.45) 0%, transparent 60%),
    radial-gradient(50% 90% at 0% 100%, rgba(56, 189, 248, 0.35) 0%, transparent 60%),
    linear-gradient(135deg, #312e81 0%, #4f46e5 45%, #7c3aed 100%);
  box-shadow: 0 18px 40px -20px rgba(79, 70, 229, 0.75);
}
.home-points-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 70% 120%, rgba(255,255,255,.12) 0, transparent 40%); pointer-events: none; }
.home-points-hero-text { position: relative; z-index: 1; min-width: 0; }
.home-points-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255,255,255,.85); background: rgba(255,255,255,.14); padding: 6px 12px; border-radius: 999px; }
.home-points-hero .home-points-total-num { color: #fff; font-size: clamp(2.2rem, 5vw, 3.2rem); letter-spacing: -0.03em; margin-top: 14px; }
.home-points-hero .home-points-total-label { color: rgba(255,255,255,.78); font-size: 0.92rem; margin-top: 4px; }
.home-points-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.home-points-chip { display: inline-flex; align-items: baseline; gap: 6px; padding: 7px 14px; border-radius: 999px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); font-size: 0.84rem; font-weight: 600; color: #fff; backdrop-filter: blur(4px); }
.home-points-chip-strong { background: #fff; color: #4338ca; border-color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; }
.home-points-chip-strong small { font-family: "Inter", sans-serif; font-size: 0.74rem; font-weight: 600; color: #6b6fa8; }
.home-points-hero .home-points-total-img { position: relative; z-index: 1; width: 170px; filter: drop-shadow(0 12px 24px rgba(0,0,0,.25)); margin: -10px 0; }
.home-points-list-head { font-size: 0.74rem; letter-spacing: 0.08em; margin: 0 0 12px; }
.home-points-row { border-left: 4px solid var(--row-accent, var(--accent)); }
.home-row-card .loy-row-name { text-transform: none; letter-spacing: -0.01em; font-size: 1rem; }
.home-row-card { border-color: #ececf4; border-radius: 16px; }
.home-points-row .loy-row-balance { color: var(--row-accent, var(--ink)); font-size: 1.15rem; }
.home-row-chevron { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 999px; background: #f3f4fa; font-size: 1.1rem; transition: background .15s, color .15s; }
a.home-row-card:hover .home-row-chevron { background: var(--accent); color: #fff; }
.home-view-all-btn { border-radius: 14px; border-color: #e3e2fb; color: var(--accent); background: linear-gradient(180deg, #fff, #f8f7ff); }
@media (max-width: 640px) {
  .home-points-hero { padding: 22px 20px; border-radius: 18px; }
  .home-points-hero .home-points-total-img { display: none; }
}

/* ---- Home: glimpse of spending ---- */
.home-kpi-grid { margin: 0 0 6px; }
@media (min-width: 820px) { .home-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.home-spend-body { margin-top: 16px; }
.home-activity-head { border-top: none; padding-top: 6px; margin-top: 18px; margin-bottom: 10px; }
.home-activity-head span { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.home-activity-row { gap: 14px; }
.home-activity-thumb { flex: 0 0 auto; display: flex; }
.home-activity-merchant { font-size: 0.96rem; }
.home-activity-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 4px; }
.home-activity-meta > span + span::before { content: "·"; margin-right: 10px; color: #c3c6d4; }
.home-activity-cat { font-size: 0.72rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; color: var(--cat); background: color-mix(in srgb, var(--cat) 12%, #fff); }
.home-activity-meta > .home-activity-cat + span::before { content: none; }
.home-activity-amount { font-family: var(--font-display); font-size: 1.02rem; }
.home-activity-pts { display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 999px; background: #e9f9f0; color: #0f9d58; font-size: 0.74rem; }
.home-fan-card { border-radius: 12px; }

/* ---- Wallet ---- */
.wallet-kpi-grid { margin: 18px 0 22px; }
@media (min-width: 1100px) { .wallet-kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.wallet-cards-panel, .wallet-side-panel, .wallet-loyalty-panel { border-radius: 22px; border: 1px solid #ececf4; box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 12px 32px -22px rgba(30,20,90,.2); }
.wallet-side-panel { background: radial-gradient(120% 60% at 50% 0%, #f3f1ff 0%, #fff 60%); }
.wallet-side-panel-head { font-size: 0.74rem; letter-spacing: 0.08em; }
.wallet-donut-wrap .spend-donut { width: 200px; height: 200px; }
.wallet-side-sub { text-align: center; color: var(--muted); font-size: 0.84rem; margin: 6px 0 16px; }
.wallet-legend { gap: 4px; }
.wallet-legend-row { padding: 8px 10px; border-radius: 10px; gap: 10px; }
.wallet-legend-row:hover { background: color-mix(in srgb, var(--seg) 8%, #fff); }
.wallet-legend-dot { width: 10px; height: 10px; background: var(--seg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--seg) 18%, #fff); }
.wallet-legend-label { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wallet-legend-amt { color: var(--ink); font-weight: 700; font-size: 0.84rem; font-variant-numeric: tabular-nums; }
.wallet-legend-pct { min-width: 36px; text-align: right; font-variant-numeric: tabular-nums; }
.wallet-side-links a { display: inline-flex; align-items: center; gap: 6px; }
.wallet-value-pill { background: linear-gradient(135deg, #eef2ff, #f5edff); border: 1px solid #e3e2fb; }
.wallet-tile { border-radius: 18px; border-color: #ececf4; }
.wallet-tile-points { color: #4338ca; }

/* ---- Loyalty accounts list ---- */
.loy-list-polished { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.loy-list-polished .loy-row { border: 1px solid #ececf4; border-radius: 16px; padding: 14px 16px; background: #fff; gap: 16px; transition: box-shadow .15s, border-color .15s; }
.loy-list-polished .loy-row:last-child { border-bottom: 1px solid #ececf4; }
.loy-list-polished .loy-row:hover { border-color: #dcdcf5; box-shadow: 0 10px 24px -18px rgba(30,20,90,.35); }
.loy-list-polished .loy-row-brand > :first-child { border-radius: 12px; box-shadow: 0 0 0 1px #ececf4; }
.loy-list-polished .loy-row-name { font-size: 1rem; }
.loy-type { display: inline-flex; align-items: center; gap: 5px; font-size: 0.72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.loy-type-air { color: #0369a1; background: #e0f2fe; }
.loy-type-hotel { color: #b45309; background: #fef3c7; }
.loy-list-polished .loy-row-tier { padding: 3px 9px; border-radius: 999px; background: #f3f4fa; color: #4b5068; font-size: 0.74rem; }
.loy-list-polished .loy-row-balance { font-size: 1.2rem; color: var(--ink); }
.loy-row-remove {
  display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border-radius: 10px;
  background: transparent; color: #a0a4b8; border: 1px solid transparent; cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.loy-row-remove:hover { background: #fff1f1; color: var(--bad); border-color: #fbd5d5; }
.loy-row-remove svg { pointer-events: none; }
@media (max-width: 640px) {
  .loy-list-polished .loy-row { padding: 12px; }
  .loy-list-polished .loy-row-balance { margin-left: 0; }
  .loy-list-polished .loy-row-remove-form { margin-left: auto; margin-top: 0; }
}

/* ---- Add card page ---- */
.addcard-page { max-width: 980px; margin: 0 auto; }
.addcard-hero {
  display: flex; align-items: center; gap: 18px; padding: 26px 28px; border-radius: 22px; margin-bottom: 18px; color: #fff;
  background: radial-gradient(60% 140% at 100% 0%, rgba(236,72,153,.4) 0%, transparent 60%), linear-gradient(135deg, #312e81 0%, #4f46e5 50%, #7c3aed 100%);
  box-shadow: 0 18px 40px -22px rgba(79, 70, 229, 0.8);
}
.addcard-hero h1 { margin: 0; color: #fff; font-size: clamp(1.5rem, 3vw, 2rem); }
.addcard-hero p { margin: 4px 0 0; color: rgba(255,255,255,.8); }
.addcard-hero-icon { flex: 0 0 auto; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.25); }
.addcard-card { border-radius: 22px; padding: 26px 28px; border: 1px solid #ececf4; }
.addcard-step { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.addcard-step + .addcard-search { margin-top: -2px; }
.addcard-step h2 { margin: 0; font-size: 1.15rem; }
.addcard-step p { margin: 2px 0 0; color: var(--muted); font-size: 0.86rem; }
.addcard-step-num { flex: 0 0 auto; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 999px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #4f46e5, #7c3aed); box-shadow: 0 6px 14px -6px rgba(79,70,229,.8); }
.addcard-search { position: relative; }
.addcard-search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #8b8fa7; pointer-events: none; }
.addcard-search input { padding-left: 46px; height: 50px; border-radius: 14px; background: #f7f7fc; border-color: #e6e6f2; }
.addcard-search input:focus { background: #fff; }
.card-picker { border-radius: 18px; border-color: #ececf4; background: #fafaff; padding: 18px; }
.card-picker-bank h3 { font-size: 0.78rem; letter-spacing: 0.08em; }
.card-picker-grid { gap: 14px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.card-tile { border: 1px solid #ececf4; border-radius: 16px; transition: transform .15s, box-shadow .15s, border-color .15s; }
.card-tile:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -18px rgba(30,20,90,.4); }
.card-tile-select { padding: 12px 10px 10px; border-radius: 16px 16px 0 0; }
.card-tile:has(.card-tile-select:hover) { background: #fff; }
.card-tile:has(input:checked) { box-shadow: 0 0 0 2px var(--accent), 0 14px 28px -18px rgba(79,70,229,.6); border-color: transparent; }
.card-tile:has(input:checked) .card-tile-select { border-color: transparent; background: linear-gradient(180deg, #eef2ff, #fff); }
.card-tile:has(input:checked) .card-tile-select::after { content: "✓"; position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 999px; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 0.75rem; font-weight: 700; }
.card-tile-name { font-size: 0.84rem; margin-top: 2px; }
.addcard-submit { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 18px; font-size: 1rem; border-radius: 14px; }
.card-request { border: 1px dashed #d6d6ea; border-radius: 16px; padding: 14px 18px; background: #fafaff; }
.card-request summary { color: var(--accent); list-style: none; }
.card-request summary::-webkit-details-marker { display: none; }
.card-request summary::before { content: "+"; display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 10px; border-radius: 999px; background: #eef2ff; color: var(--accent); font-weight: 700; }
.card-request[open] summary::before { content: "−"; }
@media (max-width: 640px) {
  .addcard-hero { padding: 20px; gap: 14px; }
  .addcard-hero-icon { width: 44px; height: 44px; }
  .addcard-card { padding: 18px 16px; }
  .card-picker { padding: 12px; }
  .card-picker-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}

/* ---- Account settings ---- */
.account-hero {
  display: flex; align-items: center; gap: 18px; padding: 24px 28px; border-radius: 22px; color: #fff; margin-bottom: 4px;
  background: radial-gradient(60% 140% at 100% 0%, rgba(236,72,153,.38) 0%, transparent 60%), linear-gradient(135deg, #312e81 0%, #4f46e5 50%, #7c3aed 100%);
  box-shadow: 0 18px 40px -22px rgba(79, 70, 229, 0.8);
}
.account-hero h1 { margin: 0; color: #fff; font-size: clamp(1.4rem, 3vw, 1.9rem); }
.account-hero p { margin: 2px 0 0; color: rgba(255,255,255,.8); font-size: 0.92rem; word-break: break-all; }
.account-hero-avatar { width: 60px; height: 60px; font-size: 1.3rem; flex: 0 0 auto; box-shadow: 0 0 0 4px rgba(255,255,255,.25); background: linear-gradient(135deg, #a78bfa, #ec4899); }
.account-page-grid { margin-top: 22px; }
@media (min-width: 820px) { .account-page-grid { grid-template-columns: 220px 1fr; } }
.account-tabs { background: #fff; border: 1px solid #ececf4; border-radius: 18px; padding: 8px; gap: 4px; }
.account-tab-link { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; color: #4b5068; font-size: 0.9rem; }
.account-tab-link svg { color: #8b8fa7; flex: 0 0 auto; }
.account-tab-link:hover svg { color: var(--accent); }
.account-section { border-radius: 22px; border: 1px solid #ececf4; padding: 24px 26px; }
.account-section + .account-section { margin-top: 18px; }
.account-section-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.account-section-head h2 { margin: 0; font-size: 1.25rem; }
.account-section-head .subtitle { margin: 3px 0 0; font-size: 0.88rem; }
.account-section-icon { flex: 0 0 auto; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; color: #fff; }
.tone-indigo { background: linear-gradient(135deg, #4f46e5, #818cf8); box-shadow: 0 8px 18px -10px #4f46e5; }
.tone-sky { background: linear-gradient(135deg, #0284c7, #38bdf8); box-shadow: 0 8px 18px -10px #0284c7; }
.tone-violet { background: linear-gradient(135deg, #9333ea, #c084fc); box-shadow: 0 8px 18px -10px #9333ea; }
.account-settings-row { padding: 14px 16px; border: 1px solid #ececf4; border-radius: 16px; background: #fafaff; flex-wrap: nowrap; }
.account-row-icon { flex: 0 0 auto; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #fff; color: #0284c7; box-shadow: 0 0 0 1px #e6e6f2; }
.account-settings-row-text { flex: 1 1 auto; min-width: 0; }
.account-plan-row { padding: 16px 18px; border-radius: 16px; background: linear-gradient(135deg, #f5f3ff, #fdf2f8); border: 1px solid #ede9fe; }
.plan-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; color: #fff; background: linear-gradient(135deg, #7c3aed, #db2777); box-shadow: 0 6px 14px -8px #7c3aed; }
@media (max-width: 640px) {
  .account-hero { padding: 18px; gap: 14px; }
  .account-hero-avatar { width: 48px; height: 48px; font-size: 1.05rem; }
  .account-section { padding: 18px 16px; }
  .account-tabs { overflow-x: auto; }
}
.home-activity-amount.is-refund { color: #0f9d58; }
.home-activity-refund { display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 999px; background: #e9f9f0; color: #0f9d58; font-size: 0.74rem; font-weight: 700; }
@media (max-width: 640px) {
  .txn-kpi-grid > .txn-kpi:last-child:nth-child(odd) { grid-column: 1 / -1; flex-direction: row; align-items: center; }
  .home-row-card.loy-row { flex-wrap: nowrap; padding: 12px; gap: 10px; }
  .home-row-card .loy-row-balance { order: 0; margin-left: 0; text-align: right; min-width: 0; }
  .home-row-card .home-row-chevron { display: none; }
  .home-row-card .loy-row-brand { gap: 10px; }
  .home-row-card .loy-row-name { font-size: 0.92rem; }
  .home-activity-row { padding: 12px; gap: 10px; }
  .home-activity-cardlabel { display: none; }
  .home-activity-meta > .home-activity-cat + span:not(.home-activity-cardlabel)::before { content: none; }
  .home-activity-merchant { font-size: 0.9rem; }
}
@media (max-width: 640px) {
  .wallet-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .wallet-card-grid .wallet-tile-art { padding: 8px 8px 0; }
  .wallet-card-grid .wallet-tile-body { padding: 8px 10px 12px; }
  .wallet-card-grid .wallet-tile-name { font-size: 0.84rem; line-height: 1.25; }
  .wallet-card-grid .wallet-tile-bank { font-size: 0.62rem; }
  .wallet-card-grid .wallet-tile-points { font-size: 1rem; }
  .wallet-card-grid .wallet-tile-last4 { font-size: 0.72rem; }
  .account-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; }
  .account-tab-link { justify-content: center; padding: 10px 4px; font-size: 0.8rem; gap: 6px; }
  .addcard-hero-icon { display: none; }
}
.home-row-card .fl-tag { white-space: nowrap; }
@media (max-width: 640px) { .home-points-row .loy-row-tier { display: none; } }

/* ---- Email import page (/gmail) ---- */
.mail-hero { margin-bottom: 18px; }
.mail-card { border-radius: 22px; border: 1px solid #ececf4; padding: 24px 26px; }
.mail-card + .mail-card, .mail-alert + .mail-card, .mail-card + .mail-trouble { margin-top: 18px; }
.mail-card .account-section-head h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.mail-status { display: inline-flex; align-items: center; gap: 6px; font-family: "Inter", sans-serif; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em; padding: 4px 10px; border-radius: 999px; }
.mail-status::before { content: ""; width: 7px; height: 7px; border-radius: 999px; background: currentColor; }
.mail-status-on { color: #0f9d58; background: #e9f9f0; }
.mail-status-warn { color: #b45309; background: #fef3c7; }
.mail-status-off { color: #6b7080; background: #f0f1f6; }
.mail-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.mail-actions > button { display: inline-flex; align-items: center; gap: 8px; border-radius: 12px; padding: 11px 18px; }
.mail-actions > button.secondary { background: #fff; border: 1px solid #dcdcf5; color: var(--accent); }
.mail-actions > button.secondary:hover { background: #f3f2ff; }
.mail-disconnect { margin-left: auto; }
.mail-disconnect .link-btn { color: var(--muted); font-weight: 600; font-size: 0.86rem; padding: 8px 4px; }
.mail-disconnect .link-btn:hover { color: var(--bad); }
.mail-card > a.btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 12px; padding: 12px 20px; }
.mail-points { list-style: none; margin: 20px 0 0; padding: 16px 18px; border-radius: 16px; background: #fafaff; border: 1px solid #ececf4; display: grid; gap: 12px; }
.mail-points li { display: flex; gap: 12px; align-items: flex-start; font-size: 0.88rem; color: #4b5068; line-height: 1.5; }
.mail-points li svg { flex: 0 0 auto; margin-top: 2px; color: var(--accent); }
.mail-label { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 18px 0 8px; }
.mail-copy { margin: 0; border-radius: 14px; background: linear-gradient(180deg, #fafaff, #f5f4ff); border-color: #e3e2fb; padding: 12px 12px 12px 16px; }
.mail-copy code { font-size: 0.9rem; color: var(--ink); }
.mail-copy button.secondary { background: #fff; border: 1px solid #dcdcf5; border-radius: 10px; }
.mail-steps { margin: 18px 0 4px; padding: 0; counter-reset: none; }
.mail-steps li { background: #fff; border: 1px solid #ececf4; border-radius: 16px; padding: 16px; position: relative; }
.mail-steps .step-num { width: 28px; height: 28px; font-size: 0.85rem; background: linear-gradient(135deg, #4f46e5, #7c3aed); box-shadow: 0 6px 14px -6px rgba(79,70,229,.8); margin-bottom: 10px; }
.mail-steps strong { font-size: 0.98rem; }
.mail-alert {
  display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 20px; margin-bottom: 18px;
  background: linear-gradient(135deg, #fffbeb, #fff7ed); border: 1px solid #fde68a; box-shadow: 0 12px 30px -22px rgba(217, 119, 6, .6);
}
.mail-alert-icon { flex: 0 0 auto; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; color: #fff; background: linear-gradient(135deg, #d97706, #fbbf24); box-shadow: 0 8px 18px -10px #d97706; }
.mail-alert-body { flex: 1 1 auto; min-width: 0; }
.mail-alert-body h2 { margin: 0; font-size: 1.08rem; }
.mail-alert-body p { margin: 4px 0 0; color: #6b5a3a; font-size: 0.88rem; }
.mail-alert-body .mail-alert-note { font-size: 0.8rem; color: #8a7a5c; }
.mail-alert-btn { flex: 0 0 auto; border-radius: 12px; padding: 11px 18px; background: linear-gradient(135deg, #d97706, #f59e0b) !important; box-shadow: 0 8px 18px -10px #d97706 !important; }
.mail-trouble { border-radius: 18px; border: 1px solid #ececf4; padding: 0; overflow: hidden; }
.mail-trouble summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px; padding: 16px 20px; }
.mail-trouble summary::-webkit-details-marker { display: none; }
.mail-trouble summary::after { content: "›"; margin-left: auto; font-size: 1.3rem; color: var(--muted); transition: transform .15s; }
.mail-trouble[open] summary::after { transform: rotate(90deg); }
.mail-trouble summary strong { display: block; font-size: 0.95rem; }
.mail-trouble summary small { display: block; color: var(--muted); font-size: 0.82rem; margin-top: 1px; }
.mail-trouble-icon { flex: 0 0 auto; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: #f3f4fa; color: #6b7080; }
.mail-trouble-body { padding: 0 20px 18px 72px; }
.mail-trouble-body p { margin: 0 0 12px; color: #4b5068; font-size: 0.88rem; }
.mail-trouble-body button.secondary { background: #fff; border: 1px solid #dcdcf5; border-radius: 10px; padding: 9px 16px; }
@media (max-width: 640px) {
  .mail-card { padding: 18px 16px; }
  .mail-actions > button { flex: 1 1 100%; justify-content: center; }
  .mail-disconnect { margin: 0 auto; }
  .mail-alert { flex-wrap: wrap; padding: 16px; }
  .mail-alert-btn { width: 100%; text-align: center; }
  .mail-trouble-body { padding: 0 16px 16px; }
}

/* ---- Legal pages ---- */
.legal-hero, .install-hero {
  display: flex; align-items: center; gap: 18px; padding: 28px 30px; border-radius: 22px; color: #fff;
  background: radial-gradient(60% 140% at 100% 0%, rgba(236,72,153,.38) 0%, transparent 60%), linear-gradient(135deg, #312e81 0%, #4f46e5 50%, #7c3aed 100%);
  box-shadow: 0 18px 40px -22px rgba(79, 70, 229, 0.8);
}
.legal-hero h1, .install-hero h1 { margin: 0; color: #fff; font-size: clamp(1.6rem, 3.4vw, 2.2rem); }
.legal-updated { display: inline-block; margin-top: 8px; padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.25); font-size: 0.8rem; font-weight: 600; color: #fff; }
.legal-layout { display: grid; gap: 22px; margin-top: 22px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 980px) { .legal-layout { grid-template-columns: 240px minmax(0, 1fr); } }
.legal-toc { display: none; }
@media (min-width: 980px) {
  .legal-toc { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow-y: auto; background: #fff; border: 1px solid #ececf4; border-radius: 18px; padding: 10px; }
}
.legal-toc-head { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 8px 10px 6px; }
.legal-toc a { display: block; padding: 7px 10px; border-radius: 9px; font-size: 0.84rem; font-weight: 500; color: #4b5068; line-height: 1.35; }
.legal-toc a:hover { background: #f3f2ff; color: var(--accent); text-decoration: none; }
.legal-body { margin: 0; padding: 12px 34px 30px; border-radius: 22px; border: 1px solid #ececf4; counter-reset: legal; font-size: 0.97rem; line-height: 1.75; color: #3b3f52; }
.legal-section { padding: 22px 0 6px; border-bottom: 1px solid #f0f0f6; scroll-margin-top: 96px; }
.legal-section:last-child { border-bottom: none; }
.legal-section h2 { counter-increment: legal; display: flex; align-items: center; gap: 12px; margin: 0 0 10px; font-size: 1.2rem; color: var(--ink); scroll-margin-top: 96px; }
.legal-section h2::before { content: counter(legal, decimal-leading-zero); flex: 0 0 auto; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; font-family: "Inter", sans-serif; font-size: 0.75rem; font-weight: 700; color: #4f46e5; background: #eef2ff; }
.legal-section p { margin: 0 0 12px; }
.legal-section ul { margin: 0 0 12px; padding-left: 20px; }
.legal-section li { margin-bottom: 8px; }
.legal-section li::marker { color: #a5a8f0; }
.legal-section strong { color: var(--ink); }
@media (max-width: 640px) {
  .legal-hero, .install-hero { padding: 20px; gap: 14px; }
  .legal-hero .addcard-hero-icon { display: none; }
  .legal-body { padding: 4px 18px 20px; font-size: 0.94rem; }
  .legal-section h2 { font-size: 1.08rem; }
}

/* ---- Install page ---- */
.install-page { max-width: 980px; }
.install-hero { text-align: left; margin-bottom: 18px; }
.install-hero p { margin: 6px 0 0; color: rgba(255,255,255,.82); }
.install-hero .install-icon { width: 76px; height: 76px; border-radius: 20px; background: #fff; padding: 8px; box-shadow: 0 12px 26px -10px rgba(0,0,0,.4); flex: 0 0 auto; }
.install-hero .install-done { display: inline-block; margin-top: 10px; padding: 5px 12px; border-radius: 999px; background: #e9f9f0; color: #0f9d58; font-size: 0.82rem; }
.install-hero .install-done[hidden] { display: none; }
.install-grid { gap: 18px; }
.install-platform, .install-know { border-radius: 22px; border: 1px solid #ececf4; padding: 24px 26px; margin: 0; }
.install-know { margin-top: 18px; }
.tone-emerald { background: linear-gradient(135deg, #059669, #34d399); box-shadow: 0 8px 18px -10px #059669; }
.install-steps { list-style: none; counter-reset: step; padding: 0; margin: 4px 0 0; position: relative; }
.install-steps li { counter-increment: step; position: relative; padding: 4px 0 14px 44px; margin: 0; line-height: 1.55; color: #3b3f52; }
.install-steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center; font-size: 0.8rem; font-weight: 700; color: #fff; background: linear-gradient(135deg, #4f46e5, #7c3aed); box-shadow: 0 6px 14px -6px rgba(79,70,229,.8); }
.install-steps li:not(:last-child)::after { content: ""; position: absolute; left: 13px; top: 30px; bottom: 0; width: 2px; background: #e6e6f5; }
.install-tip { margin: 6px 0 0; padding: 12px 14px; border-radius: 12px; background: #fafaff; border: 1px solid #ececf4; color: #5b5f75; font-size: 0.84rem; }
.install-btn { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px; border-radius: 12px; padding: 11px 18px; }
.install-btn[hidden] { display: none; }
.install-know h2 { margin: 0 0 14px; font-size: 1.2rem; }
.install-know-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .install-know-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.install-know-grid > div { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: #fafaff; border: 1px solid #ececf4; font-size: 0.88rem; color: #4b5068; line-height: 1.5; }
.install-know-grid svg { flex: 0 0 auto; margin-top: 1px; color: var(--accent); }
@media (max-width: 640px) {
  .install-hero { flex-direction: column; align-items: flex-start; }
  .install-hero .install-icon { width: 60px; height: 60px; }
  .install-platform, .install-know { padding: 18px 16px; }
}

/* ===== Card detail page (/cards/:id) ===== */
.tone-amber { background: linear-gradient(135deg, #d97706, #fbbf24); box-shadow: 0 8px 18px -10px #d97706; }
.tone-rose { background: linear-gradient(135deg, #e11d48, #fb7185); box-shadow: 0 8px 18px -10px #e11d48; }
.cv-page { display: flex; flex-direction: column; gap: 18px; }
.cv-page > .card, .cv-page .card { margin: 0; }
.cv-hero {
  position: relative; overflow: hidden; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 28px;
  padding: 28px 32px; border-radius: 24px; color: #fff;
  background: radial-gradient(70% 140% at 100% 0%, rgba(124,58,237,.55) 0%, transparent 60%), radial-gradient(60% 120% at 0% 100%, rgba(14,165,233,.25) 0%, transparent 60%), linear-gradient(135deg, #0f172a 0%, #1e1b4b 55%, #312e81 100%);
  box-shadow: 0 24px 50px -28px rgba(30, 27, 75, 0.9);
}
.cv-hero-art { width: 240px; }
.cv-hero-art svg, .cv-hero-art img { display: block; width: 100%; height: auto; border-radius: 14px; box-shadow: 0 18px 36px -12px rgba(0,0,0,.6); transform: rotate(-3deg); }
.cv-hero-bank { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; border-radius: 999px; background: rgba(255,255,255,.12); font-size: 0.8rem; font-weight: 600; color: rgba(255,255,255,.9); }
.cv-hero-bank img, .cv-hero-bank svg { border-radius: 6px; background: #fff; }
.cv-hero-name { margin: 12px 0 0; color: #fff; font-size: clamp(1.7rem, 3.6vw, 2.5rem); letter-spacing: -0.03em; line-height: 1.05; }
.cv-hero-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 10px; color: rgba(255,255,255,.7); font-size: 0.88rem; }
.cv-hero-last4 { font-variant-numeric: tabular-nums; letter-spacing: 0.08em; color: #fff; font-weight: 600; }
.cv-hero-balance { text-align: right; }
.cv-hero-balance-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,.65); }
.cv-hero-balance-num { font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 4.4vw, 3rem); letter-spacing: -0.03em; line-height: 1.1; margin-top: 4px; background: linear-gradient(135deg, #fff, #c7d2fe); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cv-hero-balance-num small { font-size: 0.42em; font-weight: 600; letter-spacing: 0; -webkit-text-fill-color: rgba(255,255,255,.7); }
.cv-correct { margin-top: 10px; display: inline-block; text-align: left; }
.cv-correct summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 600; color: rgba(255,255,255,.75); padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.1); }
.cv-correct summary::-webkit-details-marker { display: none; }
.cv-correct summary:hover { background: rgba(255,255,255,.18); color: #fff; }
.cv-correct form { display: flex; gap: 6px; margin-top: 8px; }
.cv-correct input { width: 130px; padding: 8px 10px; border-radius: 10px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.1); color: #fff; text-align: right; font-size: 0.9rem; }
.cv-correct button { padding: 8px 14px; border-radius: 10px; background: #fff !important; color: #312e81; box-shadow: none; }

.cv-stats { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .cv-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cv-stat { --t1: #4f46e5; --t2: #818cf8; --tt: #eef2ff; display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 18px; background: linear-gradient(140deg, var(--tt), #fff 75%); border: 1px solid color-mix(in srgb, var(--t1) 16%, #fff); min-width: 0; }
.cv-stat-icon { flex: 0 0 auto; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: #fff; background: linear-gradient(135deg, var(--t1), var(--t2)); box-shadow: 0 6px 14px -6px var(--t1); }
.cv-stat-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--t1); }
.cv-stat-value { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: var(--ink); letter-spacing: -0.02em; white-space: nowrap; }
.cv-stat-sub { font-size: 0.78rem; color: var(--muted); margin-top: 1px; }
.cv-stat-indigo { --t1: #4f46e5; --t2: #818cf8; --tt: #eef2ff; }
.cv-stat-emerald { --t1: #059669; --t2: #34d399; --tt: #e7f8f1; }
.cv-stat-rose { --t1: #e11d48; --t2: #fb7185; --tt: #ffeef1; }
.cv-stat-amber { --t1: #d97706; --t2: #fbbf24; --tt: #fff6e5; }

.cv-section { border-radius: 22px; border: 1px solid #ececf4; padding: 24px 26px; }
.cv-section-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.cv-section-head h2 { margin: 0; font-size: 1.25rem; }
.cv-section-head .subtitle { margin: 3px 0 0; font-size: 0.88rem; }
.cv-goals { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 820px) { .cv-goals { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); } }
.cv-goal { padding: 16px 18px; border-radius: 16px; border: 1px solid #ececf4; background: #fafaff; display: flex; flex-direction: column; gap: 8px; }
.cv-goal-done { background: linear-gradient(140deg, #ecfdf3, #fff 75%); border-color: #c9f0da; }
.cv-goal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.cv-goal-title { font-weight: 700; color: var(--ink); font-size: 0.95rem; line-height: 1.3; }
.cv-goal-big { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: var(--ink); }
.cv-goal-reward { font-size: 0.84rem; font-weight: 600; color: #7c3aed; }
.cv-goal-done .cv-goal-reward { color: #0f9d58; }
.cv-chip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; background: #eef2ff; color: #4338ca; font-size: 0.74rem; font-weight: 700; white-space: nowrap; }
.cv-chip-good { background: #dcfce7; color: #15803d; }
.cv-bar { height: 8px; border-radius: 99px; background: #e9eaf3; overflow: hidden; }
.cv-bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #6366f1, #a855f7); }
.cv-goal-done .cv-bar > span { background: linear-gradient(90deg, #10b981, #34d399); }
.cv-goal-foot { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.cv-section .promo { border-top: none; margin-top: 14px; padding: 16px 18px; border-radius: 16px; border: 1px solid #f1e3ff; background: linear-gradient(140deg, #faf5ff, #fff 70%); }

.cv-earn { display: grid; gap: 8px; }
.cv-earn-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; background: #fafaff; border: 1px solid #ececf4; font-size: 0.92rem; color: #3b3f52; }
.cv-earn-tag { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; min-width: 64px; justify-content: center; padding: 4px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; background: #eef0f6; color: #4b5068; }
.cv-earn-tag-accent { background: #fef3c7; color: #b45309; }
.cv-portal { margin-top: 14px; padding: 16px 18px; border-radius: 16px; background: linear-gradient(140deg, #eff6ff, #fff 75%); border: 1px solid #dbeafe; }
.cv-portal-head { display: flex; align-items: center; gap: 8px; font-weight: 700; color: #1d4ed8; font-size: 0.92rem; }
.cv-portal ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.cv-portal li { display: flex; flex-direction: column; gap: 2px; font-size: 0.88rem; color: #3b3f52; }
.cv-portal li strong { color: var(--ink); }
.cv-portal p { margin: 10px 0 0; font-size: 0.82rem; color: var(--muted); }

.cv-caps { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 10px; }
@media (min-width: 820px) { .cv-caps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cv-cap { padding: 12px 14px; border-radius: 14px; background: #fafaff; border: 1px solid #ececf4; }
.cv-cap-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.cv-cap-value { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--ink); margin-top: 2px; }
.cv-cap-value small { font-size: 0.75rem; color: var(--muted); font-weight: 600; margin-left: 2px; }
.cv-tp-table { width: 100%; border-collapse: separate; border-spacing: 0; margin-top: 8px; }
.cv-tp-table th { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; background: transparent; }
.cv-tp-table td { padding: 10px 12px; border-bottom: 1px solid #f0f0f6; vertical-align: middle; }
.cv-tp-table tbody tr:not(.cv-tp-group):hover td { background: #fafaff; }
.cv-tp-group td { padding: 16px 12px 8px; border-bottom: none; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #4338ca; }
.cv-tp-group td span { margin-left: 8px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--muted); }
.cv-tp-prog { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cv-tp-logo { flex: 0 0 auto; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #fff; box-shadow: 0 0 0 1px #ececf4; overflow: hidden; }
.cv-tp-logo svg, .cv-tp-logo img { max-width: 26px; max-height: 26px; }
.cv-tp-logo-fallback { font-size: 0.68rem; font-weight: 700; color: #4b5068; }
.cv-tp-name { font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-tp-ratio { text-align: center; width: 120px; white-space: nowrap; }
.cv-tp-table th.cv-tp-ratio { text-align: center; }
.cv-ratio { display: inline-block; min-width: 64px; padding: 4px 10px; border-radius: 999px; background: #f1f2f8; color: #3b3f52; font-weight: 700; font-size: 0.84rem; font-variant-numeric: tabular-nums; }
.cv-ratio-up { background: #dcfce7; color: #15803d; }
.cv-ratio-down { background: #fff1e6; color: #c2410c; }
.cv-tp-value { text-align: right; width: 180px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cv-tp-table th.cv-tp-value { text-align: right; }
.cv-tp-value strong { font-family: var(--font-display); font-size: 1rem; color: var(--ink); }
.cv-tp-left { display: block; font-size: 0.72rem; color: var(--muted); }
.cv-tp-conf { text-align: right; width: 110px; }
.cv-tp-table th.cv-tp-conf { text-align: right; }
.cv-conf { display: inline-flex; align-items: center; gap: 6px; font-size: 0.76rem; font-weight: 600; color: #4b5068; }
.cv-conf::before { content: ""; width: 8px; height: 8px; border-radius: 99px; background: #10b981; }
.cv-conf-medium::before { background: #f59e0b; }
.cv-conf-low::before { background: #ef4444; }
.cv-footnote { margin: 12px 0 0; font-size: 0.82rem; color: var(--muted); line-height: 1.5; }

.cv-activity { width: 100%; border-collapse: separate; border-spacing: 0; }
.cv-activity th { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; }
.cv-activity th.amount { text-align: right; }
.cv-activity td { padding: 11px 12px; border-bottom: 1px solid #f0f0f6; vertical-align: middle; }
.cv-act-date { white-space: nowrap; color: var(--muted); font-size: 0.86rem; width: 80px; }
.cv-act-what > div { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.cv-act-what strong { font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 420px; }
.cv-act-what span { color: var(--muted); font-size: 0.84rem; white-space: nowrap; }
.cv-act-note { display: block; font-size: 0.76rem; color: var(--muted); margin-top: 2px; }
.cv-kind { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.74rem; font-weight: 700; white-space: nowrap; background: #f1f2f8; color: #4b5068; }
.cv-kind-bonus { background: #fef3c7; color: #b45309; }
.cv-kind-milestone { background: #f3e8ff; color: #7c3aed; }
.cv-kind-refund { background: #ffe4e6; color: #be123c; }
.cv-kind-adjust { background: #e0f2fe; color: #0369a1; }
.cv-act-pts { font-family: var(--font-display); font-weight: 700; color: #0f9d58; white-space: nowrap; width: 90px; }
.cv-act-pts.neg { color: #be123c; }

.cv-two { display: grid; gap: 18px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 980px) { .cv-two { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); } }
.cv-two > div { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.cv-inline-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cv-inline-form > input, .cv-inline-form > select { flex: 1 1 160px; min-width: 0; margin: 0; }
.cv-inline-form > button { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; border-radius: 12px; padding: 11px 18px; }
.cv-inline-form > button.secondary, .cv-section button.secondary { background: #fff; border: 1px solid #dcdcf5; color: var(--accent); border-radius: 12px; }
.cv-inline-form > button.secondary:hover, .cv-section button.secondary:hover { background: #f3f2ff; }
.cv-addons { display: grid; gap: 8px; margin-bottom: 12px; }
.cv-addon { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 1px solid #ececf4; background: #fafaff; }
.cv-addon-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #fff; color: #059669; box-shadow: 0 0 0 1px #e6e6f2; }
.cv-addon-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.cv-addon-text strong { font-size: 0.92rem; }
.cv-addon-text span { font-size: 0.8rem; color: var(--muted); letter-spacing: 0.04em; }
.cv-addon-form input[name="last4"] { flex: 0 1 140px; }
.cv-statement-status { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.cv-statement-note { font-size: 0.84rem; color: var(--muted); }
.cv-kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
@media (min-width: 640px) { .cv-kv { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cv-kv > div { padding: 10px 12px; border-radius: 12px; background: #fafaff; border: 1px solid #ececf4; display: flex; flex-direction: column; gap: 2px; }
.cv-kv span { font-size: 0.72rem; color: var(--muted); font-weight: 600; }
.cv-kv strong { font-family: var(--font-display); font-size: 1rem; }
.cv-raw { margin-bottom: 14px; }
.cv-raw summary, .cv-manual summary { cursor: pointer; font-weight: 600; font-size: 0.88rem; color: var(--accent); }
.cv-raw pre { white-space: pre-wrap; font-size: 12px; max-height: 360px; overflow: auto; background: #fafaff; border: 1px solid #ececf4; border-radius: 12px; padding: 12px; margin-top: 8px; }
.cv-statement-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
.cv-field-block label { display: flex; align-items: center; gap: 8px; font-size: 0.86rem; font-weight: 600; margin-bottom: 6px; }
.cv-saved { padding: 2px 8px; border-radius: 999px; background: #dcfce7; color: #15803d; font-size: 0.7rem; font-weight: 700; }
.cv-hint { font-weight: 500; color: var(--muted); font-size: 0.78rem; }
.cv-field-block input[type="file"] { padding: 8px; border-radius: 12px; border: 1px dashed #cfd2e6; background: #fafaff; font-size: 0.84rem; }
.cv-manual { margin-top: 16px; padding: 14px 16px; border-radius: 14px; border: 1px dashed #d6d6ea; background: #fafaff; }
.cv-manual form { margin-top: 10px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.cv-manual-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
.cv-manual-grid label { font-size: 0.8rem; font-weight: 600; margin-bottom: 4px; display: block; }
.cv-manual-grid input { margin: 0; }

@media (max-width: 760px) {
  .cv-hero { grid-template-columns: 1fr; gap: 16px; padding: 22px 20px; text-align: left; }
  .cv-hero-art { width: 200px; }
  .cv-hero-balance { text-align: left; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.12); }
  .cv-section { padding: 18px 16px; }
  .cv-tp-table th, .cv-tp-table td { padding: 9px 6px; }
  .cv-tp-ratio { width: auto; }
  .cv-tp-conf { display: none; }
  .cv-tp-name { white-space: normal; font-size: 0.88rem; }
  .cv-tp-value { width: auto; }
  .cv-act-date { width: auto; font-size: 0.8rem; }
  .cv-act-what strong { max-width: 160px; }
  .cv-activity th:nth-child(3), .cv-activity td:nth-child(3) { display: none; }
  .cv-manual-grid { grid-template-columns: 1fr; }
}
.cv-goal-head { flex-wrap: wrap; }
@media (max-width: 640px) {
  .cv-stats { gap: 10px; }
  .cv-stat { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px 12px; }
  .cv-stat-icon { width: 34px; height: 34px; border-radius: 10px; }
  .cv-stat-value { font-size: clamp(1rem, 4.8vw, 1.2rem); white-space: normal; }
  .cv-stat-label { font-size: 0.64rem; }
  .cv-hero-art { width: 180px; }
}

/* ===== Auth pages ===== */
.auth-wrap { display: grid; grid-template-columns: 1fr; max-width: 980px; margin: 8px auto 40px; border-radius: 28px; overflow: hidden; background: #fff; border: 1px solid #ececf4; box-shadow: 0 30px 70px -40px rgba(30, 20, 90, 0.45); }
@media (min-width: 860px) { .auth-wrap { grid-template-columns: 1fr 1fr; min-height: 560px; } }
.auth-brand {
  position: relative; overflow: hidden; color: #fff; padding: 40px 38px; display: flex; flex-direction: column; gap: 14px;
  background: radial-gradient(70% 90% at 100% 0%, rgba(236,72,153,.45) 0%, transparent 60%), radial-gradient(70% 90% at 0% 100%, rgba(56,189,248,.3) 0%, transparent 60%), linear-gradient(150deg, #1e1b4b 0%, #4338ca 55%, #7c3aed 100%);
}
.auth-brand::after { content: ""; position: absolute; right: -80px; bottom: -80px; width: 260px; height: 260px; border-radius: 50%; border: 40px solid rgba(255,255,255,.06); pointer-events: none; }
.auth-brand-logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; }
.auth-brand-logo img { width: 38px; height: 38px; border-radius: 11px; background: #fff; padding: 4px; }
.auth-brand h2 { margin: 18px 0 0; color: #fff; font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1.12; letter-spacing: -0.03em; }
.auth-brand > p { margin: 0; color: rgba(255,255,255,.78); font-size: 0.98rem; }
.auth-points { list-style: none; margin: auto 0 0; padding: 22px 0 0; display: grid; gap: 14px; }
.auth-points li { display: flex; gap: 12px; align-items: flex-start; }
.auth-point-icon { flex: 0 0 auto; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2); }
.auth-points strong { display: block; font-size: 0.95rem; }
.auth-points li span:not(.auth-point-icon) { display: block; font-size: 0.84rem; color: rgba(255,255,255,.72); margin-top: 1px; }
.auth-form-side { display: flex; align-items: center; justify-content: center; padding: 40px 38px; }
.auth-form-card { width: 100%; max-width: 380px; }
.auth-form-card h1 { margin: 0; font-size: 1.9rem; letter-spacing: -0.03em; }
.auth-form-card > .subtitle { margin: 6px 0 22px; }
.auth-form label { font-size: 0.86rem; font-weight: 600; margin-bottom: 6px; display: block; }
.auth-input { position: relative; }
.auth-input svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #9a9eb5; pointer-events: none; }
.auth-input input { width: 100%; padding: 13px 14px 13px 42px; border-radius: 14px; border: 1px solid #e3e4ef; background: #f8f8fc; font-size: 0.96rem; margin: 0; transition: border-color .15s, background .15s, box-shadow .15s; }
.auth-input input:focus { background: #fff; border-color: #a5b4fc; box-shadow: 0 0 0 4px rgba(99,102,241,.14); outline: none; }
.auth-input:focus-within svg { color: var(--accent); }
.auth-submit { width: 100%; padding: 14px 18px; border-radius: 14px; font-size: 1rem; margin-top: 4px; box-shadow: 0 12px 24px -12px rgba(79,70,229,.8); }
.auth-switch { margin: 18px 0 0; text-align: center; color: var(--muted); font-size: 0.9rem; }
.auth-switch a { font-weight: 700; }
.auth-legal { margin: 10px 0 0; text-align: center; color: var(--muted); font-size: 0.78rem; }
.auth-simple { max-width: 460px; margin: 40px auto; border-radius: 24px; border: 1px solid #ececf4; padding: 30px 30px 26px; text-align: center; box-shadow: 0 30px 70px -40px rgba(30,20,90,.45); }
.auth-simple-icon { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; color: #fff; background: linear-gradient(135deg, #4f46e5, #7c3aed); box-shadow: 0 12px 24px -12px rgba(79,70,229,.8); margin-bottom: 12px; }
@media (max-width: 859px) {
  .auth-wrap { border-radius: 22px; margin-top: 0; }
  .auth-brand { padding: 24px 22px; gap: 8px; }
  .auth-brand h2 { margin-top: 10px; font-size: 1.45rem; }
  .auth-points { display: none; }
  .auth-form-side { padding: 26px 22px 30px; }
}

/* ===== Pricing ===== */
.pricing-hero { text-align: center; max-width: 680px; margin: 18px auto 0; }
.pricing-eyebrow { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; background: #eef2ff; color: #4338ca; font-size: 0.8rem; font-weight: 700; }
.pricing-hero h1 { margin: 16px 0 0; font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.035em; line-height: 1.05; background: linear-gradient(135deg, #1e1b4b, #4f46e5 60%, #a21caf); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pricing-hero p { margin: 12px 0 0; color: var(--muted); font-size: 1.05rem; }
.pricing-card {
  position: relative; max-width: 480px; margin: 34px auto 50px; padding: 34px 32px 28px; border-radius: 28px; background: #fff;
  border: 2px solid transparent; background-image: linear-gradient(#fff, #fff), linear-gradient(135deg, #6366f1, #a855f7, #ec4899); background-origin: border-box; background-clip: padding-box, border-box;
  box-shadow: 0 40px 80px -40px rgba(79, 70, 229, 0.55);
}
.pricing-ribbon { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); padding: 6px 16px; border-radius: 999px; font-size: 0.76rem; font-weight: 700; letter-spacing: 0.04em; color: #fff; background: linear-gradient(135deg, #7c3aed, #db2777); box-shadow: 0 8px 18px -8px #7c3aed; white-space: nowrap; }
.pricing-plan { text-align: center; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.pricing-price { text-align: center; font-family: var(--font-display); font-weight: 700; font-size: 4rem; letter-spacing: -0.04em; line-height: 1; margin-top: 12px; color: var(--ink); }
.pricing-currency { font-size: 0.5em; vertical-align: 0.65em; margin-right: 2px; color: #4f46e5; }
.pricing-per { font-family: "Inter", sans-serif; font-size: 1rem; font-weight: 500; letter-spacing: 0; color: var(--muted); margin-left: 4px; }
.pricing-intro { text-align: center; margin: 14px auto 0; max-width: 360px; font-size: 0.88rem; color: var(--muted); line-height: 1.5; }
.pricing-intro strong { color: #7c3aed; }
.pricing-spots { height: 6px; border-radius: 99px; background: #efeff7; overflow: hidden; margin: 12px auto 0; max-width: 300px; }
.pricing-spots span { display: block; height: 100%; min-width: 4px; border-radius: inherit; background: linear-gradient(90deg, #7c3aed, #db2777); }
.pricing-features { list-style: none; margin: 26px 0 0; padding: 22px 0 0; border-top: 1px solid #f0f0f6; display: grid; gap: 14px; }
.pricing-features li { display: flex; gap: 12px; align-items: flex-start; }
.pricing-check { flex: 0 0 auto; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: #eef2ff; color: #4f46e5; }
.pricing-features strong { display: block; font-size: 0.95rem; color: var(--ink); }
.pricing-features li span:not(.pricing-check) { display: block; font-size: 0.84rem; color: var(--muted); margin-top: 1px; }
.pricing-cta { margin-top: 26px; }
.pricing-cta .btn { display: block; width: 100%; text-align: center; padding: 15px 18px; border-radius: 14px; font-size: 1.02rem; box-shadow: 0 14px 28px -14px rgba(79,70,229,.9); }
.pricing-fine { text-align: center; margin: 12px 0 0; font-size: 0.8rem; color: var(--muted); }
@media (max-width: 640px) {
  .pricing-card { padding: 30px 20px 22px; border-radius: 22px; }
  .pricing-price { font-size: 3.2rem; }
}
.cv-earn-tag-low { background: #e0f2fe; color: #0369a1; }
.cv-earn-tag-none { background: #ffe4e6; color: #be123c; }
.cv-region { align-items: flex-start; }
.cv-region-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1 1 auto; }
.cv-region-hint { font-size: 0.8rem; color: var(--muted); }
.cv-region .cv-inline-form { max-width: 420px; }
.cv-danger { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; border-color: #fde2e2; background: linear-gradient(140deg, #fff7f7, #fff 70%); }
.cv-danger-text h2 { margin: 0; font-size: 1.1rem; color: #9f1239; }
.cv-danger-text p { margin: 4px 0 0; font-size: 0.86rem; color: var(--muted); max-width: 620px; }
.cv-danger-btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 12px; background: #fff !important; color: #be123c; border: 1px solid #fecdd3; box-shadow: none !important; font-weight: 700; }
.cv-danger-btn:hover { background: #fff1f2 !important; border-color: #fda4af; }

/* ===== Top bar refresh (2026-10-13): floating glass pill ===== */
.topbar { background: transparent; pointer-events: none; }
.topbar-inner { pointer-events: auto; background: rgba(12, 20, 36, 0.9); -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%); border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 18px 40px -18px rgba(8, 12, 30, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08); padding: 7px 8px 7px 14px; }
.topbar .brand-logo { height: 32px; width: 32px; border-radius: 10px; background: #fff; padding: 3px; box-shadow: 0 4px 12px -4px rgba(124, 58, 237, 0.6); }
.brand-word { font-size: 1.2rem; letter-spacing: -0.02em; }
.topbar-icon-btn { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.08); }
.topbar-icon-btn.is-active { background: rgba(255, 255, 255, 0.95); color: #1e1b4b; border-color: transparent; }
.topbar-icon-btn.is-active:hover { background: #fff; color: #1e1b4b; }
.topbar nav a.topbar-ask { box-shadow: 0 8px 20px -10px rgba(124, 58, 237, 0.9), inset 0 1px 0 rgba(255,255,255,.2); }
.topbar nav a.topbar-ask.is-active { box-shadow: 0 0 0 2px rgba(255,255,255,.6); }
.topbar-divider { background: rgba(255, 255, 255, 0.12); }
.account-avatar .avatar-circle { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18); }
.account-avatar:hover .avatar-circle { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.45); }
