:root {
  --bg: #0f172a;
  --panel: #111827;
  --panel-2: #1f2937;
  --line: #273449;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --ok: #10b981;
  --warn: #f59e0b;
  --bad: #ef4444;
  --accent: #60a5fa;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(180deg, #0b1220, #111827 35%, #0f172a 100%);
  color: var(--text);
}
a { color: inherit; text-decoration: none; }
pre { white-space: pre-wrap; word-break: break-word; }
.layout { min-height: 100vh; display: flex; align-items: flex-start; }
.sidebar {
  width: 280px;
  flex: 0 0 280px;
  padding: 22px;
  border-right: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.brand-title { font-size: 1.2rem; font-weight: 700; }
.brand-subtitle, .muted { color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: 8px; margin-top: 24px; }
.nav-link {
  padding: 11px 14px;
  border-radius: 12px;
  color: #d1d5db;
}
.nav-link.active, .nav-link:hover { background: rgba(96, 165, 250, 0.12); color: white; }
.sidebar-footer { display: flex; flex-direction: column; gap: 12px; }
.content { flex: 1; min-width: 0; padding: 28px; }
.content-login { display: grid; place-items: center; }
.page-header, .row-between {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.page-header { margin-bottom: 20px; }
h1, h2, h3 { margin: 0 0 10px; }
h1 { font-size: 2rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
.grid { display: grid; gap: 18px; margin-bottom: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.compact-grid { gap: 12px; }
.card {
  background: rgba(17, 24, 39, 0.82);
  border: 1px solid rgba(39, 52, 73, 0.9);
  border-radius: 22px;
  padding: 20px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.18);
}
.login-shell { width: 100%; max-width: 460px; }
.login-card { padding: 28px; }
.stat-card .stat-label { color: var(--muted); font-size: 0.92rem; }
.stat-card .stat-value { font-size: 1.9rem; font-weight: 700; margin: 6px 0; }
.ok { color: var(--ok); }
.warn { color: var(--warn); }
.bad { color: var(--bad); }
.pill, .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  border: 1px solid rgba(255,255,255,0.08);
}
.badge-ok { background: rgba(16,185,129,.14); color: #a7f3d0; }
.badge-warn { background: rgba(245,158,11,.16); color: #fde68a; }
.badge-bad { background: rgba(239,68,68,.16); color: #fecaca; }
.metric-list, .status-list, .detail-list { list-style: none; padding: 0; margin: 0; }
.metric-list li, .status-list li, .detail-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.metric-list li:last-child, .status-list li:last-child, .detail-list li:last-child { border-bottom: 0; }
.table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
.table th, .table td { padding: 12px 10px; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.06); vertical-align: top; }
.small-table th, .small-table td { padding: 10px 8px; font-size: 0.88rem; }
.stack, .stack-sm { display: flex; flex-direction: column; gap: 14px; }
.stack-sm { gap: 10px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 0.93rem; }
input, textarea, select {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: #0b1220;
  color: var(--text);
  padding: 12px 14px;
  outline: none;
}
input:focus, textarea:focus, select:focus { border-color: rgba(96,165,250,0.7); box-shadow: 0 0 0 3px rgba(96,165,250,0.15); }
.checkbox { display: flex; flex-direction: row; align-items: center; gap: 10px; }
.checkbox input { width: 18px; height: 18px; }
.btn {
  appearance: none;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, #3b82f6, #2563eb);
  color: white;
  font-weight: 600;
  padding: 12px 16px;
  cursor: pointer;
}
.btn:hover { filter: brightness(1.06); }
.btn-secondary { background: #1f2937; }
.btn-warning { background: linear-gradient(180deg, #f59e0b, #d97706); }
.btn-danger { background: linear-gradient(180deg, #ef4444, #dc2626); }
.btn-small { padding: 8px 12px; border-radius: 12px; font-size: 0.85rem; }
.btn-full { width: 100%; }
.flash, .alert {
  padding: 14px 16px;
  border-radius: 16px;
  margin-bottom: 18px;
  border: 1px solid rgba(255,255,255,0.08);
}
.flash-success, .alert-warning { background: rgba(245,158,11,0.15); }
.flash-error, .alert-critical { background: rgba(239,68,68,0.15); }
.flash-info { background: rgba(59,130,246,0.14); }
.alert-warning { border-color: rgba(245,158,11,.24); }
.alert-critical { border-color: rgba(239,68,68,.24); }
.help { color: var(--muted); font-size: 0.9rem; }
.pre {
  background: #09101b;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 14px;
  font-size: 0.9rem;
}
.section-block { margin-bottom: 20px; }
.row-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.user-box { padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,0.04); }
@media (max-width: 1200px) {
  .grid-4, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .sidebar {
    width: 100%;
    flex: 1 1 auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    position: static;
    top: auto;
    height: auto;
    overflow: visible;
  }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .content { padding: 20px; }
}
