/* adesk-auth.css — Auth sayfaları (login/forgot/reset) */

:root {
    --ink: #111827;
    --ink-2: #1F2937;
    --muted: #6B7280;
    --line: #E5E7EB;
    --line-soft: #F1F2F4;
    --bg: #F4F5F7;
    --bg-2: #EEF0F4;
    --card: #FFFFFF;
}

* {
    box-sizing: border-box;
}

body.authentication-background {
    margin: 0;
    padding: 0 !important;
    position: static !important;
    z-index: auto !important;
    background: #003E63 !important;
    background-color: #003E63 !important;
    background-image: none !important;
    color: var(--ink);
    font-family: sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}

body.authentication-background::before,
body.authentication-background::after {
    display: none !important;
    content: none !important;
    height: 0 !important;
    width: 0 !important;
    position: absolute !important;
    opacity: 0 !important;
}

/* ============= ARKAPLAN: TURNİKE & QR (png) ============= */
/* Default: masaüstü görseli (16:9, 2560×1440) */
.auth-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-color: #003E63;
    background-image: url('/assets/images/auth-bg.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
}

/* Mobil & tablet (≤768px): dikey görsele geç (9:19.5, 1170×2532) */
@media (max-width: 768px) {
    .auth-bg {
        background-image: url('/assets/images/auth-bg.jpg');
        background-position: center center;
    }
}

/* ============= DİL SEÇİCİ (koyu arkaplan üzerinde) ============= */
.auth-lang {
    position: absolute;
    top: 18px;
    right: 18px;
    display: flex;
    gap: 2px;
    z-index: 5;
    font-size: 12px;
}

.auth-lang a {
    color: rgba(255, 255, 255, 0.7);
    padding: 6px 10px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.auth-lang a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
}

.auth-lang a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    font-weight: 600;
    border-color: rgba(255, 255, 255, 0.20);
}

/* ============= YERLEŞİM ============= */
.auth-wrap {
    position: relative;
    z-index: 2;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 48px 20px 32px;
    padding-top: max(48px, env(safe-area-inset-top, 24px));
    padding-bottom: max(32px, env(safe-area-inset-bottom, 16px));
    padding-left: max(20px, env(safe-area-inset-left, 0px));
    padding-right: max(20px, env(safe-area-inset-right, 0px));
}

/* ============= KART ============= */
.login-card {
    width: 100%;
    max-width: 380px;
    margin-top: auto;
    margin-bottom: auto;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 32px 28px 28px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 4px 14px rgba(0, 0, 0, 0.20);
}

/* Logo */
.brand {
    display: flex;
    justify-content: center;
    margin-bottom: 22px;
}

.brand img {
    display: block;
    max-height: 40px;
    max-width: 160px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Başlık */
.login-head {
    text-align: center;
    margin-bottom: 22px;
}

.login-head h1 {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.01em;
}

.login-head p {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
}

/* Form */
.field {
    margin-bottom: 14px;
}

.login-card .form-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--ink-2);
    margin-bottom: 6px;
}

.login-card .form-label sup {
    color: var(--primary-color);
    font-size: 11px;
    margin-left: 2px;
    top: -2px;
}

.login-card .form-control,
.login-card input.form-control {
    width: 100%;
    background: #fff !important;
    border: 1px solid var(--line) !important;
    border-radius: 10px !important;
    padding: 11px 12px !important;
    font-size: 14px !important;
    color: var(--ink) !important;
    line-height: 1.3 !important;
    transition: border-color 120ms ease, box-shadow 120ms ease;
    -webkit-appearance: none;
    appearance: none;
}

.login-card .form-control::placeholder {
    color: #9CA3AF;
}

.login-card .form-control:hover {
    border-color: #D1D5DB !important;
}

.login-card .form-control:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.12) !important;
    outline: none !important;
}

/* Şifre göster/gizle */
.pwd-wrap {
    position: relative;
}

.pwd-wrap .form-control {
    padding-right: 42px !important;
}

.login-card .auth-password-toggle.show-password-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    color: #9CA3AF !important;
    background: transparent;
    border: 0;
}

.login-card .auth-password-toggle.show-password-button:hover {
    color: var(--ink) !important;
}

.login-card .auth-password-toggle.show-password-button i {
    font-size: 16px;
    line-height: 1;
}

/* Marka suffix */
.brand-suffix-wrap {
    position: relative;
}

.brand-suffix-wrap .form-control {
    padding-right: 140px !important;
}

.brand-suffix {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9CA3AF;
    font-size: 13px;
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
    font-weight: 500;
}

/* Yardımcı satır (beni hatırla / şifremi unuttum) */
.helper-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2px 0 18px;
    font-size: 12.5px;
    gap: 12px;
    flex-wrap: wrap;
}

.helper-row .remember {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--ink-2);
    cursor: pointer;
    user-select: none;
}

.helper-row .remember input {
    width: 15px;
    height: 15px;
    accent-color: var(--primary-color);
    cursor: pointer;
    margin: 0;
}

.helper-row a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.helper-row a:hover {
    color: var(--primary-hover);
}

/* Buton */
.login-card .ti-btn-primary {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--primary-color) !important;
    border: 1px solid var(--primary-color) !important;
    color: #fff !important;
    border-radius: 10px !important;
    padding: 12px 16px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
    min-height: 46px;
    transition: background 120ms ease, transform 60ms ease, box-shadow 120ms ease;
}

.login-card .ti-btn-primary:hover {
    background: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
}

.login-card .ti-btn-primary:active {
    transform: translateY(0.5px);
}

.login-card .ti-btn-primary:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.25) !important;
}

.login-card .ti-btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Alert (hata kutusu) */
.login-card .auth-alert {
    display: none;
    align-items: flex-start;
    gap: 10px;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #991B1B;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 14px;
    font-size: 13px;
}

.login-card .auth-alert i {
    color: #DC2626;
    font-size: 16px;
    line-height: 1;
    margin-top: 1px;
}

.login-card .auth-alert .font-semibold {
    font-weight: 600;
    margin-bottom: 1px;
}

.login-card .auth-alert .text-sm {
    font-size: 12px;
    color: #7F1D1D;
}

/* Alt bilgi (koyu arkaplan üzerinde) */
.auth-foot {
    margin-top: 18px;
    text-align: center;
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.01em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    line-height: 1.6;
}

.auth-foot-brand {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

.auth-foot-copyright {
    color: rgba(255, 255, 255, 0.7);
}

/* Xintra grid markup'ını nötrle (geriye dönük güvenlik) */
.auth-wrap .container,
.auth-wrap .grid {
    all: unset;
    display: block;
}

/* ============= RESPONSIVE ============= */

/* Tablet (≤900px) */
@media (max-width: 900px) {
    .auth-bg {
        background-position: center center;
    }
}

/* Küçük tablet & büyük mobil (≤640px) */
@media (max-width: 640px) {
    .login-card {
        padding: 28px 22px 24px;
    }
}

/* Mobil (≤480px) */
@media (max-width: 480px) {
    .auth-wrap {
        padding-top: max(56px, env(safe-area-inset-top, 24px));
        padding-bottom: max(20px, env(safe-area-inset-bottom, 16px));
        padding-left: max(16px, env(safe-area-inset-left, 0px));
        padding-right: max(16px, env(safe-area-inset-right, 0px));
    }

    .login-card {
        padding: 26px 20px 22px;
        border-radius: 14px;
        max-width: 100%;
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), 0 3px 10px rgba(0, 0, 0, 0.20);
    }

    .auth-lang {
        top: 10px;
        right: 10px;
        font-size: 11.5px;
    }

    .auth-lang a {
        padding: 5px 8px;
    }

    .login-head h1 {
        font-size: 19px;
    }

    .login-head p {
        font-size: 12.5px;
    }

    /* iOS auto-zoom önle — input focus'ta zoom yapmasın */
    .login-card input.form-control {
        font-size: 16px !important;
        padding: 12px 12px !important;
    }

    .pwd-wrap .form-control {
        padding-right: 46px !important;
    }

    .brand-suffix-wrap .form-control {
        padding-right: 130px !important;
    }

    .brand-suffix {
        font-size: 12px;
        right: 10px;
    }

    .login-card .ti-btn-primary {
        padding: 13px 16px !important;
        font-size: 15px !important;
        min-height: 48px;
    }

    .helper-row {
        font-size: 13px;
        margin: 6px 0 16px;
    }
}

/* Çok küçük (≤360px) — eski iPhone SE vb. */
@media (max-width: 360px) {
    .auth-wrap {
        padding-left: 12px;
        padding-right: 12px;
    }

    .login-card {
        padding: 22px 16px 20px;
        border-radius: 12px;
    }

    .brand {
        margin-bottom: 18px;
    }

    .brand img {
        max-height: 36px;
        max-width: 140px;
    }

    .login-head {
        margin-bottom: 18px;
    }

    .login-head h1 {
        font-size: 18px;
    }

    .brand-suffix-wrap .form-control {
        padding-right: 0.9rem !important;
    }

    .brand-suffix {
        display: none;
    }
}

/* Yatay (landscape) küçük yükseklik — telefonun yan tutuluşu */
@media (max-height: 560px) and (orientation: landscape) {
    .auth-wrap {
        padding-top: 16px;
        padding-bottom: 16px;
    }

    .login-card {
        padding: 22px 22px 18px;
    }

    .brand {
        margin-bottom: 14px;
    }

    .brand img {
        max-height: 34px;
    }

    .login-head {
        margin-bottom: 14px;
    }

    .field {
        margin-bottom: 10px;
    }

    .helper-row {
        margin: 0 0 12px;
    }

    .register-columns {
        gap: 16px;
    }

    .section-label {
        margin-bottom: 6px;
        padding-bottom: 4px;
    }
}

/* Register sayfası — geniş 2 sütunlu layout */
.register-card {
    max-width: 780px;
}

.register-card .brand img {
    max-height: 48px;
    max-width: 200px;
}

.register-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.register-col {
    min-width: 0;
}

.register-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.section-label {
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #E5E7EB;
}

.field-hint {
    display: block;
    font-size: 11.5px;
    color: #6B7280;
    margin-top: 3px;
}

.phone-input-wrap {
    display: flex;
    align-items: stretch;
    gap: 0;
}

.phone-prefix {
    display: flex;
    align-items: center;
    padding: 0 12px;
    background: #F3F4F6;
    border: 1px solid #D1D5DB;
    border-right: none;
    border-radius: 10px 0 0 10px;
    font-size: 13.5px;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
}

.login-card .phone-input.form-control {
    border-radius: 0 10px 10px 0 !important;
}

.captcha-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.captcha-image {
    height: 50px;
    border-radius: 8px;
    border: 1px solid #D1D5DB;
    background: #F9FAFB;
}

.captcha-refresh {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #D1D5DB;
    background: #F9FAFB;
    cursor: pointer;
    color: #374151;
    transition: background 0.15s;
}

.captcha-refresh:hover {
    background: #E5E7EB;
}

.checkbox-field label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12.5px;
    line-height: 1.5;
    color: #4B5563;
    cursor: pointer;
}

.checkbox-field input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .register-card {
        max-width: 100%;
    }

    .register-columns {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .register-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .login-card .phone-input.form-control {
        border-radius: 0 10px 10px 0 !important;
    }

    .captcha-image {
        height: 44px;
    }
}

@media (max-width: 480px) {
    .register-card {
        padding: 24px 18px 20px;
    }

    .register-columns {
        gap: 16px;
    }

    .section-label {
        font-size: 12.5px;
        margin-bottom: 8px;
    }

    .phone-prefix {
        padding: 0 10px;
        font-size: 13px;
        border-radius: 10px 0 0 10px;
    }

    .captcha-row {
        gap: 8px;
    }

    .captcha-image {
        height: 42px;
        border-radius: 6px;
    }

    .captcha-refresh {
        width: 34px;
        height: 34px;
    }

    .checkbox-field label {
        font-size: 12px;
        gap: 6px;
    }
}

@media (max-width: 360px) {
    .register-card {
        padding: 20px 14px 18px;
    }

    .register-columns {
        gap: 14px;
    }

    .captcha-image {
        height: 38px;
    }
}

/* Erişilebilirlik — reduce motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}
/* Google ile giris ayraci */
.google-sep {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 1.25rem 0 1rem;
    color: var(--adesk-text-muted, #7B8794);
    font-size: 0.8125rem;
}

.google-sep::before,
.google-sep::after {
    content: "";
    flex: 1 1 0;
    height: 1px;
    background: var(--adesk-border, #E4E7EB);
}

/* Google butonu formla ayni genislikte ortalanir */
.google-btn-wrap {
    display: flex;
    justify-content: center;
}

.google-btn-wrap iframe {
    margin: 0 auto !important;
}
