/* ══════════════════════════════════════════════════════════
   Auth pages (Login, Register, email confirmation, access denied).
   Sade, odaklı, merkez hizalı kart düzeni (LinkedIn/Stripe/Notion).
   Dark premium tema — yalnızca theme.css değişkenleri kullanılır.
   Sınıf öneki: .auth-*
   NOT: App Page Layout Rule auth sayfalarına uygulanmaz —
        dekoratif orb'lar yalnızca burada serbesttir.
   Input stilleri Profil Edit (.pf-form) ile bilinçli olarak
   tutarlıdır (aynı bg / border / focus / validation tonları).
══════════════════════════════════════════════════════════ */

/* ── Sayfa kabuğu: tam ekran ortalanmış kompozisyon ── */
.auth-page {
    position: relative;
    min-height: calc(100vh - 73px);   /* navbar yüksekliği düşülür */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 16px;
    overflow: hidden;
}

/* Dekoratif yumuşak gradyan küreler */
.auth-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
    z-index: 0;
}

.auth-orb-1 {
    width: 420px;
    height: 420px;
    background: var(--color-primary);
    opacity: 0.22;
    top: -120px;
    left: -100px;
}

.auth-orb-2 {
    width: 360px;
    height: 360px;
    background: var(--color-accent);
    opacity: 0.18;
    bottom: -120px;
    right: -90px;
}

/* ── Merkezi kart ── */
.auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    padding: 36px 34px;
}

/* Register kartı biraz daha geniş (rol seçimi için) */
.auth-card-wide {
    max-width: 540px;
}

/* ── Logo ── */
.auth-logo {
    display: block;
    text-align: center;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    text-decoration: none;
    letter-spacing: -0.5px;
    margin-bottom: 22px;
}

.auth-logo:hover {
    color: var(--color-text);
}

/* ── Başlık + alt metin ── */
.auth-head {
    text-align: center;
    margin-bottom: 26px;
}

.auth-title {
    font-size: clamp(1.5rem, 3vw, 1.9rem);
    margin: 0 0 6px;
}

.auth-subtitle {
    color: var(--color-text-sec);
    font-size: 0.95rem;
    margin: 0;
}

/* ══ Form ══════════════════════════════════════════════════
   .pf-form ile tutarlı input görünümü.
══════════════════════════════════════════════════════════ */
.auth-field {
    margin-bottom: 18px;
}

.auth-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--color-text-sec);
    margin-bottom: 6px;
}

.auth-form .form-control {
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    color: var(--color-text);
    padding: 11px 14px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

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

.auth-form .form-control:focus {
    background-color: rgba(255, 255, 255, 0.06);
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(124, 92, 252, 0.25);
    color: var(--color-text);
    outline: none;
}

/* ══ Şifre göster/gizle (göz ikonu) ════════════════════════
   Input'u saran relative wrapper + sağ içte absolute buton.
   İki alan JS'te bağımsız çalışır (auth-password-toggle.js).
══════════════════════════════════════════════════════════ */
.auth-input-wrap {
    position: relative;
    display: block;
}

/* İkonun üstüne metin gelmemesi için ekstra sağ boşluk */
.auth-form .form-control.auth-input-toggleable {
    width: 100%;
    padding-right: 46px;
}

.auth-pw-toggle {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0 10px 10px 0;
    color: var(--color-text-muted);
    font-size: 1.05rem;
    cursor: pointer;
    transition: color 0.2s;
}

.auth-pw-toggle:hover {
    color: var(--color-text);
}

.auth-pw-toggle:focus-visible {
    outline: none;
    color: var(--color-text);
    box-shadow: 0 0 0 3px rgba(124, 92, 252, 0.25);
    border-radius: 10px;
}

.auth-pw-toggle i {
    pointer-events: none;
    line-height: 1;
}

/* ── Birincil aksiyon butonu (tam genişlik brand gradient) ── */
.auth-submit {
    width: 100%;
    text-align: center;
    padding: 12px 26px;
    font-size: 1rem;
    margin-top: 4px;
}

/* ── "Beni hatırla" + "Şifremi unuttum" satırı ── */
.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.auth-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.auth-check .form-check-input {
    width: 38px;
    height: 20px;
    margin: 0;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--color-border);
    cursor: pointer;
}

.auth-check .form-check-input:checked {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.auth-check .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(124, 92, 252, 0.25);
    border-color: var(--color-primary);
}

.auth-check .form-check-label {
    color: var(--color-text-sec);
    font-size: 0.88rem;
    cursor: pointer;
}

/* ── KVKK / Kullanım Şartları onay kutusu ── */
.auth-terms {
    margin-bottom: 20px;
}

.auth-terms-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    cursor: pointer;
}

.auth-terms-check .form-check-input {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin: 2px 0 0;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    cursor: pointer;
}

.auth-terms-check .form-check-input:checked {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.auth-terms-check .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(124, 92, 252, 0.25);
    border-color: var(--color-primary);
}

.auth-terms-text {
    color: var(--color-text-sec);
    font-size: 0.85rem;
    line-height: 1.5;
}

/* ── Brand-mor ince linkler ── */
.auth-link {
    color: var(--color-primary);
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

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

/* Placeholder (backend henüz yok) — tıklanamaz */
.auth-link.is-disabled {
    color: var(--color-text-muted);
    pointer-events: none;
    cursor: default;
}

/* ── Alt geçiş satırı ── */
.auth-foot {
    text-align: center;
    color: var(--color-text-sec);
    font-size: 0.9rem;
    margin: 22px 0 0;
}

/* ── İnce ayraç ── */
.auth-divider {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 22px 0;
}

/* ══ Harici giriş (Google ile devam et) ════════════════════ */
.auth-external {
    margin: 0 0 4px;
}

.auth-google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 11px 18px;
    border-radius: 24px;
    background: #ffffff;
    color: #1f2328;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.85);
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.auth-google-btn:hover {
    background: #f2f2f2;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.auth-google-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(124, 92, 252, 0.4);
}

.auth-google-icon {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
}

/* "veya" yazılı ortalı ayraç */
.auth-or {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 18px 0;
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.auth-or::before,
.auth-or::after {
    content: "";
    flex: 1;
    border-top: 1px solid var(--color-border);
}

/* ══ Validation / durum bildirimleri ════════════════════════ */
/* Kart içi özet (ModelOnly hataları) — kırmızı tonlu, okunaklı */
.auth-alert {
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    border: 1px solid transparent;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.auth-alert i {
    font-size: 1.05rem;
    flex: 0 0 auto;
    margin-top: 1px;
}

.auth-alert-danger {
    background: rgba(224, 69, 123, 0.12);
    border-color: rgba(224, 69, 123, 0.4);
    color: #f9a8c4;
}

/* Bilgilendirme / başarı bildirimi (ör. "yeniden gönderildi") */
.auth-alert-success {
    background: rgba(29, 158, 117, 0.12);
    border-color: rgba(29, 158, 117, 0.4);
    color: #6ee7b7;
}

.auth-alert ul {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.auth-alert ul li + li {
    margin-top: 4px;
}

/* Input altı alan hataları — zarif kırmızı */
.auth-form .text-danger,
.auth-form .field-validation-error {
    color: #f9a8c4 !important;
    font-size: 0.8rem;
    display: inline-block;
    margin-top: 5px;
}

.auth-form .input-validation-error {
    border-color: rgba(224, 69, 123, 0.7) !important;
}

/* ══ Rol seçimi (saf CSS — radio + label-kart, :checked) ════ */
.auth-roles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 6px;
}

/* Görünmez radio */
.auth-role-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.auth-role-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding: 22px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--color-border);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.auth-role-card:hover {
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.auth-role-icon {
    font-size: 1.9rem;
    color: var(--color-text-sec);
    transition: color 0.2s;
}

.auth-role-title {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.98rem;
    color: var(--color-text);
}

.auth-role-sub {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    line-height: 1.4;
}

/* Seçili kart — brand gradient ile vurgu */
.auth-role-input:checked + .auth-role-card {
    background: linear-gradient(135deg,
        rgba(124, 92, 252, 0.22),
        rgba(224, 69, 123, 0.22));
    border-color: transparent;
    box-shadow: 0 0 0 1.5px var(--color-primary) inset,
                0 8px 24px rgba(124, 92, 252, 0.2);
}

.auth-role-input:checked + .auth-role-card .auth-role-icon {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-role-input:focus-visible + .auth-role-card {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(124, 92, 252, 0.25);
}

/* Rol seçimi grubu için alan + başlık */
.auth-roles-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--color-text-sec);
    margin-bottom: 10px;
}

.auth-roles-field {
    margin-bottom: 22px;
}

/* ══ Durum sayfaları (email onay / erişim) ══════════════════ */
.auth-status {
    text-align: center;
}

.auth-status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    font-size: 2.4rem;
    margin-bottom: 20px;
}

.auth-status-icon-success {
    background: rgba(29, 158, 117, 0.15);
    color: #6ee7b7;
}

.auth-status-icon-brand {
    background: linear-gradient(135deg,
        rgba(124, 92, 252, 0.2),
        rgba(224, 69, 123, 0.2));
    color: #c4b5fd;
}

.auth-status-icon-warning {
    background: rgba(186, 117, 23, 0.16);
    color: #f3c777;
}

.auth-status-icon-danger {
    background: rgba(224, 69, 123, 0.14);
    color: #f9a8c4;
}

.auth-status-title {
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    margin: 0 0 10px;
}

.auth-status-text {
    color: var(--color-text-sec);
    font-size: 0.96rem;
    line-height: 1.65;
    margin: 0 auto 24px;
    max-width: 360px;
}

.auth-status-text strong {
    color: var(--color-text);
}

.auth-status-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ══ Responsive — mobilde kart tam ekran, padding küçülür ══ */
@media (max-width: 575.98px) {
    .auth-page {
        padding: 0;
        min-height: calc(100vh - 65px);
    }

    .auth-card {
        max-width: 100%;
        min-height: calc(100vh - 65px);
        border-radius: 0;
        border-left: none;
        border-right: none;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 32px 22px;
    }

    .auth-roles {
        grid-template-columns: 1fr;
    }
}
