/* Education CRM - Custom Styles */
/* Phase 1 - UI Prototype with Light/Dark Mode */

@import url('https://fonts.googleapis.com/css2?family=Golos+Text:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ============================================
   CSS VARIABLES - THEME SYSTEM
   ============================================ */

:root {
  /* Light Mode - Elegant & Professional */
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-surface-2: #f1f5f9;
  --color-border: #e2e8f0;
  --color-text-primary: #0f172a;
  --color-text-muted: #64748b;
  --color-accent: #6366f1;
  --color-accent-hover: #4f46e5;
  --color-success: #059669;
  --color-warning: #d97706;
  --color-danger: #dc2626;
  --color-purple: #9333ea;
  --color-info: #0891b2;
  
  /* Shadows for light mode */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] {
  /* Dark Mode - Sophisticated & Modern */
  --color-bg: #0f172a;
  --color-surface: #1e293b;
  --color-surface-2: #334155;
  --color-border: #475569;
  --color-text-primary: #f1f5f9;
  --color-text-muted: #94a3b8;
  --color-accent: #818cf8;
  --color-accent-hover: #a5b4fc;
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #f87171;
  --color-purple: #a78bfa;
  --color-info: #22d3ee;
  
  /* Subtle shadows in dark mode */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6), 0 4px 6px -2px rgba(0, 0, 0, 0.5);
}

/* ============================================
   BASE STYLES
   ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Golos Text', system-ui, -apple-system, sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* ============================================
   LAYOUT
   ============================================ */

.app-container {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: 240px;
  background-color: var(--color-surface);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 40;
  transition: transform 0.3s ease, background-color 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.sidebar-hidden {
  transform: translateX(-100%);
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: 240px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Topbar */
.topbar {
  height: 56px;
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 30;
  transition: background-color 0.3s ease;
  box-shadow: var(--shadow-sm);
}

/* Content Area */
.content-area {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
}

/* ============================================
   COMPONENTS
   ============================================ */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  min-height: 36px;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
  outline: none;
}

.btn-primary {
  background-color: var(--color-accent);
  color: white;
}

.btn-primary:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  color: var(--color-text-primary);
  background-color: var(--color-surface-2);
}

.btn-danger {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--color-danger);
  border: 1px solid var(--color-danger);
}

.btn-danger:hover {
  background-color: rgba(239, 68, 68, 0.2);
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
}

/* Cards */
.card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  padding: 1.25rem;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid transparent;
}

.badge-new {
  background-color: rgba(147, 51, 234, 0.1);
  color: var(--color-purple);
  border-color: rgba(147, 51, 234, 0.2);
}

.badge-trial {
  background-color: rgba(217, 119, 6, 0.1);
  color: var(--color-warning);
  border-color: rgba(217, 119, 6, 0.2);
}

.badge-enrolled, .badge-active {
  background-color: rgba(5, 150, 105, 0.1);
  color: var(--color-success);
  border-color: rgba(5, 150, 105, 0.2);
}

.badge-frozen {
  background-color: rgba(8, 145, 178, 0.1);
  color: var(--color-info);
  border-color: rgba(8, 145, 178, 0.2);
}

.badge-absent, .badge-danger {
  background-color: rgba(220, 38, 38, 0.1);
  color: var(--color-danger);
  border-color: rgba(220, 38, 38, 0.2);
}

.badge-muted {
  background-color: var(--color-surface-2);
  color: var(--color-text-muted);
  border-color: var(--color-border);
}

/* Forms */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  background-color: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  color: var(--color-text-primary);
  font-size: 0.875rem;
  transition: all 0.15s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  background-color: var(--color-surface);
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

/* Tables */
.table-container {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  background-color: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table thead {
  background-color: var(--color-surface-2);
  border-bottom: 2px solid var(--color-border);
}

.table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
  transition: background-color 0.15s ease;
  vertical-align: middle;
}

.table tbody tr:hover {
  background-color: var(--color-surface-2);
}

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

/* Ensure balance column has enough width */
.table td:nth-child(5) {
  min-width: 120px;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.modal-backdrop.show {
  opacity: 1;
}

.modal-panel {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  max-width: 32rem;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95);
  transition: transform 0.2s ease;
  box-shadow: var(--shadow-lg);
}

.modal-backdrop.show .modal-panel {
  transform: scale(1);
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.125rem;
  font-weight: 600;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  min-width: 320px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 4px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideIn 0.3s ease;
  border: none;
  font-weight: 500;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.toast-success > div:first-child {
  background-color: rgba(255, 255, 255, 0.2);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: bold;
}

.toast-error {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

.toast-error > div:first-child {
  background-color: rgba(255, 255, 255, 0.2);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: bold;
}

.toast-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

.toast-warning > div:first-child {
  background-color: rgba(255, 255, 255, 0.2);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: bold;
}

.toast-info {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

.toast-info > div:first-child {
  background-color: rgba(255, 255, 255, 0.2);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: bold;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

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

.text-accent {
  color: var(--color-accent);
}

.text-success {
  color: var(--color-success);
}

.text-danger {
  color: var(--color-danger);
}

.text-warning {
  color: var(--color-warning);
}

.hidden {
  display: none !important;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .content-area {
    padding: 1rem;
  }
}


/* ============================================
   ENHANCED INTERACTIONS
   ============================================ */

/* Smooth theme transition for all elements */
* {
  transition-property: background-color, border-color, color, fill, stroke;
  transition-duration: 0.3s;
  transition-timing-function: ease;
}

/* Exclude animations and transforms from theme transition */
*:not(.toast):not(.modal-panel) {
  transition-property: background-color, border-color, color, fill, stroke;
}

/* Button hover effects */
.btn {
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

/* Focus visible for accessibility */
.btn:focus-visible,
.form-input:focus-visible,
.form-select:focus-visible,
.form-textarea:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Improved scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-surface-2);
}

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-muted);
}

/* Loading state */
.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.6;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--color-accent);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Gradient backgrounds for special elements */
.gradient-accent {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-purple) 100%);
}

.gradient-success {
  background: linear-gradient(135deg, var(--color-success) 0%, var(--color-info) 100%);
}

/* Pulse animation for notifications */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}


/* ============================================
   LEADS PAGE - PROFESSIONAL KANBAN
   ============================================ */

/* Compact Filter Bar */
.leads-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.leads-filter-search {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background-color: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.leads-filter-search:focus-within {
  border-color: var(--color-accent);
  background-color: var(--color-surface);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.leads-filter-search i {
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.leads-filter-search input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  color: var(--color-text-primary);
  font-size: 0.875rem;
  padding: 0;
  margin: 0;
}

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

.leads-filter-select {
  min-width: 180px;
  padding: 0.5rem 0.75rem;
  background-color: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  color: var(--color-text-primary);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.15s ease;
  outline: none;
}

.leads-filter-select:hover {
  border-color: var(--color-accent);
}

.leads-filter-select:focus {
  border-color: var(--color-accent);
  background-color: var(--color-surface);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.leads-filter-clear {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.leads-filter-clear:hover {
  background-color: var(--color-surface-2);
  border-color: var(--color-danger);
  color: var(--color-danger);
  transform: rotate(90deg);
}

.leads-filter-clear:active {
  transform: rotate(90deg) scale(0.95);
}

/* Active filter indicator */
.leads-filter-bar.has-filters .leads-filter-clear {
  background-color: rgba(220, 38, 38, 0.1);
  border-color: var(--color-danger);
  color: var(--color-danger);
  animation: pulse-filter 2s ease-in-out infinite;
}

@keyframes pulse-filter {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Responsive filter bar */
@media (max-width: 768px) {
  .leads-filter-bar {
    flex-wrap: wrap;
  }
  
  .leads-filter-search {
    flex: 1 1 100%;
    min-width: 100%;
  }
  
  .leads-filter-select {
    flex: 1;
    min-width: 0;
  }
}

/* Kanban Column */
.kanban-column {
  flex-shrink: 0;
  width: 320px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 300px);
}

.kanban-column-header {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.75rem 0.75rem 0 0;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.kanban-column-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 0.5rem;
  background-color: var(--color-surface-2);
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.kanban-column-body {
  flex: 1;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-top: none;
  border-radius: 0 0 0.75rem 0.75rem;
  padding: 0.75rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 400px;
}

.kanban-column-body::-webkit-scrollbar {
  width: 6px;
}

.kanban-column-body::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 3px;
}

.kanban-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  text-align: center;
}

/* Lead Card */
.lead-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  padding: 1rem;
  cursor: grab;
  transition: all 0.2s ease;
  position: relative;
}

.lead-card:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.lead-card:active {
  cursor: grabbing;
}

.lead-card.dragging {
  opacity: 0.5;
  transform: rotate(2deg);
}

.lead-card-menu {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  color: var(--color-text-muted);
  transition: all 0.15s ease;
  background: transparent;
  border: none;
  cursor: pointer;
}

.lead-card-menu:hover {
  background-color: var(--color-surface-2);
  color: var(--color-text-primary);
}

.lead-card-notes {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem;
  background-color: var(--color-surface-2);
  border-radius: 0.375rem;
  margin-top: 0.5rem;
}

.lead-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
}

.lead-card-drag-handle {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.lead-card:hover .lead-card-drag-handle {
  opacity: 1;
}

/* Drag and Drop States */
.kanban-column-body.drag-over {
  background-color: rgba(99, 102, 241, 0.05);
  border-color: var(--color-accent);
  border-style: dashed;
}

/* Line clamp utility */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Responsive */
@media (max-width: 768px) {
  .kanban-column {
    width: 280px;
  }
  
  .lead-card {
    padding: 0.875rem;
  }
}

/* ============================================
   LEAD DRAWER - ENHANCED DESIGN
   ============================================ */

.lead-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  width: 100%;
  max-width: 420px;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 50;
  box-shadow: var(--shadow-lg);
}

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

.lead-drawer-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--color-border);
  background: linear-gradient(to bottom, var(--color-surface), var(--color-surface-2));
}

.lead-drawer-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--color-border);
  background-color: var(--color-surface-2);
}

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

.drawer-info-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.drawer-info-icon {
  width: 40px;
  height: 40px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.drawer-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 0.5rem;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  color: var(--color-text-primary);
  font-size: 0.7rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.drawer-action-btn:hover {
  background-color: var(--color-surface-2);
  border-color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.drawer-action-btn i {
  color: var(--color-accent);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 1.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--color-accent), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -1.5rem;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--color-surface);
  box-shadow: 0 0 0 2px var(--color-border);
}

.timeline-content {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  padding: 0.75rem;
}

.timeline-note {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem;
  background-color: var(--color-surface-2);
  border-radius: 0.375rem;
  margin-top: 0.5rem;
}

/* ============================================
   ANIMATIONS & TRANSITIONS
   ============================================ */

/* Fade in animation for cards */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.lead-card {
  animation: fadeInUp 0.3s ease;
}

/* Smooth card reordering */
.lead-card {
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

/* Drawer backdrop animation */
#drawer-backdrop {
  transition: opacity 0.3s ease, backdrop-filter 0.3s ease;
  opacity: 0;
}

#drawer-backdrop:not(.hidden) {
  opacity: 1;
}

/* Kanban column hover effect */
.kanban-column-body {
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

/* Stats card hover */
.card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

/* Badge pulse animation for new leads */
.badge-new {
  animation: pulse-subtle 2s ease-in-out infinite;
}

@keyframes pulse-subtle {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

/* Mobile responsive drawer */
@media (max-width: 768px) {
  .lead-drawer {
    max-width: 100%;
  }
  
  .drawer-info-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   SEARCHABLE SELECT DROPDOWN
   ============================================ */

.searchable-select-wrapper {
  position: relative;
}

.searchable-select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 240px;
  overflow-y: auto;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  margin-top: 0.25rem;
  box-shadow: var(--shadow-lg);
  z-index: 200;
}

.searchable-select-dropdown.hidden {
  display: none;
}

.searchable-select-option {
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: all 0.15s ease;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.875rem;
  color: var(--color-text-primary);
  background-color: var(--color-surface);
}

.searchable-select-option:last-child {
  border-bottom: none;
}

.searchable-select-option:hover:not(.no-results):not(.selected) {
  background-color: var(--color-surface-2);
  transform: translateX(2px);
}

.searchable-select-option.selected {
  background-color: rgba(99, 102, 241, 0.1);
  color: var(--color-accent);
  font-weight: 500;
  border-left: 3px solid var(--color-accent);
  padding-left: calc(1rem - 3px);
}

.searchable-select-option.selected:hover {
  background-color: rgba(99, 102, 241, 0.15);
}

.searchable-select-option.no-results {
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--color-text-muted);
  cursor: default;
  background-color: var(--color-surface);
}

.searchable-select-option.no-results:hover {
  background-color: var(--color-surface);
  transform: none;
}
