﻿/* ======== Layout general tipo Phoenix ======== */

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top left, rgba(148, 163, 184, 0.28), transparent 55%), radial-gradient(circle at bottom right, rgba(125, 211, 252, 0.22), transparent 55%), #f1f5f9;
    color: #0f172a;
}

/* Contenedor que centra todo */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
}

/* "Card" grande que contiene izquierda + derecha */
.login-shell {
    display: flex;
    max-width: 1120px;
    width: 100%;
    background-color: #f8fafc;
    border-radius: 24px;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.20), 0 0 0 1px rgba(148, 163, 184, 0.12);
    overflow: hidden;
}

/* ======== Panel izquierdo (branding) ======== */

.login-left {
    position: relative; /* Necesario para las ondas */
    overflow: hidden; /* Que no se “salgan” del panel */
}

.login-left-inner {
    height: 100%;
    padding: 2.75rem 2.75rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Badge superior */
.login-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .35rem .75rem;
    border-radius: 999px;
    background-color: rgba(15, 23, 42, 0.25);
    color: #e5e7eb;
    font-size: .8rem;
    margin-bottom: 1.5rem;
}

    .login-badge .badge-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 20px;
        height: 20px;
        border-radius: 999px;
        background: rgba(248, 250, 252, 0.08);
    }

        .login-badge .badge-icon i {
            font-size: .9rem;
        }

    .login-badge .badge-text {
        font-weight: 500;
    }

/* Título y subtítulo */
.login-title {
    font-size: 1.9rem;
    font-weight: 600;
    margin-bottom: .75rem;
    color: #f9fafb;
}

.login-subtitle {
    font-size: .96rem;
    color: rgba(226, 232, 240, 0.88);
    max-width: 25rem;
}

/* Lista de features */
.login-features {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0;
}

    .login-features li {
        display: flex;
        align-items: center;
        gap: .4rem;
        font-size: .9rem;
        margin-bottom: .4rem;
        color: #e2e8f0;
    }

    .login-features i {
        font-size: 1rem;
        color: #bbf7d0;
    }

/* Ilustración / footer */
.login-left-illustration {
    margin-top: 2rem;
}

.login-illustration-card {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .75rem 1rem;
    border-radius: 999px;
    background-color: rgba(15, 23, 42, 0.35);
    color: #e5e7eb;
    font-size: .85rem;
    margin-bottom: 1.25rem;
}

    .login-illustration-card i {
        font-size: 1.2rem;
    }

.login-left-footer {
    font-size: .8rem;
    color: rgba(226, 232, 240, 0.78);
}

/* ======== Panel derecho (formulario) ======== */

.login-right {
    flex: 0 0 56%;
    background-color: #ffffff;
    padding: 2.75rem 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Contenedor interno del formulario (más liviano) */
.auth-card {
    width: 100%;
    max-width: 420px;
    background-color: transparent; /* se integra con el panel derecho */
    border-radius: 16px;
    padding: 0; /* dejamos que el padding lo maneje el propio contenido */
    animation: auth-fade-in 0.45s ease-out;
}

/* Título y subtítulo del panel derecho */
.auth-title {
    font-size: 1.7rem;
    font-weight: 600;
    margin-bottom: .25rem;
    letter-spacing: -0.02em;
}

.auth-subtitle {
    font-size: .95rem;
    color: #64748b;
    margin-bottom: 1.5rem;
}

/* Animación suave */
@keyframes auth-fade-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Inputs un poco más modernos */
.input-group-text {
    border-radius: .9rem 0 0 .9rem;
    border-color: #e2e8f0;
    background-color: #f8fafc;
    color: #64748b;
}

.form-control {
    border-radius: 0 .9rem .9rem 0;
    border-color: #e2e8f0;
    font-size: .92rem;
    padding-top: .6rem;
    padding-bottom: .6rem;
}

    .form-control:focus {
        border-color: #4f46e5;
        box-shadow: 0 0 0 .12rem rgba(79, 70, 229, 0.16);
    }

/* Botón principal con look Bomberos moderno */
.btn-primary {
    background-color: var(--primary-color, #15803d);
    border-color: var(--primary-color, #15803d);
    border-radius: .9rem;
    font-weight: 600;
    font-size: .95rem;
    padding-top: .65rem;
    padding-bottom: .65rem;
}

    .btn-primary:hover {
        background-color: var(--primary-color-hover, #166534);
        border-color: var(--primary-color-hover, #166534);
    }


/* ======== Botones / inputs ======== */

.btn-primary {
    background-color: var(--primary-color, #15803d);
    border-color: var(--primary-color, #15803d);
    border-radius: .75rem;
    font-weight: 500;
    padding-top: .6rem;
    padding-bottom: .6rem;
}

    .btn-primary:hover {
        background-color: var(--primary-color-hover, #166534);
        border-color: var(--primary-color-hover, #166534);
    }

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    border-radius: .75rem;
    border: 1px solid #e2e8f0;
    background-color: #ffffff;
    font-weight: 500;
    font-size: .9rem;
    padding-top: .6rem;
    padding-bottom: .6rem;
    transition: background-color .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.btn-google-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
}

    .btn-google-icon i {
        font-size: 1rem;
    }

.btn-google:hover {
    background-color: #f8fafc;
    border-color: #cbd5f5;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.25);
}


/* Separador "o ingresa con correo" */
.auth-separator {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 1.5rem 0 1.2rem;
    color: #94a3b8;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .12em;
}

    .auth-separator::before,
    .auth-separator::after {
        content: "";
        flex: 1;
        height: 1px;
        background: linear-gradient( to right, transparent, rgba(148, 163, 184, 0.7), transparent );
    }

/* Campos */
.form-label {
    font-size: .84rem;
    font-weight: 500;
    color: #0f172a;
}

.input-group-text {
    border-radius: .75rem 0 0 .75rem;
    border-color: #e2e8f0;
    background-color: #f8fafc;
    color: #64748b;
}

.form-control {
    border-radius: 0 .75rem .75rem 0;
    border-color: #e2e8f0;
    font-size: .9rem;
    padding-top: .55rem;
    padding-bottom: .55rem;
}

    .form-control:focus {
        border-color: #4f46e5;
        box-shadow: 0 0 0 .1rem rgba(79, 70, 229, 0.15);
    }

/* Toggle mostrar/ocultar password */
.password-wrapper {
    position: relative;
}

    .password-wrapper .toggle-password {
        position: absolute;
        right: .75rem;
        top: 50%;
        transform: translateY(-50%);
        border: none;
        background: transparent;
        padding: 0;
        color: #94a3b8;
        cursor: pointer;
    }

        .password-wrapper .toggle-password:hover {
            color: #64748b;
        }

/* Validaciones */
.input-validation-error,
input.input-validation-error,
select.input-validation-error,
textarea.input-validation-error {
    border-color: var(--danger-color, #ef4444) !important;
    box-shadow: 0 0 0 .1rem rgba(239, 68, 68, 0.12);
}

.field-validation-error {
    color: var(--danger-color, #ef4444);
    font-size: .78rem;
    margin-top: .15rem;
    display: block;
}

/* Links */
:root {
    --accent-red: #e11d2f; /* rojo similar al del número 3 del logo */
}

.auth-link {
    font-size: .86rem;
    color: var(--primary-color, #15803d);
    text-decoration: none;
}

    .auth-link:hover {
        color: var(--accent-red, #e11d2f); /* rojo al pasar el mouse */
        text-decoration: underline;
    }


/* Footer derecho */
.login-footer {
    margin-top: 1.75rem;
    font-size: .8rem;
    color: #94a3b8;
    text-align: center;
}

    .login-footer .separator {
        margin: 0 .35rem;
    }

    .login-footer .small-muted {
        color: #9ca3af;
    }

/* ======== Responsive ======== */

@media (max-width: 992px) {
    .login-page {
        padding: 1.5rem 1rem;
    }

    .login-shell {
        flex-direction: column;
        max-width: 480px;
    }

    .login-left {
        display: none; /* Ocultamos panel ilustración en móviles, como pediste */
    }

    .login-right {
        flex: 1;
        padding: 1.75rem 1.5rem;
    }

    .auth-card {
        max-width: 100%;
        padding: 2rem 1.75rem;
    }
}

@media (max-width: 576px) {
    .auth-title {
        font-size: 1.35rem;
    }

    .auth-subtitle {
        font-size: .88rem;
    }
}
/* === FIX LAYOUT TIPO PHOENIX === */

.login-page {
    height: 100vh;
    min-height: 100vh;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    box-sizing: border-box;
}

.login-shell {
    display: flex !important;
    flex-direction: row;
    width: 100%;
    max-width: 1120px;
    background-color: #f8fafc;
    border-radius: 24px;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.20), 0 0 0 1px rgba(148, 163, 184, 0.12);
    overflow: hidden;
}

/* Columna izquierda (verde) y derecha (form) en desktop */
.login-left {
    flex: 0 0 44%;
}

.login-right {
    flex: 0 0 56%;
}

/* En móviles: solo el card, sin panel izquierdo */
@media (max-width: 992px) {
    .login-shell {
        flex-direction: column;
        max-width: 480px;
    }

    .login-left {
        display: none !important;
    }

    .login-right {
        flex: 1 1 auto;
        padding: 1.75rem 1.5rem;
    }
}
.auth-card {
    width: 100%;
    max-width: 420px;
    background-color: #ffffff;
    border-radius: 18px;
    padding: 2.25rem 2.4rem;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
    animation: auth-fade-in 0.45s ease-out;
}

@keyframes auth-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* === LOGO SUPERIOR EN PANEL VERDE === */
.login-logo-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background-color: #ffffff;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 4px rgba(255, 255, 255, 0.25);
}

    .login-logo-circle img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        border-radius: 50%;
    }
/*.login-logo-circle {
    border: 3px solid rgba(21, 128, 61, 0.5);*/ /* tono del verde institucional */
/*}*/
/* Layout full-page 2/3 – 1/3 */
.login-layout {
    min-height: 100vh;
}

/* Desktop: verde 2/3, login 1/3 */
@media (min-width: 992px) {
    .login-left {
        flex: 0 0 55%;
        background: linear-gradient(135deg, var(--primary-dark, #065f46), var(--primary-color, #15803d));
        color: #e5f9f0;
    }

    .login-right {
        flex: 0 0 45%;
    }
}

/* Mobile: solo panel derecho ocupa todo */
@media (max-width: 991.98px) {
    .login-left {
        display: none !important;
    }

    .login-right {
        flex: 1 1 auto;
        padding: 2rem 1.5rem;
    }
}
.company-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.company-subtitle {
    font-size: 1.05rem;
    font-weight: 500;
    color: #d1fae5;
    margin-top: 2px;
}

.company-motto {
    font-size: .95rem;
    font-weight: 500;
    color: #bbf7d0;
    margin-top: 4px;
}

/* === ONDAS ANIMADAS EN PANEL VERDE === */

/* === ONDAS ANIMADAS EN PANEL VERDE === */

.login-left::before,
.login-left::after {
    content: "";
    position: absolute;
    left: -15%;
    bottom: -20%;
    width: 200%;
    height: 120%;
    background-repeat: no-repeat;
    pointer-events: none;
    opacity: 0.28; /* intensidad general */
    z-index: 1;
}

/* Onda principal (más visible) */
.login-left::before {
    background-image: radial-gradient(circle at 0% 0%, rgba(209, 250, 229, 0.85) 0, transparent 65%), radial-gradient(circle at 40% 100%, rgba(34, 197, 94, 0.80) 0, transparent 60%);
    animation: wave-move-1 10s ease-in-out infinite alternate;
    opacity: 0.32; /* ligeramente más fuerte que la secundaria */
}

/* Onda secundaria (profundidad extra) */
.login-left::after {
    background-image: radial-gradient(circle at 100% 20%, rgba(52, 211, 153, 0.85) 0, transparent 60%), radial-gradient(circle at 60% 120%, rgba(16, 185, 129, 0.8) 0, transparent 65%);
    animation: wave-move-2 14s ease-in-out infinite alternate;
    opacity: 0.22;
}

/* Animaciones */
@keyframes wave-move-1 {
    0% {
        transform: translateX(-8%) translateY(2%) scale(1);
    }

    100% {
        transform: translateX(12%) translateY(-6%) scale(1.08);
    }
}

@keyframes wave-move-2 {
    0% {
        transform: translateX(10%) translateY(4%) scale(1.05);
    }

    100% {
        transform: translateX(-10%) translateY(-4%) scale(1.15);
    }
}

/* Móvil: ocultar ondas */
@media (max-width: 991.98px) {
    .login-left::before,
    .login-left::after {
        display: none;
    }
}

/* Contenedor del carro en la parte baja del panel verde */
#firetruck-container {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 16px;
    height: 90px;
    pointer-events: none;
    overflow: hidden;
    z-index: 5; /* por encima de las ondas */
}

/* Imagen del carro */
#firetruck {
    position: absolute;
    height: 80px; /* ⬅️ tamaño del camión */
    left: -200px; /* arranca fuera de la pantalla */
    opacity: 0;
    mix-blend-mode: multiply; /* disimula fondo blanco contra el verde */
}

/* Recorrido de izquierda a derecha */
/* Recorrido de izquierda a derecha usando 'left' relativo al contenedor */
@keyframes drive-right {
    0% {
        left: -240px; /* fuera por la izquierda */
        opacity: 1;
    }

    10% {
        opacity: 1;
    }

    90% {
        left: 100%; /* llega al borde derecho del contenedor */
        opacity: 1;
    }

    100% {
        left: 115%; /* sale un poco más para “desaparecer” */
        opacity: 0;
    }
}
/* OTP estilo casillas */
.otp-wrapper {
    display: flex;
    justify-content: center; /* ⬅️ centra horizontalmente */
}

.otp-boxes {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
}


.otp-boxes {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
}

.otp-input {
    width: 2.4rem;
    height: 2.7rem;
    border-radius: .6rem;
    border: 1px solid #cbd5e1;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 500;
    outline: none;
    background-color: #f8fafc;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

    .otp-input:focus {
        border-color: #4f46e5;
        background-color: #ffffff;
        box-shadow: 0 0 0 .12rem rgba(79, 70, 229, .25);
    }

.otp-separator {
    display: inline-block;
    width: .75rem;
    text-align: center;
    color: #94a3b8;
    font-weight: 500;
}
/* Ojo de password */
.password-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: .75rem;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    color: #94a3b8;
}

    .toggle-password:hover {
        color: #334155;
    }
/* ============================================================================
   CSS ADICIONAL - CORRECCIONES PARA ONDAS Y Z-INDEX
   ============================================================================
   
   Agrega este código al final de tu archivo login.css o bomberos-theme.css
   para asegurar que las ondas animadas se visualicen correctamente
*/

/* ========================================================================== */
/* PANEL VERDE - Z-INDEX CORRECTO                                            */
/* ========================================================================== */

.login-left {
    position: relative;
    overflow: hidden; /* Que las ondas no se salgan del contenedor */
}

    /* El contenido interno debe estar por encima de las ondas */
    .login-left > * {
        position: relative;
        z-index: 2;
    }

    /* ========================================================================== */
    /* ONDAS ANIMADAS - VERIFICACIÓN                                             */
    /* ========================================================================== */

    /* Si las ondas siguen sin verse, prueba aumentar la opacidad temporalmente */
    .login-left::before {
        opacity: 0.45 !important; /* Temporalmente más visible para debug */
    }

    .login-left::after {
        opacity: 0.35 !important; /* Temporalmente más visible para debug */
    }

/* Una vez confirmado que funcionan, puedes revertir a valores más sutiles:
.login-left::before {
    opacity: 0.32;
}

.login-left::after {
    opacity: 0.22;
}
*/

/* ========================================================================== */
/* CARRO DE BOMBEROS - VERIFICACIÓN Z-INDEX                                  */
/* ========================================================================== */

#firetruck-container {
    z-index: 10; /* Asegurar que esté por encima de todo en el panel verde */
}

/* ========================================================================== */
/* GOOGLE FONTS - FALLBACK                                                   */
/* ========================================================================== */

/* Si Google Fonts no carga, usa estas fuentes alternativas */
body {
    font-family: 'Plus Jakarta Sans', 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

/* ========================================================================== */
/* OTP INPUTS - MEJORAS VISUALES                                             */
/* ========================================================================== */

.otp-input {
    /* Asegurar que el input sea clickeable y visible */
    z-index: 1;
    cursor: text;
}

    .otp-input:focus {
        /* Efecto visual más notorio al enfocar */
        border-color: #4f46e5;
        background-color: #ffffff;
        box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
    }

/* ========================================================================== */
/* TOGGLE PASSWORD - MEJORAS VISUALES                                        */
/* ========================================================================== */

.toggle-password {
    /* Asegurar que el botón sea clickeable */
    z-index: 5;
    font-size: 1.1rem;
    line-height: 1;
}

    .toggle-password i {
        /* Centrar el ícono */
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .toggle-password:focus {
        /* Efecto visual al usar teclado */
        outline: 2px solid #4f46e5;
        outline-offset: 2px;
        border-radius: 4px;
    }

/* ========================================================================== */
/* ANIMACIONES - VERIFICACIÓN                                                */
/* ========================================================================== */

/* Asegurar que las animaciones estén definidas */
@keyframes wave-move-1 {
    0% {
        transform: translateX(-8%) translateY(2%) scale(1);
    }

    100% {
        transform: translateX(12%) translateY(-6%) scale(1.08);
    }
}

@keyframes wave-move-2 {
    0% {
        transform: translateX(10%) translateY(4%) scale(1.05);
    }

    100% {
        transform: translateX(-10%) translateY(-4%) scale(1.15);
    }
}

@keyframes drive-right {
    0% {
        left: -240px;
        opacity: 1;
    }

    10% {
        opacity: 1;
    }

    90% {
        left: 100%;
        opacity: 1;
    }

    100% {
        left: 115%;
        opacity: 0;
    }
}

@keyframes auth-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================================================== */
/* DEBUG - TEMPORAL (REMOVER EN PRODUCCIÓN)                                  */
/* ========================================================================== */

/* Descomentar estas reglas para verificar que las ondas existen */
/*
.login-left::before,
.login-left::after {
    border: 2px solid red !important; 
}
*/

/* Descomentar para ver el contenedor del carro de bomberos */
/*
#firetruck-container {
    border: 2px solid yellow !important;
    background: rgba(255, 255, 0, 0.1) !important;
}
*/

/* ========================================================================== */
/* RESPONSIVE - VERIFICAR QUE LAS ONDAS SE OCULTEN EN MOBILE                 */
/* ========================================================================== */

@media (max-width: 991.98px) {
    .login-left::before,
    .login-left::after {
        display: none !important;
    }
}

/* ========================================================================== */
/* ACCESIBILIDAD - MEJORAS                                                   */
/* ========================================================================== */

/* Mejorar contraste del placeholder */
.form-control::placeholder {
    color: #94a3b8;
    opacity: 1;
}

/* Mejorar feedback visual en estados de error */
.input-validation-error {
    animation: shake 0.3s ease-in-out;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* ========================================================================== */
/* PERFORMANCE - OPTIMIZACIONES                                              */
/* ========================================================================== */

/* Acelerar las animaciones con will-change */
.login-left::before,
.login-left::after {
    will-change: transform;
}

#firetruck {
    will-change: left, opacity;
}

.auth-card {
    will-change: transform, opacity;
}