* {
  box-sizing: border-box;
}

/* Emission analysis dashboard polish */
.summary-header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.dashboard-kpi-card p {
  margin: 8px 0 0;
  color: #5b6b82;
  font-size: 13px;
  line-height: 1.45;
}

.dashboard-kpi-card.primary-summary p {
  color: rgba(255,255,255,0.82);
}

.dashboard-quality-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.dashboard-focus-card {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  padding: 16px;
  background: #f8fbff;
  border: 1px solid #d8e7f1;
  border-radius: 14px;
}

.dashboard-focus-card b {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
}

.dashboard-focus-card strong {
  display: block;
  margin-bottom: 8px;
  color: #123a56;
  font-size: 17px;
}

.dashboard-focus-card p {
  margin: 6px 0;
  color: #4f6275;
  line-height: 1.55;
}

.dashboard-focus-card span {
  color: #174f91;
  font-weight: 700;
}

@media (max-width: 1100px) {
  .dashboard-quality-three,
  .dashboard-reduction-focus {
    grid-template-columns: 1fr;
  }
}

/* Dashboard middle chart refinement */
.dashboard-analysis-grid {
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
}

.dashboard-analysis-grid .dashboard-panel {
  min-height: 340px;
}

.dashboard-analysis-grid .dashboard-chart-layout {
  display: grid;
  grid-template-columns: minmax(0, 250px) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.dashboard-analysis-grid .donut-chart {
  width: 100%;
  height: 260px;
  min-height: 260px;
  max-height: 260px;
  overflow: visible;
  display: grid;
  place-items: center;
  justify-self: start;
}

.dashboard-analysis-grid .donut-chart svg {
  width: 260px;
  height: 260px;
  max-width: 260px;
  display: block;
  overflow: visible;
}

.dashboard-analysis-grid #source-summary-list {
  gap: 7px;
}

.dashboard-analysis-grid .source-legend-item {
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 8px;
  padding: 8px 0;
}

.dashboard-analysis-grid .source-color-dot {
  width: 9px;
  height: 9px;
}

.dashboard-analysis-grid .source-legend-main strong,
.dashboard-analysis-grid .source-legend-main em,
.dashboard-analysis-grid .source-legend-item b {
  font-size: 12.5px;
}

.dashboard-analysis-grid .contribution-bar-row {
  grid-template-columns: 1fr;
  gap: 6px;
}

.dashboard-analysis-grid .contribution-bar-head {
  grid-column: auto;
}

.dashboard-analysis-grid .contribution-bar-head strong {
  font-size: 14.5px;
}

.dashboard-analysis-grid .contribution-bar-head em {
  color: #64748b;
  font-size: 12.5px;
  font-style: normal;
}

.dashboard-analysis-grid .contribution-bar-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 10px;
  align-items: center;
}

.dashboard-analysis-grid .contribution-bar-line span {
  min-width: 118px;
  color: #334155;
  font-size: 12.5px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.dashboard-analysis-grid .contribution-bar-track {
  height: 9px;
}

@media (max-width: 1180px) {
  .dashboard-analysis-grid,
  .dashboard-analysis-grid .dashboard-chart-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-analysis-grid .donut-chart {
    justify-self: center;
  }
}

/* Reduction assessment dashboard */
.scenario-page-subtitle {
  margin: -6px 0 14px;
  color: #5b6b82;
  font-size: 15px;
}

.reduction-workflow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid #d6e6f2;
  border-radius: 16px;
  background: #f7fbff;
}

.reduction-workflow span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #174f91;
  font-weight: 700;
}

.reduction-workflow span:not(:last-child)::after {
  content: "→";
  color: #6b93bd;
}

.reduction-dashboard-section {
  margin-bottom: 16px;
  padding: 18px;
  background: #fff;
  border: 1px solid #d9e7f3;
  border-radius: 16px;
  box-shadow: 0 10px 26px rgba(31, 69, 105, 0.07);
}

.section-title-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 14px;
}

.section-title-line h3 {
  margin: 0;
  color: #123a56;
  font-size: 21px;
}

.section-title-line span {
  color: #6b7c8f;
  font-size: 14px;
}

.reduction-kpi-grid,
.scenario-result-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.reduction-kpi-card {
  min-height: 126px;
  padding: 16px;
  background: linear-gradient(180deg, #ffffff, #f6faff);
  border: 1px solid #d8e7f1;
  border-radius: 16px;
}

.reduction-kpi-card.primary,
.reduction-kpi-card.reduction {
  color: #fff;
  background: linear-gradient(135deg, #2b65c8, #1f8dd6);
  border-color: transparent;
}

.reduction-kpi-card.scenario {
  background: #effaf1;
  border-color: #bfe8c8;
}

.reduction-kpi-card.baseline {
  background: #f7fafc;
}

.reduction-kpi-card span,
.reduction-kpi-card em,
.reduction-kpi-card p {
  display: block;
  color: #5b6b82;
}

.reduction-kpi-card.primary span,
.reduction-kpi-card.primary em,
.reduction-kpi-card.primary p,
.reduction-kpi-card.reduction span,
.reduction-kpi-card.reduction em,
.reduction-kpi-card.reduction p {
  color: rgba(255,255,255,0.84);
}

.reduction-kpi-card strong {
  display: block;
  margin: 10px 0 4px;
  color: #123a56;
  font-size: 30px;
  line-height: 1.15;
}

.reduction-kpi-card.primary strong,
.reduction-kpi-card.reduction strong {
  color: #fff;
}

.reduction-kpi-card p {
  margin: 8px 0 0;
  font-size: 13px;
}

.reduction-diagnosis-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 14px;
  margin-top: 14px;
}

.reduction-panel,
.scenario-measure-table,
.path-card {
  padding: 16px;
  background: #f8fbff;
  border: 1px solid #d8e7f1;
  border-radius: 14px;
}

.reduction-panel h4,
.scenario-measure-table h4 {
  margin: 0 0 12px;
  color: #123a56;
  font-size: 17px;
}

.reduction-rank-list {
  display: grid;
  gap: 10px;
}

.reduction-rank-row,
.scenario-measure-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #dce9f5;
  border-radius: 12px;
}

.reduction-rank-row b {
  color: #2f6bff;
}

.reduction-rank-row span,
.scenario-measure-row span {
  color: #243b53;
  font-weight: 700;
}

.reduction-rank-row strong,
.scenario-measure-row strong {
  color: #123a56;
}

.reduction-rank-row em,
.scenario-measure-row em {
  color: #5b6b82;
  font-style: normal;
}

.reduction-diagnosis-text strong {
  display: block;
  margin-bottom: 8px;
  color: #174f91;
  font-size: 17px;
}

.reduction-diagnosis-text p {
  margin: 8px 0;
  color: #4f6275;
  line-height: 1.6;
}

.measure-library-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.measure-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  min-height: 226px;
  background: #f7fbff;
  border: 1px solid #dce9f5;
  border-radius: 16px;
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}

.measure-card:hover {
  transform: translateY(-2px);
  border-color: #9ec4ee;
  box-shadow: 0 12px 24px rgba(31, 69, 105, 0.1);
}

.measure-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.measure-card h4 {
  margin: 4px 0 0;
  color: #123a56;
  font-size: 18px;
}

.measure-card span,
.measure-card p,
.measure-rate-row em {
  margin: 0;
  color: #5b6b82;
  font-size: 13px;
  line-height: 1.45;
}

.measure-card span {
  color: #2f6bff;
  font-weight: 700;
}

.measure-switch {
  position: relative;
  display: inline-flex;
  width: 46px;
  height: 26px;
  flex: 0 0 auto;
}

.measure-switch input {
  position: absolute;
  opacity: 0;
}

.measure-switch i {
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: #c9d8e6;
  cursor: pointer;
}

.measure-switch i::after {
  content: "";
  display: block;
  width: 20px;
  height: 20px;
  margin: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(31, 69, 105, .25);
  transition: transform .18s ease;
}

.measure-switch input:checked + i {
  background: #2563eb;
}

.measure-switch input:checked + i::after {
  transform: translateX(20px);
}

.measure-rate-row {
  display: grid;
  gap: 7px;
  margin-top: auto;
}

.measure-rate-row label {
  display: grid;
  gap: 6px;
  color: #40566f;
  font-weight: 700;
  font-size: 13px;
}

.measure-rate-row input {
  width: 100%;
}

.scenario-result-layout {
  display: grid;
  gap: 14px;
}

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

.path-card h4 {
  margin: 0 0 10px;
  color: #174f91;
  font-size: 18px;
}

.path-card p {
  margin: 8px 0;
  color: #4f6275;
  line-height: 1.55;
}

.path-card strong {
  color: #123a56;
}

@media (max-width: 1280px) {
  .measure-library-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .reduction-kpi-grid,
  .scenario-result-cards,
  .reduction-diagnosis-grid,
  .path-recommendation-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .measure-library-grid,
  .reduction-rank-row,
  .scenario-measure-row {
    grid-template-columns: 1fr;
  }
}

/* 临时测试标题字体是否被正确控制 */

.app-title,
.header-title,
.logo-title,
.platform-title {
    font-size: 40px !important;
    font-weight: 700 !important;
}

.sidebar .nav-item,
.sidebar .menu-item {
    font-size: 24px !important;
}

body {
  margin: 0;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  color: #1f2933;
  background: #f3f5f7;
}

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 20px;
}

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

.local-data-note {
  max-width: 680px;
  margin: 8px 0 0;
  color: #627d98;
  font-size: 12px;
  line-height: 1.5;
}

.mode-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.mode-toolbar .danger-button {
  width: auto;
}

.mode-label {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid #9bbbd4;
  border-radius: 4px;
  background: #e8f2f8;
  color: #245b7d;
  font-weight: 700;
}

.mode-demo .tool-only,
.mode-tool .demo-only {
  display: none;
}

.mode-entry {
  min-height: 100vh;
  padding: 48px 20px;
}

.mode-entry-panel {
  width: min(820px, 100%);
  margin: 8vh auto 0;
}

.mode-entry-panel > h1 {
  margin-bottom: 24px;
}

.mode-entry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.mode-entry-grid section {
  padding: 22px;
  border: 1px solid #d7dde5;
  border-radius: 8px;
  background: #fff;
}

.mode-entry-grid h2 {
  margin-bottom: 10px;
}

.mode-entry-grid p {
  min-height: 48px;
  color: #52606d;
  line-height: 1.55;
}

.mode-entry-grid a,
.mode-toolbar a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.privacy-note {
  margin-top: 18px;
  color: #627d98;
  font-size: 13px;
}

.project-overview {
  padding: 0;
}

.overview-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid #e3e7ec;
}

.section-kicker {
  display: block;
  margin-bottom: 5px;
  color: #1769aa;
  font-size: 12px;
  font-weight: 700;
}

.overview-info-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid #e3e7ec;
  background: #f8fafc;
}

.overview-info-bar span {
  min-width: 0;
  padding: 13px 16px;
  color: #627d98;
  font-size: 12px;
}

.overview-info-bar strong {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
  color: #243b53;
  font-size: 14px;
}

.overview-core-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 20px;
}

.overview-result {
  min-height: 116px;
  padding: 16px;
  border: 1px solid #d9e2e9;
  border-radius: 6px;
  background: #fff;
}

.overview-result.primary {
  grid-column: span 1;
  background: #eef6fb;
  border-color: #a9c8dd;
}

.overview-result span,
.overview-result em {
  display: block;
  color: #627d98;
  font-style: normal;
  font-size: 12px;
}

.overview-result strong {
  display: block;
  margin: 10px 0 5px;
  overflow-wrap: anywhere;
  color: #102a43;
  font-size: 28px;
}

.overview-section {
  padding: 20px;
  border-top: 1px solid #e3e7ec;
}

.overview-section > h3,
.overview-section .block-header h3 {
  margin: 0;
}

.overview-composition {
  display: grid;
  grid-template-columns: minmax(280px, 400px) 1fr;
  gap: 28px;
  align-items: center;
  margin-top: 18px;
}

.overview-donut {
  width: min(320px, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: inset 0 0 0 58px #fff;
}

.overview-source-list {
  display: grid;
  gap: 12px;
}

.overview-source-row {
  display: grid;
  grid-template-columns: 12px minmax(120px, 1fr) auto 70px;
  gap: 9px;
  align-items: center;
}

.source-swatch {
  width: 10px;
  height: 10px;
}

.overview-source-row em {
  color: #627d98;
  font-style: normal;
  text-align: right;
}

.source-track {
  grid-column: 2 / -1;
  height: 6px;
  overflow: hidden;
  background: #e7eef5;
}

.source-track i {
  display: block;
  height: 100%;
}

.overview-issue-list,
.overview-reduction-summary {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.overview-issue {
  display: grid;
  grid-template-columns: 80px 120px minmax(180px, 1fr) minmax(220px, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid #e3e7ec;
}

.overview-issue em {
  color: #627d98;
  font-style: normal;
}

.overview-reduction-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.overview-reduction-summary > div {
  padding: 13px;
  background: #f7fafc;
}

.overview-reduction-summary span,
.overview-reduction-summary strong {
  display: block;
}

.overview-reduction-summary span {
  margin-bottom: 6px;
  color: #627d98;
  font-size: 12px;
}

.overview-flow {
  margin: 16px 0;
  padding: 14px;
  overflow-x: auto;
  background: #f7fafc;
  color: #334e68;
  font-weight: 700;
  white-space: nowrap;
}

.overview-flow span {
  margin: 0 8px;
  color: #1769aa;
}

.overview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.overview-disclaimer {
  margin: 0;
  padding: 16px 20px;
  border-top: 1px solid #e3e7ec;
  background: #f8fafc;
  color: #627d98;
  font-size: 12px;
  line-height: 1.55;
}

.app-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  padding: 10px;
  border: 1px solid #d7dde5;
  border-radius: 8px;
  background: #fff;
}

.nav-item {
  padding: 9px 12px;
  color: #31506f;
  background: #eef4fb;
}

.nav-item.active {
  color: #fff;
  background: #1f6feb;
}

.module-view {
  display: none;
}

.module-view.active {
  display: block;
}

.module-view:not(.active) {
  display: none !important;
}

.placeholder-panel {
  padding: 40px 20px;
  color: #7b8794;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
}

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

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

.checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid #d7dde5;
  border-radius: 4px;
  background: #fff;
}

.checkbox-grid input {
  width: auto;
}

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

.textarea-grid label {
  display: grid;
  gap: 6px;
  color: #46515f;
  font-size: 14px;
  font-weight: 700;
}

textarea {
  min-height: 96px;
  resize: vertical;
  padding: 9px 10px;
  border: 1px solid #b9c3cf;
  border-radius: 4px;
  font: inherit;
}

.more-info {
  border: 1px solid #dce2e8;
  border-radius: 8px;
  padding: 14px 16px;
  background: #fff;
}

.more-info summary {
  cursor: pointer;
  font-weight: 700;
}

.more-info .process-fields {
  margin-top: 14px;
}

h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
}

h2 {
  margin: 0;
  font-size: 20px;
}

.module,
.summary {
  border: 1px solid #d7dde5;
  border-radius: 8px;
  background: #fff;
}

.module-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid #e3e7ec;
}

.formula-panel {
  padding: 16px 20px;
  border-bottom: 1px solid #e3e7ec;
  background: #fbfcfe;
  line-height: 1.6;
}

.formula-panel h3 {
  margin: 0 0 10px;
  font-size: 17px;
}

.formula-panel p {
  margin: 6px 0;
}

.formula-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

.formula-list p {
  margin: 0;
  padding: 8px 10px;
  border-radius: 4px;
  background: #eef4fb;
  font-family: "Consolas", "Courier New", monospace;
}

.mode-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.mode-switch label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid #d7dde5;
  border-radius: 4px;
  background: #fff;
  font-weight: 700;
}

.mode-switch input {
  width: auto;
}

.inline-mode {
  margin: 0 0 12px;
}

form {
  padding: 20px;
}

.notice {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid #d7e2f2;
  border-radius: 6px;
  color: #31506f;
  background: #f3f8ff;
  line-height: 1.5;
}

.message {
  display: none;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #f0b9b9;
  border-radius: 6px;
  color: #9f1f1f;
  background: #fff0f0;
}

.message.show {
  display: block;
}

.message.success {
  border-color: #9bd2a6;
  color: #1f6f37;
  background: #effaf1;
}

.message.warning {
  border-color: #e3b341;
  color: #7a5400;
  background: #fff8df;
}

.message.error {
  border-color: #f0b9b9;
  color: #9f1f1f;
  background: #fff0f0;
}

.table-wrapper {
  overflow-x: auto;
  border: 1px solid #dce2e8;
  border-radius: 6px;
}

table {
  width: 100%;
  min-width: 2200px;
  border-collapse: collapse;
  table-layout: fixed;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid #e7ebf0;
  text-align: left;
  vertical-align: middle;
}

th {
  color: #46515f;
  background: #f8fafc;
  font-size: 14px;
  font-weight: 700;
}

th span {
  display: block;
  margin-top: 3px;
  color: #7b8794;
  font-size: 12px;
  font-weight: 400;
}

th:nth-child(1),
td:nth-child(1) {
  width: 10%;
}

th:nth-child(2),
td:nth-child(2) {
  width: 12%;
}

th:nth-child(3),
td:nth-child(3) {
  width: 12%;
}

th:nth-child(4),
td:nth-child(4) {
  width: 8%;
}

th:nth-child(5),
td:nth-child(5) {
  width: 7%;
}

th:nth-child(6),
td:nth-child(6) {
  width: 8%;
}

th:nth-child(7),
td:nth-child(7) {
  width: 8%;
}

th:nth-child(8),
td:nth-child(8) {
  width: 8%;
}

th:nth-child(9),
td:nth-child(9) {
  width: 7%;
}

th:nth-child(10),
td:nth-child(10) {
  width: 8%;
}

th:nth-child(11),
td:nth-child(11) {
  width: 8%;
}

th:nth-child(12),
td:nth-child(12) {
  width: 10%;
}

th:nth-child(13),
td:nth-child(13) {
  width: 10%;
}

th:nth-child(14),
td:nth-child(14) {
  width: 9%;
}

tr:last-child td {
  border-bottom: 0;
}

input,
select {
  width: 100%;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #b9c3cf;
  border-radius: 4px;
  color: #1f2933;
  background: #fff;
  font-size: 15px;
}

input:focus,
select:focus {
  outline: 2px solid #b9d3ff;
  border-color: #2f74d0;
}

output {
  display: block;
  min-height: 38px;
  padding: 9px 10px;
  border-radius: 4px;
  background: #f6f8fa;
  font-variant-numeric: tabular-nums;
}

.default-value {
  border-color: #e4c15b;
  background: #fff7d6;
}

.calculated-field {
  border: 1px solid #c9d8e8;
  background: #eef5fb;
}

.source-tag {
  display: inline-block;
  min-height: 0;
  padding: 6px 8px;
  border-radius: 999px;
  color: #735c00;
  background: #fff2b8;
  font-size: 13px;
}

button {
  border: 0;
  border-radius: 4px;
  font-size: 15px;
  cursor: pointer;
}

.primary-button,
.secondary-button {
  padding: 10px 16px;
  color: #fff;
  background: #1f6feb;
}

.primary-button:hover,
.secondary-button:hover {
  background: #185abc;
}

.danger-button {
  width: 100%;
  padding: 9px 10px;
  color: #9f1f1f;
  background: #ffe8e8;
}

.danger-button:hover {
  background: #ffd6d6;
}

.neutral-button {
  width: 100%;
  margin-bottom: 8px;
  padding: 9px 10px;
  color: #31506f;
  background: #eaf2ff;
}

.neutral-button:hover {
  background: #dbeafe;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.summary {
  margin-top: 18px;
  padding: 20px;
  border-left: 5px solid #1f6feb;
}

.process-module {
  margin-top: 24px;
}

.purchased-energy-module {
  margin-top: 24px;
}

.process-grid {
  display: grid;
  gap: 18px;
  padding: 20px;
}

.process-block {
  border: 1px solid #dce2e8;
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.process-block h3,
.block-header h3 {
  margin: 0 0 12px;
  font-size: 17px;
}

.block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.compact-table table {
  min-width: 980px;
}

.compact-table th,
.compact-table td {
  width: auto;
}

.process-fields {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 12px;
}

.energy-fields {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.energy-layout {
  display: grid;
  gap: 18px;
  padding: 20px;
}

.energy-zone {
  border: 1px solid #dce2e8;
  border-radius: 8px;
  padding: 16px;
}

.energy-produced {
  background: #f1fbf5;
}

.power-produced {
  background: #eef6ff;
}

.heat-produced {
  background: #f1fbf5;
}

.energy-consumed {
  background: #f5f8ff;
}

.energy-exchanged {
  background: #fff8ec;
}

.energy-row-list {
  display: grid;
  gap: 12px;
}

.energy-record {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d7dde5;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.76);
}

.energy-record label {
  display: grid;
  gap: 6px;
  color: #46515f;
  font-size: 14px;
  font-weight: 700;
}

.record-section {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  align-items: end;
  padding: 12px;
  border-top: 1px solid #dce2e8;
}

.record-section:first-child {
  border-top: 0;
}

.record-section h4 {
  grid-column: 1 / -1;
  margin: 0 0 2px;
  color: #334e68;
  font-size: 14px;
}

.record-actions {
  grid-template-columns: repeat(3, max-content);
  justify-content: start;
  background: #f8fafc;
}

.record-results {
  background: #edf6fc;
}

.record-results label {
  min-width: 0;
}

.heat-basis-note,
.heat-calculation-reason,
.steam-reference-help {
  grid-column: 1 / -1;
}

.heat-basis-note {
  margin: 2px 0 0;
  color: #526777;
  font-size: 13px;
  line-height: 1.6;
}

.heat-calculation-reason {
  margin: 0;
  color: #9f2d24;
  font-weight: 600;
}

.heat-calculation-reason.success {
  color: #286341;
  font-weight: 500;
}

.heat-calculation-details {
  grid-column: 1 / -1;
  border-top: 1px solid #d4e0e9;
  padding-top: 10px;
}

.heat-calculation-details summary {
  width: max-content;
  cursor: pointer;
  color: #185f99;
  font-weight: 700;
}

.heat-calculation-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(170px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.heat-calculation-detail-grid .heat-basis-note {
  grid-column: 1 / -1;
}

@media (max-width: 760px) {
  .heat-calculation-detail-grid {
    grid-template-columns: 1fr;
  }
}

.steam-reference-help {
  align-items: start;
  gap: 8px;
  padding: 10px;
  border: 1px solid #d7e2eb;
  background: #f8fbfd;
}

.steam-reference-help p {
  margin: 0;
  line-height: 1.5;
}

.steam-reference-help button {
  width: max-content;
}

.fixed-energy-record[data-active="false"] > :not(.block-header) {
  display: none;
}

.fixed-energy-record[data-active="false"] .delete-fixed-energy-record {
  display: none;
}

.fixed-energy-record[data-active="true"] .restore-fixed-energy-record {
  display: none;
}

.energy-summary-status {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #d6e1ea;
}

.energy-summary-status > strong,
.energy-summary-status .factor-note {
  flex-basis: 100%;
}

.record-results {
  background: #f4f9fd;
}

.record-sources {
  background: #f8fafb;
}

.record-status {
  display: block;
  min-height: 38px;
  padding: 9px 10px;
  border-radius: 4px;
  background: #eef2f5;
  color: #52606d;
  font-weight: 700;
}

.record-status.success {
  background: #e2f4e7;
  color: #236b3a;
}

.record-status.warning {
  background: #fff3c4;
  color: #6f5300;
}

.record-status.error {
  background: #ffe3e3;
  color: #9b2c2c;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-list span {
  padding: 5px 8px;
  border-radius: 999px;
  color: #31506f;
  background: #eaf2ff;
  font-size: 12px;
  font-weight: 700;
}

.process-fields label {
  display: grid;
  gap: 6px;
  color: #46515f;
  font-size: 14px;
  font-weight: 700;
}

.result-card.error {
  border-color: #d92d20;
  border-left-color: #d92d20;
  background: #fff7f7;
}

.result-card.warning {
  border-color: #d99a20;
  border-left-color: #d99a20;
  background: #fffaf0;
}

.result-card.estimate {
  border-left-color: #6f42c1;
}

.estimate-label {
  display: inline-block;
  margin-left: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #4c1d95;
  background: #ede9fe;
  font-size: 14px;
  vertical-align: middle;
}

.factor-note {
  display: inline-block;
  margin-top: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #735c00;
  background: #fff2b8;
  font-size: 14px;
  font-weight: 700;
}

.energy-record [hidden] {
  display: none !important;
}

.power-direct-field,
.power-estimate-field,
.power-steam-reference-field,
.power-steam-direct-field,
.power-direct-superheated-field {
  display: none !important;
}

.power-mode-direct .power-direct-field,
.power-mode-steam-estimate .power-estimate-field,
.power-steam-capable .power-method-field {
  display: grid !important;
}

.power-mode-steam-estimate.steam-data-reference .power-steam-reference-field,
.power-mode-steam-estimate.steam-data-direct .power-steam-direct-field,
.power-mode-steam-estimate.steam-data-direct.direct-steam-superheated .power-direct-superheated-field {
  display: grid !important;
}

.power-mode-steam-estimate.steam-data-direct .power-steam-reference-field,
.power-mode-steam-estimate.steam-data-reference .power-steam-direct-field,
.power-mode-steam-estimate.direct-steam-saturated .power-direct-superheated-field {
  display: none !important;
}

.output-with-unit {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
}

.output-with-unit > span {
  padding: 0 8px;
  color: #52606d;
  font-size: 12px;
}

.power-direct-only .power-method-field {
  display: none !important;
}

.default-output {
  display: block;
  min-height: 38px;
  padding: 9px 10px;
  border: 1px solid #e4c15b;
  border-radius: 4px;
  background: #fff7d6;
  font-variant-numeric: tabular-nums;
}

.data-table-details {
  margin-top: 12px;
  border: 1px solid #dce2e8;
  border-radius: 6px;
  background: #fff;
}

.data-table-details summary {
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 700;
}

.data-table-view {
  max-height: 260px;
  overflow: auto;
  padding: 0 12px 12px;
}

.data-table-view table {
  min-width: 0;
  table-layout: auto;
}

.data-table-view th,
.data-table-view td {
  padding: 7px 9px;
  font-size: 13px;
}

.summary-dashboard {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-kpi-card {
  min-height: 138px;
  padding: 18px;
  border: 1px solid #d8e7f1;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(43, 82, 135, 0.08);
}

.dashboard-kpi-card.primary-summary {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #1e5eff, #2f7be5);
}

.dashboard-kpi-card span,
.dashboard-kpi-card em {
  display: block;
  color: #5b6b82;
  font-size: 14px;
  font-style: normal;
}

.dashboard-kpi-card.primary-summary span,
.dashboard-kpi-card.primary-summary em {
  color: rgba(255, 255, 255, 0.82);
}

.dashboard-kpi-card strong {
  display: block;
  margin: 14px 0 6px;
  color: #123a56;
  font-size: 32px;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.dashboard-kpi-card.primary-summary strong {
  color: #fff;
}

.dashboard-analysis-grid,
.dashboard-lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 16px;
}

.dashboard-panel {
  min-height: 320px;
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(43, 82, 135, 0.07);
}

.dashboard-panel h3 {
  color: #123a56;
  font-size: 21px;
}

.dashboard-chart-layout {
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  align-items: center;
}

.donut-chart {
  width: min(300px, 100%);
  min-height: 250px;
  justify-self: center;
}

.donut-chart svg {
  width: 240px;
  max-width: 100%;
}

.contribution-bars {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.contribution-bar-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  align-items: center;
}

.contribution-bar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  grid-column: 1 / -1;
}

.contribution-bar-head strong {
  color: #20364d;
  font-size: 14px;
}

.contribution-bar-head span,
.contribution-bar-row em {
  color: #5b6b82;
  font-size: 13px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

.contribution-bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf3fa;
}

.contribution-bar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

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

.dashboard-quality-card {
  padding: 14px;
  border: 1px solid #d8e7f1;
  border-radius: 14px;
  background: #f8fbff;
}

.dashboard-quality-card span,
.dashboard-quality-card em {
  display: block;
  color: #5b6b82;
  font-size: 13px;
  font-style: normal;
}

.dashboard-quality-card strong {
  display: block;
  margin: 8px 0 4px;
  color: #123a56;
  font-size: 22px;
}

.dashboard-quality-card.ok { background: #effaf1; border-color: #bfe8c8; }
.dashboard-quality-card.warning { background: #fff8df; border-color: #f4dda0; }
.dashboard-quality-card.danger { background: #fff0f0; border-color: #f0b8b8; }

.compact-list {
  gap: 6px;
}

.reduction-direction-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.direction-card {
  padding: 14px;
  border: 1px solid #d8e7f1;
  border-radius: 14px;
  background: #f8fbff;
}

.direction-card strong {
  color: #174f91;
  font-size: 15px;
}

.direction-card p {
  margin: 7px 0 0;
  color: #4f6275;
  font-size: 14px;
  line-height: 1.55;
}

.direction-card.muted {
  background: #f7fafc;
}

.carbon-flow-panel {
  border-radius: 16px;
}

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

.carbon-flow-strip span {
  position: relative;
  padding: 14px 12px;
  border: 1px solid #d7e7f5;
  border-radius: 14px;
  color: #174f91;
  background: #f4f9ff;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}

.carbon-flow-strip span:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -12px;
  top: 50%;
  color: #6d93bd;
  transform: translateY(-50%);
}

@media (max-width: 1180px) {
  .dashboard-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-analysis-grid,
  .dashboard-lower-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .dashboard-kpi-grid,
  .dashboard-quality-cards,
  .carbon-flow-strip {
    grid-template-columns: 1fr;
  }

  .carbon-flow-strip span::after {
    display: none;
  }
}

.summary-hero-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
}

.summary-info-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #d7dde5;
  border-radius: 8px;
  background: #fff;
}

.summary-info-bar span {
  padding-right: 16px;
  color: #52606d;
}

.summary-info-bar strong {
  color: #1f2933;
}

.summary-core-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
}

.summary-card {
  min-height: 128px;
  padding: 16px;
  border: 1px solid #d7dde5;
  border-radius: 8px;
  background: #f8fbff;
}

.summary-card span,
.summary-card em {
  display: block;
  color: #52606d;
  font-style: normal;
}

.summary-card strong {
  display: block;
  margin: 12px 0 6px;
  color: #1f2933;
  font-size: 28px;
  font-variant-numeric: tabular-nums;
}

.primary-summary {
  background: #eef6ff;
}

.primary-summary strong {
  font-size: 38px;
}

.status-card.ok {
  background: #effaf1;
}

.status-card.warning {
  background: #fff8df;
}

.status-card.error {
  background: #fff0f0;
}

.summary-section {
  padding: 16px;
  border: 1px solid #dce2e8;
  border-radius: 8px;
  background: #fff;
}

.summary-section h3 {
  margin: 0 0 12px;
}

.section-note {
  margin: 0 0 12px;
  color: #52606d;
}

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

.summary-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 6px;
  background: #f6f8fa;
}

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

.summary-row.warning {
  background: #fff8df;
}

.summary-row.error {
  background: #fff0f0;
}

.summary-row.success {
  background: #effaf1;
}

.source-chart-layout {
  display: grid;
  grid-template-columns: minmax(190px, 240px) minmax(260px, 1fr);
  gap: 24px;
  align-items: center;
}

.pie-chart {
  width: min(220px, 100%);
  max-width: 220px;
  min-height: 180px;
  display: grid;
  place-items: center;
  justify-self: center;
}

.pie-chart svg {
  width: min(200px, 100%);
  max-height: 200px;
  height: auto;
  aspect-ratio: 1;
}

.pie-empty {
  color: #7b8794;
  text-align: center;
}

.source-legend-item {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #edf2f7;
}

.source-legend-item:last-child {
  border-bottom: 0;
}

.source-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9);
}

.source-legend-main strong,
.source-legend-main em {
  display: block;
}

.source-legend-main strong {
  color: #17324d;
  font-size: 14px;
}

.source-legend-main em {
  color: #627d98;
  font-size: 12px;
  font-style: normal;
  margin-top: 3px;
}

.source-legend-item b {
  color: #17324d;
  font-size: 15px;
}

.source-legend-empty {
  color: #7b8794;
  padding: 12px 0;
}

.result-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 12px;
  color: #52606d;
}

.result-metrics span {
  padding: 8px 10px;
  border-radius: 4px;
  background: #f6f8fa;
}

.summary h2 {
  margin-bottom: 10px;
}

.summary p {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.summary-unit {
  font-size: 18px;
  font-weight: 700;
}

#fuel-stat {
  margin-top: 8px;
  color: #52606d;
  font-size: 15px;
}

.analysis-tabs {
  display: flex;
  gap: 4px;
  padding: 12px 20px 0;
  border-bottom: 1px solid #d7dde5;
  background: #fff;
}

.analysis-tab {
  padding: 11px 18px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #52606d;
  font-weight: 700;
  cursor: pointer;
}

.analysis-tab.active {
  border-bottom-color: #1769aa;
  color: #134e7c;
}

.analysis-panel {
  display: none;
  gap: 18px;
  padding: 20px;
}

.analysis-panel.active {
  display: grid;
}

.analysis-metric-grid,
.analysis-result-grid,
.baseline-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.analysis-result-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
}

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

.analysis-metric {
  min-width: 0;
  padding: 14px;
  border: 1px solid #d8e3ec;
  border-radius: 8px;
  background: #eef7ff;
}

.analysis-metric.primary,
.analysis-metric.highlight {
  border-color: #8fc0e8;
  background: #e4f2ff;
}

.analysis-metric.wide {
  grid-column: 1 / -1;
}

.analysis-metric span,
.analysis-metric em {
  display: block;
  color: #52606d;
  font-style: normal;
}

.analysis-metric strong {
  display: block;
  overflow-wrap: anywhere;
  margin: 8px 0 4px;
  color: #1f2933;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.analysis-metric.primary strong,
.analysis-metric.highlight strong {
  color: #0d5c91;
  font-size: 28px;
}

.scenario-selector {
  border-left: 4px solid #1769aa;
}

.scenario-control-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
}

.scenario-control-grid label {
  display: grid;
  gap: 6px;
  color: #334e68;
  font-weight: 600;
}

.scenario-control-grid .secondary-button {
  min-height: 42px;
}

.input-with-unit {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  border: 1px solid #b8c4cf;
  border-radius: 4px;
  background: #fff;
}

.input-with-unit input {
  width: 100%;
  border: 0;
}

.input-with-unit span {
  padding: 0 10px;
  color: #52606d;
}

.disabled-field {
  opacity: 0.55;
}

.fixed-assumption,
.analysis-disclaimer {
  margin: 0;
  padding: 12px 14px;
  border-left: 4px solid #e4a11b;
  background: #fff8df;
  color: #5f4b18;
}

.analysis-disclaimer {
  margin: 0 20px 20px;
  border-left-color: #8091a5;
  background: #f3f6f8;
  color: #52606d;
}

.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 44px 1fr 1fr;
  gap: 12px;
  align-items: stretch;
}

.comparison-card {
  padding: 16px;
  border: 1px solid #d7dde5;
  border-radius: 8px;
  background: #eef7ff;
}

.comparison-card.scenario,
.comparison-card.change {
  background: #effaf1;
}

.comparison-card span,
.comparison-card em {
  display: block;
  color: #52606d;
  font-style: normal;
}

.comparison-card strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 26px;
  font-variant-numeric: tabular-nums;
}

.comparison-arrow {
  display: grid;
  place-items: center;
  color: #1769aa;
  font-size: 28px;
}

.quality-priority {
  padding: 14px 16px;
  border: 1px solid #e4bf55;
  border-radius: 8px;
  background: #fff8df;
  color: #5f4b18;
  font-weight: 700;
}

.direction-list {
  display: grid;
  gap: 14px;
}

.direction-card {
  padding: 18px;
  border: 1px solid #dce2e8;
  border-radius: 8px;
  background: #fff;
}

.direction-card h3 {
  margin: 0 0 14px;
}

.direction-card dl {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 9px 14px;
  margin: 0;
}

.direction-card dt {
  color: #52606d;
  font-weight: 700;
}

.direction-card dd {
  margin: 0;
  line-height: 1.6;
}

.empty-state {
  margin: 0;
  padding: 18px;
  color: #7b8794;
  text-align: center;
}

.export-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 22px;
  border-bottom: 1px solid #dce2e8;
  background: #f8fbff;
}

.export-toolbar h3,
.export-toolbar p {
  margin: 0;
}

.export-toolbar p {
  margin-top: 6px;
  color: #52606d;
}

.export-actions {
  display: flex;
  gap: 10px;
  flex: 0 0 auto;
}

.primary-button {
  min-height: 40px;
  padding: 9px 16px;
  border: 1px solid #1769aa;
  border-radius: 4px;
  background: #1769aa;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

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

.export-card {
  padding: 18px;
  border: 1px solid #dce2e8;
  border-radius: 8px;
  background: #fff;
}

.export-card h3 {
  margin: 0 0 8px;
}

.export-card p {
  min-height: 48px;
  color: #52606d;
}

#export-status {
  margin: 0 20px 20px;
}

.modal-backdrop {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(21, 32, 43, 0.55);
}

.modal-backdrop[hidden] {
  display: none;
}

.export-dialog {
  width: min(560px, 100%);
  padding: 20px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(15, 35, 55, 0.24);
}

.export-dialog h2 {
  margin: 0;
  font-size: 21px;
}

.icon-button {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #52606d;
  font-size: 26px;
  cursor: pointer;
}

.export-option-list {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.export-option-list label,
.export-unit-options label {
  display: flex;
  gap: 9px;
  align-items: center;
}

.export-unit-options {
  display: flex;
  gap: 20px;
  padding: 14px;
  border: 1px solid #dce2e8;
  border-radius: 6px;
}

.export-unit-options legend {
  padding: 0 6px;
  color: #334e68;
  font-weight: 700;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.dq-details {
  margin-top: 10px;
  border: 1px solid #cad6df;
  border-radius: 6px;
  background: #f8fafc;
  text-align: left;
}

.dq-table-detail-row > td {
  padding: 0 8px 10px;
  border-bottom: 1px solid #dce5ec;
  background: #f8fafc;
}

.dq-table-detail-row .dq-details {
  margin-top: 0;
}

.gas-direct-field,
.gas-custom-field {
  display: none !important;
}

.gas-method-direct .gas-direct-field,
.gas-method-custom .gas-custom-field {
  display: grid !important;
}

.dq-details summary {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 9px 11px;
  color: #334e68;
  cursor: pointer;
}

.dq-summary-label {
  overflow-wrap: anywhere;
  font-size: 12px;
}

.dq-editor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 12px;
  padding: 12px;
  border-top: 1px solid #dce5ec;
}

.dq-editor-grid label {
  display: grid;
  gap: 5px;
  color: #334e68;
  font-size: 12px;
}

.dq-editor-grid input,
.dq-editor-grid select,
.dq-editor-grid textarea,
.quality-filter-bar select,
.quality-table input,
.quality-table select {
  width: 100%;
  border: 1px solid #b9c7d3;
  border-radius: 4px;
  background: #fff;
}

.dq-wide {
  grid-column: 1 / -1;
}

.dq-record-issues {
  padding: 0 12px 12px;
  color: #52606d;
  font-size: 12px;
}

.dq-record-issues ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

.quality-status-tag {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 4px;
  background: #e7eef5;
  color: #334e68;
  font-size: 12px;
  font-weight: 700;
}

.level-normal { background: #e2f4e8; color: #20633a; }
.level-info { background: #e6f0f8; color: #245b7d; }
.level-verify { background: #fff0d6; color: #8a4b08; }
.level-severe { background: #fde7e7; color: #a32222; }

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

.quality-core-metrics {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.quality-detail-panel {
  margin: -4px 0 16px;
  padding: 12px 14px;
  border: 1px solid #dce2e8;
  border-radius: 6px;
  background: #f8fbfd;
}

.quality-detail-panel summary {
  cursor: pointer;
  color: #315c7c;
  font-weight: 700;
}

.quality-detail-metrics {
  margin-bottom: 0;
}

.quality-metric-card {
  min-height: 102px;
  padding: 14px;
  border: 1px solid #d9e2e9;
  border-radius: 6px;
  background: #fff;
}

.quality-metric-card span,
.quality-metric-card em {
  display: block;
  color: #627d98;
  font-style: normal;
  font-size: 12px;
}

.quality-metric-card strong {
  display: inline-block;
  margin: 8px 5px 2px 0;
  color: #17324d;
  font-size: 26px;
}

.quality-metric-card.verify { border-color: #e7bd74; background: #fffaf0; }
.quality-metric-card.severe { border-color: #e3a1a1; background: #fff5f5; }

.quality-filter-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 240px));
  gap: 12px;
  margin: 14px 0;
}

.quality-table {
  width: 100%;
  min-width: 640px;
}

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

@media (max-width: 760px) {
  .page {
    padding: 20px 12px;
  }

  .module-header {
    align-items: stretch;
    flex-direction: column;
  }

  .page-header,
  .overview-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .mode-toolbar {
    justify-content: flex-start;
  }

  .mode-entry-grid,
  .overview-info-bar,
  .overview-core-grid,
  .overview-composition,
  .source-chart-layout,
  .overview-reduction-summary {
    grid-template-columns: 1fr;
  }

  .overview-donut {
    width: min(220px, 70vw);
    justify-self: center;
  }

  .overview-issue {
    grid-template-columns: 1fr;
  }

  .secondary-button {
    width: 100%;
  }

  .process-fields {
    grid-template-columns: 1fr;
  }

  .block-header {
    align-items: stretch;
    flex-direction: column;
  }

  .checkbox-grid,
  .textarea-grid {
    grid-template-columns: 1fr;
  }

  .analysis-tabs {
    overflow-x: auto;
    padding-inline: 12px;
  }

  .analysis-tab {
    flex: 0 0 auto;
  }

  .analysis-panel {
    padding: 12px;
  }

  .analysis-metric-grid,
  .analysis-result-grid,
  .baseline-grid,
  .scenario-control-grid,
  .comparison-grid {
    grid-template-columns: 1fr;
  }

  .comparison-arrow {
    transform: rotate(90deg);
  }

  .direction-card dl {
    grid-template-columns: 1fr;
  }

  .analysis-disclaimer {
    margin: 0 12px 12px;
  }

  .export-toolbar,
  .export-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .export-card-grid {
    grid-template-columns: 1fr;
  }

  .record-section {
    grid-template-columns: 1fr;
  }

  .dq-editor-grid,
  .quality-metric-grid,
  .quality-filter-bar {
    grid-template-columns: 1fr;
  }
}
.legacy-energy-layout {
  display: none !important;
}

.simple-energy-layout {
  display: grid;
  gap: 16px;
}

.energy-simple-panel,
.energy-quality-panel,
.energy-balance-panel {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 16px;
}

.electricity-simple-panel {
  background: #f3f7fc;
}

.heat-simple-panel {
  background: #f2f8f3;
}

.compact-help,
.empty-record-hint {
  margin: 4px 0 0;
  color: #526173;
  font-size: 14px;
}

.simple-energy-records {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.simple-flow-groups {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.simple-flow-group {
  padding: 12px;
  border: 1px solid #d7e0e7;
  border-radius: 6px;
  background: #f8fafc;
}

.simple-flow-group > h4,
.simple-flow-group .block-header h4 {
  margin: 0;
}

.heat-flow-consumed {
  background: #f4f8fc;
}

.heat-flow-byproduct {
  background: #f2f8f3;
}

.heat-flow-purchased {
  background: #fff9ed;
}

.heat-flow-exported {
  background: #f7f5fb;
}

.simple-byproduct-source-field {
  display: none;
}

.simple-heat-record.is-byproduct-flow .simple-byproduct-source-field {
  display: block;
}

.simple-energy-record {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 12px;
  background: #fff;
}

.shared-parameter-panel {
  margin-top: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.72);
}

.shared-parameter-panel summary {
  cursor: pointer;
  font-weight: 700;
}

.shared-parameter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.simple-custom-factor-field {
  display: none;
}

.simple-energy-record.uses-custom-factor .simple-custom-factor-field {
  display: block;
}

.custom-factor-toggle-label {
  align-self: end;
  padding-bottom: 9px;
}

.custom-factor-toggle-label input {
  width: auto;
}

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

.compact-delete-button {
  min-width: 52px;
  width: auto;
  flex: 0 0 auto;
  border: 1px solid #d8a5a5;
  border-radius: 4px;
  padding: 4px 8px;
  background: #fff;
  color: #a52828;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}

.fixed-flow-output {
  display: block;
  min-height: 38px;
  padding: 9px 10px;
  border: 1px solid #cbd5e1;
  background: #eef4f8;
  color: #24364b;
}

.simple-input-grid,
.energy-quality-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.simple-input-grid label,
.energy-quality-grid label {
  min-width: 0;
}

.simple-input-grid input,
.simple-input-grid select,
.energy-quality-grid input,
.energy-quality-grid select {
  width: 100%;
}

.simple-record-result {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 10px;
  padding: 10px 12px;
  background: #eaf4fb;
  border-radius: 4px;
}

.simple-record-status[data-status="incomplete"],
.simple-record-status[data-status="parameter-error"] {
  color: #a34a00;
  font-weight: 700;
}

.simple-record-status[data-status="calculated"] {
  color: #17633a;
  font-weight: 700;
}

.simple-steam-field,
.simple-manual-enthalpy-field {
  display: none;
}

.simple-heat-record.is-steam .simple-steam-field {
  display: block;
}

.simple-heat-record.is-steam:not(.is-superheated) .simple-superheated-only {
  display: none;
}

.simple-heat-record.is-manual-enthalpy .simple-manual-enthalpy-field {
  display: block;
}

.energy-quality-panel,
.energy-balance-panel {
  background: #f8fafc;
}

.energy-quality-panel summary,
.energy-balance-panel summary {
  cursor: pointer;
  font-weight: 700;
}

.quality-optional-tag {
  color: #64748b;
  font-size: 13px;
  font-weight: 400;
}

.quality-pending-note {
  margin-bottom: 0;
  color: #9a6700;
}

.field-required {
  color: #b42318;
  font-weight: 700;
}

.field-optional {
  color: #64748b;
  font-size: 12px;
  font-weight: 400;
}

.simple-record-status[data-status="quality-warning"] {
  color: #9a6700;
  font-weight: 700;
}

.calculation-check {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid;
  border-radius: 6px;
}

.calculation-check h3,
.calculation-check p {
  margin: 0;
}

.calculation-check ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.calculation-check-ok {
  border-color: #8ac6a2;
  background: #edf8f1;
  color: #17633a;
}

.calculation-check-warning {
  border-color: #e6c66a;
  background: #fff8df;
  color: #7a5600;
}

.calculation-check-error {
  border-color: #e2a1a1;
  background: #fff0f0;
  color: #9d2525;
}

.module-quality-panel {
  margin-top: 14px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 12px 14px;
  background: #f8fafc;
}

.module-quality-panel summary {
  cursor: pointer;
  font-weight: 700;
}

.fuel-entry-table,
.fuel-entry-table tbody {
  display: block;
  min-width: 0;
  width: 100%;
  table-layout: auto;
}

.fuel-entry-table thead {
  display: none;
}

.fuel-entry-table .fuel-row {
  position: relative;
  display: grid;
  grid-template-columns: 1.35fr 1fr 0.65fr 1.15fr 1fr minmax(190px, auto);
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
}

.fuel-entry-table .fuel-row > td {
  display: block;
  min-width: 0;
  padding: 0;
  border: 0;
  width: auto !important;
}

.fuel-entry-table .fuel-row > td::before,
#raw-material-rows tr > td::before,
#byproduct-rows tr > td::before {
  display: block;
  margin-bottom: 4px;
  color: #526173;
  font-size: 12px;
  font-weight: 600;
}

.fuel-entry-table .fuel-row > td::before {
  content: attr(data-label);
}

.fuel-entry-table .fuel-row > td:nth-child(5) { order: 1; }
.fuel-entry-table .fuel-row > td:nth-child(6) { order: 2; }
.fuel-entry-table .fuel-row > td:nth-child(7) { order: 3; }
.fuel-entry-table .fuel-row > td:nth-child(8) { order: 4; }
.fuel-entry-table .fuel-row > td:nth-child(13) { order: 5; }
.fuel-entry-table .fuel-row > td:nth-child(16) { order: 6; }
.fuel-entry-table .fuel-row > td:nth-child(9) { order: 11; }
.fuel-entry-table .fuel-row > td:nth-child(10) { order: 12; }
.fuel-entry-table .fuel-row > td:nth-child(11) { order: 13; }
.fuel-entry-table .fuel-row > td:nth-child(12) { order: 14; }
.fuel-entry-table .fuel-row > td:nth-child(4) { order: 15; }
.fuel-entry-table .fuel-row > td:nth-child(1) { order: 20; }
.fuel-entry-table .fuel-row > td:nth-child(2) { order: 21; }
.fuel-entry-table .fuel-row > td:nth-child(3) { order: 22; }
.fuel-entry-table .fuel-row > td:nth-child(14) { order: 23; }
.fuel-entry-table .fuel-row > td:nth-child(15) { display: none; }
.fuel-entry-table .fuel-row > td:nth-child(16) {
  position: static;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 6px;
}

.fuel-entry-table .fuel-row > td:nth-child(16)::before {
  display: none;
}

.fuel-entry-table input,
.fuel-entry-table select {
  width: 100%;
}

#raw-material-rows,
#byproduct-rows {
  display: block;
}

#raw-material-rows tr,
#byproduct-rows tr {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
  padding: 38px 12px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
}

#raw-material-rows td,
#byproduct-rows td {
  display: block;
  min-width: 0;
  padding: 0;
  border: 0;
  width: auto !important;
}

#raw-material-rows td:last-child,
#byproduct-rows td:last-child {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 52px;
}

.process-module .compact-table thead {
  display: none;
}

#raw-material-rows td:nth-child(1)::before { content: "物料名称（选填）"; }
#raw-material-rows td:nth-child(2)::before { content: "投入量 *"; }
#raw-material-rows td:nth-child(3)::before { content: "单位 *"; }
#raw-material-rows td:nth-child(4)::before { content: "低位热值 *"; }
#raw-material-rows td:nth-child(5)::before { content: "热值单位"; }
#raw-material-rows td:nth-child(6)::before { content: "单位热值含碳量 *"; }
#raw-material-rows td:nth-child(7)::before { content: "参数单位"; }
#raw-material-rows td:nth-child(8)::before { content: "含碳量"; }
#raw-material-rows td:nth-child(9)::before { content: "工艺环节（选填）"; }
#raw-material-rows td:nth-child(10)::before { content: "输入碳量"; }

#byproduct-rows td:nth-child(1)::before { content: "副产品名称（选填）"; }
#byproduct-rows td:nth-child(2)::before { content: "产量 *"; }
#byproduct-rows td:nth-child(3)::before { content: "低位热值 *"; }
#byproduct-rows td:nth-child(4)::before { content: "热值单位"; }
#byproduct-rows td:nth-child(5)::before { content: "单位热值含碳量 *"; }
#byproduct-rows td:nth-child(6)::before { content: "参数单位"; }
#byproduct-rows td:nth-child(7)::before { content: "含碳量"; }
#byproduct-rows td:nth-child(8)::before { content: "工艺环节（选填）"; }
#byproduct-rows td:nth-child(9)::before { content: "输出碳量"; }

label:has(#coke-gas-parameter-source) {
  display: none;
}

.process-calculate-actions {
  display: flex;
  justify-content: flex-end;
  margin: 16px 0;
}

.process-calculation-details {
  margin-top: 18px;
  text-align: left;
}

.process-calculation-details > summary {
  cursor: pointer;
  font-weight: 700;
}

.process-detail-section {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #d8e0e7;
}

.process-detail-section h3 {
  margin: 0 0 10px;
}

.process-detail-section table {
  min-width: 760px;
}

.process-balance-detail {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
}

.process-balance-detail h3 {
  grid-column: 1 / -1;
}

.process-balance-detail p {
  margin: 0;
  padding: 10px;
  background: #eef5fa;
}

.process-estimate-setting {
  max-width: 220px;
  margin-top: 10px;
}

@media (max-width: 760px) {
  .process-balance-detail {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1000px) {
  .simple-input-grid,
  .energy-quality-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .fuel-entry-table .fuel-row,
  #raw-material-rows tr,
  #byproduct-rows tr {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .simple-input-grid,
  .energy-quality-grid {
    grid-template-columns: 1fr;
  }

  .shared-parameter-grid {
    grid-template-columns: 1fr;
  }

  .fuel-entry-table .fuel-row,
  #raw-material-rows tr,
  #byproduct-rows tr {
    grid-template-columns: 1fr;
  }

  .simple-record-head,
  .simple-record-result {
    align-items: stretch;
    flex-direction: column;
  }
}

.import-check-dialog {
  width: min(920px, calc(100vw - 32px));
}

.import-check-columns {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
  margin-top: 16px;
}

.import-check-panel {
  min-width: 0;
  padding: 14px;
  border: 1px solid #d8e0e7;
  border-radius: 6px;
  background: #f8fafc;
}

.import-check-panel h4 {
  margin: 0 0 10px;
}

.import-check-panel ul {
  max-height: 280px;
  margin: 0;
  padding-left: 20px;
  overflow: auto;
}

.import-check-status {
  min-height: 24px;
  margin: 14px 0 0;
  color: #526171;
}

@media (max-width: 720px) {
  .import-check-columns {
    grid-template-columns: 1fr;
  }
}

.tool-positioning-card {
  margin-bottom: 22px;
  padding: 22px;
  border: 1px solid #d7e3ee;
  border-radius: 8px;
  background: #ffffff;
}

.tool-positioning-card h2 {
  margin: 4px 0 8px;
  color: #102a43;
}

.tool-positioning-card p {
  max-width: 760px;
  margin: 0 0 16px;
  color: #52606d;
  line-height: 1.65;
}

.tool-positioning-inline {
  display: grid;
  gap: 4px;
  max-width: 720px;
  margin-top: 8px;
  color: #334e68;
}

.tool-positioning-inline strong {
  color: #102a43;
  font-size: 15px;
}

.tool-positioning-inline span {
  color: #627d98;
  font-size: 13px;
  line-height: 1.5;
}

.carbon-process-flow,
.reduction-link-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.carbon-process-flow span,
.reduction-link-flow span {
  padding: 7px 11px;
  border: 1px solid #c9d8e6;
  border-radius: 999px;
  background: #f5f9fc;
  color: #334e68;
  font-size: 13px;
  font-weight: 700;
}

.carbon-process-flow span:not(:last-child)::after,
.reduction-link-flow span:not(:last-child)::after {
  content: "→";
  margin-left: 8px;
  color: #829ab1;
}

.scope-label {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 4px 8px;
  border: 1px solid #b6d3e8;
  border-radius: 999px;
  background: #edf7ff;
  color: #1f5f8b;
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
}

.quality-traceability-panel {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid #d7e3ee;
  border-radius: 8px;
  background: #ffffff;
}

.quality-traceability-panel h3 {
  margin: 4px 0 12px;
}

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

.traceability-grid div {
  min-width: 0;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
}

.traceability-grid strong,
.traceability-grid span {
  display: block;
}

.traceability-grid strong {
  margin-bottom: 6px;
  color: #243b53;
}

.traceability-grid span {
  color: #627d98;
  font-size: 12px;
  line-height: 1.5;
}

.analysis-conclusion,
.linked-direction-card {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid #c9d8e6;
  border-left: 4px solid #2f80b7;
  border-radius: 6px;
  background: #f6fbff;
}

.analysis-conclusion strong,
.linked-direction-card strong {
  display: block;
  margin-bottom: 6px;
  color: #102a43;
}

.analysis-conclusion p,
.linked-direction-card p {
  margin: 4px 0;
  color: #334e68;
  line-height: 1.55;
}

.analysis-conclusion .conclusion-note {
  color: #627d98;
  font-size: 12px;
}

.reduction-link-flow {
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 1px solid #d7e3ee;
  border-radius: 8px;
  background: #ffffff;
}

@media (max-width: 820px) {
  .traceability-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .scope-label {
    margin: 6px 0 0;
  }
}

/* Platform UI shell */
body {
  font-size: 16px;
  line-height: 1.55;
  background:
    radial-gradient(circle at 14% 8%, rgba(78, 145, 214, 0.10), transparent 28%),
    rgb(242, 246, 250);
}

.platform-shell {
  display: block;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

.platform-body {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  align-items: start;
}

.platform-sidebar {
  position: sticky;
  top: 92px;
  height: calc(100vh - 92px);
  padding: 16px 14px;
  overflow-y: auto;
  overflow-x: hidden;
  color: #eaf5ff;
  background: rgb(43, 82, 135);
  box-shadow: 10px 0 26px rgba(43, 82, 135, 0.16);
}

.platform-main {
  min-width: 0;
}

.platform-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  align-items: center;
  margin: 0;
  padding: 20px 34px 20px 72px;
  color: #fff;
  background: rgb(43, 82, 135);
  box-shadow: 0 12px 28px rgba(43, 82, 135, 0.18);
}

.platform-topbar h1 {
  margin: 0 0 7px;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
}

.platform-topbar p {
  margin: 0;
  color: #d8f0ff;
  font-size: 15px;
}

.platform-title-block {
  flex: 0 1 48%;
  min-width: 0;
  margin-left: 24px;
}

.topbar-kicker {
  color: #d9ecff;
  font-size: 12px;
  font-weight: 700;
}

.topbar-status {
  display: grid;
  gap: 5px;
  justify-items: end;
  min-width: 180px;
}

.topbar-status span {
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  color: #eaf7ff;
  font-size: 12px;
}

.topbar-status strong {
  font-size: 15px;
}

.platform-content {
  width: min(1560px, 100%);
  margin: 0 auto;
  padding: 16px 18px 36px;
}

.app-nav {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
}

.nav-group-title {
  margin: 14px 8px 6px;
  color: #e5f4ff;
  font-size: 22px;
  font-weight: 600;
}

.nav-item {
  position: relative;
  width: 100%;
  min-height: 42px;
  padding: 10px 13px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #dff2ff;
  background: transparent;
  text-align: left;
  font-size: 22px;
  font-weight: 600;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.11);
}

.nav-item.active {
  color: #ffffff;
  background: rgb(78, 145, 214);
  box-shadow: 0 8px 18px rgba(18, 63, 108, 0.22);
  font-weight: 700;
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 999px;
  background: #ffffff;
}

.nav-subitem {
  min-height: 38px;
  padding-left: 30px;
  color: #ccecff;
  font-size: 17px;
  font-weight: 600;
}

.module,
.summary {
  border: 1px solid #d7e4ee;
  border-radius: 9px;
  background: rgb(255, 255, 255);
  box-shadow: 0 8px 22px rgba(43, 82, 135, 0.08);
}

.module p,
.summary p,
.process-block,
.management-card,
.home-panel {
  font-size: 15.5px;
}

table,
input,
select,
textarea,
button {
  font-size: 14.5px;
}

.module-header {
  padding-bottom: 14px;
  border-bottom: 1px solid #e6eef5;
}

.module-header h2 {
  color: #153e5c;
  font-size: 22px;
}

.emission-module-title {
  display: grid;
  grid-template-columns: auto auto;
  gap: 7px 10px;
  align-items: center;
}

.emission-module-title h2 {
  margin: 0;
  color: #153e5c;
  font-size: 21px;
}

.emission-module-title .scope-label {
  margin-left: 0;
  font-size: 16px;
}

.emission-module-title p {
  grid-column: 1 / -1;
  margin: 0;
  color: #52606d;
  font-size: 15px;
  line-height: 1.45;
}

.module-action-bar {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #e6eef5;
}

.process-block,
.summary-section,
.export-card,
.management-card,
.home-panel {
  border-color: #d8e7f1;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(23, 93, 137, 0.06);
}

.home-dashboard,
.data-management-page {
  padding: 18px 20px 24px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.home-dashboard,
.module-view.active.home-dashboard {
  display: flex;
  flex-direction: column;
}

.home-dashboard > .module-header {
  order: 1;
}

.module-view:not([data-module="overview"]) .process-map-panel {
  display: none !important;
}

.process-map-panel {
  order: 2;
}

.home-hero-grid {
  order: 3;
}

.home-dashboard-grid {
  order: 4;
}

.home-hero-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.home-info-card,
.home-metric-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid #d8e7f1;
  border-radius: 10px;
  background: #f8fbfe;
}

.home-metric-card.primary {
  border-color: #9ed0ec;
  background: linear-gradient(135deg, #e9f7ff, #f8fcff);
}

.home-info-card span,
.home-info-card em,
.home-metric-card span,
.home-metric-card em {
  display: block;
  color: #627d98;
  font-style: normal;
  font-size: 12px;
}

.home-info-card strong,
.home-metric-card strong {
  display: block;
  margin: 10px 0 6px;
  overflow-wrap: anywhere;
  color: #123a56;
  font-size: 26px;
}

.home-info-card strong {
  font-size: 20px;
}

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

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

.home-panel,
.management-card {
  padding: 18px;
  background: #fff;
}

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

.home-source-grid div {
  padding: 12px;
  border: 1px solid #e2edf5;
  border-radius: 8px;
  background: #f7fbff;
}

.home-source-grid span,
.home-source-grid em {
  display: block;
  color: #627d98;
  font-style: normal;
  font-size: 12px;
}

.home-source-grid strong {
  display: block;
  margin: 6px 0;
  color: #153e5c;
  font-size: 20px;
}

.process-map-panel {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid #d8e7f1;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(245, 250, 255, 0.96));
  box-shadow: 0 12px 30px rgba(43, 82, 135, 0.08);
}

.process-map-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.process-map-heading h3 {
  margin: 0;
  color: #123a56;
  font-size: 24px;
  line-height: 1.25;
}

.process-map-heading p {
  margin: 7px 0 0;
  color: #5b6b82;
  font-size: 15px;
}

.process-map-heading > span {
  flex: 0 0 auto;
  padding: 6px 12px;
  border: 1px solid #bfd7f4;
  border-radius: 999px;
  color: #245b91;
  background: #eef6ff;
  font-size: 13px;
  font-weight: 700;
}

.process-map-layout {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
}

.process-map-canvas {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  border: 1px solid #dce9f6;
  border-radius: 16px;
  background:
    radial-gradient(circle at 18% 18%, rgba(47, 107, 255, 0.08), transparent 28%),
    linear-gradient(180deg, #fbfdff 0%, #f3f8ff 100%);
}

.process-map-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#arrow-blue path { fill: #2f6bff; }
#arrow-green path { fill: #19a35b; }
#arrow-purple path { fill: #6d5bd0; }
#arrow-orange path { fill: #f59e0b; }
#arrow-cyan path { fill: #0ea5e9; }
#arrow-pink path { fill: #ec4899; }

.process-map-lines .line {
  fill: none;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.9;
}

.line-main { stroke: #2f6bff; marker-end: url(#arrow-blue); }
.line-solid { stroke: #19a35b; marker-end: url(#arrow-green); }
.line-energy { stroke: #23a36f; stroke-dasharray: 5 5; marker-end: url(#arrow-green); }
.line-gas { stroke: #6d5bd0; marker-end: url(#arrow-purple); }
.line-byproduct { stroke: #ec4899; stroke-dasharray: 5 5; marker-end: url(#arrow-pink); }
.line-heat { stroke: #f59e0b; marker-end: url(#arrow-orange); }
.line-util { stroke: #0ea5e9; stroke-dasharray: 5 5; marker-end: url(#arrow-cyan); }

.process-node {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 2;
  transform: translate(-50%, -50%);
  min-width: 94px;
  max-width: 142px;
  min-height: 42px;
  padding: 9px 13px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #14324a;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(43, 82, 135, 0.13);
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.node-tier-2 {
  min-width: 108px;
  min-height: 46px;
  font-size: 14px;
}

.node-tier-3 {
  min-width: 86px;
  min-height: 40px;
  font-size: 13px;
}

.process-node:hover,
.process-node.active {
  transform: translate(-50%, -50%) translateY(-2px);
  box-shadow: 0 14px 28px rgba(43, 82, 135, 0.22);
}

.process-node.active {
  border-color: #173d8f;
  outline: 3px solid rgba(47, 107, 255, 0.16);
}

.node-raw {
  border-color: #bad7ff;
  background: #edf6ff;
}

.node-core {
  min-width: 158px;
  min-height: 54px;
  color: #fff;
  border-color: #173d8f;
  background: linear-gradient(135deg, #1d4ed8, #123a75);
  font-size: 15px;
  box-shadow: 0 18px 34px rgba(29, 78, 216, 0.28);
}

.node-solid,
.node-energy {
  border-color: #b6e5ca;
  background: #ecfdf3;
}

.node-gas,
.node-util {
  border-color: #c9c4ff;
  background: #f3f1ff;
}

.node-gas {
  min-width: 72px;
  max-width: 96px;
  min-height: 32px;
  padding-block: 5px;
  padding-inline: 9px;
  font-size: 12.5px;
}

.node-util {
  min-width: 88px;
  max-width: 108px;
  padding-inline: 10px;
  border-color: #9bdcf4;
  background: #ecfbff;
  color: #075985;
}

.node-byproduct {
  border-color: #f9b7d5;
  background: #fff1f7;
  color: #8b1853;
}

.node-heat {
  border-color: #f6d58b;
  background: #fff7e6;
}

.process-node-popover {
  position: absolute;
  z-index: 5;
  left: var(--popover-x, 58%);
  top: var(--popover-y, 46%);
  width: min(390px, calc(100% - 36px));
  transform: translate(-50%, -50%);
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid #bfd7f4;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 24px 55px rgba(22, 63, 113, 0.22);
}

.process-node-popover[hidden] {
  display: none;
}

.process-popover-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 28px;
  height: 28px;
  border: 1px solid #d5e4f2;
  border-radius: 999px;
  color: #41657f;
  background: #f8fbff;
  cursor: pointer;
}

.detail-kicker {
  width: max-content;
  padding: 5px 9px;
  border-radius: 999px;
  color: #245b91;
  background: #eef6ff;
  font-size: 12px;
  font-weight: 800;
}

.process-node-popover h3 {
  margin: 0;
  padding-right: 28px;
  color: #123a56;
  font-size: 22px;
}

.detail-section,
.detail-grid > div {
  padding: 13px;
  border: 1px solid #e0ebf5;
  border-radius: 12px;
  background: #f8fbff;
}

.detail-section strong,
.detail-grid strong {
  display: block;
  margin-bottom: 6px;
  color: #1f4d73;
  font-size: 14px;
}

.detail-section p,
.detail-grid p {
  margin: 0;
  color: #4f6074;
  font-size: 14px;
  line-height: 1.6;
}

.process-data-list {
  display: grid;
  grid-template-columns: 106px 1fr;
  gap: 7px 10px;
  margin: 0;
}

.process-data-list dt {
  color: #1f4d73;
  font-size: 13px;
  font-weight: 800;
}

.process-data-list dd {
  margin: 0;
  color: #4f6074;
  font-size: 13px;
  line-height: 1.5;
}

.emission-type-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.emission-type-tags span {
  padding: 5px 8px;
  border-radius: 999px;
  color: #1f4d73;
  background: #eef6ff;
  font-size: 12px;
  font-weight: 800;
}

.process-map-legend {
  position: absolute;
  left: 18px;
  top: 16px;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  max-width: calc(100% - 36px);
  padding: 9px 11px;
  border: 1px solid rgba(190, 211, 235, 0.9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 25px rgba(43, 82, 135, 0.08);
}

.process-map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #445a70;
  font-size: 12px;
  font-weight: 700;
}

.process-map-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.boundary-page {
  display: grid;
  gap: 18px;
}

.boundary-step-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.boundary-step-strip span {
  position: relative;
  min-height: 44px;
  padding: 12px 14px;
  border: 1px solid #d4e4f5;
  border-radius: 12px;
  background: #f4f9ff;
  color: #245b91;
  font-size: 15px;
  font-weight: 700;
}

.boundary-step-strip span:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -9px;
  width: 8px;
  height: 8px;
  border-top: 2px solid #4e91d6;
  border-right: 2px solid #4e91d6;
  transform: translateY(-50%) rotate(45deg);
}

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

.boundary-info-card {
  margin: 0;
}

.boundary-info-card.wide {
  grid-column: 1 / -1;
}

.boundary-info-card h3,
.boundary-config-card h3,
.boundary-result-card h3 {
  margin: 0;
}

.boundary-info-card p,
.boundary-result-card p,
.boundary-device-panel p {
  margin: 6px 0 0;
  color: #5b6b82;
  font-size: 14px;
}

.compact-fields {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
}

.boundary-config-card {
  margin: 0;
}

.boundary-config-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 16px;
  margin-top: 14px;
}

.boundary-system-tree,
.boundary-device-panel,
.boundary-result-card {
  border: 1px solid #d8e7f1;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(43, 82, 135, 0.08);
}

.boundary-system-tree {
  padding: 14px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
}

.boundary-system-tree > strong {
  display: block;
  margin-bottom: 10px;
  color: #163b61;
  font-size: 16px;
}

.boundary-system-list {
  display: grid;
  gap: 8px;
}

.boundary-system-node {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #1f3f5f;
  background: rgba(255, 255, 255, 0.72);
  text-align: left;
  cursor: pointer;
}

.boundary-system-node span {
  font-size: 15px;
  font-weight: 700;
}

.boundary-system-node em {
  color: #6b7f93;
  font-size: 12px;
  font-style: normal;
}

.boundary-system-node:hover,
.boundary-system-node.active {
  border-color: #82b8ef;
  background: #eaf4ff;
  color: #174f91;
}

.boundary-device-panel {
  padding: 16px;
}

.boundary-device-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.boundary-device-header span {
  display: block;
  color: #6b7f93;
  font-size: 12px;
  font-weight: 700;
}

.boundary-device-header h4 {
  margin: 4px 0 0;
  color: #123a56;
  font-size: 20px;
}

.boundary-device-header em {
  padding: 5px 10px;
  border-radius: 999px;
  color: #2563a5;
  background: #eef6ff;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.boundary-device-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.boundary-device-actions .secondary-button {
  width: auto;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
}

.boundary-device-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.boundary-device-card {
  display: grid;
  gap: 9px;
  min-height: 128px;
  padding: 14px;
  border: 1px solid #dce8f6;
  border-radius: 14px;
  background: #fbfdff;
}

.device-checkline {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #172b4d;
}

.device-checkline input {
  width: 16px;
  height: 16px;
}

.device-emissions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.device-emissions em {
  padding: 4px 8px;
  border-radius: 999px;
  color: #1d4f8f;
  background: #eaf4ff;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.device-data {
  color: #5b6b82;
  font-size: 13px;
  line-height: 1.45;
}

.hidden-boundary-options {
  display: none;
}

.boundary-notes-grid {
  margin-top: 14px;
}

.boundary-result-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: linear-gradient(135deg, #ffffff 0%, #f7fbff 100%);
}

.boundary-result-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.boundary-result-summary > div {
  min-height: 120px;
  padding: 14px;
  border: 1px solid #dce8f6;
  border-radius: 14px;
  background: #fff;
}

.boundary-result-summary strong {
  display: block;
  margin-bottom: 8px;
  color: #174f91;
  font-size: 15px;
}

.boundary-result-summary ul {
  margin: 0;
  padding-left: 18px;
  color: #3e4c59;
  font-size: 13px;
  line-height: 1.7;
}

.custom-device-dialog {
  width: min(760px, calc(100vw - 40px));
}

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

.custom-device-grid label {
  display: grid;
  gap: 6px;
  color: #30465d;
  font-size: 14px;
  font-weight: 700;
}

@media (max-width: 1180px) {
  .compact-fields,
  .boundary-result-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .boundary-config-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .boundary-step-strip,
  .boundary-info-grid,
  .boundary-device-list,
  .boundary-result-summary {
    grid-template-columns: 1fr;
  }

  .boundary-step-strip span::after {
    display: none;
  }
}

.legend-blue { background: #2f6bff; }
.legend-green { background: #19a35b; }
.legend-purple { background: #6d5bd0; }
.legend-cyan { background: #0ea5e9; }
.legend-pink { background: #ec4899; }
.legend-orange { background: #f59e0b; }
}

.platform-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.platform-flow span {
  padding: 7px 10px;
  border-radius: 999px;
  background: #e8f5fc;
  color: #176d9e;
  font-size: 12px;
  font-weight: 700;
}

.management-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.management-note {
  margin: 8px 0 0;
  color: #627d98;
  font-size: 13px;
  line-height: 1.5;
}

.data-center-header {
  align-items: flex-start;
  padding: 0 0 2px;
  border-bottom: 0;
}

.data-center-header h2 {
  margin: 0;
  color: #1f2d3d;
  font-size: 34px;
  line-height: 1.2;
}

.data-center-header h2::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 28px;
  margin-right: 16px;
  border-radius: 999px;
  vertical-align: -5px;
  background: #2563eb;
}

.data-center-header p {
  margin: 10px 0 0 23px;
  color: #5b6b82;
  font-size: 16px;
  line-height: 1.45;
}

.data-center-layout {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

.data-center-section {
  padding: 20px 22px;
  border: 1px solid #dbe9f3;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(43, 82, 135, 0.07);
}

.data-center-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.data-center-section-title h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: #153e5c;
  font-size: 22px;
  line-height: 1.2;
}

.data-center-section-title h3::before {
  content: "";
  width: 7px;
  height: 26px;
  border-radius: 999px;
  background: #2563eb;
}

.quick-start-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.data-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.project-data-manager .data-card-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.data-action-card {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  width: 100%;
  min-height: 104px;
  padding: 18px 20px;
  border: 1px solid #cfe0f5;
  border-radius: 17px;
  color: #183b56;
  background: linear-gradient(135deg, #f8fbff 0%, rgb(240, 247, 255) 100%);
  box-shadow: 0 8px 20px rgba(43, 82, 135, 0.055);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.data-action-card:hover {
  border-color: #7fb4f4;
  box-shadow: 0 14px 30px rgba(43, 82, 135, 0.13);
  transform: translateY(-2px);
}

.data-action-card strong,
.data-action-card em {
  display: block;
}

.data-action-card strong {
  color: #123a56;
  font-size: 18px;
  line-height: 1.35;
}

.data-action-card em {
  margin-top: 4px;
  color: #627d98;
  font-style: normal;
  font-size: 14px;
  line-height: 1.45;
}

.data-action-icon {
  display: inline-grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 18px;
  color: rgb(54, 116, 190);
  background:
    linear-gradient(135deg, #e6f3fb, #f4faff);
  font-size: 22px;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(54, 116, 190, 0.10);
}

.action-arrow {
  color: rgb(54, 116, 190);
  font-size: 28px;
  font-weight: 700;
}

.mode-status-card {
  cursor: default;
}

.mode-status-card:hover {
  transform: none;
}

.mode-status-card .mode-label {
  margin-top: 6px;
}

.saved-project-status {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  margin: -8px 0 14px 19px;
  padding: 4px 10px;
  border: 1px solid #f2d49b;
  border-radius: 999px;
  color: #9a5a00;
  background: #fff8e6;
  font-size: 13px;
  font-weight: 700;
}

.danger-action-card {
  border-color: #f3c3c1;
  background: linear-gradient(135deg, #fff9f8 0%, #fff0ef 100%);
}

.project-status-card {
  cursor: default;
}

.project-status-card:hover {
  transform: none;
}

.danger-action-card .data-action-icon {
  color: #b42318;
  background: #ffe8e6;
}

.danger-action-card .action-arrow,
.danger-action-card strong {
  color: #b42318;
}

.excel-data-section {
  background: #ffffff;
}

#save-project-data .data-action-icon,
#download-import-template .data-action-icon {
  color: #168056;
  background: linear-gradient(135deg, #dff8ea, #f2fff7);
}

#restore-project-data .data-action-icon {
  color: #0f766e;
  background: linear-gradient(135deg, #ddf8f4, #f3fffc);
}

#import-excel-data .data-action-icon {
  color: #2563eb;
  background: linear-gradient(135deg, #dfeaff, #f5f8ff);
}

#export-result-button-top .data-action-icon {
  color: #6d28d9;
  background: linear-gradient(135deg, #ede9fe, #faf7ff);
}

.primary-data-action {
  border-color: #d7c7ff;
  background: linear-gradient(135deg, #fbf9ff 0%, #f2edff 100%);
}

.primary-data-action .data-action-icon {
  color: #6d28d9;
  background: linear-gradient(135deg, #ede9fe, #faf7ff);
}

.primary-button {
  background: rgb(54, 116, 190);
}

.primary-button:hover {
  background: rgb(43, 96, 163);
}

.secondary-button {
  border-color: #bdd4e5;
  background: #f7fbff;
  color: #195b82;
}

@media (max-width: 1120px) {
  .platform-body {
    grid-template-columns: 1fr;
  }

  .platform-sidebar {
    position: relative;
    top: auto;
    height: auto;
  }

  .platform-topbar h1 {
    white-space: normal;
  }

  .app-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nav-group-title {
    grid-column: 1 / -1;
  }

  .home-hero-grid,
  .home-dashboard-grid,
  .management-grid {
    grid-template-columns: 1fr;
  }

  .process-map-layout {
    grid-template-columns: 1fr;
  }

  .process-map-canvas {
    min-height: 480px;
  }

  .quick-start-grid,
  .data-card-grid,
  .project-data-manager .data-card-grid,
  .excel-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .platform-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-status {
    justify-items: start;
  }

  .platform-content {
    padding: 16px;
  }

  .app-nav {
    grid-template-columns: 1fr;
  }

  .home-source-grid {
    grid-template-columns: 1fr;
  }

  .quick-start-grid,
  .data-card-grid,
  .project-data-manager .data-card-grid,
  .excel-card-grid {
    grid-template-columns: 1fr;
  }
}
