/* Recipient-scoped quick inbox; the full history remains a separate destination. */
#notification-drawer.notification-drawer {
  --nd-surface:var(--erp-surface,#fcfbfd);--nd-ink:var(--erp-ink,#29302e);
  --nd-muted:var(--erp-muted,#66706e);--nd-line:var(--erp-line,#dedee4);
  --nd-lilac:color-mix(in srgb,var(--erp-chart-lilac,#c4b2dc) 18%,var(--nd-surface));
  --nd-warm:color-mix(in srgb,var(--erp-warning,#ba8c58) 13%,var(--nd-surface));
  position:fixed;inset:12px 12px 12px auto;margin:0;width:420px;max-width:calc(100vw - 24px);
  height:calc(100dvh - 24px);max-height:calc(100dvh - 24px);padding:0;
  border:1px solid var(--nd-line);border-radius:30px;overflow:hidden;
  color:var(--nd-ink);background:radial-gradient(ellipse at 100% 0,color-mix(in srgb,var(--erp-chart-lilac,#c4b2dc) 12%,transparent),transparent 55%),radial-gradient(ellipse at 0 100%,color-mix(in srgb,var(--erp-warning,#ba8c58) 8%,transparent),transparent 55%),var(--nd-surface);
  box-shadow:0 24px 80px #0003;font-family:inherit;
}
#notification-drawer:not([open]) {display:none}
#notification-drawer[open] {display:flex;flex-direction:column}
#notification-drawer::backdrop {background:#10121970;backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px)}
body:has(#notification-drawer:modal) {overflow:hidden}
#notification-drawer *,#notification-drawer *::before,#notification-drawer *::after {box-sizing:border-box}
#notification-drawer [hidden] {display:none!important}
#notification-drawer :is(button,input) {font:inherit}
#notification-drawer button {cursor:pointer;text-transform:none;letter-spacing:normal;box-shadow:none}
#notification-drawer button:disabled {cursor:default;opacity:.55}
#notification-drawer :is(button,input):focus-visible {outline:2px solid var(--erp-focus,#a18abf);outline-offset:3px}
#notification-drawer svg {display:block;flex:none;width:18px;height:18px}
#notification-drawer .nd-heading {display:flex;flex:none;align-items:flex-start;justify-content:space-between;gap:12px;padding:24px 22px 14px}
#notification-drawer .nd-heading>div {min-width:0}
#notification-drawer .nd-eyebrow {font-size:10px;letter-spacing:1.3px;text-transform:uppercase;color:var(--nd-muted)}
#notification-drawer h2 {margin:6px 0 5px;font-size:27px;font-weight:500;line-height:1.2;letter-spacing:-.8px;outline:none}
#notification-drawer .nd-heading p {margin:0;font-size:12px;line-height:1.4;color:var(--nd-muted);overflow-wrap:anywhere}
#notification-drawer .nd-round {display:grid;place-items:center;flex:none;width:44px;height:44px;min-width:44px;min-height:44px;padding:0;border:1px solid var(--nd-line);border-radius:50%;background:color-mix(in srgb,var(--nd-surface) 82%,transparent);color:var(--nd-ink)}
#notification-drawer .nd-controls {flex:none;padding:0 22px 12px}
#notification-drawer .nd-search {display:flex;align-items:center;gap:10px;min-height:46px;width:100%;padding:0 14px;border:1px solid var(--nd-line);border-radius:24px;background:var(--nd-surface);color:var(--nd-muted)}
#notification-drawer .nd-search:focus-within {border-color:var(--erp-focus,#a18abf)}
#notification-drawer .nd-search input {width:100%;min-width:0;min-height:44px;margin:0;padding:9px 0;border:0;border-radius:0;background:transparent;box-shadow:none;color:var(--nd-ink);font-size:16px;outline:none}
#notification-drawer .nd-search input:focus-visible {outline:none}
#notification-drawer .nd-search input::placeholder {color:var(--nd-muted)}
#notification-drawer .nd-filters {display:flex;align-items:center;flex-wrap:wrap;gap:4px;margin-top:7px}
#notification-drawer :is(.nd-unread,.nd-clear) {display:inline-flex;align-items:center;gap:7px;min-height:44px;margin:0;padding:7px 10px;border:0;border-radius:16px;background:transparent;color:var(--nd-muted);font-size:12px}
#notification-drawer .nd-unread i {width:6px;height:6px;border-radius:50%;background:var(--erp-chart-lilac,#a793c6)}
#notification-drawer .nd-unread[aria-pressed="true"] {background:var(--nd-lilac);color:var(--nd-ink)}
#notification-drawer .nd-unread>span {font-variant-numeric:tabular-nums}
#notification-drawer .nd-clear {margin-left:auto;font-size:11px}
#notification-drawer .nd-clear svg {width:12px;height:12px}
#notification-drawer .nd-results {flex:1;min-height:90px;overflow:auto;overscroll-behavior:contain;padding:0 18px 12px;scrollbar-width:thin;scrollbar-color:var(--nd-line) transparent}
#notification-drawer .nd-result-count {margin:0 4px 8px;color:var(--nd-muted);font-size:11px;line-height:1.4}
#notification-drawer .nd-result-count:empty {display:none}
#notification-drawer .nd-items {display:grid;gap:7px;min-width:0}
#notification-drawer .nd-item {display:grid;grid-template-columns:34px minmax(0,1fr) 16px;align-items:start;gap:10px;width:100%;min-width:0;margin:0;padding:14px 12px;border:1px solid var(--nd-line);border-radius:23px;background:color-mix(in srgb,var(--nd-surface) 90%,transparent);color:var(--nd-ink);text-align:left}
#notification-drawer .nd-item[data-unread="true"] {background:var(--nd-lilac)}
#notification-drawer .nd-item:hover {border-color:color-mix(in srgb,var(--erp-chart-lilac,#a793c6) 70%,var(--nd-line))}
#notification-drawer .nd-item>svg {width:15px;height:15px;margin-top:9px;color:var(--nd-muted)}
#notification-drawer .nd-item-symbol {display:grid;place-items:center;width:34px;height:34px;border:1px solid color-mix(in srgb,var(--nd-ink) 10%,transparent);border-radius:50%;color:var(--nd-muted)}
#notification-drawer .nd-item[data-severity="warning"] .nd-item-symbol {color:var(--erp-warning,#a47135)}
#notification-drawer .nd-item[data-severity="critical"] .nd-item-symbol {color:var(--erp-danger,#b04d62)}
#notification-drawer .nd-item-copy {display:grid;gap:6px;min-width:0}
#notification-drawer .nd-item-top {display:flex;align-items:center;justify-content:space-between;gap:8px}
#notification-drawer .nd-item-state {min-width:0;color:var(--nd-muted);font-size:10px;line-height:1.4}
#notification-drawer .nd-unread-dot {width:6px;height:6px;flex:none;border-radius:50%;background:var(--erp-chart-lilac,#a793c6)}
#notification-drawer .nd-item strong {font-size:14px;font-weight:550;line-height:1.35;overflow-wrap:anywhere}
#notification-drawer .nd-item-body {display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;font-size:12px;line-height:1.45;color:var(--nd-muted);overflow-wrap:anywhere}
#notification-drawer .nd-item-meta {display:flex;flex-wrap:wrap;gap:4px 9px;color:var(--nd-muted);font-size:10px;line-height:1.4;overflow-wrap:anywhere}
#notification-drawer .nd-item-meta time {flex-basis:100%}
#notification-drawer .nd-state {display:flex;flex-direction:column;align-items:center;gap:10px;padding:24px 14px;text-align:center;color:var(--nd-muted)}
#notification-drawer .nd-state>svg {width:26px;height:26px}
#notification-drawer .nd-state strong {font-size:15px;line-height:1.4;font-weight:500;color:var(--nd-ink)}
#notification-drawer .nd-state p {margin:0;max-width:280px;font-size:12px;line-height:1.5}
#notification-drawer .nd-state button {min-height:44px;padding:8px 16px;border:1px solid var(--nd-line);border-radius:22px;background:var(--nd-surface);color:var(--nd-ink);font-size:12px}
#notification-drawer .nd-action-error {margin:0;padding:10px 12px;border-radius:14px;background:var(--nd-warm);font-size:12px;line-height:1.4;color:var(--nd-ink)}
#notification-drawer .nd-loading {width:22px;height:22px;border:2px solid var(--nd-line);border-top-color:var(--erp-chart-lilac,#a793c6);border-radius:50%;animation:nd-spin .8s linear infinite}
#notification-drawer .nd-categories {flex:none;padding:12px 22px 14px;border-top:1px solid var(--nd-line)}
#notification-drawer .nd-category-heading {display:flex;justify-content:space-between;gap:8px;margin:0 0 9px;color:var(--nd-muted);font-size:11px;line-height:1.4}
#notification-drawer .nd-category-heading small {font-size:10px}
#notification-drawer .nd-category-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
#notification-drawer .nd-category {display:flex;flex-direction:column;justify-content:space-between;gap:8px;min-width:0;min-height:82px;padding:11px 12px;border:1px solid var(--nd-line);border-radius:20px;background:var(--nd-lilac);color:var(--nd-ink);text-align:left}
#notification-drawer .nd-category:nth-child(2n) {background:var(--nd-warm)}
#notification-drawer .nd-category>span {display:flex;align-items:center;gap:7px;font-size:12px;line-height:1.35;overflow-wrap:anywhere}
#notification-drawer .nd-category svg {width:15px;height:15px}
#notification-drawer .nd-category>strong {align-self:flex-end;font-size:25px;font-weight:500;line-height:1;letter-spacing:-.5px;font-variant-numeric:tabular-nums}
#notification-drawer .nd-category[aria-pressed="true"] {border-color:var(--erp-chart-lilac,#a793c6);box-shadow:inset 0 0 0 1px var(--erp-chart-lilac,#a793c6)}
#notification-drawer .nd-footer {display:flex;align-items:center;gap:9px;flex:none;padding:12px 22px max(16px,env(safe-area-inset-bottom));border-top:1px solid var(--nd-line)}
#notification-drawer .nd-open-page {display:flex;align-items:center;justify-content:space-between;gap:10px;flex:1;min-width:0;min-height:44px;padding:10px 15px;border:1px solid var(--nd-line);border-radius:24px;background:var(--nd-ink);color:var(--nd-surface);font-size:13px}
@keyframes nd-spin {to {transform:rotate(360deg)}}
@media(max-width:480px) {
  #notification-drawer.notification-drawer {inset:8px 8px 8px auto;width:calc(100vw - 16px);max-width:calc(100vw - 16px);height:calc(100dvh - 16px);max-height:calc(100dvh - 16px);border-radius:27px}
  #notification-drawer .nd-heading {padding:20px 16px 12px}
  #notification-drawer .nd-controls {padding-inline:16px}
  #notification-drawer .nd-results {padding-inline:12px}
  #notification-drawer .nd-categories {padding:10px 16px 12px}
  #notification-drawer .nd-footer {padding-inline:16px}
}
@media(max-height:660px) {
  #notification-drawer .nd-heading {padding-top:14px;padding-bottom:8px}
  #notification-drawer .nd-eyebrow {display:none}
  #notification-drawer h2 {font-size:23px;margin-top:2px}
  #notification-drawer .nd-controls {padding-bottom:4px}
  #notification-drawer .nd-categories {padding-top:8px;padding-bottom:8px}
  #notification-drawer .nd-category {flex-direction:row;align-items:center;gap:5px;min-height:48px;padding:8px 10px;border-radius:16px}
  #notification-drawer .nd-category svg {display:none}
  #notification-drawer .nd-category>strong {align-self:auto;font-size:21px}
  #notification-drawer .nd-footer {padding-top:8px;padding-bottom:max(8px,env(safe-area-inset-bottom))}
}
@media(max-height:480px) {
  #notification-drawer.notification-drawer {overflow:auto}
  #notification-drawer .nd-results {flex:none;min-height:140px;max-height:240px}
}
@media(prefers-reduced-motion:reduce) {
  #notification-drawer .nd-loading {animation:none}
}
