/* The account portal.
 *
 * Same tokens as app.css so this is Quanta and not a settings page bolted to
 * the side of her. It is a SEPARATE stylesheet rather than a slice of the
 * 616KB app.css on purpose: this page must load and render before any of the
 * chat machinery exists, and a person checking their bill should not wait on a
 * model picker.
 */

:root {
  --bg: #06070a;
  --raised: rgba(255, 255, 255, 0.045);
  --raised-hover: rgba(255, 255, 255, 0.085);
  --line: rgba(150, 160, 235, 0.14);
  --line-subtle: rgba(150, 160, 235, 0.07);
  --text: #f1f5f9;
  --text-bright: #ffffff;
  --muted: #94a3b8;
  --faint: #7a8798;
  --accent: #38bdf8;
  --accent-purple: #818cf8;
  --accent-gradient: linear-gradient(135deg, #38bdf8 0%, #6366f1 50%, #a855f7 100%);
  --wordmark: linear-gradient(100deg, #4338ca 0%, #22d3ee 30%, #e0f2fe 52%, #d946ef 78%, #f472b6 100%);
  --danger: #fca5a5;
  --good: #6ee7b7;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
/* ⛔ 100vh, NOT 100%. A percentage min-height resolves against the PARENT'S
   height, and html is auto — so body computed to its content height and simply
   stopped. On a tall window that left a band of bare canvas below the last
   card, with the fixed aurora still glowing over it and nothing to break it up:
   it read as the background quitting halfway down the page. dvh follows mobile
   browser chrome as it hides; vh is the fallback where dvh is unknown. */
html, body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 15px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body { min-height: 100dvh; }
a { color: var(--accent); }
h1, h2 { margin: 0; }
button { font: inherit; }

/* The same field of light the app opens on. */
.aura { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.aura::before, .aura::after, .aura i { content: ''; position: absolute; border-radius: 50%; filter: blur(90px); opacity: .42; }
.aura::before { width: 460px; height: 460px; top: -160px; left: -120px; background: radial-gradient(circle, rgba(56,189,248,.5), transparent 68%); }
.aura::after  { width: 420px; height: 420px; top: 30%; right: -180px; background: radial-gradient(circle, rgba(168,85,247,.4), transparent 68%); }
.aura i       { width: 400px; height: 400px; bottom: -200px; left: 22%; background: radial-gradient(circle, rgba(99,102,241,.4), transparent 68%); }

.bar {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 22px; border-bottom: 1px solid var(--line-subtle);
  background: rgba(6,7,10,.7); backdrop-filter: blur(22px) saturate(170%);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.mark { width: 24px; height: 24px; filter: drop-shadow(0 0 10px rgba(56,189,248,.45)); }
.wordmark {
  font-size: 15px; font-weight: 800; letter-spacing: .2em;
  background: var(--wordmark); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.bar-right { display: flex; align-items: center; gap: 8px; }

.wrap { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; padding: 28px 20px 72px; }
.page-title { font-size: 24px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 18px; }

.card {
  background: rgba(16,19,31,.72); border: 1px solid var(--line); border-radius: 18px;
  padding: 20px; margin-bottom: 16px; backdrop-filter: blur(18px);
  box-shadow: 0 12px 36px rgba(0,0,0,.35);
}
.card.center { text-align: center; padding: 34px 24px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.card-head h2 { font-size: 15px; font-weight: 700; letter-spacing: .01em; }
.muted { color: var(--muted); }
.fine { font-size: 12.5px; }
.foot { text-align: center; margin-top: 26px; }
.gate-mark { width: 56px; height: 56px; margin-bottom: 14px; filter: drop-shadow(0 0 16px rgba(56,189,248,.45)); }

/* identity */
.id-row { display: flex; align-items: center; gap: 14px; }
.avatar {
  width: 46px; height: 46px; flex: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; font-weight: 750; color: #05070d;
  background: var(--accent-gradient); text-transform: uppercase;
}
.id-text { min-width: 0; flex: 1; }
.id-name { font-size: 17px; font-weight: 650; color: var(--text-bright); }
.id-mail { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.chip {
  font-size: 11.5px; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); background: var(--raised);
}
.chip.good { color: var(--good); border-color: rgba(110,231,183,.4); }
.chip.warn { color: #fbbf24; border-color: rgba(251,191,36,.4); }

.tag {
  font-size: 10px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 6px; white-space: nowrap; flex: none;
}
.tag.plan { color: #c4b5fd; border: 1px solid rgba(196,181,253,.45); background: rgba(196,181,253,.08); }
.tag.free { color: var(--good); border: 1px solid rgba(110,231,183,.4); background: rgba(110,231,183,.07); }

/* ⛔ FIVE METERS, NOT ONE LADDER. Each resource is metered separately by the
   gateway, so the page shows them separately — a single "usage" bar would be a
   lie about how the product actually charges. */
.meters { display: grid; gap: 14px; }
.meter-name { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.meter-name b { font-weight: 650; color: var(--text-bright); }
.meter-val { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.track { height: 7px; border-radius: 999px; background: rgba(148,163,184,.16); overflow: hidden; margin-top: 7px; }
.fill { height: 100%; border-radius: 999px; background: var(--accent-gradient); transition: width .5s cubic-bezier(.16,1,.3,1); }
.fill.hot { background: linear-gradient(135deg, #fbbf24, #f87171); }
.meter.off .meter-name b { color: var(--faint); }
.meter.off .track { opacity: .45; }

/* security */
.sec-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line-subtle); }
.sec-row:first-of-type { border-top: none; padding-top: 2px; }
.sec-name { font-size: 13.5px; font-weight: 600; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 16px; border-radius: 11px; font-size: 13.5px; font-weight: 620;
  border: 1px solid var(--line); background: var(--raised); color: var(--text);
  text-decoration: none; cursor: pointer; transition: all .15s ease;
}
.btn:hover { background: var(--raised-hover); }
.btn.primary { background: var(--accent-gradient); border: none; color: #05070d; box-shadow: 0 6px 18px rgba(56,189,248,.26); }
.btn.ghost { background: none; }
.btn.danger { color: var(--danger); border-color: rgba(252,165,165,.35); }
.btn:disabled { opacity: .5; cursor: default; }
.row-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }

@media (max-width: 560px) {
  .wrap { padding: 20px 14px 60px; }
  .card { padding: 16px; border-radius: 15px; }
  .page-title { font-size: 21px; }
  /* Small screens SCALE, they never strip: every row stays, the actions wrap. */
  .sec-row { align-items: flex-start; flex-direction: column; gap: 8px; }
}

/* Moving between the site's own pages cross-fades (see app.css). Not under reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
