/**
 * Estilos del Formulario de Login
 * Estilos específicos para la página de autenticación
 */

/* =====================================
   ESTILOS BÁSICOS DEL LOGIN
   ===================================== */

#extr-page {
    height: 100%;
}

#extr-page #main {
    background: initial;
}

body {
    height: 100%;
}

#main {
    position: absolute;
    z-index: 1000;
    width: 100%;
    top: 0px;
}

#main-row-1 {
    top: 0px;
    width: 100%;
    margin: 0px;
    padding: 0px;
}

.container {
    margin-top: 10%;
}

/* =====================================
   HEADER / LOGO
   ===================================== */

#logo-img {
    margin-top: 12px;
}

/* =====================================
   BOTONES
   ===================================== */

.btn-login {
    padding: 6px 12px;
    font-size: 14px;
}

.btn-gr-login {
    text-align: center;
    margin-bottom: 6px;
    width: 100%;
}

/* =====================================
   CAPTCHA
   ===================================== */

.img-bg-captcha {
    height: 80px;
    border: 1px solid #bdbdbd;
    text-align: center !important;
    background-image: url('/img/degrade-captcha.jpg');
}

.btn-refresh-captcha {
    position: absolute;
    right: 4px;
    top: 5px;
}

.btn-refresh-captcha:active {
    left: auto !important;
    position: absolute !important;
    right: 4px;
    top: 5px;
}

/* =====================================
    CAMPOS DE ENTRADA - TRANSICIONES Y FEEDBACK
    ===================================== */

.entrada input {
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.2s ease;
}

.entrada input:focus {
    border-color: #1E90FF;
    box-shadow: 0 0 0 3px rgba(30, 144, 255, 0.1);
}

.entrada input.is-valid {
    border-color: #28a745;
    background-color: #f0fdf4;
}

.entrada input.is-invalid {
    border-color: #dc3545;
    background-color: #fff5f5;
}

/* CAPTCHA - fuente monospace */
input[name="code-captcha"] {
    font-family: monospace;
    letter-spacing: 1px;
}

/* =====================================
    BOTÓN DE ENVÍO - ESTADOS
    ===================================== */

.btn-submit {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.btn-submit.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-submit.loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =====================================
    ALERTAS
    ===================================== */

#alert-block-msg {
    display: none;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =====================================
   MODALES
   ===================================== */

#myModal .modal-dialog {
    min-width: auto;
    width: 500px;
}

/* =====================================
   RESPONSIVE
   ===================================== */

@media (max-width: 600px) {
    .container {
        margin-top: 84px;
    }

    #myModal .modal-dialog {
        width: 90%;
        margin: 30px auto;
    }
}
