/* Notification center: a compact, non-modal panel anchored to the bell. */
#notif-panel.notification-center {
  position: absolute; inset-inline-end: 0; top: calc(100% + 10px); z-index: 90;
  display: flex; flex-direction: column; width: min(400px, calc(100vw - 16px));
  max-height: min(620px, calc(100dvh - 76px)); overflow: hidden;
  background: #fff; color: #1e293b; border: 1px solid #e2e8f0; border-radius: 18px;
  box-shadow: 0 20px 55px rgba(15, 23, 42, .2); text-align: start;
}
#notif-panel.hidden { display: none !important; }
.notif-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 20px 13px; }
.notif-eyebrow { color: var(--study-accent); font-size: 10px; letter-spacing: .14em; font-weight: 800; }
.notif-head h2 { margin: 3px 0 0; font-size: 20px; line-height: 1.25; font-weight: 750; }
.notif-count { display: block; margin-top: 4px; color: #64748b; font-size: 12px; }
.notif-count.hidden { display: none; }
.notif-close { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: #64748b; }
.notif-close:hover { background: #f1f5f9; }
.notif-toolbar { padding: 0 20px 12px; border-bottom: 1px solid #e8edf4; }
.notif-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.notif-tab-btn { min-height: 34px; padding: 6px 12px; border-radius: 9px; color: #64748b; font-size: 12px; font-weight: 650; }
.notif-tab-btn[aria-pressed="true"] { background: #eef2ff; color: #4338ca; }
.notif-mark-all { margin-top: 10px; color: #4f46e5; font-size: 12px; font-weight: 650; }
.notif-mark-all:disabled { color: #94a3b8; cursor: default; }
.notif-list { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.notif-state { min-height: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 30px 20px; color: #64748b; text-align: center; font-size: 13px; }
.notif-state p { margin: 0; }
.notif-state-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 15px; background: #f1f5f9; color: #818cf8; font-size: 18px; }
.notif-spinner { width: 24px; height: 24px; border: 2px solid #e0e7ff; border-top-color: var(--study-accent); border-radius: 50%; animation: notif-spin .8s linear infinite; }
@keyframes notif-spin { to { transform: rotate(360deg); } }
.notif-action { padding: 8px 14px; border-radius: 9px; background: var(--study-action); color: white; font-weight: 700; }
.notif-item { width: 100%; display: flex; gap: 12px; align-items: flex-start; padding: 15px 20px; border-bottom: 1px solid #f1f5f9; text-align: start; color: inherit; }
.notif-item:hover { background: #f8fafc; }
.notif-item.is-unread { background: #f7f8ff; }
.notif-item.is-unread:hover { background: #eef2ff; }
.notif-item-icon { flex: 0 0 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; background: #eef2ff; color: var(--study-accent); font-size: 14px; }
.notif-item-content { flex: 1; min-width: 0; display: grid; gap: 4px; }
.notif-item-meta { display: flex; justify-content: space-between; gap: 8px; color: #64748b; font-size: 10px; font-weight: 700; }
.notif-item-meta time { font-weight: 400; white-space: nowrap; }
.notif-item-title { color: #1e293b; font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }
.notif-item-body { color: #64748b; font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.notif-dot { flex: 0 0 8px; width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--study-accent); }
#notif-panel button:focus-visible { outline: 2px solid var(--study-accent); outline-offset: -2px; }
@media (max-width: 599.98px) {
  #notif-panel.notification-center { position: fixed !important; top: calc(56px + env(safe-area-inset-top, 0px) + 6px) !important; inset-inline-end: 8px !important; inset-inline-start: auto !important; max-height: calc(100dvh - 70px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 379.98px) { #btn-notif-bell { display: flex !important; } #notif-panel.notification-center:not(.hidden) { display: flex !important; } }
@media (prefers-reduced-motion: reduce) { .notif-spinner { animation: none; } }

/* The notification panel uses the same reading surface as the workspace. */
#notif-panel.notification-center {
  background: var(--study-paper); color: var(--study-ink); border-color: var(--study-rule);
}
#notif-panel .notif-toolbar, #notif-panel .notif-item { border-color: var(--study-rule); }
#notif-panel :is(.notif-item-title, h2) { color: var(--study-ink); }
#notif-panel :is(.notif-item-meta, .notif-item-body, .notif-close, .notif-count, .notif-state, .notif-tab-btn) { color: var(--study-muted); }
#notif-panel :is(.notif-item:hover, .notif-item.is-unread, .notif-close:hover, .notif-tab-btn[aria-pressed=true], .notif-item-icon, .notif-state-icon) { background: var(--study-wash); color: var(--study-accent); }
#notif-panel .notif-mark-all:not(:disabled) { color: var(--study-accent); }
#notif-panel :is(.notif-tab-btn, .notif-close, .notif-mark-all) { min-height: 44px; }
