/* ============================================
   AUTH.CSS - Pantallas de autenticación (login, olvide/reset password)
   Usa el design system definido en main.css (variables, botones, etc.)
   ============================================ */

/* Fondo general de la página de autenticación */
.auth-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.22), transparent 55%),
                radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.16), transparent 55%),
                var(--bg-color);
}

.auth-background {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.auth-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.18;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(148, 163, 184, 0.4) 1px, transparent 0),
        linear-gradient(120deg, rgba(37, 99, 235, 0.5), transparent 60%);
    background-size: 22px 22px, 100% 100%;
    mix-blend-mode: soft-light;
}

/* Contenedor principal */
.auth-container {
    position: relative;
    width: 100%;
    max-width: 440px;
    z-index: 1;
}

.auth-card {
    background: var(--card-bg);
    border-radius: 18px;
    padding: 2.25rem 2.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(148, 163, 184, 0.35);
    backdrop-filter: blur(8px);
}

/* Encabezado */
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    margin-bottom: 1rem;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 0, rgba(248, 250, 252, 0.9), transparent 60%),
                linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.45);
}

.logo-icon {
    font-size: 1.7rem;
}

.auth-header h1 {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text-color);
    letter-spacing: 0.02em;
    margin-bottom: 0.35rem;
}

.auth-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-tagline {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Formulario */
.auth-form {
    margin-top: 0.5rem;
}

.auth-input {
    width: 100%;
    padding: 0.75rem 0.85rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background-color: #f9fafb;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, transform 0.08s ease;
}

.auth-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
    transform: translateY(-1px);
}

.label-icon {
    font-size: 0.95rem;
    margin-right: 0.5rem;
}

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper .auth-input {
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    right: 0.45rem;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    color: var(--text-muted);
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.08s ease;
}

.password-toggle:hover {
    background-color: rgba(148, 163, 184, 0.12);
    color: var(--text-color);
    transform: translateY(-50%) translateY(-1px);
}

.eye-icon {
    font-size: 0.9rem;
}

.form-help {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Botón principal de login / acciones */
.btn-login {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
    border-radius: 999px;
    padding: 0.95rem 1.25rem;
    background-image: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.38);
    border: none;
}

.btn-login .btn-text {
    font-weight: 600;
    letter-spacing: 0.03em;
}

.btn-login .btn-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 999px;
    background-color: rgba(15, 23, 42, 0.3);
    font-size: 0.9rem;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.45);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.35);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    box-shadow: none;
}

/* Footer / enlaces secundarios */
.auth-footer {
    margin-top: 1.75rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.forgot-password-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.forgot-password-link:hover {
    text-decoration: underline;
}

/* Mensajes flash dentro de auth-card (reutiliza .alert de main.css) */
.auth-card .flash-messages {
    margin-bottom: 1.25rem;
}

/* Utilidades */
.display-none {
    display: none !important;
}

@media (max-width: 640px) {
    .auth-page {
        padding: 1.25rem;
    }

    .auth-card {
        padding: 1.75rem 1.5rem;
        border-radius: 16px;
    }

    .auth-header h1 {
        font-size: 1.3rem;
    }
}


