.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #dc2626;
  color: #fff;
  font-size: 0.5625rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 2px solid var(--nav-bg, #1a1f2e);
  line-height: 1;
}
.notif-bell-btn:hover { color: var(--nav-accent, #e8a020) !important; }
#notif-panel a:hover { background: var(--surface-2, #f8f9fb); }
@keyframes notifSlideIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
.notif-toast { transition: opacity 0.3s, transform 0.3s; }

/* ── Top nav dropdown group labels ── */
.topnav-dropdown-menu-200 { min-width: 200px; }
.topnav-dropdown-group-label {
  padding: 0.375rem 0.875rem 0.25rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ── Topnav search ── */
.topnav-search-form { position: relative; }
.topnav-search-suggestions {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: var(--surface-1, #fff);
  border: 1px solid var(--border-light, #eef0f3);
  border-radius: var(--radius, 8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 9999;
  overflow: hidden;
}
.search-suggest-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.875rem;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 0.8125rem;
  border-bottom: 1px solid var(--border-light, #eef0f3);
  transition: background 0.1s;
}
.search-suggest-item:hover { background: var(--surface-2, #f8f9fb); }
.search-suggest-item .material-symbols-outlined {
  font-size: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.search-suggest-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-suggest-type {
  margin-left: auto;
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-transform: capitalize;
  flex-shrink: 0;
}

/* ── Notification bell button ── */
.notif-bell-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.375rem;
  margin-right: 0.5rem;
  color: var(--nav-text, #c8cad0);
}
.notif-bell-btn .material-symbols-outlined { font-size: 20px; }
.topnav-mobile-footer-right {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.topnav-mobile-footer-right .notif-bell-btn {
  margin-right: 0;
  color: var(--text-muted);
}

/* ── Top nav organisation switcher ── */
.topnav-user-orgs-scroll {
  max-height: 200px;
  overflow-y: auto;
  border-bottom: 1px solid var(--border-light, #eef0f3);
  margin-bottom: 0.25rem;
}
.topnav-user-org-item { padding: 0.4rem 0.875rem; }
.topnav-user-org-item--active { background: var(--surface-2, #f8f9fb); }
.topnav-user-org-item .material-symbols-outlined {
  font-size: 15px;
  flex-shrink: 0;
}
.topnav-user-org-item--active .material-symbols-outlined { color: var(--accent); }
.topnav-user-org-item-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topnav-user-org-item--active .topnav-user-org-item-name {
  font-weight: 600;
  color: var(--text-primary);
}

/* ── Role switcher mobile icon ── */
.rs-label-icon {
  font-size: 13px;
  vertical-align: -2px;
  margin-right: 2px;
}

/* ── Impersonation banner icons ── */
.impersonation-banner .material-symbols-outlined { font-size: 16px; }
.impersonation-exit .material-symbols-outlined { font-size: 14px; }

/* ── Notification panel/overlay ── */
.notif-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  z-index: 9998;
}
.notif-panel {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 360px;
  max-width: 90vw;
  background: var(--surface-1, #fff);
  z-index: 9999;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
  transform: translateX(100%);
  transition: transform 0.25s ease;
}
.notif-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-light, #eef0f3);
}
.notif-panel-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}
.notif-panel-header-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}
.notif-mark-all-btn {
  font-size: 0.6875rem;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.notif-panel-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: var(--text-muted);
}
.notif-panel-close-btn .material-symbols-outlined { font-size: 20px; }
.notif-panel-scroll {
  overflow-y: auto;
  height: calc(100% - 56px);
  display: flex;
  flex-direction: column;
}
.notif-panel-list { flex: 1; }
.notif-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--border-light, #eef0f3);
  transition: background 0.15s;
  align-items: flex-start;
}
.notif-item-link {
  display: flex;
  gap: 0.75rem;
  flex: 1;
  text-decoration: none;
  min-width: 0;
}
.notif-item-icon {
  font-size: 20px !important;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
}
.notif-item-body {
  min-width: 0;
  flex: 1;
}
.notif-item-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}
.notif-item-message {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 2px;
}
.notif-item-time {
  font-size: 0.625rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.notif-item-clear-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.notif-item-clear-btn .material-symbols-outlined { font-size: 16px; }
.notif-panel-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border-light, #eef0f3);
}
.notif-clear-all-btn {
  width: 100%;
  padding: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--surface-2, #f8f9fb);
  border: 1px solid var(--border-light, #eef0f3);
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
  transition: background 0.15s;
}
.notif-clear-all-btn:hover { background: var(--border-light, #eef0f3); }
.notif-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  flex: 1;
}
.notif-empty-icon {
  font-size: 2.5rem !important;
  margin-bottom: 0.75rem;
  opacity: 0.4;
}
.notif-empty-text { font-size: 0.8125rem; }

/* ── Notification toasts ── */
.notif-toasts {
  position: fixed;
  top: 56px;
  right: 1rem;
  z-index: 9997;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 360px;
  width: 100%;
}
.notif-toast {
  background: var(--surface-1, #fff);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm, 6px);
  padding: 0.75rem 0.875rem;
  box-shadow: var(--shadow-md, 0 4px 12px rgba(0, 0, 0, .08));
  display: flex;
  gap: 0.625rem;
  align-items: flex-start;
  animation: notifSlideIn 0.3s ease;
}
.notif-toast-icon {
  font-size: 18px !important;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 1px;
}
.notif-toast-body {
  flex: 1;
  min-width: 0;
}
.notif-toast-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}
.notif-toast-message {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.3;
  margin-top: 2px;
}
.notif-toast-link {
  font-size: 0.6875rem;
  color: var(--accent);
  text-decoration: none;
  margin-top: 4px;
  display: inline-block;
}
.notif-toast-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: var(--text-muted);
  flex-shrink: 0;
}
.notif-toast-close .material-symbols-outlined { font-size: 16px; }

/* ── "View all" link inside slide-out panel ─────────────────────────── */
.notif-view-all-btn {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
  text-align: center;
  background: var(--surface-2, #f8f9fb);
  border: 1px solid var(--border-light, #eef0f3);
  border-radius: var(--radius, 8px);
  color: var(--accent, #e8a020);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
}
.notif-view-all-btn:hover {
  background: var(--surface-3, #f1f3f5);
}

/* ── Notification center (full page) ─────────────────────────────────── */
.notif-center-wrap {
  max-width: 840px;
  margin: 0 auto;
  padding: 1.5rem;
}
.notif-center-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}
.notif-center-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
  color: var(--text-primary, #0f1623);
}
.notif-center-title .material-symbols-outlined {
  color: var(--accent, #e8a020);
  font-size: 28px;
}
.notif-center-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted, #9ba3b5);
  margin: 0;
}
.notif-center-filters {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--surface-1, #fff);
  border: 1px solid var(--border-light, #eef0f3);
  border-radius: var(--radius, 8px);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.notif-center-filter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted, #9ba3b5);
}
.notif-center-filter select {
  padding: 0.375rem 0.625rem;
  border: 1px solid var(--border, #e4e6ea);
  border-radius: var(--radius-sm, 6px);
  background: var(--surface-1, #fff);
  font-size: 0.8125rem;
  color: var(--text-primary, #0f1623);
}
.notif-center-filter-checkbox {
  cursor: pointer;
}
.notif-center-filter-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}
.notif-center-reset {
  font-size: 0.75rem;
  color: var(--text-muted, #9ba3b5);
  text-decoration: none;
  margin-left: auto;
}
.notif-center-reset:hover {
  color: var(--accent, #e8a020);
}
.notif-center-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.notif-center-item {
  display: flex;
  align-items: stretch;
  background: var(--surface-1, #fff);
  border: 1px solid var(--border-light, #eef0f3);
  border-radius: var(--radius, 8px);
  overflow: hidden;
  transition: background 0.15s;
}
.notif-center-item:hover {
  background: var(--surface-2, #f8f9fb);
}
.notif-center-item-unread {
  border-left: 3px solid var(--accent, #e8a020);
}
.notif-center-item-cleared {
  opacity: 0.6;
}
.notif-center-item-link {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  flex: 1;
  padding: 0.875rem 1rem;
  text-decoration: none;
  color: inherit;
}
.notif-center-item-icon {
  color: var(--accent, #e8a020);
  font-size: 22px;
  flex-shrink: 0;
  margin-top: 2px;
}
.notif-center-item-body {
  flex: 1;
  min-width: 0;
}
.notif-center-item-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary, #0f1623);
  margin-bottom: 0.125rem;
}
.notif-center-item-message {
  font-size: 0.8125rem;
  color: var(--text-muted, #9ba3b5);
  margin-bottom: 0.25rem;
}
.notif-center-item-meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.6875rem;
  color: var(--text-muted, #9ba3b5);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-wrap: wrap;
}
.notif-center-item-category {
  font-weight: 600;
  color: var(--accent, #e8a020);
}
.notif-center-item-clear {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 0.75rem;
  color: var(--text-muted, #9ba3b5);
  flex-shrink: 0;
}
.notif-center-item-clear:hover {
  color: #dc2626;
}
.notif-center-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1rem;
  text-align: center;
  background: var(--surface-1, #fff);
  border: 1px dashed var(--border, #e4e6ea);
  border-radius: var(--radius, 8px);
}
.notif-center-empty-icon {
  font-size: 48px;
  color: var(--text-muted, #9ba3b5);
  margin-bottom: 0.75rem;
}
.notif-center-empty-text {
  font-size: 0.9375rem;
  color: var(--text-muted, #9ba3b5);
  margin: 0;
}
.notif-center-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}
.notif-center-pager-info {
  font-size: 0.8125rem;
  color: var(--text-muted, #9ba3b5);
}
