/* ==========================================================
   mQuest Technologies — Keycloak Login Theme
   Keycloak 26 / PatternFly 4
   ========================================================== */

/* ---- Fondo ---- */
body,
.login-pf body {
    background: #1A2340 !important;
    min-height: 100vh;
}

.login-pf-page {
    background: #1A2340 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
}

/* ---- Header: ocultar texto "DevTrack", mostrar logo mQuest ---- */
#kc-header {
    width: 100%;
    max-width: 420px;
    margin-bottom: 24px;
}

#kc-header-wrapper {
    font-size: 0 !important;        /* oculta texto */
    line-height: 0 !important;
    color: transparent !important;
    background: url('../img/logo-mquest-white.png') no-repeat center center !important;
    background-size: 180px auto !important;
    height: 50px !important;
    display: block;
}

/* ---- Card central ---- */
.card-pf {
    background: rgba(30, 45, 79, 0.92) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 12px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5) !important;
    width: 100%;
    max-width: 420px !important;
    padding: 32px !important;
    margin: 0 auto !important;
}

/* ---- Título de la página ---- */
#kc-page-title,
.login-pf-header h1 {
    color: #E2E8F0 !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    text-align: center !important;
    margin-bottom: 24px !important;
    line-height: 1.3 !important;
}

/* ---- Labels ---- */
.pf-c-form__label,
.pf-c-form__label-text,
label {
    color: #94A3B8 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
}

/* ---- Inputs ---- */
.pf-c-form-control,
input[type="text"],
input[type="password"],
input[type="email"] {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 8px !important;
    color: #E2E8F0 !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
    height: auto !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    width: 100% !important;
}

.pf-c-form-control:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus {
    border-color: #10B981 !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15) !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

/* ---- Input group (password con toggle) ---- */
.pf-c-input-group {
    background: transparent !important;
    border: none !important;
}

.pf-c-input-group .pf-c-form-control {
    border-right: none !important;
    border-radius: 8px 0 0 8px !important;
}

.pf-c-input-group .pf-c-button.pf-m-control {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-left: none !important;
    border-radius: 0 8px 8px 0 !important;
    color: #94A3B8 !important;
    padding: 10px 12px !important;
    cursor: pointer !important;
    transition: color 0.2s ease !important;
}

.pf-c-input-group .pf-c-button.pf-m-control:hover {
    color: #E2E8F0 !important;
    background: rgba(255, 255, 255, 0.10) !important;
}

/* ---- Botón de login (submit) ---- */
#kc-login,
#kc-form-buttons input[type="submit"],
.pf-c-button.pf-m-primary.pf-m-block {
    background: linear-gradient(135deg, #2B3A67, #1E2D4F) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 8px !important;
    color: #FFFFFF !important;
    padding: 12px 16px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    width: 100% !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    margin-top: 8px !important;
}

#kc-login:hover,
#kc-form-buttons input[type="submit"]:hover,
.pf-c-button.pf-m-primary.pf-m-block:hover {
    background: linear-gradient(135deg, #3B4A77, #2B3A67) !important;
    border-color: rgba(255, 255, 255, 0.22) !important;
    box-shadow: 0 4px 15px rgba(43, 58, 103, 0.5) !important;
}

/* ---- Links ---- */
a,
.login-pf-page a {
    color: #10B981 !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
}

a:hover,
.login-pf-page a:hover {
    color: #059669 !important;
    text-decoration: underline !important;
}

/* ---- Form groups ---- */
.form-group {
    margin-bottom: 16px !important;
}

/* ---- Alertas de error ---- */
.alert.alert-error,
.pf-c-alert.pf-m-danger,
#kc-feedback-wrapper .pf-m-danger {
    background: rgba(239, 68, 68, 0.12) !important;
    border: 1px solid rgba(239, 68, 68, 0.30) !important;
    border-radius: 8px !important;
    color: #FCA5A5 !important;
    padding: 12px 16px !important;
    margin-bottom: 16px !important;
}

.alert.alert-error .pficon,
.pf-c-alert.pf-m-danger .pf-c-alert__icon {
    color: #FCA5A5 !important;
}

/* ---- Alertas de info/warning ---- */
.alert.alert-warning,
.pf-c-alert.pf-m-warning {
    background: rgba(234, 179, 8, 0.12) !important;
    border: 1px solid rgba(234, 179, 8, 0.30) !important;
    border-radius: 8px !important;
    color: #FDE68A !important;
    padding: 12px 16px !important;
    margin-bottom: 16px !important;
}

/* ---- Alertas de éxito ---- */
.alert.alert-success,
.pf-c-alert.pf-m-success {
    background: rgba(16, 185, 129, 0.12) !important;
    border: 1px solid rgba(16, 185, 129, 0.30) !important;
    border-radius: 8px !important;
    color: #6EE7B7 !important;
    padding: 12px 16px !important;
    margin-bottom: 16px !important;
}

/* ---- Ocultar selector de idioma y social login ---- */
#kc-locale,
#kc-social,
.kc-social-section,
.kc-social-links {
    display: none !important;
}

/* ---- Opciones de login (checkbox "Recordarme") ---- */
.login-pf-settings {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 4px !important;
}

/* ---- Checkboxes ---- */
input[type="checkbox"] {
    accent-color: #10B981 !important;
}

/* ---- Footer mQuest debajo del card ---- */
#kc-content-wrapper::after {
    content: "mQuest Technologies" !important;
    display: block !important;
    text-align: center !important;
    color: rgba(148, 163, 184, 0.45) !important;
    font-size: 11px !important;
    letter-spacing: 1.5px !important;
    text-transform: uppercase !important;
    margin-top: 28px !important;
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
    .card-pf {
        padding: 24px 20px !important;
        border-radius: 10px !important;
    }

    #kc-header-wrapper {
        background-size: 150px auto !important;
    }
}
