/* Taskfront - Modern Mobile-First Styles */

:root {
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: #60a5fa;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-sidebar: #1e293b;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --text-inverse: #ffffff;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --transition: 0.2s ease;
  --sidebar-width: 240px;
  --header-height: 56px;
  --bottom-nav-height: 64px;
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
}

/* App Layout */
.app-container {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

@media (min-width: 768px) {
  .app-container {
    flex-direction: row;
  }
}

/* Sidebar */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  color: var(--text-inverse);
  transform: translateX(-100%);
  transition: transform var(--transition);
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

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

@media (min-width: 768px) {
  .sidebar {
    transform: translateX(0);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
  }
  .sidebar-overlay {
    display: none;
  }
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
  display: none;
}

.sidebar-overlay.show {
  display: block;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.sidebar-logo {
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Custom scrollbar for sidebar */
.sidebar-nav::-webkit-scrollbar {
  width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.nav-section {
  padding: 8px 12px;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
}

.nav-section-header.collapsible {
  cursor: pointer;
  transition: background var(--transition);
}

.nav-section-header.collapsible:hover {
  background: rgba(255, 255, 255, 0.05);
}

.nav-section-header .chevron {
  transition: transform var(--transition);
}

.nav-section-header .chevron.collapsed {
  transform: rotate(-90deg);
}

.nav-list-submenu.collapsed {
  display: none;
}

.nav-section-action {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  transition: color var(--transition);
}

.nav-section-action:hover {
  color: rgba(255, 255, 255, 0.9);
}

.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-label {
  flex: 1;
}

.nav-badge {
  background: var(--primary);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.logo-text {
  color: white;
}

.nav-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.4);
  padding: 8px 12px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  border-radius: var(--radius);
  margin: 2px 8px;
  transition: all var(--transition);
  cursor: pointer;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-inverse);
}

.nav-item.active {
  background: var(--primary);
  color: var(--text-inverse);
}

.nav-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.project-color {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-right: 8px;
}

.project-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-right: 8px;
  color: white;
}

.project-icon svg {
  width: 16px;
  height: 16px;
}

.nav-item-project {
  padding-left: 12px;
  display: flex;
  align-items: center;
}

.nav-item-tag .nav-icon {
  color: rgba(255, 255, 255, 0.5);
}

.nav-item-add {
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
}

.nav-item-add:hover {
  color: rgba(255, 255, 255, 0.8);
}

.nav-item-more {
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
  padding: 8px 16px;
}

.nav-item-more:hover {
  color: rgba(255, 255, 255, 0.7);
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.quick-add-btn {
  width: 100%;
  padding: 12px 16px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
}

.quick-add-btn:hover {
  background: var(--primary-dark);
}

.quick-add-icon {
  display: flex;
  align-items: center;
}

.quick-add-shortcut {
  margin-left: auto;
  font-size: 11px;
  opacity: 0.7;
  font-weight: 400;
}

/* Push Notifications Button */
.push-notifications-btn {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  border: none;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
  margin-top: 8px;
}

.push-notifications-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.push-notifications-btn.active {
  background: var(--success);
  color: white;
}

.push-icon {
  display: flex;
  align-items: center;
}

.push-status {
  flex: 1;
  text-align: left;
}

/* Push Test Button */
.push-test-btn {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.6);
  border: none;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
  margin-top: 8px;
}

.push-test-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
}

.push-test-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.push-test-icon {
  display: flex;
  align-items: center;
}

/* Main Content */
.main-content {
  flex: 1;
  width: 100%;
  padding-bottom: var(--bottom-nav-height);
}

@media (min-width: 768px) {
  .main-content {
    padding-bottom: 0;
    width: calc(100% - var(--sidebar-width));
  }
}

/* Header */
.app-header {
  position: sticky;
  top: 0;
  height: var(--header-height);
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  z-index: 50;
  gap: 12px;
}

.header-title {
  font-size: 18px;
  font-weight: 600;
  flex: 1;
}

.header-actions {
  display: flex;
  gap: 8px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  border: none;
  background: var(--gray-100);
  color: var(--gray-600);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.icon-btn:hover {
  background: var(--gray-200);
}

/* View Content */
.view-content {
  padding: 16px;
  padding-bottom: 80px;
}

@media (min-width: 768px) {
  .view-content {
    padding: 24px;
  }
}

/* Task List */
.task-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.task-card,
.task-item {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  gap: 12px;
  cursor: pointer;
  transition: all var(--transition);
}

.task-card:hover,
.task-item:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
}

.task-card.completed,
.task-item.completed {
  opacity: 0.6;
}

.task-card.completed .task-description,
.task-item.completed .task-description {
  text-decoration: line-through;
  color: var(--text-muted);
}

.task-checkbox {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--gray-300);
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
  padding: 0;
}

.task-checkbox:hover {
  border-color: var(--primary);
}

.task-checkbox.checked {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.task-content {
  flex: 1;
  min-width: 0;
}

.task-description {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.task-tag {
  background: var(--gray-100);
  padding: 2px 8px;
  border-radius: 4px;
}

.task-project {
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}

.task-due {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
}

.task-due.overdue {
  color: var(--danger);
}

.task-recur,
.task-parent {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
  font-size: 12px;
}

.task-priority {
  display: inline-flex;
  align-items: center;
}

.task-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.task-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  opacity: 0;
  transition: opacity var(--transition);
}

.task-item:hover .task-actions {
  opacity: 1;
}

.task-action {
  width: 28px;
  height: 28px;
  border-radius: var(--radius);
  border: none;
  background: var(--gray-100);
  color: var(--gray-600);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.task-action:hover {
  background: var(--gray-200);
  color: var(--text-primary);
}

.task-action-delete:hover {
  background: var(--danger);
  color: white;
}

.task-subtasks {
  margin-top: 8px;
}

.subtask-progress {
  display: flex;
  align-items: center;
  gap: 8px;
}

.progress-bar {
  height: 4px;
  background: var(--gray-200);
  border-radius: 2px;
  flex: 1;
  max-width: 100px;
}

.progress-text {
  font-size: 11px;
  color: var(--text-muted);
}

/* Hierarchical Subtask Display */
.subtask-list {
  display: flex;
  flex-direction: column;
  margin-left: 24px;
  border-left: 2px solid var(--gray-200);
  padding-left: 12px;
  margin-top: 4px;
  margin-bottom: 12px;
}

.subtask-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 6px;
  cursor: pointer;
  transition: all var(--transition);
}

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

.subtask-item:hover {
  background: var(--gray-100);
  border-color: var(--primary-light);
}

.subtask-item.completed {
  opacity: 0.6;
}

.subtask-item.completed .subtask-description {
  text-decoration: line-through;
  color: var(--text-muted);
}

.subtask-item.waiting {
  opacity: 0.7;
}

.subtask-indent {
  width: 0;
}

.subtask-priority-indicator {
  width: 3px;
  height: 20px;
  border-radius: 2px;
  flex-shrink: 0;
}

.subtask-priority-indicator.priority-H {
  background: var(--danger);
}

.subtask-priority-indicator.priority-M {
  background: var(--warning);
}

.subtask-priority-indicator.priority-L {
  background: var(--success);
}

.subtask-priority-indicator.priority-none {
  background: transparent;
}

.subtask-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--gray-300);
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
  padding: 0;
}

.subtask-checkbox:hover {
  border-color: var(--primary);
}

.subtask-checkbox svg {
  color: var(--success);
}

.subtask-content {
  flex: 1;
  min-width: 0;
}

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

.subtask-description {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-primary);
}

.subtask-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  color: var(--text-secondary);
}

.subtask-due {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--text-secondary);
}

.subtask-due.overdue {
  color: var(--danger);
}

.subtask-wait {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--accent);
}

.subtask-priority {
  display: inline-flex;
  align-items: center;
}

.subtask-priority.priority-H {
  color: var(--danger);
}

.subtask-priority.priority-M {
  color: var(--warning);
}

.subtask-priority.priority-L {
  color: var(--success);
}

.subtask-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 4px;
}

.subtask-tag {
  background: var(--gray-200);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 11px;
}

.subtask-actions {
  display: flex;
  gap: 4px;
  align-items: center;
  opacity: 0;
  transition: opacity var(--transition);
}

.subtask-item:hover .subtask-actions {
  opacity: 1;
}

.subtask-action {
  width: 24px;
  height: 24px;
  border-radius: var(--radius);
  border: none;
  background: var(--gray-200);
  color: var(--gray-600);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.subtask-action:hover {
  background: var(--gray-300);
  color: var(--text-primary);
}

.subtask-action-active {
  background: var(--primary) !important;
  color: white !important;
}

.subtask-action-delete:hover {
  background: var(--danger);
  color: white;
}

.subtask-status-badge {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 10px;
  background: var(--gray-200);
  color: var(--text-secondary);
  text-transform: capitalize;
}

.subtask-status-badge.status-waiting {
  background: var(--warning-light);
  color: var(--warning);
}

.subtask-status-badge.status-started {
  background: var(--primary-light);
  color: var(--primary);
}

/* Bottom Navigation (Mobile) */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-height);
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 50;
}

@media (min-width: 768px) {
  .bottom-nav {
    display: none;
  }
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 11px;
  cursor: pointer;
  background: none;
  border: none;
}

.bottom-nav-item.active {
  color: var(--primary);
}

.bottom-nav-item svg {
  width: 24px;
  height: 24px;
}

/* Floating Action Button */
.fab {
  position: fixed;
  bottom: calc(var(--bottom-nav-height) + 16px);
  right: 16px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
  transition: all var(--transition);
}

.fab:hover {
  background: var(--primary-dark);
  transform: scale(1.05);
}

@media (min-width: 768px) {
  .fab {
    bottom: 24px;
  }
}

/* Filter Popup */
.filter-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
}

.filter-popup {
  position: fixed;
  bottom: var(--bottom-nav-height);
  left: 0;
  right: 0;
  background: var(--bg-primary);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  max-height: 70vh;
  overflow-y: auto;
  z-index: 201;
  animation: slideUp 0.2s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.filter-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-primary);
}

.filter-popup-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.filter-popup-content {
  padding: 16px;
}

.saved-filters-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.saved-filters-section h4 {
  margin: 0 0 8px 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.saved-filters-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.saved-filters-section li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 8px;
  transition: background var(--transition);
}

.saved-filters-section li a:hover {
  background: var(--gray-100);
}

.saved-filters-section li a svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.saved-filters-build {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  color: var(--primary);
  text-decoration: none;
  border: 1px dashed var(--primary);
  border-radius: 8px;
  font-weight: 500;
  transition: background var(--transition);
}

.saved-filters-build:hover {
  background: var(--primary-light);
}

/* Task Detail Panel */
.task-detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  display: flex;
  align-items: flex-end;
}

@media (min-width: 768px) {
  .task-detail-overlay {
    align-items: center;
    justify-content: center;
  }
}

.task-detail-panel {
  background: var(--bg-primary);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}

@media (min-width: 768px) {
  .task-detail-panel {
    border-radius: var(--radius-xl);
    max-height: 80vh;
  }
}

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

.panel-header {
  display: flex;
  justify-content: flex-end;
  padding: 16px;
  position: sticky;
  top: 0;
  background: var(--bg-primary);
  z-index: 10;
}

.close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--gray-100);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.panel-content {
  padding: 0 16px 24px;
}

.task-title-section {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.task-checkbox-large {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--gray-300);
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
  padding: 0;
}

.task-checkbox-large:hover {
  border-color: var(--primary);
}

.task-checkbox-large.checked {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.task-title {
  font-size: 20px;
  font-weight: 600;
  flex: 1;
}

/* Task Edit Modal */
.task-edit-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  display: flex;
  align-items: flex-end;
}

@media (min-width: 768px) {
  .task-edit-overlay {
    align-items: center;
    justify-content: center;
  }
}

.task-edit-panel {
  background: var(--bg-primary);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}

@media (min-width: 768px) {
  .task-edit-panel {
    border-radius: var(--radius-xl);
    max-height: 85vh;
  }
}

.task-edit-panel .panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.task-edit-panel .panel-header h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.edit-form {
  padding: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  background: var(--bg-primary);
  color: var(--text-primary);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
}

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

.form-row .form-group {
  margin-bottom: 0;
}

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

.btn-cancel,
.btn-save {
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
}

.btn-cancel {
  background: var(--gray-100);
  color: var(--gray-700);
}

.btn-cancel:hover {
  background: var(--gray-200);
}

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

.btn-save:hover {
  background: var(--primary-dark);
}

/* Task Detail Sections */
.task-tags-section,
.task-annotations-section,
.task-subtasks-section,
.add-comment-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.task-tags-section h3,
.task-annotations-section h3,
.task-subtasks-section h3,
.add-comment-section h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.task-tags-section .task-tag {
  background: var(--gray-100);
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 13px;
}

.annotations-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.annotation-item {
  background: var(--gray-50);
  padding: 12px;
  border-radius: var(--radius);
}

.annotation-content {
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.annotation-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.section-header h3 {
  margin: 0;
}

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

.subtask-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: var(--gray-50);
  border-radius: var(--radius);
}

.subtask-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--gray-300);
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all var(--transition);
}

.subtask-checkbox:hover {
  border-color: var(--primary);
}

.subtask-description {
  flex: 1;
  font-size: 14px;
}

.subtask-description.completed {
  text-decoration: line-through;
  color: var(--text-muted);
}

.subtask-delete {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--gray-400);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all var(--transition);
}

.subtask-item:hover .subtask-delete {
  opacity: 1;
}

.subtask-delete:hover {
  background: var(--danger);
  color: white;
}

.empty-subtasks {
  font-size: 14px;
  color: var(--text-muted);
  font-style: italic;
  padding: 12px 0;
}

.add-subtask-form {
  display: flex;
  gap: 8px;
}

.subtask-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
}

.subtask-input:focus {
  outline: none;
  border-color: var(--primary);
}

.add-subtask-btn {
  padding: 10px 16px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition);
}

.add-subtask-btn:hover {
  background: var(--primary-dark);
}

.add-comment-section textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
}

.add-comment-section textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.submit-btn {
  padding: 10px 20px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition);
}

.submit-btn:hover {
  background: var(--primary-dark);
}

.panel-actions {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-primary);
  position: sticky;
  bottom: 0;
  z-index: 10;
}

.action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.action-btn:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
}

.action-edit {
  color: var(--primary);
  border-color: var(--primary);
}

.action-edit:hover {
  background: var(--primary);
  color: white;
}

.action-delete {
  color: var(--danger);
  border-color: var(--danger);
}

.action-delete:hover {
  background: var(--danger);
  color: white;
}

.task-metadata {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.metadata-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.metadata-label {
  color: var(--text-secondary);
}

.metadata-value {
  font-weight: 500;
}

/* Quick Add Modal */
.quick-add-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  display: flex;
  align-items: flex-end;
}

@media (min-width: 768px) {
  .quick-add-overlay {
    align-items: center;
    justify-content: center;
  }
}

.quick-add-panel {
  background: var(--bg-primary);
  width: 100%;
  max-width: 500px;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 20px;
  animation: slideUp 0.2s ease;
}

@media (min-width: 768px) {
  .quick-add-panel {
    border-radius: var(--radius-xl);
  }
}

.quick-add-input {
  width: 100%;
  padding: 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 16px;
  margin-bottom: 12px;
}

.quick-add-input:focus {
  outline: none;
  border-color: var(--primary);
}

.quick-add-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.btn {
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
}

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

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-700);
}

.btn-secondary:hover {
  background: var(--gray-200);
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}

.empty-state svg {
  width: 64px;
  height: 64px;
  color: var(--gray-300);
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-muted);
  font-size: 14px;
}

/* Loading */
.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.task-list-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
  gap: 16px;
  color: var(--text-secondary);
}

/* Subtasks */
.task-subtasks-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.task-subtasks-section h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}

.subtask-progress-bar {
  height: 6px;
  background: var(--gray-200);
  border-radius: 3px;
  overflow: hidden;
  flex: 1;
  max-width: 120px;
}

.progress-fill {
  height: 100%;
  background: var(--success);
  transition: width 0.3s ease;
}

.subtask-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--gray-50);
  border-radius: var(--radius);
  margin-bottom: 8px;
}

.subtask-description {
  flex: 1;
}

.subtask-description.completed {
  text-decoration: line-through;
  color: var(--text-muted);
}

.add-subtask-form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.subtask-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
}

.subtask-input:focus {
  outline: none;
  border-color: var(--primary);
}

/* Mobile menu toggle */
.menu-toggle {
  display: flex;
}

@media (min-width: 768px) {
  .menu-toggle {
    display: none;
  }
}

/* ========================================
   MISSING STYLES - Added to fix UI issues
   ======================================== */

/* Search Modal */
.search-wrapper {
  display: none;
}

.search-wrapper[style*="display:block"] {
  display: block;
}

.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  display: flex;
  align-items: flex-start;
  padding-top: 80px;
  justify-content: center;
}

.search-modal {
  background: var(--bg-primary);
  width: 90%;
  max-width: 600px;
  max-height: 70vh;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.search-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

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

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 16px;
  color: var(--text-primary);
  outline: none;
}

.search-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--gray-100);
  color: var(--gray-500);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.search-close:hover {
  background: var(--gray-200);
  color: var(--text-primary);
}

.search-results {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: none;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: background var(--transition);
}

.result-item:hover {
  background: var(--gray-50);
}

.result-checkbox {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--gray-400);
}

.result-description {
  flex: 1;
  font-size: 14px;
  color: var(--text-primary);
}

.result-description.completed {
  text-decoration: line-through;
  color: var(--text-muted);
}

.result-project {
  font-size: 12px;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2px 8px;
  border-radius: 4px;
}

.no-results {
  padding: 32px;
  text-align: center;
  color: var(--text-muted);
}

.search-hint {
  padding: 32px;
  text-align: center;
}

.search-hint p {
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.hint-examples {
  font-size: 13px;
  color: var(--text-muted);
}

.search-footer {
  display: flex;
  gap: 16px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}

.search-footer kbd {
  background: var(--gray-100);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: inherit;
}

/* Quick Add Modal */
.quick-add-wrapper {
  display: none;
}

.quick-add-wrapper[style*="display:block"] {
  display: block;
}

.quick-add-modal {
  background: var(--bg-primary);
  width: 100%;
  max-width: 500px;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 20px;
  animation: slideUp 0.2s ease;
}

@media (min-width: 768px) {
  .quick-add-modal {
    border-radius: var(--radius-xl);
  }
}

.quick-add-header {
  margin-bottom: 12px;
}

.quick-add-hint {
  font-size: 13px;
  color: var(--text-muted);
}

.quick-add-hint kbd {
  background: var(--gray-100);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: inherit;
}

/* Quick Add Tabs */
.quick-add-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.quick-add-tabs .tab {
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius);
  transition: all var(--transition);
}

.quick-add-tabs .tab:hover {
  background: var(--gray-100);
  color: var(--text-primary);
}

.quick-add-tabs .tab.active {
  background: var(--primary);
  color: white;
}

/* Task Form */
.task-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.task-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.task-form label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.task-form input[type="text"],
.task-form input[type="date"],
.task-form select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  background: var(--bg-primary);
  color: var(--text-primary);
}

.task-form input[type="text"]:focus,
.task-form input[type="date"]:focus,
.task-form select:focus {
  outline: none;
  border-color: var(--primary);
}

.task-form .form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.task-form .form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.task-form .btn-cancel {
  padding: 10px 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--radius);
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition);
}

.task-form .btn-cancel:hover {
  background: var(--gray-100);
  color: var(--text-primary);
}

.task-form .btn-save {
  padding: 10px 20px;
  border: none;
  background: var(--primary);
  color: white;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.task-form .btn-save:hover {
  opacity: 0.9;
}

.quick-add-content {
  padding: 8px 0;
}

.hint-details {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

/* View Switcher */
.view-switcher {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-primary);
}

.view-tabs {
  display: flex;
  gap: 4px;
}

.view-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  border-radius: var(--radius);
  transition: all var(--transition);
}

.view-tab:hover {
  background: var(--gray-100);
  color: var(--text-primary);
}

.view-tab.active {
  background: var(--primary);
  color: white;
}

.view-label {
  display: none;
}

@media (min-width: 768px) {
  .view-label {
    display: inline;
  }
}

.view-actions {
  display: flex;
  gap: 8px;
}

.view-action {
  padding: 8px 12px;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  color: var(--text-secondary);
  border-radius: var(--radius);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition);
}

.view-action:hover {
  background: var(--gray-50);
  color: var(--text-primary);
}

.sort-label {
  font-size: 12px;
}

/* Task Board */
.task-board {
  flex: 1;
  overflow-x: auto;
  padding: 16px;
}

.board-columns {
  display: flex;
  gap: 16px;
  min-width: fit-content;
}

.board-column {
  width: 300px;
  flex-shrink: 0;
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 200px);
}

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

.column-title {
  font-size: 14px;
  font-weight: 600;
  text-transform: capitalize;
  margin: 0;
}

.column-count {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--gray-200);
  padding: 2px 8px;
  border-radius: 10px;
}

.column-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.board-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  cursor: grab;
  transition: all var(--transition);
}

.board-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.board-card.dragging {
  opacity: 0.5;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.card-checkbox {
  width: 18px;
  height: 18px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--gray-400);
  padding: 0;
}

.card-priority {
  font-size: 12px;
}

.card-description {
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
}

.card-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11px;
}

.card-project,
.card-due {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
}

.card-subtasks {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-muted);
}

.mini-progress {
  height: 3px;
  background: var(--gray-200);
  border-radius: 2px;
  flex: 1;
  max-width: 60px;
}

.mini-progress-fill {
  height: 100%;
  background: var(--success);
  border-radius: 2px;
}

.add-card-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px;
  border: 1px dashed var(--border);
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition);
}

.add-card-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* Task Calendar */
.task-calendar {
  padding: 16px;
}

.calendar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.calendar-nav {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.calendar-nav:hover {
  background: var(--gray-50);
  color: var(--text-primary);
}

.calendar-title {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  text-align: center;
}

.today-btn {
  padding: 8px 16px;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  border-radius: var(--radius);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition);
}

.today-btn:hover {
  background: var(--gray-50);
}

.calendar-grid {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--gray-50);
  border-bottom: 1px solid var(--border);
}

.calendar-weekdays span {
  padding: 12px 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: minmax(100px, auto);
}

.calendar-day {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 8px;
  min-height: 100px;
  background: var(--bg-primary);
}

.calendar-day:nth-child(7n) {
  border-right: none;
}

.calendar-day.other-month {
  background: var(--gray-50);
  color: var(--text-muted);
}

.calendar-day.today {
  background: var(--primary-light);
}

.calendar-day.today .day-number {
  color: var(--primary);
  font-weight: 600;
}

.day-number {
  font-size: 14px;
  margin-bottom: 4px;
  display: block;
}

.day-tasks {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.day-task {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 2px 4px;
  background: var(--gray-100);
  border-radius: 3px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.day-task:hover {
  background: var(--gray-200);
}

.task-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gray-400);
  flex-shrink: 0;
}

.task-dot.priority-high {
  background: var(--danger);
}

.more-tasks {
  font-size: 10px;
  color: var(--text-muted);
  padding: 2px 4px;
}

/* Task Filters */
.filters-container {
  display: flex;
  gap: 16px;
  padding: 16px;
}

@media (max-width: 768px) {
  .filters-container {
    flex-direction: column;
  }
}

.filters-sidebar {
  width: 240px;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .filters-sidebar {
    width: 100%;
    margin-bottom: 16px;
  }
}

.saved-filters-section,
.quick-filters-section {
  margin-bottom: 24px;
}

.saved-filters-section h3,
.quick-filters-section h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.save-filter-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: var(--gray-100);
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.save-filter-btn:hover {
  background: var(--primary);
  color: white;
}

.saved-filters-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.saved-filter-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--gray-50);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
  text-align: left;
  transition: all var(--transition);
}

.saved-filter-item:hover {
  background: var(--gray-100);
}

.filter-name {
  flex: 1;
}

.delete-filter-btn {
  width: 20px;
  height: 20px;
  border: none;
  background: transparent;
  color: var(--gray-400);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all var(--transition);
}

.saved-filter-item:hover .delete-filter-btn {
  opacity: 1;
}

.delete-filter-btn:hover {
  color: var(--danger);
}

.no-filters {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}

.quick-filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.quick-filter-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 12px;
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
  transition: all var(--transition);
}

.quick-filter-btn:hover {
  background: var(--gray-100);
  border-color: var(--primary);
}

.quick-filter-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quick-filter-icon.today {
  background: var(--primary-light);
  color: var(--primary);
}

.quick-filter-icon.overdue {
  background: #fee2e2;
  color: var(--danger);
}

.quick-filter-icon.week {
  background: #fef3c7;
  color: var(--warning);
}

.quick-filter-icon.no-date {
  background: var(--gray-200);
  color: var(--gray-600);
}

.quick-filter-icon.high {
  background: #fee2e2;
  color: var(--danger);
}

.quick-filter-icon.waiting {
  background: #e0e7ff;
  color: #6366f1;
}

.filters-main {
  flex: 1;
}

.filter-builder {
  background: var(--gray-50);
  padding: 20px;
  border-radius: var(--radius-lg);
}

.filter-builder-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.filter-group.full-width {
  flex: 2;
}

.filter-group label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.filter-group input,
.filter-group select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  background: var(--bg-primary);
}

.filter-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.apply-btn,
.clear-btn {
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.apply-btn {
  background: var(--primary);
  color: white;
  border: none;
}

.apply-btn:hover {
  background: var(--primary-dark);
}

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

.clear-btn:hover {
  background: var(--gray-100);
}

.active-filter-display {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--primary-light);
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.active-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.active-query {
  font-weight: 500;
  color: var(--primary);
  font-family: monospace;
}

.clear-active-btn {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}

.clear-active-btn:hover {
  color: var(--danger);
}

.no-filter {
  color: var(--text-muted);
  font-style: italic;
}

/* Save Filter Modal */
.save-filter-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
}

.save-filter-modal {
  background: var(--bg-primary);
  padding: 24px;
  border-radius: var(--radius-xl);
  width: 90%;
  max-width: 400px;
}

.save-filter-modal h3 {
  margin: 0 0 16px 0;
}

.save-filter-modal input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 16px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.cancel-btn,
.save-btn {
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

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

.save-btn {
  background: var(--primary);
  border: none;
  color: white;
}

/* Sidebar additions */
.nav-list-projects {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Status badges */
.task-status {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  text-transform: capitalize;
}

.task-status.status-pending {
  background: #fef3c7;
  color: #d97706;
}

.task-status.status-completed {
  background: #d1fae5;
  color: #059669;
}

.task-status.status-waiting {
  background: #e0e7ff;
  color: #4f46e5;
}

.task-status.status-started {
  background: #dbeafe;
  color: #2563eb;
}

/* Task Filters Wrapper - single root element for LiveView */
.task-filters-wrapper {
  display: contents;
}

/* ========================================
   IMPROVED TASK CARD STYLES
   ======================================== */

/* Task Item with Priority Indicator */
.task-item {
  position: relative;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 16px 16px 20px;
  display: flex;
  gap: 12px;
  cursor: pointer;
  transition: all var(--transition);
  overflow: hidden;
}

.task-item:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
}

.task-item.completed {
  opacity: 0.7;
  background: var(--gray-50);
}

.task-item.waiting {
  border-left: 4px solid var(--warning);
}

/* Priority Indicator Strip */
.task-priority-indicator {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}

.task-priority-indicator.priority-H {
  background: var(--danger);
}

.task-priority-indicator.priority-M {
  background: var(--warning);
}

.task-priority-indicator.priority-L {
  background: var(--success);
}

.task-priority-indicator.priority-none {
  background: var(--gray-200);
}

/* Task Header Row */
.task-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.task-description {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  flex: 1;
  line-height: 1.4;
}

.task-item.completed .task-description {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* Status Badge */
.task-status-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.task-status-badge.status-waiting {
  background: #fef3c7;
  color: #d97706;
}

.task-status-badge.status-started {
  background: #dbeafe;
  color: #2563eb;
}

.task-status-badge.status-pending {
  background: #f3f4f6;
  color: #6b7280;
}

.task-status-badge.status-started,
.task-status-badge.status-active {
  background: #dbeafe;
  color: #2563eb;
}

.task-status-badge.status-recurring {
  background: #ede9fe;
  color: #7c3aed;
}

.task-status-badge.status-completed {
  background: #d1fae5;
  color: #059669;
}

/* Task Meta Row */
.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* Project */
.task-project {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 500;
}

/* Due Date with Urgency */
.task-due {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--text-secondary);
}

.task-due.overdue {
  color: var(--danger);
  font-weight: 600;
}

.task-due.overdue svg {
  stroke: var(--danger);
}

.task-due.due-today {
  color: var(--danger);
  font-weight: 600;
}

.task-due.due-today svg {
  stroke: var(--danger);
}

.task-due.due-tomorrow {
  color: var(--warning);
  font-weight: 500;
}

.task-due.due-soon {
  color: var(--warning);
}

/* Wait Until */
.task-wait {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}

.task-wait svg {
  stroke: var(--warning);
}

/* Scheduled */
.task-scheduled {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--info);
  font-weight: 500;
}

.task-scheduled svg {
  stroke: var(--info);
}

/* Priority Label */
.task-priority {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}

.task-priority.priority-H {
  background: #fee2e2;
  color: #dc2626;
}

.task-priority.priority-M {
  background: #fef3c7;
  color: #d97706;
}

.task-priority.priority-L {
  background: #d1fae5;
  color: #059669;
}

/* Task Tags */
.task-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.task-tag {
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--gray-100);
  padding: 2px 8px;
  border-radius: 4px;
}

/* Task Actions */
.task-action-active {
  background: var(--primary) !important;
  color: white !important;
}

.task-action-active:hover {
  background: var(--primary-dark) !important;
}

/* Metadata in Task Detail */
.task-metadata {
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin: 16px 0;
}

.metadata-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.metadata-row:last-child {
  border-bottom: none;
}

.metadata-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.task-started {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-primary);
}

.task-started svg {
  stroke: var(--primary);
}

.task-recur {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-primary);
}

.task-depends {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-secondary);
}

/* ========================================
   FILTER BAR STYLES
   ======================================== */

.filter-bar {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
}

.filter-bar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
}

.filter-bar-row.collapsed {
  display: none;
}

.filter-bar-header {
  display: flex;
  align-items: flex-start;
}

.filter-bar-collapsed-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.filter-bar-collapsed-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.filter-bar-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all var(--transition);
}

.filter-bar-toggle-btn:hover {
  background: var(--gray-100);
  color: var(--text-primary);
}

@media (min-width: 769px) {
  .filter-bar-header {
    position: relative;
  }

  .filter-bar-toggle-btn {
    margin-left: auto;
    flex-shrink: 0;
  }
}

.filter-bar-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-bar-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-bar-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-size: 13px;
  border-radius: 16px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  min-width: 68px;
  justify-content: center;
}

.chip:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
  color: var(--text-primary);
}

.chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.chip.active:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.chip.priority-high.active {
  background: var(--danger);
  border-color: var(--danger);
}

.chip.priority-medium.active {
  background: var(--warning);
  border-color: var(--warning);
}

.chip.priority-low.active {
  background: var(--success);
  border-color: var(--success);
}

.chip.chip-exclude {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
}

.chip.chip-exclude.active {
  background: var(--danger);
  border-color: var(--danger);
}

.filter-bar-actions {
  margin-left: auto;
  display: flex;
  align-items: flex-end;
}

.clear-filters-btn {
  padding: 6px 12px;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-size: 13px;
  border-radius: 16px;
  cursor: pointer;
  transition: all var(--transition);
  margin-left: auto;
}

.clear-filters-btn:hover {
  background: var(--gray-100);
  color: var(--danger);
  border-color: var(--danger);
}

@media (min-width: 769px) {
  .clear-filters-btn {
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 12px;
  }
}

.active-filters-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.active-filters-label {
  font-size: 12px;
  color: var(--text-muted);
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: var(--primary-light);
  color: white;
  font-size: 12px;
  border-radius: 4px;
}

.filter-chip button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  border-radius: 50%;
  transition: all var(--transition);
}

.filter-chip button:hover {
  background: var(--primary);
  color: white;
}

/* Checkbox Group Styles */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 120px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-primary);
}

.checkbox-group.scrollable {
  max-height: 150px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

.checkbox-label span {
  flex: 1;
}

.checkbox-label .priority-high {
  color: var(--danger);
  font-weight: 500;
}

.checkbox-label .priority-medium {
  color: var(--warning);
  font-weight: 500;
}

.checkbox-label .priority-low {
  color: var(--success);
  font-weight: 500;
}

.no-options {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
  padding: 8px 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .filter-bar-row {
    flex-direction: column;
    gap: 12px;
  }

  .filter-bar-section {
    width: 100%;
  }

  .filter-bar-chips {
    flex-wrap: wrap;
  }

  .filter-bar-actions {
    margin-left: 0;
    width: 100%;
  }

  .clear-filters-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Project Settings Modal */
.project-settings-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  display: flex;
  align-items: flex-end;
}

@media (min-width: 768px) {
  .project-settings-overlay {
    align-items: center;
    justify-content: center;
  }
}

.project-settings-modal {
  background: var(--bg-primary);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  overflow: hidden;
  animation: slideUp 0.3s ease;
}

@media (min-width: 768px) {
  .project-settings-modal {
    border-radius: var(--radius-xl);
    max-height: 85vh;
  }
}

.project-settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.project-settings-header h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.project-settings-form {
  padding: 20px;
  overflow-y: auto;
  max-height: calc(90vh - 70px);
}

.project-name-display {
  padding: 12px;
  background: var(--gray-50);
  border-radius: var(--radius);
  font-weight: 500;
  color: var(--text-primary);
}

/* Icon Selector */
.icon-selector {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.icon-option {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-secondary);
}

.icon-option:hover {
  background: var(--gray-100);
  border-color: var(--gray-300);
}

.icon-option.selected {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

/* Color Selector */
.color-selector {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.color-option {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}

.color-option:hover {
  transform: scale(1.1);
}

.color-option.selected {
  border-color: var(--text-primary);
  box-shadow: 0 0 0 2px white, 0 0 0 4px var(--text-primary);
}

/* Project Settings Button in Sidebar */
.nav-list-projects li {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-list-projects .nav-item {
  flex: 1;
}

.project-settings-btn {
  opacity: 0;
  background: transparent;
  border: none;
  color: var(--text-inverse);
  padding: 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}

.nav-list-projects li:hover .project-settings-btn {
  opacity: 0.6;
}

.project-settings-btn:hover {
  opacity: 1 !important;
  background: rgba(255, 255, 255, 0.1);
}

/* Nav section title link */
.nav-section-title-link {
  color: var(--text-inverse);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.7;
  transition: opacity var(--transition);
}

.nav-section-title-link:hover {
  opacity: 1;
}

/* Productivity Stats */
.productivity-stats {
  padding: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.stats-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.stats-header h2 {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.date-range {
  display: flex;
  gap: 8px;
}

.range-btn {
  padding: 8px 16px;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  color: var(--text-secondary);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
  transition: all var(--transition);
}

.range-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.range-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon.completed {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.stat-icon.created {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.stat-icon.pending {
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
}

.stat-icon.overdue {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.stat-content {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.stat-label {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.completion-chart,
.top-projects {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}

.completion-chart h3,
.top-projects h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 20px 0;
}

.chart-placeholder {
  height: 200px;
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 100%;
  gap: 8px;
  padding: 0 8px;
}

.chart-bar-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.chart-bar {
  width: 100%;
  background: linear-gradient(180deg, var(--primary) 0%, color-mix(in srgb, var(--primary) 70%, transparent) 100%);
  border-radius: 4px 4px 0 0;
  min-height: 4px;
  transition: height var(--transition);
}

.chart-label {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 8px;
}

.projects-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.project-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
}

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

.project-name {
  flex: 1;
  font-size: 14px;
  color: var(--text-primary);
}

.project-count {
  font-size: 13px;
  color: var(--text-secondary);
}

.empty-message {
  color: var(--text-secondary);
  font-size: 14px;
  text-align: center;
  padding: 20px;
}

/* Responsive */
@media (max-width: 768px) {
  .productivity-stats {
    padding: 16px;
  }

  .stats-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stat-card {
    padding: 16px;
  }

  .stat-value {
    font-size: 24px;
  }
}

/* Goals */
.goals-view {
  padding: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.goals-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.goals-header h2 {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.add-goal-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition);
}

.add-goal-btn:hover {
  background: color-mix(in srgb, var(--primary) 85%, black);
}

.goals-timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.goal-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.goal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.goal-quarter {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.quarter-label {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
}

.quarter-year {
  font-size: 14px;
  color: var(--text-secondary);
}

.goal-actions {
  display: flex;
  gap: 8px;
}

.goal-action {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all var(--transition);
}

.goal-action:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.goal-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 8px 0;
}

.goal-description {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 16px 0;
}

.goal-progress {
  margin-bottom: 16px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.progress-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.progress-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.progress-bar {
  height: 8px;
  background: var(--bg-secondary);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, color-mix(in srgb, var(--primary) 70%, transparent) 100%);
  border-radius: 4px;
  transition: width var(--transition);
}

.goal-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.metric {
  text-align: center;
}

.metric-value {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.metric-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.empty-goals {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-primary);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.empty-icon {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.empty-goals h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 8px 0;
}

.empty-goals p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 24px 0;
}

.add-first-goal {
  padding: 12px 24px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition);
}

.add-first-goal:hover {
  background: color-mix(in srgb, var(--primary) 85%, black);
}

/* Templates */
.templates-view {
  padding: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.templates-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.templates-header h2 {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.add-template-btn,
.add-first-template {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition);
}

.add-template-btn:hover,
.add-first-template:hover {
  background: color-mix(in srgb, var(--primary) 85%, black);
}

.templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.template-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.template-icon {
  width: 40px;
  height: 40px;
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.template-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 8px 0;
}

.template-description {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 12px 0;
  flex: 1;
}

.template-meta {
  margin-bottom: 16px;
}

.task-count {
  font-size: 13px;
  color: var(--text-secondary);
}

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

.template-action.use {
  flex: 1;
  padding: 8px 12px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition);
}

.template-action.use:hover {
  background: color-mix(in srgb, var(--primary) 85%, black);
}

.template-action.edit,
.template-action.delete {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 8px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}

.template-action.edit:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.template-action.delete:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
  color: #ef4444;
}

.empty-templates {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-primary);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  grid-column: 1 / -1;
}

.empty-templates .empty-icon {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.empty-templates h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 8px 0;
}

.empty-templates p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 24px 0;
}

/* Auth Pages */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--bg-primary);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  padding: 32px;
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.auth-card h1 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 24px 0;
  text-align: center;
}

.auth-card .form-group {
  margin-bottom: 16px;
}

.auth-card label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.auth-card input[type="text"],
.auth-card input[type="email"],
.auth-card input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: border-color var(--transition);
}

.auth-card input:focus {
  outline: none;
  border-color: var(--primary);
}

.auth-card .btn {
  width: 100%;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  margin-top: 8px;
}

.auth-link {
  text-align: center;
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-secondary);
}

.auth-link a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.auth-link a:hover {
  text-decoration: underline;
}

.alert {
  padding: 12px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 14px;
}

.alert-error {
  background: #fef2f2;
  color: var(--danger);
  border: 1px solid #fecaca;
}

.alert-info {
  background: #eff6ff;
  color: var(--primary);
  border: 1px solid #bfdbfe;
}

/* User Section in Sidebar */
.nav-section-user {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 12px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}

.user-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-email {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logout-form {
  flex-shrink: 0;
}

.logout-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.logout-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

/* Modern Auth Pages */
.auth-page {
  min-height: 100vh;
  display: flex;
  position: relative;
  overflow: hidden;
}

.auth-background {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.auth-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary) 0%, #6366f1 50%, #8b5cf6 100%);
  opacity: 0.05;
}

.auth-pattern {
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(139, 92, 246, 0.05) 0%, transparent 40%);
}

.auth-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 48px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (min-width: 768px) {
  .auth-wrapper {
    padding: 64px 24px;
  }
}

/* Auth Brand */
.auth-brand {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: white;
  box-shadow: 0 8px 16px rgba(59, 130, 246, 0.3);
}

.auth-brand-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 4px 0;
}

.auth-brand-tagline {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

/* Auth Card */
.auth-card-modern {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  box-shadow: 
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06),
    0 0 0 1px rgba(0, 0, 0, 0.05);
  padding: 32px;
  animation: auth-slide-up 0.5s ease-out;
}

@keyframes auth-slide-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-card-header {
  text-align: center;
  margin-bottom: 24px;
}

.auth-card-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 4px 0;
}

.auth-card-header p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

/* Auth Form */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.auth-label svg {
  color: var(--primary);
}

.auth-input-wrapper {
  position: relative;
}

.auth-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.auth-input:hover {
  border-color: var(--gray-300);
}

.auth-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

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

.auth-input-error {
  border-color: var(--danger);
}

.auth-input-error:focus {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.auth-error-message {
  font-size: 12px;
  color: var(--danger);
  display: flex;
  align-items: center;
  gap: 4px;
}

.auth-help-text {
  font-size: 12px;
  color: var(--text-muted);
}

.auth-password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.auth-password-toggle:hover {
  color: var(--text-primary);
}

/* Auth Options */
.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: -4px;
}

.auth-remember {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
}

.auth-remember input {
  display: none;
}

.auth-checkbox {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.auth-remember input:checked + .auth-checkbox {
  background: var(--primary);
  border-color: var(--primary);
}

.auth-remember input:checked + .auth-checkbox::after {
  content: '';
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}

/* Auth Button */
.auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.auth-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.auth-btn-primary:active {
  transform: translateY(0);
}

/* Auth Alert */
.auth-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 16px;
  animation: auth-shake 0.5s ease-in-out;
}

@keyframes auth-shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
  20%, 40%, 60%, 80% { transform: translateX(4px); }
}

.auth-alert-error {
  background: #fef2f2;
  color: var(--danger);
  border: 1px solid #fecaca;
}

.auth-alert svg {
  flex-shrink: 0;
}

/* Auth Divider */
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 24px 0;
  color: var(--text-muted);
  font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-divider span {
  padding: 0 16px;
}

/* Auth Footer */
.auth-footer {
  text-align: center;
}

.auth-footer p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

.auth-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.auth-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.auth-footer-legal {
  text-align: center;
  margin-top: 24px;
}

.auth-footer-legal p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

.auth-footer-legal a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.auth-footer-legal a:hover {
  color: var(--primary);
}

/* Keep old auth styles for compatibility */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--bg-primary);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  padding: 32px;
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.auth-card h1 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 24px 0;
  text-align: center;
}

.auth-card .form-group {
  margin-bottom: 16px;
}

.auth-card label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.auth-card input[type="text"],
.auth-card input[type="email"],
.auth-card input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: border-color var(--transition);
}

.auth-card input:focus {
  outline: none;
  border-color: var(--primary);
}

.auth-card .btn {
  width: 100%;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  margin-top: 8px;
}

.auth-card .auth-link {
  text-align: center;
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-secondary);
}

.auth-card .auth-link a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.auth-card .auth-link a:hover {
  text-decoration: underline;
}

.alert {
  padding: 12px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 14px;
}

.alert-error {
  background: #fef2f2;
  color: var(--danger);
  border: 1px solid #fecaca;
}

.alert-info {
  background: #eff6ff;
  color: var(--primary);
  border: 1px solid #bfdbfe;
}

/* Settings Page Styles */
.settings-page {
  min-height: 100vh;
  background: var(--bg-secondary);
  padding: 32px 24px;
}

.settings-container {
  max-width: 800px;
  margin: 0 auto;
}

.settings-container h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.settings-section {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.settings-section h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.settings-description {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 24px;
}

.settings-form .form-group {
  margin-bottom: 20px;
}

.settings-form label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.settings-form .form-input {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: border-color var(--transition);
}

.settings-form .form-input:focus {
  outline: none;
  border-color: var(--primary);
}

.settings-form .form-hint {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border);
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-secondary:hover {
  background: var(--border);
}

.btn-link {
  color: var(--primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.btn-link:hover {
  text-decoration: underline;
}

.alert-success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.config-preview {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.config-preview pre {
  margin: 0;
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-primary);
}

.config-preview code {
  color: var(--text-primary);
}

.settings-actions {
  margin-top: 24px;
}

/* Blocked Tasks (Dependencies) Styles */
.metadata-row-blocked-by {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.metadata-row-blocked-by .metadata-label {
  flex: none;
}

.blocked-tasks-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.blocked-task-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  font-size: 13px;
}

.blocked-task-item.status-completed {
  opacity: 0.7;
}

.blocked-task-status {
  flex-shrink: 0;
  color: var(--text-muted);
}

.blocked-task-status.completed {
  color: var(--success);
}

.blocked-task-desc {
  flex: 1;
  color: var(--text-primary);
  text-decoration: none;
}

.blocked-task-item.status-completed .blocked-task-desc {
  text-decoration: line-through;
  color: var(--text-muted);
}

.blocked-task-badge {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
}

.blocked-task-badge.status-pending {
  background: #fef3c7;
  color: #92400e;
}

.blocked-task-badge.status-completed {
  background: #d1fae5;
  color: #065f46;
}

.blocked-task-badge.status-deleted {
  background: #fee2e2;
  color: #991b1b;
}

/* Unified Dependencies Section (Blocked by & Subtasks) */
.task-dependencies-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.task-dependencies-section .section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.task-dependencies-section h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
}

.dependency-count {
  font-size: 12px;
  color: var(--text-muted);
}

.dependency-progress-bar {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  max-width: 100px;
}

.dependency-progress-bar .progress-fill {
  height: 100%;
  background: var(--success);
  transition: width 0.3s ease;
}

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

.dependency-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  transition: background var(--transition);
}

.dependency-item:hover {
  background: var(--border);
}

.dependency-item.completed {
  opacity: 0.7;
}

.dependency-status,
.dependency-status-btn {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: default;
  padding: 0;
}

.dependency-status-btn {
  cursor: pointer;
}

.dependency-status-btn:hover {
  color: var(--primary);
}

.dependency-item.completed .dependency-status,
.dependency-item.completed .dependency-status-btn {
  color: var(--success);
}

.dependency-description {
  flex: 1;
  font-size: 14px;
  color: var(--text-primary);
}

.dependency-description.completed {
  text-decoration: line-through;
  color: var(--text-muted);
}

.dependency-badge {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
}

.dependency-badge.status-pending {
  background: #fef3c7;
  color: #92400e;
}

.dependency-badge.status-completed {
  background: #d1fae5;
  color: #065f46;
}

.dependency-badge.status-deleted {
  background: #fee2e2;
  color: #991b1b;
}

.dependency-delete {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  opacity: 0;
  transition: opacity var(--transition);
}

.dependency-item:hover .dependency-delete {
  opacity: 1;
}

.dependency-delete:hover {
  color: var(--danger);
}

.empty-dependencies {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  padding: 16px;
  font-style: italic;
}

.add-dependency-form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.dependency-input {
  flex: 1;
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-primary);
  color: var(--text-primary);
}

.dependency-input:focus {
  outline: none;
  border-color: var(--primary);
}

.add-dependency-btn {
  padding: 8px 16px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition);
}

.add-dependency-btn:hover {
  background: var(--primary-dark);
}

/* Clickable dependency items */
.dependency-item-clickable {
  cursor: pointer;
  transition: all var(--transition);
}

.dependency-item-clickable:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  transform: translateX(4px);
}

.dependency-description-clickable {
  cursor: pointer;
  transition: color var(--transition);
}

.dependency-description-clickable:hover {
  color: var(--primary);
}

.dependency-item .dependency-status-btn:hover {
  color: var(--primary);
  transform: scale(1.1);
}

/* Sync Button */
.btn-sync {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.btn-sync:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(34, 197, 94, 0.4);
}

.btn-sync:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.sync-output {
  margin-top: 12px;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 12px;
  line-height: 1.5;
  max-height: 200px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.alert-error .sync-output {
  background: #fef2f2;
  color: var(--danger);
}

.alert-success .sync-output {
  background: #f0fdf4;
  color: #166534;
}

/* Sync Status Indicator in Sidebar */
.sync-status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 12px;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sync-status-indicator svg {
  color: var(--success);
  animation: pulse 2s ease-in-out infinite;
}

.sync-status-text {
  font-weight: 500;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

/* Tag Patterns Styles */
.tag-patterns-list {
  margin-bottom: 20px;
}

.tag-pattern-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  margin-bottom: 8px;
  gap: 12px;
}

.pattern-code {
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 13px;
  color: var(--text-primary);
  background: var(--bg-primary);
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.btn-remove-pattern {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 4px;
  transition: all var(--transition);
}

.btn-remove-pattern:hover {
  background: #fee2e2;
  color: var(--danger);
}

.empty-patterns {
  color: var(--text-muted);
  font-style: italic;
  font-size: 14px;
  padding: 12px;
  text-align: center;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.add-pattern-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.add-pattern-form .form-group {
  margin-bottom: 0;
}

/* Sync indicator animations */
.sync-status-indicator.syncing {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
}

.sync-icon.spinning {
  animation: spin 1s linear infinite;
}

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

/* Sidebar Redesign Styles */

/* Header with sync button */
.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
}

.sync-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.sync-btn:hover {
  background: var(--bg-secondary);
  color: var(--success);
}

.sync-btn.syncing {
  color: var(--success);
  cursor: not-allowed;
}

.sync-btn svg.spinning {
  animation: spin 1s linear infinite;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
}

.sidebar-footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sidebar-footer .user-name {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
}

.sidebar-footer .logout-form {
  margin: 0;
}

.sidebar-footer .logout-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.sidebar-footer .logout-btn:hover {
  background: var(--danger);
  color: white;
}

/* Remove old Quick Add styles if they exist */
.quick-add-btn {
  display: none;
}

/* Push Notification Prompt Modal */
.push-prompt-modal,
.pwa-install-modal,
.ios-add-homescreen-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.push-prompt-content,
.pwa-install-content,
.ios-add-homescreen-content {
  background: white;
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.push-prompt-icon,
.pwa-install-icon,
.ios-add-homescreen-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.push-prompt-content h3,
.pwa-install-content h3,
.ios-add-homescreen-content h3 {
  margin: 0 0 12px 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

.push-prompt-content p,
.pwa-install-content p,
.ios-add-homescreen-content p {
  margin: 0 0 24px 0;
  color: var(--text-secondary);
  line-height: 1.5;
}

.push-prompt-buttons,
.pwa-install-buttons,
.ios-add-homescreen-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.push-prompt-buttons .btn,
.pwa-install-buttons .btn,
.ios-add-homescreen-buttons .btn {
  flex: 1;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-secondary {
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  background: var(--gray-200);
}

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

.btn-primary:hover {
  background: var(--primary-dark);
}

/* iOS Specific Styles */
.ios-add-homescreen-content ul {
  text-align: left;
  margin: 16px 0;
  padding-left: 20px;
  color: var(--text-secondary);
}

.ios-add-homescreen-content li {
  margin: 8px 0;
}

.ios-add-homescreen-instructions {
  background: var(--gray-50);
  border-radius: var(--radius);
  padding: 16px;
  margin: 20px 0;
  text-align: left;
}

.ios-add-homescreen-instructions p {
  margin: 0 0 8px 0;
}

.ios-add-homescreen-instructions ol {
  margin: 0;
  padding-left: 20px;
  color: var(--text-secondary);
}

.ios-add-homescreen-instructions li {
  margin: 4px 0;
}

.share-icon {
  font-size: 18px;
  vertical-align: middle;
}

/* Settings Page Push Notification Styles */
.push-notification-status {
  margin-top: 16px;
}

.push-notification-status .alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.push-notification-status .alert-success {
  background: var(--success);
  color: white;
}

.push-notification-status .alert-info {
  background: var(--info);
  color: white;
}

.push-notification-status .btn {
  margin-right: 12px;
  margin-bottom: 8px;
}

/* Animation for modals */
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.push-prompt-content,
.pwa-install-content,
.ios-add-homescreen-content {
  animation: modalFadeIn 0.3s ease;
}
