[x-cloak] { display: none !important; }

/* ═══ Theme Variables ═══ */
:root {
  --bg-primary: #FFFFEB;
  --bg-surface: #f8f8f4;
  --bg-card: #ffffff;
  --bg-input: #ffffff;
  --bg-hover: rgba(0,0,0,0.03);
  --text-primary: #1A1A1A;
  --text-secondary: #4a4a4a;
  --text-muted: #8d8d83;
  --border-color: #e5e5e0;
  --border-light: #f0f0ea;
  --accent: #4d65ff;
  --teal: #034f46;
  --teal-light: #0d6d62;
  --shadow: rgba(0,0,0,0.08);
  --scrollbar: #d1d1c7;
  --scrollbar-hover: #8d8d83;
  --modal-backdrop: rgba(26, 26, 26, 0.6);
}

.dark {
  --bg-primary: #0a0a0a;
  --bg-surface: #141414;
  --bg-card: #1a1a1a;
  --bg-input: #1e1e1e;
  --bg-hover: rgba(255,255,255,0.05);
  --text-primary: #e5e5e5;
  --text-secondary: #b0b0b0;
  --text-muted: #707070;
  --border-color: #2a2a2a;
  --border-light: #222222;
  --accent: #6b7fff;
  --teal: #0d8d7d;
  --teal-light: #10b09d;
  --shadow: rgba(0,0,0,0.3);
  --scrollbar: #333;
  --scrollbar-hover: #555;
  --modal-backdrop: rgba(0, 0, 0, 0.75);
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: background 0.3s ease, color 0.3s ease;
}

/* Smooth transitions */
.transition-smooth {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Card hover effect */
.card-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

/* Button wave effect */
.btn-primary {
  position: relative;
  overflow: hidden;
  background: var(--teal);
  transition: all 0.3s ease;
}
.btn-primary::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}
.btn-primary:hover::after {
  width: 300px;
  height: 300px;
}
.btn-primary:hover {
  background: var(--teal-light);
  transform: translateY(-1px);
}

/* Input focus */
.input-styled:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(77, 101, 255, 0.1);
}
.input-styled {
  background: var(--bg-input);
  color: var(--text-primary);
}

/* Drag drop zone */
.dropzone {
  border: 2px dashed var(--border-color);
  transition: all 0.3s ease;
}
.dropzone:hover, .dropzone.dragover {
  border-color: #4d65ff;
  background: rgba(77, 101, 255, 0.03);
}

/* Progress bar animation */
@keyframes progress {
  0% { width: 0%; }
  100% { width: 100%; }
}
.progress-animate {
  animation: progress 2s ease-in-out infinite;
}

/* Stat card gradient */
.stat-icon {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-light) 100%);
}

/* Status badges */
.badge-new { background: #e0f2fe; color: #0369a1; }
.badge-contacted { background: #fef3c7; color: #b45309; }
.badge-converted { background: #d1fae5; color: #047857; }

/* Table styling */
.table-row {
  transition: background 0.2s ease;
}
.table-row:hover {
  background: rgba(77, 101, 255, 0.03);
}

/* Modal backdrop */
.modal-backdrop {
  background: var(--modal-backdrop);
  backdrop-filter: blur(4px);
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--scrollbar);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-hover);
}

/* Pulse animation for generating */
@keyframes pulse-soft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
.pulse-soft {
  animation: pulse-soft 1.5s ease-in-out infinite;
}

/* Notification dot */
.notification-dot::after {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  border: 2px solid var(--bg-primary);
}

/* Utility: hide scrollbar */
.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }
/* Utility: line clamp */
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Batch action bar */
.batch-bar {
  position: sticky;
  bottom: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.05);
  z-index: 10;
}

/* ═══ Dark Mode Overrides ═══ */
/* Override Tailwind utility classes when .dark is active on <html> */
.dark .bg-white { background-color: var(--bg-card) !important; }
.dark .bg-cream { background-color: var(--bg-primary) !important; }
.dark .bg-gray-50 { background-color: var(--bg-surface) !important; }
.dark .bg-gray-100 { background-color: #1e1e1e !important; }
.dark .bg-surface { background-color: var(--bg-surface) !important; }
.dark .text-charcoal { color: var(--text-primary) !important; }
.dark .text-muted { color: var(--text-muted) !important; }
.dark .border-gray-100 { border-color: var(--border-light) !important; }
.dark .border-gray-200 { border-color: var(--border-color) !important; }
.dark .border-gray-300 { border-color: #333 !important; }
.dark .hover\:bg-gray-50:hover { background-color: var(--bg-hover) !important; }
.dark .hover\:bg-gray-100:hover { background-color: rgba(255,255,255,0.08) !important; }
.dark .bg-blue-50 { background-color: rgba(59, 130, 246, 0.1) !important; }
.dark .bg-green-50 { background-color: rgba(34, 197, 94, 0.1) !important; }
.dark .bg-red-50 { background-color: rgba(239, 68, 68, 0.1) !important; }
.dark .bg-amber-50 { background-color: rgba(245, 158, 11, 0.1) !important; }
.dark .bg-purple-50 { background-color: rgba(168, 85, 247, 0.1) !important; }
.dark .bg-orange-50 { background-color: rgba(249, 115, 22, 0.1) !important; }
.dark select { background-color: var(--bg-input); color: var(--text-primary); }
.dark .shadow-sm { box-shadow: 0 1px 2px rgba(0,0,0,0.3) !important; }
.dark .shadow-md { box-shadow: 0 4px 6px rgba(0,0,0,0.3) !important; }
.dark .shadow-lg { box-shadow: 0 10px 15px rgba(0,0,0,0.3) !important; }
.dark .shadow-xl { box-shadow: 0 20px 25px rgba(0,0,0,0.4) !important; }

/* Generate button keeps its gradient in dark mode */
.dark .btn-generate {
  background: linear-gradient(135deg, #4d65ff 0%, #7c3aed 100%) !important;
}
