/* Tasks Page Styles - Cosmic Theme */
.tasks-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  min-height: calc(100vh - 60px);
}

/* Task Section Headers */
.task-section {
  margin-bottom: 40px;
}

/* Task Subtitle Rows */
.task-subtitle-row {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 2px solid #e2e8f0;
  border-top: 1px solid #e2e8f0;
}

.task-subtitle-row td {
  padding: 16px 20px;
  font-weight: 700;
  font-size: 15px;
  color: #475569;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
}

.task-subtitle-row:first-child {
  border-top: none;
}

.task-subtitle-row td::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  border-radius: 0 2px 2px 0;
}

.tasks-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e1e5e9;
}

.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.tasks-header h1 {
  background: linear-gradient(45deg, var(--cosmic-white), var(--cosmic-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.new-task-btn {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.new-task-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
  color: white;
  text-decoration: none;
}

/* Search Section Styles */
.search-section {
  margin-bottom: 24px;
  padding: 20px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: 12px;
  border: 1px solid #2a2a3e;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.search-form {
  width: 100%;
}

.search-container {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 600px;
  margin: 0 auto;
}

.search-input {
  flex: 1;
  padding: 16px 20px;
  border: 2px solid #2a2a3e;
  border-radius: 8px;
  background: #0f0f23;
  color: #e0e0e0;
  font-size: 16px;
  transition: all 0.3s ease;
}

.search-input::placeholder {
  color: #888888;
}

.search-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  background: #1a1a2e;
}

.search-button {
  padding: 12px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.search-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.search-icon {
  font-size: 18px;
}

.search-results-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding: 12px 16px;
  background: rgba(102, 126, 234, 0.1);
  border-radius: 6px;
  border: 1px solid rgba(102, 126, 234, 0.2);
}

.search-term {
  color: #e0e0e0;
  font-weight: 500;
}

.clear-search-link {
  color: #ff6b6b;
  text-decoration: none;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.clear-search-link:hover {
  background: rgba(255, 107, 107, 0.1);
  color: #ff6b6b;
  text-decoration: none;
}

/* Filter and Sort Controls */
.tasks-controls {
  margin-bottom: 30px;
  padding: 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  border: 1px solid #e1e5e9;
}

.filters-section h3 {
  margin: 0 0 16px 0;
  color: #2c3e50;
  font-size: 1.2rem;
  font-weight: 600;
}

.filter-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 120px;
}

.filter-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #6c757d;
  margin: 0;
}

.filter-select {
  padding: 8px 12px;
  border: 2px solid #e1e5e9;
  border-radius: 6px;
  font-size: 0.9rem;
  background: white;
  transition: border-color 0.3s ease;
}

.filter-select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-actions {
  display: flex;
  gap: 12px;
  align-items: end;
}

.clear-btn {
  background: linear-gradient(135deg, #239656 0%, #f5690c 100%) !important;
  color: white !important;
  text-decoration: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
  border: none !important;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.clear-btn:hover {
  background: linear-gradient(135deg, #5a32a3 0%, #4c2a8a 100%);
  color: white;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(111, 66, 193, 0.4);
}

/* Compact Table Layout */
.tasks-table-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
  border: 1px solid #e1e5e9;
  overflow: hidden;
}

.tasks-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.tasks-table thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.tasks-table thead th {
  background: transparent;
  color: white;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 16px;
  font-size: 0.9rem;
}

/* Sortable Header Styles */
.tasks-table thead .sortable-header {
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.tasks-table thead .sortable-header:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.tasks-table thead .header-link {
  color: white;
  text-decoration: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: 100%;
}

.tasks-table thead .header-link:hover {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

.tasks-table thead .header-link.active {
  color: #ffd700;
  font-weight: 700;
}

.tasks-table thead .sort-indicator {
  color: #ffd700;
  font-weight: 700;
  font-size: 0.8em;
}

.tasks-table tbody tr {
  border-bottom: 1px solid #e9ecef;
  border-left: 4px solid transparent;
  transition: all 0.2s ease;
}

.tasks-table tbody tr:hover {
  background-color: #f8f9fa;
}

.tasks-table tbody tr.completed {
  opacity: 0.7;
  background-color: #f8f9fa;
}

.tasks-table tbody tr.completed .task-title {
  text-decoration: line-through;
  color: #6c757d;
}

.tasks-table td {
  padding: 8px 12px;
  vertical-align: middle;
}

/* Column-specific styles */
.col-checkbox {
  width: 5%;
}

.col-title {
  width: 25%;
}

.col-subtasks {
  width: 10%;
  text-align: center;
}

.col-scheduled-at {
  width: 12%;
}

.col-priority {
  width: 8%;
}

.col-priority-selector {
  width: 8%;
  min-width: 100px;
  max-width: 120px;
}

.col-recurrence {
  width: 10%;
}

.col-project {
  width: 10%;
}

.col-schedule {
  width: 8%;
}

.col-actions {
  width: 12%;
}

.task-checkbox-cell {
  text-align: center;
  padding: 8px 4px;
}

.task-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #28a745;
}

.task-title-cell {
  padding: 8px 12px !important;
}

.task-title-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.task-title {
  font-weight: 600;
  color: #2c3e50;
  font-size: 1rem;
}

.task-title-link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: color 0.2s ease;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.task-title-link:hover {
  color: #007bff;
  text-decoration: none;
  background: none;
}

/* Priority Symbol */
.priority-symbol {
  margin-right: 8px;
  font-weight: bold;
  font-size: 0.9em;
  display: inline-block;
  min-width: 12px;
  text-align: center;
}

.task-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.task-priority-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Cosmic Priority Icons */
.task-priority-arrow {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
  flex-shrink: 0;
  border-radius: 50%;
  margin-right: 8px;
  transition: all 0.3s ease;
}

.task-priority-arrow.priority-none {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
  color: white;
  box-shadow: 0 2px 4px rgba(107, 114, 128, 0.3);
}

.task-priority-arrow.priority-high {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: white;
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.4), 0 2px 4px rgba(0, 0, 0, 0.1);
  animation: starGlow 2s ease-in-out infinite alternate;
}

.task-priority-arrow.priority-medium {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  box-shadow: 0 0 6px rgba(59, 130, 246, 0.3), 0 2px 4px rgba(0, 0, 0, 0.1);
}

.task-priority-arrow.priority-low {
  background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
  color: white;
  box-shadow: 0 0 4px rgba(167, 139, 250, 0.3), 0 2px 4px rgba(0, 0, 0, 0.1);
}

@keyframes starGlow {
  0% { box-shadow: 0 0 8px rgba(251, 191, 36, 0.4), 0 2px 4px rgba(0, 0, 0, 0.1); }
  100% { box-shadow: 0 0 12px rgba(251, 191, 36, 0.6), 0 2px 6px rgba(0, 0, 0, 0.15); }
}

/* Custom Priority Selector */
.custom-priority-selector {
  position: relative;
  display: inline-block;
  min-width: 80px;
  max-width: 100px;
  z-index: 10;
  isolation: isolate;
}

.priority-selector-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  font-weight: 500;
  width: 100%;
}

.priority-selector-trigger:hover {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.priority-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 14px;
  font-weight: bold;
  transition: all 0.3s ease;
}

.priority-text {
  flex: 1;
  color: #374151;
}

.dropdown-arrow {
  color: #6b7280;
  font-size: 12px;
  transition: transform 0.3s ease;
}

.priority-dropdown {
  position: fixed;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) translateZ(1000px);
  transition: all 0.3s ease;
  will-change: transform, opacity;
}

.priority-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) translateZ(1000px);
  position: fixed !important;
}

/* Body dropdowns */
.priority-dropdown-body {
  position: fixed !important;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  opacity: 1;
  visibility: visible;
  transform: translateY(0) translateZ(1000px);
  z-index: 2147483647 !important;
  isolation: isolate !important;
}

.priority-dropdown-body .priority-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid #f1f5f9;
  color: #374151;
}

.priority-dropdown-body .priority-option:last-child {
  border-bottom: none;
}

.priority-dropdown-body .priority-option:hover {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.priority-dropdown-body .priority-option .priority-icon {
  width: 18px;
  height: 18px;
  font-size: 12px;
}

.priority-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid #f1f5f9;
}

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

.priority-option:hover {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.priority-option .priority-icon {
  width: 18px;
  height: 18px;
  font-size: 12px;
}

/* Custom Project Selector */
.custom-project-selector {
  position: relative;
  display: inline-block;
  min-width: 200px;
  z-index: 10;
  isolation: isolate;
}

.project-selector-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  font-weight: 500;
}

.project-selector-trigger:hover {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.project-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.project-color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.project-color-dot.no-project {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

.project-name {
  color: #374151;
  flex: 1;
}

.project-status {
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

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

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

.project-status.status-archived {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
  color: white;
}

.project-dropdown {
  position: fixed;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) translateZ(1000px);
  transition: all 0.3s ease;
  will-change: transform, opacity;
  max-height: 300px;
  overflow-y: auto;
}

.project-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) translateZ(1000px);
  position: fixed !important;
}

/* Body dropdowns */
.project-dropdown-body {
  position: fixed !important;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  opacity: 1;
  visibility: visible;
  transform: translateY(0) translateZ(1000px);
  z-index: 2147483647 !important;
  isolation: isolate !important;
  max-height: 300px;
  overflow-y: auto;
}

.project-dropdown-body .project-group-header {
  padding: 8px 12px 4px;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
}

.project-dropdown-body .project-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid #f1f5f9;
  color: #374151;
}

.project-dropdown-body .project-option:last-child {
  border-bottom: none;
}

.project-dropdown-body .project-option:hover {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.project-dropdown-body .project-option .project-color-dot {
  width: 10px;
  height: 10px;
}

.project-dropdown-body .project-option .project-status {
  margin-left: auto;
  font-size: 10px;
  padding: 1px 4px;
}

.project-group-header {
  padding: 8px 12px 4px;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
}

.project-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid #f1f5f9;
}

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

.project-option:hover {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.project-option .project-color-dot {
  width: 10px;
  height: 10px;
}

.project-option .project-status {
  margin-left: auto;
  font-size: 10px;
  padding: 1px 4px;
}

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

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

/* Scheduled at cell */
.task-scheduled-at-cell {
  text-align: center;
}

.task-scheduled-at {
  font-weight: 600;
  color: #495057;
  font-size: 0.85rem;
}

.task-scheduled-at.past-scheduled-at {
  color: #dc3545;
  font-weight: 700;
}

.task-scheduled-at.today-scheduled-at {
  color: #007bff;
  font-weight: 700;
}

.task-scheduled-at.future-scheduled-at {
  color: #495057;
  font-weight: 600;
}

.no-scheduled-at {
  color: #adb5bd;
  font-style: italic;
}

/* Priority cell */
.task-priority-cell {
  text-align: center;
  position: relative;
  z-index: 0;
}

.task-priority {
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
  min-width: 60px;
}

.priority-high {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: white;
  border: 1px solid #f59e0b;
  box-shadow: 0 2px 4px rgba(251, 191, 36, 0.3);
}

.priority-medium {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: 1px solid #2563eb;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.priority-low {
  background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
  color: white;
  border: 1px solid #8b5cf6;
  box-shadow: 0 2px 4px rgba(167, 139, 250, 0.3);
}

.priority-none {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
  color: white;
  border: 1px solid #4b5563;
  box-shadow: 0 2px 4px rgba(107, 114, 128, 0.3);
}

/* Project cell */
.task-project-cell {
  padding: 12px 16px;
}

/* Project selector cell */
.task-project-selector-cell {
  padding: 12px 16px;
  position: relative;
}

/* Priority selector cell */
.task-priority-selector-cell {
  padding: 8px 4px;
  text-align: center;
  position: relative;
  width: 8%;
  min-width: 100px;
  max-width: 120px;
}

.task-subtasks-cell {
  padding: 12px 16px;
  text-align: center;
}

.subtask-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.subtask-icon {
  font-size: 16px;
}

.subtask-count {
  font-size: 12px;
  font-weight: 600;
  color: #495057;
  padding: 2px 6px;
  border-radius: 4px;
}

.subtask-progress-mini {
  width: 100%;
  height: 4px;
  background-color: #e9ecef;
  border-radius: 2px;
  overflow: hidden;
}

.subtask-progress-fill-mini {
  height: 100%;
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.task-project {
  display: flex;
  align-items: center;
  gap: 6px;
}

.project-color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.project-link {
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.project-link:hover {
  color: #0056b3;
  text-decoration: underline;
}

.no-project {
  color: #adb5bd;
  font-style: italic;
}

/* Actions cell */
.task-actions-cell {
  text-align: center;
  border: none;
  outline: none;
  padding: 8px 12px;
  vertical-align: middle;
}

.task-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  border: none;
  outline: none;
  background: none;
  margin: 0;
  padding: 0;
}

.task-action-btn {
  padding: 3px 6px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  min-width: 50px;
  margin: 0;
  line-height: 1.2;
  display: inline-block;
  vertical-align: middle;
}

.task-action-btn.complete {
  background-color: #28a745;
  color: white;
}

.task-action-btn.complete:hover {
  background-color: #218838;
}

.task-action-btn.incomplete {
  background-color: #6c757d;
  color: white;
}

.task-action-btn.incomplete:hover {
  background-color: #5a6268;
}

.task-action-btn.show {
  background-color: #007bff;
  color: white;
}

.task-action-btn.show:hover {
  background-color: #0056b3;
}

.task-action-btn.edit {
  background-color: #ffc107;
  color: #212529;
}

.task-action-btn.edit:hover {
  background-color: #e0a800;
}

.task-action-btn.delete {
  background-color: #dc3545;
  color: white;
}

.task-action-btn.delete:hover {
  background-color: #c82333;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #6c757d;
}

.empty-state h3 {
  background: linear-gradient(45deg, var(--cosmic-white), var(--cosmic-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1.5rem;
  margin-bottom: 12px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.empty-state p {
  font-size: 1.1rem;
  margin-bottom: 24px;
}

/* Pagination Controls */
.tasks-container .pagination-controls,
.projects-container .pagination-controls {
  margin: 40px 0 !important;
  padding: 24px !important;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
  border-radius: 12px !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 24px !important;
}

.tasks-container .pagination-info,
.projects-container .pagination-info {
  color: #64748b !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  background: rgba(255, 255, 255, 0.8) !important;
  padding: 8px 16px !important;
  border-radius: 8px !important;
  border: 1px solid #e2e8f0 !important;
}

.tasks-container .pagination-actions,
.projects-container .pagination-actions {
  display: flex !important;
  align-items: center !important;
  gap: 24px !important;
  flex-wrap: wrap !important;
}

.tasks-container .per-page-select,
.projects-container .per-page-select {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  background: rgba(255, 255, 255, 0.9) !important;
  padding: 12px 16px !important;
  border-radius: 8px !important;
  border: 1px solid #d1d5db !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

.tasks-container .per-page-select label,
.projects-container .per-page-select label {
  color: #374151 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  margin: 0 !important;
}

.tasks-container .per-page-select select,
.projects-container .per-page-select select {
  border: none !important;
  background: transparent !important;
  color: #374151 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  outline: none !important;
  padding: 4px 8px !important;
  border-radius: 4px !important;
  transition: background-color 0.2s ease !important;
}

.tasks-container .per-page-select select:hover,
.projects-container .per-page-select select:hover {
  background-color: #f3f4f6 !important;
}

.tasks-container .per-page-select select:focus,
.projects-container .per-page-select select:focus {
  background-color: #f3f4f6 !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1) !important;
}

.tasks-container .page-navigation,
.projects-container .page-navigation {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  background: rgba(255, 255, 255, 0.9) !important;
  padding: 8px 16px !important;
  border-radius: 8px !important;
  border: 1px solid #d1d5db !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

.tasks-container .page-btn,
.projects-container .page-btn {
  padding: 10px 16px !important;
  border: 1px solid #d1d5db !important;
  border-radius: 6px !important;
  background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%) !important;
  color: #374151 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

.tasks-container .page-btn:hover:not(:disabled),
.projects-container .page-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%) !important;
  border-color: #9ca3af !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

.tasks-container .page-btn:active:not(:disabled),
.projects-container .page-btn:active:not(:disabled) {
  transform: translateY(0) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

.tasks-container .page-btn:disabled,
.projects-container .page-btn:disabled {
  opacity: 0.4 !important;
  cursor: not-allowed !important;
  background: #f9fafb !important;
  color: #9ca3af !important;
}

.tasks-container .page-info,
.projects-container .page-info {
  color: #6b7280 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  background: #f3f4f6 !important;
  padding: 8px 12px !important;
  border-radius: 6px !important;
  border: 1px solid #e5e7eb !important;
}

/* Responsive design for pagination */
@media (max-width: 768px) {
  .pagination-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  
  .pagination-actions {
    justify-content: center;
    gap: 16px;
  }
  
  .page-navigation {
    justify-content: center;
  }
}

/* Recurrence cell */
.task-recurrence-cell {
  text-align: center;
}

.task-recurrence {
  background-color: #e3f2fd;
  color: #1565c0;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid #bbdefb;
  display: inline-block;
}

.no-recurrence {
  color: #adb5bd;
  font-style: italic;
}

/* Schedule cell */
.task-schedule-cell {
  text-align: center;
}

.schedule-actions {
  display: flex;
  justify-content: center;
  gap: 4px;
}

.schedule-btn {
  padding: 4px 8px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  min-width: 60px;
  text-align: center;
}

.schedule-btn.schedule-btn {
  background-color: #28a745;
  color: white;
}

.schedule-btn.schedule-btn:hover {
  background-color: #218838;
}

.schedule-btn.unschedule-btn {
  background-color: #dc3545;
  color: white;
}

.schedule-btn.unschedule-btn:hover {
  background-color: #c82333;
}

/* Bulk Actions Toolbar */
.bulk-actions-toolbar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border: 1px solid #e1e5e9;
  backdrop-filter: blur(10px);
}

.bulk-actions-content {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 20px;
}

.bulk-actions-info {
  color: #6c757d;
  font-size: 14px;
  font-weight: 500;
}

.bulk-actions-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
}

.bulk-action-btn {
  padding: 6px 12px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  background-color: white;
  color: #495057;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bulk-action-btn:hover {
  background-color: #e9ecef;
  border-color: #adb5bd;
}

.bulk-action-btn.mark-complete {
  background-color: #28a745;
  color: white;
  border-color: #28a745;
}

.bulk-action-btn.mark-complete:hover {
  background-color: #218838;
  border-color: #1e7e34;
}

.bulk-action-btn.mark-incomplete {
  background-color: #6c757d;
  color: white;
  border-color: #6c757d;
}

.bulk-action-btn.mark-incomplete:hover {
  background-color: #5a6268;
  border-color: #545b62;
}

.bulk-action-btn.delete-selected {
  background-color: #dc3545;
  color: white;
  border-color: #dc3545;
}

.bulk-action-btn.delete-selected:hover {
  background-color: #c82333;
  border-color: #bd2130;
}

.bulk-action-btn.clear-selection {
  background-color: #f8f9fa;
  color: #6c757d;
  border-color: #dee2e6;
}

.bulk-action-btn.clear-selection:hover {
  background-color: #e9ecef;
  border-color: #adb5bd;
}

/* Priority Legend */
.priority-legend {
  margin-top: 2rem;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px solid #e9ecef;
}

.priority-legend-content h4 {
  margin: 0 0 1rem 0;
  color: #495057;
  font-size: 1.1rem;
  font-weight: 600;
}

.priority-examples {
  display: flex;
  gap: 2rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.priority-example {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.priority-sample {
  width: 24px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.priority-sample.high {
  background: linear-gradient(to right, #dc354520, transparent);
}

.priority-sample.medium {
  background: linear-gradient(to right, #ffc10720, transparent);
}

.priority-sample.low {
  background: linear-gradient(to right, #28a74520, transparent);
}

.priority-sample.none {
  background: linear-gradient(to right, #6c757d20, transparent);
}

.priority-example span {
  font-size: 0.9rem;
  color: #6c757d;
  font-weight: 500;
}

.priority-explanation {
  margin: 0;
  color: #6c757d;
  font-size: 0.9rem;
  line-height: 1.5;
  font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
  .tasks-controls {
    padding: 16px;
  }
  
  .filter-controls {
    gap: 12px;
  }
  
  .filter-group {
    min-width: 100px;
  }
  
  .filter-actions {
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }
  
  .clear-btn {
    width: 100%;
    text-align: center;
  }
  
  .tasks-header {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
  
  .header-actions {
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }
  
  .new-task-btn {
    width: 100%;
    text-align: center;
  }
  
  .tasks-header h1 {
    font-size: 2rem;
  }
  
  .tasks-table-container {
    overflow-x: auto;
  }
  
  .tasks-table {
    min-width: 800px;
  }
  
  .task-actions {
    flex-direction: column;
    gap: 4px;
  }
  
  .task-action-btn {
    min-width: 50px;
    padding: 4px 6px;
    font-size: 0.7rem;
  }
  
  .pagination-controls {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  
  .pagination-actions {
    justify-content: center;
  }
  
  .page-navigation {
    justify-content: center;
  }
}

/* Task Popover Styles */
.task-popover {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.task-popover-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.task-popover-content {
  position: relative;
  background: linear-gradient(135deg, var(--cosmic-dark) 0%, var(--cosmic-blue) 100%);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  animation: popoverSlideIn 0.3s ease-out;
  border: 2px solid var(--cosmic-gold);
}

@keyframes popoverSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.task-popover-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 24px 0 24px;
  border-bottom: 1px solid var(--cosmic-gold);
  margin-bottom: 24px;
}

.task-popover-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cosmic-white);
  background: linear-gradient(45deg, var(--cosmic-white), var(--cosmic-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.task-popover-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--cosmic-gold);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.task-popover-close:hover {
  background: rgba(255, 215, 0, 0.2);
  color: var(--cosmic-white);
  transform: scale(1.1);
}

.task-popover-body {
  padding: 0 24px 24px 24px;
  max-height: calc(90vh - 120px);
  overflow-y: auto;
}

/* Show Mode Styles */
.task-detail-content {
  padding: 0;
}

.task-detail-title-section {
  margin-bottom: 24px;
}

.task-detail-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cosmic-deep);
}

.task-detail-description {
  color: var(--cosmic-gray);
  line-height: 1.6;
  margin: 0;
  font-size: 1rem;
}

.task-detail-info {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.task-info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #e2e8f0;
}

.task-info-item:last-child {
  border-bottom: none;
}

.task-info-item label {
  font-weight: 600;
  color: var(--cosmic-deep);
  margin: 0;
}

.task-info-item span {
  color: var(--cosmic-gray);
}

.task-detail-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.task-detail-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 100px;
}

.task-detail-btn.edit {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
}

.task-detail-btn.edit:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.task-detail-btn.complete {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
}

.task-detail-btn.complete:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.task-detail-btn.incomplete {
  background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
  color: white;
}

.task-detail-btn.incomplete:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.task-detail-btn.delete {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
}

.task-detail-btn.delete:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

/* Form Styles in Popover */
.task-form {
  padding: 0;
}

.task-form-field {
  margin-bottom: 20px;
}

.task-form-field label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--cosmic-white);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.task-form-input,
.task-form-textarea,
.task-form-select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--cosmic-gold);
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.95);
  color: var(--cosmic-deep);
  font-weight: 500;
}

.task-form-input:focus,
.task-form-textarea:focus,
.task-form-select:focus {
  outline: none;
  border-color: var(--cosmic-gold);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.3);
  background: var(--cosmic-white);
  transform: translateY(-1px);
}

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

.task-form-input::placeholder,
.task-form-textarea::placeholder {
  color: var(--cosmic-gray);
  opacity: 0.8;
  font-style: italic;
}

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

.character-counter {
  text-align: right;
  font-size: 0.875rem;
  color: var(--cosmic-gold);
  margin-top: 4px;
  font-weight: 500;
}

.task-form-error {
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: 4px;
  display: block;
}

/* Subtasks in Popover */
.subtasks-container {
  margin-bottom: 12px;
}

.subtask-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.subtask-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.9rem;
}

.remove-subtask-btn {
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 4px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
}

.add-subtask-btn {
  background: #f8f9fa;
  border: 2px dashed #dee2e6;
  color: var(--cosmic-gray);
  padding: 12px 16px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  transition: all 0.2s ease;
  width: 100%;
  justify-content: center;
}

.add-subtask-btn:hover {
  background: #e9ecef;
  border-color: #adb5bd;
  color: var(--cosmic-deep);
}

/* Project Selection */
.project-selection {
  display: flex;
  gap: 12px;
  align-items: center;
}

.project-select {
  flex: 1;
}

.new-project-btn {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.new-project-btn:hover {
  background: #f0f9ff;
  color: #1d4ed8;
  text-decoration: none;
}

/* Recurrence Styles in Popover */
.task-form-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e2e8f0;
}

.recurrence-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.recurrence-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.recurrence-option:hover {
  border-color: #3b82f6;
  background: #f0f9ff;
}

.recurrence-option input[type="radio"]:checked + .recurrence-option-text {
  color: #3b82f6;
}

.recurrence-option input[type="radio"]:checked ~ .recurrence-option {
  border-color: #3b82f6;
  background: #f0f9ff;
}

.recurrence-option-text {
  flex: 1;
}

.recurrence-option-title {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--cosmic-deep);
}

.recurrence-option-desc {
  display: block;
  font-size: 0.9rem;
  color: var(--cosmic-gray);
}

.recurrence-advanced {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
  margin-top: 16px;
}

.recurrence-interval-section,
.recurrence-days-section {
  margin-bottom: 20px;
}

.recurrence-option-label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--cosmic-deep);
}

.recurrence-interval-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.recurrence-interval-number {
  width: 80px;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  text-align: center;
}

.recurrence-interval-text {
  color: var(--cosmic-gray);
  font-weight: 500;
}

.recurrence-quick-select {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.quick-select-btn {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  color: var(--cosmic-gray);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.quick-select-btn:hover {
  background: #e9ecef;
  border-color: #adb5bd;
  color: var(--cosmic-deep);
}

.recurrence-days-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

.recurrence-day-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.recurrence-day-checkbox:hover {
  background: #f8f9fa;
  border-color: #3b82f6;
}

.recurrence-day-checkbox input[type="checkbox"]:checked + .recurrence-day-label {
  color: #3b82f6;
  font-weight: 600;
}

.recurrence-day-label {
  font-size: 0.9rem;
  color: var(--cosmic-gray);
}

.recurrence-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #e3f2fd;
  border-radius: 8px;
  margin-top: 16px;
}

.recurrence-preview-icon {
  font-size: 1.2rem;
}

.recurrence-preview-text {
  color: #1976d2;
  font-weight: 500;
}

/* Form Actions */
.task-form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--cosmic-gold);
}

.task-form-cancel {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid var(--cosmic-gold);
  color: var(--cosmic-gold);
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}

.task-form-cancel:hover {
  background: rgba(255, 215, 0, 0.2);
  border-color: var(--cosmic-white);
  color: var(--cosmic-white);
  transform: translateY(-1px);
}

.task-form-submit {
  background: linear-gradient(135deg, var(--cosmic-gold) 0%, var(--cosmic-red) 100%);
  border: none;
  color: var(--cosmic-white);
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.task-form-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
  background: linear-gradient(135deg, var(--cosmic-red) 0%, var(--cosmic-gold) 100%);
}

/* Responsive Popover */
@media (max-width: 768px) {
  .task-popover {
    padding: 10px;
  }
  
  .task-popover-content {
    max-height: 95vh;
  }
  
  .task-popover-body {
    padding: 0 16px 16px 16px;
    max-height: calc(95vh - 100px);
  }
  
  .task-popover-header {
    padding: 16px 16px 0 16px;
    margin-bottom: 16px;
  }
  
  .task-form-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .task-detail-actions {
    flex-direction: column;
  }
  
  .task-detail-btn {
    width: 100%;
  }
  
  .task-form-actions {
    flex-direction: column;
  }
  
  .task-form-cancel,
  .task-form-submit {
    width: 100%;
  }
  
  .recurrence-days-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Project Popover Styles */
.project-popover {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-popover-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.project-popover-content {
  position: relative;
  background: linear-gradient(135deg, var(--cosmic-dark) 0%, var(--cosmic-blue) 100%);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  animation: projectPopoverSlideIn 0.3s ease-out;
  border: 2px solid var(--cosmic-gold);
}

@keyframes projectPopoverSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.project-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 0 24px;
  border-bottom: 1px solid var(--cosmic-gold);
  margin-bottom: 24px;
}

.project-popover-header h2 {
  margin: 0;
  color: var(--cosmic-white);
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(45deg, var(--cosmic-white), var(--cosmic-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.project-popover-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--cosmic-gold);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.project-popover-close:hover {
  background: rgba(255, 215, 0, 0.2);
  color: var(--cosmic-white);
  transform: scale(1.1);
}

.project-popover-body {
  padding: 0 24px 24px 24px;
  max-height: 70vh;
  overflow-y: auto;
}

.project-edit-mode {
  display: block;
}

.project-form-field {
  margin-bottom: 20px;
}

.project-form-field label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--cosmic-white);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.project-form-field input,
.project-form-field textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--cosmic-gold);
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.2s ease;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.95);
  color: var(--cosmic-deep);
  font-weight: 500;
}

.project-form-field input:focus,
.project-form-field textarea:focus {
  outline: none;
  border-color: var(--cosmic-gold);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.3);
  background: var(--cosmic-white);
  transform: translateY(-1px);
}

.project-form-field input.error,
.project-form-field textarea.error {
  border-color: #e74c3c;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.character-counter {
  text-align: right;
  font-size: 0.8rem;
  color: var(--cosmic-gold);
  margin-top: 4px;
  font-weight: 500;
}

.project-form-field input::placeholder,
.project-form-field textarea::placeholder {
  color: var(--cosmic-gray);
  opacity: 0.8;
  font-style: italic;
}

.project-form-error {
  color: #e74c3c;
  font-size: 0.8rem;
  margin-top: 4px;
  display: none;
}

/* Color Selection */
.color-selection {
  margin-top: 8px;
}

.color-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 8px;
  margin-top: 8px;
}

.color-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 4px;
  border: 2px solid var(--cosmic-gold);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.color-option:hover {
  border-color: var(--cosmic-white);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
  background: rgba(255, 215, 0, 0.1);
}

.color-option.selected {
  border-color: var(--cosmic-white);
  background: rgba(255, 215, 0, 0.2);
  box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.4);
}

.color-preview {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  margin-bottom: 4px;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.color-name {
  font-size: 0.6rem;
  font-weight: 500;
  color: var(--cosmic-gold);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.project-form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--cosmic-gold);
}

.project-form-cancel,
.project-form-submit {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.project-form-cancel {
  background: rgba(255, 255, 255, 0.1);
  color: var(--cosmic-gold);
  border: 2px solid var(--cosmic-gold);
  backdrop-filter: blur(10px);
}

.project-form-cancel:hover {
  background: rgba(255, 215, 0, 0.2);
  color: var(--cosmic-white);
  border-color: var(--cosmic-white);
  transform: translateY(-1px);
}

.project-form-submit {
  background: linear-gradient(135deg, var(--cosmic-gold) 0%, var(--cosmic-red) 100%);
  color: var(--cosmic-white);
  border: 2px solid transparent;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.project-form-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
  background: linear-gradient(135deg, var(--cosmic-red) 0%, var(--cosmic-gold) 100%);
}

.project-form-submit:active {
  transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
  .project-popover-content {
    width: 95%;
    margin: 20px;
  }
  
  .project-popover-header {
    padding: 20px 20px 0 20px;
  }
  
  .project-popover-body {
    padding: 0 20px 20px 20px;
  }
  
  .color-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .project-form-actions {
    flex-direction: column;
  }
  
  .project-form-cancel,
  .project-form-submit {
    width: 100%;
  }
}

/* Improved Task Show Mode Styles */
.task-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.task-status-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.task-status-badge.completed {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.task-status-badge.incomplete {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.task-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.task-detail-card {
  display: flex;
  align-items: center;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px solid #e9ecef;
  transition: all 0.2s ease;
}

.task-detail-card:hover {
  background: #e9ecef;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.task-detail-icon {
  font-size: 1.5rem;
  margin-right: 12px;
  width: 32px;
  text-align: center;
}

.task-detail-content {
  flex: 1;
}

.task-detail-content label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #6c757d;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.task-detail-value {
  font-size: 1rem;
  font-weight: 500;
  color: #2c3e50;
}

.task-subtasks-section {
  margin: 24px 0;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px solid #e9ecef;
}

.subtasks-title {
  margin: 0 0 16px 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #2c3e50;
  display: flex;
  align-items: center;
}

.subtasks-title::before {
  content: "📋";
  margin-right: 8px;
}

.subtasks-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.subtask-item {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  background: white;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.subtask-item.completed {
  background: #d4edda;
  border-color: #c3e6cb;
}

.subtask-checkbox {
  margin-right: 8px;
  width: 16px;
  height: 16px;
}

.subtask-text {
  flex: 1;
  font-size: 0.9rem;
  color: #2c3e50;
}

.subtask-text.completed {
  text-decoration: line-through;
  color: #6c757d;
}

.task-detail-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
  flex-wrap: wrap;
}

.task-action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
}

.btn-icon {
  font-size: 1rem;
}

.complete-btn {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
}

.complete-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.incomplete-btn {
  background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
  color: white;
}

.incomplete-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.edit-btn {
  background: linear-gradient(135deg, #007bff 0%, #6610f2 100%);
  color: white;
}

.edit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.delete-btn {
  background: linear-gradient(135deg, #dc3545 0%, #e83e8c 100%);
  color: white;
}

.delete-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Responsive Design for Task Show Mode */
@media (max-width: 768px) {
  .task-details-grid {
    grid-template-columns: 1fr;
  }
  
  .task-detail-actions {
    flex-direction: column;
  }
  
  .task-action-btn {
    width: 100%;
    justify-content: center;
  }
}
