/* Taxamicus Ultra-Premium Dark Theme & Glassmorphism Design System */
:root {
  --bg-dark: #090d16;
  --bg-card: #151d2a;
  --bg-card-hover: #1e293b;
  --bg-column: rgba(15, 23, 42, 0.7);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(59, 130, 246, 0.3);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  
  --primary: #3b82f6;
  --primary-glow: rgba(59, 130, 246, 0.3);
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.3);
  --warning: #f59e0b;
  --warning-glow: rgba(245, 158, 11, 0.3);
  --danger: #ef4444;
  --purple: #8b5cf6;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.7);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Ultra-Sleek Custom Dark Theme Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(9, 13, 22, 0.8);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(51, 65, 85, 0.8);
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.6);
}

/* Global Utility: strict hide */
.hidden {
  display: none !important;
}

body {
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(37, 99, 235, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(124, 58, 237, 0.08) 0%, transparent 40%);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Header Styling */
.app-header {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.app-header-top {
  height: 40px;
  background: rgba(10, 15, 29, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  gap: 12px;
}

.app-header-main {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.45));
  transition: transform 0.2s ease;
}

.brand-logo-img:hover {
  transform: scale(1.05);
}

.login-logo-img {
  height: 60px;
  width: auto;
  object-fit: contain;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 14px rgba(59, 130, 246, 0.5));
}

.brand-info h1 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}

.header-center {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  justify-content: center;
  max-width: 650px;
}

/* Ultra-Professional Executive Revenue Analytics Header Stats (ADMIN ONLY) */
.header-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.85));
  backdrop-filter: blur(16px);
  padding: 3px 10px;
  border-radius: 9px;
  border: 1px solid rgba(59, 130, 246, 0.25);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.header-stats:hover {
  border-color: rgba(59, 130, 246, 0.45);
}

.header-stats.hidden {
  display: none !important;
}

.stat-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
}

.stat-box:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -5px;
  top: 15%;
  height: 70%;
  width: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.stat-label {
  font-size: 8.5px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 700;
  margin-bottom: 1px;
  display: flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.stat-value {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.stat-value.success {
  color: #34d399;
  text-shadow: 0 0 10px rgba(52, 211, 153, 0.3);
}

.stat-value.highlight {
  color: #fbbf24;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}

/* Actions & Buttons */
.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.header-tool-group {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2px 4px;
  border-radius: 8px;
}

.header-tool-group.primary-actions {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(59, 130, 246, 0.3);
}

.header-tool-group.admin-tools {
  background: rgba(30, 41, 59, 0.3);
}

.header-tool-group.profile-group {
  background: transparent;
  border: none;
  padding: 0;
  gap: 6px;
}

.btn-header-action {
  padding: 3px 8px !important;
  font-size: 11px !important;
  height: 27px !important;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
  border-radius: 6px !important;
}

.agent-selector {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

.agent-selector label {
  display: none;
}

.agent-selector select {
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 5px 10px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.agent-selector select option {
  background-color: #0f172a;
  color: #f8fafc;
  padding: 8px;
}

.agent-selector select:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-secondary {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 5px 10px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.btn-secondary.hidden {
  display: none !important;
}

.btn-icon-only {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 27px;
  height: 27px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-icon-only:hover {
  background: var(--bg-card-hover);
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-1px);
}

.btn-icon-only.hidden {
  display: none !important;
}

.btn-secondary.highlight {
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  border-color: rgba(124, 58, 237, 0.5);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.3);
}

.btn-secondary.highlight:hover {
  background: linear-gradient(135deg, #6d28d9, #4338ca);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border: none;
  color: #fff;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.3);
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
}

.btn-primary.danger-btn {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 2px 10px rgba(239, 68, 68, 0.3);
}

.btn-primary.block {
  width: 100%;
}

.btn-small-pay {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #60a5fa;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.btn-small-pay:hover {
  background: rgba(59, 130, 246, 0.28);
  border-color: #60a5fa;
  transform: translateY(-1px);
}

.btn-small-call {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.btn-small-call:hover {
  background: rgba(16, 185, 129, 0.28);
  border-color: #34d399;
  transform: translateY(-1px);
}

.btn-small-delete {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.btn-small-delete:hover {
  background: rgba(239, 68, 68, 0.28);
  border-color: #ef4444;
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-delete-lead-header {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-delete-lead-header:hover {
  background: rgba(239, 68, 68, 0.28);
  border-color: #ef4444;
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-small-ai {
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.btn-small-ai.mode-ai {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.btn-small-ai.mode-ai:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: #34d399;
  transform: translateY(-1px);
}

.btn-small-ai.mode-human {
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #c4b5fd;
}

.btn-small-ai.mode-human:hover {
  background: rgba(139, 92, 246, 0.25);
  border-color: #c4b5fd;
  transform: translateY(-1px);
}

.card-ai-pill {
  border: none;
  outline: none;
  cursor: pointer;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.18s ease;
  user-select: none;
}

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

.card-ai-pill.mode-ai:hover {
  background: rgba(16, 185, 129, 0.3);
  border-color: #34d399;
  transform: scale(1.06);
}

.card-ai-pill.mode-human {
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.35);
}

.card-ai-pill.mode-human:hover {
  background: rgba(139, 92, 246, 0.3);
  border-color: #c4b5fd;
  transform: scale(1.06);
}

.card-actions-top {
  display: flex;
  align-items: center;
  gap: 5px;
}

.card-summary-pill {
  border: 1px solid rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  outline: none;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.18s ease;
  user-select: none;
}

.card-summary-pill:hover {
  background: rgba(59, 130, 246, 0.28);
  border-color: #60a5fa;
  transform: scale(1.06);
  box-shadow: 0 0 8px rgba(96, 165, 250, 0.3);
}

.btn-small-summary {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #93c5fd;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  height: 28px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-small-summary:hover {
  background: rgba(59, 130, 246, 0.28);
  border-color: #60a5fa;
  transform: translateY(-1px);
}

.summary-content-body {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 16px 18px;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.65;
  color: #e2e8f0;
}

.summary-content-body strong {
  color: #38bdf8;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  padding: 3px 9px;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  height: 27px;
  flex-shrink: 0;
}

.status-pill:hover {
  border-color: var(--primary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

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

.status-dot.disconnected {
  background-color: var(--danger);
  box-shadow: 0 0 10px var(--danger);
}

.qr-btn-hint {
  font-size: 10px;
  background: var(--primary);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}

/* Kanban Board Layout (8 Columns) */
.kanban-workspace {
  flex: 1;
  padding: 20px 24px;
  overflow-x: auto;
}

.kanban-workspace.table-mode-active {
  padding: 0;
  overflow: hidden;
}

.kanban-board {
  display: grid;
  grid-template-columns: repeat(8, minmax(260px, 1fr));
  gap: 14px;
  min-height: calc(100vh - 108px);
  align-items: start;
}

.kanban-column {
  background: var(--bg-column);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 124px);
  overflow: hidden;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}

.column-header {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  background: rgba(30, 41, 59, 0.4);
}

.column-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.column-title h3 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.column-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.column-dot.new-lead { background-color: #3b82f6; }
.column-dot.hot { background-color: #ef4444; box-shadow: 0 0 10px rgba(239, 68, 68, 0.6); }
.column-dot.warm { background-color: #f59e0b; }
.column-dot.cold { background-color: #06b6d4; }
.column-dot.docs { background-color: #8b5cf6; }
.column-dot.trn { background-color: #a855f7; }
.column-dot.paid { background-color: #10b981; }
.column-dot.dead { background-color: #64748b; }

.column-count {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  color: var(--text-muted);
}

.cards-container {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  flex: 1;
  min-height: 150px;
}

/* Drag & Drop Performance & Visuals */
body.is-dragging-card * {
  cursor: grabbing !important;
}

body.is-dragging-card .lead-card * {
  pointer-events: none !important;
}

body.is-dragging-card .lead-card {
  user-select: none;
}

.kanban-column.drag-over {
  background: rgba(59, 130, 246, 0.06);
  outline: 2px dashed rgba(59, 130, 246, 0.5);
  outline-offset: -2px;
  border-radius: 12px;
}

.cards-container.drag-over {
  background-color: rgba(59, 130, 246, 0.06);
}

/* Kanban Cards */
.lead-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px;
  cursor: grab;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  box-shadow: var(--shadow-sm);
  will-change: transform;
}

.lead-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 255, 255, 0.15);
}

.lead-card.dragging {
  opacity: 0.35 !important;
  cursor: grabbing !important;
  transform: scale(0.98) !important;
  box-shadow: none !important;
  transition: none !important;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 4px;
}

.lead-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.lead-phone {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.card-deal-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.card-deal-badge {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 5px;
}

.card-bal-badge {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 5px;
}

.dead-reason-tag {
  background: rgba(100, 116, 139, 0.25);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.3);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 5px;
  margin-bottom: 8px;
  display: inline-block;
  font-weight: 500;
}

.last-msg-preview {
  font-size: 12px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.6);
  padding: 8px 10px;
  border-radius: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.collision-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fca5a5;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 5px;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 8px;
  margin-top: 6px;
}

/* Chat Drawer */
.chat-drawer {
  position: fixed;
  top: 0;
  right: -580px;
  width: 530px;
  max-width: 95vw;
  height: 100vh;
  background: #151d2a;
  border-left: 1px solid var(--border-color);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.7);
  z-index: 200;
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-drawer.open { right: 0; }

.chat-header {
  padding: 10px 14px;
  background: #0f172a;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.chat-header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

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

.chat-user-info h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.chat-user-info p {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 1px;
}

.chat-header-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.stage-select-dropdown {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.35);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  height: 28px;
}

.stage-select-dropdown option {
  background: #0f172a;
  color: #f8fafc;
}

.icon-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
}

.collision-banner {
  background: rgba(239, 68, 68, 0.15);
  border-bottom: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  padding: 8px 14px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.collision-banner.hidden { display: none; }

.human-takeover-banner {
  background: rgba(30, 58, 138, 0.45);
  border-bottom: 1px solid rgba(59, 130, 246, 0.5);
  color: #93c5fd;
  padding: 8px 14px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.human-takeover-banner.hidden { display: none; }

.dead-reason-banner {
  background: rgba(100, 116, 139, 0.3);
  border-bottom: 1px solid rgba(148, 163, 184, 0.4);
  color: #f1f5f9;
  padding: 8px 14px;
  font-size: 12px;
}

.dead-reason-banner.hidden { display: none; }

/* Payment Ledger Summary Bar */
.payment-ledger-bar {
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid var(--border-color);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pay-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.pay-stat strong { font-size: 13px; color: var(--text-main); }
.pay-stat strong.success { color: var(--success); }
.pay-stat strong.danger { color: var(--danger); }

/* Deal Cart Section */
.deal-cart-section {
  background: rgba(15, 23, 42, 0.7);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 16px;
}

.deal-cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.deal-cart-header strong { color: var(--success); font-size: 15px; }

.services-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 120px;
  overflow-y: auto;
}

.service-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(30, 41, 59, 0.5);
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.service-checkbox {
  font-size: 12px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  flex: 1;
}

.service-price-input {
  width: 85px;
  background: #0f172a;
  border: 1px solid var(--border-color);
  color: #34d399;
  font-weight: 700;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 6px;
  text-align: right;
  outline: none;
}

/* Document Vault Checklist */
.doc-vault-bar {
  background: #0f172a;
  border-bottom: 1px solid var(--border-color);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

.doc-tags { display: flex; gap: 6px; }

.doc-tag {
  background: rgba(51, 65, 85, 0.8);
  border: 1px solid var(--border-color);
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 11px;
}

.doc-tag.verified {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.5);
  color: #6ee7b7;
}

/* Collapsible Lead Details Panel & Divider Bar (Yellow Square Position) */
.lead-details-panel {
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
  max-height: 450px;
  overflow: hidden;
  opacity: 1;
}

.lead-details-panel.collapsed {
  max-height: 0 !important;
  opacity: 0;
  pointer-events: none;
}

.drawer-collapse-bar {
  background: rgba(30, 41, 59, 0.75);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 6px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 600;
  color: #cbd5e1;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.drawer-collapse-bar:hover {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
}

.collapse-icon {
  font-size: 11px;
  color: #38bdf8;
  font-weight: 700;
  transition: transform 0.25s ease;
}

.drawer-collapse-bar.is-collapsed {
  background: rgba(15, 23, 42, 0.7);
  color: #94a3b8;
}

.drawer-collapse-bar.is-collapsed .collapse-icon {
  color: #60a5fa;
  transform: none;
}

/* Chat Messages */
.chat-messages {
  flex: 1 1 0;
  min-height: 0;
  padding: 12px 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #090d16;
}

.chat-placeholder {
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  margin-top: 40px;
  padding: 0 20px;
  line-height: 1.5;
}

.msg-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.4;
  word-wrap: break-word;
}

.msg-bubble.incoming {
  align-self: flex-start;
  background: #1e293b;
  color: var(--text-main);
  border-bottom-left-radius: 2px;
  border: 1px solid var(--border-color);
}

.msg-bubble.outgoing {
  align-self: flex-end;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  border-bottom-right-radius: 2px;
}

.payment-log-card {
  align-self: center;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #a7f3d0;
  padding: 10px 14px;
  border-radius: 10px;
  width: 90%;
  font-size: 12px;
}

.payment-log-title { font-weight: 700; margin-bottom: 4px; color: #34d399; }

.call-log-card {
  align-self: center;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #ddd6fe;
  padding: 10px 14px;
  border-radius: 10px;
  width: 90%;
  font-size: 12px;
}

.call-log-title { font-weight: 700; margin-bottom: 4px; color: #a78bfa; }

.msg-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  font-size: 10px;
  opacity: 0.7;
  margin-top: 4px;
}

.hotkey-bar {
  background: rgba(15, 23, 42, 0.95);
  border-top: 1px solid var(--border-color);
  padding: 5px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.hotkey-buttons { display: flex; gap: 5px; flex-wrap: wrap; }

.hotkey-btn {
  background: rgba(37, 99, 235, 0.3);
  border: 1px solid rgba(37, 99, 235, 0.45);
  color: #bfdbfe;
  padding: 2px 7px;
  border-radius: 4px;
  font-family: monospace;
  font-weight: 700;
  font-size: 10.5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.hotkey-btn:hover { background: #2563eb; color: #ffffff; }

.chat-input-area {
  padding: 8px 12px;
  background: #151d2a;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.chat-input-area input {
  flex: 1;
  background: #090d16;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12.5px;
  outline: none;
}

.chat-input-area button {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 20px;
  box-sizing: border-box;
}

.modal-overlay.hidden { display: none !important; }

.modal-content {
  background: #151d2a;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  width: 480px;
  max-width: 95vw;
  max-height: 90vh;
  padding: 24px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  position: relative;
}

.modal-content.wide { width: 640px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}

/* Custom Modal Body Scrollbar */
.modal-body::-webkit-scrollbar {
  width: 6px;
}
.modal-body::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.4);
  border-radius: 4px;
}
.modal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
.modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

.modal-header h2 { font-size: 18px; font-weight: 600; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
  min-width: 0;
}

.form-group label { font-size: 12px; color: var(--text-muted); font-weight: 500; }

.form-group input, .form-group select, .form-group textarea {
  background: #090d16;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
  text-overflow: ellipsis;
}

.add-agent-form { display: flex; gap: 10px; margin-bottom: 20px; }
.add-agent-form input { flex: 1; background: #090d16; border: 1px solid var(--border-color); color: var(--text-main); padding: 10px; border-radius: 8px; }
.add-agent-form select { background: #090d16; border: 1px solid var(--border-color); color: var(--text-main); padding: 10px; border-radius: 8px; }

.agents-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.agents-table th, .agents-table td { padding: 12px 14px; border-bottom: 1px solid var(--border-color); text-align: left; }

.badge-active { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; }
.badge-inactive { background: rgba(239, 68, 68, 0.2); color: #fca5a5; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; }

.qr-container {
  background: #ffffff;
  padding: 24px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  margin-bottom: 16px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.08);
}

.qr-container img {
  width: 100%;
  max-width: 240px;
  border-radius: 8px;
}

.qr-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #0f172a !important;
  font-size: 13.5px;
  font-weight: 600;
  text-align: center;
  padding: 20px;
}

.qr-loading span {
  color: #1e293b !important;
}

.qr-spinner {
  width: 36px;
  height: 36px;
  border: 4px solid rgba(37, 99, 235, 0.15);
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: qrSpin 0.9s linear infinite;
}

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

.qr-instruction {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
}

/* User Profile Badge & Logout Button */
.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 2px 7px;
  border-radius: 8px;
  flex-shrink: 0;
  height: 27px;
  transition: all 0.2s ease;
}

.user-profile-badge:hover {
  border-color: rgba(59, 130, 246, 0.4);
}

.user-avatar {
  width: 21px;
  height: 21px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 0 8px rgba(37, 99, 235, 0.4);
}

.user-details {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 11px;
  font-weight: 700;
  color: #f8fafc;
  max-width: 100px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 9px;
  color: #38bdf8;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.btn-logout {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  padding: 3px 6px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: 2px;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #ffffff;
}

/* Fullscreen Login Modal */
.login-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(12px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-modal-overlay.hidden {
  display: none !important;
}

.login-card {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  border-radius: 16px;
  width: 100%;
  max-width: 420px;
  padding: 32px;
}

.login-header {
  text-align: center;
  margin-bottom: 24px;
}

.brand-logo.large {
  width: 48px;
  height: 48px;
  font-size: 24px;
  margin: 0 auto 12px auto;
}

.login-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.login-header p {
  font-size: 12px;
  color: #94a3b8;
}

.login-card .form-group {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.login-card label {
  font-size: 11px;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 6px;
}

.login-card input {
  width: 100%;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  transition: all 0.2s ease;
}

.login-card input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

.login-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  margin-bottom: 16px;
  text-align: center;
}

.login-error.hidden {
  display: none !important;
}

.btn-primary.full-width {
  width: 100%;
  padding: 12px;
  font-size: 13.5px;
  font-weight: 700;
  justify-content: center;
}

/* Database Backup Modal Styles */
.backup-modal-content {
  width: 560px;
  max-width: 92vw;
}

.modal-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

.backup-status-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.backup-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.backup-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-card);
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.backup-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.backup-stat-val {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
}

.backup-stat-val.highlight {
  color: #38bdf8;
}

.backup-last-time {
  font-size: 12px;
  color: #94a3b8;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 10px;
  text-align: center;
  font-weight: 500;
}

.backup-actions-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.text-center-btn {
  text-align: center;
  justify-content: center;
  display: flex;
  text-decoration: none;
}

.backup-alert {
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  margin-bottom: 16px;
  line-height: 1.4;
}

.backup-alert.success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
}

.backup-alert.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.backup-alert.warning {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

.backup-settings-section {
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}

.section-title-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  margin-bottom: 14px;
}

.section-title-toggle h3 {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
}

.section-title-toggle span {
  font-size: 12px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.checkbox-group {
  margin-bottom: 14px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-main);
  cursor: pointer;
}

.smtp-collapsible {
  background: rgba(15, 23, 42, 0.5);
  padding: 14px;
  border-radius: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  margin-bottom: 14px;
}

.smtp-note {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 0;
  margin-bottom: 12px;
  line-height: 1.4;
}

.form-row {
  display: flex;
  gap: 10px;
}

.flex-1 {
  flex: 1;
}

.w-100-px {
  width: 100px;
}

.help-text {
  font-size: 11px;
  color: #64748b;
  margin-top: 4px;
  display: block;
}

/* Multi-Media Upload Dropzone & Previews */
.media-upload-dropzone {
  background: rgba(15, 23, 42, 0.6);
  border: 2px dashed rgba(56, 189, 248, 0.35);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 4px;
}

.media-upload-dropzone:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: var(--color-primary);
}

.dropzone-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.dropzone-icon {
  font-size: 24px;
}

.media-previews-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.media-preview-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-main);
  max-width: 100%;
}

.media-preview-badge img {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 4px;
}

.media-preview-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-width: 180px;
}

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

.media-preview-size {
  font-size: 10px;
  color: #94a3b8;
}

.media-remove-btn {
  background: none;
  border: none;
  color: #fca5a5;
  font-size: 14px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.media-remove-btn:hover {
  color: #ef4444;
}

/* Chat Drawer Attach Button & Preview Bar */
.attach-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  font-size: 16px;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.attach-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.15);
}

.attach-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.chat-media-preview-bar {
  display: flex;
  gap: 8px;
  padding: 8px 16px;
  background: #0f172a;
  border-top: 1px solid var(--border-color);
  overflow-x: auto;
}

.chat-media-preview-bar.hidden {
  display: none !important;
}

/* Chat Bubble Media Container */
.chat-media-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}

.chat-media-item-img {
  max-width: 100%;
  max-height: 240px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-doc-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.25);
  padding: 8px 12px;
  border-radius: 8px;
  color: #38bdf8;
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-doc-link:hover {
  background: rgba(0, 0, 0, 0.4);
  text-decoration: underline;
}

/* ── Toast Notification System ───────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 420px;
  width: calc(100vw - 40px);
}

.toast-item {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  font-size: 13.5px;
  line-height: 1.4;
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transition: all 0.3s ease;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.toast-item.toast-leaving {
  opacity: 0;
  transform: translateX(40px) scale(0.95);
}

.toast-item.toast-success {
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 15px rgba(16, 185, 129, 0.2);
}

.toast-item.toast-error {
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 15px rgba(239, 68, 68, 0.2);
}

.toast-item.toast-info {
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 15px rgba(59, 130, 246, 0.2);
}

.toast-item.toast-warning {
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 15px rgba(245, 158, 11, 0.2);
}

.toast-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 2px;
  letter-spacing: -0.01em;
}

.toast-body {
  color: var(--text-muted);
  font-size: 12.5px;
}

.toast-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
  line-height: 1;
}

.toast-close:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.1);
}

/* ── Floating Background Broadcast Widget ────────────────────────── */
.bcast-floating-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9000;
  width: 380px;
  max-width: calc(100vw - 32px);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 20px rgba(59, 130, 246, 0.25);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  animation: widgetSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes widgetSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.bcast-floating-widget:hover {
  border-color: rgba(59, 130, 246, 0.7);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.7), 0 0 25px rgba(59, 130, 246, 0.35);
  transform: translateY(-2px);
}

.bcast-floating-widget.hidden {
  display: none !important;
}

.bcast-floating-widget.complete {
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 20px rgba(16, 185, 129, 0.25);
}

.widget-icon-spin {
  font-size: 22px;
  flex-shrink: 0;
  animation: iconPulse 1.8s infinite ease-in-out;
}

@keyframes iconPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

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

.widget-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.widget-status {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.widget-progress-bg {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  margin-top: 6px;
  overflow: hidden;
}

.widget-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #10b981);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.widget-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.widget-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.widget-btn:hover {
  background: rgba(59, 130, 246, 0.3);
  border-color: rgba(59, 130, 246, 0.5);
}

.widget-btn.close-btn {
  padding: 5px 8px;
  color: var(--text-muted);
}

.widget-btn.close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

/* ── Header Search Bar ───────────────────────────────────────────── */
.header-search {
  position: relative;
  display: flex;
  align-items: center;
  margin: 0 10px;
  flex: 1;
  max-width: 210px;
  min-width: 130px;
}

.header-search .search-icon {
  position: absolute;
  left: 10px;
  font-size: 12px;
  color: var(--text-muted);
  pointer-events: none;
}

.header-search input {
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 6px 34px 6px 28px;
  color: var(--text-main);
  font-size: 12px;
  outline: none;
  transition: all 0.2s ease;
}

.header-search input:focus {
  background: rgba(15, 23, 42, 0.95);
  border-color: var(--primary);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.3);
}

.search-kbd {
  position: absolute;
  right: 8px;
  pointer-events: none;
  font-size: 10px;
  padding: 2px 4px;
}

/* ── Keyboard Shortcuts Modal & Keycaps ──────────────────────────── */
.hotkeys-modal-card {
  width: 960px !important;
  max-width: 95vw !important;
  max-height: 92vh;
}

.hotkeys-intro {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.4;
}

.hotkeys-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

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

.hotkey-group {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px 16px;
}

.hotkey-group h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hotkey-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 10px;
  background: rgba(30, 41, 59, 0.45);
  border-radius: 8px;
  margin-bottom: 6px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.hotkey-row:last-child {
  margin-bottom: 0;
}

.hotkey-label {
  color: #f8fafc;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.keycap-combo {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  white-space: nowrap;
}

.or-sep {
  font-size: 10px;
  color: var(--text-muted);
  margin: 0 2px;
  font-style: italic;
}

kbd {
  background: linear-gradient(180deg, #334155, #1e293b);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  color: #f8fafc;
  font-family: monospace, system-ui;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  display: inline-block;
  line-height: 1.2;
}

.lead-card.keyboard-highlight {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 18px rgba(59, 130, 246, 0.6), inset 0 0 8px rgba(59, 130, 246, 0.25) !important;
  transform: translateY(-3px) !important;
}

/* ── Modern Header Spotlight Trigger Button ──────────────────────── */
.header-spotlight-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(30, 41, 59, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 6px 14px;
  color: #94a3b8;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.header-spotlight-btn:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(59, 130, 246, 0.4);
  color: #f8fafc;
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.25);
  transform: translateY(-1px);
}

.spotlight-btn-icon {
  font-size: 14px;
  opacity: 0.8;
}

.spotlight-btn-text {
  font-weight: 500;
}

.spotlight-btn-kbd {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 10px;
  font-weight: 700;
  color: #cbd5e1;
}

/* ── Spotlight Command Palette Search Modal ─────────────────────── */
.spotlight-overlay {
  background: rgba(8, 14, 26, 0.78) !important;
  backdrop-filter: blur(16px) !important;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 10vh;
  z-index: 9999;
}

.spotlight-card {
  background: #0f172a;
  border: 1px solid rgba(59, 130, 246, 0.4);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.85), 0 0 40px rgba(59, 130, 246, 0.18);
  border-radius: 18px;
  width: 680px;
  max-width: 92vw;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: spotlightPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes spotlightPop {
  0% { opacity: 0; transform: scale(0.96) translateY(-12px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.spotlight-input-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(30, 41, 59, 0.4);
}

.spotlight-search-icon {
  font-size: 1.3rem;
  opacity: 0.75;
}

.spotlight-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 16px;
  font-weight: 500;
  color: #f8fafc;
}

.spotlight-input::placeholder {
  color: #64748b;
  font-size: 14.5px;
}

.spotlight-esc-badge {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 5px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
}

.spotlight-esc-badge:hover {
  color: #f8fafc;
  background: rgba(239, 68, 68, 0.3);
  border-color: rgba(239, 68, 68, 0.5);
}

.spotlight-results-container {
  max-height: 420px;
  overflow-y: auto;
  padding: 12px;
}

.spotlight-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 6px 6px 10px 6px;
}

.spotlight-quick-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 4px 8px 4px;
}

.spotlight-tag-btn {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 5px 12px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.spotlight-tag-btn:hover {
  background: rgba(59, 130, 246, 0.25);
  border-color: rgba(59, 130, 246, 0.5);
  color: #38bdf8;
}

.spotlight-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.spotlight-item:hover,
.spotlight-item.active {
  background: rgba(59, 130, 246, 0.16);
  border-color: rgba(59, 130, 246, 0.35);
  transform: translateX(2px);
}

.spotlight-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.spotlight-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.spotlight-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.spotlight-name {
  font-size: 14px;
  font-weight: 600;
  color: #f8fafc;
}

.spotlight-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.spotlight-item-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.spotlight-stage-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.8);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.spotlight-deal-badge {
  font-size: 12px;
  font-weight: 700;
  color: #10b981;
}

.spotlight-empty-state {
  text-align: center;
  padding: 36px 20px;
  color: var(--text-muted);
}

.spotlight-empty-icon {
  font-size: 2.2rem;
  opacity: 0.5;
  display: block;
  margin-bottom: 8px;
}

.spotlight-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: rgba(15, 23, 42, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
  color: var(--text-muted);
}

.spotlight-hints {
  display: flex;
  align-items: center;
  gap: 14px;
}

.spotlight-hints span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.spotlight-count-badge {
  font-weight: 600;
  color: #38bdf8;
}

/* Header Responsive Behavior for Seamless Alignment & Zero Overflow */
@media (max-width: 1680px) {
  #exportDataBtn .btn-label,
  #csvUploadBtn .btn-label,
  #broadcastBtn .btn-label {
    display: none;
  }
  .header-stats {
    padding: 2px 8px;
    gap: 8px;
  }
  .stat-label {
    font-size: 7.5px;
  }
  .stat-value {
    font-size: 11.5px;
  }
}

@media (max-width: 1440px) {
  .view-toggle-label {
    display: none;
  }
  .view-toggle-btn {
    padding: 3px 6px;
  }
  .header-spotlight-btn .spotlight-btn-kbd {
    display: none;
  }
  .header-spotlight-btn {
    max-width: 130px;
  }
  .user-role {
    display: none;
  }
  .user-name {
    max-width: 75px;
  }
  .header-center {
    max-width: 360px;
  }
}

@media (max-width: 1300px) {
  #addLeadBtn .btn-label,
  #aiAutoPilotBtn .btn-label {
    display: none;
  }
  .header-stats .stat-box:nth-child(3) {
    display: none; /* Hide Conv Rate, retain Pipeline & Realized */
  }
  .status-pill .qr-btn-hint {
    display: none;
  }
  .header-center {
    max-width: 280px;
  }
}

@media (max-width: 1120px) {
  .header-stats {
    display: none !important;
  }
  .header-spotlight-btn .spotlight-btn-text {
    display: none;
  }
  .user-details {
    display: none;
  }
}

/* Real-Time Live Typing Indicator */
.typing-indicator-bubble {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  margin: 8px 0;
  background: rgba(30, 41, 59, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 18px 18px 18px 4px;
  width: fit-content;
  max-width: 220px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  animation: fadeInTyping 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInTyping {
  from { opacity: 0; transform: translateY(6px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.typing-indicator-avatar {
  font-size: 14px;
}

.typing-indicator-content {
  display: flex;
  align-items: center;
  gap: 6px;
}

.typing-text {
  font-size: 12px;
  font-weight: 500;
  color: #94a3b8;
}

.typing-dots {
  display: flex;
  align-items: center;
  gap: 4px;
}

.typing-dots .dot {
  width: 6px;
  height: 6px;
  background-color: #3b82f6;
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dots .dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dots .dot:nth-child(2) { animation-delay: -0.16s; }
.typing-dots .dot:nth-child(3) { animation-delay: 0s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0); opacity: 0.3; }
  40% { transform: scale(1); opacity: 1; background-color: #60a5fa; }
}

/* --- AI COPILOT SUGGESTED REPLY CHIPS & FOLLOW-UP BUTTON --- */
.btn-small-followup {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.3));
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  height: 28px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-small-followup:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.35), rgba(217, 119, 6, 0.5));
  border-color: #f59e0b;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.chat-suggestions-bar {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(148, 163, 184, 0.15);
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: fadeIn 0.2s ease-in-out;
}

.chat-suggestions-bar.hidden {
  display: none !important;
}

.suggestions-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 600;
  color: #38bdf8;
  letter-spacing: 0.3px;
}

.suggestions-refresh-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 11px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

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

.suggestions-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.suggestion-chip {
  background: rgba(30, 41, 59, 0.85);
  color: #e2e8f0;
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 6px 12px;
  border-radius: 18px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.suggestion-chip:hover {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(59, 130, 246, 0.35));
  border-color: #38bdf8;
  color: #ffffff;
  transform: translateY(-1.5px);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.35);
}

.suggestion-chip:active {
  transform: scale(0.97);
}

/* ==========================================================================
   AGENT PRODUCTIVITY & CHAT EXPERIENCE STYLES
   ========================================================================== */

/* 1. WhatsApp Delivery Status Ticks */
.msg-tick {
  display: inline-flex;
  align-items: center;
  margin-left: 5px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: -2px;
  user-select: none;
  opacity: 1 !important;
}

.msg-tick.sent {
  color: rgba(255, 255, 255, 0.65) !important;
}

.msg-tick.delivered {
  color: #ffffff !important;
  text-shadow: 0 0 4px rgba(255, 255, 255, 0.4);
}

.msg-tick.read {
  color: #38bdf8 !important; /* WhatsApp Vibrant Blue */
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.8) !important;
  font-weight: 900;
}

.msg-tick.failed {
  color: #f87171 !important;
  letter-spacing: 0;
  font-weight: 900;
}

/* 2. Sound Alerts & Reminders Header Tools */
.sound-toggle-btn.muted {
  opacity: 0.55;
  filter: grayscale(0.85);
}

.reminders-badge-btn {
  position: relative;
}

.reminders-count-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  line-height: 17px;
  border-radius: 999px;
  padding: 0 4px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.5);
  animation: pulseBadge 2s infinite;
}

@keyframes pulseBadge {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.btn-small-remind {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-small-remind:hover {
  background: rgba(245, 158, 11, 0.28);
  border-color: #f59e0b;
  color: #ffffff;
}

/* 3. Scheduled Reminder Banner in Drawer */
.reminder-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(217, 119, 6, 0.1));
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 6px;
  margin: 6px 12px;
  padding: 5px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

.reminder-banner-content {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.reminder-banner-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.reminder-banner-text {
  font-size: 12px;
  color: #fef3c7;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reminder-due-tag {
  background: rgba(245, 158, 11, 0.3);
  color: #fbbf24;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 600;
  margin-left: 6px;
}

.reminder-banner-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-reminder-done {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-reminder-done:hover {
  background: #10b981;
  color: #ffffff;
}

.btn-reminder-clear {
  background: transparent;
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 3px 6px;
  border-radius: 5px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-reminder-clear:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border-color: #ef4444;
}

/* Kanban Lead Card Reminder Pill */
.lead-reminder-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
  font-size: 11px;
  border-radius: 6px;
  padding: 2px 6px;
  margin-top: 6px;
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-reminder-pill.overdue {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  font-weight: 600;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.25);
}

/* 4. Drawer Navigation Tabs (WhatsApp Chat vs Team Notes) */
.drawer-nav-tabs {
  display: flex;
  background: rgba(15, 23, 42, 0.85);
  border-bottom: 1px solid var(--border-color);
  padding: 0 12px;
  gap: 6px;
}

.drawer-nav-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  padding: 9px 14px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.18s ease;
}

.drawer-nav-tab:hover {
  color: var(--text-main);
}

.drawer-nav-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.notes-count-badge {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
}

.drawer-tab-view {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
}

.drawer-tab-view.hidden {
  display: none !important;
}

/* 5. Internal Team Notes View */
.drawer-notes-view {
  padding: 14px;
  background: rgba(15, 23, 42, 0.5);
  overflow-y: auto;
  gap: 12px;
}

.notes-banner-hint {
  background: rgba(234, 179, 8, 0.1);
  border: 1px dashed rgba(234, 179, 8, 0.35);
  color: #fef08a;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 11.5px;
  line-height: 1.45;
}

.new-note-form {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.new-note-form textarea {
  width: 100%;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-main);
  padding: 8px 10px;
  font-size: 12.5px;
  resize: vertical;
  outline: none;
  font-family: inherit;
}

.new-note-form textarea:focus {
  border-color: #f59e0b;
}

.new-note-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.note-author-hint {
  font-size: 11px;
  color: var(--text-muted);
}

.note-author-hint strong {
  color: #f59e0b;
}

.btn-save-note {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: none;
  color: #000000;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-save-note:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.notes-stream {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.notes-empty-state {
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  padding: 24px 12px;
  background: rgba(15, 23, 42, 0.4);
  border-radius: 8px;
  border: 1px dashed var(--border-color);
}

/* Sticky Yellow Note Card */
.note-card {
  background: linear-gradient(145deg, #fef3c7, #fde68a);
  color: #1e293b;
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  border-left: 5px solid #d97706;
  position: relative;
  transition: transform 0.15s ease;
}

.note-card:hover {
  transform: translateY(-2px);
}

.note-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 11px;
}

.note-agent-badge {
  font-weight: 700;
  color: #92400e;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.note-timestamp {
  color: #78350f;
  font-size: 10.5px;
}

.btn-delete-note {
  background: transparent;
  border: none;
  color: #92400e;
  font-size: 13px;
  cursor: pointer;
  opacity: 0.6;
  padding: 0 4px;
  transition: opacity 0.15s ease;
}

.btn-delete-note:hover {
  opacity: 1;
  color: #b91c1c;
}

.note-body {
  font-size: 12.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  color: #0f172a;
}

/* 6. Snippet Manager & Hotkeys Bar */
.hotkey-manage-btn {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.35);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  margin-left: auto;
  transition: all 0.15s ease;
}

.hotkey-manage-btn:hover {
  background: #3b82f6;
  color: #ffffff;
}

.snippet-manager-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 75vh;
  overflow-y: auto;
}

.snippet-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.snippet-toolbar input {
  flex: 1;
  min-width: 220px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-main);
  outline: none;
}

.snippet-toolbar input:focus {
  border-color: var(--primary);
}

.snippet-category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.category-chip {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.category-chip.active,
.category-chip:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: #3b82f6;
  color: #ffffff;
}

.snippets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}

.snippet-card {
  background: rgba(30, 41, 59, 0.75);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.18s ease;
}

.snippet-card:hover {
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-1.5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

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

.snippet-shortcut-badge {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  font-family: monospace;
  font-weight: 700;
  font-size: 11.5px;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.snippet-cat-badge {
  font-size: 10.5px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: 4px;
}

.snippet-card-title {
  font-size: 13px;
  font-weight: 600;
  color: #f8fafc;
}

.snippet-card-body {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.45;
  max-height: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  background: rgba(15, 23, 42, 0.5);
  padding: 6px 8px;
  border-radius: 6px;
}

.snippet-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 6px;
}

.btn-snippet-insert {
  background: #3b82f6;
  border: none;
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-snippet-insert:hover {
  background: #2563eb;
}

.snippet-action-icons {
  display: flex;
  gap: 6px;
}

.btn-snippet-icon {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  padding: 2px 4px;
}

.btn-snippet-icon:hover {
  color: var(--text-main);
}

.btn-snippet-icon.delete:hover {
  color: #f87171;
}

/* Snippet Inline Editor Form */
.snippet-editor-form {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.snippet-editor-form h3 {
  font-size: 14px;
  color: #38bdf8;
}

.form-row-grid {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 10px;
}

.snippet-editor-form input,
.snippet-editor-form select,
.snippet-editor-form textarea {
  width: 100%;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-main);
  padding: 8px 10px;
  font-size: 12.5px;
  font-family: inherit;
  outline: none;
}

.snippet-editor-form input:focus,
.snippet-editor-form select:focus,
.snippet-editor-form textarea:focus {
  border-color: #38bdf8;
}

.snippet-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* 7. Reminder Modal Styles */
.reminder-modal-lead-info {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.6);
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 13px;
}

.reminder-phone-pill {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-family: monospace;
}

.reminder-presets {
  margin-bottom: 14px;
}

.reminder-presets label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: block;
}

.preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.preset-chip {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border-color);
  color: #e2e8f0;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 11.5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.preset-chip:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: #f59e0b;
  color: #ffffff;
}

.reminder-form-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.danger-text {
  color: #f87171 !important;
}

.danger-text:hover {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: #ef4444 !important;
}

/* =========================================================
   PIPELINE MANAGEMENT: TABLE / SPREADSHEET VIEW & EXPORT
   ========================================================= */

/* 1. Header View Switcher Toggle */
.view-mode-toggle {
  display: inline-flex;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-color);
  border-radius: 7px;
  padding: 2px;
  gap: 2px;
  align-items: center;
}

.view-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.18s ease;
}

.view-toggle-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.view-toggle-btn.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.35);
}

/* 2. Table Workspace Layout */
.table-workspace {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 72px);
  width: 100%;
  overflow: hidden;
  background: var(--bg-main);
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(15, 23, 42, 0.65);
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 10px;
}

.table-toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.table-search-box {
  display: flex;
  align-items: center;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0 10px;
  height: 34px;
  min-width: 220px;
}

.table-search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-size: 12.5px;
  width: 100%;
  padding-left: 6px;
}

.table-filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.table-filter-label {
  color: var(--text-muted);
  font-weight: 500;
}

.table-filter-select {
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: 7px;
  padding: 5px 9px;
  font-size: 12px;
  outline: none;
  cursor: pointer;
}

.table-filter-select:hover {
  border-color: rgba(14, 165, 233, 0.5);
}

.btn-reset-filters {
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 5px 10px;
  border-radius: 7px;
  font-size: 11.5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-reset-filters:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.btn-table-action {
  background: rgba(14, 165, 233, 0.15);
  border: 1px solid rgba(14, 165, 233, 0.35);
  color: var(--primary);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.18s ease;
}

.btn-table-action:hover {
  background: var(--primary);
  color: #ffffff;
}

/* 3. Bulk Actions Floating Bar */
.bulk-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
  border-bottom: 2px solid var(--primary);
  padding: 9px 20px;
  animation: slideDown 0.2s ease-out;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.bulk-count-box {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #38bdf8;
}

.bulk-check-icon {
  background: var(--primary);
  color: #ffffff;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

.bulk-action-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.bulk-control-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.bulk-control-item select {
  background: #0f172a;
  border: 1px solid var(--border-color);
  color: #f8fafc;
  padding: 5px 9px;
  border-radius: 7px;
  font-size: 12px;
  outline: none;
}

.btn-bulk-apply {
  background: rgba(14, 165, 233, 0.2);
  border: 1px solid var(--primary);
  color: #38bdf8;
  padding: 5px 12px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-bulk-apply:hover {
  background: var(--primary);
  color: #ffffff;
}

.btn-bulk-delete {
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  padding: 5px 12px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-bulk-delete:hover {
  background: #ef4444;
  color: #ffffff;
}

.btn-bulk-cancel {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
  padding: 4px;
}

.btn-bulk-cancel:hover {
  color: var(--text-main);
}

/* 4. Dense Data Table Styling */
.table-grid-scroll {
  flex: 1;
  overflow: auto;
  border-bottom: 1px solid var(--border-color);
  background: rgba(10, 15, 30, 0.5);
}

.dense-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  white-space: nowrap;
}

.dense-data-table th {
  position: sticky;
  top: 0;
  background: #0b1120;
  color: #94a3b8;
  padding: 10px 14px;
  text-align: left;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border-color);
  z-index: 10;
  user-select: none;
}

.dense-data-table th.th-checkbox {
  width: 40px;
  text-align: center;
  padding-left: 10px;
  padding-right: 10px;
}

.dense-data-table th.th-sortable {
  cursor: pointer;
}

.dense-data-table th.th-sortable:hover {
  color: var(--primary);
  background: #0f172a;
}

.dense-data-table th.th-num {
  text-align: right;
}

.sort-icon {
  font-size: 10px;
  margin-left: 4px;
  opacity: 0.6;
}

.th-sortable.sorted-asc .sort-icon {
  opacity: 1;
  color: #38bdf8;
  content: '▲';
}

.th-sortable.sorted-desc .sort-icon {
  opacity: 1;
  color: #38bdf8;
  content: '▼';
}

.dense-data-table td {
  padding: 8px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  vertical-align: middle;
}

.dense-data-table tbody tr {
  transition: background 0.12s ease;
}

.dense-data-table tbody tr:hover {
  background: rgba(14, 165, 233, 0.06);
}

.dense-data-table tbody tr.row-selected {
  background: rgba(14, 165, 233, 0.12);
}

.table-cell-lead {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.table-lead-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.table-lead-info {
  display: flex;
  flex-direction: column;
}

.table-lead-name {
  font-weight: 600;
  color: #f1f5f9;
}

.table-lead-phone {
  font-size: 11px;
  color: var(--text-muted);
}

.table-stage-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.table-stage-badge.stage-new { background: rgba(56, 189, 248, 0.15); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.3); }
.table-stage-badge.stage-hot { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.table-stage-badge.stage-warm { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.table-stage-badge.stage-cold { background: rgba(148, 163, 184, 0.15); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.3); }
.table-stage-badge.stage-docs { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }
.table-stage-badge.stage-trn { background: rgba(20, 184, 166, 0.15); color: #2dd4bf; border: 1px solid rgba(20, 184, 166, 0.3); }
.table-stage-badge.stage-paid { background: rgba(34, 197, 94, 0.15); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.3); }
.table-stage-badge.stage-dead { background: rgba(100, 116, 139, 0.15); color: #94a3b8; border: 1px solid rgba(100, 116, 139, 0.3); }

.table-agent-pill {
  display: inline-flex;
  align-items: center;
  background: rgba(30, 41, 59, 0.7);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11px;
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.table-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.table-row-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: #cbd5e1;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.table-row-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* 5. Table Footer Totals */
.table-footer {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
  padding: 10px 20px;
  background: #090e1a;
  border-top: 1px solid var(--border-color);
  font-size: 12.5px;
  color: var(--text-muted);
}

.table-footer-stat strong {
  color: #f1f5f9;
  margin-left: 4px;
}

/* 6. Export Modal Cards Grid */
.export-modal-card {
  max-width: 640px !important;
}

.export-modal-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 18px;
  line-height: 1.5;
}

.export-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.export-option-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(30, 41, 59, 0.55);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  transition: all 0.18s ease;
}

.export-option-card:hover {
  border-color: rgba(14, 165, 233, 0.45);
  background: rgba(30, 41, 59, 0.85);
}

.export-card-icon {
  font-size: 26px;
  background: rgba(14, 165, 233, 0.12);
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.export-card-body {
  flex: 1;
}

.export-card-body h4 {
  margin: 0 0 4px 0;
  font-size: 14.5px;
  color: #f1f5f9;
}

.export-card-body p {
  margin: 0 0 12px 0;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.export-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-export-option {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-export-option.primary {
  background: var(--primary);
  border: 1px solid var(--primary);
  color: #ffffff;
}

.btn-export-option.primary:hover {
  background: #0284c7;
}

.btn-export-option.secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: #cbd5e1;
}

.btn-export-option.secondary:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

/* ─── Uploaded Leads Badge & Row Styles ────────────────────────── */
.lead-phone-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 8px;
}

.lead-phone-row .lead-phone {
  margin-bottom: 0 !important;
}

.uploaded-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(99, 102, 241, 0.16);
  border: 1px solid rgba(129, 140, 248, 0.4);
  color: #a5b4fc;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: 0.2px;
  white-space: nowrap;
  vertical-align: middle;
  line-height: 1.3;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  transition: all 0.2s ease;
}

.uploaded-badge:hover {
  background: rgba(99, 102, 241, 0.28);
  border-color: rgba(129, 140, 248, 0.7);
  color: #e0e7ff;
}

.uploaded-badge.table-badge {
  font-size: 10px;
  padding: 1.5px 6px;
  border-radius: 5px;
}

.chat-header .uploaded-badge {
  font-size: 11px;
  padding: 2px 8px;
}

/* ─── Two-Tier Header Styling Enhancements ───────────────────────── */
.brand-sub {
  font-size: 9.5px;
  color: #38bdf8;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 600;
  display: block;
  margin-top: 1px;
  opacity: 0.85;
}

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

.btn-top-util {
  height: 26px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 6px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-top-util:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.4);
  color: #ffffff;
}

.top-util-icons {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-icon-top {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  font-size: 12px;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.btn-icon-top:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  transform: translateY(-1px);
}

.top-admin-group {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-left: 6px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.header-main-center {
  flex: 1;
  max-width: 480px;
  display: flex;
  justify-content: center;
}

.header-main-center .header-spotlight-btn {
  width: 100%;
  max-width: 420px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #94a3b8;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.header-main-center .header-spotlight-btn:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(59, 130, 246, 0.5);
  color: #f1f5f9;
}

.header-main-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-main-action {
  height: 32px;
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-action-icon {
  height: 32px;
  padding: 4px 11px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 7px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-action-icon:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.4);
  color: #ffffff;
  transform: translateY(-1px);
}

/* ─── Extra Cold View & Workspace ────────────────────────────────── */
.extra-cold-tab {
  background: rgba(56, 189, 248, 0.08) !important;
  border-color: rgba(56, 189, 248, 0.25) !important;
  color: #38bdf8 !important;
}

.extra-cold-tab:hover {
  background: rgba(56, 189, 248, 0.18) !important;
  border-color: rgba(56, 189, 248, 0.5) !important;
}

.extra-cold-tab.active {
  background: rgba(56, 189, 248, 0.28) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}

.extra-cold-badge {
  background: rgba(56, 189, 248, 0.25);
  color: #38bdf8;
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: 4px;
  font-weight: 700;
}

.extra-cold-workspace {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 18px 24px;
  overflow-y: auto;
  gap: 16px;
  animation: fadeIn 0.2s ease;
}

.extra-cold-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.85), rgba(30, 41, 59, 0.65));
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 12px;
  padding: 16px 22px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  flex-wrap: wrap;
  gap: 14px;
}

.extra-cold-title-area {
  display: flex;
  align-items: center;
  gap: 14px;
}

.extra-cold-badge-icon {
  font-size: 26px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.2);
}

.extra-cold-header h2 {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.01em;
}

.extra-cold-subtitle {
  font-size: 12px;
  color: #94a3b8;
  margin: 3px 0 0 0;
  max-width: 600px;
  line-height: 1.4;
}

.extra-cold-stats-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ec-stat-pill {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  color: #cbd5e1;
}

.ec-stat-pill strong {
  color: #38bdf8;
  font-size: 13px;
  margin-left: 2px;
}

.btn-restore-cold {
  padding: 4px 10px;
  background: rgba(52, 211, 153, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.4);
  color: #34d399;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-right: 6px;
}

.btn-restore-cold:hover {
  background: rgba(52, 211, 153, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(52, 211, 153, 0.3);
}

.btn-small-cold {
  padding: 3px 9px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-small-cold:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: rgba(56, 189, 248, 0.6);
  color: #ffffff;
}

.btn-small-cold.btn-cold-restoring {
  background: rgba(52, 211, 153, 0.15) !important;
  border-color: rgba(52, 211, 153, 0.4) !important;
  color: #34d399 !important;
}

.btn-small-cold.btn-cold-restoring:hover {
  background: rgba(52, 211, 153, 0.3) !important;
  color: #ffffff !important;
}

/* ─── Broadcast Dynamic Tags & Control Panel ─────────────────────── */
.bcast-tags-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.bcast-tags-hint {
  font-size: 11px;
  color: #38bdf8;
  font-weight: 500;
}

.bcast-tags-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.tag-chip {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #93c5fd;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.tag-chip:hover {
  background: rgba(59, 130, 246, 0.3);
  color: #ffffff;
  border-color: rgba(59, 130, 246, 0.6);
  transform: translateY(-1px);
}

.bcast-control-panel {
  display: flex;
  gap: 10px;
  margin: 12px 0 6px 0;
  padding: 10px;
  background: rgba(15, 23, 42, 0.7);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: fadeIn 0.2s ease;
}

.btn-bcast-control {
  flex: 1;
  padding: 8px 14px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-bcast-pause {
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.4);
  color: #fbbf24;
}

.btn-bcast-pause:hover {
  background: rgba(251, 191, 36, 0.3);
  color: #ffffff;
}

.btn-bcast-stop {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.btn-bcast-stop:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #ffffff;
}

/* Floating Widget Pause / Stop controls */
.widget-btn.pause-btn {
  background: rgba(251, 191, 36, 0.18) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(251, 191, 36, 0.4) !important;
}

.widget-btn.pause-btn:hover {
  background: rgba(251, 191, 36, 0.35) !important;
  color: #ffffff !important;
}

.widget-btn.stop-btn {
  background: rgba(239, 68, 68, 0.18) !important;
  color: #f87171 !important;
  border: 1px solid rgba(239, 68, 68, 0.4) !important;
}

.widget-btn.stop-btn:hover {
  background: rgba(239, 68, 68, 0.35) !important;
  color: #ffffff !important;
}

/* Password Input with Eye Visibility Toggle */
.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-input-wrapper input {
  width: 100%;
  padding-right: 42px !important;
}

.btn-toggle-password {
  position: absolute;
  right: 8px;
  background: transparent;
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity 0.2s ease, transform 0.15s ease;
  user-select: none;
}

.btn-toggle-password:hover {
  opacity: 1;
  transform: scale(1.15);
}

/* ─── WhatsApp Broadcast Campaigns Manager Workspace ───────────────────────── */
.campaigns-workspace {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 22px 28px;
  overflow-y: auto;
  gap: 20px;
  animation: fadeIn 0.2s ease;
}

.campaigns-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.75));
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 14px;
  padding: 18px 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  flex-wrap: wrap;
  gap: 16px;
}

.campaigns-title-group h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.campaigns-subtitle {
  margin: 4px 0 0 0;
  font-size: 0.85rem;
  color: #94a3b8;
}

.campaigns-actions-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.campaigns-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.camp-stat-card {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.camp-stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.16);
}

.camp-stat-card.highlight-green {
  border-color: rgba(16, 185, 129, 0.3);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(30, 41, 59, 0.5));
}

.camp-stat-card.highlight-blue {
  border-color: rgba(56, 189, 248, 0.3);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.08), rgba(30, 41, 59, 0.5));
}

.camp-stat-card.highlight-purple {
  border-color: rgba(168, 85, 247, 0.3);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.08), rgba(30, 41, 59, 0.5));
}

.camp-stat-icon {
  font-size: 26px;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.camp-stat-info {
  display: flex;
  flex-direction: column;
}

.camp-stat-label {
  font-size: 0.8rem;
  color: #94a3b8;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.camp-stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: #f1f5f9;
  margin-top: 2px;
}

.campaigns-list-wrapper {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 20px 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.campaigns-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.campaigns-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Individual Campaign Card */
.campaign-card {
  background: rgba(30, 41, 59, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.campaign-card:hover {
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

.campaign-card.status-active {
  border-left: 4px solid #38bdf8;
}

.campaign-card.status-completed {
  border-left: 4px solid #10b981;
}

.campaign-card.status-paused {
  border-left: 4px solid #fbbf24;
}

.campaign-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.camp-title-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.camp-title-meta h4 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #f8fafc;
}

.camp-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: #94a3b8;
  flex-wrap: wrap;
}

.camp-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

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

.camp-status-badge.running {
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  animation: pulseGlow 1.5s infinite alternate;
}

.camp-status-badge.paused {
  background: rgba(251, 191, 36, 0.16);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: #fbbf24;
}

.camp-progress-track {
  width: 100%;
  height: 8px;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.camp-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #0284c7, #10b981);
  border-radius: 999px;
  transition: width 0.4s ease;
}

.camp-progress-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: #cbd5e1;
  margin-top: 4px;
}

.camp-msg-preview-box {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.84rem;
  color: #94a3b8;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 70px;
  overflow-y: auto;
}

.camp-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  flex-wrap: wrap;
}

.btn-camp-view {
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-camp-view:hover {
  background: rgba(56, 189, 248, 0.28);
  border-color: #38bdf8;
  color: #ffffff;
}

.btn-camp-delete {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #f87171;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-camp-delete:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ffffff;
}

.camp-empty-state {
  text-align: center;
  padding: 48px 24px;
  color: #94a3b8;
}

.camp-empty-state-icon {
  font-size: 42px;
  margin-bottom: 12px;
  opacity: 0.8;
}

.camp-empty-state h4 {
  margin: 0 0 6px 0;
  color: #f1f5f9;
  font-size: 1.1rem;
}

/* ─── Campaign Studio (Pixel-Perfect from experts.taxamicus.in) ──────────────── */
.campaign-studio-modal {
  max-width: 1140px !important;
  width: 95vw !important;
  border-radius: 16px !important;
  background: #0d1322 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 25px 65px rgba(0, 0, 0, 0.7) !important;
  padding: 0 !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 92vh;
}

.cs-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 22px 28px 16px 28px;
  background: #090e1a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  gap: 20px;
  flex-wrap: wrap;
}

.cs-header-left {
  flex: 1;
  min-width: 300px;
}

.cs-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cs-title {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 700;
  color: #2dd4bf;
  letter-spacing: -0.02em;
}

.cs-subtitle {
  margin: 4px 0 16px 0;
  font-size: 0.88rem;
  color: #94a3b8;
}

.cs-tabs-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.cs-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: #94a3b8;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 6px 2px 10px 2px;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}

.cs-tab-btn:hover {
  color: #f1f5f9;
}

.cs-tab-btn.active {
  color: #2dd4bf;
  border-bottom-color: #2dd4bf;
}

.cs-header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.cs-wa-status-card {
  background: rgba(30, 58, 138, 0.25);
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: 8px;
  padding: 7px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.84rem;
  color: #93c5fd;
}

.cs-wa-status-card strong {
  color: #ffffff;
  font-family: monospace;
  font-size: 0.88rem;
  margin-left: 2px;
}

.cs-wa-switch-btn {
  background: transparent;
  border: none;
  color: #f87171;
  font-weight: 600;
  font-size: 0.84rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.cs-wa-switch-btn:hover {
  color: #ef4444;
}

.cs-audience-action-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cs-matched-pill {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 700;
  font-size: 0.84rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cs-matched-pill:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: #10b981;
}

.cs-inspect-btn {
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  border-radius: 8px;
  padding: 6px 14px;
  font-weight: 600;
  font-size: 0.84rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cs-inspect-btn:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: #38bdf8;
  color: #ffffff;
}

.cs-body {
  padding: 22px 28px;
  overflow-y: auto;
  max-height: calc(92vh - 120px);
}

.cs-tab-pane {
  animation: fadeIn 0.2s ease;
}

.cs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

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

.cs-card {
  background: rgba(19, 28, 49, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 16px;
}

.cs-card-header h4 {
  margin: 0 0 12px 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: -0.01em;
}

.cs-filters-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.cs-form-field {
  display: flex;
  flex-direction: column;
}

.cs-form-field label {
  font-size: 0.74rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.cs-form-field select {
  width: 100%;
  padding: 8px 10px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #f1f5f9;
  font-size: 0.84rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.cs-form-field select:focus {
  border-color: #38bdf8;
}

.cs-media-dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.4);
  transition: all 0.2s ease;
}

.cs-media-dropzone:hover {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.05);
}

.cs-camera-icon {
  font-size: 26px;
  display: block;
  margin-bottom: 6px;
}

.cs-dropzone-text {
  font-size: 0.84rem;
  color: #94a3b8;
}

/* Right Studio Panel */
.cs-card-studio {
  background: rgba(19, 28, 49, 0.85);
  border-color: rgba(56, 189, 248, 0.2);
}

.cs-tag-groups {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.cs-tag-group-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 4px;
}

.cs-label-contact { color: #38bdf8; }
.cs-label-task { color: #c084fc; }
.cs-label-accounts { color: #fbbf24; }
.cs-label-antiban { color: #34d399; }

.cs-tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cs-chip {
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.cs-chip:hover {
  transform: translateY(-1px);
}

.cs-chip-blue {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.35);
  color: #7dd3fc;
}

.cs-chip-blue:hover {
  background: rgba(56, 189, 248, 0.3);
  color: #ffffff;
}

.cs-chip-purple {
  background: rgba(168, 85, 247, 0.15);
  border-color: rgba(168, 85, 247, 0.35);
  color: #d8b4fe;
}

.cs-chip-purple:hover {
  background: rgba(168, 85, 247, 0.3);
  color: #ffffff;
}

.cs-chip-amber {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fde68a;
}

.cs-chip-amber:hover {
  background: rgba(245, 158, 11, 0.3);
  color: #ffffff;
}

.cs-chip-green {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
}

.cs-chip-green:hover {
  background: rgba(16, 185, 129, 0.3);
  color: #ffffff;
}

.cs-editor-wrap {
  margin-top: 10px;
}

.cs-textarea {
  width: 100%;
  min-height: 110px;
  background: rgba(11, 17, 32, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 12px;
  color: #f8fafc;
  font-size: 0.88rem;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.cs-textarea:focus {
  border-color: #38bdf8;
}

/* WhatsApp Bubble Live Preview Simulation */
.cs-preview-section {
  margin-top: 14px;
}

.cs-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.cs-preview-lead-name {
  font-size: 0.76rem;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cs-preview-badge {
  font-size: 0.72rem;
  color: #94a3b8;
  font-style: italic;
}

.cs-wa-chat-canvas {
  background: #0b141a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 14px;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 0);
  background-size: 16px 16px;
}

.cs-wa-bubble {
  background: #005c4b;
  color: #e9edef;
  border-radius: 8px 8px 2px 8px;
  padding: 10px 14px;
  max-width: 90%;
  align-self: flex-start;
  font-size: 0.85rem;
  line-height: 1.45;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  position: relative;
  word-break: break-word;
}

.cs-wa-bubble-media {
  margin-bottom: 8px;
  max-width: 260px;
  border-radius: 6px;
  overflow: hidden;
}

.cs-wa-bubble-media img {
  width: 100%;
  height: auto;
  display: block;
}

.cs-wa-bubble-text {
  white-space: pre-wrap;
}

.cs-wa-bubble-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 4px;
}

.cs-wa-ticks {
  color: #53bdeb;
  font-weight: 700;
}

.cs-dispatch-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.cs-camp-name-field {
  flex: 1;
}

.cs-input-title {
  width: 100%;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #f1f5f9;
  font-size: 0.88rem;
  outline: none;
}

.cs-send-btn {
  padding: 10px 22px;
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: 8px;
  white-space: nowrap;
}

.cs-progress-area {
  margin-top: 14px;
}

.cs-shield-notice {
  margin-top: 12px;
  font-size: 0.78rem;
  padding: 8px 12px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 6px;
  color: #34d399;
}

/* Secondary Tab Panes Styling (Automations, Blocked, History) */
.cs-pane-header {
  margin-bottom: 20px;
}

.cs-empty-text {
  padding: 48px 20px;
  text-align: center;
  color: #94a3b8;
  font-size: 0.92rem;
}

.cs-pane-footer {
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.cs-link-btn {
  background: transparent;
  border: none;
  color: #38bdf8;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.cs-link-btn:hover {
  text-decoration: underline;
  color: #60a5fa;
}

/* Blocked Clients Pane */
.cs-blocked-header-box {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 16px;
  flex-wrap: wrap;
}

.cs-blocked-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #f87171;
}

.cs-blocked-sub {
  margin: 4px 0 0 0;
  font-size: 0.84rem;
  color: #94a3b8;
  max-width: 580px;
}

.cs-blocked-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cs-search-input {
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #f1f5f9;
  font-size: 0.84rem;
  width: 220px;
  outline: none;
}

.cs-btn-red {
  background: #ef4444 !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
  white-space: nowrap;
}

.cs-btn-red:hover {
  background: #dc2626 !important;
}

.cs-table-wrapper {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
}

.cs-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.cs-data-table th {
  background: rgba(255, 255, 255, 0.04);
  color: #94a3b8;
  padding: 10px 14px;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
}

.cs-data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
}

.cs-empty-td {
  text-align: center;
  padding: 36px 14px !important;
  color: #94a3b8;
}

.cs-btn-unblock {
  background: transparent;
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38bdf8;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cs-btn-unblock:hover {
  background: rgba(56, 189, 248, 0.2);
  color: #ffffff;
}

/* Automations & History Lists */
.cs-list-container, .cs-history-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cs-automation-card, .cs-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 14px 18px;
  transition: all 0.2s ease;
}

.cs-automation-card:hover, .cs-history-item:hover {
  border-color: rgba(45, 212, 191, 0.3);
  background: rgba(15, 23, 42, 0.85);
}

.cs-auto-info, .cs-hist-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cs-auto-title, .cs-hist-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f1f5f9;
}

.cs-auto-meta, .cs-hist-sub {
  font-size: 0.8rem;
  color: #94a3b8;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.cs-auto-actions, .cs-hist-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cs-hist-count {
  font-size: 0.88rem;
  color: #cbd5e1;
}

/* ─── 30-Day Recycle Bin (Trash) Modal Styles ─── */
.bin-modal-card {
  width: 980px !important;
  max-width: 95vw !important;
  max-height: 90vh !important;
  display: flex;
  flex-direction: column;
}

.bin-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 0.88rem;
  color: #bae6fd;
}

.bin-banner-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.bin-banner-text strong {
  color: #ffffff;
}

.bin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.bin-toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 280px;
}

.bin-search-input {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.86rem;
  color: #f8fafc;
  width: 100%;
  max-width: 320px;
  transition: all 0.2s ease;
}

.bin-search-input:focus {
  outline: none;
  border-color: #38bdf8;
  background: rgba(15, 23, 42, 0.9);
}

.bin-count-pill {
  font-size: 0.78rem;
  font-weight: 600;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.06);
  padding: 4px 10px;
  border-radius: 12px;
  white-space: nowrap;
}

.bin-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.bin-table-container {
  overflow-x: auto;
  overflow-y: auto;
  max-height: calc(90vh - 270px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.4);
}

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

.bin-table th {
  background: rgba(30, 41, 59, 0.9);
  color: #94a3b8;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 2;
}

.bin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  vertical-align: middle;
}

.bin-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.bin-lead-name {
  font-weight: 600;
  color: #f8fafc;
}

.bin-lead-stage-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
}

.retention-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
}

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

.retention-badge.warning {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.retention-badge.urgent {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.bin-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.btn-bin-action {
  padding: 4px 9px;
  border-radius: 5px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  border: 1px solid transparent;
}

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

.btn-bin-restore:hover {
  background: rgba(16, 185, 129, 0.28);
  border-color: #10b981;
  color: #ffffff;
}

.btn-bin-delete {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.25);
  color: #f87171;
}

.btn-bin-delete:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #ffffff;
}

.bin-empty-state {
  padding: 48px 24px;
  text-align: center;
}

.bin-empty-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.bin-empty-state h4 {
  font-size: 1.1rem;
  color: #f1f5f9;
  margin: 0 0 6px 0;
}

.bin-empty-state p {
  font-size: 0.88rem;
  color: #94a3b8;
  margin: 0;
}

.lead-director-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  margin-top: 4px;
  margin-bottom: 2px;
}


