/* ==========================================================================
   SLOE LOGISTICS OS — ULTRA-LUXURY AGENTIC DESIGN SYSTEM
   Optimized for High-Density Fleet Telematics & Spot Freight Trading
   ========================================================================== */

:root {
  --slate-950: #030712;
  --slate-900: #0b0f17;
  --slate-850: #111827;
  --slate-800: #1f2937;
  --slate-700: #374151;
  --slate-600: #4b5563;
  --slate-500: #6b7280;
  --slate-400: #9ca3af;
  --slate-300: #d1d5db;
  --slate-200: #e5e7eb;
  --slate-100: #f3f4f6;
  --slate-50:  #f9fafb;

  --indigo-600: #4f46e5;
  --indigo-500: #6366f1;
  --indigo-400: #818cf8;
  --cyan-500:   #06b6d4;
  --cyan-400:   #22d3ee;
  --emerald-500:#10b981;
  --emerald-400:#34d399;
  --blue-600:   #2563eb;
  --blue-400:   #60a5fa;
  --amber-500:  #f59e0b;
  --amber-400:  #fbbf24;
  --rose-500:   #f43f5e;
  --rose-400:   #fb7185;

  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: #030712; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(99, 102, 241, 0.5); }

body {
  background-color: #030712;
  color: var(--slate-100);
  font-family: var(--font-family);
  height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

.app-shell { display: flex; height: 100vh; width: 100vw; }

/* ==========================================================================
   SIDEBAR NAVIGATION
   ========================================================================== */
.sidebar-nav {
  width: 250px;
  background: rgba(11, 15, 23, 0.92);
  backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
  z-index: 20;
}

.sidebar-top-user {
  height: 64px;
  padding: 0.85rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.user-avatar-box {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: linear-gradient(135deg, #4f46e5 0%, #1e1b4b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  color: #fff;
  font-size: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
}

.user-meta .user-name {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.user-meta .user-firm {
  font-size: 0.68rem;
  color: var(--slate-400);
}

.domain-pill-container { padding: 0.65rem 0.85rem 0.35rem 0.85rem; }

.domain-pill-box {
  background: rgba(3, 7, 18, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
}

.domain-pill-box:hover {
  border-color: var(--indigo-500);
  background: rgba(79, 70, 229, 0.1);
}

.domain-label {
  font-size: 0.65rem;
  color: var(--slate-400);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.domain-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.18rem 0.45rem;
  border-radius: 5px;
}

.domain-badge.fleet-style {
  background: rgba(99, 102, 241, 0.15);
  color: var(--indigo-400);
  border: 1px solid rgba(99, 102, 241, 0.35);
}

.domain-badge.broker-style {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald-400);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.sidebar-menu {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.section-title {
  font-size: 0.62rem;
  font-family: var(--font-mono);
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--slate-500);
  padding: 0.25rem 0.5rem;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.65rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--slate-300);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.08);
}

.nav-item.active {
  background: rgba(99, 102, 241, 0.12);
  color: #fff;
  border-color: rgba(99, 102, 241, 0.35);
}

.nav-icon { font-size: 0.95rem; }

.sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.75rem;
}

.user-footer-btn {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  padding: 0.35rem;
  border-radius: 6px;
  transition: background 0.15s;
}

.user-footer-btn:hover { background: rgba(255, 255, 255, 0.04); }

.user-avatar-sm {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #1e1b4b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: bold;
  color: var(--indigo-400);
}

.user-footer-text { flex: 1; }
.user-footer-name { font-size: 0.75rem; font-weight: 700; display: block; color: #fff; }
.user-footer-sub { font-size: 0.65rem; color: var(--slate-500); }
.chevron-icon { font-size: 0.75rem; color: var(--slate-500); }

/* ==========================================================================
   WORKSPACE MAIN & TOPBAR
   ========================================================================== */
.workspace-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: radial-gradient(circle at 50% 0%, #0d1222 0%, #030712 65%);
}

.workspace-topbar {
  height: 56px;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(11, 15, 23, 0.65);
  backdrop-filter: blur(16px);
  flex-shrink: 0;
}

.topbar-branding { display: flex; align-items: center; gap: 0.75rem; }

.topbar-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
}

.topbar-sub {
  font-size: 0.72rem;
  color: var(--slate-400);
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  padding-left: 0.75rem;
}

.topbar-actions { display: flex; align-items: center; gap: 0.75rem; }

.btn-domain-toggle {
  background: rgba(3, 7, 18, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--slate-300);
  font-size: 0.72rem;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  transition: all 0.15s;
}

.btn-domain-toggle:hover {
  border-color: var(--indigo-400);
  background: rgba(99, 102, 241, 0.1);
}

.hos-timer-pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
}

.timer-countdown { color: var(--emerald-400); font-weight: 800; }

.btn-hitl-shift-end {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: var(--rose-400);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-hitl-shift-end:hover { background: rgba(244, 63, 94, 0.25); }

.data-status-badge {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--cyan-400);
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.3);
  padding: 0.25rem 0.5rem;
  border-radius: 5px;
}

/* ==========================================================================
   VIEW SCREENS
   ========================================================================== */
.view-screen {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: none;
}

.view-screen.active { display: block; }

.dev-preview-banner {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 8px;
  padding: 0.65rem 1rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.75rem;
  color: var(--slate-300);
}

.ops-page-header {
  margin-bottom: 1.25rem;
}

.ops-page-header h2 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.25rem;
}

.ops-page-header p {
  font-size: 0.78rem;
  color: var(--slate-400);
}

/* SLATE CARDS */
.slate-card {
  background: #0b0f17;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  transition: all 0.2s ease;
}

.slate-card:hover {
  border-color: rgba(99, 102, 241, 0.35);
  border-top-color: rgba(129, 140, 248, 0.5);
}

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.card-header-row h3 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.card-subtext {
  font-size: 0.75rem;
  color: var(--slate-400);
  margin-top: 0.15rem;
}

/* GRIDS */
.two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.two-col-grid .flex-1 { flex: 1; }
.two-col-grid .flex-2 { flex: 2; }

.four-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.slate-kpi-card {
  background: #0b0f17;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.kpi-title {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--slate-400);
  letter-spacing: 0.06em;
}

.kpi-number {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}

.kpi-number.green-text { color: var(--emerald-400); }
.kpi-number.cyan-text  { color: var(--cyan-400); }
.kpi-number.indigo-text{ color: var(--indigo-400); }
.kpi-number.amber-text { color: var(--amber-400); }

.kpi-desc {
  font-size: 0.68rem;
  color: var(--slate-400);
}

/* TODAY HERO CARD */
.today-hero-card {
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.6) 0%, rgba(11, 15, 23, 0.9) 100%);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}

.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.title-row h2 {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  color: #fff;
}

.market-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  background: rgba(99, 102, 241, 0.2);
  color: var(--indigo-400);
  border: 1px solid rgba(99, 102, 241, 0.4);
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
}

/* MORNING ACTION BAR */
.morning-action-bar {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-left: 4px solid var(--amber-400);
  border-radius: 8px;
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.action-bar-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.action-badge-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 800;
  background: rgba(245, 158, 11, 0.18);
  color: var(--amber-400);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.action-bar-text {
  font-size: 0.82rem;
  color: #fff;
  font-weight: 600;
}

/* BUTTONS */
.btn-hitl-primary {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.15s;
}

.btn-hitl-primary:hover {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.btn-cta-gold {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #030712;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-cta-gold:hover {
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.btn-primary-action {
  background: #1e1b4b;
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: var(--indigo-400);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s;
}

.btn-primary-action:hover {
  background: #312e81;
  color: #fff;
}

.btn-secondary-action {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--slate-300);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-secondary-action:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

.btn-refresh {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--slate-300);
  font-size: 0.72rem;
  padding: 0.35rem 0.65rem;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-refresh:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }

/* AI ADVISORY BANNER */
.drawer-ai-banner {
  background: rgba(11, 15, 23, 0.8);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-left: 3px solid var(--indigo-500);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
}

.drawer-ai-banner.healthy {
  border-color: rgba(16, 185, 129, 0.25);
  border-left-color: var(--emerald-400);
}

.ai-banner-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--slate-300);
}

.ai-confidence {
  font-size: 0.62rem;
  color: var(--emerald-400);
  background: rgba(16, 185, 129, 0.12);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.ai-banner-text {
  font-size: 0.78rem;
  color: var(--slate-200);
  line-height: 1.45;
}

/* TABLES */
.queue-table-container { overflow-x: auto; }

.queue-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.queue-table th {
  text-align: left;
  padding: 0.65rem 0.75rem;
  color: var(--slate-400);
  font-size: 0.65rem;
  font-family: var(--font-mono);
  font-weight: 800;
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.queue-table td {
  padding: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--slate-300);
}

.queue-table tr:hover td { background: rgba(255, 255, 255, 0.02); }

/* BADGES */
.status-pill {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  display: inline-block;
}

.status-pill.green { background: rgba(16, 185, 129, 0.15); color: var(--emerald-400); border: 1px solid rgba(16, 185, 129, 0.3); }
.status-pill.blue  { background: rgba(99, 102, 241, 0.15); color: var(--indigo-400); border: 1px solid rgba(99, 102, 241, 0.3); }
.status-pill.yellow{ background: rgba(245, 158, 11, 0.15); color: var(--amber-400); border: 1px solid rgba(245, 158, 11, 0.3); }
.status-pill.red   { background: rgba(244, 63, 94, 0.15); color: var(--rose-400); border: 1px solid rgba(244, 63, 94, 0.3); }

/* MARGIN FORMULA BOX */
.margin-formula-box {
  background: rgba(3, 7, 18, 0.85);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 10px;
  padding: 1.1rem;
}

.formula-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--indigo-400);
  margin-bottom: 0.75rem;
  letter-spacing: 0.04em;
}

.formula-equation {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.eq-block {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 0.45rem 0.75rem;
  display: flex;
  flex-direction: column;
}

.eq-block.highlight {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--indigo-500);
}

.eq-label {
  font-size: 0.6rem;
  font-family: var(--font-mono);
  color: var(--slate-400);
  margin-bottom: 0.2rem;
}

.eq-value {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 800;
}

.eq-op {
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--slate-500);
}

/* ==========================================================================
   2D HIGHWAY FLEET TWIN (SPATIAL SCADA FOR TRUCKING)
   ========================================================================== */
.fleet-twin-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.fleet-map-canvas-card {
  position: relative;
  background: #050811;
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 12px;
  height: 380px;
  overflow: hidden;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.8);
}

.fleet-map-svg {
  width: 100%;
  height: 100%;
}

.tractor-node {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.tractor-node:hover {
  transform: scale(1.15);
}

.fleet-node-card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.tractor-card {
  background: #0b0f17;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tractor-card:hover {
  border-color: var(--indigo-500);
  background: rgba(99, 102, 241, 0.06);
}

.tractor-card.active-selected {
  border-color: var(--cyan-400);
  background: rgba(6, 182, 212, 0.08);
}

.tractor-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.45rem;
}

.tractor-id {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 800;
  color: #fff;
}

.tractor-meta {
  font-size: 0.72rem;
  color: var(--slate-300);
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.tractor-progress-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 0.45rem;
}

.tractor-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4f46e5 0%, #22d3ee 100%);
}

/* ==========================================================================
   DISPATCH KANBAN BOARD
   ========================================================================== */
.kanban-board-container {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 1rem;
}

.kanban-column {
  min-width: 270px;
  width: 270px;
  background: rgba(11, 15, 23, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.kanban-col-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.kanban-col-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--slate-300);
  letter-spacing: 0.04em;
}

.kanban-count-pill {
  font-size: 0.65rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.kanban-card {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.kanban-card:hover {
  border-color: var(--indigo-400);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.kanban-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.load-number {
  font-family: var(--font-mono);
  font-weight: 800;
  color: #fff;
  font-size: 0.82rem;
}

.load-rate {
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--emerald-400);
  font-size: 0.82rem;
}

.load-lane {
  font-size: 0.75rem;
  color: var(--slate-200);
  font-weight: 600;
}

.load-driver {
  font-size: 0.68rem;
  color: var(--slate-400);
}

/* ==========================================================================
   AI AGENTS WORKSPACE (CHAT & READERS)
   ========================================================================== */
.agent-profile-banner {
  background: #0b0f17;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.agent-profile-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.agent-big-avatar {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, #4f46e5 0%, #312e81 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 900;
  color: #fff;
}

.agent-name-row h2 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
}

.agent-role-pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  color: var(--slate-400);
}

.online-dot { color: var(--emerald-400); font-weight: bold; }

.chat-workspace-split {
  display: flex;
  height: calc(100vh - 250px);
  gap: 1.25rem;
}

.conversations-panel {
  width: 320px;
  background: #0b0f17;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex-shrink: 0;
}

.conv-header {
  padding: 0.85rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.conv-header h3 {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
}

.conversations-list {
  flex: 1;
  overflow-y: auto;
}

.conv-item {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: background 0.15s;
}

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

.conv-item.active {
  background: rgba(99, 102, 241, 0.1);
  border-left: 3px solid var(--indigo-400);
}

.conv-item-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.conv-item-time {
  font-size: 0.65rem;
  color: var(--slate-500);
}

.conv-item-snippet {
  font-size: 0.7rem;
  color: var(--slate-400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-reader-panel {
  flex: 1;
  background: #0b0f17;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-card-container {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
}

.chat-briefing-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-msg {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-width: 80%;
}

.chat-msg.model {
  align-self: flex-start;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(99, 102, 241, 0.25);
  padding: 0.85rem 1rem;
  border-radius: 8px 8px 8px 2px;
}

.chat-msg.user {
  align-self: flex-end;
  background: #1e1b4b;
  border: 1px solid rgba(99, 102, 241, 0.4);
  padding: 0.85rem 1rem;
  border-radius: 8px 8px 2px 8px;
}

.chat-msg-text {
  font-size: 0.82rem;
  line-height: 1.45;
  color: #fff;
}

.chat-input-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(3, 7, 18, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
}

.chat-input-pill input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 0.82rem;
  outline: none;
}

.btn-send-chat {
  background: var(--indigo-600);
  border: none;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   SLIDEOVER DRAWER & MODALS
   ========================================================================== */
.slideover-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
}

.slideover-overlay.active { display: block; }

.slideover-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 480px;
  background: #0b0f17;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
}

.slideover-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.slideover-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
}

.slideover-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-drawer-close {
  background: transparent;
  border: none;
  color: var(--slate-400);
  font-size: 1.1rem;
  cursor: pointer;
}

/* TOASTS */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 200;
}

.toast {
  background: #0f172a;
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  animation: slideIn 0.2s ease-out;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: #fff;
}

.toast-msg {
  font-size: 0.72rem;
  color: var(--slate-300);
}
