:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0d1117;
  color: #e8edf2;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #0d1117; }
button, input, select { font: inherit; }
button { cursor: pointer; }

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(420px, 100%);
  border: 1px solid #29313d;
  background: #141a22;
  border-radius: 8px;
  padding: 28px;
}

.login-panel h1 { margin: 0 0 6px; font-size: 28px; }
.muted { color: #95a3b5; }
.field { display: grid; gap: 8px; margin-top: 16px; }
.field input, .field select {
  border: 1px solid #2d3745;
  background: #0f141b;
  color: #e8edf2;
  border-radius: 6px;
  padding: 12px;
}

.button {
  border: 0;
  background: #2f81f7;
  color: #fff;
  border-radius: 6px;
  padding: 12px 14px;
  font-weight: 700;
}
.button.secondary { background: #303946; }
.button.danger { background: #bb3f3f; }

.shell { min-height: 100vh; display: grid; grid-template-columns: 240px 1fr; }
.sidebar {
  border-right: 1px solid #243041;
  background: #101620;
  padding: 20px;
}
.brand { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.nav { display: grid; gap: 8px; margin-top: 24px; }
.nav button {
  background: transparent;
  color: #c9d4e2;
  border: 1px solid transparent;
  text-align: left;
  padding: 10px;
  border-radius: 6px;
}
.nav button.active { background: #1c2735; border-color: #334156; color: #fff; }
.main { padding: 24px; overflow: auto; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.topbar h1 { margin: 0; font-size: 26px; }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.card {
  border: 1px solid #263242;
  background: #141b24;
  border-radius: 8px;
  padding: 16px;
}
.metric-label { color: #9ba9ba; font-size: 13px; }
.metric-value { font-size: 32px; font-weight: 800; margin-top: 8px; }
.status-ok { color: #57d68d; }
.status-warn { color: #f5c451; }
.status-bad { color: #ff6b6b; }
.section { margin-top: 20px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { border-bottom: 1px solid #263242; padding: 12px; text-align: left; vertical-align: top; }
th { color: #aab7c8; font-size: 12px; text-transform: uppercase; }
pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: #0f141b;
  border: 1px solid #263242;
  border-radius: 8px;
  padding: 14px;
  color: #d7e1ee;
}
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.tv {
  min-height: 100vh;
  padding: 32px;
  background: #05080d;
}
.tv .grid { grid-template-columns: repeat(4, 1fr); }
.tv .metric-value { font-size: 54px; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { border-right: 0; border-bottom: 1px solid #243041; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .main { padding: 16px; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .grid { grid-template-columns: 1fr; }
  .tv .grid { grid-template-columns: 1fr; }
}
