/* ==========================================================================
   Account / dashboard — modern product shell refinement.
   Sticky topbar + glass rail + carded content, neutral graphite glass.
   Pure CSS overlay; no ids / JS-bound classes are renamed.
   ========================================================================== */

.a-body {
  --a-accent: #e4ebf5;
  --a-accent-soft: rgba(220, 230, 244, 0.1);
  --a-line: rgba(255, 255, 255, 0.08);
  --a-line-strong: rgba(255, 255, 255, 0.14);
  --a-bg: #0a0b0e;
  --a-rail: rgba(17, 20, 25, 0.78);
  --a-panel: rgba(255, 255, 255, 0.035);
  --a-hover: rgba(255, 255, 255, 0.07);
  background:
    radial-gradient(1100px 560px at 78% -8%, rgba(122, 140, 172, 0.1), transparent 66%),
    radial-gradient(820px 520px at 6% 104%, rgba(90, 104, 128, 0.07), transparent 70%),
    var(--a-bg);
  color: #eef1f5;
}

/* ------------------------------------------------------------- gate */
.a-gate {
  background:
    radial-gradient(760px 420px at 50% -10%, rgba(130, 146, 172, 0.12), transparent 70%),
    var(--a-bg);
}
.a-gate-card {
  border: 1px solid var(--a-line-strong);
  border-radius: 22px;
  background: rgba(23, 26, 32, 0.7);
  backdrop-filter: blur(26px) saturate(140%);
  -webkit-backdrop-filter: blur(26px) saturate(140%);
  box-shadow: 0 26px 74px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  padding: 40px 34px 32px;
}
.a-gate-brand { font-weight: 650; letter-spacing: -0.02em; }
.a-gate-card h1 { font-size: 25px; letter-spacing: -0.03em; }
.a-field input, .a-input {
  border: 1px solid var(--a-line-strong);
  background: rgba(10, 11, 14, 0.66);
  border-radius: 11px;
  transition: border-color 160ms, box-shadow 160ms, background 160ms;
}
.a-field input:focus, .a-input:focus {
  border-color: var(--a-line-strong);
  box-shadow: 0 0 0 3px var(--a-accent-soft);
  background: rgba(255, 255, 255, 0.05);
}

/* ------------------------------------------------------------ shell */
.a-shell { background: transparent; }
.a-rail {
  background: var(--a-rail);
  backdrop-filter: blur(22px) saturate(130%);
  -webkit-backdrop-filter: blur(22px) saturate(130%);
  border-inline-end: 1px solid var(--a-line);
  padding: 20px 12px 14px;
}
.a-rail-brand {
  padding: 2px 10px 24px;
  font-size: 15.5px; font-weight: 650; letter-spacing: -0.02em;
}
.a-rail-label {
  padding: 22px 12px 8px;
  font-size: 10px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: #6a717c;
}
.a-nav {
  height: 40px; border-radius: 10px; gap: 12px;
  font-size: 13.5px; position: relative;
  transition: background 140ms, color 140ms;
}
.a-nav:hover { background: var(--a-hover); }
.a-nav.is-on {
  background: var(--a-hover); color: #f4f7fb;
  box-shadow: inset 0 0 0 1px var(--a-line);
}
.a-nav.is-on::before {
  content: ""; position: absolute;
  inset-inline-start: -12px; top: 9px; bottom: 9px; width: 2px;
  border-radius: 2px; background: var(--a-accent);
}
.a-rail-user {
  margin-top: 14px; padding: 9px 10px;
  border: 1px solid var(--a-line); border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  transition: background 140ms;
}
.a-rail-user:hover { background: rgba(255, 255, 255, 0.06); }
.a-avatar {
  background: linear-gradient(145deg, #3a414b, #242930);
  color: #eef1f5; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.13);
}

/* ----------------------------------------------------------- topbar */
.a-content { display: flex; flex-direction: column; min-width: 0; }
.a-topbar {
  position: sticky; top: 0; z-index: 5; flex: none;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; height: 64px; padding: 0 40px;
  border-bottom: 1px solid var(--a-line);
  background: rgba(11, 13, 17, 0.72);
  backdrop-filter: blur(20px) saturate(130%);
  -webkit-backdrop-filter: blur(20px) saturate(130%);
}
.a-crumb { display: flex; align-items: center; gap: 10px; min-width: 0; }
.a-crumb-root { font-size: 13px; color: #8b929d; }
.a-crumb-sep { color: #585f6a; font-size: 13px; }
.a-crumb-current { font-size: 13.5px; font-weight: 550; color: #eef1f5; }
.a-crumb-current::before { content: "Overview"; }
.a-content:has(.a-page[data-view="billing"]:not([hidden])) .a-crumb-current::before { content: "Billing"; }
.a-content:has(.a-page[data-view="usage"]:not([hidden])) .a-crumb-current::before { content: "Usage"; }
.a-content:has(.a-page[data-view="keys"]:not([hidden])) .a-crumb-current::before { content: "API keys"; }
.a-topbar-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.a-chip {
  display: inline-flex; align-items: center; height: 32px; padding: 0 14px;
  border: 1px solid var(--a-line-strong); border-radius: 9px;
  background: rgba(255, 255, 255, 0.04); color: #c9cfd9;
  font-size: 12.5px; text-decoration: none;
  transition: background 140ms, color 140ms;
}
.a-chip:hover { background: var(--a-hover); color: #fff; }
.a-avatar-top { width: 30px; height: 30px; font-size: 12px; }

/* ------------------------------------------------------------- page */
.a-page { max-width: 960px; padding: 46px 40px 100px; }
.a-title { font-size: 30px; letter-spacing: -0.035em; font-weight: 650; }
.a-sub { font-size: 14.5px; margin-bottom: 34px; color: #9aa2ae; }

/* ------------------------------------------------------------ buttons */
.a-btn {
  border: 1px solid var(--a-line-strong);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  transition: background 150ms, border-color 150ms, transform 150ms;
}
.a-btn:hover { background: var(--a-hover); border-color: rgba(255, 255, 255, 0.24); transform: translateY(-1px); }
.a-btn-solid { background: #eef1f5; border-color: #eef1f5; color: #0a0b0e; font-weight: 650; }
.a-btn-solid:hover { background: #fff; border-color: #fff; }
.a-btn-accent { background: #eef1f5; border-color: #eef1f5; color: #0a0b0e; font-weight: 650; }
.a-btn-accent:hover { background: #fff; border-color: #fff; }
.a-btn-danger { color: #e8928c; border-color: rgba(232, 146, 140, 0.3); background: transparent; }
.a-btn-danger:hover { background: rgba(232, 146, 140, 0.1); }

/* ------------------------------------------------------------- cards */
.a-stats {
  gap: 14px; background: transparent; border: 0; border-radius: 0; overflow: visible;
}
.a-stat {
  padding: 24px 24px 22px;
  border: 1px solid var(--a-line-strong); border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: relative; overflow: hidden;
  transition: border-color 160ms, transform 160ms;
}
.a-stat:hover { border-color: rgba(255, 255, 255, 0.2); transform: translateY(-2px); }
.a-stat::after {
  content: ""; position: absolute; inset: auto -30% -120% 40%; height: 160px;
  background: radial-gradient(closest-side, rgba(150, 166, 196, 0.13), transparent 72%);
  pointer-events: none;
}
.a-stat dt { color: #868e99; font-size: 10.5px; letter-spacing: 0.12em; }
.a-stat dd { font-size: 30px; letter-spacing: -0.04em; }

.a-hero {
  border: 1px solid var(--a-line-strong); border-radius: 18px;
  background:
    radial-gradient(600px 220px at 100% 0%, rgba(140, 156, 184, 0.14), transparent 70%),
    rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  padding: 30px 32px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  margin-bottom: 30px;
}
.a-hero-amount { font-size: 40px; }

.a-section {
  padding: 26px 28px; margin-bottom: 16px;
  border: 1px solid var(--a-line); border-radius: 16px;
  background: rgba(255, 255, 255, 0.024);
}
.a-section:first-of-type { padding-top: 26px; }
.a-section-head { margin-bottom: 20px; }
.a-section-head h2 { font-size: 16px; letter-spacing: -0.015em; }
.a-row { border-bottom: 1px solid var(--a-line); }

.a-packs { gap: 12px; }
.a-pack {
  border: 1px solid var(--a-line-strong); border-radius: 14px;
  background: rgba(255, 255, 255, 0.03); padding: 18px 16px;
  transition: border-color 150ms, background 150ms, transform 150ms;
}
.a-pack:hover { border-color: rgba(255, 255, 255, 0.26); background: rgba(255, 255, 255, 0.055); transform: translateY(-2px); }
.a-pack-picked { color: #f0f3f7; font-weight: 600; }

.a-table th { color: #868e99; border-bottom: 1px solid var(--a-line-strong); }
.a-table td { border-bottom: 1px solid var(--a-line); }
.a-key-box { border: 1px solid var(--a-line-strong); border-radius: 12px; background: rgba(10, 11, 14, 0.6); }
.a-key-box code { background: #050608; }
.a-bar { background: #333a45; border-radius: 3px 3px 0 0; }
.a-bar:hover { background: #cdd3de; }
.a-tag-wait { background: rgba(220, 230, 244, 0.12); color: #cdd3de; }
.a-msg-ok { color: #8ac9a8; }
.a-msg-bad { color: #e8928c; }

/* ------------------------------------------------------------- phone */
@media (max-width: 860px) {
  .a-topbar { padding: 0 16px; height: 56px; }
  .a-crumb-root, .a-crumb-sep { display: none; }
  .a-page { padding: 26px 16px 70px; }
  .a-section { padding: 20px 16px; }
  .a-stats { gap: 10px; }
}
