/* ========================================================
   科泰新材料 · 材料计算工具箱 (Toolbox)
   工业冷峻 · 与全站原生设计规范完全统一 · 零排版溢出
   ======================================================== */

.toolbox-container {
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding-bottom: 72px;
}

/* 工具卡片统一容器 */
.tool-card-box {
  background: #ffffff;
  border: 1px solid var(--line, #e2e4e8);
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  box-sizing: border-box;
}

.tool-card-box * {
  box-sizing: border-box;
  min-width: 0;
}

.tool-card-head {
  background: #fafbfc;
  border-bottom: 1px solid var(--line, #e2e4e8);
  padding: 20px 28px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 14px;
}

.tool-card-head .tool-title-group .eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--red, #aa2837);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 4px;
}

.tool-card-head .tool-title-group h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text, #1f2429);
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}

.tool-card-head .tool-title-group p {
  color: var(--muted, #64748b);
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
  max-width: 820px;
}

.tool-card-head .tool-badge {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted, #64748b);
  border: 1px solid var(--line, #e2e4e8);
  border-radius: 3px;
  padding: 4px 10px;
  background: #ffffff;
  white-space: nowrap;
}

/* 卡片双列布局 */
.tool-card-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  border-top: 1px solid var(--line, #e2e4e8);
  width: 100%;
}

@media (max-width: 900px) {
  .tool-card-body {
    grid-template-columns: 1fr;
  }
}

.tool-form-col {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: #ffffff;
  min-width: 0;
  width: 100%;
}

.tool-result-col {
  padding: 24px 28px;
  background: #fafbfc;
  border-left: 1px solid var(--line, #e2e4e8);
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
}

@media (max-width: 900px) {
  .tool-result-col {
    border-left: none;
    border-top: 1px solid var(--line, #e2e4e8);
  }
}

.tool-result-header {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text, #1f2429);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line, #e2e4e8);
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tool-result-header .status-tag {
  font-size: 11px;
  color: var(--muted, #64748b);
  font-weight: normal;
}

/* 表单行与控件输入 */
.tool-form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.tool-form-row label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text, #1f2429);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0;
}

.tool-form-row label small {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: normal;
  color: var(--muted, #64748b);
}

.tool-form-row input,
.tool-form-row select {
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--text, #1f2429);
  padding: 9px 12px;
  border: 1px solid var(--line, #d8dee4);
  border-radius: 3px;
  background: #ffffff;
  outline: none;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  transition: border-color 0.15s ease;
}

.tool-form-row input:focus,
.tool-form-row select:focus {
  border-color: var(--text, #1f2429);
}

/* 快捷预设按钮组 */
.tool-quick-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.tool-chip {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted, #57606a);
  background: #ffffff;
  border: 1px solid var(--line, #d8dee4);
  border-radius: 3px;
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.tool-chip:hover {
  color: var(--text, #1f2429);
  border-color: var(--text, #1f2429);
  background: #f1f5f9;
}

/* 按钮通用 */
.tool-btn-primary {
  font-family: var(--mono);
  background: var(--text, #1f2429);
  color: #ffffff;
  border: 1px solid var(--text, #1f2429);
  padding: 10px 18px;
  border-radius: 3px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.tool-btn-primary:hover {
  background: #000000;
  color: #ffffff;
}

.tool-btn-outline {
  font-family: var(--mono);
  background: #ffffff;
  color: var(--text, #1f2429);
  border: 1px solid var(--line, #d8dee4);
  padding: 9px 16px;
  border-radius: 3px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.tool-btn-outline:hover {
  border-color: var(--text, #1f2429);
  background: #f8fafc;
}

/* 结果表格：工业冷峻等宽排版 */
.tool-table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 12.5px;
  margin-bottom: 16px;
  background: #ffffff;
  border: 1px solid var(--line, #d8dee4);
  box-sizing: border-box;
}

.tool-table th,
.tool-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line, #d8dee4);
  box-sizing: border-box;
}

.tool-table th {
  background: #f1f5f9;
  font-weight: 600;
  color: var(--text, #1f2429);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.tool-table tr:last-child td {
  border-bottom: none;
}

.tool-table .num-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tool-table tr.total-row {
  background: #f8fafc;
  font-weight: 700;
}

/* 工业警告与相容性矩阵盒 */
.tool-notice-box {
  border-left: 3px solid var(--line, #d8dee4);
  background: #ffffff;
  border-top: 1px solid var(--line, #d8dee4);
  border-right: 1px solid var(--line, #d8dee4);
  border-bottom: 1px solid var(--line, #d8dee4);
  border-radius: 3px;
  padding: 12px 14px;
  margin-bottom: 12px;
  font-size: 12px;
  line-height: 1.65;
  color: var(--text, #1f2429);
}

.tool-notice-box.danger {
  border-left-color: var(--red, #aa2837);
  background: #fffcfc;
}

.tool-notice-box.danger .notice-title {
  color: var(--red, #aa2837);
}

.tool-notice-box.caution {
  border-left-color: #b45309;
  background: #fffdf5;
}

.tool-notice-box.caution .notice-title {
  color: #b45309;
}

.tool-notice-box.standard {
  border-left-color: var(--text, #1f2429);
}

.tool-notice-box .notice-title {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
  display: block;
  text-transform: uppercase;
}

/* 动态元素行组件 */
.alloy-element-row {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) 80px 32px;
  gap: 8px;
  align-items: center;
  width: 100%;
}

.alloy-element-row input {
  font-family: var(--mono);
  font-size: 13px;
  padding: 7px 10px;
  border: 1px solid var(--line, #d8dee4);
  border-radius: 3px;
  outline: none;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.alloy-element-row input:focus {
  border-color: var(--text, #1f2429);
}

.alloy-element-row .remove-btn {
  background: none;
  border: 1px solid transparent;
  color: var(--muted, #64748b);
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 3px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.alloy-element-row .remove-btn:hover {
  color: var(--red, #aa2837);
  border-color: var(--line, #d8dee4);
  background: #ffffff;
}

/* 转化引导条 */
.tool-hook-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line, #e2e4e8);
}

/* Evaporation result: give the material name room above its data table. */
#evap-calc-result > h3 { margin: 0 0 12px; }
