/* ==========================================================================
   Kimlik doğrulama ekranları
   Bölünmüş düzen: solda marka + ekosistem haritası, sağda form
   ========================================================================== */

:root {
    color-scheme: light;

    --auth-navy:        #0F2B46;
    --auth-navy-hover:  #163B5E;
    --auth-cyan:        #36C5F0;
    --auth-cyan-ring:   rgba(54, 197, 240, 0.35);
    --auth-link:        #16679A;
    --auth-muted:       #52657A;
    --auth-faint:       #8A9AAB;
    --auth-line:        #D9E2EA;
    --auth-line-strong: #C3CFDA;
    --auth-ground:      #EEF4F9;
    --auth-surface:     #F7FAFC;
    --auth-white:       #FFFFFF;

    --auth-danger:      #B42318;
    --auth-danger-bg:   #FEF3F2;
    --auth-danger-line: #FECDCA;
    --auth-good:        #067647;
    --auth-good-bg:     #ECFDF3;
    --auth-good-line:   #ABEFC6;
    --auth-info:        #16679A;
    --auth-info-bg:     #EFF8FF;
    --auth-info-line:   #B2DDFF;
    --auth-warn:        #8A5A00;

    --auth-r:           10px;
    --auth-r-lg:        14px;

    --auth-font:        'Manrope', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --auth-mono:        'JetBrains Mono', ui-monospace, 'SF Mono', Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { min-height: 100%; }

body.auth-body {
    margin: 0;
    font-family: var(--auth-font);
    font-size: 16px;
    color: var(--auth-navy);
    background: var(--auth-white);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.auth-body a { color: var(--auth-link); text-decoration: none; }
.auth-body a:hover { color: var(--auth-navy); text-decoration: underline; text-underline-offset: 3px; }

.auth-body :focus-visible {
    outline: 3px solid var(--auth-cyan);
    outline-offset: 2px;
}

[hidden] { display: none !important; }

/* ── Düzen ─────────────────────────────────────────────────────────────── */

.auth-split {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
}

/* Sol panel */
.auth-art {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 48px clamp(32px, 4.4vw, 72px) 44px;
    background: var(--auth-ground);
    overflow: hidden;
}

.auth-art-brand {
    display: inline-flex;
    align-self: flex-start;
    flex: 0 0 auto;
}

.auth-art-brand img {
    display: block;
    height: 44px;
    width: auto;
    max-width: 240px;
    object-fit: contain;
}

.auth-art-body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(16px, 3vh, 32px);
}

.auth-art-map {
    width: 100%;
    max-width: 560px;
    min-height: 0;
    flex: 0 1 auto;
    display: flex;
    justify-content: center;
}

.auth-art-map svg {
    display: block;
    width: 100%;
    height: auto;
    max-height: calc(100dvh - 300px);
    overflow: visible;
}

.auth-art-claim {
    margin: 0;
    max-width: 560px;
    text-align: center;
    font-size: clamp(24px, 2.2vw, 32px);
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--auth-navy);
    text-wrap: balance;
}

.auth-mark {
    position: relative;
    display: inline-block;
    white-space: nowrap;
    z-index: 0;
}

.auth-mark-ink {
    position: absolute;
    left: -3%;
    bottom: -3px;
    width: 106%;
    height: 16px;
    z-index: -1;
    transform-origin: left center;
    animation: auth-ink 1.1s .35s cubic-bezier(.2, .7, .2, 1) both;
}

.auth-mark-ink path {
    fill: none;
    stroke: var(--auth-cyan);
    stroke-width: 9;
    stroke-linecap: round;
    opacity: .55;
}

/* Sağ panel */
.auth-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 28px clamp(24px, 3.6vw, 56px) 24px;
    background: var(--auth-white);
}

.auth-topbar {
    display: flex;
    justify-content: flex-end;
}

.auth-lang {
    display: flex;
    gap: 6px;
}

.auth-lang a {
    min-width: 40px;
    padding: 6px 10px;
    border: 1.5px solid var(--auth-line);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    color: var(--auth-muted);
    transition: border-color .15s ease, color .15s ease;
}

.auth-lang a:hover { text-decoration: none; color: var(--auth-navy); border-color: var(--auth-line-strong); }
.auth-lang a[aria-current="true"] { color: var(--auth-navy); border-color: var(--auth-navy); }

.auth-center {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px 0;
}

.auth-shell {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    animation: auth-rise .55s cubic-bezier(.22, 1, .36, 1) both;
}

.auth-shell.auth-shell-wide { max-width: 460px; }

.auth-mobile-logo {
    display: none;
    height: 34px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    align-self: flex-start;
}

.auth-card { width: 100%; }

.auth-copy {
    text-align: center;
    font-size: 12.5px;
    color: var(--auth-faint);
}

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

.auth-form-title {
    margin: 0 0 10px;
    font-family: var(--auth-font);
    font-size: 34px;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--auth-navy);
    overflow-wrap: anywhere;
}

.auth-form-subtitle {
    margin: 0 0 28px;
    font-size: 16px;
    line-height: 1.55;
    color: var(--auth-muted);
}

/* Uzun formlarda bölüm başlığı */
h5.auth-form-subtitle {
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--auth-line);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--auth-muted);
}

.form-required-note {
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--auth-muted);
}

.form-required-note .text-danger,
.auth-label .text-danger {
    color: var(--auth-danger) !important;
    font-weight: 700;
}

/* ── Alanlar ───────────────────────────────────────────────────────────── */

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}

.auth-label-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.auth-label {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--auth-navy);
}

.auth-input { position: relative; }

.auth-card .form-control,
.auth-card .form-select {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    font-family: var(--auth-font);
    font-size: 16px;
    color: var(--auth-navy);
    background-color: var(--auth-white);
    border: 1.5px solid var(--auth-line);
    border-radius: var(--auth-r);
    box-shadow: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.auth-card .form-select { padding-right: 40px; }

.auth-card textarea.form-control {
    height: auto;
    min-height: 104px;
    padding: 14px 16px;
    resize: vertical;
}

.auth-card .form-control::placeholder { color: var(--auth-faint); opacity: 1; }

.auth-card .form-control:hover,
.auth-card .form-select:hover { border-color: var(--auth-line-strong); }

.auth-card .form-control:focus,
.auth-card .form-select:focus {
    outline: 0;
    border-color: var(--auth-navy);
    box-shadow: 0 0 0 3px var(--auth-cyan-ring);
}

.auth-card .form-control:disabled,
.auth-card .form-control[readonly] {
    color: var(--auth-muted);
    background-color: var(--auth-surface);
    border-color: var(--auth-line);
}

.auth-input.has-toggle .form-control { padding-right: 54px; }

.auth-toggle-pass {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--auth-muted);
    cursor: pointer;
    transition: color .15s ease, background-color .15s ease;
}

.auth-toggle-pass:hover { color: var(--auth-navy); background: var(--auth-ground); }

.auth-caps {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--auth-warn);
}

.auth-card input:-webkit-autofill,
.auth-card input:-webkit-autofill:hover,
.auth-card input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--auth-navy);
    -webkit-box-shadow: 0 0 0 1000px #F2F8FC inset;
    caret-color: var(--auth-navy);
    transition: background-color 9999s ease-in-out 0s;
}

/* Hata durumu */
.auth-card .invalid-feedback,
.auth-card .text-danger {
    color: var(--auth-danger) !important;
    font-size: 13px;
}

.auth-field > .invalid-feedback { margin: 0; }
.auth-field > .invalid-feedback strong { font-weight: 600; }

.auth-card .form-control.is-invalid,
.auth-card .form-select.is-invalid {
    border-color: var(--auth-danger);
    background-image: none;
    padding-right: 16px;
}

.auth-card .auth-input.has-toggle .form-control.is-invalid { padding-right: 54px; }

.auth-card .form-control.is-invalid:focus { box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.16); }

/* ── Satır yardımcıları ────────────────────────────────────────────────── */

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 18px;
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--auth-muted);
    cursor: pointer;
    user-select: none;
}

.auth-card .form-check-input {
    width: 18px;
    height: 18px;
    margin: 0;
    border: 1.5px solid var(--auth-line-strong);
    cursor: pointer;
}

.auth-card .form-check-input:checked { background-color: var(--auth-navy); border-color: var(--auth-navy); }
.auth-card .form-check-input:focus { box-shadow: 0 0 0 3px var(--auth-cyan-ring); border-color: var(--auth-navy); }

.auth-mini-link {
    font-size: 14px;
    font-weight: 600;
}

/* ── Düğmeler ──────────────────────────────────────────────────────────── */

.auth-card .btn-auth-primary,
.auth-card a.btn-auth-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 54px;
    padding: 12px 20px;
    border: 0;
    border-radius: var(--auth-r);
    background: var(--auth-navy);
    color: var(--auth-white);
    font-family: var(--auth-font);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s ease, opacity .15s ease;
}

.auth-card .btn-auth-primary:hover,
.auth-card a.btn-auth-primary:hover {
    background: var(--auth-navy-hover);
    color: var(--auth-white);
    text-decoration: none;
}

.auth-card .btn-auth-primary:active { background: #0A2036; }

.auth-card .btn-auth-primary:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.auth-card .btn-auth-primary[aria-busy="true"] {
    opacity: .85;
    cursor: progress;
}

.auth-card .btn-auth-primary .arw {
    font-size: .85em;
    transition: transform .2s ease;
}

.auth-card .btn-auth-primary:hover .arw { transform: translateX(4px); }
.auth-card .btn-auth-primary[aria-busy="true"] .arw { display: none; }

.auth-spin {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, .35);
    border-top-color: var(--auth-white);
    border-radius: 50%;
    animation: auth-spin .8s linear infinite;
}

.auth-card .btn-auth-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 48px;
    padding: 10px 18px;
    border: 1.5px solid var(--auth-line);
    border-radius: var(--auth-r);
    background: var(--auth-white);
    color: var(--auth-navy);
    font-family: var(--auth-font);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    overflow-wrap: anywhere;
    transition: border-color .15s ease, background-color .15s ease;
}

.auth-card .btn-auth-ghost:hover {
    border-color: var(--auth-navy);
    background: var(--auth-surface);
    color: var(--auth-navy);
    text-decoration: none;
}

.auth-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

/* ── Bağlantılar / ayıraç ──────────────────────────────────────────────── */

.auth-card .auth-link {
    margin-top: 24px;
    text-align: center;
    font-size: 15px;
    color: var(--auth-muted);
}

.auth-card .auth-link a { font-weight: 700; }

.auth-sep {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--auth-faint);
}

.auth-sep::before,
.auth-sep::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--auth-line);
}

.auth-foot-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 20px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--auth-line);
}

.auth-foot-links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--auth-muted);
}

.auth-foot-links a:hover { color: var(--auth-navy); }

/* ── Bildirimler ───────────────────────────────────────────────────────── */

.auth-card .alert {
    border-radius: var(--auth-r);
    border: 1.5px solid var(--auth-line);
    background: var(--auth-surface);
    color: var(--auth-navy);
    font-size: 14px;
    line-height: 1.5;
    padding: 12px 14px;
}

.auth-card .alert-success { border-color: var(--auth-good-line); background: var(--auth-good-bg); color: var(--auth-good); }
.auth-card .alert-info    { border-color: var(--auth-info-line); background: var(--auth-info-bg); color: var(--auth-info); }
.auth-card .alert-danger  { border-color: var(--auth-danger-line); background: var(--auth-danger-bg); color: var(--auth-danger); }

/* Durum simgesi (başarı ekranları) */
.auth-status-icon {
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    border-radius: 14px;
    font-size: 24px;
    color: var(--auth-good);
    background: var(--auth-good-bg);
    border: 1.5px solid var(--auth-good-line);
}

/* Cloudflare doğrulama alanı */
.auth-card .cf-turnstile {
    min-height: 65px;
    margin-bottom: 18px;
}

/* ── İki adımlı doğrulama ──────────────────────────────────────────────── */

.auth-badge {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    border-radius: 14px;
    font-size: 21px;
    color: var(--auth-navy);
    background: var(--auth-ground);
    border: 1.5px solid var(--auth-line);
}

.auth-badge img { max-width: 26px; height: auto; }

.otp-grid {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin: 4px 0 20px;
}

.auth-card .otp-input {
    width: 100%;
    max-width: 58px;
    height: 62px;
    padding: 0;
    text-align: center;
    font-family: var(--auth-mono);
    font-size: 24px;
    font-weight: 700;
    color: var(--auth-navy);
    background: var(--auth-white);
    border: 1.5px solid var(--auth-line);
    border-radius: var(--auth-r);
    caret-color: var(--auth-navy);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.auth-card .otp-input:hover { border-color: var(--auth-line-strong); }

.auth-card .otp-input:focus {
    outline: 0;
    border-color: var(--auth-navy);
    box-shadow: 0 0 0 3px var(--auth-cyan-ring);
}

.auth-method {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 10px;
    border: 1.5px solid var(--auth-line);
    border-radius: var(--auth-r);
    background: var(--auth-white);
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.auth-method:hover { border-color: var(--auth-line-strong); background: var(--auth-surface); }

.auth-method:has(input:checked) {
    border-color: var(--auth-navy);
    background: var(--auth-ground);
    box-shadow: 0 0 0 1px var(--auth-navy);
}

.auth-method .form-check-input { margin-top: 3px; flex: 0 0 auto; }

.auth-method .m-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--auth-navy);
    overflow-wrap: anywhere;
}

.auth-method .m-title i { color: var(--auth-link); }

.auth-method .m-desc {
    display: block;
    margin-top: 4px;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--auth-muted);
    overflow-wrap: anywhere;
}

.auth-qr {
    display: inline-flex;
    padding: 12px;
    margin-bottom: 14px;
    border-radius: var(--auth-r-lg);
    border: 1.5px solid var(--auth-line);
    background: var(--auth-white);
}

.auth-qr img,
.auth-qr canvas,
.auth-qr svg { display: block; width: 190px; height: 190px; }

.auth-note {
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--auth-muted);
    text-align: center;
}

/* ── SweetAlert ────────────────────────────────────────────────────────── */

.swal2-popup {
    font-family: var(--auth-font) !important;
    color: var(--auth-navy) !important;
    border-radius: var(--auth-r-lg) !important;
}

.swal2-title { color: var(--auth-navy) !important; font-weight: 800 !important; }
.swal2-html-container { color: var(--auth-muted) !important; }

.swal2-confirm.swal2-styled {
    background: var(--auth-navy) !important;
    color: var(--auth-white) !important;
    font-weight: 700 !important;
    border-radius: var(--auth-r) !important;
}

.swal2-cancel.swal2-styled {
    background: var(--auth-white) !important;
    color: var(--auth-navy) !important;
    border: 1.5px solid var(--auth-line) !important;
    font-weight: 600 !important;
    border-radius: var(--auth-r) !important;
}

html.swal2-height-auto { height: 100% !important; }
body.swal2-shown { padding-right: 0 !important; }

/* ── Ekosistem haritası ────────────────────────────────────────────────── */

.ccm-node-box { fill: #FFFFFF; stroke: #0F2B46; stroke-width: 1.2; }
.ccm-lbl { font-family: var(--auth-font); font-size: 17px; font-weight: 600; fill: #0F2B46; }
.ccm-line { fill: none; stroke: #0F2B46; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ccm-fill { fill: #36C5F0; stroke: none; }
.ccm-spoke { stroke: #C6D1DC; stroke-width: 1; }
.ccm-sector { fill: none; stroke: #0F2B46; stroke-width: 1.2; }
.ccm-sector-tick { stroke: #0F2B46; stroke-width: 1.6; stroke-linecap: round; }
.ccm-sector-lbl { font-family: var(--auth-font); font-size: 16px; font-weight: 600; fill: #0F2B46; }
.ccm-ring { fill: none; stroke: #0F2B46; stroke-width: 1.2; stroke-dasharray: 2 5; stroke-linecap: round; }
.ccm-ring-lbl { font-family: var(--auth-font); font-size: 15px; font-weight: 700; fill: #0F2B46; }
.ccm-ring-glow { fill: none; stroke: #36C5F0; stroke-width: 8; opacity: .95; animation: ccm-breathe 4.8s ease-in-out infinite; }
.ccm-core { fill: #FFFFFF; stroke: #0F2B46; stroke-width: 1.2; }
.ccm-core-t1 { font-family: var(--auth-font); font-size: 40px; font-weight: 800; fill: #0F2B46; letter-spacing: 1px; }
.ccm-core-t2 { font-family: var(--auth-font); font-size: 24px; font-weight: 600; fill: #52657A; }
.ccm-gring { fill: none; stroke: #DCE3EA; stroke-width: 1; }
.ccm-chip rect { fill: #F4F7FA; stroke: #0F2B46; stroke-width: 1; }
.ccm-chip text { font-family: var(--auth-font); font-size: 15px; font-weight: 700; letter-spacing: .04em; fill: #0F2B46; }
.ccm-pulse { fill: #36C5F0; stroke: #0F2B46; stroke-width: 1.2; }

/* ── Duyarlı davranış ──────────────────────────────────────────────────── */

@media (max-width: 1199.98px) {
    .auth-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .auth-art { padding: 40px 32px 36px; }
}

@media (max-width: 991.98px) {
    .auth-split { grid-template-columns: 1fr; }
    .auth-art { display: none; }
    .auth-mobile-logo { display: block; }
    .auth-main { padding: 20px 24px 20px; }
    .auth-center { align-items: flex-start; padding: 20px 0 32px; }
    .auth-shell { max-width: 460px; }
}

@media (max-width: 575.98px) {
    .auth-main { padding: 16px 16px 16px; }
    .auth-form-title { font-size: 28px; }
    .auth-form-subtitle { font-size: 15px; margin-bottom: 24px; }
    .auth-shell { gap: 24px; }
}

@media (max-width: 400px) {
    .otp-grid { gap: 6px; }
    .auth-card .otp-input { height: 54px; font-size: 20px; }
}

@media (max-height: 760px) and (min-width: 992px) {
    .auth-art-brand img { height: 36px; }
    .auth-art-claim { font-size: 24px; }
}

/* ── Hareket ───────────────────────────────────────────────────────────── */

@keyframes auth-rise {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}

@keyframes auth-ink {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}

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

@keyframes ccm-breathe {
    0%, 100% { opacity: .95; }
    50%      { opacity: .45; }
}

@media (prefers-reduced-motion: reduce) {
    .auth-shell,
    .auth-mark-ink,
    .ccm-ring-glow { animation: none !important; }
    .ccm-pulses { display: none; }
    .auth-card .btn-auth-primary .arw { transition: none; }
    .auth-spin { animation-duration: 2s; }
}
