/* ═══════════════════════════════════════════════════
   LOGISTICS OPTIMIZER — Navigator Dark Theme
   Inspired by Yandex Navigator aesthetic
   ═══════════════════════════════════════════════════ */

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

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

:root {
  /* Core palette */
  --bg-0:        #080e17;
  --bg-1:        #0d1520;
  --bg-2:        #111d2e;
  --bg-3:        #162238;
  --bg-4:        #1c2d46;
  --border:      rgba(255,255,255,0.07);
  --border-med:  rgba(255,255,255,0.12);

  /* Text */
  --t-1: #f0f4fa;
  --t-2: #8fa3be;
  --t-3: #4d6480;

  /* Accents */
  --green:       #22d46e;
  --green-dim:   rgba(34,212,110,0.15);
  --blue:        #3b8cff;
  --blue-dim:    rgba(59,140,255,0.15);
  --yellow:      #f5c518;
  --yellow-dim:  rgba(245,197,24,0.15);
  --red:         #ff4757;
  --red-dim:     rgba(255,71,87,0.15);
  --orange:      #ff7f3f;

  /* Fonts */
  --font-ui:   'Golos Text', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Geometry */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  /* Shadows */
  --shadow-card: 0 4px 24px rgba(0,0,0,0.5);
  --shadow-float: 0 8px 40px rgba(0,0,0,0.7);
}

html { font-size: 15px; -webkit-tap-highlight-color: transparent; }
body {
  font-family: var(--font-ui);
  background: var(--bg-0);
  color: var(--t-1);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}
a { color: var(--blue); text-decoration: none; }

/* ─── Scrollbar ─────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-4); border-radius: 4px; }

/* ═══════════════════════════════════════════════════
   COMPONENTS
   ═══════════════════════════════════════════════════ */

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 20px; border-radius: var(--r-sm); border: none;
  font-family: var(--font-ui); font-size: 0.9rem; font-weight: 600;
  cursor: pointer; transition: all 0.15s; white-space: nowrap; user-select: none;
}
.btn:disabled { opacity: 0.35; cursor: not-allowed; }
.btn-primary   { background: var(--green); color: #040d12; }
.btn-primary:hover:not(:disabled) { background: #2aed7c; transform: translateY(-1px); }
.btn-blue      { background: var(--blue); color: white; }
.btn-blue:hover:not(:disabled) { background: #5aa3ff; transform: translateY(-1px); }
.btn-ghost     { background: var(--bg-3); color: var(--t-2); border: 1px solid var(--border); }
.btn-ghost:hover:not(:disabled) { background: var(--bg-4); color: var(--t-1); }
.btn-danger    { background: var(--red-dim); color: var(--red); border: 1px solid rgba(255,71,87,0.2); }
.btn-danger:hover:not(:disabled) { background: var(--red); color: white; }
.btn-block     { width: 100%; }
.btn-lg        { padding: 14px 28px; font-size: 1rem; border-radius: var(--r-md); }
.btn-sm        { padding: 6px 14px; font-size: 0.8rem; }
.btn-icon      { padding: 10px; border-radius: 50%; aspect-ratio: 1; }

/* Form elements */
.form-group { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.form-label { font-size: 0.78rem; font-weight: 600; color: var(--t-3); text-transform: uppercase; letter-spacing: 0.06em; }
.form-input, .form-select {
  background: var(--bg-1); border: 1px solid var(--border-med);
  border-radius: var(--r-sm); color: var(--t-1);
  padding: 11px 14px; font-family: var(--font-ui); font-size: 0.93rem; width: 100%;
  transition: border-color 0.15s;
}
.form-input:focus, .form-select:focus { outline: none; border-color: var(--blue); }
.form-input::placeholder { color: var(--t-3); }

/* Card */
.card {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 20px;
}

/* Badge */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 0.75rem; font-weight: 700;
}
.badge-green  { background: var(--green-dim); color: var(--green); }
.badge-blue   { background: var(--blue-dim);  color: var(--blue); }
.badge-yellow { background: var(--yellow-dim); color: var(--yellow); }
.badge-red    { background: var(--red-dim);   color: var(--red); }
.badge-dim    { background: var(--bg-3);      color: var(--t-2); }

/* Loading spinner */
.spinner {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--bg-4); border-top-color: var(--blue);
  animation: spin 0.7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Divider */
.divider { height: 1px; background: var(--border); margin: 16px 0; }

/* Empty state */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 48px 24px; color: var(--t-3); text-align: center;
}
.empty-state .empty-icon { font-size: 2.5rem; opacity: 0.5; }
.empty-state p { font-size: 0.9rem; max-width: 240px; }

/* Toast */
.toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  background: var(--bg-3); border: 1px solid var(--border-med);
  border-radius: var(--r-md); padding: 12px 18px;
  font-size: 0.88rem; box-shadow: var(--shadow-float);
  animation: slideIn 0.25s ease; display: flex; align-items: center; gap: 10px;
}
.toast-success { border-left: 3px solid var(--green); }
.toast-error   { border-left: 3px solid var(--red); }
.toast-info    { border-left: 3px solid var(--blue); }
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ═══════════════════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════════════════ */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(59,140,255,0.08) 0%, transparent 70%), var(--bg-0);
}
.login-wrap { width: 100%; max-width: 400px; padding: 20px; }
.login-card {
  background: var(--bg-2); border: 1px solid var(--border-med);
  border-radius: var(--r-xl); padding: 44px 36px;
  box-shadow: var(--shadow-float);
}
.login-logo { text-align: center; margin-bottom: 36px; }
.login-logo .logo-icon { font-size: 2.8rem; margin-bottom: 12px; display: block; }
.login-logo h1 { font-size: 1.4rem; font-weight: 900; letter-spacing: -0.02em; }
.login-logo h1 span { color: var(--green); }
.login-logo p { color: var(--t-3); font-size: 0.85rem; margin-top: 6px; }
.login-role-tabs {
  display: flex; gap: 6px; margin-bottom: 24px;
  background: var(--bg-1); border-radius: var(--r-sm); padding: 4px;
}
.role-tab {
  flex: 1; padding: 8px; border: none; background: transparent;
  color: var(--t-3); font-family: var(--font-ui); font-size: 0.85rem; font-weight: 600;
  border-radius: var(--r-sm); cursor: pointer; transition: all 0.15s;
}
.role-tab.active { background: var(--bg-4); color: var(--t-1); }
.login-error { color: var(--red); font-size: 0.85rem; text-align: center; min-height: 18px; margin-top: 10px; }

/* ═══════════════════════════════════════════════════
   DRIVER / NAVIGATOR
   ═══════════════════════════════════════════════════ */
.nav-page { position: fixed; inset: 0; display: flex; flex-direction: column; }

/* Top bar */
.nav-topbar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 200;
  padding: 12px 16px;
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(to bottom, rgba(8,14,23,0.95) 60%, transparent);
}
.nav-day-selector {
  flex: 1; display: flex; align-items: center; gap: 8px;
  background: var(--bg-2); border: 1px solid var(--border-med);
  border-radius: var(--r-md); padding: 8px 14px; cursor: pointer;
  transition: border-color 0.15s;
}
.nav-day-selector:hover { border-color: var(--blue); }
.nav-day-selector .day-label { font-size: 0.78rem; color: var(--t-3); }
.nav-day-selector .day-value { font-size: 0.95rem; font-weight: 700; color: var(--t-1); }
.nav-day-selector .chevron { margin-left: auto; color: var(--t-3); font-size: 0.8rem; }

.nav-btn-icon {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg-2); border: 1px solid var(--border-med);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.15s; font-size: 1.1rem; flex-shrink: 0;
}
.nav-btn-icon:hover { background: var(--bg-4); border-color: var(--border-med); }

/* Map */
#nav-map { position: absolute; inset: 0; z-index: 1; }

/* Map markers */
.nav-marker {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--blue); border: 3px solid white;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 0.75rem; font-weight: 700; color: white;
  box-shadow: 0 3px 12px rgba(0,0,0,0.5); cursor: pointer;
  transition: transform 0.15s;
}
.nav-marker:hover { transform: scale(1.1); }
.nav-marker.depot { background: var(--green); width: 38px; height: 38px; font-size: 1rem; }
.nav-marker.active { background: var(--yellow); border-color: white; transform: scale(1.2); }
.nav-marker.done { background: var(--t-3); border-color: var(--bg-2); opacity: 0.6; }

/* Bottom sheet */
.nav-bottom {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 200;
  transform: translateY(0); transition: transform 0.35s cubic-bezier(0.32,0.72,0,1);
}
.nav-bottom.collapsed .nav-sheet-content { display: none; }

.nav-sheet-handle {
  background: var(--bg-2); border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 10px 20px 0;
  border-top: 1px solid var(--border-med);
  cursor: pointer;
}
.nav-sheet-handle-bar {
  width: 36px; height: 4px; background: var(--bg-4);
  border-radius: 2px; margin: 0 auto 12px;
}

/* Next stop card */
.nav-next-stop {
  display: flex; align-items: center; gap: 14px;
  padding: 0 20px 16px;
  background: var(--bg-2);
}
.nav-stop-num {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: var(--blue-dim); border: 2px solid var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 1rem; font-weight: 700; color: var(--blue);
}
.nav-stop-info { flex: 1; min-width: 0; }
.nav-stop-label { font-size: 0.72rem; color: var(--t-3); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.nav-stop-address { font-size: 0.95rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-stop-meta { font-size: 0.8rem; color: var(--t-3); margin-top: 2px; }
.nav-stop-actions { display: flex; gap: 8px; }

/* Sheet content (expanded) */
.nav-sheet-content { background: var(--bg-2); }

/* Stats strip */
.nav-stats {
  display: flex; gap: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.nav-stat {
  flex: 1; padding: 12px 16px; text-align: center;
  border-right: 1px solid var(--border);
}
.nav-stat:last-child { border-right: none; }
.nav-stat-value { font-family: var(--font-mono); font-size: 1.1rem; font-weight: 700; color: var(--green); }
.nav-stat-label { font-size: 0.7rem; color: var(--t-3); margin-top: 2px; }

/* Route list */
.nav-route-list { max-height: 40vh; overflow-y: auto; padding: 8px 0; }
.nav-route-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 20px; transition: background 0.1s; cursor: pointer;
}
.nav-route-item:hover { background: var(--bg-3); }
.nav-route-item.active-stop { background: var(--blue-dim); }
.nav-route-item.done-stop { opacity: 0.45; }
.nav-route-dot {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: var(--bg-4); display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700; color: var(--t-2);
}
.nav-route-item.active-stop .nav-route-dot { background: var(--blue); color: white; }
.nav-route-item.done-stop .nav-route-dot { background: var(--green-dim); color: var(--green); }
.nav-route-addr { font-size: 0.88rem; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-route-check { font-size: 0.85rem; color: var(--green); }

/* No route placeholder */
.nav-placeholder {
  position: absolute; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-0); flex-direction: column; gap: 16px;
}
.nav-placeholder-icon { font-size: 4rem; opacity: 0.2; }
.nav-placeholder h2 { font-size: 1.2rem; font-weight: 700; }
.nav-placeholder p { color: var(--t-3); font-size: 0.9rem; text-align: center; max-width: 260px; }

/* ═══════════════════════════════════════════════════
   ADMIN LAYOUT
   ═══════════════════════════════════════════════════ */
.admin-layout { display: flex; min-height: 100vh; }

/* Sidebar */
.admin-sidebar {
  width: 240px; flex-shrink: 0;
  background: var(--bg-1); border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-logo {
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo .logo-mark { font-size: 1.5rem; margin-bottom: 4px; }
.sidebar-logo h2 { font-size: 0.95rem; font-weight: 900; letter-spacing: -0.01em; }
.sidebar-logo h2 span { color: var(--green); }
.sidebar-logo p { font-size: 0.72rem; color: var(--t-3); margin-top: 3px; }

.sidebar-section { padding: 16px 12px 8px; }
.sidebar-section-label {
  font-size: 0.68rem; font-weight: 700; color: var(--t-3);
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 0 8px; margin-bottom: 6px;
}
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--r-sm);
  color: var(--t-2); font-size: 0.88rem; font-weight: 500;
  transition: all 0.15s; cursor: pointer; text-decoration: none;
}
.sidebar-link:hover { background: var(--bg-3); color: var(--t-1); }
.sidebar-link.active { background: var(--blue-dim); color: var(--blue); font-weight: 600; }
.sidebar-link .link-icon { font-size: 1rem; width: 20px; text-align: center; }
.sidebar-link .link-badge {
  margin-left: auto; background: var(--blue-dim); color: var(--blue);
  font-size: 0.7rem; font-weight: 700; padding: 2px 7px; border-radius: 10px;
}

.sidebar-bottom {
  margin-top: auto; padding: 16px 12px;
  border-top: 1px solid var(--border);
}
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--r-sm);
}
.sidebar-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--blue-dim); border: 2px solid var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; color: var(--blue);
}
.sidebar-username { font-size: 0.85rem; font-weight: 600; }
.sidebar-role { font-size: 0.72rem; color: var(--t-3); }

/* Main content */
.admin-main { flex: 1; overflow-y: auto; min-width: 0; }
.admin-topbar {
  background: var(--bg-1); border-bottom: 1px solid var(--border);
  padding: 14px 28px; display: flex; align-items: center; gap: 16px;
  position: sticky; top: 0; z-index: 50;
}
.admin-topbar h1 { font-size: 1.05rem; font-weight: 700; }
.admin-topbar .topbar-actions { margin-left: auto; display: flex; gap: 10px; }

.admin-content { padding: 28px; }

/* Stats cards row */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.stat-card {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 20px 22px;
  display: flex; flex-direction: column; gap: 8px;
}
.stat-card-label { font-size: 0.78rem; font-weight: 600; color: var(--t-3); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-card-value { font-family: var(--font-mono); font-size: 1.8rem; font-weight: 700; line-height: 1; }
.stat-card-value.green  { color: var(--green); }
.stat-card-value.blue   { color: var(--blue); }
.stat-card-value.yellow { color: var(--yellow); }
.stat-card-value.orange { color: var(--orange); }
.stat-card-sub { font-size: 0.78rem; color: var(--t-3); }

/* Section header */
.section-header { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.section-header h2 { font-size: 1rem; font-weight: 700; }
.section-header .section-actions { margin-left: auto; display: flex; gap: 8px; }

/* Table */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.data-table th {
  background: var(--bg-1); padding: 10px 16px; text-align: left;
  font-size: 0.72rem; font-weight: 700; color: var(--t-3);
  text-transform: uppercase; letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  color: var(--t-1);
}
.data-table tr:hover td { background: var(--bg-3); }
.data-table .mono { font-family: var(--font-mono); font-size: 0.82rem; color: var(--t-2); }

/* Chart container */
.chart-card {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 22px;
}
.chart-card h3 { font-size: 0.9rem; font-weight: 700; margin-bottom: 16px; color: var(--t-2); }
.chart-wrap { height: 280px; position: relative; }
.charts-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Algo config */
.algo-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.algo-card {
  background: var(--bg-2); border: 2px solid var(--border);
  border-radius: var(--r-lg); padding: 20px; cursor: pointer;
  transition: all 0.15s;
}
.algo-card:hover { border-color: var(--border-med); }
.algo-card.selected { border-color: var(--blue); background: var(--blue-dim); }
.algo-card .algo-name { font-size: 1rem; font-weight: 800; margin-bottom: 4px; }
.algo-card .algo-desc { font-size: 0.78rem; color: var(--t-3); }
.algo-card .algo-badge { margin-top: 12px; }

/* Param sliders */
.params-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.param-item { display: flex; flex-direction: column; gap: 6px; }
.param-label { font-size: 0.78rem; color: var(--t-3); font-weight: 600; display: flex; justify-content: space-between; }
.param-label span { color: var(--blue); font-family: var(--font-mono); }
input[type=range] {
  -webkit-appearance: none; width: 100%; height: 4px;
  background: var(--bg-4); border-radius: 2px; outline: none;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px;
  border-radius: 50%; background: var(--blue); cursor: pointer;
  box-shadow: 0 0 0 3px rgba(59,140,255,0.2);
}

/* Upload area */
.upload-drop {
  border: 2px dashed var(--border-med); border-radius: var(--r-lg);
  padding: 40px; text-align: center; cursor: pointer;
  transition: all 0.2s; color: var(--t-3);
}
.upload-drop:hover, .upload-drop.drag-over { border-color: var(--blue); color: var(--blue); background: var(--blue-dim); }
.upload-drop .upload-icon { font-size: 2.5rem; margin-bottom: 12px; }
.upload-drop p { font-size: 0.9rem; }
.upload-drop span { font-size: 0.8rem; color: var(--t-3); }

/* Route assignment */
.driver-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; background: var(--bg-2);
  border: 1px solid var(--border); border-radius: var(--r-md);
  margin-bottom: 8px;
}
.driver-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: var(--bg-4); display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}
.driver-info { flex: 1; }
.driver-name { font-size: 0.92rem; font-weight: 600; }
.driver-meta { font-size: 0.78rem; color: var(--t-3); }
.driver-status { display: flex; align-items: center; gap: 8px; }

/* Progress bar */
.progress { height: 4px; background: var(--bg-4); border-radius: 2px; overflow: hidden; margin-top: 6px; }
.progress-bar { height: 100%; background: var(--green); border-radius: 2px; transition: width 0.5s; }

/* ═══════════════════════════════════════════════════
   ANALYSIS PAGE
   ═══════════════════════════════════════════════════ */
.analysis-grid { display: grid; grid-template-columns: 340px 1fr; gap: 20px; }
.analysis-sidebar { display: flex; flex-direction: column; gap: 16px; }
.analysis-main { display: flex; flex-direction: column; gap: 20px; }

/* Results table highlight */
.results-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.results-table th {
  background: var(--bg-1); padding: 10px 16px;
  font-size: 0.72rem; font-weight: 700; color: var(--t-3);
  text-transform: uppercase; letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border); text-align: left;
}
.results-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.results-table .best td { color: var(--green); }
.results-table .best td:first-child::after { content: ' 🏆'; }
.mono-val { font-family: var(--font-mono); }

/* Period selector */
.period-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  padding: 6px 14px; border-radius: 20px; font-size: 0.82rem; font-weight: 600;
  background: var(--bg-3); color: var(--t-2); cursor: pointer; border: 1px solid var(--border);
  transition: all 0.15s;
}
.chip:hover { border-color: var(--border-med); color: var(--t-1); }
.chip.active { background: var(--blue-dim); color: var(--blue); border-color: var(--blue); }

/* ═══════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .algo-cards { grid-template-columns: 1fr 1fr; }
  .analysis-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .admin-sidebar { width: 200px; }
  .charts-2col { grid-template-columns: 1fr; }
  .params-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .admin-layout { flex-direction: column; }
  .admin-sidebar {
    width: 100%; height: auto; position: static;
    flex-direction: row; overflow-x: auto; overflow-y: hidden;
    border-right: none; border-bottom: 1px solid var(--border);
  }
  .sidebar-section { display: flex; gap: 4px; align-items: center; padding: 8px; }
  .sidebar-section-label { display: none; }
  .sidebar-logo { padding: 12px 16px; display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
  .sidebar-logo p, .sidebar-logo h2 span { display: none; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .algo-cards { grid-template-columns: 1fr; }
  .admin-content { padding: 16px; }
}

@media (max-width: 480px) {
  .stats-row { grid-template-columns: 1fr; }
  .nav-stats { overflow-x: auto; }
  .nav-stat { min-width: 90px; }
}
