/* Giriş ekranı: bağımsız, telefon öncelikli. Masaüstünde marka paneli + form, açık/koyu tema. */
:root {
    --lg-bg: #ffffff;
    --lg-surface: #f8fafc;
    --lg-text: #0b1120;
    --lg-muted: #64748b;
    --lg-soft: #94a3b8;
    --lg-border: #e2e8f0;
    --lg-border-strong: #cbd5e1;
    --lg-ink: #0b1120;
    --lg-ink-2: #1e293b;
    --lg-accent: #4f46e5;
    --lg-accent-2: #06b6d4;
    --lg-focus: 0 0 0 4px rgba(79, 70, 229, .16);
    --lg-danger: #dc2626;
    --lg-danger-bg: #fef2f2;
    --lg-danger-text: #991b1b;
    --lg-success: #059669;
    --lg-success-bg: #ecfdf5;
    --lg-warn: #b45309;
    --lg-logo-filter: none;
    --lg-ease: cubic-bezier(.2, .8, .2, 1);
}
@media (prefers-color-scheme: dark) {
    :root {
        --lg-bg: #0b1120;
        --lg-surface: #111a2e;
        --lg-text: #e2e8f0;
        --lg-muted: #94a3b8;
        --lg-soft: #64748b;
        --lg-border: #1e293b;
        --lg-border-strong: #334155;
        --lg-ink: #e2e8f0;
        --lg-ink-2: #ffffff;
        --lg-accent: #818cf8;
        --lg-focus: 0 0 0 4px rgba(129, 140, 248, .22);
        --lg-danger-bg: rgba(220, 38, 38, .12);
        --lg-danger-text: #fca5a5;
        --lg-success-bg: rgba(5, 150, 105, .14);
        --lg-warn: #fbbf24;
        --lg-logo-filter: invert(1);
    }
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body.lg {
    background: var(--lg-bg);
    color: var(--lg-text);
    font: 15px/1.55 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-feature-settings: "cv11", "ss01";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.lg svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.lg a { color: var(--lg-accent); text-decoration: none; font-weight: 600; }
.lg a:hover { text-decoration: underline; }

.lg-shell { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 1fr; }

/* ---------- Marka paneli (yalnız geniş ekranda) ---------- */
.lg-brand { display: none; }

@media (min-width: 960px) {
    .lg-shell { grid-template-columns: minmax(420px, 46%) 1fr; }
    .lg-brand {
        position: relative; overflow: hidden; isolation: isolate;
        display: flex; flex-direction: column; justify-content: space-between;
        padding: 44px 56px; color: #e2e8f0;
        background:
            radial-gradient(1200px 600px at -10% -20%, rgba(79, 70, 229, .45), transparent 60%),
            radial-gradient(900px 500px at 110% 110%, rgba(6, 182, 212, .28), transparent 60%),
            linear-gradient(160deg, #0b1120 0%, #111827 55%, #0b1120 100%);
    }
    /* İnce ızgara dokusu */
    .lg-brand::before {
        content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
        background-image:
            linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
            linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
        background-size: 44px 44px;
        mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%);
        -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%);
    }
    .lg-brand-glow {
        position: absolute; z-index: -1; width: 420px; height: 420px; border-radius: 50%;
        right: -120px; top: 30%; filter: blur(80px); opacity: .35;
        background: conic-gradient(from 180deg, #4f46e5, #06b6d4, #4f46e5);
    }
    .lg-brand-logo { height: 40px; width: auto; filter: invert(1); align-self: flex-start; opacity: .95; }
    .lg-brand-body { max-width: 460px; }
    .lg-eyebrow {
        display: inline-block; margin: 0 0 16px; padding: 6px 12px; border-radius: 999px;
        font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
        color: #c7d2fe; background: rgba(129, 140, 248, .12); border: 1px solid rgba(129, 140, 248, .25);
    }
    .lg-brand-title {
        margin: 0 0 32px; font-size: clamp(28px, 2.6vw, 38px); line-height: 1.15; font-weight: 700;
        letter-spacing: -.02em; color: #fff;
    }

    /* Örnek ödeme fişi (cam kart) */
    .lg-receipt {
        width: 100%; max-width: 360px; padding: 20px 22px; border-radius: 18px; margin-bottom: 32px;
        background: linear-gradient(145deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .03));
        border: 1px solid rgba(255, 255, 255, .12);
        box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .08);
        backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
        animation: lg-float 7s ease-in-out infinite;
    }
    .lg-receipt-head { display: flex; align-items: center; gap: 12px; }
    .lg-receipt-head strong { display: block; color: #fff; font-size: 14px; }
    .lg-receipt-head span { font-size: 12.5px; color: #94a3b8; }
    .lg-receipt-icon {
        width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
        background: rgba(16, 185, 129, .16); color: #34d399;
    }
    .lg-receipt-amount {
        margin: 16px 0 10px; font-size: 30px; font-weight: 700; color: #fff; letter-spacing: -.02em;
        font-variant-numeric: tabular-nums;
    }
    .lg-receipt-amount small { font-size: 15px; font-weight: 600; color: #94a3b8; }
    .lg-receipt-meta { display: flex; justify-content: space-between; font-size: 12.5px; color: #94a3b8; }
    .lg-receipt-meta span:last-child { letter-spacing: .08em; }

    .lg-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
    .lg-points li { display: flex; align-items: center; gap: 12px; font-size: 14.5px; color: #cbd5e1; }
    .lg-points svg {
        width: 32px; height: 32px; padding: 7px; border-radius: 9px;
        color: #a5b4fc; background: rgba(129, 140, 248, .1); border: 1px solid rgba(129, 140, 248, .18);
    }
    .lg-brand-foot { margin: 0; font-size: 12.5px; color: #64748b; }
}

@keyframes lg-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* ---------- Form tarafı ---------- */
.lg-main {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 40px 20px calc(24px + env(safe-area-inset-bottom));
}
.lg-panel { width: 100%; max-width: 384px; animation: lg-in .5s var(--lg-ease) both; }
@keyframes lg-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.lg-logo { display: block; height: 38px; width: auto; margin: 0 0 36px; filter: var(--lg-logo-filter); }
@media (min-width: 960px) { .lg-logo { display: none; } }

.lg-title { margin: 0; font-size: 28px; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; }
.lg-sub { margin: 8px 0 28px; color: var(--lg-muted); }

.lg-notice {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 12px 14px; margin-bottom: 20px; border-radius: 12px; font-size: 14px;
    background: var(--lg-success-bg); color: var(--lg-success);
}
.lg-notice span { color: var(--lg-text); }

.lg-field { margin-bottom: 16px; }
.lg-field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 8px; }
.lg-input {
    position: relative; display: flex; align-items: center;
    background: var(--lg-surface); border: 1px solid var(--lg-border-strong); border-radius: 12px;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.lg-input:hover { border-color: var(--lg-soft); }
.lg-input:focus-within { border-color: var(--lg-accent); box-shadow: var(--lg-focus); background: var(--lg-bg); }
.lg-input > svg { position: absolute; left: 15px; color: var(--lg-soft); pointer-events: none; transition: color .15s; }
.lg-input:focus-within > svg { color: var(--lg-accent); }
.lg-input input {
    width: 100%; height: 52px; border: 0; outline: none; background: transparent; border-radius: 12px;
    padding: 0 16px 0 44px; font: inherit; font-size: 16px; color: var(--lg-text);
}
.lg-input input::placeholder { color: var(--lg-soft); opacity: .7; }
.lg-input input#password { padding-right: 50px; }
/* Tarayıcı otomatik doldurmasında renk bozulmasın */
.lg-input input:-webkit-autofill {
    -webkit-text-fill-color: var(--lg-text);
    -webkit-box-shadow: 0 0 0 1000px var(--lg-surface) inset;
    caret-color: var(--lg-text);
}
.lg-form.has-error .lg-input { border-color: var(--lg-danger); }
.lg-form.has-error .lg-input:focus-within { box-shadow: 0 0 0 4px rgba(220, 38, 38, .14); }

.lg-eye {
    position: absolute; right: 5px; width: 42px; height: 42px; border: 0; background: transparent;
    color: var(--lg-soft); border-radius: 9px; display: grid; place-items: center; cursor: pointer;
}
.lg-eye:hover { color: var(--lg-text); background: var(--lg-border); }
.lg-eye:focus-visible { outline: none; box-shadow: var(--lg-focus); }
.lg-eye .lg-eye-hide { display: none; }
.lg-eye[aria-pressed="true"] .lg-eye-show { display: none; }
.lg-eye[aria-pressed="true"] .lg-eye-hide { display: block; }

.lg-hint { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; font-size: 13px; color: var(--lg-warn); }
.lg-hint[hidden] { display: none; }
.lg-hint svg { width: 15px; height: 15px; }

.lg-error {
    display: none; margin: 4px 0 14px; padding: 11px 14px; border-radius: 12px;
    background: var(--lg-danger-bg); color: var(--lg-danger-text); font-size: 14px;
}
.lg-error.is-visible { display: block; animation: lg-shake .35s ease; }
@keyframes lg-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

.lg-btn {
    position: relative; width: 100%; height: 54px; margin-top: 8px; border: 0; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer;
    font: inherit; font-size: 16px; font-weight: 650; letter-spacing: .005em; color: #fff;
    background: linear-gradient(180deg, #1e293b, #0b1120);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .08) inset, 0 10px 24px -10px rgba(11, 17, 32, .55);
    transition: transform .12s var(--lg-ease), box-shadow .2s, filter .2s;
}
@media (prefers-color-scheme: dark) {
    .lg-btn { background: linear-gradient(180deg, #6366f1, #4f46e5); box-shadow: 0 10px 28px -10px rgba(99, 102, 241, .6); }
}
.lg-btn:hover { filter: brightness(1.12); }
.lg-btn:active { transform: scale(.985); }
.lg-btn:focus-visible { outline: none; box-shadow: var(--lg-focus); }
.lg-btn:disabled { cursor: not-allowed; filter: saturate(.6) brightness(.95); transform: none; }
.lg-btn-arrow { transition: transform .2s var(--lg-ease); }
.lg-btn:hover:not(:disabled) .lg-btn-arrow { transform: translateX(3px); }
.lg-btn.is-loading .lg-btn-arrow, .lg-btn:disabled .lg-btn-arrow { display: none; }
.lg-spinner {
    display: none; width: 18px; height: 18px; border-radius: 50%;
    border: 2.5px solid rgba(255, 255, 255, .3); border-top-color: #fff; animation: lg-spin .8s linear infinite;
}
.lg-btn.is-loading .lg-spinner { display: inline-block; }
@keyframes lg-spin { to { transform: rotate(360deg); } }

.lg-help { margin: 20px 0 0; font-size: 14px; color: var(--lg-muted); }
.lg-help summary {
    cursor: pointer; list-style: none; width: fit-content; margin: 0 auto;
    color: var(--lg-accent); font-weight: 600; border-radius: 6px;
}
.lg-help summary::-webkit-details-marker { display: none; }
.lg-help summary:focus-visible { outline: none; box-shadow: var(--lg-focus); }
.lg-help p {
    margin: 12px 0 0; padding: 12px 14px; border-radius: 12px; text-align: center;
    background: var(--lg-surface); border: 1px solid var(--lg-border);
}

.lg-trust {
    list-style: none; margin: 28px 0 0; padding: 20px 0 0; border-top: 1px solid var(--lg-border);
    display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px;
    font-size: 12.5px; color: var(--lg-muted);
}
.lg-trust li { display: flex; align-items: center; gap: 6px; }
.lg-trust svg { width: 15px; height: 15px; color: var(--lg-success); }

.lg-foot { margin: 28px 0 0; font-size: 12px; color: var(--lg-soft); }
@media (min-width: 960px) { .lg-foot { display: none; } }

@media (max-width: 959px) {
    .lg-main { justify-content: flex-start; padding-top: max(48px, env(safe-area-inset-top)); }
}
@media (max-width: 380px) {
    .lg-title { font-size: 24px; }
    .lg-logo { margin-bottom: 28px; }
}
@media (prefers-reduced-motion: reduce) {
    .lg *, .lg *::before { animation: none !important; transition: none !important; }
}
