:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --panel: #ffffff;
  --panel-soft: #f8fafb;
  --text: #17202a;
  --muted: #66717f;
  --line: #dfe4e8;
  --line-strong: #c8d0d7;
  --primary: #1666d8;
  --primary-soft: #eaf2fd;
  --critical: #c43232;
  --critical-soft: #fff0f0;
  --high: #b25e00;
  --high-soft: #fff5e8;
  --ok: #16825d;
  --ok-soft: #eaf8f2;
  --teal: #187b8c;
  --shadow: 0 8px 24px rgba(28, 39, 49, 0.08);
  font-family: Inter, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #171717;
  --panel: #212121;
  --panel-soft: #2f2f2f;
  --text: #ececec;
  --muted: #a1a1a1;
  --line: #383838;
  --line-strong: #505050;
  --primary: #5b9cf6;
  --primary-soft: #1d304b;
  --critical: #ef7d76;
  --critical-soft: #422523;
  --high: #d7b66f;
  --high-soft: #443821;
  --ok: #62c991;
  --ok-soft: #1d3b2c;
  --teal: #78c5d6;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.34);
}

html[data-theme="dark"] .sidebar { background: #171717; }
html[data-theme="dark"] .brand-mark { border: 1px solid var(--line-strong); background: #2f2f2f; color: var(--text); }
html[data-theme="dark"] .topbar { background: rgba(23, 23, 23, 0.94); }
html[data-theme="dark"] .log-viewer pre { background: #171717; color: #ececec; }

* { box-sizing: border-box; }
html, body { min-height: 100%; overflow-x: hidden; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 14px; letter-spacing: 0; }
button, input, select { font: inherit; letter-spacing: 0; }
button { color: inherit; }
button, summary { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.app-shell { width: 100%; max-width: 100vw; min-height: 100vh; overflow-x: hidden; display: grid; grid-template-columns: 216px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 18px 14px; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 30; }
.brand { min-height: 48px; padding: 0 8px; display: flex; align-items: center; gap: 11px; }
.brand-mark { width: 32px; height: 32px; display: grid; place-items: center; flex: 0 0 32px; border-radius: 6px; background: #17202a; color: #fff; font-size: 16px; font-weight: 800; }
.brand strong, .brand small, .side-footer strong, .side-footer small { display: block; }
.brand strong { font-size: 15px; }
.brand small, .side-footer small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.side-nav { display: grid; gap: 4px; margin-top: 30px; }
.nav-item { min-height: 42px; width: 100%; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; display: grid; grid-template-columns: 19px minmax(0, 1fr) auto; align-items: center; gap: 10px; color: var(--muted); text-align: left; cursor: pointer; }
.nav-item:hover { background: var(--panel-soft); color: var(--text); }
.nav-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.nav-item svg { width: 18px; height: 18px; }
.nav-item b { min-width: 22px; height: 20px; padding: 0 6px; display: grid; place-items: center; border-radius: 5px; background: var(--critical-soft); color: var(--critical); font-size: 11px; }
.side-footer { margin-top: auto; padding: 12px 9px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 9px; }
.department-switch { padding: 10px 8px 4px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; border-top: 1px solid var(--line); }
.department-switch > span { grid-column: 1 / -1; color: var(--muted); font-size: 10px; }
.department-switch a { min-width: 0; padding: 7px 5px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); font-size: 11px; text-align: center; text-decoration: none; }
.department-switch a.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.health-dot { width: 8px; height: 8px; display: inline-block; flex: 0 0 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }

.workspace { min-width: 0; overflow-x: clip; }
.topbar { min-height: 68px; padding: 10px 24px; position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 94%, transparent); backdrop-filter: blur(12px); }
.page-heading { min-width: 190px; }
.page-heading h1 { margin: 0; font-size: 20px; line-height: 1.25; }
.page-heading p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.date-control { height: 40px; padding: 0 10px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--muted); font-size: 12px; }
.date-control input { width: 132px; min-width: 0; height: 34px; padding: 0 3px; border: 0; outline: 0; background: transparent; color: var(--text); font-weight: 700; }
.sync-state { min-height: 36px; padding: 0 10px; display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.icon-button { width: 38px; height: 38px; padding: 0; display: inline-grid; place-items: center; flex: 0 0 38px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); cursor: pointer; }
.icon-button:hover { border-color: var(--line-strong); background: var(--panel-soft); }
.icon-button svg { width: 17px; height: 17px; }
.mobile-menu { display: none; }
.theme-menu { position: relative; }
.theme-menu > summary { list-style: none; }
.theme-menu > summary::-webkit-details-marker { display: none; }
.theme-popover { width: 164px; padding: 5px; position: absolute; top: 44px; right: 0; z-index: 35; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--panel); box-shadow: var(--shadow); }
.theme-popover button { width: 100%; min-height: 36px; padding: 0 8px; display: grid; grid-template-columns: 17px minmax(0, 1fr) 15px; align-items: center; gap: 8px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); text-align: left; cursor: pointer; }
.theme-popover button:hover, .theme-popover button.active { background: var(--panel-soft); color: var(--text); }
.theme-popover button svg { width: 16px; height: 16px; }
.theme-popover button > svg:last-child { visibility: hidden; color: var(--primary); }
.theme-popover button.active > svg:last-child { visibility: visible; }

.content { max-width: 1600px; margin: 0 auto; padding: 22px 24px 40px; }
.view { display: block; }
.error-banner { margin-bottom: 16px; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--critical) 35%, var(--line)); border-radius: 6px; background: var(--critical-soft); color: var(--critical); }

.overview-scope-bar { min-height: 48px; margin-bottom: 10px; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.overview-scope-bar > div:first-child { min-width: 0; margin-right: auto; }
.overview-scope-bar > div:first-child span, .overview-scope-bar > div:first-child strong { display: block; }
.overview-scope-bar > div:first-child span { color: var(--muted); font-size: 10px; }
.overview-scope-bar > div:first-child strong { max-width: min(620px, 55vw); margin-top: 3px; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.overview-group-menu { width: 180px; }
.overview-group-menu .menu-popover { right: 0; left: auto; }

.metric-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 7px; background: var(--panel); overflow: hidden; }
.metric { min-width: 0; min-height: 98px; padding: 16px 17px; border: 0; border-right: 1px solid var(--line); background: transparent; text-align: left; }
.metric[data-overview-action] { cursor: pointer; }
.metric[data-overview-action]:hover { background: var(--panel-soft); }
.metric:last-child { border-right: 0; }
.metric span, .metric small { display: block; color: var(--muted); font-size: 12px; }
.metric strong { max-width: 100%; display: block; margin: 7px 0 5px; overflow: hidden; font-size: 22px; line-height: 1.1; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.metric.amount-metric strong { font-size: 18px; }
.metric[data-tone="critical"] strong { color: var(--critical); }
.metric[data-tone="high"] strong { color: var(--high); }
.metric[data-tone="ok"] strong { color: var(--text); }

.overview-grid { margin-top: 16px; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr); gap: 16px; }
.overview-status-grid { grid-template-columns: minmax(0, 1.35fr) minmax(330px, 0.65fr); align-items: start; }
.panel, .list-panel { border: 1px solid var(--line); border-radius: 7px; background: var(--panel); }
.panel-head { min-height: 62px; padding: 13px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.panel-head h2, .list-header h2 { margin: 0; font-size: 15px; }
.panel-head p, .list-header p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.text-button { min-height: 34px; padding: 0 4px; border: 0; background: transparent; display: inline-flex; align-items: center; gap: 6px; color: var(--primary); font-size: 12px; cursor: pointer; white-space: nowrap; }
.text-button svg { width: 15px; height: 15px; }

.health-content { padding: 18px 16px; }
.compact-health { min-height: 222px; display: grid; grid-template-columns: 128px minmax(0, 1fr); align-content: center; align-items: center; gap: 16px 20px; }
.completion-ring { --completion: 0deg; width: 116px; height: 116px; padding: 0; position: relative; display: grid; place-items: center; border: 0; border-radius: 50%; background: conic-gradient(var(--primary) var(--completion), var(--line) 0); cursor: pointer; }
.completion-ring::before { content: ""; width: 92px; height: 92px; position: absolute; border-radius: 50%; background: var(--panel); }
.completion-ring > span { position: relative; z-index: 1; text-align: center; }
.completion-ring strong, .completion-ring small { display: block; }
.completion-ring strong { font-size: 24px; }
.completion-ring small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.health-summary span, .health-summary strong, .health-summary small { display: block; }
.health-summary span, .health-summary small { color: var(--muted); }
.health-summary strong { margin: 5px 0; font-size: 28px; }
.health-summary small { font-size: 11px; }
.progress-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 16px; }
.progress-row strong { font-size: 26px; }
.progress-row span { color: var(--muted); font-size: 12px; }
.progress-track { height: 8px; margin-top: 12px; border-radius: 4px; background: var(--line); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 4px; background: var(--primary); }
.status-breakdown { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.status-breakdown button { min-height: 66px; padding: 10px; border: 0; background: var(--panel-soft); text-align: left; cursor: pointer; }
.status-breakdown button:hover { background: var(--primary-soft); }
.status-breakdown strong, .status-breakdown span { display: block; }
.status-breakdown strong { margin-bottom: 5px; font-size: 18px; }
.status-breakdown span { color: var(--muted); font-size: 11px; }

.fund-list { padding: 6px 16px 10px; }
.fund-row { min-height: 52px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.fund-row:last-child { border-bottom: 0; }
.fund-row span { color: var(--muted); }
.fund-row strong { font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fund-row.negative strong { color: var(--critical); }
.fund-row.positive strong { color: var(--ok); }

.group-overview { min-width: 0; }
.group-matrix { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; overflow: hidden; background: var(--line); }
.group-cell { min-width: 0; min-height: 82px; padding: 12px; display: grid; align-content: center; gap: 10px; border: 0; background: var(--panel); color: var(--text); text-align: left; cursor: pointer; }
.group-cell:hover { background: var(--panel-soft); }
.group-cell-head, .group-cell-stats { min-width: 0; display: flex; align-items: center; }
.group-cell-head { justify-content: space-between; gap: 8px; }
.group-cell-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group-cell-head > b { color: var(--primary); font-size: 13px; }
.group-cell-stats { justify-content: space-between; gap: 6px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.group-cell-stats b { color: var(--text); font-size: 11px; }
.group-cell-stats .risk b { color: var(--critical); }
.change-overview { min-width: 0; }

.change-list, .urgent-list { padding: 8px 16px; }
.change-item, .urgent-item { min-height: 58px; padding: 10px 0; display: grid; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.change-item:last-child, .urgent-item:last-child { border-bottom: 0; }
.change-item { width: 100%; grid-template-columns: 30px minmax(0, 1fr) auto; border-top: 0; border-right: 0; border-left: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.change-item:hover { background: var(--panel-soft); }
.change-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 6px; background: var(--panel-soft); color: var(--teal); }
.change-icon svg { width: 15px; height: 15px; }
.change-item strong, .change-item small, .urgent-item strong, .urgent-item small { display: block; }
.change-item small, .urgent-item small { margin-top: 3px; color: var(--muted); }
.change-value { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; white-space: nowrap; }
.change-value svg { width: 15px; height: 15px; color: var(--muted); }
.urgent-item { grid-template-columns: 8px minmax(140px, 0.55fr) minmax(180px, 1fr) auto; cursor: pointer; }
.urgent-item:hover { background: var(--panel-soft); }
.priority-line { width: 4px; height: 34px; border-radius: 2px; background: var(--high); }
.priority-line.critical { background: var(--critical); }
.urgent-amount { font-variant-numeric: tabular-nums; white-space: nowrap; }

.task-metrics { margin-bottom: 14px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.task-metric { min-height: 76px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); text-align: left; cursor: pointer; }
.task-metric:hover, .task-metric.active { border-color: var(--primary); background: var(--primary-soft); }
.task-metric.static { cursor: default; }
.task-metric.static:hover { border-color: var(--line); background: var(--panel); }
.task-metric span { display: block; color: var(--muted); font-size: 11px; }
.task-metric strong { max-width: 100%; display: block; margin-top: 6px; overflow: hidden; font-size: 20px; text-overflow: ellipsis; white-space: nowrap; }
.task-metric small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.task-metric[data-tone="critical"] strong { color: var(--critical); }
.task-metric[data-tone="high"] strong { color: var(--high); }
.task-metric[data-tone="ok"] strong { color: var(--ok); }
.task-metric.amount-metric strong { font-size: 17px; }

.list-header { min-height: 68px; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.secondary-button { min-height: 36px; padding: 0 12px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--panel); cursor: pointer; }
.secondary-button:hover { background: var(--panel-soft); }
.secondary-button svg { width: 16px; height: 16px; }
.filter-bar { padding: 12px 16px; display: grid; grid-template-columns: minmax(240px, 1fr) 170px 170px auto 38px; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.notice-date-filter { height: 38px; display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.notice-date-filter[hidden] { display: none; }
.notice-date-filter input { width: 132px; height: 38px; padding: 0 7px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--panel); color: var(--text); font: inherit; }
.search-field { min-width: 0; height: 38px; padding: 0 10px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--panel); }
.search-field:focus-within { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.search-field svg { width: 16px; height: 16px; color: var(--muted); }
.search-field input { width: 100%; min-width: 0; height: 34px; border: 0; outline: 0; background: transparent; color: var(--text); }
.filter-menu { position: relative; }
.filter-menu summary { height: 38px; padding: 0 10px; list-style: none; display: grid; grid-template-columns: 16px minmax(0, 1fr) 14px; align-items: center; gap: 7px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--panel); cursor: pointer; }
.filter-menu summary::-webkit-details-marker { display: none; }
.filter-menu summary svg { width: 15px; height: 15px; }
.filter-menu summary span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-popover { width: 220px; max-height: 280px; padding: 6px; position: absolute; top: 44px; left: 0; z-index: 25; overflow-y: auto; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--panel); box-shadow: var(--shadow); }
.menu-option { min-height: 36px; padding: 0 8px; display: flex; align-items: center; gap: 9px; border-radius: 4px; cursor: pointer; }
.menu-option:hover { background: var(--panel-soft); }
.menu-option input { width: 16px; height: 16px; accent-color: var(--primary); }
.segment-control { height: 38px; padding: 3px; display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--panel-soft); }
.segment-control button { height: 30px; padding: 0 11px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); cursor: pointer; }
.segment-control button.active { background: var(--panel); color: var(--text); box-shadow: 0 1px 3px rgba(20, 30, 40, 0.12); font-weight: 700; }
.reset-button { width: 38px; height: 38px; }
.active-filters { min-height: 0; padding: 0 16px; display: flex; flex-wrap: wrap; gap: 6px; }
.active-filters:not(:empty) { padding-top: 10px; }
.filter-chip { min-height: 28px; padding: 0 8px; display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 5px; background: var(--panel-soft); color: var(--muted); font-size: 11px; }
.filter-chip button { width: 18px; height: 18px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.result-meta { min-height: 40px; padding: 0 16px; display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; }
.result-meta strong { color: var(--text); }
.result-meta #sortDescription { margin-left: auto; }

.table-scroll { width: 100%; overflow-x: auto; border-top: 1px solid var(--line); }
.data-table { width: 100%; min-width: 994px; table-layout: fixed; border-collapse: collapse; }
.data-table col.col-select { width: 42px; }
.data-table:not(.selection-enabled) col.col-select { width: 0; }
.data-table:not(.selection-enabled) .select-cell { display: none; }
.data-table col.col-store { width: 210px; }
.data-table col.col-group { width: 96px; }
.data-table col.col-type { width: 150px; }
.data-table col.col-reason { width: auto; }
.data-table col.col-amount { width: 120px; }
.data-table col.col-updated { width: 136px; }
.data-table col.col-action { width: 58px; }
.data-table th { height: 42px; padding: 0 10px; border-bottom: 1px solid var(--line-strong); background: var(--panel-soft); color: var(--muted); font-size: 11px; text-align: left; white-space: nowrap; }
.sort-button { width: 100%; min-width: 0; height: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: space-between; gap: 4px; border: 0; background: transparent; color: inherit; font-size: inherit; font-weight: 700; text-align: left; cursor: pointer; white-space: nowrap; }
.sort-button:hover, .sort-button.active { color: var(--primary); }
.sort-button svg { width: 12px; height: 12px; flex: 0 0 12px; }
.data-table td { height: 58px; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.select-cell { text-align: center !important; }
.select-cell input { width: 16px; height: 16px; accent-color: var(--primary); }
.data-table tbody tr { cursor: pointer; }
.data-table tbody tr:hover td { background: var(--panel-soft); }
.data-table tbody tr.selected td { background: var(--primary-soft); }
.data-table td[data-label="店铺"], .data-table td[data-label="分组"], .data-table td[data-label="问题类型"], .data-table td[data-label="绩效分类"], .data-table td[data-label="涉及金额"], .data-table td[data-label="风险等级"], .data-table td[data-label="更新时间"], .data-table td[data-label="绩效日期"] { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.store-cell strong, .store-cell small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-cell small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.reason-cell { min-width: 220px; line-height: 1.45; overflow-wrap: anywhere; }
.priority-badge, .type-badge { min-height: 24px; padding: 0 7px; display: inline-flex; align-items: center; border-radius: 4px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.priority-badge.critical { background: var(--critical-soft); color: var(--critical); }
.priority-badge.high { background: var(--high-soft); color: var(--high); }
.priority-badge.medium { background: var(--panel-soft); color: var(--muted); }
.type-badge { background: var(--primary-soft); color: var(--primary); }
.amount-cell { font-variant-numeric: tabular-nums; font-weight: 700; }
.row-action { width: 32px; height: 32px; padding: 0; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 5px; background: var(--panel); cursor: pointer; }
.row-action svg { width: 15px; height: 15px; }
.empty-state { min-height: 280px; display: grid; place-items: center; align-content: center; gap: 8px; color: var(--muted); }
.empty-state svg { width: 28px; height: 28px; }

.drawer-backdrop { position: fixed; inset: 0; z-index: 49; background: rgba(15, 20, 25, 0.28); }
.detail-drawer { width: min(430px, 100vw); position: fixed; inset: 0 0 0 auto; z-index: 50; visibility: hidden; pointer-events: none; display: grid; grid-template-rows: auto minmax(0, 1fr); border-left: 1px solid var(--line); background: var(--panel); box-shadow: var(--shadow); transform: translateX(102%); transition: transform 0.18s ease, visibility 0s linear 0.18s; }
.detail-drawer.open { visibility: visible; pointer-events: auto; transform: translateX(0); transition-delay: 0s; }
.drawer-head { min-height: 72px; padding: 13px 16px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 4px 0 0; font-size: 18px; }
.eyebrow { color: var(--muted); font-size: 11px; }
.drawer-body { padding: 16px; overflow-y: auto; }
.detail-section { margin-bottom: 18px; }
.detail-section h3 { margin: 0 0 9px; color: var(--muted); font-size: 11px; text-transform: uppercase; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.detail-field { min-height: 62px; padding: 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.detail-field:nth-child(2n) { border-right: 0; }
.detail-field span, .detail-field strong { display: block; }
.detail-field span { color: var(--muted); font-size: 10px; }
.detail-field strong { margin-top: 6px; line-height: 1.35; overflow-wrap: anywhere; }
.issue-stack { display: grid; gap: 7px; }
.issue-line { padding: 10px; border-left: 3px solid var(--high); background: var(--high-soft); }
.issue-line.critical { border-color: var(--critical); background: var(--critical-soft); }
.issue-line strong, .issue-line span { display: block; }
.issue-line span { margin-top: 4px; color: var(--muted); font-size: 12px; }
.notice-toggle { width: 100%; min-height: 38px; padding: 0 10px; display: flex; justify-content: space-between; align-items: center; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-soft); cursor: pointer; }
.notice-body { margin-top: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-soft); line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.control-status { min-height: 58px; padding: 10px 14px; display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); }
.control-status .status-indicator { width: 9px; height: 9px; border-radius: 50%; background: var(--critical); box-shadow: 0 0 0 3px var(--critical-soft); }
.control-status[data-state="online"] .status-indicator { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.control-status strong, .control-status small { display: block; }
.control-status small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.console-grid { min-width: 0; margin-top: 14px; display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 14px; align-items: start; }
.run-cart-panel { margin-top: 14px; }
.run-cart-body { min-height: 76px; padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.run-cart-empty { width: 100%; min-height: 56px; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); }
.run-cart-empty svg { width: 18px; height: 18px; }
.run-cart-group { min-width: 190px; padding: 9px 10px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-soft); }
.run-cart-group strong, .run-cart-group small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.run-cart-group small { color: var(--muted); }
.run-cart-group button { width: 24px; height: 24px; padding: 0; grid-row: 1 / 3; grid-column: 2; align-self: center; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.run-cart-footer { min-height: 58px; padding: 10px 14px; display: flex; align-items: center; justify-content: flex-end; gap: 18px; border-top: 1px solid var(--line); }
.run-cart-footer .checkbox-row { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.run-cart-footer input { width: 16px; height: 16px; accent-color: var(--primary); }
.console-grid > *, .runner-panel, .schedule-panel, .runner-body, .store-picker, .run-options { min-width: 0; }
.toggle-control { width: 40px; height: 23px; position: relative; display: inline-flex; }
.toggle-control input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-control span { width: 40px; height: 23px; border-radius: 12px; background: var(--line-strong); cursor: pointer; }
.toggle-control span::after { content: ""; width: 17px; height: 17px; position: absolute; top: 3px; left: 3px; border-radius: 50%; background: #fff; transition: transform 0.16s ease; }
.toggle-control input:checked + span { background: var(--ok); }
.toggle-control input:checked + span::after { transform: translateX(17px); }
.control-form { padding: 14px; display: grid; gap: 12px; }
.control-form label { display: grid; gap: 6px; }
.control-form label > span { color: var(--muted); font-size: 11px; }
.control-form input { width: 100%; height: 38px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--panel); color: var(--text); }
.control-form input:disabled { color: var(--muted); background: var(--panel-soft); }
.primary-button { min-height: 38px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--primary); border-radius: 6px; background: var(--primary); color: #fff; font-weight: 700; cursor: pointer; }
.primary-button:disabled { border-color: var(--line-strong); background: var(--line-strong); color: var(--panel); cursor: not-allowed; }
.primary-button svg { width: 16px; height: 16px; }
.run-stage { min-width: 0; max-width: 100%; padding: 12px 14px; display: grid; grid-template-columns: repeat(6, minmax(90px, 1fr)); gap: 6px; border-bottom: 1px solid var(--line); }
.run-stage button { min-height: 56px; padding: 7px; display: grid; place-items: center; align-content: center; gap: 5px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--muted); cursor: pointer; }
.run-stage button:hover, .run-stage button.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.run-stage svg { width: 17px; height: 17px; }
.run-stage span { font-size: 11px; white-space: nowrap; }
.runner-body { display: grid; grid-template-columns: minmax(320px, 1fr) 300px; }
.store-picker { min-width: 0; padding: 12px 14px 14px; border-right: 1px solid var(--line); }
.store-source-box { margin-bottom: 11px; padding: 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-soft); }
.store-source-head { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.store-source-head > div { min-width: 0; }
.store-source-head strong, .store-source-head small { display: block; }
.store-source-head small { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.compact-button { min-height: 32px; padding: 0 9px; flex: 0 0 auto; font-size: 11px; }
.store-source-controls { margin-top: 9px; display: grid; grid-template-columns: minmax(150px, 1fr) auto auto; align-items: end; gap: 7px; }
.store-source-controls > label { min-width: 0; display: grid; gap: 4px; }
.store-source-controls > label > span { color: var(--muted); font-size: 10px; }
.store-source-controls select { width: 100%; min-width: 0; height: 36px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--panel); color: var(--text); }
.tag-scope { height: 36px; }
.tag-scope button { height: 28px; padding: 0 8px; font-size: 10px; white-space: nowrap; }
.store-source-controls > .secondary-button { min-height: 36px; padding: 0 9px; white-space: nowrap; }
.picker-head { display: flex; gap: 10px; align-items: center; }
.picker-head .search-field { flex: 1; }
.store-selection-meta { min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11px; }
.store-selection-meta strong { color: var(--text); }
.store-picker-list { height: 290px; overflow-y: auto; border: 1px solid var(--line); border-radius: 6px; }
.store-option { min-height: 42px; padding: 6px 10px; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 9px; border-bottom: 1px solid var(--line); cursor: pointer; }
.store-option:last-child { border-bottom: 0; }
.store-option:hover { background: var(--panel-soft); }
.store-option input { width: 16px; height: 16px; accent-color: var(--primary); }
.store-option strong, .store-option small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-option small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.store-option > span:last-child { color: var(--muted); font-size: 11px; white-space: nowrap; }
.run-options { padding: 12px 14px 14px; display: grid; align-content: start; gap: 9px; }
.option-row { min-height: 52px; padding: 8px 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-soft); }
.option-row strong, .option-row small { display: block; }
.option-row small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.checkbox-row input { width: 17px; height: 17px; accent-color: var(--primary); }
.stage-badge { padding: 4px 7px; border-radius: 4px; background: var(--primary-soft); color: var(--primary); font-family: Consolas, monospace; font-size: 11px; }
.run-warning { min-height: 46px; padding: 8px 10px; display: flex; align-items: center; gap: 8px; border: 1px solid color-mix(in srgb, var(--high) 32%, var(--line)); border-radius: 6px; background: var(--high-soft); color: var(--high); font-size: 11px; line-height: 1.45; }
.run-warning svg { width: 17px; height: 17px; flex: 0 0 17px; }
.run-button { width: 100%; margin-top: 2px; }
.run-history-panel { margin-top: 14px; }
.run-workspace { min-height: 340px; display: grid; grid-template-columns: 350px minmax(0, 1fr); }
.run-list { max-height: 420px; overflow-y: auto; border-right: 1px solid var(--line); }
.run-empty { min-height: 250px; display: grid; place-items: center; align-content: center; gap: 8px; color: var(--muted); }
.run-empty svg { width: 22px; height: 22px; }
.compact-empty { min-height: 120px; }
.run-item { min-height: 70px; padding: 10px 12px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 10px; border-bottom: 1px solid var(--line); cursor: pointer; }
.run-item:hover, .run-item.active { background: var(--panel-soft); }
.run-item strong, .run-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.run-item small { color: var(--muted); }
.run-state { padding: 3px 6px; border-radius: 4px; background: var(--panel-soft); color: var(--muted); font-size: 10px; }
.run-state.queued { background: var(--high-soft); color: var(--high); }
.run-state.running { background: var(--primary-soft); color: var(--primary); }
.run-state.succeeded { background: var(--ok-soft); color: var(--ok); }
.run-state.failed { background: var(--critical-soft); color: var(--critical); }
.log-viewer { min-width: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); }
.log-head { min-height: 58px; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.log-head strong, .log-head small { display: block; }
.log-head small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.log-state { color: var(--muted); font-size: 11px; }
.log-viewer pre { min-height: 280px; margin: 0; padding: 14px; overflow: auto; background: #171b20; color: #d5dce3; font: 12px/1.65 Consolas, "SFMono-Regular", monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.suspended-metrics { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.suspended-panel { margin-top: 14px; }
.suspended-filter-bar { grid-template-columns: minmax(260px, 1fr) auto; }
.suspended-table { min-width: 1180px; }
.suspended-table col.s-col-store { width: 210px; }
.suspended-table col.s-col-group { width: 94px; }
.suspended-table col.s-col-state { width: 120px; }
.suspended-table col.s-col-balance { width: 128px; }
.suspended-table col.s-col-plan { width: 96px; }
.suspended-table col.s-col-rate { width: 96px; }
.suspended-table col.s-col-money { width: 120px; }
.suspended-table col.s-col-action { width: 58px; }
.manual-editor { display: grid; gap: 12px; }
.manual-fieldset { margin: 0; padding: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; border: 1px solid var(--line); border-radius: 6px; }
.manual-fieldset legend { padding: 0 5px; color: var(--muted); font-size: 11px; }
.manual-field { min-width: 0; display: grid; gap: 5px; }
.manual-field.wide { grid-column: 1 / -1; }
.manual-field span { color: var(--muted); font-size: 10px; }
.manual-field input, .manual-field select, .manual-field textarea { width: 100%; min-width: 0; min-height: 36px; padding: 7px 8px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--panel); color: var(--text); }
.manual-field textarea { min-height: 68px; resize: vertical; }
.manual-field input:disabled, .manual-field select:disabled, .manual-field textarea:disabled { background: var(--panel-soft); color: var(--muted); }
.audit-note { padding: 9px 10px; border-left: 3px solid var(--teal); background: var(--panel-soft); color: var(--muted); font-size: 11px; line-height: 1.5; }
.change-store-list { display: grid; gap: 7px; }
.change-store-row { width: 100%; min-width: 0; min-height: 58px; padding: 9px 10px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(100px, 0.85fr) 16px; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); text-align: left; cursor: pointer; }
.change-store-row:hover { border-color: var(--primary); background: var(--primary-soft); }
.change-store-row strong, .change-store-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.change-store-row small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.change-store-row > span:nth-child(2) { color: var(--muted); font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
.change-store-row svg { width: 15px; height: 15px; color: var(--muted); }
.batch-tray { min-height: 64px; padding: 10px 18px; position: fixed; inset: auto 0 0 216px; z-index: 45; display: flex; align-items: center; justify-content: flex-end; gap: 12px; border-top: 1px solid var(--line-strong); background: var(--panel); box-shadow: 0 -8px 24px rgba(28, 39, 49, 0.09); }
.batch-count { margin-right: auto; display: flex; align-items: baseline; gap: 5px; color: var(--muted); }
.batch-count strong { color: var(--primary); font-size: 21px; }
.batch-tray label { height: 38px; padding: 0 9px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); border-radius: 6px; }
.batch-tray label > span { color: var(--muted); font-size: 11px; }
.batch-tray select { height: 34px; border: 0; outline: 0; background: transparent; color: var(--text); font-weight: 700; }
.import-dialog { width: min(680px, calc(100vw - 32px)); max-height: min(720px, calc(100vh - 32px)); padding: 0; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--panel); color: var(--text); box-shadow: 0 20px 60px rgba(15, 20, 25, 0.22); }
.import-dialog::backdrop { background: rgba(15, 20, 25, 0.42); }
.dialog-head { min-height: 68px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 3px 0 0; font-size: 16px; }
.dialog-body { max-height: 520px; padding: 16px; overflow-y: auto; }
.import-file-state { min-height: 82px; padding: 14px; display: flex; align-items: center; gap: 12px; border: 1px dashed var(--line-strong); border-radius: 6px; background: var(--panel-soft); }
.import-file-state > svg { width: 24px; height: 24px; color: var(--primary); }
.import-file-state strong, .import-file-state small { display: block; }
.import-file-state small { margin-top: 4px; color: var(--muted); }
.import-summary { margin-top: 12px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.import-summary > div { padding: 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-soft); }
.import-summary span, .import-summary strong { display: block; }
.import-summary span { color: var(--muted); font-size: 10px; }
.import-summary strong { margin-top: 5px; font-size: 18px; }
.import-errors { margin-top: 12px; padding: 10px; border: 1px solid color-mix(in srgb, var(--critical) 30%, var(--line)); border-radius: 6px; background: var(--critical-soft); color: var(--critical); font-size: 11px; line-height: 1.55; white-space: pre-wrap; }
.dialog-footer { min-height: 64px; padding: 11px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); }
.dialog-footer > div { display: flex; gap: 8px; }
.mobile-nav { display: none; }
body.batch-mode .content { padding-bottom: 108px; }

@media (max-width: 1320px) {
  .console-grid { grid-template-columns: 1fr; }
  .control-form { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: end; }
  .control-form .primary-button { min-width: 130px; }
  .runner-body { grid-template-columns: minmax(0, 1fr) 300px; }
}

@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 76px minmax(0, 1fr); }
  .batch-tray { left: 76px; }
  .sidebar { padding: 16px 10px; }
  .brand { padding: 0 10px; }
  .brand > span:last-child, .nav-item span, .side-footer > span:last-child, .department-switch { display: none; }
  .nav-item { position: relative; grid-template-columns: 1fr; justify-items: center; padding: 0; }
  .nav-item b { min-width: 18px; height: 16px; padding: 0 4px; position: absolute; top: 0; right: 0; font-size: 9px; }
  .side-footer { justify-content: center; }
  .metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric:nth-child(2n) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .filter-bar { grid-template-columns: minmax(220px, 1fr) 150px 150px 38px; }
  .filter-bar.notice-filtering { grid-template-columns: minmax(200px, 1fr) 140px 140px 270px 38px; }
  .segment-control { width: max-content; }
  .console-grid { grid-template-columns: 1fr; }
  .control-form { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; }
  .run-stage { grid-template-columns: repeat(3, minmax(90px, 1fr)); }
  .runner-body { grid-template-columns: 1fr; }
  .store-picker { border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 900px) and (min-width: 761px) {
  .sync-state { display: none; }
  .filter-bar { grid-template-columns: minmax(200px, 1fr) 140px 140px 38px; }
  .filter-bar.notice-filtering { grid-template-columns: minmax(200px, 1fr) 140px 140px 38px; }
  .filter-bar.notice-filtering .notice-date-filter { grid-column: 1 / 4; grid-row: 2; }
  #resetFilters { grid-column: 4; grid-row: 1; }
}

@media (max-width: 760px) {
  body { padding-bottom: 62px; }
  body.batch-mode { padding-bottom: 188px; }
  body.batch-mode .content { padding-bottom: 150px; }
  .app-shell { display: block; }
  .sidebar { display: none; }
  body.mobile-sidebar-open::before { content: ""; position: fixed; inset: 0; z-index: 48; background: rgba(15, 20, 25, 0.32); }
  body.mobile-sidebar-open .sidebar { width: min(280px, 82vw); height: 100vh; padding: 18px 14px; position: fixed; inset: 0 auto 0 0; z-index: 49; display: flex; box-shadow: var(--shadow); }
  body.mobile-sidebar-open .brand > span:last-child,
  body.mobile-sidebar-open .nav-item span,
  body.mobile-sidebar-open .side-footer > span:last-child { display: block; }
  body.mobile-sidebar-open .department-switch { display: grid; }
  body.mobile-sidebar-open .nav-item { grid-template-columns: 19px minmax(0, 1fr) auto; justify-items: stretch; padding: 0 10px; }
  .topbar { min-height: 64px; padding: 9px 12px; gap: 9px; }
  .mobile-menu { display: inline-grid; }
  .page-heading { min-width: 0; }
  .page-heading h1 { font-size: 17px; }
  .page-heading p { display: none; }
  .sync-state, .date-control > span { display: none; }
  .date-control { height: 38px; padding: 0 6px; }
  .date-control input { width: 126px; }
  .top-actions { gap: 6px; }
  .top-actions > .icon-button { display: none; }
  .content { padding: 12px 12px 24px; }
  .overview-scope-bar { min-height: 42px; margin-bottom: 8px; }
  .overview-scope-bar > div:first-child strong { max-width: 36vw; }
  .overview-group-menu { width: 142px; }
  .overview-scope-bar .reset-button { position: static; grid-column: auto; grid-row: auto; flex: 0 0 38px; }
  .console-grid { grid-template-columns: 1fr; }
  .console-grid, .console-grid > *, .runner-panel, .schedule-panel { width: 100%; max-width: 100%; }
  .control-status { grid-template-columns: 10px minmax(0, 1fr); }
  .control-status .secondary-button { grid-column: 1 / -1; width: 100%; }
  .run-stage { display: flex; overflow-x: auto; }
  .run-stage button { min-width: 104px; flex: 0 0 104px; }
  .runner-body { display: block; }
  .control-form { grid-template-columns: 1fr; }
  .store-source-head { align-items: flex-start; }
  .store-source-controls { grid-template-columns: 1fr; align-items: stretch; }
  .tag-scope { width: 100%; overflow-x: auto; }
  .store-source-controls > .secondary-button { width: 100%; justify-content: center; }
  .store-picker-list { height: 260px; }
  .run-workspace { display: block; }
  .run-list { max-height: 260px; border-right: 0; border-bottom: 1px solid var(--line); }
  .log-viewer pre { min-height: 240px; }
  .metric-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; }
  .metric { min-width: 0; min-height: 82px; padding: 13px 12px; border-right: 1px solid var(--line); }
  .metric:nth-child(2n) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line) !important; }
  .metric strong { font-size: 19px; }
  .metric.amount-metric { padding-right: 12px; padding-left: 12px; }
  .metric.amount-metric strong { font-size: 15px; }
  .overview-grid, .overview-status-grid { grid-template-columns: 1fr; gap: 12px; margin-top: 12px; }
  .panel-head { min-height: 58px; padding: 12px; }
  .panel-head .text-button { width: 34px; overflow: hidden; white-space: nowrap; color: transparent; }
  .panel-head .text-button svg { color: var(--primary); flex: 0 0 16px; }
  .health-content { padding: 14px 12px; }
  .status-breakdown { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fund-list { padding: 4px 12px 8px; }
  .compact-health { min-height: 0; grid-template-columns: 104px minmax(0, 1fr); padding: 14px 12px; gap: 14px; }
  .completion-ring { width: 96px; height: 96px; }
  .completion-ring::before { width: 76px; height: 76px; }
  .completion-ring strong { font-size: 20px; }
  .health-summary strong { font-size: 24px; }
  .group-matrix { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .group-cell { min-height: 78px; padding: 10px; }
  .group-cell-stats { flex-wrap: wrap; justify-content: flex-start; gap: 4px 10px; white-space: normal; }
  .urgent-item { grid-template-columns: 7px minmax(0, 1fr) auto; }
  .urgent-item > div:nth-child(3) { display: none; }
  .task-metrics { margin: 0 -12px 10px; padding: 0 12px 2px; display: flex; overflow-x: auto; }
  .task-metric { min-width: 120px; flex: 0 0 120px; }
  .task-metric.amount-metric strong { font-size: 14px; }
  .list-panel { margin: 0; border-left: 0; border-right: 0; border-radius: 0; }
  .list-header { padding: 11px 12px; }
  .list-actions { display: none; }
  .filter-bar { padding: 10px 12px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 38px; gap: 7px; }
  .search-field { grid-column: 1 / -1; }
  .filter-menu { min-width: 0; }
  .filter-menu summary { grid-template-columns: 15px minmax(0, 1fr) 13px; }
  #groupMenu { grid-column: 1; }
  #typeMenu { grid-column: 2; }
  .notice-date-filter { grid-column: 1 / 3; grid-row: 3; }
  .notice-date-filter label { min-width: 0; flex: 1; }
  .notice-date-filter input { width: 100%; }
  .segment-control button { flex: 1; }
  .reset-button { grid-column: 3; grid-row: 2; position: static; margin: 0; }
  .menu-popover { width: min(260px, calc(100vw - 32px)); }
  #typeMenu .menu-popover { left: auto; right: 0; }
  .result-meta { padding: 0 12px; }
  .result-meta #sortDescription { display: none; }
  .table-scroll { overflow: visible; }
  .data-table { min-width: 0; display: block; }
  .data-table colgroup, .data-table thead { display: none; }
  .data-table tbody { padding: 0 12px 12px; display: grid; gap: 8px; }
  .data-table tr { padding: 11px 12px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
  .data-table td { height: auto; min-width: 0; padding: 0; display: block; border: 0; white-space: normal !important; overflow: visible !important; }
  .data-table td::before { display: none; }
  .data-table td[data-label="店铺"] { grid-column: 1; grid-row: 2; }
  .data-table td[data-label="分组"] { grid-column: 2; grid-row: 2; align-self: start; color: var(--muted); font-size: 11px; }
  .data-table td[data-label="问题类型"], .data-table td[data-label="绩效分类"] { grid-column: 2; grid-row: 1; text-align: right; }
  .data-table td[data-label="原因"], .data-table td[data-label="通知标题"] { grid-column: 1 / -1; grid-row: 3; color: var(--muted); line-height: 1.45; }
  .data-table td[data-label="涉及金额"], .data-table td[data-label="风险等级"] { grid-column: 1; grid-row: 4; }
  .data-table td[data-label="更新时间"], .data-table td[data-label="绩效日期"] { grid-column: 2; grid-row: 4; color: var(--muted); text-align: right; font-size: 11px; }
  .data-table td[data-label="操作"] { display: none; }
  .data-table.selection-enabled td[data-label="选择"] { grid-column: 1; grid-row: 1; text-align: left !important; }
  .data-table.selection-enabled td[data-label="店铺"] { grid-row: 2; }
  .suspended-filter-bar { grid-template-columns: 1fr; }
  #suspendedStatusFilter { width: 100%; overflow-x: auto; }
  .suspended-table td[data-label="店铺"] { grid-column: 1; grid-row: 1; }
  .suspended-table td[data-label="分组"] { grid-column: 2; grid-row: 1; text-align: right; }
  .suspended-table td:not([data-label="店铺"]):not([data-label="分组"]):not([data-label="操作"])::before { content: attr(data-label); margin-bottom: 3px; display: block; color: var(--muted); font-size: 10px; font-weight: 400; }
  .suspended-table td[data-label="当前状态"] { grid-column: 1; grid-row: 2; }
  .suspended-table td[data-label="最后余额"] { grid-column: 2; grid-row: 2; text-align: right; }
  .suspended-table td[data-label="安排强提"] { grid-column: 1; grid-row: 3; }
  .suspended-table td[data-label="服务比例"] { grid-column: 2; grid-row: 3; text-align: right; }
  .suspended-table td[data-label="预计回款"] { grid-column: 1; grid-row: 4; }
  .suspended-table td[data-label="待回款"] { grid-column: 2; grid-row: 4; text-align: right; }
  .suspended-table td[data-label="强提成功"] { grid-column: 1; grid-row: 5; color: var(--ok); }
  .manual-fieldset { grid-template-columns: 1fr; }
  .manual-field.wide { grid-column: 1; }
  .change-store-row { grid-template-columns: minmax(0, 1fr) 16px; }
  .change-store-row > span:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .change-store-row > svg { grid-column: 2; grid-row: 1; }
  .run-cart-footer { align-items: stretch; flex-direction: column; gap: 10px; }
  .run-cart-footer .primary-button { width: 100%; }
  .detail-drawer { width: 100%; top: 12%; border-left: 0; border-top: 1px solid var(--line); transform: translateY(102%); }
  .detail-drawer.open { transform: translateY(0); }
  .mobile-nav { height: 62px; padding: 5px 8px max(5px, env(safe-area-inset-bottom)); position: fixed; inset: auto 0 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); background: var(--panel); }
  .mobile-nav button { border: 0; background: transparent; display: grid; place-items: center; align-content: center; gap: 3px; color: var(--muted); font-size: 10px; cursor: pointer; }
  .mobile-nav button.active { color: var(--primary); font-weight: 700; }
  .mobile-nav svg { width: 19px; height: 19px; }
  .batch-tray { min-height: 126px; padding: 10px 12px; inset: auto 0 62px 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .batch-count { margin: 0; }
  .batch-tray label { grid-column: 1 / -1; }
  .batch-tray #clearBatchSelection { display: none; }
  .batch-tray #addToRunCart { min-width: 150px; }
  .import-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dialog-footer { align-items: stretch; flex-direction: column; }
  .dialog-footer > div { display: grid; grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}
