:root {
  --tnd-nc-ink: #172033;
  --tnd-nc-muted: #69758b;
  --tnd-nc-border: #e4e9f1;
  --tnd-nc-canvas: #f4f6f9;
  --tnd-nc-surface: #ffffff;
  --tnd-nc-blue: #245eea;
  --tnd-nc-blue-soft: #edf3ff;
  --tnd-nc-amber: #b86805;
  --tnd-nc-red: #cc3e3e;
  --tnd-nc-green: #157f64;
  --tnd-nc-shadow: 0 14px 36px rgba(27, 39, 65, .08);
}

.tnd-notification-center {
  min-height: calc(100vh - 72px);
  padding: 28px 30px 48px;
  background: var(--tnd-nc-canvas);
  color: var(--tnd-nc-ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

.tnd-notification-center *,
.tnd-notification-center *::before,
.tnd-notification-center *::after { box-sizing: border-box; }

.tnd-nc-pagehead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  max-width: 1540px;
  margin: 0 auto 22px;
}

.tnd-nc-heading h1 { margin: 2px 0 4px; font-size: 30px; line-height: 1.2; letter-spacing: -.03em; }
.tnd-nc-heading p { margin: 0; color: var(--tnd-nc-muted); }
.tnd-nc-eyebrow { color: #8893a6; font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.tnd-nc-unread-badge { display: flex; align-items: center; gap: 7px; padding: 10px 14px; border: 1px solid #dce5f5; border-radius: 999px; background: #fff; color: var(--tnd-nc-muted); box-shadow: 0 5px 18px rgba(31, 47, 79, .05); }
.tnd-nc-unread-badge strong { color: var(--tnd-nc-ink); font-size: 17px; }
.tnd-nc-unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tnd-nc-blue); box-shadow: 0 0 0 4px var(--tnd-nc-blue-soft); }

.tnd-nc-tabs { display: flex; gap: 4px; max-width: 1540px; margin: 0 auto; padding: 4px; border: 1px solid var(--tnd-nc-border); border-bottom: 0; border-radius: 14px 14px 0 0; background: #eef1f6; width: max-content; margin-left: max(calc((100% - 1540px) / 2), 0px); }
.tnd-nc-tab { min-width: 102px; padding: 9px 16px; border: 0; border-radius: 10px; background: transparent; color: #667287; cursor: pointer; font: inherit; font-weight: 650; }
.tnd-nc-tab.is-active { background: #fff; color: var(--tnd-nc-blue); box-shadow: 0 3px 10px rgba(28, 47, 80, .08); }
.tnd-nc-content { max-width: 1540px; margin: 0 auto; padding: 20px; border: 1px solid var(--tnd-nc-border); border-radius: 0 16px 16px 16px; background: rgba(255,255,255,.74); box-shadow: var(--tnd-nc-shadow); }

.tnd-nc-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.tnd-nc-summary-card { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; min-height: 104px; padding: 17px 18px; overflow: hidden; border: 1px solid var(--tnd-nc-border); border-radius: 14px; background: var(--tnd-nc-surface); color: var(--tnd-nc-ink); cursor: pointer; text-align: left; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.tnd-nc-summary-card::after { content: ""; position: absolute; right: -18px; bottom: -26px; width: 82px; height: 82px; border: 14px solid #eef3fc; border-radius: 50%; }
.tnd-nc-summary-card:hover { transform: translateY(-2px); border-color: #cdd9ee; box-shadow: 0 10px 24px rgba(30, 49, 82, .09); }
.tnd-nc-summary-label { align-self: end; color: #5f6c82; font-weight: 650; }
.tnd-nc-summary-value { align-self: center; grid-row: span 2; z-index: 1; font-size: 32px; line-height: 1; letter-spacing: -.04em; }
.tnd-nc-summary-card small { color: #929bad; font-size: 12px; }
.tnd-nc-summary-card--unread { border-left: 3px solid var(--tnd-nc-blue); }
.tnd-nc-summary-card--urgent { border-left: 3px solid var(--tnd-nc-red); }

.tnd-nc-filterbar { display: grid; grid-template-columns: minmax(220px, 1.3fr) repeat(3, minmax(120px, .55fr)) repeat(2, minmax(135px, .55fr)) auto auto; gap: 9px; margin-bottom: 12px; padding: 12px; border: 1px solid var(--tnd-nc-border); border-radius: 13px; background: #fff; }
.tnd-nc-filterbar--campaigns { grid-template-columns: minmax(240px, 1fr) 180px auto; }
.tnd-nc-control { width: 100%; min-height: 38px; padding: 8px 11px; border: 1px solid #d9e0eb; border-radius: 9px; outline: 0; background: #fff; color: var(--tnd-nc-ink); font: inherit; transition: border-color .15s ease, box-shadow .15s ease; }
.tnd-nc-control:focus { border-color: #7aa0f5; box-shadow: 0 0 0 3px rgba(36, 94, 234, .1); }
.tnd-nc-search { min-width: 200px; }
.tnd-nc-textarea { resize: vertical; line-height: 1.7; }
.tnd-nc-multiselect { min-height: 150px; padding: 6px; }
.tnd-nc-multiselect option { padding: 7px 8px; border-radius: 5px; }

.tnd-nc-button { min-height: 38px; padding: 8px 15px; border: 1px solid #d8dfeb; border-radius: 9px; background: #fff; color: #42506a; cursor: pointer; font: inherit; font-weight: 650; transition: transform .14s ease, background .14s ease, border-color .14s ease; }
.tnd-nc-button:hover:not(:disabled) { transform: translateY(-1px); border-color: #b9c6da; }
.tnd-nc-button:disabled { cursor: not-allowed; opacity: .45; }
.tnd-nc-button--primary { border-color: var(--tnd-nc-blue); background: var(--tnd-nc-blue); color: #fff; }
.tnd-nc-button--primary:hover:not(:disabled) { background: #194fd4; }
.tnd-nc-button--soft { border-color: #d3e0fb; background: var(--tnd-nc-blue-soft); color: #1f56d6; }
.tnd-nc-button--ghost { background: #fff; }
.tnd-nc-toolbar { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 4px 10px; }
.tnd-nc-selection { color: var(--tnd-nc-muted); font-size: 13px; }
.tnd-nc-toolbar-actions { display: flex; gap: 8px; }

.tnd-nc-list, .tnd-nc-campaign-list { overflow: hidden; border: 1px solid var(--tnd-nc-border); border-radius: 13px; background: #fff; }
.tnd-nc-row { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 94px; padding: 14px 16px; border-bottom: 1px solid #edf0f5; }
.tnd-nc-row:last-child { border-bottom: 0; }
.tnd-nc-row.is-unread { background: #fbfdff; }
.tnd-nc-row.is-unread::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; border-radius: 0 3px 3px 0; background: var(--tnd-nc-blue); }
.tnd-nc-check { display: grid; place-items: center; }
.tnd-nc-check input { width: 16px; height: 16px; accent-color: var(--tnd-nc-blue); }
.tnd-nc-row-titleline { display: flex; align-items: center; gap: 10px; }
.tnd-nc-row-titleline h3 { min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.tnd-nc-row.is-unread .tnd-nc-row-titleline h3 { font-weight: 800; }
.tnd-nc-row-excerpt { max-width: 900px; margin: 5px 0 7px; overflow: hidden; color: #667287; text-overflow: ellipsis; white-space: nowrap; }
.tnd-nc-row-meta { display: flex; flex-wrap: wrap; gap: 8px 17px; color: #8a94a6; font-size: 12px; }
.tnd-nc-read-state { color: var(--tnd-nc-green); }
.tnd-nc-read-state.is-unread { color: var(--tnd-nc-blue); font-weight: 700; }
.tnd-nc-priority { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; background: #f0f3f7; color: #667287; font-size: 11px; font-weight: 700; white-space: nowrap; }
.tnd-nc-priority--important { background: #fff2dc; color: var(--tnd-nc-amber); }
.tnd-nc-priority--urgent { background: #ffebeb; color: var(--tnd-nc-red); }
.tnd-nc-row-actions { display: flex; align-items: center; gap: 5px; }
.tnd-nc-text-button { padding: 7px 8px; border: 0; border-radius: 7px; background: transparent; color: #667287; cursor: pointer; font: inherit; white-space: nowrap; }
.tnd-nc-text-button:hover { background: #f1f4f8; color: var(--tnd-nc-ink); }
.tnd-nc-text-button--primary { color: var(--tnd-nc-blue); font-weight: 700; }
.tnd-nc-text-button--danger { color: var(--tnd-nc-red); }

.tnd-nc-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 14px 2px 0; color: var(--tnd-nc-muted); font-size: 13px; }
.tnd-nc-state { display: grid; place-items: center; min-height: 280px; padding: 32px; border: 1px dashed #d5deeb; border-radius: 13px; background: #fff; text-align: center; }
.tnd-nc-state-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: #eff4fc; color: var(--tnd-nc-blue); font-size: 22px; font-weight: 800; }
.tnd-nc-state h3 { margin: 13px 0 3px; font-size: 16px; }
.tnd-nc-state p { margin: 0 0 15px; color: var(--tnd-nc-muted); }
.tnd-nc-state--error .tnd-nc-state-icon { background: #fff0f0; color: var(--tnd-nc-red); }
.tnd-nc-loading { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 220px; color: var(--tnd-nc-muted); }
.tnd-nc-spinner { width: 22px; height: 22px; border: 2px solid #dfe7f5; border-top-color: var(--tnd-nc-blue); border-radius: 50%; animation: tnd-nc-spin .8s linear infinite; }
@keyframes tnd-nc-spin { to { transform: rotate(360deg); } }

.tnd-nc-publish-layout { display: grid; grid-template-columns: minmax(240px, .7fr) minmax(520px, 1.6fr); gap: 18px; }
.tnd-nc-publish-aside, .tnd-nc-publish-form { border: 1px solid var(--tnd-nc-border); border-radius: 14px; background: #fff; }
.tnd-nc-publish-aside { padding: 24px; background: #17233b; color: #fff; }
.tnd-nc-publish-aside h2 { margin: 10px 0; font-size: 24px; line-height: 1.25; }
.tnd-nc-publish-aside p { color: #b7c2d5; line-height: 1.75; }
.tnd-nc-audit-note { display: grid; gap: 4px; margin-top: 28px; padding: 14px; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; background: rgba(255,255,255,.06); }
.tnd-nc-audit-note span { color: #b7c2d5; font-size: 12px; }
.tnd-nc-publish-form { display: grid; gap: 15px; padding: 22px; }
.tnd-nc-field { display: grid; gap: 6px; }
.tnd-nc-field-label { color: #48566e; font-weight: 750; }
.tnd-nc-field small, .tnd-nc-audience-box small { color: #8d97a8; font-size: 12px; }
.tnd-nc-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tnd-nc-audience-box { padding: 12px; border: 1px solid #e1e6ef; border-radius: 10px; background: #f8fafc; }
.tnd-nc-audience-box p { margin: 0; color: #607089; }
.tnd-nc-submit-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding-top: 4px; }
.tnd-nc-recipient-preview { color: #53627a; font-size: 13px; }

.tnd-nc-campaign { display: grid; grid-template-columns: minmax(260px, 1.25fr) minmax(360px, .9fr) auto; gap: 20px; align-items: center; min-height: 112px; padding: 17px 18px; border-bottom: 1px solid #edf0f5; }
.tnd-nc-campaign:last-child { border-bottom: 0; }
.tnd-nc-campaign-main h3 { margin: 6px 0 8px; font-size: 15px; }
.tnd-nc-campaign-status { display: inline-flex; padding: 2px 7px; border-radius: 999px; background: #eef3ff; color: var(--tnd-nc-blue); font-size: 11px; font-weight: 750; }
.tnd-nc-campaign-status--scheduled { background: #fff3dd; color: var(--tnd-nc-amber); }
.tnd-nc-campaign-status--cancelled { background: #f1f2f4; color: #7a8494; }
.tnd-nc-campaign-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tnd-nc-metric { display: grid; gap: 2px; }
.tnd-nc-metric small { color: #8a94a5; font-size: 11px; }
.tnd-nc-metric strong { font-size: 15px; }
.tnd-nc-read-progress { grid-column: 1 / -1; height: 5px; overflow: hidden; border-radius: 999px; background: #e8edf5; }
.tnd-nc-read-progress span { display: block; height: 100%; border-radius: inherit; background: var(--tnd-nc-blue); }

.tnd-nc-drawer-overlay { position: fixed; inset: 0; z-index: 2147482000; display: flex; justify-content: flex-end; background: rgba(22, 31, 48, .36); backdrop-filter: blur(3px); }
.tnd-nc-drawer { width: min(560px, 100%); height: 100%; overflow: hidden; background: #fff; box-shadow: -16px 0 48px rgba(16, 27, 48, .18); animation: tnd-nc-drawer-in .18s ease-out; }
@keyframes tnd-nc-drawer-in { from { transform: translateX(24px); opacity: .5; } }
.tnd-nc-drawer-head { display: flex; align-items: center; justify-content: space-between; min-height: 70px; padding: 16px 22px; border-bottom: 1px solid var(--tnd-nc-border); }
.tnd-nc-drawer-head h2 { max-width: 460px; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 18px; }
.tnd-nc-icon-button { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--tnd-nc-border); border-radius: 10px; background: #fff; color: #6a7588; cursor: pointer; font-size: 23px; }
.tnd-nc-drawer-body { height: calc(100% - 70px); padding: 22px; overflow: auto; }
.tnd-nc-detail-content { margin: 18px 0; color: #40506a; font-size: 15px; line-height: 1.85; white-space: pre-wrap; }
.tnd-nc-detail-grid { display: grid; grid-template-columns: 94px 1fr; gap: 12px; padding: 16px; border-radius: 11px; background: #f6f8fb; }
.tnd-nc-detail-grid dt { color: #8490a2; }
.tnd-nc-detail-grid dd { margin: 0; color: #34435b; }
.tnd-nc-drawer-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; }
.tnd-nc-receipt-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 15px; border-radius: 11px; background: #f4f7fb; }
.tnd-nc-receipt-filters { display: flex; gap: 6px; margin: 16px 0 10px; }
.tnd-nc-chip { padding: 6px 11px; border: 1px solid var(--tnd-nc-border); border-radius: 999px; background: #fff; color: #657188; cursor: pointer; }
.tnd-nc-chip.is-active { border-color: #bfd0f7; background: var(--tnd-nc-blue-soft); color: var(--tnd-nc-blue); }
.tnd-nc-receipt-list { border: 1px solid var(--tnd-nc-border); border-radius: 11px; }
.tnd-nc-receipt-row { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; min-height: 66px; padding: 10px 12px; border-bottom: 1px solid #edf0f5; }
.tnd-nc-receipt-row:last-child { border-bottom: 0; }
.tnd-nc-person-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: #eaf1ff; color: var(--tnd-nc-blue); font-weight: 800; }
.tnd-nc-person { display: grid; }
.tnd-nc-person small { color: #9099a9; font-size: 11px; }
.tnd-nc-empty-inline { padding: 20px; color: #8c96a7; text-align: center; }

.tnd-nc-toast { position: fixed; top: 28px; left: 50%; z-index: 2147483600; max-width: min(460px, calc(100vw - 32px)); padding: 11px 16px; transform: translate(-50%, -10px); border: 1px solid #cde8dd; border-radius: 10px; background: #f0faf6; color: #176c54; box-shadow: 0 12px 30px rgba(22, 35, 60, .15); opacity: 0; transition: opacity .18s ease, transform .18s ease; }
.tnd-nc-toast.is-visible { transform: translate(-50%, 0); opacity: 1; }
.tnd-nc-toast--warning { border-color: #f0dbb9; background: #fff8ea; color: #9a5a09; }
.tnd-nc-toast--error { border-color: #efcccc; background: #fff2f2; color: #b33232; }

.tnd-notification-center button:focus-visible,
.tnd-notification-center input:focus-visible,
.tnd-notification-center select:focus-visible,
.tnd-notification-center textarea:focus-visible,
.tnd-nc-drawer button:focus-visible { outline: 3px solid rgba(36, 94, 234, .25); outline-offset: 2px; }

@media (max-width: 1180px) {
  .tnd-nc-filterbar { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tnd-nc-search { grid-column: span 2; }
  .tnd-nc-campaign { grid-template-columns: 1fr; gap: 12px; }
  .tnd-nc-campaign .tnd-nc-row-actions { justify-content: flex-end; }
}

@media (max-width: 900px) {
  .tnd-notification-center { padding: 20px 14px 36px; }
  .tnd-nc-pagehead { align-items: flex-start; }
  .tnd-nc-heading h1 { font-size: 25px; }
  .tnd-nc-summary { grid-template-columns: repeat(2, 1fr); }
  .tnd-nc-tabs { width: 100%; margin-left: 0; }
  .tnd-nc-tab { flex: 1; min-width: 0; }
  .tnd-nc-content { padding: 14px; border-radius: 0 0 14px 14px; }
  .tnd-nc-filterbar { grid-template-columns: 1fr 1fr; }
  .tnd-nc-search { grid-column: 1 / -1; }
  .tnd-nc-row { grid-template-columns: 28px minmax(0, 1fr); }
  .tnd-nc-row-actions { grid-column: 2; justify-content: flex-end; }
  .tnd-nc-publish-layout { grid-template-columns: 1fr; }
  .tnd-nc-publish-aside { padding: 19px; }
}

@media (max-width: 560px) {
  .tnd-nc-pagehead { display: grid; }
  .tnd-nc-unread-badge { width: max-content; }
  .tnd-nc-summary { grid-template-columns: 1fr; }
  .tnd-nc-summary-card { min-height: 88px; }
  .tnd-nc-filterbar, .tnd-nc-form-grid { grid-template-columns: 1fr; }
  .tnd-nc-search { grid-column: auto; }
  .tnd-nc-toolbar, .tnd-nc-submit-row { align-items: stretch; flex-direction: column; }
  .tnd-nc-toolbar-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .tnd-nc-row-meta { display: grid; gap: 3px; }
  .tnd-nc-pagination { justify-content: space-between; }
  .tnd-nc-pagination span { display: none; }
  .tnd-nc-receipt-summary { grid-template-columns: repeat(2, 1fr); }
  .tnd-nc-receipt-row { grid-template-columns: 36px 1fr; }
  .tnd-nc-receipt-row .tnd-nc-read-state { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
  .tnd-notification-center *, .tnd-nc-drawer, .tnd-nc-toast { animation: none !important; transition: none !important; }
}
