:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --ink: #17202e;
  --muted: #667085;
  --line: #d9e0ea;
  --panel: #ffffff;
  --accent: #0f766e;
  --accent-2: #2563eb;
  --danger: #b42318;
  --warn: #b54708;
}

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

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 240px;
  background: #101828;
  color: white;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.brand { font-size: 24px; font-weight: 800; }
.sidebar nav { display: grid; gap: 6px; }
.sidebar a, .ghost {
  color: #d0d5dd;
  border: 0;
  background: transparent;
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.sidebar a.active, .sidebar a:hover, .ghost:hover { background: #1d2939; color: #fff; }
.main { margin-left: 240px; padding: 28px; min-height: 100vh; }
.top { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-bottom: 22px; }
.eyebrow { margin: 0 0 4px; color: var(--accent); font-weight: 800; text-transform: uppercase; font-size: 12px; }
h1 { margin: 0; font-size: 32px; }
h2 { margin: 0; font-size: 20px; }

.add-user { display: flex; gap: 8px; }
input {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  min-width: 220px;
}
button {
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
}
button.small { padding: 6px 10px; font-size: 12px; background: #344054; }

.stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.stats div, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgb(16 24 40 / 0.04);
}
.stats div { padding: 16px; }
.stats span { display: block; color: var(--muted); margin-bottom: 6px; }
.stats strong { font-size: 24px; }
.panel { margin-bottom: 18px; overflow: hidden; }
.panel-head { padding: 16px; border-bottom: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.muted { color: var(--muted); padding: 16px; }
.status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 800;
  background: #eef2f6;
  color: #344054;
}
.status.ok { background: #dcfae6; color: #067647; }
.status.bad { background: #fee4e2; color: var(--danger); }
.status.off { background: #f2f4f7; color: #667085; }
.status.new { background: #fef0c7; color: var(--warn); }
.error-text { color: var(--danger); margin-top: 4px; font-size: 12px; max-width: 520px; }

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #101828;
}
.login-box {
  width: min(420px, calc(100vw - 32px));
  background: white;
  border-radius: 8px;
  padding: 28px;
  display: grid;
  gap: 14px;
}
.login-box h1 { font-size: 28px; }
.login-box p { margin: 0; color: var(--muted); }
.login-box label { display: grid; gap: 6px; font-weight: 700; }
.login-box input { min-width: 0; width: 100%; }
.alert { background: #fee4e2; color: var(--danger); padding: 10px 12px; border-radius: 8px; }

@media (max-width: 900px) {
  .sidebar { position: static; width: auto; }
  .main { margin-left: 0; padding: 18px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .top { align-items: stretch; flex-direction: column; }
  .add-user { flex-direction: column; }
  input { min-width: 0; }
}
