/* ============================================================
   GallopWave 智能增强套件 v3.0  (gw-suite)
   作用域：宿主页面的暗色适配 + 套件自身容器
   组件内部样式全部位于 Shadow DOM，不污染宿主
   ============================================================ */

/* ---------- 暗色模式：宿主页面（保守覆盖常见容器） ---------- */
html[data-gw-theme="dark"] { color-scheme: dark; }

html[data-gw-theme="dark"] body {
  background: #0b1220 !important;
  color: #dfe7f5 !important;
}
html[data-gw-theme="dark"] .card,
html[data-gw-theme="dark"] .panel,
html[data-gw-theme="dark"] .box,
html[data-gw-theme="dark"] .widget,
html[data-gw-theme="dark"] .modal,
html[data-gw-theme="dark"] .dialog,
html[data-gw-theme="dark"] .drawer,
html[data-gw-theme="dark"] .sidebar,
html[data-gw-theme="dark"] .side-bar,
html[data-gw-theme="dark"] .topbar,
html[data-gw-theme="dark"] .header,
html[data-gw-theme="dark"] .navbar,
html[data-gw-theme="dark"] .main,
html[data-gw-theme="dark"] .container,
html[data-gw-theme="dark"] .content,
html[data-gw-theme="dark"] .table-wrap,
html[data-gw-theme="dark"] table,
html[data-gw-theme="dark"] thead,
html[data-gw-theme="dark"] tr,
html[data-gw-theme="dark"] td,
html[data-gw-theme="dark"] th {
  background-color: #0f1a2e !important;
  color: #dfe7f5 !important;
  border-color: #1e2b46 !important;
}
html[data-gw-theme="dark"] th { background-color: #152238 !important; }
html[data-gw-theme="dark"] tr:hover td { background-color: #16233c !important; }
html[data-gw-theme="dark"] input,
html[data-gw-theme="dark"] select,
html[data-gw-theme="dark"] textarea {
  background-color: #101b30 !important;
  color: #e6edf8 !important;
  border-color: #24334f !important;
}
html[data-gw-theme="dark"] h1,
html[data-gw-theme="dark"] h2,
html[data-gw-theme="dark"] h3,
html[data-gw-theme="dark"] h4,
html[data-gw-theme="dark"] strong,
html[data-gw-theme="dark"] .title {
  color: #f2f6ff !important;
}
html[data-gw-theme="dark"] .muted,
html[data-gw-theme="dark"] .sub,
html[data-gw-theme="dark"] small {
  color: #93a4c0 !important;
}
/* 暗色下保持图表/媒体原样 */
html[data-gw-theme="dark"] img,
html[data-gw-theme="dark"] video,
html[data-gw-theme="dark"] canvas,
html[data-gw-theme="dark"] svg { filter: none; }

/* ---------- 套件浮层容器（宿主侧，仅负责定位） ---------- */
#gw-suite-root {
  all: initial;
  position: fixed;
  z-index: 2147483000;
  right: 0;
  bottom: 0;
  pointer-events: none;
}
#gw-suite-root * { pointer-events: auto; }

/* 助手页在暗色下的整页底色 */
html[data-gw-theme="dark"].gw-assistant-page body { background: #0b1220; }
