/* =========================
   NOTES
========================= */

.hidden {
    display: none !important;
}


/* =========================
   LOGIN
========================= */

.notes-login {
    min-height:
        calc(
            100vh - 90px
        );

    display: flex;

    align-items: center;

    justify-content: center;

    padding:
        60px
        0;
}


.login-panel {
    width: min(
        520px,
        100%
    );

    padding: 45px;

    border:
        1px solid
        var(--border);

    background:
        rgba(2, 17, 9, 0.9);

    box-shadow:
        0 0 40px
        rgba(0, 255, 102, 0.08);
}


.login-status {
    margin-bottom: 25px;

    color: var(--green);

    font-size: 0.65rem;

    letter-spacing: 3px;
}


.login-panel h1 {
    margin: 0;

    color: white;

    font-size:
        clamp(
            2.7rem,
            8vw,
            4.8rem
        );

    line-height: 0.9;

    letter-spacing: -3px;
}


.login-panel h1 span {
    display: block;

    color: var(--green);

    text-shadow:
        0 0 15px
        rgba(0, 255, 102, 0.35);
}


.login-description {
    margin:
        25px
        0
        35px;

    color: #8fa598;
}


#loginForm {
    display: flex;

    flex-direction: column;

    gap: 12px;
}


#loginForm label {
    color: var(--green-muted);

    font-size: 0.65rem;

    letter-spacing: 2px;

    margin-top: 10px;
}


#loginForm input,
.notes-search input {
    width: 100%;

    padding:
        14px
        15px;

    border:
        1px solid
        var(--border);

    outline: none;

    background:
        rgba(0, 0, 0, 0.6);

    color: var(--green-soft);

    font-family: inherit;
}


#loginForm input:focus,
.notes-search input:focus {
    border-color:
        var(--green);

    box-shadow:
        0 0 10px
        rgba(0, 255, 102, 0.1);
}


.system-message {
    min-height: 20px;

    margin-top: 18px;

    color: #ff6868;

    font-size: 0.7rem;

    letter-spacing: 1px;
}


/* =========================
   BUTTONS
========================= */

.notes-button {
    padding:
        12px
        18px;

    border:
        1px solid
        var(--border);

    background:
        transparent;

    color: var(--green);

    cursor: pointer;

    font-family: inherit;

    font-size: 0.65rem;

    letter-spacing: 2px;

    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}


.notes-button:hover {
    border-color:
        var(--green);

    background:
        rgba(0, 255, 102, 0.07);
}


.notes-button.primary {
    background:
        var(--green);

    color: black;

    border-color:
        var(--green);
}


.notes-button.primary:hover {
    background:
        var(--green-bright);
}


.notes-button.danger {
    color: #ff6262;

    border-color:
        rgba(255, 80, 80, 0.35);
}


.notes-button.danger:hover {
    border-color:
        #ff6262;

    background:
        rgba(255, 80, 80, 0.08);
}


.notes-button.full {
    width: 100%;
}


/* =========================
   APP
========================= */

.notes-app {
    min-height:
        calc(
            100vh - 90px
        );

    display: grid;

    grid-template-columns:
        310px
        minmax(0, 1fr);

    border-left:
        1px solid
        rgba(0, 255, 102, 0.12);

    border-right:
        1px solid
        rgba(0, 255, 102, 0.12);
}


/* =========================
   SIDEBAR
========================= */

.notes-sidebar {
    padding: 25px;

    border-right:
        1px solid
        var(--border);

    background:
        rgba(2, 17, 9, 0.83);
}


.notes-sidebar-header p {
    margin: 0;

    color: var(--green-muted);

    font-size: 0.6rem;

    letter-spacing: 2px;
}


.notes-sidebar-header h2 {
    margin:
        5px
        0
        25px;

    color: white;

    letter-spacing: 3px;
}


.notes-search {
    margin:
        18px
        0;
}


.notes-search input {
    font-size: 0.7rem;

    letter-spacing: 1px;
}


.notes-list {
    display: flex;

    flex-direction: column;

    gap: 8px;

    max-height:
        calc(
            100vh - 300px
        );

    overflow-y: auto;
}


.note-list-item {
    width: 100%;

    padding:
        14px;

    border:
        1px solid
        rgba(0, 255, 102, 0.1);

    background:
        rgba(0, 255, 102, 0.015);

    cursor: pointer;

    text-align: left;

    font-family: inherit;
}


.note-list-item:hover,
.note-list-item.active {
    border-color:
        var(--green);

    background:
        rgba(0, 255, 102, 0.06);
}


.note-list-title {
    color: var(--green-soft);

    font-size: 0.75rem;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


.note-list-date {
    margin-top: 7px;

    color: var(--green-muted);

    font-size: 0.55rem;

    letter-spacing: 1px;
}


/* =========================
   EDITOR
========================= */

.notes-editor {
    min-width: 0;

    background:
        rgba(0, 5, 3, 0.82);
}


.empty-editor {
    height: 100%;

    min-height: 600px;

    display: flex;

    justify-content: center;

    align-items: center;

    color: var(--green-muted);

    letter-spacing: 3px;
}


.editor-content {
    min-height:
        calc(
            100vh - 90px
        );

    display: flex;

    flex-direction: column;

    padding: 35px;
}


.editor-topbar {
    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 20px;

    padding-bottom: 25px;

    border-bottom:
        1px solid
        rgba(0, 255, 102, 0.12);
}


.editor-label {
    color: var(--green-muted);

    font-size: 0.6rem;

    letter-spacing: 2px;
}


.save-status {
    margin-left: 15px;

    color: var(--green);

    font-size: 0.6rem;

    letter-spacing: 2px;
}


.editor-actions {
    display: flex;

    gap: 10px;
}


.note-title {
    width: 100%;

    margin-top: 35px;

    padding: 0;

    border: none;

    outline: none;

    background: transparent;

    color: white;

    font-family: inherit;

    font-size:
        clamp(
            2rem,
            5vw,
            4rem
        );

    font-weight: bold;

    letter-spacing: -2px;
}


.note-content {
    width: 100%;

    flex: 1;

    min-height: 500px;

    margin-top: 25px;

    padding: 0;

    resize: none;

    border: none;

    outline: none;

    background: transparent;

    color: #afd0bb;

    font-family: inherit;

    font-size: 1rem;

    line-height: 1.8;
}


.note-content::placeholder,
.note-title::placeholder {
    color:
        rgba(85, 133, 101, 0.5);
}


.editor-footer {
    display: flex;

    justify-content: space-between;

    gap: 20px;

    padding-top: 20px;

    border-top:
        1px solid
        rgba(0, 255, 102, 0.12);

    color: var(--green-muted);

    font-size: 0.55rem;

    letter-spacing: 1px;
}


/* =========================
   MOBILE
========================= */

@media (
    max-width: 800px
) {

    .notes-app {
        grid-template-columns:
            1fr;
    }


    .notes-sidebar {
        border-right: none;

        border-bottom:
            1px solid
            var(--border);
    }


    .notes-list {
        max-height: 220px;
    }


    .editor-content {
        padding: 22px;

        min-height: 700px;
    }

}


@media (
    max-width: 500px
) {

    .login-panel {
        padding: 28px;
    }


    .editor-topbar {
        align-items: flex-start;

        flex-direction: column;
    }


    .editor-footer {
        flex-direction: column;
    }

}