/* ==========================================================
   LANDING GEAR MRO - LOGIN STYLES
   Estilo: Aviation Tech (fondo oscuro tecnológico)
   Layout: Split (SVG izquierda + Formulario derecha)
   ========================================================== */

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    
    /* FONDO AVIATION TECH - Gradiente oscuro con azul */
    background: linear-gradient(135deg, #0a0e27 0%, #1a2151 50%, #0a0e27 100%);
    background-attachment: fixed;
}

/* ==========================================================
   GRID TECNOLÓGICO DE FONDO
   ========================================================== */
.grid-bg {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        linear-gradient(rgba(0, 212, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.04) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 1;
    pointer-events: none;
}

/* ==========================================================
   LUCES AMBIENTALES (glow radial)
   ========================================================== */
.ambient-lights {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(0, 212, 255, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(0, 150, 255, 0.1) 0%, transparent 40%);
    z-index: 2;
    pointer-events: none;
}

/* ==========================================================
   WRAPPER PRINCIPAL
   ========================================================== */
.login-wrapper {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 20px 0;
}

.login-wrapper .container-fluid {
    min-height: 100vh;
    padding: 0 30px;
}

/* ==========================================================
   LADO IZQUIERDO: BRANDING + SVG
   ========================================================== */
.brand-side {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    animation: fadeInLeft 0.8s ease;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.brand-content {
    max-width: 600px;
    width: 100%;
    color: #fff;
}

.brand-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 40px;
}

.brand-logo-wrapper {
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, #00d4ff, #0080ff);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
    flex-shrink: 0;
}

.brand-logo-wrapper i {
    font-size: 28px;
    color: #0a0e27;
}

.brand-title {
    font-family: 'Orbitron', sans-serif;
    color: #fff;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin: 0 0 4px 0;
}

.brand-tagline {
    color: #00d4ff;
    font-size: 0.8rem;
    letter-spacing: 3px;
    margin: 0;
    text-transform: uppercase;
}

/* Contenedor de la imagen SVG */
.brand-image-wrapper {
    position: relative;
    margin: 30px 0;
    text-align: center;
}

.brand-image-wrapper::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    height: 90%;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.15) 0%, transparent 70%);
    z-index: -1;
}

.brand-image {
    max-width: 100%;
    width: 100%;
    max-height: 450px;
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.4));
    animation: floatImage 4s ease-in-out infinite;
}

@keyframes floatImage {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Features bajo la imagen */
.brand-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 30px;
    padding: 25px;
    background: rgba(15, 23, 54, 0.5);
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #b4c2e0;
    font-size: 0.9rem;
}

.feature-item i {
    width: 36px;
    height: 36px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.25);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00d4ff;
    font-size: 14px;
    flex-shrink: 0;
}

/* ==========================================================
   LADO DERECHO: FORMULARIO
   ========================================================== */
.form-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    min-height: 100vh;
    animation: fadeInRight 0.8s ease;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.login-card {
    background: rgba(15, 23, 54, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 16px;
    padding: 45px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    width: 100%;
    max-width: 450px;
}

/* Línea decorativa superior */
.login-card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 20px;
    right: 20px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00d4ff, transparent);
}

/* Logo móvil (visible solo en pantallas pequeñas) */
.mobile-logo {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.15);
}

.mobile-logo .logo-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #00d4ff, #0080ff);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
}

.mobile-logo .logo-icon i {
    font-size: 26px;
    color: #0a0e27;
}

.mobile-title {
    font-family: 'Orbitron', sans-serif;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin: 0 0 4px 0;
}

.mobile-subtitle {
    color: #00d4ff;
    font-size: 0.75rem;
    letter-spacing: 2px;
    margin: 0;
    text-transform: uppercase;
}

/* Header del formulario */
.form-header {
    margin-bottom: 28px;
}

.form-title {
    font-family: 'Orbitron', sans-serif;
    color: #fff;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin: 0 0 6px 0;
}

.form-subtitle {
    color: #8b9ac7;
    font-size: 0.85rem;
    margin: 0;
}

/* ==========================================================
   CAMPOS DEL FORMULARIO
   ========================================================== */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    color: #8b9ac7;
    font-size: 0.72rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 8px;
    display: block;
    font-weight: 500;
}

.input-wrapper {
    position: relative;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.input-wrapper:focus-within {
    border-color: #00d4ff;
    background: rgba(0, 212, 255, 0.05);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.input-wrapper > i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #00d4ff;
    font-size: 14px;
    pointer-events: none;
}

.form-group input {
    width: 100%;
    background: transparent;
    border: none;
    padding: 12px 44px 12px 42px;
    color: #fff;
    font-size: 0.9rem;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
}

.form-group input::placeholder {
    color: rgba(139, 154, 199, 0.5);
}

/* Autocomplete fix */
.form-group input:-webkit-autofill,
.form-group input:-webkit-autofill:hover,
.form-group input:-webkit-autofill:focus {
    -webkit-text-fill-color: #fff;
    -webkit-box-shadow: 0 0 0px 1000px rgba(0, 0, 0, 0.3) inset;
    transition: background-color 5000s ease-in-out 0s;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #8b9ac7;
    cursor: pointer;
    padding: 6px 8px;
    transition: color 0.3s;
}

.toggle-password:hover {
    color: #00d4ff;
}

/* ==========================================================
   OPCIONES
   ========================================================== */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 18px 0 22px;
    font-size: 0.82rem;
    flex-wrap: wrap;
    gap: 10px;
}

.remember-label {
    color: #8b9ac7;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
    margin: 0;
}

.remember-label input[type="checkbox"] {
    accent-color: #00d4ff;
    cursor: pointer;
}

.form-options a {
    color: #00d4ff;
    text-decoration: none;
    transition: opacity 0.3s;
}

.form-options a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* ==========================================================
   BOTÓN INICIAR SESIÓN
   ========================================================== */
.btn-login {
    width: 100%;
    background: linear-gradient(135deg, #00d4ff, #0080ff);
    color: #0a0e27;
    border: none;
    padding: 13px;
    border-radius: 8px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-login:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ==========================================================
   FOOTER
   ========================================================== */
.form-footer {
    text-align: center;
    color: #8b9ac7;
    font-size: 0.82rem;
    margin: 22px 0 0 0;
}

.form-footer a {
    color: #00d4ff;
    text-decoration: none;
    font-weight: 500;
}

.form-footer a:hover {
    text-decoration: underline;
}

.version-footer {
    text-align: center;
    color: #5d6b94;
    font-size: 0.72rem;
    margin-top: 25px;
    padding-top: 18px;
    border-top: 1px solid rgba(0, 212, 255, 0.1);
    letter-spacing: 1px;
}

/* ==========================================================
   ALERTAS
   ========================================================== */
#loginAlert {
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.85rem;
    border: 1px solid transparent;
    margin-bottom: 15px;
}

#loginAlert.alert-danger {
    background: rgba(220, 53, 69, 0.15);
    border-color: rgba(220, 53, 69, 0.4);
    color: #ff8a93;
}

#loginAlert.alert-success {
    background: rgba(25, 135, 84, 0.15);
    border-color: rgba(25, 135, 84, 0.4);
    color: #7dd3a0;
}

#loginAlert.alert-warning {
    background: rgba(255, 193, 7, 0.15);
    border-color: rgba(255, 193, 7, 0.4);
    color: #ffd454;
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 991.98px) {
    .login-wrapper .container-fluid {
        padding: 0 15px;
    }
    
    .form-side {
        padding: 30px 15px;
    }
}

@media (max-width: 576px) {
    .login-card {
        padding: 35px 25px;
        border-radius: 12px;
    }
    
    .form-title {
        font-size: 1.1rem;
    }
    
    .mobile-title {
        font-size: 1rem;
    }
    
    .form-options {
        font-size: 0.78rem;
    }
}

@media (max-height: 700px) and (min-width: 992px) {
    .brand-features {
        padding: 18px;
        gap: 10px;
        margin-top: 20px;
    }
    
    .feature-item {
        font-size: 0.82rem;
    }
    
    .brand-image {
        max-height: 320px;
    }
}
