/* Scoped notification layout. Existing popover positioning and read actions are retained. */
#notifPanel {
  max-height: min(620px, calc(100dvh - 90px)) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain;
}
#notifPanel .notif-head { background: #fff !important; }
#notifPanel .nt-filters { display: flex; gap: 5px; padding: 12px 0 9px; flex-wrap: wrap; }
#notifPanel .nt-filter {
  border: 1px solid #ddd7cf; background: #fff; color: #424852;
  border-radius: 999px; padding: 7px 10px; font-size: 12px; line-height: 1.2;
}
#notifPanel .nt-filter.on { background: #fff0df; border-color: #c7470b; color: #9d3508; font-weight: 800; }
#notifPanel .nt-date { margin: 12px 0 3px; color: #5c626a; font-size: 11px; font-weight: 750; }
#notifPanel .nt-row {
  display: block; padding: 0; border-bottom: 1px solid #ece9e4;
  border-radius: 10px; margin-top: 3px; background: #fff;
}
#notifPanel .nt-row.unread { background: #fff9f0; }
#notifPanel .nt-open {
  display: grid; grid-template-columns: 30px minmax(0,1fr) 7px;
  gap: 9px; align-items: start; width: 100%; margin: 0; padding: 12px 8px;
  border: 0; border-radius: 10px; background: transparent; color: #242932;
  text-align: left; cursor: pointer; box-sizing: border-box; font: inherit;
}
#notifPanel .nt-open:hover { background: #f5efe7; }
#notifPanel .nt-open .notif-icon { font-size: 16px; background: #f1ede7; color: #242932; }
#notifPanel .nt-open .notif-copy { display: block; min-width: 0; }
#notifPanel .nt-open .nt-title {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden; margin: 0 0 5px; font-size: 13px; line-height: 1.45;
  color: #242932; overflow-wrap: anywhere;
}
#notifPanel .nt-open .nt-body {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden; color: #59616c; font-size: 12px; line-height: 1.55;
  overflow-wrap: anywhere; white-space: normal;
}
#notifPanel .nt-open .nt-meta { display: block; margin-top: 6px; font-size: 10px; color: #68717d; line-height: 1.4; }
#notifPanel .nt-row .notif-dot { background: #c7470b; }
#notifPanel :is(.nt-expand,.nt-back,.nt-more) {
  background: #fff; color: #9d3508; border: 1px solid #e5d4c1;
  border-radius: 8px; font-size: 11px; padding: 8px 10px; line-height: 1.4;
}
#notifPanel .nt-expand { margin: 0 8px 10px 47px; }
#notifPanel .nt-back { margin: 3px 0 5px; }
#notifPanel .nt-more { display: block; width: 100%; margin-top: 12px; box-sizing: border-box; }
#notifPanel :is(.nt-empty,.nt-retention) { margin: 12px 5px; color: #68717d; font-size: 11px; line-height: 1.55; }
#notifPanel button:focus-visible { outline: 2px solid #ad3c08; outline-offset: 2px; }
@media (max-width: 850px) {
  #notifPanel, body > #notifPanel[popover] { max-height: calc(100dvh - 82px) !important; }
  #notifPanel .nt-open { padding: 12px 5px; gap: 7px; }
  #notifPanel .nt-filter { flex: 1; padding-left: 6px; padding-right: 6px; white-space: nowrap; }
}
