/* ─── Auth Sayfaları — Giriş / Kayıt / Doğrulama ─────────────────────────── */

.page-auth body,
body.page-auth {
    background: var(--bg-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ─── Auth layout ─────────────────────────────────────────────────────────── */

.auth-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 16px;
}

.auth-card {
    background: var(--surface);
    border: 2px solid #1a1a1a;
    box-shadow: 5px 5px 0px #1a1a1a;
    border-radius: 4px;
    padding: 40px 40px 36px;
    width: 100%;
    max-width: 440px;
}

/* ─── Logo alanı ──────────────────────────────────────────────────────────── */

.auth-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
    text-decoration: none;
}

.auth-logo img {
    width: 375px;
    height: auto;
    max-width: 100%;
}

/* ─── Başlık ──────────────────────────────────────────────────────────────── */

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary, #1a1a1a);
    margin: 0 0 6px;
}

.auth-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary, #555);
    margin: 0 0 28px;
}

/* ─── Form elemanları ─────────────────────────────────────────────────────── */

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary, #1a1a1a);
}

.form-group input {
    padding: 10px 14px;
    border: 2px solid #1a1a1a;
    box-shadow: 3px 3px 0px #1a1a1a;
    border-radius: 3px;
    font-size: 0.9375rem;
    font-family: inherit;
    background: var(--surface);
    color: var(--text-primary, #1a1a1a);
    transition:
        box-shadow 0.15s,
        transform 0.15s;
    outline: none;
}

.form-group input:focus {
    box-shadow: 2px 2px 0px #1a1a1a;
    transform: translate(1px, 1px);
}

.form-group input.input-error {
    border-color: #e53e3e;
    box-shadow: 3px 3px 0px #e53e3e;
}

.field-error {
    font-size: 0.8125rem;
    color: #e53e3e;
    margin: 0;
}

/* Şifre input wrapper (göster/gizle butonu için) */
.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 44px;
    width: 100%;
    box-sizing: border-box;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--text-secondary, #555);
    font-size: 1rem;
    line-height: 1;
}

/* ─── Submit butonu ───────────────────────────────────────────────────────── */

.auth-submit-btn {
    padding: 12px 24px;
    background: #b8f0ef;
    border: 2px solid #1a1a1a;
    box-shadow: 4px 4px 0px #1a1a1a;
    border-radius: 3px;
    font-size: 0.9375rem;
    font-weight: 700;
    font-family: inherit;
    color: #1a1a1a;
    cursor: pointer;
    transition:
        transform 0.12s,
        box-shadow 0.12s;
    margin-top: 4px;
}

.auth-submit-btn:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px #1a1a1a;
}

.auth-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 4px 4px 0px #1a1a1a;
}

.auth-submit-btn.loading::after {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #1a1a1a;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

/* ─── Google butonu ───────────────────────────────────────────────────────── */

.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 11px 24px;
    background: var(--surface);
    border: 2px solid #1a1a1a;
    box-shadow: 4px 4px 0px #1a1a1a;
    border-radius: 3px;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    color: #1a1a1a;
    cursor: pointer;
    text-decoration: none;
    box-sizing: border-box;
    margin-bottom: 8px;
    transition:
        transform 0.12s,
        box-shadow 0.12s;
}

.google-btn:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px #1a1a1a;
}

.google-btn img {
    width: 20px;
    height: 20px;
}

/* ─── Ayırıcı ─────────────────────────────────────────────────────────────── */

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary, #555);
    font-size: 0.8125rem;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #1a1a1a;
    opacity: 0.2;
}

/* ─── Alt bağlantılar ─────────────────────────────────────────────────────── */

.auth-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary, #555);
}

.auth-footer a {
    color: #1a9ea4;
    text-decoration: none;
    font-weight: 600;
}

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

.auth-links {
    display: flex;
    justify-content: space-between;
    font-size: 0.8125rem;
    margin-top: -4px;
}

.auth-links a {
    color: #1a9ea4;
    text-decoration: none;
}

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

/* ─── Genel hata mesajı ───────────────────────────────────────────────────── */

.auth-alert {
    padding: 10px 14px;
    border: 2px solid;
    border-radius: 3px;
    font-size: 0.875rem;
    display: none;
}

.auth-alert.error {
    background: #fff0f0;
    border-color: #e53e3e;
    color: #c53030;
    box-shadow: 2px 2px 0 #e53e3e;
    display: block;
}

.auth-alert.success {
    background: #f0fff4;
    border-color: #38a169;
    color: #276749;
    box-shadow: 2px 2px 0 #38a169;
    display: block;
}

.auth-alert.info {
    background: #ebf8ff;
    border-color: #3182ce;
    color: #2c5282;
    box-shadow: 2px 2px 0 #3182ce;
    display: block;
}

/* ─── 2FA kutusu ──────────────────────────────────────────────────────────── */

.otp-input-group {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.otp-digit {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    padding: 0;
    border: 2px solid #1a1a1a;
    box-shadow: 3px 3px 0px #1a1a1a;
    border-radius: 3px;
    background: var(--surface);
    color: #1a1a1a;
    outline: none;
}

.otp-digit:focus {
    box-shadow: 2px 2px 0px #1a1a1a;
    transform: translate(1px, 1px);
}

/* ─── Checkbox (şartları kabul) ───────────────────────────────────────────── */

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.875rem;
    color: var(--text-secondary, #555);
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 1px;
    accent-color: #1a9ea4;
    cursor: pointer;
}

.checkbox-group a {
    color: #1a9ea4;
    text-decoration: none;
}

/* ─── Animasyonlar ────────────────────────────────────────────────────────── */

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

/* ─── Dark mode ───────────────────────────────────────────────────────────── */

/* Passkey butonu */

.passkey-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 11px 16px;
    background: #f8f0b8;
    color: #1a1a1a;
    border: 2px solid #1a1a1a;
    box-shadow: 4px 4px 0 #1a1a1a;
    border-radius: 3px;
    font-size: 0.9375rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition:
        transform 0.12s,
        box-shadow 0.12s;
    margin-bottom: 8px;
    box-sizing: border-box;
}

.passkey-btn:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #1a1a1a;
}

/* GitHub butonu */

.github-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 11px 16px;
    background: #1a1a1a;
    color: #fff;
    border: 2px solid #1a1a1a;
    box-shadow: 4px 4px 0 rgba(26, 26, 26, 0.35);
    border-radius: 3px;
    font-size: 0.9375rem;
    font-weight: 700;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition:
        transform 0.12s,
        box-shadow 0.12s;
    margin-bottom: 8px;
    box-sizing: border-box;
}

.github-btn:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 rgba(26, 26, 26, 0.35);
    color: #fff;
}

/* Sifre guc gostergesi */

.strength-bar-track {
    height: 6px;
    background: rgba(26, 26, 26, 0.08);
    border: 1.5px solid #1a1a1a;
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
}

.strength-bar-fill {
    height: 100%;
    width: 0%;
    background: #eee;
    transition:
        width 0.25s ease,
        background-color 0.25s ease;
}

.strength-label {
    font-size: 0.75rem;
    font-weight: 700;
    margin: 4px 0 0;
    min-height: 1em;
}

@media (prefers-color-scheme: dark) {
    .auth-card {
        border-color: #f0ede8;
        box-shadow: 5px 5px 0px #f0ede8;
    }

    .form-group input {
        border-color: #f0ede8;
        box-shadow: 3px 3px 0px #f0ede8;
        background: #2a2a2a;
        color: #f0ede8;
    }

    .form-group input:focus {
        box-shadow: 2px 2px 0px #f0ede8;
    }

    .auth-submit-btn {
        border-color: #f0ede8;
        box-shadow: 4px 4px 0px #f0ede8;
    }

    .auth-submit-btn:hover {
        box-shadow: 2px 2px 0px #f0ede8;
    }

    .google-btn {
        border-color: #f0ede8;
        box-shadow: 4px 4px 0px #f0ede8;
        background: #2a2a2a;
        color: #f0ede8;
    }

    .google-btn:hover {
        box-shadow: 2px 2px 0px #f0ede8;
    }

    .otp-digit {
        border-color: #f0ede8;
        box-shadow: 3px 3px 0px #f0ede8;
        background: #2a2a2a;
        color: #f0ede8;
    }

    .auth-alert.error {
        background: #2d1515;
    }

    .auth-alert.success {
        background: #152d1e;
    }

    .auth-alert.info {
        background: #152030;
    }
}

/* ─── Mobil ───────────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
    .auth-card {
        padding: 28px 20px 24px;
        box-shadow: 3px 3px 0px #1a1a1a;
    }

    .otp-digit {
        width: 40px;
        height: 48px;
        font-size: 1.25rem;
    }
}
