/* CRM giriş / şifre / 2FA sayfaları ortak stil (views/auth/_layout_*.php). Portaldaki auth.css ile aynı tasarım dili. */
:root {
    --tblr-font-sans-serif: 'Inter Var', -apple-system, BlinkMacSystemFont, San Francisco, Segoe UI, Roboto, Helvetica Neue, sans-serif;
    --lg-red: #D7192A;
    --lg-red-dark: #B31221;
    --lg-ink: #111827;
    --lg-text: #1F2937;
    --lg-muted: #6B7280;
    --lg-border: #E5E7EB;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
    font-family: var(--tblr-font-sans-serif);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "cv03", "cv04", "cv11";
    background: #fff;
    color: var(--lg-text);
    margin: 0;
}
.lg { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

/* Sol: marka paneli */
.lg-brand {
    position: relative; overflow: hidden; color: #fff;
    background: radial-gradient(120% 80% at 0% 0%, #2A1015 0%, var(--lg-ink) 55%), var(--lg-ink);
    padding: 56px 64px; display: flex; flex-direction: column; justify-content: space-between;
}
.lg-brand::after {
    content: ""; position: absolute; right: -160px; bottom: -160px; width: 480px; height: 480px;
    background-image: radial-gradient(rgba(215, 25, 42, .55) 2px, transparent 2.5px);
    background-size: 22px 22px; border-radius: 50%;
    -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 70%);
            mask-image: radial-gradient(circle, #000 0%, transparent 70%);
    pointer-events: none;
}
.lg-brand > * { position: relative; z-index: 1; }
/* İçerik panelde dikey ve yatay ortada; geniş ekranda sol üst köşeye yapışıp formla dengesiz durmasın */
.lg-brand > div:first-child { width: 100%; max-width: 560px; margin: auto; }
.lg-brand-foot { width: 100%; max-width: 560px; margin: 0 auto; }
.lg-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #FCA5A5; }
.lg-eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--lg-red); }
.lg-brand h1 { font-size: 40px; line-height: 1.12; font-weight: 750; letter-spacing: -.03em; margin: 18px 0 14px; color: #fff; max-width: 460px; }
.lg-brand p.lg-lead { font-size: 16px; line-height: 1.6; color: #CBD5E1; max-width: 440px; margin: 0; }
.lg-feats { list-style: none; padding: 0; margin: 40px 0 0; display: grid; gap: 18px; max-width: 440px; }
@media (min-width: 1600px) {
    .lg-brand h1 { font-size: 46px; max-width: 540px; }
    .lg-brand p.lg-lead { font-size: 17px; max-width: 500px; }
    .lg-feats { max-width: 500px; }
}
.lg-feats li { display: flex; gap: 14px; align-items: flex-start; }
.lg-feats .ic {
    flex: 0 0 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); color: #FCA5A5;
}
.lg-feats .ic svg { width: 20px; height: 20px; }
.lg-feats strong { display: block; font-size: 15px; font-weight: 600; color: #fff; margin-bottom: 2px; }
.lg-feats span { font-size: 14px; color: #94A3B8; line-height: 1.5; }
.lg-brand-foot { font-size: 13px; color: #64748B; }

/* Sağ: form */
.lg-main { display: flex; flex-direction: column; padding: 40px 24px; }
.lg-form-wrap { width: 100%; max-width: 400px; margin: auto; }
.lg-logo img { height: 48px; width: auto; display: block; }
.lg-main h2 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin: 36px 0 6px; color: var(--lg-ink); }
.lg-sub { color: var(--lg-muted); font-size: 15px; margin: 0 0 28px; }
.lg-field { margin-bottom: 18px; }
.lg-label-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.lg-label-row label, .lg-field > label { font-size: 14px; font-weight: 600; color: var(--lg-text); }
.lg-field > label { display: block; margin-bottom: 6px; }
.lg-link { font-size: 13px; font-weight: 500; color: var(--lg-red); text-decoration: none; }
.lg-link:hover { color: var(--lg-red-dark); text-decoration: underline; }
.lg-input-wrap { position: relative; }
.lg-input {
    width: 100%; height: 46px; padding: 0 14px; font-size: 16px; /* 16px altı iOS Safari odakta sayfayı yakınlaştırır */ color: var(--lg-ink); font-family: inherit;
    border: 1px solid #D1D5DB; border-radius: 10px; background: #fff; transition: border-color .15s, box-shadow .15s;
}
.lg-input::placeholder { color: #9CA3AF; }
.lg-input:focus { outline: none; border-color: var(--lg-red); box-shadow: 0 0 0 3px rgba(215, 25, 42, .14); }
.lg-input-wrap .lg-input { padding-right: 46px; }
.lg-eye {
    position: absolute; right: 4px; top: 4px; width: 38px; height: 38px; border: 0; background: transparent;
    border-radius: 8px; color: var(--lg-muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.lg-eye:hover { color: var(--lg-ink); background: #F3F4F6; }
.lg-eye:focus-visible { outline: 2px solid var(--lg-red); outline-offset: 1px; }
.lg-eye svg { width: 20px; height: 20px; }
.lg-eye .off { display: none; }
.lg-eye.on .on { display: none; }
.lg-eye.on .off { display: inline; }
.lg-remember { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--lg-text); cursor: pointer; margin: 2px 0 24px; }
.lg-remember input { width: 16px; height: 16px; accent-color: var(--lg-red); margin: 0; }
.lg-submit {
    width: 100%; height: 48px; border: 0; border-radius: 10px; background: var(--lg-red); color: #fff;
    font-size: 15px; font-weight: 600; font-family: inherit; cursor: pointer; transition: background .15s, transform .05s;
}
.lg-submit:hover { background: var(--lg-red-dark); }
.lg-submit:active { transform: translateY(1px); }
.lg-submit:focus-visible { outline: 2px solid var(--lg-red); outline-offset: 2px; }
.lg-submit[disabled] { opacity: .75; cursor: wait; }

.lg-alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; font-size: 14px; line-height: 1.45; margin-bottom: 20px; border: 1px solid; }
.lg-alert svg { flex: 0 0 20px; width: 20px; height: 20px; margin-top: 1px; }
.lg-alert.ok { background: #ECFDF5; border-color: #A7F3D0; color: #065F46; }
.lg-alert.warn { background: #FFFBEB; border-color: #FDE68A; color: #92400E; }
.lg-alert.err { background: #FEF2F2; border-color: #FECACA; color: #991B1B; }
.lg-alert.info { background: #F8FAFC; border-color: var(--lg-border); color: var(--lg-text); }
.lg-alert.info svg { color: var(--lg-red); }
.lg-alert b { font-weight: 600; }

.lg-input[disabled] { background: #F9FAFB; color: var(--lg-muted); cursor: not-allowed; }
.lg-hint { display: block; font-size: 13px; color: var(--lg-muted); margin-top: 6px; }
.lg-hint.bad { color: #B91C1C; }
.lg-hint.good { color: #047857; }
.lg-submit { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.lg-submit svg { width: 18px; height: 18px; }
.lg-back {
    display: inline-flex; align-items: center; gap: 6px; margin-top: 24px; font-size: 14px; font-weight: 500;
    color: var(--lg-muted); text-decoration: none;
}
.lg-back:hover { color: var(--lg-ink); }
.lg-back svg { width: 18px; height: 18px; }
.lg-foot-line { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--lg-border); font-size: 14px; color: var(--lg-muted); }
.lg-foot-line a { color: var(--lg-red); font-weight: 600; text-decoration: none; }
.lg-foot-line a:hover { text-decoration: underline; }

.lg-contact {
    margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--lg-border);
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.lg-contact p { margin: 0; font-size: 14px; color: var(--lg-muted); line-height: 1.45; }
.lg-contact p b { display: block; color: var(--lg-text); font-weight: 600; }
.lg-phone {
    display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 10px;
    border: 1px solid var(--lg-border); color: var(--lg-ink); font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap;
}
.lg-phone:hover { border-color: #D1D5DB; background: #F9FAFB; color: var(--lg-ink); }
.lg-phone svg { width: 18px; height: 18px; color: var(--lg-red); }
.lg-copy { text-align: center; font-size: 12px; color: #9CA3AF; margin-top: 32px; }

@media (max-width: 991px) {
    .lg { grid-template-columns: 1fr; }
    .lg-brand { display: none; }
    /* iPhone çentiği / durum çubuğu: viewport-fit=cover ile içerik güvenli alanın altından başlar */
    .lg-main { padding: calc(32px + env(safe-area-inset-top)) calc(20px + env(safe-area-inset-right)) calc(32px + env(safe-area-inset-bottom)) calc(20px + env(safe-area-inset-left)); }
    .lg-form-wrap { margin: 0 auto; }
}
@media (max-width: 400px) {
    .lg-main h2 { font-size: 23px; margin-top: 28px; }
    .lg-contact { flex-direction: column; align-items: stretch; }
    .lg-phone { justify-content: center; }
}

/* 2FA: 6 haneli kod kutuları */
.lg-code { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin: 4px 0 18px; }
.lg-code input {
    width: 100%; height: 56px; padding: 0; text-align: center; font-size: 24px; font-weight: 700; font-family: inherit;
    color: var(--lg-ink); border: 1px solid #D1D5DB; border-radius: 10px; background: #fff;
    transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none;
}
.lg-code input:focus { outline: none; border-color: var(--lg-red); box-shadow: 0 0 0 3px rgba(215, 25, 42, .14); }
.lg-code input.filled { border-color: #9CA3AF; }
.lg-code.bad input { border-color: #F87171; background: #FEF2F2; }
.lg-switch {
    display: block; width: 100%; margin-top: 14px; padding: 8px; border: 0; background: transparent; font-family: inherit;
    font-size: 14px; font-weight: 500; color: var(--lg-muted); text-align: center; cursor: pointer; border-radius: 8px;
}
.lg-switch:hover { color: var(--lg-ink); background: #F9FAFB; }
.lg-user { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: #F3F4F6; font-size: 14px; font-weight: 600; color: var(--lg-ink); margin: 0 0 24px; }
.lg-user .av { width: 26px; height: 26px; border-radius: 50%; background: var(--lg-red); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
@media (max-width: 400px) { .lg-code { gap: 6px; } .lg-code input { height: 50px; font-size: 21px; } }
