/* Reset and Variables */
:root {
  --primary-color: #6366f1;
  --primary-light: #818cf8;
  --primary-dark: #4f46e5;
  --secondary-color: #06b6d4;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;

  --background: #fafbfc;
  --surface: #ffffff;
  --surface-hover: #f8fafc;
  --border: #e2e8f0;
  --border-light: #f1f5f9;

  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --transition: all 0.2s ease;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
}

/* Life Balance Dashboard Styles */
.life-balance-dashboard {
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  overflow-x: hidden;
}

.life-balance-dashboard .container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0;
}

.top-navigation {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  max-width: 1400px;
  margin: 0 auto;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  font-size: 1.5rem;
}

.nav-brand h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.nav-menu {
  display: flex;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  transition: var(--transition);
}

.nav-item:hover,
.nav-item.active {
  background: rgba(102, 126, 234, 0.1);
  color: var(--primary-color);
}

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

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

.btn-add-main {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-add-main::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn-add-main:hover::before {
  left: 100%;
}

.btn-add-main:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(99, 102, 241, 0.4);
}

.add-icon {
  font-size: 1.2rem;
  font-weight: bold;
}

/* Profile Dropdown */
.profile-dropdown {
  position: relative;
  cursor: pointer;
}

.user-avatar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 12px;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid transparent;
}

.user-avatar:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-1px);
}

.avatar-image,
.avatar-placeholder {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.avatar-placeholder {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}

.dropdown-arrow {
  font-size: 0.7rem;
  color: var(--text-secondary);
  transition: transform 0.3s ease;
}

.profile-dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}

/* Profile Menu */
.profile-menu {
  position: absolute;
  top: 100%;
  right: 0;
  width: 280px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
  margin-top: 8px;
  overflow: hidden;
}

.profile-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.profile-menu::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 20px;
  width: 12px;
  height: 12px;
  background: white;
  transform: rotate(45deg);
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
}

.profile-info {
  padding: 20px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid var(--border);
}

.profile-name {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.profile-email {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.menu-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 500;
}

.menu-item:hover {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  color: var(--primary-color);
  transform: translateX(4px);
}

.menu-item.logout {
  color: #dc2626;
}

.menu-item.logout:hover {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  color: #b91c1c;
}

.menu-icon {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

.dashboard-content {
  padding: 32px;
}

.main-dashboard-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  height: calc(100vh - 200px);
  max-height: 800px;
}

.wheel-section {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.wheel-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 20px;
}

.category-wheel {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.wheel-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.btn-focus-mode {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  border: none;
  padding: 16px 24px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.btn-focus-mode:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.categories-section {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 32px;
  overflow-y: auto;
}

.section-header {
  text-align: center;
  margin-bottom: 32px;
}

.section-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 8px 0;
}

.section-header p {
  color: var(--text-secondary);
  margin: 0;
}

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

.category-card {
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.category-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.category-card.has-tasks {
  border-left: 4px solid var(--primary-color);
}

.category-card .category-icon {
  font-size: 2rem;
  margin-bottom: 12px;
  display: block;
}

.category-card .category-info h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 8px 0;
}

.category-card .category-stats {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.category-card .task-count,
.category-card .time-estimate {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.category-card .category-color {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.quick-stats-panel {
  background: var(--surface-hover);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  text-align: center;
}

.quick-stats-panel .stat-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.quick-stats-panel .stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.quick-stats-panel .stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.tasks-page-content {
  min-height: 100vh;
  padding: 24px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  background: transparent;
}

/* Category Wheel Section */
.wheel-section {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.3);
  flex: 1;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.wheel-section h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
  text-align: center;
}

.wheel-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.category-wheel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wheel-legend {
  background: white;
  padding: 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  text-align: center;
  min-width: 200px;
}

.legend-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.legend-scale {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.scale-bar {
  flex: 1;
  height: 8px;
  background: linear-gradient(90deg, #e2e8f0 0%, var(--primary-color) 100%);
  border-radius: 4px;
  position: relative;
}

.scale-fill {
  height: 100%;
  background: linear-gradient(90deg, #fef3c7 0%, #f59e0b 50%, #dc2626 100%);
  border-radius: 4px;
  width: 100%;
}

/* Categories Section */
.categories-section {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.3);
  flex: 1;
  min-height: 300px;
  display: flex;
  flex-direction: column;
}

.categories-section h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  text-align: center;
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  overflow-y: auto;
  max-height: none;
  min-height: 250px;
}

.category-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: white;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
  box-shadow: var(--shadow-sm);
}

.category-item:hover {
  background: #fafbfc;
  border-color: var(--category-color);
  transform: translateX(4px);
}

.category-item.active {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-color: var(--category-color);
  transform: translateX(4px);
}

.smart-focus-trigger {
  position: relative;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%) !important;
  border: 2px solid #f59e0b !important;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3) !important;
  animation: pulse-glow 2s infinite;
}

.smart-focus-trigger:hover {
  background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%) !important;
  border-color: #d97706 !important;
  transform: translateX(6px) scale(1.02) !important;
  box-shadow: 0 6px 25px rgba(245, 158, 11, 0.4) !important;
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
  }
  50% {
    box-shadow: 0 6px 25px rgba(245, 158, 11, 0.5);
  }
}

.category-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border: 2px solid white;
}

.category-icon {
  font-size: 1.125rem;
  flex-shrink: 0;
}

.category-info {
  flex: 1;
}

.category-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.875rem;
  display: block;
}

.category-stats {
  display: flex;
  gap: 8px;
  margin-top: 2px;
}

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

.completion-rate {
  font-size: 0.75rem;
  color: var(--success-color);
  font-weight: 600;
}

.category-time {
  text-align: right;
  flex-shrink: 0;
}

.time-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  display: block;
}

.time-unit {
  font-size: 0.625rem;
  color: var(--text-muted);
}

/* Category Legend */
.category-legend {
  display: grid;
  gap: 10px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 8px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: white;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.legend-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background: var(--legend-color);
  transition: var(--transition);
}

.legend-item:hover {
  background: #fafbfc;
  border-color: var(--primary-light);
  transform: translateX(6px);
  box-shadow: var(--shadow);
}

.legend-item.active {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
  transform: translateX(6px);
}

.legend-item.active::before {
  width: 6px;
}

.legend-color {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border: 2px solid white;
}

.legend-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.legend-name {
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
  font-size: 0.95rem;
}

.legend-count {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 600;
  background: var(--border-light);
  padding: 4px 8px;
  border-radius: 12px;
  min-width: 24px;
  text-align: center;
}

.legend-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  padding: 4px 8px;
  border-radius: 8px;
  font-weight: 600;
}

/* Category labels in wheel */
.category-label {
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.category-label text {
  pointer-events: none;
}

.category-label .icon-text {
  font-size: 18px;
  font-weight: bold;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.8), 0 0 6px rgba(255, 255, 255, 0.6);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

.category-label .name-text {
  font-size: 11px;
  font-weight: 700;
  fill: #374151;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.9);
}

/* Intensity indicator */
.intensity-scale {
  margin-top: 20px;
  text-align: center;
  padding: 16px;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.scale-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.scale-levels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
}

.scale-level {
  flex: 1;
  height: 8px;
  background: #e2e8f0;
  border-radius: 2px;
}

.scale-level.filled {
  background: linear-gradient(135deg, var(--success-color), #16a34a);
}

.scale-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
}



/* Rozwal To Section */
.rozwal-to-section {
  margin-bottom: 32px;
}

.rozwal-container {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border-radius: 20px;
  padding: 24px;
  color: white;
  box-shadow: 0 10px 40px rgba(245, 158, 11, 0.3);
  position: relative;
  overflow: hidden;
}

.rozwal-container::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.rozwal-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.rozwal-icon {
  font-size: 3rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.rozwal-content {
  flex: 1;
}

.rozwal-content h2 {
  font-size: 2rem;
  font-weight: 800;
  margin: 0 0 8px 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.rozwal-content p {
  font-size: 1rem;
  opacity: 0.9;
  margin: 0;
}

.rozwal-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  padding: 12px 24px;
  color: white;
  text-decoration: none;
  font-weight: 700;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.rozwal-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.rozwal-btn-icon {
  font-size: 1.2rem;
}

.rozwal-stats {
  display: flex;
  gap: 32px;
  position: relative;
  z-index: 1;
}

.rozwal-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.stat-label {
  font-size: 0.875rem;
  opacity: 0.9;
  margin-top: 4px;
}

/* Tasks List View */
.tasks-list-view {
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  overflow-x: hidden;
}

.tasks-list-view .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Sidebar Styles */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 280px;
  height: 100vh;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  z-index: 100;
  overflow-y: auto;
}

.sidebar-header {
  padding: 24px 20px 16px;
  border-bottom: 1px solid var(--border);
}

.sidebar-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.categories-list {
  padding: 16px 0;
}

.category-item {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.category-item:hover,
.category-item.active {
  background: rgba(102, 126, 234, 0.1);
  border-left-color: #667eea;
}

.category-item.smart-focus-trigger {
  background: linear-gradient(45deg, #fef3c7, #fde68a);
  border-left-color: #f59e0b;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.category-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 12px;
  flex-shrink: 0;
}

.category-icon {
  font-size: 1.25rem;
  margin-right: 12px;
  flex-shrink: 0;
}

.category-info {
  flex: 1;
  min-width: 0;
}

.category-name {
  font-weight: 600;
  color: var(--text-primary);
  display: block;
}

.category-stats {
  margin-top: 2px;
}

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

.sidebar-footer {
  padding: 16px 20px 24px;
  border-top: 1px solid var(--border);
}

.btn-add-category {
  width: 100%;
  padding: 10px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-add-category:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.tasks-page-content {
  min-height: 100vh;
  padding: 24px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* Compact Filters Section */
.filters-section-compact {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-lg);
  flex-shrink: 0;
}

.filters-header-compact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.filters-header-compact h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.filters-form-compact {
  flex: 1;
}

.filters-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-select-compact {
  padding: 6px 10px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: white;
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition);
  min-width: 140px;
}

.filter-select-compact:focus {
  outline: none;
  border-color: var(--primary-color);
}

.tasks-summary-compact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

.tasks-count {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.quick-stats {
  display: flex;
  gap: 12px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.stat-icon {
  font-size: 0.875rem;
}

/* Task Statistics Bar */
.task-stats-bar {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.stats-container {
  display: flex;
  justify-content: space-around;
  gap: 24px;
  flex-wrap: wrap;
}

.stats-container .stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stats-container .stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.stats-container .stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-align: center;
}

/* Scrollable Tasks Container */
.tasks-list-container-scrollable {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding: 16px;
}

.tasks-list-container {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

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

/* Compact Task Items */
.task-item-compact {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
  overflow: hidden;
  margin-bottom: 8px;
}

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

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

.task-main-row-compact {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  gap: 12px;
  min-height: 60px;
}

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

.task-title-compact {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 4px 0;
  flex: 1;
  word-break: break-word;
  line-height: 1.3;
}

.task-meta-compact {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.category-badge-compact,
.importance-badge-compact,
.time-badge-compact,
.progress-badge-compact {
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}

.importance-badge-compact.importance-high {
  background: #fef2f2;
  color: #dc2626;
}

.importance-badge-compact.importance-medium {
  background: #fffbeb;
  color: #d97706;
}

.importance-badge-compact.importance-low {
  background: #f0fdf4;
  color: #16a34a;
}

.time-badge-compact {
  background: var(--border-light);
  color: var(--text-muted);
}

.progress-badge-compact {
  background: #e0f2fe;
  color: #0369a1;
}

.task-actions-compact {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-shrink: 0;
}

.btn-expand-compact,
.btn-action-compact {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: var(--radius);
  background: var(--surface-hover);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  font-size: 0.75rem;
}

.btn-expand-compact:hover,
.btn-action-compact:hover {
  background: var(--border);
}

.btn-action-compact.btn-edit:hover {
  background: #fef3c7;
  color: #d97706;
}

.btn-action-compact.btn-delete:hover {
  background: #fef2f2;
  color: #dc2626;
}

.expand-icon {
  font-size: 0.75rem;
  transition: transform 0.3s ease;
}

.btn-expand-compact.expanded .expand-icon {
  transform: rotate(180deg);
}

.expand-icon {
  font-size: 0.75rem;
  transition: transform 0.3s ease;
}

/* Compact Subtasks */
.subtask-row-compact {
  display: flex;
  align-items: center;
  padding: 8px 16px 8px 44px;
  gap: 8px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  transition: var(--transition);
  min-height: 40px;
}

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

.subtask-row-compact:hover {
  background: rgba(255,255,255,0.5);
}

.subtask-row-compact.completed {
  opacity: 0.6;
}

.subtask-content-compact {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.subtask-title-compact {
  font-size: 0.875rem;
  color: var(--text-primary);
  flex: 1;
}

.subtask-meta-compact {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.subtask-time-compact,
.subtask-importance-compact {
  font-size: 0.7rem;
  padding: 2px 4px;
  border-radius: 4px;
  font-weight: 500;
}

.subtask-time-compact {
  color: var(--text-muted);
  background: rgba(0,0,0,0.05);
}

.subtask-importance-compact.importance-high {
  background: #fef2f2;
  color: #dc2626;
}

.subtask-importance-compact.importance-medium {
  background: #fffbeb;
  color: #d97706;
}

.subtask-importance-compact.importance-low {
  background: #f0fdf4;
  color: #16a34a;
}

/* Notification Popup */
.notification-popup {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--success-color);
  color: white;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  transform: translateX(100%);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 12px;
}

.notification-popup[style*="opacity: 1"] {
  transform: translateX(0);
}

.notification-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.notification-icon {
  font-size: 1.25rem;
}

.notification-text {
  font-weight: 600;
}

.btn-undo {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  transition: var(--transition);
}

.btn-undo:hover {
  background: rgba(255, 255, 255, 0.3);
}

.task-item {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
  overflow: hidden;
}

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

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

.task-main-row {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  gap: 16px;
}

.task-checkbox {
  flex-shrink: 0;
}

.task-complete-checkbox {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--primary-color);
}

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

.task-primary {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
  gap: 16px;
}

.task-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  flex: 1;
  word-break: break-word;
}

.task-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

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

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  font-size: 0.875rem;
}

.progress-text {
  color: var(--text-secondary);
  font-weight: 500;
}

.progress-percentage {
  color: var(--primary-color);
  font-weight: 600;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--border-light);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--success-color), var(--primary-color));
  transition: width 0.3s ease;
  border-radius: 3px;
}

.task-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.btn-expand {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: var(--radius);
  background: var(--surface-hover);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

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

.expand-icon {
  font-size: 0.875rem;
  transition: transform 0.3s ease;
}

.btn-expand.expanded .expand-icon {
  transform: rotate(180deg);
}

.subtasks-container {
  border-top: 1px solid var(--border-light);
  background: var(--surface-hover);
  padding: 0;
}

.subtask-row {
  display: flex;
  align-items: center;
  padding: 12px 20px 12px 52px;
  gap: 12px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  transition: var(--transition);
}

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

.subtask-row:hover {
  background: rgba(255,255,255,0.5);
}

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

.subtask-checkbox {
  flex-shrink: 0;
}

.subtask-complete-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--success-color);
}

.subtask-content {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.subtask-title {
  font-size: 0.875rem;
  color: var(--text-primary);
  flex: 1;
}

.subtask-meta {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.subtask-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(0,0,0,0.05);
  padding: 2px 6px;
  border-radius: 4px;
}

.subtask-importance {
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
}

.category-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid currentColor;
}

.subtasks-info {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.subtasks-count {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.subtasks-preview {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.subtask-preview-item {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.subtask-more {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}

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

.btn-action {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  background: var(--surface-hover);
}

.btn-action:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-edit:hover {
  background: #fef3c7;
  color: #d97706;
}

.btn-delete:hover {
  background: #fef2f2;
  color: #dc2626;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
}

.header-info h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.category-description {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 4px 0 0 0;
}

.header-filters {
  display: flex;
  gap: 12px;
}

.filter-select {
  padding: 8px 12px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: white;
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition);
}

.filter-select:focus {
  outline: none;
  border-color: var(--primary-color);
}

.tasks-container {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
  min-height: 0;
}

/* Category Sections */
.category-section {
  margin-bottom: 32px;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-light);
}

.category-icon {
  font-size: 1.5rem;
}

.category-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  flex: 1;
}

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

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

.progress-fill {
  height: 100%;
  transition: width 0.3s ease;
}

.completion-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Tasks Grid */
.tasks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
}

/* Task Cards */
.task-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary-color);
  border-radius: var(--radius);
  padding: 20px;
  transition: var(--transition);
  cursor: pointer;
}

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

.task-card.completed {
  opacity: 0.7;
  background: var(--surface-hover);
}

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

.task-header h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
  margin-right: 12px;
  line-height: 1.4;
}

.task-badges {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}

.importance-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.importance-high {
  background: #fef2f2;
  color: #dc2626;
}

.importance-medium {
  background: #fffbeb;
  color: #d97706;
}

.importance-low {
  background: #f0fdf4;
  color: #16a34a;
}

.time-badge {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--border-light);
  padding: 4px 8px;
  border-radius: 8px;
}

.task-description {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 12px;
  line-height: 1.5;
}

.subtasks-preview {
  background: var(--surface-hover);
  padding: 12px;
  border-radius: var(--radius);
  margin-bottom: 12px;
}

.subtasks-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 8px;
}

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

.subtask-item {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.subtask-more {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}

.task-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.875rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}

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

.btn-complete:hover {
  background: #059669;
}

.btn-uncomplete {
  background: var(--text-muted);
  color: white;
}

.btn-uncomplete:hover {
  background: #6b7280;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  margin-top: 20px;
  border: 2px dashed var(--border);
}

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

.empty-state p {
  color: var(--text-muted);
  margin-bottom: 20px;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* Error Message Styles */
.error-message {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 24px 0;
  box-shadow: var(--shadow-sm);
}

.error-content {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.error-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.error-text h3 {
  color: #dc2626;
  margin: 0 0 8px 0;
  font-size: 1.125rem;
  font-weight: 600;
}

.error-text p {
  color: #991b1b;
  margin: 0 0 16px 0;
  line-height: 1.5;
}

.btn-dismiss {
  background: #dc2626;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}

.btn-dismiss:hover {
  background: #b91c1c;
}

/* AI Assistant Trigger */
.assistant-trigger {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  cursor: pointer;
  transition: var(--transition);
}

.assistant-trigger:hover {
  transform: scale(1.1);
}

.assistant-avatar {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: var(--shadow-lg);
  border: 3px solid white;
  position: relative;
}

.assistant-indicator {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 12px;
  height: 12px;
  background: var(--success-color);
  border-radius: 50%;
  border: 2px solid white;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.7;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* AI Assistant Panel */
.assistant-panel {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100vh;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  z-index: 1001;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}

.assistant-panel.open {
  right: 0;
}

.assistant-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: white;
}

.assistant-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.assistant-icon {
  font-size: 1.25rem;
}

.assistant-title h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
}

.assistant-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  border-radius: var(--radius);
  transition: var(--transition);
}

.assistant-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.assistant-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #fafbfc;
}

.message {
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  max-width: 85%;
  font-size: 0.875rem;
  line-height: 1.5;
}

.user-message {
  background: var(--primary-color);
  color: white;
  margin-left: auto;
  border-bottom-right-radius: 4px;
}

.assistant-message {
  background: white;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  border-bottom-left-radius: 4px;
}

.assistant-input {
  display: flex;
  padding: 20px;
  border-top: 1px solid var(--border);
  gap: 12px;
  background: white;
}

.assistant-input input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 25px;
  font-size: 0.875rem;
  outline: none;
  transition: var(--transition);
}

.assistant-input input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.send-button {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 12px 16px;
  border-radius: 50%;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.assistant-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.assistant-overlay.visible {
  opacity: 1;
  visibility: visible;
}

/* AI Suggestion Notice */
.ai-suggestion-notice {
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border: 2px solid #0ea5e9;
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 24px;
  text-align: center;
}

.ai-suggestion-notice p {
  margin: 0;
  color: #0c4a6e;
  font-weight: 500;
}

.btn-tertiary {
  background: #f59e0b;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}

.btn-tertiary:hover {
  background: #d97706;
}

/* Typing indicator */
.typing-indicator .dots {
  animation: typing 1.5s infinite;
}

@keyframes typing {
  0%, 20% { opacity: 0; }
  50% { opacity: 1; }
  100% { opacity: 0; }
}

/* Profile Modal Styles */
.profile-modal {
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
}

.avatar-section {
  display: flex;
  gap: 24px;
  align-items: center;
  margin-bottom: 32px;
  padding: 24px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.current-avatar {
  flex-shrink: 0;
}

.avatar-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid white;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.avatar-preview.placeholder {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 2rem;
}

.avatar-upload {
  flex: 1;
}

.upload-label {
  display: inline-block;
  background: var(--primary-color);
  color: white;
  padding: 10px 20px;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
  margin-bottom: 8px;
}

.upload-label:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.avatar-input {
  display: none;
}

.upload-hint {
  display: block;
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-top: 4px;
}

.form-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 2px solid var(--border-light);
}

.form-section h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-section h3::before {
  content: '🔒';
  font-size: 1rem;
}

.profile-form .form-group {
  margin-bottom: 24px;
}

.profile-form .form-control {
  padding: 14px 16px;
  font-size: 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 0.3s ease;
}

.profile-form .form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
  transform: translateY(-1px);
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
}

.modal-content {
  background: var(--surface);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

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

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

.close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
}

.modal-body {
  padding: 32px;
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-primary);
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

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

.btn-add-subtask {
  background: var(--success-color);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-add-subtask:hover {
  background: #059669;
}

.subtask-item {
  margin-bottom: 12px;
}

.subtask-row {
  display: grid;
  grid-template-columns: 2fr 1fr 80px 40px;
  gap: 12px;
  align-items: center;
}

.btn-remove {
  background: var(--danger-color);
  color: white;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-remove:hover {
  background: #dc2626;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 24px 32px;
  border-top: 1px solid var(--border);
}

.btn-secondary {
  background: var(--text-muted);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .main-dashboard-panel {
    grid-template-columns: 1fr;
    gap: 20px;
    height: auto;
    min-height: calc(100vh - 120px);
  }
}

@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    gap: 16px;
    padding: 16px;
  }

  .nav-menu {
    order: 2;
  }

  .nav-actions {
    order: 1;
  }

  .dashboard-content {
    padding: 16px;
  }

  .main-dashboard-panel {
    grid-template-columns: 1fr;
    gap: 16px;
    height: auto;
    max-height: none;
  }

  .wheel-section {
    padding: 16px;
    min-height: 400px;
  }

  .wheel-container {
    padding: 20px;
  }

  .category-wheel {
    padding: 40px;
  }

  .category-wheel svg {
    width: 280px;
    height: 280px;
  }

  .categories-section {
    min-height: 250px;
  }

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

  .category-header {
    flex-wrap: wrap;
    gap: 8px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .subtask-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .assistant-panel {
    width: 100vw;
    right: -100vw;
  }

  .assistant-trigger {
    bottom: 16px;
    right: 16px;
  }

  .assistant-avatar {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
}

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

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

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


/* Task Creation Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.modal-container {
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.modal-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.btn-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  border-radius: 4px;
  transition: var(--transition);
}

.btn-close:hover {
  background: var(--background);
  color: var(--text-primary);
}

.modal-body {
  padding: 32px;
}

.input-section {
  margin-bottom: 24px;
}

.input-section label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.input-section textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-family: inherit;
  resize: vertical;
  min-height: 100px;
  transition: var(--transition);
}

.input-section textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

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

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.tasks-preview-list {
  space-y: 16px;
}

.task-preview-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

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

.task-preview-header h4 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.task-description {
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

.task-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.time-badge, .context-badge, .category-badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.time-badge {
  background: #dbeafe;
  color: #1e40af;
}

.context-badge {
  background: #f3e8ff;
  color: #7c3aed;
}

.category-badge {
  background: #ecfdf5;
  color: #059669;
}

.subtasks-preview {
  background: var(--background);
  padding: 12px;
  border-radius: var(--radius);
  margin-top: 12px;
}

.subtasks-preview strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.subtasks-preview ul {
  margin: 0;
  padding-left: 20px;
}

.subtasks-preview li {
  margin-bottom: 4px;
  color: var(--text-muted);
}

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

/* Smart Focus Preferences Styles */
.preferences-section {
  margin-bottom: 32px;
}

.preferences-section h3 {
  margin: 0 0 16px 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.time-options,
.context-options,
.preference-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.time-option,
.context-option,
.preference-option {
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: white;
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.time-option:hover,
.context-option:hover,
.preference-option:hover {
  border-color: var(--primary-color);
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.time-option.selected,
.context-option.selected,
.preference-option.selected {
  border-color: var(--primary-color);
  background: var(--primary-color);
  color: white;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

.context-option.selected {
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: white;
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.3);
}

/* Preferences Styles */
.preferences-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.preference-option {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
}

.preference-option:hover {
  border-color: #f59e0b;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.15);
}

.preference-option.selected {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border-color: #10b981;
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.preference-icon {
  font-size: 2rem;
  margin-bottom: 8px;
  display: block;
}

.preference-option span {
  font-size: 0.9rem;
  font-weight: 600;
}

#customTimeInput {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  padding: 16px;
  background: var(--surface-hover);
  border-radius: var(--radius);
}

#customTime {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
}

.preference-options {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.preference-option {
  font-size: 0.875rem;
  padding: 10px 12px;
}

#startFocusBtn:disabled {
  background: var(--border);
  color: var(--text-muted);
  cursor: not-allowed;
}

#startFocusBtn:disabled:hover {
  transform: none;
  box-shadow: none;
};
}

.modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--background);
  color: var(--text-primary);
}

.modal-content {
  padding: 32px;
}

.creation-step {
  animation: fadeIn 0.3s ease-in-out;
}

.step-description {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  text-align: center;
}

.task-input {
  width: 100%;
  min-height: 120px;
  padding: 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
  transition: var(--transition);
}

.task-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.step-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 24px;
}

.tasks-preview {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-height: 400px;
  overflow-y: auto;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-hover);
}

.task-preview-item {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

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

.task-title-input {
  flex: 1;
  font-size: 1.125rem;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
}

.btn-remove-small {
  background: var(--danger-color);
  color: white;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-remove-small:hover {
  background: #dc2626;
}

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

.detail-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-row label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.category-select,
.importance-select,
.context-select,
.time-input {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
}

.subtasks-preview {
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.subtasks-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 12px;
}

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

.subtask-title-input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 10px;
  font-size: 0.875rem;
}

.subtask-time-input {
  width: 60px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 8px;
  font-size: 0.875rem;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
  .modal-container {
    width: 95%;
    max-height: 95vh;
  }

  .modal-content {
    padding: 20px;
  }

  .task-preview-details {
    grid-template-columns: 1fr;
  }

  .subtask-preview-item {
    flex-wrap: wrap;
  }

  .subtask-title-input {
    min-width: 200px;
  }
}
