/*
 * Psikowell — Auth Pages (Login / Register / Forgot Password)
 * Full-screen split layout with glassmorphism
 * Mobile-first responsive design
 */

.auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    background: var(--surface-alt);
}

/* Left side — Branding */
.auth-branding {
    flex: 1;
    background: var(--primary-gradient);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    position: relative;
    overflow: hidden;
}

.auth-branding::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 600px;
    height: 600px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.auth-branding::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -20%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.auth-branding-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
    max-width: 440px;
}

.auth-logo {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 28px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    animation: scaleIn 0.6s var(--spring);
}

.auth-branding h1 {
    font-family: var(--font-heading);
    font-size: 38px;
    font-weight: 800;
    margin-bottom: 16px;
    animation: fadeInUp 0.6s ease 0.1s both;
}

.auth-branding p {
    font-size: 16px;
    opacity: 0.9;
    line-height: 1.7;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.auth-features {
    margin-top: 42px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: fadeInUp 0.6s ease 0.3s both;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.auth-feature-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.auth-feature-icon .pw-icon { stroke-width: 1.7; }

.auth-feature-text {
    font-size: 14px;
    font-weight: 500;
}

/* Right side — Form */
.auth-form-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.auth-form-container {
    width: 100%;
    max-width: 440px;
    animation: fadeInUp 0.6s ease 0.15s both;
}

.auth-form-header {
    margin-bottom: 36px;
}

.auth-form-header h2 {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.auth-form-header p {
    color: var(--text-muted);
    font-size: 15px;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form .form-control {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-size: 15px;
    /* iOS zoom engelleme — 16px altindaki inputlar iOS'ta zoom yapar */
    font-size: max(16px, 15px);
}

.auth-form .btn-primary {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    margin-top: 8px;
}

.auth-form-footer {
    margin-top: 28px;
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
}

.auth-form-footer a {
    color: var(--primary);
    font-weight: 600;
}

.auth-form-footer a:hover {
    text-decoration: underline;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-divider span {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Remember me & forgot row */
.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    accent-color: var(--primary);
    flex-shrink: 0;
}

.forgot-link {
    font-size: 13px;
    color: var(--primary);
    font-weight: 500;
    white-space: nowrap;
}

/* Password strength */
.password-strength {
    display: flex;
    gap: 4px;
    margin-top: 8px;
}

.password-strength .bar {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: var(--border);
    transition: background var(--transition);
}

.password-strength .bar.weak { background: var(--danger); }
.password-strength .bar.medium { background: var(--warning); }
.password-strength .bar.strong { background: var(--success); }

.password-strength-text {
    font-size: 11px;
    margin-top: 4px;
    font-weight: 600;
}

/* Turnstile widget — mobilde tasmayi engelle */
.auth-form .cf-turnstile {
    transform-origin: center;
}

/* ===== RESPONSIVE — Tablet ===== */
@media (max-width: 900px) {
    .auth-page {
        flex-direction: column;
        min-height: 100vh;
        min-height: 100dvh;
    }

    .auth-branding {
        padding: 32px 24px 28px;
        min-height: auto;
        flex: none;
    }

    .auth-branding-content {
        max-width: 100%;
    }

    .auth-logo {
        width: 56px;
        height: 56px;
        font-size: 28px;
        margin-bottom: 16px;
    }

    .auth-branding h1 {
        font-size: 24px;
        margin-bottom: 8px;
    }

    .auth-branding p {
        font-size: 14px;
        line-height: 1.5;
        max-width: 400px;
        margin: 0 auto;
    }

    .auth-features {
        display: none;
    }

    /* Dekoratif daireleri kucult */
    .auth-branding::before {
        width: 300px;
        height: 300px;
        top: -40%;
        right: -20%;
    }

    .auth-branding::after {
        width: 250px;
        height: 250px;
        bottom: -30%;
        left: -15%;
    }

    .auth-form-section {
        flex: 1;
        padding: 28px 24px;
        align-items: flex-start;
    }

    .auth-form-header {
        margin-bottom: 24px;
    }

    .auth-form-header h2 {
        font-size: 24px;
    }

    .auth-form-header p {
        font-size: 14px;
    }

    .auth-form .form-group {
        margin-bottom: 16px;
    }

    .auth-form-footer {
        margin-top: 20px;
    }

    /* Register sayfasindaki form-row (telefon/klinik) mobilde alt alta */
    .auth-form .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* ===== RESPONSIVE — Mobil ===== */
@media (max-width: 480px) {
    .auth-branding {
        padding: 24px 20px 20px;
    }

    .auth-logo {
        width: 48px;
        height: 48px;
        font-size: 24px;
        margin-bottom: 12px;
        border-radius: var(--radius-md);
    }

    .auth-branding h1 {
        font-size: 22px;
        margin-bottom: 6px;
    }

    .auth-branding p {
        font-size: 13px;
        line-height: 1.5;
    }

    .auth-form-section {
        padding: 24px 16px;
        padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    }

    .auth-form-container {
        max-width: 100%;
    }

    .auth-form-header {
        margin-bottom: 20px;
    }

    .auth-form-header h2 {
        font-size: 22px;
    }

    .auth-form .form-control {
        padding: 12px 14px;
        font-size: 16px;
    }

    .auth-form .btn-primary {
        padding: 14px;
        font-size: 16px;
        min-height: 48px;
    }

    .auth-options {
        flex-wrap: wrap;
        gap: 8px;
    }

    .checkbox-label {
        font-size: 13px;
    }

    .forgot-link {
        font-size: 13px;
    }

    .auth-form-footer {
        font-size: 13px;
        margin-top: 16px;
    }

    /* Turnstile widget — cok kucuk ekranlarda olcekle */
    .auth-form .cf-turnstile {
        transform: scale(0.9);
        transform-origin: center;
    }

    /* Legal text register sayfasinda */
    .legal-acceptance {
        font-size: 11px !important;
    }
}

/* ===== RESPONSIVE — Cok kucuk ekranlar (360px ve alti) ===== */
@media (max-width: 360px) {
    .auth-branding {
        padding: 20px 16px 16px;
    }

    .auth-logo {
        width: 44px;
        height: 44px;
        font-size: 22px;
        margin-bottom: 10px;
    }

    .auth-branding h1 {
        font-size: 20px;
    }

    .auth-branding p {
        font-size: 12px;
    }

    .auth-form-section {
        padding: 20px 14px;
        padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    }

    .auth-form-header h2 {
        font-size: 20px;
    }

    .auth-form .form-control {
        padding: 11px 12px;
    }

    /* Turnstile daha kucuk ekranlarda daha fazla kucult */
    .auth-form .cf-turnstile {
        transform: scale(0.82);
        transform-origin: center;
        margin: -8px 0;
    }

    .auth-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* ===== Landscape mobil — branding gizle, sadece form goster ===== */
@media (max-height: 500px) and (orientation: landscape) {
    .auth-branding {
        display: none;
    }

    .auth-form-section {
        padding: 20px;
        align-items: center;
    }

    .auth-form-header {
        margin-bottom: 16px;
    }

    .auth-form .form-group {
        margin-bottom: 12px;
    }
}


/* ── Bilgi notu (kurumsal) ───────────────────────────────────────── */
.auth-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 18px;
    padding: 12px 14px;
    background: var(--primary-bg);
    border: 1px solid var(--primary-lighter);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 12.8px;
    line-height: 1.6;
}

.auth-note-icon { display: inline-flex; color: var(--primary); flex-shrink: 0; margin-top: 1px; }
.auth-note strong { color: var(--text-primary); font-weight: 650; }

/* ── Uyarı / bilgi kutuları ──────────────────────────────────────── */
.auth-form-container .alert {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 14px;
    margin-bottom: 16px;
    border-radius: var(--radius-md);
    font-size: 13.3px;
    line-height: 1.55;
}

.auth-form-container .alert-danger {
    background: var(--danger-bg);
    border: 1px solid var(--danger);
    color: var(--danger);
}

.auth-form-container .alert-success {
    background: var(--success-bg);
    border: 1px solid var(--success);
    color: var(--success);
}

.auth-form-container .alert .pw-icon { flex-shrink: 0; }

/* ── Marka bloğu: kurumsal gradient ──────────────────────────────── */
.auth-branding { background: var(--primary-gradient); }

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Form başlığı ────────────────────────────────────────────────── */
.auth-form-header h2 {
    font-family: var(--font-heading);
    letter-spacing: -0.025em;
    font-weight: 800;
}
