:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --text: #172033;
  --muted: #657085;
  --line: #d9e0ec;
  --accent: #0f766e;
  --danger: #b42318;
  --warning: #a15c00;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 260px;
  background: #111827;
  color: #f9fafb;
  padding: 22px 16px;
}
.brand { font-weight: 700; margin-bottom: 28px; }
.sidebar nav { display: grid; gap: 6px; }
.sidebar a {
  border-radius: 7px;
  color: #cbd5e1;
  padding: 10px 12px;
}
.sidebar a.active, .sidebar a:hover { background: #1f2937; color: #fff; }
.shell { margin-left: 260px; min-height: 100vh; }
.topbar {
  align-items: center;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 14px 24px;
}
.content { padding: 24px; }
.status {
  border-radius: 999px;
  display: inline-block;
  font-size: 12px;
  margin-left: 10px;
  padding: 2px 8px;
}
.online { background: #dcfce7; color: #166534; }
.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 20px;
}
.card, .panel, .login-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}
.card h2 { margin: 6px 0; }
.card p { color: var(--muted); margin: 0; }
.muted { color: var(--muted); }
.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}
table { border-collapse: collapse; width: 100%; }
th, td { border-top: 1px solid var(--line); padding: 12px; text-align: left; }
th { width: 220px; }
.auth-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}
.login-card { max-width: 420px; width: 100%; }
.login-card h1 { margin-top: 0; }
label { display: block; font-weight: 600; margin-top: 14px; }
input {
  border: 1px solid var(--line);
  border-radius: 7px;
  margin-top: 6px;
  padding: 11px 12px;
  width: 100%;
}
button {
  background: var(--accent);
  border: 0;
  border-radius: 7px;
  color: #fff;
  cursor: pointer;
  margin-top: 18px;
  padding: 11px 14px;
}
button.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  margin: 0;
}
.alert {
  border-radius: 7px;
  margin-bottom: 16px;
  padding: 12px;
}
.danger { background: #fee4e2; color: var(--danger); }
.warning { background: #fff4d6; color: var(--warning); }

@media (max-width: 900px) {
  .sidebar { position: static; width: auto; }
  .shell { margin-left: 0; }
  .grid { grid-template-columns: 1fr; }
  .topbar { gap: 12px; }
}
