:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #090d12;
  color: #edf2f7;
  --panel: #101720;
  --line: #263241;
  --muted: #8fa1b5;
  --accent: #57e5a7;
  --warning: #ffcf66;
  --danger: #ff7d7d;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 85% 0%, #173429 0, transparent 34rem), #090d12; }
button, input { font: inherit; }
.shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 48px 0 80px; }
.auth-shell { display: grid; min-height: 100vh; place-items: center; padding: 24px; }
.auth-panel { width: min(480px, 100%); margin: 0; }
.auth-panel h1 { font-size: clamp(34px, 8vw, 52px); }
.login-form { display: grid; gap: 16px; margin-top: 28px; }
.login-form label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; }
.login-form input { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; background: #080c11; color: #fff; }
.login-form input:focus { border-color: var(--accent); outline: 2px solid rgb(87 229 167 / 20%); }
.hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.eyebrow, .section-kicker { margin: 0 0 8px; color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .14em; }
h1 { margin: 0; font-size: clamp(34px, 6vw, 66px); line-height: .98; letter-spacing: -.04em; }
h2 { margin: 0; font-size: 20px; }
.subtitle { max-width: 720px; margin: 18px 0 0; color: var(--muted); }
.panel, .metric { border: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 94%, transparent); box-shadow: 0 16px 50px rgb(0 0 0 / 20%); }
.panel { padding: 24px; border-radius: 18px; margin-bottom: 18px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.panel-heading.compact { margin-bottom: 20px; }
button { padding: 11px 18px; border: 0; border-radius: 10px; background: var(--accent); color: #062117; font-weight: 800; cursor: pointer; }
button:hover { filter: brightness(1.08); }
button:disabled { cursor: wait; opacity: .6; }
.button-secondary { border: 1px solid var(--line); background: transparent; color: var(--muted); }
.status-pill { padding: 8px 12px; border: 1px solid currentColor; border-radius: 999px; font-size: 13px; font-weight: 800; white-space: nowrap; }
.status-offline { color: var(--muted); }
.status-working { color: var(--warning); }
.status-ready { color: var(--accent); }
.status-error { color: var(--danger); }
.connection-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 22px; }
.connection-item { padding: 14px; border-radius: 12px; background: #0a1017; }
.connection-item span, .metric span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.connection-item strong { font-size: 14px; overflow-wrap: anywhere; }
.status-message { margin: 18px 0 0; color: var(--muted); }
.identity-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 18px; }
.metric { min-width: 0; padding: 22px; border-radius: 16px; }
.metric strong { display: block; overflow-wrap: anywhere; font-size: 21px; }
.details { margin: 0; }
.details > div { display: grid; grid-template-columns: 160px 1fr; gap: 20px; padding: 11px 0; border-top: 1px solid var(--line); }
.details dt { color: var(--muted); }
.details dd { margin: 0; overflow-wrap: anywhere; }
.warnings { margin: 18px 0 0; padding: 14px 14px 14px 34px; border: 1px solid #604d24; border-radius: 10px; color: var(--warning); background: #211b0d; }
.muted { color: var(--muted); font-size: 13px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 14px; border-top: 1px solid var(--line); text-align: left; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.empty { color: var(--muted); text-align: center; }

@media (max-width: 800px) {
  .hero, .panel-heading { align-items: stretch; flex-direction: column; }
  .header-actions { justify-content: space-between; }
  .connection-grid, .identity-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
  .shell { width: min(100% - 20px, 1120px); padding-top: 28px; }
  .connection-grid, .identity-grid { grid-template-columns: 1fr; }
  .details > div { grid-template-columns: 1fr; gap: 4px; }
}
