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

* {
    box-sizing: border-box;
}

html {
    width: 100%;
    min-height: 100%;
    margin: 0;
}

body {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    overflow-x: clip;
    font-family: Arial, sans-serif;
}

/* ==============================
   BARRA SUPERIOR
============================== */

.barra-arriba {
    width: 100%;
    height: 120px;
    background-color: #182A41;

    position: fixed;
    top: 0;
    left: 0;

    z-index: 1000;
}

/* ==============================
   TÍTULO PRINCIPAL
============================== */

.titulo {
    position: relative;

    margin: 0;
    padding: 145px 20px 0;

    text-align: center;
    font-size: 36px;
    color: #000000;
    font-family: Arial, sans-serif;

    overflow-wrap: anywhere;
}

.subtitulo {
    position: relative;

    margin: 20px 0;
    padding: 0 20px;

    text-align: center;
    font-size: 24px;
    color: #000000;
    font-family: Arial, sans-serif;
}

/* ==============================
   FECHA
============================== */

#fecha {
    position: fixed;
    top: 145px;
    right: 30px;

    margin: 0;

    font-size: 20px;
    color: #000000;
    font-family: Arial, sans-serif;
}

/* ==============================
   BOTÓN DE CUENTA
============================== */

.boton-imagen {
    width: 80px;
    height: 90px;

    position: fixed;
    top: 15px;
    right: 20px;

    cursor: pointer;
    border: none;
    background: transparent;
    padding: 0;

    z-index: 1001;
}

.boton-imagen img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;
}

/* ==============================
   MENÚ DE CUENTA
============================== */

.cuadrado-cuenta {
    display: none;

    position: fixed;
    top: 120px;
    right: 20px;

    width: 200px;
    max-width: calc(100vw - 40px);
    min-height: 150px;

    padding: 15px;

    background-color: #0E0E0E;
    border: 2px solid #FF8500;
    border-radius: 8px;

    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);

    z-index: 2000;
    font-family: Arial, sans-serif;
}

.cuadrado-cuenta.mostrar {
    display: block;
}

#nombre-usuario {
    color: #FF8500;
    font-size: 22px;
    text-align: center;
    display: block;
    margin-top: 10px;

    overflow-wrap: anywhere;
}

.cerrar-sesion {
    color: #FF8500;
    cursor: pointer;

    margin-top: 20px;

    display: block;
    text-align: center;

    font-size: 18px;
}

/* ==============================
   TARJETAS DEL PANEL
============================== */

.contenedor-tarjetas {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 20px;

    width: calc(100% - 80px);
    max-width: 100%;

    margin: 40px auto 0;
}

/* Tarjeta de viajes */

.tarjeta-viajes {
    flex: 0 1 343px;
    width: 343px;
    max-width: 100%;
    min-width: 0;
    height: 149px;

    background-color: #F0F7FF;
    border: 1px solid #BBD7FF;
    border-radius: 8px;

    display: flex;
    align-items: center;
    gap: 20px;

    padding: 18px;

    font-family: Arial, sans-serif;
}

/* Tarjeta de usuarios */

.tarjeta-usuarios {
    flex: 0 1 343px;
    width: 343px;
    max-width: 100%;
    min-width: 0;
    height: 149px;

    background-color: #F0FAF7;
    border: 1px solid #B4E8D9;
    border-radius: 8px;

    display: flex;
    align-items: center;
    gap: 20px;

    padding: 18px;

    font-family: Arial, sans-serif;
}

/* Iconos circulares */

.icono-viajes,
.icono-usuarios {
    width: 58px;
    height: 58px;

    flex: 0 0 58px;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 28px;
}

.icono-viajes {
    background-color: #2878F0;
    color: white;
}

.icono-usuarios {
    background-color: #10B981;
    color: white;
}

/* Información de las tarjetas */

.informacion-viajes,
.informacion-usuarios {
    min-width: 0;
    overflow-wrap: anywhere;
}

.numero-viajes,
.registro-usuarios {
    font-size: 34px;
    font-weight: bold;
    color: #102447;
    margin: 0;
}

.informacion-viajes h2,
.informacion-usuarios h3 {
    font-size: 14px;
    color: #102447;
    margin: 0 0 12px;
    overflow-wrap: anywhere;
}

/* ==============================
   ADMINISTRAR VIAJES
============================== */

 
/* Botones */

#btnMostrarFormulario,
#formNuevoViaje button[type="submit"] {
    display: inline-block;

    max-width: 100%;
    padding: 12px 20px;

    background: #FF8500;
    color: #FFFFFF;

    border: none;
    border-radius: 6px;

    cursor: pointer;

    font-size: 16px;
    font-family: Arial, sans-serif;

    overflow-wrap: anywhere;
}

#btnMostrarFormulario:hover,
#formNuevoViaje button[type="submit"]:hover {
    background: #E87500;
}

/* Formulario */

#formNuevoViaje {
    width: 100%;
    max-width: 100%;
    min-width: 0;

    margin-top: 25px;
}

#formNuevoViaje[hidden] {
    display: none;
}

#formNuevoViaje label {
    display: block;

    margin-top: 16px;
    margin-bottom: 6px;

    font-weight: bold;
    overflow-wrap: anywhere;
}

#formNuevoViaje input,
#formNuevoViaje select,
#formNuevoViaje textarea {
    display: block;

    width: 100%;
    max-width: 100%;
    min-width: 0;

    padding: 10px;

    border: 1px solid #CCCCCC;
    border-radius: 6px;

    font-family: Arial, sans-serif;
    font-size: 16px;
}

#formNuevoViaje textarea {
    resize: vertical;
}

#formNuevoViaje input[type="file"] {
    font-size: 14px;
    padding: 8px;
}

#formNuevoViaje button[type="submit"] {
    margin-top: 20px;
}

#mensajeViaje {
    overflow-wrap: anywhere;
}

/* ==============================
   ADAPTACIÓN A PANTALLAS PEQUEÑAS
============================== */

@media (max-width: 768px) {

    .titulo {
        font-size: 28px;
        padding-top: 145px;
    }

    .subtitulo {
        font-size: 21px;
    }

    #fecha {
        position: relative;
        top: auto;
        right: auto;

        margin: 20px;
        text-align: right;

        font-size: 16px;
    }

    .contenedor-tarjetas {
        width: calc(100% - 32px);
        gap: 15px;
        margin-top: 30px;
    }

    .tarjeta-viajes,
    .tarjeta-usuarios {
        flex: 1 1 280px;
        width: 100%;
    }

    .administrar-viajes {
        width: calc(100% - 32px);
        margin: 30px auto;
        padding: 20px;
    }
}

@media (max-width: 400px) {

    .titulo {
        font-size: 24px;
    }

    .tarjeta-viajes,
    .tarjeta-usuarios {
        gap: 12px;
        padding: 12px;
    }

    .icono-viajes,
    .icono-usuarios {
        width: 48px;
        height: 48px;
        flex-basis: 48px;
        font-size: 23px;
    }

    .numero-viajes,
    .registro-usuarios {
        font-size: 28px;
    }

    .administrar-viajes {
        padding: 15px;
    }
}
#targeta-eliminarviajes {
    width: calc(100% - 80px);
    max-width: 600px;
    min-width: 0;

    margin: 30px auto;
    padding: 25px;

    position: relative;
    top: -90px;

    background: #FFD9D9;
    border-radius: 12px;
    border: 1px solid #ff7663;

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
     
    overflow-wrap: anywhere;
    box-sizing: border-box;
}

/* Contenedor de las tarjetas de gestión */
 
.contenedor-gestion-viajes {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 25px;

    width: calc(100% - 80px);
    max-width: 1250px;

    margin: 35px 0 50px 20px;
}


/* Tarjeta Administrar viajes */
.administrar-viajes {
    flex: 1 1 400px;
    width: 100%;
    max-width: 600px;
    min-width: 0;

    margin: 0;
    padding: 25px;

    position: static;

    background: #FFE9D6;
    border: 1px solid #FCBF89;
    border-radius: 12px;

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);

    overflow-wrap: anywhere;
}

/* Tarjeta Eliminar viajes */
#targeta-eliminarviajes {
    flex: 1 1 400px;
    width: 100%;
    max-width: 600px;
    min-width: 0;

    margin: 0;
    padding: 25px;

    position: static;

    background: #FFD9D9;
    border: 1px solid #FF7663;
    border-radius: 12px;

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);

    overflow-wrap: anywhere;
    box-sizing: border-box;
}

.administrar-viajes h2,
#targeta-eliminarviajes h2 {
    margin: 0 0 20px;
    font-size: 24px;
}

/* Botón para mostrar los viajes */
#btnMostrarEliminarViajes {
    max-width: 100%;
    padding: 12px 20px;

    background: #DC2626;
    color: white;

    border: none;
    border-radius: 6px;

    cursor: pointer;
    font-size: 16px;
}

#btnMostrarEliminarViajes:hover {
    background: #B91C1C;
}

/* Adaptación a celulares */
@media (max-width: 768px) {
    .contenedor-gestion-viajes {
        width: calc(100% - 32px);
        gap: 30px;
        margin: 30px auto;
    }

    .administrar-viajes,
    #targeta-eliminarviajes {
        flex: 1 1 100%;
        width: 100%;
        max-width: none;
        padding: 20px;
    }
}

/* ==============================
   CONSULTAS RECIBIDAS
============================== */

.seccion-consultas {
    width: calc(100% - 80px);
    max-width: 1250px;
    margin: 40px 0 50px 20px;
    padding: 25px;

    background: #F4F7FB;
    border: 1px solid #D5DFEB;
    border-radius: 12px;

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);

    color: #182A41;
}

.seccion-consultas h2 {
    margin: 0 0 20px;
    color: #182A41;
    font-size: 26px;
}

#total-consultas {
    margin: 0 0 20px;
    color: #526174;
    font-size: 15px;
}

/* Tabla */

.seccion-consultas {
    margin: 30px;
    color: #fff;
}

 .tabla-consultas {
    width: 100%;
    overflow-x: auto;
    margin-top: 20px;
}

.tabla-consultas table {
    width: 100%;
    border-collapse: collapse;
    background-color: #182A41;
    color: white;
}

.tabla-consultas th,
.tabla-consultas td {
    padding: 12px;
    text-align: left;
    border: 1px solid #35465e;
    vertical-align: top;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.tabla-consultas th {
    background-color: #0E0E0E;
    color: white;
}

.tabla-consultas td {
    color: white;
}

.btn-eliminar-consulta {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
}

.fila-eliminar-viaje {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 12px;
    margin-bottom: 10px;
    background-color: #182A41;
    color: white;
    border-radius: 8px;
}

.btn-eliminar-viaje {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 9px 12px;
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
}

.btn-eliminar-viaje:hover {
    background-color: #b02a37;
}


/* =========================================
   CORRECCIONES RESPONSIVE - PANEL ADMIN
========================================= */

/* Evitar desbordamientos */
html,
body {
    width: 100%;
    max-width: 100%;
}

body {
    overflow-x: hidden;
}

img,
input,
select,
textarea,
button {
    max-width: 100%;
}

/* =========================================
   TABLETS Y CELULARES
========================================= */

@media (max-width: 768px) {

    /* TÍTULOS */
    .titulo {
        font-size: 28px;
        padding: 145px 15px 0;
        overflow-wrap: anywhere;
    }

    .subtitulo {
        font-size: 20px;
        padding: 0 15px;
    }

    /* FECHA */
    #fecha {
        position: relative;
        top: auto;
        right: auto;
        margin: 20px 16px;
        text-align: center;
        font-size: 15px;
    }

    /* BOTÓN DE CUENTA */
    .boton-imagen {
        width: 55px;
        height: 60px;
        top: 20px;
        right: 15px;
    }

    .cuadrado-cuenta {
        top: 100px;
        right: 12px;
        width: 200px;
    }

    /* TARJETAS PRINCIPALES */
    .contenedor-tarjetas {
        width: calc(100% - 32px);
        margin: 30px auto;
        gap: 15px;
    }

    .tarjeta-viajes,
    .tarjeta-usuarios {
        flex: 1 1 100%;
        width: 100%;
        height: auto;
        min-height: 130px;
        padding: 16px;
    }

    .numero-viajes,
    .registro-usuarios {
        font-size: 30px;
    }

    /* CONTENEDOR DE GESTIÓN */
    .contenedor-gestion-viajes {
        width: calc(100% - 32px);
        max-width: 100%;
        margin: 30px auto;
        gap: 20px;
    }

    .administrar-viajes,
    #targeta-eliminarviajes {
        flex: 1 1 100%;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin: 0;
        padding: 20px;
        position: static;
    }

    /* BOTONES */
    #btnMostrarFormulario,
    #btnMostrarEliminarViajes,
    #formNuevoViaje button[type="submit"] {
        max-width: 100%;
        white-space: normal;
    }

    /* FORMULARIO */
    #formNuevoViaje {
        width: 100%;
    }

    #formNuevoViaje input,
    #formNuevoViaje select,
    #formNuevoViaje textarea {
        width: 100%;
        min-width: 0;
    }

    /* CONSULTAS */
    .seccion-consultas {
        width: calc(100% - 32px);
        max-width: 100%;
        margin: 30px auto;
        padding: 18px;
        color: #fff;
    }

    .seccion-consultas h2 {
        font-size: 22px;
    }

    /* TABLA CON DESPLAZAMIENTO */
    .tabla-consultas {
        display: block;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tabla-consultas table {
        min-width: 650px;
        width: 100%;
    }

    .tabla-consultas th,
    .tabla-consultas td {
        padding: 10px;
        font-size: 14px;
    }

    /* FILAS DE VIAJES */
    .fila-eliminar-viaje {
        width: 100%;
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .btn-eliminar-viaje {
        max-width: 100%;
    }
}

/* =========================================
   CELULARES PEQUEÑOS
========================================= */

@media (max-width: 400px) {

    .titulo {
        font-size: 23px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .subtitulo {
        font-size: 18px;
    }

    .boton-imagen {
        width: 45px;
        height: 50px;
        right: 10px;
    }

    .contenedor-tarjetas,
    .contenedor-gestion-viajes {
        width: calc(100% - 24px);
    }

    .tarjeta-viajes,
    .tarjeta-usuarios {
        gap: 12px;
        padding: 12px;
        min-height: 115px;
    }

    .icono-viajes,
    .icono-usuarios {
        width: 45px;
        height: 45px;
        flex-basis: 45px;
        font-size: 21px;
    }

    .numero-viajes,
    .registro-usuarios {
        font-size: 26px;
    }

    .informacion-viajes h2,
    .informacion-usuarios h3 {
        font-size: 13px;
    }

    .administrar-viajes,
    #targeta-eliminarviajes {
        padding: 15px;
    }

    .seccion-consultas {
        padding: 12px;
    }
}
