:root {
  --ink: #17201f;
  --muted: #62706d;
  --line: #d7ded9;
  --panel: #fbfcf9;
  --bg: #eef2ec;
  --green: #245d4f;
  --green-2: #dce9df;
  --blue: #315a83;
  --amber: #9a6420;
  --red: #9f3a35;
  --white: #fff;
  font-family: "Microsoft YaHei", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
}

button,
input,
select,
textarea {
  font: inherit;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px 1fr;
}

.sidebar {
  background: #192522;
  color: #e9f0eb;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.brand {
  border-bottom: 1px solid rgba(255,255,255,.14);
  padding-bottom: 18px;
}

.brand strong {
  display: block;
  font-size: 19px;
  letter-spacing: 0;
}

.brand span,
.userbox {
  display: block;
  color: #a9bbb3;
  font-size: 13px;
  line-height: 1.7;
  margin-top: 7px;
}

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

.nav button,
.logout {
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
}

.nav button.active,
.nav button:hover,
.logout:hover {
  background: rgba(255,255,255,.11);
}

.logout {
  margin-top: auto;
}

.content {
  padding: 26px 30px 36px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 22px;
}

h1 {
  font-size: 25px;
  margin: 0 0 7px;
}

.subtle {
  color: var(--muted);
  font-size: 14px;
}

.grid {
  display: grid;
  gap: 14px;
}

.kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.two {
  grid-template-columns: 1.1fr .9fr;
  margin-top: 16px;
}

.panel,
.login-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 38px rgba(45, 58, 54, .08);
}

.panel {
  padding: 16px;
}

.panel h2 {
  margin: 0 0 13px;
  font-size: 17px;
}

.kpi {
  min-height: 108px;
}

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

.kpi strong {
  display: block;
  margin-top: 12px;
  font-size: 25px;
}

.report-hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
  margin-bottom: 16px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf6;
  box-shadow: 0 16px 38px rgba(45, 58, 54, .06);
}

.report-hero h2 {
  margin: 6px 0 8px;
  font-size: 24px;
}

.report-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.eyebrow {
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}

.report-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
  min-width: 190px;
}

.report-actions .btn {
  width: 100%;
}

.upload-btn {
  position: relative;
  overflow: hidden;
}

.upload-btn input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-workspace {
  margin-bottom: 16px;
}

.section-head.compact {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 12px;
}

.section-head.compact h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.section-head.compact p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.upload-table td strong {
  display: block;
  margin-bottom: 4px;
}

.quality-panel {
  margin-bottom: 16px;
  border-color: #ead3bd;
  background: #fffaf4;
}

.quality-list {
  margin: 0;
  padding-left: 20px;
  color: #7a4c22;
  line-height: 1.7;
}

.focus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.focus-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.focus-columns > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 14px;
}

.focus-columns h4 {
  margin: 0 0 10px;
  font-size: 15px;
}

.focus-grid.compact {
  grid-template-columns: 1fr;
  margin-top: 0;
}

.focus-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfb;
}

.focus-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

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

.focus-card p {
  margin: 0;
  color: var(--text);
  line-height: 1.65;
}

.analysis-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.analysis-split > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 14px;
}

.analysis-split h4 {
  margin: 0 0 10px;
  font-size: 15px;
}

.analysis-split .report-analysis {
  margin: 10px 0 0;
}

.analysis-note.compact {
  border: 1px solid var(--line);
  border-left: 4px solid #2563eb;
  border-radius: 8px;
  background: #f8fbff;
  color: var(--text);
  padding: 12px 14px;
  line-height: 1.7;
}

.analysis-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.summary-callout {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 13px 14px;
}

.summary-callout b {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
}

.summary-callout span {
  color: var(--muted);
  line-height: 1.65;
}

.summary-callout.good {
  border-color: #b9dfd3;
  background: #f7fffb;
}

.summary-callout.watch {
  border-color: #efd8a8;
  background: #fffaf0;
}

.metric-insight-layout > div {
  background: #fff;
}

.metric-card-grid {
  display: grid;
  gap: 12px;
}

.metric-insight-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.metric-insight-card.muted-card {
  background: #f8fafc;
}

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

.metric-card-head strong {
  font-size: 15px;
}

.metric-card-head span {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #f8fafc;
  padding: 2px 8px;
  font-size: 12px;
}

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

.metric-rank-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 9px;
}

.metric-rank-block.good {
  background: #f6fffb;
  border-color: #c8eadf;
}

.metric-rank-block.watch {
  background: #fffaf2;
  border-color: #efd8a8;
}

.metric-rank-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 7px;
}

.metric-rank-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 7px;
  align-items: baseline;
  padding: 6px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
}

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

.metric-rank-item i {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #eef2f7;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.metric-rank-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 650;
}

.metric-rank-item b {
  font-size: 13px;
  white-space: nowrap;
}

.metric-rank-item small {
  grid-column: 2 / 4;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.metric-rank-empty,
.metric-card-empty {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.metric-card-meaning {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.metric-card-footnote {
  margin: 8px 0 0;
  color: var(--amber);
  font-size: 12px;
  line-height: 1.5;
}

.template-spec {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.template-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfb;
}

.template-section h4 {
  margin: 0 0 6px;
}

.template-section p {
  margin: 4px 0;
  line-height: 1.65;
}

.btn.small {
  min-height: 30px;
  padding: 5px 10px;
  font-size: 13px;
}

.btn.danger {
  border-color: #e0b4a8;
  color: #9d3f2d;
  background: #fff7f4;
}

.upload-scope {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 18px;
  align-items: start;
  margin-bottom: 16px;
}

.upload-scope h2 {
  margin: 0 0 8px;
}

.upload-scope p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.upload-slot {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.upload-slot strong,
.upload-slot span {
  display: block;
}

.upload-slot span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  word-break: break-all;
}

.upload-slot.missing {
  border-color: #ead6b4;
  background: #fffaf0;
}

.dept-hero {
  background: #f7faf9;
}

.dept-report .report-analysis {
  line-height: 1.85;
}

.missing-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.missing-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.missing-card strong,
.missing-card span {
  display: block;
}

.missing-card span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.rule-list {
  margin: 10px 0 0;
  padding-left: 20px;
  line-height: 1.8;
}

.upload-slot.filled {
  border-color: #cbdccb;
  background: #f6faf6;
}

.report-document {
  margin-top: 16px;
  padding: 28px 34px;
  background: #fff;
}

.report-title-block {
  padding-bottom: 18px;
  border-bottom: 2px solid #23352f;
}

.report-title-block h2 {
  margin: 8px 0 10px;
  font-size: 26px;
}

.report-title-block p {
  max-width: 900px;
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.report-section {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.report-section:last-child {
  border-bottom: 0;
}

.report-section h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

.report-section p {
  margin: 0 0 10px;
  line-height: 1.85;
}

.report-conclusion {
  font-weight: 400;
}

.evidence-line,
.limit-line {
  margin-top: 8px;
  color: #34413e;
  line-height: 1.75;
}

.limit-line {
  color: var(--muted);
}

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

.report-metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8faf6;
}

.report-metric span,
.report-metric em {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.report-metric strong {
  display: block;
  margin: 8px 0 6px;
  font-size: 20px;
}

.report-metric b {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 7px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.report-metric.good b {
  background: var(--green-2);
  color: var(--green);
}

.report-metric.watch b {
  background: #f2e5c9;
  color: var(--amber);
}

.report-metric.bad b {
  background: #f2d9d5;
  color: var(--red);
}

.report-metric.neutral b {
  background: #edf0ec;
  color: var(--muted);
}

.report-table {
  margin-top: 8px;
}

.missing-section {
  background: #fbfaf4;
  margin: 10px -14px 0;
  padding: 20px 14px;
  border-radius: 8px;
}

.supplement-intro {
  color: var(--muted);
}

.supplement-complete {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #cbdccb;
  border-radius: 8px;
  background: #f6faf6;
  color: var(--green);
}

.supplement-form {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.supplement-sheet {
  margin-top: 14px;
}

.supplement-sheet-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.supplement-sheet-wrap {
  overflow-x: auto;
  border: 1px solid #e3d7be;
  border-radius: 8px;
  background: #fff;
}

.supplement-sheet-table {
  min-width: 1380px;
  background: #fff;
}

.supplement-sheet-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8faf6;
}

.supplement-sheet-table td:nth-child(4) {
  min-width: 360px;
}

.supplement-sheet-table input {
  width: 100%;
  min-width: 120px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 7px 8px;
  background: #fff;
}

.supplement-sheet-table input:focus {
  outline: 2px solid rgba(36, 93, 79, .18);
  border-color: var(--green);
}

.supplement-card {
  border: 1px solid #e3d7be;
  border-radius: 8px;
  background: #fffdf8;
  padding: 14px;
}

.supplement-card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.supplement-card h4 {
  margin: 8px 0 6px;
  font-size: 16px;
}

.supplement-card p {
  margin: 0;
  color: var(--muted);
}

.supplement-side {
  display: grid;
  justify-items: end;
  gap: 6px;
  min-width: 160px;
}

.supplement-template,
.supplement-status {
  color: var(--muted);
  font-size: 12px;
}

.supplement-status {
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.supplement-standard {
  margin: 12px 0;
  padding: 12px;
  border-left: 3px solid var(--green);
  background: #f8faf6;
  color: #35423f;
  line-height: 1.75;
}

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

.supplement-fields label {
  display: grid;
  gap: 6px;
}

.supplement-fields span {
  color: var(--muted);
  font-size: 13px;
}

.supplement-fields input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
  background: #fff;
}

.supplement-fields input:focus {
  outline: 2px solid rgba(36, 93, 79, .18);
  border-color: var(--green);
}

.supplement-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.method-details {
  margin-top: 16px;
}

.method-details summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--green);
}

.method-content {
  margin-top: 16px;
}

.toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.template-head {
  justify-content: space-between;
  margin-bottom: 14px;
}

.template-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.template-tabs button {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  border-radius: 8px;
  padding: 12px;
  text-align: left;
  cursor: pointer;
  min-height: 76px;
}

.template-tabs button.active {
  border-color: var(--green);
  box-shadow: inset 0 0 0 1px var(--green);
  background: #f4faf5;
}

.template-tabs span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  margin-top: 6px;
}

.template-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 12px;
}

.template-card {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 8px;
  padding: 14px;
}

.template-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.template-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.template-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.template-detail {
  margin-top: 12px;
}

.inner-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.inner-panel h2 {
  margin: 0 0 13px;
  font-size: 17px;
}

.wide-panel {
  overflow-x: auto;
}

.wide-panel .table {
  min-width: 1120px;
}

.compact-list {
  margin: 0;
  padding-left: 18px;
  line-height: 1.7;
}

.available-row td {
  background: #f4faf5;
}

.btn {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
}

.btn.primary {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}

.btn.warn {
  border-color: #ead6b4;
  color: var(--amber);
}

.btn.danger {
  border-color: #ebc4c0;
  color: var(--red);
}

.trace-value {
  display: inline;
  border: 0;
  border-bottom: 1px dotted var(--blue);
  padding: 0 1px 1px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-weight: inherit;
}

.trace-value:hover {
  color: var(--blue);
  background: #e8f0f5;
}

.comparison-value {
  display: grid;
  gap: 3px;
  text-align: left;
  min-width: 104px;
  width: 100%;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: #f7f9f7;
}

.comparison-value span {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.comparison-value small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.comparison-value.is-good {
  color: #1f6b4a;
  background: #edf7ef;
  border-color: #c8e4cf;
}

.comparison-value.is-bad {
  color: #9f3a35;
  background: #fff1ef;
  border-color: #efcbc7;
}

.comparison-value.is-warning {
  color: #9a6420;
  background: #fff7e8;
  border-color: #ecd7aa;
}

.comparison-value.is-neutral {
  background: #f7f9f7;
}

.comparison-value.is-missing {
  color: #8b9692;
  background: #f3f4f2;
  border-style: dashed;
}

.dept-signal-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0 16px;
}

.signal-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--white);
}

.signal-card.good {
  border-top: 4px solid #2f7b58;
}

.signal-card.bad {
  border-top: 4px solid var(--red);
}

.signal-card.warn {
  border-top: 4px solid var(--amber);
}

.signal-title,
.signal-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: baseline;
}

.signal-title {
  margin-bottom: 8px;
}

.signal-title strong {
  font-size: 15px;
}

.signal-title span,
.signal-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.signal-row {
  padding: 6px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.signal-row strong {
  font-variant-numeric: tabular-nums;
}

.signal-empty {
  color: var(--muted);
  font-size: 13px;
  padding-top: 6px;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.table-scroll .table {
  margin: 0;
}

.dept-indicator-table {
  min-width: 1180px;
  font-size: 13px;
}

.dept-indicator-table th {
  position: sticky;
  top: 0;
  background: #f5f7f4;
  z-index: 1;
}

.dept-indicator-table th:first-child,
.dept-indicator-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fbfcf9;
}

.dept-indicator-table th:first-child {
  z-index: 3;
  background: #f5f7f4;
}

.dept-row.bad td:first-child {
  box-shadow: inset 4px 0 0 var(--red);
}

.dept-row.watch td:first-child {
  box-shadow: inset 4px 0 0 var(--amber);
}

.dept-name-cell strong {
  display: block;
  margin-bottom: 6px;
}

.row-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.row-flags span {
  border-radius: 999px;
  padding: 2px 6px;
  font-size: 11px;
  line-height: 1.2;
}

.row-flags .bad {
  color: var(--red);
  background: #fff1ef;
}

.row-flags .warn {
  color: var(--amber);
  background: #fff7e8;
}

.judgement-cell {
  max-width: 260px;
}

.judgement-cell small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.55;
}

.hidden-row-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #f7f9f6;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.hidden-row-note strong {
  flex: 0 0 auto;
  color: var(--ink);
}

.cost-driver-panel {
  margin: 16px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.cost-driver-panel h4 {
  margin: 0 0 8px;
  font-size: 16px;
}

.driver-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.driver-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--white);
}

.driver-card.loss {
  border-left: 4px solid var(--red);
}

.driver-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.driver-head strong {
  font-size: 16px;
}

.driver-head span {
  color: var(--red);
  font-weight: 700;
}

.driver-card p {
  margin: 8px 0;
  color: var(--ink);
  line-height: 1.65;
}

.driver-section {
  margin: 10px 0;
  padding: 10px;
  border-radius: 8px;
  background: #f7f9f7;
}

.driver-section strong {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
}

.driver-section.likely {
  background: #fff6f4;
  border: 1px solid #f0c9c4;
}

.driver-section.evidence {
  background: #f5f8fb;
  border: 1px solid #d6e1ea;
}

.driver-section ul {
  margin: 0;
  padding-left: 18px;
}

.driver-section li {
  display: list-item;
  border: 0;
  padding: 3px 0;
  font-size: 13px;
  line-height: 1.55;
}

.driver-next {
  font-size: 13px;
  color: var(--muted);
}

.driver-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}

.driver-meta span {
  padding: 3px 7px;
  border-radius: 999px;
  background: #f3f6f4;
  color: var(--muted);
  font-size: 12px;
}

.driver-card ul {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.driver-card li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  padding: 5px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.driver-card li small {
  color: var(--muted);
}

.driver-card .driver-section ul {
  margin: 0;
  padding-left: 18px;
  list-style: disc;
}

.driver-card .driver-section li {
  display: list-item;
  grid-template-columns: none;
  border-top: 0;
  padding: 3px 0;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th,
.table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

.table th {
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--green-2);
  color: var(--green);
  font-size: 12px;
  white-space: nowrap;
}

.badge.high,
.badge.open {
  background: #f2d9d5;
  color: var(--red);
}

.badge.must,
.badge.missing {
  background: #f2d9d5;
  color: var(--red);
}

.badge.medium,
.badge.submitted,
.badge.finance_approved {
  background: #f2e5c9;
  color: var(--amber);
}

.badge.important,
.badge.partial {
  background: #f2e5c9;
  color: var(--amber);
}

.badge.published,
.badge.success,
.badge.handled,
.badge.available {
  background: var(--green-2);
  color: var(--green);
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(90deg, rgba(36,93,79,.08) 1px, transparent 1px),
    linear-gradient(rgba(36,93,79,.08) 1px, transparent 1px),
    #eef2ec;
  background-size: 42px 42px;
}

.login-card {
  width: min(420px, 100%);
  padding: 26px;
}

.login-card h1 {
  font-size: 23px;
}

.field {
  display: grid;
  gap: 7px;
  margin: 14px 0;
}

.field label {
  font-size: 13px;
  color: var(--muted);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--white);
  padding: 10px 11px;
  border-radius: 6px;
}

.error {
  color: var(--red);
  margin-top: 12px;
}

.global-error {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid #ebc4c0;
  border-radius: 8px;
  background: #fff6f5;
}

.empty {
  color: var(--muted);
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.5);
}

.report-panel {
  margin-top: 16px;
}

.report-panel pre {
  max-height: 560px;
  overflow: auto;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: #25302d;
  font-family: "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.75;
  white-space: pre-wrap;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 24, 22, .45);
}

.modal {
  width: min(780px, 100%);
  max-height: min(720px, 92vh);
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(0,0,0,.24);
}

.modal-head {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.modal-head h2 {
  margin: 0;
  font-size: 18px;
}

.modal-body {
  padding: 18px;
}

.modal-body h3 {
  margin: 16px 0 8px;
  font-size: 15px;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .kpis,
  .two,
  .report-metrics {
    grid-template-columns: 1fr;
  }

  .report-hero,
  .upload-scope {
    display: grid;
  }

  .report-actions {
    justify-items: start;
  }

  .report-document {
    padding: 22px 18px;
  }

  .upload-scope-grid,
  .dept-signal-board,
  .supplement-fields,
  .focus-columns,
  .analysis-split,
  .analysis-summary-grid,
  .metric-rank-grid {
    grid-template-columns: 1fr;
  }
}
