/* ============================================================
   LAYOUT
   ============================================================ */
.app-shell {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    min-height: 100vh;
    background:
        radial-gradient(900px 500px at 80% -10%, rgba(45, 212, 167, 0.08), transparent 60%),
        var(--bg-deep);
}

/* ---------- Sidebar ---------- */
.sidebar {
    background: linear-gradient(180deg, var(--bg-base), var(--bg-deep));
    border-right: 1px solid var(--border);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 10px 22px;
    color: inherit;
    text-decoration: none;
}
.brand-mark {
    width: 40px; height: 40px;
    border-radius: 12px;
    object-fit: cover;
    background: var(--bg-elevated);
    box-shadow: 0 6px 18px var(--accent-glow);
    display: block;
    /* metin fallback (görsel yüklenmezse) */
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 20px;
    color: var(--accent-bright);
    text-align: center;
    line-height: 40px;
}
.brand-text { font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -0.3px; }
.brand-text span { color: var(--accent); }

.nav-group { margin-top: 10px; }
.nav-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    color: var(--text-muted);
    padding: 14px 12px 8px;
    font-weight: 600;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14.5px;
    transition: all .18s ease;
    position: relative;
}
.nav-item svg { width: 19px; height: 19px; stroke-width: 2; flex-shrink: 0; }
.nav-item:hover { background: var(--bg-surface); color: var(--text-primary); }
.nav-item.active {
    background: var(--accent-soft);
    color: var(--accent-bright);
}
.nav-item.active::before {
    content: "";
    position: absolute;
    left: -16px; top: 50%;
    transform: translateY(-50%);
    width: 3px; height: 22px;
    background: var(--accent);
    border-radius: 0 3px 3px 0;
}

/* Nav orta kısmı kaydırılabilir — logo üstte, çıkış altta sabit kalır.
   İleride menü eklendikçe taşmadan kayar. */
.sidebar-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    margin: 0 -6px;
    padding: 0 6px;
}
.sidebar-scroll::-webkit-scrollbar { width: 6px; }
.sidebar-scroll::-webkit-scrollbar-thumb { background: var(--bg-elevated); border-radius: 6px; border: none; transition: background .15s ease; }
.sidebar-scroll::-webkit-scrollbar-thumb:hover { background: var(--accent-dim); }
.sidebar-scroll::-webkit-scrollbar-track { background: transparent; }

.sidebar-footer {
    flex-shrink: 0;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    transition: background .18s ease;
}
.user-card:hover { background: var(--bg-surface); }
.user-avatar {
    width: 38px; height: 38px;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dim));
    display: grid; place-items: center;
    color: #07221b; font-weight: 700;
}
.user-meta { line-height: 1.3; overflow: hidden; }
.user-meta .name { font-weight: 600; font-size: 14px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.user-meta .role { font-size: 12px; color: var(--text-muted); }

/* ---------- Main ---------- */
.main { display: flex; flex-direction: column; min-width: 0; }

.topbar {
    height: 72px;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0 32px;
    border-bottom: 1px solid var(--border);
    background: var(--topbar-bg);
    backdrop-filter: blur(12px);
    position: sticky; top: 0; z-index: 90;   /* içerik açılırlarının (dash-search 30 / ds-results 60) üstünde; bildirim paneli topbar bağlamında olduğundan panel de üstte kalır */
}
.search-bar {
    flex: 1;
    max-width: 520px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: border-color .18s ease;
}
.search-bar:focus-within { border-color: var(--accent-dim); }
.search-bar svg { width: 18px; height: 18px; color: var(--text-muted); }
.search-bar input {
    flex: 1; background: none; border: none; outline: none;
    color: var(--text-primary); font-size: 14px;
}
.search-bar input::placeholder { color: var(--text-muted); }

.topbar-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
    width: 42px; height: 42px;
    border-radius: 11px;
    display: grid; place-items: center;
    color: var(--text-secondary);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    transition: all .18s ease;
    position: relative;
}
.icon-btn:hover { color: var(--accent-bright); border-color: var(--accent-dim); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn .dot {
    position: absolute; top: 9px; right: 10px;
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--accent); box-shadow: 0 0 0 2px var(--bg-surface);
}

/* ===== Bildirim çanı + paneli ===== */
.notif-wrap { position: relative; }
.notif-badge {
    position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px;
    padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff;
    font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
    box-shadow: 0 0 0 2px var(--bg-base);
}
.notif-panel {
    position: absolute; top: calc(100% + 10px); right: 0; z-index: 120;
    width: 370px; max-width: 90vw;
    background: var(--bg-elevated); border: 1px solid var(--border-strong);
    border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.5); overflow: hidden;
    animation: rise .2s ease both;
}
.notif-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 13px 16px; border-bottom: 1px solid var(--border);
    font-weight: 700; font-size: 14px; font-family: var(--font-display);
}
.notif-head span { display: flex; align-items: center; gap: 8px; }
.notif-head svg { width: 16px; height: 16px; color: var(--accent); }
.notif-readall { font-size: 12px; color: var(--accent-bright); font-weight: 600; }
.notif-readall:hover { text-decoration: underline; }
.notif-list { max-height: 62vh; overflow: auto; }
.notif-loading, .notif-empty { text-align: center; color: var(--text-muted); padding: 30px 16px; font-size: 13px; }
.notif-empty i, .notif-empty svg { width: 30px; height: 30px; display: inline-block; margin-bottom: 6px; }
.notif-item {
    display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px;
    border-bottom: 1px solid var(--border); transition: background .15s ease;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg-surface); }
.notif-item.unread { background: var(--accent-soft); cursor: pointer; }
.notif-item.unread:hover { background: rgba(45, 212, 167, 0.18); }
.notif-udot { flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; background: transparent; }
.notif-item.unread .notif-udot { background: var(--accent); }
.notif-main { flex: 1; min-width: 0; }
.notif-title { font-weight: 650; font-size: 13.5px; }
.notif-msg { font-size: 12.5px; color: var(--text-secondary); margin-top: 2px; line-height: 1.45; }
.notif-time { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }
.notif-del { flex-shrink: 0; color: var(--text-muted); width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; }
.notif-del:hover { color: var(--danger); background: var(--bg-surface-2); }
.notif-del svg { width: 15px; height: 15px; }

.content { padding: 32px; flex: 1; }

/* ---------- Page header ---------- */
.page-head { margin-bottom: 28px; }
.greeting { font-size: 13px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--text-muted); font-weight: 600; }
.page-title {
    font-family: var(--font-display);
    font-size: 28px; font-weight: 700;
    letter-spacing: -0.5px;
    margin-top: 4px;
    display: flex; align-items: center; gap: 10px;
}

