:root {
  /* Core Colors */
  --bg-main: #1C1917;       /* Warm charcoal */
  --bg-panel: #262220;      /* Dark walnut */
  --bg-panel-hover: #302B28;
  
  --accent-cyan: #D4A574;   /* Champagne gold (primary accent) */
  --accent-cyan-glow: rgba(212, 165, 116, 0.2);
  --accent-blue: #C17817;   /* Deep amber (gradients) */
  --success: #7A9E8E;       /* Sage green */
  --danger: #B85C4A;        /* Muted red */
  --warning: #D4A574;       /* Champagne gold */
  
  /* Text */
  --text-main: #F4EADE;
  --text-muted: #A89F95;
  
  /* Layout */
  --sidebar-width: 260px;
  --header-height: 70px;
  --radius: 12px;
  --radius-sm: 6px;
  
  /* Typography */
  --font-sans: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ── Layout ── */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-main);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar__brand {
  height: var(--header-height);
  display: flex;
  align-items: center;
  padding: 0 24px;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 1px;
  color: var(--text-main);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar__brand .brand-icon {
  color: var(--accent-cyan);
  margin-right: 12px;
}

.sidebar__nav-section {
  padding: 24px 16px;
}

.sidebar__nav-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding: 0 8px;
}

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

.sidebar__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.sidebar__link svg {
  color: var(--text-muted);
  transition: color 0.2s ease;
}

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

.sidebar__link.active {
  background-color: var(--bg-panel-hover);
  color: var(--text-main);
  font-weight: 500;
}

.sidebar__link.active svg {
  color: var(--accent-cyan);
}

/* ── Main Content ── */
.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Topbar */
.topbar {
  height: var(--header-height);
  background-color: var(--bg-main);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
}

.topbar__tabs {
  display: flex;
  gap: 24px;
  height: 100%;
}

.topbar__tab {
  display: flex;
  align-items: center;
  height: 100%;
  color: var(--text-muted);
  font-size: 0.9rem;
  position: relative;
  transition: color 0.2s ease;
}

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

.topbar__tab.active {
  color: var(--accent-cyan);
  font-weight: 500;
}

.topbar__tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--accent-cyan);
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box svg {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
}

.search-box input {
  background-color: var(--bg-panel);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  padding: 8px 16px 8px 36px;
  border-radius: 20px;
  font-size: 0.85rem;
  width: 220px;
  outline: none;
  transition: border-color 0.2s ease;
}

.search-box input:focus {
  border-color: var(--accent-cyan);
}

.btn-icon {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 20px;
  transition: background-color 0.2s ease;
}

.user-profile:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.user-profile__avatar img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.user-profile__name {
  font-size: 0.85rem;
  font-weight: 500;
}

/* Dashboard Body */
.dashboard-body {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.dashboard-title {
  font-size: 1.5rem;
  font-weight: 600;
}

.dashboard-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.status-indicator {
  width: 8px;
  height: 8px;
  background-color: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--success);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 1; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  70% { opacity: 0.5; box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { opacity: 1; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Grid System */
.grid {
  display: grid;
  gap: 20px;
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

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

/* Cards */
.card {
  background-color: var(--bg-panel);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.card__title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 20px; /* if no header wrapper */
}

.card__header .card__title {
  margin-bottom: 0;
}

.card__actions {
  display: flex;
  gap: 8px;
}

.btn-filter {
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-filter:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

/* KPI Cards */
.kpi-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kpi-card__label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.kpi-card__row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.kpi-card__value {
  font-size: 2rem;
  font-weight: 700;
  font-family: var(--font-sans);
  line-height: 1;
}

.kpi-card__trend {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
}

.kpi-card__trend.positive {
  color: var(--success);
  background-color: rgba(16, 185, 129, 0.1);
}

.kpi-card__trend.negative {
  color: var(--danger);
  background-color: rgba(239, 68, 68, 0.1);
}

/* ── Custom Charts ── */

.chart-container {
  position: relative;
  width: 100%;
}

/* Line Chart */
.line-chart-container {
  height: 250px;
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  grid-template-rows: 1fr 30px;
  gap: 10px;
}

.y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.y-axis.left { text-align: right; }
.y-axis.right { text-align: left; }

.x-axis {
  grid-column: 2;
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
  padding-top: 8px;
}

.x-axis-label {
  grid-column: 2;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: -10px;
}

.chart-area {
  position: relative;
  width: 100%;
  height: 100%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  /* Horizontal grid lines */
  background-image: linear-gradient(to bottom, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 100% 25px; /* 8 sections = ~25px each for 200px height */
}

.line-chart-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Horizontal Bar Chart (Beakers Data) */
.h-bar-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 10px;
}

.h-bar-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  align-items: center;
  gap: 12px;
}

.h-bar-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: right;
}

.h-bar-track {
  width: 100%;
  height: 18px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
}

.h-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
  border-radius: 4px;
  transform-origin: left;
  transform: scaleX(0); /* For animation */
}

.h-bar-axis {
  margin-top: 10px;
  padding-left: 92px;
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Vertical Bar Chart (Revenue by Product) */
.v-bar-container {
  height: 200px;
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background-image: linear-gradient(to bottom, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 100% 20%;
}

.v-bars {
  flex-grow: 1;
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  padding: 0 10px;
}

.v-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  gap: 10px;
  width: 12%;
}

.v-bar-fill {
  width: 100%;
  background: linear-gradient(0deg, var(--accent-blue), var(--accent-cyan));
  border-radius: 4px 4px 0 0;
  transform-origin: bottom;
  transform: scaleY(0); /* For animation */
}

.v-bar-label {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Funnel Chart */
.funnel-container {
  height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
}

.funnel-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.funnel-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.funnel-bar {
  height: 18px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
  border-radius: 20px;
  transform: scaleX(0); /* For animation */
}

/* Donut Chart */
.donut-container {
  display: flex;
  align-items: center;
  gap: 30px;
  height: 200px;
}

.donut-chart-wrapper {
  position: relative;
  width: 160px;
  height: 160px;
}

.donut-chart {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(
    var(--accent-cyan) 0% 10%, 
    var(--accent-blue) 10% 55%, 
    var(--success) 55% 83%, 
    #3b82f6 83% 100%
  );
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0; /* For animation */
  transform: scale(0.8);
}

.donut-hole {
  width: 60%;
  height: 60%;
  background-color: var(--bg-panel);
  border-radius: 50%;
  position: absolute;
}

.donut-label {
  position: absolute;
  font-size: 0.7rem;
  font-weight: 600;
  color: #fff;
}

/* Positioning labels roughly on the donut ring */
.donut-label.pos-1 { top: 15%; right: 20%; }
.donut-label.pos-2 { bottom: 25%; right: 15%; }
.donut-label.pos-3 { bottom: 20%; left: 20%; }
.donut-label.pos-4 { top: 25%; left: 15%; }

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-dot.c-1 { background-color: var(--accent-cyan); }
.legend-dot.c-2 { background-color: var(--accent-blue); }
.legend-dot.c-3 { background-color: var(--success); }
.legend-dot.c-4 { background-color: #3b82f6; }

/* Map Chart */
.map-container {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.world-map-svg {
  width: 100%;
  height: 100%;
  opacity: 0; /* For animation */
}

.map-dot {
  transform-origin: center;
  /* GSAP will animate scale */
}

/* Data Table */
.table-container {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  padding: 12px 16px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.data-table td {
  padding: 16px;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table .amount {
  font-family: var(--font-mono);
  font-weight: 500;
}

.badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-success { background-color: rgba(16, 185, 129, 0.15); color: var(--success); }
.badge-warning { background-color: rgba(245, 158, 11, 0.15); color: var(--warning); }
.badge-error   { background-color: rgba(239, 68, 68, 0.15); color: var(--danger); }

/* ── Interactive & Hover States ── */

/* Card Interactions */
.card {
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
  transform: translateY(-2px); /* It will just snap or we can let GSAP handle it, but CSS transform without transition is fine */
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 0 10px rgba(6, 182, 212, 0.05);
}

/* Chart Bars Interactivity */
.v-bar-col {
  cursor: crosshair;
  position: relative;
  transition: transform 0.2s ease;
}

.v-bar-col:hover .v-bar-fill {
  background: linear-gradient(0deg, var(--accent-cyan), #fff);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

.v-bar-col:hover {
  transform: translateY(-4px);
}

.h-bar-track {
  cursor: crosshair;
}

.h-bar-row:hover .h-bar-fill {
  background: linear-gradient(90deg, var(--accent-cyan), #fff);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

/* Funnel Interactivity */
.funnel-row:hover .funnel-bar {
  background: linear-gradient(90deg, var(--accent-cyan), #fff);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

/* Donut Interactivity */
.donut-chart {
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.donut-chart-wrapper:hover .donut-chart {
  transform: scale(1.05) !important; /* overrides GSAP scale 1 */
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
}

/* Table Interactivity */
.data-table tbody tr {
  transition: background-color 0.2s ease;
  cursor: pointer;
}

.data-table tbody tr:hover td {
  background-color: rgba(255, 255, 255, 0.03);
}

/* Tooltip */
.chart-tooltip {
  position: fixed;
  background-color: #1F2937;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  color: #fff;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transform: translate(0, 0);
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.chart-tooltip.visible {
  opacity: 1;
  transform: translate(0, -5px);
}

.chart-tooltip__value {
  font-weight: 700;
  color: var(--accent-cyan);
  margin-top: 2px;
  font-size: 0.9rem;
}

/* Loading Overlay for Simulated Navigation */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-main);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
}

.loading-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(6, 182, 212, 0.2);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── SPA Views Architecture ── */
.views-container {
  position: relative;
  width: 100%;
}

.app-view {
  display: none;
  animation: fadeIn 0.4s ease forwards;
  padding: 32px;
  flex-direction: column;
  gap: 24px;
}

.app-view.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Custom View Components ── */

/* Buttons & Forms */
.btn-primary {
  background-color: var(--accent-cyan);
  color: #000;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background-color: #0891b2;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.form-input {
  background-color: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 0.2s;
}

.form-input:focus {
  border-color: var(--accent-cyan);
}

/* Toggles */
.settings-toggles {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.toggle-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.toggle-label {
  font-size: 0.9rem;
  font-weight: 500;
}

.toggle-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-muted);
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: rgba(6, 182, 212, 0.2);
  border: 1px solid var(--accent-cyan);
}

input:checked + .slider:before {
  transform: translateX(20px);
  background-color: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
}

/* Reports Split Pane */
.reports-split {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
}

.reports-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
}

.report-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.report-item:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

.report-item.active {
  background-color: rgba(6, 182, 212, 0.1);
  border-color: rgba(6, 182, 212, 0.3);
}

.report-icon {
  font-size: 1.5rem;
}

.report-name {
  font-size: 0.9rem;
  font-weight: 500;
}

.report-item.active .report-name {
  color: var(--accent-cyan);
}

.report-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.report-preview {
  display: flex;
  flex-direction: column;
}

.report-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 20px;
}

.report-preview-header h2 {
  font-size: 1.1rem;
}

.report-preview-content {
  flex-grow: 1;
  background-color: #000;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.fake-doc {
  width: 100%;
  max-width: 400px;
  background-color: #fff;
  border-radius: 4px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.fake-doc-title {
  color: #111;
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 20px;
}

.fake-doc-line {
  height: 8px;
  background-color: #e5e7eb;
  border-radius: 4px;
}

.fake-doc-box {
  height: 100px;
  background-color: #f3f4f6;
  border-radius: 4px;
  margin: 10px 0;
}

/* Terminal Logs */
.terminal-card {
  background-color: #000;
  border: 1px solid #333;
  padding: 0;
  overflow: hidden;
}

.terminal-header {
  background-color: #1a1b26;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #333;
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #333;
}

.terminal-dots span:nth-child(1) { background-color: #ff5f56; }
.terminal-dots span:nth-child(2) { background-color: #ffbd2e; }
.terminal-dots span:nth-child(3) { background-color: #27c93f; }

.terminal-title {
  flex-grow: 1;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #888;
}

.terminal-body {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  height: 400px;
  overflow-y: auto;
}

.log-line {
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(255,255,255,0.02);
  padding-bottom: 4px;
}

.log-time {
  color: #6272a4;
  margin-right: 8px;
}

.log-info { color: #50fa7b; font-weight: bold; margin-right: 8px; }
.log-warn { color: #f1fa8c; font-weight: bold; margin-right: 8px; }
.log-crit { color: #ff5555; font-weight: bold; margin-right: 8px; text-shadow: 0 0 5px #ff5555; }

/* Responsive Adjustments */
@media (max-width: 1024px) {
  .grid-4, .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .col-span-2 {
    grid-column: span 2;
  }
  .donut-container {
    flex-direction: column;
  }
  .reports-split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .app-container {
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
  }
  
  .main-content {
    width: 100%;
    overflow-x: hidden;
  }
  
  .sidebar {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
  
  .sidebar__brand {
    margin-bottom: 12px;
  }
  
  .sidebar__nav-section {
    margin-bottom: 0;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  
  .sidebar__nav-section::-webkit-scrollbar {
    display: none;
  }
  
  .sidebar__nav {
    flex-direction: row;
    gap: 8px;
    padding-bottom: 4px;
  }
  
  .sidebar__link {
    white-space: nowrap;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
  }
  
  .sidebar__nav-label {
    display: none;
  }
  
  .topbar {
    padding: 12px 16px;
    width: 100%;
    overflow-x: hidden;
  }
  
  .topbar__tabs {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 16px;
    width: 100%;
    padding-bottom: 4px;
  }
  
  .topbar__tabs::-webkit-scrollbar {
    display: none;
  }
  
  .topbar__tab {
    white-space: nowrap;
  }
  
  .app-view {
    padding: 16px;
    gap: 16px;
    width: 100%;
    overflow-x: hidden;
  }
  
  .grid-4, .grid-3 {
    grid-template-columns: 1fr;
  }
  
  .col-span-2 {
    grid-column: span 1;
  }
  
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .kpi-card__value {
    font-size: 1.5rem;
  }
  
  .card {
    padding: 16px;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .table-container {
    overflow-x: auto;
    width: 100%;
    -webkit-overflow-scrolling: touch;
  }
  
  .data-table {
    min-width: 500px;
  }
  
  .chart-area {
    min-width: 0; /* Let SVG scale down naturally instead of forcing horizontal scroll */
    width: 100%;
  }
  
  .world-map-container {
    min-height: 200px;
  }
}

@media (max-width: 480px) {
  .user-profile__name {
    display: none;
  }
  .search-box {
    display: none;
  }
  .dashboard-title {
    font-size: 1.25rem;
  }
}
