.sgc-notification-center {
  position: fixed;
  inset: 0;
  z-index: 10120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  box-sizing: border-box;
  background: rgba(0, 0, 0, .38);
  overflow-y: auto;
  overscroll-behavior: contain;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #263b55;
}
.sgc-notification-center *,
.sgc-notification-center *::before,
.sgc-notification-center *::after { box-sizing: border-box; }
.sgc-notification-dialog {
  width: min(100%, 360px);
  min-width: 0;
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .13);
  overflow-y: auto;
}
.sgc-notification-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 9px 18px; border-bottom: 1px solid #edf0f3; }
.sgc-notification-dialog-label { color: #263b55; font-size: 15px; font-weight: 600; }
.sgc-notification-dialog-close { display: grid; width: 28px; height: 28px; padding: 0; place-items: center; border: 0; border-radius: 4px; background: transparent; color: #929aa5; font-size: 23px; line-height: 1; cursor: pointer; }
.sgc-notification-dialog-title { margin: 18px 20px 10px; font-size: 16px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.sgc-notification-dialog-content { max-height: 42vh; margin: 0 20px; overflow-y: auto; overscroll-behavior: contain; white-space: pre-wrap; overflow-wrap: anywhere; color: #566477; font-size: 14px; line-height: 1.75; }
.sgc-notification-dialog-time { display: block; margin: 13px 20px 18px; color: #9aa3af; font-size: 11px; line-height: 1.5; }
.sgc-notification-dialog-feedback { margin: 0 20px 15px; color: #bd554e; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.sgc-notification-dialog-feedback[hidden] { display: none; }
.sgc-notification-dialog-footer { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 12px 18px; border-top: 1px solid #edf0f3; }
.sgc-notification-dialog-footer button { min-width: 68px; min-height: 34px; padding: 6px 15px; border: 1px solid #e6e9ee; border-radius: 5px; background: #fff; color: #667487; font: inherit; font-size: 13px; line-height: 1.5; cursor: pointer; }
.sgc-notification-dialog-footer .sgc-notification-dialog-confirm { border-color: #ff6868; background: #ff6868; color: #fff; }
.sgc-notification-dialog button:focus-visible { outline: 2px solid #ff806d; outline-offset: 2px; }
.sgc-notification-dialog button:disabled { cursor: wait; opacity: .6; }
.sgc-notification-dialog button:active { filter: brightness(.97); }

.sgc-my-shell .sgc-my-message-list.sgc-notification-history { min-width: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.sgc-notification-history [hidden] { display: none !important; }
.sgc-notification-history-toolbar,
.sgc-notification-history-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sgc-notification-history-toolbar { margin: 0 2px 4px; min-height: 32px; color: #94a0af; font-size: 11px; }
.sgc-notification-history-actions { display: flex; align-items: center; gap: 12px; }
.sgc-notification-history button { min-height: 32px; padding: 5px 10px; border: 1px solid #e5e9ef; border-radius: 5px; background: #fff; color: #66778b; font: inherit; font-size: 12px; cursor: pointer; }
.sgc-notification-history .sgc-notification-history-read-all { padding: 3px 0; border: 0; background: transparent; color: #f46666; white-space: nowrap; }
.sgc-notification-history .sgc-notification-history-refresh { min-height: 28px; padding: 3px 7px; border: 0; background: transparent; color: #94a0af; font-size: 11px; }
.sgc-notification-history button:disabled { opacity: .5; cursor: default; }
.sgc-notification-history button:focus-visible,
.sgc-notification-history-card:focus-visible { outline: 2px solid #ff806d; outline-offset: 2px; }
.sgc-notification-history-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; margin: 0 0 14px; border-bottom: 1px solid #e8edf2; }
.sgc-notification-history .sgc-notification-history-tab { position: relative; min-height: 43px; padding: 10px 4px; border: 0; border-radius: 0; background: transparent; color: #8190a2; font-size: 14px; }
.sgc-notification-history .sgc-notification-history-tab.is-active { color: #f46666; font-weight: 600; }
.sgc-notification-history-tab.is-active::after { content: ""; position: absolute; right: 32%; bottom: -1px; left: 32%; height: 2px; border-radius: 1px; background: #ff6868; }
.sgc-notification-history-feedback { margin: 0 2px 12px; color: #b65a51; font-size: 12px; line-height: 1.6; }
.sgc-notification-history-records { display: grid; gap: 12px; }
.sgc-my-shell .sgc-my-message.sgc-notification-history-card { display: flex; align-items: flex-start; gap: 10px; min-width: 0; padding: 14px 12px; border: 1px solid #f7dfe1; border-radius: 8px; background: #fff; cursor: pointer; }
.sgc-notification-history-icon { display: grid; flex: 0 0 29px; width: 29px; height: 29px; margin-top: 1px; place-items: center; border-radius: 50%; background: #fff0f0; color: #f87878; }
.sgc-notification-history-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sgc-notification-history-main { flex: 1; min-width: 0; }
.sgc-notification-history-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.sgc-my-shell .sgc-notification-history-title-row strong { min-width: 0; color: #29405a; font-size: 14px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.sgc-notification-history-badge { flex: 0 0 auto; padding: 1px 5px; border-radius: 3px; background: #f3f5f7; color: #9aa5b2; font-size: 10px; line-height: 1.7; }
.sgc-notification-history-badge.is-unread { background: #fff0f0; color: #f27777; }
.sgc-my-shell .sgc-notification-history-card p { display: -webkit-box; margin: 7px 0 9px; overflow: hidden; -webkit-line-clamp: 3; -webkit-box-orient: vertical; white-space: pre-wrap; overflow-wrap: anywhere; color: #718094; font-size: 12px; line-height: 1.7; }
.sgc-notification-history-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 5px 10px; color: #a3adba; font-size: 10px; line-height: 1.5; }
.sgc-my-shell .sgc-notification-history-meta time { color: inherit; font-size: inherit; }
.sgc-notification-history-pagination { margin-top: 15px; color: #8d9bac; font-size: 11px; }
@media (max-width: 360px) {
  .sgc-notification-center { padding-right: 12px; padding-left: 12px; }
  .sgc-notification-dialog-title { margin-right: 16px; margin-left: 16px; }
  .sgc-notification-dialog-content { margin-right: 16px; margin-left: 16px; }
  .sgc-notification-history-title-row { gap: 5px; }
}

/* Message-page-only visual layer. Keep dialog styles and other My views unchanged. */
.sgc-my-shell[data-view="messages"] {
  padding-right: 0;
  padding-left: 0;
  background: #f5f6f8;
  color: #262c35;
}
.sgc-my-shell[data-view="messages"] .sgc-my-subpage-header {
  min-height: 56px;
  padding: 0 12px;
  border-bottom: 1px solid #e8eaee;
  background: #fff;
}
.sgc-my-shell[data-view="messages"] .sgc-my-subpage-header h1 {
  color: #252b34;
  font-size: 18px;
  font-weight: 600;
}
.sgc-my-shell[data-view="messages"] .sgc-my-back {
  border-radius: 0;
  background: transparent;
  color: #424b57;
  box-shadow: none;
}
.sgc-my-shell[data-view="messages"] .sgc-my-subpage-content { padding-top: 0; }
.sgc-my-shell[data-view="messages"] .sgc-notification-history { margin-top: 0; }
.sgc-my-shell[data-view="messages"] .sgc-notification-history-toolbar {
  min-height: 48px;
  margin: 0;
  padding: 8px 12px;
  background: #fff;
  color: #68717e;
  font-size: 12px;
}
.sgc-my-shell[data-view="messages"] .sgc-notification-history-actions { gap: 8px; }
.sgc-my-shell[data-view="messages"] .sgc-notification-history-refresh,
.sgc-my-shell[data-view="messages"] .sgc-notification-history-read-all {
  min-height: 30px;
  padding: 4px 9px;
  border: 1px solid #dce0e6;
  border-radius: 4px;
  background: #fff;
  color: #505b68;
  font-size: 12px;
}
.sgc-my-shell[data-view="messages"] .sgc-notification-history-read-all { border-color: #d85a5a; color: #c94444; }
.sgc-my-shell[data-view="messages"] .sgc-notification-history-tabs {
  margin-bottom: 12px;
  border-bottom-color: #e4e7ec;
  background: #fff;
}
.sgc-my-shell[data-view="messages"] .sgc-notification-history-tab { min-height: 44px; color: #626c78; }
.sgc-my-shell[data-view="messages"] .sgc-notification-history-tab.is-active { color: #c94444; }
.sgc-my-shell[data-view="messages"] .sgc-notification-history-tab.is-active::after { background: #e25353; }
.sgc-my-shell[data-view="messages"] .sgc-notification-history-records { gap: 8px; padding: 0 12px; }
.sgc-my-shell[data-view="messages"] .sgc-my-message.sgc-notification-history-card {
  padding: 14px 12px;
  border-color: #e1e4e9;
  border-radius: 4px;
  background: #fff;
  box-shadow: none;
}
.sgc-my-shell[data-view="messages"] .sgc-notification-history-icon { background: #f1f3f5; color: #7b8592; }
.sgc-my-shell[data-view="messages"] .sgc-notification-history-title-row strong { color: #252b34; font-size: 15px; }
.sgc-my-shell[data-view="messages"] .sgc-notification-history-card p { color: #5c6470; font-size: 14px; line-height: 1.65; }
.sgc-my-shell[data-view="messages"] .sgc-notification-history-badge { background: #f0f2f5; color: #636d78; font-size: 11px; }
.sgc-my-shell[data-view="messages"] .sgc-notification-history-badge.is-unread { background: transparent; color: #c94444; }
.sgc-my-shell[data-view="messages"] .sgc-notification-history-meta { color: #69717d; font-size: 11px; }
.sgc-my-shell[data-view="messages"] .sgc-notification-history-feedback { margin: 0 12px 12px; }
.sgc-my-shell[data-view="messages"] .sgc-notification-history-pagination { margin: 14px 12px 0; color: #68717e; }
.sgc-my-shell[data-view="messages"] .sgc-my-empty {
  margin: 0;
  padding: 32px 12px;
  border: 1px solid #e4e7ec;
  border-radius: 4px;
  background: #fff;
  color: #69717d;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}
.sgc-my-shell[data-view="messages"] .sgc-my-empty.is-error { color: #b65a51; }
