/* —— 通知/待办 —— */
#module-view:has(.notify-hub-page),
.content:has(.notify-hub-page) {
  padding: 0;
  width: 100%;
  background: #f0f2f5;
}

.notify-hub-page {
  display: flex;
  min-height: calc(100vh - var(--topbar-h));
  background: #f0f2f5;
}

/* 左侧导航 */
.notify-hub-side {
  flex: 0 0 200px;
  width: 200px;
  background: #fff;
  border-right: 1px solid #e8e8e8;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--topbar-h));
}

.notify-hub-side-head {
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #262626;
  background: #fafafa;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}

.notify-hub-nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0 16px;
}

.notify-hub-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: #262626;
  font-size: 13px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    color 0.15s ease,
    background-color 0.15s ease;
}

.notify-hub-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #8c8c8c;
  transition: color 0.15s ease;
}

.notify-hub-nav-label {
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notify-hub-nav-item:hover {
  background: #f5f5f5;
}

.notify-hub-nav-item:hover .notify-hub-nav-icon {
  color: #595959;
}

.notify-hub-nav-item.active {
  color: #1677ff;
  background: transparent;
}

.notify-hub-nav-item.active .notify-hub-nav-icon {
  color: #1677ff;
}

/* 右侧主区域 */
.notify-hub-main {
  flex: 1;
  min-width: 0;
  padding: 16px;
  box-sizing: border-box;
}

.notify-hub-panel {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 2px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--topbar-h) - 32px);
}

/* 筛选栏 */
.notify-hub-filter {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 16px 16px 14px;
  background: #fafafa;
  border-bottom: 1px solid #f0f0f0;
}

.notify-hub-filter-compact {
  justify-content: flex-end;
}

.notify-hub-field span {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  color: #595959;
  line-height: 1.4;
}

.notify-hub-field select {
  width: 200px;
  height: 32px;
  padding: 0 11px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-family: inherit;
  font-size: 13px;
  color: #262626;
  background: #fff;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.notify-hub-field select:hover {
  border-color: #4096ff;
}

.notify-hub-field select:focus {
  outline: none;
  border-color: #1677ff;
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);
}

.notify-hub-filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.notify-hub-filter-actions-only {
  margin-left: 0;
  width: 100%;
  justify-content: flex-end;
}

.notify-hub-btn {
  height: 32px;
  min-width: 72px;
  padding: 0 15px;
  border-radius: 4px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}

.notify-hub-btn.primary {
  border: 1px solid #1677ff;
  background: #1677ff;
  color: #fff;
}

.notify-hub-btn.primary:hover {
  background: #4096ff;
  border-color: #4096ff;
}

.notify-hub-btn.default {
  border: 1px solid #d9d9d9;
  background: #fff;
  color: #262626;
}

.notify-hub-btn.default:hover {
  color: #1677ff;
  border-color: #1677ff;
}

/* 工具栏 */
.notify-hub-toolbar {
  border-bottom: 1px solid #f0f0f0;
}

.notify-hub-help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid #d9d9d9;
  border-radius: 50%;
  background: #fff;
  color: #8c8c8c;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition:
    color 0.15s ease,
    border-color 0.15s ease;
}

.notify-hub-help-btn:hover {
  color: #1677ff;
  border-color: #1677ff;
}

.notify-hub-refresh-btn.spinning svg {
  animation: notify-refresh-spin 0.55s ease;
}

@keyframes notify-refresh-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.notify-hub-inline-search {
  min-width: 160px;
}

/* 表格 */
.notify-hub-table-wrap {
  flex: 1;
  overflow: auto;
}

.notify-hub-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.notify-hub-table thead th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 500;
  color: #8c8c8c;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
  white-space: nowrap;
}

.notify-hub-table tbody td {
  padding: 12px 16px;
  color: #262626;
  border-bottom: 1px solid #f5f5f5;
  vertical-align: middle;
}

.notify-hub-row {
  cursor: pointer;
  transition: background-color 0.12s ease;
}

.notify-hub-row:hover {
  background: #fafafa;
}

.notify-hub-empty-cell {
  text-align: center;
  color: #bfbfbf;
  padding: 48px 16px !important;
  font-size: 13px;
}

.notify-hub-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.notify-hub-status.unread {
  background: #fff7e6;
  color: #fa8c16;
}

.notify-hub-status.read {
  background: #f6ffed;
  color: #52c41a;
}

.notify-hub-status.pending {
  background: #e6f4ff;
  color: #1677ff;
}

.notify-hub-status.warn {
  background: #fff1f0;
  color: #ff4d4f;
}

.notify-hub-status.default {
  background: #f5f5f5;
  color: #595959;
}

.notify-hub-detail p {
  display: flex;
  gap: 12px;
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.6;
}

.notify-hub-detail p span {
  flex: 0 0 88px;
  color: #8c8c8c;
}

.notify-hub-detail p b {
  flex: 1;
  font-weight: 500;
  color: #262626;
}

@media (prefers-reduced-motion: reduce) {
  .notify-hub-nav-item,
  .notify-hub-row,
  .notify-hub-field select,
  .notify-hub-btn,
  .notify-hub-help-btn {
    transition: none;
  }

  .notify-hub-refresh-btn.spinning svg {
    animation: none;
  }
}

@media (max-width: 1100px) {
  .notify-hub-side {
    flex: 0 0 168px;
    width: 168px;
  }

  .notify-hub-nav-item {
    padding: 9px 12px;
    font-size: 12px;
  }
}

@media (max-width: 900px) {
  .notify-hub-page {
    flex-direction: column;
  }

  .notify-hub-side {
    flex: none;
    width: 100%;
    min-height: auto;
    border-right: none;
    border-bottom: 1px solid #e8e8e8;
  }

  .notify-hub-nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 8px;
    gap: 4px;
  }

  .notify-hub-nav-item {
    flex: 0 0 auto;
    width: auto;
    padding: 8px 12px;
    border-radius: 4px;
    white-space: nowrap;
  }
}
