:root {
  --bg: #090b10;
  --panel: #11151d;
  --panel-2: #171c26;
  --line: #272e3b;
  --text: #f5f7fa;
  --muted: #9099aa;
  --accent: #8cf7c5;
  --accent-2: #62dab0;
  --danger: #ff7d86;
  --warning: #f0c36a;
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 80% 0, #17251f 0, transparent 30rem), var(--bg); }
button, input, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.eyebrow { margin: 0 0 .5rem; color: var(--accent); font-size: .7rem; font-weight: 800; letter-spacing: .14em; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #39705e; border-radius: 12px; color: #07110d; background: var(--accent); box-shadow: 0 0 34px #8cf7c533; font-weight: 900; }
.brand-line { display: flex; align-items: center; gap: .75rem; font-weight: 750; letter-spacing: -.02em; }
.center-screen, .auth-screen { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; }
.center-screen { color: var(--muted); gap: .6rem; align-content: center; }
.auth-card { width: min(100%, 520px); padding: clamp(1.5rem, 5vw, 3.2rem); border: 1px solid var(--line); border-radius: 28px; background: linear-gradient(145deg, #141923f2, #0e1219f2); box-shadow: 0 35px 90px #0009; }
.auth-card.compact { width: min(100%, 440px); }
.auth-card h1 { margin: 1.7rem 0 .6rem; font-size: clamp(2rem, 6vw, 3rem); letter-spacing: -.055em; }
.fine-print { color: #737d8d; font-size: .78rem; line-height: 1.6; }
.stack { display: grid; gap: 1rem; margin: 1.6rem 0; }
label { display: grid; gap: .5rem; color: #d3d8e1; font-size: .84rem; font-weight: 650; }
input, select { width: 100%; min-height: 46px; padding: .75rem .9rem; color: var(--text); border: 1px solid #303847; border-radius: 11px; outline: none; background: #0b0f16; transition: border .18s, box-shadow .18s; }
input:focus, select:focus { border-color: var(--accent-2); box-shadow: 0 0 0 3px #62dab01a; }
input::placeholder { color: #5f6878; }
button { min-height: 42px; padding: .68rem 1rem; border: 1px solid transparent; border-radius: 10px; font-weight: 750; }
button:disabled { cursor: not-allowed; opacity: .42; }
.primary { color: #07110d; background: var(--accent); }
.primary:hover:not(:disabled) { background: #b1ffda; }
.secondary { color: var(--text); border-color: #343d4c; background: #171d27; }
.secondary:hover { border-color: #536071; }
.danger { color: #ffacb1; border-color: #67343b; background: #28171c; }
.small { min-height: 34px; padding: .4rem .75rem; font-size: .78rem; }
.text-button { min-height: auto; padding: 0; color: var(--muted); background: transparent; }
.app-shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; height: 100vh; padding: 1.25rem; border-right: 1px solid #1c222d; background: #0a0d12e8; backdrop-filter: blur(20px); }
.sidebar-brand { padding: .35rem .35rem 2.2rem; font-size: 1.2rem; }
#nav { display: grid; gap: .35rem; }
.nav-item { display: flex; align-items: center; gap: .8rem; width: 100%; color: #9da6b5; background: transparent; border-color: transparent; text-align: left; }
.nav-item span { width: 1.2rem; color: #687282; font-size: 1.1rem; text-align: center; }
.nav-item:hover { color: white; background: #141923; }
.nav-item.active { color: var(--text); border-color: #284b40; background: #14251f; }
.nav-item.active span { color: var(--accent); }
.sidebar-foot { display: grid; gap: .8rem; margin-top: auto; padding: 1rem .5rem .25rem; }
.version-chip { width: fit-content; padding: .35rem .55rem; color: #99a2b1; border: 1px solid #2a313d; border-radius: 7px; font: 600 .7rem ui-monospace, monospace; }
.workspace { min-width: 0; }
.topbar { position: sticky; z-index: 5; top: 0; display: flex; align-items: center; min-height: 82px; padding: .9rem clamp(1rem, 4vw, 3rem); border-bottom: 1px solid #1c222d; background: #090b10d9; backdrop-filter: blur(18px); }
.topbar h2 { margin: 0; font-size: 1.05rem; }
.topbar .eyebrow { margin-bottom: .2rem; font-size: .6rem; }
.health { display: flex; align-items: center; gap: .5rem; margin-left: auto; color: #aab2bf; font-size: .75rem; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.menu-button { display: none; color: white; background: transparent; }
.content { width: min(1200px, 100%); margin: 0 auto; padding: clamp(1.2rem, 4vw, 3rem); }
.page { display: none; animation: reveal .2s ease-out; }
.page.active { display: block; }
@keyframes reveal { from { opacity: .3; transform: translateY(5px); } }
.page-intro { max-width: 710px; margin: .5rem 0 2rem; }
.page-intro h1 { margin: 0 0 .65rem; font-size: clamp(2.2rem, 5vw, 4.2rem); letter-spacing: -.06em; }
.page-intro > p:last-child { color: var(--muted); line-height: 1.7; }
.hero { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr 260px; align-items: center; min-height: 330px; padding: clamp(1.5rem, 5vw, 3.5rem); border: 1px solid #26352f; border-radius: 26px; background: linear-gradient(120deg, #14251f, #0f151b 58%, #151922); }
.hero::after { position: absolute; right: -100px; bottom: -180px; width: 400px; height: 400px; border: 1px solid #8cf7c51f; border-radius: 50%; content: ""; }
.hero h1 { margin: .4rem 0 1rem; font-size: clamp(2.4rem, 5.4vw, 5rem); line-height: .94; letter-spacing: -.075em; }
.hero p:last-child { max-width: 600px; color: #a5afbc; line-height: 1.65; }
.hero-orbit { z-index: 1; display: grid; place-items: center; width: 160px; height: 160px; margin: auto; border: 1px solid #55ae8e66; border-radius: 50%; box-shadow: inset 0 0 45px #8cf7c514, 0 0 70px #8cf7c50d; }
.hero-orbit::before { position: absolute; width: 220px; height: 80px; border: 1px solid #8cf7c536; border-radius: 50%; content: ""; transform: rotate(-22deg); }
.hero-orbit span { z-index: 1; color: var(--accent); font: 900 1.2rem ui-monospace, monospace; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 1rem 0; }
.metric-card, .panel { border: 1px solid var(--line); border-radius: var(--radius); background: #10141bf2; }
.metric-card { display: grid; gap: .45rem; padding: 1.25rem; }
.metric-card span { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.metric-card strong { font-size: 1.4rem; letter-spacing: -.03em; }
.metric-card small { color: #6f7887; }
.panel { margin: 1rem 0; padding: clamp(1.1rem, 3vw, 1.6rem); }
.panel h3 { margin: 0; }
.panel p { line-height: 1.6; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.panel-heading a { color: var(--accent); font-size: .8rem; text-decoration: none; }
pre { overflow: auto; margin: 0; padding: 1.1rem; color: #c7f8e3; border: 1px solid #26322e; border-radius: 11px; background: #090d0c; font: .78rem/1.65 ui-monospace, SFMono-Regular, Consolas, monospace; }
.warning-panel { border-color: #584723; background: #211d14; }
.warning-panel strong { color: #f2cf86; }
.warning-panel p { margin-bottom: 0; color: #b9aa8d; }
.badge { display: inline-flex; width: fit-content; padding: .35rem .55rem; border-radius: 99px; font-size: .7rem; font-weight: 800; }
.badge.ok { color: #9bffd4; background: #15392d; }
.badge.neutral { color: #aab3c0; background: #242a34; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: end; }
.span-2 { grid-column: span 2; }
.form-action { display: flex; align-items: end; justify-content: flex-end; }
.button-row { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .65rem; margin-top: 1rem; }
.steps ol { padding-left: 1.2rem; color: var(--muted); line-height: 1.8; }
.inline-form { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: end; }
.key-list { display: grid; }
.key-row { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center; padding: 1rem 0; border-top: 1px solid var(--line); }
.key-row:first-child { border-top: 0; }
.key-row strong, .key-row small { display: block; }
.key-row small { margin-top: .3rem; color: var(--muted); font-family: ui-monospace, monospace; }
.empty { padding: 2rem; color: var(--muted); text-align: center; }
.check-row { grid-auto-flow: column; justify-content: start; align-items: center; padding-bottom: .75rem; }
.check-row input { width: 18px; min-height: 18px; }
.note code { color: var(--accent); }
.version-panel { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 2rem; padding: 2rem; }
.version-panel > div:not(.version-arrow) { display: grid; gap: .6rem; }
.version-panel strong { font: 800 clamp(1.6rem, 4vw, 3rem) ui-monospace, monospace; }
.version-arrow { color: var(--accent); font-size: 2rem; }
.narrow { max-width: 600px; }
.audit-list { display: grid; }
.audit-row { display: grid; grid-template-columns: 1fr auto; gap: .5rem; padding: .8rem 0; border-top: 1px solid var(--line); }
.audit-row:first-child { border-top: 0; }
.audit-row small { color: var(--muted); }
dialog { width: min(92vw, 620px); padding: 0; color: var(--text); border: 1px solid #35423d; border-radius: 20px; background: var(--panel); box-shadow: 0 30px 100px #000d; }
dialog::backdrop { background: #000b; backdrop-filter: blur(4px); }
.dialog-content { padding: 2rem; }
.secret-value { display: block; overflow-wrap: anywhere; margin: 1.4rem 0; padding: 1rem; color: #b8ffdc; border: 1px solid #365346; border-radius: 10px; background: #090e0c; user-select: all; }
.toast { position: fixed; z-index: 50; right: 1.5rem; bottom: 1.5rem; max-width: min(420px, calc(100vw - 3rem)); padding: .9rem 1.1rem; color: #07110d; border-radius: 11px; background: var(--accent); box-shadow: 0 16px 50px #0008; font-weight: 700; }
.toast.error { color: #fff; background: #a83e48; }
@media (max-width: 920px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 20; left: -260px; width: 240px; box-shadow: 20px 0 60px #000c; transition: left .2s; }
  .sidebar.open { left: 0; }
  .menu-button { display: block; margin-right: .8rem; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .hero { grid-template-columns: 1fr; }
  .hero-orbit { display: none; }
}
@media (max-width: 600px) {
  .metric-grid, .form-grid, .inline-form, .version-panel { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .version-arrow { transform: rotate(90deg); }
  .button-row, .form-action { justify-content: stretch; }
  .button-row button, .form-action button { flex: 1; }
  .content { padding: 1rem; }
  .hero { min-height: 280px; }
}
