/* ─── Notification bell (research §2.1) ─── */

#notif-bell-wrap {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 60;
}
#notif-bell {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  color: var(--c-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
#notif-bell:hover {
  background: var(--c-surface-2);
  color: var(--c-text);
  border-color: var(--c-border-strong);
}
#notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #b91c1c;
  color: #fff;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  border: 2px solid var(--c-surface);
  box-sizing: content-box;
}

#notif-panel {
  position: absolute;
  top: 48px;
  right: 0;
  width: 360px;
  max-width: calc(100vw - 32px);
  max-height: 60vh;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  box-shadow: 0 16px 40px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.notif-panel-head {
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--c-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--c-surface-2);
}
.notif-panel-head strong { font-size: var(--fs-sm); }
.notif-link {
  background: none;
  border: none;
  color: var(--c-primary-text);
  font-size: var(--fs-xs);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 3px;
}
.notif-link:hover { background: var(--c-primary-soft); }

#notif-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  flex: 1;
}
.notif-item {
  display: flex;
  gap: 10px;
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--c-border);
  cursor: pointer;
  transition: background var(--t-fast);
}
.notif-item:hover { background: var(--c-surface-2); }
.notif-item:last-child { border-bottom: none; }
.notif-item-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: transparent;
  margin-top: 6px;
  flex-shrink: 0;
}
.notif-item.is-unread .notif-item-dot { background: var(--c-primary); }
.notif-item-body { flex: 1; min-width: 0; }
.notif-item-title {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--c-text);
  margin-bottom: 2px;
  line-height: var(--lh-tight);
}
.notif-item.is-read .notif-item-title { font-weight: var(--fw-medium); color: var(--c-text-muted); }
.notif-item-text {
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
  line-height: var(--lh-normal);
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.notif-item-meta {
  font-size: 11px;
  color: var(--c-text-light);
}
.notif-empty {
  padding: var(--s-5) var(--s-4);
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  line-height: var(--lh-normal);
}

@media (max-width: 768px) {
  #notif-bell-wrap { top: 12px; right: 12px; }
  #notif-bell { width: 36px; height: 36px; }
  #notif-panel { width: 320px; max-height: 50vh; }
}
@media (max-width: 480px) {
  #notif-panel {
    position: fixed;
    top: auto;
    right: 8px;
    left: 8px;
    bottom: 80px;
    width: auto;
    max-width: none;
  }
}
