/* ============================================
   ALPHA FINANS DATA - Auth Pages
   Giriş, Kayıt, Şifre Sıfırlama
   ============================================ */

/* === PAGE LAYOUT === */
.auth-page {
    min-height: 100vh;
    box-sizing: border-box;
    /* KÖK NEDEN: .header position:fixed (header.css) olduğu için bu padding
       olmadan sayfanın en üstü (beta banner dahil) header'ın ARKASINDA
       kalıyor, metin kesiliyordu (canlıda bulundu, 1024px üstü masaüstü
       iki-kolonlu görünümde). pricing.css'teki aynı desen (.pricing-page)
       burada da uygulanıyor. Aşağıdaki 1024/768/480px media query'leri
       bu offset'i .auth-form-panel üzerinde AYRICA ekliyordu (mobil için
       önceki bir düzeltme) — çift offset'i önlemek için o bloklardan
       header-safe-height kısmı çıkarıldı, sadece bu üstteki kural geçerli. */
    padding-top: var(--header-safe-height);
    display: flex;
    background: var(--color-bg-primary);
    position: relative;
    overflow: hidden;
}

/* Arka plan efekti */
.auth-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
}

.auth-bg::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, var(--color-accent-glow) 0%, transparent 70%);
    opacity: 0.4;
}

.auth-bg::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -15%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(18, 149, 235, 0.05) 0%, transparent 70%);
}

/* === SOL PANEL (Tanıtım) === */
.auth-brand {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-3xl);
    position: relative;
    z-index: 1;
    background: var(--gradient-card);
}

.auth-brand-content {
    max-width: 480px;
    text-align: center;
}

.auth-brand-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-xl);
}

.auth-brand-title {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-extrabold);
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-md);
    line-height: var(--line-height-tight);
}

.auth-brand-title span {
    color: var(--color-accent-primary);
}

.auth-brand-subtitle {
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-2xl);
    line-height: var(--line-height-relaxed);
}

/* Feature bullets */
.auth-features {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    text-align: start;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-sm) 0;
}

.auth-feature-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-accent-glow);
    border-radius: var(--radius-md);
    color: var(--color-accent-primary);
}

.auth-feature-icon svg {
    width: 20px;
    height: 20px;
}

.auth-feature-text {
    font-size: var(--font-size-base);
    color: var(--color-text-secondary);
}

.auth-feature-text strong {
    color: var(--color-text-primary);
    font-weight: var(--font-weight-semibold);
}

/* === SAĞ PANEL (Form) === */
.auth-form-panel {
    width: 520px;
    min-width: 520px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-2xl);
    position: relative;
    z-index: 1;
    overflow-y: auto;
}

.auth-form-container {
    width: 100%;
    max-width: 400px;
}

/* Header */
.auth-form-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.auth-form-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
}

.auth-form-title {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin-bottom: 6px;
}

.auth-form-desc {
    font-size: var(--font-size-base);
    color: var(--color-text-secondary);
}

/* === SOCIAL BUTTONS === */
.social-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    width: 100%;
    height: 48px;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-primary);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.btn-social svg,
.btn-social img {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.btn-social:hover {
    border-color: var(--color-border-accent);
    background: var(--color-accent-glow);
    transform: translateY(-1px);
}

/* Google */
.btn-google {
    background: var(--color-bg-card);
    color: var(--color-text-primary);
}

/* Apple */
.btn-apple {
    background: var(--color-bg-card);
    color: var(--color-text-primary);
}

/* === FORM AREA === */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

/* Error alert */
.auth-error {
    display: none;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--color-error-bg);
    border: 1px solid rgba(255, 82, 82, 0.2);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    color: var(--color-error);
}

.auth-error.visible {
    display: flex;
}

.auth-error svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Submit button */
.btn-auth-submit {
    width: 100%;
    height: 48px;
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-inverse);
    background: var(--gradient-accent);
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.btn-auth-submit:hover {
    background: var(--gradient-accent-hover);
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}

.btn-auth-submit:active {
    transform: scale(0.98);
}

.btn-auth-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-auth-submit .btn-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.btn-auth-submit.loading .btn-text {
    visibility: hidden;
}

.btn-auth-submit.loading .btn-spinner {
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Guest button */
.btn-guest {
    width: 100%;
    height: 44px;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-muted);
    background: transparent;
    border: 1px dashed var(--color-border-primary);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-guest:hover {
    color: var(--color-text-secondary);
    border-color: var(--color-border-secondary);
    background: rgba(255, 255, 255, 0.02);
}

/* Form içi ikincil metin-link aksiyonu (örn. "Kodu tekrar gönder").
   Birincil .btn-auth-submit butonuna sıkı, ikincil hiyerarşide bağlı durur. */
.btn-auth-link {
    display: block;
    width: 100%;
    margin-top: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    background: none;
    border: none;
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    text-align: center;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.btn-auth-link:hover:not(:disabled) {
    color: var(--color-accent-primary);
}

.btn-auth-link:disabled {
    opacity: 0.5;
    cursor: default;
}

/* === ALT LINK === */
.auth-footer-link {
    text-align: center;
    margin-top: var(--spacing-lg);
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.auth-footer-link a {
    color: var(--color-accent-primary);
    font-weight: var(--font-weight-semibold);
}

.auth-footer-link a:hover {
    text-decoration: underline;
}

/* Forgot password */
.auth-forgot {
    text-align: end;
    margin-top: -4px;
}

.auth-forgot a {
    font-size: var(--font-size-sm);
    color: var(--color-accent-primary);
    font-weight: var(--font-weight-medium);
}

.auth-forgot a:hover {
    text-decoration: underline;
}

/* Terms text */
.auth-terms {
    text-align: center;
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    line-height: var(--line-height-relaxed);
    margin-top: var(--spacing-lg);
}

.auth-terms a {
    color: var(--color-text-secondary);
}

.auth-terms a:hover {
    color: var(--color-accent-primary);
}

/* Back link */
.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-lg);
    transition: color var(--transition-fast);
}

.auth-back svg {
    width: 16px;
    height: 16px;
}

.auth-back:hover {
    color: var(--color-accent-primary);
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .auth-page {
        flex-direction: column;
    }

    .auth-brand {
        display: none;
    }

    .auth-form-panel {
        width: 100%;
        min-width: unset;
        /* .auth-page artık padding-top:var(--header-safe-height) +
           box-sizing:border-box kullanıyor (yukarıda) — bu zaten header
           offset'ini veriyor. Burada AYRICA header-safe-height eklemek
           (önceki bir düzeltmenin kalıntısı) çift offset'e, yani header
           ile form arasında gereksiz büyük boşluğa yol açardı. */
        min-height: calc(100vh - var(--header-safe-height));
        /* justify-content:center (desktop'tan miras) kısa viewport'larda
           içeriği üstte gizliyordu — flex-start'a çevrilip üst boşluk
           sadece spacing kadar garanti edilir. */
        justify-content: flex-start;
        padding: var(--spacing-lg) var(--spacing-lg) var(--spacing-2xl);
    }
}

@media (max-width: 768px) {
    .auth-form-panel {
        padding: var(--spacing-lg) var(--spacing-md) var(--spacing-xl);
    }

    .auth-form-title {
        font-size: var(--font-size-xl);
    }

    .auth-divider {
        margin: var(--spacing-md) 0;
    }
}

@media (max-width: 480px) {
    .auth-form-panel {
        padding: var(--spacing-md) var(--spacing-md) var(--spacing-lg);
    }

    .auth-form-container {
        max-width: 100%;
    }

    .btn-social {
        height: 44px;
        font-size: var(--font-size-sm);
    }
}

/* === 2FA MODAL === */
.twofa-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
}

.twofa-modal {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl, 16px);
    padding: var(--spacing-2xl, 40px) var(--spacing-xl, 32px);
    max-width: 420px;
    width: 100%;
    position: relative;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.twofa-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: var(--color-text-tertiary);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm, 6px);
    transition: color 0.2s, background 0.2s;
}
.twofa-modal-close:hover {
    color: var(--color-text-primary);
    background: var(--color-bg-tertiary);
}
.twofa-modal-close svg {
    width: 20px;
    height: 20px;
}

.twofa-modal-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    background: var(--color-accent-alpha, rgba(59, 130, 246, 0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.twofa-modal-icon svg {
    width: 28px;
    height: 28px;
    color: var(--color-accent, #1295EB);
}

.twofa-modal-title {
    font-size: var(--font-size-xl, 20px);
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0 0 8px;
}

.twofa-modal-desc {
    font-size: var(--font-size-sm, 14px);
    color: var(--color-text-secondary);
    margin: 0 0 24px;
    line-height: 1.5;
}

/* 2FA Digit Inputs */
.twofa-code-inputs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.twofa-digit {
    width: 46px;
    height: 52px;
    text-align: center;
    font-size: 22px;
    font-weight: 600;
    font-family: 'SF Mono', 'Fira Code', monospace;
    background: var(--color-bg-primary);
    border: 2px solid var(--color-border-control);
    border-radius: var(--radius-md, 8px);
    color: var(--color-text-primary);
    
    transition: border-color 0.2s, box-shadow 0.2s;
    caret-color: var(--color-accent, #1295EB);
}
.twofa-digit:focus {
    border-color: var(--color-accent, #1295EB);
    box-shadow: 0 0 0 3px var(--color-accent-alpha, rgba(18, 149, 235, 0.15));
}

.twofa-separator {
    font-size: 20px;
    color: var(--color-text-tertiary);
    user-select: none;
    margin: 0 2px;
}

/* 2FA Backup Input */
.twofa-backup-input {
    margin: 0 auto;
    max-width: 280px;
}
.twofa-backup-input .form-input {
    text-align: center;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: var(--font-size-base, 16px);
    letter-spacing: 1px;
}

/* 2FA Toggle Link */
.twofa-toggle-link {
    background: none;
    border: none;
    color: var(--color-accent, #1295EB);
    font-size: var(--font-size-sm, 14px);
    cursor: pointer;
    margin-top: 16px;
    padding: 4px 8px;
    border-radius: var(--radius-sm, 6px);
    transition: opacity 0.2s;
}
.twofa-toggle-link:hover {
    opacity: 0.8;
}

/* 2FA Modal Responsive */
@media (max-width: 480px) {
    .twofa-modal {
        padding: var(--spacing-xl, 32px) var(--spacing-lg, 24px);
    }
    .twofa-digit {
        width: 40px;
        height: 46px;
        font-size: 18px;
    }
    .twofa-code-inputs {
        gap: 6px;
    }
}

/* ============================================
   EK STİLLER — Tam Auth Sayfaları
   ============================================ */

/* === Tam Sayfa Auth Layout (Sol panel yerine tek kart) === */
.auth-page-centered {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background-color: var(--color-bg-primary);
    background-image:
        radial-gradient(ellipse at 25% 25%, rgba(18, 149, 235, 0.07) 0%, transparent 55%),
        radial-gradient(ellipse at 75% 75%, rgba(10, 99, 172, 0.05) 0%, transparent 55%);
    position: relative;
    overflow: hidden;
}

.auth-page-centered::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(18, 149, 235, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(18, 149, 235, 0.025) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
    z-index: 0;
}

/* === Auth Kart (yeni sayfalarda) === */
.auth-card-new {
    width: 100%;
    max-width: 440px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-primary);
    border-radius: 20px;
    padding: 40px 36px;
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 1;
}

@media (max-width: 480px) {
    .auth-card-new {
        padding: 28px 20px;
        border-radius: 16px;
        max-width: 100%;
    }
}

/* === Logo Blok === */
.auth-logo-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 28px;
    gap: 6px;
}

.auth-logo-icon-wrap {
    width: 52px;
    height: 52px;
    background: var(--gradient-accent);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(18, 149, 235, 0.35);
    margin-bottom: 4px;
}

.auth-logo-icon-wrap svg {
    width: 28px;
    height: 28px;
    color: #ffffff;
}

.auth-page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-primary);
    text-align: center;
    margin: 0;
    line-height: 1.2;
}

.auth-page-subtitle {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    text-align: center;
    margin: 0;
    line-height: 1.5;
}

/* === Giriş Formu === */
.auth-form-new {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Form grup */
.auth-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.auth-field-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    letter-spacing: 0.02em;
}

.auth-field-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--color-bg-input);
    border: 1.5px solid var(--color-border-control);
    border-radius: 10px;
    color: var(--color-text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    
    -webkit-appearance: none;
    appearance: none;
}

.auth-input::placeholder {
    color: var(--color-text-muted);
}

.auth-input:focus {
    border-color: var(--color-accent-primary);
    box-shadow: 0 0 0 3px var(--color-accent-glow);
}

.auth-input.is-error {
    border-color: var(--color-error);
    box-shadow: 0 0 0 3px var(--color-error-bg);
}

.auth-input.is-success {
    border-color: var(--color-success);
    box-shadow: 0 0 0 3px var(--color-success-bg);
}

.auth-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Input with right icon */
.auth-field-wrap .auth-input {
    padding-inline-end: 44px;
}

.auth-field-end-icon {
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    pointer-events: none;
}

.auth-field-end-icon.is-btn {
    pointer-events: auto;
    cursor: pointer;
    transition: color 0.2s;
    background: none;
    border: none;
    padding: 2px;
}

.auth-field-end-icon.is-btn:hover {
    color: var(--color-accent-primary);
}

/* Field mesajları */
.auth-field-msg {
    font-size: 0.77rem;
    min-height: 17px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.auth-field-msg.is-error {
    color: var(--color-error);
}

.auth-field-msg.is-success {
    color: var(--color-success);
}

.auth-field-msg.is-checking {
    color: var(--color-text-muted);
}

/* === Şifre Güçlük Göstergesi === */
.pwd-strength {
    margin-top: 6px;
}

.pwd-strength-track {
    height: 4px;
    background: var(--color-border-primary);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 4px;
}

.pwd-strength-bar {
    height: 100%;
    border-radius: 2px;
    transition: width 0.35s ease, background-color 0.35s ease;
    width: 0%;
}

.pwd-strength-bar.weak   { width: 33%; background: var(--color-error); }
.pwd-strength-bar.medium { width: 66%; background: var(--color-warning); }
.pwd-strength-bar.strong { width: 100%; background: var(--color-success); }

.pwd-strength-text {
    font-size: 0.75rem;
    font-weight: 500;
}

.pwd-strength-text.weak   { color: var(--color-error); }
.pwd-strength-text.medium { color: var(--color-text-warning); }
.pwd-strength-text.strong { color: var(--color-success); }

/* === Beni Hatırla satırı === */
.auth-remember-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

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

.auth-check-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 1.5px solid var(--color-border-control, var(--color-border-primary));
    background: var(--color-bg-input);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, border-color 0.2s;
    position: relative;
}

.auth-check-label input[type="checkbox"]:checked {
    background: var(--color-accent-primary);
    border-color: var(--color-accent-primary);
}

.auth-check-label input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 7px;
    height: 11px;
    border: 2px solid #ffffff;
    border-top: none;
    border-inline-start: none;
    transform: rotate(45deg);
}

.auth-link-small {
    font-size: 0.85rem;
    color: var(--color-accent-primary);
    font-weight: 500;
}

.auth-link-small:hover {
    color: var(--color-accent-secondary);
    text-decoration: underline !important;
}

/* === Ana Gönder Butonu === */
.auth-submit-btn {
    width: 100%;
    padding: 13px 24px;
    background: var(--gradient-accent);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(18, 149, 235, 0.28);
    margin-top: 4px;
}

.auth-submit-btn:hover:not(:disabled) {
    background: var(--gradient-accent-hover);
    box-shadow: var(--shadow-glow-strong);
    transform: translateY(-1px);
}

.auth-submit-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.auth-submit-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.auth-submit-btn .spin-icon {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: auth-spin 0.7s linear infinite;
    flex-shrink: 0;
    display: none;
}

.auth-submit-btn.is-loading .spin-icon {
    display: block;
}

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

/* === Alert Kutusu === */
.auth-alert-box {
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 0.875rem;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    line-height: 1.5;
    animation: auth-fade-in 0.25s ease;
}

.auth-alert-box svg {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    margin-top: 1px;
}

.auth-alert-box.is-error   { background: var(--color-error-bg);   border: 1px solid rgba(255,82,82,0.25);   color: var(--color-error); }
.auth-alert-box.is-success { background: var(--color-success-bg); border: 1px solid rgba(0,200,83,0.25);   color: var(--color-success); }
.auth-alert-box.is-info    { background: var(--color-accent-glow); border: 1px solid var(--color-border-accent); color: var(--color-accent-primary); }
.auth-alert-box.is-warning { background: var(--color-warning-bg); border: 1px solid rgba(255,171,0,0.25); color: var(--color-text-warning); }

@keyframes auth-fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* === Sosyal Butonlar === */
.auth-divider-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 6px 0;
}

.auth-divider-row::before,
.auth-divider-row::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-border-primary);
}

.auth-divider-label {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    white-space: nowrap;
}

.auth-social-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-social-item {
    width: 100%;
    padding: 11px 18px;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s;
    border: 1.5px solid var(--color-border-primary);
    background: var(--color-bg-input);
    color: var(--color-text-primary);
}

.auth-social-item:hover:not(:disabled) {
    background: var(--color-bg-elevated);
    border-color: var(--color-border-accent);
    transform: translateY(-1px);
}

.auth-social-item:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.auth-social-item svg,
.auth-social-item img {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* === Footer (link) === */
.auth-page-footer {
    text-align: center;
    margin-top: 22px;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.auth-page-footer a {
    color: var(--color-accent-primary);
    font-weight: 600;
}

.auth-page-footer a:hover {
    text-decoration: underline !important;
}

/* === OTP Grid === */
.otp-grid {
    display: flex;
    gap: 9px;
    justify-content: center;
    margin: 6px 0;
}

.otp-box {
    width: 50px;
    height: 58px;
    border: 2px solid var(--color-border-control);
    border-radius: 12px;
    background: var(--color-bg-input);
    color: var(--color-text-primary);
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    font-family: 'Inter', monospace;
    transition: border-color 0.2s, box-shadow 0.2s;
    
    caret-color: var(--color-accent-primary);
    -webkit-appearance: none;
    appearance: none;
}

.otp-box:focus {
    border-color: var(--color-accent-primary);
    box-shadow: 0 0 0 3px var(--color-accent-glow);
}

.otp-box.has-val {
    border-color: var(--color-accent-secondary);
}

.otp-box.is-error {
    border-color: var(--color-error);
    animation: otp-shake 0.35s ease;
}

@keyframes otp-shake {
    0%,100% { transform: translateX(0); }
    20%      { transform: translateX(-6px); }
    40%      { transform: translateX(6px); }
    60%      { transform: translateX(-4px); }
    80%      { transform: translateX(4px); }
}

@media (max-width: 380px) {
    .otp-box { width: 42px; height: 50px; font-size: 1.15rem; }
    .otp-grid { gap: 6px; }
}

/* === Yeniden Gönder === */
.resend-row {
    text-align: center;
    margin-top: 14px;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.resend-action-btn {
    background: none;
    border: none;
    color: var(--color-accent-primary);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}

.resend-action-btn:hover:not(:disabled) {
    color: var(--color-accent-secondary);
    text-decoration: underline;
}

.resend-action-btn:disabled {
    color: var(--color-text-muted);
    cursor: default;
}

/* === Şifre Sıfırlama Adım Göstergesi === */
.reset-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
}

.reset-step-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.reset-step-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid var(--color-border-primary);
    background: var(--color-bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--color-text-muted);
    transition: all 0.3s;
    z-index: 1;
}

.reset-step-node.active .reset-step-circle {
    border-color: var(--color-accent-primary);
    background: var(--color-accent-primary);
    color: #ffffff;
    box-shadow: 0 0 12px rgba(18,149,235,0.4);
}

.reset-step-node.done .reset-step-circle {
    border-color: var(--color-success);
    background: var(--color-success);
    color: #ffffff;
}

.reset-step-label {
    font-size: 0.68rem;
    color: var(--color-text-muted);
    white-space: nowrap;
}

.reset-step-node.active .reset-step-label { color: var(--color-accent-primary); font-weight: 600; }
.reset-step-node.done  .reset-step-label  { color: var(--color-success); }

.reset-step-line {
    width: 36px;
    height: 2px;
    background: var(--color-border-primary);
    margin-bottom: 20px;
    transition: background 0.3s;
    flex-shrink: 0;
}

.reset-step-line.done {
    background: var(--color-success);
}

/* === Geri link === */
.auth-nav-back {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: 18px;
    transition: color 0.2s;
}

.auth-nav-back:hover { color: var(--color-accent-primary); }

.auth-nav-back svg {
    width: 15px;
    height: 15px;
}

/* === Şifre Gereksinimleri === */
.pwd-req-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 7px;
}

.pwd-req-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.77rem;
    color: var(--color-text-muted);
    transition: color 0.2s;
}

.pwd-req-item.met { color: var(--color-success); }

.pwd-req-item svg { width: 13px; height: 13px; flex-shrink: 0; }

/* === Açık Tema === */
[data-theme="light"] .auth-page-centered {
    background-image:
        radial-gradient(ellipse at 25% 25%, rgba(16,162,253,0.05) 0%, transparent 55%),
        radial-gradient(ellipse at 75% 75%, rgba(10,99,172,0.04) 0%, transparent 55%);
}

[data-theme="light"] .auth-card-new {
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border-color: rgba(0,0,0,0.08);
}

[data-theme="light"] .auth-input,
[data-theme="light"] .otp-box {
    border-color: rgba(0,0,0,0.14);
}

[data-theme="light"] .auth-social-item {
    border-color: rgba(0,0,0,0.1);
}

/* === Rate Limit === */
.auth-rate-warn {
    background: var(--color-warning-bg);
    border: 1px solid rgba(255,171,0,0.3);
    border-radius: 10px;
    padding: 9px 13px;
    font-size: 0.82rem;
    color: var(--color-text-warning);
    display: flex;
    align-items: center;
    gap: 7px;
}

/* === Sidebar auth butonu (token yoksa) === */
.sidebar-login-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: calc(100% - 16px);
    margin: 6px 8px;
    padding: 10px 14px;
    background: var(--gradient-accent);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(18,149,235,0.25);
}

.sidebar-login-btn:hover {
    background: var(--gradient-accent-hover);
    box-shadow: var(--shadow-glow);
    color: #ffffff;
}

.sidebar-login-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ============================================================
   AUTH BETA BANNER — Demo / Erken Erişim Uyarısı
   ============================================================ */
.auth-beta-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(18,149,235,.10) 0%, rgba(124,58,237,.08) 100%);
    border: 1px solid rgba(18,149,235,.28);
    border-radius: 12px;
    margin-bottom: 20px;
    color: var(--color-text-secondary, #8892A4);
}

.auth-beta-banner svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: #1295EB;
}

.auth-beta-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 13px;
    line-height: 1.55;
}

.auth-beta-text strong {
    color: var(--color-text-accent-aa);
    font-size: 13.5px;
}

.auth-beta-text span {
    color: var(--color-text-muted, #5A6585);
}

.auth-beta-text span strong {
    color: var(--color-text-secondary, #8892A4);
}

/* WCAG 1.4.10 (reflow, 320 CSS px = %400 yakınlaştırma): 2FA/OTP kutuları sabit genişlikle taşmaz, esner */
@media (max-width: 340px) {
    .twofa-modal { padding-inline: var(--spacing-md, 16px); }
    .twofa-code-inputs { gap: 4px; }
    .twofa-digit { width: auto; flex: 1 1 0; min-width: 0; max-width: 40px; }
    .otp-box { width: auto; flex: 1 1 0; min-width: 0; max-width: 46px; }
}
