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

body{
    font-family:Inter,Arial,sans-serif;
    background:#fff;
    color:#111;
    min-height:100vh;
}

.app{
    display:flex;
    min-height:100vh;
}

/* SIDEBAR */

.sidebar{
    width:285px;
    min-height:100vh;
    border-right:1px solid #ededed;
    padding:35px 22px 25px;
    display:flex;
    flex-direction:column;
    background:#fff;
}

.brand{
    display:flex;
    align-items:center;
    gap:14px;
    padding:5px 12px 70px;
}

.brand-icon{
    width:38px;
    height:38px;
    border:1.5px solid #111;
    border-radius:8px;
    display:grid;
    place-items:center;
    font-size:19px;
}

.brand h2{
    font-size:23px;
    letter-spacing:-.5px;
}

.brand span{
    display:block;
    color:#777;
    font-size:12px;
    margin-top:7px;
}

.nav{
    display:flex;
    align-items:center;
    gap:17px;
    padding:15px 18px;
    margin-bottom:8px;
    border-radius:12px;
    text-decoration:none;
    color:#171717;
    font-size:14px;
}

.nav.active{
    background:#f2f2f2;
    font-weight:700;
}

.nav i{
    width:18px;
    font-size:17px;
}

.nav b{
    margin-left:auto;
    background:#f2f2f2;
    min-width:29px;
    height:29px;
    border-radius:50%;
    display:grid;
    place-items:center;
    color:#333;
    font-size:12px;
}

.nav.active b{
    background:#fff;
}

.sidebar-bottom{
    margin-top:auto;
}

.private-box{
    display:flex;
    gap:14px;
    padding:20px;
    background:#fafafa;
    border-radius:12px;
    margin-bottom:55px;
}

.private-box i{
    font-size:19px;
}

.private-box strong{
    display:block;
    font-size:13px;
}

.private-box span{
    display:block;
    color:#777;
    font-size:11px;
    line-height:1.7;
    margin-top:7px;
}

.logout{
    display:flex;
    align-items:center;
    gap:13px;
    color:#ef3e32;
    text-decoration:none;
    padding:15px 17px;
    background:#fffafa;
    border-radius:11px;
    font-size:13px;
}

/* MAIN */

.main{
    flex:1;
    padding:40px 38px 25px;
    min-width:0;
}

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

.greeting{
    color:#111;
    font-size:16px;
    margin-bottom:7px;
}

.header h1{
    font-size:31px;
    letter-spacing:-1px;
}

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

.icon-button{
    width:48px;
    height:48px;
    border-radius:50%;
    background:#fff;
    border:1px solid #e8e8e8;
    cursor:pointer;
}

.profile{
    display:flex;
    align-items:center;
    gap:10px;
    padding:5px 8px;
    font-size:14px;
}

.profile .avatar{
    width:42px;
    height:42px;
    background:#111;
    color:#fff;
    border-radius:50%;
    display:grid;
    place-items:center;
}

.profile i{
    font-size:10px;
    margin-left:4px;
}

.toolbar{
    display:flex;
    align-items:center;
    gap:18px;
    margin-bottom:28px;
}

.search{
    width:380px;
    height:51px;
    border:1px solid #e4e4e4;
    border-radius:11px;
    display:flex;
    align-items:center;
    gap:12px;
    padding:0 17px;
}

.search i{
    color:#777;
}

.search input{
    width:100%;
    border:0;
    outline:0;
    font-size:14px;
}

.filters{
    display:flex;
    gap:8px;
}

.filter{
    text-decoration:none;
    color:#111;
    border:1px solid #dedede;
    background:#fff;
    border-radius:10px;
    padding:12px 22px;
    font-size:13px;
    font-weight:600;
}

.filter.active{
    background:#111;
    color:#fff;
    border-color:#111;
}

.new-note{
    margin-left:auto;
    background:#111;
    color:#fff;
    border:0;
    border-radius:10px;
    padding:14px 22px;
    font-size:13px;
    font-weight:600;
    cursor:pointer;
}

/* NOTES GRID */

.notes-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(220px,1fr));
    gap:20px;
}

.note-card{
    min-height:235px;
    background:#fff;
    border:1px solid #e8e8e8;
    border-radius:14px;
    padding:22px 25px;
    cursor:pointer;
    box-shadow:0 5px 20px rgba(0,0,0,.035);
    transition:.18s;
}

.note-card:hover{
    transform:translateY(-3px);
    border-color:#d3d3d3;
    box-shadow:0 12px 30px rgba(0,0,0,.08);
}

.note-card.selected{
    border-color:#111;
}

.note-card-top{
    display:flex;
    justify-content:space-between;
    align-items:center;
    height:22px;
}

.note-card-top i{
    font-size:14px;
}

.more{
    font-size:23px;
    line-height:10px;
}

.note-card h3{
    font-size:19px;
    margin-top:31px;
    letter-spacing:-.3px;
}

.note-card p{
    font-size:14px;
    line-height:1.65;
    color:#222;
    margin-top:15px;
    min-height:65px;
}

.note-date{
    color:#666;
    font-size:11px;
    display:flex;
    gap:8px;
    margin-top:35px;
}

.empty-state{
    grid-column:1/-1;
    text-align:center;
    padding:80px 20px;
}

.empty-state i{
    font-size:40px;
    margin-bottom:15px;
}

.empty-state h3{
    font-size:18px;
}

.empty-state p{
    color:#777;
    font-size:12px;
    margin:8px 0 20px;
}

footer{
    text-align:center;
    color:#555;
    font-size:11px;
    margin-top:42px;
}

/* FULL SCREEN NOTE */

.note-overlay{
    position:fixed;
    inset:0;
    z-index:100;
    background:#fff;
    overflow:auto;
}

.full-note{
    max-width:1000px;
    min-height:100vh;
    margin:auto;
    padding:35px 45px;
}

.full-note-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding-bottom:25px;
    border-bottom:1px solid #ededed;
}

.back{
    border:0;
    background:#fff;
    display:flex;
    align-items:center;
    gap:10px;
    cursor:pointer;
    font-size:14px;
}

.note-actions{
    display:flex;
    gap:9px;
}

.note-actions button{
    width:42px;
    height:42px;
    border-radius:50%;
    border:1px solid #e3e3e3;
    background:#fff;
    cursor:pointer;
}

.note-actions .delete{
    color:#e22;
}

.full-note-content{
    padding:65px 30px;
}

.full-note-content h1{
    font-size:42px;
    letter-spacing:-1.5px;
}

.full-date{
    display:flex;
    align-items:center;
    gap:9px;
    color:#777;
    font-size:12px;
    margin-top:13px;
}

.separator{
    height:1px;
    background:#e7e7e7;
    margin:30px 0;
}

.full-text{
    font-size:18px;
    line-height:2;
    min-height:400px;
    white-space:normal;
}

.full-bottom{
    display:flex;
    justify-content:space-between;
    border-top:1px solid #eee;
    padding-top:18px;
    color:#888;
    font-size:11px;
}

.important{
    color:#b27c00;
}

/* MODAL */

.modal{
    display:none;
    position:fixed;
    inset:0;
    z-index:200;
    background:rgba(0,0,0,.55);
    align-items:center;
    justify-content:center;
    padding:20px;
}

.modal.show{
    display:flex;
}

.modal-box{
    width:100%;
    max-width:560px;
    background:#fff;
    border-radius:17px;
    padding:30px;
}

.modal-head{
    display:flex;
    justify-content:space-between;
    margin-bottom:22px;
}

.modal-head h2{
    font-size:21px;
}

.modal-head p{
    color:#777;
    font-size:11px;
    margin-top:5px;
}

.modal-head button{
    border:0;
    background:#f4f4f4;
    width:34px;
    height:34px;
    border-radius:8px;
    font-size:20px;
    cursor:pointer;
}

.modal-box label{
    display:block;
    font-size:12px;
    font-weight:600;
    margin:14px 0 7px;
}

.modal-box input[type="text"],
.modal-box textarea{
    width:100%;
    border:1px solid #ddd;
    border-radius:9px;
    padding:12px;
    outline:0;
    font:inherit;
    font-size:13px;
}

.modal-box textarea{
    resize:vertical;
}

.important-check{
    display:flex!important;
    align-items:center;
    gap:8px;
}

.modal-actions{
    display:flex;
    justify-content:flex-end;
    gap:9px;
    margin-top:22px;
}

.cancel{
    border:1px solid #ddd;
    background:#fff;
    padding:11px 17px;
    border-radius:9px;
}

.save{
    border:0;
    background:#111;
    color:#fff;
    padding:11px 19px;
    border-radius:9px;
}

/* LOGIN */

.login-page{
    display:grid;
    place-items:center;
    background:#fafafa;
}

.login-box{
    width:380px;
    background:#fff;
    border:1px solid #e8e8e8;
    border-radius:18px;
    padding:40px;
    box-shadow:0 20px 50px rgba(0,0,0,.06);
}

.login-icon{
    width:55px;
    height:55px;
    border:1px solid #111;
    border-radius:14px;
    display:grid;
    place-items:center;
    margin:auto;
    font-size:24px;
}

.login-box h1{
    text-align:center;
    margin-top:16px;
}

.login-box p{
    text-align:center;
    color:#777;
    font-size:12px;
    margin:6px 0 25px;
}

.login-box label{
    display:block;
    font-size:12px;
    font-weight:600;
    margin:14px 0 6px;
}

.login-box input{
    width:100%;
    border:1px solid #ddd;
    border-radius:9px;
    padding:12px;
    outline:0;
}

.login-button{
    width:100%;
    border:0;
    background:#111;
    color:#fff;
    padding:13px;
    border-radius:9px;
    margin-top:20px;
}

.error{
    background:#fff0f0;
    color:#d33;
    padding:10px;
    border-radius:8px;
    font-size:12px;
}

/* DARK MODE */

body.dark{
    background:#111;
    color:#eee;
}

.dark .sidebar,
.dark .main,
.dark .note-card,
.dark .icon-button,
.dark .search,
.dark .filter,
.dark .note-overlay,
.dark .full-note,
.dark .back,
.dark .note-actions button,
.dark .modal-box{
    background:#171717;
    color:#eee;
    border-color:#303030;
}

.dark .note-card p,
.dark .note-date,
.dark .full-date,
.dark .full-bottom,
.dark footer,
.dark .brand span,
.dark .private-box span{
    color:#aaa;
}

.dark .new-note,
.dark .filter.active{
    background:#fff;
    color:#111;
}

.dark .separator{
    background:#303030;
}

/* RESPONSIVE */

@media(max-width:1100px){

    .sidebar{
        width:220px;
    }

    .notes-grid{
        grid-template-columns:repeat(2,minmax(220px,1fr));
    }

}

@media(max-width:760px){

    .sidebar{
        width:70px;
        padding:25px 9px;
    }

    .brand{
        justify-content:center;
        padding:5px 0 45px;
    }

    .brand > div:last-child,
    .nav span,
    .nav b,
    .private-box div,
    .logout{
        display:none;
    }

    .nav{
        justify-content:center;
        padding:14px 5px;
    }

    .private-box{
        justify-content:center;
        padding:15px 5px;
    }

    .main{
        padding:24px 15px;
    }

    .header{
        align-items:flex-start;
    }

    .header h1{
        font-size:25px;
    }

    .header-right .profile,
    .header-right .icon-button:first-child{
        display:none;
    }

    .toolbar{
        flex-wrap:wrap;
    }

    .search{
        width:100%;
        max-width:none;
        flex:100%;
    }

    .new-note{
        margin-left:auto;
    }

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

    .note-card{
        min-height:210px;
    }

    /* MOBILE FULL SCREEN */

    body.note-open .sidebar,
    body.note-open .main{
        display:none;
    }

    body.note-open{
        overflow:hidden;
    }

    .note-overlay{
        display:block;
    }

    .full-note{
        width:100%;
        padding:18px;
    }

    .full-note-header{
        padding-bottom:18px;
    }

    .back span{
        display:none;
    }

    .full-note-content{
        padding:40px 8px;
    }

    .full-note-content h1{
        font-size:32px;
    }

    .full-text{
        font-size:16px;
        line-height:1.9;
        min-height:55vh;
    }

    .full-bottom{
        flex-direction:column;
        gap:10px;
    }

}
