.notification-page {
  padding-bottom: 24px;
}

.notification-back-link {
  position: relative;
  z-index: 2;
}

.notification-hero,
.notification-post,
.notification-widget {
  border: 1px solid var(--border-default);
  border-radius: 24px;
  background: var(--bg-surface);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.notification-hero .card-body,
.notification-post .card-body,
.notification-widget .card-body {
  padding: 22px;
}

.notification-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.notification-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .2px;
}

.notification-title {
  margin: 14px 0 10px;
  color: var(--text-primary);
  font-size: clamp(1.7rem, calc(1.25rem + 1.4vw), 2.6rem);
  font-weight: 800;
  line-height: 1.1;
}

.notification-desc {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.75;
  max-width: 72ch;
}

.notification-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  height: 100%;
}

.notification-summary-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface2);
  display: grid;
  gap: 8px;
}

.notification-summary-card strong {
  color: var(--text-primary);
  font-size: 26px;
  line-height: 1;
  font-weight: 800;
}

.notification-summary-card span {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
}

.notification-compose {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
  display: grid;
  gap: 10px;
}

.notification-editor-shell {
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  background: var(--bg-surface2);
  overflow: hidden;
}

.notification-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(148, 163, 184, 0.08);
}

.notification-editor-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .16s ease;
}

.notification-editor-btn:hover,
.notification-editor-btn:focus {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.notification-editor-sep {
  width: 1px;
  align-self: stretch;
  background: var(--border-subtle);
  margin: 0 2px;
}

.notification-editor {
  min-height: 190px;
  padding: 16px;
  background: var(--bg-surface2);
  color: var(--text-primary);
  outline: none;
  line-height: 1.8;
  white-space: pre-wrap;
}

.notification-editor:empty:before {
  content: attr(data-placeholder);
  color: var(--text-muted);
}

.notification-editor strong {
  font-weight: 800;
}

.notification-editor em {
  font-style: italic;
}

.notification-editor u {
  text-decoration: underline;
}

.notification-editor ul,
.notification-editor ol {
  padding-left: 1.4rem;
  margin-bottom: 0;
}

.notification-editor a {
  color: var(--accent);
  text-decoration: underline;
}

.notification-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: start;
  margin-top: 20px;
}

.notification-feed {
  display: grid;
  gap: 16px;
}

.notification-post {
  position: relative;
}

.notification-post-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.notification-author {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.notification-avatar {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface2);
}

.notification-author-name {
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
}

.notification-author-meta {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 2px;
}

.notification-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.18);
  background: rgba(59, 130, 246, 0.08);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  flex: 0 0 auto;
}

.notification-content {
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.8;
  word-break: break-word;
  white-space: pre-wrap;
}

.notification-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
}

.notification-actions form {
  width: 100%;
  margin: 0;
}

.notification-action {
  width: 100%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface2);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 13px;
  appearance: none;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, color .16s ease;
}

.notification-action:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  color: var(--accent);
}

.notification-action b {
  font-weight: 800;
}

.notification-compose-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.notification-sidebar {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 16px;
}

.notification-widget-title {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 12px;
}

.notification-rule-list {
  display: grid;
  gap: 10px;
}

.notification-rule-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.7;
}

.notification-rule-item i {
  color: var(--accent);
  margin-top: 3px;
}

.notification-empty {
  padding: 20px;
  border-radius: 18px;
  border: 1px dashed var(--border-subtle);
  color: var(--text-muted);
  background: var(--bg-surface);
}

[data-theme="dark"] .notification-badge {
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(96, 165, 250, 0.24);
}

[data-theme="dark"] .notification-editor-toolbar {
  background: rgba(15, 23, 42, 0.35);
}

[data-theme="dark"] .notification-editor,
[data-theme="dark"] .notification-editor-btn {
  background: #0f172a;
}

[data-theme="dark"] .notification-action:hover {
  color: #dbeafe;
}

@media (max-width: 1199.98px) {
  .notification-hero-grid,
  .notification-layout {
    grid-template-columns: 1fr;
  }

  .notification-sidebar {
    position: static;
  }
}

@media (max-width: 767.98px) {
  .notification-back-link {
    margin-top: 10px;
    margin-bottom: 12px !important;
  }

  .notification-hero .card-body,
  .notification-post .card-body,
  .notification-widget .card-body {
    padding: 16px;
  }

  .notification-summary {
    grid-template-columns: 1fr;
  }

  .notification-actions {
    grid-template-columns: 1fr;
  }

  .notification-compose-footer {
    flex-direction: column;
    align-items: stretch;
  }
}
