/* ===================================================================
   LEGACY24 - EXECUTIVE INSURANCE LEAD PLATFORM DESIGN SYSTEM
   =================================================================== */

:root {
  /* Color Palette - Executive Navy & Obsidian */
  --bg-base: #080c14;
  --bg-surface: #0f172a;
  --bg-surface-elevated: #1e293b;
  --bg-card: rgba(15, 23, 42, 0.82);
  --bg-card-hover: rgba(30, 41, 59, 0.7);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: #3b82f6;
  --border-active: rgba(59, 130, 246, 0.4);

  /* Typography */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Text Colors */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-accent: #38bdf8;

  /* Brand Accents */
  --brand-primary: #2563eb;
  --brand-primary-hover: #1d4ed8;
  --brand-primary-glow: rgba(37, 99, 235, 0.25);
  --brand-gold: #f59e0b;
  --brand-gold-glow: rgba(245, 158, 11, 0.2);

  /* Status Colors */
  --status-new-bg: rgba(56, 189, 248, 0.15);
  --status-new-border: rgba(56, 189, 248, 0.35);
  --status-new-text: #38bdf8;

  --status-attempt-bg: rgba(249, 115, 22, 0.15);
  --status-attempt-border: rgba(249, 115, 22, 0.35);
  --status-attempt-text: #fb923c;

  --status-contacted-bg: rgba(139, 92, 246, 0.15);
  --status-contacted-border: rgba(139, 92, 246, 0.35);
  --status-contacted-text: #a78bfa;

  --status-appt-bg: rgba(245, 158, 11, 0.15);
  --status-appt-border: rgba(245, 158, 11, 0.35);
  --status-appt-text: #fbbf24;

  --status-sold-bg: rgba(16, 185, 129, 0.18);
  --status-sold-border: rgba(16, 185, 129, 0.4);
  --status-sold-text: #34d399;

  --status-followup-bg: rgba(6, 182, 212, 0.15);
  --status-followup-border: rgba(6, 182, 212, 0.35);
  --status-followup-text: #22d3ee;

  --status-notint-bg: rgba(148, 163, 184, 0.12);
  --status-notint-border: rgba(148, 163, 184, 0.25);
  --status-notint-text: #94a3b8;

  /* Source Differentiation Badges */
  --source-legacy-bg: linear-gradient(135deg, rgba(37, 99, 235, 0.25) 0%, rgba(30, 64, 175, 0.35) 100%);
  --source-legacy-border: rgba(96, 165, 250, 0.45);
  --source-legacy-text: #93c5fd;
  --source-legacy-glow: 0 0 12px rgba(59, 130, 246, 0.3);

  --source-purchased-bg: rgba(71, 85, 105, 0.25);
  --source-purchased-border: rgba(148, 163, 184, 0.25);
  --source-purchased-text: #cbd5e1;

  /* Geometry & Shadows */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(37, 99, 235, 0.18);
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-base);
  background-image: 
    radial-gradient(at 15% 10%, rgba(37, 99, 235, 0.12) 0px, transparent 45%),
    radial-gradient(at 85% 85%, rgba(16, 185, 129, 0.08) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(15, 23, 42, 0.5) 0px, transparent 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Layout Containers */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===================================================================
   TOP NAVIGATION
   =================================================================== */
.top-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background-color: rgba(8, 12, 20, 0.85);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.85rem 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-symbol {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 50%, #38bdf8 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(37, 99, 235, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.brand-symbol svg {
  width: 24px;
  height: 24px;
  color: #ffffff;
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #ffffff;
}

.brand-name span {
  color: #38bdf8;
  font-weight: 800;
}

.brand-tagline {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
}

.agent-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border-subtle);
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-dot 2.5s infinite;
}

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

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  outline: none;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.45);
}

.btn-secondary {
  background: rgba(30, 41, 59, 0.75);
  border-color: var(--border-subtle);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  background: rgba(51, 65, 85, 0.85);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-outline-gold {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

.btn-outline-gold:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.5);
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
}

/* ===================================================================
   MAIN DASHBOARD CONTENT
   =================================================================== */
.main-content {
  flex: 1;
  padding: 1.75rem 2rem 3rem;
  max-width: 1540px;
  margin: 0 auto;
  width: 100%;
}

/* Page Intro Banner */
.page-intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.page-title {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.page-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.system-status {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===================================================================
   STATS & KPI CARDS (INTERACTIVE FILTERS)
   =================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  user-select: none;
  outline: none;
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(96, 165, 250, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 16px rgba(37, 99, 235, 0.2);
}

.stat-card:focus-visible {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* Active KPI filter selection state */
.stat-card.active-kpi {
  border-color: #3b82f6;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.35) 0%, rgba(15, 23, 42, 0.95) 100%);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5), 0 8px 25px rgba(0, 0, 0, 0.5);
}

.stat-card.active-kpi::after {
  content: 'Active Filter';
  position: absolute;
  top: 0.6rem;
  right: 0.85rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(37, 99, 235, 0.3);
  color: #93c5fd;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  border: 1px solid rgba(96, 165, 250, 0.4);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
}

.stat-card.card-total::before { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.stat-card.card-new::before { background: linear-gradient(90deg, #38bdf8, #0ea5e9); }
.stat-card.card-appt::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.stat-card.card-sales::before { background: linear-gradient(90deg, #10b981, #34d399); }
.stat-card.card-conversion::before { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }

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

.stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

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

.stat-icon svg {
  width: 18px;
  height: 18px;
}

.stat-icon.total-icon { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.stat-icon.new-icon { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }
.stat-icon.appt-icon { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.stat-icon.sales-icon { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.stat-icon.conv-icon { background: rgba(139, 92, 246, 0.15); color: #a78bfa; }

.stat-value {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.stat-subtext {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.highlight-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
  font-size: 0.72rem;
}

.highlight-legacy {
  background: rgba(37, 99, 235, 0.2);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.highlight-green {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

/* ===================================================================
   SOURCE TRACKING ISOLATION BANNER & QUICK TABS
   =================================================================== */
.source-isolation-banner {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.85) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1rem 1.5rem;
  margin-bottom: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}

.isolation-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.isolation-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #60a5fa;
  flex-shrink: 0;
}

.isolation-icon svg {
  width: 20px;
  height: 20px;
}

.isolation-text h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
}

.isolation-text p {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* Source Quick Toggles */
.source-quick-tabs {
  display: inline-flex;
  background: rgba(8, 12, 20, 0.75);
  padding: 0.35rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  gap: 0.25rem;
}

.tab-btn {
  background: transparent;
  border: none;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

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

.tab-btn.active {
  background: #1e293b;
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.tab-btn.active.tab-legacy {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.4) 0%, rgba(30, 64, 175, 0.5) 100%);
  color: #93c5fd;
  border: 1px solid rgba(96, 165, 250, 0.4);
}

.tab-btn.active.tab-purchased {
  background: rgba(51, 65, 85, 0.8);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.tab-count {
  font-size: 0.72rem;
  background: rgba(0, 0, 0, 0.35);
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
  color: var(--text-primary);
}

/* ===================================================================
   SEARCH & FILTER CONTROLS TOOLBAR
   =================================================================== */
.toolbar-container {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.4rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.search-box-wrapper {
  position: relative;
  flex: 1 1 300px;
  max-width: 420px;
}

.search-icon {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
}

.search-icon svg {
  width: 17px;
  height: 17px;
}

.search-input {
  width: 100%;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.6rem 1rem 0.6rem 2.5rem;
  font-size: 0.85rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  transition: var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.select-wrapper {
  position: relative;
  min-width: 155px;
}

.filter-select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.6rem 2rem 0.6rem 0.85rem;
  font-size: 0.82rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  cursor: pointer;
  transition: var(--transition);
}

.filter-select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.select-arrow {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
}

.select-arrow svg {
  width: 14px;
  height: 14px;
}

/* ===================================================================
   LEAD DATA TABLE
   =================================================================== */
.table-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.table-header-bar {
  padding: 1rem 1.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.6);
}

.table-header-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.table-row-count {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.leads-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.leads-table th {
  background: rgba(8, 12, 20, 0.6);
  padding: 0.85rem 1.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.leads-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
  transition: background 0.15s ease;
}

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

.leads-table tbody tr:hover {
  background: var(--bg-card-hover);
}

.leads-table tbody tr:last-child td {
  border-bottom: none;
}

/* Table Column Cells */
.lead-name-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lead-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lead-avatar.legacy-avatar {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.4) 0%, rgba(30, 64, 175, 0.7) 100%);
  border-color: rgba(96, 165, 250, 0.4);
  color: #93c5fd;
}

.lead-info-text .name {
  font-weight: 600;
  color: #ffffff;
  font-size: 0.9rem;
}

.lead-info-text .sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.1rem;
}

.state-pill {
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.05rem 0.35rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

/* Source Badges */
.source-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.source-badge-legacy {
  background: var(--source-legacy-bg);
  border: 1px solid var(--source-legacy-border);
  color: var(--source-legacy-text);
  box-shadow: var(--source-legacy-glow);
}

.source-badge-purchased {
  background: var(--source-purchased-bg);
  border: 1px solid var(--source-purchased-border);
  color: var(--source-purchased-text);
}

.source-badge svg {
  width: 13px;
  height: 13px;
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.7rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
}

.status-new {
  background: var(--status-new-bg);
  border-color: var(--status-new-border);
  color: var(--status-new-text);
}

.status-attempted-contact,
.status-contact-attempt,
.status-1x-contact-attempt,
.status-2x-contact-attempt,
.status-3x-contact-attempt,
.status-4x-contact-attempt,
.status-5x-contact-attempt,
.status-5x-comtatc-attempt,
.status-6x-contact-attempt,
.status-6-contact-attempt {
  background: var(--status-attempt-bg);
  border-color: var(--status-attempt-border);
  color: var(--status-attempt-text);
}

.status-contacted {
  background: var(--status-contacted-bg);
  border-color: var(--status-contacted-border);
  color: var(--status-contacted-text);
}

.status-appointment-set {
  background: var(--status-appt-bg);
  border-color: var(--status-appt-border);
  color: var(--status-appt-text);
}

.status-sold {
  background: var(--status-sold-bg);
  border-color: var(--status-sold-border);
  color: var(--status-sold-text);
}

.status-follow-up {
  background: var(--status-followup-bg);
  border-color: var(--status-followup-border);
  color: var(--status-followup-text);
}

.status-not-interested {
  background: var(--status-notint-bg);
  border-color: var(--status-notint-border);
  color: var(--status-notint-text);
}

.lead-coverage {
  font-weight: 600;
  color: #ffffff;
}

.lead-coverage-amount {
  font-size: 0.75rem;
  color: var(--text-muted);
}

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

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

.follow-up-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.76rem;
  font-weight: 500;
  color: #38bdf8;
}

.follow-up-badge.urgent {
  color: #f87171;
  font-weight: 700;
}

/* Empty State */
.empty-state {
  padding: 4rem 2rem;
  text-align: center;
  color: var(--text-muted);
}

.empty-state-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(30, 41, 59, 0.5);
  margin: 0 auto 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.empty-state-icon svg {
  width: 28px;
  height: 28px;
}

.empty-state h4 {
  font-size: 1.1rem;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.empty-state p {
  font-size: 0.85rem;
  max-width: 400px;
  margin: 0 auto 1.25rem;
}

/* ===================================================================
   SLIDE-OVER LEAD DETAIL DRAWER
   =================================================================== */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

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

.lead-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 560px;
  background: #0f172a;
  border-left: 1px solid var(--border-subtle);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.6);
  z-index: 60;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

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

.drawer-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(8, 12, 20, 0.5);
}

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

.drawer-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
}

.drawer-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  display: flex;
  transition: var(--transition);
}

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

.drawer-close-btn svg {
  width: 20px;
  height: 20px;
}

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

/* Drawer Profile Card */
.drawer-profile-box {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  position: relative;
}

.drawer-profile-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.drawer-profile-name {
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
}

.drawer-profile-id {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.contact-quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
}

.quick-action-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.55rem 0.85rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.quick-action-link:hover {
  border-color: var(--brand-primary);
  color: #ffffff;
  background: rgba(37, 99, 235, 0.15);
}

.quick-action-link svg {
  width: 16px;
  height: 16px;
  color: #38bdf8;
}

/* Detail Section Grid */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.detail-item {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.95rem;
}

.detail-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.detail-val {
  font-size: 0.88rem;
  font-weight: 600;
  color: #ffffff;
}

/* Status & Follow-up Controls inside Drawer */
.action-box {
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.action-box-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.control-field {
  margin-bottom: 1rem;
}

.control-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.drawer-select, .drawer-input {
  width: 100%;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.85rem;
  font-size: 0.85rem;
  color: var(--text-primary);
  font-family: var(--font-body);
}

.drawer-select:focus, .drawer-input:focus {
  outline: none;
  border-color: var(--border-focus);
}

/* Notes Feed & Add Note */
.notes-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.note-bubble {
  background: rgba(15, 23, 42, 0.85);
  border-left: 3px solid #3b82f6;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 0.75rem 0.95rem;
  font-size: 0.82rem;
}

.note-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.note-text {
  color: var(--text-primary);
  line-height: 1.45;
}

.new-note-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.new-note-textarea {
  width: 100%;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  font-size: 0.82rem;
  color: #ffffff;
  font-family: var(--font-body);
  resize: vertical;
  min-height: 70px;
}

.new-note-textarea:focus {
  outline: none;
  border-color: var(--border-focus);
}

/* ===================================================================
   MODAL DIALOG (ADD LEAD)
   =================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

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

.modal-dialog {
  background: #0f172a;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 650px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

.modal-header {
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(8, 12, 20, 0.6);
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
}

.modal-body {
  padding: 1.75rem;
  overflow-y: auto;
}

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

.form-group.full-width {
  grid-column: span 2;
}

.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.form-label .required {
  color: #f87171;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.85rem;
  font-size: 0.85rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  transition: var(--transition);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-note {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.source-callout {
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.8rem;
  color: #93c5fd;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.modal-footer {
  padding: 1.15rem 1.75rem;
  border-top: 1px solid var(--border-subtle);
  background: rgba(8, 12, 20, 0.6);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: #1e293b;
  border: 1px solid var(--border-subtle);
  border-left: 4px solid #3b82f6;
  border-radius: var(--radius-md);
  padding: 0.75rem 1.1rem;
  color: #ffffff;
  font-size: 0.85rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  animation: slideInToast 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

.toast.toast-success {
  border-left-color: #10b981;
}

.toast.toast-warning {
  border-left-color: #f59e0b;
}

@keyframes slideInToast {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Footer */
.app-footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border-subtle);
  background: rgba(8, 12, 20, 0.95);
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

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

/* ===================================================================
   CLIENT RETENTION & UPCOMING BIRTHDAYS WIDGET
   =================================================================== */
.retention-widget-container {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92) 0%, rgba(20, 30, 48, 0.85) 100%);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.4rem;
  margin-bottom: 1.75rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), 0 0 15px rgba(245, 158, 11, 0.08);
  position: relative;
  overflow: hidden;
}

.retention-widget-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #f59e0b 0%, #10b981 50%, #3b82f6 100%);
}

.retention-widget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

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

.retention-icon-box {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fbbf24;
  flex-shrink: 0;
}

.retention-icon-box svg {
  width: 20px;
  height: 20px;
}

.retention-widget-title {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.retention-active-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 0.1rem 0.5rem;
  border-radius: 9999px;
}

.retention-widget-subtitle {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 0.15rem;
}

.retention-count-pill {
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
}

/* Birthday Cards Horizontal Track */
.birthday-cards-track {
  display: flex;
  gap: 0.85rem;
  overflow-x: auto;
  padding-bottom: 0.4rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.birthday-cards-track::-webkit-scrollbar {
  height: 5px;
}

.birthday-cards-track::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
}

.birthday-card {
  flex: 0 0 250px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.birthday-card:hover {
  transform: translateY(-2px);
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.bday-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(217, 119, 6, 0.4) 100%);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  font-weight: 700;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bday-info {
  flex: 1;
  min-width: 0;
}

.bday-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bday-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.15rem;
}

.bday-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.bday-badge.bday-urgent {
  background: rgba(245, 158, 11, 0.25);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fde68a;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.25);
}

.bday-badge.bday-soon {
  background: rgba(56, 189, 248, 0.2);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #7dd3fc;
}

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

.birthday-empty-state {
  padding: 1.25rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  width: 100%;
}

/* ===================================================================
   CLIENT RETENTION HUB IN PROFILE DRAWER
   =================================================================== */
.retention-hub-box {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  position: relative;
}

.retention-hub-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #10b981, #3b82f6);
}

.retention-hub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
}

.retention-hub-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.retention-policy-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.retention-reminders-box {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.95rem;
  margin-bottom: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.retention-reminder-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
}

.reminder-label {
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.reminder-date {
  font-weight: 600;
  color: #f8fafc;
}

/* Quick Birthday Outreach Action Buttons */
.quick-bday-bar {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.9rem;
  margin-top: 0.5rem;
}

.quick-bday-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #fbbf24;
}

.quick-bday-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
}

.quick-outreach-btn {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  transition: var(--transition);
}

.quick-outreach-btn:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.quick-outreach-btn svg {
  width: 13px;
  height: 13px;
}

/* ===================================================================
   DRAWER ACTIVITY FORM & COMPACT SAVE BUTTON
   =================================================================== */
.activity-type-group {
  margin-bottom: 0.6rem;
}

.activity-type-select {
  width: 100%;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.45rem 0.75rem;
  font-size: 0.8rem;
  color: var(--text-primary);
  font-family: var(--font-body);
}

.activity-type-select:focus {
  outline: none;
  border-color: var(--border-focus);
}

.activity-reminder-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.35rem;
  line-height: 1.35;
}

/* Activity form footer with substantially smaller save button at bottom-right */
.activity-form-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 0.6rem;
}

.btn-save-activity-sm {
  padding: 0.35rem 0.75rem !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25) !important;
  letter-spacing: 0.02em;
}

.btn-save-activity-sm:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35) !important;
}

.activity-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.1rem 0.4rem;
  border-radius: 9999px;
  margin-right: 0.35rem;
}

.tag-bday {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.tag-review {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.tag-call {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .main-content {
    padding: 1.25rem 1rem 2rem;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-group.full-width {
    grid-column: span 1;
  }
  .toolbar-container {
    flex-direction: column;
    align-items: stretch;
  }
  .search-box-wrapper {
    max-width: 100%;
  }
  .filter-group {
    width: 100%;
  }
  .select-wrapper {
    flex: 1 1 140px;
  }
}

/* ===================================================================
   AUTHENTICATION & TOTP MFA MODAL STYLES (AAL2 ENFORCEMENT)
   =================================================================== */

.auth-modal-dialog {
  max-width: 460px;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(59, 130, 246, 0.25);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75), 0 0 30px rgba(37, 99, 235, 0.15);
}

.auth-modal-shield {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.3) 0%, rgba(30, 64, 175, 0.4) 100%);
  border: 1px solid rgba(96, 165, 250, 0.4);
  color: #60a5fa;
}

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

.btn-block {
  width: 100%;
  justify-content: center;
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.btn-text-link {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: var(--transition);
}

.btn-text-link:hover {
  color: var(--text-primary);
}

.auth-alert {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
}

.auth-alert-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* MFA Enrollment View */
.mfa-enroll-header {
  text-align: center;
  margin-bottom: 1.25rem;
}

.mfa-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.35);
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  margin-bottom: 0.5rem;
}

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

.mfa-step-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.mfa-qr-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1rem 0;
}

.mfa-qr-frame {
  width: 210px;
  height: 210px;
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.2), inset 0 0 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.mfa-qr-frame svg,
.mfa-qr-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.qr-loading-spinner {
  color: #64748b;
  font-size: 0.8rem;
  text-align: center;
  padding: 1rem;
}

.mfa-secret-box {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  margin-top: 0.75rem;
}

.mfa-secret-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

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

.mfa-secret-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.875rem;
  color: #38bdf8;
  letter-spacing: 0.05em;
  word-break: break-all;
}

.mfa-digit-input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  font-size: 1.75rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.35em !important;
  text-align: center !important;
  padding: 0.6rem 0.5rem !important;
  background: rgba(15, 23, 42, 0.8) !important;
  border: 2px solid rgba(59, 130, 246, 0.4) !important;
  color: #ffffff !important;
}

.mfa-digit-input:focus {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.35) !important;
}

/* Status indicator pulses */
.status-dot.status-dot-active {
  background-color: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.status-dot.status-dot-locked {
  background-color: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
}

