/* Header notification bell + notifications page */
.notif-badge {
    position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 999px; background: #ef4444; color: #fff; font-size: 10px; font-weight: 800; line-height: 18px;
    text-align: center; border: 2px solid #0d1117; pointer-events: none;
}
/* The site's header dropdowns are dark (see main.css .dropdown-menu), so the panel matches them in both themes */
.notif-menu {
    width: 360px; max-width: calc(100vw - 24px); background: #161b22; border: 1px solid #30363d; border-radius: 14px;
    overflow: hidden; box-shadow: 0 18px 40px rgba(0, 0, 0, .35); margin-top: 10px !important; padding: 0;
}
.notif-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid #30363d; }
.notif-head-title { font-weight: 800; font-size: 15px; color: #f0f6fc; }
.notif-link-btn { border: none; background: none; color: var(--t-300, #a5b4fc); font-size: 12px; font-weight: 600; padding: 4px 6px; border-radius: 6px; }
.notif-link-btn:hover:not(:disabled) { background: #21262d; color: var(--t-200, #c7d2fe); }
.notif-link-btn:disabled { color: #6e7681; }
.notif-list { max-height: 380px; overflow-y: auto; }
.notif-item { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #21262d; color: inherit; position: relative; text-decoration: none; }
.notif-item:hover { background: #1c2128; }
.notif-item.unread { background: rgba(var(--t-500-rgb, 99, 102, 241), .12); }
.notif-item.unread:hover { background: rgba(var(--t-500-rgb, 99, 102, 241), .18); }
.notif-item.unread::after { content: ''; position: absolute; right: 14px; top: 18px; width: 8px; height: 8px; border-radius: 50%; background: var(--t-400, #818cf8); }
.notif-ic { width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.notif-ic.c-blue { background: #eff6ff; color: #2563eb; } .notif-ic.c-green { background: #f0fdf4; color: #16a34a; }
.notif-ic.c-amber { background: #fffbeb; color: #d97706; } .notif-ic.c-purple { background: #f5f3ff; color: #7c3aed; }
.notif-ic.c-teal { background: #f0fdfa; color: #0d9488; }
.notif-menu .notif-ic.c-blue { background: rgba(37, 99, 235, .18); color: #93c5fd; }
.notif-menu .notif-ic.c-green { background: rgba(22, 163, 74, .18); color: #86efac; }
.notif-menu .notif-ic.c-amber { background: rgba(217, 119, 6, .18); color: #fcd34d; }
.notif-menu .notif-ic.c-purple { background: rgba(124, 58, 237, .2); color: #c4b5fd; }
.notif-menu .notif-ic.c-teal { background: rgba(13, 148, 136, .2); color: #5eead4; }
.notif-body { min-width: 0; flex: 1; padding-right: 12px; }
.notif-title { font-size: 13px; font-weight: 700; color: #f0f6fc; line-height: 1.35; }
.notif-msg { font-size: 12px; color: #8b949e; line-height: 1.45; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.notif-time { font-size: 11px; color: #6e7681; margin-top: 4px; }
.notif-empty { padding: 36px 16px; text-align: center; color: #8b949e; font-size: 13px; }
.notif-empty i { font-size: 28px; color: var(--t-600, #4f46e5); opacity: .6; display: block; margin-bottom: 6px; }
.notif-empty a { color: var(--t-300, #a5b4fc); }
.notif-foot { display: block; text-align: center; padding: 11px; font-size: 13px; font-weight: 600; color: var(--t-300, #a5b4fc); border-top: 1px solid #30363d; text-decoration: none; }
.notif-foot:hover { background: #1c2128; color: var(--t-200, #c7d2fe); }
.notif-guest { padding: 24px 20px; text-align: center; color: #f0f6fc; }
.notif-guest p { font-size: 13px; color: #8b949e; margin-bottom: 14px; }
.notif-guest-icon { width: 48px; height: 48px; border-radius: 50%; background: rgba(var(--t-500-rgb, 99, 102, 241), .18); color: var(--t-300, #a5b4fc); font-size: 22px; display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; }
.notif-guest .btn-outline-secondary { color: #c9d1d9; border-color: #30363d; }
.notif-guest .btn-outline-secondary:hover { background: #21262d; color: #fff; }

/* Positioned with CSS (data-bs-display="static"): right-aligned under the bell on desktop,
   full width under the header on phones where the bell sits at the left of the collapsed menu */
.notif-menu[data-bs-popper=static] { top: 100%; right: 0; left: auto; }
@media (max-width: 1199.98px) {
    .header-right { position: relative; }
    .notif-dropdown { position: static; }
    .notif-menu[data-bs-popper=static] { left: 0; right: 0; width: auto; max-width: none; }
    .notif-list { max-height: 60vh; }
}

/* Full page */
.np-card .notif-empty { color: #64748b; }
.np-card .notif-empty i { color: var(--t-200, #c7d2fe); opacity: 1; }
.np-wrap { max-width: 900px; margin: 0 auto; }
.np-card { background: #fff; border: 1px solid #edf2f7; border-radius: 16px; overflow: hidden; }
.np-toolbar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid #eef2f6; }
.np-tabs a { font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 999px; color: #475569; text-decoration: none; }
.np-tabs a.active { background: var(--t-600, #4f46e5); color: #fff; }
.np-item { display: flex; gap: 14px; padding: 16px 18px; border-bottom: 1px solid #f1f5f9; align-items: flex-start; }
.np-item:last-child { border-bottom: none; }
.np-item.unread { background: #f8faff; }
.np-item .notif-ic { width: 42px; height: 42px; font-size: 18px; }
.np-title { font-weight: 700; color: #0f172a; font-size: 15px; }
.np-title a { color: inherit; }
.np-title a:hover { color: var(--t-600, #4f46e5); }
.np-msg { font-size: 14px; color: #475569; margin-top: 2px; white-space: pre-line; }
.np-meta { font-size: 12px; color: #94a3b8; margin-top: 6px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.np-actions { display: flex; gap: 4px; flex-shrink: 0; }
.np-actions button, .np-actions a { width: 32px; height: 32px; border-radius: 8px; border: 1px solid #e2e8f0; background: #fff; color: #64748b; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
.np-actions button:hover, .np-actions a:hover { color: var(--t-600, #4f46e5); border-color: var(--t-200, #c7d2fe); }
.np-new { font-size: 10px; font-weight: 800; color: #fff; background: var(--t-600, #4f46e5); padding: 1px 7px; border-radius: 999px; text-transform: uppercase; }

/* Dark mode (notifications page; the header dropdown is always dark) */
[data-bs-theme="dark"] .np-card, html.dark-theme .np-card { background: #161b22; border-color: #30363d; }
[data-bs-theme="dark"] .np-toolbar, html.dark-theme .np-toolbar,
[data-bs-theme="dark"] .np-item, html.dark-theme .np-item { border-color: #30363d; }
[data-bs-theme="dark"] .np-title, html.dark-theme .np-title { color: #f0f6fc; }
[data-bs-theme="dark"] .np-msg, html.dark-theme .np-msg { color: #c9d1d9; }
[data-bs-theme="dark"] .np-item.unread, html.dark-theme .np-item.unread { background: rgba(var(--t-500-rgb, 99, 102, 241), .1); }
[data-bs-theme="dark"] .np-item [class*="notif-ic c-"], html.dark-theme .np-item [class*="notif-ic c-"] { background: #21262d; }
[data-bs-theme="dark"] .np-card .notif-empty, html.dark-theme .np-card .notif-empty { color: #8b949e; }
[data-bs-theme="dark"] .np-actions button, html.dark-theme .np-actions button,
[data-bs-theme="dark"] .np-actions a, html.dark-theme .np-actions a { background: #0d1117; border-color: #30363d; }
[data-bs-theme="dark"] .np-tabs a:not(.active), html.dark-theme .np-tabs a:not(.active) { color: #c9d1d9; }
