:root {
    --bg: #17171a;
    --card-top: #1c1d21;
    --card-bottom: #101012;
    --border: rgba(255,255,255,0.08);
    --text: #f5f5f7;
    --text-dim: #9a9aa2;
    --text-dimmer: #6e6e76;
    --input-bg: #16171a;
    --btn-bg: #1a1b1f;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: var(--bg);
    font-family: "Manrope", sans-serif;
    color: var(--text);
}

body {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#loginForm {
    display: none;
    flex-direction: column;
    gap: 18px;
}

.noise-layer {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    user-select: none;
    white-space: pre;
    color: rgba(255,255,255,.065);
    font-family: "Courier New", monospace;
    font-size: 13px;
    line-height: 20px;
    letter-spacing: 4px;
    padding: 20px;
    z-index: 0;
}

.vignette {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(ellipse at center, rgba(5,5,6,1) 0%, rgba(5,5,6,0.85) 35%, rgba(5,5,6,0.35) 60%, rgba(5,5,6,0) 75%);
}

.card-wrap {
    position: relative;
    z-index: 2;
}

.card {
    position: relative;
    width: 450px;
    background: #0d0d0d;
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 40px 38px 38px;
    box-shadow: 0 30px 60px -20px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.04);
    overflow: visible;
}

.card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 84px;
    height: 84px;
    background: linear-gradient(225deg, transparent 42%, rgba(255,255,255,0.15) 47%, rgba(255,255,255,0.05) 52%, transparent 58%), linear-gradient(225deg, var(--bg) 0%, var(--bg) 46%, #131318 46%, #34353b 100%);
    border-top-right-radius: 22px;
    border-bottom-left-radius: 2.2em;
    box-shadow: -5px 5px 12px rgba(0, 0, 0, 0.55);
    z-index: 2;
    pointer-events: none;
}

.close-btn {
    position: absolute;
    top: 30px;
    left: 30px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.09);
    border: 1px solid rgba(255,255,255,0.04);
    color: var(--text-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    z-index: 4;
    line-height: 1;
}
.close-btn:hover { color: var(--text); }

/* Auth Tabs */
.auth-tabs {
    display: flex;
    width: 200px;
    margin: 0 auto 28px;
    padding: 4px;
    background: #242424;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
}

.auth-tabs button {
    flex: 1;
    height: 34px;
    border: none;
    outline: none;
    cursor: pointer;
    border-radius: 10px;
    background: transparent;
    color: #777;
    font-size: 12px;
    font-weight: 600;
    transition: .35s;
}

.auth-tabs button.active {
    color: #111;
    background: #f4c430;
    box-shadow: 0 8px 18px rgba(244,196,48,.25);
}

.auth-tabs button:not(.active):hover { color: #fff; }

h1.title {
    text-align: center;
    font-size: 28px;
    font-weight: 400;
    margin: 0 0 24px;
    letter-spacing: -0.01em;
    color: #fadf98;
}

.divider {
    height: 1px;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.14) 50%, rgba(255,255,255,0) 100%);
    margin-bottom: 22px;
}

form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

form input {
    width: 100%;
    height: 45px;
    padding: 0 18px;
    background: #232323;
    border-radius: 14px;
    border: 1px solid transparent;
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: border-color .3s ease, box-shadow .3s ease, color .3s ease;
}

form input::placeholder { color: #5a5a5a; transition: color .3s ease; }
input:focus::placeholder { color: #fff; }

.input-icon:focus-within .icon { color: #fff; }

input:focus {
    border-color: #e1a107;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.5), inset 0 0 0 1px rgba(225,161,7,.95), inset 0 -8px 30px rgba(255, 193, 7, 0.3);
}

.signin-btn {
    width: 100%;
    height: 45px;
    margin-top: 10px;
    border: none;
    outline: none;
    border-radius: 16px;
    cursor: pointer;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .3px;
    color: #111;
    background: linear-gradient(180deg, #ffe27a 0%, #ffd347 40%, #f5b800 100%);
    box-shadow: inset 0 2px 1px rgba(255,255,255,.55), inset 0 -2px 3px rgba(180,120,0,.18), 0 12px 22px rgba(255,193,7,.22);
    transition: .3s ease;
}

.or-divider {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 20px 0 10px;
}

.or-divider span {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.14), transparent);
}

.or-divider p {
    color: #fadf98;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.social-row { display: flex; gap: 12px; }

.social-btn {
    flex: 1;
    height: 40px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #232323;
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: inset 0 1px rgba(255,255,255,.05);
    cursor: pointer;
    transition: .3s;
}

.social-btn:hover {
    background: #1b1c1f;
    border-color: rgba(255,193,7,.22);
    transform: translateY(-2px);
}

.social-btn svg { width: 22px; height: 22px; }
.input-icon { position: relative; }
.input-icon input { padding-left: 46px; padding-right: 46px; }

.input-icon .icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #5a5a5a;
    pointer-events: none;
    transition: color .3s ease;
}

.input-icon .eye {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #8b8b8b;
    cursor: pointer;
    transition: .3s;
}
.input-icon .eye:hover { color: #f4c430; }

#signupForm {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Masaüstünde Mobil Elemanları Gizle */
.mobile-header, .mobile-close-btn, .sidebar-overlay {
    display: none;
}

/* ==========================================
   RESPONSIVE & MOBİL DÜZENLEMELER
   ========================================== */

@media (max-width: 576px) {
    body {
        padding: 16px;
        align-items: flex-start;
        overflow-y: auto;
    }
    .card-wrap { width: 100%; margin: auto 0; }
    .card {
        width: 100%;
        max-width: 100%;
        padding: 30px 20px 24px;
        border-radius: 18px;
    }
    .input-row { grid-template-columns: 1fr; gap: 16px; }
    .card::after { width: 60px; height: 60px; border-top-right-radius: 18px; }
    .close-btn { top: 20px; left: 20px; }
    h1.title { font-size: 22px; margin-bottom: 18px; }
    .noise-layer { font-size: 11px; letter-spacing: 2px; padding: 10px; }
}

@media (max-width: 768px) {
    .dash-layout {
        grid-template-columns: 1fr;
        width: 100%;
        margin: 0;
        padding: 16px;
        gap: 16px;
    }

    /* Mobil Üst Bar */
    .mobile-header {
        display: flex !important;
        align-items: center;
        gap: 12px;
        background: #0d0d0d;
        padding: 14px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        position: sticky;
        top: 0;
        z-index: 99;
    }

    .mobile-toggle-btn {
        background: #1a1b1f;
        border: 1px solid rgba(255, 255, 255, 0.1);
        color: #ffd347;
        font-size: 20px;
        width: 38px;
        height: 38px;
        border-radius: 10px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-title {
        font-weight: 700;
        font-size: 14px;
        color: #ffd347;
        letter-spacing: 1px;
    }

    /* Mobil Kapatma Butonu */
    .mobile-close-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        margin-left: auto;
        background: rgba(255, 255, 255, 0.05);
        border: none;
        color: #888;
        width: 32px;
        height: 32px;
        border-radius: 8px;
        font-size: 18px;
        cursor: pointer;
    }

    /* Sol Menü (Sidebar) */
    aside.sidebar,
    .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: -290px !important;
        width: 270px !important;
        height: 100vh !important;
        background: #0d0d0d !important;
        z-index: 9999 !important; /* Overlay'den YÜKSEK */
        transition: left 0.3s ease !important;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.9) !important;
        border-radius: 0 !important;
        border: none !important;
        border-right: 1px solid rgba(255,255,255,0.08) !important;
    }

    aside.sidebar.active,
    .sidebar.active {
        left: 0 !important;
    }

 /* Karartma Katmanı (Sadece Arka Planı Kaplar) */
.sidebar-overlay {
    display: none;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    z-index: 998 !important; /* Menünün kesinlikle altında kalmalı */
}

/* Overlay Açıldığında Göster */
/*.sidebar-overlay.active {
    display: block !important;
}*/

/* Sol Menü (Sidebar Overlay'in Kesinlikle Üstünde Kalacak) */
aside.sidebar, 
.sidebar, 
div.sidebar {
    position: fixed !important;
    top: 0 !important;
    left: -290px !important;
    width: 270px !important;
    height: 100vh !important;
    background: #0d0d0d !important;
    z-index: 9999 !important; /* Overlay'den çok daha yüksek */
    transition: left 0.3s ease !important;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.9) !important;
}

/* Menü Açıldığında Ekranın Soluna Yapışır */
aside.sidebar.active, 
.sidebar.active, 
div.sidebar.active {
    left: 0 !important;
}

    .main-panel { padding: 20px; border-radius: 16px; }
    .panel-header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .panel-header .signin-btn { width: 100% !important; }
}