:root {
  --bg-dark: #0f172a;
  --bg-card: #1e293b;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border: #334155;
  --radius: 8px;
  /* Reduced radius for classic look */
  --sidebar-width: 260px;
  --header-height: 64px;
  /* Slightly smaller header */
}

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

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  height: 100vh;
  overflow: hidden;
  display: flex;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 24px;
  flex-shrink: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  padding-left: 8px;
}

.logo-icon {
  color: var(--primary);
  width: 24px;
  height: 24px;
}

.logo h1 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex: 1;
}

.nav-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-section-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
  padding: 0 16px;
  margin-bottom: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: var(--radius);
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.1s;
  /* Minimal transition */
}

.nav-item:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
}

.nav-item.active {
  background: var(--primary);
  color: white;
}

.nav-item i {
  width: 18px;
  height: 18px;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--success);
  font-weight: 500;
  padding-left: 8px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
}

/* Main Layout */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.top-bar {
  height: var(--header-height);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 32px;
  background: var(--bg-dark);
}

.breadcrumbs {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}

.breadcrumbs span.active {
  color: var(--text-main);
}

.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  max-width: 1600px;
  margin: 0 auto;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.span-2 {
  grid-column: span 2;
}

.span-3 {
  grid-column: span 3;
}

.span-4 {
  grid-column: span 4;
}

/* Metrics */
.metric-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metric-value {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-main);
}

.metric-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

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

.text-success {
  color: var(--success);
}

.text-warning {
  color: var(--warning);
}

.text-danger {
  color: var(--danger);
}

/* Charts */
.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.chart-header h3 {
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
}

.live-badge {
  background: var(--success);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.chart-container-lg {
  height: 300px;
  width: 100%;
}

.chart-container-md {
  height: 220px;
  width: 100%;
}

/* Docs & Content */
.content-container {
  max-width: 800px;
  margin: 0 auto;
}

.prose {
  color: var(--text-muted);
  line-height: 1.6;
}

.prose h2 {
  color: var(--text-main);
  margin: 0 0 16px;
  font-size: 1.5rem;
  font-weight: 600;
}

.prose h3 {
  color: var(--text-main);
  margin: 24px 0 12px;
  font-size: 1.1rem;
  font-weight: 600;
}

.prose p {
  margin-bottom: 16px;
}

.code-block {
  display: block;
  background: #111827;
  padding: 12px;
  border-radius: 6px;
  font-family: monospace;
  color: #e2e8f0;
  border: 1px solid var(--border);
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.endpoint {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  font-family: monospace;
  font-size: 0.95rem;
}

.method {
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
}

.method.get {
  background: rgba(59, 130, 246, 0.2);
  color: var(--primary);
}

.method.post {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
}

.path {
  color: var(--text-main);
}

/* Responsive */
@media (max-width: 1400px) {
  .dashboard-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .span-2 {
    grid-column: span 2;
  }

  .span-3 {
    grid-column: span 3;
  }
}

@media (max-width: 1200px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .span-2,
  .span-3 {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  body {
    flex-direction: column;
    overflow-y: auto;
    height: auto;
  }

  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 16px;
  }

  .nav-menu {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .nav-item {
    white-space: nowrap;
  }

  .main-wrapper {
    height: auto;
  }

  .top-bar {
    padding: 0 16px;
  }

  .main-content {
    padding: 16px;
    overflow: visible;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .span-2,
  .span-3,
  .span-4 {
    grid-column: span 1;
  }
}