/* ===================== Колокольчик + dropdown в topbar ===================== */
.topbar-notif { position: relative; }
.topbar-notif-btn { position: relative; }

.topbar-notif-badge {
    position: absolute; top: 2px; right: 2px;
    background: #e53935; color: #fff;
    font-size: 10px; line-height: 1;
    padding: 2px 5px; border-radius: 10px;
    font-weight: 600; min-width: 16px; text-align: center;
    pointer-events: none;
    box-shadow: 0 0 0 2px var(--topbar-bg, #1c2330);
}

.topbar-notif-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 380px;
    max-height: 520px;
    background: var(--surface, #1c2330);
    border: 1px solid var(--border-color, #2b3545);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    z-index: 2000;
    display: flex; flex-direction: column;
    overflow: hidden;
}

.topbar-notif-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: .6rem .9rem;
    border-bottom: 1px solid var(--border-color, #2b3545);
    font-size: .95rem;
}
.topbar-notif-head .btn-link { font-size: .8rem; text-decoration: none; padding: 0; color: var(--primary, #4f7df2); }
.topbar-notif-head .btn-link:hover { text-decoration: underline; }

.topbar-notif-list {
    overflow-y: auto; flex: 1;
    max-height: 400px;
}
.topbar-notif-empty {
    padding: 2rem 1rem; text-align: center;
    color: var(--text-muted, #8998ab); font-size: .9rem;
}

.topbar-notif-item {
    display: flex; gap: .7rem; padding: .7rem .9rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    color: inherit; text-decoration: none;
    transition: background .12s;
    position: relative;
}
.topbar-notif-item:hover { background: rgba(79,125,242,0.08); }
.topbar-notif-item.is-unread::before {
    content: ''; position: absolute; left: 4px; top: 50%;
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--primary, #4f7df2);
    transform: translateY(-50%);
}
.topbar-notif-item > i {
    font-size: 1.1rem; color: var(--primary, #4f7df2);
    flex-shrink: 0; padding-top: 2px;
}
.topbar-notif-body { flex: 1; min-width: 0; }
.topbar-notif-title {
    font-weight: 500; font-size: .9rem;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.topbar-notif-text {
    font-size: .82rem; color: var(--text-muted, #8998ab);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.topbar-notif-time {
    font-size: .72rem; color: var(--text-muted, #8998ab); margin-top: 2px;
}

.topbar-notif-foot {
    padding: .5rem .9rem; text-align: center;
    border-top: 1px solid var(--border-color, #2b3545);
}
.topbar-notif-foot a {
    color: var(--primary, #4f7df2); font-size: .85rem; text-decoration: none;
}
.topbar-notif-foot a:hover { text-decoration: underline; }

/* Бейдж в сайдбаре (мобильный) */
.sidebar-notif-badge {
    background: #e53935; color: #fff;
    font-size: 10px; line-height: 1;
    padding: 2px 5px; border-radius: 10px;
    margin-left: .3rem; vertical-align: middle;
}

@media (max-width: 640px) {
    .topbar-notif-dropdown {
        position: fixed;
        top: 60px; left: 4px; right: 4px; width: auto;
    }
}

/* Светлая тема */
[data-theme="light"] .topbar-notif-dropdown {
    background: #ffffff; border-color: #e1e6ef;
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}
[data-theme="light"] .topbar-notif-head { border-bottom-color: #e5e7eb; }
[data-theme="light"] .topbar-notif-foot { border-top-color: #e5e7eb; }
[data-theme="light"] .topbar-notif-item { border-bottom-color: #f1f3f7; }
[data-theme="light"] .topbar-notif-item:hover { background: #eef3ff; }
[data-theme="light"] .topbar-notif-text,
[data-theme="light"] .topbar-notif-time { color: #6b7280; }
[data-theme="light"] .topbar-notif-badge,
[data-theme="light"] .sidebar-notif-badge { box-shadow: 0 0 0 2px #ffffff; }

/* ===================== /notifications/ полная страница ===================== */
.notif-page { padding: 1.5rem 2rem; max-width: 880px; margin: 0 auto; }
.notif-page h2 { margin: 0 0 1.25rem; }
.notif-filters { display: flex; gap: .5rem; margin-bottom: 1rem; }
.notif-filters .btn.active { background: var(--primary, #4f7df2); color: #fff; border-color: var(--primary, #4f7df2); }

.notif-list { display: flex; flex-direction: column; gap: .5rem; }
.notif-card {
    display: flex; gap: .9rem; padding: .9rem 1rem;
    background: var(--surface, #1c2330);
    border: 1px solid var(--border-color, #2b3545);
    border-radius: 8px;
    text-decoration: none; color: inherit;
    transition: border-color .12s, background .12s;
}
.notif-card.is-unread { border-left: 3px solid var(--primary, #4f7df2); }
.notif-card:hover { border-color: var(--primary, #4f7df2); background: rgba(79,125,242,0.04); }
.notif-card > i { font-size: 1.5rem; color: var(--primary, #4f7df2); flex-shrink: 0; padding-top: 3px; }
.notif-card-body { flex: 1; min-width: 0; }
.notif-card-title { font-weight: 500; margin-bottom: .15rem; }
.notif-card-text { color: var(--text-muted, #8998ab); font-size: .9rem; }
.notif-card-time { font-size: .78rem; color: var(--text-muted, #8998ab); margin-top: .3rem; }
.notif-card-actions { display: flex; gap: .3rem; flex-shrink: 0; }

.notif-empty { text-align: center; padding: 3rem 1rem; color: var(--text-muted, #8998ab); }

[data-theme="light"] .notif-card { background: #ffffff; border-color: #e1e6ef; }
[data-theme="light"] .notif-card:hover { background: #f8fafc; }
[data-theme="light"] .notif-card-text,
[data-theme="light"] .notif-card-time { color: #6b7280; }
