/* Paleta e Identidad Visual de KENOSIS GIM */
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@700&family=Space+Grotesk:wght@400;700&display=swap');

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

:root {
    --bg-principal: #151515;       /* Negro ultra profundo */
    --bg-tarjeta: #303030;         /* Gris oscuro premium para paneles y modales */
    --verde-neon: #ffa64d;         /* Naranja claro enérgico (tipo seguridad/aluminio) */
    --naranja-oscuro: #ff8533;     /* El naranja anterior queda para el efecto hover */
    --blanco: #ffffff;
    --gris-texto: #999999;
    
    /* Variables de estados de cuota adaptadas */
    --estado-ok: #27c400;          /* Al día */
    --estado-alerta: #ffb300;      /* Próximo a vencer = Amarillo Ámbar */
    --estado-vencido: #ff3333;     /* Vencido = Rojo Alerta */
    
    --fuente-titulo: 'Rajdhani', sans-serif;
    --fuente-cuerpo: 'Space Grotesk', sans-serif;
}

body {
    background-color: var(--bg-principal);
    color: var(--blanco);
    font-family: var(--fuente-cuerpo);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 10px;
}

/* Forzar comportamiento del body en todas las páginas de administración */
body.body-admin {
    display: block;
    overflow: auto;
    padding: 0 0 40px 0;
}

a {
    text-decoration: none;
}

h1 {
    font-family: var(--fuente-titulo);
    font-size: 2.2rem;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.oculto {
    display: none !important;
}

/* Unificar el tamaño de fuente básico de elementos de formulario */
input[type="text"],
input[type="number"],
input[type="date"],
select,
textarea {
    font-size: 14px;
}

/* ==========================================================================
   INTERFAZ DE ENTRADA / RECEPCIÓN
   ========================================================================== */
.pantalla-ingreso {
    text-align: center;
}

/* Diseño del Logo de León (Texto Adaptado) */
.logo-container {
    margin-bottom: 15px;
}
.logo-box {
    border: 4px solid var(--blanco);
    padding: 10px 30px;
    display: inline-block;
    transform: skewX(-6deg);
    background-color: #000;
}
.logo-top {
    display: block;
    font-family: var(--fuente-titulo);
    font-size: 1.2rem;
    letter-spacing: 6px;
    color: var(--verde-neon);
}
.logo-main {
    display: block;
    font-family: var(--fuente-titulo);
    font-size: 3rem;
    letter-spacing: 2px;
    line-height: 1;
}

/* Cartel "NUESTROS HORARIOS" estilo folleto */
.banner-horarios {
    background-color: var(--verde-neon);
    color: #000000;
    font-family: var(--fuente-titulo);
    font-size: 1.6rem;
    padding: 8px 10px;
    margin: 10px 0;
    box-shadow: 0 0 20px rgb(158, 90, 0);
    font-weight: bold;
    border-radius: 5px;
}

/* Unificación de Inputs de DNI Gigantes (Socio e Ingreso) */
#dni, #dni2 {
    background-color: #222222;
    border: 2px solid #444444;
    color: var(--verde-neon);
    font-family: var(--fuente-titulo);
    font-size: 2.6rem;
    padding: 10px;
    width: 100%;
    text-align: center;
    border-radius: 6px;
    outline: none;
    transition: all 0.3s ease;
}
#dni2 {
    font-size: 2rem; /* Ligera variación de tamaño para mi_rutina */
}
#dni:focus, #dni2:focus {
    border-color: var(--verde-neon);
    box-shadow: 0 0 25px rgba(128, 243, 0, 0.5);
    background-color: #111111;
}

/* Ventana Modal de Accesos */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-contenido {
    background-color: var(--bg-tarjeta);
    width: 95%;
    max-width: 650px;
    padding: 35px 25px;
    text-align: center;
    border-radius: 8px;
    border-top: 12px solid var(--blanco);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}
.modal-contenido h2 {
    font-family: var(--fuente-titulo);
    font-size: 2.7rem;
    margin-bottom: 8px;
    letter-spacing: 1px;
}
.txt-dni {
    color: var(--gris-texto);
    font-size: 1.4rem;
    margin-bottom: 30px;
}

/* Recuadro interno del Mensaje */
.alerta-vencimiento {
    padding: 18px 10px;
    font-family: var(--fuente-titulo);
    font-size: 1.5rem;
    border-radius: 4px;
    margin-bottom: 30px;
    background-color: #262626;
    letter-spacing: 0.5px;
}

.btn-cerrar {
    background-color: var(--blanco);
    color: #000;
    border: none;
    padding: 14px;
    font-family: var(--fuente-titulo);
    font-size: 1.4rem;
    cursor: pointer;
    border-radius: 4px;
    width: 100%;
    letter-spacing: 1px;
    transition: background-color 0.2s;
}
.btn-cerrar:hover {
    background-color: #dddddd;
}

/* CLASES DINÁMICAS POR ESTADO DEL SOCIO */
.estado-ok { border-top-color: var(--estado-ok); }
.estado-ok .alerta-vencimiento { color: #000000; background-color: var(--estado-ok); }

.estado-alerta { border-top-color: var(--estado-alerta); }
.estado-alerta .alerta-vencimiento { color: #000000; background-color: var(--estado-alerta); }

.estado-vencido { border-top-color: var(--estado-vencido); animation: pulsoRojo 1.2s infinite alternate; }
.estado-vencido .alerta-vencimiento { color: #ffffff; background-color: var(--estado-vencido); }

.estado-error { border-top-color: #555555; }
.estado-error .alerta-vencimiento { color: #ffffff; background-color: #444444; }

@keyframes pulsoRojo {
    from { box-shadow: 0 0 10px rgba(255, 51, 51, 0.2); }
    to { box-shadow: 0 0 30px rgba(255, 51, 51, 0.7); }
}

/* ==========================================================================
   ESTILOS GENERALES DE LA ESTRUCTURA DE ADMINISTRACIÓN
   ========================================================================== */
.container-admin {
    width: 90%;
    max-width: 900px;
    margin: 40px auto;
    background-color: var(--bg-tarjeta);
    padding: 30px;
    border-radius: 8px;
    border-left: 5px solid var(--verde-neon);
}
.seccion-admin {
    padding-bottom: 20px;
    border-bottom: 1px solid #333;
}
.seccion-admin h3 {
    font-family: var(--fuente-titulo);
    color: var(--verde-neon);
    font-size: 1.5rem;
    margin-bottom: 15px;
}
.seccion-admin.sin-borde {
    border: none;
}
.form-grid {
    display: block;
}
.form-control {
    margin-bottom: 15px;
}
.form-control label {
    display: block;
    margin-bottom: 5px;
    color: var(--gris-texto);
}
.form-control input, .form-control select {
    width: 100%;
    padding: 10px;
    background-color: #181818;
    border: 1px solid #444;
    color: #fff;
    border-radius: 4px;
}
.btn-admin {
    background-color: var(--verde-neon);
    color: #000;
    font-family: var(--fuente-titulo);
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    border-radius: 4px;
}
.link-admin {
    color: var(--verde-neon);
    text-decoration: none;
    font-weight: bold;
}
.link-admin:hover {
    text-decoration: underline;
}

/* Unificación de alertas de error en formularios */
.msg-alerta-error, .alerta-error {
    background-color: rgba(255, 68, 68, 0.1);
    border: 1px solid var(--estado-vencido);
    color: var(--estado-vencido);
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Unificación estructural de los buscadores en tiempo real (Socios, Pagos y Gastos) */
#buscadorSocios, #buscadorPagos, #buscadorGastos {
    width: 100%;
    padding: 10px;
    border: 1px solid #444;
    border-radius: 5px;
    background-color: #181818;
    color: #fff;
    box-sizing: border-box;
}

/* ==========================================================================
   TABLAS ESTILO KENOSIS (HISTORIALES Y RESÚMENES)
   ========================================================================== */
.tabla-contenedor {
    width: 100%;
    overflow-x: auto;
    margin-top: 20px;
}
.tabla-gym {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    background-color: #171717;
    border-radius: 4px;
    overflow: hidden;
}
.tabla-gym th {
    background-color: #171717;
    color: var(--verde-neon);
    font-family: var(--fuente-titulo);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 15px;
    text-align: left;
    border-bottom: 2px solid var(--verde-neon);
}
.tabla-gym td {
    padding: 12px 15px;
    border-bottom: 1px solid #222;
    color: #fff;
}
.tabla-gym tr:hover td {
    background-color: #171717;
}
.tabla-gym td.sin-registros {
    text-align: center;
    color: var(--gris-texto);
}

/* Mini etiquetas de estado dentro de las tablas */
.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-family: var(--fuente-titulo);
    font-size: 0.85rem;
    display: inline-block;
}
.badge-ok { background-color: var(--estado-ok); color: #171717; }
.badge-alerta { background-color: var(--estado-alerta); color: #171717; }
.badge-vencido { background-color: var(--estado-vencido); color: #fff; }

/* Barra de Navegación Superior del Administrador */
.admin-nav {
    background-color: #171717;
    padding: 15px;
    border-bottom: 2px solid #222;
    margin-bottom: 30px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}
.admin-nav a {
    color: #fff;
    text-decoration: none;
    font-family: var(--fuente-titulo);
    font-size: 1.1rem;
    padding: 8px 16px;
    border: 1px solid #333;
    border-radius: 4px;
    transition: all 0.3s;
}
.admin-nav a:hover, .admin-nav a.active {
    background-color: var(--verde-neon);
    color: #000;
    border-color: var(--verde-neon);
    box-shadow: 0 0 10px rgba(128, 243, 0, 0.3);
}

/* ==========================================================================
   RESET DEFINITIVO DE SELECT2 AL DISEÑO OSCURO
   ========================================================================== */
.select2-container .select2-selection--single,
.select2-container--default .select2-selection--single .select2-selection__rendered,
.select2-results__option {
    font-size: 14px !important;
}

.select2-container--default .select2-selection--single {
    background-color: #171717 !important;
    display: flex !important;
    border: 1px solid #444 !important;
    height: 40px !important;
    align-items: center !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    font-family: inherit !important;
    color: #fff !important;
    line-height: normal !important;
    padding-left: 12px !important;
    padding-right: 30px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100% !important;
    top: 0 !important;
    right: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.select2-dropdown {
    background-color: #171717 !important;
    border: 1px solid #444 !important;
   border-radius: 4px !important;
    font-family: inherit !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

.select2-results__option {
    color: #fff !important;
    padding: 10px 12px !important;
}

.select2-results__option--highlighted {
    background-color: var(--verde-neon) !important;
    color: #000 !important;
}

.select2-results__option[aria-selected="true"],
.select2-results__option--selected,
.select2-container--default .select2-results__option--selected {
    background-color: var(--bg-tarjeta) !important;
    color: var(--verde-neon) !important;
}

.select2-results__option[aria-selected="true"].select2-results__option--highlighted,
.select2-results__option--selected.select2-results__option--highlighted {
    background-color: var(--verde-neon) !important;
    color: #ffffff !important;
}

/* ==========================================================================
   SECCIÓN: CALENDARIO DE HORARIOS GIGANTE (INDEX / RECEPCIÓN)
   ========================================================================== */
.pantalla-ingreso {
    max-width: 1300px !important; 
    margin: 0 auto;
}

.logo-container, 
.pantalla-ingreso h1, 
#form-asistencia, 
.pantalla-ingreso p,
#form-consulta-rutina {
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.wrapper-cronograma {
    width: 100%;
    max-width: 1250px; 
    margin: 25px auto;
    padding: 20px; 
    border-radius: 10px;
    border: 1px solid #222;
    box-shadow: 0 6px 25px rgba(0,0,0,0.6);
    box-sizing: border-box;
    max-height: 1200px;
    opacity: 1;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out, opacity 0.4s ease, margin 0.4s ease, padding 0.4s ease;
}

.wrapper-cronograma.colapsado {
    max-height: 0 !important;
    opacity: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 25px !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
    pointer-events: none;
}

.btn-cronograma-trigger {
    border: none;
    outline: none;
    cursor: pointer;
    width: auto;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-cronograma-trigger:hover {
    background-color: var(--naranja-oscuro);
    box-shadow: 0 0 25px rgba(255, 133, 51, 0.6);
}

.tabla-cronograma {
    width: 100%;
    background-color: var(--bg-tarjeta);
    border-collapse: collapse;
    color: #ffffff; 
    table-layout: fixed; 
}

.tabla-cronograma th, .tabla-cronograma td {
    padding: 12px 6px; 
    border: 1px solid #252525;
    text-align: center;
    vertical-align: middle;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.tabla-cronograma th:first-child, 
.tabla-cronograma td:first-child {
    width: 13%; 
}
.tabla-cronograma th:not(:first-child), 
.tabla-cronograma td:not(:first-child) {
    width: 14.5%; 
}

.tabla-cronograma th {
    background-color: var(--bg-principal);
    color: #a5a5a5;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.95rem;
    letter-spacing: 1px;
}

.tabla-cronograma td.col-hora {
    font-weight: bold;
    color: var(--verde-neon);
    background: var(--bg-principal);
    text-shadow: 0 0 5px rgba(255, 166, 77, 0.2);
}

.tabla-cronograma tr:hover td {
    background-color: #181818;
    color: #fff;
}

/* ==========================================================================
   SECCIÓN: PANEL DE ASISTENCIAS (ADMIN_ASISTENCIAS.PHP)
   ========================================================================== */
.tarjeta-contador {
    background-color: #171717;
    border-left: 5px solid var(--verde-neon);
    padding: 15px 20px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 5px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.tarjeta-contador .info-box h4 {
    margin: 0;
    color: #fff;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.tarjeta-contador .info-box p {
    margin: 4px 0 0 0;
    color: #888;
    font-size: 0.85rem;
}

.tarjeta-contador .numero-box {
    font-size: 2.2rem;
    font-weight: bold;
    color: var(--verde-neon);
    background-color: #252525;
    padding: 2px 18px;
    border-radius: 4px;
    min-width: 45px;
    text-align: center;
}

/* ==========================================================================
   SECCIÓN: CONTROL DE CUOTAS (ADMIN_CUOTAS.PHP)
   ========================================================================== */
.msg-alerta-exito {
    color: var(--verde-neon);
    margin-bottom: 15px;
    font-weight: bold;
}

.monto-destacado {
    color: var(--verde-neon);
    font-weight: bold;
}

/* ==========================================================================
   SECCIÓN: PLANIFICADOR DE FRASES (ADMIN_FRASES.PHP)
   ========================================================================== */
.selector-mes {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.selector-mes select {
    padding: 8px;
    background: #222;
    color: #fff;
    border: 1px solid #444;
    border-radius: 4px;
}

.form-frases {
    background-color: #171717;
    padding: 25px;
    border-radius: 6px;
    margin-top: 20px;
}

.grupo-input {
    margin-bottom: 15px;
}

.grupo-input label {
    display: block;
    margin-bottom: 5px;
    color: #aaa;
    font-size: 0.9rem;
}

.grupo-input input {
    width: 100%;
    padding: 10px;
    background: #252525;
    border: 1px solid #444;
    color: #fff;
    border-radius: 4px;
    box-sizing: border-box;
}

.grupo-input input:focus {
    border-color: var(--verde-neon);
    outline: none;
}

.btn-guardar {
    background-color: var(--verde-neon);
    color: #000;
    font-weight: bold;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    width: 100%;
}

.msg-alerta-notif {
    background: #222;
    border-left: 4px solid var(--verde-neon);
    padding: 10px;
    margin-bottom: 15px;
}

/* ==========================================================================
   SECCIÓN: CONTROL DE GASTOS (ADMIN_GASTOS.PHP)
   ========================================================================== */
.badge-categoria {
    color: #aaa;
    font-size: 0.85rem;
    border: 1px solid #333;
    padding: 2px 6px;
    border-radius: 3px;
    background-color: #171717;
}

.monto-egreso {
    color: #ff4444;
    font-weight: bold;
}

/* ==========================================================================
   SECCIÓN: GESTIÓN DE HORARIOS (ADMIN_HORARIOS.PHP)
   ========================================================================== */
.body-admin .container-admin-cronograma {
    max-width: 1200px;
}

.titulo-cronograma {
    border-left: 4px solid var(--verde-neon);
    padding-left: 15px;
}

.form-inline {
    display: inline-block;
}

.tabla-editor {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: #141414;
}

.tabla-editor th, .tabla-editor td {
    border: 1px solid #252525;
    padding: 8px;
    text-align: center;
}

.tabla-editor th {
    background: #1e1e1e;
    color: #aaa;
    font-size: 0.9rem;
}

.tabla-editor input {
    width: 100%;
    padding: 6px;
    background: #1a1a1a;
    border: 1px solid #333;
    color: #fff;
    border-radius: 3px;
    box-sizing: border-box;
    text-align: center;
}

.tabla-editor input:focus {
    border-color: var(--verde-neon);
    outline: none;
}

.tabla-editor .input-hora-destacada {
    font-weight: bold;
    color: var(--verde-neon);
}

.tabla-editor .col-orden { width: 60px; }
.tabla-editor .col-rango { width: 130px; }
.tabla-editor .col-accion { width: 80px; }

.btn-accion {
    padding: 10px 20px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    border: none;
}

.btn-green {
    background: var(--verde-neon);
    color: #000;
}

.btn-green.btn-guardar-cronograma {
    width: 250px;
    font-size: 1rem;
}

.btn-add {
    background: #222;
    color: #fff;
    border: 1px solid #444;
    margin-bottom: 15px;
}

.btn-delete {
    background: #ff3333;
    color: #fff;
    padding: 5px 10px;
    font-size: 0.8rem;
    text-decoration: none;
    border-radius: 3px;
}

.wrapper-guardar-cronograma {
    margin-top: 20px;
    text-align: right;
}

/* ==========================================================================
   SECCIÓN: GESTIÓN DE SOCIOS (ADMIN_SOCIOS.PHP)
   ========================================================================== */
.msg-alerta-box {
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 15px;
    font-weight: bold;
    font-size: 0.95rem;
    line-height: 1.4;
}

.msg-ok {
    background-color: rgba(0, 255, 102, 0.1);
    border: 1px solid var(--verde-neon);
    color: var(--verde-neon);
}

.msg-err {
    background-color: rgba(255, 51, 51, 0.1);
    border: 1px solid #ff3333;
    color: #ff3333;
}

.filtro-listado {
    margin-bottom: 20px;
}

.dni-destacado {
    font-weight: bold;
    color: var(--verde-neon);
}

/* ==========================================================================
   SECCIÓN: EDICIÓN DE GASTOS Y DETALLES (EDITAR_GASTO.PHP)
   ========================================================================== */
.btn-volver {
    display: inline-block;
    margin-bottom: 15px;
    color: #aaa;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.btn-volver:hover {
    color: var(--verde-neon);
}

/* ==========================================================================
   SECCIÓN: EDICIÓN DE PAGOS (EDITAR_PAGO.PHP)
   ========================================================================== */
.socio-info {
    background: #222;
    padding: 10px;
    border-radius: 5px;
    border-left: 3px solid var(--verde-neon);
    margin-bottom: 20px;
    font-size: 0.95rem;
    color: #eee;
}

.input-readonly {
    background: #1a1a1a !important;
    cursor: not-allowed;
    border: 1px solid #333 !important;
    color: #777 !important;
}

/* ==========================================================================
   SECCIÓN: EDICIÓN DE SOCIOS (EDITAR_SOCIO.PHP)
   ========================================================================== */
.form-acciones {
    margin-top: 25px;
    display: flex;
    align-items: center;
}

.form-acciones .btn-admin {
    margin: 0;
}

.btn-cancelar {
    color: #888;
    margin-left: 20px;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.btn-cancelar:hover {
    color: #ff3333;
}

.container-link-admin {
    margin-top: 20px;
    margin-bottom: 10px;
    display: block;
    width: 100%;
    text-align: center;
}

/* ==========================================================================
   COMPONENTES DE PAGINACIÓN GENERAL
   ========================================================================== */
.paginacion-container {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.paginacion-info {
    font-size: 0.9rem;
    color: var(--gris-texto);
    font-family: var(--fuente-cuerpo);
}

.paginacion-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.btn-pagi {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    background-color: var(--bg-principal);
    border: 1px solid #cbd5e1;
    color: var(--texto-principal);
    text-decoration: none;
    font-family: var(--fuente-titulo);
    font-size: 1rem;
    font-weight: bold;
    border-radius: 4px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-pagi:hover {
    border-color: var(--verde-neon);
    color: var(--blanco);
    background-color: var(--verde-neon);
}

.btn-pagi.activo {
    background-color: var(--negro-logo);
    color: var(--blanco);
    border-color: var(--negro-logo);
}

.btn-pagi.activo:hover {
    background-color: var(--verde-neon);
    border-color: var(--verde-neon);
    color: var(--blanco);
}

.pagi-puntos {
    color: var(--gris-texto);
    padding: 0 4px;
    font-weight: bold;
}

/* ==========================================
   ESTILOS PARA PANTALLA DE LOGIN (TIPO MODAL)
   ========================================== */
body.login-page {
    background-color: #121214;
    font-family: 'Segoe UI', Roboto, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-modal {
    background-color: #1a1a1e;
    width: 100%;
    max-width: 400px;
    padding: 40px 30px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid #29292e;
    text-align: center;
}

.login-header .login-logo {
    font-size: 3rem;
    margin-bottom: 10px;
}

.login-header h2 {
    color: #ffffff;
    margin: 0 0 5px 0;
    font-size: 1.8rem;
    letter-spacing: 1px;
}

.login-header p {
    color: #7c7c8a;
    margin: 0 0 30px 0;
    font-size: 0.95rem;
}

.login-form {
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #c4c4cc;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    background-color: #121214;
    border: 1px solid #29292e;
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--verde-neon);
    box-shadow: 0 0 0 2px rgba(0, 173, 181, 0.2);
}

.btn-login {
    width: 100%;
    padding: 14px;
    background-color: var(--verde-neon);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    margin-top: 10px;
}

.btn-login:hover {
    background-color: var(--naranja-oscuro);
}

.btn-login:active {
    transform: scale(0.98);
}

.login-alert-error {
    background-color: rgba(247, 90, 90, 0.1);
    border: 1px solid #f75a5a;
    padding: 12px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
    text-align: left;
}

.login-alert-error .alert-icon {
    font-size: 1.2rem;
}

.login-alert-error .alert-text {
    color: #f75a5a;
    font-size: 0.9rem;
    font-weight: 500;
}

.login-footer {
    margin-top: 30px;
}

.login-footer a {
    color: #7c7c8a;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.login-footer a:hover {
    color: #ffffff;
}

.btn-logout {
    margin-left: auto; 
    padding: 8px 16px;
    color: #f75a5a;
    border: 1px solid #f75a5a;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-logout:hover {
    background-color: #f75a5a;
    color: #ffffff;
}

/* ==========================================================================
   ESTILOS NUEVOS: FLUJO GENERAL DE SOCIOS Y BIENVENIDA (KENOSIS GYM)
   ========================================================================== */
body.landing-page {
    background-color: var(--bg-principal);
    color: #ffffff;
    font-family: sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.landing-container {
    text-align: center;
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.landing-logo {
    margin-bottom: 20px;
}

.landing-container h1 {
    color: var(--verde-neon);
    letter-spacing: 2px;
    margin-bottom: 30px;
    font-size: 2rem;
}

.btn-arranque {
    display: block;
    width: 100%;
    padding: 14px 20px; 
    margin-bottom: 12px;
    border-radius: 6px;  
    font-size: 1.05rem;   
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    box-sizing: border-box;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.btn-profe, .btn-socio {
    background-color: #1a1a1e; 
    color: #7c7c8a;            
    border: 1px solid #29292e; 
}

.btn-profe:hover, .btn-socio:hover {
    background-color: var(--verde-neon);
    color: #ffffff;
    border-color: var(--naranja-oscuro);     
}

.error-socio-home {
    color: #f75a5a;
    font-weight: bold;
    margin-top: 20px;
}

.contenedor-volver {
    margin-top: 30px;
}

.link-volver-inicio {
    color: #7c7c8a;
    text-decoration: none;
    font-size: 0.9rem;
}

/* --- Vista de Rutinas desde Celular (mi_rutina.php) --- */
body.rutina-page {
    background-color: var(--bg-principal);
    color: #ffffff;
    padding: 20px 15px;
    font-family: system-ui, -apple-system, sans-serif; 
}

.container-rutina {
    max-width: 500px;
    margin: 0 auto;
    padding-bottom: 30px;
}

.header-rutina {
    background: linear-gradient(135deg, #1a1a1e 0%, #121214 100%);
    padding: 24px;
    border-radius: 16px;
    margin-bottom: 25px;
    border: 1px solid #29292e;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.header-rutina h2, .container-rutina h3 {
    margin: 0 0 20px 0;
    color: #ffffff;
    font-size: 1.6rem;
    font-weight: 700;
}

.header-rutina p {
    margin: 5px 0;
    color: #7c7c8a;
    font-size: 0.95rem;
}

.badge-al-dia {
    background-color: rgba(0, 255, 102, 0.1);
    color: #00ff66;
    border: 1px solid rgba(0, 255, 102, 0.2);
    margin: 10px;
}

.badge-pendiente {
    background-color: rgba(247, 90, 90, 0.1);
    color: #f75a5a;
    border: 1px solid rgba(247, 90, 90, 0.2);
    margin: 10px;
}

.badge-alert {
    background-color: rgba(235, 202, 15, 0.062);
    color: #ffb300;
    border: 1px solid rgba(250, 212, 0, 0.781);
    margin: 10px;
}

.card-dia {
    background-color: #1a1a1e;
    border: 1px solid #29292e;
    border-radius: 16px; 
    padding: 22px;
    margin-bottom: 18px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}

.card-dia::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--naranja-oscuro), transparent);
}

.card-dia h4 {
    margin: 0 0 16px 0;
    color: var(--naranja-oscuro);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 800;
    display: inline-block;
    background: rgba(0, 173, 181, 0.08);
    padding: 4px 10px;
    border-radius: 6px;
}

.card-dia .grupo-muscular {
    display: block;
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 700;
}

.ejercicios-txt {
    color: #c4c4cc;
    line-height: 1.7;
    font-size: 1rem;
    white-space: pre-line; 
}

.ejercicios-txt strong {
    color: #ffffff; 
}

.descanso {
    display: block;
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px dashed #29292e; 
    color: #7c7c8a;
    font-size: 0.9rem;
    font-style: italic;
}

.btn-salir-rutina {
    display: block;
    text-align: center;
    background-color: #1a1a1e;
    color: #7c7c8a;
    padding: 14px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 35px;
    border: 1px solid #29292e;
    transition: all 0.2s;
}

.btn-salir-rutina:hover {
    background-color: var(--verde-neon);
    color: #ffffff;
    border-color: var(--verde-neon);
}

/* ==========================================================================
   ESTILOS NUEVOS: APARTADO ADMINISTRADOR (CARGA DE RUTINAS)
   ========================================================================== */
body.admin-page {
    background-color: var(--bg-principal);
    color: #ffffff;
    font-family: sans-serif;
    padding: 30px 15px;
}

.admin-container {
    max-width: 550px;
    margin: 0 auto;
}

.admin-header {
    text-align: center;
    margin-bottom: 25px;
}

.admin-header h1 {
    color: var(--verde-neon);
    font-size: 1.8rem;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
}

.sub-profe {
    color: #7c7c8a;
    font-size: 1rem;
    margin: 0;
}

.sub-profe strong {
    color: #ffffff;
}

.card-formulario {
    background-color: #1a1a1e;
    border: 1px solid #29292e;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}

.info-dia-auto {
    background: rgba(0, 173, 181, 0.08);
    border: 1px dashed rgba(0, 173, 181, 0.3);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    color: #e1e1e6;
    font-weight: 600;
    margin-bottom: 22px;
    font-size: 0.95rem;
}

.info-dia-auto span {
    color: var(--naranja-oscuro);
    font-weight: 800;
    letter-spacing: 1px;
}

.grupo-control {
    margin-bottom: 20px;
}

.grupo-control label {
    display: block;
    margin-bottom: 8px;
    color: #c4c4cc;
    font-size: 0.9rem;
    font-weight: 600;
}

.grupo-control input[type="text"],
.grupo-control textarea {
    width: 100%;
    background-color: #121214;
    border: 1px solid #29292e;
    border-radius: 8px;
    color: #ffffff;
    padding: 14px;
    font-size: 1rem;
    font-family: sans-serif;
    box-sizing: border-box;
    outline: none;
    transition: all 0.2s ease-in-out;
}

.grupo-control input[type="text"]:focus,
.grupo-control textarea:focus {
    border-color: var(--verde-neon);
    box-shadow: 0 0 10px rgba(0, 173, 181, 0.2);
    background-color: #16161a;
}

.grupo-control textarea {
    resize: vertical;
    line-height: 1.5;
}

.ayuda-input {
    display: block;
    color: #7c7c8a;
    font-size: 0.8rem;
    margin-top: 6px;
    line-height: 1.4;
}

.alerta-admin {
    padding: 14px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
}

.alerta-success {
    background-color: rgba(0, 255, 102, 0.1);
    color: #00ff66;
    border: 1px solid rgba(0, 255, 102, 0.2);
}

/* ==========================================================================
   BOTÓN MANCUERNA PREMIUM (FONT AWESOME SOLID)
   ========================================================================== */
.btn-rutina-fa {
    color: var(--verde-neon); 
}

.btn-rutina-fa i {
    font-size: 1.1rem; 
    transform: rotate(-45deg); 
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1); 
}

.btn-rutina-fa:hover i {
    transform: rotate(0deg); 
}

/* ==========================================================================
   PANEL DE CARGA DE RUTINAS (ESTILOS COMPACTOS Y UNIFICADOS)
   ========================================================================== */
.seccion-admin-rutina {
    padding-top: 15px;
    padding-bottom: 15px;
}

.btn-volver-rutina {
    margin-bottom: 10px;
    display: inline-block;
}

.titulo-rutina {
    margin-bottom: 5px;
    margin-top: 5px;
}

.subtitulo-socio {
    color: #7c7c8a;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.subtitulo-socio strong {
    color: #ffffff;
}

.alerta-compacta {
    margin-bottom: 15px;
    padding: 10px;
}

.alerta-bloqueo-total {
    background-color: rgba(247, 90, 90, 0.08);
    border: 1px solid rgba(247, 90, 90, 0.3);
    color: #f75a5a;
    padding: 15px;
    text-align: center;
    border-radius: 4px;
    font-weight: 600;
}

.bloque-dia-dinamico {
    margin-bottom: 15px;
    border-bottom: 1px dashed #29292e;
    padding-bottom: 10px;
}

.titulo-dia-dinamico {
    color: #00adb5;
    font-size: 0.9rem;
    margin-top: 0;
    margin-bottom: 8px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.bloque-dia-dinamico .form-control {
    margin-bottom: 10px;
}

.bloque-dia-dinamico .form-control:last-of-type {
    margin-bottom: 5px;
}

.bloque-dia-dinamico label {
    margin-bottom: 4px;
    font-size: 0.85rem;
}

.bloque-dia-dinamico input[type="text"] {
    padding: 8px 10px;
    height: auto;
}

.textarea-rutina {
    width: 100%;
    background-color: #121214;
    border: 1px solid #29292e;
    border-radius: 4px;
    color: #ffffff;
    padding: 8px 10px;
    font-family: sans-serif;
    box-sizing: border-box;
    resize: vertical;
    outline: none;
}

.wrapper-btn-añadir {
    margin-bottom: 15px;
}

.btn-añadir-plan {
    background: transparent;
    border: 1px dashed #00adb5;
    color: #00adb5;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    width: 100%;
    transition: all 0.2s;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.btn-añadir-plan:hover {
    background: rgba(0, 173, 181, 0.05);
}

.btn-añadir-plan.limite-alcanzado {
    opacity: 0.4;
    border-color: #29292e;
    color: #7c7c8a;
    cursor: not-allowed;
    background: transparent;
}

.contenedor-quitar-dia {
    text-align: right;
    margin-bottom: 8px;
    margin-top: -5px;
}

.btn-quitar-dia {
    background: transparent;
    color: #f75a5a;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
}

.btn-quitar-dia:hover {
    text-decoration: underline;
}

.btn-admin-rutina {
    margin-top: 5px;
    padding: 12px;
}

/* ==========================================================================
   OPTIMIZACIÓN RESPONSIVE PARA CELULARES Y DISPOSITIVOS MÓVILES
   ========================================================================== */
@media (max-width: 768px) {
    /* Prevención de desborde y scroll horizontal forzado global */
    html, body {
        max-width: 100%;
        overflow-x: hidden;
    }

    .pantalla-ingreso {
        padding: 15px;
        width: 100%;
        box-sizing: border-box;
    }

    .pantalla-ingreso h1 {
        font-size: 1.8rem; 
        letter-spacing: 1px;
        margin-top: 15px;
    }

    .pantalla-ingreso input[type="text"] {
        font-size: 20px !important; 
        padding: 15px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .wrapper-cronograma {
        width: 100%;
        overflow-x: auto; 
        -webkit-overflow-scrolling: touch; 
        border: 1px solid #29292e;
        border-radius: 8px;
        margin-bottom: 20px;
    }

    .tabla-cronograma {
        min-width: 650px; 
        font-size: 0.9rem; 
    }

    .tabla-cronograma th, 
    .tabla-cronograma td {
        padding: 10px 5px; 
    }

    body.rutina-page {
        padding: 10px; 
    }

    .container-rutina {
        width: 100%;
        max-width: 100%;
    }

    .header-rutina {
        padding: 15px;
        margin-bottom: 20px;
    }

    .header-rutina h2 {
        font-size: 1.5rem; 
    }

    .card-dia {
        padding: 15px; 
        margin-bottom: 12px;
    }

    .card-dia h4 {
        font-size: 1.1rem; 
        margin-bottom: 15px;
        margin-top: 15px;
    }

    .ejercicios-txt {
        font-size: 0.95rem; 
        line-height: 1.5;
    }
    
    .btn-salir-rutina {
        padding: 14px; 
        font-size: 1rem;
    }

    .landing-container {
        padding: 15px;
        max-width: 100%;
        box-sizing: border-box;
    }

    .landing-container h1 {
        font-size: 1.6rem;
        margin-bottom: 25px;
        letter-spacing: 1px;
    }

    .btn-arranque {
        padding: 16px; 
        font-size: 1.1rem;
        margin-bottom: 15px; 
    }

    body.admin-page {
        padding: 15px 10px;
    }

    .card-formulario {
        padding: 18px;
    }

    .admin-header h1 {
        font-size: 1.5rem;
    }
}

/* Celulares ultra compactos (iPhone SE) */
@media (max-width: 380px) {
    .pantalla-ingreso h1 {
        font-size: 1.5rem;
    }
    .header-rutina h2 {
        font-size: 1.3rem;
    }
}

@media (max-width: 360px) {
    .landing-container h1 {
        font-size: 1.4rem;
    }
    .btn-arranque {
        padding: 14px;
        font-size: 1rem;
    }
}