/* 72硅铁配比模块 */
.ds-stage-ferrosilicon {
  width: var(--ds-stage-width);
  margin: 0 auto;
}

.ds-fs-board {
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: #111827;
}

.ds-fs-head,
.ds-fs-panel {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.ds-fs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
}

.ds-fs-kicker {
  font-size: 11px;
  font-weight: 900;
  color: #1d6fb8;
  letter-spacing: 1.5px;
}

.ds-fs-head h2 {
  margin-top: 4px;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: 0;
}

.ds-fs-permission {
  flex: 0 0 auto;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f3f4f6;
  color: #374151;
  font-size: 12px;
  font-weight: 800;
}

.ds-fs-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.ds-fs-tabs button,
.ds-fs-actions button,
.ds-fs-card-actions button {
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #1f2937;
  border-radius: 8px;
  padding: 9px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.ds-fs-tabs button.is-active,
.ds-fs-actions button.is-primary,
.ds-fs-card-actions button.is-primary {
  background: #1d6fb8;
  border-color: #1d6fb8;
  color: #ffffff;
}

.ds-fs-message {
  padding: 11px 14px;
  border-radius: 8px;
  background: #eef6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
  font-size: 13px;
  font-weight: 800;
}

.ds-fs-grid,
.ds-fs-recipes {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 14px;
  align-items: start;
}

.ds-fs-grid-calc {
  grid-template-columns: minmax(330px, 0.86fr) minmax(0, 1.14fr);
}

.ds-fs-panel {
  padding: 16px;
  min-width: 0;
}

.ds-fs-result-panel {
  overflow: hidden;
}

.ds-fs-panel-title {
  font-size: 15px;
  font-weight: 950;
  margin-bottom: 14px;
  color: #111827;
}

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

.ds-fs-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #4b5563;
  font-size: 12px;
  font-weight: 800;
}

.ds-fs-form-grid input,
.ds-fs-form-grid select,
.ds-fs-form-grid textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 9px 10px;
  background: #ffffff;
  color: #111827;
  font: inherit;
  font-size: 14px;
  outline: none;
}

.ds-fs-form-grid textarea {
  resize: vertical;
}

.ds-fs-form-grid input:focus,
.ds-fs-form-grid select:focus,
.ds-fs-form-grid textarea:focus {
  border-color: #1d6fb8;
  box-shadow: 0 0 0 3px rgba(29, 111, 184, 0.12);
}

.ds-fs-wide {
  grid-column: 1 / -1;
}

.ds-fs-actions,
.ds-fs-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.ds-fs-card-actions {
  margin-top: 0;
}

.ds-fs-empty {
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border: 1px dashed #d1d5db;
  border-radius: 8px;
  color: #6b7280;
  font-size: 14px;
  text-align: center;
}

.ds-fs-result-head,
.ds-fs-detail-head,
.ds-fs-cost-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  margin-bottom: 12px;
}

.ds-fs-result-head span,
.ds-fs-detail-head span,
.ds-fs-cost-row span,
.ds-fs-mini-grid span,
.ds-fs-predicted span {
  display: block;
  color: #6b7280;
  font-size: 12px;
  font-weight: 800;
}

.ds-fs-result-head strong,
.ds-fs-detail-head strong,
.ds-fs-cost-row strong {
  color: #111827;
  font-size: 16px;
}

.ds-fs-result-head .is-good,
.ds-fs-row-metrics .is-good {
  color: #15803d;
}

.ds-fs-result-head .is-bad,
.ds-fs-row-metrics .is-bad {
  color: #dc2626;
}

.ds-fs-mini-grid,
.ds-fs-predicted {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.ds-fs-predicted {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.ds-fs-mini-grid > div,
.ds-fs-predicted > div {
  min-width: 0;
  padding: 12px;
  border-radius: 8px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.ds-fs-mini-grid strong,
.ds-fs-predicted strong {
  display: block;
  margin-top: 4px;
  color: #111827;
  font-size: 18px;
  line-height: 1.15;
  letter-spacing: 0;
}

.ds-fs-mini-grid small {
  display: block;
  margin-top: 4px;
  color: #6b7280;
  font-size: 11px;
}

.ds-fs-table-wrap {
  overflow-x: auto;
  margin-bottom: 12px;
}

.ds-fs-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 580px;
  font-size: 13px;
}

.ds-fs-table th,
.ds-fs-table td {
  padding: 10px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  white-space: nowrap;
}

.ds-fs-table th {
  color: #6b7280;
  background: #f9fafb;
  font-size: 12px;
}

.ds-fs-risks {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.ds-fs-risks > div {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #fed7aa;
  background: #fff7ed;
}

.ds-fs-risks > div.is-danger {
  border-color: #fecaca;
  background: #fef2f2;
}

.ds-fs-risks.is-clean {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #166534;
  font-weight: 800;
}

.ds-fs-risks strong,
.ds-fs-risks span {
  display: block;
}

.ds-fs-risks strong {
  font-size: 13px;
  color: #111827;
}

.ds-fs-risks span {
  margin-top: 3px;
  color: #6b7280;
  font-size: 12px;
}

.ds-fs-process {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.ds-fs-process summary {
  cursor: pointer;
  font-weight: 900;
}

.ds-fs-step {
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border-top: 1px solid #e5e7eb;
}

.ds-fs-step:first-of-type {
  margin-top: 8px;
}

.ds-fs-step span {
  color: #4b5563;
  font-size: 13px;
}

.ds-fs-step code {
  display: block;
  overflow-x: auto;
  color: #1d4ed8;
  font-size: 12px;
  white-space: nowrap;
}

.ds-fs-list {
  display: grid;
  gap: 10px;
}

.ds-fs-row-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
}

.ds-fs-row-card.is-muted {
  opacity: 0.58;
}

.ds-fs-row-card strong,
.ds-fs-row-card span {
  display: block;
}

.ds-fs-row-card strong {
  color: #111827;
  font-size: 14px;
}

.ds-fs-row-card span {
  margin-top: 3px;
  color: #6b7280;
  font-size: 12px;
}

.ds-fs-row-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ds-fs-row-metrics span {
  margin: 0;
  padding: 5px 7px;
  border-radius: 7px;
  background: #f3f4f6;
  color: #374151;
  font-weight: 800;
}

.ds-fs-actual-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.ds-fs-actual-list > div {
  padding: 10px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}

@media (max-width: 1100px) {
  .ds-fs-grid,
  .ds-fs-grid-calc,
  .ds-fs-recipes {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 768px) {
  #page-ferrosilicon.ds-page {
    padding: 12px 12px var(--ds-page-bottom-space);
  }

  .ds-stage-ferrosilicon {
    width: calc(100vw - 24px);
  }

  .ds-fs-head {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px;
  }

  .ds-fs-head h2 {
    font-size: 20px;
  }

  .ds-fs-panel {
    padding: 12px;
  }

  .ds-fs-form-grid,
  .ds-fs-mini-grid,
  .ds-fs-predicted {
    grid-template-columns: 1fr;
  }

  .ds-fs-result-head,
  .ds-fs-detail-head,
  .ds-fs-cost-row {
    align-items: flex-start;
    flex-direction: column;
  }
}
