/* Tasks Page Styles */
.tasks-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

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

.section-header {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 20px;
  padding: 12px 20px;
  border-radius: 8px;
  border-left: 4px solid;
}

.incomplete-header {
  background-color: #fff3cd;
  color: #856404;
  border-left-color: #ffc107;
}

.completed-header {
  background-color: #d4edda;
  color: #155724;
  border-left-color: #28a745;
}

.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);
}

.catch-up-btn {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.catch-up-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.new-task-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 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(102, 126, 234, 0.3);
}

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

.task-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
  border: 1px solid #e1e5e9;
  transition: all 0.3s ease;
}

.task-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.task-card.completed {
  opacity: 0.7;
  background: #f8f9fa;
}

.task-card.completed .task-title {
  text-decoration: line-through;
  color: #6c757d;
}

.task-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: #2c3e50;
  margin: 0 0 12px 0;
}

.task-description {
  color: #6c757d;
  margin: 0 0 16px 0;
  line-height: 1.5;
}

.task-meta {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.task-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: #495057;
}

.task-meta-label {
  font-weight: 600;
  color: #6c757d;
}

.task-due-date {
  color: #dc3545;
  font-weight: 600;
}

.task-completed {
  color: #28a745;
  font-weight: 600;
}

.task-priority {
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.priority-high {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.priority-medium {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.priority-low {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

.priority-none {
  background-color: #e2e3e5;
  color: #383d41;
  border: 1px solid #d6d8db;
}

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

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

.task-action-btn {
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

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

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

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

.task-action-btn.edit:hover {
  background-color: #e0a800;
  color: #212529;
  text-decoration: none;
}

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

.task-action-btn.delete:hover {
  background-color: #c82333;
  color: white;
  text-decoration: none;
}

.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;
}

/* 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-form {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: end;
  width: 100%;
}

.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: #6c757d;
  color: white;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.clear-btn:hover {
  background: #5a6268;
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
}

.notice {
  background: #d4edda;
  color: #155724;
  padding: 12px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 1px solid #c3e6cb;
}

.alert {
  background: #f8d7da;
  color: #721c24;
  padding: 12px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 1px solid #f5c6cb;
}

/* Task Detail Page Styles */
.task-detail-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

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

.task-detail-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);
}

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

.task-detail-btn {
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

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

.task-detail-btn.edit:hover {
  background-color: #e0a800;
  color: #212529;
  text-decoration: none;
}

.task-detail-btn.back {
  background-color: #6c757d;
  color: white;
}

.task-detail-btn.back:hover {
  background-color: #5a6268;
  color: white;
  text-decoration: none;
}

.task-detail-btn.delete {
  background-color: #dc3545;
  color: white;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
}

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

/* Form Styles */
.form-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
}

.form-header {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e1e5e9;
}

.form-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);
}

.form-card {
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
  border: 1px solid #e1e5e9;
}

.form-field {
  margin-bottom: 24px;
}

.form-field label {
  display: block;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 8px;
  font-size: 1rem;
}

.form-field input[type="text"],
.form-field input[type="date"],
.form-field textarea,
.form-field select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}

.form-field input[type="text"]:focus,
.form-field input[type="date"]:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

.form-field input[type="checkbox"] {
  margin-right: 8px;
  transform: scale(1.2);
}

.form-input-small {
  width: 80px;
  padding: 8px 12px;
  border: 2px solid #e1e5e9;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}

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

.checkbox-field {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
}

.checkbox-field label {
  margin-bottom: 0;
  cursor: pointer;
}

.recurrence-controls {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
}

.recurrence-type {
  flex: 1;
  min-width: 150px;
}

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

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

#interval-label {
  font-size: 0.9rem;
  color: #6c757d;
  white-space: nowrap;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
}

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

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

.form-cancel-btn {
  background-color: #6c757d;
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.form-cancel-btn:hover {
  background-color: #5a6268;
  color: white;
  text-decoration: none;
}

.error-messages {
  background: #f8d7da;
  color: #721c24;
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: 24px;
  border: 1px solid #f5c6cb;
}

.error-messages h2 {
  font-size: 1.1rem;
  margin: 0 0 12px 0;
  color: #721c24;
}

.error-messages ul {
  margin: 0;
  padding-left: 20px;
}

.error-messages li {
  margin-bottom: 4px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .tasks-controls {
    padding: 16px;
  }
  
  .filter-controls {
    gap: 12px;
  }
  
  .filter-form {
    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%;
  }
  
  .catch-up-btn,
  .new-task-btn {
    width: 100%;
    text-align: center;
  }
  
  .tasks-header h1 {
    font-size: 2rem;
  }
  
  .task-meta {
    flex-direction: column;
    gap: 8px;
  }
  
  .task-actions {
    flex-wrap: wrap;
  }
  
  .task-action-btn {
    flex: 1;
    text-align: center;
  }
}

/* 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 th {
  background-color: #f8f9fa;
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #495057;
  border-bottom: 2px solid #dee2e6;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.sortable-header:hover {
  background-color: #e9ecef;
}

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

.header-link:hover {
  color: #007bff;
  text-decoration: none;
}

.header-link.active {
  color: #007bff;
  font-weight: 700;
}

.sort-indicator {
  color: #007bff;
  font-weight: 700;
  font-size: 0.8em;
}

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

.tasks-table tbody tr:hover {
  background-color: #f8f9fa;
  transform: translateX(2px);
}

.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-title {
  width: 35%;
}

.col-due-date {
  width: 15%;
}

.col-priority {
  width: 12%;
}

.col-recurrence {
  width: 15%;
}

.col-status {
  width: 10%;
}

.col-actions {
  width: 120px;
}

.col-checkbox {
  width: 40px;
  text-align: center;
}

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

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

.task-checkbox:checked {
  background-color: #28a745;
  border-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;
}

.separator {
  color: #adb5bd;
  font-weight: 400;
}

.task-description-preview {
  color: #6c757d;
  font-size: 0.8rem;
  font-style: italic;
}

/* Due date cell */
.task-due-date-cell {
  text-align: center;
}

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

.task-due-date.overdue {
  color: #dc3545;
  font-weight: 700;
}

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

/* Priority cell */
.task-priority-cell {
  text-align: center;
}

.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;
}

/* 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;
}

/* Status cell */
.task-status-cell {
  text-align: center;
}

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

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

.task-status.pending {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

/* 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;
}

/* Responsive table */
@media (max-width: 768px) {
  .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;
  }
} 