/* CSS Variables for Theme Management */
:root {
    /* Light Theme Colors */
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #6b7280;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    
    /* Background Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --sidebar-bg: #1e293b;
    --card-bg: #ffffff;
    
    /* Text Colors */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-white: #ffffff;
    
    /* Border Colors */
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    
    /* Shadow */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --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);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Spacing */
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 80px;
    --header-height: 70px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Dark Theme */
body.dark-mode {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --sidebar-bg: #020617;
    --card-bg: #1e293b;
    
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    
    --border-color: #334155;
    --border-hover: #475569;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

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

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

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

/* Sidebar Styles */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    z-index: 1000;
    transition: transform var(--transition-normal), width var(--transition-normal);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

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

/* Logout Section */
.logout-section {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.logout-btn:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.sidebar.collapsed .logout-btn span {
    display: none;
}

/* Notification Section */
.notification-section {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.notification-icon {
    width: 100%;
    background: var(--info-color);
    color: var(--text-white);
    border: none;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all var(--transition-fast);
}

.notification-icon:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger-color);
    color: var(--text-white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

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

/* Notification Dropdown */
.notification-dropdown {
    position: absolute;
    top: 100%;
    left: 20px;
    right: 20px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-normal);
    z-index: 1001;
    max-height: 400px;
    overflow-y: auto;
}

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

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

.notification-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.clear-all {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all var(--transition-fast);
}

.clear-all:hover {
    background: var(--bg-tertiary);
}

.notification-list {
    padding: 8px 0;
}

.notification-item {
    padding: 12px 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.notification-item:hover {
    background: var(--bg-tertiary);
}

.notification-item i {
    font-size: 16px;
    margin-top: 2px;
}

.notification-item i.text-success {
    color: var(--success-color);
}

.notification-item i.text-info {
    color: var(--info-color);
}

.notification-item i.text-warning {
    color: var(--warning-color);
}

.notification-content {
    flex: 1;
}

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

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

.no-notifications {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

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

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

.nav-item {
    margin: 4px 20px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: 8px;
    transition: all var(--transition-fast);
    font-weight: 500;
}

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

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

.nav-link i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.sidebar.collapsed .nav-link span {
    display: none;
}

/* Sidebar Toggle */
.sidebar-toggle {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-toggle i {
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: block;
    text-align: center;
}

.sidebar-toggle:hover i {
    color: var(--text-white);
    transform: scale(1.1);
}

.sidebar.collapsed .sidebar-toggle i {
    transform: rotate(180deg);
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left var(--transition-normal);
}

.sidebar.collapsed + .main-content {
    margin-left: var(--sidebar-collapsed-width);
}

/* Header */
.header {
    height: var(--header-height);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all var(--transition-fast);
}

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

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Search Box */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    font-size: 16px;
}

.search-box input {
    padding: 10px 12px 10px 40px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    width: 300px;
    transition: all var(--transition-fast);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

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

/* User Profile */
.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.user-profile:hover {
    background: var(--bg-tertiary);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.user-name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

/* Content */
.content {
    padding: 24px;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

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

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Add Task Button */
.add-task-btn {
    background: var(--primary-color);
    color: var(--text-white);
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-fast);
}

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

/* Task Filters */
.task-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

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

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

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

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

/* Task Card */
.task-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

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

.task-card.completed {
    opacity: 0.8;
}

.task-card.overdue {
    border-left: 4px solid var(--danger-color);
}

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

.task-priority {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.task-priority.high {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.task-priority.medium {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.task-priority.low {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.priority-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.task-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

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

.task-action-btn {
    background: none;
    border: none;
    padding: 6px;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.task-action-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Task Content */
.task-content {
    margin-bottom: 16px;
}

.task-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.4;
}

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

.task-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

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

.task-status {
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
    text-transform: capitalize;
}

.task-status.pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.task-status.completed {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.task-status.overdue {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

/* Task Footer */
.task-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

.task-complete-btn {
    width: 100%;
    background: none;
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.task-complete-btn:hover {
    border-color: var(--success-color);
    color: var(--success-color);
    background: rgba(16, 185, 129, 0.05);
}

.task-complete-btn.completed {
    background: var(--success-color);
    color: var(--text-white);
    border-color: var(--success-color);
}

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

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

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

.empty-state p {
    font-size: 14px;
}

/* Modal */
.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: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform var(--transition-normal);
}

.modal.show .modal-content {
    transform: scale(1);
}

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

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.close-modal {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all var(--transition-fast);
}

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

/* Task Form */
.task-form {
    padding: 24px;
}

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

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

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

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

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

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

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

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

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

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

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

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

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

/* Calendar Styles */
.calendar-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 0 4px;
}

.calendar-nav {
    background: var(--primary-color);
    color: var(--text-white);
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.calendar-nav:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.calendar-nav:active {
    transform: translateY(0);
}

.current-month {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    min-width: 200px;
}

.calendar-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
}

.calendar-grid {
    display: flex;
    flex-direction: column;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--bg-tertiary);
    border-bottom: 2px solid var(--border-color);
}

.calendar-day-header {
    padding: 16px 8px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-right: 1px solid var(--border-color);
}

.calendar-day-header:last-child {
    border-right: none;
}

.calendar-body {
    display: flex;
    flex-direction: column;
}

.calendar-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-bottom: 1px solid var(--border-color);
}

.calendar-week:last-child {
    border-bottom: none;
}

.calendar-day {
    min-height: 80px;
    padding: 8px;
    border-right: 1px solid var(--border-color);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
}

.calendar-day:last-child {
    border-right: none;
}

.calendar-day:hover {
    background: var(--bg-tertiary);
    transform: scale(1.02);
    z-index: 10;
    box-shadow: var(--shadow-md);
}

.calendar-day.other-month {
    background: var(--bg-secondary);
    color: var(--text-muted);
    opacity: 0.5;
}

.calendar-day.other-month:hover {
    background: var(--bg-tertiary);
    opacity: 0.7;
}

.calendar-day.today {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: var(--text-white);
    font-weight: 600;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.calendar-day.today:hover {
    background: linear-gradient(135deg, var(--primary-hover), var(--primary-color));
    transform: scale(1.05);
}

.calendar-day.today .day-number {
    color: var(--text-white);
    font-weight: 700;
}

.calendar-day.has-tasks {
    border-left: 4px solid var(--success-color);
}

.calendar-day.today.has-tasks {
    border-left: 4px solid var(--text-white);
}

.day-number {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    align-self: flex-start;
}

.task-indicators {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: auto;
    align-items: center;
}

.task-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
    animation: fadeIn 0.3s ease-in-out;
}

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

.task-dot.medium {
    background: var(--warning-color);
}

.task-dot.low {
    background: var(--success-color);
}

.calendar-day.today .task-dot {
    background: var(--text-white);
    opacity: 0.9;
}

.task-more {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 2px 4px;
    border-radius: 8px;
    margin-left: 2px;
}

.calendar-day.today .task-more {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-white);
}

.calendar-legend {
    display: flex;
    gap: 24px;
    justify-content: center;
    padding: 16px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
}

.legend-color.has-tasks {
    background: var(--success-color);
}

.legend-color.today {
    background: var(--primary-color);
}

.legend-color.high-priority {
    background: var(--danger-color);
}

.legend-color.medium-priority {
    background: var(--warning-color);
}

.legend-color.low-priority {
    background: var(--success-color);
}

/* Analytics Styles */
.analytics-period select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
}

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

.analytics-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all var(--transition-fast);
}

.analytics-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-white);
    background: var(--primary-color);
}

.card-content {
    flex: 1;
}

.card-content h3 {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.card-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.card-change {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-change.positive {
    color: var(--success-color);
}

.card-change.negative {
    color: var(--danger-color);
}

/* Progress Section */
.progress-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
}

.progress-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.progress-bars {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.progress-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.progress-label span:first-child {
    color: var(--text-primary);
    font-weight: 500;
}

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

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

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1s ease-out;
    width: 0%;
}

.progress-fill.completed {
    background: var(--success-color);
}

.progress-fill.pending {
    background: var(--warning-color);
}

.progress-fill.overdue {
    background: var(--danger-color);
}

/* Settings Styles */
.settings-container {
    max-width: 600px;
}

.settings-group {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
}

.settings-group h3 {
    font-size: 18px;
    font-weight: 600;
    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 {
    flex: 1;
}

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

.setting-info p {
    font-size: 13px;
    color: var(--text-muted);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
}

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

.toggle-label {
    display: block;
    width: 44px;
    height: 24px;
    background: var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: background-color var(--transition-fast);
    position: relative;
}

.toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: var(--text-white);
    border-radius: 50%;
    transition: transform var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

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

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

/* Toast Notification */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: var(--shadow-lg);
    z-index: 3000;
    transform: translateX(400px);
    transition: transform var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
}

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

.toast.success {
    border-left: 4px solid var(--success-color);
}

.toast.error {
    border-left: 4px solid var(--danger-color);
}

.toast.warning {
    border-left: 4px solid var(--warning-color);
}

.toast.info {
    border-left: 4px solid var(--info-color);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

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

.toast.success .toast-icon {
    color: var(--success-color);
}

.toast.error .toast-icon {
    color: var(--danger-color);
}

.toast.warning .toast-icon {
    color: var(--warning-color);
}

.toast.info .toast-icon {
    color: var(--info-color);
}

.toast-message {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all var(--transition-fast);
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    .search-box input {
        width: 200px;
    }
    
    .tasks-container {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    
    .analytics-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .sidebar.collapsed + .main-content {
        margin-left: 0;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .header {
        padding: 0 16px;
    }
    
    .search-box {
        display: none;
    }
    
    .user-name {
        display: none;
    }
    
    .content {
        padding: 16px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .tasks-container {
        grid-template-columns: 1fr;
    }
    
    .analytics-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 12px;
    }
    
    .analytics-card {
        padding: 16px;
        flex-direction: column;
        text-align: center;
    }
    
    .card-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .card-number {
        font-size: 24px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .calendar-day {
        min-height: 50px;
    }
    
    .calendar-day-header {
        padding: 12px 4px;
    }
    
    .toast {
        right: 16px;
        left: 16px;
        min-width: auto;
        transform: translateY(-100px);
    }
    
    .toast.show {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .header {
        padding: 0 12px;
    }
    
    .content {
        padding: 12px;
    }
    
    .page-title {
        font-size: 20px;
    }
    
    .section-header h2 {
        font-size: 24px;
    }
    
    .task-card {
        padding: 16px;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .task-form {
        padding: 16px;
    }
    
    .analytics-card {
        padding: 12px;
    }
    
    .settings-group {
        padding: 16px;
    }
    
    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Animations */
@keyframes slideInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

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

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

.animate-slide-up {
    animation: slideInUp 0.3s ease-out;
}

.animate-slide-down {
    animation: slideInDown 0.3s ease-out;
}

.animate-slide-left {
    animation: slideInLeft 0.3s ease-out;
}

.animate-slide-right {
    animation: slideInRight 0.3s ease-out;
}

/* Print Styles */
@media print {
    .sidebar,
    .header,
    .toast,
    .modal {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .content {
        padding: 0 !important;
    }
    
    .task-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

