.notification-wrapper {
  position: relative;
  flex-shrink: 0;
}

.notif-bell {
  position: relative;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-fg-muted);
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background .12s, color .12s;
}

.notif-bell:hover {
  background: var(--bg-bg-subtle);
  color: var(--text-fg);
}

.bell-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-danger);
  border: 2px solid var(--bg-surface);
}

.bell-dot[hidden] {
  display: none;
}

.notification-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 340px;
  min-height: 0;
  max-height: min(460px, calc(100vh - 84px));
  overflow: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-border);
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .14);
  display: none;
  z-index: 120;
}

.notification-menu.show {
  display: block;
}

.notification-head {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border-border);
}

.notification-title-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text-fg);
}

.notification-title-wrap svg {
  width: 18px;
  height: 18px;
  color: var(--text-fg-muted);
}

.notification-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-fg);
}

.notification-clear-btn {
  border: none;
  background: transparent;
  color: var(--text-fg-muted);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.notification-clear-btn:hover {
  color: var(--bg-accent);
}

.notification-list {
  padding: 6px;
}

.notification-item {
  width: 100%;
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  color: inherit;
  cursor: pointer;
  font-family: inherit;
}

.notification-item:hover {
  background: var(--bg-bg-subtle);
  border-color: var(--border-border);
}

.notification-item.is-read {
  opacity: .78;
}

.notification-item.is-unread .notification-item-title::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 8px;
  border-radius: 999px;
  background: var(--bg-accent);
  vertical-align: middle;
}

.notification-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #eaf0ff;
  color: var(--bg-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.notification-icon svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.8;
}

.notification-copy {
  min-width: 0;
}

.notification-item-title {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-fg);
}

.notification-meta {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  color: var(--text-fg-subtle);
}

.notification-body {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-fg-muted);
  line-height: 1.45;
}

.notification-cta {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 800;
  color: var(--bg-accent);
}

.notification-empty-state {
  min-height: 164px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--text-fg-muted);
  text-align: center;
  padding: 24px 16px;
}

.notification-empty-icon {
  width: 38px;
  height: 38px;
  color: #b7beca;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.notification-empty-icon svg {
  width: 34px;
  height: 34px;
  stroke-width: 1.5;
}

.notification-empty-state strong {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-fg-muted);
}

.notification-empty-state span {
  font-size: 13px;
  color: var(--text-fg-muted);
}

@media (max-width: 640px) {
  .notification-menu {
    position: fixed;
    top: 68px;
    right: 12px;
    left: 12px;
    width: auto;
  }
}
