:root {
  color-scheme: dark;
  --bg: #090d14;
  --panel: #111824;
  --panel-2: #151f2d;
  --line: #263448;
  --text: #eef4ff;
  --muted: #8fa0b8;
  --accent: #7b61ff;
  --accent-2: #a895ff;
  --success: #63d49a;
  --warning: #f4c95d;
  --danger: #ff7a8a;
  --shadow: 0 24px 80px rgba(0,0,0,.35);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 15% 5%, #19213b 0, transparent 34%), var(--bg); color: var(--text); }
a { color: var(--accent-2); text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 760; letter-spacing: .02em; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: linear-gradient(145deg, var(--accent), #4c38d5); box-shadow: 0 10px 30px rgba(123,97,255,.28); }
.shell { width: min(1160px, calc(100% - 32px)); margin: 0 auto; }
.auth-shell { width: min(460px, calc(100% - 32px)); margin: 0 auto; padding: 8vh 0 48px; }
.auth-header { margin-bottom: 28px; }
.eyebrow { margin: 0 0 10px; color: var(--accent-2); font-size: 12px; text-transform: uppercase; letter-spacing: .16em; font-weight: 750; }
h1 { margin: 0 0 10px; font-size: clamp(30px, 5vw, 44px); line-height: 1.05; }
h2 { margin: 0; font-size: 20px; }
p { color: var(--muted); line-height: 1.6; }
.card { background: rgba(17,24,36,.92); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 24px; }
.stack { display: grid; gap: 16px; }
.field { display: grid; gap: 8px; }
label { font-size: 13px; color: #cad5e6; font-weight: 650; }
input { width: 100%; border: 1px solid var(--line); background: #0b111b; color: var(--text); padding: 13px 14px; border-radius: 10px; outline: none; }
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(123,97,255,.16); }
.primary, .ghost { border-radius: 10px; padding: 12px 16px; font-weight: 720; border: 1px solid transparent; }
.primary { color: white; background: linear-gradient(145deg, var(--accent), #5f49e7); }
.primary:disabled, .ghost:disabled { opacity: .52; cursor: wait; }
.ghost { color: var(--text); background: transparent; border-color: var(--line); }
.message { margin: 0; padding: 12px 14px; border-radius: 10px; font-size: 14px; }
.message.error { background: rgba(255,122,138,.10); color: #ffc1ca; border: 1px solid rgba(255,122,138,.25); }
.message.success { background: rgba(99,212,154,.10); color: #a5f0c8; border: 1px solid rgba(99,212,154,.25); }
.message.warning { background: rgba(244,201,93,.10); color: #ffe69d; border: 1px solid rgba(244,201,93,.25); }
.auth-links { margin-top: 18px; font-size: 14px; }
.divider { height: 1px; background: var(--line); margin: 24px 0; }
.status-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.status-box { padding: 12px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); }
.status-box span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.topbar { height: 72px; border-bottom: 1px solid var(--line); background: rgba(9,13,20,.82); backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 10; }
.topbar .shell { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.platform-layout { display: grid; grid-template-columns: 220px 1fr; gap: 28px; padding: 28px 0 60px; }
.sidebar { display: grid; align-content: start; gap: 7px; }
.nav-item { color: var(--muted); padding: 10px 12px; border-radius: 9px; font-size: 14px; }
.nav-item.active { background: var(--panel-2); color: white; }
.nav-item.disabled { opacity: .45; cursor: default; }
.content { min-width: 0; }
.page-head { display: flex; justify-content: space-between; gap: 18px; align-items: end; margin-bottom: 22px; }
.page-head p { margin-bottom: 0; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.metric { padding: 18px; border: 1px solid var(--line); background: var(--panel); border-radius: 14px; }
.metric-label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.metric-value { font-size: 27px; margin-top: 8px; font-weight: 760; }
.table-card { padding: 0; overflow: hidden; }
.table-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 13px 20px; border-bottom: 1px solid var(--line); text-align: left; font-size: 13px; }
th { color: var(--muted); font-weight: 650; background: rgba(255,255,255,.015); }
td { color: #dbe5f4; }
.empty { padding: 34px 20px; text-align: center; color: var(--muted); }
.meta-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin-top: 18px; }
.meta { padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #0d141f; min-width: 0; }
.meta span { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 5px; }
.meta strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.note { font-size: 13px; color: var(--muted); }
@media (max-width: 820px) {
  .platform-layout { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: repeat(3, minmax(120px,1fr)); overflow-x: auto; padding-bottom: 4px; }
  .nav-item { white-space: nowrap; }
  .metrics, .meta-grid { grid-template-columns: 1fr; }
}

.section-gap { height: 18px; }

/* Platform Console v0.2.0 — Client provisioning */
button, input, textarea, select { font: inherit; }
textarea, select { width: 100%; border: 1px solid var(--line); background: #0b111b; color: var(--text); padding: 13px 14px; border-radius: 10px; outline: none; }
textarea { resize: vertical; min-height: 116px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; line-height: 1.5; }
textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(123,97,255,.16); }
.button-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; border-radius: 10px; padding: 12px 16px; font-weight: 720; border: 1px solid transparent; white-space: nowrap; }
.button-link.primary { color: white; background: linear-gradient(145deg, var(--accent), #5f49e7); }
.button-link.ghost { color: var(--text); background: transparent; border-color: var(--line); }
.disabled-link { opacity: .45; pointer-events: none; }
.metrics-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.clickable-row { cursor: pointer; transition: background .16s ease; }
.clickable-row:hover, .clickable-row:focus { background: rgba(123,97,255,.08); outline: none; }
.stack-lg { display: grid; gap: 18px; }
.form-grid { display: grid; gap: 14px; margin-top: 18px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.form-grid.three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.field-help { color: var(--muted); font-size: 12px; line-height: 1.45; }
.section-title { display: flex; justify-content: space-between; gap: 18px; align-items: center; }
.section-title > div:first-child { display: flex; align-items: flex-start; gap: 12px; }
.section-title h2, .section-title p { margin: 0; }
.step-badge { flex: 0 0 auto; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: rgba(123,97,255,.14); color: var(--accent-2); border: 1px solid rgba(123,97,255,.28); font-size: 13px; font-weight: 800; }
.switch-line { display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; }
.switch-line input { width: auto; accent-color: var(--accent); }
.action-card { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.action-card h2, .action-card p { margin: 0; }
.result-card { display: grid; gap: 18px; }
.success-mark { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: rgba(99,212,154,.12); border: 1px solid rgba(99,212,154,.3); color: var(--success); font-size: 24px; font-weight: 800; }
.result-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
.secret-panel { border: 1px solid rgba(244,201,93,.28); background: rgba(244,201,93,.06); border-radius: 14px; padding: 16px; }
.secret-panel h3 { margin: 0 0 5px; font-size: 16px; }
.secret-panel p { margin: 0 0 14px; font-size: 13px; }
.secret-row { display: flex; gap: 10px; align-items: center; }
.secret-row code { flex: 1; min-width: 0; overflow-wrap: anywhere; padding: 12px; border-radius: 9px; background: #090d14; border: 1px solid var(--line); color: #ffe69d; }
.result-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.meta-grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 980px) {
  .metrics-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .form-grid.three { grid-template-columns: 1fr; }
  .meta-grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 680px) {
  .page-head, .table-head, .action-card, .section-title { align-items: stretch; flex-direction: column; }
  .form-grid.two, .metrics-4, .result-grid, .meta-grid-4 { grid-template-columns: 1fr; }
  .secret-row { align-items: stretch; flex-direction: column; }
}
