:root {
  --bg: #f4f7f6;
  --panel: #ffffff;
  --panel-border: #d8e3df;
  --text: #15211d;
  --muted: #63716d;
  --brand: #143b33;
  --brand-weak: #e2efeb;
  --accent: #0f766e;
  --warning: #a15c07;
  --danger: #b42318;
  --shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--brand);
  color: #ffffff;
  padding: 18px 14px;
  overflow: hidden;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--brand);
  background: #ffffff;
  font-weight: 800;
}

.brand-title {
  font-size: 16px;
  font-weight: 700;
}

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

.menu-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-gutter: stable;
  padding: 12px 0 32px;
}

.menu-list::-webkit-scrollbar {
  width: 8px;
}

.menu-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.menu-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.38);
  border-radius: 999px;
}

.menu-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.56);
}

.menu-group {
  margin-bottom: 6px;
}

.menu-title {
  width: 100%;
  padding: 10px 10px;
  border: 0;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.9);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.menu-title:hover,
.menu-title.active {
  background: rgba(255, 255, 255, 0.12);
}

.submenu {
  display: grid;
  gap: 4px;
  padding: 4px 0 6px 12px;
}

.submenu button {
  border: 0;
  border-radius: 6px;
  padding: 8px 10px;
  color: rgba(255, 255, 255, 0.78);
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-weight: 500;
}

.submenu button:hover,
.submenu button.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.main {
  min-width: 0;
  padding: 24px;
}

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

.topbar h1,
.section-head h2 {
  margin: 0;
}

.topbar h1 {
  font-size: 24px;
}

.topbar p {
  margin: 8px 0 0;
  color: var(--muted);
}

.topbar-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 10px;
}

.operator-context {
  display: grid;
  grid-template-columns: auto minmax(180px, 250px);
  align-items: center;
  gap: 4px 8px;
  color: var(--muted);
  font-size: 12px;
}

.operator-context select {
  min-height: 32px;
  padding: 5px 28px 5px 8px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  color: var(--text);
  background: var(--panel);
}

.operator-context small {
  grid-column: 1 / -1;
  max-width: 310px;
  color: var(--muted);
  line-height: 1.4;
}

.status-pill,
.page-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 13px;
  white-space: nowrap;
  color: var(--accent);
  background: #e6f4f1;
  border: 1px solid #b7d8d2;
}

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

.dashboard-grid.hidden-in-center {
  display: none;
}

.main.center-mode .topbar {
  margin-bottom: 12px;
}

.metric-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 14px;
  box-shadow: var(--shadow);
}

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

.metric-value {
  margin-top: 8px;
  font-size: 24px;
  font-weight: 800;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
  gap: 16px;
  align-items: start;
}

.page-panel,
.project-panel,
.modal-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.page-panel,
.project-panel {
  padding: 18px;
}

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

.section-head.compact {
  align-items: center;
}

.breadcrumb {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.info-grid h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.info-grid p,
.page-hint {
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

.page-hint {
  margin-top: 14px;
  padding: 12px;
  border-radius: 8px;
  background: #f7faf9;
  border: 1px solid var(--panel-border);
}

.project-detail-area {
  grid-column: 1 / -1;
  margin-top: 16px;
}

.detail-card {
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.workspace.center-mode {
  display: block;
}

.workspace.center-mode > .page-panel,
.workspace.center-mode > .project-panel {
  display: none;
}

.workspace.center-mode .project-detail-area {
  margin-top: 0;
}

.detail-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--panel-border);
  background: #f7faf9;
}

.detail-toolbar h3 {
  margin: 0;
  font-size: 17px;
}

.detail-toolbar label {
  display: grid;
  gap: 6px;
  min-width: 220px;
  color: var(--muted);
  font-size: 14px;
}

.detail-toolbar select {
  min-height: 36px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 7px 10px;
  color: var(--text);
  background: #ffffff;
}

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

.detail-meta span + span::before {
  content: "·";
  margin: 0 6px;
  color: #a0aca8;
}

.center-page {
  background: #ffffff;
}

.center-summary {
  padding: 24px;
  background: #f7faf9;
  border-bottom: 1px solid var(--panel-border);
}

.center-summary-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.center-kicker {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.center-summary h3 {
  margin: 8px 0 0;
  font-size: 26px;
}

.center-summary h3 span {
  display: inline-flex;
  margin-left: 8px;
  padding: 3px 8px;
  color: var(--accent);
  background: #e6f4f1;
  border: 1px solid #b7d8d2;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  vertical-align: middle;
}

.center-summary p {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.center-action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.center-action-row a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.standard-forms-panel {
  background: #fbfdfc;
}

.standard-forms-flow,
.signing-package-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: var(--panel-border);
}

.standard-forms-flow > div,
.signing-package-summary > div {
  display: grid;
  gap: 5px;
  min-height: 112px;
  padding: 15px;
  background: #ffffff;
}

.standard-forms-flow strong {
  color: var(--accent);
  font-size: 14px;
}

.standard-forms-flow span,
.signing-package-summary span {
  color: var(--text);
  font-weight: 700;
}

.standard-forms-flow small,
.signing-package-summary small,
.signing-package-table td small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.standard-forms-actions,
.signing-package-actions {
  justify-content: flex-start;
  margin-top: 14px;
}

.signing-package-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 14px;
}

.signing-package-summary strong {
  color: var(--accent);
  font-size: 20px;
}

.signing-package-form {
  display: grid;
  gap: 14px;
}

.signing-package-table table {
  min-width: 1100px;
}

.signing-package-table td {
  vertical-align: top;
}

.signing-package-table td strong,
.signing-package-table td small {
  display: block;
}

.signing-package-table .warning-text {
  color: #a85b10;
}

.signing-package-table .success-text {
  color: #0f766e;
}

.signing-package-table .button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  white-space: nowrap;
  margin-bottom: 8px;
  line-height: 1.2;
}

.signing-package-table input,
.signing-package-table select {
  min-width: 128px;
  margin: 0;
  padding: 7px 8px;
  font-size: 12px;
}

.contract-precheck-list {
  display: grid;
  gap: 12px;
}

.contract-precheck-item {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: #ffffff;
}

.contract-precheck-head {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) minmax(180px, auto);
  gap: 12px;
  align-items: center;
}

.contract-precheck-head > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--brand-weak);
  color: var(--accent);
  font-weight: 800;
}

.contract-precheck-head h4 {
  margin: 0 0 5px;
  color: var(--text);
  font-size: 17px;
}

.contract-precheck-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.contract-precheck-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.contract-precheck-status strong {
  padding: 6px 9px;
  border-radius: 6px;
  background: #edf3f1;
  color: var(--accent);
  font-size: 12px;
  white-space: nowrap;
}

.contract-precheck-body {
  display: grid;
  gap: 12px;
}

.contract-precheck-evidence-text {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  color: var(--muted);
  line-height: 1.55;
}

.contract-precheck-evidence-text strong {
  color: var(--text);
}

.contract-precheck-evidence-actions,
.contract-precheck-forms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.contract-precheck-evidence-actions > span {
  color: var(--muted);
  font-size: 13px;
}

.contract-precheck-form {
  display: grid;
  grid-template-columns: auto minmax(120px, 150px) minmax(120px, 160px) minmax(180px, 1fr) auto minmax(100px, auto);
  gap: 8px;
  align-items: center;
  width: 100%;
  padding-top: 10px;
  border-top: 1px solid #e5ebe8;
}

.contract-precheck-form strong {
  color: var(--text);
  white-space: nowrap;
}

.contract-precheck-form input,
.contract-precheck-form select {
  min-height: 34px;
  margin: 0;
  padding: 7px 9px;
  font-size: 13px;
}

.contract-precheck-form .detail-message {
  color: var(--muted);
  font-size: 12px;
}

.investment-version-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--panel-border);
}

.investment-version-selector {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.investment-version-selector select {
  min-height: 40px;
  color: var(--text);
  background: #ffffff;
}

.investment-version-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  overflow: hidden;
}

.investment-version-meta > div {
  display: grid;
  align-content: center;
  gap: 5px;
  min-height: 58px;
  padding: 9px 12px;
  background: #ffffff;
  border-right: 1px solid var(--panel-border);
}

.investment-version-meta > div:last-child {
  border-right: 0;
}

.investment-version-meta span {
  color: var(--muted);
  font-size: 12px;
}

.investment-version-meta strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
}

.historical-version-form {
  align-items: start;
}

.historical-version-form fieldset {
  display: contents;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.historical-version-form input:disabled,
.historical-version-form textarea:disabled {
  color: #5f716c;
  background: #f2f6f5;
  cursor: not-allowed;
}

.historical-version-form .center-callout {
  grid-column: 1 / -1;
  margin-top: 0;
}

.investment-source-prompt {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 11px 14px;
  border-left: 3px solid var(--accent);
  background: #f7faf9;
}

.investment-source-prompt.warning {
  border-left-color: var(--warning);
  background: #fff8ef;
}

.investment-source-prompt > div:first-child {
  display: grid;
  gap: 4px;
}

.investment-source-prompt strong {
  color: var(--text);
  font-size: 13px;
}

.investment-source-prompt small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.investment-source-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.investment-source-actions .ghost-button {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12px;
}

.button-link {
  align-items: center;
  justify-content: center;
}

.center-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-bottom: 1px solid var(--panel-border);
}

.center-metric {
  min-height: 112px;
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 18px;
  border-right: 1px solid var(--panel-border);
}

.center-metric:last-child {
  border-right: 0;
}

.center-metric span,
.center-metric small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.center-metric strong {
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.center-tab-nav {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 10px 24px;
  border-bottom: 1px solid var(--panel-border);
  background: #ffffff;
}

.center-tab-button {
  flex: 0 0 auto;
  border: 0;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
}

.center-tab-button:hover,
.center-tab-button.active {
  color: var(--accent);
  background: #e6f4f1;
}

.center-tab-button.active {
  font-weight: 700;
}

.center-tab-content {
  min-height: 360px;
}

.construction-basis-card,
.construction-stage-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: var(--panel-border);
}

.construction-basis-card {
  margin: 0 14px 14px;
}

.construction-basis-card > div,
.construction-stage-card {
  display: grid;
  gap: 6px;
  min-height: 106px;
  padding: 14px;
  background: #ffffff;
}

.construction-basis-card span,
.construction-stage-card span,
.construction-basis-card small,
.construction-stage-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.construction-basis-card strong,
.construction-stage-card strong {
  font-size: 15px;
  line-height: 1.45;
}

.construction-stage-grid {
  margin: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.construction-stage-card .construction-status {
  justify-self: start;
}

.construction-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  color: var(--muted);
  background: #f7faf9;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}

.construction-status.success {
  color: #116d5f;
  border-color: #abd9ce;
  background: #eaf6f2;
}

.construction-status.warning {
  color: #97600a;
  border-color: #eed7a6;
  background: #fff8e8;
}

.construction-status.danger {
  color: #a23232;
  border-color: #e5b7b7;
  background: #fff1f1;
}

.construction-progress-rule {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 14px 14px;
  padding: 12px 14px;
  border-left: 3px solid var(--accent);
  background: #f7faf9;
  color: var(--muted);
  line-height: 1.65;
}

.construction-progress-rule strong {
  flex: 0 0 auto;
  color: var(--text);
}

.construction-table td small,
.construction-table td strong + small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.construction-code-guide {
  margin: 0 14px 14px;
  padding: 10px 12px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: #fbfdfc;
}

.construction-code-guide summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 700;
}

.construction-code-guide p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.construction-request-mode {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: #f7faf9;
}

.construction-request-mode label {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 8px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  color: var(--text);
  background: #ffffff;
  cursor: pointer;
}

.construction-request-mode input {
  width: auto;
  min-height: 0;
  margin: 3px 0 0;
  padding: 0;
}

.construction-request-mode span {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.construction-request-mode label:has(input:checked) {
  border-color: #78c6b8;
  background: #edf8f5;
}

.construction-budget-control {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: var(--panel-border);
}

.construction-budget-control > div {
  display: grid;
  gap: 4px;
  min-height: 70px;
  padding: 10px 12px;
  background: #ffffff;
}

.construction-budget-control span,
.construction-budget-control strong {
  font-size: 12px;
  line-height: 1.45;
}

.construction-budget-control span,
.construction-subsection p,
.form-help {
  color: var(--muted);
}

.construction-budget-control strong {
  color: var(--text);
}

.construction-payment-detail-list {
  display: grid;
  gap: 12px;
}

.construction-payment-detail-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
  padding: 14px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: #fbfdfc;
}

.construction-payment-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  grid-column: 1 / -1;
  color: var(--text);
}

.construction-payment-detail-head .icon-button {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  color: var(--muted);
  background: #ffffff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.construction-payment-detail-head .icon-button:hover {
  color: #a23232;
  border-color: #e5b7b7;
  background: #fff6f6;
}

.construction-subsection {
  margin: 18px 14px 10px;
}

.construction-subsection h3,
.construction-subsection p {
  margin: 0;
}

.construction-subsection p {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.6;
}

.form-help {
  align-self: center;
  font-size: 12px;
  line-height: 1.55;
}

.construction-payment-view-tabs {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  margin-top: 16px;
  padding: 4px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: #f8fbfa;
}

.construction-payment-view-tabs button {
  min-height: 38px;
  padding: 8px 14px;
  border: 0;
  border-radius: 4px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
}

.construction-payment-view-tabs button:hover {
  color: var(--text);
  background: #edf5f3;
}

.construction-payment-view-tabs button.active {
  color: #087d70;
  background: #dff2ed;
  font-weight: 700;
}

.construction-payment-view-panel {
  margin-top: 12px;
}

.construction-role-hint,
.construction-detail-type-hint {
  margin: 10px 0;
  padding: 10px 12px;
  border-left: 3px solid #70b9aa;
  color: var(--muted);
  background: #f3f9f7;
  font-size: 13px;
  line-height: 1.6;
}

.construction-role-hint {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.construction-role-hint strong {
  flex: 0 0 auto;
  color: var(--text);
}

.construction-detail-type-hint {
  grid-column: 1 / -1;
}

.construction-detail-budget-summary {
  grid-column: 1 / -1;
  padding: 10px 12px;
  border: 1px solid #b9ded5;
  border-radius: 6px;
  color: var(--muted);
  background: #f3f9f7;
  font-size: 13px;
  line-height: 1.6;
}

.construction-payment-detail-row input[type="file"],
.construction-payment-view-panel input[type="file"] {
  padding: 8px;
  font-size: 13px;
}

.construction-payment-detail-row label small,
.construction-payment-view-panel label small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.construction-file-links {
  display: grid;
  gap: 5px;
  min-width: 170px;
}

.construction-file-links a {
  color: #087d70;
  text-decoration: underline;
  overflow-wrap: anywhere;
}

.construction-progress-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0 14px 14px;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: var(--panel-border);
}

.construction-progress-summary > div {
  display: grid;
  gap: 4px;
  min-height: 88px;
  padding: 12px 14px;
  background: #ffffff;
}

.construction-progress-summary span,
.construction-progress-summary small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.construction-progress-summary strong {
  color: var(--text);
  font-size: 20px;
}

.construction-progress-group-row td {
  padding: 10px 14px;
  color: var(--text);
  background: #f1f7f5;
}

.construction-progress-group-row strong {
  margin-right: 10px;
}

.construction-progress-group-row span {
  color: var(--muted);
  font-size: 12px;
}

.construction-evidence-button {
  min-width: 104px;
  padding: 7px 10px;
  white-space: nowrap;
}

.construction-stage-action-cell {
  min-width: 178px;
  white-space: nowrap;
}

.construction-stage-action-cell .secondary-button + .secondary-button {
  margin-left: 6px;
}

.construction-stage-action-panel {
  margin: 14px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: #fbfdfc;
}

.construction-stage-action-panel > .inline-form,
.construction-stage-action-panel > .table-wrap {
  margin: 14px;
}

.construction-delivery-asset-list {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
}

.construction-delivery-asset-list > legend,
.construction-delivery-asset-row > legend {
  padding: 0 4px;
  color: var(--text);
  font-weight: 700;
}

.construction-delivery-asset-list > small {
  color: var(--muted);
  line-height: 1.55;
}

.construction-delivery-asset-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
}

.construction-delivery-asset-row label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

.construction-delivery-asset-row .form-actions {
  align-self: end;
}

.construction-evidence-panel {
  margin: 14px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: #fbfdfc;
}

.construction-evidence-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--panel-border);
}

.construction-evidence-panel-head > div {
  display: grid;
  gap: 5px;
}

.construction-evidence-panel-head span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.construction-evidence-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px 0;
}

.construction-evidence-event-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.construction-evidence-event {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: #ffffff;
}

.construction-evidence-event-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.construction-evidence-event p,
.construction-evidence-event small {
  margin: 0;
}

.construction-evidence-event p {
  color: var(--text);
}

.construction-evidence-event small {
  color: var(--muted);
  line-height: 1.5;
}

.construction-evidence-event-action {
  margin-top: 2px;
}

.construction-evidence-file-link {
  display: inline-flex;
  width: fit-content;
  text-decoration: none;
}

@media (max-width: 760px) {
  .construction-request-mode,
  .construction-budget-control,
  .construction-payment-detail-row,
  .construction-progress-summary {
    grid-template-columns: 1fr;
  }

  .construction-request-mode span {
    grid-column: 1;
  }

  .construction-role-hint {
    display: grid;
  }
}

.construction-operation-form {
  margin-top: 8px;
  border-top: 1px solid var(--panel-border);
}

.center-section {
  padding: 24px;
  border-bottom: 1px solid var(--panel-border);
}

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

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

.center-section-head > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.center-section-head span {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  color: var(--accent);
  background: #e6f4f1;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
}

.center-section-head h4 {
  margin: 0;
  font-size: 17px;
}

.center-section-head p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.system-settings-summary {
  align-items: center;
}

.system-settings-summary h3 {
  margin: 4px 0 8px;
  font-size: 24px;
}

.system-settings-summary p {
  max-width: 680px;
}

.system-operator-card {
  display: grid;
  min-width: 220px;
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: #f7fbfa;
}

.system-operator-card span,
.system-operator-card small {
  color: var(--muted);
  font-size: 12px;
}

.system-operator-card strong {
  font-size: 16px;
}

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

.system-settings-form {
  display: grid;
  gap: 16px;
}

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

.system-form-grid label,
.system-textarea-label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.system-form-grid input,
.system-form-grid select,
.system-textarea-label textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  color: var(--text);
  background: #fff;
  font: inherit;
}

.system-textarea-label textarea {
  min-height: 92px;
  resize: vertical;
}

.system-form-block {
  display: grid;
  gap: 10px;
}

.system-form-block > strong {
  font-size: 14px;
}

.system-role-checklist {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  overflow: hidden;
}

.system-role-checklist label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 8px 10px;
  border-right: 1px solid var(--panel-border);
  border-bottom: 1px solid var(--panel-border);
  color: var(--text);
  font-size: 13px;
}

.system-role-checklist label:nth-child(3n) {
  border-right: 0;
}

.system-role-checklist label:nth-last-child(-n + 3) {
  border-bottom: 0;
}

.system-role-checklist small {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
}

.system-inline-tag {
  display: inline-flex;
  margin-left: 6px;
  padding: 2px 5px;
  border-radius: 4px;
  color: var(--accent);
  background: #e6f4f1;
  font-size: 11px;
  vertical-align: middle;
}

.system-empty-note {
  margin: 0;
  color: var(--muted);
}

.table-action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.system-user-add-row td {
  padding: 10px;
  text-align: center;
  background: #fbfdfd;
}

.system-user-add-button {
  width: 100%;
  min-height: 42px;
  border: 1px dashed #9ecfc5;
  border-radius: 6px;
  background: transparent;
  color: var(--accent);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.system-user-add-button:hover {
  background: #edf8f5;
}

.permission-user-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: stretch;
  padding: 14px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: #f7fbfa;
}

.permission-user-summary > div {
  display: grid;
  gap: 5px;
}

.permission-user-summary span,
.permission-user-summary small,
.permission-scope-section p,
.permission-template-section p {
  color: var(--muted);
  font-size: 13px;
}

.permission-user-summary strong {
  font-size: 16px;
}

.permission-user-summary .secondary-button {
  align-self: center;
}

.permission-scope-section,
.permission-template-section {
  display: grid;
  grid-template-columns: minmax(210px, 0.8fr) minmax(0, 2fr);
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
}

.permission-scope-section > div:first-child,
.permission-template-section > div:first-child {
  display: grid;
  align-content: start;
  gap: 5px;
}

.permission-scope-section p,
.permission-template-section p {
  margin: 0;
  line-height: 1.6;
}

.permission-scope-options {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-self: start;
}

.permission-scope-options label,
.permission-project-checklist label,
.business-permission-action-list label {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.permission-project-checklist {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  overflow: hidden;
}

.permission-project-checklist label {
  min-width: 0;
  padding: 11px 12px;
  border-right: 1px solid var(--panel-border);
}

.permission-project-checklist label:last-child {
  border-right: 0;
}

.permission-project-checklist span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.permission-project-checklist small {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.permission-template-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.permission-template-list button {
  min-height: 76px;
  display: grid;
  align-content: start;
  gap: 5px;
  text-align: left;
}

.permission-template-list small {
  color: var(--muted);
  white-space: normal;
  line-height: 1.45;
}

.business-permission-layout {
  display: grid;
  grid-template-columns: 190px 220px minmax(0, 1fr);
  min-height: 410px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  overflow: hidden;
}

.business-permission-nav {
  display: grid;
  align-content: start;
  border-right: 1px solid var(--panel-border);
  background: #f7fbfa;
}

.business-permission-nav > span {
  padding: 14px 14px 9px;
  color: var(--muted);
  font-size: 13px;
}

.business-permission-nav button {
  min-height: 43px;
  padding: 9px 14px;
  border: 0;
  border-top: 1px solid #e5efed;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.business-permission-nav button:hover,
.business-permission-nav button.active {
  background: #e5f4f1;
  color: var(--accent);
  font-weight: 700;
}

.permission-page-nav {
  background: #fcfdfd;
}

.business-permission-actions {
  min-width: 0;
  padding: 18px;
}

.business-permission-actions-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--panel-border);
}

.business-permission-actions-head span,
.business-permission-actions-head small {
  color: var(--muted);
  font-size: 13px;
}

.business-permission-actions-head h5 {
  margin: 4px 0 0;
  font-size: 18px;
}

.business-permission-object {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(0, 1.3fr);
  gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid var(--panel-border);
}

.business-permission-object:last-child {
  border-bottom: 0;
}

.business-permission-object p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.business-permission-action-list {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 10px 16px;
}

.system-form-block > p {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.responsibility-checklist {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.responsibility-checklist label:nth-child(3n) {
  border-right: 1px solid var(--panel-border);
}

.responsibility-checklist label:nth-child(2n) {
  border-right: 0;
}

.responsibility-checklist label:nth-last-child(-n + 3) {
  border-bottom: 1px solid var(--panel-border);
}

.responsibility-checklist label:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.table-wrap td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.workflow-project-selector {
  display: grid;
  grid-template-columns: minmax(260px, 420px) 1fr;
  align-items: end;
  gap: 18px;
  margin-bottom: 18px;
  padding: 14px 0 18px;
  border-bottom: 1px solid var(--panel-border);
}

.workflow-project-selector label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.workflow-project-selector select {
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  color: var(--text);
  background: #fff;
  font: inherit;
}

.workflow-project-selector p {
  max-width: 700px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.workflow-stage-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(210px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.workflow-stage-card {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 12px;
  min-width: 210px;
  min-height: 330px;
  padding: 15px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: #fff;
}

.workflow-stage-card-head {
  display: flex;
  align-items: center;
  gap: 9px;
}

.workflow-stage-card-head span {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 6px;
  color: var(--accent);
  background: #e7f4f1;
  font-size: 13px;
  font-weight: 700;
}

.workflow-stage-card h5 {
  margin: 0;
  font-size: 16px;
}

.workflow-stage-nodes {
  min-height: 66px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.workflow-assignment-summary {
  display: grid;
  gap: 9px;
  margin: 0;
}

.workflow-assignment-summary div {
  display: grid;
  gap: 3px;
}

.workflow-assignment-summary dt {
  color: var(--muted);
  font-size: 12px;
}

.workflow-assignment-summary dd {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
}

.workflow-assignment-modal-card {
  width: min(960px, 100%);
  max-height: min(820px, calc(100vh - 48px));
  overflow: auto;
}

.workflow-assignment-modal-content {
  padding-right: 4px;
}

.modal-card.system-user-modal-card {
  width: min(760px, calc(100vw - 48px));
  max-height: min(760px, calc(100vh - 48px));
  display: flex;
  flex-direction: column;
}

.system-user-modal-content {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.modal-card.system-permission-modal-card {
  width: min(1320px, calc(100vw - 48px));
  max-height: min(900px, calc(100vh - 48px));
  display: flex;
  flex-direction: column;
}

.system-permission-modal-content {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.system-permission-modal-content .form-actions {
  position: sticky;
  bottom: 0;
  z-index: 1;
  margin: 0 -4px;
  padding: 14px 4px 4px;
  background: var(--panel);
}

.workflow-modal-context {
  display: grid;
  gap: 5px;
  margin-bottom: 16px;
  padding: 13px 14px;
  border-left: 4px solid var(--accent);
  background: #f4faf8;
}

.workflow-modal-context strong {
  font-size: 16px;
}

.workflow-modal-context span,
.workflow-modal-context p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.modal-card.operation-workflow-modal-card {
  width: min(980px, calc(100vw - 48px));
  max-height: min(860px, calc(100vh - 48px));
  display: flex;
  flex-direction: column;
}

.operation-workflow-modal-content {
  min-height: 0;
  overflow: auto;
  padding: 4px 4px 8px;
}

.modal-context {
  display: grid;
  gap: 6px;
  margin: 0 0 16px;
  padding: 13px 14px;
  border-left: 4px solid var(--accent);
  background: #f4faf8;
}

.modal-context p,
.modal-context span {
  margin: 0;
  color: var(--muted);
}

.operation-timeline {
  display: grid;
  gap: 10px;
}

.operation-timeline article {
  display: grid;
  gap: 5px;
  padding: 13px 14px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: #fff;
}

.operation-timeline article span,
.operation-timeline article p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 720px) {
  .modal-card.operation-workflow-modal-card {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
  }
}

.workflow-primary-hint {
  display: grid;
  align-content: end;
  gap: 7px;
  min-height: 67px;
  padding: 9px 10px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: #f7fbfa;
}

.workflow-primary-hint span {
  color: var(--muted);
  font-size: 12px;
}

.workflow-primary-hint strong {
  font-size: 14px;
  line-height: 1.5;
}

.workflow-candidate-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  overflow: hidden;
}

.workflow-candidate-list label {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 7px 8px;
  min-height: 62px;
  padding: 10px;
  border-right: 1px solid var(--panel-border);
  border-bottom: 1px solid var(--panel-border);
}

.workflow-candidate-list label:nth-child(2n) {
  border-right: 0;
}

.workflow-candidate-list label:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.workflow-candidate-list input {
  margin: 3px 0 0;
}

.workflow-candidate-list span {
  color: var(--text);
  font-size: 14px;
}

.workflow-candidate-list small {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.system-settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 4px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--panel-border);
}

.system-settings-tab {
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.system-settings-tab:hover,
.system-settings-tab.active {
  border-color: #b8dfd8;
  color: var(--accent);
  background: #eaf6f3;
}

.workflow-stage-lanes {
  display: grid;
  gap: 22px;
}

.workflow-stage-lane {
  display: grid;
  gap: 12px;
}

.workflow-stage-lane-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--panel-border);
}

.workflow-stage-lane-head > span {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 6px;
  color: var(--accent);
  background: #e7f4f1;
  font-size: 13px;
  font-weight: 700;
}

.workflow-stage-lane-head h5,
.workflow-stage-lane-head p {
  margin: 0;
}

.workflow-stage-lane-head h5 {
  color: var(--text);
  font-size: 16px;
}

.workflow-stage-lane-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.workflow-node-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.workflow-node-card {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 10px;
  min-height: 214px;
  padding: 14px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: #fff;
}

.workflow-node-card-top {
  display: grid;
  gap: 4px;
}

.workflow-node-card-top span {
  color: var(--muted);
  font-size: 12px;
}

.workflow-node-card-top strong {
  color: var(--text);
  font-size: 16px;
}

.workflow-node-card > p {
  min-height: 40px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.workflow-node-roles {
  display: grid;
  gap: 5px;
  padding-top: 9px;
  border-top: 1px solid var(--panel-border);
}

.workflow-node-roles span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.workflow-node-roles small {
  min-height: 34px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.workflow-node-role-list {
  display: grid;
  gap: 14px;
}

.workflow-role-slot-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: #fff;
}

.workflow-role-slot-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.workflow-role-slot-head h4,
.workflow-role-slot-head p {
  margin: 0;
}

.workflow-role-slot-head h4 {
  color: var(--text);
  font-size: 15px;
}

.workflow-role-slot-head p,
.workflow-role-slot-head > span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.required-mark,
.optional-mark {
  display: inline-block;
  margin-left: 5px;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 400;
}

.required-mark {
  color: #986200;
  background: #fff4dc;
}

.optional-mark {
  color: var(--muted);
  background: #f1f5f4;
}

.workflow-role-slot-card .workflow-candidate-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.workflow-role-slot-card .workflow-candidate-list > p {
  grid-column: 1 / -1;
  margin: 0;
  padding: 9px 10px;
  color: var(--muted);
  background: #f7fbfa;
  font-size: 12px;
}

.workflow-role-slot-card .workflow-candidate-list label {
  min-height: 58px;
}

.system-maintenance-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  overflow: hidden;
}

.system-maintenance-grid > div {
  display: grid;
  gap: 7px;
  min-height: 90px;
  padding: 14px;
  border-right: 1px solid var(--panel-border);
}

.system-maintenance-grid > div:last-child {
  border-right: 0;
}

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

.system-maintenance-grid strong {
  font-size: 20px;
}

.initiation-workflow-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -2px 0 16px;
}

.project-stage-flow {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-top: 20px;
}

.project-stage {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
}

.project-stage span {
  display: grid;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--panel-border);
  border-radius: 50%;
  background: #ffffff;
  font-size: 12px;
}

.project-stage strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-stage.done,
.project-stage.current {
  color: var(--text);
}

.project-stage.done span {
  color: #ffffff;
  background: var(--accent);
  border-color: var(--accent);
}

.project-stage.current span {
  color: var(--accent);
  background: #e6f4f1;
  border-color: var(--accent);
}

.stage-evidence-panel {
  margin-bottom: 16px;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.stage-evidence-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--panel-border);
}

.stage-evidence-head span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.stage-evidence-head h4 {
  margin: 4px 0 0;
  font-size: 18px;
}

.stage-evidence-head p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.stage-evidence-list {
  display: grid;
}

.stage-evidence-row {
  display: grid;
  grid-template-columns: 70px 180px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--panel-border);
}

.stage-evidence-row:last-child {
  border-bottom: 0;
}

.stage-evidence-row > span {
  width: fit-content;
  padding: 3px 7px;
  border-radius: 4px;
  background: #f2f5f4;
  color: var(--muted);
  font-size: 12px;
}

.stage-evidence-row.met > span {
  background: #e6f4f1;
  color: var(--accent);
}

.stage-evidence-row strong {
  font-size: 14px;
}

.stage-evidence-row p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.stage-evidence-warning,
.stage-evidence-next {
  padding: 12px 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.stage-evidence-warning {
  border-top: 1px solid #f4d8ad;
  background: #fff8ef;
  color: #8a5700;
}

.stage-evidence-next {
  border-top: 1px solid var(--panel-border);
  background: #f7fbfa;
}

.stage-evidence-warning strong,
.stage-evidence-next strong {
  color: var(--text);
}

.constraint-grid,
.energy-flow-grid,
.risk-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  overflow: hidden;
}

.constraint-grid > div,
.energy-flow-grid > div {
  display: grid;
  align-content: start;
  min-height: 118px;
  gap: 7px;
  padding: 16px;
  border-right: 1px solid var(--panel-border);
}

.constraint-grid > div:last-child,
.energy-flow-grid > div:last-child {
  border-right: 0;
}

.constraint-grid span,
.energy-flow-grid span,
.risk-summary-grid span {
  color: var(--muted);
  font-size: 13px;
}

.constraint-grid strong,
.energy-flow-grid strong,
.risk-summary-grid strong {
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.constraint-grid small,
.energy-flow-grid small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.center-callout {
  margin-top: 16px;
  padding: 12px 14px;
  border-left: 3px solid var(--accent);
  color: var(--muted);
  background: #f7faf9;
  line-height: 1.7;
}

.center-callout.warning {
  border-left-color: var(--warning);
  background: #fff8ef;
}

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

.collection-mode-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: #fff;
}

.collection-mode-card.selected {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.collection-mode-card-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.collection-mode-card-title strong {
  color: var(--heading);
  font-size: 16px;
}

.collection-mode-card-title p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.collection-mode-card-title button {
  flex: 0 0 auto;
}

.collection-mode-topology {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #cfe1dc;
  border-radius: 8px;
  background: #fbfdfc;
}

.collection-mode-topology-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.collection-mode-topology-head strong {
  color: var(--heading);
  font-size: 16px;
}

.collection-mode-topology-head p {
  max-width: 760px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.collection-mode-topology-head > span {
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid #b8ddd4;
  border-radius: 999px;
  color: var(--accent);
  font-size: 12px;
  background: #eef8f5;
}

.collection-topology-diagram {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #dce8e4;
  background: #f5f9f8;
}

.topology-group {
  display: grid;
  gap: 10px;
}

.topology-group-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.topology-energy-flow,
.topology-grid-flow {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 7px;
}

.topology-node {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 104px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid #cfe1dc;
  background: #fff;
  color: var(--heading);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.topology-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.topology-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.topology-legend-line {
  display: inline-block;
  width: 30px;
  border-top: 2px solid #2a79a8;
}

.topology-legend-line.data {
  border-top-color: #148576;
  border-top-style: dashed;
}

.topology-legend-chip {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 1px solid #148576;
  background: #e8f6f2;
}

.topology-device {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px 8px;
  align-content: center;
  min-width: 144px;
  min-height: 88px;
  padding: 12px;
  border: 1px solid #b9d8d0;
  border-radius: 6px;
  background: #fff;
  color: var(--heading);
  text-align: left;
}

button.topology-device {
  cursor: pointer;
  font: inherit;
}

.topology-device.passive {
  border-color: #d6e0dd;
  background: #f8fbfa;
}

.topology-device.actionable {
  border-color: #6ab9aa;
  background: #eff9f6;
  box-shadow: inset 0 0 0 1px rgba(20, 133, 118, 0.08);
}

.topology-device.actionable:hover,
.topology-device.actionable:focus-visible {
  border-color: var(--accent);
  outline: 2px solid rgba(20, 133, 118, 0.18);
  outline-offset: 2px;
}

.topology-device-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  grid-row: span 2;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #e1f2ee;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.topology-device-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.topology-device-copy strong {
  font-size: 13px;
  line-height: 1.35;
}

.topology-device-copy small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.topology-device-status,
.topology-device-action {
  grid-column: 1 / -1;
  color: #6d7f7b;
  font-size: 11px;
  line-height: 1.3;
}

.topology-device.actionable .topology-device-status,
.topology-device-action {
  color: var(--accent);
  font-weight: 700;
}

.topology-device-action {
  text-align: right;
}

.topology-device-flow {
  align-items: stretch;
}

.topology-energy-flow .topology-device {
  flex: 1 1 0;
}

.topology-grid-flow .topology-device {
  flex: 0 1 220px;
}

.topology-arrow.energy {
  color: #2a79a8;
}

.topology-arrow.data {
  color: #148576;
}

.topology-customer-meter {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.topology-customer-meter > span {
  max-width: 165px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.topology-energy-flow .topology-node {
  flex: 1 1 0;
}

.topology-node.grid {
  min-width: 154px;
  background: #f8fbff;
  border-color: #c9ddeb;
}

.topology-arrow,
.topology-data-arrow,
.topology-dashed-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 20px;
  color: var(--accent);
  font-size: 13px;
  line-height: 1;
}

.topology-arrow.bidirectional {
  color: #426a87;
}

.topology-flow-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.topology-control-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px;
  border: 1px dashed #9fc9c1;
  background: #fcfefd;
}

.topology-node.control {
  border-color: #9fc9c1;
  color: var(--accent);
}

.topology-dashed-arrow,
.topology-data-arrow {
  border-top: 1px dashed #7eaaa1;
  color: #5d817a;
  min-width: 58px;
  padding-top: 5px;
  font-size: 12px;
  text-align: center;
}

.topology-data-group {
  padding-top: 14px;
  border-top: 1px dashed #c7dad5;
}

.topology-data-flow .topology-device {
  min-width: 0;
}

.topology-data-flow {
  display: grid;
  grid-template-columns: minmax(260px, 1.45fr) auto minmax(148px, 0.8fr) auto minmax(148px, 0.85fr) auto minmax(126px, 0.72fr);
  align-items: center;
  gap: 9px;
}

.topology-data-sources {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.topology-node.data-source {
  min-width: 0;
  min-height: 38px;
  border-style: dashed;
  background: #fff;
  color: #426a87;
  font-size: 12px;
}

.topology-node.data-hub,
.topology-node.data-endpoint,
.topology-node.data-system {
  min-width: 0;
  background: #fff;
  border-color: #bed6d0;
  font-size: 12px;
}

.topology-node.data-system {
  color: var(--accent);
  font-weight: 700;
}

.collection-mode-requirements td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.collection-requirement-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.collection-requirement-task {
  border: 1px solid #d4e2de;
  border-radius: 7px;
  background: #fff;
  overflow: hidden;
}

.collection-requirement-task.derived {
  background: #f6fafc;
}

.collection-requirement-task-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border-bottom: 1px solid #e1ebe8;
}

.collection-requirement-task-head > div {
  display: grid;
  gap: 4px;
}

.collection-requirement-task-head strong {
  color: var(--heading);
  font-size: 16px;
}

.collection-requirement-task-head small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.collection-task-step {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.collection-requirement-task > p {
  margin: 0;
  padding: 14px 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.collection-source-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.collection-source-option {
  display: grid;
  gap: 12px;
  padding: 14px 16px 16px;
  border-right: 1px solid #e1ebe8;
}

.collection-source-option:last-child {
  border-right: 0;
}

.collection-source-option.preferred {
  background: #f4fbf9;
}

.collection-source-option > div:first-child {
  display: grid;
  gap: 4px;
}

.collection-source-option span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.collection-source-option strong {
  color: var(--heading);
  font-size: 14px;
}

.collection-source-option small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.collection-source-action {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
}

.collection-source-action small {
  max-width: 185px;
}

.pilot-task-guide {
  margin: 0 0 16px;
  border: 1px solid #b9ddd4;
  border-radius: 7px;
  background: #f5fbf9;
}

.pilot-task-guide-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid #d4e8e3;
}

.pilot-task-guide-head > div {
  display: grid;
  gap: 3px;
}

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

.pilot-task-guide-head strong {
  color: var(--heading);
  font-size: 17px;
}

.pilot-guide-rank {
  padding: 4px 8px;
  border: 1px solid #9ecfc4;
  border-radius: 999px;
  color: var(--accent) !important;
  background: #fff;
  font-weight: 700;
}

.pilot-task-guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid #d4e8e3;
}

.pilot-task-guide-grid > div {
  display: grid;
  gap: 5px;
  padding: 14px 16px;
  border-right: 1px solid #d4e8e3;
}

.pilot-task-guide-grid > div:last-child {
  border-right: 0;
}

.pilot-task-guide-grid span,
.pilot-task-guide-grid small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.pilot-task-guide-grid strong {
  color: var(--heading);
  font-size: 14px;
  line-height: 1.5;
}

.pilot-task-guide-checklist {
  padding: 14px 16px 10px;
}

.pilot-task-guide-checklist strong {
  color: var(--heading);
  font-size: 13px;
}

.pilot-task-guide-checklist ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 22px;
  margin: 8px 0 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.pilot-locked-value {
  display: grid;
  gap: 3px;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid #b9ddd4;
  border-radius: 6px;
  background: #eff9f6;
  color: var(--heading);
}

.pilot-locked-value small,
.pilot-field-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.pilot-preview-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 14px;
  padding: 14px;
  border: 1px solid #ccddea;
  border-radius: 7px;
  background: #f7fbff;
}

.pilot-preview-panel > div:first-child {
  display: grid;
  gap: 4px;
}

.pilot-preview-panel strong {
  color: var(--heading);
  font-size: 15px;
}

.pilot-preview-panel span,
.pilot-preview-panel small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.pilot-preview-panel .detail-message,
.pilot-preview-result {
  grid-column: 1 / -1;
}

.pilot-preview-result {
  min-width: 0;
}

.pilot-preview-summary,
.pilot-preview-empty {
  margin: 0 0 10px;
  color: #426a87;
  font-size: 12px;
  line-height: 1.55;
}

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

.pilot-preview-selectors label {
  display: grid;
  gap: 5px;
  color: var(--heading);
  font-size: 12px;
}

.pilot-preview-selectors select {
  min-width: 0;
  min-height: 40px;
  padding: 7px 9px;
  border: 1px solid #c9ddeb;
  border-radius: 5px;
  color: var(--heading);
  background: #fff;
}

.pilot-advanced-fields {
  padding: 12px;
  border: 1px dashed #b9d8d0;
  border-radius: 7px;
  background: #fbfdfc;
}

.pilot-advanced-fields summary {
  cursor: pointer;
  color: var(--heading);
  font-size: 13px;
}

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

.pilot-requirement-status {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 8px;
  border: 1px solid #d1dfdb;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
}

.pilot-requirement-status.ready {
  border-color: #9ed7ca;
  color: var(--accent);
  background: #eef8f5;
}

.pilot-requirement-status.pending {
  border-color: #ecd39a;
  color: #8a6500;
  background: #fff8e8;
}

.pilot-requirement-status.derived {
  border-color: #bfd2e5;
  color: #426a87;
  background: #f3f8fc;
}

.pilot-config-form {
  align-items: end;
}

.pilot-config-form .wide-field,
.pilot-config-form .form-actions {
  grid-column: 1 / -1;
}

.pilot-token-clear {
  display: flex !important;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  color: var(--muted);
}

.pilot-token-clear input {
  width: auto !important;
  min-height: auto !important;
}

.integration-pilot-modal-card {
  width: min(1220px, 100%);
  max-height: min(880px, calc(100vh - 48px));
  display: flex;
  flex-direction: column;
}

.integration-pilot-modal-content {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.integration-pilot-modal-content .center-callout {
  margin: 0 0 16px;
}

.pilot-config-section-title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding-top: 14px;
  border-top: 1px solid #dce8e4;
}

.pilot-config-section-title:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.pilot-config-section-title strong {
  color: var(--heading);
  font-size: 15px;
}

.pilot-config-section-title span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.integration-pilot-modal-content .pilot-config-form .form-actions {
  position: sticky;
  bottom: 0;
  z-index: 1;
  margin: 0 -4px;
  padding: 14px 4px 4px;
  border-top: 1px solid #dce8e4;
  background: #fff;
}

.pilot-control-grid,
.pilot-latest-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
}

.pilot-control-grid > div,
.pilot-latest-grid > div {
  display: grid;
  align-content: start;
  gap: 7px;
  min-height: 118px;
  padding: 16px;
  border-right: 1px solid var(--panel-border);
}

.pilot-control-grid > div:last-child,
.pilot-latest-grid > div:last-child {
  border-right: 0;
}

.pilot-control-grid span,
.pilot-control-grid small,
.pilot-latest-grid span,
.pilot-latest-grid small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.pilot-control-grid strong,
.pilot-latest-grid strong {
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.pilot-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.pilot-raw-payload summary {
  color: var(--accent);
  cursor: pointer;
}

.pilot-raw-payload p {
  min-width: 240px;
  margin: 10px 0;
  color: var(--muted);
  line-height: 1.6;
}

.pilot-raw-payload pre {
  width: min(640px, 70vw);
  max-height: 260px;
  margin: 0;
  padding: 10px;
  overflow: auto;
  border: 1px solid var(--panel-border);
  background: #f7faf9;
  color: var(--muted);
  font: 12px/1.55 Consolas, "Microsoft YaHei", monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

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

.risk-summary-grid > div {
  min-height: 132px;
  padding: 16px;
  border-right: 1px solid var(--panel-border);
}

.risk-summary-grid > div:last-child {
  border-right: 0;
}

.risk-summary-grid p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.project-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
}

.project-summary-grid > div {
  display: grid;
  align-content: start;
  min-height: 120px;
  gap: 7px;
  padding: 16px;
  border-right: 1px solid var(--panel-border);
}

.project-summary-grid > div:last-child {
  border-right: 0;
}

.project-summary-grid span,
.project-summary-grid small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.project-summary-grid strong {
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.center-section-subhead {
  margin: 22px 0 10px;
  font-size: 14px;
  font-weight: 700;
}

.center-inline-actions {
  display: flex;
  margin-top: 12px;
}

.analysis-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--panel-border);
  border-left: 1px solid var(--panel-border);
}

.analysis-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 12px 14px;
  border-right: 1px solid var(--panel-border);
  border-bottom: 1px solid var(--panel-border);
}

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

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

.analysis-row.emphasis {
  background: #eaf5f2;
}

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

.inline-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

.inline-form [hidden] {
  display: none !important;
}

.inline-form input,
.inline-form select,
.inline-form textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--text);
  background: #ffffff;
}

.inline-form textarea {
  min-height: 76px;
  resize: vertical;
}

.contract-file-actions {
  align-items: center;
  margin: 0 14px 8px;
}

.contract-file-actions small,
.contract-recognition-form small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.contract-recognition-form h5 {
  margin: 6px 0 0;
  color: var(--accent);
  font-size: 15px;
}

.contract-raw-text {
  margin: 14px;
  padding: 12px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: #f7faf9;
}

.contract-raw-text summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 700;
}

.contract-raw-text pre {
  max-height: 320px;
  margin: 12px 0 0;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--muted);
  font: 12px/1.6 Consolas, "Microsoft YaHei", monospace;
}

.inline-form input[readonly],
.inline-form textarea[readonly] {
  color: var(--text);
  background: #f7faf9;
  cursor: default;
}

.initiation-form {
  align-items: start;
  gap: 18px;
  padding: 16px;
}

.initiation-field {
  display: grid;
  align-content: start;
  gap: 9px;
  position: relative;
  min-height: 208px;
  padding: 14px 16px;
  border: 1px solid #d6e6e1;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdfc 100%);
  box-shadow: inset 3px 0 0 #e1f1ed;
}

.initiation-field > span {
  color: #31554b;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.initiation-field small {
  min-height: 17px;
  color: #758681;
  font-size: 11px;
  line-height: 1.55;
}

.initiation-field input,
.initiation-field textarea {
  border-color: #d7e5e1;
  background: #fbfdfc;
}

.initiation-field input:focus,
.initiation-field textarea:focus {
  border-color: #8cc6bc;
  outline: 2px solid #e3f4ef;
  outline-offset: 1px;
}

.field-attachment-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 26px;
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px solid #e4efec;
}

.field-attachment-summary {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.field-attachment-summary > span {
  color: #6d7e79;
  font-size: 11px;
  line-height: 1.45;
}

.field-attachment-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.field-workflow-pill {
  justify-self: start;
  border: 1px solid #c6d8d3;
  border-radius: 999px;
  padding: 2px 7px;
  color: #50615d;
  background: #f7faf9;
  font-size: 11px;
  line-height: 1.4;
}

.field-workflow-pill.confirm {
  border-color: #e3b574;
  color: #9a5a00;
  background: #fff8eb;
}

.field-workflow-pill.review {
  border-color: #8cc6bc;
  color: var(--accent);
  background: #edf9f5;
}

.field-workflow-pill.rejected {
  border-color: #f0aaa3;
  color: #a9362a;
  background: #fff3f2;
}

.field-workflow-pill.approved {
  border-color: #72b7a7;
  color: #0b7f70;
  background: #edf9f5;
}

.field-entry-guidance {
  display: block;
  margin-top: 1px;
  padding: 8px 10px 8px 12px;
  border-left: 3px solid #c5e2dc;
  border-radius: 6px;
  background: #f4faf8;
}

.field-entry-guidance small {
  display: block;
  color: #60736d;
  line-height: 1.6;
}

.field-entry-guidance summary {
  cursor: pointer;
  color: #31554b;
  font-size: 12px;
  font-weight: 700;
}

.field-entry-guidance[open] summary {
  margin-bottom: 6px;
}

.initiation-field.is-narrative {
  min-height: 242px;
}

.initiation-field.is-reference {
  min-height: 176px;
  border-style: dashed;
  box-shadow: inset 3px 0 0 #edf4f2;
}

.field-reference-status,
.field-data-relation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 30px;
  padding-top: 10px;
  border-top: 1px solid #e4efec;
}

.field-reference-status > div,
.field-data-relation > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.field-reference-status span,
.field-data-relation span {
  color: #60736d;
  font-size: 12px;
  line-height: 1.5;
}

.field-reference-note,
.field-data-relation > small {
  color: #758681;
  font-size: 11px;
  line-height: 1.55;
}

.field-data-relation {
  align-items: flex-start;
  flex-wrap: wrap;
  padding: 9px 10px;
  border: 1px solid #dbece7;
  border-radius: 6px;
  background: #f7fbfa;
}

.field-data-relation strong {
  color: #31554b;
  font-size: 12px;
}

.field-data-relation > small {
  flex-basis: 100%;
}

.field-entry-guidance strong {
  color: #31554b;
  font-weight: 700;
}

.field-upload-button {
  flex: 0 0 auto;
  min-height: 28px;
  border: 1px solid #9ccfc4;
  border-radius: 6px;
  padding: 4px 8px;
  color: var(--accent);
  background: #edf9f5;
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
}

.field-upload-button:hover {
  background: #e1f3ee;
}

.field-view-button {
  min-height: 28px;
  border: 1px solid #c6d8d3;
  border-radius: 6px;
  padding: 4px 8px;
  color: #31554b;
  background: #ffffff;
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
}

.field-view-button:hover {
  border-color: #78b5a7;
  background: #f2faf7;
}

.field-view-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.initiation-change-reason {
  padding-top: 4px;
}

.upload-field-context {
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  color: var(--muted);
  background: #f3faf8;
  font-size: 13px;
  line-height: 1.65;
}

.field-edit-panel {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid #d6e6e1;
  border-radius: 8px;
  background: #fbfdfc;
}

.field-edit-current,
.field-edit-files {
  display: grid;
  gap: 10px;
}

.field-edit-heading,
.field-edit-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.field-edit-heading strong,
.field-edit-subhead strong {
  color: #31554b;
  font-size: 14px;
}

.field-edit-heading span,
.field-edit-subhead span {
  color: #758681;
  font-size: 12px;
  line-height: 1.5;
}

.field-edit-value,
.field-edit-reason {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.field-edit-value input,
.field-edit-value textarea,
.field-edit-reason input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--text);
  background: #ffffff;
}

.field-edit-value textarea {
  min-height: 86px;
  resize: vertical;
}

.field-edit-value small {
  color: #758681;
  line-height: 1.5;
}

.field-edit-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.field-edit-empty {
  padding: 10px 12px;
  border: 1px dashed #c7dcd6;
  border-radius: 6px;
  color: #6d7e79;
  background: #f7faf9;
  font-size: 13px;
  line-height: 1.6;
}

.field-edit-file-card {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #d9e7e3;
  border-radius: 8px;
  background: #ffffff;
}

.field-edit-file-preview {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  overflow: hidden;
  border: 1px solid #dde8e4;
  border-radius: 6px;
  background: #f7faf9;
}

.field-edit-file-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.field-edit-file-preview span {
  color: var(--accent);
  font-weight: 700;
  font-size: 12px;
}

.field-edit-file-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.field-edit-file-main strong {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
}

.field-edit-file-main small {
  color: #758681;
  font-size: 12px;
  line-height: 1.5;
}

.field-edit-file-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.compact-button {
  min-height: 28px;
  padding: 4px 8px;
  font-size: 12px;
}

.upload-mode-hint {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #b9dad2;
  border-radius: 6px;
  background: #f2faf7;
}

.upload-mode-hint strong {
  color: var(--accent);
}

.upload-mode-hint span,
.upload-field-picker small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.upload-field-picker {
  display: grid;
  gap: 8px;
}

.upload-field-picker > span {
  color: var(--muted);
  font-size: 14px;
}

.upload-field-picker select {
  min-height: 174px;
  padding: 6px;
}

.submission-attachment-summary {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid #c7ddd7;
  border-radius: 6px;
  background: #f7fbfa;
}

.submission-attachment-summary strong {
  color: #31554b;
  font-size: 13px;
}

.submission-attachment-summary > div {
  display: grid;
  gap: 6px;
}

.submission-attachment-summary a {
  overflow-wrap: anywhere;
  color: var(--accent);
  font-size: 12px;
  text-decoration: underline;
}

.hidden {
  display: none !important;
}

.data-access-panel {
  margin: 0 24px 24px;
  padding: 16px;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: #f7faf9;
}

.data-access-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.data-access-heading h5 {
  margin: 0;
  font-size: 15px;
}

.data-access-heading p {
  max-width: 640px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.data-access-heading > span {
  align-self: start;
  padding: 4px 8px;
  border: 1px solid #b7d8d2;
  border-radius: 6px;
  color: var(--accent);
  background: #e6f4f1;
  font-size: 12px;
  white-space: nowrap;
}

.data-access-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: #ffffff;
}

.data-access-grid > div {
  display: grid;
  gap: 6px;
  min-height: 104px;
  padding: 14px;
  border-right: 1px solid var(--panel-border);
}

.data-access-grid > div:last-child {
  border-right: 0;
}

.data-access-grid span,
.data-access-grid small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.data-access-grid strong {
  font-size: 15px;
}

.data-access-actions {
  display: flex;
  margin-top: 12px;
}

.data-access-form {
  display: grid;
  gap: 8px;
}

.data-access-config-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) minmax(150px, 0.8fr);
  gap: 12px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: #ffffff;
}

.data-access-config-row > div,
.data-access-config-row label {
  display: grid;
  gap: 5px;
}

.data-access-config-row small,
.data-access-config-row label {
  color: var(--muted);
  font-size: 12px;
}

.data-access-config-row select {
  min-height: 36px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 7px 9px;
  color: var(--text);
  background: #ffffff;
}

.empty-initiation-state {
  padding: 16px;
  border: 1px dashed #b7c9c4;
  border-radius: 8px;
  color: var(--muted);
  background: #f7faf9;
  line-height: 1.7;
}

.initiation-submission {
  padding: 16px;
  border: 1px solid #b7d8d2;
  border-radius: 8px;
  background: #fbfefd;
}

.initiation-submission + .initiation-submission {
  margin-top: 12px;
}

.submission-head,
.submission-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.submission-head > div {
  display: grid;
  gap: 4px;
}

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

.status-pill.small {
  padding: 3px 7px;
  font-size: 12px;
}

.submission-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.submission-fields label {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 10px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: #ffffff;
}

.submission-fields label > span {
  color: var(--muted);
  font-size: 12px;
}

.submission-fields label > strong {
  grid-column: 2 / 4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.submission-fields label > small {
  grid-column: 2 / 4;
  color: var(--muted);
  font-size: 11px;
}

.submission-actions input {
  flex: 1;
  min-width: 0;
  min-height: 36px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 8px 10px;
}

.submission-input {
  display: grid;
  flex: 1 1 220px;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.submission-input input {
  width: 100%;
}

.danger-button {
  border: 1px solid #b42318;
  border-radius: 6px;
  padding: 8px 12px;
  color: #ffffff;
  background: #b42318;
  cursor: pointer;
}

.danger-button:hover {
  background: #8f1d14;
}

.initiation-audit-cell {
  min-width: 118px;
}

.initiation-audit-cell strong,
.initiation-audit-cell small {
  display: block;
}

.initiation-audit-cell small,
.audit-pending {
  color: var(--muted);
  font-size: 12px;
}

.table-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

.table-link-button {
  border: 0;
  padding: 0;
  color: var(--accent);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.table-link-button:hover,
.table-link-button:focus-visible {
  text-decoration: underline;
}

.archive-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: #ffffff;
}

.archive-summary-grid > div {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 94px;
  padding: 14px 16px;
  border-right: 1px solid var(--panel-border);
}

.archive-summary-grid > div:last-child {
  border-right: 0;
}

.archive-summary-grid span,
.archive-summary-grid small,
.archive-file-count {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.archive-summary-grid strong {
  font-size: 18px;
}

.archive-file-count {
  display: block;
  margin-top: 4px;
}

.archive-current-value {
  min-width: 180px;
  max-width: 300px;
  overflow-wrap: anywhere;
}

.initiation-archive-history {
  display: grid;
  gap: 14px;
}

.archive-history-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: #f7faf9;
}

.archive-history-summary > div {
  display: grid;
  gap: 5px;
  min-height: 68px;
  padding: 12px 14px;
  border-right: 1px solid var(--panel-border);
  border-bottom: 1px solid var(--panel-border);
}

.archive-history-summary > div:nth-child(2n) {
  border-right: 0;
}

.archive-history-summary > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.archive-history-summary span,
.archive-history-event small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.archive-history-summary strong {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

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

.archive-history-event {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid #d6e6e1;
  border-radius: 8px;
  background: #ffffff;
}

.archive-history-event-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.archive-history-event-head strong {
  color: var(--accent);
  font-size: 13px;
}

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

.archive-history-event p {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 13px;
  line-height: 1.6;
}

.wide-field,
.inline-form .form-actions,
.result-grid,
.compact-table-wrap {
  grid-column: 1 / -1;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: #f7faf9;
}

.result-item {
  display: grid;
  gap: 4px;
}

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

.result-item strong {
  font-size: 18px;
}

.rule-check {
  margin: 14px;
  padding: 14px;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: #f7faf9;
}

.rule-check.ready {
  border-color: #8fd0be;
  background: #edf9f5;
}

.rule-check.blocked {
  border-color: #f0bf91;
  background: #fff8ef;
}

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

.rule-check-head span {
  color: var(--muted);
  font-size: 13px;
}

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

.rule-check h4 {
  margin: 0 0 8px;
  font-size: 14px;
}

.rule-check ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.compact-table-wrap {
  overflow-x: auto;
}

.compact-table {
  min-width: 520px;
  font-size: 14px;
}

.selected-row {
  background: #f0f7f5;
}

.table-button {
  min-height: 30px;
  border: 1px solid #b7d8d2;
  border-radius: 6px;
  padding: 4px 10px;
  color: var(--accent);
  background: #ffffff;
  cursor: pointer;
}

a.table-button {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.table-button:hover {
  background: #e6f4f1;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 11px 10px;
  border-bottom: 1px solid #e5ebe8;
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--brand-weak);
  font-weight: 700;
}

.primary-button,
.ghost-button {
  border: 0;
  border-radius: 6px;
  min-height: 36px;
  padding: 8px 14px;
  cursor: pointer;
}

.primary-button {
  background: var(--accent);
  color: #ffffff;
}

.ghost-button {
  background: #edf3f1;
  color: var(--text);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.38);
}

.modal.hidden {
  display: none;
}

.auth-modal {
  z-index: 2000;
}

.modal-card.auth-modal-card {
  width: min(460px, calc(100vw - 32px));
}

body.login-page {
  min-height: 100vh;
  background: #eef4f1;
}

.login-shell {
  width: min(980px, calc(100vw - 48px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(360px, 440px);
  align-items: center;
  gap: 64px;
}

.login-brand-area {
  padding: 36px 0;
}

.login-brand-area h1 {
  margin: 12px 0 12px;
  color: var(--brand);
  font-size: 32px;
  line-height: 1.25;
}

.login-positioning {
  margin: 22px 0 0;
  color: #397269;
  font-size: 15px;
  font-weight: 700;
}

.login-brand-summary {
  max-width: 390px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.login-value-list {
  display: grid;
  gap: 14px;
  max-width: 420px;
  padding: 0;
  margin: 32px 0 24px;
  list-style: none;
}

.login-value-list li {
  position: relative;
  padding-left: 18px;
}

.login-value-list li::before {
  position: absolute;
  top: 7px;
  left: 0;
  width: 7px;
  height: 7px;
  background: var(--brand-accent);
  border-radius: 50%;
  content: "";
}

.login-value-list strong,
.login-value-list span {
  display: block;
}

.login-value-list strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
}

.login-value-list span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.login-stage-line {
  color: #527d75;
  font-size: 14px;
  font-weight: 700;
}

.login-stage-line span {
  padding: 0 6px;
  color: #8aa7a1;
}

.login-panel {
  padding: 34px;
  background: #ffffff;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.login-panel .breadcrumb {
  margin-bottom: 14px;
}

.login-panel h2 {
  margin: 0;
  font-size: 24px;
}

.login-panel > p {
  margin: 10px 0 24px;
  color: var(--muted);
  line-height: 1.65;
}

.login-form {
  display: grid;
  gap: 18px;
}

.login-form label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-weight: 700;
}

.login-form input {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
}

.login-form input:focus {
  outline: 2px solid rgba(15, 118, 110, 0.22);
  border-color: var(--accent);
}

.login-form .primary-button {
  width: 100%;
  min-height: 44px;
  font-weight: 700;
}

.login-message {
  min-height: 22px;
  margin: 0;
  color: var(--danger);
  line-height: 1.5;
}

.login-account-hint {
  margin: -8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

@media (max-width: 720px) {
  .login-shell {
    width: min(100% - 32px, 460px);
    min-height: 100vh;
    grid-template-columns: 1fr;
    align-content: center;
    gap: 26px;
    padding: 28px 0;
  }

  .login-brand-area {
    padding: 0;
  }

  .login-brand-area h1 {
    margin-top: 16px;
    font-size: 26px;
  }

  .login-positioning {
    margin-top: 16px;
    font-size: 14px;
  }

  .login-value-list {
    gap: 12px;
    margin: 24px 0 20px;
  }

  .login-panel {
    padding: 22px;
  }
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(620px, 100%);
  padding: 18px;
}

.upload-modal-card {
  width: min(700px, 100%);
  max-height: min(820px, calc(100vh - 48px));
  overflow-x: hidden;
  overflow-y: auto;
}

.initiation-attachment-modal-card {
  width: min(1040px, 100%);
  max-height: min(860px, calc(100vh - 48px));
  display: flex;
  flex-direction: column;
}

.initiation-attachment-modal-content {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.construction-stage-action-modal-card {
  width: min(1120px, 100%);
  max-height: min(860px, calc(100vh - 48px));
  display: flex;
  flex-direction: column;
}

.construction-stage-action-modal-content {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.construction-stage-action-modal-content .construction-stage-action-panel {
  margin: 0;
  border: 0;
  background: transparent;
}

.construction-stage-action-modal-content .construction-stage-action-panel > .inline-form,
.construction-stage-action-modal-content .construction-stage-action-panel > .table-wrap {
  margin-left: 0;
  margin-right: 0;
}

.table-total-row td {
  border-top: 2px solid var(--accent);
  background: #f4fbf9;
  font-weight: 700;
}

.attachment-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding-left: 20px;
}

.attachment-list a {
  overflow-wrap: anywhere;
}

.construction-acceptance-requirements {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: #fbfdfc;
}

.construction-acceptance-requirements label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 6px 10px;
  margin: 0;
  color: var(--text);
}

.construction-acceptance-requirements small {
  grid-column: 2;
  color: var(--muted);
}

.initiation-attachment-list {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.initiation-attachment-card {
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: #ffffff;
}

.initiation-attachment-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--panel-border);
  background: #f5faf8;
}

.initiation-attachment-meta > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.initiation-attachment-meta strong {
  overflow-wrap: anywhere;
  color: var(--text);
}

.initiation-attachment-meta span,
.initiation-attachment-details span {
  color: var(--muted);
  font-size: 12px;
}

.initiation-attachment-details {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--panel-border);
}

.initiation-attachment-preview {
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: 14px;
  background: #fbfdfc;
}

.initiation-attachment-image-link {
  display: block;
  max-width: 100%;
}

.initiation-attachment-image-link img {
  display: block;
  max-width: 100%;
  max-height: 520px;
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  object-fit: contain;
}

.initiation-attachment-pdf {
  width: 100%;
  height: min(560px, 56vh);
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  background: #ffffff;
}

.initiation-attachment-no-preview {
  padding: 24px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.field-workflow-meta-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.field-workflow-proposal {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--panel-border);
}

.field-workflow-proposal > div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid #d7e5e1;
  border-radius: 6px;
  background: #f8fbfa;
}

.field-workflow-proposal span,
.field-workflow-result span {
  color: var(--muted);
  font-size: 12px;
}

.field-workflow-proposal strong {
  overflow-wrap: anywhere;
  color: var(--text);
}

.field-workflow-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(220px, 1.4fr) auto auto;
  align-items: end;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--panel-border);
  background: #f7fbfa;
}

.field-workflow-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.field-workflow-form input {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--text);
  background: #ffffff;
}

.field-workflow-result {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-top: 1px solid var(--panel-border);
  color: var(--muted);
  background: #f7fbfa;
}

.field-workflow-result strong {
  color: var(--text);
}

.field-workflow-result p {
  margin: 0;
  line-height: 1.6;
}

.field-workflow-result.approved strong {
  color: #0b7f70;
}

.field-workflow-result.rejected strong {
  color: #a9362a;
}

.upload-modal-card small {
  color: var(--muted);
  line-height: 1.6;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--text);
}

.form-grid textarea {
  min-height: 76px;
  resize: vertical;
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.form-message {
  color: var(--muted);
}

.money {
  font-variant-numeric: tabular-nums;
}

.overview-period-filter {
  padding: 20px 24px;
  border-bottom: 1px solid var(--panel-border);
  background: #ffffff;
}

.overview-period-heading,
.overview-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.overview-period-heading h3 {
  margin: 7px 0 0;
  font-size: 20px;
}

.overview-period-heading p,
.overview-section-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.overview-period-status {
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid #b7d8d2;
  border-radius: 6px;
  color: var(--accent);
  background: #e6f4f1;
  font-size: 13px;
}

.overview-period-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  margin-top: 16px;
}

.overview-period-options {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.overview-period-button {
  min-width: 42px;
  min-height: 36px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  color: var(--muted);
  background: #ffffff;
  cursor: pointer;
}

.overview-period-button:hover,
.overview-period-button.active {
  color: var(--accent);
  border-color: #8fd0be;
  background: #e6f4f1;
  font-weight: 700;
}

.overview-period-controls label {
  display: grid;
  gap: 5px;
  min-width: 136px;
  color: var(--muted);
  font-size: 12px;
}

.overview-period-controls input {
  min-height: 36px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 7px 9px;
  color: var(--text);
  background: #ffffff;
}

.overview-period-controls .hidden {
  display: none;
}

.overview-portfolio-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--panel-border);
  color: var(--muted);
  background: #f7faf9;
  font-size: 13px;
}

.overview-portfolio-strip strong {
  color: var(--text);
  font-size: 16px;
}

.overview-portfolio-strip span + span::before {
  content: "|";
  margin-right: 14px;
  color: #a0aca8;
}

.overview-summary-section {
  border-bottom: 1px solid var(--panel-border);
}

.overview-section-head {
  padding: 18px 24px 14px;
}

.overview-section-head > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.overview-section-head span {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 6px;
  color: var(--accent);
  background: #e6f4f1;
  font-size: 12px;
  font-weight: 800;
}

.overview-section-head h4 {
  margin: 0;
  font-size: 17px;
}

.overview-section-head p {
  max-width: 600px;
  margin: 0;
}

.overview-metrics .center-metric {
  min-height: 106px;
}

.overview-finance-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--panel-border);
}

.overview-finance-metrics .center-metric {
  min-height: 106px;
  border-bottom: 1px solid var(--panel-border);
}

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

  .sidebar {
    position: static;
    height: auto;
    max-height: 420px;
  }

  .workspace,
  .dashboard-grid,
  .overview-finance-metrics,
  .standard-forms-flow,
  .signing-package-summary,
  .inline-form,
  .construction-delivery-asset-row,
  .contract-precheck-head,
  .contract-precheck-evidence-text,
  .contract-precheck-form,
  .result-grid,
  .rule-check-grid,
  .risk-summary-grid,
  .analysis-grid {
    grid-template-columns: 1fr;
  }

  .center-summary,
  .center-section {
    padding: 16px;
  }

  .center-summary-head,
  .center-section-head,
  .overview-period-heading,
  .overview-section-head {
    flex-direction: column;
    gap: 12px;
  }

  .investment-version-control,
  .investment-version-meta {
    grid-template-columns: 1fr;
  }

  .investment-version-meta > div {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--panel-border);
  }

  .investment-version-meta > div:last-child {
    border-bottom: 0;
  }

  .investment-source-prompt {
    align-items: stretch;
    flex-direction: column;
  }

  .investment-source-actions {
    justify-content: flex-start;
  }

  .overview-period-filter,
  .overview-section-head {
    padding-right: 16px;
    padding-left: 16px;
  }

  .overview-portfolio-strip {
    padding: 12px 16px;
  }

  .overview-period-controls {
    align-items: stretch;
  }

  .overview-period-controls label,
  .overview-period-controls .primary-button {
    width: 100%;
  }

  .center-action-row {
    justify-content: flex-start;
  }

  .center-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .center-metric {
    min-height: 96px;
    padding: 14px;
    border-bottom: 1px solid var(--panel-border);
  }

  .center-metric:nth-child(2n) {
    border-right: 0;
  }

  .construction-basis-card,
  .construction-stage-grid {
    grid-template-columns: 1fr;
  }

  .construction-basis-card > div,
  .construction-stage-card {
    min-height: auto;
  }

  .construction-progress-rule {
    flex-direction: column;
  }

  .project-stage-flow {
    grid-template-columns: 1fr;
  }

  .stage-evidence-head {
    display: grid;
    gap: 8px;
  }

  .stage-evidence-row {
    grid-template-columns: 66px minmax(0, 1fr);
    gap: 6px 10px;
  }

  .stage-evidence-row p {
    grid-column: 2;
  }

  .constraint-grid,
  .energy-flow-grid,
  .collection-mode-grid,
  .pilot-control-grid,
  .pilot-latest-grid,
  .project-summary-grid,
  .archive-summary-grid,
  .data-access-grid,
  .submission-fields {
    grid-template-columns: 1fr;
  }

  .constraint-grid > div,
  .energy-flow-grid > div,
  .pilot-control-grid > div,
  .pilot-latest-grid > div,
  .project-summary-grid > div,
  .risk-summary-grid > div {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--panel-border);
  }

  .constraint-grid > div:last-child,
  .energy-flow-grid > div:last-child,
  .pilot-control-grid > div:last-child,
  .pilot-latest-grid > div:last-child,
  .project-summary-grid > div:last-child,
  .archive-summary-grid > div:last-child,
  .data-access-grid > div:last-child,
  .risk-summary-grid > div:last-child {
    border-bottom: 0;
  }

  .archive-summary-grid > div {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--panel-border);
  }

  .archive-history-summary {
    grid-template-columns: 1fr;
  }

  .archive-history-summary > div,
  .archive-history-summary > div:nth-child(2n),
  .archive-history-summary > div:nth-last-child(-n + 2) {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--panel-border);
  }

  .archive-history-summary > div:last-child {
    border-bottom: 0;
  }

  .data-access-grid > div {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--panel-border);
  }

  .data-access-panel {
    margin: 0 16px 16px;
  }

  .data-access-heading,
  .submission-head,
  .submission-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .initiation-workflow-actions .ghost-button,
  .submission-actions .primary-button,
  .submission-actions .danger-button {
    width: 100%;
  }

  .field-attachment-status {
    align-items: flex-start;
    flex-direction: column;
  }

  .field-reference-status,
  .field-data-relation {
    align-items: flex-start;
    flex-direction: column;
  }

  .field-attachment-actions {
    justify-content: flex-start;
  }

  .field-workflow-proposal,
  .field-workflow-form {
    grid-template-columns: 1fr;
  }

  .field-edit-heading,
  .field-edit-subhead,
  .field-edit-file-card,
  .field-edit-actions,
  .field-edit-file-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .field-edit-file-card {
    grid-template-columns: 1fr;
  }

  .initiation-attachment-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .initiation-attachment-pdf {
    height: 48vh;
  }

  .data-access-config-row {
    grid-template-columns: 1fr;
  }

  .center-tab-nav {
    padding: 10px 16px;
  }

  .collection-mode-topology-head,
  .topology-control-flow {
    align-items: stretch;
    flex-direction: column;
  }

  .topology-energy-flow,
  .topology-grid-flow {
    align-items: stretch;
    flex-direction: column;
  }

  .topology-energy-flow .topology-node,
  .topology-node.grid {
    min-width: 0;
  }

  .topology-arrow {
    min-height: 18px;
  }

  .topology-energy-flow .topology-arrow,
  .topology-grid-flow .topology-arrow {
    transform: rotate(90deg);
  }

  .topology-data-flow {
    grid-template-columns: 1fr;
  }

  .topology-data-arrow {
    justify-self: center;
    transform: rotate(90deg);
  }

  .topology-data-flow > .topology-arrow {
    justify-self: center;
    transform: rotate(90deg);
  }

  .topology-data-sources {
    grid-template-columns: 1fr;
  }

  .integration-pilot-modal-card {
    width: 100%;
    max-height: calc(100vh - 24px);
    padding: 14px;
  }

  .system-user-modal-card,
  .system-permission-modal-card {
    width: 100%;
    max-height: calc(100vh - 24px);
    padding: 14px;
  }

  .topology-device-flow,
  .topology-customer-meter,
  .collection-source-action {
    align-items: stretch;
    flex-direction: column;
  }

  .topology-energy-flow .topology-device,
  .topology-grid-flow .topology-device {
    flex: 0 0 auto;
    width: 100%;
  }

  .topology-customer-meter {
    justify-content: stretch;
  }

  .topology-customer-meter > span,
  .collection-source-action small {
    max-width: none;
  }

  .collection-source-options,
  .pilot-task-guide-grid,
  .pilot-task-guide-checklist ul,
  .pilot-preview-selectors,
  .pilot-advanced-grid {
    grid-template-columns: 1fr;
  }

  .collection-source-option,
  .pilot-task-guide-grid > div {
    border-right: 0;
    border-bottom: 1px solid #e1ebe8;
  }

  .collection-source-option:last-child,
  .pilot-task-guide-grid > div:last-child {
    border-bottom: 0;
  }

  .pilot-preview-panel {
    grid-template-columns: 1fr;
  }

  .topbar,
  .topbar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .operator-context {
    grid-template-columns: 1fr;
  }

  .operator-context small {
    grid-column: auto;
    max-width: none;
  }

  .system-settings-metrics,
  .system-maintenance-grid,
  .system-form-grid,
  .system-role-checklist {
    grid-template-columns: 1fr;
  }

  .system-role-checklist label,
  .system-role-checklist label:nth-child(3n) {
    border-right: 0;
    border-bottom: 1px solid var(--panel-border);
  }

  .system-role-checklist label:last-child {
    border-bottom: 0;
  }

  .system-maintenance-grid > div {
    border-right: 0;
    border-bottom: 1px solid var(--panel-border);
  }

.system-maintenance-grid > div:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 760px) {
  .system-settings-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .workflow-node-grid,
  .workflow-role-slot-card .workflow-candidate-list {
    grid-template-columns: 1fr;
  }

  .workflow-role-slot-card .workflow-candidate-list label {
    border-right: 0;
  }
}

@media (max-width: 860px) {
  .workflow-project-selector,
  .workflow-candidate-list,
  .permission-scope-section,
  .permission-template-section,
  .permission-user-summary {
    grid-template-columns: 1fr;
  }

  .permission-project-checklist,
  .permission-template-list {
    grid-template-columns: 1fr;
  }

  .permission-project-checklist label {
    border-right: 0;
    border-bottom: 1px solid var(--panel-border);
  }

  .permission-project-checklist label:last-child {
    border-bottom: 0;
  }

  .business-permission-layout {
    grid-template-columns: 1fr;
  }

  .business-permission-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-right: 0;
    border-bottom: 1px solid var(--panel-border);
  }

  .business-permission-nav > span {
    grid-column: 1 / -1;
  }

  .business-permission-object {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .workflow-stage-grid {
    grid-template-columns: repeat(5, minmax(230px, 1fr));
  }

  .responsibility-checklist {
    grid-template-columns: 1fr;
  }

  .responsibility-checklist label,
  .responsibility-checklist label:nth-child(3n),
  .responsibility-checklist label:nth-child(2n),
  .responsibility-checklist label:nth-last-child(-n + 3) {
    border-right: 0;
    border-bottom: 1px solid var(--panel-border);
  }

  .responsibility-checklist label:last-child {
    border-bottom: 0;
  }

  .workflow-candidate-list label,
  .workflow-candidate-list label:nth-child(2n) {
    border-right: 0;
    border-bottom: 1px solid var(--panel-border);
  }

  .workflow-candidate-list label:last-child {
    border-bottom: 0;
  }

  .workflow-assignment-modal-card {
    width: 100%;
    max-height: calc(100vh - 24px);
  }
}
