@font-face {
  font-family: Geist;
  src: url('/geist-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #07080b;
  --canvas: #0a0c11;
  --panel: #10131a;
  --raised: #161a24;
  --hover: #1c2130;
  --line: #232838;
  --line-strong: #343b50;
  --text: #f8f9fb;
  --muted: #a3aab8;
  --subtle: #7a8294;
  --accent: #f0f1f4;
  --accent-ink: #090a0d;
  --green: #63e6a6;
  --green-soft: rgba(99,230,166,.11);
  --blue: #82a6ff;
  --blue-soft: rgba(130,166,255,.11);
  --amber: #ffcb70;
  --red: #ff8080;
  --shadow: 0 28px 80px rgba(0,0,0,.34);
  --radius: 18px;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f4f7;
  --canvas: #f8f9fb;
  --panel: #fff;
  --raised: #f0f2f5;
  --hover: #e9ecf1;
  --line: #dde1e8;
  --line-strong: #c7ccd6;
  --text: #11131a;
  --muted: #596173;
  --subtle: #7a8294;
  --accent: #11131a;
  --accent-ink: #fff;
  --green: #168a50;
  --green-soft: rgba(22,138,80,.09);
  --blue: #315fd1;
  --blue-soft: rgba(49,95,209,.08);
  --amber: #9c6411;
  --red: #cc3636;
  --shadow: 0 28px 80px rgba(24,31,44,.09);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 72% -10%, rgba(130,166,255,.08), transparent 32rem),
    var(--bg);
  color: var(--text);
  font-family: Geist, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(16px, .25vw + 15px, 19px);
  line-height: 1.5;
  letter-spacing: -.012em;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.icon { display: inline-flex; width: 20px; height: 20px; flex: none; color: currentColor; }
.icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.boot {
  min-height: 100vh;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.boot-mark { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; position: relative; animation: breathe 1.5s ease-in-out infinite; }
.boot-mark::before, .boot-mark::after { content: ""; position: absolute; width: 5px; height: 8px; background: var(--text); border-radius: 50%; top: 14px; }
.boot-mark::before { left: 11px; }.boot-mark::after { right: 11px; }
@keyframes breathe { 50% { transform: scale(1.07); border-color: var(--line-strong); } }

.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0,1.15fr) minmax(380px,.85fr); }
.auth-story { padding: clamp(36px, 6vw, 100px); display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; }
.wordmark { display: inline-flex; align-items: center; gap: 11px; font-weight: 650; letter-spacing: -.04em; font-size: 22px; }
.mark { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; }
.eyes { display: flex; gap: 4px; }.eyes i { width: 3px; height: 5px; border-radius: 50%; background: currentColor; }
.auth-promise { max-width: 760px; padding: 80px 0; }
.eyebrow { color: var(--blue); text-transform: uppercase; font-size: 13px; letter-spacing: .15em; font-weight: 600; }
h1 { margin: 18px 0 22px; font-size: clamp(48px, 6vw, 102px); line-height: .98; letter-spacing: -.065em; font-weight: 600; max-width: 900px; }
.lede { color: var(--muted); font-size: clamp(18px, 1.4vw, 26px); line-height: 1.45; max-width: 650px; }
.trust-row { display: flex; gap: 24px; flex-wrap: wrap; color: var(--subtle); font-size: 14px; }
.trust-row span { display: inline-flex; gap: 8px; align-items: center; }
.auth-panel { background: var(--canvas); border-left: 1px solid var(--line); display: grid; place-items: center; padding: 36px; }
.auth-card { width: min(100%, 480px); background: var(--panel); border: 1px solid var(--line); border-radius: 24px; padding: clamp(28px, 4vw, 48px); box-shadow: var(--shadow); }
.auth-card h2 { font-size: 32px; letter-spacing: -.04em; margin: 0 0 10px; }
.auth-card p { color: var(--muted); margin: 0 0 28px; }

.field { display: grid; gap: 9px; margin-bottom: 16px; }
.field label { color: var(--muted); font-size: 14px; font-weight: 500; }
.input { width: 100%; background: var(--raised); color: var(--text); border: 1px solid var(--line); border-radius: 13px; min-height: 50px; padding: 0 15px; }
.input:hover { border-color: var(--line-strong); }
.button { border: 1px solid var(--line); border-radius: 13px; min-height: 46px; padding: 0 17px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; background: var(--raised); cursor: pointer; font-weight: 550; transition: transform .16s, border-color .16s, background .16s; }
.button:hover { transform: translateY(-1px); border-color: var(--line-strong); background: var(--hover); }
.button.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.button.full { width: 100%; }
.button.danger { color: var(--red); }
.button:disabled { opacity: .48; cursor: not-allowed; transform: none; }
.form-note { color: var(--subtle); font-size: 14px; margin-top: 14px; }

.shell { min-height: 100vh; display: grid; grid-template-columns: 256px minmax(0,1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 26px 18px; border-right: 1px solid var(--line); background: rgba(7,8,11,.82); backdrop-filter: blur(24px); display: flex; flex-direction: column; }
:root[data-theme="light"] .sidebar { background: rgba(248,249,251,.85); }
.sidebar .wordmark { padding: 0 11px 24px; }
.nav { display: grid; gap: 5px; }
.nav button { min-height: 46px; display: flex; align-items: center; gap: 12px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); padding: 0 12px; cursor: pointer; text-align: left; }
.nav button:hover { color: var(--text); background: var(--raised); }
.nav button.active { color: var(--text); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.nav button[data-tone="green"] .icon { color: var(--green); }
.sidebar-foot { margin-top: auto; padding: 16px 10px 2px; display: grid; gap: 12px; }
.account-mini { display: grid; grid-template-columns: 36px 1fr; gap: 10px; align-items: center; min-width: 0; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--raised); display: grid; place-items: center; font-weight: 650; border: 1px solid var(--line); }
.account-mini strong, .account-mini span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-mini > div:last-child { min-width: 0; }
.account-mini span { color: var(--subtle); font-size: 13px; }

.workspace { min-width: 0; }
.topbar { height: 76px; padding: 0 clamp(24px, 4vw, 64px); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 5; background: rgba(7,8,11,.78); backdrop-filter: blur(22px); }
:root[data-theme="light"] .topbar { background: rgba(248,249,251,.84); }
.page-title { font-size: 18px; font-weight: 600; letter-spacing: -.03em; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.icon-button { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--panel); cursor: pointer; }
.main { width: min(100%, 1440px); margin: 0 auto; padding: clamp(30px, 4vw, 68px); }
.hero { display: flex; justify-content: space-between; gap: 36px; align-items: flex-end; margin-bottom: 36px; }
.hero h2 { margin: 6px 0 8px; font-size: clamp(34px, 3.2vw, 60px); line-height: 1.04; letter-spacing: -.055em; font-weight: 600; }
.hero p { margin: 0; color: var(--muted); font-size: 17px; }

.status-line { display: flex; gap: 10px; align-items: center; color: var(--muted); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--subtle); box-shadow: 0 0 0 5px rgba(122,130,148,.08); }
.dot.live { background: var(--green); box-shadow: 0 0 0 5px var(--green-soft); }
.dot.warn { background: var(--amber); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); gap: 18px; }
.span-4 { grid-column: span 4; }.span-5 { grid-column: span 5; }.span-6 { grid-column: span 6; }.span-7 { grid-column: span 7; }.span-8 { grid-column: span 8; }.span-12 { grid-column: span 12; }
.card { background: linear-gradient(180deg, rgba(255,255,255,.018), transparent 60%), var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 2.2vw, 30px); box-shadow: 0 1px 0 rgba(255,255,255,.025) inset; min-width: 0; }
.card.interactive { cursor: pointer; transition: border-color .16s, transform .16s; }.card.interactive:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.card-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 28px; }
.card-icon { color: var(--muted); }.card-icon.messages { color: var(--green); }.card-icon.billing { color: var(--blue); }
.card h3 { margin: 0; font-size: 18px; letter-spacing: -.025em; }
.card-copy { color: var(--muted); margin: 6px 0 0; font-size: 15px; }
.metric { font-size: clamp(32px, 3vw, 54px); line-height: 1; letter-spacing: -.055em; font-variant-numeric: tabular-nums; font-weight: 600; }
.metric-label { margin-top: 10px; color: var(--subtle); font-size: 14px; }
.split { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.divider { height: 1px; background: var(--line); margin: 22px 0; }
.list { display: grid; }
.list-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 18px; padding: 17px 0; border-bottom: 1px solid var(--line); align-items: center; }
.list-row:last-child { border-bottom: 0; }
.list-title { font-weight: 550; }.list-meta { color: var(--subtle); font-size: 14px; margin-top: 3px; }
.badge { display: inline-flex; align-items: center; gap: 7px; min-height: 30px; border-radius: 999px; border: 1px solid var(--line); padding: 0 11px; color: var(--muted); font-size: 13px; }
.badge.live { color: var(--green); background: var(--green-soft); border-color: transparent; }
.badge.failed { color: var(--red); }
.empty { min-height: 210px; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 28px; }
.empty strong { display: block; color: var(--text); margin-bottom: 6px; font-size: 18px; }
.code-box { font-size: clamp(28px, 4vw, 46px); letter-spacing: .16em; font-weight: 650; font-variant-numeric: tabular-nums; padding: 22px; border-radius: 16px; background: var(--raised); border: 1px solid var(--line); text-align: center; }

.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; min-width: 760px; font-size: 14px; }
th, td { padding: 15px 17px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--subtle); font-weight: 500; background: var(--raised); position: sticky; top: 0; }
td { color: var(--muted); } td strong { color: var(--text); }
tr:last-child td { border-bottom: 0; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.toolbar .input { width: min(360px, 100%); }

.plans { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.plan { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.plan.featured { border-color: var(--line-strong); box-shadow: 0 0 0 1px rgba(130,166,255,.15) inset; }
.plan-price { font-size: 42px; letter-spacing: -.05em; font-weight: 600; margin: 18px 0 4px; }.plan-price small { color: var(--subtle); font-size: 15px; letter-spacing: 0; }
.plan p { color: var(--muted); min-height: 48px; }
.notice { border: 1px solid var(--line); border-radius: 14px; padding: 15px 17px; display: flex; gap: 12px; align-items: flex-start; color: var(--muted); background: var(--raised); }
.notice.error { color: var(--red); }

#toast-host { position: fixed; right: 24px; bottom: 24px; z-index: 50; display: grid; gap: 10px; }
.toast { background: var(--text); color: var(--bg); box-shadow: var(--shadow); border-radius: 12px; padding: 13px 16px; font-size: 14px; max-width: 360px; }
.toast.error { background: var(--red); color: #fff; }
.mobile-nav { display: none; }

@media (max-width: 980px) {
  .auth-shell { grid-template-columns: 1fr; }.auth-story { min-height: auto; padding-bottom: 24px; }.auth-promise { padding: 72px 0 28px; }.auth-panel { border-left: 0; border-top: 1px solid var(--line); padding: 48px 24px 80px; }
  .shell { display: block; }.sidebar { display: none; }.topbar { padding: 0 22px; }.main { padding: 28px 20px 100px; }
  .mobile-nav { position: fixed; display: flex; z-index: 20; bottom: 14px; left: 50%; transform: translateX(-50%); width: min(calc(100% - 28px), 560px); min-height: 64px; background: rgba(16,19,26,.92); border: 1px solid var(--line); border-radius: 20px; backdrop-filter: blur(22px); padding: 7px; box-shadow: var(--shadow); }
  :root[data-theme="light"] .mobile-nav { background: rgba(255,255,255,.92); }
  .mobile-nav button { flex: 1; border: 0; background: transparent; color: var(--subtle); border-radius: 14px; display: grid; place-items: center; cursor: pointer; }.mobile-nav button.active { color: var(--text); background: var(--raised); }
  .span-4, .span-5, .span-6, .span-7, .span-8 { grid-column: span 12; }
}
@media (max-width: 640px) {
  h1 { font-size: 52px; }.auth-story { padding: 28px 22px; }.auth-promise { padding-top: 72px; }.trust-row { display: grid; gap: 10px; }
  .hero { display: block; }.hero .button { margin-top: 20px; }.plans { grid-template-columns: 1fr; }.top-actions .button span { display: none; }
}
