/* notifications.css — 通知中心样式 */

/* ─── 铃铛按钮（侧边栏底部）────────────────────────────── */
.notif-bell-wrap {
  position: relative;
  margin-bottom: 8px;
}
.notif-bell {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px 14px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  transition: background .2s;
}
.notif-bell:hover {
  background: var(--bg-hover);
}
.notif-bell .bell-icon {
  font-size: 18px;
}
.notif-bell .bell-label {
  flex: 1;
  text-align: left;
}
.notif-bell .bell-badge {
  background: var(--red);
  color: #fff;
  font-size: 11px;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  border-radius: 9px;
  padding: 0 5px;
  font-weight: 600;
}
.notif-bell .bell-badge:empty,
.notif-bell .bell-badge[data-count="0"] {
  display: none;
}

/* ─── 通知下拉面板 ──────────────────────────────────── */
.notif-dropdown-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 4999;
  display: none;
}
.notif-dropdown-backdrop.show {
  display: block;
}
.notif-dropdown {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 420px;
  max-height: 520px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.25);
  z-index: 5000;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.notif-dropdown.show {
  display: flex;
}
.notif-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 14px;
}
.notif-dropdown-header .ndh-actions {
  display: flex;
  gap: 8px;
}
.notif-dropdown-header .ndh-btn {
  background: none;
  border: none;
  color: var(--link);
  cursor: pointer;
  font-size: 12px;
  padding: 2px 6px;
}
.notif-dropdown-header .ndh-btn:hover {
  text-decoration: underline;
}
.notif-dropdown-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
}
.notif-dropdown-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}
.notif-item {
  display: flex;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background .15s;
  text-decoration: none;
  color: var(--text);
}
.notif-item:hover {
  background: var(--bg-hover);
}
.notif-item.unread {
  background: var(--bg-highlight);
}
.notif-item .ni-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}
.notif-item .ni-content {
  flex: 1;
  min-width: 0;
}
.notif-item .ni-title {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notif-item .ni-body {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.notif-item .ni-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}
.notif-item .ni-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  flex-shrink: 0;
  margin-top: 6px;
}

/* ─── 通知中心页面 ──────────────────────────────────── */
.page-notifications {
  padding: 16px 24px 32px;
}
.notif-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.notif-page-header h2 {
  font-size: 18px;
  margin: 0;
}
.notif-page-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.notif-page-tabs .npt-tab {
  padding: 6px 16px;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 20px;
  background: #fff;
  color: #333;
  cursor: pointer;
  font-size: 13px;
  transition: all .2s;
  white-space: nowrap;
}
.notif-page-tabs .npt-tab:hover {
  background: #f0f4ff;
  border-color: var(--main);
}
.notif-page-tabs .npt-tab.active {
  background: var(--main);
  color: #fff;
  border-color: var(--main);
}
.notif-page-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.notif-page-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s;
  border: 1px solid transparent;
}
.notif-page-item:hover {
  background: var(--bg-hover);
  border-color: var(--border);
}
.notif-page-item.unread {
  background: var(--bg-highlight);
  border-color: var(--border);
}
.notif-page-item .npi-marker {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
  flex-shrink: 0;
  margin-top: 7px;
}
.notif-page-item.read .npi-marker {
  visibility: hidden;
}
.notif-page-item .npi-main {
  flex: 1;
  min-width: 0;
}
.notif-page-item .npi-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}
.notif-page-item .npi-body {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}
.notif-page-item .npi-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}
.notif-page-item .npi-type {
  font-size: 18px;
  flex-shrink: 0;
}
.notif-page-loading {
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
}

/* ─── 审批钩子管理页面 ───────────────────────────────── */
.page-audit-hooks {
  padding: 16px 24px 32px;
}
.audit-hooks-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.audit-hooks-table th,
.audit-hooks-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.audit-hooks-table th {
  background: var(--bg-secondary);
  font-weight: 600;
  font-size: 12px;
  color: var(--text-muted);
}
.audit-hooks-table select {
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 12px;
}
