/* ═══════════════════════════════════════════════════════════
   THE HUB v3 — Dark Command Center
   ═══════════════════════════════════════════════════════════ */

:root {
  --bg: #030308;
  --bg-raised: #080812;
  --bg-card: #0c0c1d;
  --bg-card-hover: #10102a;
  --bg-surface: #141428;
  --border: #1a1a3a;
  --border-bright: #252560;
  --border-glow: #3b82f615;
  --text: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-dim: #64748b;
  --text-muted: #475569;
  --accent: #3b82f6;
  --accent-soft: #3b82f620;
  --accent-glow: #3b82f630;
  --success: #10b981;
  --success-soft: #10b98115;
  --success-glow: #10b98140;
  --warning: #f59e0b;
  --warning-soft: #f59e0b15;
  --warning-glow: #f59e0b40;
  --danger: #ef4444;
  --danger-soft: #ef444415;
  --danger-glow: #ef444440;
  --purple: #8b5cf6;
  --purple-soft: #8b5cf615;
  --cyan: #06b6d4;
  --mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --sans: 'Inter', -apple-system, system-ui, sans-serif;
  --radius: 10px;
  --radius-sm: 6px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── Animated Background ─── */
.grid-bg {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.04) 1px, transparent 1px);
  background-size: 50px 50px;
  z-index: -2;
  animation: gridShift 30s linear infinite;
}
@keyframes gridShift { 0% { transform: translate(0, 0); } 100% { transform: translate(50px, 50px); } }

.scanline {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  z-index: 200;
  animation: scanMove 4s ease-in-out infinite;
  opacity: 0.5;
}
@keyframes scanMove {
  0% { top: 0; opacity: 0.5; }
  50% { top: 100vh; opacity: 0.1; }
  51% { top: 0; opacity: 0; }
  100% { top: 0; opacity: 0.5; }
}

/* ─── Notification Banner ─── */
.notif-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 20px;
  background: linear-gradient(90deg, var(--accent-soft), var(--purple-soft));
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-secondary);
  font-family: var(--mono);
}
.notif-banner.hidden { display: none; }
.notif-btn {
  padding: 4px 12px;
  font-size: 11px;
  font-family: var(--mono);
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}
.notif-btn:hover { background: var(--accent); color: #fff; }
.notif-btn.dismiss { border-color: var(--border); color: var(--text-dim); background: transparent; }
.notif-btn.dismiss:hover { border-color: var(--text-dim); }

/* ─── Header ─── */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 28px;
  border-bottom: 1px solid var(--border);
  background: rgba(3, 3, 8, 0.9);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(24px);
}
.header-left { display: flex; align-items: center; gap: 12px; }
.logo-mark { font-size: 28px; filter: drop-shadow(0 0 8px var(--accent-glow)); }
.logo {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 6px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}
.subtitle { font-size: 11px; color: var(--text-dim); font-weight: 400; letter-spacing: 2px; text-transform: uppercase; }

.header-center { display: flex; gap: 8px; }
.summary-pills { display: flex; gap: 8px; }
.pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 16px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  min-width: 80px;
  transition: border-color 0.3s;
}
.pill-value { font-family: var(--mono); font-size: 16px; font-weight: 700; color: var(--accent); transition: color 0.3s; }
.pill-label { font-size: 9px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; margin-top: 1px; }
.pill-cost .pill-value { color: var(--success); }
.pill-latency .pill-value { color: var(--cyan); }

.header-right { display: flex; align-items: center; gap: 16px; }
.header-status { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-dim); }
.clock { font-family: var(--mono); font-size: 13px; color: var(--text-dim); letter-spacing: 1px; }

/* Keyboard shortcut button */
.kbd-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}
.kbd-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ─── Refresh Ring ─── */
.refresh-ring {
  width: 32px;
  height: 32px;
  position: relative;
  cursor: pointer;
}
.ring-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.ring-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 2;
}
.ring-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-dasharray: 100.53;
  stroke-dashoffset: 0;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear;
}
.ring-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--mono);
  font-size: 9px;
  color: var(--text-dim);
  font-weight: 600;
}

/* ─── Status Dots ─── */
.status-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-block;
  background: var(--text-dim);
  flex-shrink: 0;
}
.status-dot.up {
  background: var(--success);
  box-shadow: 0 0 6px var(--success-glow), 0 0 12px var(--success-glow);
  animation: pulse-dot 2s ease-in-out infinite;
}
.status-dot.down { background: var(--danger); box-shadow: 0 0 8px var(--danger-glow); }
.status-dot.degraded { background: var(--warning); box-shadow: 0 0 8px var(--warning-glow); }
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }

/* ─── Layout ─── */
main { padding: 0 20px 24px; max-width: 1400px; margin: 0 auto; }

.section { padding: 20px 0; }
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.section-header .section-title { margin-bottom: 0; }
.section-title {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--text-dim);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.title-icon { color: var(--accent); font-size: 8px; }
.incident-count {
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 8px;
  margin-left: 4px;
  font-weight: 700;
}

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }

/* ─── Search ─── */
.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: 10px;
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  pointer-events: none;
}
.search-input {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
  padding: 6px 28px 6px 30px;
  border-radius: 6px;
  width: 200px;
  outline: none;
  transition: all 0.2s;
}
.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
  width: 260px;
}
.search-input::placeholder { color: var(--text-muted); }
.search-clear {
  position: absolute;
  right: 8px;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}
.search-clear:hover { color: var(--text); }
.search-clear.hidden { display: none; }

/* ─── Server Cards ─── */
.server-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }

.server-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}
.server-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-bright);
  box-shadow: 0 0 40px var(--border-glow), inset 0 1px 0 rgba(255,255,255,0.03);
}
.server-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.25s;
}
.server-card:hover::after { opacity: 0.6; }

.server-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.server-name { font-weight: 600; font-size: 14px; }
.server-ip { font-family: var(--mono); font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.server-cost { font-family: var(--mono); font-size: 11px; color: var(--success); margin-top: 2px; }

.metric-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.metric {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
}
.metric-label { font-size: 9px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; font-family: var(--mono); }
.metric-value { font-family: var(--mono); font-size: 20px; font-weight: 700; }
.metric-value.low { color: var(--success); }
.metric-value.mid { color: var(--warning); }
.metric-value.high { color: var(--danger); }
.metric-bar { height: 3px; background: rgba(255, 255, 255, 0.04); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.metric-bar-fill { height: 100%; border-radius: 2px; transition: width 0.6s ease; }
.metric-bar-fill.low { background: var(--success); box-shadow: 0 0 6px var(--success-glow); }
.metric-bar-fill.mid { background: var(--warning); box-shadow: 0 0 6px var(--warning-glow); }
.metric-bar-fill.high { background: var(--danger); box-shadow: 0 0 6px var(--danger-glow); }

.server-meta { margin-top: 10px; font-size: 11px; color: var(--text-dim); font-family: var(--mono); display: flex; gap: 12px; flex-wrap: wrap; }
.server-meta span { display: flex; align-items: center; gap: 4px; }

.net-rates { margin-top: 8px; display: flex; gap: 16px; font-family: var(--mono); font-size: 10px; color: var(--text-dim); }
.net-rate-in { color: var(--success); }
.net-rate-out { color: var(--cyan); }

/* ─── App Cards ─── */
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }

.app-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: all 0.25s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
  position: relative;
  overflow: hidden;
}
.app-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-bright);
  box-shadow: 0 0 30px var(--border-glow);
  transform: translateY(-1px);
}
.app-card.filtered-out { display: none; }
.app-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.app-icon { font-size: 22px; }
.app-name { font-weight: 600; font-size: 13px; }
.app-server-tag {
  font-size: 9px;
  color: var(--text-dim);
  font-family: var(--mono);
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  margin-top: 2px;
  display: inline-block;
}

.app-metrics { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 10px; }

.app-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-family: var(--mono);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  letter-spacing: 0.5px;
}
.app-badge.up { background: var(--success-soft); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.15); }
.app-badge.down { background: var(--danger-soft); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.15); }
.app-badge.timeout { background: var(--warning-soft); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.15); }

.app-latency { font-family: var(--mono); font-size: 12px; font-weight: 500; }
.app-latency.fast { color: var(--success); }
.app-latency.medium { color: var(--warning); }
.app-latency.slow { color: var(--danger); }

/* Sparkline */
.app-sparkline { margin-top: 10px; height: 30px; position: relative; }
.app-sparkline svg { width: 100%; height: 100%; }
.sparkline-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 2px var(--accent-glow));
}
.sparkline-area {
  fill: url(#sparkGrad);
  opacity: 0.3;
}

/* Uptime bar */
.app-uptime-bar { display: flex; gap: 1px; margin-top: 8px; height: 6px; border-radius: 2px; overflow: hidden; }
.uptime-block {
  flex: 1;
  min-width: 2px;
  border-radius: 1px;
  transition: background 0.3s;
}
.uptime-block.up { background: var(--success); }
.uptime-block.down { background: var(--danger); }
.uptime-block.empty { background: var(--border); }

.app-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}
.app-uptime { font-family: var(--mono); font-size: 10px; color: var(--text-dim); }
.app-uptime .up-pct { color: var(--success); font-weight: 600; }

.app-pm2-info { font-family: var(--mono); font-size: 10px; color: var(--text-muted); margin-top: 4px; }

/* Quick actions on app cards */
.app-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s;
  position: absolute;
  top: 10px;
  right: 10px;
}
.app-card:hover .app-actions { opacity: 1; }
.app-action-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-dim);
  cursor: pointer;
  font-size: 11px;
  transition: all 0.2s;
}
.app-action-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.app-action-btn.danger-action:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-soft); }

/* ─── Tables ─── */
.table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

table { width: 100%; border-collapse: collapse; font-size: 12px; }
th {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.01);
}
td {
  padding: 8px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-secondary);
}
tr:hover td { background: rgba(59, 130, 246, 0.03); }
tr:last-child td { border-bottom: none; }

.badge-online { color: var(--success); font-weight: 600; }
.badge-stopped { color: var(--danger); font-weight: 600; }
.badge-running { color: var(--success); }

.action-btn {
  padding: 3px 8px;
  font-size: 10px;
  font-family: var(--mono);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}
.action-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.action-btn.danger:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-soft); }

.ssl-ok { color: var(--success); }
.ssl-warn { color: var(--warning); }
.ssl-danger { color: var(--danger); }

/* SSL progress bar */
.ssl-bar { height: 3px; background: var(--border); border-radius: 2px; margin-top: 3px; overflow: hidden; width: 60px; }
.ssl-bar-fill { height: 100%; border-radius: 2px; transition: width 0.6s; }
.ssl-bar-fill.ok { background: var(--success); }
.ssl-bar-fill.warn { background: var(--warning); }
.ssl-bar-fill.danger { background: var(--danger); }

/* ─── Log Area ─── */
.log-area {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  max-height: 260px;
  overflow-y: auto;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.9;
}
.log-area::-webkit-scrollbar { width: 4px; }
.log-area::-webkit-scrollbar-track { background: transparent; }
.log-area::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.log-entry { color: var(--text-dim); display: flex; gap: 8px; }
.log-time { color: var(--text-muted); min-width: 70px; flex-shrink: 0; }
.log-ok { color: var(--success); }
.log-warn { color: var(--warning); }
.log-err { color: var(--danger); }
.log-info { color: var(--accent); }

/* ─── Modal ─── */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-backdrop.hidden { display: none; }
.modal {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 90%;
  max-width: 800px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-family: var(--mono); font-size: 14px; letter-spacing: 1px; }
.modal-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 24px;
  cursor: pointer;
  padding: 0 8px;
}
.modal-close:hover { color: var(--text); }
.modal-body {
  padding: 14px 18px;
  overflow-y: auto;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.6;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-all;
}

/* Keyboard Shortcuts Modal */
.shortcuts-modal { max-width: 400px; }
.shortcuts-body { padding: 14px 18px; }
.shortcut-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  font-size: 12px;
  color: var(--text-secondary);
}
.shortcut-row:last-child { border-bottom: none; }
kbd {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 8px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  min-width: 28px;
  text-align: center;
}

/* ─── Footer ─── */
footer {
  display: flex;
  justify-content: space-between;
  padding: 14px 28px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
}

/* ─── Responsive ─── */
@media (max-width: 1200px) {
  .summary-pills { gap: 4px; }
  .pill { padding: 4px 10px; min-width: 65px; }
  .pill-value { font-size: 14px; }
}
@media (max-width: 1024px) {
  .two-col { grid-template-columns: 1fr; }
  .header-center { display: none; }
}
@media (max-width: 768px) {
  header { flex-wrap: wrap; gap: 10px; padding: 12px 16px; }
  main { padding: 0 12px 16px; }
  .server-grid { grid-template-columns: 1fr; }
  .app-grid { grid-template-columns: 1fr 1fr; }
  .metric-row { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .metric-value { font-size: 16px; }
  footer { flex-direction: column; gap: 4px; }
  .search-input { width: 140px; }
  .search-input:focus { width: 180px; }
  .refresh-ring { display: none; }
}
@media (max-width: 480px) {
  .app-grid { grid-template-columns: 1fr; }
}

/* ─── Animations ─── */
.empty { color: var(--text-dim); font-size: 12px; padding: 20px; text-align: center; }
.text-mono { font-family: var(--mono); }
.fade-in { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* Animated counter */
.counter-animate {
  display: inline-block;
  transition: transform 0.3s ease;
}
.counter-animate.bump {
  animation: counterBump 0.3s ease;
}
@keyframes counterBump {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* Status flash on change */
@keyframes statusFlash {
  0%, 100% { opacity: 1; }
  25% { opacity: 0.3; }
  50% { opacity: 1; }
  75% { opacity: 0.3; }
}
.status-flash { animation: statusFlash 0.6s ease; }

/* ─── Resource Gauges ─── */
.resource-gauges {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.gauge-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  transition: all 0.25s ease;
}
.gauge-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-bright);
}
.gauge-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.gauge-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}
.gauge-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--success);
  box-shadow: 0 0 8px var(--success-glow);
  transition: width 0.6s ease;
}
.gauge-fill.warning {
  background: var(--warning);
  box-shadow: 0 0 8px var(--warning-glow);
}
.gauge-fill.critical {
  background: var(--danger);
  box-shadow: 0 0 8px var(--danger-glow);
  animation: gaugePulse 1.5s ease-in-out infinite;
}
@keyframes gaugePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}
.gauge-value {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ─── Deploy Panel ─── */
.deploy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.deploy-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: var(--sans);
  position: relative;
  overflow: hidden;
}
.deploy-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-soft);
  transform: translateY(-1px);
}
.deploy-btn:active {
  transform: translateY(0);
}
.deploy-icon {
  font-size: 24px;
}
.deploy-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}
.deploy-status {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s;
}
.deploy-btn.deploying {
  border-color: var(--warning);
  pointer-events: none;
}
.deploy-btn.deploying .deploy-status {
  color: var(--warning);
  background: var(--warning-soft);
  border-color: rgba(245, 158, 11, 0.2);
  animation: deployPulse 1s ease-in-out infinite;
}
@keyframes deployPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.deploy-btn.deploy-success {
  border-color: var(--success);
}
.deploy-btn.deploy-success .deploy-status {
  color: var(--success);
  background: var(--success-soft);
  border-color: rgba(16, 185, 129, 0.2);
}
.deploy-btn.deploy-failed {
  border-color: var(--danger);
}
.deploy-btn.deploy-failed .deploy-status {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: rgba(239, 68, 68, 0.2);
}
.deploy-log {
  margin-top: 12px;
  max-height: 150px;
  overflow-y: auto;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.8;
}
.deploy-log::-webkit-scrollbar { width: 4px; }
.deploy-log::-webkit-scrollbar-track { background: transparent; }
.deploy-log::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.deploy-log-entry {
  padding: 2px 0;
  color: var(--text-dim);
}
.deploy-log-entry.success { color: var(--success); }
.deploy-log-entry.failed, .deploy-log-entry.error { color: var(--danger); }

/* ─── Uptime History Chart ─── */
.uptime-chart {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-top: 14px;
  min-height: 200px;
  position: relative;
}
.uptime-chart-title {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-dim);
  margin-bottom: 12px;
}
.uptime-chart svg {
  width: 100%;
  height: 150px;
}
.uptime-legend {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
}
.uptime-legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
}
