:root{
  --bg:#f8fbff;
  --panel:#ffffff;
  --line:#e4e9f0;
  --line-strong:#d7dee8;
  --text:#1f2937;
  --muted:#8a94a3;
  --soft:#f9fafc;
  --soft2:#f3f6f9;
  --accent:#202a36;
  --danger:#b74b4b;
  --radius:10px;
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
  background:var(--bg);
  color:var(--text);
}
.page{
  max-width:1440px;
  margin:0 auto;
  padding:28px 30px 40px;
}
.topbar{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  margin-bottom:18px;
}
.title-wrap h1{
  font-size:22px;
  line-height:1.25;
  margin:0 0 6px;
  font-weight:650;
  letter-spacing:.2px;
}
.title-wrap p{
  margin:0;
  font-size:13px;
  color:var(--muted);
}
.badge{
  padding:7px 10px;
  border:1px solid var(--line);
  background:#fff;
  border-radius:7px;
  font-size:12px;
  color:#697586;
}
.panel{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:0 1px 2px rgba(16,24,40,.02);
}
.section-head{
  height:48px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 16px;
  border-bottom:1px solid var(--line);
}
.section-title{
  font-size:14px;
  font-weight:650;
}
.section-sub{
  font-size:12px;
  color:var(--muted);
}
.parameter-panel{overflow:hidden}
.param-table{
  width:100%;
  border-collapse:collapse;
  table-layout:fixed;
}
.param-table col.drag{width:44px}
.param-table col.name{width:20%}
.param-table col.type{width:25%}
.param-table col.setting{width:38%}
.param-table col.note{width:auto}
.param-table col.action{width:46px}
.param-table th{
  background:#fbfcfd;
  border-bottom:1px solid var(--line);
  color:#667085;
  font-size:12px;
  font-weight:600;
  text-align:left;
  padding:10px 10px;
}
.param-table th:first-child{text-align:center}
.param-table td{
  border-bottom:1px solid var(--line);
  padding:7px 10px;
  vertical-align:middle;
  background:#fff;
}
.param-table tbody tr:last-child td{border-bottom:none}
.param-table tbody tr.dragging td{
  background:#f7f9fc;
  opacity:.62;
}
.param-table tbody tr.drag-over td{
  border-top:2px solid #9aa5b1;
}
.drag-handle{
  width:24px;height:30px;
  display:flex;align-items:center;justify-content:center;
  margin:auto;
  color:#a4adba;
  cursor:grab;
  user-select:none;
  font-size:17px;
  letter-spacing:-2px;
}
.drag-handle:active{cursor:grabbing}
input,select,button{font:inherit}
.cell-input,.cell-select,.mini-input,.note-input{
  width:100%;
  height:34px;
  border:1px solid var(--line-strong);
  border-radius:6px;
  background:#fff;
  color:#27313d;
  outline:none;
  padding:0 10px;
  font-size:13px;
  transition:border-color .15s,box-shadow .15s,background .15s;
}
.cell-input::placeholder,.mini-input::placeholder,.note-input::placeholder{
  color:#b3bbc6;
}
.cell-input:focus,.cell-select:focus,.mini-input:focus,.note-input:focus{
  border-color:#9aa5b1;
  box-shadow:0 0 0 3px rgba(154,165,177,.12);
}
.cell-select{
  appearance:none;
  background:
    linear-gradient(45deg,transparent 50%,#8b95a3 50%) calc(100% - 16px) 14px/5px 5px no-repeat,
    linear-gradient(135deg,#8b95a3 50%,transparent 50%) calc(100% - 11px) 14px/5px 5px no-repeat,
    #fff;
  padding-right:28px;
}
.setting-wrap{
  display:grid;
  gap:6px;
}
.setting-wrap.two{grid-template-columns:1fr 1fr}
.setting-wrap.three{grid-template-columns:1fr 1fr 1fr}
.setting-wrap.one{grid-template-columns:1fr}
.mini-input{
  background:#fcfdfe;
}
.remove-btn{
  width:30px;height:30px;
  border:none;background:transparent;
  color:#b0b7c2;cursor:pointer;border-radius:6px;
  font-size:18px;
}
.remove-btn:hover{background:#faf0f0;color:var(--danger)}
.param-actions{
  padding:12px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-top:1px solid var(--line);
  background:#fcfdfe;
}
.btn{
  height:34px;
  border-radius:7px;
  border:1px solid var(--line-strong);
  background:#fff;
  color:#344054;
  padding:0 12px;
  cursor:pointer;
  font-size:13px;
}
.btn:hover{background:#f8fafc}
.btn.primary{
  background:var(--accent);
  color:#fff;
  border-color:var(--accent);
  padding:0 18px;
}
.btn.primary:hover{background:#111923}
.workspace{
  display:grid;
  grid-template-columns:360px minmax(0,1fr);
  gap:16px;
  margin-top:16px;
}
.control-panel{padding-bottom:14px}
.controls{
  padding:14px 16px 4px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
.field.full{grid-column:1 / -1}
.field label{
  display:block;
  font-size:12px;
  color:#697586;
  margin:0 0 6px;
}
.field input,.field select{
  width:100%;
  height:36px;
  border:1px solid var(--line-strong);
  border-radius:6px;
  padding:0 10px;
  outline:none;
  background:#fff;
  color:#27313d;
  font-size:13px;
}
.field input:focus,.field select:focus{
  border-color:#9aa5b1;
  box-shadow:0 0 0 3px rgba(154,165,177,.12);
}
.generate-wrap{padding:10px 16px 0}
.generate-wrap .btn{width:100%;height:38px}
.metrics{
  display:grid;
  grid-template-columns:repeat(4,minmax(120px,1fr));
  border-bottom:1px solid var(--line);
}
.metric{
  padding:13px 15px;
  border-right:1px solid var(--line);
}
.metric:last-child{border-right:none}
.metric .label{
  font-size:11px;
  color:#8a94a3;
  margin-bottom:5px;
}
.metric .value{
  font-size:17px;
  font-variant-numeric:tabular-nums;
  font-weight:620;
}
.output-panel{overflow:hidden}
.output-head{
  display:flex;justify-content:space-between;align-items:center;
  padding:11px 14px;border-bottom:1px solid var(--line);
}
.output-tools{display:flex;gap:8px;align-items:center}
.table-wrap{
  overflow:auto;
  max-height:450px;
}
.output-table{
  border-collapse:separate;
  border-spacing:0;
  min-width:100%;
  width:max-content;
  font-size:12px;
}
.output-table th,.output-table td{
  min-width:126px;
  padding:8px 12px;
  border-right:1px solid var(--line);
  border-bottom:1px solid var(--line);
  background:#fff;
  white-space:nowrap;
  text-align:right;
  font-variant-numeric:tabular-nums;
}
.output-table th{
  position:sticky;top:0;z-index:2;
  background:#fafbfc;
  color:#667085;
  font-weight:600;
}
.output-table th:first-child,.output-table td:first-child{
  position:sticky;left:0;
  min-width:64px;
  text-align:center;
  background:#fafbfc;
  z-index:1;
}
.output-table th:first-child{z-index:3}
.output-table tr:last-child td{border-bottom:none}
.output-empty{
  min-height:270px;
  display:flex;align-items:center;justify-content:center;
  color:#a2aab5;font-size:13px;
}
.hint{
  padding:10px 16px 0;
  color:#98a2b3;
  font-size:11px;
  line-height:1.5;
}
.toast{
  position:fixed;
  right:24px;bottom:24px;
  padding:10px 14px;
  background:#222b35;color:#fff;border-radius:7px;
  font-size:12px;opacity:0;transform:translateY(5px);
  pointer-events:none;transition:.2s;
}
.toast.show{opacity:1;transform:translateY(0)}
@media(max-width:980px){
  .page{padding:18px 14px 30px}
  .parameter-panel{overflow-x:auto}
  .param-table{min-width:880px}
  .workspace{grid-template-columns:1fr}
  .metrics{grid-template-columns:1fr 1fr}
  .metric:nth-child(2){border-right:none}
  .metric:nth-child(-n+2){border-bottom:1px solid var(--line)}
}
@media(max-width:560px){
  .topbar{align-items:flex-start}
  .title-wrap h1{font-size:20px}
  .badge{display:none}
  .controls{grid-template-columns:1fr}
  .field.full{grid-column:auto}
  .output-head{align-items:flex-start;flex-direction:column;gap:10px}
}
