/* ==========================================================================
   KpelleAI Command Center - Production Stylesheet
   Modern Executive AI Consulting Aesthetic
   ========================================================================== */

:root {
  /* Color Palette - Executive Dark Theme */
  --bg-base: #080c14;
  --bg-surface: #0e1422;
  --bg-surface-elevated: #141c2e;
  --bg-card: rgba(18, 26, 44, 0.7);
  --bg-card-hover: rgba(26, 36, 60, 0.85);
  
  /* Borders & Dividers */
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-medium: rgba(255, 255, 255, 0.12);
  --border-focus: rgba(99, 102, 241, 0.5);

  /* Brand Accents */
  --primary: #6366f1;
  --primary-light: #818cf8;
  --primary-glow: rgba(99, 102, 241, 0.25);
  --violet: #8b5cf6;
  --cyan: #06b6d4;
  --cyan-glow: rgba(6, 182, 212, 0.2);
  --emerald: #10b981;
  --amber: #f59e0b;
  --rose: #f43f5e;

  /* Typography Colors */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-dark: #0f172a;

  /* Fonts */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Shadows & Depth */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 24px var(--primary-glow);

  /* Layout */
  --sidebar-width: 260px;
  --header-height: 80px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

/* Layout Shell */
.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  background: radial-gradient(circle at 80% 10%, rgba(99, 102, 241, 0.08), transparent 45%),
              radial-gradient(circle at 10% 80%, rgba(6, 182, 212, 0.05), transparent 40%),
              var(--bg-base);
  overflow: hidden;
}

/* Sidebar Styles */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 20;
}

.brand-container {
  height: var(--header-height);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
}

.brand-logo {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  border: 1px solid rgba(129, 140, 248, 0.3);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.3);
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 40%, #c7d2fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tag {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--primary-light);
  text-transform: uppercase;
}

.nav-menu {
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex-grow: 1;
}

.nav-section-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0 0.75rem 0.5rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.18), rgba(99, 102, 241, 0.06));
  color: #ffffff;
  font-weight: 600;
  border-left: 3px solid var(--primary-light);
}

.nav-icon {
  flex-shrink: 0;
  opacity: 0.75;
  transition: var(--transition);
}

.nav-item.active .nav-icon {
  opacity: 1;
  stroke: var(--primary-light);
}

.nav-item:hover .nav-icon {
  opacity: 1;
}

.nav-label {
  flex-grow: 1;
}

.nav-badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.sidebar-footer {
  padding: 1.25rem;
  border-top: 1px solid var(--border-subtle);
  background: rgba(8, 12, 20, 0.5);
}

.system-status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  background: rgba(14, 20, 34, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
  animation: pulse 2s infinite ease-in-out;
  flex-shrink: 0;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.9); }
}

.status-meta {
  display: flex;
  flex-direction: column;
}

.status-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
}

.status-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* Main Content Area */
.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* Top Header */
.top-header {
  height: var(--header-height);
  padding: 0 2.25rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(14, 20, 34, 0.5);
  backdrop-filter: blur(12px);
  z-index: 10;
  flex-shrink: 0;
}

.header-titles {
  display: flex;
  flex-direction: column;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 0.15rem;
}

.breadcrumb-root {
  color: var(--primary-light);
  font-weight: 600;
}

.page-title {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
  line-height: 1.2;
}

.page-subtitle {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.period-pill {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  padding: 0.55rem 1rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.calendar-icon {
  stroke: var(--primary-light);
}

.period-text {
  display: flex;
  flex-direction: column;
}

.period-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.period-value {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.active-badge {
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(99, 102, 241, 0.2);
  color: var(--primary-light);
  border: 1px solid rgba(99, 102, 241, 0.35);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  letter-spacing: 0.03em;
}

/* Scrollable Canvas */
.dashboard-scroll-area {
  flex-grow: 1;
  overflow-y: auto;
  padding: 2rem 2.25rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Custom Scrollbar */
.dashboard-scroll-area::-webkit-scrollbar {
  width: 8px;
}
.dashboard-scroll-area::-webkit-scrollbar-track {
  background: transparent;
}
.dashboard-scroll-area::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
.dashboard-scroll-area::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Section Common Header */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.icon-bubble {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.revenue-icon {
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary-light);
  border: 1px solid rgba(99, 102, 241, 0.25);
}

.pipeline-icon {
  background: rgba(6, 182, 212, 0.15);
  color: var(--cyan);
  border: 1px solid rgba(6, 182, 212, 0.25);
}

.action-icon {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.section-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.pacing-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
}

.pacing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
}

/* ==========================================================================
   Revenue Goal Section
   ========================================================================== */
.revenue-section {
  background: linear-gradient(180deg, rgba(20, 28, 48, 0.6) 0%, rgba(14, 20, 34, 0.8) 100%);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.revenue-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--primary) 30%, var(--violet) 70%, transparent 100%);
  opacity: 0.8;
}

.revenue-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.revenue-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  position: relative;
  transition: var(--transition);
}

.revenue-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
  transform: translateY(-2px);
}

.card-kicker {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.card-amount {
  font-size: 2rem;
  font-weight: 800;
  font-family: var(--font-mono);
  letter-spacing: -0.03em;
  color: #ffffff;
  line-height: 1.15;
}

.card-amount.highlight {
  color: var(--primary-light);
  text-shadow: 0 0 20px rgba(99, 102, 241, 0.35);
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

.meta-highlight {
  font-weight: 600;
  color: var(--primary-light);
}

.meta-tag {
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
}

.meta-tag.zero {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.meta-alert {
  font-weight: 600;
  color: var(--amber);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
}

.meta-note {
  color: var(--text-muted);
}

/* Progress Bar */
.progress-container {
  background: rgba(8, 12, 20, 0.45);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
}

.progress-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.progress-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.progress-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.progress-fraction {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.progress-pct {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary-light);
}

.progress-track {
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-subtle);
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
  border-radius: 999px;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.progress-glow {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 20px;
  background: #ffffff;
  opacity: 0.4;
  filter: blur(4px);
}

.progress-milestones {
  display: flex;
  justify-content: space-between;
  margin-top: 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.milestone.current {
  color: var(--primary-light);
  font-weight: 600;
}

.milestone.goal {
  color: var(--emerald);
  font-weight: 600;
}

/* ==========================================================================
   Dashboard Grid (Pipeline + Priority Actions)
   ========================================================================== */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.75rem;
  flex-shrink: 0;
}

/* Pipeline Section */
.pipeline-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
}

.stage-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  flex-grow: 1;
}

.metric-tile {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
}

.metric-tile:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
  transform: translateY(-2px);
}

.metric-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.metric-stage-pill {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.tile-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-cyan { background: rgba(6, 182, 212, 0.12); color: var(--cyan); border: 1px solid rgba(6, 182, 212, 0.2); }
.icon-indigo { background: rgba(99, 102, 241, 0.12); color: var(--primary-light); border: 1px solid rgba(99, 102, 241, 0.2); }
.icon-violet { background: rgba(139, 92, 246, 0.12); color: var(--violet); border: 1px solid rgba(139, 92, 246, 0.2); }
.icon-amber { background: rgba(245, 158, 11, 0.12); color: var(--amber); border: 1px solid rgba(245, 158, 11, 0.2); }
.icon-emerald { background: rgba(16, 185, 129, 0.12); color: var(--emerald); border: 1px solid rgba(16, 185, 129, 0.2); }
.icon-rose { background: rgba(244, 63, 94, 0.12); color: var(--rose); border: 1px solid rgba(244, 63, 94, 0.2); }

.metric-value-wrap {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  margin-bottom: 0.35rem;
}

.metric-number {
  font-size: 1.85rem;
  font-weight: 800;
  font-family: var(--font-mono);
  letter-spacing: -0.03em;
  color: #ffffff;
  line-height: 1.1;
}

.metric-trend {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
}

.metric-trend.up {
  background: rgba(6, 182, 212, 0.15);
  color: var(--cyan);
}

.metric-trend.active {
  background: rgba(139, 92, 246, 0.15);
  color: var(--violet);
}

.metric-trend.val {
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber);
  font-family: var(--font-mono);
}

.metric-trend.neutral {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

.metric-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.metric-subtext {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

/* ==========================================================================
   Today's Priority Actions Section
   ========================================================================== */
.priority-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
}

.action-status-pill {
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(99, 102, 241, 0.12);
  color: var(--primary-light);
  border: 1px solid rgba(99, 102, 241, 0.25);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-family: var(--font-mono);
}

.actions-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  flex-grow: 1;
}

.action-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1rem 1.15rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: var(--transition);
  cursor: pointer;
  user-select: none;
}

.action-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
  transform: translateX(3px);
}

.action-card.completed {
  background: rgba(14, 20, 34, 0.4);
  border-color: rgba(16, 185, 129, 0.2);
  opacity: 0.75;
}

.action-checkbox-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  margin-top: 0.15rem;
}

.action-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.custom-checkbox {
  width: 22px;
  height: 22px;
  border: 2px solid var(--border-medium);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  background: var(--bg-surface-elevated);
}

.custom-checkbox svg {
  opacity: 0;
  transform: scale(0.6);
  transition: var(--transition);
  stroke: #ffffff;
}

.action-checkbox:checked + .custom-checkbox {
  background: var(--emerald);
  border-color: var(--emerald);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.action-checkbox:checked + .custom-checkbox svg {
  opacity: 1;
  transform: scale(1);
}

.action-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.action-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.action-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  transition: var(--transition);
}

.action-card.completed .action-title {
  text-decoration: line-through;
  color: var(--text-muted);
}

.badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.badge-high {
  background: rgba(244, 63, 94, 0.15);
  color: var(--rose);
  border: 1px solid rgba(244, 63, 94, 0.25);
}

.badge-indigo {
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary-light);
  border: 1px solid rgba(99, 102, 241, 0.25);
}

.badge-amber {
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge-emerald {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.action-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.action-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.25rem;
}

.meta-tag-mini {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--primary-light);
  background: rgba(99, 102, 241, 0.1);
  padding: 0.08rem 0.4rem;
  border-radius: 4px;
}

.meta-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.priority-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.footer-tip {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.btn-reset {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.btn-reset:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: var(--border-medium);
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 1200px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .revenue-cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .app-container {
    flex-direction: column;
    overflow-y: auto;
  }

  .sidebar {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }

  .nav-menu {
    flex-direction: row;
    flex-wrap: wrap;
    padding: 0.75rem 1.25rem;
  }

  .nav-section-title {
    display: none;
  }

  .sidebar-footer {
    display: none;
  }

  .main-content {
    overflow: visible;
  }

  .dashboard-scroll-area {
    overflow: visible;
    padding: 1.5rem 1.25rem;
  }

  .top-header {
    padding: 0 1.25rem;
    height: auto;
    padding-top: 1rem;
    padding-bottom: 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .revenue-cards-grid {
    grid-template-columns: 1fr;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================================
   Phase 2: Opportunity Finder & Multi-View Navigation
   ========================================================================== */

/* Multi-view Switching */
.app-view {
  display: none;
  flex-direction: column;
  flex-grow: 1;
  height: 100%;
  overflow: hidden;
}

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

.nav-badge.active-tag {
  background: rgba(99, 102, 241, 0.2);
  color: var(--primary-light);
  border: 1px solid rgba(99, 102, 241, 0.35);
}

/* Header Stats Chips */
.finder-header-stats {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.stat-chip {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.stat-chip-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.stat-chip-val {
  font-size: 1.05rem;
  font-family: var(--font-mono);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
}

.stat-chip.highlight-chip {
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(99, 102, 241, 0.12);
}

.stat-chip.highlight-chip .stat-chip-val {
  color: var(--primary-light);
}

.stat-chip.approved-chip {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.12);
}

.stat-chip.approved-chip .stat-chip-val {
  color: var(--emerald);
}

/* Search Controls Section */
.search-controls-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 1.5rem 1.75rem;
  flex-shrink: 0;
  box-shadow: var(--shadow-md);
}

.search-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.search-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.finder-icon {
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary-light);
  border: 1px solid rgba(99, 102, 241, 0.25);
}

.section-title-sm {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.section-desc-sm {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.gatekeeper-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--amber);
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
}

.search-form-grid {
  display: grid;
  grid-template-columns: 2fr 1.25fr 1fr 0.75fr auto;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group-sm {
  max-width: 110px;
}

.form-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.form-select,
.form-input {
  width: 100%;
  height: 42px;
  background: #070b13;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  padding: 0 0.85rem;
  outline: none;
  transition: var(--transition);
}

.form-select:focus,
.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.btn-primary-glow {
  height: 42px;
  padding: 0 1.25rem;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  border: 1px solid rgba(129, 140, 248, 0.4);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 0 18px rgba(99, 102, 241, 0.3);
}

.btn-primary-glow:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 24px rgba(99, 102, 241, 0.5);
  filter: brightness(1.1);
}

.spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.btn-primary-glow.loading .spinner {
  display: inline-block;
}

.btn-primary-glow.loading .search-icon {
  display: none;
}

.btn-secondary-glow {
  height: 42px;
  padding: 0 1.15rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary-glow:hover {
  background: rgba(99, 102, 241, 0.12);
  border-color: var(--primary-light);
  color: #ffffff;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.25);
}

.btn-reset-data {
  color: var(--text-muted);
  font-size: 0.78rem;
  padding: 0 0.85rem;
}

.search-controls-section.drag-over {
  border-color: var(--primary) !important;
  background: rgba(99, 102, 241, 0.08) !important;
  box-shadow: 0 0 30px var(--primary-glow) !important;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.filter-pills-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.filter-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-right: 0.25rem;
}

.filter-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition);
}

.filter-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: var(--border-medium);
}

.filter-pill.active {
  background: rgba(99, 102, 241, 0.18);
  border-color: var(--primary-light);
  color: #ffffff;
  font-weight: 700;
}

/* Lead Results Table Section */
.leads-table-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  flex-shrink: 0;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  margin-bottom: 2rem;
}

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

.table-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.results-badge {
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
}

.table-instruction {
  font-size: 0.75rem;
  color: var(--primary-light);
  font-weight: 600;
}

.table-responsive-wrapper {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-base);
}

.leads-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.82rem;
  white-space: nowrap;
}

.leads-table th {
  background: rgba(14, 20, 34, 0.95);
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-medium);
}

.leads-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: var(--transition);
}

.leads-table tbody tr {
  cursor: pointer;
  transition: var(--transition);
}

.leads-table tbody tr:hover {
  background: rgba(99, 102, 241, 0.06);
}

.leads-table tbody tr.active-selected {
  background: rgba(99, 102, 241, 0.14);
}

.th-sticky,
.td-sticky {
  position: sticky;
  left: 0;
  background: #0e1422;
  z-index: 3;
  border-right: 1px solid var(--border-medium);
  box-shadow: 4px 0 10px rgba(0, 0, 0, 0.4);
}

.leads-table th.th-sticky {
  background: #0e1422;
  z-index: 4;
}

.leads-table tbody tr:hover .td-sticky {
  background: #141c2e;
}

.biz-name-cell {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  color: #ffffff;
  font-size: 0.85rem;
}

.biz-avatar {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: var(--primary-light);
  font-weight: 800;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rating-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: #fbbf24;
}

.table-link {
  color: var(--cyan);
  text-decoration: none;
  font-size: 0.78rem;
}

.table-link:hover {
  text-decoration: underline;
}

.status-tag {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

.status-outdated {
  background: rgba(245, 158, 11, 0.12);
  color: var(--amber);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.status-broken {
  background: rgba(244, 63, 94, 0.12);
  color: var(--rose);
  border: 1px solid rgba(244, 63, 94, 0.25);
}

.status-noportal {
  background: rgba(139, 92, 246, 0.12);
  color: var(--violet);
  border: 1px solid rgba(139, 92, 246, 0.25);
}

.status-modern {
  background: rgba(16, 185, 129, 0.12);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.problem-cell {
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-secondary);
  font-size: 0.78rem;
}

.score-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.8rem;
}

.score-priority {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.score-strong {
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary-light);
  border: 1px solid rgba(99, 102, 241, 0.35);
}

.score-research {
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.score-low {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.badge-priority {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.badge-strong {
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary-light);
  border: 1px solid rgba(99, 102, 241, 0.35);
}

.badge-research {
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.badge-low {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.confidence-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.review-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  display: inline-block;
}

.review-pending {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.review-approved {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.review-research {
  background: rgba(245, 158, 11, 0.18);
  color: var(--amber);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.review-skipped {
  background: rgba(244, 63, 94, 0.15);
  color: var(--rose);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.table-footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.table-footer-info strong {
  color: var(--text-secondary);
}

.table-footer-rules {
  color: var(--amber);
}

/* ==========================================================================
   Slide-Over Scoring Drawer
   ========================================================================== */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 13, 0.75);
  backdrop-filter: blur(4px);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.scoring-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 530px;
  max-width: 90vw;
  background: #0b101c;
  border-left: 1px solid var(--border-medium);
  z-index: 100;
  box-shadow: -12px 0 36px rgba(0, 0, 0, 0.6);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.scoring-drawer.open {
  transform: translateX(0);
}

.drawer-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.drawer-header {
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  background: rgba(14, 20, 34, 0.7);
  flex-shrink: 0;
}

.drawer-kicker {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--primary-light);
  margin-bottom: 0.2rem;
}

.drawer-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.drawer-meta-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 0.3rem;
}

.drawer-website-link {
  color: var(--cyan);
  text-decoration: none;
}

.drawer-website-link:hover {
  text-decoration: underline;
}

.btn-close-drawer {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  line-height: 1;
}

.btn-close-drawer:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.drawer-body {
  flex-grow: 1;
  overflow-y: auto;
  padding: 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.drawer-body::-webkit-scrollbar {
  width: 6px;
}
.drawer-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.drawer-score-hero {
  background: rgba(14, 20, 34, 0.85);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.score-circle-ring {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #1e1b4b, #0f172a);
  border: 3px solid var(--primary-light);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.score-circle-val {
  font-size: 1.5rem;
  font-family: var(--font-mono);
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
}

.score-circle-max {
  font-size: 0.65rem;
  color: var(--primary-light);
  font-weight: 600;
}

.score-hero-details {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.hero-classification-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.badge-lg {
  font-size: 0.78rem;
  padding: 0.2rem 0.7rem;
}

.drawer-confidence-tag {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.gatekeeper-status-box {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.gatekeeper-status-box.triggered {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.35);
}

.gk-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--emerald);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.7rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.gatekeeper-status-box.triggered .gk-icon {
  background: var(--amber);
  color: #000;
}

.gk-text-wrap {
  display: flex;
  flex-direction: column;
}

.gk-title {
  font-size: 0.78rem;
  color: #ffffff;
}

.gatekeeper-status-box.triggered .gk-title {
  color: var(--amber);
}

.gk-desc {
  font-size: 0.7rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

/* Scoring Matrix List */
.drawer-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.drawer-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.drawer-h3 {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
}

.rubric-hint {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.scoring-matrix-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.score-item {
  background: rgba(14, 20, 34, 0.55);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.score-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.score-item-label {
  display: flex;
  align-items: center;
}

.score-item-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
}

.score-gatekeeper-badge {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--amber);
  background: rgba(245, 158, 11, 0.12);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  margin-left: 0.4rem;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.score-item-points {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.score-item-points strong {
  color: #ffffff;
}

.score-bar-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.5s ease;
}

.fill-indigo { background: linear-gradient(90deg, #6366f1, #818cf8); }
.fill-cyan { background: linear-gradient(90deg, #06b6d4, #22d3ee); }
.fill-violet { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.fill-purple { background: linear-gradient(90deg, #c084fc, #e879f9); }
.fill-emerald { background: linear-gradient(90deg, #10b981, #34d399); }
.fill-amber { background: linear-gradient(90deg, #f59e0b, #fbbf24); }

.score-item-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* Qualitative Evidence Card */
.evidence-card {
  background: rgba(8, 12, 20, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
}

.evidence-quote-mark {
  font-size: 1.8rem;
  line-height: 1;
  color: var(--primary-light);
  opacity: 0.4;
  margin-bottom: -0.5rem;
}

.evidence-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.45;
  font-style: italic;
}

.evidence-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.7rem;
}

.evidence-source-tag {
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.06em;
}

.evidence-link {
  color: var(--cyan);
  text-decoration: none;
  font-weight: 600;
}

.evidence-link:hover {
  text-decoration: underline;
}

/* Solution Box */
.solution-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--violet);
  background: rgba(139, 92, 246, 0.12);
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(139, 92, 246, 0.25);
}

.solution-box {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.05));
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  gap: 0.85rem;
}

.solution-icon-col {
  color: var(--primary-light);
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.solution-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.25rem;
}

.solution-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Drawer Footer */
.drawer-footer {
  padding: 1.25rem 1.75rem;
  border-top: 1px solid var(--border-subtle);
  background: rgba(14, 20, 34, 0.95);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.review-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.review-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.review-btn-group {
  display: grid;
  grid-template-columns: 1fr 1fr 0.8fr;
  gap: 0.65rem;
}

.btn-review {
  height: 38px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

.btn-approve {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.35);
}

.btn-approve:hover,
.btn-approve.active {
  background: #10b981;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.4);
}

.btn-research {
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber);
  border-color: rgba(245, 158, 11, 0.35);
}

.btn-research:hover,
.btn-research.active {
  background: #f59e0b;
  color: #000000;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.4);
}

.btn-skip {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border-color: var(--border-subtle);
}

.btn-skip:hover,
.btn-skip.active {
  background: rgba(244, 63, 94, 0.2);
  color: var(--rose);
  border-color: rgba(244, 63, 94, 0.4);
}

.ghl-action-wrap {
  width: 100%;
}

.btn-ghl {
  width: 100%;
  height: 48px;
  background: linear-gradient(135deg, #4338ca 0%, #6366f1 50%, #8b5cf6 100%);
  border: 1px solid rgba(165, 180, 252, 0.4);
  border-radius: var(--radius-md);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.btn-ghl:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 0 28px rgba(139, 92, 246, 0.5);
  filter: brightness(1.1);
}

.btn-ghl:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  filter: grayscale(0.6);
}

.ghl-icon-bubble {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ghl-text-col {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.ghl-btn-title {
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.ghl-btn-sub {
  font-size: 0.65rem;
  opacity: 0.85;
}

/* ==========================================================================
   Phase 3: Star Team Sales Pipeline & CRM Styles
   ========================================================================== */

/* Header KPI Strip */
.header-stat-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 100px;
}

.chip-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.chip-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
}

.highlight-chip {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.06);
}

.highlight-won {
  color: #10b981;
}

/* Pipeline Controls Section */
.pipeline-controls-section {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pipeline-controls-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.pipeline-view-tabs {
  display: flex;
  gap: 0.35rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.pipeline-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.pipeline-tab:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}

.pipeline-tab.active {
  color: #ffffff;
  background: rgba(99, 102, 241, 0.25);
  border-color: rgba(129, 140, 248, 0.4);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

.tab-count-badge {
  background: rgba(255, 255, 255, 0.12);
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 0.68rem;
  font-weight: 700;
}

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

.pipeline-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.pipeline-search-field {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: #ffffff;
  padding: 7px 12px;
  font-size: 0.8rem;
  width: 320px;
}

.pipeline-search-field:focus {
  outline: none;
  border-color: var(--indigo-light);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.25);
}

.pipeline-quick-filters {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.quick-filter-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
}

/* Kanban Board Layout */
.pipeline-kanban-section {
  overflow-x: auto;
  padding-bottom: 1.25rem;
}

.kanban-columns-container {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  min-width: fit-content;
}

.kanban-columns-container.hidden-group {
  display: none !important;
}

.kanban-col {
  width: 290px;
  min-width: 290px;
  background: rgba(13, 20, 36, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 270px);
  backdrop-filter: blur(12px);
  transition: var(--transition);
}

.kanban-col.col-line-one {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.03);
}

.kanban-col.col-active-client {
  border-color: rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.03);
}

.kanban-col.col-archive {
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(10, 15, 29, 0.6);
}

.kanban-col-header {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.kanban-col-kicker {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.kanban-col-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
  margin-top: 2px;
}

.kanban-col-badge {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.highlight-kicker {
  color: #34d399 !important;
}

.highlight-title {
  color: #10b981 !important;
}

.highlight-badge {
  background: rgba(16, 185, 129, 0.2) !important;
  color: #34d399 !important;
  border-color: rgba(16, 185, 129, 0.4) !important;
}

.kanban-col-meta {
  padding: 6px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.agent-tag {
  font-size: 0.65rem;
  color: var(--indigo-light);
  font-weight: 600;
}

.agent-tag-won {
  color: #34d399 !important;
}

.col-sum-val {
  font-weight: 700;
  color: #ffffff;
}

.highlight-val {
  color: #10b981 !important;
}

.kanban-cards-list {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  min-height: 120px;
}

/* Deal Card Styles */
.deal-card {
  background: rgba(22, 31, 54, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.deal-card:hover {
  transform: translateY(-2px);
  border-color: rgba(129, 140, 248, 0.4);
  box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.5);
  background: rgba(26, 38, 66, 0.95);
}

.deal-card.active-selected {
  border-color: var(--cyan);
  box-shadow: 0 0 14px rgba(6, 182, 212, 0.35);
}

.deal-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.deal-company-col {
  flex: 1;
  min-width: 0;
}

.deal-kicker {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.deal-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.deal-location {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.deal-score-pill {
  padding: 2px 7px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
}

.deal-card-mid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.deal-val-pill {
  font-size: 0.78rem;
  font-weight: 800;
  color: #34d399;
  background: rgba(16, 185, 129, 0.12);
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.deal-ghl-pill {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--cyan);
  background: rgba(6, 182, 212, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(6, 182, 212, 0.25);
}

.deal-activity-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 0.68rem;
}

.activity-tag {
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.68rem;
}

.activity-tag.alert-overdue {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border-color: rgba(244, 63, 94, 0.3);
}

.activity-tag.tag-prototype {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.3);
}

.activity-tag.tag-proposal {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.3);
}

.deal-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.deal-date-label {
  font-size: 0.68rem;
  color: var(--text-secondary);
}

.btn-card-advance {
  padding: 3px 8px;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 5px;
  background: rgba(99, 102, 241, 0.15);
  color: var(--indigo-light);
  border: 1px solid rgba(99, 102, 241, 0.3);
  cursor: pointer;
  transition: var(--transition);
}

.btn-card-advance:hover {
  background: rgba(99, 102, 241, 0.3);
  color: #ffffff;
}

/* ==========================================================================
   Comprehensive Star Team CRM Deal Drawer Styles
   ========================================================================== */
.crm-deal-drawer {
  width: 860px !important;
  max-width: 95vw !important;
}

.crm-drawer-layout {
  display: grid;
  grid-template-columns: 370px 1fr;
  gap: 1.5rem;
  padding: 1.5rem 1.75rem;
  overflow-y: auto;
  flex: 1;
}

.crm-drawer-left-col {
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  padding-right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.crm-drawer-right-col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.crm-section-kicker {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--cyan);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.score-gatekeeper-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.crm-control-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.crm-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #ffffff;
}

.crm-sublabel {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 4px;
}

.crm-select,
.crm-input-sm,
.crm-textarea {
  background: rgba(13, 20, 36, 0.85);
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 0.82rem;
  width: 100%;
}

.crm-select:focus,
.crm-input-sm:focus,
.crm-textarea:focus {
  outline: none;
  border-color: var(--indigo-light);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.25);
}

.crm-readonly {
  opacity: 0.75;
  cursor: not-allowed;
  background: rgba(0, 0, 0, 0.3) !important;
}

.crm-textarea {
  min-height: 55px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.35;
}

.crm-activities-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.crm-activity-panel {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 12px;
}

.activity-panel-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--indigo-light);
  margin-bottom: 8px;
}

.crm-form-row {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}

.crm-form-col {
  flex: 1;
}

.crm-btn-align {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.btn-sm-action {
  padding: 6px 12px;
  font-size: 0.74rem;
  font-weight: 700;
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(129, 140, 248, 0.4);
  color: #c7d2fe;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-sm-action:hover {
  background: rgba(99, 102, 241, 0.35);
  color: #ffffff;
}

.touch-counter-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  padding-bottom: 6px;
}

.crm-line-one-notice {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.notice-icon {
  color: #34d399;
  font-weight: bold;
}

.notice-text {
  font-size: 0.72rem;
  color: #a7f3d0;
  line-height: 1.35;
}

.crm-ghl-status-box {
  background: rgba(6, 182, 212, 0.05);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: 8px;
  padding: 10px 12px;
}

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

.ghl-badge-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--cyan);
}

.ghl-sync-id {
  font-size: 0.74rem;
  font-family: monospace;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
}

.ghl-box-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.btn-resync-ghl {
  background: transparent;
  border: none;
  color: var(--cyan);
  font-size: 0.7rem;
  cursor: pointer;
  text-decoration: underline;
}

.crm-drawer-footer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

@media (max-width: 1024px) {
  .crm-deal-drawer {
    width: 100% !important;
  }
  .crm-drawer-layout {
    grid-template-columns: 1fr;
  }
  .crm-drawer-left-col {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-right: 0;
    padding-bottom: 1.5rem;
  }
}

/* ==========================================================================
   Phase 4: Star Team Agent Coordination & Autonomous Workflows Styling
   ========================================================================== */

/* Command Center: Star Team Live Operations Section */
.star-team-ops-section {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 1.5rem;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
}

.star-team-icon {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
}

.st-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-link-star-team {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #c7d2fe;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.nav-link-star-team:hover {
  background: rgba(99, 102, 241, 0.3);
  color: #ffffff;
  border-color: rgba(129, 140, 248, 0.6);
  transform: translateY(-1px);
}

.st-ops-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.st-ops-card {
  background: rgba(10, 15, 29, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 1.1rem;
}

.st-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.st-card-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.st-card-sub {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.st-card-badge-amber {
  font-size: 0.7rem;
  font-weight: 700;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 2px 8px;
  border-radius: 9999px;
}

/* Fleet Roster Pills (Command Center) */
.st-roster-pills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.st-roster-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 6px 9px;
  font-size: 0.72rem;
  color: #e2e8f0;
  transition: var(--transition);
}

.st-roster-pill:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.st-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.st-status-dot.dot-active {
  background: #34d399;
  box-shadow: 0 0 6px #34d399;
}

.st-status-dot.dot-working {
  background: #60a5fa;
  box-shadow: 0 0 6px #60a5fa;
  animation: pulse-dot 1.8s infinite;
}

.st-status-dot.dot-idle {
  background: #94a3b8;
}

.st-status-dot.dot-blocked {
  background: #f87171;
  box-shadow: 0 0 6px #f87171;
}

.st-roster-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Handoff Stream in Command Center */
.st-handoff-stream {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.st-stream-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 0.72rem;
}

.st-stream-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  margin-top: 5px;
  flex-shrink: 0;
}

.st-stream-body {
  flex: 1;
}

.st-stream-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2px;
}

.st-stream-deal {
  font-weight: 700;
  color: #ffffff;
}

.st-stream-time {
  font-size: 0.65rem;
  color: var(--text-secondary);
}

.st-stream-route {
  color: #cbd5e1;
  line-height: 1.3;
}

.st-stream-route strong {
  color: #93c5fd;
}

/* ==========================================================================
   VIEW 4: Star Team Console Layout
   ========================================================================== */
.st-kpi-strip {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.st-kpi-chip {
  background: rgba(13, 20, 36, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 6px 12px;
  display: flex;
  flex-direction: column;
}

.st-kpi-chip.highlight-amber-chip {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.06);
}

.st-kpi-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.st-kpi-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  font-family: var(--font-mono);
}

.st-kpi-val.highlight-cyan {
  color: var(--cyan);
}

.st-kpi-val.highlight-amber {
  color: #fbbf24;
}

/* Star Team Controls Bar */
.st-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.st-view-tabs {
  display: flex;
  gap: 6px;
  background: rgba(10, 15, 29, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 4px;
  border-radius: 8px;
}

.st-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.st-tab:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}

.st-tab.active {
  background: rgba(99, 102, 241, 0.2);
  color: #ffffff;
  border: 1px solid rgba(129, 140, 248, 0.4);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.25);
}

.st-tab-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 9999px;
}

.st-tab-badge.alert-badge {
  background: rgba(245, 158, 11, 0.25);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.st-tab-content {
  display: none;
}

.st-tab-content.active {
  display: block;
}

/* TAB 1: 12-Agent Roster Grid */
.st-roster-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (max-width: 1200px) {
  .st-roster-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .st-roster-grid {
    grid-template-columns: 1fr;
  }
}

.st-agent-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  transition: var(--transition);
  backdrop-filter: blur(12px);
}

.st-agent-card:hover {
  transform: translateY(-2px);
  border-color: rgba(129, 140, 248, 0.35);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 0 16px rgba(99, 102, 241, 0.2);
}

.st-agent-card.agent-blocked {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.03);
}

.st-card-agent-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.st-agent-avatar {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.avatar-indigo { background: linear-gradient(135deg, #4f46e5, #6366f1); }
.avatar-cyan { background: linear-gradient(135deg, #0891b2, #06b6d4); }
.avatar-violet { background: linear-gradient(135deg, #7c3aed, #8b5cf6); }
.avatar-amber { background: linear-gradient(135deg, #d97706, #f59e0b); }
.avatar-emerald { background: linear-gradient(135deg, #059669, #10b981); }
.avatar-rose { background: linear-gradient(135deg, #e11d48, #f43f5e); }
.avatar-blue { background: linear-gradient(135deg, #2563eb, #3b82f6); }

.st-agent-title-col {
  flex: 1;
}

.st-agent-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 2px 0;
}

.st-agent-role {
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

.st-status-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 9999px;
  flex-shrink: 0;
}

.badge-st-active {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.badge-st-working {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.badge-st-idle {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.badge-st-blocked {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.st-agent-stages-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.st-stage-pill {
  font-size: 0.62rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  padding: 2px 7px;
  border-radius: 4px;
}

.st-agent-task-box {
  background: rgba(10, 15, 29, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 10px;
}

.task-kicker {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.task-desc {
  font-size: 0.76rem;
  color: #e2e8f0;
  line-height: 1.35;
  margin: 0;
}

.st-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.st-queue-chip {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.btn-agent-action {
  background: rgba(99, 102, 241, 0.18);
  border: 1px solid rgba(99, 102, 241, 0.45);
  color: #c7d2fe;
  padding: 5px 11px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-agent-action:hover {
  background: rgba(99, 102, 241, 0.35);
  color: #ffffff;
  border-color: rgba(129, 140, 248, 0.7);
}

/* TAB 2: Action Queues & Approval Gates */
.st-queue-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.st-simulated-notice {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 0.7rem;
  color: #fde68a;
}

.st-simulated-notice .notice-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f59e0b;
}

.st-queue-cards-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.st-queue-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: var(--transition);
}

.st-queue-card.card-gate-pending {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.03);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.12);
}

.st-queue-card.card-blocked {
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.04);
}

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

.st-deal-badge {
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.35);
  padding: 3px 9px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.st-priority-pill {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
}

.priority-high {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.priority-med {
  background: rgba(245, 158, 11, 0.18);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.priority-low {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.st-queue-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.st-queue-meta-row {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.st-queue-agent-label {
  color: var(--cyan);
  font-weight: 600;
}

.st-queue-stage-label {
  color: #cbd5e1;
}

.st-queue-desc {
  font-size: 0.78rem;
  color: #cbd5e1;
  line-height: 1.4;
  margin: 0;
}

.st-deliverable-preview {
  background: rgba(0, 0, 0, 0.3);
  border-left: 3px solid var(--indigo);
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 0.74rem;
  color: #e2e8f0;
  font-family: var(--font-mono);
}

/* Approval Gate Banner (Inside Queue Card) */
.st-gate-banner {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gate-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gate-badge {
  background: #f59e0b;
  color: #060913;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.gate-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fbbf24;
}

.gate-notice {
  font-size: 0.72rem;
  color: #fde68a;
  line-height: 1.35;
  margin: 0;
}

.gate-actions-row {
  display: flex;
  gap: 8px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.btn-gate-approve {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-gate-approve:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.45);
}

.btn-gate-revise {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-gate-revise:hover {
  background: rgba(245, 158, 11, 0.25);
  color: #ffffff;
}

.btn-gate-intervene {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-gate-intervene:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

/* TAB 3: Handoff & Audit Log Trail */
.st-logs-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.st-logs-search {
  width: 340px;
}

.st-logs-counter {
  font-size: 0.74rem;
  color: var(--text-secondary);
}

.st-logs-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.st-logs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.76rem;
  text-align: left;
}

.st-logs-table th {
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-secondary);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.st-logs-table td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  vertical-align: middle;
}

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

.st-log-time {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.st-log-deal {
  font-weight: 700;
  color: #ffffff;
}

.st-log-agent {
  font-weight: 600;
  color: var(--cyan);
}

.st-log-arrow {
  color: var(--text-secondary);
  font-weight: bold;
}

.st-log-stage {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.68rem;
  white-space: nowrap;
}

.st-log-deliverables {
  font-size: 0.72rem;
  color: #cbd5e1;
  max-width: 260px;
}

.st-log-gate {
  font-size: 0.68rem;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.st-log-status {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
}

.status-success {
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
}

.status-escalated {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
}

.status-blocked {
  color: #f87171;
  background: rgba(239, 68, 68, 0.15);
}

/* ==========================================================================
   Phase 5: Supabase Persistence & Authentication UI
   ========================================================================== */

/* Database Connection Status in Sidebar Footer */
.db-connection-status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  background: rgba(10, 15, 29, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-top: 0.65rem;
  cursor: default;
}

.db-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: var(--transition);
}

.db-status-dot.dot-connected {
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
}

.db-status-dot.dot-offline {
  background: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

.db-status-meta {
  display: flex;
  flex-direction: column;
}

.db-status-title {
  font-size: 0.74rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.db-status-sub {
  font-size: 0.64rem;
  color: var(--text-secondary);
}

/* Operator Auth Button in Sidebar */
.btn-auth-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 0.65rem;
  padding: 0.5rem 0.75rem;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 6px;
  color: #c7d2fe;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-auth-toggle:hover {
  background: rgba(99, 102, 241, 0.25);
  color: #ffffff;
  border-color: rgba(129, 140, 248, 0.6);
}

/* Modal Backdrop */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 7, 15, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* Auth Modal Dialog */
.auth-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  width: 90%;
  max-width: 440px;
  background: #0d1322;
  border: 1px solid rgba(129, 140, 248, 0.25);
  border-radius: 14px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 30px rgba(99, 102, 241, 0.15);
  z-index: 1001;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
}

.auth-modal.active {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.auth-modal-inner {
  padding: 1.5rem;
}

.auth-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.auth-badge {
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--primary-light);
  background: rgba(99, 102, 241, 0.15);
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.06em;
  display: inline-block;
  margin-bottom: 4px;
}

.auth-modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
}

.auth-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 1.25rem;
}

.auth-user-status-card {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.auth-user-info {
  display: flex;
  flex-direction: column;
}

.auth-user-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
}

.auth-user-email {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-form-actions {
  margin-top: 0.5rem;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

.auth-mode-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* ==========================================================================
   Phase 6: Apify Ingestion UI & Telemetry Styles
   ========================================================================== */

.filter-pill.pill-ingest {
  border-color: rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
}

.filter-pill.pill-ingest:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: #818cf8;
}

.filter-pill.pill-ingest.active {
  background: rgba(99, 102, 241, 0.25);
  border-color: #818cf8;
  color: #ffffff;
}

.filter-pill.pill-alert {
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.filter-pill.pill-alert:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: #f59e0b;
}

.filter-pill.pill-alert.active {
  background: rgba(245, 158, 11, 0.25);
  border-color: #f59e0b;
  color: #ffffff;
}

/* Ingestion Telemetry Summary Banner */
.ingestion-summary-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding: 0.85rem 1.25rem;
  background: linear-gradient(90deg, rgba(30, 27, 75, 0.85) 0%, rgba(17, 24, 39, 0.92) 100%);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
}

.ingestion-summary-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ingestion-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: 50%;
  color: #818cf8;
  flex-shrink: 0;
}

.ingestion-title-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.ingestion-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
}

.ingestion-badge {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  color: #c7d2fe;
  background: rgba(99, 102, 241, 0.25);
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.ingestion-stats-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  font-size: 0.74rem;
  color: var(--text-secondary);
}

.ingest-stat strong {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #ffffff;
}

.ingest-stat.stat-imported strong { color: #10b981; }
.ingest-stat.stat-updated strong { color: #60a5fa; }
.ingest-stat.stat-duplicate strong { color: #9ca3af; }
.ingest-stat.stat-needs-review strong { color: #f59e0b; }
.ingest-stat.stat-rejected strong { color: #ef4444; }

.btn-dismiss-ingestion {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
}

.btn-dismiss-ingestion:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

/* Ingestion status badge inside table cells */
.ingest-tag {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-left: 6px;
}
.ingest-tag-imported { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.ingest-tag-updated { background: rgba(96, 165, 250, 0.15); color: #93c5fd; border: 1px solid rgba(96, 165, 250, 0.3); }
.ingest-tag-duplicate { background: rgba(148, 163, 184, 0.15); color: #94a3b8; border: 1px solid rgba(148, 163, 184, 0.3); }
.ingest-tag-review { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.ingest-tag-rejected { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }

/* ==========================================================================
   Phase 7: Workflow Automation & Agent Orchestration Panel Styles
   ========================================================================== */

.p7-workflow-panel {
  margin-top: 1.5rem;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.85) 0%, rgba(11, 17, 33, 0.95) 100%);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

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

.p7-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.p7-icon {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.p7-panel-kicker {
  font-size: 0.65rem;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.p7-panel-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin: 2px 0 0 0;
}

.p7-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.p7-select-label {
  font-size: 0.76rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.p7-deal-select {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f1f5f9;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: var(--transition);
}

.p7-deal-select:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25);
}

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

@media (max-width: 1024px) {
  .p7-status-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .p7-status-grid {
    grid-template-columns: 1fr;
  }
}

.p7-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.p7-card-kicker {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.p7-stage-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.p7-stage-badge {
  background: rgba(99, 102, 241, 0.2);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.35);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

.p7-deal-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #e2e8f0;
}

.p7-agent-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.p7-agent-details {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.p7-agent-name {
  font-size: 0.82rem;
  color: #ffffff;
}

.p7-agent-role {
  font-size: 0.68rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.p7-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.p7-badge-amber {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.p7-badge-emerald {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.p7-badge-rose {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.p7-card-notice {
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.35;
  margin: 6px 0 0 0;
}

.p7-handoff-route {
  font-size: 0.82rem;
  color: #e2e8f0;
  font-weight: 600;
  margin-bottom: 6px;
}

.p7-handoff-route strong {
  color: #38bdf8;
}

.p7-handoff-deliverable {
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.p7-retry-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.p7-retry-counter {
  font-size: 0.88rem;
  font-weight: 800;
  color: #f1f5f9;
}

/* Next Recommended Action Banner */
.p7-next-action-bar {
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 10px;
  padding: 1.15rem 1.35rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.p7-action-left {
  flex: 1;
  min-width: 260px;
}

.p7-action-kicker {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #38bdf8;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.p7-action-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 4px 0;
}

.p7-action-desc {
  font-size: 0.76rem;
  color: var(--text-secondary);
  margin: 0 0 8px 0;
  line-height: 1.35;
}

.p7-action-deliverable {
  font-size: 0.72rem;
  color: #cbd5e1;
}

.p7-deliv-label {
  color: var(--text-muted);
  font-weight: 600;
  margin-right: 4px;
}

.p7-deliv-val {
  color: #a5f3fc;
  font-weight: 600;
}

.btn-p7-action {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  border: 1px solid rgba(56, 189, 248, 0.4);
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.3);
  white-space: nowrap;
}

.btn-p7-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.5);
  background: linear-gradient(135deg, #0369a1, #075985);
}

/* ==========================================================================
   Phase 8: Live Integrations & External Gateways Panel
   ========================================================================== */
.p8-integrations-panel {
  margin-top: 1.25rem;
  background: linear-gradient(180deg, rgba(16, 24, 40, 0.85) 0%, rgba(11, 17, 30, 0.95) 100%);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}

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

.p8-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.p8-icon {
  background: rgba(56, 189, 248, 0.15) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
}

.p8-panel-kicker {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #38bdf8;
  margin-bottom: 2px;
}

.p8-panel-title {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.p8-header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.p8-select-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.p8-mode-select {
  background: #0f172a;
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  outline: none;
  cursor: pointer;
}

.p8-status-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
}

@media (max-width: 1200px) {
  .p8-status-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .p8-status-grid {
    grid-template-columns: 1fr;
  }
}

.p8-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
}

.p8-card-kicker {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.p8-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
  gap: 0.5rem;
}

.p8-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.p8-badge-live {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.p8-badge-simulated {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.p8-badge-amber {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.p8-badge-neutral {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.p8-sub-info {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.p8-card-desc {
  font-size: 0.7rem;
  color: #94a3b8;
  line-height: 1.35;
  margin: 0;
  flex-grow: 1;
}

.p8-mutation-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
  font-size: 0.7rem;
}

.p8-telemetry-label {
  color: var(--text-muted);
  font-weight: 600;
}

.p8-telemetry-val {
  color: #e2e8f0;
  font-weight: 600;
  font-size: 0.68rem;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.p8-stat-val {
  font-size: 0.68rem;
  font-weight: 700;
}

.p8-stat-normal {
  color: #34d399;
}

.p8-stat-escalated {
  color: #f87171;
}

/* ==========================================================================
   Consultation & A2P Compliance Page Styles (/book-a-consultation)
   ========================================================================== */
.compliance-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #34d399;
}

.consultation-scroll-area {
  padding: 1.5rem 2rem 3rem 2rem;
  overflow-y: auto;
  height: calc(100vh - var(--header-height));
}

.consultation-layout {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 1.75rem;
  max-width: 1400px;
  margin: 0 auto;
}

@media (max-width: 1100px) {
  .consultation-layout {
    grid-template-columns: 1fr;
  }
}

.consultation-hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(12px);
}

.consultation-hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--violet), var(--cyan));
}

.consultation-badge-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.consultation-hero-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
  line-height: 1.25;
  margin-bottom: 0.85rem;
}

.consultation-hero-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 650px;
}

.problem-focus-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 2.25rem;
}

.problem-focus-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: rgba(14, 20, 34, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.problem-focus-item:hover {
  background: rgba(26, 36, 60, 0.6);
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-1px);
}

.problem-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.problem-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.problem-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

.consultation-cta-section {
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.05));
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-md);
  margin-bottom: 2.25rem;
  text-align: center;
}

.consultation-main-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 380px;
  padding: 0.95rem 1.75rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border: none;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
  cursor: pointer;
  transition: var(--transition);
}

.consultation-main-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(99, 102, 241, 0.5);
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
}

.cta-micro-note {
  margin-top: 0.75rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.dot-live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  display: inline-block;
}

.consultation-steps-wrapper {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.75rem;
}

.steps-heading {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

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

@media (max-width: 768px) {
  .steps-grid {
    grid-template-columns: 1fr;
  }
}

.step-card {
  padding: 1rem;
  background: rgba(14, 20, 34, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.step-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary-light);
  display: block;
  margin-bottom: 0.35rem;
}

.step-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.step-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin: 0;
}

/* Right Column: GHL Widget Card & Compliance Box */
.consultation-widget-card {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.widget-card-header {
  padding: 1.25rem 1.5rem;
  background: rgba(14, 20, 34, 0.85);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.widget-header-title-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.widget-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #c084fc);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #ffffff;
  font-size: 1rem;
}

.widget-box-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.widget-box-status {
  font-size: 0.75rem;
  color: #34d399;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 500;
}

.status-indicator-live {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 6px #34d399;
}

.widget-body-area {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  flex-grow: 1;
}

.widget-callout {
  padding: 1rem;
  background: rgba(14, 20, 34, 0.6);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
}

.widget-instruction {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
}

/* Mandatory A2P 10DLC SMS Disclosure Container */
.sms-compliance-disclosure {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-left: 4px solid #6366f1;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.compliance-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.compliance-label {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #c7d2fe;
}

.sms-consent-paragraph {
  font-size: 0.84rem;
  color: #e2e8f0;
  line-height: 1.55;
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.compliance-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.widget-action-card {
  margin-top: 0.5rem;
}

.chat-launcher-preview {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  background: linear-gradient(135deg, rgba(26, 36, 60, 0.8), rgba(18, 26, 44, 0.9));
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
}

.chat-launcher-preview:hover {
  background: linear-gradient(135deg, rgba(36, 48, 80, 0.9), rgba(24, 34, 58, 0.95));
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.25);
}

.chat-bubble-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.4);
}

.chat-launcher-text {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.chat-launcher-text strong {
  font-size: 0.92rem;
  color: #ffffff;
}

.chat-launcher-text span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.chat-launcher-arrow {
  font-size: 1.25rem;
  color: var(--primary-light);
  font-weight: bold;
}

.single-opt-in-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.85rem;
  background: rgba(14, 20, 34, 0.4);
  border-radius: var(--radius-sm);
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: auto;
}

.badge-subtle {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
}






