/* ============================================================
   Auth Styles - QuizOpos
   Sistema de clases: qo-auth-*
   ============================================================ */

/* --- Fondo institucional --- */
.qo-auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--qo-font-base);
    background: #f4f7fb;
    background-image:
        radial-gradient(ellipse at 10% 0%, rgba(2, 37, 93, 0.07) 0%, transparent 55%),
        radial-gradient(ellipse at 90% 100%, rgba(2, 94, 55, 0.05) 0%, transparent 55%);
    padding: 24px 16px;
}

/* --- Wrapper centrado --- */
.qo-auth-wrapper {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- Tarjeta principal --- */
.qo-auth-card {
    width: 100%;
    background: #ffffff;
    border: 1px solid rgba(2, 37, 93, 0.08);
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(2, 37, 93, 0.10), 0 2px 8px rgba(0,0,0,0.04);
    padding: 44px 48px 40px;
    animation: qoAuthFadeIn 0.5s ease-out both;
}

/* --- Logo --- */
.qo-auth-logo {
    text-align: center;
    margin-bottom: 28px;
}

.qo-auth-logo a {
    display: inline-block;
}

.qo-auth-logo-img {
    max-height: 56px;
    width: auto;
    display: block;
    margin: 0 auto;
}

.qo-auth-logo-fallback {
    font-family: var(--qo-font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--qo-primary);
    letter-spacing: -0.02em;
    text-decoration: none;
}

/* --- Heading (título + subtítulo) --- */
.qo-auth-heading {
    text-align: center;
    margin-bottom: 28px;
}

.qo-auth-title {
    font-family: var(--qo-font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--qo-primary);
    margin-bottom: 6px;
    line-height: 1.2;
}

.qo-auth-subtitle {
    font-size: 0.9rem;
    color: var(--qo-muted);
    margin-bottom: 0;
    line-height: 1.5;
}

/* --- Alertas compactas en auth --- */
.qo-auth-card .alert {
    font-size: 0.875rem;
    padding: 0.65rem 1rem;
    border-radius: 10px;
    margin-bottom: 20px;
    border: none;
}

.qo-auth-card .alert .d-flex {
    align-items: flex-start;
    gap: 0.5rem;
}

.qo-auth-card .alert i {
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.qo-auth-card .btn-close {
    padding: 0.5rem;
}

/* --- Formulario --- */
.qo-auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* --- Campo individual --- */
.qo-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.qo-field-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.qo-field-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--qo-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0;
    line-height: 1.4;
}

.qo-forgot-link {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--qo-muted);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.qo-forgot-link:hover {
    color: var(--qo-primary);
    text-decoration: underline;
}

/* --- Input con icono --- */
.qo-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.qo-input-icon {
    position: absolute;
    left: 14px;
    color: #94a3b8;
    font-size: 1rem;
    pointer-events: none;
    z-index: 2;
    display: flex;
    align-items: center;
}

.qo-input {
    width: 100%;
    padding: 13px 16px 13px 42px;
    font-size: 0.95rem;
    font-family: var(--qo-font-base);
    color: var(--qo-text);
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    line-height: 1.5;
    -webkit-appearance: none;
    appearance: none;
}

.qo-input::placeholder {
    color: #b0bec5;
    font-size: 0.9rem;
}

.qo-input:focus {
    background: #ffffff;
    border-color: var(--qo-primary);
    box-shadow: 0 0 0 4px rgba(2, 37, 93, 0.06);
}

.qo-input-error {
    border-color: #dc3545;
    background: #fff8f8;
}

.qo-input-error:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.08);
}

.qo-field-error {
    font-size: 0.8rem;
    color: #dc3545;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* --- Checkbox remember --- */
.qo-remember {
    display: flex;
    align-items: center;
    margin-top: -4px;
}

.qo-remember-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--qo-muted);
    user-select: none;
}

.qo-remember-input {
    width: 16px;
    height: 16px;
    border: 1.5px solid #cbd5e1;
    border-radius: 4px;
    cursor: pointer;
    accent-color: var(--qo-primary);
    flex-shrink: 0;
}

/* --- Botón principal --- */
.qo-auth-btn {
    width: 100%;
    min-height: 52px;
    padding: 13px 24px;
    font-family: var(--qo-font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    background: var(--qo-primary);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.02em;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 16px rgba(2, 37, 93, 0.22);
    margin-top: 4px;
}

.qo-auth-btn:hover {
    background: #011a43;
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(2, 37, 93, 0.28);
    color: #ffffff;
}

.qo-auth-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(2, 37, 93, 0.2);
}

/* --- Footer --- */
.qo-auth-footer {
    text-align: center;
    margin-top: 28px;
    font-size: 0.78rem;
    color: #94a3b8;
    line-height: 1.5;
}

.qo-auth-footer strong {
    color: var(--qo-primary);
}

/* --- Animación de entrada --- */
@keyframes qoAuthFadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   Responsive: móvil
   ============================================================ */
@media (max-width: 576px) {
    .qo-auth-body {
        padding: 16px;
        align-items: flex-start;
        padding-top: 32px;
    }

    .qo-auth-card {
        padding: 32px 24px 28px;
        border-radius: 16px;
    }

    .qo-auth-title {
        font-size: 1.3rem;
    }

    .qo-auth-logo-img {
        max-height: 44px;
    }

    .qo-field-header {
        flex-wrap: wrap;
        gap: 4px;
    }
}
