@font-face {
  font-family: "Inter Var";
  src: url(/fonts/inter-var-latin.woff2) format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #07090e;
  --bg-subtle: #0b0e15;
  --side: #0e111a;
  --card: #121520;
  --card-elevated: #161a27;
  --card-hover: #1b2030;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.12);
  --line-focus: rgba(99, 102, 241, 0.45);
  --text: #f1f5f9;
  --text-muted: #848ea4;
  --text-dim: #545c70;
  --indigo: #6366f1;
  --indigo-glow: rgba(99, 102, 241, 0.25);
  --emerald: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.25);
  --amber: #f59e0b;
  --ruby: #ef4444;
  --blue: #3b82f6;
  --cyan: #06b6d4;
  --r: 12px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4), 0 0 0 1px var(--line);
  --shadow-md: 0 4px 16px -2px rgba(0,0,0,0.5), 0 0 0 1px var(--line);
  --shadow-lg: 0 16px 40px -8px rgba(0,0,0,0.7), 0 0 0 1px var(--line-strong);
}

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

html, body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 "Inter Var", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Custom scrollbars */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.25); }

/* Typography & utility */
h1, h2, h3, h4 { font-weight: 600; color: #fff; letter-spacing: -0.015em; }
a { color: #a5b4fc; text-decoration: none; transition: color 0.15s; }
a:hover { color: #c7d2fe; }
kbd {
  font: 11px ui-monospace, Menlo, Consolas, monospace;
  background: #181d2a;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 1px 5px;
  color: #c7d2fe;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}

.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }

/* Top Command Bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 20px;
  background: rgba(14, 17, 26, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-left, .topbar-center, .topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  color: #fff;
}
.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: linear-gradient(135deg, #6366f1, #4338ca);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
  color: #fff;
  box-shadow: 0 2px 8px var(--indigo-glow);
}
.brand-version {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 1px 6px;
  border-radius: 99px;
}

/* Global search trigger */
.search-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #11141e;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12.5px;
  color: var(--text-muted);
  cursor: pointer;
  min-width: 260px;
  transition: all 0.15s;
}
.search-trigger:hover, .search-trigger:focus-within {
  background: #161b27;
  border-color: var(--indigo);
  color: #fff;
  box-shadow: 0 0 0 2px var(--indigo-glow);
}

/* Stat dials in header */
.quota-dial {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #10131d;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 4px 12px 4px 6px;
  font-size: 12px;
}
.progress-ring {
  width: 22px;
  height: 22px;
  transform: rotate(-90deg);
}
.progress-ring-bg {
  stroke: rgba(255, 255, 255, 0.1);
}
.progress-ring-fill {
  stroke: var(--emerald);
  transition: stroke-dashoffset 0.35s ease;
}

/* Pool status chip */
.pool-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #a7f3d0;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
}
.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

/* Action button styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  background: var(--card-elevated);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn:hover {
  background: var(--card-hover);
  border-color: var(--line-strong);
}
.btn:active {
  transform: scale(0.98);
}
.btn.sm {
  padding: 5px 10px;
  font-size: 12px;
}
.btn.primary {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  border-color: #6366f1;
  color: #fff;
  box-shadow: 0 2px 8px var(--indigo-glow);
}
.btn.primary:hover {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
}
.btn.emerald {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: #10b981;
  color: #fff;
  box-shadow: 0 2px 8px var(--emerald-glow);
}
.btn.emerald:hover {
  background: linear-gradient(135deg, #059669, #047857);
}
.btn.blue {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.35);
  color: #93c5fd;
}
.btn.blue:hover {
  background: rgba(59, 130, 246, 0.22);
  color: #dbeafe;
}
.btn.amber {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fcd34d;
}
.btn.amber:hover {
  background: rgba(245, 158, 11, 0.2);
}
.btn.ruby {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}
.btn.ruby:hover {
  background: rgba(239, 68, 68, 0.2);
}
.btn.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
}
.btn.ghost:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

/* 3-PANE COMMAND CENTER COCKPIT */
.cockpit-layout {
  display: grid;
  grid-template-columns: 290px minmax(460px, 1fr) 320px;
  height: calc(100vh - 56px);
  min-height: 0;
  overflow: hidden;
}

/* PANE 1: LEFT QUEUE STREAM */
.pane-queue {
  background: var(--side);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.queue-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.queue-pills {
  display: flex;
  gap: 4px;
  background: #090b10;
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.q-pill {
  flex: 1;
  text-align: center;
  padding: 5px 4px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  background: transparent;
  border: none;
  transition: all 0.15s;
}
.q-pill.active {
  background: #1b2030;
  color: #fff;
  font-weight: 600;
}
.queue-list {
  flex: 1;
  overflow-y: auto;
  list-style: none;
  padding: 8px;
}
.q-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 4px;
  border: 1px solid transparent;
  transition: all 0.15s;
}
.q-item:hover {
  background: #141722;
  border-color: var(--line);
}
.q-item.active {
  background: #191e2b;
  border-color: var(--indigo);
  box-shadow: inset 3px 0 0 #6366f1, 0 0 12px rgba(99, 102, 241, 0.15);
}
.q-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  background: #10131d;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.q-item.active .q-num {
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.2);
}
.q-info {
  flex: 1;
  min-width: 0;
}
.q-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.q-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* PANE 2: CENTER ACTION TERMINAL */
.pane-terminal {
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  padding: 24px 28px;
}
.terminal-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-md);
  margin-bottom: 18px;
  overflow: hidden;
}

/* Hero Contact Card */
.contact-hero {
  background: linear-gradient(135deg, #131724, #0f1118);
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}
.contact-step-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
  background: rgba(99, 102, 241, 0.12);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.25);
}
.contact-hero h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.contact-phone-lg {
  font-size: 19px;
  font-weight: 600;
  color: #93c5fd;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}

/* Facts row */
.facts-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 14px 22px;
  background: #0d0f16;
  border-bottom: 1px solid var(--line);
}
.fact-item label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  display: block;
  margin-bottom: 3px;
}
.fact-item span {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}

/* Message Craft Box */
.message-header {
  padding: 16px 22px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.message-editor-wrap {
  padding: 0 22px 16px;
}
.message-textarea {
  width: 100%;
  min-height: 120px;
  background: #090b10;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 14.5px;
  line-height: 1.55;
  color: #f1f5f9;
  resize: vertical;
  transition: all 0.15s;
}
.message-textarea:focus {
  outline: none;
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}
.msg-stats-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

/* Primary Action Cluster */
.action-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 22px;
  background: #0f1118;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

/* PANE 3: RIGHT LEAD DOSSIER */
.pane-dossier {
  background: var(--side);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 16px;
  gap: 16px;
}
.dossier-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
}
.dossier-card-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.timeline-item {
  position: relative;
  padding-left: 20px;
  margin-bottom: 12px;
  font-size: 12.5px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--indigo);
  box-shadow: 0 0 6px var(--indigo);
}
.timeline-item::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 15px;
  bottom: -8px;
  width: 1px;
  background: rgba(255, 255, 255, 0.1);
}
.timeline-item:last-child::after { display: none; }
.timeline-time { font-size: 11px; color: var(--text-dim); }

/* SLIDE-OVER LEAD RADAR DRAWER */
.radar-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.radar-drawer-overlay.open {
  display: block;
  opacity: 1;
}
.radar-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 600px;
  max-width: 95vw;
  background: #0f1119;
  border-left: 1px solid var(--line-strong);
  box-shadow: var(--shadow-lg);
  z-index: 101;
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}
.radar-drawer-overlay.open .radar-drawer {
  transform: translateX(0);
}
.radar-drawer-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #121520;
}
.radar-drawer-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

/* ==========================================================================
   OPTION 1: APP SIDEBAR & OPTION 2: TOP NAVIGATION
   ========================================================================== */

/* Main App Shell with Sidebar */
.app-shell {
  display: flex;
  height: calc(100vh - 56px);
  overflow: hidden;
}

/* App Sidebar (Option 1) */
.app-sidebar {
  width: 228px;
  min-width: 228px;
  background: #090b11;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: width 0.2s cubic-bezier(0.16, 1, 0.3, 1), min-width 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  z-index: 20;
}

.app-sidebar.collapsed {
  width: 60px;
  min-width: 60px;
}

.sidebar-scroll {
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 0;
  flex: 1;
}

.sidebar-group {
  margin-bottom: 16px;
}

.sidebar-group-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  padding: 8px 16px 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.app-sidebar.collapsed .sidebar-group-title {
  display: none;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  margin: 2px 8px;
  border-radius: 8px;
  color: #94a3b8;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  position: relative;
}

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

.sidebar-nav-item.active {
  color: #fff;
  background: rgba(99, 102, 241, 0.18);
  border: 1px solid rgba(99, 102, 241, 0.35);
  font-weight: 600;
}

.sidebar-nav-item svg {
  flex-shrink: 0;
  width: 17px;
  height: 17px;
  stroke: #94a3b8;
  transition: stroke 0.15s ease;
}

.sidebar-nav-item:hover svg {
  stroke: #e2e8f0;
}

.sidebar-nav-item.active svg {
  stroke: #a5b4fc;
}

.sidebar-nav-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-sidebar.collapsed .sidebar-nav-label {
  display: none;
}

.sidebar-nav-badge {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 12px;
  background: #181d2a;
  color: #94a3b8;
  border: 1px solid var(--line);
}

.app-sidebar.collapsed .sidebar-nav-badge {
  display: none;
}

/* Pinned Sidebar Account Footer (Always visible at the bottom) */
.sidebar-account-footer {
  margin-top: auto;
  flex-shrink: 0;
  padding: 14px 16px;
  background: #090b11;
  border-top: 1px solid var(--line);
  user-select: none;
}

.sidebar-sync-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  color: #94a3b8;
  margin-bottom: 12px;
}

.sidebar-sync-row svg {
  stroke: #94a3b8;
}

.sidebar-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin-bottom: 14px;
}

.sidebar-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-user-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-user-name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.015em;
}

.sidebar-user-role {
  font-size: 12.5px;
  font-weight: 400;
  color: #64748b;
}

.sidebar-lock-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #10141f;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sidebar-lock-btn:hover {
  background: #1a2236;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.sidebar-lock-btn svg {
  stroke: currentColor;
}

/* Collapsed sidebar adjustments */
.app-sidebar.collapsed .sidebar-sync-row,
.app-sidebar.collapsed .sidebar-divider,
.app-sidebar.collapsed .sidebar-user-meta {
  display: none;
}

.app-sidebar.collapsed .sidebar-account-footer {
  padding: 12px 0;
  display: flex;
  justify-content: center;
}


