/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Primary Colors - Tonos profesionales azul-gris */
  --primary-color: #4f5b93;
  --primary-dark: #3d4773;
  --primary-light: #7b8bc4;
  --secondary-color: #f4f6f9;
  --accent-color: #5a6c7d;
  
  /* Task Priority Colors - Independientes del tema */
  --priority-low: #22c55e;
  --priority-medium: #f59e0b;
  --priority-high: #ef4444;
  
  /* System Colors */
  --success-color: #10b981;
  --danger-color: #dc2626;
  --warning-color: #d97706;
  --info-color: #2563eb;
  
  /* Text Colors */
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --text-white: #ffffff;
  
  /* Background Colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-tertiary: #f3f4f6;
  --bg-overlay: rgba(31, 41, 55, 0.5);
  
  /* Border & Shadow */
  --border-color: #e5e7eb;
  --border-light: #f3f4f6;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* Dark Theme Variables */
[data-theme="dark"] {
  --primary-color: #6b7db8;
  --primary-dark: #4f5b93;
  --primary-light: #8a9cd4;
  --secondary-color: #1f2937;
  --accent-color: #6b8096;
  
  /* Las prioridades mantienen los mismos colores */
  --priority-low: #22c55e;
  --priority-medium: #f59e0b;
  --priority-high: #ef4444;
  
  --text-primary: #f9fafb;
  --text-secondary: #d1d5db;
  --text-muted: #9ca3af;
  
  --bg-primary: #111827;
  --bg-secondary: #1f2937;
  --bg-tertiary: #374151;
  --bg-overlay: rgba(0, 0, 0, 0.7);
  
  --border-color: #374151;
  --border-light: #4b5563;
}

/* ===== BASE STYLES ===== */
html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  transition: all var(--transition-normal);
  overflow-x: hidden;
}

/* ===== LAYOUT ===== */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-xl);
}

/* ===== HEADER ===== */
.header {
  background: var(--bg-primary);
  border-radius: var(--radius-2xl);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.logo-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  box-shadow: var(--shadow-md);
}

.logo-text h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: var(--space-xs);
}

.logo-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.header-controls {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
}

.theme-toggle,
.export-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: var(--space-md);
  border-radius: var(--radius-lg);
  cursor: pointer;
  color: var(--text-primary);
  font-size: 1.1rem;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.theme-toggle:hover,
.export-btn:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ===== STATS GRID ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.stat-card {
  background: var(--bg-primary);
  padding: var(--space-xl);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  transition: all var(--transition-normal);
}

.stat-card.gradient-purple::before {
  background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
}

.stat-card.gradient-green::before {
  background: linear-gradient(90deg, var(--success-color), #34d399);
}

.stat-card.gradient-orange::before {
  background: linear-gradient(90deg, var(--warning-color), #fbbf24);
}

.stat-card.gradient-blue::before {
  background: linear-gradient(90deg, var(--info-color), #60a5fa);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.stat-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-info h3 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: var(--space-xs);
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-info p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.stat-icon {
  font-size: 3rem;
  opacity: 0.8;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== PROGRESS BAR ===== */
.progress-container {
  margin-bottom: var(--space-xl);
  background: var(--bg-primary);
  padding: var(--space-lg);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.progress-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.progress-label i {
  margin-right: var(--space-xs);
  color: var(--primary-color);
}

.progress-bar {
  width: 100%;
  height: 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  border-radius: var(--radius-sm);
  transition: width var(--transition-slow);
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ===== MAIN CONTENT ===== */
.main-content {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: var(--space-xl);
}

/* ===== TASKS SECTION ===== */
.tasks-section {
  background: var(--bg-primary);
  border-radius: var(--radius-2xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
}

.tasks-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
  gap: var(--space-md);
}

.tasks-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.tasks-title i {
  color: var(--primary-color);
}

.tasks-controls {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.filter-controls {
  display: flex;
  gap: var(--space-xs);
  background: var(--bg-secondary);
  padding: var(--space-xs);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.filter-btn {
  padding: var(--space-sm) var(--space-md);
  border: none;
  background: transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-normal);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  white-space: nowrap;
}

.filter-btn.active {
  background: var(--primary-color);
  color: white;
  box-shadow: var(--shadow-sm);
}

.filter-btn:hover:not(.active) {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.search-container {
  position: relative;
  min-width: 250px;
}

.search-icon {
  position: absolute;
  left: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.875rem;
}

.search-box {
  width: 100%;
  padding: var(--space-md) var(--space-md) var(--space-md) 2.5rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: all var(--transition-normal);
}

.search-box:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(79, 91, 147, 0.1);
  background: var(--bg-primary);
}

/* ===== TASKS LIST ===== */
.tasks-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.task-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  animation: slideInUp 0.5s ease-out;
}

.task-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  transition: all var(--transition-normal);
}

/* Colores de prioridad independientes */
.task-item.priority-low::before {
  background: var(--priority-low);
}

.task-item.priority-medium::before {
  background: var(--priority-medium);
}

.task-item.priority-high::before {
  background: var(--priority-high);
}

.task-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.task-item.completed {
  opacity: 0.7;
  background: var(--bg-primary);
}

.task-item.completed .task-title {
  text-decoration: line-through;
  color: var(--text-secondary);
}

.task-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-md);
}

.task-main {
  flex: 1;
}

.task-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  line-height: 1.4;
  word-break: break-word;
}

.task-description {
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  line-height: 1.5;
  font-size: 0.9rem;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  align-items: center;
  font-size: 0.875rem;
}

.task-category, 
.task-priority, 
.task-due {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-lg);
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.task-category {
  background: var(--primary-color);
  color: white;
}

/* Prioridades de tareas con colores independientes */
.task-priority.low {
  background: var(--priority-low);
  color: white;
}

.task-priority.medium {
  background: var(--priority-medium);
  color: white;
}

.task-priority.high {
  background: var(--priority-high);
  color: white;
}

.task-due {
  background: var(--bg-primary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.task-due.overdue {
  background: var(--danger-color);
  color: white;
  border-color: var(--danger-color);
}

.task-due.due-today {
  background: var(--warning-color);
  color: white;
  border-color: var(--warning-color);
}

.task-actions {
  display: flex;
  gap: var(--space-xs);
  align-items: flex-start;
  margin-left: var(--space-md);
}

.task-btn {
  padding: var(--space-sm);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-normal);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  position: relative;
  overflow: hidden;
}

.task-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transition: all var(--transition-fast);
  transform: translate(-50%, -50%);
}

.task-btn:active::before {
  width: 100px;
  height: 100px;
}

.task-btn.complete {
  background: var(--success-color);
  color: white;
}

.task-btn.complete.completed {
  background: var(--text-muted);
}

.task-btn.edit {
  background: var(--warning-color);
  color: white;
}

.task-btn.delete {
  background: var(--danger-color);
  color: white;
}

.task-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: var(--space-2xl);
  color: var(--text-secondary);
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: var(--space-lg);
  opacity: 0.5;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.empty-state h3 {
  font-size: 1.5rem;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
  font-weight: 600;
}

.empty-state p {
  font-size: 1rem;
  opacity: 0.8;
}

/* ===== TASK FORM ===== */
.task-form-card {
  background: var(--bg-primary);
  padding: var(--space-xl);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  height: fit-content;
  position: sticky;
  top: var(--space-xl);
}

.form-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-lg);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.form-title i {
  color: var(--primary-color);
}

.form-group {
  margin-bottom: var(--space-lg);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.form-label {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-sm);
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-label i {
  color: var(--primary-color);
  font-size: 0.8rem;
}

.form-input, 
.form-select, 
.form-textarea {
  width: 100%;
  padding: var(--space-md);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  font-size: 1rem;
  background: var(--bg-secondary);
  color: var(--text-primary);
  transition: all var(--transition-normal);
  font-family: inherit;
}

.form-input:focus, 
.form-select:focus, 
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(79, 91, 147, 0.1);
  background: var(--bg-primary);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
}

.char-counter {
  text-align: right;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

.input-error {
  color: var(--danger-color);
  font-size: 0.75rem;
  margin-top: var(--space-xs);
  display: none;
}

.form-input.error,
.form-textarea.error {
  border-color: var(--danger-color);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-input.error + .input-error,
.form-textarea.error + .input-error {
  display: block;
}

.priority-buttons {
  display: flex;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
}

.priority-btn {
  flex: 1;
  padding: var(--space-sm);
  border: 2px solid var(--border-color);
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-normal);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

.priority-btn:hover {
  border-color: var(--primary-color);
  background: var(--bg-primary);
}

.priority-btn.active {
  color: white;
  border-color: transparent;
}

/* Botones de prioridad con colores independientes */
.priority-btn.low.active {
  background: var(--priority-low);
}

.priority-btn.medium.active {
  background: var(--priority-medium);
}

.priority-btn.high.active {
  background: var(--priority-high);
}

.form-submit {
  width: 100%;
  padding: var(--space-md) var(--space-xl);
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

.form-submit:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.form-submit:active {
  transform: translateY(0);
}

.button-ripple {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transition: all var(--transition-fast);
  transform: translate(-50%, -50%);
}

.form-submit:active .button-ripple {
  width: 300px;
  height: 300px;
}

/* ===== MODAL ===== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  opacity: 0;
  transition: opacity var(--transition-normal);
  overflow-y: auto;
  padding: var(--space-md);
}

.modal.show {
  opacity: 1;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-overlay);
  backdrop-filter: blur(5px);
}

.modal-content {
  position: relative;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: var(--bg-primary);
  padding: var(--space-xl);
  border-radius: var(--radius-2xl);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-color);
  transition: transform var(--transition-normal);
  z-index: 10000;
}

.modal.show .modal-content {
  transform: translate(-50%, -50%) scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-color);
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.modal-title i {
  color: var(--primary-color);
}

.modal-close {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-secondary);
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: var(--danger-color);
  color: white;
  border-color: var(--danger-color);
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
  position: fixed;
  top: var(--space-xl);
  right: var(--space-xl);
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.toast {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-width: 300px;
  animation: slideInRight 0.3s ease;
  position: relative;
  overflow: hidden;
}

.toast::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}

.toast.success::before {
  background: var(--success-color);
}

.toast.error::before {
  background: var(--danger-color);
}

.toast.warning::before {
  background: var(--warning-color);
}

.toast.info::before {
  background: var(--info-color);
}

.toast-icon {
  font-size: 1.2rem;
}

.toast.success .toast-icon {
  color: var(--success-color);
}

.toast.error .toast-icon {
  color: var(--danger-color);
}

.toast.warning .toast-icon {
  color: var(--warning-color);
}

.toast.info .toast-icon {
  color: var(--info-color);
}

.toast-message {
  flex: 1;
  font-weight: 500;
  color: var(--text-primary);
}

.toast-close {
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  color: var(--text-muted);
  padding: var(--space-xs);
  border-radius: var(--radius-sm);
  transition: all var(--transition-normal);
}

.toast-close:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* ===== LOADING OVERLAY ===== */
.loading-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--bg-overlay);
  backdrop-filter: blur(3px);
  z-index: 9998;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.loading-overlay.show {
  opacity: 1;
}

.loading-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  color: var(--primary-color);
}

/* ===== ANIMATIONS ===== */
@keyframes slideInUp {
  from {
      opacity: 0;
      transform: translateY(20px);
  }
  to {
      opacity: 1;
      transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
      opacity: 0;
      transform: translateX(100%);
  }
  to {
      opacity: 1;
      transform: translateX(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
  .main-content {
      grid-template-columns: 1fr;
  }
  
  .task-form-card {
      position: relative;
      top: auto;
  }
}

@media (max-width: 768px) {
  .container {
      padding: var(--space-md);
  }
  
  .header-content {
      flex-direction: column;
      text-align: center;
      gap: var(--space-lg);
  }
  
  .stats-grid {
      grid-template-columns: 1fr;
      gap: var(--space-md);
  }
  
  .tasks-header {
      flex-direction: column;
      align-items: stretch;
      gap: var(--space-lg);
  }
  
  .tasks-controls {
      align-items: stretch;
  }
  
  .filter-controls {
      justify-content: center;
  }
  
  .search-container {
      min-width: auto;
  }
  
  .task-header {
      flex-direction: column;
      gap: var(--space-md);
  }
  
  .task-actions {
      align-self: stretch;
      justify-content: center;
      margin-left: 0;
      margin-top: var(--space-md);
  }
  
  .form-row {
      grid-template-columns: 1fr;
  }
  
  .modal {
      padding: var(--space-sm);
  }
  
  .modal-content {
      max-height: 95vh;
      padding: var(--space-lg);
  }
  
  .toast-container {
      top: var(--space-md);
      right: var(--space-md);
      left: var(--space-md);
  }
  
  .toast {
      min-width: auto;
  }
}

@media (max-width: 480px) {
  .header {
      padding: var(--space-lg);
  }
  
  .logo-text h1 {
      font-size: 1.5rem;
  }
  
  .stat-card {
      padding: var(--space-lg);
  }
  
  .stat-info h3 {
      font-size: 2rem;
  }
  
  .stat-icon {
      font-size: 2rem;
  }
  
  .tasks-section,
  .task-form-card {
      padding: var(--space-lg);
  }
  
  .priority-buttons {
      flex-direction: column;
  }
  
  .task-actions {
      gap: var(--space-md);
  }
}