/* ===== RESET AND BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Primary Colors */
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    
    /* Status Colors */
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    
    /* Priority Colors */
    --urgent-color: #dc2626;
    --high-color: #f97316;
    --medium-color: #eab308;
    --low-color: #22c55e;
    
    /* Text Colors */
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --text-white: #ffffff;
    
    /* Background Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --bg-hover: #f3f4f6;
    --bg-dark: #111827;
    --bg-sidebar: #1f2937;
    
    /* Border Colors */
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    --border-dark: #374151;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Spacing */
    --sidebar-width: 280px;
    --header-height: 70px;
}

/* Dark Mode Variables */
body.dark-mode {
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-light: #9ca3af;
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --bg-tertiary: #374151;
    --bg-hover: #374151;
    --border-color: #374151;
    --border-light: #4b5563;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-secondary);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    display: flex;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

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

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

/* ===== MOBILE MENU TOGGLE ===== */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background: var(--primary-color);
    border: none;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
    box-shadow: var(--shadow-lg);
}

.mobile-menu-toggle span {
    width: 24px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: var(--transition-base);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    color: var(--text-white);
    position: fixed;
    left: 0;
    top: 0;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    transition: var(--transition-base);
    display: flex;
    flex-direction: column;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

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

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

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

/* Sidebar Header */
.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-text h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    line-height: 1;
}

.logo-text span {
    font-size: 0.75rem;
    color: var(--primary-light);
    font-weight: 600;
    letter-spacing: 2px;
}

/* User Profile */
.user-profile {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    margin: 16px;
    border-radius: 12px;
    position: relative;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    color: white;
}

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

.user-info h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: white;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-info p {
    font-size: 0.75rem;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.edit-profile-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 6px;
    padding: 6px 8px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: var(--transition-base);
}

.edit-profile-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Quick Stats */
.quick-stats {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition-base);
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.08);
}

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

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

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 2px;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    padding: 16px 0;
}

.nav-section-title {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--text-light);
    letter-spacing: 1px;
    padding: 16px 20px 8px;
    margin-top: 8px;
}

.nav-list {
    list-style: none;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    cursor: pointer;
    transition: var(--transition-base);
    color: rgba(255, 255, 255, 0.7);
    position: relative;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-color);
    opacity: 0;
    transition: var(--transition-base);
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.nav-item.active {
    background: rgba(99, 102, 241, 0.15);
    color: white;
}

.nav-item.active::before {
    opacity: 1;
}

.nav-icon {
    font-size: 1.125rem;
    width: 24px;
    text-align: center;
}

.nav-text {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 500;
}

.nav-count {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

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

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 8px;
}

.sidebar-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    padding: 10px;
    color: white;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.sidebar-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    background: var(--bg-secondary);
    padding: 24px;
    transition: var(--transition-base);
}

/* Top Header */
.top-header {
    background: var(--bg-primary);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.header-left h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
}

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

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

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: none;
    background: var(--bg-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    transition: var(--transition-base);
    position: relative;
}

.icon-btn:hover {
    background: var(--bg-tertiary);
    transform: translateY(-2px);
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger-color);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* Search and Filter Bar */
.search-filter-bar {
    background: var(--bg-primary);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    display: flex;
    gap: 16px;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.search-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 16px;
    font-size: 1.125rem;
    pointer-events: none;
}

#searchInput {
    width: 100%;
    padding: 12px 16px 12px 48px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.9375rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: var(--transition-base);
    outline: none;
}

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

.clear-search-btn {
    position: absolute;
    right: 12px;
    background: var(--text-light);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
}

.clear-search-btn:hover {
    background: var(--text-secondary);
}

.filter-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.filter-select {
    padding: 10px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.875rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-base);
    outline: none;
}

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

/* Add Task Section */
.add-task-section {
    background: var(--bg-primary);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.task-input-wrapper {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

#taskInput {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: var(--transition-base);
    outline: none;
}

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

.add-task-btn {
    padding: 14px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-base);
}

.add-task-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-icon {
    font-size: 1.25rem;
    font-weight: 700;
}

.advanced-toggle-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 0;
    transition: var(--transition-base);
}

.advanced-toggle-btn:hover {
    color: var(--primary-hover);
}

#advancedToggleIcon {
    transition: var(--transition-base);
}

.advanced-toggle-btn.active #advancedToggleIcon {
    transform: rotate(180deg);
}

.advanced-options-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.advanced-options-panel.show {
    max-height: 600px;
    margin-top: 20px;
}

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

.option-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.option-group.full-width {
    grid-column: 1 / -1;
}

.option-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

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

.option-select,
.option-input {
    padding: 10px 14px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: var(--transition-base);
    outline: none;
}

.option-select:focus,
.option-input:focus {
    border-color: var(--primary-color);
}

.option-textarea {
    padding: 12px 14px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: inherit;
    resize: vertical;
    transition: var(--transition-base);
    outline: none;
}

.option-textarea:focus {
    border-color: var(--primary-color);
}

/* Error Message */
.error-message {
    color: var(--danger-color);
    font-size: 0.875rem;
    padding: 12px 16px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 8px;
    border-left: 4px solid var(--danger-color);
    display: none;
    margin-top: 16px;
    animation: shake 0.5s ease;
}

.error-message.show {
    display: block;
}

/* Progress Section */
.progress-section {
    background: var(--bg-primary);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.progress-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.progress-percentage {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.progress-bar {
    height: 12px;
    background: var(--bg-secondary);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
}

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

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

/* Tasks Container */
.tasks-container {
    background: var(--bg-primary);
    border-radius: 16px;
    padding: 24px;
    min-height: 400px;
    box-shadow: var(--shadow-sm);
}

.task-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-item {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: var(--transition-base);
    animation: slideIn 0.3s ease;
    cursor: pointer;
}

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

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

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

/* Custom Checkbox */
.task-checkbox {
    width: 24px;
    height: 24px;
    min-width: 24px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
    background: var(--bg-primary);
}

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

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

.task-checkbox.checked::after {
    content: '✓';
    color: white;
    font-weight: bold;
    font-size: 14px;
}

/* Task Content */
.task-content {
    flex: 1;
    min-width: 0;
}

.task-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.task-text {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    word-break: break-word;
    flex: 1;
}

.task-priority {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.task-priority.urgent {
    background: rgba(220, 38, 38, 0.1);
    color: var(--urgent-color);
}

.task-priority.high {
    background: rgba(249, 115, 22, 0.1);
    color: var(--high-color);
}

.task-priority.medium {
    background: rgba(234, 179, 8, 0.1);
    color: var(--medium-color);
}

.task-priority.low {
    background: rgba(34, 197, 94, 0.1);
    color: var(--low-color);
}

.task-category {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.6875rem;
    font-weight: 600;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.task-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-top: 8px;
}

.task-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.task-due-date {
    display: flex;
    align-items: center;
    gap: 4px;
}

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

.task-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.task-tag {
    padding: 2px 8px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 500;
}

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

/* Task Actions */
.task-actions {
    display: flex;
    gap: 6px;
    margin-left: auto;
}

.action-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.action-btn:hover {
    transform: translateY(-2px);
}

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

.edit-btn:hover {
    background: rgba(99, 102, 241, 0.1);
}

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

.delete-btn:hover {
    background: rgba(239, 68, 68, 0.1);
}

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

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

.cancel-btn {
    background: var(--text-light);
    color: white;
}

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

.task-input {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid var(--primary-color);
    border-radius: 6px;
    font-size: 1rem;
    outline: none;
    background: var(--bg-primary);
    color: var(--text-primary);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-light);
    display: none;
}

.empty-state.show {
    display: block;
}

.empty-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

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

.empty-state p {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* Statistics View */
.statistics-view {
    animation: fadeIn 0.3s ease;
}

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

.stat-box {
    background: var(--bg-primary);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--border-color);
    transition: var(--transition-base);
}

.stat-box:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stat-box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.stat-box-header h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-icon-large {
    font-size: 2rem;
}

.stat-box-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

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

.stat-row span {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.stat-row strong {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.chart-section {
    background: var(--bg-primary);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

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

.chart-container {
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 20px;
}

/* Settings View */
.settings-view {
    animation: fadeIn 0.3s ease;
}

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

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

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

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

.setting-info label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
    margin-bottom: 4px;
}

.setting-info p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: var(--transition-base);
    border-radius: 28px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: var(--transition-base);
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--primary-color);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.settings-btn {
    width: 100%;
    padding: 14px 20px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.settings-btn:hover {
    border-color: var(--primary-color);
    background: var(--bg-tertiary);
}

.settings-btn:last-child {
    margin-bottom: 0;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-2xl);
    animation: slideIn 0.3s ease;
}

.modal-content.modal-large {
    max-width: 700px;
}

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

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

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: var(--transition-base);
}

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

.modal-body {
    padding: 24px;
}

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

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

.form-group:last-child {
    margin-bottom: 0;
}

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

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: var(--transition-base);
    outline: none;
}

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

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
}

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

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

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

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

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 260px;
    }
}

@media (max-width: 768px) {
    body {
        display: block;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 16px;
    }

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

    .header-right {
        width: 100%;
        justify-content: flex-end;
    }

    .search-filter-bar {
        flex-direction: column;
        gap: 12px;
    }

    .filter-controls {
        width: 100%;
    }

    .filter-select {
        flex: 1;
    }

    .task-input-wrapper {
        flex-direction: column;
    }

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

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

    .task-item {
        flex-direction: column;
    }

    .task-actions {
        width: 100%;
        margin-left: 0;
        justify-content: flex-end;
    }

    .modal-content {
        width: 95%;
        margin: 20px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 12px;
    }

    .top-header {
        padding: 16px;
    }

    .header-left h1 {
        font-size: 1.5rem;
    }

    .add-task-section,
    .search-filter-bar,
    .progress-section,
    .tasks-container {
        padding: 16px;
    }

    .quick-stats {
        flex-direction: column;
    }

    .action-btn {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .sidebar,
    .mobile-menu-toggle,
    .top-header .header-right,
    .search-filter-bar,
    .add-task-section,
    .progress-section,
    .task-actions,
    .modal {
        display: none !important;
    }

    .main-content {
        margin-left: 0;
    }

    .task-item {
        page-break-inside: avoid;
        border: 1px solid #000;
    }
}
