:root {
    --epe-azul: #145da0;
    --epe-azul-oscuro: #0b2948;
    --epe-azul-medio: #174f7f;
    --epe-celeste: #eaf4fb;
    --fondo: #eef3f7;
    --blanco: #ffffff;
    --texto: #1f2937;
    --texto-suave: #64748b;
    --borde: #d6e0e8;
    --rojo: #b42318;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family:
        Arial,
        Helvetica,
        sans-serif;
    background:
        linear-gradient(
            135deg,
            #07182a 0%,
            #0b2948 45%,
            #145da0 100%
        );
    color: var(--texto);
}

/* =========================================================
   LOGIN
   ========================================================= */

.login {
    width: min(430px, 92vw);
    background: rgba(255,255,255,.98);
    border-radius: 18px;
    padding: 0 36px 32px;
    overflow: hidden;
    box-shadow:
        0 24px 70px
        rgba(0,0,0,.35);
    border:
        1px solid
        rgba(255,255,255,.25);
}

.logo {
    text-align: center;
    margin: 0 -36px 24px;
    padding: 22px 24px 18px;
    background: linear-gradient(110deg, var(--epe-azul-oscuro), var(--epe-azul));
    border-bottom: 4px solid #dbeafe;
}

.logo img {
    width: 180px;
    max-width: 70%;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

h1 {
    color: var(--epe-azul-oscuro);
}

.subtitulo {
    color: var(--texto-suave);
}

label {
    color: #334155;
}

input,
select {
    width: 100%;
    padding: 12px 13px;
    border:
        1px solid
        var(--borde);
    border-radius: 8px;
    background: white;
    color: var(--texto);
    font-size: 15px;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--epe-azul);
    box-shadow:
        0 0 0 3px
        rgba(20,93,160,.12);
}

button {
    border: 0;
    border-radius: 8px;
    background: var(--epe-azul);
    color: white;
    padding: 11px 16px;
    font-weight: 700;
    cursor: pointer;
}

button:hover {
    filter: brightness(.92);
}

.login button {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    letter-spacing: .3px;
}

.pie {
    color: #94a3b8;
}

.ayuda-acceso {
    margin-top: 22px;
    padding: 14px 16px;
    border: 1px solid #c9ddea;
    border-radius: 10px;
    background: #f0f7fc;
    color: var(--epe-azul-oscuro);
    font-size: 13px;
    line-height: 1.7;
}

.ayuda-acceso strong {
    display: block;
    margin-bottom: 3px;
}

.ayuda-acceso span {
    display: inline-block;
    min-width: 82px;
    color: #475569;
}

.ayuda-acceso code {
    color: var(--epe-azul-oscuro);
    font: 700 13px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}


/* =========================================================
   ADMINISTRACION
   ========================================================= */

body.admin-epe {
    display: block;
    background: var(--fondo);
}

.admin-epe header {
    min-height: 82px;
    background:
        linear-gradient(
            90deg,
            var(--epe-azul-oscuro),
            var(--epe-azul-medio)
        );
    padding: 12px 30px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow:
        0 3px 12px
        rgba(0,0,0,.18);
}

.admin-epe header img {
    width: 160px;
    height: 58px;
    object-fit: contain;
    background: transparent;
    padding: 3px 0;
}

.admin-epe .usuario {
    font-size: 14px;
    line-height: 1.5;
}

.admin-epe .usuario a {
    color: #dbeafe;
    text-decoration: none;
}

.admin-epe .contenedor {
    max-width: 1180px;
    margin: 28px auto;
    padding: 0 20px 35px;
}

.admin-epe .volver {
    display: inline-block;
    color: var(--epe-azul);
    text-decoration: none;
    font-weight: 700;
    margin-bottom: 18px;
}

.admin-epe .tarjeta {
    background: white;
    border-radius: 14px;
    padding: 26px;
    margin-bottom: 22px;
    border: 1px solid #e2e8f0;
    box-shadow:
        0 6px 22px
        rgba(15,23,42,.07);
}

.admin-epe h1 {
    margin-top: 0;
    margin-bottom: 6px;
    font-size: 28px;
}

.admin-epe h2 {
    color: var(--epe-azul-oscuro);
    margin-top: 0;
}

.admin-epe .form-grid {
    display: grid;
    grid-template-columns:
        repeat(
            auto-fit,
            minmax(210px,1fr)
        );
    gap: 16px;
}

.admin-epe table {
    width: 100%;
    border-collapse: collapse;
}

.admin-epe th {
    padding: 12px;
    background: #edf5fb;
    color: var(--epe-azul-oscuro);
    text-align: left;
    border-bottom:
        2px solid
        #c9ddea;
}

.admin-epe td {
    padding: 12px;
    border-bottom:
        1px solid
        #e5e7eb;
    vertical-align: middle;
}

.admin-epe tr:hover td {
    background: #f8fbfd;
}

.admin-epe form {
    margin: 0;
}

.admin-epe form button {
    margin-top: 8px;
    white-space: nowrap;
}

.admin-epe button[style*="background:#b91c1c"] {
    background: var(--rojo) !important;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 760px) {

    .login {
        padding: 0 22px 24px;
    }

    .login .logo {
        margin: 0 -22px 22px;
        padding: 18px 20px 15px;
    }

    .admin-epe header {
        padding: 12px 16px;
    }

    .admin-epe header img {
        width: 125px;
    }

    .admin-epe .contenedor {
        padding:
            0 12px
            25px;
    }

    .admin-epe .tarjeta {
        padding: 18px;
        overflow-x: auto;
    }

    .admin-epe table {
        min-width: 850px;
    }
}

/* =========================================================
   TABLA USUARIOS - ACCIONES EN UNA SOLA LINEA
   ========================================================= */

.admin-epe .acciones-usuario {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.admin-epe .acciones-usuario form {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.admin-epe .acciones-usuario button {
    margin: 0;
    min-height: 38px;
    padding: 8px 11px;
    font-size: 11px;
}

.admin-epe .acciones-usuario select {
    width: 135px;
    min-width: 135px;
    height: 38px;
    padding: 6px 8px;
}

.admin-epe .accion-password input {
    width: 165px;
    min-width: 165px;
    height: 38px;
    padding: 7px 10px;
}

.admin-epe .etiqueta-actual {
    display: inline-flex;
    align-items: center;
    height: 38px;
    padding: 0 10px;
    border-radius: 7px;
    background: #edf5fb;
    color: var(--epe-azul-oscuro);
    font-size: 12px;
    font-weight: 700;
}

.admin-epe td {
    vertical-align: middle;
}

.admin-epe td:last-child {
    min-width: 680px;
}

/* En pantallas chicas se mantiene la fila,
   permitiendo desplazamiento horizontal de la tabla. */
.admin-epe .tarjeta {
    overflow-x: auto;
}

/* INICIO TOUR360-CONTRASTE-ADMIN-20261025 */
/* Textos sobre el fondo oscuro del diseño RPAS. */
body.admin-epe .tarjeta table thead th {
    color: #ffffff !important;
}
body.admin-epe .contenedor a.volver {
    color: #ffffff !important;
}
body.admin-epe .tarjeta h2 {
    color: #ffffff !important;
}
/* FIN TOUR360-CONTRASTE-ADMIN-20261025 */
