/* ==========================================================================
   LangWord — Panel & Auth teması (lw-app.css)
   Açık tema; public site (css/main.css) ve mobil uygulama ile aynı dil.

   1. Tokens
   2. Base
   3. Shell layout (sidebar, topbar, içerik, alt menü, çekmece)
   4. Components  (@layer components → Tailwind utility'leri hâlâ ezebilir)
   5. Auth sayfaları
   6. Compat (eski panel sınıfları için minimal köprü)
   7. Utilities
   ========================================================================== */

/* 1. TOKENS ================================================================ */
:root {
    --lw-bg: #F4F1EA;
    --lw-bg-2: #EFEADF;
    --lw-surface: #FFFFFF;
    --lw-surface-2: #FBF8F2;
    --lw-border: #E6E1D6;
    --lw-border-strong: #D9D2C3;
    --lw-text: #17161C;
    --lw-text-2: #26252E;
    --lw-muted: #6E6B78;
    --lw-ink: #17161C;
    --lw-yellow: #F5C02E;
    --lw-yellow-soft: #FFF4D1;
    --lw-violet: #6C55E8;
    --lw-violet-dark: #5A44D6;
    --lw-violet-soft: #ECE8FD;
    --lw-coral: #FF7B5C;
    --lw-coral-soft: #FFE6DE;
    --lw-mint: #79D2AE;
    --lw-mint-soft: #E2F5EC;
    --lw-sky: #8EC5F2;
    --lw-sky-soft: #E5F1FC;
    --lw-sand: #E9DDC7;
    --lw-shadow: 0 8px 24px rgba(23, 22, 28, .06);
    --lw-shadow-lg: 0 24px 60px rgba(23, 22, 28, .14);
    --lw-radius: 20px;
    --lw-radius-sm: 14px;
    --lw-radius-xs: 10px;
    --lw-font-head: 'Bricolage Grotesque', 'Plus Jakarta Sans', system-ui, sans-serif;
    --lw-font-body: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

    --lw-sidebar-w: 272px;
    --lw-topbar-h: 72px;
    --lw-bottomnav-h: 68px;
    --lw-focus: 0 0 0 3px rgba(108, 85, 232, .22);

    /* Tailwind build'in font değişkenini de yeni gövde fontuna bağla */
    --font-sans: var(--lw-font-body);
    color-scheme: light;
}

/* 2. BASE ================================================================== */
.lw-app,
.lw-auth-body {
    margin: 0;
    min-height: 100vh;
    background: var(--lw-bg);
    color: var(--lw-text);
    font-family: var(--lw-font-body);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
.lw-app :is(h1, h2, h3),
.lw-auth-body :is(h1, h2, h3) {
    font-family: var(--lw-font-head);
    letter-spacing: -0.03em;
    color: inherit;
}
.lw-app ::selection,
.lw-auth-body ::selection { background: var(--lw-yellow-soft); }
.lw-app :focus-visible,
.lw-auth-body :focus-visible { outline: 2px solid var(--lw-violet); outline-offset: 2px; }
.lw-app img { max-width: 100%; }
body.lw-scroll-lock { overflow: hidden; }

/* 3. SHELL LAYOUT ========================================================== */
.lw-shell { min-height: 100vh; }
.lw-shell-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.lw-content {
    flex: 1;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 28px 32px 48px;
    box-sizing: border-box;
    min-width: 0;
}

@media (min-width: 1024px) {
    .lw-shell-main { margin-left: var(--lw-sidebar-w); }
}
@media (max-width: 1023px) {
    .lw-content { padding: 20px 16px calc(var(--lw-bottomnav-h) + 32px + env(safe-area-inset-bottom)); }
}

/* --- Sidebar ------------------------------------------------------------- */
.lw-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--lw-sidebar-w);
    background: var(--lw-surface);
    border-right: 1.5px solid var(--lw-border);
    display: flex;
    flex-direction: column;
    z-index: 45; /* sayfa modallarının (z-50) altında */
    box-sizing: border-box;
}
.lw-side-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    height: var(--lw-topbar-h);
    padding: 0 16px 0 20px;
    flex-shrink: 0;
    color: var(--lw-text);
}
.lw-side-brand-link { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; text-decoration: none; }
.lw-side-brand img { width: 44px; height: 44px; object-fit: contain; }
.lw-side-brand span {
    font-family: var(--lw-font-head);
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -0.03em;
}
.lw-side-close {
    margin-left: auto;
    display: none;
}
.lw-side-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 4px 14px 20px;
}
.lw-side-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin: 0 0 12px;
    background: var(--lw-surface-2);
    border: 1.5px solid var(--lw-border);
    border-radius: 16px;
}
.lw-side-user-name { margin: 0; font-weight: 700; font-size: 14px; color: var(--lw-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lw-side-user-role { margin: 0; font-size: 12.5px; color: var(--lw-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lw-side-user > div:last-child { min-width: 0; }

.lw-nav-group { padding: 10px 0 4px; }
.lw-nav-group + .lw-nav-group { border-top: 1px solid var(--lw-border); }
.lw-nav-label {
    margin: 4px 12px 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--lw-muted);
}
.lw-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 42px;
    padding: 0 12px;
    margin: 2px 0;
    border-radius: 12px;
    color: var(--lw-text-2);
    font-size: 14.5px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease;
}
.lw-nav-item svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--lw-muted); transition: color .15s ease; }
.lw-nav-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lw-nav-item:hover { background: var(--lw-surface-2); color: var(--lw-text); }
.lw-nav-item:hover svg { color: var(--lw-text); }
.lw-nav-item.active { background: var(--lw-ink); color: #fff; }
.lw-nav-item.active svg { color: var(--lw-yellow); }
.lw-nav-item .lw-nav-badge { margin-left: auto; }
.lw-nav-item--muted { color: var(--lw-muted); }

/* --- Topbar -------------------------------------------------------------- */
.lw-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    height: var(--lw-topbar-h);
    background: rgba(244, 241, 234, .88);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1.5px solid var(--lw-border);
}
.lw-topbar-inner {
    height: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-sizing: border-box;
}
.lw-topbar-title { min-width: 0; flex-shrink: 1; }
.lw-topbar-title strong {
    display: block;
    font-family: var(--lw-font-head);
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.03em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lw-topbar-title small { display: block; font-size: 12.5px; color: var(--lw-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lw-topbar-brand { display: none; }
.lw-topbar-brand img { width: 38px; height: 38px; object-fit: contain; display: block; }
.lw-topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.lw-search { position: relative; flex: 1; max-width: 380px; margin-left: 12px; }
.lw-search svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--lw-muted); pointer-events: none; }
.lw-search input {
    width: 100%;
    height: 42px;
    box-sizing: border-box;
    padding: 0 14px 0 40px;
    border: 1.5px solid var(--lw-border);
    border-radius: 999px;
    background: var(--lw-surface);
    color: var(--lw-text);
    font: 500 14px var(--lw-font-body);
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.lw-search input::placeholder { color: var(--lw-muted); }
.lw-search input:focus { border-color: var(--lw-ink); box-shadow: var(--lw-focus); }
.lw-search-results { left: 0; right: 0; top: calc(100% + 8px); max-height: 360px; overflow-y: auto; padding: 6px; }
.lw-search-results a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: 10px;
    color: var(--lw-text-2); font-size: 14px; font-weight: 600; text-decoration: none;
}
.lw-search-results a:hover,
.lw-search-results a.is-active { background: var(--lw-surface-2); color: var(--lw-text); }
.lw-search-results a svg { width: 18px; height: 18px; color: var(--lw-muted); flex-shrink: 0; }
.lw-search-empty { padding: 14px; font-size: 13.5px; color: var(--lw-muted); text-align: center; }

.lw-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--lw-yellow-soft);
    color: var(--lw-text);
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.lw-chip svg { width: 16px; height: 16px; }
.lw-chip--violet { background: var(--lw-violet-soft); }

.lw-icon-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 999px;
    border: 1.5px solid var(--lw-border);
    background: var(--lw-surface);
    color: var(--lw-text);
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
    padding: 0;
    font: inherit;
}
.lw-icon-btn:hover { border-color: var(--lw-border-strong); background: var(--lw-surface-2); }
.lw-icon-btn svg { width: 20px; height: 20px; }
.lw-icon-btn .lw-dot-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    box-sizing: border-box;
    border-radius: 999px;
    border: 2px solid var(--lw-bg);
    background: var(--lw-coral);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    line-height: 14px;
    text-align: center;
}
.lw-menu-toggle { display: none; }

.lw-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 999px;
    overflow: hidden;
    background: var(--lw-yellow);
    color: var(--lw-ink);
    font-family: var(--lw-font-head);
    font-weight: 800;
    font-size: 16px;
}
.lw-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; font-size: 0; color: transparent; }
.lw-avatar.is-fallback { background: var(--lw-violet-soft); color: var(--lw-violet-dark); }
.lw-avatar--sm { width: 34px; height: 34px; font-size: 13px; }
.lw-avatar-btn { border: 0; padding: 0; background: none; cursor: pointer; border-radius: 999px; }
.lw-avatar-btn:hover .lw-avatar { box-shadow: 0 0 0 3px var(--lw-border); }

.lw-popover { position: relative; }
.lw-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    z-index: 70;
    min-width: 220px;
    background: var(--lw-surface);
    border: 1.5px solid var(--lw-border);
    border-radius: 18px;
    box-shadow: var(--lw-shadow-lg);
    overflow: hidden;
}
.lw-dropdown-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--lw-border);
}
.lw-dropdown-head h3 { margin: 0; font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.lw-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    padding: 11px 16px;
    border: 0;
    background: none;
    color: var(--lw-text-2);
    font: 600 14px var(--lw-font-body);
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}
.lw-dropdown-item:hover { background: var(--lw-surface-2); color: var(--lw-text); }
.lw-dropdown-item svg { width: 18px; height: 18px; color: var(--lw-muted); }
.lw-dropdown-item.is-current { color: var(--lw-text); background: var(--lw-yellow-soft); }
.lw-dropdown-item--danger { color: #C2462B; }
.lw-dropdown-item--danger svg { color: currentColor; }
.lw-dropdown-sep { height: 1px; background: var(--lw-border); margin: 4px 0; }
.lw-dropdown-user { padding: 14px 16px; border-bottom: 1px solid var(--lw-border); }
.lw-dropdown-user strong { display: block; font-size: 14px; }
.lw-dropdown-user small { display: block; font-size: 12.5px; color: var(--lw-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lw-lang-code {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 22px; border-radius: 6px;
    background: var(--lw-bg-2); font-size: 11px; font-weight: 800; color: var(--lw-text-2);
}

/* Bildirimler */
.lw-notif-panel { width: 380px; max-width: calc(100vw - 24px); display: flex; flex-direction: column; max-height: 520px; }
.lw-notif-list { overflow-y: auto; flex: 1; }
.lw-notif-item {
    display: flex;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    padding: 14px 16px;
    border: 0;
    border-bottom: 1px solid var(--lw-border);
    background: var(--lw-surface);
    text-align: left;
    font: inherit;
    cursor: pointer;
}
.lw-notif-item:last-child { border-bottom: 0; }
.lw-notif-item:hover { background: var(--lw-surface-2); }
.lw-notif-item.is-unread { background: #FFFBEF; }
.lw-notif-dot { width: 8px; height: 8px; margin-top: 7px; border-radius: 99px; flex-shrink: 0; background: transparent; }
.lw-notif-item.is-unread .lw-notif-dot { background: var(--lw-yellow); }
.lw-notif-item h4 { margin: 0 0 2px; font-size: 14px; font-weight: 700; color: var(--lw-text); word-break: break-word; }
.lw-notif-item p { margin: 0 0 4px; font-size: 13.5px; color: var(--lw-text-2); word-break: break-word; }
.lw-notif-item time { font-size: 12px; color: var(--lw-muted); }

/* --- Alt menü (mobil) --------------------------------------------------- */
.lw-bottomnav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    background: var(--lw-surface);
    border-top: 1.5px solid var(--lw-border);
    padding-bottom: env(safe-area-inset-bottom);
}
.lw-bottomnav-inner {
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    max-width: 520px;
    height: var(--lw-bottomnav-h);
    margin: 0 auto;
    padding: 0 6px;
}
.lw-bottomnav-item {
    position: relative;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--lw-muted);
    font-size: 11.5px;
    font-weight: 700;
    text-decoration: none;
}
.lw-bottomnav-item svg { width: 22px; height: 22px; }
.lw-bottomnav-item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.lw-bottomnav-item.active { color: var(--lw-ink); }
.lw-bottomnav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    width: 28px;
    height: 3px;
    border-radius: 0 0 4px 4px;
    background: var(--lw-yellow);
}
.lw-bottomnav-main {
    width: 46px;
    height: 46px;
    margin-top: -18px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--lw-ink);
    color: var(--lw-yellow);
    box-shadow: 0 6px 16px rgba(23, 22, 28, .18);
}
.lw-bottomnav-item.active .lw-bottomnav-main { background: var(--lw-yellow); color: var(--lw-ink); }
.lw-bottomnav-item:has(.lw-bottomnav-main).active::before { display: none; }

/* --- Mobil çekmece -------------------------------------------------------- */
.lw-overlay {
    position: fixed;
    inset: 0;
    z-index: 115;
    background: rgba(23, 22, 28, .45);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
}
.lw-overlay.is-open { opacity: 1; visibility: visible; }

@media (max-width: 1023px) {
    .lw-sidebar {
        z-index: 120;
        width: min(86vw, 300px);
        transform: translateX(-102%);
        transition: transform .25s ease;
        box-shadow: none;
    }
    .lw-sidebar.is-open { transform: translateX(0); box-shadow: var(--lw-shadow-lg); }
    .lw-side-close { display: inline-flex; }
    .lw-menu-toggle { display: inline-flex; }
    .lw-topbar-inner { padding: 0 16px; gap: 10px; }
    .lw-topbar-brand { display: block; }
    .lw-search { display: none; }
}
@media (min-width: 1024px) {
    .lw-bottomnav, .lw-overlay { display: none; }
}
@media (max-width: 640px) {
    .lw-topbar-title small, .lw-hide-sm { display: none !important; }
    .lw-topbar-actions { gap: 6px; }
    .lw-chip { height: 34px; padding: 0 10px; }
    .lw-icon-btn, .lw-avatar { width: 38px; height: 38px; }
    .lw-notif-panel { position: fixed; left: 12px; right: 12px; top: calc(var(--lw-topbar-h) - 4px); width: auto; max-height: calc(100vh - var(--lw-topbar-h) - 24px); }
}
@media (max-width: 380px) {
    .lw-topbar-title { display: none; }
}

/* 4. COMPONENTS ============================================================ */
@layer components {

    /* --- Butonlar --- */
    .lw-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 44px;
        padding: 0 20px;
        border: 1.5px solid transparent;
        border-radius: 999px;
        background: var(--lw-surface-2);
        color: var(--lw-text);
        font-family: var(--lw-font-body);
        font-size: 14.5px;
        font-weight: 700;
        line-height: 1.2;
        text-decoration: none;
        white-space: nowrap;
        cursor: pointer;
        user-select: none;
        transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
    }
    .lw-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
    .lw-btn:focus-visible { outline: none; box-shadow: var(--lw-focus); }
    .lw-btn:disabled, .lw-btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
    .lw-btn-primary { background: var(--lw-ink); color: #fff; }
    .lw-btn-primary:hover:not(:disabled) { background: #2C2A35; }
    .lw-btn-accent { background: var(--lw-yellow); color: var(--lw-ink); }
    .lw-btn-accent:hover:not(:disabled) { background: #EDB41B; }
    .lw-btn-violet { background: var(--lw-violet); color: #fff; }
    .lw-btn-violet:hover:not(:disabled) { background: var(--lw-violet-dark); }
    .lw-btn-ghost { background: var(--lw-surface); color: var(--lw-text); border-color: var(--lw-border); }
    .lw-btn-ghost:hover:not(:disabled) { border-color: var(--lw-border-strong); background: var(--lw-surface-2); }
    .lw-btn-danger { background: var(--lw-coral); color: #fff; }
    .lw-btn-danger:hover:not(:disabled) { background: #F2664A; }
    .lw-btn-sm { min-height: 36px; padding: 0 14px; font-size: 13.5px; }
    .lw-btn-lg { min-height: 54px; padding: 0 28px; font-size: 16px; }
    .lw-btn-block { width: 100%; }
    .lw-btn-icon { width: 44px; padding: 0; }

    /* --- Kart --- */
    .lw-card {
        background: var(--lw-surface);
        border: 1.5px solid var(--lw-border);
        border-radius: var(--lw-radius);
        box-shadow: var(--lw-shadow);
        padding: 24px;
    }
    .lw-card-flush { padding: 0; overflow: hidden; }
    .lw-card-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 16px;
    }
    .lw-card-title { margin: 0; font-family: var(--lw-font-head); font-size: 20px; font-weight: 800; letter-spacing: -0.03em; }

    /* --- Pill / Tag / Badge --- */
    .lw-pill {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        min-height: 36px;
        padding: 0 16px;
        border-radius: 999px;
        border: 1.5px solid var(--lw-border);
        background: var(--lw-surface);
        color: var(--lw-text-2);
        font-size: 13.5px;
        font-weight: 700;
        text-decoration: none;
        white-space: nowrap;
        cursor: pointer;
    }
    .lw-pill:hover { border-color: var(--lw-border-strong); }
    .lw-pill.active { background: var(--lw-ink); border-color: var(--lw-ink); color: #fff; }

    .lw-tag {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        padding: 3px 10px;
        border-radius: 999px;
        background: var(--lw-yellow-soft);
        color: var(--lw-text);
        font-size: 12px;
        font-weight: 700;
        white-space: nowrap;
    }
    .lw-tag-violet { background: var(--lw-violet-soft); color: var(--lw-violet-dark); }
    .lw-tag-mint { background: var(--lw-mint-soft); color: #1F7A57; }
    .lw-tag-coral { background: var(--lw-coral-soft); color: #B4442A; }
    .lw-tag-sky { background: var(--lw-sky-soft); color: #2D6FA6; }

    .lw-badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 20px;
        height: 20px;
        padding: 0 6px;
        box-sizing: border-box;
        border-radius: 999px;
        background: var(--lw-coral);
        color: #fff;
        font-size: 11px;
        font-weight: 800;
        line-height: 1;
    }
    .lw-badge-violet { background: var(--lw-violet); }
    .lw-badge-ink { background: var(--lw-ink); }

    /* --- Form --- */
    .lw-field { display: flex; flex-direction: column; gap: 6px; }
    .lw-label { display: block; font-size: 13.5px; font-weight: 700; color: var(--lw-text-2); }
    .lw-label .lw-req { color: var(--lw-coral); }
    .lw-help { font-size: 12.5px; color: var(--lw-muted); }
    .lw-input,
    .lw-select,
    .lw-textarea {
        display: block;
        width: 100%;
        box-sizing: border-box;
        min-height: 48px;
        padding: 12px 16px;
        border: 1.5px solid var(--lw-border);
        border-radius: var(--lw-radius-sm);
        background: var(--lw-surface-2);
        color: var(--lw-text);
        font-family: var(--lw-font-body);
        font-size: 15px;
        font-weight: 500;
        line-height: 1.4;
        outline: none;
        transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
    }
    .lw-input::placeholder, .lw-textarea::placeholder { color: #A29FAA; }
    .lw-input:hover, .lw-select:hover, .lw-textarea:hover { border-color: var(--lw-border-strong); }
    .lw-input:focus, .lw-select:focus, .lw-textarea:focus {
        border-color: var(--lw-ink);
        background: var(--lw-surface);
        box-shadow: var(--lw-focus);
    }
    .lw-input.is-invalid { border-color: var(--lw-coral); }
    .lw-input.is-valid { border-color: var(--lw-mint); }
    .lw-textarea { min-height: 96px; resize: vertical; }
    .lw-select {
        appearance: none;
        -webkit-appearance: none;
        padding-right: 42px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236E6B78' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 14px center;
    }
    .lw-input-color { width: 64px; height: 48px; padding: 4px; border: 1.5px solid var(--lw-border); border-radius: var(--lw-radius-sm); background: var(--lw-surface-2); cursor: pointer; }
    .lw-check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
    .lw-check input[type="checkbox"], .lw-check input[type="radio"] { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--lw-ink); flex-shrink: 0; }
    .lw-form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
    .lw-stack { display: flex; flex-direction: column; gap: 16px; }
    .lw-actions { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; }
    .lw-actions > .lw-btn { flex: 1 1 140px; }
    @media (max-width: 640px) { .lw-form-row { grid-template-columns: 1fr; } }

    /* --- Uyarı kutusu --- */
    .lw-alert {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        padding: 12px 14px;
        border-radius: var(--lw-radius-sm);
        background: var(--lw-sky-soft);
        color: #1F4E79;
        font-size: 14px;
        font-weight: 600;
    }
    .lw-alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
    .lw-alert-error { background: var(--lw-coral-soft); color: #9A3A22; }
    .lw-alert-success { background: var(--lw-mint-soft); color: #1F6B4D; }
    .lw-alert-warning { background: var(--lw-yellow-soft); color: #7A5A00; }

    /* --- Tablo --- */
    .lw-table-wrap { width: 100%; overflow-x: auto; background: var(--lw-surface); border: 1.5px solid var(--lw-border); border-radius: var(--lw-radius); }
    .lw-table { width: 100%; border-collapse: collapse; background: var(--lw-surface); font-size: 14px; }
    .lw-table th {
        padding: 12px 16px;
        text-align: left;
        font-size: 12px;
        font-weight: 700;
        letter-spacing: .06em;
        text-transform: uppercase;
        color: var(--lw-muted);
        background: var(--lw-surface-2);
        border-bottom: 1.5px solid var(--lw-border);
        white-space: nowrap;
    }
    .lw-table td { padding: 14px 16px; border-bottom: 1px solid var(--lw-border); color: var(--lw-text-2); vertical-align: middle; }
    .lw-table tr:last-child td { border-bottom: 0; }
    .lw-table tbody tr:hover td { background: #FDFBF7; }

    /* --- İstatistik kartı --- */
    .lw-stat {
        display: flex;
        align-items: center;
        gap: 16px;
        padding: 20px;
        background: var(--lw-surface);
        border: 1.5px solid var(--lw-border);
        border-radius: var(--lw-radius);
        box-shadow: var(--lw-shadow);
    }
    .lw-stat-label { margin: 0; font-size: 13px; font-weight: 600; color: var(--lw-muted); }
    .lw-stat-value { margin: 2px 0 0; font-family: var(--lw-font-head); font-size: 30px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; color: var(--lw-text); }
    .lw-stat-icon, .lw-icon-tile {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
        flex-shrink: 0;
        border-radius: 14px;
        background: var(--lw-yellow-soft);
        color: var(--lw-ink);
        font-size: 22px;
    }
    .lw-stat-icon svg, .lw-icon-tile svg { width: 22px; height: 22px; }
    :is(.lw-stat-icon, .lw-icon-tile).is-violet { background: var(--lw-violet-soft); color: var(--lw-violet-dark); }
    :is(.lw-stat-icon, .lw-icon-tile).is-mint { background: var(--lw-mint-soft); color: #1F7A57; }
    :is(.lw-stat-icon, .lw-icon-tile).is-coral { background: var(--lw-coral-soft); color: #B4442A; }
    :is(.lw-stat-icon, .lw-icon-tile).is-sky { background: var(--lw-sky-soft); color: #2D6FA6; }
    .lw-icon-tile--sm { width: 36px; height: 36px; border-radius: 10px; font-size: 17px; }
    .lw-icon-tile--sm svg { width: 18px; height: 18px; }

    /* --- Sayfa başlıkları --- */
    .lw-page-head {
        display: flex;
        align-items: flex-end;
        justify-content: space-between;
        gap: 16px;
        flex-wrap: wrap;
        margin-bottom: 24px;
    }
    .lw-eyebrow {
        display: block;
        margin: 0 0 6px;
        font-size: 12px;
        font-weight: 700;
        letter-spacing: .1em;
        text-transform: uppercase;
        color: var(--lw-muted);
    }
    .lw-page-title {
        margin: 0;
        font-family: var(--lw-font-head);
        font-size: clamp(26px, 3vw, 34px);
        font-weight: 800;
        letter-spacing: -0.03em;
        line-height: 1.1;
        color: var(--lw-text);
    }
    .lw-page-sub { margin: 6px 0 0; font-size: 15px; color: var(--lw-muted); }
    .lw-section-title { margin: 0 0 14px; font-family: var(--lw-font-head); font-size: 21px; font-weight: 800; letter-spacing: -0.03em; }

    /* --- Modal --- */
    .lw-modal {
        position: fixed;
        inset: 0;
        z-index: 200;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 16px;
        background: rgba(23, 22, 28, .45);
        overflow-y: auto;
        box-sizing: border-box;
    }
    .lw-modal-dialog {
        position: relative;
        width: 100%;
        max-width: 560px;
        max-height: calc(100vh - 32px);
        display: flex;
        flex-direction: column;
        margin: auto;
        background: var(--lw-surface);
        border-radius: 24px;
        box-shadow: var(--lw-shadow-lg);
        overflow: hidden;
        animation: lw-pop .18s ease-out;
    }
    .lw-modal-sm { max-width: 440px; }
    .lw-modal-lg { max-width: 760px; }
    .lw-modal-xl { max-width: 980px; }
    .lw-modal-head {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 16px;
        padding: 22px 24px 14px;
        flex-shrink: 0;
    }
    .lw-modal-title { margin: 0; font-family: var(--lw-font-head); font-size: 22px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.2; color: var(--lw-text); }
    .lw-modal-sub { margin: 4px 0 0; font-size: 14px; color: var(--lw-muted); }
    .lw-modal-body { padding: 6px 24px 20px; overflow-y: auto; flex: 1; min-height: 0; }
    .lw-modal-foot {
        display: flex;
        gap: 12px;
        justify-content: flex-end;
        padding: 16px 24px 22px;
        border-top: 1px solid var(--lw-border);
        flex-shrink: 0;
        flex-wrap: wrap;
    }
    .lw-modal-foot > .lw-btn { flex: 1 1 140px; }
    .lw-modal-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        flex-shrink: 0;
        border: 1.5px solid var(--lw-border);
        border-radius: 999px;
        background: var(--lw-surface);
        color: var(--lw-text);
        cursor: pointer;
        padding: 0;
    }
    .lw-modal-close:hover { background: var(--lw-surface-2); }
    .lw-modal-close svg { width: 18px; height: 18px; }
    @media (max-width: 640px) {
        .lw-modal { align-items: flex-end; padding: 0; }
        .lw-modal-dialog { max-width: none; max-height: calc(100vh - 40px); border-radius: 28px 28px 0 0; }
        .lw-modal-dialog::before {
            content: '';
            display: block;
            width: 40px;
            height: 4px;
            margin: 10px auto 0;
            border-radius: 4px;
            background: var(--lw-border-strong);
            flex-shrink: 0;
        }
        .lw-modal-foot { padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
    }

    /* --- Boş durum --- */
    .lw-empty {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 8px;
        padding: 40px 20px;
        color: var(--lw-muted);
    }
    .lw-empty-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 56px;
        height: 56px;
        border-radius: 18px;
        background: var(--lw-bg-2);
        color: var(--lw-text-2);
        font-size: 24px;
        margin-bottom: 4px;
    }
    .lw-empty-icon svg { width: 26px; height: 26px; }
    .lw-empty-title { margin: 0; font-family: var(--lw-font-head); font-size: 18px; font-weight: 800; color: var(--lw-text); letter-spacing: -0.02em; }
    .lw-empty p { margin: 0; font-size: 14px; max-width: 360px; }

    /* --- Liste satırı, ayraç, spinner, ilerleme --- */
    .lw-list-row {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 14px 0;
        border-bottom: 1px solid var(--lw-border);
    }
    .lw-list-row:last-child { border-bottom: 0; }
    .lw-divider { height: 1px; background: var(--lw-border); border: 0; margin: 20px 0; }
    .lw-spinner {
        display: inline-block;
        width: 18px;
        height: 18px;
        border: 2px solid currentColor;
        border-right-color: transparent;
        border-radius: 999px;
        animation: lw-spin .7s linear infinite;
        vertical-align: middle;
    }
    .lw-progress { height: 8px; border-radius: 999px; background: var(--lw-bg-2); overflow: hidden; }
    .lw-progress > span { display: block; height: 100%; border-radius: inherit; background: var(--lw-yellow); transition: width .4s ease; }
    .lw-link { color: var(--lw-violet-dark); font-weight: 700; text-decoration: none; }
    .lw-link:hover { text-decoration: underline; }
    .lw-muted { color: var(--lw-muted); }
}

@keyframes lw-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes lw-spin { to { transform: rotate(360deg); } }

/* 5. AUTH SAYFALARI ======================================================== */
.lw-auth {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: 100vh;
}
.lw-auth-poster {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 40px 48px;
    box-sizing: border-box;
    background: var(--lw-violet);
    color: #fff;
}
.lw-auth-poster::before,
.lw-auth-poster::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}
.lw-auth-poster::before { width: 520px; height: 520px; right: -180px; top: -160px; background: rgba(255, 255, 255, .08); }
.lw-auth-poster::after { width: 360px; height: 360px; left: -140px; bottom: -120px; background: var(--lw-yellow); opacity: .9; }
.lw-auth-poster > * { position: relative; z-index: 1; }
.lw-auth-logo { display: inline-flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.lw-auth-logo img { width: 52px; height: 52px; object-fit: contain; background: #fff; border-radius: 16px; padding: 4px; box-sizing: border-box; }
.lw-auth-logo span { font-family: var(--lw-font-head); font-size: 24px; font-weight: 800; letter-spacing: -0.03em; }
.lw-auth-poster-body { display: flex; align-items: center; gap: 40px; flex: 1; min-height: 0; }
.lw-auth-copy { max-width: 400px; }
.lw-auth-copy .lw-eyebrow { color: rgba(255, 255, 255, .72); }
.lw-auth-copy h2 { margin: 0 0 14px; font-size: clamp(32px, 3.4vw, 46px); font-weight: 800; line-height: 1.05; color: #fff; }
.lw-auth-copy p { margin: 0 0 22px; font-size: 16px; color: rgba(255, 255, 255, .85); }
.lw-auth-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lw-auth-points li { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; }
.lw-auth-points li::before {
    content: '';
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    border-radius: 999px;
    background: var(--lw-yellow) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%2317161C' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center no-repeat;
}
.lw-phone {
    flex-shrink: 0;
    width: 220px;
    padding: 10px;
    border-radius: 46px;
    background: #17161C;
    box-shadow: 0 30px 60px rgba(23, 22, 28, .35);
}
.lw-phone img { display: block; width: 100%; height: auto; border-radius: 36px; }
.lw-auth-poster-foot { font-size: 13px; color: rgba(255, 255, 255, .7); }

.lw-auth-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 24px 40px 40px;
    box-sizing: border-box;
}
.lw-auth-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lw-auth-mobile-brand { display: none; }
.lw-auth-center { flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px 0; }
.lw-auth-card {
    width: 100%;
    max-width: 460px;
    background: var(--lw-surface);
    border: 1.5px solid var(--lw-border);
    border-radius: 28px;
    box-shadow: var(--lw-shadow);
    padding: 36px;
    box-sizing: border-box;
}
.lw-auth-card--wide { max-width: 580px; }
.lw-auth-head { margin-bottom: 24px; }
.lw-auth-head h1 { margin: 0; font-size: 32px; font-weight: 800; line-height: 1.1; }
.lw-auth-head p { margin: 8px 0 0; color: var(--lw-muted); font-size: 15px; }
.lw-auth-alt { margin-top: 22px; text-align: center; font-size: 14px; color: var(--lw-muted); display: grid; gap: 6px; }
.lw-auth-alt p { margin: 0; }
.lw-auth-row { display: flex; justify-content: flex-end; margin-top: -6px; }
.lw-auth-section { margin: 0 0 12px; font-family: var(--lw-font-head); font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
.lw-phone-field { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 10px; }
.lw-rules { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 12.5px; color: var(--lw-muted); }
.lw-rules > div { display: inline-flex; align-items: center; gap: 6px; }
.lw-rules > div::before { content: ''; width: 7px; height: 7px; border-radius: 99px; background: var(--lw-border-strong); transition: background-color .15s ease; }
.lw-rules > div.is-ok { color: #1F7A57; }
.lw-rules > div.is-ok::before { background: var(--lw-mint); }
.lw-status { margin-top: 6px; font-size: 13px; font-weight: 600; }
.lw-status.is-ok { color: #1F7A57; }
.lw-status.is-error { color: #B4442A; }
.lw-status.is-pending { color: var(--lw-muted); }
.lw-contracts { display: grid; gap: 10px; padding: 14px; border-radius: 16px; background: var(--lw-surface-2); border: 1.5px solid var(--lw-border); }
.lw-contracts .lw-check { font-size: 14px; color: var(--lw-text-2); }
.lw-contracts button { padding: 0; border: 0; background: none; font: inherit; font-weight: 700; color: var(--lw-violet-dark); cursor: pointer; text-align: left; }
.lw-contracts button:hover { text-decoration: underline; }
.lw-role-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lw-role { position: relative; cursor: pointer; }
.lw-role input { position: absolute; opacity: 0; pointer-events: none; }
.lw-role-body {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1.5px solid var(--lw-border);
    border-radius: 16px;
    background: var(--lw-surface);
    transition: border-color .15s ease, background-color .15s ease;
}
.lw-role-body strong { display: block; font-size: 15px; }
.lw-role-body small { display: block; font-size: 12.5px; color: var(--lw-muted); }
.lw-role:hover .lw-role-body { border-color: var(--lw-border-strong); }
.lw-role input:checked + .lw-role-body { border-color: var(--lw-ink); background: var(--lw-yellow-soft); }
.lw-role input:focus-visible + .lw-role-body { box-shadow: var(--lw-focus); }
.lw-code-input { text-align: center; font-family: var(--lw-font-head); font-size: 26px; font-weight: 800; letter-spacing: .4em; }
.lw-contract-content { font-size: 14.5px; color: var(--lw-text-2); line-height: 1.7; }
.lw-contract-content :is(h1, h2, h3, h4) { color: var(--lw-text); margin: 1em 0 .4em; }

/* Tom Select (kayıt sayfalarındaki ülke kodu) */
.lw-auth-body .ts-wrapper.single .ts-control {
    min-height: 48px;
    padding: 12px 14px;
    border: 1.5px solid var(--lw-border);
    border-radius: var(--lw-radius-sm);
    background: var(--lw-surface-2);
    box-shadow: none;
    font: 500 14px var(--lw-font-body);
    color: var(--lw-text);
}
.lw-auth-body .ts-wrapper.single.focus .ts-control { border-color: var(--lw-ink); box-shadow: var(--lw-focus); background: var(--lw-surface); }
.lw-auth-body .ts-dropdown { border: 1.5px solid var(--lw-border); border-radius: var(--lw-radius-sm); box-shadow: var(--lw-shadow-lg); margin-top: 6px; overflow: hidden; font: 500 14px var(--lw-font-body); }
.lw-auth-body .ts-dropdown .ts-option { padding: 10px 14px; }
.lw-auth-body .ts-dropdown .active { background: var(--lw-surface-2); color: var(--lw-text); }
.lw-auth-body .ts-dropdown .selected { background: var(--lw-yellow-soft); color: var(--lw-text); }

@media (max-width: 1180px) {
    .lw-phone { display: none; }
}
@media (max-width: 960px) {
    .lw-auth { grid-template-columns: minmax(0, 1fr); }
    .lw-auth-poster { display: none; }
    .lw-auth-main { padding: 16px 16px 32px; }
    .lw-auth-mobile-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--lw-text); }
    .lw-auth-mobile-brand img { width: 40px; height: 40px; object-fit: contain; }
    .lw-auth-mobile-brand span { font-family: var(--lw-font-head); font-weight: 800; font-size: 20px; letter-spacing: -0.03em; }
    .lw-auth-center { align-items: flex-start; padding: 20px 0 0; }
}
@media (max-width: 520px) {
    .lw-auth-card { padding: 24px 20px; border-radius: 24px; }
    .lw-auth-head h1 { font-size: 27px; }
    .lw-phone-field, .lw-role-grid { grid-template-columns: 1fr; }
}

/* Çıkış sayfası */
.lw-logout { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; box-sizing: border-box; }
.lw-logout .lw-auth-card { text-align: center; max-width: 420px; }
.lw-logout-logo img { width: 64px; height: 64px; object-fit: contain; }
.lw-logout .lw-progress { margin-top: 24px; }
.lw-logout .lw-progress > span { width: 100%; animation: lw-fill 1.4s ease-out; }
@keyframes lw-fill { from { width: 0; } to { width: 100%; } }

/* 6. COMPAT — eski sınıflar (app.css katmansız tanımları ezilir) ============ */
.lw-app .modern-card {
    background-color: var(--lw-surface);
    border: 1.5px solid var(--lw-border);
    border-radius: var(--lw-radius);
    box-shadow: var(--lw-shadow);
    transform: none;
}
.lw-app .modern-card:hover { box-shadow: var(--lw-shadow); transform: none; }
.lw-app .modern-card[class*="bg-gradient"] { background-color: transparent; }
.lw-app .glass-effect {
    background: var(--lw-surface);
    border: 1.5px solid var(--lw-border);
    box-shadow: var(--lw-shadow);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}
.lw-app .gradient-text-primary,
.lw-app .gradient-text-accent {
    background: none;
    -webkit-text-fill-color: currentColor;
    color: var(--lw-text);
}
.lw-app .btn-primary { background: var(--lw-ink); color: #fff; box-shadow: none; }
.lw-app .btn-accent { background: var(--lw-violet); color: #fff; box-shadow: none; }
.lw-app .btn-success { background: var(--lw-mint); color: var(--lw-ink); box-shadow: none; }
.lw-app :is(.btn-primary, .btn-accent, .btn-success):hover { transform: none; box-shadow: none; }
.lw-app .progress-bar { background: var(--lw-bg-2); }
.lw-app .progress-fill { background: var(--lw-yellow); }

/* 7. UTILITIES ============================================================= */
/* Katmansız lw-* kurallarındaki display değerleri Tailwind'in (katmanlı) .hidden sınıfını ezmesin */
.lw-app [class*="lw-"].hidden,
.lw-auth-body [class*="lw-"].hidden { display: none !important; }

.lw-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.lw-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lw-grid { display: grid; gap: 16px; }
.lw-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lw-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lw-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .lw-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .lw-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .lw-grid-2, .lw-grid-3, .lw-grid-4 { grid-template-columns: minmax(0, 1fr); } }
.lw-hidden { display: none !important; }

/* Toast */
.lw-toast { position: fixed; top: 16px; right: 16px; z-index: 10000; width: min(400px, calc(100vw - 32px)); animation: lw-pop .18s ease-out; }
.lw-toast-card { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; background: var(--lw-surface); border: 1.5px solid var(--lw-border); border-radius: 16px; box-shadow: var(--lw-shadow-lg); }
.lw-toast-message { flex: 1; min-width: 0; margin: 0; font-size: 14px; font-weight: 600; color: var(--lw-text); word-break: break-word; }
.lw-toast-close { display: inline-flex; padding: 6px; border: 0; border-radius: 99px; background: none; color: var(--lw-muted); cursor: pointer; }
.lw-toast-close:hover { background: var(--lw-surface-2); color: var(--lw-text); }
.lw-toast-close svg { width: 16px; height: 16px; }

/* Eski derlenmiş app.css'teki `#mobileSidebar > div { height:100% }` kenar çubuğu
   başlığını tüm yüksekliğe uzatıyordu; id seçicisiyle geri al. */
#mobileSidebar > .lw-side-brand { height: var(--lw-topbar-h); min-height: 0; }
#mobileSidebar > .lw-side-nav { height: auto; }

/* Kenar çubuğu profil kartı: kaydırılabilir sütunda ezilmesin (menü uzadıkça 27px'e düşüyordu) */
.lw-side-scroll > * { flex-shrink: 0; }
.lw-side-user { min-height: 64px; }
.lw-side-user > div:last-child { flex: 1; overflow: hidden; }
/* Çekmece modunda logo ve kapat butonu aynı satırda */
#mobileSidebar > .lw-side-brand { justify-content: flex-start; flex-wrap: nowrap; }
#mobileSidebar > .lw-side-brand .lw-side-close { margin-left: auto; flex-shrink: 0; }
/* Eski app.css'teki `#mobileSidebar > div > div { min-height:0; flex-shrink:1 }` id seçicisiyle kazanıyordu */
#mobileSidebar .lw-side-scroll > * { flex-shrink: 0; }
#mobileSidebar .lw-side-user { min-height: 64px; }
#mobileSidebar > .lw-side-brand { flex-direction: row; align-items: center; padding: 0 16px 0 20px; }
