:root {
    --bg-color: #f0f4f9; /* Modern light base */
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --accent-color: #6366f1;
    --accent-hover: #4f46e5;
    --accent-light: #e0e7ff;
    --danger-color: #ef4444;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --info-color: #0ea5e9;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.85);
    --glass-shadow: 0 20px 45px rgba(0, 0, 0, 0.08);
    --glass-blur: 35px;
}

html {
    font-size: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Plus Jakarta Sans', sans-serif; }

body {
    background: linear-gradient(135deg, #f0f4f9 0%, #e8edf5 50%, #dde6f0 100%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    /* Subtle grid pattern */
    background-image: radial-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 25px 25px;
}

/* Centering for the Dashboard specifically */
body.app-body {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Ambient Animated Glows - Enhanced Pastel Light Mode */
.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.5;
    z-index: -1;
    animation: floatOrb 28s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}
.orb-1 { width: 50vw; height: 50vw; background: linear-gradient(135deg, #c4b5fd, #a78bfa); top: -25%; left: -15%; }
.orb-2 { width: 45vw; height: 45vw; background: linear-gradient(135deg, #fbcfe8, #f472b6); bottom: -20%; right: -20%; animation-delay: -8s; animation-direction: alternate-reverse; }
.orb-3 { width: 40vw; height: 40vw; background: linear-gradient(135deg, #bae6fd, #38bdf8); top: 25%; right: 10%; opacity: 0.35; animation-duration: 35s; animation-delay: -12s; }

@keyframes floatOrb {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    100% { transform: translate(100px, 120px) scale(1.1) rotate(60deg); }
}

.app-container {
    width: 95vw; max-width: 1300px; height: 90vh;
    display: flex; gap: 1.5rem;
    position: relative;
    z-index: 10;
}

/* Premium Glassmorphism */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
    /* Outer highlight for depth */
    box-shadow: inset 0 2px 5px rgba(255, 255, 255, 1), var(--glass-shadow);
}

/* Sidebar */
.sidebar { 
    width: 280px; 
    height: 100%; 
    padding: 2rem 1.2rem; 
    display: flex; 
    flex-direction: column; 
    gap: 2.5rem; 
    border-right: 1px solid rgba(99, 102, 241, 0.08);
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.3);
}
.bottom-nav { display: none; } /* Hidden by default */
.mobile-fab { display: none; } /* Hidden by default */
.right-sidebar { 
    width: 300px; 
    padding: 2rem 1.8rem; 
    display: flex; 
    flex-direction: column;
    overflow-y: auto; 
    overflow-x: hidden;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.3);
}
.sidebar::-webkit-scrollbar, .right-sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track, .right-sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb, .right-sidebar::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 4px; }

.logo { 
    display: flex; 
    align-items: center; 
    gap: 0.8rem; 
    font-size: 1.7rem; 
    font-weight: 900; 
    margin-bottom: 2rem; 
    color: var(--text-primary); 
    flex-shrink: 0; 
    letter-spacing: -0.8px;
    background: linear-gradient(135deg, var(--accent-color), #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.logo-icon {
    width: 40px; 
    height: 40px; 
    background: linear-gradient(135deg, #6366f1, #a855f7);
    border-radius: 12px; 
    display: flex; 
    justify-content: center; 
    align-items: center;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4), inset 0 2px 4px rgba(255,255,255,0.6);
    font-size: 1.2rem; 
    color: white;
    flex-shrink: 0;
}

.nav-menu { display: flex; flex-direction: column; gap: 0.5rem; flex-shrink: 0; }
.nav-btn {
    background: transparent; 
    border: none; 
    color: var(--text-secondary);
    font-size: 0.95rem; 
    font-weight: 700; 
    padding: 1rem 1.1rem; 
    border-radius: 14px;
    text-align: left; 
    cursor: pointer; 
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); 
    display: flex; 
    align-items: center; 
    gap: 1rem; 
    position: relative; 
    overflow: hidden;
}
.nav-btn i { 
    font-size: 1.2rem; 
    width: 20px; 
    text-align: center; 
    transition: color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.nav-btn:hover { 
    background: rgba(99, 102, 241, 0.12);
    color: var(--accent-color); 
    transform: translateX(6px); 
}
.nav-btn.active { 
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(168, 85, 247, 0.12));
    color: var(--accent-color);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
    border-left: 3px solid var(--accent-color);
    padding-left: calc(1.1rem - 3px);
}
.nav-btn.active i { 
    color: var(--accent-color); 
    animation: bounce-icon 0.5s ease;
}

@keyframes bounce-icon {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Pomodoro Widget Fixed */
.pomodoro-widget {
    margin-top: auto; 
    margin-bottom: 1.5rem; 
    padding: 1.5rem;
    text-align: center; 
    border-radius: 20px; 
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(168, 85, 247, 0.06));
    border: 1.5px solid rgba(99, 102, 241, 0.3);
    position: relative; 
    flex-shrink: 0; 
    display: flex; 
    flex-direction: column; 
    gap: 0.8rem;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.1), inset 0 2px 4px rgba(255,255,255,0.8);
}
.pomodoro-widget.running { 
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.25), inset 0 2px 4px rgba(255,255,255,0.8); 
    border-color: rgba(99, 102, 241, 0.6);
    animation: pulse-glow 2s ease-in-out infinite;
}
.pomodoro-widget h4 { 
    color: var(--accent-color); 
    font-weight: 800; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 0.4rem; 
    font-size: 0.75rem; 
    text-transform: uppercase; 
    letter-spacing: 1.2px; 
    margin: 0; 
}
.timer-display { 
    font-size: 2.5rem; 
    font-weight: 900; 
    color: var(--accent-color); 
    font-variant-numeric: tabular-nums; 
    margin: 0; 
    line-height: 1; 
    letter-spacing: -2px;
}
.pomodoro-progress-bg { width: 100%; height: 6px; background: rgba(0, 0, 0, 0.08); border-radius: 8px; overflow: hidden; margin-bottom: 0.3rem; }
.pomodoro-progress-fill { 
    height: 100%; 
    background: linear-gradient(90deg, #6366f1, #a855f7); 
    transition: width 1s linear;
    border-radius: 8px;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 30px rgba(99, 102, 241, 0.25), inset 0 2px 4px rgba(255,255,255,0.8); }
    50% { box-shadow: 0 0 40px rgba(99, 102, 241, 0.35), inset 0 2px 4px rgba(255,255,255,0.8); }
}

.timer-controls { display: flex; justify-content: center; gap: 0.8rem; }
.timer-controls button {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(168, 85, 247, 0.08));
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--accent-color); 
    width: 38px; 
    height: 38px;
    border-radius: 50%; 
    cursor: pointer; 
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 0.9rem; 
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.15);
}
.timer-controls button:hover { 
    background: var(--accent-color);
    color: white; 
    transform: scale(1.15); 
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
    border-color: var(--accent-color);
}

.sidebar-footer { flex-shrink: 0; }
.add-task-btn {
    background: linear-gradient(135deg, var(--accent-color), #a855f7); 
    color: #fff; 
    border: none; 
    width: 100%;
    padding: 1.2rem; 
    border-radius: 14px; 
    font-size: 1rem; 
    font-weight: 800; 
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 0.6rem;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.35), inset 0 2px 5px rgba(255,255,255,0.3);
    position: relative;
    overflow: hidden;
}

.add-task-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    transition: all 0.6s ease;
}

.add-task-btn:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.5), inset 0 2px 5px rgba(255,255,255,0.3);
}

.add-task-btn:hover::before {
    top: 0;
    left: 0;
}

.glow-effect:hover {
    transform: translateY(-2px) scale(1.02);
}

/* Main Content */
.main-content { 
    flex-grow: 1; 
    display: flex; 
    flex-direction: column; 
    gap: 1.8rem; 
    overflow: hidden;
    transition: opacity 0.4s ease, transform 0.4s ease;
    padding-bottom: 1rem;
}
.top-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 2rem 2.5rem 0; 
}
.header-left h2 { 
    font-size: 2.5rem; 
    font-weight: 900; 
    margin-bottom: 0.3rem; 
    letter-spacing: -1px; 
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--text-primary), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.date-display { 
    color: var(--text-secondary); 
    font-size: 0.95rem; 
    font-weight: 600;
    letter-spacing: 0.5px;
}

.header-right { 
    display: flex; 
    align-items: center; 
    gap: 1.5rem; 
}
.search-box {
    display: flex; 
    align-items: center; 
    padding: 0.9rem 1.5rem; 
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.9));
    gap: 0.8rem; 
    width: 280px; 
    border: 1.5px solid rgba(99, 102, 241, 0.15);
    transition: all 0.3s ease; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
}
.search-box:focus-within { 
    border-color: var(--accent-color); 
    background: #fff; 
    box-shadow: 0 10px 25px rgba(99,102,241,0.15);
    transform: translateY(-2px);
}
.search-box i { color: var(--accent-color); font-size: 0.95rem; }
.search-box input { background: transparent; border: none; color: var(--text-primary); outline: none; width: 100%; font-size: 0.95rem; font-weight: 600; }
.search-box input::placeholder { color: #cbd5e1; }

.action-btn {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85)); 
    border: 1.5px solid rgba(99, 102, 241, 0.15); 
    color: var(--text-secondary);
    width: 48px; 
    height: 48px; 
    border-radius: 50%; 
    cursor: pointer; 
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); 
    font-size: 1.1rem;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}
.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(99, 102, 241, 0.15);
    border-color: var(--accent-color);
    color: var(--accent-color);
}
.glow-hover:hover { 
    color: #fff; 
    background: linear-gradient(135deg, #ef4444, #dc2626); 
    border-color: #ef4444; 
    transform: scale(1.12) rotate(12deg); 
    box-shadow: 0 12px 30px rgba(239, 68, 68, 0.5); 
}

/* Today's Progress */
.today-progress { 
    margin: 0 2.5rem; 
    padding: 2rem; 
    display: flex; 
    flex-direction: column; 
    gap: 1.2rem; 
    flex-shrink: 0; 
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(168, 85, 247, 0.06));
    border: 1.5px solid rgba(99, 102, 241, 0.2);
    border-radius: 24px; 
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.1), inset 0 2px 6px rgba(255,255,255,0.8);
}
.progress-info { display: flex; justify-content: space-between; align-items: center; }
.progress-info h3 { font-weight: 900; font-size: 1.2rem; letter-spacing: -0.3px; color: var(--text-primary); }
.progress-info span { 
    background: linear-gradient(135deg, var(--accent-color), #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900; 
    font-size: 1.1rem; 
}
.progress-bar-container { 
    width: 100%; 
    height: 10px; 
    background: rgba(0, 0, 0, 0.08); 
    border-radius: 14px; 
    overflow: hidden; 
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}
.progress-bar { 
    height: 100%; 
    background: linear-gradient(90deg, #6366f1 0%, #a855f7 50%, #d946ef 100%);
    border-radius: 14px; 
    transition: width 1s cubic-bezier(0.34, 1.56, 0.64, 1); 
    position: relative; 
    overflow: hidden;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.6);
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Tasks Container */
.tasks-container { 
    flex-grow: 1; 
    padding: 0 2.5rem 1.5rem 2.5rem; 
    overflow-x: auto; 
    overflow-y: hidden; 
    display: flex; 
    flex-direction: column; 
    gap: 1.2rem;
}
.tasks-container::-webkit-scrollbar { height: 6px; }
.tasks-container::-webkit-scrollbar-track { background: transparent; }
.tasks-container::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.1); border-radius: 8px; }

/* Kanban Board Layout */
.kanban-board {
    display: grid; 
    grid-template-columns: repeat(3, minmax(340px, 1fr)); 
    gap: 1.8rem;
    height: 100%; 
    min-height: 400px;
}
.kanban-column {
    display: flex; 
    flex-direction: column; 
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.4));
    border: 1.5px solid rgba(99, 102, 241, 0.12);
    border-radius: 24px; 
    padding: 1.5rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
}
.kanban-column:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.55));
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.1);
}
.kanban-column-tasks{
    flex-grow: 1; 
    overflow-y: auto; 
    display: flex; 
    flex-direction: column; 
    gap: 1.2rem;
    padding-right: 0.5rem; 
    margin-top: 1rem;
}
.kanban-column-tasks::-webkit-scrollbar { width: 4px; }
.kanban-column-tasks::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 4px; }

.empty-column-state {
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center;
    height: 180px; 
    color: var(--text-secondary); 
    opacity: 0.5; 
    gap: 0.8rem;
}
.empty-column-state i { 
    font-size: 2.4rem; 
    color: var(--accent-color); 
    opacity: 0.3;
}

/* Priority Sections */
.priority-section-header {
    display: flex; 
    align-items: center; 
    gap: 0.8rem; 
    padding: 0.5rem 0;
    font-size: 1.15rem; 
    font-weight: 900; 
    color: var(--text-primary); 
    letter-spacing: -0.3px;
}
.priority-count {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(168, 85, 247, 0.08));
    padding: 0.3rem 0.8rem; 
    border-radius: 12px;
    font-size: 0.8rem; 
    font-weight: 800; 
    color: var(--accent-color); 
    margin-left: auto;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

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

/* Premium Task Item */
.task-item {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.88));
    border: 1.5px solid rgba(99, 102, 241, 0.12);
    padding: 1.2rem; 
    border-radius: 16px; 
    display: flex; 
    align-items: flex-start; 
    gap: 1rem;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); 
    position: relative; 
    overflow: hidden;
    animation: slideInUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    opacity: 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    border-left: 4px solid var(--accent-color);
}

.task-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.08), transparent);
    transition: left 0.5s ease;
}

.task-item:hover { 
    background: rgba(255, 255, 255, 1); 
    transform: translateY(-4px); 
    box-shadow: 0 16px 40px rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.4);
    border-left-color: var(--accent-color);
}

.task-item:hover::before {
    left: 100%;
}

/* Category-based left border colors */
.task-item.category-Work { border-left-color: #6366f1; }
.task-item.category-Personal { border-left-color: #a855f7; }
.task-item.category-Study { border-left-color: #0ea5e9; }
.task-item.category-Health { border-left-color: #10b981; }
.task-item.category-Other { border-left-color: #f59e0b; }

/* Animated Custom Checkbox */
.task-checkbox-container { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    padding-top: 0.1rem; 
}
.task-checkbox {
    appearance: none; 
    width: 24px; 
    height: 24px; 
    border: 2.5px solid rgba(99, 102, 241, 0.5);
    border-radius: 50%; 
    cursor: pointer; 
    display: flex; 
    justify-content: center;
    align-items: center; 
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); 
    position: relative; 
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.9));
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15), inset 0 1px 2px rgba(255,255,255,0.8);
}
.task-checkbox:hover { 
    border-color: var(--accent-color); 
    transform: scale(1.2); 
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35), inset 0 1px 2px rgba(255,255,255,0.8);
}
.task-checkbox:checked { 
    background: linear-gradient(135deg, var(--accent-color), #a855f7);
    border-color: var(--accent-color);
    box-shadow: 0 8px 22px rgba(99, 102, 241, 0.45), inset 0 1px 2px rgba(255,255,255,0.4);
}
.task-checkbox:checked::after { 
    content: '\f00c'; 
    font-family: 'Font Awesome 6 Free'; 
    font-weight: 900; 
    font-size: 13px; 
    color: #fff; 
    animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn { 0% { transform: scale(0) rotate(-45deg); opacity: 0; } 100% { transform: scale(1) rotate(0); opacity: 1; } }

.task-item.completed { opacity: 0.5; }
.task-item.completed .task-title { text-decoration: line-through; color: var(--text-secondary); }
.task-item.completed:hover { opacity: 0.8; }

.task-content { flex-grow: 1; }
.task-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.6rem; }
.task-title { 
    font-size: 1.1rem; 
    font-weight: 900; 
    letter-spacing: -0.4px; 
    transition: all 0.3s ease; 
    color: var(--text-primary); 
    margin-top: 0.1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.task-desc { 
    color: var(--text-secondary); 
    font-size: 0.85rem; 
    margin-bottom: 0.8rem; 
    line-height: 1.5; 
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.badges-container { display: flex; gap: 0.5rem; margin-bottom: 0.8rem; flex-wrap: wrap; }
.badge { 
    padding: 0.4rem 0.9rem; 
    border-radius: 16px; 
    font-size: 0.7rem; 
    font-weight: 900; 
    text-transform: uppercase; 
    letter-spacing: 0.8px; 
    border: 1.5px solid rgba(0,0,0,0.06); 
    display: flex; 
    align-items: center; 
    gap: 0.5rem; 
    background: #fff;
    box-shadow: 0 3px 8px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
}
.badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.1);
}
.badge-priority-High { 
    color: #dc2626; 
    border-color: rgba(220, 38, 38, 0.4); 
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.12), rgba(220, 38, 38, 0.06));
    box-shadow: 0 3px 8px rgba(220, 38, 38, 0.15);
}
.badge-priority-High::before { content: '⚡ '; }
.badge-priority-Medium { 
    color: #ea580c; 
    border-color: rgba(234, 88, 12, 0.4); 
    background: linear-gradient(135deg, rgba(234, 88, 12, 0.12), rgba(234, 88, 12, 0.06));
    box-shadow: 0 3px 8px rgba(234, 88, 12, 0.15);
}
.badge-priority-Medium::before { content: '→ '; }
.badge-priority-Low { 
    color: #059669; 
    border-color: rgba(5, 150, 105, 0.4); 
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.12), rgba(5, 150, 105, 0.06));
    box-shadow: 0 3px 8px rgba(5, 150, 105, 0.15);
}
.badge-priority-Low::before { content: '✓ '; }

.task-meta { 
    display: flex; 
    gap: 0.6rem; 
    font-size: 0.75rem; 
    color: var(--text-secondary); 
    flex-wrap: wrap; 
    font-weight: 600; 
}
.task-meta span { 
    display: flex; 
    align-items: center; 
    gap: 0.4rem; 
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.88));
    padding: 0.5rem 0.9rem; 
    border-radius: 14px; 
    border: 1.5px solid rgba(0,0,0,0.06);
    box-shadow: 0 3px 8px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
}

.task-meta span:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.1);
}

.task-meta .badge-daily { 
    color: #0ea5e9; 
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(14, 165, 233, 0.06));
    border-color: rgba(14, 165, 233, 0.3);
    box-shadow: 0 3px 8px rgba(14, 165, 233, 0.15);
}

.task-meta .badge-daily::before { 
    content: '🔄 '; 
}

.task-actions { 
    display: flex; 
    gap: 0.6rem; 
    opacity: 0;
    transition: opacity 0.3s ease;
}
.task-item:hover .task-actions { opacity: 1; }

.icon-btn { 
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(99, 102, 241, 0.08));
    border: 1.5px solid rgba(99, 102, 241, 0.2); 
    color: var(--accent-color); 
    width: 36px; 
    height: 36px; 
    border-radius: 50%; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 0.9rem; 
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); 
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.12);
    flex-shrink: 0;
}
.icon-btn:hover { 
    background: var(--accent-color); 
    color: #fff; 
    transform: scale(1.22) rotate(10deg); 
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
    border-color: transparent;
}
.icon-btn.delete-btn { 
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(239, 68, 68, 0.08));
    border-color: rgba(239, 68, 68, 0.2); 
    color: var(--danger-color);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.12);
}
.icon-btn.delete-btn:hover { 
    background: var(--danger-color); 
    color: #fff; 
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
    border-color: transparent;
}

/* Empty State */
.empty-state { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    height: 100%; 
    color: var(--text-secondary); 
    gap: 1.8rem; 
    text-align: center;
    padding: 3rem 2rem;
}
.loader-spinner { 
    width: 64px; 
    height: 64px; 
    border: 4px solid rgba(99, 102, 241, 0.15); 
    border-top-color: var(--accent-color); 
    border-right-color: #a855f7;
    border-radius: 50%; 
    animation: spin 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.25), inset 0 0 15px rgba(99, 102, 241, 0.1);
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state p { 
    font-size: 1.15rem; 
    font-weight: 700; 
    letter-spacing: 0.5px; 
    color: var(--text-secondary);
    margin: 0;
}
.empty-state-icon {
    font-size: 4rem;
    color: var(--accent-color);
    opacity: 0.2;
    animation: float-icon 3s ease-in-out infinite;
}
@keyframes float-icon {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Analytics Dashboard */
.analytics-container { 
    flex-grow: 1; 
    padding: 2rem 2.5rem 2rem 2.5rem; 
    overflow-y: auto; 
    display: none; 
    flex-direction: column; 
    gap: 2rem; 
}
.stats-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); 
    gap: 1.5rem; 
}
.stat-card { 
    padding: 2rem; 
    display: flex; 
    align-items: center; 
    gap: 1.5rem; 
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.78));
    border: 1.5px solid rgba(99, 102, 241, 0.12);
    border-radius: 20px; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.05) 0%, transparent 70%);
    transition: right 0.6s ease;
}

.stat-card:hover { 
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.88));
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-8px); 
    box-shadow: 0 20px 45px rgba(99, 102, 241, 0.2);
}

.stat-card:hover::before {
    right: 0;
}

.icon-circle { 
    width: 60px; 
    height: 60px; 
    border-radius: 16px; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    font-size: 1.6rem; 
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(168, 85, 247, 0.08));
    border: 1.5px solid rgba(99, 102, 241, 0.25);
    color: var(--accent-color);
    box-shadow: 0 6px 15px rgba(99, 102, 241, 0.12);
    flex-shrink: 0;
}
.stat-info h3 { 
    font-size: 2.4rem; 
    font-weight: 900; 
    margin-bottom: 0.2rem; 
    letter-spacing: -1px; 
    color: var(--text-primary);
}
.stat-info p { 
    color: var(--text-secondary); 
    font-size: 0.8rem; 
    text-transform: uppercase; 
    letter-spacing: 1.2px; 
    font-weight: 800;
}

.charts-section { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); 
    gap: 1.5rem; 
}
.chart-card { 
    padding: 2.2rem; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.78));
    border: 1.5px solid rgba(99, 102, 241, 0.12);
    border-radius: 20px; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.chart-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.05) 0%, transparent 70%);
    transition: all 0.6s ease;
}

.chart-card:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.88));
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-8px);
    box-shadow: 0 20px 45px rgba(99, 102, 241, 0.2);
}

.chart-card:hover::before {
    top: 0;
    right: 0;
}
.chart-card h4 { 
    color: var(--text-primary); 
    margin-bottom: 2rem; 
    font-weight: 900; 
    width: 100%; 
    text-align: left; 
    font-size: 1.2rem; 
    letter-spacing: -0.3px;
}
.chart-wrapper { width: 100%; max-width: 280px; aspect-ratio: 1; position: relative; }

/* Calendar Container Fixed */
.calendar-container { flex-grow: 1; padding: 1.5rem 2rem; display: none; width: 100%; flex-direction: column; }
#calendar { width: 100%; height: 100%; min-height: 480px; }
.fc { color: var(--text-primary); font-family: 'Plus Jakarta Sans', sans-serif; height: 100%; }
.fc-theme-standard td, .fc-theme-standard th, .fc-theme-standard .fc-scrollgrid { border-color: rgba(0, 0, 0, 0.06); }
.fc .fc-button-primary { background-color: #fff; border-color: rgba(0,0,0,0.1); text-transform: capitalize; border-radius: 10px; color: var(--text-primary); font-weight: 700; transition: all 0.3s ease; box-shadow: 0 2px 4px rgba(0,0,0,0.02); padding: 0.4rem 0.8rem; font-size: 0.9rem;}
.fc .fc-button-primary:not(:disabled).fc-button-active, .fc .fc-button-primary:not(:disabled):active { background: var(--text-primary); color: #fff; border-color: transparent; box-shadow: 0 6px 15px rgba(15, 23, 42, 0.2); }
.fc .fc-button-primary:hover { background-color: #f8fafc; transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.05); }
.fc-day-today { background: rgba(99, 102, 241, 0.05) !important; }
.fc-event { border: none; padding: 4px 8px; border-radius: 6px; cursor: pointer; transition: transform 0.2s; box-shadow: 0 3px 8px rgba(0,0,0,0.05); }
.fc-event:hover { transform: scale(1.04); z-index: 5; box-shadow: 0 6px 15px rgba(0,0,0,0.1); }
.fc-event-main { color: white !important; font-weight: 700; font-size: 0.8rem; letter-spacing: 0.2px; }
.fc-toolbar-title { font-size: 1.4rem !important; font-weight: 800; color: var(--text-primary); letter-spacing: -0.5px; }
.fc-col-header-cell { padding: 12px 0; background: rgba(255,255,255,0.5); font-weight: 800; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 1px; color: var(--text-secondary); }

/* Modal */
.modal-overlay {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh; 
    background: rgba(15, 23, 42, 0.2);
    backdrop-filter: blur(20px); 
    -webkit-backdrop-filter: blur(20px);
    display: flex; 
    justify-content: center; 
    align-items: center; 
    opacity: 0; 
    pointer-events: none;
    transition: opacity 0.4s ease; 
    z-index: 2000;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal { 
    width: 100%; 
    max-width: 540px; 
    padding: 2.8rem; 
    transform: scale(0.92) translateY(30px); 
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); 
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.92));
    border: 1.5px solid rgba(99, 102, 241, 0.2);
    border-radius: 28px; 
    box-shadow: 0 30px 60px rgba(0,0,0,0.15), 0 0 1px rgba(99, 102, 241, 0.3);
}
.modal-overlay.active .modal { transform: scale(1) translateY(0); }
.modal-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 2.2rem; 
}
.modal-header h3 { 
    font-size: 1.8rem; 
    font-weight: 900; 
    letter-spacing: -0.6px; 
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--text-primary), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.close-btn { 
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.08));
    border: 1px solid rgba(239, 68, 68, 0.2); 
    color: var(--danger-color); 
    font-size: 1.2rem; 
    cursor: pointer; 
    width: 42px; 
    height: 42px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    transition: all 0.3s ease; 
}
.close-btn:hover { 
    background: var(--danger-color); 
    color: #fff; 
    transform: scale(1.15) rotate(90deg); 
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
}

.form-group { 
    margin-bottom: 1.6rem; 
    display: flex; 
    flex-direction: column; 
    gap: 0.8rem; 
}
.form-row { display: flex; gap: 1.4rem; }
.form-row .form-group { flex: 1; }
label { 
    color: var(--text-secondary); 
    font-size: 0.8rem; 
    font-weight: 800; 
    letter-spacing: 0.8px; 
    text-transform: uppercase;
}
input[type="text"], input[type="date"], input[type="time"], select, textarea {
    width: 100%; 
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.88));
    border: 1.5px solid rgba(99, 102, 241, 0.15);
    border-radius: 14px; 
    padding: 1.1rem 1.4rem; 
    color: var(--text-primary); 
    font-size: 1rem; 
    outline: none; 
    transition: all 0.3s ease; 
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
}
input:focus, select:focus, textarea:focus { 
    border-color: var(--accent-color); 
    background: #fff; 
    box-shadow: 0 0 0 4px rgba(99,102,241,0.2), 0 8px 20px rgba(99,102,241,0.15);
    transform: translateY(-1px);
}
select option { background: #fff; color: var(--text-primary); }
textarea { resize: none; }

.custom-toggle { 
    appearance: none; 
    width: 48px; 
    height: 28px; 
    background: rgba(0,0,0,0.08); 
    border-radius: 20px; 
    position: relative; 
    cursor: pointer; 
    outline: none; 
    border: 1.5px solid rgba(0,0,0,0.08); 
    transition: all 0.3s ease; 
    flex-shrink: 0;
}
.custom-toggle::after { 
    content: ''; 
    position: absolute; 
    top: 3px; 
    left: 3px; 
    width: 20px; 
    height: 20px; 
    background: white; 
    border-radius: 50%; 
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); 
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}
.custom-toggle:checked { 
    background: var(--accent-color); 
    border-color: var(--accent-color);
}
.custom-toggle:checked::after { transform: translateX(20px); background: #fff; }

.submit-btn {
    background: linear-gradient(135deg, var(--accent-color), #a855f7);
    color: #fff; 
    border: none; 
    width: 100%; 
    padding: 1.3rem; 
    border-radius: 14px; 
    font-size: 1rem; 
    font-weight: 800; 
    cursor: pointer; 
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); 
    margin-top: 1rem; 
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.35), inset 0 2px 5px rgba(255,255,255,0.3);
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.submit-btn::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 ease;
}

.submit-btn:hover { 
    transform: translateY(-4px); 
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.5), inset 0 2px 5px rgba(255,255,255,0.3);
}

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

/* Toasts */
.toast-container { 
    position: fixed; 
    bottom: 24px; 
    left: 50%; 
    transform: translateX(-50%); 
    display: flex; 
    flex-direction: column; 
    gap: 12px; 
    z-index: 3000; 
}
.toast {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
    backdrop-filter: blur(20px); 
    border: 1.5px solid rgba(99, 102, 241, 0.15);
    color: var(--text-primary); 
    padding: 1.2rem 1.8rem; 
    border-radius: 24px; 
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    display: flex; 
    align-items: center; 
    gap: 14px; 
    transform: translateY(120%) scale(0.9); 
    opacity: 0; 
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-weight: 700; 
    font-size: 0.95rem;
}
.toast i { font-size: 1.4rem; }
.toast.show { transform: translateY(0) scale(1); opacity: 1; }
.toast.success i { color: var(--success-color); }
.toast.error i { color: var(--danger-color); }

/* AI Chatbot - Ultra Premium Light Compact */
.chat-fab {
    position: fixed; 
    bottom: 30px; 
    right: 30px; 
    width: 62px; 
    height: 62px;
    border-radius: 50%; 
    background: linear-gradient(135deg, var(--accent-color), #a855f7);
    color: #fff; 
    border: none; 
    font-size: 1.6rem; 
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4); 
    z-index: 1000;
    display: flex; 
    justify-content: center; 
    align-items: center; 
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.chat-fab:hover { 
    transform: scale(1.18) rotate(15deg); 
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.5);
}

.chat-widget {
    position: fixed; 
    bottom: 105px; 
    right: 30px; 
    width: 360px; 
    height: 520px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85)); 
    backdrop-filter: blur(35px); 
    -webkit-backdrop-filter: blur(35px); 
    z-index: 1001;
    display: flex; 
    flex-direction: column; 
    overflow: hidden;
    transform-origin: bottom right; 
    animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1.5px solid rgba(99, 102, 241, 0.15);
    box-shadow: 0 25px 50px rgba(0,0,0,0.12); 
    border-radius: 28px;
}
@keyframes scaleIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.chat-header { 
    padding: 1.4rem 1.8rem; 
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(168, 85, 247, 0.06));
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    border-bottom: 1.5px solid rgba(99, 102, 241, 0.15);
}
.chat-header h3 { 
    font-size: 1.1rem; 
    font-weight: 900; 
    color: var(--text-primary); 
    display: flex; 
    align-items: center; 
    gap: 0.6rem; 
    letter-spacing: -0.3px;
}
.chat-header h3 i { color: var(--accent-color); font-size: 1.3rem; }
.chat-messages { 
    flex-grow: 1; 
    padding: 1.6rem; 
    overflow-y: auto; 
    display: flex; 
    flex-direction: column; 
    gap: 1rem;
}

.message { 
    max-width: 88%; 
    padding: 0.9rem 1.2rem; 
    border-radius: 18px; 
    font-size: 0.9rem; 
    line-height: 1.6; 
    font-weight: 600;
}
.ai-message { 
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.8));
    color: var(--text-primary); 
    align-self: flex-start; 
    border-bottom-left-radius: 4px; 
    border: 1px solid rgba(99, 102, 241, 0.15);
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}
.user-message { 
    background: linear-gradient(135deg, var(--accent-color), #a855f7);
    color: #fff; 
    align-self: flex-end; 
    border-bottom-right-radius: 4px; 
    box-shadow: 0 6px 15px rgba(99, 102, 241, 0.3);
}
.typing-indicator { 
    color: var(--text-secondary); 
    font-size: 0.85rem; 
    font-weight: 700; 
    align-self: flex-start; 
    margin-left: 8px; 
    animation: pulse 1.5s infinite;
}

.chat-input-area { 
    padding: 1.2rem 1.6rem; 
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.04), rgba(168, 85, 247, 0.02));
    display: flex; 
    gap: 0.8rem; 
    border-top: 1.5px solid rgba(99, 102, 241, 0.15);
    align-items: center;
}
.chat-input-area input { 
    flex-grow: 1; 
    background: #fff; 
    border: 1.5px solid rgba(99, 102, 241, 0.15);
    border-radius: 22px; 
    padding: 0.9rem 1.4rem; 
    color: var(--text-primary); 
    outline: none; 
    font-size: 0.95rem; 
    font-weight: 600; 
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}
.chat-input-area input:focus { 
    border-color: var(--accent-color); 
    box-shadow: 0 0 0 4px rgba(99,102,241,0.15);
}
.chat-input-area button { 
    background: linear-gradient(135deg, var(--accent-color), #a855f7);
    color: #fff; 
    width: 46px; 
    height: 46px; 
    border-radius: 50%; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    border: none; 
    cursor: pointer; 
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); 
    flex-shrink: 0; 
    font-size: 1.1rem; 
    box-shadow: 0 6px 15px rgba(99, 102, 241, 0.3);
}
.chat-input-area button:hover { 
    transform: scale(1.18) rotate(15deg); 
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
}

/* Responsive */
/* Mobile Tabs (Hidden on Desktop) */
.mobile-priority-tabs { display: none; }

/* Responsive */
@media (max-width: 768px) {
    /* Only lock the screen on the app dashboard */
    body.app-body, html:has(body.app-body) { overflow: hidden; height: 100%; position: fixed; width: 100%; }
    body.app-body .app-container { flex-direction: column; height: 100vh; height: 100dvh; width: 100vw; border-radius: 0; gap: 0; margin: 0; padding: 0; overflow: hidden; position: relative; }
    
    /* Normal scrolling for other pages (Contact, Privacy, etc.) */
    body:not(.app-body) { overflow-x: hidden; -webkit-overflow-scrolling: touch; }
    body:not(.app-body) .app-container { flex-direction: column; min-height: 100vh; width: 100vw; }
    
    /* Hide sidebar on mobile - will be replaced by bottom nav */
    .sidebar { display: none !important; }
    .right-sidebar { width: 100%; height: auto; padding: 1.5rem; border-radius: 0; border-top: 1px solid rgba(0,0,0,0.05); margin-top: 1rem; margin-bottom: 80px; }
    
    /* Bottom Navigation Bar for Mobile */
    .bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; height: 75px; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(20px); border-top: 1px solid rgba(0,0,0,0.08); display: flex; justify-content: space-around; align-items: center; z-index: 1000; padding: 0 1rem; padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -5px 20px rgba(0,0,0,0.05); }
    .bottom-nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text-secondary); text-decoration: none; font-size: 0.75rem; font-weight: 700; gap: 0.3rem; transition: all 0.2s; position: relative; flex: 1; height: 100%; }
    .bottom-nav-item i { font-size: 1.3rem; transition: transform 0.3s; }
    .bottom-nav-item.active { color: var(--text-primary); }
    .bottom-nav-item.active i { transform: translateY(-3px); }
    .bottom-nav-item.active::after { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 25px; height: 3px; background: var(--text-primary); border-radius: 0 0 4px 4px; }
    
    /* Mobile Floating Action Button (FAB) */
    .mobile-fab { position: fixed; bottom: 100px; right: 25px; width: 64px; height: 64px; border-radius: 22px; background: var(--text-primary); color: #fff; display: flex; justify-content: center; align-items: center; font-size: 1.8rem; box-shadow: 0 10px 30px rgba(0,0,0,0.3); z-index: 1100; border: 2px solid rgba(255,255,255,0.1); cursor: pointer; transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
    .mobile-fab:active { transform: scale(0.9); }
    
    /* Mobile Header: compact row - title on left, actions on right */
    .top-header { flex-direction: row; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 1rem 1rem 0; flex-wrap: nowrap; }
    .header-left h2 { font-size: 1.4rem; letter-spacing: -0.5px; }
    .date-display { font-size: 0.8rem; }
    .header-right { gap: 0.5rem; flex-shrink: 0; }
    /* Hide search text box on mobile, show only icon toggle */
    .search-box { display: none; }
    .search-box.mobile-open { display: flex; position: fixed; top: 1rem; left: 1rem; right: 1rem; z-index: 500; width: auto; max-width: none; margin: 0; background: #fff; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
    /* Profile dropdown: full-width centered on mobile */
    .profile-dropdown { right: 0 !important; left: auto !important; width: calc(100vw - 2rem) !important; max-width: 340px !important; }
    
    .main-content { padding: 0; flex-grow: 1; display: flex; flex-direction: column; height: 100%; overflow: hidden; padding-bottom: 85px; } /* Space for bottom nav */
    .tasks-container { padding: 0 1rem 1rem 1rem; flex-grow: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
    
    /* Kanban Mobile Fix - Tabbed View */
    .kanban-board { display: flex; flex-direction: column; flex-grow: 1; overflow: hidden; height: 100%; }
    .kanban-column { display: flex; flex-direction: column; height: 100%; overflow: hidden; padding: 0; border: none; background: transparent; }
    .kanban-tasks { flex-grow: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2rem; }
    
    /* Mobile Priority Tabs System */
    .mobile-priority-tabs { display: flex; width: 100%; gap: 0.5rem; margin-bottom: 1rem; }
    .priority-tab { flex: 1; padding: 0.8rem; border-radius: 12px; background: rgba(0,0,0,0.03); border: 1px solid rgba(0,0,0,0.05); font-weight: 800; color: var(--text-secondary); transition: all 0.3s; font-family: 'Plus Jakarta Sans', sans-serif; cursor: pointer; }
    .priority-tab.active { background: var(--text-primary); color: #fff; box-shadow: 0 4px 10px rgba(0,0,0,0.1); border-color: transparent; }
    
    /* Hide inactive columns based on active tab */
    .kanban-board.active-priority-High .kanban-col-Medium,
    .kanban-board.active-priority-High .kanban-col-Low { display: none; }
    
    .kanban-board.active-priority-Medium .kanban-col-High,
    .kanban-board.active-priority-Medium .kanban-col-Low { display: none; }
    
    .kanban-board.active-priority-Low .kanban-col-High,
    .kanban-board.active-priority-Low .kanban-col-Medium { display: none; }
    
    .stats-grid, .charts-section { grid-template-columns: 1fr; }
    
    /* AI Chat: Full-screen modal on mobile */
    .chat-fab { bottom: 165px; right: 20px; width: 52px; height: 52px; font-size: 1.3rem; z-index: 1090; }
    .chat-widget {
        position: fixed !important;
        bottom: 0 !important;
        right: 0 !important;
        left: 0 !important;
        top: 0 !important;
        width: 100vw !important;
        height: 100dvh !important;
        border-radius: 0 !important;
        z-index: 1200 !important;
        padding-bottom: env(safe-area-inset-bottom);
    }
    .chat-header { padding: 1.5rem 1.2rem; }
    .chat-messages { padding: 1rem 1.2rem; }
    .chat-input-area { padding: 1rem 1.2rem; padding-bottom: calc(1rem + env(safe-area-inset-bottom)); }
    
    /* Modal / Auth Mobile Fixes */
    .modal { padding: 1.5rem; border-radius: 16px; margin: 1rem; max-height: 90vh; overflow-y: auto; }
    .form-row { flex-direction: column; gap: 0.5rem; }
    
    #authOverlay > div { padding: 2rem !important; margin: 1rem; border-radius: 16px !important; }

    /* Task Card Mobile Optimization */
    .task-card { padding: 1.2rem; margin-bottom: 1rem; }
    .task-actions { gap: 0.8rem; }
    .task-actions button { width: 40px; height: 40px; font-size: 1rem; }
    .category-badge { padding: 0.3rem 0.8rem; font-size: 0.75rem; }
}

/* Mobile Bottom Sheet Menu (hidden on desktop) */
.mobile-sheet-overlay {
    display: none;
    position: fixed; inset: 0; background: rgba(0,0,0,0.4);
    z-index: 1150; backdrop-filter: blur(4px);
}
.mobile-sheet {
    display: none;
    position: fixed; bottom: 0; left: 0; right: 0;
    background: #fff; border-radius: 28px 28px 0 0;
    z-index: 1160; padding: 1rem 1.2rem 2.5rem;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.34, 1.2, 0.64, 1);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.12);
}
.mobile-sheet.open { transform: translateY(0); }
.mobile-sheet-handle {
    width: 40px; height: 4px; background: rgba(0,0,0,0.12);
    border-radius: 2px; margin: 0 auto 1.2rem;
}
.mobile-sheet-title {
    font-size: 1.1rem; font-weight: 800; color: var(--text-primary);
    margin-bottom: 1rem; letter-spacing: -0.3px;
}
.mobile-sheet-items { display: flex; flex-direction: column; gap: 0.5rem; }
.mobile-sheet-item {
    display: flex; align-items: center; gap: 1rem;
    padding: 0.9rem 0.8rem; border-radius: 16px; border: none;
    background: transparent; width: 100%; text-align: left; cursor: pointer;
    transition: background 0.2s;
}
.mobile-sheet-item:active { background: rgba(0,0,0,0.04); }
.sheet-item-icon {
    width: 46px; height: 46px; border-radius: 14px; flex-shrink: 0;
    display: flex; justify-content: center; align-items: center; font-size: 1.2rem;
}
.mobile-sheet-item div strong { display: block; font-size: 0.95rem; font-weight: 700; color: var(--text-primary); }
.mobile-sheet-item div p { margin: 0; font-size: 0.8rem; color: var(--text-secondary); font-weight: 500; }
.sheet-arrow { color: var(--text-secondary); font-size: 0.85rem; margin-left: auto; }
.mobile-sheet-item.danger div strong { color: #f43f5e; }

@media (max-width: 768px) {
    .mobile-sheet-overlay.open { display: block; }
    .mobile-sheet { display: block; }
}



/* --- New Features Styles --- */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
}
.task-tag {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-color);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}
.streak-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-left: auto;
}
.subtasks-container {
    margin-top: 0.8rem;
    border-top: 1px dashed rgba(0,0,0,0.1);
    padding-top: 0.8rem;
}
.subtask-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.subtask-item input[type='checkbox'] {
    width: 14px;
    height: 14px;
    cursor: pointer;
}
.subtask-item.completed span {
    text-decoration: line-through;
    opacity: 0.6;
}
.add-subtask-btn {
    background: none;
    border: none;
    color: var(--accent-color);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 0;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}
.add-subtask-btn:hover {
    text-decoration: underline;
}

