﻿:root {
    --primary: #8b5cf6;
    --primary-dark: #7c3aed;
    --primary-glow: #a78bfa;
    --bg: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.55);
    --border: rgba(148, 163, 184, 0.12);
}

body {
    background: radial-gradient(1000px 600px at 15% 10%, rgba(139,92,246,.22), transparent 55%), radial-gradient(900px 500px at 95% 15%, rgba(167,139,250,.18), transparent 55%), linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #e2e8f0;
    min-height: 100vh;
    font-family: system-ui, -apple-system, sans-serif;
    overflow-x: hidden;
}

.glass {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 1.375rem;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.04);
}

.gradient-text {
    background: linear-gradient(90deg, #c084fc, #a78bfa, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-card {
    max-width: 470px;
    margin-inline: auto;
}

/* floating inputs */
.form-floating > .form-control {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(148,163,184,0.14);
    color: #fff;
    border-radius: 1rem;
    padding-top: 1.25rem;
}

    .form-floating > .form-control:focus {
        background: rgba(255,255,255,0.08);
        border-color: rgba(139,92,246,0.45);
        box-shadow: 0 0 0 3px rgba(139,92,246,0.28);
        color: #fff;
    }

.form-floating > label {
    color: rgba(226,232,240,0.55);
    padding-left: 1rem;
}

.btn-main {
    background: var(--primary);
    color: #fff;
    border-radius: 1rem;
    padding: .95rem 1rem;
    border: 1px solid rgba(139,92,246,.40);
    box-shadow: 0 18px 45px -18px rgba(139,92,246,.75);
    transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

    .btn-main:hover {
        background: var(--primary-dark);
        transform: translateY(-1px);
        box-shadow: 0 22px 60px -22px rgba(139,92,246,.85);
        color: #fff;
    }

.btn-ghost {
    border: 1px solid rgba(148,163,184,0.18);
    color: rgba(226,232,240,.92);
    border-radius: 1rem;
    padding: .85rem 1rem;
    background: rgba(255,255,255,0.03);
    transition: background .18s ease, transform .18s ease;
}

    .btn-ghost:hover {
        background: rgba(255,255,255,0.06);
        transform: translateY(-1px);
        color: #fff;
    }

.link-soft {
    color: rgba(226,232,240,.72);
    text-decoration: none;
}

    .link-soft:hover {
        color: #fff;
        text-decoration: underline;
        text-underline-offset: 3px;
    }

.brand-badge {
    width: 54px;
    height: 54px;
    border-radius: 1.2rem;
    display: grid;
    place-items: center;
    background: rgba(139,92,246,0.18);
    border: 1px solid rgba(139,92,246,0.22);
    color: #e9d5ff;
    box-shadow: 0 18px 45px -24px rgba(139,92,246,.85);
}

.pill {
    border: 1px solid rgba(148,163,184,0.14);
    background: rgba(255,255,255,0.04);
    border-radius: 999px;
    padding: .35rem .65rem;
    font-size: .8rem;
    color: rgba(226,232,240,0.8);
    display: inline-flex;
    gap: .35rem;
    align-items: center;
}

.fade-up {
    animation: fadeUp .55s ease both;
}

    .fade-up.d2 {
        animation-delay: .08s;
    }

    .fade-up.d3 {
        animation-delay: .16s;
    }

    .fade-up.d4 {
        animation-delay: .24s;
    }

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Captcha box ===== */
.captcha-box {
    border: 1px solid rgba(148,163,184,0.14);
    background: rgba(255,255,255,0.04);
    border-radius: 1rem;
    padding: .9rem;
}

.captcha-canvas {
    width: 100%;
    height: 64px;
    border-radius: .9rem;
    display: block;
    background: rgba(15,23,42,0.35);
    border: 1px solid rgba(148,163,184,0.12);
}

.hint {
    color: rgba(226,232,240,0.55);
    font-size: .9rem;
}

/* toast */
.btn-close {
    filter: invert(1) grayscale(100%);
    opacity: .85;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* ===== BBS Glass Alert (Validation Summary) ===== */
.bbs-alert {
    border-radius: 1rem;
    padding: .85rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(148,163,184,0.16);
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 10px 28px -16px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.03);
    color: rgba(226,232,240,0.92);
}

.bbs-alert-danger {
    border-color: rgba(248,113,113,0.28);
    background: rgba(248,113,113,0.10);
}

    .bbs-alert-danger i {
        color: rgba(248,113,113,0.95);
        filter: drop-shadow(0 8px 18px rgba(248,113,113,0.22));
    }

/* ValidationSummary içindeki UL/Lİ görünümü */
.bbs-validation {
    margin: 0;
    padding-left: 1.1rem;
    color: rgba(226,232,240,0.90);
    font-size: .95rem;
}

    .bbs-validation ul {
        margin: 0;
        padding-left: 1.15rem;
    }

    .bbs-validation li {
        margin: .15rem 0;
        line-height: 1.35;
    }

/* ===== Profesyonel Toast Bildirimi ===== */
.bbs-toast-wrap {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 360px;
    pointer-events: none;
}

.bbs-toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: .85rem 1rem;
    border-radius: 1rem;
    background: rgba(30,41,59,0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(248,113,113,0.35);
    box-shadow: 0 18px 45px -18px rgba(0,0,0,0.7);
    color: #e2e8f0;
    overflow: hidden;
    position: relative;
    transform: translateX(120%);
    opacity: 0;
    transition: transform .35s cubic-bezier(.21,1.02,.73,1), opacity .35s ease;
}

    .bbs-toast.show {
        transform: translateX(0);
        opacity: 1;
    }

    .bbs-toast .bbs-toast-icon {
        flex: 0 0 auto;
        width: 34px;
        height: 34px;
        border-radius: .7rem;
        display: grid;
        place-items: center;
        background: rgba(248,113,113,0.16);
        color: #fca5a5;
        font-size: 1.05rem;
    }

    .bbs-toast .bbs-toast-body {
        flex: 1 1 auto;
    }

    .bbs-toast .bbs-toast-title {
        font-weight: 600;
        font-size: .92rem;
        margin-bottom: 2px;
    }

    .bbs-toast .bbs-toast-msg {
        font-size: .82rem;
        color: rgba(226,232,240,0.7);
        line-height: 1.35;
    }

    .bbs-toast .bbs-toast-close {
        flex: 0 0 auto;
        background: none;
        border: none;
        color: rgba(226,232,240,0.5);
        font-size: 1.15rem;
        cursor: pointer;
        line-height: 1;
        padding: 0 2px;
    }

        .bbs-toast .bbs-toast-close:hover {
            color: #fff;
        }

    .bbs-toast .bbs-toast-bar {
        position: absolute;
        left: 0;
        bottom: 0;
        height: 3px;
        width: 100%;
        background: linear-gradient(90deg, #f87171, #fca5a5);
        transform-origin: left;
        animation: bbsToastBar 3.2s linear forwards;
    }

@keyframes bbsToastBar {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

/* ===== Mobil / PWA giriş ekranı =====
   Masaüstü kart görünümü değişmez. Telefonda kart yok: ekranın kendisi uygulama sayfası. */
.login-logo { display: none; }
.sifre-goster { display: none; }

@media (max-width: 991.98px), (display-mode: standalone) {
    html { background-color: #12101F; color-scheme: dark; }

    body {
        background: #12101F;
        color: #F1EFFA;
        font-family: 'Manrope', system-ui, -apple-system, sans-serif;
        -webkit-tap-highlight-color: transparent;
    }

    .login-sayfa {
        min-height: 100vh;
        min-height: 100dvh;
        align-items: flex-start !important;
        padding: calc(env(safe-area-inset-top, 0px) + 32px) 20px calc(env(safe-area-inset-bottom, 0px) + 16px) !important;
    }

    /* Marka: uygulama ikonu + ad */
    .login-ust { justify-content: center !important; margin-bottom: 24px !important; }
    .login-ust > div { flex-direction: column; gap: 12px !important; text-align: center; }
    .login-ust .brand-badge { display: none; }
    .login-logo { display: block; width: 72px; height: 72px; margin: 0 auto; border-radius: 18px; }
    .login-ad { font-size: 26px !important; font-weight: 800 !important; letter-spacing: -.3px; line-height: 1.15; }
    .login-alt { color: #A9A3C4 !important; font-size: 14px; }
    .login-alt .gradient-text {
        background: none;
        -webkit-text-fill-color: currentColor;
        font-weight: 500 !important;
    }

    /* Kart kabuğunu kaldır */
    .login-kart.glass {
        padding: 0 !important;
        background: none;
        border: 0;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    .login-kart-baslik { display: none; }

    /* Alanlar */
    .form-floating > .form-control {
        height: 58px;
        min-height: 58px;
        background: #1D1930;
        border-color: #2E2848;
        border-radius: 14px;
        color: #F1EFFA;
        font-size: 16px; /* 16px altı iOS'ta yakınlaştırır */
    }
    .form-floating > .form-control:focus {
        background: #1D1930;
        border-color: #A78BFA;
        box-shadow: 0 0 0 1px #A78BFA;
    }
    .form-floating > .form-control:-webkit-autofill,
    .form-floating > .form-control:-webkit-autofill:focus {
        -webkit-text-fill-color: #F1EFFA;
        caret-color: #F1EFFA;
        box-shadow: inset 0 0 0 100px #1D1930;
    }
    .form-floating > label { color: #A9A3C4; }
    .form-floating > .form-control:focus ~ label,
    .form-floating > .form-control:not(:placeholder-shown) ~ label { color: #A9A3C4; }
    .form-floating > .form-control ~ label::after { background: transparent !important; }

    /* Şifre göster/gizle */
    .form-floating > #p { padding-right: 52px; }
    .sifre-goster {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 7px;
        right: 6px;
        width: 44px;
        height: 44px;
        z-index: 5;
        padding: 0;
        border: 0;
        background: none;
        color: #B9B3D3;
        font-size: 19px;
    }

    /* Beni Hatırla */
    .login-hatirla { margin-bottom: 14px !important; padding-left: 0; }
    .login-hatirla .form-check-input { float: none; width: 22px; height: 22px; margin: 0 10px 0 0; vertical-align: middle; background-color: #1D1930; border-color: #4A4270; }
    .login-hatirla .form-check-input:checked { background-color: #7C3AED; border-color: #7C3AED; }
    .login-hatirla .form-check-label { font-size: 15px; vertical-align: middle; line-height: 44px; }
    .login-hatirla .login-uyari { color: #FDBA74 !important; font-size: 12px; line-height: 1.4; margin-top: 0 !important; }

    /* Güvenlik kodu */
    .captcha-box { padding: 0; border: 0; background: none; border-radius: 0; }
    .captcha-box .btn-ghost { min-height: 44px; padding: 0 12px; border: 0; background: none; color: #C4B5FD; font-weight: 700; }
    .captcha-canvas { height: 58px; background: #1D1930; border-color: #2E2848; border-radius: 14px; }
    .captcha-box .hint { display: none; }
    .captcha-box .form-floating { margin-top: 10px !important; }

    /* Giriş düğmesi */
    .btn-main {
        min-height: 56px;
        padding: 0 16px;
        background: #7C3AED;
        border: 0;
        border-radius: 14px;
        box-shadow: none;
        font-size: 16px;
        font-weight: 800;
    }
    .btn-main:hover { background: #7C3AED; transform: none; box-shadow: none; }
    .btn-main:active { background: #6D28D9; }
    .btn-main:focus-visible,
    .sifre-goster:focus-visible,
    .captcha-box .btn-ghost:focus-visible { outline: 2px solid #C4B5FD; outline-offset: 2px; }

    .login-telif { margin-top: 20px !important; color: #A9A3C4 !important; font-size: 12px; }

    .bbs-toast-wrap {
        top: calc(env(safe-area-inset-top, 0px) + 12px);
        left: 12px;
        right: 12px;
        max-width: none;
    }
}

/* Face ID girişi (görünürlüğü bbs-passkey.js belirler) */
.passkey-giris-alan { margin-bottom: 1rem; }
.passkey-giris { font-weight: 800; }
.passkey-giris:disabled { opacity: .6; }
.passkey-ayrac {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    color: #A9A3C4;
    font-size: 13px;
}
.passkey-ayrac::before,
.passkey-ayrac::after { content: ''; flex: 1; height: 1px; background: rgba(148,163,184,.2); }

/* captcha kutusu titreşim (shake) */
@keyframes bbsShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(7px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(3px); }
}

.captcha-box.shake {
    animation: bbsShake .45s ease;
    border-color: rgba(248,113,113,0.45);
}
