.global-notifications {
  position: relative;
  display: inline-flex;
  align-items: center;
  z-index: 60;
}
.global-notifications-toggle {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(88, 204, 2, 0.34);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(240,255,232,.92));
  color: #17350d;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 9px 18px rgba(18,70,40,.12), inset 0 -2px 0 rgba(88,204,2,.12);
  position: relative;
  font-family: inherit;
}
.global-notifications-toggle:hover,
.global-notifications-toggle[aria-expanded="true"] {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(18,70,40,.16), inset 0 -2px 0 rgba(88,204,2,.16);
}
.global-notifications-bell { font-size: 1.12rem; line-height: 1; }
.global-notifications-badge,
.nav-notification-badge,
.header-profile-notification-badge {
  position: absolute;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff4d4d, #ff8a3d);
  color: #fff;
  border: 2px solid #fff;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
  font-weight: 900;
  box-shadow: 0 7px 14px rgba(220, 45, 45, .24);
  direction: ltr;
}
.global-notifications-badge { top: -5px; left: -6px; }
.global-notifications-badge.is-empty,
.nav-notification-badge.is-empty,
.header-profile-notification-badge.is-empty { display: none; }
.header-profile-notification-badge { top: 4px; left: 6px; }
.desktop-profile-link,
.nav-profile,
.header-profile { position: relative; }
.desktop-profile-link .nav-notification-badge { top: 2px; left: 4px; }
.nav-profile .nav-notification-badge { top: 2px; left: 18px; }
.global-notifications-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  width: min(360px, calc(100vw - 24px));
  max-height: min(74vh, 520px);
  overflow: auto;
  padding: 12px;
  border-radius: 24px;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(88,204,2,.24);
  box-shadow: 0 28px 60px rgba(18,70,40,.22), 0 0 0 1px rgba(255,255,255,.55) inset;
  backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px) scale(.98);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}
.global-notifications.is-open .global-notifications-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
.global-notifications-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 8px 12px;
  border-bottom: 1px solid rgba(88,204,2,.16);
}
.global-notifications-head p { margin: 0 0 3px; color: #4a6740; font-weight: 800; font-size: .82rem; }
.global-notifications-head strong { color: #142b0d; font-size: .98rem; }
.global-notifications-head a,
.global-notifications-actions a,
.global-notifications-actions button {
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  background: #eefddd;
  color: #245914;
  font-weight: 900;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.global-notifications-list {
  display: grid;
  gap: 8px;
  padding: 10px 0;
}
.global-notification-item {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 10px;
  padding: 11px;
  border-radius: 18px;
  background: rgba(245, 255, 239, .82);
  border: 1px solid rgba(88,204,2,.14);
}
.global-notification-item.unread {
  background: linear-gradient(135deg, rgba(229,255,216,.96), rgba(255,255,255,.96));
  border-color: rgba(88,204,2,.35);
}
.global-notification-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  margin-top: 7px;
  background: #58cc02;
  box-shadow: 0 0 0 5px rgba(88,204,2,.12);
}
.global-notification-item.level-warning .global-notification-dot { background: #ffb020; box-shadow: 0 0 0 5px rgba(255,176,32,.13); }
.global-notification-item.level-danger .global-notification-dot { background: #ff4d4d; box-shadow: 0 0 0 5px rgba(255,77,77,.13); }
.global-notification-item.level-success .global-notification-dot { background: #20c997; box-shadow: 0 0 0 5px rgba(32,201,151,.13); }
.global-notification-copy { min-width: 0; }
.global-notification-copy strong {
  display: block;
  color: #142b0d;
  font-size: .92rem;
  line-height: 1.65;
}
.global-notification-copy small {
  display: block;
  color: #4d6845;
  font-size: .78rem;
  line-height: 1.65;
}
.global-notifications-empty {
  padding: 18px 12px;
  color: #4d6845;
  line-height: 1.9;
  font-weight: 700;
}
.global-notifications-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(88,204,2,.16);
}
.global-notifications-actions form { margin: 0; }
body.dark .global-notifications-toggle {
  background: linear-gradient(180deg, rgba(28,52,34,.96), rgba(19,37,25,.94));
  color: #eaffdc;
  border-color: rgba(88,204,2,.26);
}
body.dark .global-notifications-panel {
  background: rgba(18,31,23,.97);
  border-color: rgba(88,204,2,.22);
  box-shadow: 0 28px 60px rgba(0,0,0,.38), 0 0 0 1px rgba(255,255,255,.05) inset;
}
body.dark .global-notifications-head p,
body.dark .global-notification-copy small,
body.dark .global-notifications-empty { color: #cfeadf; }
body.dark .global-notifications-head strong,
body.dark .global-notification-copy strong { color: #f1fff2; }
body.dark .global-notification-item { background: rgba(26,45,32,.86); border-color: rgba(88,204,2,.16); }
body.dark .global-notification-item.unread { background: rgba(31,59,35,.94); border-color: rgba(88,204,2,.3); }
body.dark .global-notifications-head a,
body.dark .global-notifications-actions a,
body.dark .global-notifications-actions button { background: rgba(88,204,2,.18); color: #eaffdc; }
@media (max-width: 860px) {
  header .global-notifications { display: none; }
  .nav-profile .nav-notification-badge {
    top: -1px;
    left: 12px;
    min-width: 18px;
    height: 18px;
    line-height: 15px;
    font-size: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .global-notifications-toggle,
  .global-notifications-panel { transition: none; }
}
