/* ===== 工具箱公共样式 light.css ===== */
:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --border: #e8eaed;
  --border-focus: #4f6ef7;
  --accent: #4f6ef7;
  --accent-light: #eef1fe;
  --text: #1a1d23;
  --text-sub: #5f6368;
  --text-muted: #9aa0aa;
  --green: #22a855;
  --green-bg: #e6f9f0;
  --red: #e03a52;
  --red-bg: #fdeef1;
  --orange: #e67e22;
  --orange-bg: #fff4e6;
  --gold: #d4890a;
  --radius: 12px;
  --shadow: 0 1px 4px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* TOPBAR */
.topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  height: 52px;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.back {
  display: flex; align-items: center; gap: 6px;
  color: var(--text-sub); text-decoration: none; font-size: 13px;
  padding: 5px 10px; border-radius: 6px; transition: .15s;
}
.back:hover { background: var(--bg); color: var(--accent); }
.topbar-title { font-size: 15px; font-weight: 700; color: var(--text); }
.topbar-sub { font-size: 12px; color: var(--text-muted); margin-left: auto; }

/* CONTAINER */
.container { max-width: 920px; margin: 0 auto; padding: 32px 24px; }
.layout-2 { display: grid; grid-template-columns: 360px 1fr; gap: 24px; }
.layout-1 { max-width: 680px; margin: 0 auto; }
@media(max-width:720px){ .layout-2 { grid-template-columns: 1fr; } }

/* PANEL */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.panel-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 20px;
}

/* FORM */
.form-group { margin-bottom: 18px; }
.form-label { font-size: 13px; color: var(--text-sub); display: block; margin-bottom: 6px; font-weight: 500; }
.form-input {
  width: 100%; padding: 10px 14px;
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: 8px; color: var(--text); font-size: 15px;
  outline: none; transition: border-color .15s, box-shadow .15s;
  -moz-appearance: textfield;
}
.form-input::-webkit-outer-spin-button,
.form-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.form-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(79,110,247,0.1);
}
.form-select {
  width: 100%; padding: 10px 14px;
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: 8px; color: var(--text); font-size: 15px;
  outline: none; cursor: pointer; transition: .15s;
}
.form-select:focus { border-color: var(--border-focus); box-shadow: 0 0 0 3px rgba(79,110,247,0.1); }

/* SLIDER */
.slider-row { display: flex; align-items: center; gap: 10px; }
.slider-row input[type=range] { flex: 1; accent-color: var(--accent); height: 4px; }
.slider-val { min-width: 52px; text-align: right; font-size: 13px; font-weight: 600; color: var(--accent); }

/* RADIO PILLS */
.radio-group { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-pill {
  flex: 1; min-width: 60px; text-align: center; padding: 8px 12px;
  border: 1.5px solid var(--border); border-radius: 8px;
  cursor: pointer; font-size: 13px; font-weight: 500;
  color: var(--text-sub); transition: .15s; background: var(--bg);
}
.radio-pill:hover { border-color: var(--accent); color: var(--accent); }
.radio-pill.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* BTN */
.btn-primary {
  width: 100%; padding: 12px; background: var(--accent); color: #fff;
  border: none; border-radius: 8px; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: .15s;
}
.btn-primary:hover { background: #3a58e0; }

/* RESULT HERO */
.result-hero {
  background: linear-gradient(135deg, #f0f3ff 0%, #f5fff9 100%);
  border: 1px solid #dce2fb;
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  margin-bottom: 16px;
}
.hero-label { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }
.hero-num { font-size: 44px; font-weight: 900; color: var(--green); }
.hero-unit { font-size: 15px; color: var(--text-muted); margin-left: 3px; }

/* STAT GRID */
.stat-grid { display: grid; gap: 10px; margin-bottom: 16px; }
.stat-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.stat-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.stat-grid.cols-4 { grid-template-columns: repeat(4,1fr); }
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px; text-align: center;
  box-shadow: var(--shadow);
}
.stat-label { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; font-weight: 500; }
.stat-val { font-size: 20px; font-weight: 800; }
.stat-val.green { color: var(--green); }
.stat-val.red { color: var(--red); }
.stat-val.orange { color: var(--orange); }
.stat-val.blue { color: var(--accent); }

/* PROGRESS BAR */
.pb-row { margin-bottom: 12px; }
.pb-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-sub); margin-bottom: 5px; }
.pb { height: 8px; border-radius: 6px; background: #eee; overflow: hidden; }
.pb-fill { height: 100%; border-radius: 6px; transition: width .6s ease; }

/* TABLE */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  background: #f7f8fa; color: var(--text-muted); font-weight: 600;
  padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--border);
}
.data-table td { padding: 9px 12px; border-bottom: 1px solid #f0f1f3; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #fafbff; }
.data-table tr.highlight td { color: var(--accent); font-weight: 600; background: var(--accent-light); }
.data-table tr.total td { font-weight: 700; background: #f7f8fa; }

/* TIP BOX */
.tip-box {
  border-radius: 8px; padding: 12px 16px;
  font-size: 12.5px; line-height: 1.75; margin-top: 4px;
}
.tip-box.blue { background: var(--accent-light); border: 1px solid #c5d0fb; color: #3a4fc0; }
.tip-box.green { background: var(--green-bg); border: 1px solid #b3e6cc; color: #1a7a42; }
.tip-box.orange { background: var(--orange-bg); border: 1px solid #fcd6a4; color: #9a5a15; }

/* CHIPS */
.chip-wrap { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: 6px; padding: 5px 11px; font-size: 12px;
  color: var(--text-sub); cursor: pointer; transition: .15s; user-select: none;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.on { background: var(--accent-light); border-color: var(--accent); color: var(--accent); font-weight: 600; }

/* CITY BTN */
.city-grid { display: flex; flex-wrap: wrap; gap: 7px; }
.city-btn {
  padding: 5px 14px; border: 1.5px solid var(--border); border-radius: 6px;
  font-size: 13px; color: var(--text-sub); cursor: pointer; transition: .15s; background: var(--bg);
}
.city-btn:hover { border-color: var(--accent); color: var(--accent); }
.city-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* SCROLL TABLE WRAP */
.scroll-table { overflow-y: auto; max-height: 380px; border-radius: 8px; border: 1px solid var(--border); }
.scroll-table .data-table th { position: sticky; top: 0; z-index: 1; }

/* TOGGLE BTN */
.btn-ghost {
  width: 100%; padding: 9px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text-sub); font-size: 13px; cursor: pointer;
  margin-top: 10px; transition: .15s;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }

/* COMPARE BAR (split) */
.split-bar { height: 14px; border-radius: 7px; overflow: hidden; display: flex; margin: 10px 0 6px; }
.split-seg { height: 100%; transition: width .6s; }
.legend-row { display: flex; gap: 16px; font-size: 12px; color: var(--text-muted); }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 4px; vertical-align: middle; }
