/* ==========================================
   CONFIGURACIÓN GENERAL
========================================== */

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


body {

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    background-color: #f2f4f7;

    min-height: 100vh;

    padding: 30px;

    color: #222;
}



/* ==========================================
   CONTENEDOR PRINCIPAL
========================================== */

.contenedor {

    width: 100%;

    max-width: 1100px;

    margin: 0 auto;

    background-color: white;

    padding: 30px;

    border-radius: 15px;

    box-shadow:
        0 5px 25px
        rgba(0, 0, 0, 0.1);
}



/* ==========================================
   ENCABEZADO
========================================== */

.encabezado {

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 20px;

    margin-bottom: 25px;
}


.encabezado h1 {

    font-size: 32px;

    margin-bottom: 5px;
}


.encabezado p {

    color: #666;
}



/* ==========================================
   CUENTA
========================================== */

.cuenta {

    display: flex;

    align-items: center;

    gap: 10px;

    flex-wrap: wrap;
}


#estadoCuenta {

    color: #555;

    font-size: 14px;
}



/* ==========================================
   BOTONES
========================================== */

button {

    border: none;

    padding: 10px 18px;

    border-radius: 7px;

    cursor: pointer;

    background-color: #2563eb;

    color: white;

    font-size: 15px;

    transition: 0.2s;
}


button:hover {

    background-color: #1d4ed8;
}


.boton-secundario {

    background-color: #475569;
}


.boton-secundario:hover {

    background-color: #334155;
}


.boton-borrar {

    background-color: #dc2626;
}


.boton-borrar:hover {

    background-color: #b91c1c;
}



/* ==========================================
   BARRA DE HERRAMIENTAS
========================================== */

.barra-herramientas {

    display: flex;

    gap: 10px;

    margin-bottom: 20px;

    flex-wrap: wrap;
}



/* ==========================================
   ZONA PRINCIPAL
========================================== */

.zona-principal {

    display: grid;

    grid-template-columns:
        240px 1fr;

    gap: 20px;
}



/* ==========================================
   PANEL DE NOTAS
========================================== */

.panel-notas {

    border:
        1px solid #e5e7eb;

    border-radius: 10px;

    padding: 15px;

    background-color: #f8fafc;
}


.panel-notas h2 {

    font-size: 18px;

    margin-bottom: 15px;
}


.mensaje-notas {

    color: #777;

    font-size: 14px;

    line-height: 1.5;
}


#listaNotas {

    display: flex;

    flex-direction: column;

    gap: 8px;
}


.nota-lista {

    width: 100%;

    text-align: left;

    background-color: white;

    color: #222;

    border:
        1px solid #e5e7eb;

    overflow: hidden;

    white-space: nowrap;

    text-overflow: ellipsis;
}


.nota-lista:hover {

    background-color: #dbeafe;

    color: #1e3a8a;
}


.nota-lista.activa {

    background-color: #dbeafe;

    color: #1e3a8a;

    border-color: #93c5fd;
}



/* ==========================================
   EDITOR
========================================== */

.editor {

    min-width: 0;
}


#tituloNota {

    width: 100%;

    padding: 15px;

    margin-bottom: 15px;

    border:
        1px solid #ccc;

    border-radius: 8px;

    font-size: 20px;

    font-weight: bold;

    outline: none;
}


#tituloNota:focus {

    border-color: #2563eb;
}


#contenidoNota {

    width: 100%;

    min-height: 400px;

    padding: 20px;

    resize: vertical;

    border:
        1px solid #ccc;

    border-radius: 8px;

    font-size: 17px;

    line-height: 1.6;

    outline: none;
}


#contenidoNota:focus {

    border-color: #2563eb;
}



/* ==========================================
   INFORMACIÓN
========================================== */

.informacion {

    margin-top: 15px;

    display: flex;

    justify-content: space-between;

    gap: 15px;

    color: #777;

    font-size: 14px;
}



/* ==========================================
   MODAL LOGIN
========================================== */

.modal {

    position: fixed;

    inset: 0;

    background-color:
        rgba(0, 0, 0, 0.55);

    display: flex;

    justify-content: center;

    align-items: center;

    padding: 20px;

    z-index: 1000;
}


.modal-contenido {

    position: relative;

    width: 100%;

    max-width: 440px;

    background-color: white;

    padding: 30px;

    border-radius: 15px;

    box-shadow:
        0 15px 40px
        rgba(0, 0, 0, 0.25);
}


.modal-contenido h2 {

    margin-bottom: 20px;
}


.cerrar-modal {

    position: absolute;

    top: 12px;

    right: 12px;

    width: 38px;

    height: 38px;

    padding: 0;

    background-color: transparent;

    color: #555;

    font-size: 28px;
}


.cerrar-modal:hover {

    background-color: #eee;

    color: #222;
}



/* ==========================================
   TABS LOGIN / REGISTRO
========================================== */

.selector-auth {

    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 5px;

    margin-bottom: 20px;

    background-color: #f1f5f9;

    padding: 5px;

    border-radius: 9px;
}


.tab-auth {

    background-color: transparent;

    color: #475569;
}


.tab-auth:hover {

    background-color: #e2e8f0;

    color: #222;
}


.tab-auth.activo {

    background-color: #2563eb;

    color: white;
}



/* ==========================================
   FORMULARIOS
========================================== */

#loginForm,
#registroForm {

    display: flex;

    flex-direction: column;

    gap: 10px;
}


#loginForm label,
#registroForm label {

    font-size: 14px;

    font-weight: bold;

    margin-top: 5px;
}


#loginForm input,
#registroForm input {

    width: 100%;

    padding: 12px;

    border:
        1px solid #ccc;

    border-radius: 8px;

    font-size: 15px;

    outline: none;
}


#loginForm input:focus,
#registroForm input:focus {

    border-color: #2563eb;
}


#loginForm button,
#registroForm button {

    margin-top: 10px;
}


#mensajeAuth {

    min-height: 22px;

    margin-top: 15px;

    color: #555;

    font-size: 14px;

    text-align: center;
}



/* ==========================================
   PANEL ADMIN
========================================== */

.admin-panel {

    margin-top: 35px;

    padding-top: 25px;

    border-top:
        2px solid #e5e7eb;
}


.admin-encabezado {

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 20px;

    margin-bottom: 20px;
}


.admin-encabezado p {

    color: #666;

    margin-top: 5px;
}


#notasAdmin {

    display: grid;

    gap: 15px;
}


.admin-nota {

    padding: 18px;

    border:
        1px solid #e5e7eb;

    border-radius: 10px;

    background-color: #f8fafc;
}


.admin-nota h3 {

    margin-bottom: 4px;
}


.admin-email {

    color: #666;

    font-size: 13px;

    margin-bottom: 15px;
}


.admin-nota h4 {

    margin-bottom: 8px;
}


.admin-nota pre {

    white-space: pre-wrap;

    word-break: break-word;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    line-height: 1.5;

    margin-bottom: 12px;
}


.admin-fecha {

    color: #777;

    font-size: 12px;
}



/* ==========================================
   UTILIDAD
========================================== */

.oculto {

    display: none !important;
}



/* ==========================================
   CELULAR
========================================== */

@media (max-width: 750px) {

    body {

        padding: 10px;
    }


    .contenedor {

        padding: 20px;
    }


    .encabezado {

        flex-direction: column;

        align-items: flex-start;
    }


    .encabezado h1 {

        font-size: 26px;
    }


    .zona-principal {

        grid-template-columns: 1fr;
    }


    .panel-notas {

        max-height: 230px;

        overflow-y: auto;
    }


    .barra-herramientas button {

        flex: 1;
    }


    #contenidoNota {

        min-height: 350px;
    }


    .informacion {

        flex-direction: column;
    }


    .admin-encabezado {

        flex-direction: column;

        align-items: flex-start;
    }

}