/* Variables de color de la empresa */
:root {
    --color-primary: #0066E0;
    --color-secondary: #9FC6FF;
    --color-dark: #0033C4;
    --color-deep: #00125E;
    --color-pink-light: #FFD2EC;
    --color-pink: #E54193;
    --color-pink-light2: #FF82BB;
    --color-white: #FFFDFA;
    --color-success: #28a745;
    --color-danger: #dc3545;
}

/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* ============================================
   VIDEO OVERLAY - CORREGIDO
   ============================================ */
.video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: var(--color-deep);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: videoFadeIn 0.5s ease;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    overflow: hidden;
}

.video-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

@keyframes videoFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.video-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--color-deep);
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-container video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
    filter: brightness(0.9);
}

/* Controles de video */
.video-controls {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    max-width: 90%;
    z-index: 10;
}

.video-controls-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

/* Botón de audio */
.btn-audio-toggle {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.btn-audio-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.btn-audio-toggle.audio-active {
    background: rgba(40, 167, 69, 0.3);
    border-color: rgba(40, 167, 69, 0.4);
}

.btn-audio-toggle.audio-active:hover {
    background: rgba(40, 167, 69, 0.4);
}

.btn-audio-toggle i {
    font-size: 16px;
}

/* Botón saltar video */
.btn-skip-video {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 10px 30px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.btn-skip-video:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

/* Video brand */
.video-brand {
    position: absolute;
    top: 30px;
    left: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideDownLogo 1s ease;
    z-index: 10;
}

@keyframes slideDownLogo {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.video-brand img {
    height: 35px;
    filter: brightness(1.2);
}

.brand-name {
    color: white;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: linear-gradient(90deg, var(--color-dark), var(--color-primary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ============================================
   LOGIN - CORREGIDO SIN DUPLICACIÓN
   ============================================ */
.login-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-pink-light2) 0%, var(--color-primary) 100%);
    z-index: 1;
    padding: 15px;
    overflow: hidden;
}

/* Fondo decorativo - UN SOLO FONDO */
.login-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(ellipse at 30% 50%, rgba(255, 130, 187, 0.3) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 80%, rgba(159, 198, 255, 0.3) 0%, transparent 50%);
    animation: rotateBackground 30s linear infinite;
    pointer-events: none;
}

@keyframes rotateBackground {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Login Box */
.login-box {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
    padding: 0 10px;
}

.login-box.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Card */
.card {
    border-radius: 20px !important;
    border: none;
    transition: all 0.4s ease;
    overflow: hidden;
    background: rgba(255, 253, 250, 0.2) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    box-shadow: 
        0 8px 32px rgba(0, 18, 94, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 12px 40px rgba(0, 18, 94, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

.login-card-body {
    padding: 20px 25px 25px 25px !important;
    background: rgba(255, 253, 250, 0.15) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
}

.login-logo-img {
    filter: drop-shadow(0 2px 10px rgba(0, 102, 224, 0.2));
    transition: transform 0.3s ease;
    max-width: 100%;
    height: auto;
}

.login-logo-img:hover {
    transform: scale(1.05);
}

.login-box-msg {
    font-size: 12px !important;
    color: rgba(0, 0, 0, 0.5) !important;
    margin-bottom: 0 !important;
}

/* ============================================
   CAPTCHA
   ============================================ */
.captcha-container {
    margin: 8px 0 10px 0;
}

.captcha-box {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 14px;
    transition: all 0.3s ease;
}

.captcha-box:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.captcha-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.captcha-icon {
    color: var(--color-primary);
    font-size: 14px;
}

.captcha-title {
    font-size: 12px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.6);
    letter-spacing: 0.5px;
}

.captcha-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.captcha-operation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.8);
    padding: 6px 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
}

.captcha-number {
    color: var(--color-primary);
    font-size: 22px;
    min-width: 25px;
    text-align: center;
}

.captcha-operator {
    color: rgba(0, 0, 0, 0.4);
    font-size: 18px;
}

.captcha-question-mark {
    color: var(--color-pink);
    font-size: 24px;
    animation: pulseQuestion 1.5s ease-in-out infinite;
}

@keyframes pulseQuestion {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
}

.captcha-input-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.captcha-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(5px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px !important;
    padding: 6px 12px;
    font-size: 16px;
    text-align: center;
    color: #2d3748;
    height: 38px;
    transition: all 0.3s ease;
    min-width: 0;
}

.captcha-input:focus {
    border-color: var(--color-primary);
    background: rgba(255, 255, 255, 0.5) !important;
    box-shadow: 0 0 0 3px rgba(0, 102, 224, 0.12);
}

.captcha-input.correct {
    border-color: var(--color-success) !important;
    background: rgba(40, 167, 69, 0.12) !important;
}

.captcha-input.incorrect {
    border-color: var(--color-danger) !important;
    background: rgba(220, 53, 69, 0.12) !important;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

.btn-refresh-captcha {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px !important;
    padding: 6px 12px;
    color: var(--color-primary);
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 14px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-refresh-captcha:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: rotate(90deg);
    border-color: var(--color-primary);
}

.btn-refresh-captcha:active {
    transform: rotate(180deg);
}

.captcha-feedback {
    min-height: 22px;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.captcha-feedback.error {
    color: var(--color-danger);
    background: rgba(220, 53, 69, 0.08);
    border: 1px solid rgba(220, 53, 69, 0.15);
}

.captcha-feedback.success {
    color: var(--color-success);
    background: rgba(40, 167, 69, 0.08);
    border: 1px solid rgba(40, 167, 69, 0.15);
}

/* ============================================
   INPUTS Y FORMULARIOS
   ============================================ */
.input-group-text {
    background: rgba(255, 255, 255, 0.4) !important;
    backdrop-filter: blur(5px);
    border-right: none;
    padding: 0.4rem 0.6rem;
    border-color: rgba(255, 255, 255, 0.3);
    font-size: 14px;
}

.form-control {
    background: rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(5px);
    border-left: none;
    border-right: none;
    transition: all 0.3s;
    padding: 0.4rem 0.6rem;
    border-color: rgba(255, 255, 255, 0.3);
    color: #2d3748;
    font-size: 14px;
    height: 38px;
}

.form-control::placeholder {
    color: rgba(0, 0, 0, 0.35);
}

.form-control:focus {
    box-shadow: none;
    border-color: var(--color-primary);
    background: rgba(255, 255, 255, 0.5) !important;
}

.input-group:focus-within {
    box-shadow: 0 0 0 3px rgba(0, 102, 224, 0.12);
    border-radius: 8px;
}

.btn-outline-secondary {
    border-left: none;
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(5px);
    color: #4a5568;
    height: 38px;
    padding: 0.4rem 0.6rem;
}

.btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.5) !important;
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-dark)) !important;
    border: none;
    transition: all 0.3s;
    border-radius: 10px;
    font-weight: 600;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 102, 224, 0.25);
    height: 42px;
    font-size: 15px;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 102, 224, 0.4);
    background: linear-gradient(135deg, var(--color-dark), var(--color-primary)) !important;
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.custom-control-input:checked ~ .custom-control-label::before {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    box-shadow: 0 2px 8px rgba(0, 102, 224, 0.25);
}

.custom-control-label {
    cursor: pointer;
    font-size: 13px;
    color: rgba(0, 0, 0, 0.6);
}

.custom-control-label::before,
.custom-control-label::after {
    width: 16px;
    height: 16px;
    top: 1px;
}

.text-primary {
    color: var(--color-primary) !important;
    font-weight: 500;
    font-size: 13px !important;
}

.text-primary:hover {
    color: var(--color-dark) !important;
    text-decoration: none;
}

/* ============================================
   RECUPERACIÓN DE CONTRASEÑA
   ============================================ */
.recovery-step {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.password-requirements {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    border-radius: 10px;
    padding: 10px 12px;
    margin-top: 8px;
}

.requirement-item {
    font-size: 11px;
    margin: 3px 0;
    color: rgba(0, 0, 0, 0.6);
    transition: all 0.3s ease;
}

.requirement-item.valid {
    color: #28a745;
}

.requirement-item.invalid {
    color: #dc3545;
}

.requirement-item i {
    margin-right: 5px;
    width: 14px;
}

#verificationCode {
    font-size: 20px;
    letter-spacing: 5px;
    text-align: center;
    font-family: monospace;
    background: rgba(255, 255, 255, 0.3) !important;
    height: 42px;
}

.alert {
    border-radius: 8px;
    padding: 10px 12px;
    margin-top: 8px;
    animation: slideDown 0.3s ease-out;
    backdrop-filter: blur(5px);
    font-size: 13px;
}

.alert-success {
    background: rgba(40, 167, 69, 0.15) !important;
    border: 1px solid rgba(40, 167, 69, 0.2);
    color: #155724;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.15) !important;
    border: 1px solid rgba(220, 53, 69, 0.2);
    color: #721c24;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#defaultLoginForm {
    display: block;
}

#recoveryContainer {
    display: none;
}

.recovery-mode #defaultLoginForm {
    display: none;
}

.recovery-mode #recoveryContainer {
    display: block;
}

/* ============================================
   RESPONSIVE - COMPLETO Y CORREGIDO
   ============================================ */

/* Tablets y pantallas medianas */
@media (max-width: 1024px) {
    .login-box {
        max-width: 400px;
    }
    
    .video-brand {
        top: 20px;
        left: 20px;
        padding: 8px 16px;
    }
    
    .video-brand img {
        height: 30px;
    }
    
    .brand-name {
        font-size: 14px;
    }
}

/* Tablets pequeñas y móviles grandes */
@media (max-width: 768px) {
    .login-box {
        width: 95%;
        max-width: 380px;
        padding: 0 5px;
    }
    
    .login-card-body {
        padding: 15px 18px 20px 18px !important;
    }
    
    .login-logo-img {
        height: 55px;
        width: auto;
    }
    
    .login-box-msg {
        font-size: 11px !important;
    }
    
    /* Video controls */
    .video-controls {
        bottom: 30px;
        width: 95%;
        max-width: 95%;
    }
    
    .video-controls-row {
        gap: 10px;
    }
    
    .btn-audio-toggle,
    .btn-skip-video {
        padding: 8px 18px;
        font-size: 12px;
        white-space: nowrap;
    }
    
    .btn-audio-toggle i,
    .btn-skip-video i {
        font-size: 14px;
    }
    
    .video-brand {
        top: 15px;
        left: 15px;
        padding: 8px 14px;
    }
    
    .video-brand img {
        height: 28px;
    }
    
    .brand-name {
        font-size: 13px;
    }
    
    /* Captcha */
    .captcha-operation {
        font-size: 17px;
        gap: 6px;
    }

    .captcha-number {
        font-size: 19px;
        min-width: 20px;
    }

    .captcha-input {
        font-size: 14px;
        height: 34px;
        padding: 4px 10px;
    }
    
    .btn-refresh-captcha {
        height: 34px;
        padding: 4px 10px;
        font-size: 13px;
    }
    
    .captcha-box {
        padding: 8px 12px;
    }
    
    .btn-primary {
        height: 38px;
        font-size: 14px;
    }
    
    .form-control {
        height: 34px;
        font-size: 13px;
        padding: 0.3rem 0.5rem;
    }
    
    .input-group-text {
        padding: 0.3rem 0.5rem;
        font-size: 13px;
    }
    
    .btn-outline-secondary {
        height: 34px;
        padding: 0.3rem 0.5rem;
    }
}

/* Móviles pequeños */
@media (max-width: 480px) {
    .login-wrapper {
        padding: 10px;
    }
    
    .login-box {
        max-width: 340px;
        padding: 0;
    }
    
    .login-card-body {
        padding: 12px 14px 16px 14px !important;
    }
    
    .login-logo-img {
        height: 45px;
        width: auto;
    }
    
    .login-box-msg {
        font-size: 10px !important;
    }
    
    /* Video controls - móvil */
    .video-controls {
        bottom: 20px;
        width: 98%;
        max-width: 98%;
    }
    
    .video-controls-row {
        gap: 8px;
        flex-direction: column;
        width: 100%;
    }
    
    .btn-audio-toggle,
    .btn-skip-video {
        padding: 10px 20px;
        font-size: 13px;
        width: 100%;
        justify-content: center;
        white-space: normal;
    }
    
    .btn-audio-toggle i,
    .btn-skip-video i {
        font-size: 15px;
    }
    
    .video-brand {
        top: 10px;
        left: 10px;
        padding: 6px 12px;
        gap: 10px;
    }
    
    .video-brand img {
        height: 24px;
    }
    
    .brand-name {
        font-size: 11px;
        letter-spacing: 1px;
    }
    
    /* Captcha - móvil */
    .captcha-operation {
        font-size: 15px;
        gap: 4px;
        padding: 4px 0;
        flex-wrap: wrap;
    }
    
    .captcha-number {
        font-size: 17px;
        min-width: 18px;
    }
    
    .captcha-operator {
        font-size: 15px;
    }
    
    .captcha-question-mark {
        font-size: 20px;
    }
    
    .captcha-title {
        font-size: 11px;
    }
    
    .captcha-input {
        font-size: 14px;
        height: 32px;
        padding: 4px 8px;
        min-width: 60px;
    }
    
    .btn-refresh-captcha {
        height: 32px;
        padding: 4px 10px;
        font-size: 12px;
    }
    
    .captcha-box {
        padding: 8px 10px;
    }
    
    .captcha-header {
        gap: 6px;
        margin-bottom: 6px;
    }
    
    .captcha-body {
        gap: 6px;
    }
    
    .captcha-feedback {
        font-size: 11px;
        min-height: 18px;
        padding: 2px 6px;
    }
    
    /* Botones y formularios - móvil */
    .btn-primary {
        height: 36px;
        font-size: 13px;
        padding: 0 12px;
    }
    
    .form-control {
        height: 32px;
        font-size: 12px;
        padding: 0.2rem 0.4rem;
    }
    
    .input-group-text {
        padding: 0.2rem 0.4rem;
        font-size: 12px;
    }
    
    .btn-outline-secondary {
        height: 32px;
        padding: 0.2rem 0.4rem;
        font-size: 12px;
    }
    
    .custom-control-label {
        font-size: 11px;
    }
    
    .custom-control-label::before,
    .custom-control-label::after {
        width: 14px;
        height: 14px;
        top: 2px;
    }
    
    .text-primary {
        font-size: 11px !important;
    }
    
    /* Recovery - móvil */
    .password-requirements {
        padding: 8px 10px;
    }
    
    .requirement-item {
        font-size: 10px;
        margin: 2px 0;
    }
    
    #verificationCode {
        font-size: 18px;
        letter-spacing: 4px;
        height: 38px;
    }
    
    .alert {
        font-size: 12px;
        padding: 8px 10px;
    }
}

/* Orientación landscape en móviles */
@media (max-height: 500px) and (orientation: landscape) {
    .login-wrapper {
        padding: 8px;
        align-items: center;
    }
    
    .login-box {
        max-width: 320px;
        transform: scale(0.85);
        transform-origin: center;
    }
    
    .login-card-body {
        padding: 10px 14px 14px 14px !important;
    }
    
    .login-logo-img {
        height: 35px;
    }
    
    .login-box-msg {
        font-size: 10px !important;
        margin-bottom: 4px !important;
    }
    
    .captcha-operation {
        font-size: 14px;
        padding: 3px 0;
    }
    
    .captcha-number {
        font-size: 16px;
        min-width: 16px;
    }
    
    .captcha-box {
        padding: 6px 10px;
    }
    
    .captcha-input {
        height: 28px;
        font-size: 13px;
        padding: 2px 8px;
    }
    
    .btn-refresh-captcha {
        height: 28px;
        padding: 2px 8px;
        font-size: 12px;
    }
    
    .form-control {
        height: 28px;
        font-size: 12px;
        padding: 0.2rem 0.4rem;
    }
    
    .input-group-text {
        padding: 0.2rem 0.4rem;
        font-size: 12px;
    }
    
    .btn-outline-secondary {
        height: 28px;
        padding: 0.2rem 0.4rem;
    }
    
    .btn-primary {
        height: 30px;
        font-size: 12px;
        padding: 0 10px;
    }
    
    .mb-2 {
        margin-bottom: 0.3rem !important;
    }
    
    .mb-3 {
        margin-bottom: 0.4rem !important;
    }
    
    .mt-2 {
        margin-top: 0.3rem !important;
    }
    
    .captcha-feedback {
        min-height: 16px;
        font-size: 10px;
    }
}

/* Pantallas muy grandes (4K, etc) */
@media (min-width: 1920px) {
    .login-box {
        max-width: 480px;
    }
    
    .login-card-body {
        padding: 30px 35px 35px 35px !important;
    }
    
    .login-logo-img {
        height: 120px;
        width: auto;
    }
    
    .login-box-msg {
        font-size: 14px !important;
    }
    
    .captcha-operation {
        font-size: 24px;
    }
    
    .captcha-number {
        font-size: 26px;
        min-width: 30px;
    }
    
    .captcha-input {
        height: 44px;
        font-size: 18px;
    }
    
    .btn-refresh-captcha {
        height: 44px;
        font-size: 16px;
    }
    
    .form-control {
        height: 44px;
        font-size: 16px;
    }
    
    .input-group-text {
        padding: 0.5rem 0.8rem;
        font-size: 16px;
    }
    
    .btn-outline-secondary {
        height: 44px;
        padding: 0.5rem 0.8rem;
    }
    
    .btn-primary {
        height: 48px;
        font-size: 17px;
    }
    
    .video-brand {
        top: 40px;
        left: 40px;
        padding: 15px 30px;
    }
    
    .video-brand img {
        height: 45px;
    }
    
    .brand-name {
        font-size: 20px;
    }
}

/* ============================================
   ANIMACIONES ADICIONALES
   ============================================ */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.logo-hover:hover {
    animation: pulse 1s ease infinite;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-dark);
}

/* Ajustes para dispositivos con notch */
@supports (padding: max(0px)) {
    .video-brand {
        top: max(30px, env(safe-area-inset-top));
        left: max(30px, env(safe-area-inset-left));
    }
    
    .video-controls {
        bottom: max(40px, env(safe-area-inset-bottom));
    }
    
    .login-wrapper {
        padding: max(15px, env(safe-area-inset-top)) max(15px, env(safe-area-inset-right)) max(15px, env(safe-area-inset-bottom)) max(15px, env(safe-area-inset-left));
    }
}

/* ============================================
   ESTILOS PARA 2FA Y CONTADORES
   ============================================ */
.two-factor-step {
    animation: fadeIn 0.5s ease-in-out;
}

.countdown-timer {
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    display: inline-block;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.countdown-timer.text-danger {
    background: rgba(220, 53, 69, 0.15);
    border-color: rgba(220, 53, 69, 0.2);
    color: #dc3545;
}

.countdown-timer.text-danger strong {
    color: #dc3545;
}

#twoFactorContainer {
    padding: 5px 0;
}

#twoFactorContainer .input-group {
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

#twoFactorCode {
    font-size: 20px;
    letter-spacing: 5px;
    text-align: center;
    font-family: monospace;
    height: 46px;
}

#twoFactorContainer .btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#twoFactorContainer .text-primary {
    font-size: 13px !important;
}

#twoFactorContainer .text-primary:hover {
    text-decoration: none;
}

/* Ajustes responsive para 2FA */
@media (max-width: 480px) {
    #twoFactorCode {
        font-size: 18px;
        letter-spacing: 4px;
        height: 40px;
    }
    
    .countdown-timer {
        font-size: 12px;
        padding: 4px 10px;
    }
    
    #twoFactorContainer .input-group {
        max-width: 100%;
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    #twoFactorCode {
        font-size: 16px;
        letter-spacing: 3px;
        height: 34px;
    }
    
    .countdown-timer {
        font-size: 11px;
        padding: 3px 8px;
    }
}

/* Animación para el contador de tiempo */
@keyframes pulse-countdown {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.countdown-timer.text-danger {
    animation: pulse-countdown 1s ease-in-out infinite;
}

.password-requirements {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    font-size: 0.85rem;
}

.requirement-item {
    padding: 2px 0;
    color: #6c757d;
}

.requirement-item.valid {
    color: #28a745;
}

.requirement-item.invalid {
    color: #dc3545;
}

/* ==================== MODAL CAMBIO DE CONTRASEÑA PRIMER ACCESO ==================== */
.cambio-password-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeInOverlay 0.3s ease;
}

@keyframes fadeInOverlay {
    from { opacity: 0; }
    to { opacity: 1; }
}

.cambio-password-modal {
    background: white;
    border-radius: 15px;
    padding: 40px 35px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUpModal 0.4s ease;
}

@keyframes slideUpModal {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cambio-password-modal .password-requirements {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px 15px;
    margin-top: 10px;
}

.cambio-password-modal .requirement-item {
    padding: 2px 0;
    font-size: 13px;
    transition: all 0.3s ease;
}

.cambio-password-modal .requirement-item.valid {
    color: #28a745;
}

.cambio-password-modal .requirement-item.valid i {
    color: #28a745;
}

.cambio-password-modal .requirement-item.invalid {
    color: #dc3545;
}

.cambio-password-modal .requirement-item.invalid i {
    color: #dc3545;
}

/* Animación para el botón de audio */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Scroll en el modal */
.cambio-password-modal::-webkit-scrollbar {
    width: 6px;
}

.cambio-password-modal::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.cambio-password-modal::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.cambio-password-modal::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Responsive */
@media (max-width: 576px) {
    .cambio-password-modal {
        padding: 25px 20px;
        width: 95%;
    }
}