/* ============================================================
   Datamart — DS.NotifBell / DS.NotifPanel — persistent inbox.
   The "bell" in the top bar: a simple inbox of notifications that
   PERSIST (unlike toasts). For things the user should review later
   or didn't directly trigger: assignments, scheduled events /
   reminders, async completions, team activity, system/account.
   Calm, sentence-case, normal weight, icons without tile.
   Pairs with _ds/notifications.js. Load AFTER colors_and_type.css.
   ============================================================ */

/* bell + unread badge (sits on a gbar .icobtn) */
.nbell { position: relative; }
/* Odznak sedí v ROHU ikony a nesmí ji přerůst. `content-box` + top/right 2px dělalo
   z odznaku 28×20 na 32px tlačítku — u dvouznakového „9+" zakryl 83 % zvonku a zbyl
   z něj vykukující oblouček, což čte jako rozbitý prvek, ne jako počet. `border-box`
   drží 16×16 včetně rámečku a padding roste jen s obsahem; záporný posun ho vysune
   na roh, takže z ikony ukrajuje ~20 % (běžný překryv odznaku). */
.nbell-badge { position: absolute; top: calc(-1 * var(--sp-0)); right: calc(-1 * var(--sp-0)); min-width: 16px; height: 16px; padding: 0 var(--sp-0); border-radius: var(--radius-pill); background: var(--accent); color: #fff; font: 600 9px var(--font-display); display: grid; place-items: center; border: 2px solid var(--bg-canvas); box-sizing: border-box; pointer-events: none; }

/* panel (popover) */
.npanel { width: 400px; max-width: calc(100vw - 24px); display: flex; flex-direction: column; background: var(--surface-100); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-pop); overflow: hidden; }
[data-theme="dark"] .npanel { background: var(--surface-50); }
.npanel-head { flex: none; display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4) var(--sp-3) var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--border); }
.npanel-title { font: 600 14px var(--font-display); color: var(--ink-900); letter-spacing: -0.01em; }
.npanel-count { font: 600 11px var(--font-mono); color: var(--accent-ink); background: var(--accent-tint); border-radius: var(--radius-pill); padding: 1px var(--sp-2); }
.npanel-actions { margin-left: auto; display: inline-flex; align-items: center; gap: var(--sp-0); }
.npanel-link { border: 0; background: transparent; font: 500 12px var(--font-sans); color: var(--accent); cursor: pointer; padding: var(--sp-2) var(--sp-3); border-radius: var(--radius-sm); white-space: nowrap; }
.npanel-link:hover { background: var(--accent-tint); }
.npanel-ico { width: 28px; height: 28px; border-radius: var(--radius-sm); display: grid; place-items: center; border: 0; background: transparent; color: var(--fg-muted); cursor: pointer; }
.npanel-ico:hover { background: var(--hover-surface); color: var(--fg); }
.npanel-ico .ti { font-size: 16px; }

/* filter tabs */
.npanel-tabs { flex: none; display: flex; gap: var(--sp-1); padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--border); }
.npanel-tab { border: 0; background: transparent; font: 500 12px var(--font-sans); color: var(--fg-secondary); padding: var(--sp-2) var(--sp-4); border-radius: var(--radius-pill); cursor: pointer; }
.npanel-tab:hover { background: var(--hover-surface); color: var(--ink-900); }
.npanel-tab.active { background: var(--active-surface); color: var(--ink-900); }
.npanel-tab .n { font: 600 10px var(--font-mono); color: var(--fg-muted); margin-left: var(--sp-2); }
.npanel-tab.active .n { color: var(--accent-ink); }

/* list + groups */
.npanel-body { flex: 1; min-height: 0; max-height: 452px; overflow-y: auto; }
.ngroup-label { padding: var(--sp-4) var(--sp-5) var(--sp-2); font: 600 11px var(--font-sans); color: var(--fg-muted); letter-spacing: 0.02em; }

/* a notification row */
.nitem { display: flex; gap: var(--sp-4); padding: var(--sp-4) var(--sp-4) var(--sp-4) var(--sp-5); cursor: pointer; border-bottom: 1px solid var(--border); }
.nitem:last-child { border-bottom: 0; }
.nitem:hover { background: var(--hover-surface); }
.nitem.unread { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.nitem.unread:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }

/* leading: actor avatar OR bare category icon (no tile) */
.nitem-lead { flex: none; width: 30px; height: 30px; display: grid; place-items: center; }
.nitem-av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 600 11px var(--font-display); color: hsl(var(--av-hue) 52% 42%); background: var(--surface-75); border: 1.5px solid hsl(var(--av-hue) 62% 60%); }
.nitem-lead .ti { font-size: 21px; }

.nitem-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.nitem-t { font: 400 13px/1.45 var(--font-sans); color: var(--ink-900); }
.nitem-t .who { font-weight: 500; }
.nitem-t .obj { color: var(--accent-ink); }
.nitem.read .nitem-t { color: var(--fg-secondary); }
.nitem.read .nitem-t .who, .nitem.read .nitem-t .obj { color: var(--fg-secondary); font-weight: 400; }
.nitem-meta { display: inline-flex; align-items: center; gap: var(--sp-3); font: 400 11px var(--font-sans); color: var(--fg-muted); }
.nitem-meta .dotsep { width: 2px; height: 2px; border-radius: 50%; background: var(--fg-muted); }
.nitem-link { border: 0; background: transparent; padding: 0; font: 600 11px var(--font-sans); color: var(--accent); cursor: pointer; }
.nitem-link:hover { text-decoration: underline; }

/* right: unread dot */
.nitem-dot { flex: none; align-self: center; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* footer */
.npanel-foot { flex: none; border-top: 1px solid var(--border); padding: var(--sp-2); }
.npanel-foot .all { width: 100%; height: 34px; border: 0; background: transparent; border-radius: var(--radius-md); font: 600 12px var(--font-display); color: var(--accent); cursor: pointer; }
.npanel-foot .all:hover { background: var(--accent-tint); }

/* empty inbox (bare icon, no tile) */
.npanel-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--sp-1); padding: var(--sp-7) var(--sp-6); }
.npanel-empty .ti { font-size: 28px; color: var(--fg-muted); margin-bottom: var(--sp-1); }
.npanel-empty .t { font: var(--h3); color: var(--ink-900); }
.npanel-empty .s { font: 400 12px/1.5 var(--font-sans); color: var(--fg-secondary); max-width: 240px; }
