/* Notification panel: anchored to its trigger, with bounded list and explicit batch actions. */
@media (min-width: 761px) {
  #app_view .header-actions:has(> .internal-context.hidden) {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
  }
}
#app_view .notification-center {
  width: max-content;
  justify-self: start;
}
#app_view #notification_popover {
  position: fixed !important;
  inset: auto !important;
  top: var(--notification-top, 64px) !important;
  left: var(--notification-left, 12px) !important;
  right: auto !important;
  bottom: auto !important;
  width: var(--notification-width, min(460px, calc(100vw - 24px))) !important;
  max-width: calc(100vw - 16px) !important;
  max-height: var(--notification-height, calc(100dvh - 80px)) !important;
  display: flex;
  flex-direction: column;
  overflow: hidden !important;
  border: 1px solid #cbd8df;
  border-radius: 12px !important;
  background: #fff;
  color: #062936;
  box-shadow: 0 16px 46px rgb(6 41 54 / 18%);
  z-index: 950 !important;
}
#app_view #notification_popover.hidden { display: none !important; }
#app_view #notification_popover .notification-popover-head {
  display: flex !important;
  align-items: center;
  gap: 12px !important;
  padding: 14px 16px;
  flex: 0 0 auto;
  background: #f5f8f9;
}
#app_view #notification_popover button {
  width: auto !important;
  min-height: 36px !important;
  font: inherit;
  font-size: 12px;
  line-height: 1.35;
  white-space: normal;
}
#app_view #notification_popover .notification-close,
#app_view #notification_popover .notification-delete-one {
  width: 34px !important;
  min-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0;
  display: inline-grid;
  place-items: center;
  font-size: 21px;
  font-weight: 500;
  border: 1px solid #d7e1e6;
  border-radius: 6px;
  background: #fff;
  color: #536975;
}
#app_view #notification_popover .notification-tools {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 9px !important;
  padding: 12px 16px;
  flex: 0 0 auto;
}
#app_view #notification_popover .notification-tools select {
  width: 100%;
  min-height: 38px !important;
  font-size: 13px;
  font-weight: 600;
}
#app_view #notification_popover .notification-select-all {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 28px;
  margin: 0;
  color: #062936;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}
#app_view #notification_popover input[type="checkbox"] {
  width: 18px !important;
  height: 18px !important;
  min-height: 18px !important;
  margin: 0;
  flex: 0 0 auto;
  accent-color: #527d19;
}
#app_view #notification_popover #notification_selection_hint,
#app_view #notification_popover #notification_scope_hint {
  color: #536975;
  font-size: 12px;
  line-height: 1.4;
}
#app_view #notification_popover .notification-selection-actions,
#app_view #notification_popover .notification-footer > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
#app_view #notification_popover .notification-items {
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  gap: 8px;
  padding: 12px;
}
#app_view #notification_popover .notification-item {
  display: grid;
  height: auto !important;
  max-height: none !important;
  grid-template-columns: 24px minmax(0, 1fr) 34px;
  align-items: start;
  gap: 8px;
  padding: 10px;
  border: 1px solid #dce5e8;
  background: #fff;
}
#app_view #notification_popover .notification-item.is-unread {
  background: #f5f9ef;
  border-left: 3px solid #527d19;
}
#app_view #notification_popover .notification-item.is-selected {
  border-color: #527d19;
  box-shadow: inset 0 0 0 1px #527d19;
}
#app_view #notification_popover .notification-select {
  width: 24px;
  min-height: 34px;
  cursor: pointer;
}
#app_view #notification_popover .notification-open,
#app_view #notification_popover .notification-open:hover,
#app_view #notification_popover .notification-open:focus-visible {
  display: grid;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 34px !important;
  height: auto !important;
  max-height: none !important;
  padding: 4px;
  gap: 6px;
  background: transparent;
  border: 0;
  color: #062936;
  text-align: left;
  box-shadow: none;
  border-radius: 4px;
}
@media (max-height: 540px) {
  #app_view #notification_popover { overflow-y: auto !important; }
  #app_view #notification_popover .notification-popover-head {
    position: sticky;
    top: 0;
    z-index: 2;
  }
  #app_view #notification_popover .notification-items {
    flex: 0 0 auto;
    overflow: visible;
  }
}
#app_view #notification_popover .notification-open:hover { background: #edf3f4; }
#app_view #notification_popover .notification-open strong {
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
#app_view #notification_popover .notification-open > span {
  color: #536975;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
#app_view #notification_popover .notification-open small {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: #536975;
  font-size: 11px;
}
#app_view #notification_popover .notification-kind-chip {
  font-size: 10px;
  font-weight: 650;
}
#app_view #notification_popover button:focus-visible,
#app_view #notification_popover input:focus-visible,
#app_view #notification_popover select:focus-visible {
  outline: 2px solid #527d19;
  outline-offset: 2px;
}
#app_view #notification_popover button:disabled { opacity: .5; cursor: default; }
#app_view #notification_popover .notification-delete-one:hover,
#app_view #notification_popover #notification_delete_all_btn:hover {
  color: #991b1b;
  background: #fff5f5;
  border-color: #dc2626;
}
#app_view #notification_popover .notification-delete-one svg { width: 18px; height: 18px; }
#app_view #notification_popover .notification-action-hint,
#app_view #notification_popover .notification-delete-confirm {
  flex: 0 0 auto;
  margin: 0;
  padding: 10px 16px;
  font-size: 12px;
  line-height: 1.45;
  background: #edf4e7;
  border-bottom: 1px solid #dce5e8;
}
#app_view #notification_popover .notification-action-hint.is-error,
#app_view #notification_popover .notification-delete-confirm { background: #fff5e8; }
#app_view #notification_popover .notification-delete-confirm p { margin: 0 0 8px; }
#app_view #notification_popover .notification-delete-confirm button { margin: 0 5px 0 0; }
#app_view #notification_popover .notification-load-more {
  flex: 0 0 auto;
  margin: 0 12px 10px;
}
#app_view #notification_popover .notification-footer {
  flex: 0 0 auto;
  display: grid;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #dce5e8;
  background: #f5f8f9;
}
@media (max-width: 760px) {
  #app_view #notification_popover {
    top: 58px !important;
    left: 8px !important;
    right: 8px !important;
    bottom: calc(var(--mobile-primary-height, 0px) + 8px) !important;
    width: auto !important;
    max-height: none !important;
  }
  #app_view #notification_popover .notification-close,
  #app_view #notification_popover .notification-delete-one {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
  }
  #app_view #notification_popover .notification-item {
    grid-template-columns: 24px minmax(0, 1fr) 44px;
  }
  #app_view #notification_popover .notification-select-all,
  #app_view #notification_popover .notification-select { min-height: 44px; }
  #app_view #notification_popover .notification-selection-actions button,
  #app_view #notification_popover .notification-footer button {
    min-height: 42px !important;
    flex: 1 1 120px;
  }
}
