.asr-global-warning, .asr-failure-notice {
  box-sizing: border-box; border: 1px solid #fed7aa; border-left: 4px solid #f79009;
  border-radius: 12px; background: #fffaeb; color: #7a2e0e; font-size: 13px; line-height: 1.55;
}
.asr-global-warning[hidden], .asr-failure-notice[hidden] { display: none !important; }
/* 放在内容流首部，为页签/筛选/表格让出空间；不覆盖当前操作和页面滚动区域。 */
.asr-global-warning { display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin: 0 0 18px; }
.asr-global-copy { flex: 1; min-width: 0; }
.asr-global-copy strong, .asr-global-copy span { display: block; }
.asr-global-copy strong, .asr-alert-heading strong { font-size: 14px; font-weight: 700; color: #93370d; }
.asr-global-copy span { margin-top: 3px; }
.asr-alert-symbol { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; background: #fef0c7; color: #b54708; flex: 0 0 auto; }
.asr-alert-symbol svg { width: 21px; height: 21px; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.asr-alert-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.asr-alert-actions button, .asr-alert-actions a { font: inherit; font-weight: 650; border: 1px solid #f5c38b; border-radius: 7px; padding: 7px 11px; background: #fff; color: #93370d; text-decoration: none; cursor: pointer; white-space: nowrap; }
.asr-alert-actions a { border-color: transparent; background: transparent; }
.asr-alert-actions .asr-alert-primary { background: #b54708; color: #fff; border-color: #b54708; }
.asr-alert-actions button:hover, .asr-alert-actions a:hover { filter: brightness(.96); }
.asr-alert-actions button:disabled { opacity: .65; cursor: wait; }
.asr-alert-close { align-self: flex-start; flex: 0 0 auto; font: inherit; font-size: 22px; line-height: 1; border: 0; background: transparent; color: #a15c32; cursor: pointer; width: 26px; height: 26px; border-radius: 5px; }
.asr-global-warning :focus-visible, .asr-failure-notice :focus-visible { outline: 2px solid #b54708; outline-offset: 3px; }
.asr-failure-notice { margin-bottom: 16px; padding: 16px; scroll-margin-top: 76px; }
.asr-alert-heading { display: flex; align-items: center; gap: 11px; }
.asr-alert-heading p { margin: 3px 0 0; font-size: 13px; }
.asr-alert-note { margin: 10px 0 13px; color: #8b5939; font-size: 12px; }
.asr-failure-notice .asr-alert-actions span { font-size: 12px; color: #8b5939; }
.asr-failure-notice details { margin-top: 14px; border-top: 1px solid #f9dfb8; padding-top: 12px; }
.asr-failure-notice summary { cursor: pointer; font-size: 12px; font-weight: 650; color: #93370d; }
.asr-alert-error { margin-top: 12px; font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.asr-alert-fields { margin: 12px 0 0; padding: 12px; border-radius: 8px; background: rgba(255,255,255,.75); }
.asr-alert-fields > div { display: grid; grid-template-columns: 118px minmax(0,1fr); gap: 10px; padding: 5px 0; font-size: 12px; }
.asr-alert-fields dt { color: #8b5939; }
.asr-alert-fields dd { margin: 0; color: #344054; overflow-wrap: anywhere; }
.asr-alert-stderr { margin-top: 10px; padding: 10px 12px; border-radius: 7px; background: #fff; font: 11px/1.6 monospace; color: #475467; overflow-wrap: anywhere; white-space: pre-wrap; }
.asr-export-feedback { margin: 10px 0 0; font-size: 12px; color: #93370d; }
/* 公共页面按钮归一化使用 !important；以组件 ID 限定覆盖，保留警示动作和关闭按钮的语义。 */
:is(#asrGlobalWarning, #asrFailureNotice) .asr-alert-actions button,
:is(#asrGlobalWarning, #asrFailureNotice) .asr-alert-actions a {
  color: #93370d !important; background: #fff !important; border: 1px solid #f5c38b !important;
}
#asrFailureNotice .asr-alert-actions .asr-alert-primary { color: #fff !important; background: #b54708 !important; border-color: #b54708 !important; }
#asrGlobalWarning .asr-alert-close { min-height: 26px; height: 26px; padding: 0; border: 0 !important; background: transparent !important; color: #a15c32 !important; }
@media (max-width: 1000px) {
  .asr-global-warning { flex-wrap: wrap; align-items: flex-start; }
  .asr-global-copy { flex-basis: calc(100% - 90px); }
  .asr-global-warning .asr-alert-actions { order: 2; margin-left: 46px; }
  .asr-alert-close { margin-left: auto; }
}
@media (max-width: 600px) {
  .asr-global-warning, .asr-failure-notice { padding: 12px; }
  .asr-alert-fields > div { grid-template-columns: 1fr; gap: 2px; }
}
