:root {
  --bg: #07120f;
  --panel: #0b1c18;
  --panel-2: #10251f;
  --line: rgba(202, 230, 219, .12);
  --text: #eef7f2;
  --muted: #87a59a;
  --accent: #8ef0b7;
  --accent-dark: #073c26;
  --amber: #f4c66f;
  --red: #ff8d85;
  --shadow: 0 24px 70px rgba(0, 0, 0, .35);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: radial-gradient(circle at 70% -10%, rgba(51, 150, 106, .13), transparent 35%), var(--bg); }
button, input, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.eyebrow { margin: 0 0 10px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .18em; }
.muted { color: var(--muted); line-height: 1.65; }
.tiny { font-size: 12px; }
.mobile-only, .mobile-brand { display: none !important; }

.login-shell { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(420px, .75fr); min-height: 100vh; }
.login-brand { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding: clamp(56px, 8vw, 130px); background: linear-gradient(145deg, #0a211b, #07110f 65%); border-right: 1px solid var(--line); }
.login-brand::after { content: ""; position: absolute; right: -20%; bottom: -35%; width: 75%; aspect-ratio: 1; border: 1px solid rgba(142, 240, 183, .11); border-radius: 50%; box-shadow: 0 0 0 70px rgba(142, 240, 183, .03), 0 0 0 140px rgba(142, 240, 183, .02); }
.brand-mark { position: relative; flex: 0 0 auto; width: 38px; height: 38px; border: 1px solid rgba(142, 240, 183, .35); border-radius: 12px; background: linear-gradient(145deg, rgba(142, 240, 183, .16), rgba(142, 240, 183, .02)); transform: rotate(45deg); }
.brand-mark span { position: absolute; inset: 9px; border-radius: 6px; background: var(--accent); box-shadow: 0 0 25px rgba(142, 240, 183, .45); }
.brand-mark-large { width: 54px; height: 54px; margin-bottom: 58px; border-radius: 17px; }
.brand-mark-large span { inset: 13px; }
.login-brand h1 { max-width: 720px; margin: 0; font-size: clamp(48px, 6vw, 88px); line-height: 1.03; letter-spacing: -.055em; }
.login-brand h1 em { color: var(--accent); font-style: normal; }
.login-copy { max-width: 580px; margin: 34px 0 0; color: var(--muted); font-size: 17px; line-height: 1.8; }
.signal-art { display: flex; align-items: end; gap: 9px; height: 58px; margin-top: 70px; }
.signal-art i { display: block; width: 3px; height: 12px; border-radius: 3px; background: var(--accent); opacity: .35; }
.signal-art i:nth-child(2) { height: 22px; opacity: .5; }.signal-art i:nth-child(3) { height: 34px; opacity: .65; }.signal-art i:nth-child(4) { height: 47px; opacity: .8; }.signal-art i:nth-child(5) { height: 58px; }
.login-panel { display: grid; place-items: center; padding: 50px; background: rgba(5, 16, 13, .72); }
.login-card { width: min(100%, 430px); }
.login-card h2, .dialog-card h2 { margin: 0; font-size: 30px; letter-spacing: -.03em; }
.login-card > .muted { margin: 9px 0 36px; }
label { display: grid; gap: 9px; margin-bottom: 18px; color: #b7cdc5; font-size: 13px; font-weight: 650; }
input, select { width: 100%; border: 1px solid var(--line); border-radius: 12px; outline: none; padding: 13px 14px; color: var(--text); background: #0a1915; transition: border .2s, box-shadow .2s; }
input:focus, select:focus { border-color: rgba(142, 240, 183, .65); box-shadow: 0 0 0 4px rgba(142, 240, 183, .08); }
.login-card small { display: block; margin-top: 22px; color: #607d72; text-align: center; line-height: 1.6; }
.form-error { margin: -4px 0 16px; color: var(--red); font-size: 13px; }

.primary, .secondary, .icon-button, .text-button { border: 0; border-radius: 11px; }
.primary { display: inline-flex; align-items: center; justify-content: center; gap: 20px; min-height: 42px; padding: 0 18px; color: #062417; background: var(--accent); font-weight: 800; box-shadow: 0 8px 30px rgba(80, 220, 139, .12); }
.primary:hover { background: #a3f5c5; transform: translateY(-1px); }
.wide { width: 100%; justify-content: space-between; min-height: 50px; padding: 0 18px; }
.secondary { min-height: 40px; padding: 0 15px; border: 1px solid var(--line); color: #c7d9d2; background: rgba(255,255,255,.025); }
.secondary:hover { border-color: rgba(142, 240, 183, .35); color: var(--accent); }
.icon-button { display: grid; place-items: center; width: 40px; height: 40px; color: #bcd0c8; background: transparent; font-size: 21px; }
.icon-button:hover { background: rgba(255,255,255,.06); }
.text-button { padding: 8px 0; color: var(--muted); background: transparent; text-align: left; }

.app-shell { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; height: 100vh; padding: 28px 18px 22px; border-right: 1px solid var(--line); background: rgba(7, 18, 15, .92); backdrop-filter: blur(20px); }
.brand { display: flex; align-items: center; gap: 16px; padding: 4px 12px 34px; color: var(--text); text-decoration: none; }
.brand .brand-mark { width: 31px; height: 31px; border-radius: 9px; }.brand .brand-mark span { inset: 8px; border-radius: 4px; }
.brand b { display: block; font-size: 17px; letter-spacing: -.03em; }.brand small { display: block; margin-top: 3px; color: #59766b; font-size: 8px; font-weight: 800; letter-spacing: .2em; }
nav { display: grid; gap: 7px; }
nav button { display: flex; align-items: center; gap: 13px; height: 44px; padding: 0 13px; border: 1px solid transparent; border-radius: 11px; color: var(--muted); background: transparent; text-align: left; font-weight: 650; }
nav button:hover { color: #d5e5df; background: rgba(255,255,255,.025); }
nav button.active { border-color: rgba(142, 240, 183, .12); color: var(--accent); background: rgba(142, 240, 183, .075); }
.nav-icon { width: 20px; color: inherit; font-size: 19px; text-align: center; }
.sidebar-bottom { display: grid; gap: 18px; margin-top: auto; padding: 0 11px; }
.system-status { display: flex; align-items: center; gap: 11px; padding-top: 20px; border-top: 1px solid var(--line); }
.system-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 13px var(--accent); }
.system-status b, .system-status small { display: block; }.system-status b { font-size: 12px; }.system-status small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.content { min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 30px; min-height: 112px; padding: 28px clamp(28px, 4vw, 64px); border-bottom: 1px solid var(--line); }
.topbar h1 { margin: 0; font-size: 27px; letter-spacing: -.035em; }.topbar .eyebrow { margin-bottom: 7px; }
.top-actions { display: flex; align-items: center; gap: 10px; }.avatar { display: grid; place-items: center; width: 40px; height: 40px; margin-left: 5px; border: 1px solid rgba(142,240,183,.25); border-radius: 50%; color: var(--accent); background: rgba(142,240,183,.07); font-size: 11px; font-weight: 800; }
.warning { margin: 22px clamp(28px, 4vw, 64px) 0; padding: 12px 16px; border: 1px solid rgba(244,198,111,.22); border-radius: 11px; color: #d9bc82; background: rgba(244,198,111,.07); font-size: 13px; }.warning code { color: var(--amber); }
.page-content { padding: 38px clamp(28px, 4vw, 64px) 70px; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 32px; }
.metric { position: relative; overflow: hidden; min-height: 148px; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(145deg, rgba(255,255,255,.035), rgba(255,255,255,.012)); }
.metric::after { content: ""; position: absolute; right: -30px; bottom: -55px; width: 120px; height: 120px; border: 1px solid rgba(142,240,183,.08); border-radius: 50%; }
.metric p { margin: 0; color: var(--muted); font-size: 12px; font-weight: 700; }.metric strong { display: block; margin-top: 20px; font-size: 38px; line-height: 1; letter-spacing: -.05em; }.metric small { display: block; margin-top: 12px; color: #638176; font-size: 11px; }.metric small.good { color: var(--accent); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 34px 0 15px; }.section-head h2 { margin: 0; font-size: 17px; }.section-head p { margin: 0; color: var(--muted); font-size: 12px; }
.surface { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.018); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 16px 18px; border-bottom: 1px solid var(--line); text-align: left; font-size: 12px; white-space: nowrap; }
th { color: #668178; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
tbody tr:last-child td { border-bottom: 0; } tbody tr:hover { background: rgba(255,255,255,.015); }
.surface td > small { display: block; margin-top: 4px; color: var(--muted); }
.surface td code { color: var(--accent); }
.primary-cell { display: flex; align-items: center; gap: 12px; }.flag { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 9px; color: var(--accent); background: rgba(142,240,183,.05); font-size: 10px; font-weight: 800; }.primary-cell b, .primary-cell small { display: block; }.primary-cell small { margin-top: 4px; color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; border-radius: 20px; color: var(--muted); background: rgba(255,255,255,.035); font-size: 10px; font-weight: 750; }.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }.badge.online, .badge.active { color: var(--accent); background: rgba(142,240,183,.07); }.badge.provisioning { color: var(--amber); }.badge.offline, .badge.suspended { color: var(--red); }.badge.draining { color: #a8b6ff; }
.load { width: 110px; }.load progress { display: block; width: 100%; height: 4px; border: 0; border-radius: 5px; background: #173029; overflow: hidden; }.load progress::-webkit-progress-bar { background: #173029; }.load progress::-webkit-progress-value { background: var(--accent); border-radius: 5px; }.load progress::-moz-progress-bar { background: var(--accent); border-radius: 5px; }.load small { display: block; margin-top: 6px; color: var(--muted); }
.table-action { padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: transparent; font-size: 11px; }.table-action:hover { color: var(--accent); border-color: rgba(142,240,183,.3); }
.table-actions { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.quality { font-size: 11px; font-weight: 700; }.quality.excellent, .quality.good { color: var(--accent); }.quality.fair { color: var(--amber); }.quality.poor, .quality.offline { color: var(--red); }
.empty { display: grid; place-items: center; min-height: 260px; padding: 40px; color: var(--muted); text-align: center; }.empty strong { display: block; margin-bottom: 8px; color: #bfd2ca; }

dialog { width: min(760px, calc(100% - 30px)); padding: 0; border: 1px solid rgba(142,240,183,.16); border-radius: 18px; color: var(--text); background: #0a1a16; box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(0, 7, 5, .72); backdrop-filter: blur(8px); }
.dialog-card { padding: 28px; }.compact-dialog { max-width: 540px; margin: auto; }.dialog-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }.dialog-head .eyebrow { margin-bottom: 6px; }.dialog-card > .muted { margin: -7px 0 24px; font-size: 13px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 16px; }.span-2 { grid-column: span 2; }.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 10px; }
.node-advanced { margin: 2px 0 18px; padding: 13px 14px 0; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); }
.node-advanced summary { padding-bottom: 13px; color: #b7cdc5; cursor: pointer; font-size: 12px; font-weight: 700; }
.setup-guide { margin: 0 0 18px; padding: 14px 16px; border: 1px solid rgba(142,240,183,.13); border-radius: 12px; color: var(--muted); background: rgba(142,240,183,.04); font-size: 12px; line-height: 1.6; }
.setup-guide b { color: var(--text); }.setup-guide ol { margin: 8px 0; padding-left: 20px; }.setup-guide small { color: #6f9084; }
.secret-card pre { overflow: auto; min-height: 70px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; color: var(--accent); background: #06110e; white-space: pre-wrap; word-break: break-all; user-select: all; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 20; max-width: 380px; padding: 13px 16px; border: 1px solid rgba(142,240,183,.2); border-radius: 12px; color: #cfe5dc; background: #10251f; box-shadow: var(--shadow); font-size: 13px; }
.audit-list { display: grid; }.audit-row { display: grid; grid-template-columns: 165px 150px minmax(180px, 1fr) minmax(220px, 1.3fr); gap: 18px; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); font-size: 12px; }.audit-row:last-child { border-bottom: 0; }.audit-row time, .audit-row small { color: var(--muted); }.audit-row small { white-space: normal; line-height: 1.6; }

@media (max-width: 1050px) { .metric-grid { grid-template-columns: repeat(2, 1fr); }.login-shell { grid-template-columns: 1fr 440px; }.login-brand { padding: 60px; }.login-brand h1 { font-size: 54px; } }
@media (max-width: 760px) {
  .login-shell { display: block; }.login-brand { display: none; }.login-panel { min-height: 100vh; padding: 30px; }.mobile-brand { display: flex; align-items: center; gap: 15px; margin-bottom: 60px; }
  .app-shell { grid-template-columns: 1fr; }.sidebar { position: fixed; z-index: 10; width: 230px; transform: translateX(-100%); transition: transform .2s; }.sidebar.open { transform: translateX(0); box-shadow: var(--shadow); }.mobile-only { display: grid; }
  .mobile-only { display: grid !important; }
  .topbar { min-height: 90px; padding: 20px; }.topbar > div:first-of-type { flex: 1; }.topbar h1 { font-size: 21px; }.topbar .eyebrow { display: none; }.top-actions .secondary, .avatar { display: none; }.page-content { padding: 25px 20px 50px; }.warning { margin: 16px 20px 0; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 10px; }.metric { min-height: 125px; padding: 18px; }.metric strong { font-size: 31px; }
  .surface { overflow-x: auto; }.form-grid { grid-template-columns: 1fr; }.span-2 { grid-column: span 1; }.audit-row { grid-template-columns: 1fr; gap: 6px; }
}
@media (max-width: 450px) { .metric-grid { grid-template-columns: 1fr; }.top-actions .primary { padding: 0 12px; }.dialog-card { padding: 21px; } }
