.portal-notifications { position: relative; order: 3; flex: 0 0 auto; margin-left: .65rem; }
.portal-notifications [hidden] { display: none !important; }
.app-navbar .portal-notification-bell {
  position: relative; display: inline-grid; place-items: center; width: 39px; height: 39px;
  padding: 0; border: 1px solid rgba(255,255,255,.23); border-radius: 10px;
  background: rgba(255,255,255,.1); color: #fff; cursor: pointer;
}
.app-navbar .portal-notification-bell:hover,
.app-navbar .portal-notification-bell[aria-expanded="true"] { background: rgba(255,255,255,.2); }
.app-navbar .portal-notification-bell:focus-visible { outline: 3px solid #e5c882; outline-offset: 2px; }
.portal-notification-bell svg { width: 21px; height: 21px; }
.portal-notification-count {
  position: absolute; top: -7px; right: -7px; min-width: 19px; height: 19px;
  padding: 0 4px; display: grid; place-items: center; border-radius: 10px;
  background: #c9383e; color: #fff; font: 700 11px/1 system-ui, sans-serif;
}
.portal-notification-history {
  position: absolute; z-index: 1300; top: calc(100% + 12px); right: 0;
  width: min(390px, calc(100vw - 24px)); max-height: min(470px, calc(100vh - 110px));
  overflow-y: auto; padding: 13px; border: 1px solid #d7e5dc; border-radius: 13px;
  background: #fff; color: #17372d; box-shadow: 0 17px 45px rgba(4,43,31,.2);
}
.portal-notification-history-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 3px 3px 10px; }
.portal-notification-history-heading strong { font-size: 1rem; }
.portal-notification-history-heading span { color: #65776e; font-size: .78rem; }
.portal-notification-item { padding: 10px 7px; border-top: 1px solid #e6ede8; }
.portal-notification-item.is-unread { background: #f2f8f4; }
.portal-notification-item.is-actionable { cursor: pointer; }
.portal-notification-item.is-actionable:hover,.portal-notification-item.is-actionable:focus-visible { background: #e8f3ed; outline: 2px solid #7aaf92; }
.portal-notification-item strong { display: block; font-size: .85rem; font-weight: 700; }
.portal-notification-item p { margin: 3px 0 0; color: #485e51; font-size: .8rem; }
.portal-notification-item time { display: block; margin-top: 4px; color: #6b7b70; font-size: .75rem; }
.portal-notification-empty { margin: 0; padding: 13px 4px; color: #65776e; font-size: .85rem; }
.portal-notification-toasts {
  position: fixed; z-index: 1290; top: 84px; right: 18px;
  display: grid; gap: 9px; width: min(400px, calc(100vw - 36px));
  pointer-events: none;
}
.portal-notifications.is-open .portal-notification-toasts { display: none; }
.portal-notification-toast {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 12px 12px 14px;
  border: 1px solid #e5cc8a; border-radius: 11px; background: #fff8e5;
  color: #3a321e; box-shadow: 0 9px 25px rgba(4,43,31,.17); pointer-events: auto;
}
.portal-notification-toast.is-connection { border-color: #e1ada1; background: #fff1ec; color: #523229; }
.portal-notification-toast-icon {
  flex: 0 0 auto; display: grid; place-items: center; width: 20px; height: 20px;
  margin-top: 1px; border: 1.5px solid currentColor; border-radius: 50%;
  font: 800 .8rem/1 system-ui, sans-serif;
}
.portal-notification-toast-content { flex: 1 1 auto; min-width: 0; }
.portal-notification-toast-content strong { display: block; margin-bottom: 2px; font-size: .86rem; }
.portal-notification-toast-content p { margin: 0; font-size: .82rem; line-height: 1.4; }
.portal-notification-toast-close { flex: 0 0 auto; width: 26px; height: 26px; margin: -4px -4px 0 0; border: 0; border-radius: 6px; background: transparent; color: inherit; cursor: pointer; }
.portal-notification-toast-close:hover { background: rgba(0,0,0,.07); }
@media (min-width: 992px) {
  .app-navbar .navbar-collapse { order: 2; }
}
@media (max-width: 991px) {
  .portal-notifications { order: 2; margin-left: auto; margin-right: .45rem; }
  .app-navbar .navbar-toggler { order: 3; }
  .app-navbar .navbar-collapse { order: 4; flex-basis: 100%; }
  .portal-notification-history { position: fixed; top: 74px; right: 12px; }
  .portal-notification-toasts { top: 74px; right: 12px; width: min(400px, calc(100vw - 24px)); }
}
