:root {
  --bg-0: #0a0805;
  --bg-1: #121209;
  --bg-2: #1a1714;
  --panel-border: rgba(255, 255, 255, 0.08);
  --text-main: #f5f1ed;
  --text-sub: #c4b5a8;
  --accent: #ff8c3a;
  --accent-dark: #e67e2e;
  --accent-light: #ffaa5e;
  --accent-soft: rgba(255, 140, 58, 0.15);
  --accent-glow: rgba(255, 140, 58, 0.25);
}

* {
  box-sizing: border-box;
}

body {
  background: radial-gradient(circle at 10% 20%, #2d1a0a, transparent 35%),
    radial-gradient(circle at 90% 0%, #1a0f05, transparent 35%),
    var(--bg-0);
}

#bg-orb {
  position: fixed;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(255, 140, 58, 0.2), transparent 70%);
  left: -170px;
  top: -120px;
  filter: blur(16px);
  pointer-events: none;
  z-index: -1;
  animation: drift 10s ease-in-out infinite alternate;
}

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(35px, 40px) scale(1.08); }
}

.panel {
  border: 1px solid var(--panel-border);
  background: linear-gradient(160deg, rgba(26, 23, 20, 0.95), rgba(16, 14, 12, 0.92));
  border-radius: 1.25rem;
  padding: 1.5rem;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}

.panel-title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.nav-btn {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 0.85rem;
  padding: 0.7rem 0.85rem;
  color: var(--text-sub);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
}

.nav-btn:hover {
  border-color: rgba(255, 140, 58, 0.5);
  background: linear-gradient(135deg, rgba(255, 140, 58, 0.15), rgba(255, 140, 58, 0.08));
  color: #fff8f3;
  transform: translateX(4px);
  box-shadow: 0 8px 16px rgba(255, 140, 58, 0.15);
}

.nav-btn.active {
  border-color: rgba(255, 140, 58, 0.8);
  background: linear-gradient(135deg, rgba(255, 140, 58, 0.25), rgba(255, 140, 58, 0.12));
  color: #ffedd5;
  box-shadow: 0 10px 24px rgba(255, 140, 58, 0.2);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 0.85rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  font-size: 0.9rem;
}

.table th {
  color: #ffaa5e;
  font-weight: 700;
  background: rgba(255, 140, 58, 0.08);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table tbody tr {
  transition: all 0.2s ease;
}

.table tbody tr:hover {
  background: rgba(255, 140, 58, 0.06);
}

.input {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 8, 5, 0.85);
  color: var(--text-main);
  border-radius: 0.85rem;
  padding: 0.65rem 0.9rem;
  font-size: 0.92rem;
  transition: all 0.25s ease;
}

.input:hover {
  border-color: rgba(255, 140, 58, 0.3);
  background: rgba(10, 8, 5, 0.95);
}

.input:focus {
  outline: none;
  border-color: rgba(255, 140, 58, 0.8);
  background: rgba(10, 8, 5, 0.98);
  box-shadow: 0 0 0 3px rgba(255, 140, 58, 0.2), inset 0 1px 2px rgba(255, 140, 58, 0.1);
}

.btn-primary,
.btn-secondary,
.btn-inline {
  border-radius: 0.85rem;
  padding: 0.65rem 0.95rem;
  font-size: 0.87rem;
  font-weight: 600;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.btn-primary {
  border: 1.5px solid rgba(255, 140, 58, 0.8);
  background: linear-gradient(135deg, rgba(255, 140, 58, 0.35), rgba(255, 140, 58, 0.15));
  color: #ffe5d6;
  font-weight: 700;
}

.btn-primary:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 140, 58, 1);
  background: linear-gradient(135deg, rgba(255, 140, 58, 0.5), rgba(255, 140, 58, 0.25));
  box-shadow: 0 12px 28px rgba(255, 140, 58, 0.3);
}

.btn-secondary {
  border: 1px solid rgba(255, 140, 58, 0.4);
  background: rgba(20, 18, 15, 0.8);
  color: #d4b89e;
}

.btn-secondary:hover {
  border-color: rgba(255, 140, 58, 0.7);
  background: rgba(26, 23, 20, 0.95);
  color: #ffaa5e;
}

.btn-inline {
  border: 1px solid rgba(255, 140, 58, 0.3);
  background: rgba(20, 18, 15, 0.6);
  color: #d4b89e;
  margin-right: 0.4rem;
  margin-bottom: 0.3rem;
}

.btn-inline:hover {
  background: rgba(255, 140, 58, 0.2);
  border-color: rgba(255, 140, 58, 0.6);
  color: #ffaa5e;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 140, 58, 0.15);
}

.stat-card {
  border: 1px solid var(--panel-border);
  border-radius: 1.15rem;
  background: linear-gradient(165deg, rgba(22, 19, 16, 0.95), rgba(14, 12, 10, 0.92));
  padding: 1.25rem;
  transform: translateY(8px);
  opacity: 0;
  animation: reveal 0.55s cubic-bezier(0.4, 0.25, 0.2, 1) forwards;
  transition: all 0.3s ease;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.stat-card:hover {
  transform: translateY(0) scale(1.02);
  border-color: rgba(255, 140, 58, 0.4);
  box-shadow: 0 20px 40px rgba(255, 140, 58, 0.15), inset 0 1px 0 rgba(255, 140, 58, 0.1);
}

@keyframes reveal {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.badge {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.76rem;
  font-weight: 600;
  display: inline-block;
}

.badge.online { border-color: rgba(34, 197, 94, 0.5); color: #86efac; background: rgba(34, 197, 94, 0.1); }
.badge.offline { border-color: rgba(248, 113, 113, 0.5); color: #fca5a5; background: rgba(248, 113, 113, 0.1); }
.badge.starting { border-color: rgba(255, 140, 58, 0.6); color: #ffaa5e; background: rgba(255, 140, 58, 0.12); }
.badge.stopping { border-color: rgba(249, 115, 22, 0.5); color: #fdba74; background: rgba(249, 115, 22, 0.1); }
.badge.unknown { border-color: rgba(148, 163, 184, 0.5); color: #cbd5e1; background: rgba(148, 163, 184, 0.1); }

@media (max-width: 1023px) {
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: linear-gradient(180deg, rgba(10, 8, 5, 0.98), rgba(12, 10, 8, 0.95));
    border-bottom: 1px solid var(--panel-border);
  }
}

/* Header & Typography */
header {
  animation: slideDown 0.45s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#viewTitle {
  background: linear-gradient(135deg, #ffedd5, #ffaa5e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -1px;
}

#viewSubtitle {
  color: #c4b5a8;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 20% 20%, rgba(255, 140, 58, 0.15), transparent 38%),
    rgba(5, 4, 3, 0.72);
  backdrop-filter: blur(5px);
}

.loading-card {
  min-width: 210px;
  border: 1px solid rgba(255, 140, 58, 0.45);
  border-radius: 1rem;
  padding: 1.2rem 1.4rem;
  background: linear-gradient(160deg, rgba(25, 18, 12, 0.95), rgba(13, 10, 8, 0.96));
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), 0 0 22px rgba(255, 140, 58, 0.2);
  text-align: center;
}

.loading-spinner {
  width: 38px;
  height: 38px;
  margin: 0 auto 0.65rem;
  border-radius: 999px;
  border: 3px solid rgba(255, 170, 94, 0.2);
  border-top-color: #ffaa5e;
  border-right-color: #ff8c3a;
  animation: spin 0.8s linear infinite;
}

.loading-text {
  color: #ffd9bf;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.2px;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
