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

:root {
  --bg: #181d29;
  --bg-elevated: #1d2433;
  --surface: #232b3d;
  --surface-2: #2b354b;
  --surface-hover: #323e57;
  --input-bg: #171d2b;

  --border: rgba(255, 255, 255, 0.10);
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.18);
  --specular: inset 0 1px 0 rgba(255, 255, 255, 0.08);

  --text: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;

  --accent: #3b82f6;
  --accent-light: #60a5fa;
  --accent-soft: rgba(59, 130, 246, 0.16);
  --accent-border: rgba(96, 165, 250, 0.36);

  --cyan: #38bdf8;
  --cyan-soft: rgba(56, 189, 248, 0.15);
  --cyan-border: rgba(56, 189, 248, 0.32);

  --emerald: #34d399;
  --emerald-soft: rgba(52, 211, 153, 0.15);
  --emerald-border: rgba(52, 211, 153, 0.32);

  --amber: #fbbf24;
  --amber-soft: rgba(251, 191, 36, 0.15);
  --amber-border: rgba(251, 191, 36, 0.32);

  --rose: #fb7185;
  --rose-soft: rgba(251, 113, 133, 0.15);
  --rose-border: rgba(251, 113, 133, 0.32);

  --violet: #a78bfa;
  --violet-soft: rgba(167, 139, 250, 0.15);
  --violet-border: rgba(167, 139, 250, 0.32);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --transition: 160ms cubic-bezier(0.2, 0, 0, 1);
}

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

::-webkit-scrollbar { width: 7px; height: 7px; }
::-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.22); }

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 75% 42% at 55% -12%, rgba(99, 102, 241, 0.16), transparent 65%),
    radial-gradient(ellipse 45% 32% at 100% 0%, rgba(34, 211, 238, 0.08), transparent 60%);
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color-scheme: dark;
}

a { color: var(--accent-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: #c7d2fe; }
h1, h2, h3, h4 { margin: 0; color: var(--text); letter-spacing: -0.025em; }

/* ===== App Layout ===== */
.app-shell { display: flex; min-height: 100vh; }

/* Comfortable Slate Sidebar */
.sidebar {
  width: 248px;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 30;
}

.sidebar-brand {
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  border-bottom: 1px solid var(--border);
}

.brand-logo-img {
  height: 30px;
  width: auto;
  display: block;
  object-fit: contain;
}

.sidebar-brand span { font-size: 11.5px; color: var(--text-muted); font-weight: 500; }

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

.nav-section {
  padding: 14px 10px 6px;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7c8aa5;
  font-weight: 700;
}
.nav-section:first-child { padding-top: 2px; }

.nav-list { list-style: none; margin: 0; padding: 0; }

.nav-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 13.5px;
  margin-bottom: 2px;
  border: 1px solid transparent;
  transition: all var(--transition);
  cursor: pointer;
}

.nav-item-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.nav-list a svg { width: 16px; height: 16px; stroke-width: 1.85; color: var(--text-muted); flex-shrink: 0; transition: color var(--transition); }

.nav-list a:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }
.nav-list a:hover svg { color: var(--text); }

.nav-list a.active {
  background: rgba(255, 255, 255, 0.065);
  border-color: rgba(255, 255, 255, 0.09);
  color: #fff;
  font-weight: 600;
  box-shadow: var(--specular);
}
.nav-list a.active svg { color: var(--accent-light); }

.nav-badge {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 99px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.nav-badge.danger { background: var(--rose-soft); color: var(--rose); border: 1px solid var(--rose-border); }
.nav-badge.warning { background: var(--amber-soft); color: var(--amber); border: 1px solid var(--amber-border); }
.nav-badge.info { background: var(--accent-soft); color: var(--accent-light); }

.sidebar-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.015);
}

.user-pill { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.user-info { display: flex; align-items: center; gap: 9px; min-width: 0; }

/* Luminous Avatars */
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  font-weight: 700;
  font-size: 11.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.avatar-sm { width: 28px; height: 28px; font-size: 10.5px; border-radius: 8px; }
.avatar-lg { width: 46px; height: 46px; font-size: 16px; border-radius: 12px; }
.av-0 { background: linear-gradient(135deg, #4f46e5, #6366f1); }
.av-1 { background: linear-gradient(135deg, #0891b2, #06b6d4); }
.av-2 { background: linear-gradient(135deg, #7c3aed, #c026d3); }
.av-3 { background: linear-gradient(135deg, #059669, #10b981); }
.av-4 { background: linear-gradient(135deg, #d97706, #f59e0b); }
.av-5 { background: linear-gradient(135deg, #2563eb, #38bdf8); }

/* ===== Main Workspace & Frosted Topbar ===== */
.main-area { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(24, 29, 41, 0.86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.topbar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.content {
  padding: 28px 32px 60px;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

/* ===== Pulsing Live Dot ===== */
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
  display: inline-block;
  flex-shrink: 0;
  animation: pulseGlow 2.2s ease-in-out infinite;
}
.pulse-dot.amber { background: var(--amber); box-shadow: 0 0 10px var(--amber); }
.pulse-dot.cyan { background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.pulse-dot.muted { background: var(--text-muted); box-shadow: none; animation: none; }

@keyframes pulseGlow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.88); }
}

/* ===== Command Spotlight Strip (Linear/Vercel style, no cheesy blue block) ===== */
.spotlight-bar {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.18) 0%, rgba(35, 43, 61, 0.96) 55%, rgba(56, 189, 248, 0.12) 100%);
  border: 1px solid rgba(96, 165, 250, 0.32);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  margin-bottom: 22px;
  box-shadow: var(--specular), 0 10px 30px rgba(0, 0, 0, 0.22);
  position: relative;
  overflow: hidden;
}

/* ===== Cards (Soft Elevated Slate Surfaces) ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--specular), 0 4px 18px rgba(0, 0, 0, 0.16);
  padding: 22px 24px;
  margin-bottom: 20px;
}
.card-compact { padding: 14px 18px; }

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 9px;
}
.card-subtitle { font-size: 12.8px; color: var(--text-muted); margin-top: 3px; }

/* ===== Grids ===== */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }

/* ===== Bento KPI Stat Cards ===== */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--specular), 0 3px 12px rgba(0, 0, 0, 0.14);
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}
.stat-card:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
  transform: translateY(-1px);
}
.stat-top { display: flex; align-items: center; justify-content: space-between; }

.stat-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent-light);
  border: 1px solid var(--accent-border);
}
.stat-icon.info { background: var(--cyan-soft); color: var(--cyan); border-color: var(--cyan-border); }
.stat-icon.warning { background: var(--amber-soft); color: var(--amber); border-color: var(--amber-border); }
.stat-icon.success { background: var(--emerald-soft); color: var(--emerald); border-color: var(--emerald-border); }
.stat-icon svg { width: 17px; height: 17px; }

.stat-label { font-size: 12.5px; color: var(--text-secondary); font-weight: 500; }
.stat-value {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  color: #fff;
}
.stat-sub { font-size: 12px; color: var(--text-muted); }

/* ===== Buttons (Vercel / Linear Crisp Controls) ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-weight: 500;
  font-size: 13px;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: var(--specular);
  transition: all var(--transition);
  white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.btn:hover { background: rgba(255, 255, 255, 0.09); border-color: rgba(255, 255, 255, 0.22); color: #fff; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.35); }

.btn-primary {
  background: linear-gradient(180deg, #6366f1 0%, #4f46e5 100%);
  color: #fff;
  border: 1px solid rgba(165, 180, 252, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 4px 16px rgba(99, 102, 241, 0.32);
  font-weight: 600;
}
.btn-primary:hover {
  background: linear-gradient(180deg, #818cf8 0%, #6366f1 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 6px 22px rgba(99, 102, 241, 0.42);
  color: #fff;
}

.btn-white {
  background: #fafafa;
  color: #09090b;
  border: 1px solid #fff;
  font-weight: 600;
}
.btn-white:hover { background: #e4e4e7; color: #09090b; }

.btn-success {
  background: rgba(16, 185, 129, 0.16);
  color: var(--emerald);
  border: 1px solid var(--emerald-border);
  font-weight: 600;
}
.btn-success:hover { background: rgba(16, 185, 129, 0.26); color: #6ee7b7; }

.btn-warning {
  background: var(--amber-soft);
  color: var(--amber);
  border: 1px solid var(--amber-border);
}
.btn-warning:hover { background: rgba(251, 191, 36, 0.2); }

.btn-danger {
  background: linear-gradient(180deg, #e11d48 0%, #be123c 100%);
  color: #fff;
  border: 1px solid rgba(253, 164, 175, 0.35);
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.3);
  font-weight: 600;
}
.btn-danger:hover { filter: brightness(1.08); color: #fff; }

.btn-danger-soft { background: var(--rose-soft); color: var(--rose); border-color: var(--rose-border); }
.btn-danger-soft:hover { background: rgba(251, 113, 133, 0.2); color: #fda4af; }

.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-secondary); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.06); border-color: transparent; color: #fff; }

.btn-sm { padding: 6px 11px; font-size: 12.5px; }
.btn-xs { padding: 4px 8px; font-size: 12px; }

/* ===== Luminous Status Pills ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
}
.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
}
.badge-plain::before { display: none; }
.badge-success { background: var(--emerald-soft); color: var(--emerald); border: 1px solid var(--emerald-border); }
.badge-warning { background: var(--amber-soft); color: var(--amber); border: 1px solid var(--amber-border); }
.badge-danger { background: var(--rose-soft); color: var(--rose); border: 1px solid var(--rose-border); }
.badge-info { background: var(--cyan-soft); color: var(--cyan); border: 1px solid var(--cyan-border); }
.badge-primary { background: var(--accent-soft); color: var(--accent-light); border: 1px solid var(--accent-border); }
.badge-violet { background: var(--violet-soft); color: var(--violet); border: 1px solid var(--violet-border); }
.badge-muted { background: rgba(255, 255, 255, 0.05); color: var(--text-secondary); border: 1px solid var(--border); }

/* ===== Raycast / Vercel Segmented Tabs ===== */
.tabs-bar {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 4px;
  margin-bottom: 22px;
  max-width: 100%;
  overflow-x: auto;
}
.tab-btn {
  padding: 8px 15px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition);
  white-space: nowrap;
}
.tab-btn:hover { color: #fff; }
.tab-btn.active {
  background: var(--surface-2);
  border-color: var(--border-strong);
  color: #fff;
  font-weight: 600;
  box-shadow: var(--specular), 0 2px 8px rgba(0, 0, 0, 0.2);
}
.tab-count {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.tab-btn.active .tab-count { background: var(--accent-soft); color: var(--accent-light); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ===== Spacious, Recessed Dark Form Controls ===== */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 7px;
  color: #e4e4e7;
}
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

input[type="text"],
input[type="url"],
input[type="email"],
input[type="password"],
input[type="number"],
select {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 14.5px;
  background: var(--input-bg);
  color: #fff;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

textarea {
  width: 100%;
  min-height: 150px;
  padding: 13px 15px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 14.5px;
  line-height: 1.65;
  background: var(--input-bg);
  color: #fff;
  resize: vertical;
  transition: border-color var(--transition), box-shadow var(--transition);
}
textarea.textarea-lg { min-height: 220px; }
textarea.textarea-sm { min-height: 96px; }

input::placeholder, textarea::placeholder { color: #52525b; }
input:hover, select:hover, textarea:hover { border-color: rgba(255, 255, 255, 0.24); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-light);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.22);
  background: #0d0d13;
}
input[readonly] { background: rgba(255, 255, 255, 0.03); color: var(--text-secondary); }
select option { background: #121217; color: #fff; }

/* Dark Toggle Switch */
.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}
.checkbox-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 42px;
  height: 24px;
  min-height: 24px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 99px;
  position: relative;
  cursor: pointer;
  border: 1px solid var(--border-strong);
  padding: 0;
  flex-shrink: 0;
  transition: background var(--transition), border-color var(--transition);
}
.checkbox-row input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 99px;
  background: #e4e4e7;
  transition: transform var(--transition), background var(--transition);
}
.checkbox-row input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent-light);
}
.checkbox-row input[type="checkbox"]:checked::after { transform: translateX(18px); background: #fff; }

.dropzone {
  border: 1.5px dashed rgba(129, 140, 248, 0.35);
  border-radius: var(--radius);
  padding: 28px 20px;
  background: rgba(99, 102, 241, 0.05);
  text-align: center;
  transition: border-color var(--transition), background var(--transition);
}
.dropzone:hover { border-color: var(--accent-light); background: rgba(99, 102, 241, 0.09); }

.chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 99px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
.chip:hover {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: #fff;
}

/* ===== Sleek Borderless-Feel Dark Tables ===== */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(23, 29, 43, 0.55);
}
table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 12px 15px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}
th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
  font-weight: 600;
  white-space: nowrap;
}
tbody tr { transition: background var(--transition); }
tbody tr:hover { background: rgba(255, 255, 255, 0.035); }
tbody tr:last-child td { border-bottom: none; }

.kv-table th {
  background: transparent;
  text-transform: none;
  letter-spacing: 0;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  width: 34%;
  padding: 10px 12px 10px 0;
}
.kv-table td { padding: 10px 0; font-size: 14px; color: var(--text); }
.kv-table tr:hover { background: transparent; }

/* ===== Alerts ===== */
.alert {
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  font-size: 13.5px;
  font-weight: 500;
  border: 1px solid transparent;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.alert-success { background: var(--emerald-soft); color: #6ee7b7; border-color: var(--emerald-border); }
.alert-warning { background: var(--amber-soft); color: #fde68a; border-color: var(--amber-border); }
.alert-error, .alert-danger { background: var(--rose-soft); color: #fda4af; border-color: var(--rose-border); }
.alert-info { background: var(--cyan-soft); color: #67e8f9; border-color: var(--cyan-border); }

/* ===== Linear-Grade Dark Kanban (Entire Card Clickable) ===== */
.kanban-board {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 2px 18px;
  align-items: flex-start;
}
.kanban-col {
  min-width: 282px;
  max-width: 296px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  flex-shrink: 0;
}
.kanban-col-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 12px;
  padding: 2px 4px;
}
.stage-dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  display: inline-block;
  margin-right: 7px;
  background: #71717a;
}
.stage-new .stage-dot { background: #60a5fa; box-shadow: 0 0 8px #60a5fa; }
.stage-profile_scraped .stage-dot { background: #22d3ee; box-shadow: 0 0 8px #22d3ee; }
.stage-connect_sent .stage-dot { background: #818cf8; box-shadow: 0 0 8px #818cf8; }
.stage-connected .stage-dot { background: #a78bfa; box-shadow: 0 0 8px #a78bfa; }
.stage-in_conversation .stage-dot { background: #f472b6; box-shadow: 0 0 8px #f472b6; }
.stage-interested .stage-dot { background: #34d399; box-shadow: 0 0 8px #34d399; }
.stage-meeting_booked .stage-dot { background: #10b981; box-shadow: 0 0 10px #10b981; }
.stage-not_now .stage-dot { background: #fbbf24; box-shadow: 0 0 8px #fbbf24; }
.stage-refused .stage-dot { background: #fb7185; box-shadow: 0 0 8px #fb7185; }

a.kanban-card {
  display: block;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 14px;
  margin-bottom: 9px;
  color: var(--text);
  box-shadow: var(--specular);
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), background var(--transition), box-shadow var(--transition);
}
a.kanban-card:hover {
  transform: translateY(-2px);
  background: var(--surface-hover);
  border-color: var(--accent-border);
  box-shadow: var(--specular), 0 8px 22px rgba(0, 0, 0, 0.45);
  color: #fff;
}
.kanban-card-title { font-weight: 600; font-size: 13.8px; color: #fff; display: flex; align-items: center; gap: 9px; }
.kanban-card-sub { font-size: 12.5px; color: var(--text-secondary); margin-top: 6px; line-height: 1.45; }
.kanban-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
  font-size: 11.5px;
  color: var(--text-muted);
}

/* ===== noVNC Frame ===== */
.novnc-wrap {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
}
.novnc-frame { width: 100%; height: 680px; border: none; display: block; }

/* ===== Inbox ===== */
.inbox-layout { display: grid; grid-template-columns: 330px 1fr; gap: 18px; min-height: 600px; }
.inbox-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-y: auto;
  max-height: 740px;
}
.inbox-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text);
  transition: background var(--transition);
  cursor: pointer;
}
.inbox-item:hover { background: rgba(255, 255, 255, 0.035); }
.inbox-item.active { background: var(--accent-soft); border-left: 3px solid var(--accent-light); }

.msg-bubble {
  padding: 13px 16px;
  border-radius: 14px;
  margin-bottom: 12px;
  max-width: 78%;
  white-space: pre-wrap;
  font-size: 13.8px;
  line-height: 1.55;
}
.msg-inbound { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); margin-right: auto; border-bottom-left-radius: 4px; }
.msg-outbound { background: var(--accent-soft); color: #e0e7ff; border: 1px solid var(--accent-border); margin-left: auto; border-bottom-right-radius: 4px; }
.msg-draft { background: var(--amber-soft); color: #fef3c7; border: 1px dashed var(--amber); margin-left: auto; }

/* ===== Proportional Funnel Bars ===== */
.funnel-list { display: flex; flex-direction: column; gap: 10px; }
.funnel-row { display: grid; grid-template-columns: 150px 1fr 48px; align-items: center; gap: 12px; font-size: 13px; }
.funnel-bar-track { height: 8px; background: rgba(255, 255, 255, 0.06); border-radius: 99px; overflow: hidden; }
.funnel-bar-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, #6366f1, #22d3ee); min-width: 4px; }
.funnel-bar-fill.zero { width: 0 !important; min-width: 0; }

/* ===== Auth Pages (Linear-style dark spotlight) ===== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 65% 45% at 50% 0%, rgba(59, 130, 246, 0.25), transparent 70%),
    #181d29;
  padding: 20px;
}
.auth-card {
  width: 100%;
  max-width: 410px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--specular), 0 24px 60px rgba(0, 0, 0, 0.42);
}

/* ===== Utilities ===== */
.mono { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.muted { color: var(--text-muted); }
.flex { display: flex; align-items: center; gap: 10px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.flex-wrap { flex-wrap: wrap; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 18px; }
.mb-0 { margin-bottom: 0; }
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); font-size: 13.5px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .grid-3, .inbox-layout { grid-template-columns: 1fr; }
  .sidebar { width: 215px; }
  .topbar, .content { padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 768px) {
  .app-shell { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; }
  .grid-4 { grid-template-columns: 1fr; }
}
