*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

:root{
    --bg:#07111f;
    --sidebar:#0c1728;
    --card:#101c2f;
    --card2:#14233d;
    --text:#ffffff;
    --muted:#9fb2d1;
    --accent:#5d8dff;
    --danger:#ff5d7a;
    --radius:24px;
}

body{
    font-family:'Segoe UI',sans-serif;
    background:var(--bg);
    color:var(--text);
    overflow-x:hidden;
}

.login-page{
    position:fixed;
    inset:0;
    display:flex;
    justify-content:center;
    align-items:center;
    background:linear-gradient(
        135deg,
        #07111f,
        #0f1f36
    );
    z-index:999;
}

.login-card{
    width:420px;
    background:var(--card);
    padding:40px;
    border-radius:30px;
    text-align:center;
}

.logo-text{
    font-size:48px;
    font-weight:900;
}

.login-subtitle{
    color:var(--muted);
    margin-top:10px;
    margin-bottom:25px;
}

.login-card input{
    width:100%;
    height:55px;
    border:none;
    outline:none;
    border-radius:15px;
    padding:0 16px;
    background:#091523;
    color:white;
    margin-bottom:15px;
}

.login-card button{
    width:100%;
    height:55px;
    border:none;
    border-radius:15px;
    background:var(--accent);
    color:white;
    cursor:pointer;
    font-weight:600;
}

.hidden{
    display:none;
}

.app{
    display:flex;
}

.sidebar{
    position:fixed;
    left:0;
    top:0;
    width:280px;
    height:100vh;
    background:var(--sidebar);
    padding:25px;
    display:flex;
    flex-direction:column;
    justify-content:space-between;
}

.sidebar-logo{
    font-size:42px;
    font-weight:900;
    margin-bottom:20px;
}

.profile-card{
    background:var(--card);
    padding:20px;
    border-radius:20px;
    text-align:center;
}

#sidebarUsername{
    margin-top:10px;
}

#unfinishedTasksText{
    color:var(--muted);
    margin-top:5px;
}

.sidebar-nav{
    display:flex;
    flex-direction:column;
    gap:12px;
}

.nav-btn{
    height:55px;
    border:none;
    border-radius:16px;
    background:transparent;
    color:white;
    text-align:left;
    padding-left:18px;
    cursor:pointer;
    transition:.25s;
}

.nav-btn:hover{
    background:var(--card);
}

.nav-btn.active{
    background:var(--accent);
}

#logoutBtn{
    width:100%;
    height:55px;
    border:none;
    border-radius:16px;
    background:var(--danger);
    color:white;
    cursor:pointer;
}
.main-content{
    margin-left:280px;
    width:calc(100% - 280px);
    padding:30px;
}

.page{
    display:none;
}

.active-page{
    display:block;
}

.page-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:25px;
}

.welcome-title{
    font-size:38px;
}

#todayDate{
    color:var(--muted);
    margin-top:5px;
}

.time-card{
    background:var(--card);
    padding:20px;
    border-radius:20px;
    min-width:180px;
    text-align:center;
}

.time-card span{
    color:var(--muted);
}

.time-card h2{
    margin-top:8px;
}


.dashboard-grid{
    display:grid;
    grid-template-columns:2fr 1fr;
    gap:20px;
}

.card{
    background:var(--card);
    border-radius:var(--radius);
    padding:22px;
}

.card-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:18px;
}

.quick-add-task{
    display:flex;
    gap:10px;
}

.quick-add-task input{
    flex:1;
    height:50px;
    border:none;
    outline:none;
    border-radius:14px;
    padding:0 15px;
    background:#091523;
    color:white;
}

.quick-add-task button{
    width:90px;
    border:none;
    border-radius:14px;
    background:var(--accent);
    color:white;
}

.task-preview-list{
    margin-top:15px;
}

.mood-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:12px;
}

.mood-slot{
    height:100px;
    border-radius:20px;
    background:var(--card2);
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    font-size:28px;
    font-weight:700;
}

.brain-dump-card textarea{
    width:100%;
    min-height:180px;
    border:none;
    outline:none;
    resize:none;
    border-radius:16px;
    padding:15px;
    background:#091523;
    color:white;
}

.brain-footer{
    display:flex;
    justify-content:space-between;
    margin-top:10px;
    color:var(--muted);
}

.tasks-toolbar{
    display:flex;
    gap:15px;
    margin-bottom:20px;
}

.tasks-toolbar input,
.tasks-toolbar select{
    height:50px;
    border:none;
    outline:none;
    border-radius:14px;
    background:#091523;
    color:white;
    padding:0 15px;
}

.tasks-toolbar input{
    flex:1;
}

#openTaskModalBtn{
    height:50px;
    padding:0 20px;
    border:none;
    border-radius:14px;
    background:var(--accent);
    color:white;
    cursor:pointer;
}

#tasksContainer{
    display:flex;
    flex-direction:column;
    gap:15px;
}

.task-item{
    background:var(--card);
    border-radius:20px;
    padding:20px;
}

.task-top{
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.task-title{
    font-size:20px;
    font-weight:700;
}

.task-description{
    margin-top:10px;
    color:var(--muted);
}

.task-footer{
    display:flex;
    justify-content:space-between;
    margin-top:15px;
}

.priority-low{
    color:#64d38a;
}

.priority-medium{
    color:#ffc857;
}

.priority-high{
    color:#ff5d7a;
}

.task-actions{
    display:flex;
    gap:10px;
}

.task-actions button{
    border:none;
    padding:10px 14px;
    border-radius:12px;
    cursor:pointer;
}

.complete-btn{
    background:#4caf50;
    color:white;
}

.edit-btn{
    background:#5d8dff;
    color:white;
}

.delete-btn{
    background:#ff5d7a;
    color:white;
}

#noteSearch{
    width:100%;
    height:55px;
    border:none;
    outline:none;
    border-radius:15px;
    padding:0 16px;
    background:#091523;
    color:white;
    margin-bottom:20px;
}

#addNoteBtn{
    height:50px;
    padding:0 20px;
    border:none;
    border-radius:14px;
    background:var(--accent);
    color:white;
    cursor:pointer;
}

.notes-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(280px,1fr));
    gap:20px;
}

.note-card{
    background:var(--card);
    border-radius:22px;
    padding:20px;
}

.note-title{
    font-size:20px;
    font-weight:700;
}

.note-date{
    margin-top:8px;
    color:var(--muted);
    font-size:13px;
}

.note-content{
    margin-top:15px;
    line-height:1.6;
}

.note-actions{
    display:flex;
    gap:10px;
    margin-top:15px;
}

.note-actions button{
    border:none;
    padding:10px 14px;
    border-radius:12px;
    cursor:pointer;
}


.analytics-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:20px;
    margin-bottom:25px;
}

.stat-card{
    background:var(--card);
    border-radius:22px;
    padding:22px;
}

.stat-card span{
    color:var(--muted);
}

.stat-card h2{
    margin-top:10px;
    font-size:32px;
}

#analyticsChart{
    margin-top:20px;
    min-height:260px;
    background:#091523;
    border-radius:18px;
}



.settings-grid{
    display:grid;
    gap:20px;
}

.settings-grid input{
    width:100%;
    height:50px;
    border:none;
    outline:none;
    border-radius:14px;
    background:#091523;
    color:white;
    padding:0 15px;
    margin-top:10px;
}

.settings-grid button{
    width:100%;
    height:50px;
    border:none;
    border-radius:14px;
    margin-top:12px;
    cursor:pointer;
}

#exportBtn{
    background:var(--accent);
    color:white;
}

#resetBtn{
    background:var(--danger);
    color:white;
}


.modal{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.65);
    display:flex;
    justify-content:center;
    align-items:center;
    z-index:9999;
}

.modal.hidden{
    display:none;
}

.modal-content{
    width:500px;
    max-width:95%;
    background:var(--card);
    border-radius:24px;
    padding:25px;
}

.modal-content h2{
    margin-bottom:20px;
}

.modal-content input,
.modal-content textarea,
.modal-content select{
    width:100%;
    margin-bottom:15px;
    border:none;
    outline:none;
    border-radius:14px;
    background:#091523;
    color:white;
    padding:15px;
}

.modal-content textarea{
    min-height:140px;
    resize:none;
}

.modal-content button{
    width:100%;
    height:52px;
    border:none;
    border-radius:14px;
    background:var(--accent);
    color:white;
    cursor:pointer;
}

#stuckList{
    display:flex;
    flex-direction:column;
    gap:10px;
}

.stuck-item{
    background:#091523;
    border-radius:14px;
    padding:14px;
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.stuck-item button{
    border:none;
    background:var(--danger);
    color:white;
    padding:8px 12px;
    border-radius:10px;
    cursor:pointer;
}

::-webkit-scrollbar{
    width:10px;
}

::-webkit-scrollbar-track{
    background:#07111f;
}

::-webkit-scrollbar-thumb{
    background:#233a63;
    border-radius:20px;
}


.login-page{
    transition:.4s;
}

.fade-out{
    opacity:0;
    pointer-events:none;
}

.card,
.stat-card,
.task-item,
.note-card{
    animation:fadeUp .4s ease;
}

@keyframes fadeUp{
    from{
        opacity:0;
        transform:translateY(15px);
    }
    to{
        opacity:1;
        transform:translateY(0);
    }
}

@media(max-width:1000px){

    .sidebar{
        width:100%;
        height:auto;
        position:relative;
    }

    .main-content{
        margin-left:0;
        width:100%;
    }

    .dashboard-grid{
        grid-template-columns:1fr;
    }

    .analytics-grid{
        grid-template-columns:1fr;
    }

    .notes-grid{
        grid-template-columns:1fr;
    }
}
.delete-mood-btn{

    position:absolute;

    top:5px;

    right:5px;

    width:28px;

    height:28px;

    border:none;

    border-radius:50%;

    background:#ff4d6d;

    color:white;

    font-size:18px;

    cursor:pointer;

    z-index:100;

}
.weekly-stats{
    display:flex;
    gap:15px;
    margin-bottom:25px;
}

.mini-stat{
    flex:1;
    background:#08182f;
    padding:15px;
    border-radius:15px;
}

.mini-stat span{
    opacity:.7;
    font-size:13px;
}

.progress-track{
    width:100%;
    height:14px;
    background:#08182f;
    border-radius:999px;
    overflow:hidden;
}

.progress-fill{
    height:100%;
    background:var(--accent);
}

.progress-label{
    text-align:center;
    margin-top:15px;
}