:root {
  --bg: #eef6fb;
  --panel: #ffffff;
  --ink: #102033;
  --muted: #52677d;
  --line: #d7e3ef;
  --brand: #0284c7;
  --brand-2: #06b6d4;
  --brand-dark: #0f2742;
  --brand-soft: #e0f2fe;
  --blue: #2563eb;
  --blue-soft: #eff6ff;
  --red: #dc2626;
  --red-soft: #fde8e8;
  --amber: #b45309;
  --amber-soft: #fff4d6;
  --green: #15803d;
  --green-soft: #e7f7ed;
  --app-bg: #f4f6f8;
  --surface-raised: #ffffff;
  --surface-subtle: #f1f7fd;
  --surface-hover: #f0f9ff;
  --surface-selected: #e0f2fe;
  --heading: #1e3a5f;
  --shadow-color: rgba(15, 76, 129, 0.08);
  --el-color-primary: #0284c7;
  --el-color-primary-light-3: #38a9dc;
  --el-color-primary-light-5: #7ac8e9;
  --el-color-primary-light-8: #d3effa;
  --el-color-primary-light-9: #eaf8fd;
  --el-border-radius-base: 8px;
  --el-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--app-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled,
.is-busy button {
  cursor: wait;
  opacity: 0.72;
}

.shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}

.sidebar {
  height: 100vh;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 14px;
  color: #fff;
  background: linear-gradient(180deg, #0b2f46 0%, #0b4056 54%, #0e5a6e 100%);
  box-shadow: 8px 0 24px rgba(15, 39, 66, 0.1);
}

.sidebar::-webkit-scrollbar,
.main::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.main::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(2, 132, 199, 0.22);
}

.brand {
  display: flex;
  align-items: center;
  min-height: 72px;
  gap: 10px;
  margin-bottom: 16px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 26px rgba(6, 182, 212, 0.22);
  font-size: 24px;
  font-weight: 800;
}

.brand h1,
.brand p,
.topbar h2,
.topbar p {
  margin: 0;
}

.brand h1 {
  font-size: 16px;
}

.brand p {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav-group {
  display: grid;
  gap: 4px;
}

.nav-group-toggle {
  min-height: 42px;
  padding: 0 10px 0 12px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.86);
  text-align: left;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  font-weight: 800;
}

.nav-group-toggle:hover,
.nav-group-toggle:focus-visible,
.nav-group.active > .nav-group-toggle {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.nav-group-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-group-count {
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.74);
  font-size: 11px;
  line-height: 1;
}

.nav-group-caret {
  color: rgba(255, 255, 255, 0.7);
  font-size: 18px;
  line-height: 1;
  transition: transform 0.16s ease;
}

.nav-group.open .nav-group-caret {
  transform: rotate(90deg);
}

.nav-children {
  display: none;
  gap: 4px;
  margin-left: 11px;
  padding: 3px 0 5px 20px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.nav-group.open .nav-children {
  display: grid;
}

.nav-item {
  position: relative;
  min-height: 46px;
  padding: 0 12px 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.82);
  text-align: left;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  font-weight: 600;
}

.nav-item.active,
.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.nav-icon {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
}

.nav-item.active {
  font-weight: 800;
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 3px;
  height: calc(100% - 18px);
  border-radius: 999px;
  background: #38bdf8;
}

.nav-item.nav-child {
  min-height: 38px;
  padding: 0 10px;
  gap: 8px;
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  font-weight: 650;
}

.nav-item.nav-child.active,
.nav-item.nav-child:hover {
  background: rgba(255, 255, 255, 0.11);
}

.nav-child-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.26);
}

.nav-item.nav-child.active .nav-child-dot {
  background: #38bdf8;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.14);
}

.nav-item.nav-child.active::before {
  left: -21px;
  top: 8px;
  height: calc(100% - 16px);
}

.nav-version {
  margin-top: 18px;
  padding: 10px 12px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 12px;
}

.main {
  min-width: 0;
  height: 100vh;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  /* 顶部与侧栏齐平，标题栏直接贴住内容区上沿。 */
  padding: 0 24px 24px;
  background: var(--app-bg);
}

.topbar {
  width: 100%;
  min-width: 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin: 0;
  min-height: 56px;
  padding: 0 20px;
  border: 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 2px 8px rgba(15, 76, 129, 0.035);
  position: sticky;
  top: 0;
  z-index: 30;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-menu-wrap { position: relative; }
.theme-quick-menu {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 60;
  width: 136px;
  padding: 5px;
  display: grid;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  box-shadow: 0 12px 28px rgba(15, 39, 66, .16);
}
.theme-quick-menu button {
  padding: 8px 9px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  text-align: left;
  font-size: 13px;
}
.theme-quick-menu button:hover,
.theme-quick-menu button.active { color: var(--brand); background: var(--brand-soft); }

.topbar-icon-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: #31526d;
  background: transparent;
  transition: color 160ms ease, background 160ms ease;
}

.topbar-icon-btn:hover {
  color: #16835b;
  background: #eaf8f1;
}

.topbar-icon-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.appearance-page { display: grid; gap: 14px; max-width: 920px; }
.appearance-card { padding: 20px; }
.appearance-card-head h3, .appearance-card-head p { margin: 0; }
.appearance-card-head h3 { color: var(--ink); font-size: 17px; }
.appearance-card-head p { margin-top: 5px; color: var(--muted); font-size: 13px; }
.appearance-options { margin-top: 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.appearance-option { min-height: 76px; padding: 12px 14px; display: grid; gap: 5px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fff; text-align: left; }
.appearance-option span { color: var(--muted); font-size: 13px; }
.appearance-option.active { border-color: rgba(2, 132, 199, .48); background: var(--brand-soft); color: var(--brand); }
.appearance-switch { margin-top: 16px; display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 650; }
.appearance-switch input { width: 16px; height: 16px; accent-color: var(--brand); }
.font-size-options { grid-template-columns: repeat(3, minmax(120px, 1fr)); max-width: 520px; }
.font-size-options .appearance-option { min-height: 48px; place-content: center; text-align: center; }

html[data-font-size="small"] body { font-size: 14px; }
html[data-font-size="medium"] body { font-size: 16px; }
html[data-font-size="large"] body { font-size: 17px; }
.density-compact .overview-screen { gap: 8px; }
.density-compact .overview-section-card, .density-compact .overview-warning-center, .density-compact .overview-trend-panel, .density-compact .overview-detail-table { padding: 12px; }
.density-compact .portal-indicator-card { min-height: 112px; padding: 11px; }
.density-compact .nav-item { min-height: 40px; }

.theme-dark {
  color-scheme: dark;
  --bg: #132131;
  --panel: #182737;
  --ink: #e6eef6;
  --muted: #9fb0c2;
  --line: #2d4055;
  --brand: #38bdf8;
  --brand-2: #22d3ee;
  --brand-dark: #f1f7fc;
  --brand-soft: #123b55;
  --blue: #60a5fa;
  --blue-soft: #1b3550;
  --red: #fb9298;
  --red-soft: #43252d;
  --amber: #f0bd61;
  --amber-soft: #463720;
  --green: #55d6a6;
  --green-soft: #163d32;
  --app-bg: #0f1b28;
  --surface-raised: #182737;
  --surface-subtle: #1b2a3a;
  --surface-hover: #1c3042;
  --surface-selected: #123b55;
  --heading: #f1f7fc;
  --shadow-color: rgba(0, 0, 0, 0.3);
  --el-color-primary: #38bdf8;
  --el-color-primary-dark-2: #239bce;
  --el-color-primary-light-3: #71cef9;
  --el-color-primary-light-5: #9cddfb;
  --el-color-primary-light-8: #d9f2fd;
  --el-color-primary-light-9: #edf9fe;
  --el-bg-color: #182737;
  --el-bg-color-page: #0f1b28;
  --el-bg-color-overlay: #1b2a3a;
  --el-text-color-primary: #e6eef6;
  --el-text-color-regular: #c9d6e2;
  --el-text-color-secondary: #9fb0c2;
  --el-text-color-placeholder: #75889b;
  --el-border-color: #2d4055;
  --el-border-color-light: #385069;
  --el-border-color-lighter: #23374b;
  --el-fill-color: #1c3042;
  --el-fill-color-light: #1b2a3a;
  --el-fill-color-lighter: #182737;
  --el-fill-color-blank: #182737;
  --el-mask-color: rgba(4, 12, 22, 0.76);
  --el-box-shadow-light: 0 16px 40px rgba(0, 0, 0, 0.38);
}

.theme-dark.theme-graphite {
  --bg: #171b21;
  --panel: #1d222a;
  --ink: #f2f4f7;
  --muted: #a7b0bc;
  --line: #333b46;
  --brand: #2fb7d8;
  --brand-2: #22c7df;
  --brand-dark: #f2f4f7;
  --brand-soft: #17333d;
  --blue: #7db7f4;
  --blue-soft: #1d2b3a;
  --red: #f08b91;
  --red-soft: #3a2328;
  --amber: #e5b55b;
  --amber-soft: #3a3020;
  --green: #4bc59a;
  --green-soft: #16372d;
  --app-bg: #111418;
  --surface-raised: #1d222a;
  --surface-subtle: #232a33;
  --surface-hover: #29313b;
  --surface-selected: #203844;
  --heading: #f5f7fa;
  --shadow-color: rgba(0, 0, 0, 0.3);
  --el-color-primary: #2fb7d8;
  --el-color-primary-dark-2: #2696b2;
  --el-color-primary-light-3: #6bcbe1;
  --el-color-primary-light-5: #97dcea;
  --el-color-primary-light-8: #d6f1f6;
  --el-color-primary-light-9: #ebf8fa;
  --el-bg-color: #1d222a;
  --el-bg-color-page: #111418;
  --el-bg-color-overlay: #232a33;
  --el-text-color-primary: #f2f4f7;
  --el-text-color-regular: #cfd5dd;
  --el-text-color-secondary: #a7b0bc;
  --el-text-color-placeholder: #7f8996;
  --el-border-color: #333b46;
  --el-border-color-light: #3b4551;
  --el-border-color-lighter: #2b333d;
  --el-fill-color: #29313b;
  --el-fill-color-light: #232a33;
  --el-fill-color-lighter: #1d222a;
  --el-fill-color-blank: #1d222a;
  --el-mask-color: rgba(4, 6, 9, 0.76);
  --el-box-shadow-light: 0 16px 40px rgba(0, 0, 0, 0.38);
}
.theme-dark body, body.theme-dark { color: var(--ink); background: var(--app-bg); }
.theme-dark .main { background: var(--app-bg); }
.theme-dark .topbar, .theme-dark .view-tabs, .theme-dark .theme-quick-menu,
.theme-dark .panel, .theme-dark .overview-screen-head, .theme-dark .overview-section-card,
.theme-dark .overview-warning-center, .theme-dark .overview-trend-panel, .theme-dark .overview-detail-table,
.theme-dark .portal-map, .theme-dark .portal-rank, .theme-dark .appearance-option { background: var(--panel); border-color: var(--line); }
.theme-dark .topbar h2, .theme-dark .overview-card-head h3, .theme-dark .appearance-card-head h3,
.theme-dark .overview-period-button, .theme-dark .overview-period-switch button { color: var(--ink); }
.theme-dark input, .theme-dark select, .theme-dark .overview-date-filter > summary { color: var(--ink); border-color: var(--line); background: var(--surface-subtle); }
.theme-dark .overview-tabs button, .theme-dark .appearance-option { color: var(--ink); background: var(--surface-subtle); border-color: var(--line); }
.theme-dark .overview-tabs button.active, .theme-dark .appearance-option.active { color: var(--brand); background: var(--brand-soft); }

@media (max-width: 640px) {
  .appearance-options { grid-template-columns: 1fr; }
}

.view-tabs {
  min-height: 44px;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  gap: 8px;
  margin: 0 0 18px;
  padding: 6px 20px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: inset 0 -1px 0 #dbe3ea;
  position: sticky;
  top: 56px;
  z-index: 29;
}

.view-tabs-fixed { flex: 0 0 auto; display: flex; align-items: center; padding-right: 8px; border-right: 1px solid rgba(15, 23, 42, 0.08); }
.view-tabs-scroll { min-width: 0; flex: 0 1 auto; display: flex; align-items: center; gap: 6px; overflow-x: auto; overflow-y: visible; scrollbar-width: none; overscroll-behavior-x: contain; }
.view-tabs-scroll::-webkit-scrollbar { display: none; }
.view-tab { position: relative; flex: 0 0 auto; max-width: 180px; height: 32px; display: flex; align-items: center; border: 1px solid #dbe3ea; border-radius: 8px; color: var(--muted); background: rgba(255, 255, 255, .66); box-shadow: 0 1px 2px rgba(15, 23, 42, .04); transition: color 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease; }
.view-tab:hover { color: #334155; border-color: #b9c7d5; background: #fff; }
.view-tab.active { color: var(--brand); border-color: rgba(2, 132, 199, .48); background: var(--brand-soft); box-shadow: 0 3px 10px rgba(2, 132, 199, .12); }
.view-tab.active::after { content: ""; position: absolute; right: 10px; bottom: 0; left: 10px; height: 2px; border-radius: 2px; background: var(--brand); }
.view-tab-main { min-width: 0; height: 100%; padding: 0 5px 0 12px; display: inline-flex; align-items: center; gap: 6px; border: 0; color: inherit; background: transparent; font-size: 14px; font-weight: 650; white-space: nowrap; }
.view-tab-icon { flex: 0 0 auto; font-size: 14px; opacity: .9; }
.view-tab-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.view-tab-close { width: 24px; height: 24px; flex: 0 0 auto; margin: 0 4px 0 2px; padding: 0; border: 0; border-radius: 5px; color: #94a3b8; background: transparent; font-size: 16px; line-height: 1; opacity: .55; transition: color 160ms ease, background 160ms ease, opacity 160ms ease; }
.view-tab:hover .view-tab-close, .view-tab:focus-within .view-tab-close { opacity: 1; }
.view-tab-close:hover:not(:disabled) { color: #334155; background: rgba(15, 23, 42, 0.08); }
.view-tabs-actions { position: relative; flex: 0 0 auto; display: flex; align-items: center; margin-left: 4px; padding-left: 8px; border-left: 1px solid rgba(15, 23, 42, 0.08); background: rgba(255,255,255,.94); }
.view-tabs-more { width: 32px; height: 32px; border: 0; border-radius: 8px; color: #64748b; background: transparent; font-weight: 800; letter-spacing: 1px; }
.view-tabs-more:hover { color: var(--brand); background: var(--brand-soft); }
.view-tabs-menu, .view-tab-context-menu { position: absolute; z-index: 50; width: 144px; padding: 5px; display: grid; border: 1px solid rgba(15, 23, 42, .1); border-radius: 8px; background: #fff; box-shadow: 0 12px 28px rgba(15, 39, 66, .14); }
.view-tabs-menu { top: calc(100% + 5px); right: 0; }
.view-tab-context-menu { top: calc(100% + 4px); left: 0; }
.view-tabs-menu button, .view-tab-context-menu button { padding: 8px 9px; border: 0; border-radius: 5px; color: #475569; background: transparent; text-align: left; font-size: 13px; }
.view-tabs-menu button:hover:not(:disabled), .view-tab-context-menu button:hover:not(:disabled) { color: var(--brand); background: var(--brand-soft); }
.view-tabs-menu button:disabled, .view-tab-context-menu button:disabled { color: #cbd5e1; cursor: not-allowed; }

.topbar h2 { color: #0f172a; font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.topbar:focus-within, .view-tabs:focus-within { z-index: 31; }
.topbar-icon-btn:focus-visible, .view-tab-main:focus-visible, .view-tab-close:focus-visible, .view-tabs-more:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .topbar-icon-btn, .view-tab, .view-tab-close { transition: none; }
}

.indicator-mode .view-tabs { margin: 0 0 18px; top: 56px; }

.login-mode .shell {
  grid-template-columns: 1fr;
  height: auto;
  min-height: 100vh;
  overflow: visible;
}

.login-mode {
  overflow: hidden;
  background:
    radial-gradient(circle at 16% 20%, rgba(31, 186, 255, 0.26), transparent 25%),
    radial-gradient(circle at 84% 76%, rgba(86, 104, 255, 0.22), transparent 31%),
    linear-gradient(135deg, #06172b 0%, #082f52 48%, #071d3a 100%);
}

.login-mode .main {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  overflow: hidden;
  padding: 0;
  background:
    linear-gradient(rgba(136, 200, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(136, 200, 255, 0.07) 1px, transparent 1px),
    linear-gradient(135deg, rgba(4, 26, 54, 0.15), rgba(5, 18, 43, 0.38));
  background-size: 34px 34px, 34px 34px, auto;
}

.login-mode .main::before,
.login-mode .main::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
}

.login-mode .main::before {
  opacity: 0.75;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 900'%3E%3Cg fill='none' stroke='%2374d8ff' stroke-width='1.2' stroke-opacity='.44'%3E%3Cpath d='M-30 210L170 120 352 244 552 168 742 284 914 132 1110 248 1470 94'/%3E%3Cpath d='M-40 638L176 514 364 630 588 492 784 616 1018 476 1218 592 1480 428'/%3E%3Cpath d='M206 -26L330 160 258 364 444 502 372 790 534 940'/%3E%3Cpath d='M1008 -20L890 176 1004 354 854 548 964 774 882 932'/%3E%3C/g%3E%3Cg fill='%2395e8ff' fill-opacity='.92'%3E%3Ccircle cx='170' cy='120' r='4'/%3E%3Ccircle cx='352' cy='244' r='4'/%3E%3Ccircle cx='552' cy='168' r='4'/%3E%3Ccircle cx='742' cy='284' r='4'/%3E%3Ccircle cx='914' cy='132' r='4'/%3E%3Ccircle cx='1110' cy='248' r='4'/%3E%3Ccircle cx='176' cy='514' r='4'/%3E%3Ccircle cx='588' cy='492' r='4'/%3E%3Ccircle cx='1018' cy='476' r='4'/%3E%3Ccircle cx='1218' cy='592' r='4'/%3E%3C/g%3E%3C/svg%3E");
  background-position: center;
  background-size: cover;
  animation: network-drift 22s ease-in-out infinite alternate;
}

.login-mode .main::after {
  inset: auto;
  width: 42vw;
  height: 42vw;
  top: -15vw;
  right: -8vw;
  border-radius: 50%;
  background: rgba(38, 185, 255, 0.2);
  filter: blur(28px);
  animation: network-glow 8s ease-in-out infinite alternate;
}

.login-mode .topbar {
  position: relative;
  z-index: 3;
}

.login-mode .sidebar,
.login-mode .top-actions,
.login-mode #refreshBtn,
.login-mode #logoutBtn {
  display: none;
}

.login-panel {
  min-height: 100vh;
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: 32px;
}

.login-card {
  width: min(430px, 100%);
  padding: 28px;
  border: 1px solid rgba(182, 225, 255, 0.35);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 64px rgba(2, 13, 35, 0.35), 0 0 0 1px rgba(133, 223, 255, 0.1) inset;
  backdrop-filter: blur(12px);
}

@keyframes network-drift {
  from { transform: scale(1) translate3d(0, 0, 0); }
  to { transform: scale(1.04) translate3d(-1.4%, 1%, 0); }
}

@keyframes network-glow {
  from { transform: translate3d(0, 0, 0) scale(0.9); opacity: 0.45; }
  to { transform: translate3d(-10%, 10%, 0) scale(1.12); opacity: 0.78; }
}

@media (prefers-reduced-motion: reduce) {
  .login-mode .main::before,
  .login-mode .main::after { animation: none; }
}

.login-card h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.login-card p {
  margin: 0 0 18px;
}

.login-submit {
  width: 100%;
  margin-top: 14px;
  justify-content: center;
}

.captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  gap: 10px;
  align-items: center;
}

.captcha-image {
  height: 48px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eff6ff;
}

.captcha-image img {
  display: block;
  width: 128px;
  height: 48px;
}

.remember-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  color: #475569;
  font-size: 13px;
}

.remember-row label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  user-select: none;
}

.remember-row input {
  width: 15px;
  height: 15px;
  min-height: 0;
  accent-color: var(--brand);
}

.inline-actions {
  padding: 14px 0 0;
  border-top: 0;
  background: transparent;
}

.profile-page {
  width: min(100%, 1280px);
  margin: 0 auto;
  display: grid;
  gap: 16px;
  overflow-x: hidden;
}

.profile-hero-card,
.profile-info-card {
  border-radius: 12px;
  border: 1px solid #d8e6f3;
  box-shadow: 0 4px 12px rgba(15, 39, 66, 0.06);
}

.profile-hero-card {
  min-height: 132px;
  padding: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.9fr);
  align-items: center;
  gap: 24px;
}

.profile-hero-main {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #38bdf8);
  box-shadow: 0 10px 22px rgba(14, 165, 233, 0.24);
  font-size: 26px;
  font-weight: 800;
}

.profile-identity {
  min-width: 0;
}

.profile-identity h3 {
  margin: 0 0 8px;
  color: #0f2742;
  font-size: 22px;
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.profile-hero-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  min-width: 0;
}

.profile-mini-item {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.profile-mini-item span {
  color: #6b7c93;
  font-size: 12px;
}

.profile-mini-item b {
  color: #0f2742;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.profile-quick-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.profile-quick-actions.side {
  justify-content: flex-start;
  margin-top: 12px;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
  gap: 16px;
}

.profile-main-column,
.profile-side-column {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.profile-info-card {
  padding: 18px;
  min-width: 0;
}

.profile-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.profile-card-head h3,
.profile-card-head p {
  margin: 0;
}

.profile-card-head h3 {
  color: #0f2742;
  font-size: 17px;
}

.profile-card-head p {
  margin-top: 4px;
  font-size: 12px;
}

.profile-desc-grid,
.login-info-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
  margin: 0;
}

.profile-desc-grid.compact {
  margin-top: 16px;
}

.login-info-list {
  grid-template-columns: 1fr;
}

.profile-desc-grid div,
.login-info-list div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.profile-desc-grid dt,
.login-info-list dt {
  color: #6b7c93;
  font-size: 12px;
}

.profile-desc-grid dd,
.login-info-list dd {
  margin: 0;
  color: #34495e;
  font-size: 14px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.code-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  color: #0f2742;
  background: #eef6fb;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.org-path {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 1px solid #d8e6f3;
  border-radius: 12px;
  background: #f8fbff;
}

.org-path > span {
  color: #71839a;
}

.org-path-node {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.org-path-node span {
  color: #52677d;
  font-size: 13px;
}

.org-path-node b {
  color: #0f2742;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.org-path-node.empty b {
  color: #9aa9b8;
  font-weight: 600;
}

.role-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.permission-list,
.security-list {
  display: grid;
  gap: 10px;
}

.permission-list div,
.security-list div {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f8fbff;
}

.permission-list span,
.security-list span {
  color: #34495e;
  font-size: 14px;
  font-weight: 700;
}

.profile-page .permission-list .pill.bad {
  color: #64748b;
  background: #eef2f7;
}

.form-tip {
  grid-column: 1 / -1;
  padding: 10px 12px;
  border-radius: 8px;
  color: #5f7186;
  background: #f3f8fc;
  font-size: 12px;
  line-height: 1.6;
}

.security-tip {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  color: #6b7c93;
  background: #fff8e6;
  font-size: 12px;
}

.topbar h2 {
  color: #0f172a;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.topbar p,
.muted {
  color: var(--muted);
}

.content {
  display: grid;
  gap: 16px;
}

.panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-raised);
  box-shadow: 0 12px 30px var(--shadow-color);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.panel-head h3 {
  margin: 0;
  color: var(--brand-dark);
  font-size: 18px;
  font-weight: 800;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.compact-table {
  margin-top: 14px;
}

.stat-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(14, 165, 233, 0.08), transparent 42%),
    var(--surface-raised);
  box-shadow: 0 12px 26px var(--shadow-color);
}

.warning-filter-card {
  position: relative;
  overflow: hidden;
  text-align: left;
}

.warning-filter-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  content: "";
  background: #a8c2d8;
}

.warning-filter-card.bad::before,
.warning-filter-card.overdue::before { background: #ef4444; }
.warning-filter-card.warn::before { background: #f59e0b; }
.warning-filter-card.good::before { background: #10b981; }

.warning-filter-card.active {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.1), 0 12px 26px rgba(15, 76, 129, 0.08);
}

.warning-detail {
  display: grid;
  gap: 14px;
}

.warning-page-head {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.content[data-vue-view="warnings"] {
  width: 100%;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
}

.content[data-vue-view="warnings"] > * {
  min-width: 0;
}

.warning-page-head h3,
.warning-page-head p {
  margin: 0;
}

.warning-page-head p {
  margin-top: 5px;
}

.warning-stat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.warning-stat-grid .stat-card {
  min-height: 104px;
}

.warning-workbench {
  padding: 0;
  overflow: hidden;
}

.warning-module-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px 0;
  border-bottom: 1px solid #e3ebf3;
  background: #f8fbff;
}

.warning-module-tabs button {
  min-width: 142px;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-bottom: 3px solid transparent;
  color: #52677d;
  background: transparent;
  font-weight: 700;
}

.warning-module-tabs button.active {
  border-bottom-color: var(--brand);
  color: var(--brand);
  background: #fff;
}

.warning-module-tabs b {
  min-width: 22px;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  color: inherit;
  background: rgba(2, 132, 199, 0.1);
  font-size: 12px;
}

.warning-filter-panel {
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(126px, 170px)) auto;
  gap: 10px;
  align-items: center;
}

.warning-record-table {
  min-width: 1540px;
}

.warning-record-panel .table-wrap,
.warning-rule-panel .table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

.warning-record-row {
  cursor: pointer;
}

.warning-record-row:hover td,
.warning-record-row.active td {
  background: #f1f9fe;
}

.warning-record-row.active td:first-child {
  box-shadow: inset 3px 0 0 var(--brand);
}

.warning-row-actions {
  min-width: 286px;
}

.warning-row-actions .icon-action.primary {
  color: #fff;
  border-color: var(--brand);
  background: var(--brand);
}

.warning-status-select {
  width: 96px;
  height: 32px;
  padding: 0 24px 0 8px;
  border-radius: 7px;
  font-size: 12px;
}

.warning-record-empty {
  height: 120px;
  text-align: center;
}

.warning-record-empty b,
.warning-record-empty span {
  display: block;
}

.warning-record-empty b {
  margin-bottom: 6px;
  color: #334155;
  font-size: 15px;
}

.warning-detail-head {
  align-items: flex-start;
}

.warning-detail-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.warning-detail-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.warning-detail-summary .stat-card {
  min-height: 114px;
  display: grid;
  align-content: start;
  gap: 8px;
}

.warning-detail-summary .stat-card b {
  margin: 0;
  font-size: 26px;
}

.warning-detail-summary .stat-card small {
  color: var(--muted);
}

.warning-context-grid {
  padding: 14px 16px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  border: 1px solid #e3ebf3;
  border-radius: 10px;
  background: #f8fbff;
}

.warning-context-grid div {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.warning-context-grid span {
  color: var(--muted);
  font-size: 12px;
}

.warning-context-grid b {
  overflow: hidden;
  color: #1e3a5f;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warning-detail-copy {
  padding: 14px 16px;
  border-left: 3px solid var(--brand);
  background: #f5fbff;
}

.warning-detail-copy p {
  margin: 6px 0 0;
}

.warning-followup-empty {
  height: 96px;
  text-align: center;
}

.warning-followup-intro {
  grid-column: 1 / -1;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #cfe4f4;
  border-radius: 9px;
  color: #31516f;
  background: #f2f9fe;
}

.warning-followup-intro span {
  color: var(--muted);
  font-size: 13px;
}

.form-grid .field-wide {
  grid-column: 1 / -1;
}

.form-grid .field-wide textarea {
  min-height: 92px;
  resize: vertical;
}

.theme-dark .warning-module-tabs,
.theme-dark .warning-filter-panel,
.theme-dark .warning-context-grid,
.theme-dark .warning-detail-copy,
.theme-dark .warning-followup-intro {
  color: var(--ink);
  border-color: var(--line);
  background: #1b2a3a;
}

.theme-dark .warning-module-tabs button.active {
  color: #67c7f4;
  background: var(--panel);
}

.theme-dark .warning-record-row:hover td,
.theme-dark .warning-record-row.active td {
  background: #173247;
}

.theme-dark .warning-context-grid b,
.theme-dark .warning-record-empty b {
  color: var(--ink);
}

@container (max-width: 1050px) {
  .warning-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .warning-filter-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .warning-detail-summary,
  .warning-context-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@container (max-width: 620px) {
  .warning-page-head,
  .warning-followup-intro {
    align-items: stretch;
    flex-direction: column;
  }

  .warning-stat-grid,
  .warning-filter-panel,
  .warning-detail-summary,
  .warning-context-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .warning-module-tabs button {
    min-width: 0;
    flex: 1;
  }
}

.content[data-vue-view="logs"] {
  width: 100%;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
}

.content[data-vue-view="logs"] > * {
  min-width: 0;
}

.audit-page-head {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.audit-page-head h3,
.audit-page-head p {
  margin: 0;
}

.audit-page-head p {
  margin-top: 5px;
}

.audit-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.audit-stat-grid .stat-card {
  position: relative;
  min-height: 108px;
  overflow: hidden;
}

.audit-stat-grid .stat-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  content: "";
  background: #94a3b8;
}

.audit-stat-grid .stat-card.good::before { background: #10b981; }
.audit-stat-grid .stat-card.bad::before { background: #ef4444; }
.audit-stat-grid .stat-card.info::before { background: var(--brand); }

.audit-workbench {
  padding: 0;
  overflow: hidden;
}

.audit-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px 0;
  border-bottom: 1px solid #e3ebf3;
  background: #f8fbff;
}

.audit-tabs button {
  min-width: 132px;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-bottom: 3px solid transparent;
  color: #52677d;
  background: transparent;
  font-weight: 700;
}

.audit-tabs button.active {
  border-bottom-color: var(--brand);
  color: var(--brand);
  background: #fff;
}

.audit-filter-grid {
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(280px, 1.6fr) repeat(4, minmax(128px, 0.7fr)) auto auto;
  gap: 10px;
  align-items: center;
}

.audit-filter-grid > input,
.audit-filter-grid > select,
.audit-pager select {
  width: 100%;
}

.audit-table-panel .table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

.audit-table {
  min-width: 1240px;
}

.operation-log-table {
  min-width: 1480px;
}

.audit-table td {
  max-width: 230px;
  vertical-align: top;
}

.audit-table code,
.audit-detail code {
  color: #31516f;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.audit-path {
  max-width: 250px;
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-pager {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  border-top: 1px solid #e3ebf3;
}

.audit-pager select {
  width: 76px;
}

.audit-error,
.audit-empty {
  color: var(--muted);
  text-align: center;
}

.audit-error {
  min-height: 180px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
}

.audit-error b {
  color: #b91c1c;
}

.audit-empty {
  height: 132px;
}

.audit-detail {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.audit-detail > div {
  padding: 13px 15px;
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  border-bottom: 1px solid var(--line);
}

.audit-detail > div:last-child {
  border-bottom: 0;
}

.audit-detail span:first-child {
  color: var(--muted);
  font-size: 13px;
}

.audit-detail b {
  min-width: 0;
  overflow-wrap: anywhere;
}

.theme-dark .audit-tabs {
  border-color: var(--line);
  background: #1b2a3a;
}

.theme-dark .audit-tabs button.active {
  color: #67c7f4;
  background: var(--panel);
}

.theme-dark .audit-table code,
.theme-dark .audit-detail code {
  color: #9edcf8;
}

@container (max-width: 1160px) {
  .audit-filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .audit-filter-grid > input {
    grid-column: span 2;
  }
}

@container (max-width: 720px) {
  .audit-page-head {
    align-items: stretch;
    flex-direction: column;
  }

  .audit-stat-grid,
  .audit-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .audit-filter-grid > input {
    grid-column: 1 / -1;
  }

  .audit-pager {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@container (max-width: 480px) {
  .audit-stat-grid,
  .audit-filter-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .audit-filter-grid > input {
    grid-column: auto;
  }

  .audit-tabs button {
    min-width: 0;
    flex: 1;
  }

  .audit-detail > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
  }
}

.indicator-detail,
.detail-empty {
  display: grid;
  gap: 14px;
}

.indicator-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.42fr);
  gap: 14px;
}

.indicator-filter-panel {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) auto;
  align-items: end;
  gap: 12px 16px;
}

.indicator-filter-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(5, minmax(118px, 1fr));
  gap: 10px;
}

.indicator-filter-panel .search-box {
  flex: none;
  grid-template-columns: minmax(260px, 1fr) auto auto;
}

.indicator-filter-panel .toolbar {
  align-self: end;
}

.inline-filter {
  display: grid;
  gap: 6px;
}

.inline-filter span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.inline-filter select {
  min-height: 36px;
}

.indicator-editor-layout {
  display: grid;
  grid-template-columns: minmax(520px, 0.95fr) minmax(420px, 1.05fr);
  align-items: start;
  gap: 14px;
}

.indicator-list-panel,
.indicator-editor-layout > .indicator-detail,
.indicator-editor-layout > .detail-empty {
  min-width: 0;
}

.indicator-editor-layout > .indicator-detail,
.indicator-editor-layout > .detail-empty {
  position: sticky;
  top: 14px;
}

.indicator-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.indicator-summary-strip .stat-card {
  min-height: 96px;
}

.quick-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.quick-action {
  min-height: 58px;
  padding: 10px 12px;
  display: grid;
  gap: 4px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.quick-action.primary {
  color: #fff;
  border-color: var(--brand);
  background: var(--brand);
}

.quick-action:disabled,
.quick-action.disabled {
  cursor: default;
  opacity: 0.62;
}

.quick-action span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.quick-action.primary span {
  color: rgba(255, 255, 255, 0.78);
}

.mini-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.advanced-panel {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.advanced-panel summary {
  min-height: 56px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.advanced-panel summary::-webkit-details-marker {
  display: none;
}

.advanced-panel summary span:first-child {
  display: grid;
  gap: 3px;
}

.advanced-panel small {
  color: var(--muted);
}

.summary-caret {
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
}

.advanced-panel[open] .summary-caret {
  color: var(--muted);
  font-size: 0;
}

.advanced-panel[open] .summary-caret::before {
  content: "收起";
  font-size: 13px;
}

.advanced-actions {
  padding: 0 14px 14px;
}

.rule-template-selectors {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 12px;
  min-width: 0;
}

.rule-template-card {
  min-width: 0;
  padding: 14px;
  display: grid;
  gap: 12px;
  border: 1px solid #d8e6f3;
  border-radius: 8px;
  background: #fbfdff;
}

.rule-template-card.has-template {
  border-color: rgba(2, 132, 199, 0.26);
  background: #f6fbff;
}

.rule-template-card-head,
.rule-template-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  min-width: 0;
}

.rule-template-card-head span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.rule-template-card-head b {
  min-width: 0;
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rule-template-card-head small {
  padding: 4px 8px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.rule-template-current {
  min-height: 20px;
  margin: 0;
  color: #475569;
  font-size: 12px;
  line-height: 1.55;
}

.rule-template-control select {
  min-width: 0;
  width: 100%;
  height: 36px;
  border-radius: 8px;
}

.advanced-panel > .panel {
  margin: 0 14px 14px;
  min-width: 0;
  box-shadow: none;
}

.indicator-stat-result-panel {
  max-width: calc(100% - 28px);
  overflow: hidden;
}

.indicator-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.indicator-stat-grid .stat-card {
  min-width: 0;
  padding: 14px;
}

.indicator-stat-grid .stat-card b {
  font-size: 24px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.indicator-stat-result-panel .table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.indicator-stat-result-panel table {
  min-width: 360px;
}

.danger-text {
  color: var(--red);
}

.detail-copy {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.detail-copy p {
  margin: 0;
}

.progress-meter {
  width: 96px;
  height: 8px;
  display: inline-block;
  overflow: hidden;
  margin-right: 8px;
  vertical-align: middle;
  border-radius: 999px;
  background: #edf2f7;
}

.progress-meter span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--brand);
}

.progress-meter.good span { background: var(--green); }
.progress-meter.warn span { background: var(--amber); }
.progress-meter.bad span { background: var(--red); }

.progress-text {
  font-size: 13px;
}

.progress-text.good {
  color: var(--green);
}

.progress-text.warn {
  color: var(--amber);
}

.progress-text.bad {
  color: var(--red);
}

.stat-card b {
  display: block;
  margin-top: 10px;
  color: var(--brand-dark);
  font-size: 32px;
}

.overview-screen {
  padding: 20px;
  border: 1px solid rgba(2, 132, 199, 0.18);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(2, 132, 199, 0.12), transparent 34%),
    linear-gradient(180deg, #ffffff, #f8fcff);
  display: grid;
  gap: 16px;
}

.overview-screen-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.overview-screen-head h3 {
  margin: 0 0 4px;
  font-size: 20px;
}

.screen-chip {
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--brand);
  background: var(--brand-soft);
  font-weight: 700;
  font-size: 12px;
}

.indicator-portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.portal-indicator-card {
  min-height: 150px;
  padding: 16px;
  display: grid;
  gap: 8px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.portal-indicator-card.active {
  border-color: var(--brand);
  background: linear-gradient(180deg, #ffffff, #f0fdfa);
  box-shadow: 0 16px 30px rgba(15, 118, 110, 0.14);
}

.portal-indicator-card span,
.portal-indicator-card small {
  color: #52677d;
  font-size: 13px;
}

.portal-indicator-card b {
  min-height: 42px;
  font-size: 17px;
}

.portal-indicator-card strong {
  color: var(--brand);
  font-size: 32px;
  line-height: 1;
}

.portal-indicator-card i,
.rank-row i,
.map-tile i {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f7;
}

.portal-indicator-card i em,
.rank-row i span,
.map-tile i em {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--blue));
}

.portal-detail {
  display: grid;
  gap: 14px;
}

.portal-hero {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(320px, 1.2fr);
  align-items: center;
  gap: 20px;
}

.portal-hero h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.portal-hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.portal-gauge {
  width: 156px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--brand) var(--rate), #edf2f7 0);
}

.portal-gauge > div {
  width: 112px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  background: #fff;
}

.portal-gauge strong {
  color: var(--brand);
  font-size: 30px;
}

.portal-gauge span {
  color: var(--muted);
  font-size: 12px;
}

.portal-detail-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(420px, 1.25fr) minmax(280px, 0.82fr);
  gap: 14px;
}

.portal-map,
.portal-rank {
  min-width: 0;
}

.portal-map {
  color: #172033;
  border-color: rgba(15, 118, 110, 0.18);
  background:
    radial-gradient(circle at 24% 12%, rgba(34, 211, 238, 0.18), transparent 34%),
    linear-gradient(180deg, #f8fcff, #e9f6f8);
  box-shadow: inset 0 0 28px rgba(34, 211, 238, 0.08), 0 16px 36px rgba(8, 47, 73, 0.08);
}

.portal-map .lane-head span,
.portal-map .muted {
  color: #516070;
}

.region-map-layout {
  min-height: 330px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 10px;
  align-items: stretch;
}

.region-map-chart {
  min-height: 330px;
}

.region-map-rank {
  display: grid;
  align-content: start;
  gap: 8px;
  padding-top: 10px;
}

.map-rank-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 2px 7px;
  padding: 8px;
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.map-rank-row em {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #075985;
  background: #e0f2fe;
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
}

.map-rank-row b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.map-rank-row strong {
  grid-column: 2;
  color: #172033;
  font-size: 15px;
}

.map-rank-row.good {
  border-color: rgba(34, 197, 94, 0.36);
}

.map-rank-row.warn {
  border-color: rgba(34, 211, 238, 0.36);
}

.map-rank-row.bad {
  border-color: rgba(249, 115, 22, 0.42);
}

.map-empty {
  min-height: 320px;
  display: grid;
  place-items: center;
  color: #516070;
}

.map-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 10px;
}

.map-tile {
  min-height: 116px;
  padding: 12px;
  display: grid;
  align-content: space-between;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.map-tile.good {
  border-color: #bfe8cb;
  background: var(--green-soft);
}

.map-tile.warn {
  border-color: #f3d99b;
  background: var(--amber-soft);
}

.map-tile.bad {
  border-color: #f4b9b9;
  background: var(--red-soft);
}

.map-tile b,
.map-tile span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-tile span {
  color: var(--muted);
  font-size: 12px;
}

.map-tile strong {
  color: var(--brand);
  font-size: 22px;
}

.rank-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px 10px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.rank-row:first-of-type {
  border-top: 0;
}

.rank-row em {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--brand);
  font-style: normal;
  font-weight: 800;
  font-size: 12px;
}

.rank-row b,
.rank-row span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.rank-row strong {
  color: var(--brand);
}

.rank-row i {
  grid-column: 2 / -1;
}

.dashboard-stat {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.dashboard-stat span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.dashboard-stat b {
  display: block;
  margin-top: 8px;
  font-size: 30px;
}

.dashboard-stat.good { border-color: #bfe8cb; background: var(--green-soft); }
.dashboard-stat.warn { border-color: #f3d99b; background: var(--amber-soft); }
.dashboard-stat.bad { border-color: #f4b9b9; background: var(--red-soft); }
.dashboard-stat.info { border-color: #c3d6ff; background: var(--blue-soft); }

.warning-reminder-panel {
  border-color: rgba(15, 118, 110, 0.18);
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.08), transparent 38%),
    #fbfdff;
}

.warning-reminder-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.warning-reminder-item {
  min-width: 0;
  padding: 12px;
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.warning-reminder-item.good {
  border-color: #bfe8cb;
  background: var(--green-soft);
}

.warning-reminder-item.warn {
  border-color: #f3d99b;
  background: var(--amber-soft);
}

.warning-reminder-item.bad {
  border-color: #f4b9b9;
  background: var(--red-soft);
}

/* Overview cockpit layout */
.overview-screen {
  width: min(100%, 1600px);
  margin: 0 auto;
  padding: 0;
  display: grid;
  gap: 10px;
  border: 0;
  background: transparent;
  overflow-x: hidden;
}

.overview-screen-head,
.overview-section-card,
.overview-warning-center,
.overview-analysis-card,
.overview-trend-panel,
.overview-detail-table,
.portal-map,
.portal-rank {
  border-radius: 12px;
  border: 1px solid #d8e6f3;
  background: #fff;
  box-shadow: 0 4px 12px rgba(15, 39, 66, 0.06);
}

.overview-screen-head {
  min-height: 76px;
  padding: 16px 20px;
}

.overview-screen-head h3,
.overview-card-head h3 {
  margin: 0;
  color: #0f2742;
  font-size: 18px;
}

.overview-screen-head p,
.overview-card-head p {
  margin: 4px 0 0;
  color: #6b7c93;
  font-size: 13px;
}

.overview-card-head,
.overview-tabs,
.analysis-actions,
.overview-table-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.overview-table-filters select {
  height: 36px;
  min-width: 140px;
}

.overview-table-filters {
  flex-wrap: nowrap;
  align-items: end;
  gap: 10px;
  margin-bottom: 12px;
}

.overview-table-filter {
  min-width: 0;
  flex: 1 1 150px;
  display: grid;
  gap: 4px;
}

.overview-table-filter > span {
  color: #52677d;
  font-size: 12px;
  font-weight: 650;
}

.overview-table-filter select {
  width: 100%;
  min-width: 0;
  color: #29445f;
  background: #fff;
}

.overview-filter-actions {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
}

.overview-filter-actions .btn { height: 36px; white-space: nowrap; }

@media (max-width: 920px) {
  .overview-table-filters { flex-wrap: wrap; }
  .overview-table-filter { flex-basis: calc(50% - 8px); }
}

@media (max-width: 560px) {
  .overview-table-filter { flex-basis: 100%; }
  .overview-filter-actions { width: 100%; }
  .overview-filter-actions .btn { flex: 1; }
}

.overview-screen-head.dashboard-filter-panel {
  position: relative;
  z-index: 1;
  min-height: 0;
  padding: 10px 12px;
  display: block;
  border-color: #dfe7f1;
  box-sizing: border-box;
  container-type: inline-size;
}

.dashboard-filter-header {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.dashboard-filter-title-group {
  min-width: 0;
}

.overview-screen-head .dashboard-filter-title {
  margin: 0;
  color: #0f2742;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
}

.overview-screen-head .dashboard-filter-description {
  margin: 4px 0 0;
  color: #6b7c93;
  font-size: 13px;
}

.dashboard-filter-toolbar {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.overview-filter-group {
  display: grid;
  grid-template-columns: repeat(6, minmax(138px, 1fr));
  gap: 10px;
  align-items: end;
}

.overview-filter-group > label {
  min-width: 0;
  display: grid;
  gap: 6px;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

.overview-filter-group > label > select,
.overview-filter-group .smart-date-trigger {
  width: 100%;
  height: 40px;
}

@container (max-width: 1050px) {
  .overview-filter-group {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }
}

@container (max-width: 620px) {
  .overview-filter-group {
    grid-template-columns: minmax(0, 1fr);
  }
}

.dashboard-filter-primary {
  flex: 0 1 250px;
}

.dashboard-filter-toolbar .overview-date-filter,
.dashboard-filter-toolbar select {
  min-width: 0;
  width: 100%;
}

.dashboard-advanced-filter {
  /* 让展开面板以整条筛选栏为定位基准，避免向左展开时被总览容器裁切。 */
  position: static;
  flex: 0 0 auto;
}

.dashboard-advanced-filter > summary {
  height: 36px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  list-style: none;
  color: #31516f;
  border: 1px solid #d8e6f3;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  white-space: nowrap;
}

.dashboard-advanced-filter > summary::-webkit-details-marker { display: none; }
.dashboard-advanced-filter > summary i {
  width: 7px;
  height: 7px;
  border-right: 2px solid #60758b;
  border-bottom: 2px solid #60758b;
  transform: rotate(45deg) translateY(-2px);
}
.dashboard-advanced-filter[open] > summary { color: var(--brand); border-color: rgba(2, 132, 199, 0.42); background: #f4fbff; }
.dashboard-advanced-filter[open] > summary i { transform: rotate(225deg) translate(-1px, -1px); }

.dashboard-advanced-filter .dashboard-filter-grid {
  position: absolute;
  top: calc(100% + 8px);
  right: 12px;
  left: 12px;
  z-index: 30;
  width: auto;
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 10px;
  border: 1px solid #d8e6f3;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(15, 39, 66, 0.14);
}

.dashboard-filter-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.dashboard-filter-item {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.dashboard-filter-label {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
}

.dashboard-filter-item select,
.dashboard-filter-item .overview-date-filter,
.dashboard-filter-item .overview-date-filter > summary {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.dashboard-filter-item select {
  height: 36px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-filter-item .overview-date-filter {
  position: relative;
  z-index: 2;
}

.dashboard-filter-item .overview-date-filter > summary {
  height: 36px;
}

/* 时间筛选处于首列时，日期面板向右展开，避免被驾驶舱根容器裁切。 */
.dashboard-filter-item .overview-date-popover {
  right: auto;
  left: 0;
  width: min(320px, calc(100cqi - 40px));
  max-width: calc(100vw - 40px);
}

@container (max-width: 1100px) {
  .dashboard-filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@container (max-width: 720px) {
  .dashboard-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-filter-toolbar {
    flex-wrap: wrap;
  }

  .dashboard-filter-primary {
    flex: 1 1 220px;
  }

  .dashboard-advanced-filter .dashboard-filter-grid {
    right: 12px;
    left: 12px;
  }
}

@container (max-width: 460px) {
  .dashboard-filter-header {
    flex-direction: column;
  }

  .dashboard-filter-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-filter-toolbar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .dashboard-filter-primary,
  .dashboard-advanced-filter {
    width: 100%;
  }

  .dashboard-advanced-filter > summary {
    justify-content: center;
  }
}

.overview-date-filter {
  position: relative;
  min-width: 260px;
}

.overview-date-filter > summary {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px;
  list-style: none;
  color: #1e3a5f;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.overview-date-filter > summary::-webkit-details-marker {
  display: none;
}

.overview-date-filter > summary i {
  width: 7px;
  height: 7px;
  border-right: 2px solid #60758b;
  border-bottom: 2px solid #60758b;
  transform: rotate(45deg) translateY(-2px);
}

.overview-date-filter[open] > summary {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
}

.overview-date-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  width: 320px;
  padding: 14px;
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 39, 66, 0.18);
}

.overview-date-popover label {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 8px;
  color: #60758b;
  font-size: 13px;
}

.overview-date-popover input[type="date"] {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #1e3a5f;
  background: #f8fbff;
}

.overview-date-presets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.overview-date-presets button {
  min-height: 32px;
  padding: 0 8px;
  color: #31516f;
  border: 1px solid #d8e6f3;
  border-radius: 7px;
  background: #f8fbff;
  cursor: pointer;
}

.overview-date-presets button:hover {
  color: var(--brand);
  border-color: #91cde2;
  background: #eefaff;
}

.overview-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.overview-kpi-grid .indicator-kpi-card {
  min-height: 64px;
  height: 64px;
  padding: 8px 14px;
  gap: 2px;
}

.overview-kpi-grid .indicator-kpi-card b { font-size: 23px; }
.overview-kpi-grid .indicator-kpi-card small { display: none; }

.overview-section-card,
.overview-warning-center,
.overview-trend-panel,
.overview-detail-table,
.portal-map,
.portal-rank {
  padding: 16px;
}

.overview-card-head {
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.overview-tabs {
  margin-bottom: 12px;
}

.overview-tabs.compact {
  margin-bottom: 0;
}

.overview-tabs button {
  min-height: 32px;
  padding: 0 12px;
  color: #29445f;
  border: 1px solid #d8e6f3;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  font-weight: 700;
}

.overview-tabs button.active {
  color: var(--brand);
  border-color: rgba(2, 132, 199, 0.38);
  background: var(--brand-soft);
}

.overview-detail-summary {
  margin: 5px 0 0;
  color: #40566d;
  font-size: 14px;
  font-weight: 600;
}

.overview-subject-table td:first-child b,
.overview-subject-table td:first-child small {
  display: block;
}

.overview-subject-table td:first-child b { color: #1f3347; }
.overview-subject-table td:first-child small { margin-top: 3px; color: #6b7c93; font-size: 12px; }

.overview-detail-row { cursor: default; }

.overview-rank {
  min-width: 32px;
  padding: 4px 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #52677d;
  background: #eef2f6;
  font-size: 12px;
  font-weight: 800;
}

.overview-rank.rank-1 { color: #8a5a00; background: #fff1bd; }
.overview-rank.rank-2 { color: #56616d; background: #e9eef3; }
.overview-rank.rank-3 { color: #855137; background: #f5e1d5; }

.overview-detail-name { color: #1f3347 !important; text-decoration: none; }

.overview-subject-table { table-layout: fixed; }
.overview-subject-table.is-compact th:nth-child(1), .overview-subject-table.is-compact td:nth-child(1) { width: 29%; }
.overview-subject-table.is-compact th:nth-child(2), .overview-subject-table.is-compact td:nth-child(2) { width: 16%; }
.overview-subject-table.is-compact th:nth-child(3), .overview-subject-table.is-compact td:nth-child(3) { width: 38%; }
.overview-subject-table.is-compact th:nth-child(4), .overview-subject-table.is-compact td:nth-child(4) { width: 17%; }

.overview-subject-table .progress-meter { width: 180px; height: 7px; margin-right: 10px; background: #eef2f6; }
.overview-subject-table .progress-meter.bad { background: #fde5e5; }
.overview-subject-table .progress-meter.warn { background: #fff1d6; }
.overview-subject-table .progress-meter.good { background: #def5e6; }
.overview-subject-table .progress-text { min-width: 48px; display: inline-block; background: transparent; font-size: 13px; font-variant-numeric: tabular-nums; }

.overview-sort-button {
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  color: #29445f;
  background: transparent;
  font-weight: 750;
}
.overview-sort-button span { color: #71839a; font-size: 12px; }
.overview-sort-button.active, .overview-sort-button:hover { color: var(--brand); }
.overview-sort-button.active span { color: inherit; }

.overview-table-filters { justify-content: flex-start; }
.overview-table-filter { flex: 0 1 240px; }
.overview-filter-actions { margin-left: 6px; padding-left: 6px; border-left: 1px solid #d7e3ef; }
.overview-table-more { position: relative; }
.overview-table-more .icon-action { width: 36px; letter-spacing: 1px; }

.overview-tabs button b {
  min-width: 18px;
  padding: 1px 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  border-radius: 999px;
  background: rgba(96, 117, 139, 0.12);
  font-size: 12px;
  line-height: 16px;
}

.overview-tabs button.active b {
  background: rgba(2, 132, 199, 0.14);
}

.indicator-portal-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.portal-indicator-card {
  min-height: 124px;
  padding: 14px;
  border-radius: 12px;
  box-shadow: none;
}

.portal-indicator-card.is-risk {
  border-color: rgba(245, 158, 11, 0.42);
  background: #fffaf0;
}

.portal-indicator-card.is-empty {
  opacity: 0.72;
  background: #fbfdff;
}

.portal-indicator-card b {
  min-height: auto;
  font-size: 15px;
}

.portal-indicator-card strong {
  font-size: 24px;
}

.overview-collection-card {
  align-content: start;
  min-height: 0;
  padding: 4px 12px 10px;
  border: 0;
  border-left: 3px solid #b8d8ea;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.overview-collection-card.active { border-left-color: var(--brand); }
.overview-collection-card.is-risk { border-left-color: #f59e0b; background: transparent; }
.overview-collection-card.is-empty { border-left-color: #94a3b8; background: transparent; opacity: .82; }

.overview-collection-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.overview-collection-head span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-period-strip,
.overview-period-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.overview-period-strip {
  margin-top: 6px;
  padding-top: 7px;
  border-top: 1px solid #e2edf5;
}

.overview-period-button,
.overview-period-switch button {
  min-width: 0;
  border: 1px solid #d8e6f3;
  border-radius: 8px;
  background: #f8fbff;
  color: #0f2742;
  text-align: left;
  font-weight: 700;
}

.overview-period-button {
  flex: 1 1 108px;
  min-height: 42px;
  padding: 5px 6px;
  display: grid;
  gap: 4px;
}

.overview-period-strip .overview-period-button {
  border: 0;
  border-radius: 6px;
  background: transparent;
}

.overview-period-strip .overview-period-button:hover {
  background: #eef7fc;
}

.overview-period-button span,
.overview-period-button b,
.overview-period-switch button span,
.overview-period-switch button b {
  min-height: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-period-button b,
.overview-period-switch button b {
  color: var(--brand);
  font-size: 13px;
}

.overview-period-button span,
.overview-period-switch button span {
  color: #52677d;
  font-size: 13px;
}

.overview-period-button i {
  height: 5px;
}

.overview-period-button.active,
.overview-period-switch button.active {
  border-color: rgba(2, 132, 199, 0.48);
  background: var(--brand-soft);
}

.overview-period-strip .overview-period-button.active {
  border: 0;
  background: var(--brand-soft);
}

.overview-period-more {
  align-self: center;
  padding: 6px 8px;
  border-radius: 999px;
  color: var(--brand);
  background: var(--brand-soft);
  font-size: 13px;
  font-weight: 800;
}

.overview-period-switch {
  max-height: 104px;
  overflow: auto;
}

.overview-period-switch button {
  flex: 0 1 118px;
  min-height: 38px;
  padding: 6px 8px;
  display: grid;
  gap: 2px;
}

.overview-warning-center {
  display: grid;
  grid-template-columns: minmax(280px, 0.38fr) minmax(0, 1fr);
  gap: 16px;
}

.overview-warning-center .overview-card-head {
  grid-column: 1 / -1;
}

.warning-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.overview-warning-center .warning-reminder-list {
  grid-template-columns: 1fr;
}

.warning-reminder-item {
  width: 100%;
  text-align: left;
}

.overview-analysis-card {
  min-height: 160px;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px minmax(320px, 0.9fr);
  align-items: center;
  gap: 18px;
}

.analysis-copy {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.analysis-copy h3 {
  margin: 0 0 8px;
  color: #0f2742;
  font-size: 20px;
}

.analysis-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.overview-map-rank-layout {
  display: grid;
  grid-template-columns: minmax(0, 65fr) minmax(320px, 35fr);
  gap: 16px;
}

.portal-map,
.portal-rank {
  min-width: 0;
  min-height: 500px;
  color: #172033;
  background: #fff;
}

.region-map-layout {
  min-height: 430px;
  grid-template-columns: minmax(0, 1fr);
}

.region-map-chart {
  min-height: 430px;
}

.region-map-rank {
  display: none;
}

.portal-rank {
  display: grid;
  align-content: start;
  gap: 10px;
}

.rank-row {
  width: 100%;
  min-height: 54px;
  padding: 10px;
  border: 0;
  border-radius: 12px;
  background: #f8fbff;
  text-align: left;
}

.rank-row.top-rank,
.rank-row:first-of-type {
  background: #fff7ed;
}

.trend-bars {
  height: 300px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(34px, 1fr));
  align-items: end;
  gap: 10px;
  padding: 18px 8px 4px;
}

.trend-bars div {
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto auto;
  justify-items: center;
  gap: 6px;
  min-width: 0;
}

.trend-bars i {
  width: 18px;
  align-self: end;
  border-radius: 999px 999px 4px 4px;
  background: linear-gradient(180deg, var(--brand), #38bdf8);
}

.trend-bars span,
.trend-bars b {
  font-size: 11px;
  color: #6b7c93;
}

.overview-detail-table .table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.overview-subject-table {
  min-width: 920px;
}

.overview-empty {
  min-height: 120px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  color: #6b7c93;
  border: 1px dashed #d8e6f3;
  border-radius: 12px;
  background: #f8fbff;
}

.warning-reminder-item b,
.warning-reminder-item span,
.warning-reminder-item small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warning-reminder-item span,
.warning-reminder-item small {
  color: var(--muted);
  font-size: 12px;
}

.warning-reminder-item strong {
  color: var(--brand);
}

.lane-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.lane-head span {
  color: var(--muted);
  font-size: 12px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid #e2eaf3;
  border-radius: 12px;
  background: #fff;
}

.indicator-compact-table table {
  min-width: 720px;
}

.indicator-compact-table th,
.indicator-compact-table td {
  padding: 10px;
}

.indicator-compact-table th:nth-child(1) {
  width: 32%;
}

.indicator-compact-table th:nth-child(2),
.indicator-compact-table th:nth-child(3),
.indicator-compact-table th:nth-child(5) {
  width: 78px;
}

.indicator-compact-table th:nth-child(4) {
  width: 150px;
}

.indicator-compact-table th:nth-child(6) {
  width: 210px;
}

.table-main-link {
  padding: 0;
  color: var(--text);
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 800;
  text-align: left;
}

.table-main-link:hover {
  color: var(--brand);
}

.department-table-wrap,
.smart-table-wrap {
  overflow: visible;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 760px;
}

th,
td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

tbody tr:hover {
  background: var(--surface-hover);
}

tbody tr.selected-row {
  background: var(--surface-selected);
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--heading);
  background: var(--surface-subtle);
  font-size: 13px;
  font-weight: 800;
}

.filter-th {
  position: relative;
  white-space: nowrap;
}

.filter-controls {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  vertical-align: middle;
}

.filter-chip {
  width: 24px;
  height: 24px;
  padding: 0;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.filter-chip.active,
.filter-chip:hover {
  color: var(--brand);
  border-color: rgba(15, 118, 110, 0.35);
  background: var(--brand-soft);
}

.filter-clear {
  width: 22px;
  height: 22px;
  padding: 0;
  color: var(--red);
  border: 1px solid #f7caca;
  border-radius: 999px;
  background: var(--red-soft);
  line-height: 1;
  text-align: center;
  font-weight: 800;
}

.filter-clear:hover {
  color: #fff;
  background: var(--red);
}

.filter-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 8px;
  z-index: 50;
  width: clamp(200px, 18vw, 280px);
  min-height: 156px;
  max-height: min(320px, 42vh);
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 32, 49, 0.16);
}

.filter-menu-cascade {
  width: clamp(320px, 30vw, 440px);
  grid-template-columns: minmax(112px, 0.8fr) minmax(160px, 1.2fr);
  gap: 8px;
  overflow: hidden;
}

.filter-menu button {
  min-height: 32px;
  padding: 0 8px;
  text-align: left;
  border: 0;
  border-radius: 6px;
  background: transparent;
}

.filter-menu button:hover,
.filter-menu button.active {
  color: var(--brand);
  background: var(--brand-soft);
}

.filter-level,
.filter-options {
  min-height: 172px;
  max-height: min(320px, 42vh);
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 4px;
}

.filter-level {
  padding-right: 8px;
  border-right: 1px solid var(--line);
}

.filter-level button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.filter-level span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.filter-menu-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  margin-bottom: 4px;
}

.filter-menu-search {
  min-height: 32px;
  padding: 6px 8px;
}

.filter-menu-search-btn {
  min-height: 32px;
  padding: 0 10px;
  font-size: 13px;
}

.filter-empty {
  padding: 8px;
  font-size: 13px;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.pager-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.pager-field input,
.pager-field select {
  width: 76px;
  min-height: 34px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: 12px;
}

.form-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-grid.single {
  grid-template-columns: 1fr;
}

.field {
  display: grid;
  align-self: start;
  gap: 6px;
}

.field label {
  color: #344056;
  font-size: 13px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 38px;
  height: 38px;
  padding: 8px 10px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

input:focus,
select:focus {
  border-color: var(--brand);
  outline: 3px solid rgba(15, 118, 110, 0.12);
}

.indicator-scope-field {
  grid-column: span 2;
}

.scope-search {
  margin-bottom: 8px;
}

.scope-check-list {
  max-height: 180px;
  overflow: auto;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.scope-check {
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 7px;
}

.scope-check:hover {
  background: var(--brand-soft);
}

.scope-check input {
  width: auto;
  min-height: auto;
  height: auto;
}

.scope-check span {
  flex: 1;
  min-width: 0;
}

.scope-target-input {
  width: 120px;
  min-height: 32px;
  height: 32px;
}

.field-error input,
.field-error select,
.field-error .cascade-trigger {
  border-color: var(--red);
  background: #fffafa;
}

.field-error input:focus,
.field-error select:focus,
.field-error .cascade-select:focus-within .cascade-trigger {
  outline-color: rgba(220, 38, 38, 0.14);
}

.cascade-field {
  position: relative;
  grid-column: span 2;
}

.cascade-select {
  position: relative;
}

.cascade-trigger {
  width: 100%;
  min-height: 38px;
  padding: 8px 34px 8px 10px;
  color: var(--ink);
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.cascade-trigger::after {
  content: "▾";
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  color: var(--muted);
}

.cascade-select:focus-within .cascade-trigger {
  border-color: var(--brand);
  outline: 3px solid rgba(15, 118, 110, 0.12);
}

.cascade-menu {
  position: static;
  z-index: 80;
  width: 100%;
  max-height: 300px;
  overflow: hidden;
  display: none;
  margin-top: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 32, 49, 0.16);
}

.cascade-select:focus-within .cascade-menu {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.cascade-column {
  min-width: 0;
  max-height: 284px;
  overflow: auto;
  padding: 4px;
  border-right: 1px solid var(--line);
}

.cascade-column:last-child {
  border-right: 0;
}

.cascade-column h4 {
  position: sticky;
  top: -4px;
  z-index: 1;
  margin: 0 0 6px;
  padding: 4px 6px 6px;
  color: #344056;
  background: #fff;
  font-size: 12px;
}

.cascade-column-list {
  display: grid;
  gap: 4px;
}

.cascade-option {
  position: relative;
  width: 100%;
  min-height: 34px;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  border: 0;
  border-radius: 6px;
  background: transparent;
}

.cascade-option:hover,
.cascade-option.active {
  color: var(--brand);
  background: var(--brand-soft);
}

.btn {
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  font-weight: 700;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.btn:hover,
.icon-action:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 10px 18px rgba(2, 132, 199, 0.18);
}

.btn-soft {
  color: var(--brand);
  background: var(--brand-soft);
}

.btn-line {
  color: var(--heading);
  border: 1px solid var(--line);
  background: var(--surface-raised);
}

.icon-action {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--heading);
  background: var(--surface-raised);
  font-size: 13px;
  font-weight: 700;
}

.icon-action.danger {
  color: var(--red);
  background: var(--red-soft);
  border-color: #f7caca;
}

.actions-cell {
  min-width: 180px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.compact-actions {
  min-width: 204px;
  flex-wrap: nowrap;
  align-items: center;
}

.row-more {
  position: relative;
}

.row-more summary {
  list-style: none;
  cursor: pointer;
}

.row-more summary.icon-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  line-height: 1;
  text-align: center;
}

.row-more summary::-webkit-details-marker {
  display: none;
}

.row-more-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  min-width: 112px;
  padding: 6px;
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(8, 47, 73, 0.16);
}

.row-more-menu button {
  padding: 8px 10px;
  color: var(--text);
  border: 0;
  border-radius: 6px;
  background: transparent;
  text-align: left;
  font-weight: 700;
}

.row-more-menu button:hover {
  background: #f0f9ff;
}

.row-more-menu button.danger-text {
  color: var(--red);
}

.module-list {
  display: grid;
  gap: 8px;
}

.module-group-list {
  display: grid;
  gap: 14px;
}

.module-setting-group {
  min-width: 0;
  padding: 14px;
  border: 1px solid #d8e6f3;
  border-radius: 12px;
  background: #f8fbff;
}

.module-setting-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.module-setting-group-title {
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.module-setting-group-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #0369a1;
  background: #e0f2fe;
  font-weight: 800;
}

.module-setting-group-title h4,
.module-setting-group-title p {
  margin: 0;
}

.module-setting-group-title h4 {
  color: #0f2742;
  font-size: 16px;
}

.module-setting-group-title p {
  margin-top: 4px;
  color: #6b7c93;
  font-size: 12px;
}

.module-setting-group-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.module-group-state {
  padding: 4px 8px;
  border-radius: 999px;
  color: #92400e;
  background: #fef3c7;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.module-group-state.is-open {
  color: #047857;
  background: #dcfce7;
}

.module-settings-page {
  width: min(100%, 1240px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
}

.module-settings-main,
.module-help-card {
  border-radius: 12px;
  border: 1px solid #d8e6f3;
  background: #fff;
  box-shadow: 0 4px 12px rgba(15, 39, 66, 0.06);
}

.module-settings-main {
  padding: 16px;
}

.module-settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.module-settings-head h3,
.module-settings-head p,
.module-help-card h3,
.module-help-card ul {
  margin: 0;
}

.module-settings-head h3,
.module-help-card h3 {
  color: #0f2742;
  font-size: 18px;
}

.module-settings-head p {
  margin-top: 4px;
  color: #6b7c93;
  font-size: 13px;
}

.module-settings-actions,
.module-quick-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.module-save-tip {
  margin-bottom: 12px;
  padding: 9px 12px;
  color: #7c5200;
  border: 1px solid #fde8a8;
  border-radius: 10px;
  background: #fff8db;
  font-size: 13px;
}

.module-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  min-height: 68px;
  gap: 16px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.module-item:hover {
  border-color: rgba(2, 132, 199, 0.38);
  background: #f6fbff;
  box-shadow: 0 8px 18px rgba(2, 132, 199, 0.08);
}

.module-item.is-dragging {
  opacity: 0.55;
  border-color: var(--brand);
  box-shadow: 0 12px 24px rgba(2, 132, 199, 0.14);
}

.module-item.drag-over-before {
  border-top-color: var(--brand);
  box-shadow: inset 0 3px 0 var(--brand), 0 8px 18px rgba(2, 132, 199, 0.08);
}

.module-item.drag-over-after {
  border-bottom-color: var(--brand);
  box-shadow: inset 0 -3px 0 var(--brand), 0 8px 18px rgba(2, 132, 199, 0.08);
}

.module-item.is-hidden-module {
  opacity: 0.62;
  background: #fbfdff;
}

.module-item[draggable="true"]:active {
  border-color: var(--brand);
  box-shadow: 0 12px 24px rgba(2, 132, 199, 0.14);
}

.module-item-main {
  min-width: 0;
  display: grid;
  grid-template-columns: 18px 36px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.drag-handle {
  color: #9aaabe;
  cursor: grab;
  line-height: 1;
}

.module-item-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--brand);
  background: #e0f2fe;
  font-size: 15px;
}

.module-item b,
.module-item p {
  margin: 0;
}

.module-item p {
  margin-top: 4px;
  color: #6b7c93;
  font-size: 13px;
}

.module-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.module-order,
.lock-mark {
  color: #6b7c93;
  font-size: 12px;
  font-weight: 700;
}

.lock-mark {
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef4fb;
}

.module-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.module-inline-actions {
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.16s ease;
}

.module-item:hover .module-inline-actions {
  opacity: 1;
}

.module-settings-side {
  display: grid;
  align-content: start;
  gap: 16px;
  position: sticky;
  top: 24px;
}

.module-help-card {
  padding: 16px;
}

.module-help-card ul {
  display: grid;
  gap: 8px;
  padding-left: 18px;
  color: #34495e;
  font-size: 13px;
}

.module-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.module-stat-grid article {
  padding: 10px;
  border-radius: 10px;
  background: #f5f9fd;
}

.module-stat-grid span {
  display: block;
  color: #6b7c93;
  font-size: 12px;
}

.module-stat-grid b {
  display: block;
  margin-top: 4px;
  color: #0f2742;
  font-size: 22px;
}

.module-quick-actions {
  margin-top: 12px;
  justify-content: flex-start;
}

.team-page {
  width: min(100%, 1440px);
  margin: 0 auto;
  display: grid;
  gap: 16px;
  overflow-x: hidden;
}

.user-page {
  width: min(100%, 1440px);
  margin: 0 auto;
  display: grid;
  gap: 16px;
  overflow-x: hidden;
}

.team-toolbar,
.user-toolbar,
.user-table-panel,
.role-panel,
.team-table-panel,
.team-stat-card {
  border-radius: 12px;
  border: 1px solid #d8e6f3;
  background: #fff;
  box-shadow: 0 4px 12px rgba(15, 39, 66, 0.06);
}

.team-toolbar {
  min-height: 72px;
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(260px, 380px) minmax(150px, 190px) minmax(130px, 160px) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.user-toolbar {
  min-height: 104px;
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(280px, 1.5fr) repeat(5, minmax(130px, 1fr));
  align-items: center;
  gap: 12px;
}

.team-toolbar input,
.team-toolbar select,
.user-toolbar input,
.user-toolbar select {
  height: 38px;
}

.team-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.user-toolbar-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 8px;
}

.team-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.user-stat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.team-stat-card {
  height: 88px;
  padding: 14px 16px;
  display: grid;
  align-content: center;
  gap: 5px;
}

.team-stat-card span,
.team-stat-card small {
  color: #6b7c93;
}

.team-stat-card span {
  font-size: 13px;
}

.team-stat-card b {
  color: #0f2742;
  font-size: 28px;
  line-height: 1.1;
}

.team-stat-card.good b {
  color: var(--green);
}

.team-stat-card.warn b {
  color: var(--amber);
}

.team-stat-card small {
  font-size: 12px;
}

.team-table-panel,
.user-table-panel,
.role-panel {
  padding: 16px;
}

.team-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.team-table-head h3,
.team-table-head p {
  margin: 0;
}

.team-table-head h3 {
  color: #0f2742;
  font-size: 18px;
}

.team-table-head p {
  margin-top: 4px;
  color: #6b7c93;
  font-size: 13px;
}

.team-batch-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.team-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border-color: #d8e6f3;
  border-radius: 12px;
}

.user-table-wrap,
.role-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border-color: #d8e6f3;
  border-radius: 12px;
}

.team-table {
  min-width: 860px;
}

.user-table {
  min-width: 1120px;
}

.role-table {
  min-width: 920px;
}

.center-table {
  min-width: 980px;
}

.org-node {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 6px;
  border-radius: 6px;
  color: var(--brand);
  background: var(--brand-soft);
  font-size: 13px;
  font-weight: 800;
  vertical-align: middle;
}

.team-table th {
  background: #f1f7fd;
}

.user-table th,
.role-table th {
  background: #f1f7fd;
}

.team-table th,
.team-table td,
.user-table th,
.user-table td,
.role-table th,
.role-table td {
  height: 54px;
  padding: 10px 12px;
  font-size: 14px;
}

.team-table tbody tr:hover,
.user-table tbody tr:hover,
.role-table tbody tr:hover {
  background: #f0f9ff;
}

.select-col {
  width: 42px;
  text-align: center;
}

.team-actions-col {
  width: 170px;
}

.user-actions-col {
  width: 210px;
}

.team-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.organization-page {
  display: grid;
  gap: 14px;
}

.organization-toolbar {
  grid-template-columns: minmax(220px, 1.35fr) minmax(130px, .6fr) minmax(130px, .6fr) auto;
}

.organization-tree-panel { padding: 0; overflow: hidden; }
.organization-tree-panel .team-table-head { padding: 16px 18px 12px; }
.organization-tree-table td:first-child { min-width: 240px; }
.organization-tree-row td:first-child { white-space: nowrap; }
.organization-tree-row td:first-child b { margin-right: 9px; }
.organization-tree-row td:first-child small { color: #7b8da0; font-size: 12px; }
.organization-tree-row.is-center { background: rgba(240, 249, 255, .58); }
.organization-tree-row.is-team td:first-child { padding-left: 42px; }
.organization-indent { width: 22px; display: inline-block; color: #1683b7; font-weight: 800; text-align: center; }
.organization-tree-row.is-team .organization-indent { color: #9aafc0; }
.organization-empty { padding: 48px !important; text-align: center; }

.department-time-cell {
  min-width: 174px;
  white-space: nowrap;
}

.department-time-cell > span {
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.65;
}

.department-time-cell em {
  min-width: 28px;
  color: #718096;
  font-size: 12px;
  font-style: normal;
}

.department-time-cell time {
  color: #42526b;
  font-variant-numeric: tabular-nums;
}

.team-table-panel .pager {
  margin-top: 16px;
  padding: 16px 0 0;
  justify-content: flex-end;
}

.user-table-panel .pager {
  margin-top: 16px;
  padding: 16px 0 0;
  justify-content: flex-end;
}

.selection-bar {
  min-height: 42px;
  margin-bottom: 12px;
  padding: 8px 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(2, 132, 199, 0.18);
  border-radius: 10px;
  color: #0f2742;
  background: #eff8ff;
}

.selection-bar span {
  font-weight: 800;
}

.selection-bar button {
  min-height: 30px;
  padding: 0 8px;
  color: var(--brand);
  border: 0;
  background: transparent;
  font-weight: 700;
}

.org-path-text {
  display: inline-block;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.role-panel .pill.bad {
  color: #64748b;
  background: #eef2f7;
}

.team-empty {
  min-height: 260px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: #34495e;
  border: 1px dashed #c9ddeb;
  border-radius: 12px;
  background: #f8fbff;
}

.team-empty-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--brand);
  background: var(--brand-soft);
  font-size: 22px;
}

.module-settings-page .btn,
.module-settings-page .icon-action,
.module-settings-page .row-more summary {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.module-more .row-more-menu {
  right: 0;
}

.utility-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
}

.search-box {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.good {
  color: #047857;
  background: #dcfce7;
}

.warn {
  color: var(--amber);
  background: var(--amber-soft);
}

.bad {
  color: var(--red);
  background: var(--red-soft);
}

.info {
  color: #0369a1;
  background: #e0f2fe;
}

.toast {
  padding: 12px 14px;
  border-radius: 8px;
  color: var(--brand);
  background: var(--brand-soft);
}

.toast[data-tone="error"] {
  color: var(--red);
  background: var(--red-soft);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(15, 32, 49, 0.42);
}

.modal {
  width: min(920px, 100%);
  max-height: calc(100vh - 56px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 22px 70px rgba(15, 32, 49, 0.22);
}

.modal.modal-wide {
  width: min(1120px, 100%);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: #fbfdff;
}

.modal-head h3,
.modal-head p {
  margin: 0;
}

.modal-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-drag-handle {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 4px;
  color: #6b7c93;
  background: transparent;
  cursor: grab;
  font-size: 18px;
  line-height: 1;
  touch-action: none;
}

.modal-drag-handle:hover,
.modal-drag-handle:focus-visible {
  color: var(--primary);
  background: #eef7ff;
  outline: none;
}

.indicator-group-readonly > div {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid #d7e3f0;
  border-radius: 7px;
  color: #52677d;
  background: #f6f9fc;
}

.modal.is-dragging {
  user-select: none;
}

.modal.is-dragging .modal-drag-handle {
  cursor: grabbing;
}

.modal-head h3 {
  font-size: 20px;
}

.modal-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.modal-body {
  overflow: auto;
  padding: 18px;
}

.assignment-body {
  display: grid;
  gap: 14px;
}

.template-workbench-body {
  display: grid;
  gap: 14px;
}

.template-edit-notice {
  padding: 10px 12px;
  border: 1px solid #cfe6fb;
  border-radius: 8px;
  color: #28577d;
  background: #f3f9ff;
  font-size: 13px;
  line-height: 1.55;
}

.assignment-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.assignment-summary article {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.assignment-summary b,
.assignment-summary small {
  display: block;
  overflow-wrap: anywhere;
}

.assignment-summary b {
  margin: 6px 0 4px;
}

.assignment-summary small {
  color: var(--muted);
}

.template-apply-bar {
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  align-items: center;
  gap: 12px;
  border: 1px solid #cfe0f3;
  border-radius: 8px;
  background: #f6fbff;
}

.template-apply-bar b,
.template-apply-bar span {
  display: block;
}

.template-apply-bar b {
  color: var(--ink);
  font-size: 14px;
}

.template-apply-bar span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.template-apply-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.template-apply-control select {
  width: 100%;
}

.import-rule-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.template-rule-card-editor {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid #d8e6f3;
  border-radius: 8px;
  background: #f8fbff;
}

.template-rule-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.template-rule-card-head b,
.template-rule-card-head span {
  display: block;
}

.template-rule-card-head span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.template-rule-form-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.template-rule-form-panel .form-grid {
  padding: 12px;
}

.rule-card-import-panel {
  background: #fff;
}

.import-rule-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #fbfdff;
}

.import-rule-head small {
  color: var(--muted);
  font-size: 12px;
}

.import-rule-grid {
  display: grid;
  grid-template-columns: 52px minmax(120px, 0.9fr) minmax(120px, 0.9fr) minmax(160px, 1.2fr) 110px 116px;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
}

.import-rule-grid-head {
  color: #3c485c;
  background: #f7fafc;
  font-size: 13px;
  font-weight: 700;
}

.import-rule-rows {
  display: grid;
  gap: 0;
  max-height: 290px;
  overflow-y: auto;
}

.import-rule-rows .import-rule-grid {
  border-top: 1px solid var(--line);
}

.import-rule-rows .import-rule-grid.is-dragging {
  opacity: 0.5;
}

.import-rule-rows .import-rule-grid.drag-over-before {
  box-shadow: inset 0 2px 0 var(--brand);
}

.import-rule-rows .import-rule-grid.drag-over-after {
  box-shadow: inset 0 -2px 0 var(--brand);
}

.import-rule-grid input[readonly] {
  color: #42526b;
  background: #f4f7fb;
  cursor: default;
}

.import-rule-grid select:disabled {
  color: #42526b;
  background: #f4f7fb;
  opacity: 1;
}

.field-order-handle {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #cfe0f3;
  border-radius: 8px;
  color: #31516f;
  background: #f8fbff;
  cursor: grab;
  font-weight: 900;
  line-height: 1;
}

.field-order-handle:active {
  cursor: grabbing;
}

.import-rule-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.mini-icon-action {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  padding: 0;
  border: 1px solid #d5e1ed;
  border-radius: 7px;
  color: #41708f;
  background: #fff;
  cursor: pointer;
  transition: color 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.08s ease;
}

.mini-icon-action:hover {
  color: #087ea4;
  border-color: #8fd3e8;
  background: #f0fbff;
}

.mini-icon-action:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
}

.mini-icon-action:active {
  transform: translateY(1px);
}

.mini-icon-action.danger {
  color: #c45a62;
  border-color: #f0d2d5;
  background: #fff;
}

.mini-icon-action.danger:hover {
  color: #dc2626;
  border-color: #f2aeb4;
  background: #fff5f5;
}

.mini-icon-action.edit.is-active {
  color: #fff;
  border-color: #0891b2;
  background: #0891b2;
}

.mini-icon-action.edit.is-active:hover {
  border-color: #0e7490;
  background: #0e7490;
}

.import-action-icon {
  width: 16px;
  height: 16px;
  display: block;
  background-color: currentColor;
  -webkit-mask: center / contain no-repeat;
  mask: center / contain no-repeat;
}

.import-action-icon.icon-plus {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M11 5a1 1 0 0 1 2 0v6h6a1 1 0 1 1 0 2h-6v6a1 1 0 1 1-2 0v-6H5a1 1 0 1 1 0-2h6V5Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M11 5a1 1 0 0 1 2 0v6h6a1 1 0 1 1 0 2h-6v6a1 1 0 1 1-2 0v-6H5a1 1 0 1 1 0-2h6V5Z'/%3E%3C/svg%3E");
}

.import-action-icon.icon-trash {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 3a2 2 0 0 0-2 2H4a1 1 0 1 0 0 2h1l.8 12.1A2 2 0 0 0 7.8 21h8.4a2 2 0 0 0 2-1.9L19 7h1a1 1 0 1 0 0-2h-3a2 2 0 0 0-2-2H9Zm0 2h6v.01H9V5Zm-2 2h10l-.8 12H7.8L7 7Zm3 3a1 1 0 0 0-1 1v4a1 1 0 1 0 2 0v-4a1 1 0 0 0-1-1Zm4 0a1 1 0 0 0-1 1v4a1 1 0 1 0 2 0v-4a1 1 0 0 0-1-1Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 3a2 2 0 0 0-2 2H4a1 1 0 1 0 0 2h1l.8 12.1A2 2 0 0 0 7.8 21h8.4a2 2 0 0 0 2-1.9L19 7h1a1 1 0 1 0 0-2h-3a2 2 0 0 0-2-2H9Zm0 2h6v.01H9V5Zm-2 2h10l-.8 12H7.8L7 7Zm3 3a1 1 0 0 0-1 1v4a1 1 0 1 0 2 0v-4a1 1 0 0 0-1-1Zm4 0a1 1 0 0 0-1 1v4a1 1 0 1 0 2 0v-4a1 1 0 0 0-1-1Z'/%3E%3C/svg%3E");
}

.import-action-icon.icon-pencil {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M16.6 3.6a2 2 0 0 1 2.8 0l1 1a2 2 0 0 1 0 2.8L8.8 19a2 2 0 0 1-.9.5l-4.7 1.3 1.3-4.7a2 2 0 0 1 .5-.9L16.6 3.6Zm1.4 1.4L6.4 16.6l-.5 1.5 1.5-.5L19 6l-1-1Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M16.6 3.6a2 2 0 0 1 2.8 0l1 1a2 2 0 0 1 0 2.8L8.8 19a2 2 0 0 1-.9.5l-4.7 1.3 1.3-4.7a2 2 0 0 1 .5-.9L16.6 3.6Zm1.4 1.4L6.4 16.6l-.5 1.5 1.5-.5L19 6l-1-1Z'/%3E%3C/svg%3E");
}

.import-action-icon.icon-check {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M20.7 5.3a1 1 0 0 1 0 1.4l-11 11a1 1 0 0 1-1.4 0l-5-5a1 1 0 1 1 1.4-1.4L9 15.6 19.3 5.3a1 1 0 0 1 1.4 0Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M20.7 5.3a1 1 0 0 1 0 1.4l-11 11a1 1 0 0 1-1.4 0l-5-5a1 1 0 1 1 1.4-1.4L9 15.6 19.3 5.3a1 1 0 0 1 1.4 0Z'/%3E%3C/svg%3E");
}

.import-rule-empty-row {
  padding: 18px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: #fbfdff;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 18px;
  border-top: 1px solid var(--line);
  background: #fbfdff;
}

.admin-element-dialog {
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 22px 70px rgba(15, 32, 49, 0.22);
  --el-dialog-padding-primary: 18px;
}

.admin-element-dialog .el-dialog__header {
  flex: 0 0 auto;
  margin: 0;
  padding: 18px 52px 18px 18px;
  border-bottom: 1px solid var(--line);
  background: #fbfdff;
}

.admin-element-dialog .el-dialog__title {
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
}

.admin-element-dialog .el-dialog__headerbtn {
  width: 48px;
  height: 58px;
}

.admin-element-dialog .el-dialog__body {
  min-height: 0;
  padding: 0;
  overflow: hidden;
  color: var(--ink);
}

.admin-element-dialog .modal-body {
  max-height: calc(100vh - 178px);
}

.admin-element-dialog .el-dialog__footer {
  flex: 0 0 auto;
  padding: 0;
}

.admin-element-dialog .modal-actions {
  margin: 0;
}

.theme-dark .admin-element-dialog,
.theme-dark .admin-element-dialog .el-dialog__header,
.theme-dark .admin-element-dialog .modal-actions {
  color: var(--ink);
  border-color: var(--line);
  background: var(--panel);
}

.hidden {
  display: none;
}

.hidden-file {
  display: none;
}

/* A shared, programmatically triggered file input for indicator imports.
   Unlike display:none inputs nested in dropdown menus, it remains a valid
   browser file-picker target on every entry point. */
.file-input-proxy {
  width: 1px;
  height: 1px;
  position: fixed;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

.indicator-mode .main {
  background: #eef4f8;
  padding: 0 24px 28px;
  overflow-x: hidden;
}

.indicator-mode .content {
  display: block;
  max-width: 100%;
  overflow-x: hidden;
}

.indicator-page {
  display: grid;
  gap: 12px;
  max-width: 100%;
  padding-bottom: 20px;
  overflow-x: hidden;
}

.indicator-page .panel,
.indicator-page-head,
.indicator-kpi-card,
.indicator-list-card,
.indicator-detail-basic,
.indicator-detail-metrics article,
.indicator-detail-progress,
.indicator-subject-panel {
  border: 0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 76, 129, 0.06);
}

.indicator-page-head {
  min-height: 56px;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

/* 页面名称已在统一标题栏呈现；指标页仅保留本页的创建操作。 */
.indicator-mode .indicator-page-head > div:first-child { display: none; }

.indicator-page-head h3,
.indicator-page-head p {
  margin: 0;
}

.indicator-page-head h3 {
  font-size: 22px;
  line-height: 1.25;
}

.indicator-page-head p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.indicator-page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.indicator-filter-panel {
  min-height: 58px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: minmax(250px, 1.45fr) repeat(6, minmax(112px, 1fr)) auto;
  align-items: center;
  gap: 10px;
  overflow: visible;
}

.indicator-search-field input,
.inline-filter-select {
  width: 100%;
  min-height: 38px;
  border-radius: 8px;
}

.indicator-filter-grid {
  display: contents;
}

.indicator-filter-actions {
  grid-column: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
}

.indicator-filter-actions .btn {
  min-width: 64px;
}

.template-filter-panel {
  grid-template-columns: minmax(220px, 1.4fr) minmax(160px, 220px) auto;
}

.template-filter-panel .indicator-filter-grid {
  display: contents;
}

.template-filter-panel .indicator-filter-actions {
  grid-column: 3 / -1;
}

.template-type-tabs {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.template-type-tab {
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid #d8e6f3;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
}

.template-type-tab span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.template-type-tab b {
  font-size: 22px;
  line-height: 1;
}

.template-type-tab.active {
  border-color: rgba(37, 99, 235, 0.36);
  background: #eff6ff;
}

.indicator-page .btn,
.indicator-page .icon-action,
.indicator-page .row-more summary {
  height: 36px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.indicator-card-actions .icon-action,
.indicator-card-actions .row-more summary {
  height: 32px;
  min-height: 32px;
}

.indicator-card-actions .row-more {
  flex: 0 0 auto;
}

.indicator-card-actions .row-more summary {
  list-style: none;
  cursor: pointer;
}

.indicator-card-actions .row-more summary::-webkit-details-marker {
  display: none;
}

.indicator-card-actions .row-more[open] > summary {
  border-color: rgba(59, 130, 246, 0.32);
  background: #eff6ff;
}

.indicator-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.indicator-kpi-card {
  height: 88px;
  padding: 13px 16px;
  display: grid;
  align-content: center;
  gap: 6px;
}

.indicator-kpi-card span,
.indicator-kpi-card small {
  color: var(--muted);
}

.indicator-kpi-card span {
  font-size: 13px;
}

.indicator-kpi-card b {
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: 0;
}

.indicator-kpi-card small {
  font-size: 12px;
}

.indicator-editor-layout {
  display: flex;
  align-items: flex-start;
  gap: 0;
  min-height: 0;
  max-width: 100%;
  overflow: visible;
}

.indicator-editor-layout > .indicator-list-panel,
.indicator-editor-layout > .indicator-master-pane {
  flex: 0 0 var(--indicator-list-width, 52%);
  min-width: 360px;
  max-width: calc(100% - 420px);
}

.indicator-master-pane {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

.indicator-master-pane.no-folder-tree {
  grid-template-columns: minmax(0, 1fr);
}

.indicator-master-pane > .indicator-list-panel {
  min-width: 0;
  width: 100%;
}

.indicator-editor-layout > .indicator-splitter {
  flex: 0 0 14px;
  width: 14px;
  margin: 0 10px;
  position: relative;
  cursor: col-resize;
  display: flex;
  align-items: stretch;
  justify-content: center;
  user-select: none;
}

.indicator-editor-layout > .indicator-splitter::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.08), rgba(59, 130, 246, 0.22), rgba(148, 163, 184, 0.08));
}

.indicator-editor-layout > .indicator-splitter span {
  position: relative;
  z-index: 1;
  width: 14px;
  height: 56px;
  margin-top: 64px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: #fff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.indicator-editor-layout > .indicator-splitter span::before,
.indicator-editor-layout > .indicator-splitter span::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 2px;
  height: 18px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.45);
}

.indicator-editor-layout > .indicator-splitter span::before {
  top: 12px;
  box-shadow: -4px 0 0 rgba(37, 99, 235, 0.28), 4px 0 0 rgba(37, 99, 235, 0.28);
}

.indicator-editor-layout > .indicator-splitter span::after {
  top: 26px;
  box-shadow: -4px 0 0 rgba(37, 99, 235, 0.28), 4px 0 0 rgba(37, 99, 235, 0.28);
}

.indicator-editor-layout > .indicator-detail,
.indicator-editor-layout > .detail-empty {
  flex: 1 1 auto;
  min-width: 420px;
}

.indicator-editor-layout > .indicator-detail,
.indicator-editor-layout > .detail-empty {
  position: static;
}

.indicator-list-panel,
.indicator-master-pane,
.indicator-detail {
  min-width: 0;
}

.indicator-list-panel {
  padding: 16px;
  align-self: flex-start;
}

.indicator-editor-layout > .indicator-splitter {
  align-self: stretch;
}

.indicator-list-panel .panel-head,
.indicator-detail-head {
  padding: 0 0 12px;
  border-bottom: 1px solid #eef3f8;
  background: transparent;
}

.indicator-card-list {
  display: grid;
  align-content: start;
  gap: 12px;
  overflow: visible;
  padding-right: 0;
}

.indicator-series-list {
  display: grid;
  gap: 12px;
}

.indicator-series-card {
  min-width: 0;
  padding: 12px;
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.indicator-series-card.active {
  border-color: rgba(2, 132, 199, 0.42);
  background: #f6fbff;
  box-shadow: 0 8px 18px rgba(2, 132, 199, 0.08);
}

.indicator-series-head {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
}

.indicator-series-head span,
.indicator-series-meta {
  color: #6b7c93;
  font-size: 12px;
}

.indicator-series-head b {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.indicator-series-head-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.indicator-series-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.indicator-period-list {
  display: grid;
  gap: 8px;
}

.indicator-period-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid #e4edf6;
  border-radius: 8px;
  background: #fbfdff;
}

.indicator-period-row.active {
  border-color: rgba(2, 132, 199, 0.42);
  background: #eef8ff;
}

.indicator-period-row > button {
  min-width: 0;
  display: grid;
  gap: 4px;
  text-align: left;
  border: 0;
  background: transparent;
}

.indicator-period-row > button span,
.indicator-period-row > button b,
.indicator-period-row > button small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.indicator-period-row > button span {
  color: #0f2742;
  font-weight: 800;
}

.indicator-period-row > button b {
  color: var(--brand);
  font-size: 18px;
}

.indicator-period-row > button small {
  color: #6b7c93;
}

.indicator-period-row > div {
  display: flex;
  gap: 6px;
}

.indicator-series-add {
  justify-self: start;
}

.indicator-list-card {
  padding: 16px;
  display: grid;
  gap: 12px;
  border: 1px solid transparent;
  box-shadow: none;
  cursor: pointer;
}

.indicator-list-card.active {
  border-color: rgba(2, 132, 199, 0.28);
  background: #f0f9ff;
}

.indicator-list-card:focus-visible {
  outline: 3px solid rgba(2, 132, 199, 0.16);
  border-color: rgba(2, 132, 199, 0.42);
}

.indicator-card-main {
  padding: 0;
  display: grid;
  gap: 6px;
  color: var(--ink);
  border: 0;
  background: transparent;
  text-align: left;
}

.indicator-card-main span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.indicator-title-wrap {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start !important;
  gap: 8px;
}

.indicator-card-main b {
  min-width: 0;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.indicator-identity {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
}

.indicator-card-meta,
.indicator-card-progress small {
  color: var(--muted);
  font-size: 12px;
}

.indicator-scope-line {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.indicator-scope-line em {
  min-width: 0;
  overflow: hidden;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.indicator-scope-line strong {
  flex: 0 0 auto;
  color: #475569;
  font-weight: 600;
}

.indicator-card-main small:not(.indicator-scope-line) {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.indicator-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.indicator-card-progress {
  display: grid;
  gap: 7px;
}

.indicator-card-progress > div,
.indicator-detail-progress > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.indicator-card-progress b,
.indicator-detail-progress b {
  font-size: 18px;
}

.indicator-linear-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8f1f8;
}

.indicator-linear-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

.indicator-card-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* 模板管理卡片：独立于指标列表卡片，避免影响其他指标操作区。 */
.template-card-list {
  container-type: inline-size;
}

.template-list-card {
  box-sizing: border-box;
  gap: 0;
  padding: 20px;
  overflow: visible;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}

.template-list-card:hover {
  border-color: rgba(37, 99, 235, .38);
  box-shadow: 0 8px 20px rgba(15, 76, 129, .09);
  transform: translateY(-1px);
}

.template-list-card.active {
  border-color: #60a5fa;
  background: #eff6ff;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, .1);
}

.template-list-card.is-disabled {
  border-color: #e5e7eb;
  background: #fafafa;
}

.template-list-card.is-disabled:hover {
  border-color: #cbd5e1;
  box-shadow: 0 6px 16px rgba(15, 23, 42, .06);
}

.template-list-card.is-disabled.active {
  border-color: #cbd5e1;
  background: #f8fafc;
  box-shadow: 0 0 0 2px rgba(148, 163, 184, .14);
}

.template-list-card.is-disabled .template-card-property b,
.template-list-card.is-disabled .template-card-updated,
.template-list-card.is-disabled .template-card-created {
  color: #64748b;
}

.template-list-card.is-disabled .template-card-title {
  color: #475569;
}

.template-list-card.is-disabled .template-card-footer {
  border-top-color: #e5e7eb;
}

.template-detail-panel.is-disabled .indicator-detail-basic {
  background: #fafafa;
}

.template-card-header,
.template-card-footer {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.template-card-title-group {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.template-card-title {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  text-overflow: ellipsis;
  white-space: nowrap;
  user-select: text;
}

.template-card-title-group .pill {
  flex: 0 0 auto;
  height: 24px;
  padding: 0 8px;
  font-size: 12px;
}

.template-card-created,
.template-card-updated {
  color: #64748b;
  font-size: 12px;
  line-height: 20px;
}

.template-card-created {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  white-space: nowrap;
}

.template-card-created span,
.template-card-created time,
.template-card-updated {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-card-created span {
  max-width: 140px;
}

.template-card-created i {
  flex: 0 0 auto;
  font-style: normal;
}

.template-card-content {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(100px, 1fr));
  gap: 16px 24px;
  padding: 20px 0;
}

.template-card-content.template-card-properties-3 {
  grid-template-columns: repeat(3, minmax(100px, 1fr));
}

.template-card-content.template-card-properties-2 {
  grid-template-columns: repeat(2, minmax(100px, 1fr));
}

.template-card-property {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.template-card-property span {
  color: #94a3b8;
  font-size: 12px;
  line-height: 18px;
}

.template-card-property .template-card-property-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.template-property-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  color: #64748b;
  border-radius: 4px;
  background: #eaf2fb;
  font-size: 10px;
  font-style: normal;
  line-height: 1;
}

.template-property-icon::before { content: "•"; }
.template-property-icon.scope::before { content: "◎"; }
.template-property-icon.cycle::before { content: "◷"; }
.template-property-icon.dimension::before { content: "▦"; }
.template-property-icon.field::before { content: "↥"; }
.template-property-icon.status::before { content: "●"; font-size: 7px; }
.template-property-icon.rule::before { content: "≡"; }
.template-property-icon.dependency::before { content: "↔"; }

.template-card-property b {
  overflow: hidden;
  color: #334155;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-card-footer {
  min-height: 53px;
  padding-top: 16px;
  border-top: 1px solid #eef2f7;
}

.template-card-actions {
  justify-content: flex-end;
}

.template-card-actions .btn,
.template-card-actions .icon-action,
.template-card-actions .row-more summary {
  height: 32px;
  min-height: 32px;
  box-sizing: border-box;
  white-space: nowrap;
}

.template-card-actions .icon-action,
.template-card-actions .row-more summary {
  padding: 0 12px;
}

.template-card-actions .icon-action:hover,
.template-card-actions .row-more summary:hover {
  border-color: rgba(37, 99, 235, .32);
  background: #eff6ff;
}

.template-card-actions .icon-action:active,
.template-card-actions .row-more summary:active {
  background: #dbeafe;
}

.template-card-actions .btn:focus-visible,
.template-card-actions .icon-action:focus-visible,
.template-card-actions .row-more summary:focus-visible {
  outline: 2px solid rgba(37, 99, 235, .45);
  outline-offset: 2px;
}

.template-card-actions .btn:disabled,
.template-card-actions .icon-action:disabled {
  cursor: not-allowed;
  opacity: .55;
}

@container (max-width: 900px) {
  .template-card-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .template-card-created {
    justify-content: flex-start;
  }

  .template-card-content {
    grid-template-columns: repeat(2, minmax(100px, 1fr));
  }
}

@container (max-width: 600px) {
  .template-list-card {
    padding: 16px;
  }

  .template-card-header,
  .template-card-footer {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .template-card-created {
    max-width: 100%;
  }

  .template-card-content {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding: 16px 0;
  }

  .template-card-footer {
    padding-top: 14px;
  }

  .template-card-actions {
    justify-content: flex-start;
  }

  .template-card-primary-action {
    order: -1;
  }
}

.indicator-detail {
  padding: 16px;
  display: grid;
  gap: 14px;
  align-self: start;
  max-width: 100%;
  max-height: none;
  overflow: visible;
}

.indicator-splitter.is-dragging::before {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.65), rgba(59, 130, 246, 0.2));
}

.indicator-splitter.is-dragging span {
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.18);
}

body.is-resizing,
body.is-resizing * {
  cursor: col-resize !important;
  user-select: none !important;
}

.indicator-detail-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

.indicator-detail-head h3,
.indicator-detail-head p {
  margin: 0;
}

.indicator-detail-head h3 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 18px;
}

.template-detail-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-name-edit {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  padding: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.template-name-edit:hover {
  color: var(--brand);
  border-color: #bfdbfe;
  background: #eff6ff;
}

.template-name-edit:active {
  background: #dbeafe;
}

.template-name-edit:focus-visible {
  outline: 2px solid rgba(37, 99, 235, .45);
  outline-offset: 2px;
}

.indicator-detail-head p {
  margin-top: 5px;
  font-size: 12px;
}

.indicator-detail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
}

.indicator-detail-basic {
  padding: 12px;
  display: grid;
  gap: 10px;
  box-shadow: none;
  background: #f8fbff;
}

.indicator-detail-basic div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.indicator-detail-basic span {
  color: var(--muted);
  font-size: 12px;
}

.indicator-detail-basic b {
  font-size: 13px;
  min-width: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.indicator-scope-detail details {
  margin-top: 2px;
}

.indicator-scope-detail summary {
  color: var(--brand);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  list-style: none;
}

.indicator-scope-detail summary::-webkit-details-marker {
  display: none;
}

.indicator-scope-detail p {
  margin: 6px 0 0;
  color: #334155;
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  white-space: normal;
}

.indicator-series-detail {
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(160px, 0.28fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid #d8e6f3;
  border-radius: 10px;
  background: #f8fbff;
}

.indicator-series-detail > div:first-child span {
  display: block;
  color: #6b7c93;
  font-size: 12px;
  font-weight: 700;
}

.indicator-series-detail > div:first-child b {
  display: block;
  margin-top: 4px;
  color: #0f2742;
}

.indicator-series-tabs {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.indicator-series-tabs button {
  min-height: 38px;
  padding: 6px 10px;
  display: grid;
  gap: 2px;
  color: #0f2742;
  text-align: left;
  border: 1px solid #cfe0ef;
  border-radius: 8px;
  background: #fff;
}

.indicator-series-tabs button.active {
  color: #075985;
  border-color: rgba(2, 132, 199, 0.42);
  background: #e0f2fe;
  font-weight: 800;
}

.indicator-series-tabs button.add {
  color: var(--brand);
  font-weight: 800;
}

.indicator-series-tabs span,
.indicator-series-tabs small {
  white-space: nowrap;
}

.indicator-series-tabs small {
  color: #64748b;
  font-size: 11px;
}

.indicator-detail-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.indicator-detail-metrics article {
  min-height: 80px;
  padding: 13px;
  display: grid;
  align-content: center;
  gap: 6px;
  box-shadow: none;
  background: #fbfdff;
}

.indicator-detail-metrics span {
  color: var(--muted);
  font-size: 12px;
}

.indicator-detail-metrics b {
  font-size: 22px;
}

.indicator-detail-progress,
.indicator-subject-panel {
  padding: 14px;
  box-shadow: none;
}

.indicator-detail-progress {
  display: grid;
  gap: 8px;
  background: #fbfdff;
}

.indicator-detail-progress small {
  color: var(--muted);
}

.template-summary {
  margin-top: -2px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: #475569;
}

.template-summary span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #f1f7ff;
  border: 1px solid #dbeafe;
}

.template-summary.warn span {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

.template-warning {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff7ed;
  border: 1px solid #fdba74;
  color: #9a3412;
  font-size: 12px;
  line-height: 1.5;
}

.import-result-panel {
  display: grid;
  gap: 12px;
}

.import-result-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.import-result-title b {
  font-size: 16px;
  color: var(--ink);
}

.import-result-list {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid #d8e6f3;
  border-radius: 8px;
  background: #fff;
}

.import-result-list b {
  color: var(--ink);
  font-size: 13px;
}

.import-result-list span {
  color: #475569;
  font-size: 13px;
  line-height: 1.5;
}

.template-detail-empty {
  min-height: 100%;
  align-self: stretch;
}

.template-detail-summary {
  gap: 10px;
}

.template-config-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.template-config-card {
  min-width: 0;
  min-height: 118px;
  padding: 13px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  border: 1px solid #d8e6f3;
  border-radius: 10px;
  background: #fbfdff;
}

.template-config-card.warn {
  border-color: #fdba74;
  background: #fff7ed;
}

.template-config-card span,
.template-config-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.template-config-card b {
  display: block;
  margin: 7px 0 5px;
  color: var(--ink);
  font-size: 24px;
}

.template-config-card small {
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.template-config-card .btn {
  align-self: end;
  white-space: nowrap;
}

.template-summary-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #475569;
  font-size: 12px;
  line-height: 1.5;
}

.template-rule-section {
  display: grid;
  gap: 10px;
}

/* 覆盖详情摘要区的通用横向 div 布局，规则列表必须占满整行。 */
.template-detail-summary > .template-rule-section {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  justify-content: stretch;
}

.template-rule-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.statistics-rule-list {
  min-width: 0;
  display: grid;
  gap: 14px;
  container-type: inline-size;
}

.statistics-rule-card {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 16px;
  display: grid;
  gap: 14px;
  border: 1px solid #dbe5f0;
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
  transition: border-color .2s, box-shadow .2s;
}

.statistics-rule-card:hover {
  border-color: rgba(37, 99, 235, .35);
  box-shadow: 0 4px 14px rgba(15, 23, 42, .06);
}

.rule-card-header {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rule-card-header > b {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rule-card-header .pill {
  flex: 0 0 auto;
  height: 24px;
  padding: 0 8px;
  font-size: 12px;
}

.rule-card-summary {
  min-height: 21px;
  margin: -8px 0 0;
  overflow: hidden;
  display: -webkit-box;
  color: #64748b;
  font-size: 13px;
  line-height: 1.6;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.rule-card-fields {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.rule-card-fields > div {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.rule-card-fields span {
  color: #94a3b8;
  font-size: 12px;
  line-height: 18px;
}

.rule-card-fields b {
  overflow: hidden;
  color: #334155;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rule-card-condition {
  min-width: 0;
  padding-top: 12px;
  overflow: hidden;
  color: #475569;
  font-size: 13px;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-top: 1px solid #eef2f7;
}

.rule-card-condition.empty {
  color: #64748b;
}

.rule-card-condition.warning {
  color: #b45309;
}

@container (max-width: 700px) {
  .rule-card-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@container (max-width: 420px) {
  .statistics-rule-card {
    padding: 14px;
  }

  .rule-card-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .rule-card-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .rule-card-condition {
    white-space: normal;
  }
}

.template-empty-rule {
  padding: 8px 0;
}

.template-editor-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.template-editor-tabs button {
  min-width: 0;
  padding: 10px 12px;
  display: grid;
  gap: 4px;
  border: 1px solid #d8e6f3;
  border-radius: 8px;
  background: #fbfdff;
  text-align: left;
}

.template-editor-tabs button.active {
  border-color: #8ecbff;
  background: #eaf6ff;
  box-shadow: inset 0 0 0 1px rgba(2, 132, 199, 0.16);
}

.template-editor-tabs button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.template-editor-tabs b,
.template-editor-tabs span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-editor-tabs b {
  color: var(--ink);
  font-size: 13px;
}

.template-editor-tabs span {
  color: var(--muted);
  font-size: 11px;
}

.template-editor-panels {
  display: grid;
}

.template-editor-panel {
  display: none;
  gap: 14px;
}

.template-editor-panel.active {
  display: grid;
}

.template-editor-note {
  padding: 10px 12px;
  display: grid;
  gap: 4px;
  border: 1px solid #d8e6f3;
  border-radius: 8px;
  background: #fbfdff;
}

.template-editor-note b,
.template-editor-note span {
  display: block;
}

.template-editor-note b {
  color: var(--ink);
  font-size: 13px;
}

.template-editor-note span {
  color: var(--muted);
  font-size: 12px;
}

.indicator-subject-panel .table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  border: 0;
  border-radius: 10px;
  background: #f8fbff;
}

.indicator-subject-panel table {
  min-width: 560px;
}

.indicator-subject-panel th,
.indicator-subject-panel td {
  padding: 10px 9px;
  font-size: 12px;
}

.page-more .row-more-menu {
  right: 0;
}

.indicator-empty {
  padding: 30px;
  text-align: center;
}

@media (max-width: 1360px) {
  .indicator-filter-panel {
    grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(130px, 1fr)) auto auto;
  }

  .indicator-filter-grid {
    display: contents;
  }

  .indicator-filter-actions {
    grid-column: 5 / -1;
  }

  .indicator-editor-layout {
    grid-template-columns: minmax(0, 50fr) minmax(460px, 50fr);
  }
}

@media (max-width: 1180px) {
  .overview-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .indicator-portal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overview-warning-center,
  .overview-analysis-card,
  .overview-map-rank-layout {
    grid-template-columns: 1fr;
  }

  .portal-map,
  .portal-rank {
    min-height: auto;
  }

  .profile-layout,
  .profile-hero-card {
    grid-template-columns: 1fr;
  }

  .profile-hero-meta {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .profile-quick-actions {
    justify-content: flex-start;
  }

  .module-settings-page {
    grid-template-columns: 1fr;
  }

  .module-settings-side {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .team-toolbar {
    grid-template-columns: minmax(240px, 1fr) minmax(150px, 1fr) minmax(130px, 0.7fr);
  }

  .user-toolbar {
    grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(130px, 1fr));
  }

  .user-toolbar-actions {
    grid-column: 1 / -1;
  }

  .user-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .team-toolbar-actions {
    grid-column: 1 / -1;
  }

  .team-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .indicator-filter-panel {
    grid-template-columns: minmax(260px, 1fr) repeat(2, minmax(140px, 1fr)) auto auto;
  }

  .indicator-filter-actions {
    grid-column: 4 / -1;
  }

  .indicator-master-pane.has-folder-tree {
    grid-template-columns: minmax(0, 1fr);
  }

  .indicator-folder-tree {
    display: none;
  }

  .indicator-folder-compact {
    display: grid;
  }
}

@media (max-width: 960px) {
  html,
  body {
    height: auto;
    overflow: auto;
  }

  .shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 3;
    height: auto;
    overflow: visible;
  }

  .main {
    height: auto;
    overflow: visible;
  }

  .nav {
    grid-template-columns: 1fr;
  }

  .nav-group {
    min-width: 0;
  }

  .nav-children {
    padding-left: 16px;
  }

  .nav-version {
    display: none;
  }

  .grid-4,
  .indicator-workbench,
  .indicator-editor-layout,
  .portal-hero,
  .portal-detail-grid,
  .profile-grid,
  .assignment-summary,
  .template-config-grid,
  .template-editor-tabs,
  .form-grid,
  .form-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .indicator-workbench {
    grid-template-columns: 1fr;
  }

  .indicator-editor-layout {
    flex-direction: column;
  }

  .indicator-editor-layout > .indicator-list-panel,
  .indicator-editor-layout > .indicator-master-pane,
  .indicator-editor-layout > .indicator-detail,
  .indicator-editor-layout > .detail-empty {
    flex: 1 1 auto;
    max-width: none;
    min-width: 0;
  }

  .indicator-editor-layout > .indicator-splitter {
    display: none;
  }

  .indicator-filter-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-column: 1 / -1;
  }

  .indicator-filter-panel {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .indicator-filter-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .indicator-editor-layout > .indicator-detail,
  .indicator-editor-layout > .detail-empty {
    position: static;
  }

  .indicator-series-detail,
  .indicator-period-row {
    grid-template-columns: 1fr;
  }

  .indicator-period-row > div {
    justify-content: flex-start;
  }

  .portal-hero {
    justify-items: start;
  }

  .region-map-layout {
    grid-template-columns: 1fr;
  }

  .region-map-rank {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-top: 0;
  }

  .import-rule-grid {
    grid-template-columns: 1fr;
  }

  .template-apply-bar,
  .template-apply-control {
    grid-template-columns: 1fr;
  }

  .import-rule-grid-head {
    display: none;
  }

  .search-box {
    grid-template-columns: 1fr;
  }

  .utility-panel,
  .module-item,
  .modal-head,
  .modal-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .module-item {
    grid-template-columns: 1fr;
  }

  .module-actions {
    justify-content: flex-start;
  }

  .module-settings-side {
    grid-template-columns: 1fr;
  }

  .module-settings-head {
    align-items: stretch;
    flex-direction: column;
  }

  .module-setting-group-head,
  .module-setting-group-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .module-settings-actions {
    justify-content: flex-start;
  }

  .team-table-head {
    align-items: stretch;
    flex-direction: column;
  }

  .team-batch-actions,
  .team-toolbar-actions,
  .user-toolbar-actions {
    justify-content: flex-start;
  }

  .profile-desc-grid,
  .profile-hero-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .modal-backdrop {
    padding: 12px;
  }

}

@media (max-width: 640px) {
  .overview-kpi-grid,
  .indicator-portal-grid,
  .warning-summary-grid,
  .analysis-metrics {
    grid-template-columns: 1fr;
  }

  .overview-screen-head,
  .overview-card-head {
    align-items: stretch;
    flex-direction: column;
  }

  .region-map-chart {
    min-height: 320px;
  }

  .form-grid,
  .indicator-summary-strip,
  .indicator-filter-grid,
  .indicator-portal-grid,
  .portal-hero-metrics,
  .portal-detail-grid,
  .profile-grid,
  .assignment-summary,
  .template-config-grid,
  .template-editor-tabs,
  .template-type-tabs,
  .rule-template-selectors,
  .rule-template-control,
  .form-grid.compact {
    grid-template-columns: 1fr;
  }

  .cascade-field {
    grid-column: auto;
  }

  .region-map-rank {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .indicator-scope-field {
    grid-column: auto;
  }

  .cascade-select:focus-within .cascade-menu {
    grid-template-columns: 1fr;
  }

  .cascade-column {
    max-height: 180px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .cascade-column:last-child {
    border-bottom: 0;
  }

  .indicator-mode .main {
    padding: 12px;
  }

  .indicator-page-head {
    height: auto;
    min-height: 72px;
    align-items: flex-start;
    flex-direction: column;
  }

  .indicator-page-actions,
  .indicator-detail-actions,
  .indicator-card-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .indicator-summary-strip,
  .indicator-detail-metrics,
  .indicator-stat-grid {
    grid-template-columns: 1fr;
  }

  .team-toolbar,
  .team-stat-grid,
  .user-toolbar,
  .user-stat-grid {
    grid-template-columns: 1fr;
  }

  .team-row-actions {
    flex-wrap: wrap;
  }

  .profile-hero-card {
    padding: 18px;
  }

  .profile-hero-main {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-hero-meta,
  .profile-desc-grid,
  .org-path {
    grid-template-columns: 1fr;
  }

  .org-path > span {
    display: none;
  }

  .indicator-kpi-card {
    height: 82px;
  }
}

/* Enterprise data-management skin overrides */
.field label {
  color: #1e3a5f;
}

input,
select,
textarea,
.cascade-trigger {
  border-radius: 8px;
  border-color: var(--line);
  background: #f8fbff;
}

input:focus,
select:focus,
textarea:focus,
.cascade-select:focus-within .cascade-trigger {
  border-color: var(--brand);
  outline: 3px solid rgba(2, 132, 199, 0.12);
}

.filter-chip.active,
.filter-chip:hover,
.filter-menu button:hover,
.filter-menu button.active,
.cascade-option.active {
  color: var(--brand);
  border-color: rgba(2, 132, 199, 0.35);
  background: var(--brand-soft);
}

.filter-menu,
.cascade-menu,
.modal {
  border-color: #d7e3ef;
  box-shadow: 0 18px 48px rgba(15, 76, 129, 0.14);
}

.utility-panel,
.advanced-panel,
.module-item,
.portal-indicator-card {
  border-radius: 12px;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.94);
}

.portal-indicator-card.active {
  border-color: rgba(2, 132, 199, 0.38);
  background: linear-gradient(180deg, #ffffff, #eff6ff);
  box-shadow: 0 16px 30px rgba(2, 132, 199, 0.12);
}

/* 总览集合使用轻量分组，不重复套用指标卡片的边框和填充。 */
.portal-indicator-card.overview-collection-card,
.portal-indicator-card.overview-collection-card.active,
.portal-indicator-card.overview-collection-card.is-risk,
.portal-indicator-card.overview-collection-card.is-empty {
  padding: 4px 12px 10px;
  border: 0;
  border-left: 3px solid #b8d8ea;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.portal-indicator-card.overview-collection-card.active { border-left-color: var(--brand); }
.portal-indicator-card.overview-collection-card.is-risk { border-left-color: #f59e0b; }
.portal-indicator-card.overview-collection-card.is-empty { border-left-color: #94a3b8; }

/* Overview collection cards: independent, balanced cards instead of merged rows. */
.indicator-portal-grid {
  gap: 16px;
  align-items: stretch;
}
.indicator-portal-grid.collection-grid-1 { grid-template-columns: minmax(0, 1fr); }
.indicator-portal-grid.collection-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.indicator-portal-grid.collection-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.portal-indicator-card.overview-collection-card,
.portal-indicator-card.overview-collection-card.active,
.portal-indicator-card.overview-collection-card.is-risk,
.portal-indicator-card.overview-collection-card.is-empty {
  position: relative;
  min-height: 246px;
  padding: 18px 18px 16px;
  display: grid;
  grid-template-rows: auto auto auto auto 1fr;
  gap: 9px;
  overflow: hidden;
  border: 1px solid #d7e3ef;
  border-left: 1px solid #d7e3ef;
  border-radius: 12px;
  background: #fbfdff;
  box-shadow: 0 3px 10px rgba(15, 39, 66, .04);
}

.portal-indicator-card.overview-collection-card:hover { border-color: #b8d8ea; box-shadow: 0 8px 20px rgba(15, 39, 66, .08); }
.collection-status-bar { position: absolute; top: 0; right: 0; left: 0; height: 3px; background: #16a34a; }
.collection-card-attention .collection-status-bar { background: #f59e0b; }
.collection-card-error .collection-status-bar { background: #dc2626; }
.collection-card-empty .collection-status-bar { background: #94a3b8; }

.overview-collection-head { min-height: 22px; }
.overview-collection-head > span { color: #52677d; font-size: 13px; }
.collection-card-tags { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; }
.collection-progress-label { padding: 3px 7px; border-radius: 999px; color: #18794e; background: #e7f7ed; font-size: 12px; font-weight: 700; white-space: nowrap; }
.collection-progress-label.attention { color: #a16207; background: #fff4d6; }
.collection-progress-label.error { color: #b42318; background: #fde8e8; }
.collection-progress-label.empty { color: #52677d; background: #eef2f6; }

.portal-indicator-card.overview-collection-card > b { min-height: 0; color: #1f3347; font-size: 16px; line-height: 1.35; }
.portal-indicator-card.overview-collection-card > small { color: #52677d; font-size: 13px; }
.collection-progress-summary { display: grid; gap: 6px; align-content: start; }
.collection-progress-summary strong { margin-top: 1px; color: var(--brand); font-size: 28px; line-height: 1; }
.collection-progress-summary i { height: 6px; overflow: hidden; border-radius: 999px; background: #e8eff5; }
.collection-progress-summary i em { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }

.overview-period-strip {
  margin-top: 1px;
  padding-top: 9px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px 10px;
  border-top: 1px solid #e1eaf2;
}

.overview-period-strip .overview-period-button {
  min-height: 40px;
  padding: 4px 6px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
  border: 0;
  border-radius: 6px;
  background: transparent;
}
.overview-period-strip .overview-period-button i { display: none; }
.overview-period-strip .overview-period-button span { color: #6b7c93; font-size: 12px; font-weight: 500; }
.overview-period-strip .overview-period-button b { color: #334e68; font-size: 15px; line-height: 1.1; }
.overview-period-strip .overview-period-button.active { background: #e0f2fe; }
.overview-period-strip .overview-period-button.active b { color: var(--brand); }
.overview-period-more { align-self: center; justify-self: start; padding: 0; color: #52677d; background: transparent; font-size: 12px; }

.theme-dark .portal-indicator-card.overview-collection-card,
.theme-dark .portal-indicator-card.overview-collection-card.active,
.theme-dark .portal-indicator-card.overview-collection-card.is-risk,
.theme-dark .portal-indicator-card.overview-collection-card.is-empty { border-color: var(--line); background: #182737; }
.theme-dark .portal-indicator-card.overview-collection-card > b { color: var(--ink); }
.theme-dark .collection-progress-summary i { background: #2d4055; }
.theme-dark .overview-period-strip { border-color: var(--line); }
.theme-dark .overview-period-strip .overview-period-button.active { background: #123b55; }
.theme-dark .overview-detail-summary, .theme-dark .overview-sort-button { color: var(--ink); }
.theme-dark .overview-sort-button span { color: var(--muted); }
.theme-dark .overview-filter-actions { border-color: var(--line); }
.theme-dark .overview-subject-table .progress-meter { background: #2d4055; }

.map-context { margin: 4px 0 0; color: #52677d; font-size: 12px; }
.map-segmented-control { padding: 3px; display: inline-flex; gap: 3px; border: 1px solid #cbddeb; border-radius: 9px; background: #f6f9fc; }
.map-segmented-control button { min-height: 30px; padding: 0 10px; border: 0; border-radius: 6px; color: #52677d; background: transparent; font-size: 12px; font-weight: 700; }
.map-segmented-control button.active { color: #fff; background: var(--brand); box-shadow: 0 2px 5px rgba(2,132,199,.25); }
.map-legend { margin: -4px 0 8px; display: flex; flex-wrap: wrap; gap: 8px 14px; color: #52677d; font-size: 12px; }
.map-legend span { display: inline-flex; align-items: center; gap: 5px; }.map-legend i { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }.map-legend .bad { color: #dc2626; }.map-legend .warn { color: #d97706; }.map-legend .info { color: #0284c7; }.map-legend .good { color: #15803d; }

.portal-map, .portal-rank { min-height: 460px; }
.region-map-layout, .region-map-chart { min-height: 390px; }
.region-map-chart { width: 100%; }
.rank-row { background: transparent; }.rank-row.top-rank, .rank-row:first-of-type { background: transparent; }
.rank-row:hover, .rank-row.active { background: #f2f8fc; border-radius: 8px; }
.rank-row em { color: #52677d; background: #eef2f6; }.rank-row em.rank-1 { color: #8a5a00; background: #fff1bd; }.rank-row em.rank-2 { color: #56616d; background: #e9eef3; }.rank-row em.rank-3 { color: #855137; background: #f5e1d5; }
.rank-row strong { display: grid; justify-items: end; gap: 2px; color: #52677d; }.rank-row strong small { color: #52677d; font-size: 11px; font-weight: 600; }.rank-row.good strong { color: var(--green); }.rank-row.warn strong { color: var(--amber); }.rank-row.bad strong { color: var(--red); }
.rank-row.good i span { background: var(--green); }.rank-row.warn i span { background: var(--amber); }.rank-row.bad i span { background: var(--red); }
.theme-dark .map-segmented-control { border-color: var(--line); background: #1b2a3a; }.theme-dark .map-segmented-control button { color: var(--muted); }.theme-dark .rank-row:hover, .theme-dark .rank-row.active { background: #1c3042; }

.trend-unit { margin: 4px 0 0; color: #52677d; font-size: 12px; }
.trend-segmented-control { padding: 3px; display: inline-flex; gap: 3px; border: 1px solid #cbddeb; border-radius: 9px; background: #f6f9fc; }
.trend-segmented-control button { min-height: 30px; padding: 0 10px; border: 0; border-radius: 6px; color: #52677d; background: transparent; font-size: 12px; font-weight: 700; }
.trend-segmented-control button.active { color: #fff; background: var(--brand); box-shadow: 0 2px 5px rgba(2,132,199,.25); }
.trend-chart { height: 310px; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 10px; }
.trend-y-axis { padding: 10px 0 28px; display: flex; flex-direction: column; justify-content: space-between; color: #52677d; font-size: 11px; text-align: right; }
.trend-plot { position: relative; min-width: 0; border-left: 1px solid #cbddeb; border-bottom: 1px solid #cbddeb; background: repeating-linear-gradient(to bottom, transparent 0, transparent calc(25% - 1px), #e5edf4 calc(25% - 1px), #e5edf4 25%); }
.trend-target-line { position: absolute; top: 0; right: 0; left: 0; border-top: 1px dashed #15803d; }.trend-target-line span { position: absolute; top: 3px; right: 4px; color: #15803d; background: #fff; font-size: 11px; }
.trend-bars { height: 100%; padding: 10px 8px 28px; display: grid; grid-template-columns: repeat(auto-fit, minmax(38px, 1fr)); align-items: end; gap: 10px; }
.trend-bars div { position: relative; height: 100%; display: grid; grid-template-rows: 1fr auto auto; justify-items: center; gap: 4px; }.trend-bars div:hover i { filter: brightness(.88); }
.trend-bars i { width: 18px; min-height: 4px; align-self: end; border-radius: 7px 7px 2px 2px; background: var(--brand); }.trend-bars b { color: #29445f; font-size: 11px; font-variant-numeric: tabular-nums; }.trend-bars span { color: #52677d; font-size: 11px; }
.theme-dark .trend-segmented-control { border-color: var(--line); background: #1b2a3a; }.theme-dark .trend-plot { border-color: var(--line); background: repeating-linear-gradient(to bottom, transparent 0, transparent calc(25% - 1px), #2d4055 calc(25% - 1px), #2d4055 25%); }.theme-dark .trend-target-line span { background: var(--panel); }
@media (max-width: 700px) { .trend-chart { height: 260px; }.trend-segmented-control button { padding: 0 7px; }.trend-bars { gap: 5px; }.trend-bars i { width: 12px; } }

/* Current-period analysis follows a single, data-first reading path. */
.overview-analysis-card {
  min-height: 0;
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.analysis-headline { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.analysis-headline h3, .analysis-headline p { margin: 0; }
.analysis-headline h3 { color: #0f2742; font-size: 19px; }
.analysis-headline p { margin-top: 6px; color: #52677d; font-size: 13px; }
.analysis-statuses { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.analysis-progress-state { padding: 4px 8px; border-radius: 999px; font-size: 12px; font-weight: 750; }
.analysis-progress-state.good { color: #18794e; background: #e7f7ed; }
.analysis-progress-state.warn { color: #a16207; background: #fff4d6; }
.analysis-progress-state.bad { color: #b42318; background: #fde8e8; }

.analysis-core { display: grid; grid-template-columns: minmax(220px, .7fr) minmax(0, 1.3fr); gap: 22px; align-items: center; }
.analysis-rate { display: grid; gap: 7px; }
.analysis-rate > span, .analysis-key-values span { color: #52677d; font-size: 13px; }
.analysis-rate strong { color: var(--brand); font-size: 34px; line-height: 1; }
.analysis-rate-track { height: 8px; overflow: hidden; border-radius: 999px; background: #e8eff5; }
.analysis-rate-track i { height: 100%; display: block; border-radius: inherit; background: var(--brand); }
.analysis-rate-track.good { background: #def5e6; }.analysis-rate-track.good i { background: var(--green); }
.analysis-rate-track.warn { background: #fff1d6; }.analysis-rate-track.warn i { background: var(--amber); }
.analysis-rate-track.bad { background: #fde5e5; }.analysis-rate-track.bad i { background: var(--red); }
.analysis-key-values { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.analysis-key-values > div { min-height: 70px; padding: 12px; display: grid; align-content: center; gap: 5px; border: 1px solid #d7e3ef; border-radius: 10px; background: #fbfdff; }
.analysis-key-values b { color: #1f3347; font-size: 22px; line-height: 1; }.analysis-key-values .completed b { color: var(--green); }.analysis-key-values .gap b { color: var(--amber); }

.analysis-trend-row { padding-top: 14px; border-top: 1px solid #e1eaf2; }
.overview-period-trend { display: grid; gap: 9px; }
.overview-period-trend-head { display: flex; align-items: center; gap: 10px; color: #29445f; font-size: 13px; font-weight: 750; }
.overview-period-trend-head small { color: #52677d; font-size: 12px; font-weight: 500; }.text-action { padding: 0; border: 0; color: var(--brand); background: transparent; font-size: 12px; font-weight: 700; }
.overview-period-switch { max-height: none; overflow: visible; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.overview-period-switch button { min-width: 0; min-height: 48px; padding: 7px 8px; border: 1px solid transparent; border-radius: 8px; background: #f6f9fc; }
.overview-period-switch button.active { border-color: rgba(2, 132, 199, .42); background: var(--brand-soft); }
.analysis-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.analysis-actions .row-more { position: relative; }.analysis-actions .row-more summary { list-style: none; cursor: pointer; }.analysis-actions .row-more summary::-webkit-details-marker { display: none; }

.theme-dark .analysis-headline h3, .theme-dark .analysis-key-values b { color: var(--ink); }
.theme-dark .analysis-key-values > div, .theme-dark .overview-period-switch button { border-color: var(--line); background: #1b2a3a; }
.theme-dark .analysis-trend-row { border-color: var(--line); }

@media (max-width: 900px) {
  .analysis-core { grid-template-columns: 1fr; }
  .analysis-key-values { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-period-switch { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .analysis-headline { display: grid; }.analysis-statuses { justify-content: flex-start; }
  .overview-period-switch { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .indicator-portal-grid.collection-grid-1,
  .indicator-portal-grid.collection-grid-2,
  .indicator-portal-grid.collection-grid-3 { grid-template-columns: 1fr; }
  .portal-indicator-card.overview-collection-card { padding: 16px; }
}

@media (max-width: 1180px) {
  .indicator-portal-grid.collection-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.portal-indicator-card strong,
.portal-gauge strong,
.screen-chip,
.summary-caret {
  color: var(--brand);
}

.progress-meter span,
.portal-indicator-card i em,
.rank-row i span,
.map-tile i em {
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

/* Focused business date/month picker built on Element Plus Popover. */
.semi-date-picker,
.element-plus-date-field {
  width: 100%;
  display: block;
}

.smart-date-trigger {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #cbddeb;
  border-radius: 8px;
  color: #1e3a5f;
  background: #f8fbff;
  font-variant-numeric: tabular-nums;
  text-align: left;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.smart-date-trigger:hover {
  border-color: #8fc7ed;
  background: #fff;
}

.smart-date-trigger.active,
.smart-date-trigger:focus-visible {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
  outline: none;
}

.smart-date-trigger .placeholder {
  color: #94a3b8;
}

.smart-date-trigger .el-icon {
  flex: 0 0 auto;
  color: #64748b;
  font-size: 17px;
}

.smart-date-popper.el-popper {
  max-width: calc(100vw - 24px);
  padding: 0;
  overflow: hidden;
  border: 1px solid #d7e3ef;
  border-radius: 10px;
  box-shadow: 0 14px 36px rgba(15, 32, 49, 0.16);
}

.smart-date-panel {
  width: 100%;
  color: #172033;
  background: #fff;
}

.smart-date-mode {
  padding: 16px 22px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid #e3ebf3;
  background: #fbfdff;
}

.smart-date-mode button {
  min-height: 44px;
  border: 1px solid #d7e3ef;
  color: #334155;
  background: #fff;
  font-size: 15px;
  font-weight: 650;
}

.smart-date-mode button:first-child {
  border-radius: 7px 0 0 7px;
}

.smart-date-mode button:last-child {
  margin-left: -1px;
  border-radius: 0 7px 7px 0;
}

.smart-date-mode button.active {
  z-index: 1;
  border-color: var(--brand);
  color: #fff;
  background: var(--brand);
}

.smart-date-mode button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.smart-date-main {
  min-height: 392px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
}

.smart-date-calendar {
  padding: 20px 24px 22px;
}

.smart-date-calendar > header {
  min-height: 38px;
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  align-items: center;
  margin-bottom: 12px;
}

.smart-date-calendar > header b {
  text-align: center;
  font-size: 18px;
  font-weight: 700;
}

.smart-date-calendar > header .el-button {
  width: 34px;
  height: 34px;
  margin: 0;
  color: #475569;
}

.smart-date-weekdays,
.smart-date-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.smart-date-weekdays {
  padding: 5px 0 10px;
  color: #64748b;
  font-size: 13px;
  font-weight: 650;
  text-align: center;
}

.smart-date-days {
  gap: 6px 4px;
}

.smart-date-days button {
  width: 42px;
  height: 42px;
  justify-self: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #1e293b;
  background: transparent;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.smart-date-days button:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

.smart-date-days button.outside {
  color: #a8b2bf;
}

.smart-date-days button.today:not(.selected) {
  border-color: rgba(2, 132, 199, 0.42);
  color: var(--brand);
  font-weight: 700;
}

.smart-date-days button.selected,
.smart-date-months button.selected {
  border-color: var(--brand);
  color: #fff;
  background: var(--brand);
  font-weight: 700;
}

.smart-date-months {
  min-height: 310px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-content: center;
}

.smart-date-months button {
  min-height: 54px;
  border: 1px solid #dce5ee;
  border-radius: 7px;
  color: #334155;
  background: #fff;
}

.smart-date-months button:hover {
  border-color: #8fc7ed;
  color: var(--brand);
  background: #f3faff;
}

.smart-date-sidebar {
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 22px 18px 0;
  border-left: 1px solid #e3ebf3;
  background: #fbfdff;
}

.smart-date-sidebar h4 {
  margin: 0 0 16px;
  font-size: 16px;
}

.smart-date-quick-list {
  display: grid;
  align-content: start;
  gap: 12px;
}

.smart-date-quick-list button {
  min-height: 48px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid #dce5ee;
  border-radius: 7px;
  color: #087bb6;
  background: #fff;
  text-align: left;
}

.smart-date-quick-list button:hover,
.smart-date-quick-list button.selected {
  border-color: #8fc7ed;
  background: #edf8fe;
}

.smart-date-quick-list .el-icon {
  font-size: 17px;
}

.smart-date-summary {
  min-height: 62px;
  margin: 18px -18px 0;
  display: grid;
  place-items: center;
  border-top: 1px solid #e3ebf3;
  color: #334155;
  background: #f6f9fc;
  font-size: 14px;
  font-weight: 650;
}

.smart-date-actions {
  min-height: 68px;
  padding: 12px 22px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  border-top: 1px solid #e3ebf3;
  background: #fff;
}

.smart-date-actions .el-button--primary {
  min-width: 132px;
}

.theme-dark .smart-date-trigger,
.theme-dark .smart-date-panel,
.theme-dark .smart-date-months button,
.theme-dark .smart-date-quick-list button,
.theme-dark .smart-date-actions {
  color: var(--ink);
  border-color: var(--line);
  background: var(--panel);
}

.theme-dark .smart-date-mode,
.theme-dark .smart-date-sidebar,
.theme-dark .smart-date-summary {
  color: var(--ink);
  border-color: var(--line);
  background: #1b2a3a;
}

.theme-dark .smart-date-weekdays,
.theme-dark .smart-date-days button.outside {
  color: var(--muted);
}

.theme-dark .smart-date-days button,
.theme-dark .smart-date-calendar > header .el-button {
  color: var(--ink);
}

@media (max-width: 720px) {
  .smart-date-popper.el-popper {
    width: calc(100vw - 24px) !important;
  }

  .smart-date-main {
    grid-template-columns: 1fr;
  }

  .smart-date-sidebar {
    grid-template-columns: 1fr;
    padding: 14px;
    border-top: 1px solid #e3ebf3;
    border-left: 0;
  }

  .smart-date-quick-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .smart-date-summary {
    margin: 12px 0 0;
  }
}

/* Atomic indicators and hierarchical indicator collections */
.indicator-manage-toolbar {
  min-height: 52px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
}

.template-type-toolbar {
  display: flex;
  align-items: stretch;
  gap: 12px;
}

.template-type-toolbar > .btn {
  align-self: center;
  flex: 0 0 auto;
}

.indicator-manage-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7fafc;
}

.indicator-manage-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.indicator-manage-tabs button {
  min-width: 132px;
  height: 38px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 9px;
  color: #60758b;
  background: transparent;
  cursor: pointer;
}

.indicator-manage-tabs button b {
  min-width: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  color: #64748b;
  background: #e8eef5;
  font-size: 12px;
}

.indicator-manage-tabs button.active {
  color: var(--brand);
  background: #fff;
  box-shadow: 0 5px 14px rgba(15, 76, 129, 0.1);
}

.indicator-manage-tabs button.active b {
  color: #fff;
  background: var(--brand);
}

.atomic-indicator-list,
.collection-card-list {
  align-content: start;
}

.indicator-filter-grid.collection-filter-grid {
  grid-template-columns: repeat(2, minmax(160px, 1fr));
}

.collection-period-line {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #64748b;
}

.collection-period-line em {
  overflow: hidden;
  color: var(--brand);
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collection-period-line strong {
  flex: none;
  color: #64748b;
  font-size: 12px;
}

.collection-card-description {
  min-height: 38px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

.collection-chip-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.collection-chip-list.compact {
  min-height: 28px;
}

.personal-folder-chip {
  max-width: 150px;
  padding: 5px 9px;
  overflow: hidden;
  border: 1px solid #d9e2ec;
  border-radius: 7px;
  color: #52677d;
  background: #f8fafc;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.indicator-folder-tree {
  position: sticky;
  top: 0;
  min-width: 0;
  padding: 14px;
  overflow: visible;
}

.indicator-folder-tree header {
  min-height: 48px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.indicator-folder-tree h3,
.indicator-folder-tree p {
  margin: 0;
}

.indicator-folder-tree p {
  margin-top: 3px;
  font-size: 11px;
}

.folder-tree-create {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--heading);
  background: var(--surface-raised);
  font-size: 12px;
  font-weight: 700;
}

.indicator-folder-tree nav {
  display: grid;
  gap: 7px;
  padding-top: 12px;
}

.folder-tree-entry {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-subtle);
}

.folder-tree-select {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: var(--surface-subtle);
  font-size: 13px;
  text-align: left;
}

.folder-tree-entry .folder-tree-select {
  border: 0;
  border-radius: 8px 0 0 8px;
}

.folder-tree-select .el-icon {
  font-size: 16px;
}

.folder-tree-select span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder-tree-select b {
  min-width: 24px;
  padding: 2px 6px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-raised);
  font-size: 11px;
  text-align: center;
}

.folder-tree-select:hover,
.folder-tree-select.active,
.folder-tree-entry.active {
  color: var(--brand);
  border-color: rgba(2, 132, 199, 0.48);
  background: var(--brand-soft);
}

.folder-tree-entry.active .folder-tree-select {
  color: var(--brand);
  background: transparent;
}

.folder-tree-more {
  position: relative;
  border-left: 1px solid var(--line);
}

.folder-tree-more > summary {
  width: 33px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}

.folder-tree-more > summary::-webkit-details-marker {
  display: none;
}

.folder-tree-more .row-more-menu {
  top: 0;
  right: auto;
  left: calc(100% + 7px);
  z-index: 30;
  min-width: 132px;
}

.folder-tree-empty {
  display: grid;
  gap: 8px;
  padding: 12px 8px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.folder-tree-empty button {
  padding: 0;
  border: 0;
  color: var(--brand);
  background: transparent;
  font-weight: 700;
}

.indicator-folder-compact {
  display: none;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  padding: 12px 0;
}

.indicator-folder-dialog-field {
  display: grid;
  gap: 9px;
  color: var(--ink);
}

.indicator-folder-dialog-field > span {
  font-size: 13px;
  font-weight: 700;
}

.indicator-move-dialog {
  display: grid;
  gap: 14px;
}

.indicator-move-dialog p {
  margin: 0;
  color: var(--muted);
}

.indicator-move-options {
  max-height: 320px;
  display: grid;
  gap: 8px;
  overflow-y: auto;
}

.indicator-move-options label {
  min-height: 42px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: var(--surface-subtle);
  cursor: pointer;
}

.indicator-move-options label.active {
  border-color: rgba(2, 132, 199, 0.5);
  background: var(--brand-soft);
}

.indicator-move-options small {
  color: var(--muted);
}

.move-create-folder {
  justify-self: start;
}

.collection-chip {
  max-width: 180px;
  padding: 5px 9px;
  overflow: hidden;
  border: 1px solid rgba(2, 132, 199, 0.18);
  border-radius: 999px;
  color: #0369a1;
  background: #f0f9ff;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collection-chip.empty {
  border-color: #dbe4ee;
  color: #7b8da0;
  background: #f8fafc;
}

.indicator-membership-panel,
.collection-description-panel {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
}

.indicator-membership-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.indicator-membership-head > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.indicator-membership-head span,
.collection-description-panel span {
  color: var(--muted);
  font-size: 12px;
}

.collection-description-panel p {
  margin: 6px 0 0;
  color: #475569;
  line-height: 1.65;
}

.collection-progress-summary,
.collection-aggregate-panel {
  display: grid;
  grid-template-columns: auto minmax(80px, 1fr) auto;
  align-items: center;
  gap: 8px 10px;
  padding: 10px 12px;
  border: 1px solid #dce9f5;
  border-radius: 10px;
  background: #f8fbff;
  color: #64748b;
  font-size: 12px;
}

.collection-progress-summary b,
.collection-aggregate-panel b {
  color: #0f2742;
  font-size: 15px;
}

.collection-progress-summary small,
.collection-aggregate-panel small {
  grid-column: 1 / -1;
  color: #64748b;
}

.collection-aggregate-panel {
  margin-top: 14px;
}

.collection-member-tree {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.collection-member-section {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.collection-member-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.collection-member-section-head span,
.collection-member-picker h4 span {
  min-width: 24px;
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--brand);
  background: var(--brand-soft);
  font-size: 12px;
  text-align: center;
}

.collection-member-list,
.collection-child-children {
  display: grid;
  gap: 7px;
}

.collection-child-children {
  margin: 7px 0 0 18px;
  padding-left: 10px;
  border-left: 2px solid #dbeafe;
}

.collection-member-row {
  width: 100%;
  min-width: 0;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #e4ebf2;
  border-radius: 9px;
  color: #334155;
  background: #fbfdff;
  text-align: left;
  cursor: pointer;
}

.collection-member-row:hover {
  border-color: rgba(2, 132, 199, 0.3);
  background: #f0f9ff;
}

.collection-member-row span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.collection-member-row b,
.collection-member-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collection-member-row small,
.collection-member-row strong,
.collection-member-empty {
  color: var(--muted);
  font-size: 12px;
}

.collection-member-empty {
  padding: 18px 8px;
  text-align: center;
}

.collection-basic-grid {
  padding: 0;
}

.collection-member-picker {
  display: grid;
  gap: 12px;
}

.collection-member-picker-head b,
.collection-member-picker-head span {
  display: block;
}

.collection-member-picker-head span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.collection-member-picker-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.collection-member-picker-grid > section {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
}

.collection-member-picker h4 {
  margin: 0 0 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.collection-picker-list,
.collection-check-list {
  max-height: 270px;
  display: grid;
  gap: 7px;
  overflow: auto;
}

.collection-check-list {
  max-height: 220px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdff;
}

.collection-picker-option,
.collection-check-option {
  min-width: 0;
  padding: 9px 10px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  border: 1px solid #e5edf5;
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
}

.collection-picker-option:has(input:checked),
.collection-check-option:has(input:checked) {
  border-color: rgba(2, 132, 199, 0.35);
  background: #f0f9ff;
}

.collection-picker-option span,
.collection-check-option span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.collection-picker-option b,
.collection-picker-option small,
.collection-check-option b,
.collection-check-option small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collection-picker-option small,
.collection-check-option small {
  color: var(--muted);
  font-size: 12px;
}

.collection-assignment-field {
  grid-column: 1 / -1;
}

.indicator-collection-assignment-editor {
  display: grid;
  gap: 14px;
}

.template-period-note > div,
.indicator-entry-readonly > div {
  min-height: 40px;
  padding: 9px 11px;
  display: grid;
  align-content: center;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #64748b;
  background: #f8fafc;
}

.indicator-entry-readonly small {
  color: var(--muted);
  font-size: 12px;
}

/* Unified dark surfaces. Keep these late in the cascade so legacy module
   styles cannot reintroduce light cards after the theme variables resolve. */
.theme-dark .login-card {
  color: var(--ink);
  border-color: rgba(125, 211, 252, 0.28);
  background: rgba(22, 35, 51, 0.96);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(125, 211, 252, 0.08) inset;
}

.theme-dark .login-card h3,
.theme-dark .profile-identity h3,
.theme-dark .profile-mini-item b,
.theme-dark .profile-card-head h3,
.theme-dark .profile-desc-grid dd,
.theme-dark .login-info-list dd,
.theme-dark .org-path-node b,
.theme-dark .permission-list span,
.theme-dark .security-list span,
.theme-dark .panel-head h3 {
  color: var(--heading);
}

.theme-dark .remember-row,
.theme-dark .field label,
.theme-dark .profile-mini-item span,
.theme-dark .profile-desc-grid dt,
.theme-dark .login-info-list dt,
.theme-dark .org-path-node span {
  color: var(--muted);
}

.theme-dark .captcha-image,
.theme-dark .org-path,
.theme-dark .permission-list div,
.theme-dark .security-list div,
.theme-dark .code-tag,
.theme-dark .collection-check-list,
.theme-dark .collection-picker-option,
.theme-dark .collection-check-option,
.theme-dark .template-period-note > div,
.theme-dark .indicator-entry-readonly > div {
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface-subtle);
}

.theme-dark .topbar,
.theme-dark .view-tabs {
  box-shadow: inset 0 -1px 0 var(--line);
}

.theme-dark .view-tab {
  color: var(--muted);
  border-color: var(--line);
  background: var(--surface-raised);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
}

.theme-dark .view-tab:hover {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--line) 58%, var(--muted));
  background: var(--surface-hover);
}

.theme-dark .view-tab.active,
.theme-dark .view-tab.active:hover {
  color: var(--brand);
  border-color: color-mix(in srgb, var(--brand) 58%, var(--line));
  background: var(--surface-selected);
  box-shadow: 0 3px 12px color-mix(in srgb, var(--brand) 14%, transparent);
}

.theme-dark .topbar-icon-btn,
.theme-dark .view-tab:hover,
.theme-dark .view-tab-close,
.theme-dark .view-tabs-more {
  color: var(--muted);
}

.theme-dark .topbar-icon-btn:hover,
.theme-dark .view-tab:hover,
.theme-dark .view-tab-context-menu button:hover,
.theme-dark .view-tabs-menu button:hover {
  color: var(--ink);
  background: var(--surface-hover);
}

.theme-dark .view-tabs-menu,
.theme-dark .view-tab-context-menu,
.theme-dark .filter-menu,
.theme-dark .row-more-menu,
.theme-dark .dropdown-menu,
.theme-dark .module-more-menu,
.theme-dark .table-filter-menu {
  color: var(--ink);
  border-color: var(--line);
  background: var(--el-bg-color-overlay);
  box-shadow: var(--el-box-shadow-light);
}

.theme-dark .row-more-menu button {
  color: var(--ink);
}

.theme-dark .row-more-menu button:hover {
  color: var(--heading);
  background: var(--surface-hover);
}

.theme-dark .row-more-menu button.danger-text {
  color: var(--red);
}

.theme-dark .stat-card,
.theme-dark .dashboard-stat,
.theme-dark .team-stat-card {
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface-raised);
  box-shadow: 0 12px 26px var(--shadow-color);
}

.theme-dark .panel-head,
.theme-dark th,
.theme-dark td,
.theme-dark .audit-pager {
  border-color: var(--line);
}

.theme-dark th {
  color: var(--heading);
  background: var(--surface-subtle);
}

.theme-dark tbody tr:hover,
.theme-dark .warning-record-row:hover td,
.theme-dark .warning-record-row.active td {
  background: var(--surface-hover);
}

.theme-dark tbody tr.selected-row {
  background: var(--surface-selected);
}

.theme-dark input,
.theme-dark select,
.theme-dark textarea,
.theme-dark .btn-line,
.theme-dark .icon-action,
.theme-dark .filter-chip,
.theme-dark .search-input,
.theme-dark .toolbar input,
.theme-dark .toolbar select {
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface-raised);
}

.theme-dark input::placeholder,
.theme-dark textarea::placeholder {
  color: var(--el-text-color-placeholder);
}

.theme-dark .good {
  color: var(--green);
  background: var(--green-soft);
}

.theme-dark .warn {
  color: var(--amber);
  background: var(--amber-soft);
}

.theme-dark .bad {
  color: var(--red);
  background: var(--red-soft);
}

.theme-dark .info,
.theme-dark .screen-chip,
.theme-dark .code-tag {
  color: #7dd3fc;
  background: var(--blue-soft);
}

.theme-dark .security-tip,
.theme-dark .warning-filter-card,
.theme-dark .warning-followup-intro,
.theme-dark .warning-detail-copy,
.theme-dark .audit-workbench,
.theme-dark .audit-tabs,
.theme-dark .audit-filter-grid {
  border-color: var(--line);
  background-color: var(--surface-subtle);
}

.theme-dark .el-overlay {
  background-color: var(--el-mask-color);
}

.theme-dark .el-dialog,
.theme-dark .el-drawer,
.theme-dark .el-popper,
.theme-dark .el-message-box {
  color: var(--el-text-color-primary);
  border-color: var(--el-border-color);
  background: var(--el-bg-color-overlay);
}

.theme-dark .el-dialog__title,
.theme-dark .el-drawer__title,
.theme-dark .el-message-box__title {
  color: var(--el-text-color-primary);
}

.theme-dark .el-input__wrapper,
.theme-dark .el-select__wrapper,
.theme-dark .el-textarea__inner {
  color: var(--el-text-color-primary);
  background: var(--el-fill-color-blank);
  box-shadow: 0 0 0 1px var(--el-border-color) inset;
}

.theme-dark .el-drawer__header,
.theme-dark .el-drawer__body,
.theme-dark .audit-detail {
  color: var(--ink);
  border-color: var(--line);
  background: var(--panel);
}

/* Graphite-neutral dark mode. These selectors intentionally sit at the end of
   the cascade because several migrated modules still define light surfaces. */
body.theme-dark,
body.theme-dark .shell,
body.theme-dark .main,
body.theme-dark.indicator-mode .main {
  background: var(--app-bg);
}

.theme-dark .sidebar {
  color: var(--ink);
  border-right: 1px solid var(--line);
  background: #171b21;
  box-shadow: 8px 0 28px rgba(0, 0, 0, 0.22);
}

.theme-dark .brand p,
.theme-dark .nav-version {
  color: var(--muted);
}

.theme-dark .nav-group-toggle,
.theme-dark .nav-item,
.theme-dark .nav-item.nav-child {
  color: #cfd5dd;
}

.theme-dark .nav-group-toggle:hover,
.theme-dark .nav-group-toggle:focus-visible,
.theme-dark .nav-group.active > .nav-group-toggle,
.theme-dark .nav-item:hover,
.theme-dark .nav-item.active,
.theme-dark .nav-item.nav-child:hover,
.theme-dark .nav-item.nav-child.active {
  color: var(--heading);
  background: var(--surface-raised);
}

.theme-dark .nav-children {
  border-left-color: var(--line);
}

.theme-dark .nav-icon,
.theme-dark .nav-group-count {
  color: var(--muted);
  background: var(--surface-subtle);
}

.theme-dark .nav-child-dot {
  background: #626d7a;
}

.theme-dark .nav-item.active::before,
.theme-dark .nav-item.nav-child.active .nav-child-dot {
  background: var(--brand);
}

.theme-dark .view-tabs-actions {
  border-left-color: var(--line);
  background: var(--app-bg);
}

.theme-dark .view-tabs-more {
  border: 1px solid var(--line);
  background: var(--surface-raised);
}

.theme-dark .table-wrap,
.theme-dark table,
.theme-dark tbody,
.theme-dark tbody tr,
.theme-dark td {
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface-raised);
}

.theme-dark tbody tr:nth-child(even),
.theme-dark .audit-table tbody tr:nth-child(even) {
  background: #20262e;
}

.theme-dark tbody tr:hover,
.theme-dark tbody tr:hover td,
.theme-dark .warning-record-row:hover td,
.theme-dark .warning-record-row.active td {
  background: var(--surface-hover);
}

.theme-dark tbody tr.selected-row,
.theme-dark tbody tr.selected-row td {
  background: var(--surface-selected);
}

.theme-dark .stat-card b,
.theme-dark .dashboard-stat b,
.theme-dark .team-stat-card b,
.theme-dark .indicator-kpi-card b,
.theme-dark .module-stat-grid b {
  color: var(--heading);
}

.theme-dark .stat-card.good,
.theme-dark .team-stat-card.good {
  background: var(--green-soft);
}

.theme-dark .stat-card.good b,
.theme-dark .team-stat-card.good b {
  color: var(--green);
}

.theme-dark .stat-card.warn,
.theme-dark .team-stat-card.warn {
  background: var(--amber-soft);
}

.theme-dark .stat-card.warn b,
.theme-dark .team-stat-card.warn b {
  color: var(--amber);
}

.theme-dark .stat-card.bad,
.theme-dark .team-stat-card.bad {
  background: var(--red-soft);
}

.theme-dark .stat-card.bad b,
.theme-dark .team-stat-card.bad b {
  color: var(--red);
}

.theme-dark .indicator-page .panel,
.theme-dark .indicator-page-head,
.theme-dark .indicator-manage-toolbar,
.theme-dark .indicator-manage-tabs,
.theme-dark .indicator-filter-panel,
.theme-dark .indicator-kpi-card,
.theme-dark .indicator-list-panel,
.theme-dark .indicator-list-card,
.theme-dark .indicator-detail,
.theme-dark .indicator-detail-basic,
.theme-dark .indicator-detail-metrics article,
.theme-dark .indicator-detail-progress,
.theme-dark .indicator-subject-panel,
.theme-dark .indicator-membership-panel,
.theme-dark .collection-description-panel,
.theme-dark .collection-member-section,
.theme-dark .collection-member-row,
.theme-dark .collection-progress-summary,
.theme-dark .collection-aggregate-panel,
.theme-dark .template-type-tabs,
.theme-dark .template-type-tab,
.theme-dark .detail-empty {
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface-raised);
  box-shadow: none;
}

.theme-dark .indicator-manage-tabs,
.theme-dark .template-type-tabs,
.theme-dark .indicator-detail-basic,
.theme-dark .indicator-detail-metrics article,
.theme-dark .indicator-detail-progress,
.theme-dark .indicator-membership-panel,
.theme-dark .collection-description-panel,
.theme-dark .collection-member-row,
.theme-dark .collection-progress-summary,
.theme-dark .collection-aggregate-panel {
  background: var(--surface-subtle);
}

.theme-dark .indicator-manage-tabs button,
.theme-dark .template-type-tab,
.theme-dark .collection-member-row {
  color: var(--muted);
}

.theme-dark .indicator-manage-tabs button b {
  color: var(--muted);
  background: #303844;
}

.theme-dark .indicator-manage-tabs button.active,
.theme-dark .template-type-tab.active,
.theme-dark .indicator-list-card.active {
  color: var(--heading);
  border-color: rgba(47, 183, 216, 0.58);
  background: var(--surface-selected);
  box-shadow: inset 0 0 0 1px rgba(47, 183, 216, 0.12);
}

.theme-dark .indicator-manage-tabs button.active b {
  color: #071317;
  background: var(--brand);
}

.theme-dark .indicator-editor-layout > .indicator-splitter span {
  border-color: var(--line);
  background: var(--surface-subtle);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.26);
}

.theme-dark .indicator-list-panel .panel-head,
.theme-dark .indicator-detail-head,
.theme-dark .analysis-trend-row {
  border-color: var(--line);
}

.theme-dark .indicator-folder-tree,
.theme-dark .folder-tree-entry,
.theme-dark .folder-tree-select,
.theme-dark .folder-tree-create,
.theme-dark .indicator-move-options label,
.theme-dark .personal-folder-chip {
  color: var(--muted);
  border-color: var(--line);
  background: var(--surface-subtle);
}

.theme-dark .folder-tree-select:hover,
.theme-dark .folder-tree-select.active,
.theme-dark .folder-tree-entry.active,
.theme-dark .indicator-move-options label.active {
  color: var(--brand);
  border-color: rgba(47, 183, 216, 0.55);
  background: var(--surface-selected);
}

.theme-dark .folder-tree-entry.active .folder-tree-select {
  color: var(--brand);
  background: transparent;
}

.theme-dark .folder-tree-select b {
  color: var(--ink);
  background: var(--surface-raised);
}

.theme-dark .indicator-card-actions .row-more[open] > summary.icon-action {
  color: var(--brand);
  border-color: rgba(47, 183, 216, 0.55);
  background: var(--surface-hover);
  box-shadow: inset 0 0 0 1px rgba(47, 183, 216, 0.08);
}

.indicator-card-actions .row-more-menu {
  min-width: 144px;
}

.indicator-card-actions .row-more-menu button {
  white-space: nowrap;
}

.theme-dark .collection-description-panel p,
.theme-dark .collection-progress-summary,
.theme-dark .collection-progress-summary small,
.theme-dark .collection-aggregate-panel,
.theme-dark .collection-aggregate-panel small,
.theme-dark .collection-card-description,
.theme-dark .collection-period-line,
.theme-dark .collection-period-line strong {
  color: var(--muted);
}

.theme-dark .collection-progress-summary b,
.theme-dark .collection-aggregate-panel b {
  color: var(--heading);
}

.theme-dark .collection-chip {
  color: #7ddff0;
  border-color: rgba(47, 183, 216, 0.32);
  background: var(--brand-soft);
}

.theme-dark .collection-chip.empty {
  color: var(--muted);
  border-color: var(--line);
  background: var(--surface-subtle);
}

.theme-dark .collection-progress-label {
  color: var(--green);
  background: var(--green-soft);
}

.theme-dark .collection-progress-label.attention {
  color: var(--amber);
  background: var(--amber-soft);
}

.theme-dark .collection-progress-label.error {
  color: var(--red);
  background: var(--red-soft);
}

.theme-dark .collection-progress-label.empty {
  color: var(--muted);
  background: var(--surface-subtle);
}

.theme-dark .module-settings-main,
.theme-dark .module-help-card,
.theme-dark .module-setting-group,
.theme-dark .module-item,
.theme-dark .module-stat-grid article {
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface-raised);
  box-shadow: none;
}

.theme-dark .module-setting-group,
.theme-dark .module-stat-grid article {
  background: var(--surface-subtle);
}

.theme-dark .module-item:hover {
  border-color: rgba(47, 183, 216, 0.48);
  background: var(--surface-hover);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

.theme-dark .module-item.is-hidden-module {
  background: #1a1f26;
}

.theme-dark .module-setting-group-title h4,
.theme-dark .module-settings-head h3,
.theme-dark .module-help-card h3,
.theme-dark .module-item b {
  color: var(--heading);
}

.theme-dark .module-setting-group-title p,
.theme-dark .module-settings-head p,
.theme-dark .module-item p,
.theme-dark .module-order,
.theme-dark .lock-mark,
.theme-dark .module-stat-grid span,
.theme-dark .module-help-card ul {
  color: var(--muted);
}

.theme-dark .module-setting-group-icon,
.theme-dark .module-item-icon,
.theme-dark .lock-mark {
  color: var(--brand);
  background: var(--brand-soft);
}

.theme-dark .module-save-tip {
  color: var(--amber);
  border-color: rgba(229, 181, 91, 0.38);
  background: var(--amber-soft);
}

.theme-dark .portal-indicator-card,
.theme-dark .portal-indicator-card.active,
.theme-dark .portal-indicator-card.is-risk,
.theme-dark .portal-indicator-card.is-empty,
.theme-dark .portal-indicator-card.overview-collection-card,
.theme-dark .portal-indicator-card.overview-collection-card.active,
.theme-dark .portal-indicator-card.overview-collection-card.is-risk,
.theme-dark .portal-indicator-card.overview-collection-card.is-empty,
.theme-dark .analysis-key-values > div,
.theme-dark .overview-period-switch button {
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface-raised);
  box-shadow: none;
}

.theme-dark .portal-indicator-card.overview-collection-card > b,
.theme-dark .analysis-headline h3,
.theme-dark .analysis-key-values b,
.theme-dark .trend-bars b,
.theme-dark .overview-period-trend-head {
  color: var(--heading);
}

.theme-dark .portal-indicator-card span,
.theme-dark .portal-indicator-card small,
.theme-dark .overview-collection-head > span,
.theme-dark .analysis-headline p,
.theme-dark .analysis-rate > span,
.theme-dark .analysis-key-values span,
.theme-dark .trend-bars span,
.theme-dark .trend-y-axis,
.theme-dark .trend-unit,
.theme-dark .map-context,
.theme-dark .map-legend,
.theme-dark .rank-row strong,
.theme-dark .rank-row strong small {
  color: var(--muted);
}

.theme-dark .portal-indicator-card i,
.theme-dark .rank-row i,
.theme-dark .map-tile i,
.theme-dark .analysis-rate-track,
.theme-dark .collection-progress-summary i {
  background: #303844;
}

.theme-dark .map-segmented-control,
.theme-dark .trend-segmented-control {
  border-color: var(--line);
  background: var(--surface-subtle);
}

.theme-dark .rank-row:hover,
.theme-dark .rank-row.active {
  background: var(--surface-hover);
}

.theme-dark .smart-date-trigger,
.theme-dark .smart-date-panel,
.theme-dark .smart-date-months button,
.theme-dark .smart-date-quick-list button,
.theme-dark .smart-date-actions,
.theme-dark .smart-date-mode,
.theme-dark .smart-date-sidebar,
.theme-dark .smart-date-summary,
.theme-dark .smart-date-mode button {
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface-raised);
}

.theme-dark .smart-date-mode,
.theme-dark .smart-date-sidebar,
.theme-dark .smart-date-summary {
  background: var(--surface-subtle);
}

.theme-dark .smart-date-mode button.active,
.theme-dark .smart-date-days button.selected,
.theme-dark .smart-date-months button.selected {
  color: #071317;
  border-color: var(--brand);
  background: var(--brand);
}

.theme-dark .smart-date-quick-list button:hover,
.theme-dark .smart-date-quick-list button.selected,
.theme-dark .smart-date-months button:hover,
.theme-dark .smart-date-days button:hover {
  color: var(--heading);
  border-color: rgba(47, 183, 216, 0.48);
  background: var(--surface-hover);
}

.theme-dark .el-dialog__header,
.theme-dark .el-dialog__body,
.theme-dark .el-dialog__footer,
.theme-dark .el-drawer__header,
.theme-dark .el-drawer__body,
.theme-dark .modal-actions {
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface-raised);
}

.theme-dark .el-button:not(.el-button--primary):not(.is-text),
.theme-dark .el-date-editor,
.theme-dark .el-picker-panel,
.theme-dark .el-select-dropdown,
.theme-dark .el-dropdown-menu {
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface-raised);
}

.theme-dark .main::-webkit-scrollbar-track,
.theme-dark .sidebar::-webkit-scrollbar-track {
  background: var(--app-bg);
}

.theme-dark .overview-empty {
  color: var(--muted);
  border-color: var(--line);
  background: var(--surface-subtle);
}

.theme-dark .rank-row em {
  color: var(--muted);
  background: var(--surface-subtle);
}

.theme-dark .rank-row em.rank-1 {
  color: var(--amber);
  background: var(--amber-soft);
}

.theme-dark .rank-row em.rank-2,
.theme-dark .rank-row em.rank-3 {
  color: #cfd5dd;
  background: #303844;
}

.theme-dark .pill.bad {
  color: var(--muted);
  background: var(--surface-subtle);
}

.theme-dark .organization-tree-row,
.theme-dark .organization-tree-row.is-center,
.theme-dark .organization-tree-row.is-team {
  color: var(--ink);
  background: var(--surface-raised);
}

.theme-dark .dashboard-filter-label,
.theme-dark .overview-period-strip .overview-period-button span,
.theme-dark .indicator-scope-line strong,
.theme-dark .template-card-created,
.theme-dark .template-card-updated,
.theme-dark .template-card-property span,
.theme-dark .team-stat-card span,
.theme-dark .team-stat-card small,
.theme-dark .team-table-head p,
.theme-dark .template-name-edit,
.theme-dark .organization-tree-row td:first-child small,
.theme-dark .organization-indent,
.theme-dark .muted {
  color: var(--muted);
}

.theme-dark .overview-period-strip .overview-period-button b,
.theme-dark .template-card-property b,
.theme-dark .team-table-head h3 {
  color: var(--heading);
}

.theme-dark .overview-period-strip .overview-period-button:hover {
  color: var(--ink);
  background: var(--surface-hover);
}

.theme-dark .overview-period-strip .overview-period-button.active,
.theme-dark .overview-period-strip .overview-period-button.active:hover {
  background: var(--surface-selected);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 34%, var(--line));
}

.theme-dark .overview-period-strip .overview-period-button.active span {
  color: var(--muted);
}

.theme-dark .overview-period-strip .overview-period-button.active b {
  color: var(--brand);
}

.theme-dark .warning-module-tabs button {
  color: var(--muted);
  background: transparent;
}

.theme-dark .warning-module-tabs button.active {
  color: var(--brand);
  background: var(--surface-raised);
}

/* System notices */
.notice-menu-wrap { position: relative; }
.notice-bell-button { position: relative; }
.notice-bell-button svg { width: 18px; height: 18px; }
.notice-badge { min-width: 17px; height: 17px; padding: 0 5px; position: absolute; top: -4px; right: -5px; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--surface-raised); border-radius: 999px; color: #fff; background: var(--red); font-size: 10px; font-weight: 800; line-height: 1; }
.notice-quick-menu { width: min(390px, calc(100vw - 24px)); max-height: min(620px, calc(100vh - 82px)); position: absolute; z-index: 70; top: calc(100% + 9px); right: -48px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: var(--surface-raised); box-shadow: 0 20px 48px var(--shadow-color); }
.notice-quick-menu > header, .notice-quick-menu > footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 15px; border-bottom: 1px solid var(--line); }
.notice-quick-menu > header div { display: grid; gap: 2px; }
.notice-quick-menu > header span { color: var(--muted); font-size: 12px; }
.notice-quick-menu > header button, .notice-quick-menu > footer button { padding: 0; border: 0; color: var(--brand); background: transparent; font-size: 12px; font-weight: 700; }
.notice-quick-menu > footer { justify-content: center; border-top: 1px solid var(--line); border-bottom: 0; }
.notice-quick-list { max-height: 430px; overflow-y: auto; }
.notice-quick-list > button { width: 100%; padding: 13px 15px; display: grid; grid-template-columns: auto 1fr; gap: 4px 9px; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); background: transparent; text-align: left; }
.notice-quick-list > button:hover { background: var(--surface-hover); }
.notice-quick-list > button b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice-quick-list > button > span:not(.notice-quick-level), .notice-quick-list > button small { grid-column: 2; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.notice-quick-level { align-self: center; padding: 2px 6px; border-radius: 999px; color: var(--brand); background: var(--brand-soft); font-size: 10px; font-weight: 800; }
.notice-quick-level.priority-重要 { color: var(--amber); background: var(--amber-soft); }
.notice-quick-level.priority-紧急 { color: var(--red); background: var(--red-soft); }
.notice-quick-empty { padding: 32px 20px; color: var(--muted); text-align: center; font-size: 13px; }

.notice-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.notice-page-head h3 { margin: 9px 0 5px; color: var(--heading); font-size: 24px; }
.notice-page-head p { margin: 0; color: var(--muted); }
.notice-head-actions, .notice-detail-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.notice-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.notice-filter-panel { display: grid; grid-template-columns: minmax(260px, 1fr) repeat(2, minmax(130px, 180px)) auto auto; gap: 10px; }
.notice-layout { min-height: 540px; display: grid; grid-template-columns: minmax(340px, .78fr) minmax(480px, 1.22fr); gap: 14px; }
.notice-list-panel, .notice-detail-panel { min-width: 0; }
.notice-list-panel { padding: 0; overflow: hidden; }
.notice-list-panel > .panel-head { margin: 0; padding: 16px 18px; }
.notice-list-panel > .panel-head h3, .notice-list-panel > .panel-head p { margin: 0; }
.notice-list-panel > .panel-head p { margin-top: 3px; }
.notice-list-item { width: 100%; min-height: 112px; padding: 15px 16px; position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); background: transparent; text-align: left; }
.notice-list-item:hover { background: var(--surface-hover); }
.notice-list-item.active { background: var(--surface-selected); box-shadow: inset 3px 0 0 var(--brand); }
.notice-list-item.unread .notice-list-title b { color: var(--heading); font-weight: 800; }
.notice-unread-dot { width: 8px; height: 8px; position: absolute; top: 20px; left: 6px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent); }
.notice-list-copy { min-width: 0; display: grid; gap: 7px; }
.notice-list-copy > span:not(.notice-list-title) { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.notice-list-copy small { color: var(--muted); }
.notice-list-title { min-width: 0; display: flex; align-items: center; gap: 7px; }
.notice-list-title b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice-list-title em { flex: 0 0 auto; padding: 2px 6px; border-radius: 5px; color: var(--brand); background: var(--brand-soft); font-size: 10px; font-style: normal; }
.notice-list-badges { display: flex; align-items: flex-start; gap: 5px; }
.notice-list-badges .pill.bad, .notice-detail-badges .pill.bad { color: var(--red); background: var(--red-soft); }
.notice-detail-panel { padding: 24px; }
.notice-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.notice-detail-head h2 { margin: 10px 0 7px; color: var(--heading); font-size: 25px; line-height: 1.35; }
.notice-detail-head p { margin: 0; color: var(--muted); font-size: 13px; }
.notice-detail-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.notice-detail-summary { margin: 18px 0 0; padding: 14px 16px; border-left: 3px solid var(--brand); border-radius: 8px; color: var(--ink); background: var(--surface-subtle); line-height: 1.7; }
.notice-detail-content { min-height: 250px; padding: 22px 2px; color: var(--ink); white-space: pre-wrap; word-break: break-word; font-size: 15px; line-height: 1.9; }
.notice-detail-meta { padding-top: 14px; display: flex; flex-wrap: wrap; gap: 8px 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.notice-empty { min-height: 180px; padding: 24px; display: grid; place-content: center; gap: 7px; color: var(--muted); text-align: center; }
.notice-empty b { color: var(--heading); }
.notice-editor-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.notice-editor-form label { min-width: 0; display: grid; gap: 7px; color: var(--ink); font-weight: 650; }
.notice-editor-form label > span { font-size: 13px; }
.notice-editor-form input, .notice-editor-form select, .notice-editor-form textarea { width: 100%; }
.notice-editor-form textarea { resize: vertical; }
.notice-editor-wide, .notice-pin-switch { grid-column: 1 / -1; }
.notice-editor-form .notice-pin-switch { display: flex; align-items: center; gap: 8px; }
.notice-editor-form .notice-pin-switch input { width: 16px; height: 16px; accent-color: var(--brand); }
.btn-danger { color: var(--red); border: 1px solid color-mix(in srgb, var(--red) 42%, var(--line)); background: var(--red-soft); }
.btn-danger:hover { filter: brightness(1.05); }

.theme-dark .notice-quick-menu,
.theme-dark .notice-list-panel,
.theme-dark .notice-detail-panel,
.theme-dark .notice-page-head,
.theme-dark .notice-filter-panel {
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface-raised);
}

@media (max-width: 1180px) {
  .notice-layout { grid-template-columns: 1fr; }
  .notice-list-panel { max-height: 520px; overflow-y: auto; }
}

@media (max-width: 960px) {
  .notice-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .notice-filter-panel { grid-template-columns: 1fr 1fr; }
  .notice-filter-panel > input { grid-column: 1 / -1; }
  .notice-page-head, .notice-detail-head { flex-direction: column; }
  .notice-head-actions, .notice-detail-actions { justify-content: flex-start; }
  .notice-editor-form { grid-template-columns: 1fr; }
  .notice-editor-wide, .notice-pin-switch { grid-column: auto; }

  .template-type-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .template-type-toolbar > .btn {
    align-self: flex-end;
  }

  .indicator-manage-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .indicator-manage-tabs {
    width: 100%;
  }

  .indicator-manage-tabs button {
    flex: 1;
  }

  .indicator-manage-actions {
    justify-content: flex-end;
  }

  .collection-member-tree,
  .collection-member-picker-grid {
    grid-template-columns: 1fr;
  }
}
[v-cloak] {
  display: none !important;
}
