.notification-nav-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  background: #FF3B30;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.notification-nav-badge[hidden] { display: none !important; }
.sidebar .nav button.has-notification-badge { display: flex; align-items: center; gap: 8px; }

.notification-severity,
.notification-audience,
.notification-pin {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 800;
  white-space: nowrap;
}

.notification-severity-normal { background: rgba(52,199,89,.12); color: #1f7a37; }
.notification-severity-notice { background: rgba(255,204,0,.18); color: #795f00; }
.notification-severity-urgent { background: rgba(255,59,48,.12); color: #b42318; }
.notification-audience { background: rgba(0,122,255,.1); color: #075fae; }
.notification-pin { background: rgba(88,86,214,.1); color: #4e4bb0; }

.notification-reader-toolbar,
.notification-admin-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.notification-filter-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
}

.notification-filter-tabs button {
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #667085;
  padding: 8px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.notification-filter-tabs button.active {
  background: #eef5ff;
  color: #007AFF;
}

.notification-sort-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  font-size: 13px;
  color: #667085;
}

.notification-sort-label .select { min-width: 145px; }
.notification-section { margin-top: 22px; }

.notification-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.notification-section-head h3 { margin: 0; font-size: 16px; }
.notification-section-head > span { color: #98a2b3; font-size: 12px; font-weight: 700; }
.notification-card-list { display: grid; gap: 10px; }

.notification-card {
  position: relative;
  border: 1px solid #e6eaf0;
  border-left-width: 4px;
  border-radius: 14px;
  background: #fff;
  padding: 15px 16px;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.notification-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(16,24,40,.07);
}

.notification-card.is-unread { background: #f9fbff; }
.notification-card.is-unread h3 { font-weight: 800; }
.notification-card.is-read { opacity: .9; }
.notification-level-normal { border-left-color: #34C759; }
.notification-level-notice { border-left-color: #FFCC00; }
.notification-level-urgent { border-left-color: #FF3B30; }

.notification-card-top,
.notification-card-flags,
.notification-card-foot,
.notification-detail-flags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.notification-card-top { justify-content: space-between; }
.notification-unread-dot { width: 9px; height: 9px; border-radius: 50%; background: #007AFF; flex: 0 0 auto; }
.notification-card h3 { margin: 9px 0 4px; font-size: 16px; color: #101828; }
.notification-meta { color: #667085; font-size: 12px; }
.notification-card p { margin: 9px 0 12px; color: #475467; line-height: 1.5; font-size: 14px; }
.notification-card-foot { justify-content: space-between; color: #98a2b3; font-size: 12px; }
.notification-card-foot strong { color: #007AFF; }

.notification-admin-toolbar .select { min-width: 170px; }
.notification-admin-table td:first-child { width: 36px; text-align: center; }
.notification-admin-table td:nth-child(3) { min-width: 280px; max-width: 430px; }
.notification-admin-actions { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.notification-delete-btn { color: #FF3B30 !important; }

.notification-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.notification-pin-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 2px;
  font-size: 14px;
  font-weight: 700;
  color: #344054;
}

.notification-pin-toggle input { width: 18px; height: 18px; accent-color: #007AFF; }
.notification-editor-field { margin-top: 8px; }

.notification-editor-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  padding: 8px;
  border: 1px solid #d8dee8;
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  background: #f8fafc;
}

.notification-editor-toolbar button {
  border: 1px solid #d8dee8;
  border-radius: 7px;
  background: #fff;
  color: #344054;
  min-height: 32px;
  padding: 5px 8px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.notification-editor-toolbar button:hover { border-color: #007AFF; color: #007AFF; }
.notification-editor-toolbar button.is-active {
  border-color: #007AFF;
  background: rgba(0,122,255,.10);
  color: #007AFF;
  box-shadow: inset 0 0 0 1px rgba(0,122,255,.08);
}
.notification-editor-toolbar button:focus-visible {
  outline: 2px solid rgba(0,122,255,.35);
  outline-offset: 1px;
}
.notification-editor {
  min-height: 230px;
  max-height: 430px;
  overflow: auto;
  border: 1px solid #d8dee8;
  border-radius: 0 0 12px 12px;
  background: #fff;
  padding: 14px;
  outline: none;
  color: #101828;
  line-height: 1.65;
}

.notification-editor:focus { border-color: #007AFF; box-shadow: 0 0 0 3px rgba(0,122,255,.09); }
.notification-editor p { margin: 7px 0; }
.notification-editor h2,
.notification-editor h3 { margin: 12px 0 7px; line-height: 1.35; color: #101828; }
.notification-editor h3 { font-size: 18px; }
.notification-editor ul,
.notification-editor ol,
.notification-form-preview ul,
.notification-form-preview ol,
.notification-rich-content ul,
.notification-rich-content ol { margin: 8px 0; padding-left: 26px; }
.notification-editor li,
.notification-form-preview li,
.notification-rich-content li { margin: 4px 0; }
.notification-editor a { color: #007AFF; text-decoration: underline; }
.notification-editor-help { margin-top: 6px; }
.notification-form-preview {
  margin-top: 14px;
  padding: 16px;
  border: 1px dashed #98a2b3;
  border-radius: 12px;
  background: #fbfcfe;
}
.notification-form-preview[hidden] { display: none; }

.notification-detail {
  border-left: 4px solid #34C759;
  padding-left: 16px;
}
.notification-detail.notification-level-notice { border-left-color: #FFCC00; }
.notification-detail.notification-level-urgent { border-left-color: #FF3B30; }
.notification-detail h2 { margin: 10px 0 5px; font-size: 22px; line-height: 1.3; }
.notification-rich-content { margin-top: 18px; line-height: 1.7; color: #344054; overflow-wrap: anywhere; }
.notification-rich-content h2,
.notification-rich-content h3 { margin: 18px 0 8px; color: #101828; }
.notification-rich-content p { margin: 8px 0; }
.notification-rich-content blockquote { margin: 12px 0; padding: 8px 12px; border-left: 3px solid #cbd5e1; background: #f8fafc; }
.notification-rich-content a { color: #007AFF; text-decoration: underline; }
.notification-detail-author { margin-top: 22px; padding-top: 12px; border-top: 1px solid #eaecf0; }

.notification-dashboard { margin-bottom: 18px; }
.notification-dashboard-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.notification-dashboard-head h3 { margin: 0 0 3px; }
.notification-dashboard-list { display: grid; gap: 6px; }
.notification-dashboard-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: #f8fafc;
  padding: 10px;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.notification-dashboard-row:hover { background: #f1f5f9; }
.notification-dashboard-row.is-unread .notification-dashboard-title { font-weight: 800; color: #101828; }
.notification-dashboard-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #344054; }
.notification-dashboard-date { color: #98a2b3; font-size: 12px; white-space: nowrap; }

@media (max-width: 760px) {
  .notification-sort-label { margin-left: 0; width: 100%; justify-content: space-between; }
  .notification-sort-label .select { flex: 1; }
  .notification-form-grid { grid-template-columns: 1fr; }
  .notification-admin-toolbar .search,
  .notification-admin-toolbar .select { width: 100%; min-width: 0; }
  .notification-dashboard-row { grid-template-columns: auto minmax(0, 1fr); }
  .notification-dashboard-date { grid-column: 2; }
  .notification-card-foot { align-items: flex-end; }
}
