/* notifications.css — full-page inbox + slide-out panel */

/* ── Full-page inbox ───────────────────────────────────────── */
.nf-page {
  flex: 1; display: grid; grid-template-columns: 240px 1fr;
  background: var(--surface-1);
  min-height: 0; overflow: hidden;
}

/* left rail */
.nf-rail {
  background: white;
  border-right: 1px solid var(--divider);
  padding: 20px 12px;
  display: flex; flex-direction: column; gap: 4px;
  overflow-y: auto;
}
.nf-rail-header {
  padding: 0 10px 12px;
  display: flex; align-items: center; justify-content: space-between;
}
.nf-rail-title { font-size: 18px; font-weight: 700; color: var(--ink-1); letter-spacing: -0.01em; }
.nf-rail-mark {
  font-size: 11px; color: var(--ink-muted); font-weight: 600;
  background: none; border: none; cursor: pointer; padding: 4px 6px; border-radius: 4px;
}
.nf-rail-mark:hover { background: var(--surface-1); color: var(--ink-1); }

.nf-rail-section {
  font-size: 10px; color: var(--ink-muted); font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  padding: 12px 10px 6px;
}
.nf-rail-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 13px; font-weight: 500; color: var(--ink-1);
  cursor: pointer;
  transition: background .1s ease;
}
.nf-rail-item:hover { background: var(--surface-1); }
.nf-rail-item.is-active { background: color-mix(in oklab, var(--brand) 10%, white); color: var(--brand); font-weight: 600; }
.nf-rail-item.is-active .nf-rail-icon { color: var(--brand); }
.nf-rail-icon { color: var(--ink-muted); flex-shrink: 0; }
.nf-rail-count {
  margin-left: auto;
  font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
  background: var(--surface-1);
  padding: 2px 7px; border-radius: 999px; min-width: 20px; text-align: center;
}
.nf-rail-item.is-active .nf-rail-count { background: color-mix(in oklab, var(--brand) 18%, white); color: var(--brand); }
.nf-rail-count.is-unread { background: var(--danger); color: white; }

/* main column */
.nf-main {
  display: flex; flex-direction: column;
  min-width: 0; overflow: hidden;
}
.nf-head {
  padding: 18px 28px 14px;
  background: white;
  border-bottom: 1px solid var(--divider);
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
}
.nf-head-title { font-size: 20px; font-weight: 700; color: var(--ink-1); letter-spacing: -0.012em; }
.nf-head-sub   { font-size: 12px; color: var(--ink-muted); margin-top: 2px; font-weight: 500; }
.nf-head-filter {
  display: inline-flex; background: var(--surface-1); border: 1px solid var(--divider);
  border-radius: 7px; padding: 3px;
}
.nf-head-filter button {
  padding: 5px 11px; font-size: 12px; font-weight: 600; color: var(--ink-muted);
  background: none; border: none; border-radius: 4px; cursor: pointer;
}
.nf-head-filter button.is-active { background: white; color: var(--ink-1); box-shadow: 0 1px 2px rgba(0,0,0,.06); }

.nf-feed {
  flex: 1; overflow-y: auto;
  padding: 4px 0 24px;
}

.nf-day-header {
  padding: 18px 28px 8px;
  font-size: 11px; color: var(--ink-muted); font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  position: sticky; top: 0;
  background: linear-gradient(180deg, var(--surface-1) 70%, transparent);
  z-index: 1;
}

/* card */
.nf-card {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 12px;
  padding: 14px 28px 14px 20px;
  background: white;
  border-bottom: 1px solid var(--divider);
  cursor: pointer;
  position: relative;
  transition: background .12s ease;
}
.nf-card:hover { background: color-mix(in oklab, var(--surface-1) 40%, white); }
.nf-card.is-unread { background: color-mix(in oklab, var(--brand) 4%, white); }
.nf-card.is-unread::before {
  content: ""; position: absolute; left: 8px; top: 20px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--brand);
}

.nf-card-avatar {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: white;
}
.nf-card-avatar.type-icon { background: var(--nf-icon-bg, #676879); }
.nf-card-avatar.type-icon svg { width: 18px; height: 18px; }

.nf-card-body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.nf-card-meta {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 11.5px;
}
.nf-type-chip {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 7px; border-radius: 4px;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--nf-chip-color, var(--ink-muted));
  background: var(--nf-chip-bg, var(--surface-1));
}
.nf-actor { font-weight: 600; color: var(--ink-1); font-size: 12px; }
.nf-project {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--ink-muted); font-weight: 500; font-size: 11.5px;
}
.nf-project-dot { width: 8px; height: 8px; border-radius: 2px; }
.nf-dot-sep { color: var(--ink-muted); }

.nf-subject {
  font-size: 14px; font-weight: 600; color: var(--ink-1); letter-spacing: -0.005em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nf-subject-id {
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 11px; font-weight: 700;
  color: var(--ink-muted);
  padding: 1px 5px; border-radius: 3px; background: var(--surface-1);
  margin-right: 6px;
}

.nf-message {
  font-size: 12.5px; color: var(--ink-2); line-height: 1.45; font-weight: 500;
  overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.nf-message strong { color: var(--ink-1); font-weight: 700; }

.nf-card-right {
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
  flex-shrink: 0;
}
.nf-time { font-size: 11px; color: var(--ink-muted); font-weight: 500; white-space: nowrap; }
.nf-cta {
  padding: 4px 10px;
  background: white; color: var(--ink-1);
  border: 1px solid var(--divider); border-radius: 5px;
  font-size: 11.5px; font-weight: 600;
  cursor: pointer;
  opacity: 0;
  transition: opacity .12s ease;
  font-family: inherit;
}
.nf-card:hover .nf-cta { opacity: 1; }
.nf-cta:hover { background: var(--ink-1); color: white; border-color: var(--ink-1); }

/* empty */
.nf-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 80px 20px; color: var(--ink-muted); font-size: 13px;
  gap: 10px;
}
.nf-empty-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--surface-1);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-muted);
}

/* ── Bell slide-out panel ──────────────────────────────────── */
.nf-panel-backdrop {
  position: fixed; inset: 0;
  z-index: 100;
  background: transparent;
}
.nf-panel {
  position: absolute;
  top: 52px; right: 16px;
  width: 380px; max-height: 600px;
  z-index: 101;
  background: white;
  border-radius: 12px;
  border: 1px solid var(--divider);
  box-shadow: 0 12px 32px rgba(16,22,40,.14), 0 28px 80px rgba(16,22,40,.08);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: nfPanelIn .15s ease-out;
  transform-origin: top right;
}
@keyframes nfPanelIn {
  from { opacity: 0; transform: scale(.97) translateY(-4px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.nf-panel-head {
  padding: 12px 14px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--divider);
}
.nf-panel-title { font-size: 14px; font-weight: 700; color: var(--ink-1); }
.nf-panel-head-actions { display: flex; gap: 6px; }
.nf-panel-head button {
  font-size: 11px; color: var(--ink-muted); font-weight: 600;
  background: none; border: none; cursor: pointer;
  padding: 4px 8px; border-radius: 4px;
}
.nf-panel-head button:hover { background: var(--surface-1); color: var(--ink-1); }

.nf-panel-tabs {
  display: flex; padding: 0 10px; gap: 2px;
  border-bottom: 1px solid var(--divider);
}
.nf-panel-tab {
  padding: 9px 10px;
  font-size: 12px; font-weight: 600; color: var(--ink-muted);
  background: none; border: none; border-bottom: 2px solid transparent;
  cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
}
.nf-panel-tab.is-active { color: var(--ink-1); border-bottom-color: var(--brand); }
.nf-panel-tab-count {
  font-size: 10px; padding: 1px 5px; border-radius: 999px;
  background: var(--surface-1); color: var(--ink-muted); font-weight: 700;
}
.nf-panel-tab.is-active .nf-panel-tab-count { background: color-mix(in oklab, var(--brand) 18%, white); color: var(--brand); }

.nf-panel-body {
  flex: 1; overflow-y: auto;
}
.nf-panel-card {
  display: grid; grid-template-columns: 28px 1fr;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--divider);
  cursor: pointer;
  position: relative;
  transition: background .12s ease;
}
.nf-panel-card:hover { background: var(--surface-1); }
.nf-panel-card.is-unread { background: color-mix(in oklab, var(--brand) 4%, white); }
.nf-panel-card.is-unread::before {
  content: ""; position: absolute; left: 5px; top: 17px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--brand);
}
.nf-panel-card-avatar {
  width: 28px; height: 28px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--nf-icon-bg, #676879); color: white; flex-shrink: 0;
}
.nf-panel-card-meta {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--ink-muted); font-weight: 500;
  margin-bottom: 2px;
}
.nf-panel-card-actor { color: var(--ink-1); font-weight: 600; }
.nf-panel-card-subject {
  font-size: 12.5px; font-weight: 600; color: var(--ink-1);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  margin-bottom: 2px;
}
.nf-panel-card-msg {
  font-size: 11.5px; color: var(--ink-2); font-weight: 500; line-height: 1.4;
  overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.nf-panel-card-msg strong { color: var(--ink-1); font-weight: 700; }

.nf-panel-foot {
  padding: 10px 14px;
  border-top: 1px solid var(--divider);
  display: flex; justify-content: center;
}
.nf-panel-foot button {
  font-size: 12px; font-weight: 600; color: var(--brand);
  background: none; border: none; cursor: pointer;
  padding: 6px 10px; border-radius: 5px;
}
.nf-panel-foot button:hover { background: color-mix(in oklab, var(--brand) 10%, white); }

/* Bell unread badge */
.nf-bell {
  position: relative;
}
.nf-bell-badge {
  position: absolute; top: 3px; right: 3px;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--danger); color: white;
  font-size: 10px; font-weight: 800; letter-spacing: -0.02em;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid white;
  font-variant-numeric: tabular-nums;
}
