/* Steward account area — dark console theme, matched to the landing theme
    (../theme.css). Same tokens: ground/chrome/ink/muted surfaces, accent
    #2e9bd6, ok #34d399, pill buttons, 16px cards. All paths relative.
    System stacks only, no external fonts/scripts. */

:root {
  --ground: #0a0a0c;
  --chrome: #101014;
  --ink: #f2f0eb;
  --muted: #a8a29a;
  --faint: #7d7870;
  --surface: #131318;
  --surface-2: #1a1a21;
  --line: rgb(255 255 255 / 0.09);
  --line-soft: rgb(255 255 255 / 0.055);
  --accent: #2e9bd6;
  --accent-hi: #7dd3fc;
  --accent-2: #a78bfa;
  --ok: #34d399;
  --warn: #ff8a5c;
  --bad: #f87171;
  --radius-card: 16px;
  --radius-pill: 999px;
  --radius-control: 10px;
  --maxw: 960px;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* static ambient glow (no canvas/JS needed on console pages) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(640px 420px at 8% -120px, rgb(46 155 214 / 0.16), transparent 70%),
    radial-gradient(720px 460px at 108% 22%, rgb(167 139 250 / 0.12), transparent 70%),
    radial-gradient(620px 420px at -10% 110%, rgb(255 138 92 / 0.08), transparent 70%);
}
::selection { background: rgb(46 155 214 / 0.35); }

a { color: var(--accent-hi); }
a:hover { color: #bfe6fb; }

h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 750;
  margin: 0.3em 0 0.3em;
}
h2 {
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 720;
}

/* ---- top nav (same look as landing .nav) ---- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(10 10 12 / 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.topbar-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  height: 62px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  margin-right: auto;
}
.brand svg { display: block; }
.topbar nav { display: flex; gap: 22px; margin-left: 14px; }
.topbar nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.94rem;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}
.topbar nav a:hover { color: var(--ink); }
.topbar nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.topbar .who {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--faint);
  max-width: 40%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar .who button {
  background: rgb(255 255 255 / 0.04);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: var(--radius-pill);
  padding: 6px 16px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 650;
  flex-shrink: 0;
}
.topbar .who button:hover { background: rgb(255 255 255 / 0.08); border-color: rgb(255 255 255 / 0.16); }

/* ---- layout ---- */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 24px 64px;
}
.container.narrow { max-width: 620px; }

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-card);
  padding: 24px;
  margin-bottom: 16px;
  overflow: hidden;
}
.card h2, .card h3 { margin-top: 0; }
.card h3 { font-size: 1.06rem; }
.card p { color: var(--muted); }
.card p strong, .card li { color: var(--ink); }
.grid { display: grid; gap: 1rem; }
@media (min-width: 720px) {
  .grid.cols3 { grid-template-columns: repeat(3, 1fr); }
  .grid.cols2 { grid-template-columns: repeat(2, 1fr); }
}

/* ---- forms ---- */
label { display: block; font-weight: 600; font-size: 0.92rem; margin: 0.85rem 0 0.3rem; }
.hint { font-size: 0.85rem; color: var(--muted); font-weight: 400; margin: 0.15rem 0 0; }
input[type="text"], input[type="email"], input[type="password"],
input[type="month"], select, textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  font: inherit;
  background: rgb(0 0 0 / 0.45);
  color: var(--ink);
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
input[aria-invalid="true"] { border-color: var(--bad); }
.field-error { color: var(--bad); font-size: 0.85rem; margin: 0.25rem 0 0; min-height: 1.1em; }

button, .btn {
  font: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  border-radius: var(--radius-pill);
  padding: 10px 22px;
  font-size: 0.95rem;
  font-weight: 650;
  border: 1px solid var(--line);
  transition: transform 0.15s, background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.btn-primary {
  background: #f2f0eb;
  border-color: transparent;
  color: #111;
  box-shadow: 0 8px 30px rgb(255 255 255 / 0.08);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 34px rgb(255 255 255 / 0.14); }
.btn-secondary { color: var(--ink); background: rgb(255 255 255 / 0.04); }
.btn-secondary:hover { background: rgb(255 255 255 / 0.08); border-color: rgb(255 255 255 / 0.16); }
.btn-danger { background: transparent; border-color: rgb(248 113 113 / 0.5); color: var(--bad); }
.btn-danger:hover { background: rgb(248 113 113 / 0.1); border-color: var(--bad); }
.btn[disabled], button[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-row { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 1rem; }
.oauth-row { display: grid; gap: 0.6rem; margin-top: 1rem; }
@media (min-width: 520px) { .oauth-row { grid-template-columns: 1fr 1fr; } }

.code-file { font-family: var(--font-mono); font-size: 0.8rem; word-break: break-all; color: var(--muted); }

/* ---- notices / banners ---- */
.notice {
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  background: var(--surface);
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  margin: 0 0 1rem;
  font-size: 0.93rem;
  color: var(--ink);
}
.notice p { margin: 0.25rem 0; color: var(--ink); }
.notice.error { border-left-color: var(--bad); background: rgb(248 113 113 / 0.08); }
.notice.ok { border-left-color: var(--ok); background: rgb(52 211 153 / 0.08); }
.notice.warn { border-left-color: var(--warn); background: rgb(255 138 92 / 0.08); }

/* ---- plan cards (match landing .plans/.plan) ---- */
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  padding: 30px 26px;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.plan:hover { transform: translateY(-3px); }
.plan .price { font-size: 2rem; font-weight: 780; margin: 0.3em 0 0; letter-spacing: -0.03em; color: var(--ink); }
.plan .per, .plan .byok { color: var(--muted); font-size: 0.9rem; }
.plan .byok { font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent-hi); margin: 0.2em 0 1em; }
.plan ul { list-style: none; margin: 0 0 1.7em; padding: 0; color: var(--muted); font-size: 0.94rem; display: flex; flex-direction: column; gap: 9px; }
.plan ul li::before { content: "✓ "; color: var(--ok); }
.plan .btn-row { margin-top: auto; }
.plan .btn { justify-content: center; }
.plan.current { border-color: rgb(52 211 153 / 0.6); background: linear-gradient(180deg, rgb(52 211 153 / 0.1), var(--surface) 55%); }
.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  background: rgb(46 155 214 / 0.15);
  color: var(--accent-hi);
  align-self: flex-start;
}
.badge.current { background: rgb(52 211 153 / 0.15); color: var(--ok); }
.flag {
  position: absolute; top: -13px; left: 26px;
  background: #f2f0eb; color: #111;
  font-size: 0.72rem; font-weight: 800;
  padding: 3px 12px; border-radius: 20px; margin: 0;
}

/* ---- status pills ---- */
.pill {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-pill);
  background: rgb(255 255 255 / 0.08);
  color: var(--muted);
  white-space: nowrap;
}
.pill.running { background: rgb(52 211 153 / 0.15); color: var(--ok); }
.pill.provisioning { background: rgb(255 138 92 / 0.15); color: var(--warn); }
.pill.stopped, .pill.suspended { background: rgb(248 113 113 / 0.15); color: var(--bad); }

/* ---- tables / tenant rows ---- */
.rows { display: grid; gap: 0.75rem; }
.tenant-row {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-card);
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
@media (min-width: 680px) {
  .tenant-row { flex-direction: row; align-items: center; }
  .tenant-row .grow { flex: 1; }
}
.tenant-row .slug { font-weight: 700; }
.tenant-row .url, .tenant-row .name { font-size: 0.85rem; color: var(--muted); word-break: break-all; }
.tenant-row .actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.code-box {
  font-family: var(--font-mono);
  background: rgb(0 0 0 / 0.5);
  border: 1px solid var(--line-soft);
  color: #d9f99d;
  border-radius: 7px;
  padding: 0.6rem 0.8rem;
  word-break: break-all;
  font-size: 0.85rem;
}
.copy-row { display: flex; gap: 0.5rem; align-items: stretch; margin-top: 0.4rem; }
.copy-row .code-box { flex: 1; }

/* ---- usage meters ---- */
.meter { margin: 0.7rem 0; }
.meter .meter-label { display: flex; justify-content: space-between; font-size: 0.88rem; color: var(--muted); }
.meter .bar { height: 10px; background: rgb(255 255 255 / 0.08); border-radius: var(--radius-pill); overflow: hidden; margin-top: 0.3rem; }
.meter .bar > span { display: block; height: 100%; background: var(--accent); border-radius: var(--radius-pill); }

/* ---- misc ---- */
.muted { color: var(--muted); }
.small { font-size: 0.87rem; }
.empty {
  border: 1px dashed rgb(255 255 255 / 0.2);
  border-radius: var(--radius-card);
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--muted);
  background: rgb(255 255 255 / 0.015);
}
.steps { counter-reset: step; padding-left: 0; list-style: none; }
.steps li { counter-increment: step; margin: 0.6rem 0; padding-left: 2.2rem; position: relative; color: var(--muted); }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0.1rem;
  width: 1.5rem; height: 1.5rem; border-radius: var(--radius-pill);
  background: rgb(46 155 214 / 0.15); color: var(--accent-hi);
  font-weight: 700; font-size: 0.85rem;
  display: inline-flex; align-items: center; justify-content: center;
}
footer.page-foot {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px 2.5rem;
  color: var(--faint);
  font-size: 0.85rem;
}
.list { color: var(--muted); }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

@media (max-width: 720px) {
  .topbar nav { display: none; }
  .topbar-inner { gap: 12px; }
  .container { padding: 28px 18px 48px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
