/* ============================================
   Página Login - Estilos Específicos
   ============================================ */

/* ========== Fondo con color primary ========== */
.miEstilo {
    padding: 0 !important;
    background: linear-gradient(135deg, #043362 0%, #065a9e 50%, #043362 100%) !important;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Patrón decorativo de fondo */
.miEstilo::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.05) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(255,255,255,0.03) 0%, transparent 40%);
    pointer-events: none;
    z-index: 0;
}

/* Círculos decorativos flotantes */
.miEstilo::after {
    content: '';
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255,255,255,0.03);
    top: -100px;
    right: -100px;
    pointer-events: none;
    z-index: 0;
}

/* ========== Layout Principal ========== */
.simple-page-wrap {
    max-width: 440px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.6s ease-out;
}

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

/* ========== Logo ========== */
.simple-page-logo {
    text-align: center;
    margin-bottom: 10px !important;
}

.simple-page-logo img {
    max-width: 400px;
    max-height: 130px;
    width: auto;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
    transition: transform 0.3s ease;
}

.simple-page-logo img:hover {
    transform: scale(1.03);
}

/* ========== Formulario ========== */
.simple-page-form {
    background: rgba(255, 255, 255, 0.97);
    padding: 36px 32px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3),
                0 0 0 1px rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.simple-page-form:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 68px rgba(0, 0, 0, 0.35),
                0 0 0 1px rgba(255,255,255,0.1);
}

/* ========== Título ========== */
.form-title {
    font-size: 26px;
    font-weight: 700;
    color: #043362;
    margin-bottom: 28px;
    letter-spacing: -0.3px;
}

/* ========== Subtítulo ========== */
.form-subtitle {
    text-align: center;
    color: #7a8a9e;
    font-size: 14px;
    font-weight: 400;
    margin-bottom: 26px;
    margin-top: -18px;
    line-height: 1.4;
}

/* ========== Campos del formulario ========== */
.simple-page-form .form-group {
    margin-bottom: 22px;
}

.simple-page-form .form-group > span {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #475569;
    font-size: 13px;
    text-transform: none;
    letter-spacing: normal;
}

.simple-page-form .form-control {
    width: 100%;
    padding: 14px 16px;
    border-radius: 10px;
    border: 2px solid #e8ecf1;
    font-size: 15px;
    transition: all 0.3s ease;
    background-color: #f8fafc;
    color: #333;
    height: auto !important;
}

.simple-page-form .form-control:focus {
    border-color: #043362;
    box-shadow: 0 0 0 4px rgba(4, 51, 98, 0.12);
    outline: none;
    background-color: #fff;
}

.simple-page-form .form-control::placeholder {
    color: #a0aec0;
}

/* ========== Inputs con icono ========== */
.login-input-icon {
    position: relative;
    width: 100%;
}

.login-input-icon > i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 15px;
    z-index: 2;
    pointer-events: none;
    transition: color 0.3s ease;
}

.login-input-icon > .form-control {
    padding-left: 44px !important;
}

.login-input-icon:focus-within > i {
    color: #043362;
}

/* Campo contraseña: espacio para el control dentro del input (derecha) */
.login-input-icon--password > .form-control {
    padding-right: 50px !important;
}

/* Ojo incrustado dentro del borde del input, a la derecha */
.login-input-icon--password .login-password-toggle {
    position: absolute;
    top: 2px;
    right: 2px;
    bottom: 2px;
    width: 44px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0 8px 8px 0;
    background-color: #f8fafc;
    color: #94a3b8;
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
    box-shadow: inset 1px 0 0 #e8ecf1;
    transition: color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.login-input-icon--password:focus-within .login-password-toggle {
    background-color: #fff;
    box-shadow: inset 1px 0 0 rgba(4, 51, 98, 0.12);
}

.login-input-icon--password .login-password-toggle:hover,
.login-input-icon--password .login-password-toggle:focus {
    color: #043362;
    outline: none;
}

.login-input-icon--password .login-password-toggle:focus-visible {
    color: #043362;
    box-shadow: inset 1px 0 0 rgba(4, 51, 98, 0.2), 0 0 0 2px rgba(4, 51, 98, 0.18);
}

#dvPass.has-warning .login-password-toggle {
    background-color: #fff5f5;
    box-shadow: inset 1px 0 0 #fecaca;
}

#dvPass.has-warning .login-input-icon--password:focus-within .login-password-toggle {
    background-color: #fff5f5;
    box-shadow: inset 1px 0 0 #fecaca;
}

/* ========== Select de idioma con icono ========== */
.login-select-wrapper {
    position: relative;
    width: 100%;
}

.login-select-wrapper > i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 15px;
    z-index: 3;
    pointer-events: none;
    transition: color 0.3s ease;
}

.login-select-wrapper:focus-within > i {
    color: #043362;
}

.login-select-wrapper::after {
    content: '\f107';
    font-family: 'FontAwesome';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 14px;
    pointer-events: none;
    z-index: 3;
}

.simple-page-form select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: none !important;
    padding-left: 44px !important;
    padding-right: 40px;
    cursor: pointer;
}

/* ========== Botón Login ========== */
.simple-page-form .btn-primary {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 700;
    margin-top: 8px;
    border-radius: 10px;
    background: linear-gradient(135deg, #043362, #065a9e) !important;
    border: none !important;
    color: #fff;
    letter-spacing: 0.3px;
    text-transform: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(4, 51, 98, 0.4);
    position: relative;
    overflow: hidden;
}

.simple-page-form .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}

.simple-page-form .btn-primary:hover {
    background: linear-gradient(135deg, #032a4d, #043362) !important;
    box-shadow: 0 6px 20px rgba(4, 51, 98, 0.5);
    transform: translateY(-2px);
}

.simple-page-form .btn-primary:hover::before {
    left: 100%;
}

.simple-page-form .btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(4, 51, 98, 0.3);
}

/* ========== Footer ========== */
.simple-page-footer {
    text-align: center;
    margin-top: 28px;
    padding: 0;
}

.simple-page-footer p {
    margin-bottom: 12px;
}

.simple-page-footer a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    padding-bottom: 2px;
    border-bottom: 2px solid transparent;
}

.simple-page-footer a:hover {
    color: #fff;
    text-decoration: none;
    border-bottom: 2px solid rgba(255,255,255,0.6);
}

.simple-page-footer small {
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
}

/* ========== Alertas dentro del formulario ========== */
.simple-page-form .alert {
    margin-top: 18px;
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 14px;
    display: flex;
    align-items: center;
    border: none;
}

.simple-page-form .alert-danger {
    background-color: #fff5f5;
    border: 1px solid #fed7d7;
    color: #c53030;
    animation: shakeAlert 0.4s ease;
}

.simple-page-form .alert-success {
    background-color: #f0fff4;
    border: 1px solid #c6f6d5;
    color: #276749;
}

#AlertSingIn {
    animation: shakeAlert 0.4s ease;
}

@keyframes shakeAlert {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

/* ========== Validación - campo con warning ========== */
.has-warning .form-control {
    border-color: #e53e3e !important;
    background-color: #fff5f5;
    box-shadow: 0 0 0 4px rgba(229, 62, 62, 0.1);
}

/* ========== Responsive ========== */
@media (max-width: 767px) {
    .simple-page-wrap {
        padding: 30px 16px;
        max-width: 100%;
    }

    .simple-page-form {
        padding: 28px 22px;
        border-radius: 14px;
    }

    .form-title {
        font-size: 22px;
    }

    .simple-page-logo img {
        max-height: 100px;
        max-width: 320px;
    }

    .simple-page-form .form-control {
        padding: 12px 14px;
        font-size: 14px;
    }

    .login-input-icon > i,
    .login-select-wrapper > i {
        left: 14px;
        font-size: 14px;
    }

    .login-input-icon > .form-control,
    .simple-page-form select.form-control {
        padding-left: 40px !important;
    }

    .login-input-icon--password > .form-control {
        padding-right: 46px !important;
    }

    .login-input-icon--password .login-password-toggle {
        width: 40px;
        font-size: 14px;
        border-radius: 0 7px 7px 0;
    }

    .simple-page-form .btn-primary {
        padding: 13px;
        font-size: 15px;
    }
}

/* ========== Pantallas grandes ========== */
@media (min-width: 1200px) {
    .simple-page-wrap {
        max-width: 460px;
    }

    .simple-page-form {
        padding: 40px 36px;
    }
}
