@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ===== DESIGN TOKENS ===== */
:root {
  --bg-page: #0F172A;
  --bg-surface: #1E293B;
  --bg-surface-light: #334155;
  --bg-surface-lighter: #475569;
  --bg-elevated: #1a2744;
  --border: rgba(148, 163, 184, 0.1);
  --border-medium: rgba(148, 163, 184, 0.2);
  --border-focus: #14B8A6;
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --primary: #14B8A6;
  --primary-light: rgba(20, 184, 166, 0.15);
  --primary-10: rgba(20, 184, 166, 0.1);
  --primary-20: rgba(20, 184, 166, 0.2);
  --primary-30: rgba(20, 184, 166, 0.3);
  --indigo: #6366F1;
  --indigo-light: rgba(99, 102, 241, 0.15);
  --indigo-10: rgba(99, 102, 241, 0.1);
  --amber: #F59E0B;
  --amber-light: rgba(245, 158, 11, 0.15);
  --amber-10: rgba(245, 158, 11, 0.1);
  --emerald: #10B981;
  --emerald-light: rgba(16, 185, 129, 0.15);
  --emerald-10: rgba(16, 185, 129, 0.1);
  --red: #EF4444;
  --red-light: rgba(239, 68, 68, 0.15);
  --red-10: rgba(239, 68, 68, 0.1);
  --cyan: #06B6D4;
  --cyan-light: rgba(6, 182, 212, 0.15);
  --blue: #3B82F6;
  --blue-light: rgba(59, 130, 246, 0.15);
  --purple: #8B5CF6;
  --purple-light: rgba(139, 92, 246, 0.15);
  --shadow: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.4);
  --shadow-elevated: 0 20px 60px rgba(0,0,0,0.5);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --transition: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

body {
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  margin: 0;
  padding-top: 64px; /* header height (56px) + 8px gap */
}

/* ===== APP HEADER ===== */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  height: 56px;
  gap: 0.5rem;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.03em;
  flex-shrink: 0;
  margin-right: 1rem;
}

.header-brand:hover { color: var(--text-primary); }

.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--indigo));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.brand-icon-sm {
  width: 28px;
  height: 28px;
  font-size: 0.75rem;
}

.brand-text {
  white-space: nowrap;
}

/* ===== HEADER NAV (Horizontal with dropdowns) ===== */
.header-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.nav-dropdown-trigger:hover {
  background: var(--primary-10);
  color: var(--text-primary);
}

.nav-dropdown-trigger.active {
  background: var(--primary-10);
  color: var(--primary);
}

.nav-dropdown-trigger .chevron {
  font-size: 0.6rem;
  transition: transform var(--transition);
  opacity: 0.6;
}

.nav-dropdown:hover .chevron {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 260px;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius);
  box-shadow: var(--shadow-elevated);
  padding: 0.35rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all 200ms ease;
  z-index: 200;
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 150ms ease;
}

.nav-dropdown-item:hover {
  background: var(--primary-10);
  color: var(--primary);
}

.nav-dropdown-item.active {
  background: var(--primary-10);
  color: var(--primary);
  border-left: 2px solid var(--primary);
}

.nav-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--primary-10);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--primary);
  flex-shrink: 0;
}

.nav-dropdown-item:hover .nav-item-icon {
  background: var(--primary-20);
}

.nav-item-label {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.3;
}

.nav-item-desc {
  font-size: 0.68rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* ===== HEADER ACTIONS ===== */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  margin-left: auto;
}

.header-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border-medium);
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.85rem;
  padding: 0;
}

.header-btn:hover {
  background: var(--primary-10);
  color: var(--primary);
  border-color: var(--primary-30);
}

.header-btn.dropdown-toggle {
  width: auto;
  padding: 0 0.65rem;
  gap: 0.35rem;
  font-size: 0.8rem;
}

.header-btn.dropdown-toggle::after {
  font-size: 0.6rem;
}

/* Live badge */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.3em 0.7em;
  border-radius: 20px;
  background: var(--emerald-10);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  animation: pulse-live 2s infinite;
}

/* ===== MOBILE DRAWER ===== */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 250;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
}

.drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 300px;
  max-width: 85vw;
  background: var(--bg-surface);
  border-left: 1px solid var(--border);
  z-index: 300;
  transform: translateX(100%);
  transition: transform var(--transition);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mobile-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
}

.drawer-group {
  margin-bottom: 0.5rem;
}

.drawer-group-label {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 0.6rem 0.75rem 0.35rem;
}

.drawer-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-primary);
  transition: all 150ms ease;
}

.drawer-item:hover {
  background: var(--primary-10);
  color: var(--primary);
}

.drawer-item.active {
  background: var(--primary-10);
  color: var(--primary);
  border-left: 2px solid var(--primary);
}

.drawer-item i {
  font-size: 1rem;
  width: 20px;
  text-align: center;
  color: var(--text-muted);
}

.drawer-item.active i,
.drawer-item:hover i {
  color: var(--primary);
}

.drawer-item-label {
  font-size: 0.82rem;
  font-weight: 600;
}

.drawer-item-desc {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.drawer-footer {
  padding: 1rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* ===== PAGE HEADER ===== */
.page-header {
  margin-bottom: 1.25rem;
}

.page-header h1 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0;
}

.page-header .page-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* ===== LOGIN ===== */
.login-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg), 0 0 60px rgba(20, 184, 166, 0.06);
}

/* ===== CARDS ===== */
.card {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  transition: all 0.2s ease;
  overflow: hidden;
}

.card:hover {
  border-color: var(--border-medium) !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.card-header {
  background: transparent !important;
  border-bottom: 1px solid var(--border) !important;
  padding: 0.75rem 1rem;
}

.card-body { padding: 1rem; }

/* ===== KPI STAT CARDS ===== */
.kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
  transition: background var(--transition);
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  border-color: var(--border-medium);
}

.kpi-card:hover::before {
  background: var(--primary);
}

.kpi-card .kpi-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

.kpi-card .kpi-value {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  font-family: 'JetBrains Mono', monospace;
}

.kpi-card .kpi-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
}

.kpi-card .kpi-trend {
  font-size: 0.68rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 8px;
  border-radius: 6px;
}

.kpi-trend.up { background: var(--emerald-light); color: var(--emerald); }
.kpi-trend.down { background: var(--red-light); color: var(--red); }
.kpi-trend.neutral { background: rgba(148,163,184,0.1); color: var(--text-muted); }

/* ===== RESOURCE GAUGE ===== */
.resource-gauge {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: all 0.25s ease;
}

.resource-gauge:hover {
  border-color: var(--border-medium);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.resource-gauge .gauge-value {
  font-size: 2.25rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  font-family: 'JetBrains Mono', monospace;
}

.resource-gauge .gauge-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 700;
}

.resource-gauge .progress {
  height: 6px;
  background: rgba(148, 163, 184, 0.08);
  border-radius: 3px;
}

.resource-gauge .progress-bar {
  border-radius: 3px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== SERVER INFO BAR ===== */
.server-bar {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 1.25rem;
  font-size: 0.82rem;
}

.server-bar .info-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.server-bar .dot { color: var(--border-medium); }

/* ===== TABLES ===== */
.table-dark {
  --bs-table-bg: transparent;
  --bs-table-hover-bg: rgba(20, 184, 166, 0.04);
}

.table-dark th {
  border-color: var(--border);
  font-weight: 700;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 0.65rem 0.85rem;
  white-space: nowrap;
}

.table-dark td {
  border-color: var(--border);
  font-size: 0.82rem;
  vertical-align: middle;
  padding: 0.55rem 0.85rem;
}

.table-dark tbody tr { transition: background 0.15s; }
.table-dark tbody tr:hover { background: rgba(20, 184, 166, 0.04) !important; }
.table-dark .table-danger td { background: var(--red-light); }
.table-dark .table-success td { background: var(--emerald-light); }

/* ===== BADGES ===== */
.badge {
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  padding: 0.3em 0.55em;
  border-radius: 6px;
}

.badge.bg-success { background: var(--emerald) !important; }
.badge.bg-danger { background: var(--red) !important; }
.badge.bg-warning { background: var(--amber) !important; color: #000 !important; }
.badge.bg-info { background: var(--cyan) !important; }
.badge.bg-primary { background: var(--primary) !important; }
.badge.bg-secondary { background: rgba(148,163,184,0.12) !important; color: var(--text-secondary) !important; }
.badge.bg-purple { background: var(--purple) !important; }

/* ===== STATUS DOT ===== */
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.status-dot.online {
  background: var(--emerald);
  box-shadow: 0 0 6px var(--emerald);
  animation: pulse-live 2s infinite;
}

.status-dot.stopped { background: var(--red); }

@keyframes pulse-live {
  0%, 100% { box-shadow: 0 0 3px var(--emerald); opacity: 1; }
  50% { box-shadow: 0 0 10px var(--emerald); opacity: 0.8; }
}

/* ===== BUTTONS ===== */
.btn {
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.8rem;
  transition: all 0.15s ease;
  letter-spacing: -0.01em;
}

.btn-sm { padding: 0.3rem 0.65rem; font-size: 0.75rem; }

.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: #0d9488; border-color: #0d9488; box-shadow: 0 0 20px var(--primary-light); }

.btn-outline-primary { border-color: rgba(20,184,166,0.4); color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); box-shadow: 0 0 15px var(--primary-light); }

.btn-success { background: var(--emerald); border-color: var(--emerald); }
.btn-outline-success { border-color: rgba(16,185,129,0.4); color: var(--emerald); }
.btn-outline-success:hover { background: var(--emerald); border-color: var(--emerald); }

/* ===== FORMS ===== */
.form-control, .form-select {
  background: var(--bg-page);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.form-control:focus, .form-select:focus {
  background: var(--bg-page);
  border-color: var(--primary);
  color: var(--text-primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.input-group-text {
  background: var(--bg-surface-light);
  border-color: var(--border-medium);
  color: var(--text-muted);
}

.form-label { font-size: 0.78rem; font-weight: 600; color: var(--text-secondary); }

/* ===== CODE ===== */
code {
  color: var(--cyan);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  background: var(--cyan-light);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

pre {
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  border-radius: var(--radius-sm);
}

/* ===== SECTION TITLE ===== */
.section-title {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ===== REFRESH ===== */
#refresh-btn.refreshing i { animation: spin 0.7s linear infinite; }
@keyframes spin { 100% { transform: rotate(360deg); } }

/* ===== DIFF ===== */
.diff-add { background: rgba(16, 185, 129, 0.08); color: var(--emerald); }
.diff-del { background: rgba(239, 68, 68, 0.08); color: var(--red); }
.diff-hunk { background: rgba(59, 130, 246, 0.06); color: var(--blue); }
.diff-block { font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; white-space: pre-wrap; word-break: break-all; }

/* ===== DEPLOY ===== */
.deploy-btn { border-radius: var(--radius-sm); font-size: 0.75rem; }
.deploy-btn:hover { transform: scale(1.02); }

/* ===== DROPDOWN ===== */
.dropdown-menu {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 0.35rem;
}

.dropdown-item {
  color: var(--text-primary);
  font-size: 0.82rem;
  border-radius: 6px;
  padding: 0.4rem 0.75rem;
}

.dropdown-item:hover { background: var(--primary-light); color: var(--primary); }

/* ===== ALERT ===== */
.alert { border-radius: var(--radius); border: none; font-size: 0.82rem; }

/* ===== GUARD LOG ===== */
.guard-log {
  background: var(--bg-page);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-surface-light); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ===== AVATAR ===== */
.avatar {
  border-radius: 50%;
  border: 2px solid var(--border);
  transition: border-color 0.2s;
}

.avatar:hover { border-color: var(--primary); }

/* ===== ACTIVITY ITEM ===== */
.activity-item {
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.activity-item:hover { background: rgba(20, 184, 166, 0.03); }
.activity-item:last-child { border-bottom: none; }

/* ===== CONTRIBUTOR ROW ===== */
.contributor-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
}

.contributor-row:last-child { border-bottom: none; }

/* ===== STAT MINI ===== */
.stat-mini {
  text-align: center;
  padding: 0.6rem;
  border-radius: var(--radius-sm);
}

.stat-mini h4 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 0.1rem;
  letter-spacing: -0.02em;
  font-family: 'JetBrains Mono', monospace;
}

.stat-mini small {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 700;
}

/* ===== CHART CONTAINER ===== */
.chart-container {
  position: relative;
  width: 100%;
}

.chart-container canvas {
  width: 100% !important;
}

/* ===== HEATMAP ===== */
.heatmap-grid {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  padding: 0.5rem 0;
}

.heatmap-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.heatmap-cell {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: rgba(148, 163, 184, 0.06);
  transition: all 150ms ease;
  cursor: default;
}

.heatmap-cell:hover {
  outline: 1px solid var(--primary);
  outline-offset: 1px;
}

.heatmap-cell.level-1 { background: rgba(20, 184, 166, 0.2); }
.heatmap-cell.level-2 { background: rgba(20, 184, 166, 0.4); }
.heatmap-cell.level-3 { background: rgba(20, 184, 166, 0.6); }
.heatmap-cell.level-4 { background: var(--primary); }

.heatmap-months {
  display: flex;
  font-size: 0.6rem;
  color: var(--text-muted);
  padding-left: 0;
  gap: 2px;
  margin-bottom: 2px;
}

.heatmap-months span {
  width: 12px;
  text-align: center;
}

.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.heatmap-legend .heatmap-cell {
  width: 10px;
  height: 10px;
}

/* ===== SHIMMER / LOADING ===== */
.shimmer {
  position: relative;
  overflow: hidden;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
}

.shimmer::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(148, 163, 184, 0.06) 50%,
    transparent 100%
  );
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.shimmer-line {
  height: 14px;
  margin-bottom: 8px;
  border-radius: 4px;
}

.shimmer-line.w-75 { width: 75%; }
.shimmer-line.w-50 { width: 50%; }
.shimmer-line.w-100 { width: 100%; }

.shimmer-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

/* Loading spinner overlay */
.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  z-index: 10;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--border-medium);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ===== DETAILS ===== */
details summary { cursor: pointer; transition: color 0.2s; }
details summary:hover { color: var(--primary); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  body { padding-top: 60px; }
  .kpi-card .kpi-value { font-size: 1.3rem; }
  .resource-gauge .gauge-value { font-size: 1.5rem; }
  .brand-text { display: none; }
  .server-bar { flex-wrap: wrap !important; }
  .server-bar .dot { display: none; }
  .page-header h1 { font-size: 1.15rem; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .brand-text { font-size: 0.85rem; }
}
