.app-shell__notify {
  position: fixed;
  z-index: 40;
  bottom: 96px;
  left: 12px;
  width: min(360px, calc(100vw - 24px));
  max-height: min(480px, calc(100vh - 120px));
  overflow: auto;
  background: var(--b24-surface, #fff);
  border: 1px solid var(--b24-border-soft, #e4e4e0);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  padding: 8px;
}

.app-shell__notify[hidden] {
  display: none !important;
}

.app-shell__notify-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 4px 6px 8px;
  font-weight: 650;
}

.app-shell__notify-foot {
  padding: 10px 6px 4px;
  border-top: 1px solid var(--b24-border-soft, #e4e4e0);
  margin-top: 6px;
}

.app-shell__notify-all {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: #1d4f91;
  padding: 6px 4px;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  text-align: center;
}

.app-shell__notify-item {
  padding: 8px;
  border-radius: 8px;
}

.app-shell__notify-item.is-unread {
  background: #f4f7fb;
}

.app-shell__notify-item + .app-shell__notify-item {
  margin-top: 4px;
}

.app-shell__notify-title {
  font-weight: 650;
}

.app-shell__notify-body {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.4;
  color: #4a4a52;
}

.app-shell__notify-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 6px;
}

.app-shell__notify-links button,
.app-shell__notify-action {
  border: 0;
  background: transparent;
  color: #1d4f91;
  padding: 0;
  cursor: pointer;
  font: inherit;
}

.app-shell__notify-action {
  margin-top: 8px;
  border: 1px solid #c5d4ea;
  border-radius: 8px;
  padding: 4px 10px;
  background: var(--b24-surface, #fff);
}

.app-shell__notify-head .app-shell__notify-action {
  margin-top: 0;
}

/* ——— страница /notifications ——— */

html:has(.nf-page),
html:has(.nf-page) body {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

html.is-shell-embed .nf-page,
html.is-shell-embed body .nf-page {
  margin-left: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

.nf-page {
  margin-left: var(--shell-w, 248px);
  height: 100vh;
  height: 100dvh;
  overflow: auto;
  background: var(--b24-bg, #f6f6f3);
  color: var(--b24-text, #19191c);
  font-family: Inter, "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  box-sizing: border-box;
}

#nf-root {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 28px 24px 40px;
  box-sizing: border-box;
}

.nf-card {
  padding: 22px 24px 20px;
  border: 1px solid var(--b24-border-soft, #e4e4df);
  border-radius: 12px;
  background: var(--b24-surface, #fff);
}

.nf-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 8px;
}

.nf-card h1 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.nf-lead {
  margin: 0;
  color: #64646d;
  font-size: 14px;
  line-height: 1.45;
}

.nf-read-all {
  flex-shrink: 0;
  border: 1px solid #c5d4ea;
  border-radius: 8px;
  padding: 6px 12px;
  background: var(--b24-surface, #fff);
  color: #1d4f91;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
}

.nf-read-all:disabled {
  opacity: 0.45;
  cursor: default;
}

.nf-list {
  margin-top: 12px;
}

.nf-item {
  padding: 14px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
}

.nf-item.is-unread {
  background: #f4f7fb;
  border-color: #e4ebf5;
}

.nf-item + .nf-item {
  margin-top: 6px;
}

.nf-item__when {
  margin-bottom: 6px;
  font-size: 12px;
  color: #7a7a84;
}

.nf-item .app-shell__notify-title {
  font-size: 15px;
}

.nf-item .app-shell__notify-body {
  font-size: 14px;
}

.nf-empty {
  margin: 24px 0 8px;
  color: #64646d;
  font-size: 14px;
}

html.is-theme-nocturne .app-shell__notify,
html.is-theme-nocturne .nf-card {
  background: var(--noct-surface, #16181d);
  border-color: var(--noct-divider, #2a2e36);
  color: var(--noct-text, #f2f2f0);
}

html.is-theme-nocturne .nf-page {
  background: var(--noct-bg, #0f1115);
  color: var(--noct-text, #f2f2f0);
}

html.is-theme-nocturne .app-shell__notify-item.is-unread,
html.is-theme-nocturne .nf-item.is-unread {
  background: var(--noct-header, #1c1f28);
  border-color: var(--noct-divider, #2a2e36);
}

html.is-theme-nocturne .app-shell__notify-links button,
html.is-theme-nocturne .app-shell__notify-action,
html.is-theme-nocturne .app-shell__notify-all,
html.is-theme-nocturne .nf-read-all {
  color: var(--noct-accent-2, #8ab4f8);
}

html.is-theme-nocturne .app-shell__notify-action,
html.is-theme-nocturne .nf-read-all {
  background: var(--noct-card, #1a1d24);
  border-color: var(--noct-divider, #2a2e36);
}

html.is-theme-nocturne .app-shell__notify-foot {
  border-color: var(--noct-divider, #2a2e36);
}

html.is-theme-nocturne .app-shell__notify-body,
html.is-theme-nocturne .nf-lead,
html.is-theme-nocturne .nf-empty,
html.is-theme-nocturne .nf-item__when {
  color: var(--noct-muted, #a0a4ae);
}
