/* HR薪酬测算工具集 - 统一样式 */
:root {
  --bg: #fff5ee;
  --ink: #2c1810;
  --muted: #8a6a55;
  --accent: #e05628;
  --accent-2: #f5a623;
  --accent-light: #fde3d0;
  --card: #ffffff;
  --line: #f0d9c8;
  --ok: #27ae60;
  --warn: #e67e22;
  --danger: #e74c3c;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---- Header ---- */
.tool-header {
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(224,86,40,.18), transparent),
    linear-gradient(180deg, #ffe8d6 0%, var(--bg) 100%);
  padding: 36px 0 28px;
}
.breadcrumb {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 18px;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { color: var(--ink); font-weight: 500; }
.tool-head {
  display: flex; align-items: center; gap: 18px;
}
.tool-icon {
  width: 60px; height: 60px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  box-shadow: 0 8px 22px rgba(224,86,40,.28);
  flex-shrink: 0;
}
.tool-head h1 {
  font-size: 24px; font-weight: 800;
  background: linear-gradient(135deg, var(--accent), #c4401a);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.tool-desc { color: var(--muted); font-size: 14px; margin-top: 4px; }

/* ---- Layout ---- */
main { padding: 24px 0 40px; }
.tool-layout {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
@media (max-width: 860px) {
  .tool-layout { grid-template-columns: 1fr; }
}

/* ---- Panel ---- */
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 20px;
}
.panel h2 {
  font-size: 16px; font-weight: 700; margin-bottom: 18px;
  display: flex; align-items: center; gap: 10px;
}
.panel h2::before {
  content: ""; width: 14px; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 2px;
}
.panel h3 { font-size: 14px; font-weight: 600; margin-bottom: 12px; }

/* ---- Form ---- */
.field { margin-bottom: 16px; }
.field label {
  display: block; font-size: 13px; font-weight: 600;
  margin-bottom: 6px; color: var(--ink);
}
.field .hint { font-size: 11px; color: var(--muted); font-weight: 400; margin-left: 4px; }
.input, .select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffaf5;
  font-size: 14px;
  color: var(--ink);
  font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
}
.input:focus, .select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(224,86,40,.12);
}
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 560px) {
  .row, .row-3 { grid-template-columns: 1fr; }
}

/* Slider */
.slider-wrap { display: flex; align-items: center; gap: 12px; }
.slider {
  flex: 1;
  -webkit-appearance: none; appearance: none;
  height: 5px; background: var(--line); border-radius: 3px; outline: none;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); cursor: pointer;
  border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.slider::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); cursor: pointer;
  border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.slider-value {
  min-width: 56px; text-align: center;
  font-weight: 700; color: var(--accent); font-size: 14px;
  padding: 4px 8px; background: var(--accent-light); border-radius: 6px;
}

/* ---- Result Hero ---- */
.result-hero {
  background: linear-gradient(135deg, var(--accent), #c4401a);
  color: #fff; border-radius: 12px;
  padding: 20px; margin-bottom: 16px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px;
}
.result-hero .label { font-size: 12px; opacity: .85; margin-bottom: 4px; }
.result-hero .num { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.result-hero .sub { font-size: 11px; opacity: .75; margin-top: 3px; }
.result-hero .block { min-width: 120px; }
.result-hero .block.gold .num { color: #ffe9a8; }
.result-sub { font-size: 12px; color: var(--muted); text-align: center; }

/* ---- Table ---- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 480px; }
thead th {
  text-align: left; font-weight: 600; font-size: 12px;
  color: var(--muted); padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
thead th.num { text-align: right; }
tbody td { padding: 11px 10px; border-bottom: 1px solid #fbeadd; }
tbody td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
tbody tr:last-child td { border-bottom: none; }
tfoot td {
  padding: 12px 10px; font-weight: 700;
  border-top: 2px solid var(--line);
  background: #fff8f1;
}
tfoot td.num { color: var(--accent); font-size: 14px; }
.tag {
  display: inline-block; padding: 2px 7px;
  background: var(--accent-light); color: var(--accent);
  font-size: 11px; border-radius: 4px;
  font-weight: 500;
}
.tag.ok { background: #e8f8ee; color: #27ae60; }
.tag.warn { background: #fff3e0; color: var(--warn); }
.tag.danger { background: #fdecea; color: var(--danger); }

/* ---- Bar chart ---- */
.bar-row {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 10px;
}
.bar-label { width: 110px; font-size: 13px; color: var(--ink); flex-shrink: 0; }
.bar-track {
  flex: 1; height: 26px; background: #fbeadd;
  border-radius: 6px; overflow: hidden; position: relative;
}
.bar-fill {
  height: 100%; border-radius: 6px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .5s ease;
}
.bar-value {
  width: 90px; text-align: right;
  font-size: 12px; color: var(--muted);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  line-height: 1.3;
}
.bar-value strong { color: var(--ink); font-size: 13px; display: block; }

/* ---- Notice ---- */
.notice {
  margin-top: 14px; padding: 12px 14px;
  background: #fff8e7; border-left: 3px solid var(--accent-2);
  border-radius: 6px;
  font-size: 12px; color: #6b5a2e;
  line-height: 1.7;
}
.notice strong { color: #4a3d1b; }

.analysis-tip {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.7;
}
.analysis-tip.ok { background: #eafaf1; color: #1e7a44; border: 1px solid #b8e6c9; }
.analysis-tip.warn { background: #fff5e6; color: #8a5a1b; border: 1px solid #f0d5a0; }
.analysis-tip.danger { background: #fdecea; color: #a93226; border: 1px solid #f0b4ac; }
.analysis-tip ul { margin: 6px 0 0 18px; }
.analysis-tip li { margin-bottom: 3px; }

/* ---- Sim ---- */
.sim-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px; margin-top: 14px;
}
.sim-item { text-align: center; padding: 14px; background: #fff8f1; border-radius: 10px; }
.sim-k { font-size: 12px; color: var(--muted); }
.sim-v { font-size: 20px; font-weight: 700; color: var(--accent); margin-top: 4px; font-variant-numeric: tabular-nums; }
.sim-d { font-size: 11px; color: var(--ok); margin-top: 2px; }
.sim-note { font-size: 11px; color: var(--muted); margin-top: 12px; text-align: center; }

/* ---- Tool links (侧栏相关工具) ---- */
.tool-links { display: flex; flex-direction: column; gap: 8px; }
.tool-link-btn {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffaf5;
  transition: all .2s;
  color: var(--ink);
}
.tool-link-btn:hover {
  border-color: var(--accent);
  background: #fff;
  transform: translateX(2px);
  box-shadow: 0 4px 12px rgba(224,86,40,.1);
}
.tool-link-btn .tl-icon { font-size: 24px; flex-shrink: 0; }
.tool-link-btn span:nth-child(2) { flex: 1; }
.tool-link-btn strong { display: block; font-size: 14px; }
.tool-link-btn small { font-size: 11px; color: var(--muted); font-weight: 400; }
.tool-link-btn .tl-arrow {
  color: var(--accent); font-size: 18px; font-weight: 300;
  transition: transform .2s;
}
.tool-link-btn:hover .tl-arrow { transform: translateX(3px); }

/* ---- Tools index page ---- */
.tools-hero {
  text-align: center;
  padding: 60px 0 30px;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(224,86,40,.18), transparent),
    linear-gradient(180deg, #ffe8d6 0%, var(--bg) 100%);
}
.tools-hero .tool-icon {
  width: 72px; height: 72px; border-radius: 20px;
  font-size: 34px;
  margin: 0 auto 18px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 32px rgba(224,86,40,.3);
}
.tools-hero h1 {
  font-size: 30px; font-weight: 800;
  background: linear-gradient(135deg, var(--accent), #c4401a);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.tools-hero p { color: var(--muted); font-size: 15px; margin-top: 8px; }

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  padding: 30px 0 40px;
}
.tool-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  transition: all .25s;
  display: block;
  color: var(--ink);
}
.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(224,86,40,.14);
  border-color: #f5c7a8;
}
.tool-card .tc-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: linear-gradient(135deg, #fff0e4, #ffe3cb);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  margin-bottom: 14px;
}
.tool-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.tool-card p { color: var(--muted); font-size: 13px; line-height: 1.6; }
.tool-card .tc-tags { margin-top: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.tool-card .tc-tags span {
  font-size: 11px; padding: 3px 8px;
  background: var(--accent-light); color: var(--accent);
  border-radius: 4px; font-weight: 500;
}

footer {
  text-align: center; padding: 28px 0;
  color: var(--muted); font-size: 12px;
  border-top: 1px solid var(--line);
  margin-top: 20px;
}

/* Print */
@media print {
  body { background: #fff; }
  .panel { break-inside: avoid; border: 1px solid #ddd; }
  .breadcrumb, .slider, .tool-links, .tool-link-btn { display: none; }
}
