:root {
  --bg: #f4f7f6;
  --surface: #ffffff;
  --surface-alt: #edf4f1;
  --ink: #17231f;
  --muted: #65736e;
  --line: #d8e2de;
  --green: #1f705c;
  --green-dark: #175445;
  --blue: #376079;
  --red: #b42332;
  --amber: #8a6400;
  --radius: 6px;
  --data-table-font-size: 13px;
  --data-table-cell-min-width: 72px;
  --data-table-cell-padding-y: 9px;
  --data-table-cell-padding-x: 7px;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); }
img, svg, video, canvas { max-width: 100%; }
button, input, select { font: inherit; letter-spacing: 0; }
textarea { font: inherit; border: 1px solid var(--line); border-radius: 4px; padding: 8px 10px; color: var(--ink); resize: vertical; }
button, select, input { min-height: 36px; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--ink); }
button { padding: 0 14px; cursor: pointer; }
button:hover { border-color: #9cb5ac; }
button.primary { border-color: var(--green); background: var(--green); color: #fff; font-weight: 700; }
button.primary:hover { background: var(--green-dark); }
input, select { padding: 6px 10px; min-width: 150px; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 210px; background: #173f36; color: #fff; padding: 22px 14px; display: flex; flex-direction: column; z-index: 10; }
.brand { color: #fff; text-decoration: none; font-size: 23px; font-weight: 800; padding: 4px 12px 22px; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; align-items: baseline; column-gap: 8px; row-gap: 3px; }
.brand small, .login-brand small { font-size: 13px; font-weight: 700; color: #bde2d7; }
.brand > span { grid-column: 1; grid-row: 1; }
.brand > small:not(.brand-version) { grid-column: 2; grid-row: 1; }
.brand .brand-version { grid-column: 1 / -1; grid-row: 2; color: #8fb8aa; font-size: 10px; font-weight: 600; min-width: 0; white-space: nowrap; }
.sidebar nav { display: grid; gap: 3px; min-height: 0; overflow-y: auto; }
.nav-group-label { padding: 10px 12px 5px; color: #8fb8aa; font-size: 11px; font-weight: 700; letter-spacing: 0; }
.nav-link { color: #cfe0da; text-decoration: none; padding: 10px 12px; border-radius: 4px; font-size: 14px; }
.nav-link.nav-child { margin-left: 7px; padding-left: 15px; border-left: 2px solid #38685b; border-radius: 0 4px 4px 0; }
.nav-link:hover, .nav-link.active { color: #fff; background: #286b59; }
.logout { margin-top: auto; width: 100%; color: #dce9e4; background: transparent; border-color: #477667; }
.session-user { display: grid; gap: 3px; margin-top: auto; padding: 12px 10px 9px; border-top: 1px solid #38685b; color: #fff; }
.session-user strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; }
.session-user span { color: #bcd4cb; font-size: 11px; }
.session-user + form .logout { margin-top: 0; }
.workspace { margin-left: 210px; padding: 0 22px 34px; min-width: 0; }
.workspace > *, .stack > *, .panel > *, .section-block > * { min-width: 0; }
.page-header { height: 66px; display: flex; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.page-header h1 { margin: 0; font-size: 21px; letter-spacing: 0; }
.health-dot { margin-left: auto; color: var(--green); font-size: 13px; }
.health-dot::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #25a16f; margin-right: 7px; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; }
.dashboard-month-bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-width: 0; padding: 13px 16px; border: 1px solid #a9c9bd; border-left: 5px solid var(--green); border-radius: var(--radius); background: #eaf4f0; }
.dashboard-month-current { flex: 1 1 520px; display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: baseline; gap: 3px 10px; min-width: 0; }
.dashboard-month-current > span { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.dashboard-month-current strong { color: var(--green-dark); font-size: 23px; white-space: nowrap; }
.dashboard-month-current em, .selected-month-status em { padding: 3px 7px; border-radius: 3px; font-size: 11px; font-style: normal; white-space: nowrap; }
.dashboard-month-current em, .selected-month-status em { justify-self: start; }
.dashboard-month-current em { min-width: 0; max-width: 100%; white-space: normal; overflow-wrap: anywhere; line-height: 1.45; }
.dashboard-date-basis-note { grid-column: 1 / -1; min-width: 0; max-width: 100%; color: var(--muted); font-size: 11px; line-height: 1.55; overflow-wrap: break-word; }
.dashboard-month-current em.configured, .selected-month-status em.configured { color: #17613c; background: #d8ecdf; }
.dashboard-month-current em.fallback, .selected-month-status em.fallback { color: #735400; background: #fff2c9; }
.dashboard-month-controls { flex: 0 0 auto; display: flex; align-items: end; gap: 8px; }
.dashboard-month-controls label { display: grid; gap: 4px; color: var(--muted); font-size: 11px; }
.dashboard-month-controls input { min-width: 170px; }
.dashboard-month-controls button { white-space: nowrap; }
.kpi-grid { display: grid; grid-template-columns: repeat(7, minmax(130px, 1fr)); gap: 8px; }
.dashboard-top-kpis { grid-template-columns: repeat(6, minmax(130px, 1fr)); }
.kpi-grid.compact { grid-template-columns: repeat(3, minmax(180px, 260px)); margin-bottom: 14px; }
.kpi-grid article, .reconcile-grid article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; min-width: 0; }
.kpi-grid article.kpi-primary-roi, .kpi-grid article.trend-primary-roi { background: #fff2c9; border-color: #d6b35a; box-shadow: inset 0 3px 0 #d09a00; }
.kpi-grid span, .reconcile-grid span { color: var(--muted); font-size: 12px; display: block; margin-bottom: 7px; }
.kpi-grid strong, .reconcile-grid strong { display: block; font-size: 20px; overflow-wrap: anywhere; }
.kpi-grid.compact strong { font-size: 17px; }
.reconcile-grid { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 8px; }
.reconcile-grid article { border-top: 3px solid var(--green); }
.forecast-calibration-groups { display: grid; gap: 12px; }
.forecast-calibration-group { padding-top: 10px; border-top: 1px solid var(--line); }
.forecast-calibration-group:first-child { padding-top: 0; border-top: 0; }
.forecast-calibration-group h3 { margin: 0 0 7px; color: var(--ink); font-size: 13px; }
.forecast-calibration-group .reconcile-grid { grid-template-columns: repeat(5, minmax(150px, 1fr)); }
.forecast-calibration-group article.kpi-primary-roi,
.brief-kpi-grid article.kpi-primary-roi { background: #fff2c9; border-color: #d6b35a; box-shadow: inset 0 3px 0 #d09a00; }
.forecast-calibration-maintenance article { border-top-color: #8b9b95; }
.reconcile-grid article.warning { border-top-color: #d09a00; }
.reconcile-grid article.error { border-top-color: var(--red); }
.reconciliation-more { min-width: 0; }
.reconciliation-more > summary { cursor: pointer; color: var(--green-dark); font-size: 13px; font-weight: 700; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: #edf4f1; list-style-position: inside; }
.reconciliation-more[open] > summary { border-color: #a9c9bd; }
.reconciliation-more > .reconcile-grid { margin-top: 8px; }
.reconciliation-more > .forecast-calibration-hidden { margin-top: 8px; }
.forecast-deviation-panel { margin-top: 8px; min-width: 0; }
.forecast-deviation-panel > summary { cursor: pointer; padding: 8px 10px; border: 1px solid #a9c9bd; border-radius: var(--radius); color: var(--green-dark); background: #f1f7f4; font-size: 13px; font-weight: 700; list-style-position: inside; }
.forecast-deviation-content { display: grid; gap: 10px; padding-top: 8px; min-width: 0; }
.forecast-deviation-toolbar { align-items: end; }
.forecast-deviation-toolbar > label { flex: 1 1 300px; display: grid; gap: 4px; min-width: 220px; color: var(--muted); font-size: 12px; }
.forecast-deviation-toolbar > label input { width: 100%; min-width: 0; }
.forecast-deviation-table-panel { min-width: 0; }
.forecast-deviation-note { padding: 9px 12px; border-bottom: 1px solid var(--line); color: var(--muted); background: #f7faf9; font-size: 12px; line-height: 1.5; }
#forecast-deviation-early-table, #forecast-deviation-mature-table { width: max-content; min-width: 100%; }
#forecast-deviation-early-table th, #forecast-deviation-early-table td, #forecast-deviation-mature-table th, #forecast-deviation-mature-table td { min-width: 94px; padding: 8px 7px; text-align: center; vertical-align: middle; white-space: nowrap; }
#forecast-deviation-early-table th:nth-child(1), #forecast-deviation-mature-table th:nth-child(1) { min-width: 96px; }
#forecast-deviation-early-table th:nth-child(2), #forecast-deviation-mature-table th:nth-child(2) { min-width: 160px; }
.forecast-deviation-promotion { text-align: left !important; }
.forecast-deviation-promotion strong, .forecast-deviation-promotion small { display: block; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.forecast-deviation-promotion small { margin-top: 3px; color: var(--muted); font-family: Consolas, monospace; font-size: 11px; }
.forecast-deviation-day-cell { min-width: 108px !important; }
.forecast-deviation-day-cell span, .forecast-deviation-day-cell small { display: block; }
.forecast-deviation-day-cell small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.toolbar > input, .toolbar > select { flex: 1 1 160px; min-width: 0; }
.trend-toolbar > .trend-promotion-picker { flex: 1 1 260px; min-width: 220px; display: grid; gap: 4px; color: var(--muted); font-size: 12px; }
.trend-toolbar > .trend-promotion-picker input { width: 100%; min-width: 0; }
.forecast-toolbar label { flex: 1 1 190px; display: grid; gap: 4px; color: var(--muted); font-size: 12px; }
.forecast-toolbar input, .forecast-toolbar select { width: 100%; min-width: 0; }
.summary-strip { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid #b9d1c8; border-radius: var(--radius); overflow: hidden; }
.summary-strip div { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--green); color: #fff; padding: 10px 14px; border-right: 1px solid #4d8c7b; }
.summary-strip div:last-child { border-right: 0; }
.summary-strip strong { font-size: 18px; }
.dashboard-detail-heading { justify-content: space-between; }
.dashboard-detail-heading > button { flex: 0 0 auto; }
#dashboard-detail-content[hidden] { display: none !important; }
.dashboard-detail-heading > div:first-child { display: grid; gap: 4px; min-width: 0; }
.dashboard-detail-heading > div:first-child > span { line-height: 1.45; }
.dashboard-detail-toolbar { align-items: end; }
.dashboard-detail-toolbar > label { flex: 1 1 170px; display: grid; gap: 4px; color: var(--muted); font-size: 12px; }
.dashboard-detail-toolbar > label input, .dashboard-detail-toolbar > label select { width: 100%; min-width: 0; }
.dashboard-detail-toolbar .dashboard-detail-promotion-picker { flex: 2 1 300px; }
.dashboard-detail-promotion-picker input { min-width: 0; }
.promotion-search-status { min-height: 16px; font-size: 11px; line-height: 1.35; }
.promotion-search-status.success { color: #17613c; }
.promotion-search-status.warning { color: #8a6400; }
.promotion-search-status.error { color: var(--red); }
.actual-recovery-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 15px 16px; border: 1px solid var(--line); border-top: 4px solid var(--green); border-radius: var(--radius); background: #fff; }
.actual-recovery-intro h2 { margin: 0 0 6px; font-size: 18px; }
.actual-recovery-intro p { max-width: 900px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.actual-recovery-toolbar { align-items: end; }
.actual-recovery-toolbar .dashboard-detail-promotion-picker { flex: 2 1 340px; }
#actual-recovery-load-status { padding: 9px 12px; }
.dashboard-detail-note { padding: 9px 12px; border-bottom: 1px solid var(--line); color: var(--muted); background: #f7faf9; font-size: 12px; line-height: 1.5; }
#dashboard-detail-table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; isolation: isolate; }
#dashboard-detail-table th, #dashboard-detail-table td { min-width: 78px; padding: 8px 7px; text-align: center; vertical-align: middle; white-space: nowrap; }
#dashboard-detail-table thead .dashboard-detail-sticky { white-space: normal; line-height: 1.25; overflow-wrap: anywhere; }
#dashboard-detail-table thead .dashboard-detail-sticky .table-sort-button { white-space: normal; line-height: inherit; overflow-wrap: anywhere; }
#dashboard-detail-table .dashboard-detail-sticky { position: sticky; z-index: 3; background: #fff; background-clip: padding-box; }
#dashboard-detail-table .dashboard-detail-sticky-date { left: 0; width: 105px; min-width: 105px; max-width: 105px; }
#dashboard-detail-table .dashboard-detail-sticky-id { left: 105px; width: 130px; min-width: 130px; max-width: 130px; }
#dashboard-detail-table .dashboard-detail-sticky-name { left: 235px; width: 150px; min-width: 150px; max-width: 150px; }
#dashboard-detail-table .dashboard-detail-sticky-cost { left: 385px; width: 112px; min-width: 112px; max-width: 112px; }
#dashboard-detail-table .dashboard-detail-sticky-total-roi { left: 497px; width: 132px; min-width: 132px; max-width: 132px; }
#dashboard-detail-table .dashboard-detail-sticky-fulfilled-roi { left: 629px; width: 142px; min-width: 142px; max-width: 142px; border-right: 1px solid #b9cec6; box-shadow: 4px 0 5px rgba(25, 62, 52, .12); }
#dashboard-detail-table tbody .dashboard-detail-sticky { background: #fff; background-clip: padding-box; }
#dashboard-detail-table thead .dashboard-detail-sticky-fulfilled-roi { background: #fff7dc !important; }
#dashboard-detail-table tbody .dashboard-detail-sticky-fulfilled-roi { background: #fffaf0; }
#dashboard-detail-table thead .dashboard-detail-sticky { z-index: 8 !important; background: #d9eae4; }
#dashboard-detail-table thead tr:first-child th { position: sticky; top: 0; z-index: 6; height: 52px; background: #d9eae4; }
#dashboard-detail-table thead tr.dashboard-detail-metric-row th { position: sticky; top: 52px; z-index: 6; background: #d9eae4; }
#dashboard-detail-table .dashboard-detail-day-group { background: #cfe4dc !important; border-left: 2px solid #9bbfb2; font-weight: 800; }
#dashboard-detail-table .dashboard-detail-day-start { border-left: 2px solid #a8c9be; }
#dashboard-detail-table .dashboard-detail-fulfillment-header,
#dashboard-detail-table .dashboard-detail-fulfillment-roi { background: #fff7dc !important; }
#dashboard-detail-table .dashboard-detail-cost { color: #c24e00; font-weight: 700; }
#dashboard-detail-table th.sort-active { background: #fff0c7 !important; }
.section-block { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-width: 0; padding-top: 4px; }
.section-heading { display: flex; align-items: center; gap: 10px; min-width: 0; }
.section-heading > * { min-width: 0; }
.section-heading span, .alert, .help-note, .muted { overflow-wrap: anywhere; }
.section-heading h2 { margin: 0; font-size: 17px; }
.section-heading > span { color: var(--muted); font-size: 13px; }
.today-brief { padding: 14px; background: linear-gradient(135deg, #eef7f3 0%, #ffffff 60%); border: 1px solid #b9d1c8; border-top: 4px solid var(--green); border-radius: var(--radius); }
.today-brief-heading { justify-content: space-between; }
.today-brief-heading > div:first-child { display: grid; gap: 4px; }
.today-brief-meta { color: var(--muted); font-size: 12px; text-align: right; max-width: 55%; }
.today-brief-actions { margin-left: auto; display: grid; justify-items: end; gap: 6px; }
.today-brief-date-filter { display: flex; align-items: end; justify-content: flex-end; gap: 7px; }
.today-brief-date-filter label { display: grid; gap: 3px; color: var(--muted); font-size: 11px; text-align: left; }
.today-brief-date-filter input { min-width: 145px; }
.today-brief-date-filter .today-brief-name-input { min-width: 180px; }
.today-brief-date-filter button { min-width: 72px; white-space: nowrap; }
.brief-kpi-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.brief-kpi-grid article { background: rgba(255,255,255,.86); }
.brief-kpi-grid strong { font-size: 18px; }
.today-brief .table-panel { background: rgba(255,255,255,.88); }
.today-brief-table-tools { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: #f7faf9; }
.today-brief-table-tools span { margin-right: auto; color: var(--muted); font-size: 12px; }
.today-brief-table-tools button { color: var(--green); border-color: #9bbfb2; background: #fff; font-weight: 700; }
#today-brief-table { min-width: 2050px; border-collapse: separate; border-spacing: 0; isolation: isolate; font-size: 13px; }
#today-brief-table th, #today-brief-table td { min-width: 72px; padding: 9px 7px; text-align: center; vertical-align: middle; }
#today-brief-table td.num { text-align: center; }
#today-brief-table th { white-space: normal; line-height: 1.3; font-size: 13px; }
.table-sort-button { width: 100%; min-width: 0; min-height: 0; padding: 1px 0; border: 0; color: inherit; background: transparent; font-size: inherit; font-weight: inherit; line-height: inherit; white-space: normal; }
.table-sort-button::after { content: "↕"; display: inline-block; margin-left: 4px; color: #77958b; font-size: 10px; font-weight: 400; }
th.sort-active { background: #fff0c7; }
th[data-sort-direction="desc"] .table-sort-button::after { content: "▼"; color: var(--green); }
th[data-sort-direction="asc"] .table-sort-button::after { content: "▲"; color: var(--green); }
.table-sort-button:hover, .table-sort-button:focus-visible { color: var(--green-dark); border: 0; background: transparent; outline: 1px dotted #6f9588; outline-offset: 2px; }
#today-brief-table th:nth-child(1), #today-brief-table td:nth-child(1) { position: sticky; left: 0; z-index: 3; width: 124px; min-width: 124px; max-width: 124px; background: #fff; background-clip: padding-box; }
#today-brief-table th:nth-child(2), #today-brief-table td:nth-child(2) { position: sticky; left: 124px; z-index: 3; width: 112px; min-width: 112px; max-width: 112px; background: #fff; background-clip: padding-box; font-size: 13px; font-weight: 600; }
#today-brief-table th:nth-child(3), #today-brief-table td:nth-child(3) { position: sticky; left: 236px; z-index: 3; width: 104px; min-width: 104px; max-width: 104px; border-right: 1px solid #b9cec6; background: #fff; background-clip: padding-box; box-shadow: 4px 0 5px rgba(25, 62, 52, .12); }
#today-brief-table thead th:nth-child(-n+3) { z-index: 8 !important; background: #d9eae4; }
#today-brief-table thead th.sort-active { background: #fff0c7 !important; box-shadow: inset 0 -3px 0 #d39a20; }
#today-brief-table .brief-forecast-column { display: none; }
#today-brief-table.brief-forecast-expanded .brief-forecast-column { display: table-cell; }
table:not(.reference-columns-expanded) .audit-metric { display: none; }
.reference-column-tools { display: flex; justify-content: flex-end; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.brief-inclusive-metric { color: #005a9c; font-weight: 800; }
.brief-history-metric { color: #7a3e9d; font-weight: 800; }
.brief-net-metric { color: #007a45; font-weight: 800; }
.brief-cost-metric { color: #c24e00; font-weight: 800; }
.curve-cell { min-width: 150px; max-width: 190px; white-space: normal; color: var(--muted); font-size: var(--data-table-font-size); line-height: 1.4; }
.decision-reason { min-width: 180px; max-width: 240px; white-space: normal; font-size: var(--data-table-font-size); line-height: 1.4; }
.decision-badge { display: inline-block; min-width: 78px; padding: 4px 7px; border-radius: 4px; text-align: center; font-size: 12px; white-space: nowrap; background: #edf2f0; }
.decision-badge.加大投放 { color: #fff; background: var(--red); }
.decision-badge.稳定投放 { color: #9f2331; background: #fde3e6; }
.decision-badge.降低投放 { color: #175445; background: #dcefe8; }
.decision-badge.暂停投放 { color: #fff; background: var(--green); }
.decision-badge.观察 { color: #315d72; background: #e2eff5; }
.section-filter { margin-left: auto; display: flex; align-items: end; gap: 8px; flex-wrap: wrap; }
.section-filter label { display: grid; gap: 4px; color: var(--muted); font-size: 12px; }
.section-filter input { min-width: 155px; }
.fulfillment-form { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fulfillment-form label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.fulfillment-form input { width: 82px; min-width: 0; text-align: right; }
.forecast-grid { grid-template-columns: repeat(6, minmax(125px, 1fr)); }
.forecast-grid strong { font-size: 17px; }
.split-metric { display: grid; gap: 3px; min-width: 100px; line-height: 1.35; }
.split-metric span { display: block; }
.attribution-day-metric, .curve-detail-metric { display: grid; gap: 4px; min-width: 118px; line-height: 1.35; text-align: left; font-variant-numeric: tabular-nums; }
.attribution-day-metric span:nth-child(1), .curve-detail-metric span:nth-child(1) { color: #17613c; font-weight: 700; }
.attribution-day-metric span:nth-child(2), .curve-detail-metric span:nth-child(2) { color: #376079; }
.attribution-day-metric span:nth-child(3), .curve-detail-metric span:nth-child(3) { color: #714f19; }
.return-analysis-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 15px 16px; border: 1px solid var(--line); border-top: 4px solid var(--green); border-radius: var(--radius); background: #fff; }
.return-analysis-intro h2 { margin: 0 0 6px; font-size: 18px; }
.return-analysis-intro p { max-width: 900px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.return-analysis-toolbar { align-items: end; }
.return-analysis-toolbar > label:not(.return-empty-toggle) { flex: 1 1 155px; display: grid; gap: 4px; color: var(--muted); font-size: 12px; }
.return-analysis-toolbar input, .return-analysis-toolbar select { width: 100%; min-width: 0; }
.return-empty-toggle { display: flex; align-items: center; gap: 7px; min-height: 36px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.return-empty-toggle input { width: 16px; min-width: 16px; min-height: 16px; margin: 0; }
.return-summary-grid { grid-template-columns: repeat(5, minmax(130px, 1fr)); }
.return-view-tabs { padding: 4px; border: 1px solid var(--line); border-radius: var(--radius); background: #f2f7f5; }
.return-view-tabs button { min-width: 150px; }
.return-table-note { padding: 9px 12px; border-bottom: 1px solid var(--line); color: var(--muted); background: #f7faf9; font-size: 12px; line-height: 1.5; }
#return-overview-table { min-width: 2200px; border-collapse: separate; border-spacing: 0; isolation: isolate; }
#return-overview-table th:nth-child(1), #return-overview-table td:nth-child(1),
#return-detail-table th:nth-child(1), #return-detail-table td:nth-child(1) { position: sticky; left: 0; z-index: 3; width: 105px; min-width: 105px; max-width: 105px; background: #fff; background-clip: padding-box; }
#return-overview-table th:nth-child(2), #return-overview-table td:nth-child(2),
#return-detail-table th:nth-child(2), #return-detail-table td:nth-child(2) { position: sticky; left: 105px; z-index: 3; width: 130px; min-width: 130px; max-width: 130px; background: #fff; background-clip: padding-box; }
#return-overview-table th:nth-child(3), #return-overview-table td:nth-child(3),
#return-detail-table th:nth-child(3), #return-detail-table td:nth-child(3) { position: sticky; left: 235px; z-index: 3; width: 150px; min-width: 150px; max-width: 150px; background: #fff; background-clip: padding-box; }
#return-overview-table th:nth-child(4), #return-overview-table td:nth-child(4),
#return-detail-table th:nth-child(4), #return-detail-table td:nth-child(4) { position: sticky; left: 385px; z-index: 3; width: 105px; min-width: 105px; max-width: 105px; border-right: 1px solid #b9cec6; background: #fff; background-clip: padding-box; box-shadow: 4px 0 5px rgba(25, 62, 52, .12); }
#return-overview-table thead th:nth-child(-n+4), #return-detail-table thead th:nth-child(-n+4) { z-index: 8 !important; background: #d9eae4; }
#return-detail-table { min-width: 2920px; border-collapse: separate; border-spacing: 0; isolation: isolate; }
.return-fulfillment-card, .return-fulfillment-roi { background: #fff7dc !important; }
.return-detail-action { min-height: 30px; padding: 0 9px; color: var(--green); border-color: #9bbfb2; font-size: 12px; font-weight: 700; }
.muted-text { color: var(--muted); font-size: 12px; }
.table-drill-link { color: var(--green); font-weight: 700; text-decoration: none; }
.table-drill-link:hover { text-decoration: underline; }
.tabs { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 2px; }
.tabs button { min-width: 52px; background: #e7efec; border-color: #cbdad5; }
.tabs button.active { background: var(--green); color: #fff; border-color: var(--green); font-weight: 700; }
.panel, .table-panel, .chart-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.table-panel { overflow: hidden; }
.panel { padding: 16px; }
.panel h2 { font-size: 16px; margin: 0 0 14px; }
.table-scroll { overflow: auto; max-width: 100%; overscroll-behavior: contain; scrollbar-gutter: stable; scrollbar-color: #789c90 #e8efec; }
.table-scroll:not(.data-grid-scroll):not(.import-history-scroll) { max-height: min(72vh, 780px); }
.table-scroll::-webkit-scrollbar { width: 11px; height: 11px; }
.table-scroll::-webkit-scrollbar-track { background: #e8efec; }
.table-scroll::-webkit-scrollbar-thumb { border: 2px solid #e8efec; border-radius: 5px; background: #789c90; }
.table-scroll::-webkit-scrollbar-thumb:hover { background: #527c6e; }
.horizontal-scroll-mirror { height: 14px; margin-bottom: 3px; overflow-x: auto; overflow-y: hidden; border: 1px solid var(--line); border-radius: 4px; background: #eef4f1; scrollbar-color: #789c90 #e8efec; }
.horizontal-scroll-mirror[hidden] { display: none; }
.horizontal-scroll-mirror > div { height: 1px; }
.horizontal-scroll-mirror::-webkit-scrollbar { height: 11px; }
.horizontal-scroll-mirror::-webkit-scrollbar-track { background: #e8efec; }
.horizontal-scroll-mirror::-webkit-scrollbar-thumb { border: 2px solid #e8efec; border-radius: 5px; background: #789c90; }
.data-grid-scroll { max-height: min(68vh, 760px); overflow-x: scroll; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; scrollbar-color: #789c90 #e8efec; scrollbar-width: auto; }
.data-grid-scroll::-webkit-scrollbar { width: 11px; height: 11px; }
.data-grid-scroll::-webkit-scrollbar-track { background: #e8efec; }
.data-grid-scroll::-webkit-scrollbar-thumb { border: 2px solid #e8efec; border-radius: 5px; background: #789c90; }
.data-grid-scroll::-webkit-scrollbar-thumb:hover { background: #527c6e; }
.data-grid-scroll > table > thead > tr > th { z-index: 5 !important; box-shadow: 0 1px 0 #c8d8d2; }
table { border-collapse: collapse; width: 100%; font-size: var(--data-table-font-size); white-space: nowrap; }
th { position: sticky; top: 0; z-index: 1; background: #d9eae4; color: #193e34; text-align: center; font-weight: 700; }
th, td { min-width: var(--data-table-cell-min-width); border-bottom: 1px solid #e2e9e6; padding: var(--data-table-cell-padding-y) var(--data-table-cell-padding-x); font-size: var(--data-table-font-size); line-height: 1.4; }
.metric-help-enabled { cursor: help; }
.metric-help-card { position: relative; }
.metric-card-label { padding-right: 0; }
.metric-help-button { position: absolute; top: 0; right: 0; z-index: 2; width: 14px; height: 14px; min-width: 14px; min-height: 14px; max-width: 14px; max-height: 14px; margin: 0; padding: 0; display: grid; place-items: center; border: 1px solid #a8c5bb; border-radius: 0 3px 0 5px; color: #17613c; background: #edf6f2; box-shadow: none; font-size: 10px; font-weight: 700; line-height: 1; opacity: 1; pointer-events: auto; transform: translateY(0); }
.forecast-calibration-hidden .metric-help-enabled .metric-help-button { opacity: 1; pointer-events: auto; transform: translateY(0); }
.metric-help-enabled:hover .metric-help-button, .metric-help-enabled:focus-within .metric-help-button, .metric-help-revealed .metric-help-button, .metric-help-open .metric-help-button { opacity: 1; pointer-events: auto; transform: translateY(0); }
.metric-help-button:hover, .metric-help-button:focus-visible { color: #fff; border-color: var(--green); background: var(--green); outline: none; }
.metric-help-popover { position: fixed; z-index: 1000; width: min(340px, calc(100vw - 24px)); padding: 13px 14px; border: 1px solid #9dbbb1; border-radius: 5px; color: var(--ink); background: #fff; box-shadow: 0 10px 28px rgba(25, 62, 52, .2); white-space: normal; }
.metric-help-popover[hidden] { display: none; }
.metric-help-popover strong { display: block; padding-right: 24px; font-size: 14px; line-height: 1.35; }
.metric-help-popover p { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.metric-help-popover p b { display: block; margin-bottom: 3px; color: var(--ink); font-size: 12px; }
.metric-help-popover .metric-formula { padding: 8px 9px; border-left: 3px solid #1f705c; color: #193e34; background: #edf6f2; font-variant-numeric: tabular-nums; }
.metric-help-close { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; min-width: 22px; min-height: 22px; padding: 0; border: 0; color: var(--muted); background: transparent; font-size: 18px; line-height: 1; }
.metric-help-close:hover { color: var(--ink); background: #edf2f0; }
tbody tr:hover { background: #f1f7f4; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
td.mono { font-family: Consolas, monospace; }
td.wide-text { white-space: normal; min-width: 260px; max-width: 420px; }
/* Performance indicators use the mainland China market convention: gains red, losses green. */
.roi-good { color: var(--red); font-weight: 700; }
.roi-bad { color: var(--green); font-weight: 700; }
.not-observed { color: #9aa7a2; text-align: center; }
.pager { display: flex; justify-content: center; align-items: center; gap: 14px; padding: 12px; color: var(--muted); }
.pager a { color: var(--green); text-decoration: none; font-weight: 700; }
.two-column { display: grid; grid-template-columns: minmax(300px, 430px) minmax(0, 1fr); gap: 14px; }
.alliance-layout { grid-template-columns: minmax(0, 1.5fr) minmax(360px, .5fr); align-items: start; }
.alliance-layout.alliance-readonly { grid-template-columns: minmax(0, 1fr); }
.alliance-form { display: grid; gap: 14px; }
.alliance-form > label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
.alliance-basic-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.alliance-basic-grid label, .alliance-metric-grid label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
.alliance-basic-grid input, .alliance-basic-grid select, .alliance-metric-grid input { width: 100%; min-width: 0; }
.alliance-metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; padding-top: 12px; border-top: 1px solid var(--line); }
.alliance-history { display: grid; gap: 10px; max-height: 720px; overflow: auto; }
.alliance-history a { color: var(--green); font-weight: 700; text-decoration: none; }
.selected-row { background: #e5f3ed; }
.alliance-comparison { display: grid; gap: 12px; }
.upload-form { display: grid; gap: 13px; align-content: start; }
.import-history-panel { align-self: start; min-width: 0; }
.import-history-scroll { max-height: min(68vh, 720px); overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.import-history-table { width: max-content; min-width: 980px; }
.import-history-table th, .import-history-table td { text-align: center; }
.import-history-table th:nth-child(1), .import-history-table td:nth-child(1) { min-width: 160px; }
.import-history-table th:nth-child(2), .import-history-table td:nth-child(2) { min-width: 110px; }
.import-history-table th:nth-child(3), .import-history-table td:nth-child(3) { min-width: 420px; text-align: left; }
.import-history-table th:nth-child(n+4), .import-history-table td:nth-child(n+4) { min-width: 78px; }
.upload-form label, .login-panel label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
.upload-form input { width: 100%; padding: 6px; }
.manual-cost-mode { margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px; }
.manual-cost-mode legend { padding: 0 4px; color: var(--ink); font-weight: 700; font-size: 13px; }
.manual-cost-mode-options { display: grid; gap: 8px; }
.upload-form .manual-cost-mode-option { display: flex; align-items: flex-start; gap: 8px; color: var(--ink); cursor: pointer; }
.upload-form .manual-cost-mode-option input { width: auto; margin: 3px 0 0; padding: 0; accent-color: var(--primary); }
.manual-cost-mode-option span { display: grid; gap: 2px; }
.manual-cost-mode-option small { color: var(--muted); line-height: 1.45; }
.manual-cost-mode-option.danger strong { color: #9b5c00; }
.full-snapshot-confirmation { margin-top: 9px; padding: 9px; border: 1px solid #ead38a; background: #fff7dc; }
.full-snapshot-confirmation[hidden] { display: none; }
.manual-cost-mode > .muted { margin: 9px 0 0; font-size: 12px; line-height: 1.45; }
.import-job { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); background: #f5faf8; }
.import-job > div { display: flex; justify-content: space-between; gap: 12px; }
.import-job progress { width: 100%; height: 12px; }
.import-job.complete { border-color: #4f9c78; background: #eef8f2; }
.import-job.failed { border-color: #d96c6c; background: #fff1f1; }
.backup-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid #b9d1c8; border-radius: var(--radius); overflow: hidden; background: #fff; }
.backup-summary div { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 3px 12px; padding: 12px 14px; border-right: 1px solid var(--line); }
.backup-summary div:last-child { border-right: 0; }
.backup-summary span { color: var(--muted); font-size: 12px; }
.backup-summary strong { grid-row: span 2; font-size: 24px; color: var(--green); }
.backup-summary em { color: var(--muted); font-size: 11px; font-style: normal; }
.backup-actions { align-items: stretch; }
.backup-create-form, .backup-restore-form { display: grid; gap: 12px; align-content: start; }
.backup-create-form { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.backup-create-form h2, .backup-restore-form h2 { margin: 0 0 6px; }
.backup-create-form p, .backup-restore-form p { margin: 0; }
.backup-restore-form label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
.backup-restore-form input, .backup-restore-form select { width: 100%; min-width: 0; }
.backup-warning { margin: 0; }
.backup-list-heading { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.backup-list-heading > div { display: grid; gap: 4px; }
.backup-list-heading span { color: var(--muted); font-size: 12px; }
.backup-table td.mono { font-size: 12px; }
.backup-type { display: inline-block; min-width: 84px; padding: 3px 7px; border-radius: 4px; text-align: center; font-size: 11px; background: #edf2f0; }
.backup-type.daily { color: #17613c; background: #dff2e7; }
.backup-type.pre-import { color: #315d72; background: #e2eff5; }
.backup-type.pre-restore { color: #735400; background: #fff0bd; }
.backup-type.manual { color: #5b3d70; background: #f0e7f5; }
.alert { padding: 10px 12px; border-radius: 4px; background: #eef4f2; color: #315448; font-size: 13px; }
.alert.success { background: #e2f3e9; color: #17613c; }
.alert.error { background: #fde8ea; color: #912331; }
.alert.warning { background: #fff7dc; color: #735400; border: 1px solid #ead38a; }
.permission-alert { margin-bottom: 14px; }
.button-link { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; padding: 0 14px; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--ink); text-decoration: none; white-space: nowrap; }
.row-actions { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.row-actions a { color: var(--green); font-weight: 700; text-decoration: none; }
.row-actions form { display: inline-flex; margin: 0; }
.row-actions button { min-height: 30px; padding: 0 9px; font-size: 12px; }
.danger-button { color: #fff; background: var(--red); border-color: var(--red); }
.danger-button:hover { background: #8f1d29; border-color: #8f1d29; }
.edit-panel { max-width: 920px; }
.edit-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; margin-top: 14px; }
.edit-form label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; min-width: 0; }
.edit-form input { width: 100%; min-width: 0; }
.form-actions { grid-column: 1 / -1; display: flex; gap: 8px; padding-top: 4px; }
.status { padding: 3px 7px; border-radius: 3px; background: #edf2f0; }
.status.complete { color: #17613c; background: #e2f3e9; }
.status.warning { color: #735400; background: #fff7dc; }
.chart-panel { padding: 12px; min-height: 350px; }
.chart-panel canvas { width: 100%; height: 320px; display: block; }
.trend-summary-grid { grid-template-columns: repeat(5, minmax(150px, 1fr)); }
.trend-summary-grid > .trend-roi-details { grid-column: 1 / -1; min-width: 0; }
.holiday-toolbar { align-items: end; flex-wrap: wrap; }
.holiday-toolbar label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
.holiday-toolbar input[type="number"] { width: 92px; }
.holiday-summary-grid { grid-template-columns: repeat(6, minmax(145px, 1fr)); }
.holiday-summary-grid article small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.holiday-today-summary-grid { grid-template-columns: repeat(5, minmax(145px, 1fr)); margin: 10px 0 14px; }
.holiday-method-note { display: flex; gap: 14px; align-items: baseline; color: var(--muted); font-size: 12px; }
.holiday-method-note strong { color: var(--green-dark); white-space: nowrap; }
.holiday-panel-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.holiday-panel-heading h2 { margin: 0; }
.holiday-panel-heading span { color: var(--muted); font-size: 12px; }
.holiday-profile-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.holiday-profile-actions span { color: var(--muted); font-size: 12px; }
.holiday-profile-json { max-height: 240px; overflow: auto; padding: 12px; margin: 10px 0 0; background: #f4f8f6; border: 1px solid var(--line); border-radius: var(--radius); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; }
.holiday-roi-primary { background: #fff2c9 !important; border-color: #d6b35a !important; box-shadow: inset 0 3px 0 #d09a00; }
.holiday-phase-forecast { color: #9b6b00; font-weight: 700; }
.holiday-phase-training { color: var(--green-dark); font-weight: 700; }
.trend-roi-details { border: 1px solid var(--line); border-radius: var(--radius); background: #f7faf9; }
.trend-roi-details > summary { padding: 10px 13px; color: var(--green); cursor: pointer; font-size: 13px; font-weight: 700; list-style-position: inside; }
.trend-roi-details > summary:hover, .trend-roi-details > summary:focus-visible { background: #edf6f2; outline: 0; }
.trend-roi-details-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 8px; padding: 0 8px 8px; }
.natural-day-metric { background: #edf5f8; color: #28556d; }
.historical-return-metric { background: #fff8e5; color: #6d5311; }
#trend-table { min-width: 1780px; border-collapse: separate; border-spacing: 0; isolation: isolate; }
#trend-table th:nth-child(1), #trend-table td:nth-child(1) { position: sticky; left: 0; z-index: 3; width: 105px; min-width: 105px; max-width: 105px; background: #fff; background-clip: padding-box; }
#trend-table th:nth-child(2), #trend-table td:nth-child(2) { position: sticky; left: 105px; z-index: 3; width: 110px; min-width: 110px; max-width: 110px; border-right: 1px solid #b9cec6; background: #fff; background-clip: padding-box; box-shadow: 4px 0 5px rgba(25, 62, 52, .12); }
#trend-table thead th:nth-child(-n+2) { z-index: 8 !important; background: #d9eae4; }
.trend-date-toggle { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 0; border: 0; background: transparent; color: var(--green); font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap; }
.trend-date-toggle:hover, .trend-date-toggle:focus-visible { color: #0b5b47; text-decoration: underline; outline: 0; }
.trend-date-toggle small { color: var(--muted); font-size: 11px; font-weight: 500; }
#trend-table tr.trend-promotion-detail td { background: #f6fbf8; }
#trend-table tr.trend-promotion-detail td:nth-child(-n+2) { background: #f6fbf8; }
.trend-detail-link { display: inline-flex; align-items: baseline; gap: 4px; min-width: 0; padding-left: 8px; color: #246750; }
.trend-detail-link small { color: var(--muted); font-size: 10px; font-weight: 400; }
.trend-decision { display: grid; grid-template-columns: minmax(120px, .5fr) minmax(300px, 2fr) minmax(100px, .5fr) minmax(230px, 1fr); gap: 12px; }
.trend-decision > div { display: grid; align-content: start; gap: 7px; }
.trend-decision span { color: var(--muted); font-size: 12px; }
.trend-decision strong { font-size: 14px; line-height: 1.5; }
.trend-view-tabs { margin-top: 2px; }
.timing-note { display: grid; gap: 4px; padding: 11px 14px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.timing-note-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.timing-note strong { color: var(--text); font-size: 15px; white-space: nowrap; }
.timing-period-label { color: var(--green); font-size: 13px; font-weight: 800; }
.timing-granularity-tabs { margin-top: 10px; }
.timing-summary-grid { grid-template-columns: repeat(7, minmax(130px, 1fr)); }
.timing-decision { display: grid; grid-template-columns: repeat(6, minmax(150px, 1fr)); gap: 12px; }
.timing-decision > div { display: grid; align-content: start; gap: 7px; }
.timing-decision span { color: var(--muted); font-size: 12px; }
.timing-decision strong { font-size: 14px; line-height: 1.5; }
.timing-positive { color: var(--red); }
.timing-warning { color: #a86d00; }
#timing-table { min-width: 1120px; border-collapse: separate; border-spacing: 0; isolation: isolate; }
#timing-table th, #timing-table td { text-align: center; vertical-align: middle; }
.user-create-panel { display: grid; gap: 14px; }
.user-create-form { display: grid; grid-template-columns: minmax(170px, 1fr) minmax(190px, 1fr) minmax(160px, .7fr) auto; align-items: end; gap: 10px; }
.user-create-form label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
.user-create-form input, .user-create-form select { width: 100%; min-width: 0; }
.users-table { min-width: 980px; }
.users-table td:first-child strong { margin-right: 8px; }
.current-user-mark { display: inline-block; padding: 2px 5px; border-radius: 3px; color: #315d72; background: #e2eff5; font-size: 11px; }
.role-badge { display: inline-block; min-width: 78px; padding: 3px 7px; border-radius: 3px; text-align: center; }
.role-badge.superadmin { color: #fff; background: var(--green); }
.role-badge.operator { color: #315d72; background: #e2eff5; }
.role-badge.observer { color: #5e635f; background: #edf2f0; }
.user-row-form { display: grid; grid-template-columns: 130px minmax(180px, 1fr) auto; gap: 7px; }
.user-row-form select, .user-row-form input { width: 100%; min-width: 0; }
.logs-table { min-width: 1120px; }
.logs-table td:last-child { min-width: 180px; }
.log-details summary { color: var(--green); font-weight: 700; cursor: pointer; }
.log-change-grid { display: grid; grid-template-columns: repeat(2, minmax(300px, 1fr)); gap: 8px; width: min(900px, 70vw); padding-top: 8px; white-space: normal; }
.log-change-grid section { min-width: 0; padding: 8px; border: 1px solid var(--line); background: #f7faf9; }
.log-change-grid strong { font-size: 12px; }
.log-change-grid pre { max-height: 280px; margin: 6px 0 0; overflow: auto; color: #315448; font: 12px/1.5 Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.login-page { display: grid; place-items: center; background: #eef3f1; }
.login-panel { width: min(380px, calc(100vw - 32px)); display: grid; gap: 14px; padding: 28px; background: #fff; border: 1px solid var(--line); border-radius: 7px; box-shadow: 0 15px 40px rgba(27, 59, 49, .1); }
.login-brand { color: var(--green); font-weight: 800; font-size: 23px; display: flex; align-items: baseline; gap: 9px; }
.login-panel h1 { font-size: 18px; margin: 0 0 5px; }
.login-panel input { width: 100%; }
.loading { padding: 32px; text-align: center; color: var(--muted); }
.help-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 16px; align-items: start; }
.help-toc { position: sticky; top: 14px; display: grid; gap: 5px; padding: 12px; }
.help-toc strong { padding: 5px 8px 8px; font-size: 14px; }
.help-toc a { color: var(--muted); text-decoration: none; padding: 7px 8px; border-radius: 4px; font-size: 13px; }
.help-toc a:hover { color: var(--green); background: var(--surface-alt); }
.help-content { display: grid; gap: 14px; min-width: 0; }
.help-hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, .6fr); gap: 16px; padding: 22px; border-radius: var(--radius); color: #fff; background: linear-gradient(135deg, #174c3e, #21755f); }
.help-hero h2 { margin: 6px 0 8px; font-size: 24px; }
.help-hero p { margin: 0; color: #d8ebe4; line-height: 1.7; }
.eyebrow { font-size: 12px; color: #aee0cf; letter-spacing: 2px; }
.parameter-card { padding: 14px; border: 1px solid rgba(255,255,255,.23); border-radius: var(--radius); background: rgba(255,255,255,.08); }
.parameter-card > span { color: #cce6dc; font-size: 12px; }
.parameter-card dl { margin: 10px 0 0; display: grid; gap: 7px; }
.parameter-card dl div { display: flex; justify-content: space-between; gap: 12px; }
.parameter-card dt { color: #cce6dc; font-size: 12px; }
.parameter-card dd { margin: 0; font-weight: 700; font-size: 13px; text-align: right; }
.help-section { scroll-margin-top: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; min-width: 0; }
.help-section h2 { margin: 0 0 14px; font-size: 18px; }
.help-section > p { color: var(--muted); line-height: 1.75; margin: 10px 0 0; }
.step-grid, .source-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.step-grid article, .source-grid article { display: grid; gap: 6px; padding: 13px; border: 1px solid var(--line); border-radius: var(--radius); background: #fbfdfc; }
.step-grid b { width: 26px; height: 26px; display: grid; place-items: center; color: #fff; background: var(--green); border-radius: 50%; }
.step-grid strong, .source-grid strong { font-size: 14px; }
.step-grid span, .source-grid span, .source-grid p { color: var(--muted); font-size: 12px; line-height: 1.6; }
.source-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.source-grid p { margin: 0; }
.source-grid article > span { color: var(--green); font-weight: 700; }
.help-note { margin-top: 12px; padding: 11px 13px; color: #735400; background: #fff7dc; border-left: 4px solid #d09a00; border-radius: 3px; font-size: 13px; line-height: 1.65; }
.help-note.success { color: #17613c; background: #e2f3e9; border-left-color: var(--green); }
.help-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.help-table { white-space: normal; min-width: 760px; }
.help-table th { position: static; }
.help-table th:first-child { width: 21%; }
.help-table th:nth-child(2) { width: 47%; }
.help-table td { vertical-align: top; line-height: 1.6; }
.definition-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.definition-list.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.definition-list article { padding: 13px; border-top: 3px solid var(--blue); background: #f6f9fb; border-radius: var(--radius); }
.definition-list strong { font-size: 14px; }
.definition-list p { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.formula-card { display: grid; gap: 7px; padding: 14px; color: #194a3d; background: #e5f3ed; border: 1px solid #b9d1c8; border-radius: var(--radius); }
.formula-card span { color: var(--muted); font-size: 12px; line-height: 1.65; }
.settings-form { display: grid; gap: 18px; }
.settings-heading { justify-content: space-between; }
.settings-heading > div { display: grid; gap: 5px; }
.settings-heading > div > span { color: var(--muted); font-size: 12px; line-height: 1.55; }
.selected-month-status { display: grid; grid-template-columns: auto auto; align-items: center; gap: 3px 8px; padding: 8px 10px; border-left: 3px solid var(--green); background: var(--surface-alt); }
.selected-month-status > span { grid-column: 1 / -1; color: var(--muted); font-size: 11px; }
.selected-month-status strong { color: var(--green-dark); font-size: 17px; }
.setting-input-grid { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.setting-input-grid label, .curve-input-grid label { display: grid; gap: 6px; padding: 11px; border: 1px solid var(--line); border-radius: var(--radius); background: #fbfdfc; }
.setting-input-grid label > span, .curve-input-grid label > span { color: var(--muted); font-size: 12px; }
.setting-input-grid label > div, .curve-input-grid label > div { display: flex; align-items: center; gap: 6px; }
.setting-input-grid input, .curve-input-grid input { width: 100%; min-width: 0; text-align: right; font-weight: 700; }
.setting-input-grid em, .curve-input-grid em { color: var(--muted); font-style: normal; font-size: 12px; white-space: nowrap; }
.ai-settings-form { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 16px; }
.ai-settings-form label { display: grid; grid-template-columns: max-content minmax(120px, 210px); align-items: center; gap: 8px; }
.ai-settings-form label.wide { grid-template-columns: max-content minmax(220px, 360px); }
.ai-settings-form label > span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.ai-settings-form input, .ai-settings-form select { min-width: 0; }
.ai-settings-status { display: grid; justify-items: end; gap: 4px; padding: 8px 10px; border-left: 3px solid var(--warning); background: #fff8df; }
.ai-settings-status.configured { border-color: var(--primary); background: var(--primary-soft); }
.ai-settings-status small, .ai-settings-footer { color: var(--muted); }
.ai-settings-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; font-size: 12px; }
.settings-subsection { display: grid; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.monthly-rule-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.monthly-rule-form label { display: grid; gap: 6px; min-width: 0; }
.monthly-rule-form label > span { color: var(--muted); font-size: 12px; }
.monthly-rule-form label > div { display: flex; align-items: center; gap: 6px; }
.monthly-rule-form input { width: 100%; min-width: 0; text-align: right; font-weight: 700; }
.monthly-rule-form input[type="month"] { text-align: left; }
.monthly-rule-form input[type="checkbox"] { width: 18px; height: 18px; min-width: 18px; accent-color: var(--primary); }
.monthly-rule-form .monthly-pool-switch { cursor: pointer; }
.monthly-rule-form .monthly-pool-switch em { white-space: normal; max-width: 13rem; line-height: 1.25; }
.monthly-rule-form em { color: var(--muted); font-size: 12px; font-style: normal; white-space: nowrap; }
.monthly-rule-form button { min-height: 38px; }
.monthly-rule-new { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.monthly-rule-list { display: grid; }
.monthly-rule-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; padding: 14px 0; border-bottom: 1px solid var(--line); }
.monthly-rule-item.selected { margin-inline: -8px; padding-inline: 8px; border-left: 3px solid var(--green); background: #f2f8f5; }
.monthly-rule-item:last-child { padding-bottom: 0; border-bottom: 0; }
.monthly-rule-item > form:last-child { padding-bottom: 1px; }
.decision-settings { padding: 16px; border: 1px solid #c9ddd6; border-radius: var(--radius); background: #f6fbf9; }
.decision-settings.settings-subsection { border-top: 3px solid var(--green); }
.decision-threshold-grid label { background: #fff; }
.decision-rule-preview { display: flex; gap: 10px; flex-wrap: wrap; }
.decision-rule-preview span { padding: 6px 9px; color: #315d72; background: #e7f1f5; border-radius: 4px; font-size: 12px; }
.decision-maturity-heading { margin-top: 8px; padding-top: 14px; border-top: 1px dashed #c9ddd6; }
.curve-total { color: var(--green); white-space: nowrap; }
.curve-input-grid { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.curve-input-grid label { min-width: 0; padding: 10px; }
.curve-input-grid label > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.curve-input-grid input { min-width: 0; padding-inline: 8px; font-variant-numeric: tabular-nums; }
.curve-input-grid label.fixed { background: #e6efec; }
.settings-form .setting-input-grid label,
.settings-form .monthly-rule-form label,
.settings-form .curve-input-grid label { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.settings-form .setting-input-grid label { padding: 0; border: 0; background: transparent; }
.settings-form .monthly-rule-form label { gap: 6px; }
.settings-form .curve-input-grid label { padding: 7px 8px; }
.settings-form .setting-input-grid label > span,
.settings-form .monthly-rule-form label > span,
.settings-form .curve-input-grid label > span { flex: 0 0 auto; white-space: nowrap; }
.settings-form .setting-input-grid label > div,
.settings-form .monthly-rule-form label > div,
.settings-form .curve-input-grid label > div { display: flex; align-items: center; gap: 6px; justify-content: flex-start; }
.settings-form .setting-input-grid input[type="number"],
.settings-form .monthly-rule-form input[type="number"],
.settings-form .curve-input-grid input[type="number"] { flex: 0 0 6.5rem; width: 6.5rem; }
.settings-form .monthly-rule-form input[type="month"] { width: 9.5rem; }
.settings-form .monthly-rule-form button.primary { justify-self: start; min-width: 10rem; }
.promotion-curves { display: grid; gap: 12px; }
.promotion-curves #curve-filter { min-width: 270px; }
.curve-legend { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 12px; }
.curve-legend span { display: flex; align-items: center; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.eligible { background: #15945c; }
.dot.fallback { background: #d09a00; }
.curve-table { min-width: 1840px; }
.curve-table > thead > tr > th:nth-child(1), .curve-table > tbody > .curve-row > td:nth-child(1) { position: sticky; left: 0; z-index: 2; width: 100px; min-width: 100px; max-width: 100px; background: #fff; }
.curve-table > thead > tr > th:nth-child(1) { background: #d9eae4; }
.curve-table > thead > tr > th:nth-child(2), .curve-table > tbody > .curve-row > td:nth-child(2) { position: sticky; left: 100px; z-index: 2; width: 105px; min-width: 105px; max-width: 105px; background: #fff; }
.curve-table > thead > tr > th:nth-child(2) { background: #d9eae4; }
.curve-table > thead > tr > th:nth-child(3), .curve-table > tbody > .curve-row > td:nth-child(3) { position: sticky; left: 205px; z-index: 2; width: 130px; min-width: 130px; max-width: 130px; background: #fff; }
.curve-table > thead > tr > th:nth-child(3) { background: #d9eae4; }
.curve-table > thead > tr > th:nth-child(4), .curve-table > tbody > .curve-row > td:nth-child(4) { position: sticky; left: 335px; z-index: 2; width: 90px; min-width: 90px; max-width: 90px; background: #fff; }
.curve-table > thead > tr > th:nth-child(4) { background: #d9eae4; }
.curve-status { display: inline-block; min-width: 88px; padding: 3px 6px; border-radius: 3px; font-size: 11px; text-align: center; }
.curve-status.eligible { color: #17613c; background: #e2f3e9; }
.curve-status.fallback { color: #735400; background: #fff7dc; }
.curve-detail-toggle { min-width: 78px; padding: 6px 8px; }
.curve-detail-row > td:first-child { position: static; padding: 0; background: #f7faf9; }
.curve-detail-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 12px; white-space: normal; }
.curve-detail-heading span { color: var(--muted); font-size: 12px; }
.curve-detail-table { min-width: 2380px; background: #fff; }
.curve-detail-table th:first-child, .curve-detail-table td:first-child { position: sticky; left: 0; z-index: 2; min-width: 105px; background: #fff; }
.curve-detail-table th:first-child { background: #d9eae4; }
.curve-detail-total td { background: #edf6f2; font-weight: 700; }
.curve-detail-total td:first-child { background: #dceee7; }
.curve-readonly-grid { display: grid; grid-template-columns: repeat(15, minmax(58px, 1fr)); gap: 5px; margin-top: 12px; overflow-x: auto; }
.curve-readonly-grid div { min-width: 58px; display: grid; gap: 4px; padding: 8px; text-align: center; border: 1px solid var(--line); border-radius: 4px; background: #f7faf9; }
.curve-readonly-grid span { color: var(--muted); font-size: 11px; }
.curve-readonly-grid strong { font-size: 13px; }
.report-toolbar { display: flex; align-items: end; gap: 10px; }
.report-toolbar form { display: flex; align-items: end; gap: 8px; }
.report-toolbar label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
.report-toolbar input { min-width: 160px; }
.report-meta { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex: 1; color: var(--muted); font-size: 12px; }
.report-mode { padding: 4px 7px; border-radius: 3px; color: #315d72; background: #e2eff5; font-weight: 700; }
.report-mode.ai { color: #17613c; background: #e2f3e9; }
.report-lead { padding: 18px 20px; border-top: 4px solid #54757e; border-left: 1px solid var(--line); background: #eef4f5; }
.report-lead.danger { border-top-color: var(--green); background: #edf7f1; }
.report-lead.warning { border-top-color: #c78300; background: #fff8e5; }
.report-lead.positive { border-top-color: var(--red); background: #fff1f2; }
.report-lead h2 { margin: 7px 0; color: #183f37; font-size: 22px; }
.report-lead.danger h2 { color: #175445; }
.report-lead.warning h2 { color: #785300; }
.report-lead p { margin: 0; color: #405954; line-height: 1.7; }
.report-verdict { display: inline-block; padding: 4px 8px; color: #fff; background: #54757e; border-radius: 3px; font-size: 12px; font-weight: 800; }
.report-lead.danger .report-verdict { background: var(--green); }
.report-lead.warning .report-verdict { background: #a86d00; }
.report-lead.positive .report-verdict { background: var(--red); }
.report-narrative strong { margin-right: 6px; color: var(--text); }
.report-fallback-note { margin-top: 10px; padding-top: 9px; color: #735400; border-top: 1px solid #cddfd8; font-size: 12px; }
.report-empty { padding: 28px; text-align: center; }
.report-empty h2 { margin: 0 0 8px; font-size: 18px; }
.report-empty p { margin: 0; color: var(--muted); line-height: 1.7; }
.report-focus-grid { display: grid; grid-template-columns: 1.25fr repeat(3, minmax(0, 1fr)); gap: 10px; }
.report-focus-card { min-height: 118px; padding: 14px 15px; border: 1px solid var(--line); border-top: 4px solid #54757e; background: #fff; }
.report-focus-card.danger { border-top-color: var(--green); }
.report-focus-card.warning { border-top-color: #c78300; }
.report-focus-card.positive { border-top-color: var(--red); }
.report-focus-card > span { display: block; margin-bottom: 8px; color: var(--muted); font-size: 12px; font-weight: 700; }
.report-focus-card > strong { display: block; color: #183f37; font-size: 15px; line-height: 1.55; }
.report-focus-card.danger > strong { color: #175445; }
.report-focus-card.warning > strong { color: #7b5500; }
.report-focus-card.positive > strong { color: #9f2331; }
.report-focus-card > p { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.report-action-counts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); background: #fff; }
.report-action-counts div { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 10px; border-right: 1px solid var(--line); }
.report-action-counts div:last-child { border-right: 0; }
.report-action-counts span { color: var(--muted); font-size: 12px; }
.report-action-counts strong { font-size: 18px; }
.report-action-counts .increase strong { color: var(--red); }
.report-action-counts .reduce strong { color: var(--green); }
.report-action-counts .stable strong { color: #315d72; }
.report-kpi-grid { grid-template-columns: repeat(8, minmax(130px, 1fr)); }
.report-kpi-grid article { border-top: 3px solid #54757e; }
.report-kpi-grid article.cost { border-top-color: #c45c00; }
.report-kpi-grid article.allocation { border-top-color: #d09a00; }
.report-kpi-grid article.volume { border-top-color: #315d72; }
.report-kpi-grid article.roi { border-top-color: var(--red); }
.report-kpi-grid span small { display: block; margin-top: 3px; color: #75817d; font-size: 10px; }
.report-comparison { display: grid; gap: 10px; }
.report-comparison table { min-width: 980px; }
.report-findings { display: grid; gap: 8px; }
.report-finding { display: grid; grid-template-columns: minmax(240px, .8fr) minmax(320px, 1.2fr); gap: 20px; padding: 13px 15px; border: 1px solid var(--line); border-left: 4px solid #4c8197; background: #fff; }
.report-finding.warning { border-left-color: #d09a00; }
.report-finding.ok { border-left-color: #15945c; }
.report-finding strong { font-size: 14px; }
.report-finding p { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.report-finding-label { display: block; margin-bottom: 4px; color: #70807a; font-size: 10px; font-weight: 800; }
.report-table-heading { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; }
.report-table-heading h2 { margin: 0 0 4px; font-size: 17px; }
.report-table-heading span { color: var(--muted); font-size: 12px; }
#report-action-table, #report-priority-table { min-width: 1650px; }
#report-action-table th, #report-action-table td, #report-priority-table th, #report-priority-table td { text-align: center; vertical-align: middle; }
#report-action-table .report-text-cell, #report-priority-table .report-text-cell { min-width: 240px; max-width: 320px; text-align: left; white-space: normal; line-height: 1.55; }
.report-promotion-id { display: block; margin-top: 4px; color: var(--muted); font-family: Consolas, monospace; font-size: 10px; font-weight: 400; }
.report-cost { color: #c24e00; font-weight: 800; }
.report-all-actions { padding: 0; overflow: hidden; }
.report-all-actions summary { padding: 13px 15px; color: var(--green); cursor: pointer; font-weight: 800; }
.report-all-actions[open] summary { border-bottom: 1px solid var(--line); }
.report-all-actions summary:hover { background: var(--surface-alt); }
.report-lower-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(330px, .7fr); gap: 12px; }
.report-quality, .report-history { display: grid; align-content: start; gap: 8px; }
.report-quality h2, .report-history h2 { margin: 0 0 3px; font-size: 16px; }
.quality-row { padding: 9px 10px; color: #315d72; background: #e7f1f5; border-left: 3px solid #4c8197; font-size: 12px; line-height: 1.55; }
.quality-row.warning { color: #735400; background: #fff7dc; border-left-color: #d09a00; }
.quality-row.ok { color: #17613c; background: #e2f3e9; border-left-color: #15945c; }
.report-quality dl { margin: 3px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.report-quality dl div { padding: 9px; background: #f7faf9; }
.report-quality dt { color: var(--muted); font-size: 11px; }
.report-quality dd { margin: 4px 0 0; font-weight: 800; }
.report-history a { display: grid; grid-template-columns: 100px 80px 1fr; align-items: center; gap: 8px; padding: 8px 5px; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--line); }
.report-history a:hover { background: var(--surface-alt); }
.report-history em { color: var(--green); font-size: 12px; font-style: normal; }
.report-history small { color: var(--muted); text-align: right; }
@media (max-width: 1200px) {
  .dashboard-month-bar { align-items: stretch; flex-direction: column; }
  .dashboard-month-current { flex-basis: auto; }
  .dashboard-month-controls { width: 100%; justify-content: flex-end; flex-wrap: wrap; }
  .two-column, .imports-layout, .backup-actions { grid-template-columns: minmax(0, 1fr); }
  .section-heading { flex-wrap: wrap; }
  .toolbar > label { flex: 1 1 210px; min-width: 0; }
  .toolbar > label input, .toolbar > label select { width: 100%; min-width: 0; }
  .user-create-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .user-create-form button { justify-self: start; }
  .report-finding { grid-template-columns: minmax(0, 1fr); gap: 7px; }
}
@media (max-width: 1100px) {
  .workspace { padding-inline: 14px; }
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .reconcile-grid { grid-template-columns: repeat(2, 1fr); }
  .forecast-grid { grid-template-columns: repeat(3, 1fr); }
  .brief-kpi-grid { grid-template-columns: repeat(4, 1fr); }
  .backup-summary { grid-template-columns: repeat(2, 1fr); }
  .backup-summary div:nth-child(2) { border-right: 0; }
  .backup-summary div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .help-layout { grid-template-columns: minmax(0, 1fr); }
  .help-toc { position: static; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .help-toc strong { grid-column: 1 / -1; }
  .definition-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .setting-input-grid, .monthly-rule-form { gap: 10px 12px; }
  .alliance-layout { grid-template-columns: minmax(0, 1fr); }
  .trend-summary-grid { grid-template-columns: repeat(3, minmax(130px, 1fr)); }
  .holiday-summary-grid, .holiday-today-summary-grid { grid-template-columns: repeat(3, minmax(130px, 1fr)); }
  .trend-roi-details-grid { grid-template-columns: repeat(2, minmax(130px, 1fr)); }
  .timing-summary-grid { grid-template-columns: repeat(3, minmax(130px, 1fr)); }
  .timing-decision { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
  .return-summary-grid { grid-template-columns: repeat(3, minmax(130px, 1fr)); }
  .trend-decision { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .curve-input-grid { gap: 10px; }
  .report-toolbar { align-items: stretch; flex-wrap: wrap; }
  .report-meta { flex-basis: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .report-focus-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-kpi-grid { grid-template-columns: repeat(4, minmax(135px, 1fr)); }
  .report-lower-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1024px) {
  .sidebar { position: sticky; inset: 0 0 auto; width: auto; min-height: auto; padding: 9px 10px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 8px; }
  .brand { padding: 4px 9px; white-space: nowrap; }
  .sidebar nav { display: flex; min-width: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
  .nav-group-label { display: none; }
  .nav-link { flex: 0 0 auto; padding: 8px 10px; white-space: nowrap; }
  .nav-link.nav-child { margin-left: 0; padding-left: 10px; border-left: 0; border-radius: 4px; }
  .session-user { margin: 0; padding: 3px 7px; border-top: 0; white-space: nowrap; }
  .sidebar > form { margin: 0; }
  .logout { width: auto; min-height: 32px; margin: 0; padding: 0 10px; white-space: nowrap; }
  .workspace { margin-left: 0; padding: 0 14px 28px; }
  .page-header { height: 58px; margin-bottom: 14px; }
}
@media (max-width: 760px) {
  .ai-settings-form, .ai-settings-footer { align-items: stretch; flex-direction: column; }
  .ai-settings-form label, .ai-settings-form label.wide { grid-template-columns: minmax(100px, max-content) minmax(0, 1fr); }
  .ai-settings-status { justify-items: start; }
  .sidebar { position: sticky; grid-template-columns: minmax(0, 1fr) auto; gap: 5px; padding: 8px 10px; }
  .brand { grid-column: 1; grid-row: 1; padding: 2px 7px; font-size: 20px; }
  .sidebar nav { grid-column: 1 / -1; grid-row: 2; }
  .session-user { display: none; }
  .sidebar > form { grid-column: 2; grid-row: 1; }
  .workspace { margin-left: 0; padding: 0 10px 24px; }
  .page-header { height: 56px; }
  .kpi-grid, .kpi-grid.compact, .reconcile-grid, .summary-strip, .two-column, .brief-kpi-grid, .return-summary-grid { grid-template-columns: minmax(0, 1fr); }
  .summary-strip div { border-right: 0; border-bottom: 1px solid #4d8c7b; }
  .edit-form { grid-template-columns: minmax(0, 1fr); }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .dashboard-month-bar { align-items: stretch; flex-direction: column; }
  .dashboard-month-controls { align-items: stretch; flex-wrap: wrap; }
  .dashboard-month-controls label { flex: 1 1 100%; }
  .dashboard-month-controls input { width: 100%; min-width: 0; }
  .dashboard-month-current { grid-template-columns: minmax(0, 1fr); }
  .dashboard-month-current strong, .dashboard-month-current em { grid-column: 1; }
  .dashboard-month-controls button { flex: 1 1 120px; }
  .panel { padding: 12px; }
  .import-history-scroll { max-height: 65vh; }
  .form-actions, .row-actions, .today-brief-table-tools, .curve-detail-heading { flex-wrap: wrap; }
  .form-actions > *, .today-brief-table-tools button { flex: 1 1 130px; }
  .chart-panel { min-height: 280px; padding: 8px; }
  .chart-panel canvas { height: 270px; }
  .return-analysis-intro { align-items: stretch; flex-direction: column; }
  .return-analysis-toolbar { align-items: stretch; }
  .return-analysis-toolbar > label:not(.return-empty-toggle) { flex-basis: 100%; }
  .section-filter { margin-left: 0; width: 100%; align-items: stretch; }
  .section-filter label { flex: 1 1 155px; }
  .section-filter input { width: 100%; min-width: 0; }
  .fulfillment-form { margin-left: 0; width: 100%; }
  .fulfillment-form label { flex: 1 1 145px; }
  .fulfillment-form input { flex: 1; }
  .today-brief-heading { gap: 8px; }
  .today-brief-meta { max-width: 100%; text-align: left; }
  .today-brief-actions { width: 100%; margin-left: 0; justify-items: stretch; }
  .today-brief-date-filter { justify-content: flex-start; flex-wrap: wrap; }
  .help-toc { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .help-hero, .step-grid, .source-grid, .definition-list, .definition-list.two-up { grid-template-columns: minmax(0, 1fr); }
  .setting-input-grid, .monthly-rule-form, .curve-input-grid { align-items: flex-start; }
  .monthly-rule-item { grid-template-columns: minmax(0, 1fr); }
  .promotion-curves #curve-filter { width: 100%; min-width: 0; }
  .trend-summary-grid, .trend-decision, .timing-summary-grid, .timing-decision { grid-template-columns: minmax(0, 1fr); }
  .holiday-summary-grid, .holiday-today-summary-grid { grid-template-columns: minmax(0, 1fr); }
  .holiday-method-note { display: grid; gap: 5px; }
  .trend-roi-details-grid { grid-template-columns: minmax(0, 1fr); }
  .timing-note { align-items: flex-start; flex-direction: column; gap: 4px; }
  .user-create-form { grid-template-columns: minmax(0, 1fr); }
  .log-change-grid { grid-template-columns: minmax(0, 1fr); width: min(620px, 75vw); }
  .alliance-basic-grid, .alliance-metric-grid { grid-template-columns: minmax(0, 1fr); }
  .data-grid-scroll { max-height: 72vh; }
  .backup-summary { grid-template-columns: minmax(0, 1fr); }
  .backup-summary div { border-right: 0; border-bottom: 1px solid var(--line); }
  .backup-summary div:last-child { border-bottom: 0; }
  .backup-create-form { grid-template-columns: minmax(0, 1fr); }
  .report-toolbar, .report-toolbar form { align-items: stretch; flex-direction: column; }
  .report-toolbar input { width: 100%; min-width: 0; }
  .report-focus-grid, .report-action-counts { grid-template-columns: minmax(0, 1fr); }
  .report-action-counts div { border-right: 0; border-bottom: 1px solid var(--line); }
  .report-action-counts div:last-child { border-bottom: 0; }
  .report-kpi-grid { grid-template-columns: minmax(0, 1fr); }
  .report-finding { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .report-quality dl { grid-template-columns: minmax(0, 1fr); }
  .report-history a { grid-template-columns: 90px 72px 1fr; }
}
