/* =============================================================================
   ClubMobil1 — kimlik doğrulama ekranları tasarım sistemi
   Marka: Mobil kurumsal mavi/kırmızı korunur, tipografi ve boşluk sistemi yenidir.
   Not: EMprint lisanslı marka fontudur; sunucuda yoksa Barlow'a düşer.
   ========================================================================== */

/* EMprint — ExxonMobil kurumsal yazı tipi, markanın gerçek sesi.
   Dosyalar eski siteden alındı (Contents/fonts). Daha önce burada woff2
   aranıyordu; o dosyalar hiç yoktu ve site sessizce Barlow'a düşüyordu,
   yani marka fontu hiç kullanılmıyordu. TTF ile devreye alındı.
   NOT: woff2'ye dönüştürmek dosya boyutunu ~%40 düşürür (yayın öncesi iş). */
@font-face {
    font-family: 'EMprint';
    src: url('../fonts/EMprint-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'EMprint';
    src: url('../fonts/EMprint-Semibold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* Semibold dosyası 700 için de kullanılır: ayrı bir Bold kesimi lisansta yok. */
@font-face {
    font-family: 'EMprint';
    src: url('../fonts/EMprint-Semibold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    /* marka */
    --navy-950: #050D1F;
    --brand-800: #002163;
    --brand-700: #002B7A;
    --brand-600: #003399; /* Mobil mavi */
    --brand-400: #4D7FD6;
    --brand-100: #DCE6FA;
    --red-600: #D41620; /* Mobil kırmızı — yalnızca uyarı/vurgu */
    --red-100: #FCE3E4;
    --gold: #B8860B;    /* seviye/rozet */
    --gold-100: #FBF2DB;
    --ok-600: #0B7A4B;  /* olumlu durum */
    --ok-100: #DFF3E9;

    /* yüzeyler (maviye hafif kayan nötrler) */
    --canvas: #F1F4FB;
    --surface: #FFFFFF;
    --surface-2: #F7F9FD;
    --surface-3: #E9EEF8;
    --line: #D9E1F0;
    --line-strong: #B9C6DF;

    /* metin */
    --ink: #0F1728;
    --ink-2: #39435A;
    --muted: #5F6B84;

    --ring: rgba(0,51,153,.28);
    --shadow-card: 0 1px 2px rgba(10,23,51,.06), 0 12px 32px -12px rgba(10,23,51,.24);
    --r-sm: 6px;
    --r-md: 10px;
    --r-lg: 16px;

    /* Marka fontu HER İKİSİNDE de önce gelir. Daha önce başlıklarda
       Barlow Condensed öndeydi; EMprint yüklü olsa bile başlıklar Google
       fontuyla çiziliyordu, yani marka sesi hiç duyulmuyordu. */
    --display: 'EMprint', 'Barlow Condensed', system-ui, sans-serif;
    --body: 'EMprint', 'Barlow', system-ui, -apple-system, sans-serif;

    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --canvas: #080E1C;
        --surface: #101A2E;
        --surface-2: #16223A;
        --surface-3: #1C2B47;
        --line: #22314F;
        --line-strong: #33456B;
        --ink: #E9EEF9;
        --ink-2: #B7C2D8;
        --muted: #8D9ABA;
        --brand-100: #16274B;
        --red-100: #3A1416;
        --gold: #D9A82A;
        --gold-100: #332708;
        --ok-600: #38B37C;
        --ok-100: #0C2A1E;
        --ring: rgba(77,127,214,.4);
        --shadow-card: 0 1px 2px rgba(0,0,0,.5), 0 16px 40px -16px rgba(0,0,0,.7);
    }
}

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

html, body { height: 100%; }

body {
    margin: 0;
    background: var(--canvas);
    color: var(--ink);
    font-family: var(--body);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-600); text-underline-offset: 3px; }

:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 4px; }

@media (prefers-color-scheme: dark) {
    a { color: var(--brand-400); }
}

/* ---------- yerleşim ---------- */
.shell { display: flex; min-height: 100%; }

.pane {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(20px,3vw,48px) 16px;
}



/* ---------- form paneli ---------- */
.panel {
    width: 100%;
    max-width: 440px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-card);
    padding: clamp(22px,3vw,32px);
}

.panel-head { margin-bottom: 22px; }

.eyebrow {
    font-family: var(--display);
    text-transform: uppercase;
    letter-spacing: .16em;
    font-size: 12px;
    color: var(--brand-600);
    font-weight: 600;
    margin: 0;
}

@media (prefers-color-scheme: dark) {
    .eyebrow { color: var(--brand-400); }
}

.panel-head h2 {
    font-family: var(--display);
    font-size: 29px;
    font-weight: 600;
    margin: 4px 0 6px;
}

.panel-head .lede { margin: 0; color: var(--muted); font-size: 14px; }

.muted { color: var(--muted); }

/* ---------- alanlar ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }

/* Ad + Soyad gibi ikili alanlar. 640px altında tek sütuna iner (tasarım sistemi kırılımı). */
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.field-row > .field { margin-bottom: 16px; }

@media (max-width: 640px) {
    .field-row { grid-template-columns: 1fr; gap: 0; }
}

    .field > label { font-size: 13px; font-weight: 600; color: var(--ink-2); }

.hint { font-size: 12px; color: var(--muted); }

input[type=text], input[type=email], input[type=tel] {
    font-family: var(--body);
    font-size: 16px; /* iOS'ta odakta zoom olmaması için 16px */
    color: var(--ink);
    background: var(--surface-2);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-md);
    padding: 12px 14px;
    width: 100%;
    font-variant-numeric: tabular-nums;
    letter-spacing: .02em;
    transition: border-color .15s, box-shadow .15s, background .15s;
}

    input::placeholder { color: var(--muted); opacity: .7; letter-spacing: .06em; }

    input:hover { border-color: var(--brand-400); }

    input:focus {
        outline: none;
        border-color: var(--brand-600);
        background: var(--surface);
        box-shadow: 0 0 0 4px var(--ring);
    }

    input.input-validation-error { border-color: var(--red-600); background: var(--red-100); }

.field-error { color: var(--red-600); font-size: 12.5px; }

    .field-error:empty { display: none; }

/* ---------- onay kutuları ---------- */
.consent {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    margin-bottom: 12px;
    font-size: 13.5px;
    color: var(--ink-2);
    line-height: 1.5;
}

    .consent input[type=checkbox] {
        margin: 2px 0 0;
        width: 18px;
        height: 18px;
        accent-color: var(--brand-600);
        flex: 0 0 auto;
    }

    .consent label { font-weight: 400; display: block; }

.consent-text { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }

    .consent-text .btn-link { font-size: 12.5px; font-weight: 500; }

.legal-links { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- düğmeler ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    border: 1px solid transparent;
    border-radius: var(--r-md);
    padding: 13px 18px;
    font-family: var(--body);
    font-size: 15.5px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform .08s ease, background .15s, border-color .15s;
}

    .btn:active { transform: translateY(1px); }

.btn-primary {
    background: var(--brand-600);
    color: #fff;
    box-shadow: 0 8px 18px -10px rgba(0,51,153,.9);
}

    .btn-primary:hover { background: var(--brand-700); }

    .btn-primary:disabled { background: var(--line-strong); color: var(--muted); cursor: not-allowed; box-shadow: none; }

.btn-ghost { background: transparent; color: var(--ink-2); border-color: var(--line-strong); }

    .btn-ghost:hover { border-color: var(--brand-600); color: var(--brand-600); }

.btn-link {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-weight: 600;
    color: var(--brand-600);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

@media (prefers-color-scheme: dark) {
    .btn-link { color: var(--brand-400); }
}

.btn-link:disabled { color: var(--muted); cursor: not-allowed; text-decoration: none; }

.stack { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }

/* ---------- uyarılar ---------- */
.alert {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    border-radius: var(--r-md);
    padding: 11px 13px;
    font-size: 13.5px;
    margin-bottom: 16px;
    background: var(--red-100);
    border: 1px solid rgba(212,22,32,.35);
    color: var(--ink);
}

    .alert ul { margin: 0; padding-left: 18px; }

    /* Boş doğrulama özeti görünmez */
    .alert.validation-summary-valid { display: none; }

/* ---------- OTP ---------- */
.otp { display: flex; gap: 9px; justify-content: space-between; margin: 6px 0 4px; }

    .otp input {
        width: 100%;
        text-align: center;
        font-family: var(--display);
        font-size: 26px;
        font-weight: 600;
        padding: 12px 0;
    }

.otp-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--muted);
    margin-top: 12px;
}

.countdown { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink-2); }

/* ---------- adımlar ---------- */
.steps {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
}

.step { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }

    .step .dot {
        width: 23px;
        height: 23px;
        border-radius: 50%;
        display: grid;
        place-items: center;
        font-family: var(--display);
        font-size: 12px;
        font-weight: 700;
        background: var(--surface-2);
        border: 1px solid var(--line-strong);
        color: var(--muted);
    }

    .step.active { color: var(--ink); font-weight: 600; }

        .step.active .dot { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }

    .step.done .dot { background: var(--brand-100); border-color: var(--brand-600); color: var(--brand-600); }

/* ---------- alt bağlantılar ---------- */
.footlinks {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    margin-top: 22px;
    font-size: 13px;
    color: var(--muted);
    text-align: center;
}

    .footlinks p { margin: 0; }

.stores { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

    .stores a {
        display: inline-flex;
        flex-direction: column;
        border: 1px solid var(--line-strong);
        border-radius: 8px;
        padding: 7px 14px;
        text-decoration: none;
        color: var(--ink-2);
        line-height: 1.2;
        background: var(--surface);
    }

    .stores small { font-size: 10px; color: var(--muted); letter-spacing: .05em; text-transform: uppercase; }

    .stores strong { font-family: var(--display); font-size: 14px; font-weight: 600; }

/* ---------- yasal metin modalleri ---------- */
dialog.legal {
    border: none;
    border-radius: var(--r-lg);
    padding: 0;
    max-width: 560px;
    width: calc(100% - 32px);
    background: var(--surface);
    color: var(--ink);
    box-shadow: var(--shadow-card);
}

    dialog.legal::backdrop { background: rgba(5,13,31,.62); }

.modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--line);
}

    .modal-head h3 { margin: 0; font-family: var(--display); font-size: 20px; font-weight: 600; }

.modal-body { padding: 18px 22px; max-height: 56vh; overflow: auto; font-size: 14px; color: var(--ink-2); }

    .modal-body p { margin: 0 0 12px; }

.modal-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; }

    .modal-foot .btn { width: auto; }

/* ---------- mobil ---------- */
@media (max-width: 900px) {
    .shell { min-height: 0; }




    .pane { padding: 20px 16px 36px; }

    /* Kart mobilde de kart kalır (zemin koyu desen); yalnızca iç boşluk daralır. */
    .panel { padding: 16px 16px 22px; }
    body.auth .pane { justify-content: flex-start; padding-top: 28px; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}

/* Geliştirme şeridi: gerçek SMS gönderilmediğinde kodu ekranda gösterir.
   Üretimde bu öğe hiç render edilmez (Verify.cshtml içindeki ortam kontrolü). */
.devbar {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px dashed var(--gold);
    border-radius: var(--r-md);
    background: var(--gold-100);
    color: var(--ink);
    font-size: 13.5px;
}

.devbar strong {
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--gold);
}

.devbar code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: .18em;
    user-select: all;
}


/* Giriş ekranı 400px: form paneli sağdan kesiliyordu. */
@media (max-width: 900px) {
    html, body { overflow-x: clip; }
    .shell { min-height: 0; }
    .pane { padding: 16px; }
    .panel { max-width: 100%; }
}


/* =========================================================================
   HATA SAYFASI (/hata, /hata/404 …)
   ========================================================================= */
.panel.err .err-code {
    margin: 6px 0 2px;
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(64px, 12vw, 112px);
    line-height: .9;
    letter-spacing: -.02em;
    color: var(--blue-700, #003399);
    /* Marka mavisi → kırmızı: canlı sitedeki iki renkli logo şeridiyle aynı dil. */
    background: linear-gradient(90deg, #003399 0 60%, #D41620 60% 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.panel.err .panel-head h2 { margin-top: 4px; }
.err-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

/* =========================================================================
   GİRİŞ KABUĞU — tek ortalanmış kart, marka mavisi desenli zemin
   (canlı login.aspx düzeni; önceki iki sütunlu marka paneli kaldırıldı)
   ========================================================================= */
body.auth {
    position: relative;
    background: radial-gradient(120% 90% at 8% 0%, #00307F 0%, rgba(0,48,127,0) 55%),
                linear-gradient(160deg, var(--brand-800) 0%, var(--navy-950) 92%);
    background-attachment: fixed;
}
/* İnce çapraz çizgi dokusu + kırmızı marka çizgisi: sabit, kaydırmada yerinde kalır. */
body.auth::after {
    content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .55; z-index: 0;
    background: repeating-linear-gradient(115deg, rgba(255,255,255,.055) 0 1px, rgba(255,255,255,0) 1px 26px);
}
body.auth::before {
    content: ""; position: fixed; left: -10%; top: 46%; width: 60%; height: 6px; border-radius: 99px;
    background: linear-gradient(90deg, rgba(212,22,32,0), var(--red-600) 45%, rgba(212,22,32,0));
    transform: rotate(-18deg); opacity: .8; pointer-events: none; z-index: 0;
}
body.auth .shell { position: relative; z-index: 1; }
body.auth .pane { width: 100%; padding: clamp(24px,4vw,56px) 16px; }

.card-logo { width: 100%; max-width: 440px; margin: 0; }
.card-logo a { display: block; text-align: center; background: var(--surface); border: 1px solid var(--line); border-bottom: 0; padding: 26px 0 4px; border-radius: 6px 6px 0 0; }
.card-logo img { height: 34px; width: auto; }
body.auth .panel { border-radius: 0 0 6px 6px; border-top: 0; padding-top: 18px; }

/* Onay metni içindeki bağlantı düğmesi satır içinde akar. */
.consent label .btn-link { display: inline; padding: 0; font: inherit; text-decoration: underline; text-underline-offset: 3px; font-weight: 600; color: var(--ink); vertical-align: baseline; }

/* Alt bağlantılar: canlıdaki gibi çizgilerle ayrılmış satırlar. */
.footlinks .rule { padding-top: 14px; border-top: 1px solid var(--line); width: 100%; }
.footlinks .rule .btn-link { font-weight: 600; }

/* Mağaza rozetleri: koyu, üç mağaza. */
.stores a { background: #0B0F19; color: #fff; border-color: #0B0F19; min-width: 118px; align-items: center; }
.stores small { color: #C9D1E3; }
.stores strong { font-size: 15px; }

@media (max-width: 480px) {
    .stores a { min-width: 0; flex: 1 1 30%; padding: 7px 8px; }
}

/* ---------- yasal metin gövdesi ve çerez bandı ---------- */
.legal-text h5, .legal-text h6 { font-family: var(--display); font-size: 15px; margin: 18px 0 6px; color: var(--ink); }
.legal-text h5:first-child, .legal-text h6:first-child { margin-top: 0; }
.legal-text p, .legal-text li { font-size: 13.5px; line-height: 1.6; color: var(--ink-2); }
.legal-text ol, .legal-text ul { padding-left: 20px; }
.legal-text li { margin-bottom: 8px; }
.legal-note { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }

.cookiebar {
    position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60;
    display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between;
    padding: 18px 22px; background: var(--surface); color: var(--ink);
    border: 1px solid var(--line-strong); border-radius: 14px;
    box-shadow: 0 18px 48px -18px rgba(0,20,60,.5);
    transition: opacity .25s ease, transform .25s ease;
}
.cookiebar.gone { opacity: 0; transform: translateY(8px); }
.cookiebar-body { flex: 1 1 420px; min-width: 0; }
.cookiebar-body strong { display: block; font-family: var(--display); font-size: 16px; margin-bottom: 4px; }
.cookiebar-body p { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.cookiebar-body .btn-link { display: inline; padding: 0; font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; color: var(--brand-600); }
.cookiebar-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cookiebar-actions .btn { width: auto; padding: 11px 18px; }
@media (max-width: 640px) {
    .cookiebar { left: 8px; right: 8px; bottom: 8px; padding: 16px; }
    .cookiebar-actions { width: 100%; }
    .cookiebar-actions .btn { flex: 1 1 auto; }
}
