/* ============================================================================
   KfW Helper — Auth Pages (Login, Signup, Demo)
   ============================================================================ */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-50);
    padding: 1.5rem;
}

.auth-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--gray-900);
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    text-align: center;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    text-align: center;
    color: var(--gray-500);
    font-size: 0.9375rem;
    margin-bottom: 2rem;
    line-height: 1.5;
}

/* ── Form Elements ───────────────────────────────────────────────────────── */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.375rem;
}

.form-input {
    width: 100%;
    padding: 0.6875rem 0.875rem;
    font-size: 0.9375rem;
    font-family: var(--font-sans);
    color: var(--gray-900);
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    transition: all 0.15s var(--ease);
    outline: none;
}
.form-input:focus {
    border-color: var(--brand-500);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}
.form-input::placeholder { color: var(--gray-400); }
.form-input.error { border-color: var(--error); }

.form-hint {
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin-top: 0.375rem;
}

.form-error {
    font-size: 0.8125rem;
    color: var(--error);
    margin-top: 0.375rem;
    display: none;
}
.form-error.visible { display: block; }

/* ── OTP Input ───────────────────────────────────────────────────────────── */
.otp-inputs {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}
.otp-input {
    width: 3rem;
    height: 3.5rem;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-mono);
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
    outline: none;
    transition: all 0.15s var(--ease);
}
.otp-input:focus {
    border-color: var(--brand-500);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

/* ── Auth Divider ────────────────────────────────────────────────────────── */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--gray-400);
    font-size: 0.8125rem;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

/* ── Auth Footer ─────────────────────────────────────────────────────────── */
.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--gray-500);
}
.auth-footer a { font-weight: 600; }

/* ── Alert ───────────────────────────────────────────────────────────────── */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    display: none;
}
.alert.visible { display: block; }
.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info { background: var(--brand-50); color: var(--brand-800); border: 1px solid var(--brand-200); }

/* ── Loading State ───────────────────────────────────────────────────────── */
.btn.loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}
.btn.loading::after {
    content: '';
    position: absolute;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.5s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
