:root {
  --ink: #153d40;
  --ink2: #214b4d;
  --sea: #19756c;
  --mint: #9cd8cb;
  --paper: #f2f4ef;
  --white: #fff;
  --line: #dce2dc;
  --muted: #74827d;
  --high: #d65a4c;
  --high-bg: #fff0ec;
  --medium: #bf8129;
  --medium-bg: #fff6e4;
  --low: #2f8069;
  --low-bg: #e7f5ef;
}

body { background: var(--paper); }
.app-shell { display: block; min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 10;
  width: 224px;
  height: 100vh;
  padding: 26px 22px;
  overflow-y: auto;
  background: #123f42;
  box-shadow: 14px 0 40px rgba(23, 57, 58, .08);
}
.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 82px;
  padding: 12px 4px 28px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.brand-wordmark {
  display: block;
  width: 154px;
  height: auto;
  filter: brightness(1.34) saturate(1.12) drop-shadow(0 8px 18px rgba(68, 174, 202, .16));
}
.sidebar nav { margin-top: 34px; gap: 6px; }
.sidebar nav a {
  position: relative;
  padding: 13px 12px;
  border-left: 0;
  border-radius: 3px;
  color: #8da9a9;
  font-size: 11px;
}
.sidebar nav a::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  border-radius: 3px;
  background: transparent;
}
.sidebar nav a i { margin-right: 12px; color: #648384; }
.sidebar nav a:hover,
.sidebar nav a.active { border-left: 0; color: #fff; background: rgba(255,255,255,.07); }
.sidebar nav a.active::before { background: #96d8cb; }
.sidebar nav a.active i { color: #9edfd2; }
.source-card { padding: 15px 10px; }
.logout { color: #93adad; }

main {
  margin-left: 224px;
  padding: 0 clamp(26px, 4vw, 64px) 44px;
  background: radial-gradient(circle at 78% -12%, #d9eee8 0, transparent 25%), var(--paper);
}
.page-header {
  min-height: 158px;
  gap: 30px;
  border-bottom-color: var(--line);
}
.page-header h1 {
  margin-top: 9px;
  font: 600 clamp(28px, 3.2vw, 46px)/1.08 Georgia, "Songti SC", serif;
  letter-spacing: -.035em;
}
.page-header h1 br { display: none; }
.page-header h1 span { margin-left: .25em; color: var(--sea); }
.period-block { min-width: 285px; }
.period-block strong { font-size: 24px; }
.range-mode button,
.range-select select { border-radius: 3px; }

.sync-notice { border-radius: 3px; }
.overview {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 22px;
}
.executive-card {
  min-height: 340px;
  padding: 28px 31px;
  border-radius: 4px;
  background: linear-gradient(135deg, #123f42 0%, #174d51 100%);
  box-shadow: 0 18px 46px rgba(30, 70, 69, .13);
}
.executive-summary-body {
  grid-template-columns: .9fr 1.1fr;
  gap: clamp(26px, 4vw, 58px);
  align-items: center;
  margin: 24px 0 15px;
}
.executive-copy { min-width: 0; }
.executive-copy > h2 {
  max-width: 600px;
  margin: 0;
  color: #fff;
  font: 500 clamp(24px, 2.5vw, 36px)/1.45 Georgia, "Songti SC", serif;
  letter-spacing: -.025em;
}
.executive-copy > p {
  max-width: 560px;
  margin: 12px 0 0;
  color: #b8cfcd;
  font-size: 11px;
  line-height: 1.8;
}
.executive-count {
  width: max-content;
  margin-top: 19px;
  padding: 0;
  border: 0;
}
.executive-alert {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
  border-radius: 3px;
  font-size: 22px;
}
.executive-count strong { font-size: 13px; }
.executive-count strong b { font-size: 35px; }
.executive-focus { gap: 7px; }
.risk-chart-row {
  padding: 8px 10px 7px;
  border-radius: 2px;
  background: rgba(255,255,255,.065);
}
.risk-chart-track { height: 6px; }
.summary-foot { margin-top: auto; }

.risk-grid {
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(35, 62, 59, .04);
}
.risk-card { min-height: 124px; padding: 20px 22px; background: rgba(255,255,255,.92); }
.risk-card strong { margin: 9px 0 5px; font-size: 31px; }

.content-grid { grid-template-columns: .68fr 1.32fr; gap: 14px; margin-top: 14px; }
.panel {
  padding: 24px;
  border-radius: 3px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 8px 28px rgba(37, 65, 61, .035);
}
.panel-heading h2 { font: 600 19px Georgia, "Songti SC", serif; }
.category-code { border-radius: 2px; background: #153f42; }
.category-row h3 { font-size: 15px; }
.category-row p { font-size: 11px; line-height: 1.5; }
.category-row > strong { font-size: 22px; }
.priority-row { padding: 14px 0; }
.priority-rank { font-size: 15px; }
.priority-name strong { font-size: 14px; line-height: 1.45; }
.priority-name small { margin-top: 6px; font-size: 11px; line-height: 1.45; }
.progress-meta { font-size: 10px; }
.priority-row .status { font-size: 10px; }
.progress i { background: linear-gradient(90deg, #176e67, #69b9aa); }

.diagnosis-section,
.matrix-section { margin-top: 46px; }
.section-title h2 { font-weight: 600; }
.diagnosis-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.diagnosis-card {
  min-height: 610px;
  padding: 28px 30px 26px;
  border-radius: 3px;
  box-shadow: 0 8px 26px rgba(37, 65, 61, .035);
}
.diagnosis-card h3 {
  margin: 20px 0 20px;
  font: 600 22px/1.4 Georgia, "Songti SC", serif;
}
.diagnosis-block { margin-top: 17px; }
.diagnosis-block small {
  display: block;
  margin-bottom: 8px;
  color: #28766c;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
}
.diagnosis-block p {
  margin: 0;
  color: #536c6d;
  font-size: 13px;
  line-height: 1.8;
}
.diagnosis-card .evidence { margin: 0; }
.diagnosis-card .hypothesis {
  padding: 15px 17px;
  border-left: 3px solid #6ab3a5;
  background: #f2f7f4;
}
.diagnosis-card .hypothesis p { color: #254c4c; }
.diagnosis-card .actions {
  padding-top: 18px;
  border-top: 1px solid #e4ebe7;
}
.diagnosis-card .actions ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: action-step;
}
.diagnosis-card .actions li {
  position: relative;
  min-height: 31px;
  padding: 0 0 13px 37px;
  color: #233f43;
  font-size: 13px;
  line-height: 1.75;
  counter-increment: action-step;
}
.diagnosis-card .actions li::before {
  content: counter(action-step);
  position: absolute;
  top: 1px;
  left: 0;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #173f42;
  color: #fff;
  font: italic 12px Georgia, serif;
}
.diagnosis-card .verification {
  padding: 15px 17px;
  border: 1px solid #dce8e3;
  background: #fbfcfa;
}
.diagnosis-card .owner {
  margin-top: 19px;
  padding-top: 15px;
  border-top: 1px solid #e5ebe7;
  font-size: 11px;
  line-height: 1.6;
}
.table-wrap { border-radius: 3px; box-shadow: 0 8px 26px rgba(37, 65, 61, .035); }
th { background: #e4ece9; color: #45625f; }
.matrix-section table { min-width: 1180px; }
.matrix-section th {
  padding: 15px 13px;
  font-size: 13px;
  line-height: 1.45;
}
.matrix-section td { padding: 16px 13px; }
.matrix-section td,
.matrix-section td.metric-name,
.matrix-section .business-pillar,
.matrix-section .value-main {
  font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  font-style: normal;
  line-height: 1.55;
}
.matrix-section .value-figure {
  font: italic 14px/1.55 Georgia, serif;
  font-weight: 400;
}
.matrix-section .sub-meta { font-size: 11px; line-height: 1.45; }
.matrix-section .status { font-size: 11px; }
.business-pillar {
  min-width: 132px;
  color: #274d50;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
}
tr:hover td { background: #fbfcfa; }
.filters button { border-radius: 2px; font-size: 11px; }
.status-rule-note {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid #dce7e2;
  border-radius: 3px;
  background: #f8fbf8;
}
.status-rule-note strong { margin-right: 10px; color: var(--sea); font-size: 12px; }
.status-rule-note span { color: #778681; font-size: 11px; line-height: 1.6; }
.status-rule-note em { flex: 0 0 auto; color: #52716c; font-size: 11px; font-style: normal; font-weight: 700; }
.status-cell { min-width: 132px; }
.status-cell .status { margin-bottom: 6px; }
.status-editor {
  display: block;
  width: 100%;
  max-width: 126px;
  padding: 6px 23px 6px 7px;
  border: 1px solid #d6ded9;
  border-radius: 2px;
  background: #fff;
  color: #526965;
  font-size: 11px;
  cursor: pointer;
}
.status-editor:disabled { cursor: not-allowed; opacity: .55; }
.status-source { display: block; margin-top: 5px; color: #8b9995; font-size: 11px; }
.status-source.manual { color: #9a6423; font-weight: 700; }
.status-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  max-width: 320px;
  padding: 12px 16px;
  border-radius: 3px;
  background: #123f42;
  color: #fff;
  box-shadow: 0 12px 35px rgba(18,63,66,.25);
  font-size: 10px;
}
.status-toast.error { background: #a64036; }
.status-toast[hidden] { display: none; }

@media (max-width: 1100px) {
  .sidebar { width: 78px; padding: 22px 12px; }
  .brand { min-height: 60px; padding: 10px 0 22px; }
  .brand-wordmark { width: 58px; }
  .sidebar nav a { display: grid; place-items: center; padding: 13px 8px; }
  .sidebar nav a i { margin: 0; }
  .sidebar nav a:not(.active) { font-size: 0; }
  main { margin-left: 78px; }
  .executive-summary-body { grid-template-columns: 1fr; gap: 20px; }
  .executive-count { padding-bottom: 0; border-bottom: 0; }
  .content-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .sidebar {
    position: sticky;
    inset: 0 auto auto 0;
    width: 100%;
    height: 62px;
    overflow: visible;
    padding: 9px 14px;
  }
  .brand { width: 88px; }
  .brand-wordmark { width: 78px; }
  .sidebar nav { margin-left: auto; }
  .sidebar nav a { display: grid; padding: 9px 10px; }
  .sidebar nav a::before { display: none; }
  main { margin-left: 0; padding: 0 16px 30px; }
  .page-header { min-height: 232px; }
  .page-header h1 br { display: initial; }
  .page-header h1 span { margin-left: 0; }
  .executive-card { min-height: 0; padding: 23px 21px; }
  .executive-copy > h2 { font-size: 25px; }
  .risk-grid { grid-template-columns: repeat(2, 1fr); }
  .risk-card { min-height: 110px; }
  .diagnosis-section,
  .matrix-section { margin-top: 38px; }
  .diagnosis-list { grid-template-columns: 1fr; }
  .diagnosis-card { min-height: 0; padding: 22px 20px; }
  .status-rule-note { align-items: flex-start; flex-direction: column; gap: 7px; }
}
