/* =========================================================
   ALM LUNCH - ESTILOS GENERALES
   ========================================================= */


/* =========================================================
   RESET
   ========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    width: 100%;
    min-height: 100%;
}

body {
    width: 100%;
    min-height: 100vh;

    font-family: 'Poppins', Arial, sans-serif;

    background: #eef3fb;
    color: #23345f;

    display: flex;
    flex-direction: column;
}


/* =========================================================
   HEADER
   ========================================================= */

header {
    width: 100%;
    min-height: 90px;

    background: #213f91;
    border-bottom: 5px solid #8B1E3F;

    display: flex;
    align-items: center;

    padding: 15px 50px;

    flex-shrink: 0;
}

.logo {
    display: flex;
    align-items: center;

    color: #ffffff;
}

.icono {
    width: 55px;
    height: 55px;

    background: #3d5db4;

    border-radius: 15px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-right: 18px;

    font-size: 28px;

    flex-shrink: 0;
}

.logo-texto {
    display: flex;
    flex-direction: column;
}

.logo h2 {
    font-family: 'Merriweather', Georgia, serif;

    font-size: 32px;
    line-height: 1.1;

    margin: 0;
}

.logo p {
    font-size: 14px;

    margin-top: 5px;

    opacity: 0.9;

    line-height: 1.3;
}


/* =========================================================
   CONTENEDOR GENERAL
   ========================================================= */

.contenedor {
    width: 100%;

    flex: 1;

    padding: 40px 20px;
}


/* =========================================================
   INPUTS GENERALES
   ========================================================= */

.input {
    width: 100%;

    margin-bottom: 20px;

    text-align: left;
}

.input label {
    display: block;

    margin-bottom: 8px;

    font-weight: 600;

    color: #23345f;
}

.input input,
.input select,
.input textarea {
    width: 100%;

    padding: 13px 14px;

    border: 2px solid #d8dfef;

    border-radius: 12px;

    font-size: 15px;

    font-family: 'Poppins', Arial, sans-serif;

    outline: none;

    background: #ffffff;

    color: #23345f;
}

.input input:focus,
.input select:focus,
.input textarea:focus {
    border-color: #213f91;

    box-shadow:
        0 0 0 3px rgba(33, 63, 145, 0.10);
}

.input textarea {
    height: 100px;

    resize: vertical;
}


/* =========================================================
   DASHBOARD
   ========================================================= */

.dashboard {
    width: 100%;

    max-width: 1100px;

    margin: 0 auto;
}

.titulo {
    width: 100%;

    text-align: center;

    font-family: 'Merriweather', Georgia, serif;

    color: #15285c;

    margin: 0 0 30px;

    font-size: 38px;
}

.cards {
    width: 100%;

    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(220px, 1fr));

    gap: 25px;

    margin-bottom: 30px;
}

.card-dashboard {
    background: #ffffff;

    padding: 30px;

    border-radius: 18px;

    text-align: center;

    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.10);
}

.card-dashboard h3 {
    color: #213f91;

    margin-bottom: 15px;
}

.card-dashboard span {
    font-size: 35px;

    font-weight: bold;

    color: #8B1E3F;
}


/* =========================================================
   OPCIONES
   ========================================================= */

.opciones {
    width: 100%;

    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(250px, 1fr));

    gap: 25px;
}

.opcion {
    background: #ffffff;

    padding: 30px;

    border-radius: 20px;

    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.10);
}

.opcion h3 {
    color: #213f91;

    margin-bottom: 15px;
}

.opcion p {
    margin-bottom: 20px;

    color: #58657b;
}


/* =========================================================
   TABLAS GENERALES
   ========================================================= */

.tabla {
    width: 100%;

    background: #ffffff;

    padding: 30px;

    border-radius: 20px;

    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.10);

    overflow-x: auto;
}

.tabla h2 {
    color: #213f91;

    margin-bottom: 20px;
}

table {
    width: 100%;

    border-collapse: collapse;
}

thead {
    background: #213f91;

    color: #ffffff;
}

th,
td {
    padding: 15px;

    text-align: center;

    border-bottom: 1px solid #ddd;
}

tbody tr:hover {
    background: #f2f5fc;
}


/* =========================================================
   BADGES
   ========================================================= */

.badge {
    display: inline-block;

    padding: 7px 12px;

    border-radius: 20px;

    color: #ffffff;

    font-size: 13px;
}

.administrador {
    background: #213f91;
}

.empleado {
    background: #2878d8;
}

.estudiante {
    background: #8B1E3F;
}


/* =========================================================
   BOTONES DE TABLAS
   ========================================================= */

.btnEditar {
    border: none;

    background: #2878d8;

    color: #ffffff;

    padding: 8px 12px;

    border-radius: 8px;

    cursor: pointer;
}

.btnEditar:hover {
    background: #1d65b8;
}

.btnEliminar {
    border: none;

    background: #8B1E3F;

    color: #ffffff;

    padding: 8px 12px;

    border-radius: 8px;

    cursor: pointer;
}

.btnEliminar:hover {
    background: #6f1632;
}


/* =========================================================
   BUSCADOR
   ========================================================= */

.buscar {
    width: 100%;

    padding: 13px 14px;

    border: 2px solid #d8dfef;

    border-radius: 12px;

    font-family: 'Poppins', Arial, sans-serif;

    font-size: 15px;

    outline: none;

    background: #ffffff;
}

.buscar:focus {
    border-color: #213f91;

    box-shadow:
        0 0 0 3px rgba(33, 63, 145, 0.10);
}


/* =========================================================
   MENSAJES
   ========================================================= */

.correcto {
    color: green;

    margin-top: 15px;
}

.error {
    color: #8B1E3F;

    margin-top: 15px;
}

.advertencia {
    color: #c47b00;

    margin-top: 15px;
}


/* =========================================================
   FOOTER
   ========================================================= */

footer {
    width: 100%;

    min-height: 50px;

    background: #213f91;

    color: #ffffff;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 12px 20px;

    text-align: center;

    font-size: 14px;

    flex-shrink: 0;
}


/* =========================================================
   RESPONSIVE GENERAL
   ========================================================= */

@media (max-width: 700px) {

    header {
        min-height: 80px;

        padding: 14px 20px;
    }

    .logo h2 {
        font-size: 25px;
    }

    .logo p {
        font-size: 12px;
    }

    .icono {
        width: 48px;
        height: 48px;

        font-size: 23px;

        margin-right: 12px;
    }

    .contenedor {
        padding: 30px 15px;
    }

    footer {
        font-size: 12px;

        min-height: 50px;
    }
}


/* =========================================================
   PANTALLAS MUY PEQUEÑAS
   ========================================================= */

@media (max-width: 400px) {

    header {
        padding: 12px 15px;
    }

    .logo h2 {
        font-size: 22px;
    }

    .logo p {
        font-size: 11px;
    }

    .icono {
        width: 42px;
        height: 42px;

        font-size: 20px;

        margin-right: 10px;
    }

    .contenedor {
        padding: 20px 10px;
    }
}


/* =========================================================
   CRUD USUARIOS
   DISEÑO COMPACTO Y CENTRADO
   ========================================================= */


/* =========================================================
   CONTENIDO
   ========================================================= */

.dashboard {
    width: 100%;

    max-width: 1100px;

    margin: 0 auto;
}


/* =========================================================
   TITULO CRUD
   ========================================================= */

.dashboard .titulo {
    width: 100%;

    margin: 0 0 22px;

    text-align: center;

    font-size: 30px;
}


/* =========================================================
   TARJETA FORMULARIO
   ========================================================= */

.dashboard .card {
    width: 100%;

    max-width: 900px;

    margin: 0 auto 30px;

    padding: 25px;

    background: #ffffff;

    border-radius: 18px;

    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.08);
}


/* =========================================================
   TITULO FORMULARIO
   ========================================================= */

.dashboard .card h2 {
    width: 100%;

    margin: 0 0 20px;

    color: #213f91;

    font-size: 21px;

    text-align: center;
}


/* =========================================================
   FORMULARIO EN DOS COLUMNAS
   ========================================================= */

#formUsuario {
    width: 100%;

    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    column-gap: 20px;

    row-gap: 0;

    margin: 0 auto;
}


/* =========================================================
   CAMPOS
   ========================================================= */

#formUsuario .input {
    width: 100%;

    margin-bottom: 15px;

    text-align: left;
}


#formUsuario .input label {
    display: block;

    margin-bottom: 6px;

    color: #23345f;

    font-size: 13px;

    font-weight: 600;
}


#formUsuario .input input,
#formUsuario .input select {
    width: 100%;

    height: 42px;

    padding: 8px 11px;

    border: 1px solid #d8dfef;

    border-radius: 9px;

    background: #ffffff;

    color: #23345f;

    font-family:
        'Poppins',
        Arial,
        sans-serif;

    font-size: 14px;

    outline: none;

    box-sizing: border-box;
}


#formUsuario .input input:focus,
#formUsuario .input select:focus {
    border-color: #213f91;

    box-shadow:
        0 0 0 3px rgba(33, 63, 145, 0.10);
}


/* =========================================================
   GRADO
   ========================================================= */

#contenedorGrado {
    width: 100%;
}


/* =========================================================
   BOTON GUARDAR
   ========================================================= */

#formUsuario #btnGuardarUsuario {
    grid-column: 1 / -1;

    width: 200px;

    height: 44px;

    margin: 8px auto 0;

    padding: 0 18px;

    border: none;

    border-radius: 10px;

    background: #213f91;

    color: #ffffff;

    font-family:
        'Poppins',
        Arial,
        sans-serif;

    font-size: 14px;

    font-weight: 600;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}


#formUsuario #btnGuardarUsuario:hover {
    background: #162d6e;

    transform: translateY(-1px);
}


/* =========================================================
   MENSAJE
   ========================================================= */

#mensajeUsuario {
    width: 100%;

    margin-top: 18px;

    text-align: center;

    font-size: 14px;

    line-height: 1.4;
}


/* =========================================================
   FILTROS USUARIOS
   ========================================================= */

.filtros-usuarios {
    width: 100%;

    max-width: 850px;

    margin: 0 auto 20px;

    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        200px;

    gap: 12px;
}


.filtros-usuarios input,
.filtros-usuarios select {
    width: 100%;

    height: 40px;

    padding: 8px 12px;

    border: 1px solid #d8dfef;

    border-radius: 9px;

    background: #ffffff;

    color: #23345f;

    font-family:
        'Poppins',
        Arial,
        sans-serif;

    font-size: 14px;

    outline: none;
}


.filtros-usuarios input:focus,
.filtros-usuarios select:focus {
    border-color: #213f91;

    box-shadow:
        0 0 0 3px rgba(33, 63, 145, 0.10);
}


/* =========================================================
   TABLA USUARIOS
   ========================================================= */

.dashboard .tabla {
    width: 100%;

    max-width: 1100px;

    margin: 0 auto;

    padding: 22px;

    background: #ffffff;

    border-radius: 18px;

    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.08);
}


.dashboard .tabla h2 {
    width: 100%;

    margin: 0 0 18px;

    color: #213f91;

    font-size: 21px;

    text-align: center;
}


/* =========================================================
   SCROLL DE TABLA
   ========================================================= */

.tabla-scroll {
    width: 100%;

    max-width: 100%;

    overflow-x: auto;

    overflow-y: hidden;

    border-radius: 10px;
}


/* =========================================================
   TABLA CRUD
   ========================================================= */

.tabla-scroll table {
    width: 100%;

    min-width: 0;

    border-collapse: collapse;

    table-layout: auto;

    font-size: 12px;
}


.tabla-scroll th {
    padding: 9px 6px;

    background: #213f91;

    color: #ffffff;

    font-size: 11px;

    font-weight: 600;

    text-align: center;

    white-space: nowrap;
}


.tabla-scroll td {
    padding: 8px 6px;

    color: #23345f;

    font-size: 11px;

    text-align: center;

    border-bottom: 1px solid #e2e6ee;

    white-space: nowrap;
}


.tabla-scroll tbody tr:hover {
    background: #f2f5fc;
}


/* =========================================================
   BOTONES DE ACCIONES CRUD
   ========================================================= */

.tabla-scroll .btnEditar,
.tabla-scroll .btnEliminar {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-width: 65px;

    height: 30px;

    margin: 2px;

    padding: 4px 8px;

    border: none;

    border-radius: 7px;

    color: #ffffff;

    font-family:
        'Poppins',
        Arial,
        sans-serif;

    font-size: 11px;

    font-weight: 600;

    cursor: pointer;

    text-decoration: none;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}


/* EDITAR */

.tabla-scroll .btnEditar {
    background: #2878d8;
}


.tabla-scroll .btnEditar:hover {
    background: #1d65b8;

    transform: translateY(-1px);
}


/* ELIMINAR */

.tabla-scroll .btnEliminar {
    background: #8B1E3F;
}


.tabla-scroll .btnEliminar:hover {
    background: #6f1632;

    transform: translateY(-1px);
}


/* =========================================================
   BADGES CRUD
   ========================================================= */

.tabla-scroll .badge {
    padding: 5px 8px;

    font-size: 10px;
}


/* =========================================================
   RESPONSIVE CRUD
   ========================================================= */

@media (max-width: 800px) {

    .dashboard {
        width: 100%;
    }


    .dashboard .titulo {
        font-size: 26px;
    }


    .dashboard .card {
        max-width: 100%;

        padding: 20px;
    }


    #formUsuario {
        grid-template-columns: 1fr;
    }


    #formUsuario #btnGuardarUsuario {
        grid-column: auto;

        width: 100%;

        max-width: 250px;
    }


    .dashboard .tabla {
        max-width: 100%;

        padding: 18px;
    }


    .filtros-usuarios {
        grid-template-columns: 1fr;
    }


    .tabla-scroll table {
        min-width: 950px;
    }

}


/* =========================================================
   CELULARES
   ========================================================= */

@media (max-width: 500px) {

    .dashboard .titulo {
        font-size: 23px;

        margin-bottom: 18px;
    }


    .dashboard .card {
        padding: 16px;
    }


    .dashboard .card h2 {
        font-size: 19px;
    }


    .dashboard .tabla {
        padding: 14px;
    }


    .dashboard .tabla h2 {
        font-size: 19px;
    }


    #formUsuario .input input,
    #formUsuario .input select {
        height: 40px;

        font-size: 13px;
    }


    .tabla-scroll table {
        min-width: 900px;
    }


    .tabla-scroll th {
        font-size: 10px;

        padding: 8px 5px;
    }


    .tabla-scroll td {
        font-size: 10px;

        padding: 7px 5px;
    }

}
/* =========================================================
   BOTONES DEL PANEL ADMINISTRATIVO
   ========================================================= */

.opcion button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 90px;
    height: 34px;

    padding: 0;

    border: none;
    border-radius: 8px;

    background: #213f91;
    color: #ffffff;

    font-family: 'Poppins', Arial, sans-serif;
    font-size: 13px;
    font-weight: 600;

    cursor: pointer;

    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.opcion button:hover {
    background: #162d6e;

    transform: translateY(-2px);

    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.18);
}

.opcion button:active {
    transform: translateY(0);

    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.12);
}