:root {
  --bg-primary: #080b11;
  --bg-secondary: #0f131c;
  --bg-tertiary: #161c28;
  --card-bg: rgba(15, 20, 30, 0.7);
  --border-color: rgba(255, 255, 255, 0.07);
  --border-color-hover: rgba(255, 255, 255, 0.15);
  
  /* Accent Colors */
  --color-emerald: #10b981;
  --color-emerald-hover: #059669;
  --color-purple: #8b5cf6;
  --color-purple-hover: #7c3aed;
  --color-blue: #3b82f6;
  --color-amber: #f59e0b;
  --color-error: #ef4444;
  --color-error-hover: #dc2626;
  
  /* Text Colors */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* Shadows */
  --shadow-sm: 0 2px 8px -1px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 20px -2px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 30px -4px rgba(0, 0, 0, 0.6);
  --glow-emerald: 0 0 20px rgba(16, 119, 129, 0.25);
  --glow-purple: 0 0 20px rgba(139, 92, 246, 0.25);
  
  /* Layout */
  --sidebar-width: 280px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

/* Custom Scrollbar for Webkit */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

h1, h2, h3, h4, .brand-name h2 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
}

/* Background Ambient Glows */
.bg-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
}
.bg-glow-1 {
  background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, rgba(16, 185, 129, 0) 70%);
  top: -100px;
  left: -50px;
}
.bg-glow-2 {
  background: radial-gradient(circle, rgba(139, 92, 246, 0.08) 0%, rgba(139, 92, 246, 0) 70%);
  bottom: -50px;
  right: -50px;
}

/* App Wrapper Layout */
.app-container {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* SIDEBAR STYLES */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  padding: 24px;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
}
.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--color-emerald) 0%, var(--color-purple) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
}
.logo-icon {
  width: 22px;
  height: 22px;
  color: white;
}
.brand-name h2 {
  font-size: 1.25rem;
  line-height: 1.2;
}
.brand-name span {
  font-size: 0.75rem;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s ease;
}
.nav-item i {
  width: 18px;
  height: 18px;
}
.nav-item:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.03);
}
.nav-item.active {
  color: var(--text-primary);
  background: rgba(16, 185, 129, 0.08);
  border-left: 3px solid var(--color-emerald);
}

.session-profile-card {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 16px;
  margin-top: auto;
}
.profile-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.status-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.status-indicator-dot.connected {
  background-color: var(--color-emerald);
  box-shadow: 0 0 8px var(--color-emerald);
  animation: pulse 2s infinite;
}
.status-indicator-dot.waiting {
  background-color: var(--color-amber);
  box-shadow: 0 0 8px var(--color-amber);
  animation: pulse 2s infinite;
}
.status-indicator-dot.disconnected {
  background-color: var(--text-muted);
}
.status-text {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.profile-body {
  display: flex;
  align-items: center;
  gap: 12px;
}
.profile-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
}
.profile-avatar i {
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
}
.profile-info h4 {
  font-size: 0.85rem;
  color: var(--text-primary);
}
.profile-info p {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* MAIN CONTENT STYLES */
.main-content {
  margin-left: var(--sidebar-width);
  flex-grow: 1;
  padding: 40px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.top-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
}
.page-title h1 {
  font-size: 1.85rem;
  margin-bottom: 6px;
  background: linear-gradient(to right, var(--text-primary) 30%, var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.page-title p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* CARD SYSTEM (GLASSMORPHISM) */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.glass-card:hover {
  border-color: var(--border-color-hover);
}
.glass-card.flex-col {
  display: flex;
  flex-direction: column;
  height: calc(100% - 24px);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 14px;
}
.card-header h3 {
  font-size: 1.15rem;
  color: var(--text-primary);
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}
.btn-block {
  display: flex;
  width: 100%;
}
.btn-primary {
  background: linear-gradient(135deg, var(--color-emerald) 0%, var(--color-emerald-hover) 100%);
  color: white;
  box-shadow: var(--glow-emerald);
}
.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}
.btn-primary:active {
  transform: translateY(0);
}
.btn-secondary {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}
.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: var(--border-color-hover);
}
.btn-error {
  background: linear-gradient(135deg, var(--color-error) 0%, var(--color-error-hover) 100%);
  color: white;
}
.btn-error:hover {
  filter: brightness(1.1);
}
.btn-toggle {
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: 8px;
  padding: 8px 16px;
}
.btn-toggle.active {
  background-color: var(--color-emerald);
  color: white;
  border-color: var(--color-emerald);
  box-shadow: var(--glow-emerald);
}
.btn-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  padding: 0;
}
.btn-small {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: 6px;
}

/* BADGES */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}
.badge-success { background: rgba(16, 185, 129, 0.15); color: var(--color-emerald); border: 1px solid rgba(16, 185, 129, 0.2); }
.badge-error { background: rgba(239, 68, 68, 0.15); color: var(--color-error); border: 1px solid rgba(239, 68, 68, 0.2); }
.badge-neutral { background: rgba(255, 255, 255, 0.05); color: var(--text-secondary); border: 1px solid var(--border-color); }

/* GRID SYSTEM */
.grid {
  display: grid;
  gap: 24px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-3-2 { grid-template-columns: 3fr 2fr; }

@media (max-width: 1024px) {
  .grid-3-2, .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }
  .main-content {
    margin-left: 0;
    padding: 20px;
  }
  .sidebar {
    display: none;
  }
}

/* STATS CARDS */
.stats-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: var(--shadow-sm);
}
.stats-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
}
.stats-icon i {
  width: 26px;
  height: 26px;
}
.stats-icon.text-emerald { color: var(--color-emerald); border-color: rgba(16, 185, 129, 0.2); }
.stats-icon.text-purple { color: var(--color-purple); border-color: rgba(139, 92, 246, 0.2); }
.stats-icon.text-amber { color: var(--color-amber); border-color: rgba(245, 158, 11, 0.2); }
.stats-info h3 {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}
.stats-info h2 {
  font-size: 1.85rem;
  margin: 2px 0;
}
.stats-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* CONNECTION DASHBOARD STATE */
.connection-panel-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
  text-align: center;
}
.connection-status-large {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  max-width: 340px;
}
.connection-icon-wrapper {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--color-error);
  border: 2px dashed rgba(239, 68, 68, 0.3);
}
.connection-icon-wrapper i {
  width: 36px;
  height: 36px;
}
.connection-icon-wrapper.connected {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--color-emerald);
  border: 2px solid rgba(16, 185, 129, 0.3);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.1);
}
.connection-icon-wrapper.waiting {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--color-amber);
  border: 2px dashed rgba(245, 158, 11, 0.3);
}
.connection-status-large h3 {
  font-size: 1.25rem;
}
.connection-status-large p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* QUICK ACTIONS LIST */
.quick-actions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.action-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: all 0.2s ease;
}
.action-row:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: var(--border-color-hover);
  transform: translateX(4px);
}
.action-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
}
.action-icon.text-emerald { color: var(--color-emerald); }
.action-icon.text-purple { color: var(--color-purple); }
.action-icon.text-blue { color: var(--color-blue); }
.action-details h4 {
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.action-details p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.chevron {
  margin-left: auto;
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

/* FORM ELEMENTS */
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.form-input, .form-select, textarea {
  width: 100%;
  background-color: rgba(8, 11, 17, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-primary);
  padding: 12px 16px;
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-input:focus, .form-select:focus, textarea:focus {
  border-color: var(--color-emerald);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.15);
}
textarea {
  resize: vertical;
}
.help-text {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.4;
}
.inline-icon {
  width: 13px;
  height: 13px;
}
.toggle-group {
  display: flex;
  gap: 8px;
  background-color: rgba(255, 255, 255, 0.03);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
}
.toggle-group button {
  flex-grow: 1;
}

/* RANGE SLIDER STYLING */
.slider-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 8px;
}
.slider-label-row span {
  font-weight: 600;
  color: var(--color-emerald);
}
.form-range {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--bg-primary);
  outline: none;
  margin: 10px 0;
}
.form-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-emerald);
  cursor: pointer;
  transition: transform 0.1s;
  box-shadow: 0 0 8px var(--color-emerald);
}
.form-range::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

/* FILE UPLOAD DRAG-DROP ZONE */
.file-upload-zone {
  border: 2px dashed var(--border-color);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.01);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: border-color 0.2s, background-color 0.2s;
}
.file-upload-zone:hover, .file-drop-zone.dragover {
  border-color: var(--color-emerald);
  background-color: rgba(16, 185, 129, 0.02);
}
.file-upload-zone i {
  width: 40px;
  height: 40px;
  color: var(--text-secondary);
}
.font-semibold { font-weight: 600; }
.text-primary { color: var(--color-emerald); }
.text-xs { font-size: 0.75rem; color: var(--text-muted); }

.csv-preview-container {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px;
  margin-top: 10px;
}
.csv-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
  margin-bottom: 4px;
}

/* BUTTON GROUP LAYOUTS */
.button-row {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}
.button-row.end {
  justify-content: flex-end;
}

/* LIVE PROGRESS PANEL & LOGS DISPLAY */
.live-progress-panel {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.progress-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.progress-stat-box {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}
.progress-stat-box .label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.progress-stat-box .value {
  font-size: 1.15rem;
  font-weight: 700;
}

.progress-bar-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.progress-bar-container {
  flex-grow: 1;
  height: 8px;
  border-radius: 4px;
  background-color: var(--bg-primary);
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--color-emerald) 0%, var(--color-purple) 100%);
  border-radius: 4px;
  transition: width 0.3s ease;
}
.progress-percent {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  width: 40px;
  text-align: right;
}

.logs-container-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  display: block;
}
.logs-display {
  flex-grow: 1;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  font-family: monospace;
  font-size: 0.8rem;
  overflow-y: auto;
  max-height: 280px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-left: 3px solid var(--border-color);
}
.log-placeholder {
  color: var(--text-muted);
  text-align: center;
  margin: auto;
  font-style: italic;
}
.log-line {
  line-height: 1.4;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  padding-bottom: 4px;
}
.log-time { color: var(--text-muted); }
.log-tag {
  font-weight: 600;
  padding: 1px 4px;
  border-radius: 3px;
  margin: 0 4px;
  font-size: 0.7rem;
}
.log-tag-system { background-color: rgba(255, 255, 255, 0.05); color: var(--text-secondary); }
.log-tag-sent { background-color: rgba(16, 185, 129, 0.15); color: var(--color-emerald); }
.log-tag-failed { background-color: rgba(239, 68, 68, 0.15); color: var(--color-error); }
.log-tag-campaign { background-color: rgba(139, 92, 246, 0.15); color: var(--color-purple); }

.log-type-success { color: var(--color-emerald); }
.log-type-error { color: var(--color-error); }
.log-type-warning { color: var(--color-amber); }
.log-type-debug { color: var(--text-muted); }

/* TAB PANEL ROUTING VISIBILITY */
.tab-panel {
  display: none;
}
.tab-panel.active {
  display: block;
}

/* OUTREACH CAMPAIGN SPECIFIC STYLES */
.tag-helpers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.tag-helper {
  font-size: 0.75rem;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s;
}
.tag-helper:hover {
  background-color: rgba(16, 185, 129, 0.08);
  border-color: var(--color-emerald);
  color: var(--color-emerald);
}

.campaign-monitor-panel {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.queue-gauge-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.queue-gauge-box {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 10px;
  text-align: center;
}
.queue-gauge-box .label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-bottom: 2px;
}
.queue-gauge-box .value {
  font-size: 1.15rem;
  font-weight: 700;
}
.queue-gauge-box.text-purple { color: var(--color-purple); }

/* WHATSAPP BUBBLE PREVIEW CARD */
.message-preview-bubble {
  background-color: #0d141a;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 14px;
  max-width: 100%;
  margin-top: 14px;
  position: relative;
  box-shadow: var(--shadow-sm);
  background-image: radial-gradient(rgba(16, 185, 129, 0.05) 1px, transparent 0);
  background-size: 10px 10px;
}
.bubble-header {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 8px;
  margin-bottom: 8px;
}
.bubble-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--bg-tertiary);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
}
.bubble-header h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}
.bubble-header span {
  font-size: 0.7rem;
  color: var(--text-muted);
}
.bubble-content {
  background-color: #005c4b; /* WhatsApp Sent green */
  color: #e9edef;
  border-radius: 10px 0 10px 10px;
  padding: 10px 14px;
  font-size: 0.85rem;
  line-height: 1.4;
  white-space: pre-wrap;
  width: fit-content;
  max-width: 85%;
  margin-left: auto;
  position: relative;
}
.bubble-content::after {
  content: '';
  position: absolute;
  top: 0;
  right: -8px;
  width: 0;
  height: 0;
  border-left: 10px solid #005c4b;
  border-bottom: 10px solid transparent;
}
.bubble-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 6px;
  font-size: 0.65rem;
  color: var(--text-muted);
}
.check-icon {
  width: 12px;
  height: 12px;
  color: #53bdeb; /* WhatsApp blue ticks */
}

/* VERIFIED CONTACTS TABLE STYLES */
.table-actions-header {
  border-bottom: none;
  padding-bottom: 0;
}
.search-box-container {
  position: relative;
  width: 340px;
}
.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}
.search-box-container input {
  padding-left: 36px;
  font-size: 0.85rem;
  height: 38px;
}
.table-scrollable {
  overflow-x: auto;
  border-radius: 14px;
}
.contacts-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}
.contacts-table th {
  background-color: var(--bg-tertiary);
  color: var(--text-secondary);
  font-weight: 500;
  padding: 16px 20px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
}
.contacts-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  vertical-align: middle;
}
.contacts-table tr:hover td {
  background-color: rgba(255, 255, 255, 0.01);
}
.contacts-table tr:last-child td {
  border-bottom: none;
}
.table-placeholder {
  text-align: center;
  padding: 60px 0 !important;
  color: var(--text-muted);
}
.table-placeholder p {
  font-size: 0.85rem;
}

.table-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-color);
  background-color: var(--bg-tertiary);
}
.table-avatar-fallback {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--bg-tertiary);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
}
.table-avatar-fallback i {
  width: 14px;
  height: 14px;
}
.table-contact-name {
  font-weight: 500;
}

/* MODAL STYLING */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(4, 5, 8, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.qr-modal-card {
  max-width: 480px;
  width: 100%;
  margin: 20px;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
  border-color: rgba(255, 255, 255, 0.1);
  text-align: center;
}
.modal-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 14px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h2 {
  font-size: 1.35rem;
}
.btn-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-secondary);
  cursor: pointer;
}
.btn-close:hover {
  color: var(--text-primary);
}
.modal-body p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 24px;
}
.qr-code-wrapper {
  background-color: white;
  border-radius: 16px;
  padding: 16px;
  display: inline-block;
  box-shadow: var(--shadow-lg);
  margin-bottom: 20px;
  width: 250px;
  height: 250px;
  position: relative;
}
.qr-code-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.qr-loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 12px;
  color: var(--bg-primary);
}
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(16, 185, 129, 0.2);
  border-top-color: var(--color-emerald);
  border-radius: 50%;
  animation: spin 1s infinite linear;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.qr-loading-spinner span {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}
.qr-modal-footer {
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
  margin-top: 20px;
}
.modal-small {
  max-width: 440px;
  width: 100%;
  margin: 20px;
  box-shadow: var(--shadow-lg);
}
.text-center { text-align: center; }
.font-semibold { font-weight: 600; }
.text-error { color: var(--color-error); }
.text-warning { color: var(--color-amber); }

/* TOAST NOTIFICATIONS (GLASSMORPHIC) */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 380px;
  width: 100%;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  background: rgba(15, 20, 30, 0.85);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transform: translateX(120%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease, margin 0.3s ease;
  opacity: 0;
  position: relative;
  overflow: hidden;
}
.toast::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}
.toast.toast-success::after {
  background-color: var(--color-emerald);
}
.toast.toast-error::after {
  background-color: var(--color-error);
}
.toast.toast-info::after {
  background-color: var(--color-blue);
}
.toast.toast-warning::after {
  background-color: var(--color-amber);
}
.toast.show {
  transform: translateX(0);
  opacity: 1;
}
.toast.hide {
  transform: translateX(120%);
  opacity: 0;
}
.toast-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.toast-success .toast-icon {
  color: var(--color-emerald);
}
.toast-error .toast-icon {
  color: var(--color-error);
}
.toast-info .toast-icon {
  color: var(--color-blue);
}
.toast-warning .toast-icon {
  color: var(--color-amber);
}
.toast-content {
  flex-grow: 1;
}
.toast-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
}
.toast-message {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
}
.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  font-size: 1.1rem;
  line-height: 1;
  transition: color 0.2s;
  align-self: flex-start;
}
.toast-close:hover {
  color: var(--text-primary);
}

/* LIMIT METRICS AND SAFETY WIDGET */
.limit-metric-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.limit-metric-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.limit-metric-header span:last-child {
  font-weight: 700;
  color: var(--text-primary);
}
.limit-progress-bar-container {
  height: 8px;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  overflow: hidden;
}
.limit-progress-bar {
  height: 100%;
  border-radius: 4px;
  width: 0%;
  transition: width 0.4s cubic-bezier(0.1, 0.8, 0.2, 1), background-color 0.3s ease;
}
.limit-progress-bar.progress-verify {
  background: linear-gradient(90deg, var(--color-emerald) 0%, #06b6d4 100%);
}
.limit-progress-bar.progress-message {
  background: linear-gradient(90deg, var(--color-blue) 0%, var(--color-purple) 100%);
}
.limit-progress-bar.warning {
  background: linear-gradient(90deg, var(--color-amber) 0%, #f97316 100%) !important;
}
.limit-progress-bar.danger {
  background: linear-gradient(90deg, var(--color-error) 0%, #b91c1c 100%) !important;
}
.safety-guidelines-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.guideline-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.02);
}
.guideline-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}
.guideline-details h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.guideline-details p {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* SESSIONS LIST GRID */
.sessions-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.session-item-card {
  transition: transform 0.3s ease, border-color 0.3s ease;
}

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

.session-qr-container img {
  image-rendering: pixelated;
}

/* MOBILE BOTTOM NAVIGATION BAR */
.mobile-nav {
  display: none;
}

@media (max-width: 1024px) {
  .mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 68px;
    background: rgba(15, 20, 30, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    z-index: 100;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
    padding: 0 10px;
  }

  .mobile-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 6px 0;
    flex-grow: 1;
    border-radius: 8px;
    background: none;
    border-left: none !important;
    transition: all 0.2s ease;
  }

  .mobile-nav .nav-item i {
    width: 20px;
    height: 20px;
  }

  .mobile-nav .nav-item:hover {
    color: var(--text-primary);
  }

  .mobile-nav .nav-item.active {
    color: var(--color-emerald);
    background: rgba(16, 185, 129, 0.05);
  }

  .main-content {
    padding-bottom: 95px !important; /* Prevents mobile bottom nav from covering content */
  }

  /* Adjust header buttons for smaller width */
  .top-header {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }

  .top-header .actions {
    display: flex;
    justify-content: flex-end;
  }
}

/* Table responsiveness fallback */
.contacts-table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

