#tool-body {
  --c-primary: #0f766e;
  --c-primary-dark: #115e59;
  --c-primary-soft: #f0fdfa;
  --c-orange: #ea7b24;
  --c-orange-soft: #fdf3e7;
  --c-green: #16a34a;
  --c-green-soft: #e9f7ef;
  --c-bg: #f5f7fa;
  --c-card: #ffffff;
  --c-border: #e4e8ef;
  --c-text: #2b3445;
  --c-text-muted: #8a94a6;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--c-text);
}
.theme-dark-mode #tool-body {
  --c-primary-soft: #132e2b;
  --c-orange-soft: #3a2c1e;
  --c-green-soft: #1e3a2a;
  --c-bg: #1a1d23;
  --c-card: #222222;
  --c-border: #333333;
  --c-text: #e6e8ee;
  --c-text-muted: #9aa1b2;
}

#tool-body .tx-wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 16px 0 40px;
}
#tool-body .tx-card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: 12px;
  padding: 22px 24px;
  margin-bottom: 16px;
}

#tool-body .tx-form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
#tool-body .tx-form-title { font-size: 15px; font-weight: 600; }
#tool-body .tx-reset {
  border: none;
  background: transparent;
  color: var(--c-text-muted);
  font-size: 13px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  transition: all .15s;
}
#tool-body .tx-reset:hover {
  color: var(--c-primary);
  background: var(--c-primary-soft);
}
#tool-body .tx-reset i { margin-right: 4px; }

#tool-body .tx-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}
#tool-body .tx-field label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  color: var(--c-text-muted);
  margin-bottom: 8px;
}
#tool-body .tx-link {
  border: none;
  background: transparent;
  color: var(--c-primary);
  font-size: 12px;
  cursor: pointer;
  padding: 2px 4px;
  white-space: nowrap;
}
#tool-body .tx-link i { margin-left: 3px; transition: transform .15s; }
#tool-body .tx-link.tx-open i { transform: rotate(180deg); }
#tool-body .tx-money .layui-input {
  height: 44px;
  font-size: 16px;
  padding-right: 64px; 
}
#tool-body .tx-money .layui-input-suffix {
  width: auto;      
  padding: 0 12px;
  line-height: 44px;
  font-size: 14px;
  color: var(--c-text-muted);
  white-space: nowrap;
}

#tool-body .tx-panel {
  margin-top: 14px;
  border: 1px dashed var(--c-border);
  border-radius: 10px;
  padding: 16px;
  background: var(--c-bg);
}
#tool-body .tx-panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 20px;
}
#tool-body .tx-p-full { grid-column: 1 / -1; }
#tool-body .tx-p-item > label {
  display: block;
  font-size: 13px;
  color: var(--c-text);
  margin-bottom: 8px;
}
#tool-body .tx-p-item .layui-input-wrap .layui-input { height: 38px; }
#tool-body .tx-p-item .layui-input-suffix {
  width: auto; 
  padding: 0 10px;
  line-height: 38px;
  font-size: 13px;
  color: var(--c-text-muted);
  white-space: nowrap;
}
#tool-body #tx-other,
#tool-body #tx-elder-amt { padding-right: 56px; } 
#tool-body .tx-p-item .layui-form-radio { display: block; margin: 8px 0 0; }
#tool-body .tx-p-item .layui-form-checkbox { margin: 4px 0 0; }
#tool-body .tx-p-item .layui-form-radio span,
#tool-body .tx-p-item .layui-form-checkbox span { font-size: 13px; }
#tool-body .tx-elder-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
#tool-body .tx-elder-row .layui-input-wrap { flex: 1; max-width: 220px; }
#tool-body .tx-disabled { opacity: .45; }
#tool-body .tx-panel-hint {
  margin-top: 12px;
  font-size: 12px;
  color: var(--c-text-muted);
  line-height: 1.7;
}

#tool-body .tx-note {
  margin-top: 14px;
  font-size: 12px;
  color: var(--c-text-muted);
  line-height: 1.7;
}

#tool-body .tx-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
#tool-body .tx-k { font-size: 13px; color: var(--c-text-muted); margin-bottom: 4px; }
#tool-body .tx-v {
  font-size: 28px;
  font-weight: 700;
  color: var(--c-primary);
  line-height: 1.25;
  word-break: break-all;
  font-variant-numeric: tabular-nums;
}
#tool-body .tx-metas { margin-top: 16px; }
#tool-body .tx-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--c-border);
}
#tool-body .tx-meta-row:last-child { border-bottom: none; }
#tool-body .tx-meta-row span { color: var(--c-text-muted); }
#tool-body .tx-meta-row b {
  font-weight: 600;
  text-align: right;
  word-break: break-all;
  font-variant-numeric: tabular-nums;
}

#tool-body .tx-bonus-title { font-size: 15px; font-weight: 600; margin-bottom: 14px; }
#tool-body .tx-bgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
#tool-body .tx-bcard {
  border: 1px solid var(--c-border);
  border-radius: 10px;
  padding: 16px 18px;
  transition: border-color .15s;
}
#tool-body .tx-bcard.tx-better { border-color: var(--c-green); }
#tool-body .tx-b-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
#tool-body .tx-b-name { font-size: 14px; font-weight: 600; }
#tool-body .tx-better-tag {
  display: none;
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 20px;
  background: var(--c-green-soft);
  color: var(--c-green);
}
#tool-body .tx-bcard.tx-better .tx-better-tag { display: inline-block; }
#tool-body .tx-b-v {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
  word-break: break-all;
  font-variant-numeric: tabular-nums;
}
#tool-body #tx-bcard-sep .tx-b-v { color: var(--c-primary); }
#tool-body #tx-bcard-comb .tx-b-v { color: var(--c-orange); }
#tool-body .tx-bcard .tx-meta-row { font-size: 13px; }
#tool-body .tx-diff {
  display: none;
  margin-top: 14px;
  background: var(--c-green-soft);
  color: var(--c-green);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.6;
}
#tool-body .tx-diff b { margin: 0 2px; }

#tool-body .tx-table-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
#tool-body .tx-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
}
#tool-body .tx-table-title { font-size: 15px; font-weight: 600; }
#tool-body .tx-unit-note { font-size: 12px; color: var(--c-text-muted); }
#tool-body .tx-btn {
  padding: 0 16px;
  height: 36px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
}
#tool-body .tx-btn i { margin-right: 6px; }
#tool-body .tx-btn-primary {
  border: none;
  background: var(--c-primary);
  color: #fff;
}
#tool-body .tx-btn-primary:hover { background: var(--c-primary-dark); }
#tool-body .tx-table-wrap {
  overflow: auto;
  border: 1px solid var(--c-border);
  border-radius: 8px;
}
#tool-body .tx-table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  font-size: 13px;
}
#tool-body .tx-table th,
#tool-body .tx-table td {
  padding: 9px 12px;
  text-align: right;
  border-bottom: 1px solid var(--c-border);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
#tool-body .tx-table th:first-child,
#tool-body .tx-table td:first-child { text-align: center; }
#tool-body .tx-table th {
  background: var(--c-card);
  color: var(--c-text-muted);
  font-weight: 600;
}
#tool-body .tx-table tbody tr:nth-child(even) td { background: var(--c-bg); }
#tool-body .tx-table tbody tr:hover td { background: var(--c-primary-soft); }
#tool-body .tx-table tr:last-child td { border-bottom: none; }
#tool-body .tx-table tr.tx-now td { background: var(--c-primary-soft); }
#tool-body .tx-now-tag {
  display: inline-block;
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 12px;
  background: var(--c-primary);
  color: #fff;
  margin-left: 4px;
  vertical-align: 1px;
}
#tool-body .tx-table .tx-empty {
  text-align: center;
  color: var(--c-text-muted);
  padding: 40px 12px;
}

@media (max-width: 700px) {
  #tool-body .tx-card { padding: 16px; }
  #tool-body .tx-fields,
  #tool-body .tx-panel-grid,
  #tool-body .tx-kpi-grid,
  #tool-body .tx-bgrid { grid-template-columns: 1fr; }
  #tool-body .tx-v { font-size: 24px; }
}