/* ==========================================================================
   四川国考选岗决策看板 · 样式表
   设计语言参考：王小卤电商中心进销存数智看板（D:\JXC）
   —— 暖橙品牌色 / 象牙暖白底 / 暖灰描边 / 大圆角 / 胶囊控件 / 极淡暖色阴影
   ========================================================================== */

/* ---------------- 1. 设计令牌 ---------------- */
:root {
  /* 品牌主色：暖橙 */
  --brand: #ff5500;
  --brand-hover: #e04b00;
  --brand-soft: #fff2e8;
  --brand-tonal: #ffd8bf;
  --brand-glow: rgba(255, 85, 0, 0.2);

  /* 数据对比色 */
  --gold: #d46b08;   --gold-soft: #fffbe6;
  --green: #237804;  --green-soft: #f6ffed;
  --red: #cf1322;    --red-soft: #fff1f0;
  --blue: #0958d9;   --blue-soft: #e6f4ff;
  --teal: #08979c;   --teal-soft: #e6fffb;

  /* 中性面：暖白而非冷灰 */
  --bg-page: #f8f6f2;
  --surface: #ffffff;
  --surface-low: #fbfaf8;
  --surface-high: #f0ebe3;
  --surface-highest: #e6dfd5;

  --ink: #191b1f;
  --ink-2: #3b424d;
  --muted: #646a73;
  --muted-light: #8f959e;

  --line: #e6dfd5;
  --line-subtle: #f0ebe3;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.02);
  --shadow-hover: 0 8px 24px rgba(255, 85, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04);

  --radius-sm: 8px;
  --radius: 18px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --font: -apple-system, BlinkMacSystemFont, "Google Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-num: "Google Sans", -apple-system, "PingFang SC", tabular-nums, sans-serif;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: var(--font); -webkit-tap-highlight-color: transparent; }
html, body { min-height: 100%; background: var(--bg-page); color: var(--ink); overflow-x: hidden; font-size: 14px; }
button, select { font: inherit; }
button { cursor: pointer; }

/* ---------------- 2. 顶栏 ---------------- */
.top-nav {
  min-height: 72px;
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 32px; gap: 18px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.nav-left { display: flex; align-items: center; gap: 18px; }
.brand-badge { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.pulse-dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--brand);
  box-shadow: 0 0 0 0 var(--brand-glow); animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 85, 0, 0.45); }
  70% { box-shadow: 0 0 0 9px rgba(255, 85, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 85, 0, 0); }
}
.nav-title { font-size: 19px; font-weight: 700; color: var(--ink); letter-spacing: -0.3px; }
.tag-hometown { font-size: 12.5px; font-weight: 600; color: var(--brand); margin-left: 8px; }
.nav-right { display: flex; align-items: center; gap: 20px; }
.stats-ticker { display: flex; gap: 22px; }
.ticker-item { display: flex; flex-direction: column; font-size: 11px; color: var(--muted); }
.ticker-val { font-size: 14px; font-weight: 700; color: var(--ink); margin-top: 3px; font-family: var(--font-num); }
.ticker-val.highlight { color: var(--brand); }
.ticker-val.accent { color: var(--green); }

.btn-outline, .btn-reset {
  height: 36px; padding: 0 18px;
  background: var(--surface-high); border: 1px solid var(--line);
  border-radius: var(--radius-full);
  color: var(--ink-2); font-size: 13px; font-weight: 550;
  transition: all 0.25s var(--ease); box-shadow: var(--shadow-sm);
}
.btn-outline:hover, .btn-reset:hover {
  border-color: var(--brand); color: var(--brand);
  box-shadow: 0 0 14px var(--brand-glow); transform: translateY(-1px);
}

/* ---------------- 3. 布局 ---------------- */
.dashboard-container {
  display: flex; flex-direction: column; gap: 18px;
  padding: 22px 32px 48px; max-width: 1600px; margin: 0 auto;
}
.top-view-row { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(350px, 0.8fr); gap: 18px; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px 20px;
  display: flex; flex-direction: column; gap: 16px;
  transition: box-shadow 0.28s var(--ease), border-color 0.28s var(--ease);
}
.panel-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.panel-title {
  font-size: 15.5px; font-weight: 700; color: var(--ink);
  letter-spacing: -0.2px; display: flex; align-items: center; gap: 9px;
}
.panel-title::before {
  content: ''; width: 4px; height: 16px; border-radius: 4px; flex-shrink: 0;
  background: linear-gradient(180deg, var(--brand), #ffd666);
  box-shadow: 0 0 8px var(--brand-glow);
}
.panel-subtitle { display: block; color: var(--muted); font-size: 12px; margin-top: 5px; }

/* ---------------- 4. 地图控制与图例 ---------------- */
.map-controls { display: flex; flex-shrink: 0; }
.seg-control { display: flex; padding: 3px; background: var(--surface-high); border-radius: var(--radius-full); gap: 3px; }
.seg-btn {
  border: 0; background: transparent; color: var(--muted);
  font-size: 12.5px; font-weight: 550; padding: 8px 15px; border-radius: var(--radius-full);
  transition: all 0.22s var(--ease); white-space: nowrap;
}
.seg-btn.active, .seg-btn:hover { background: #fff; color: var(--brand); box-shadow: var(--shadow-sm); }
.seg-btn.special { color: var(--brand); }

.map-legend-bar {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  padding: 9px 12px; background: var(--surface-low);
  border: 1px solid var(--line-subtle); border-radius: var(--radius-sm);
}
.legend-title { font-size: 12px; font-weight: 600; color: var(--muted); margin-right: 3px; }
.legend-pill {
  padding: 4px 11px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 650; color: #fff; line-height: 1.35;
}
.legend-pill.heat-5 { background: #d4380d; }
.legend-pill.heat-4 { background: #fa8c16; }
.legend-pill.heat-3 { background: #ffc53d; color: #6b4a00; }
.legend-pill.heat-2 { background: #ffe58f; color: #6b4a00; }
.legend-pill.heat-1 { background: #cfc6b8; color: var(--ink-2); }

.map-viewport-wrapper {
  position: relative; height: 574px;
  background: #ece5da;
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
.interactive-map-container { width: 100%; height: 100%; padding: 16px 12px 38px; }
.interactive-map-container svg { width: 100%; height: 100%; display: block; }
.map-region {
  stroke: #fff; stroke-width: 1.4; cursor: pointer;
  transition: opacity 0.2s var(--ease), stroke-width 0.2s var(--ease), filter 0.2s var(--ease);
}
.map-region:hover { stroke: var(--brand); stroke-width: 3; filter: brightness(1.04); }
.map-region.is-active { stroke: var(--brand); stroke-width: 3; }
.ls-base { fill: #f9f0e2; stroke: #e2d5c0; cursor: default; }
.map-label {
  fill: var(--ink); font-size: 10px; font-weight: 700;
  text-anchor: middle; dominant-baseline: middle; pointer-events: none;
  paint-order: stroke; stroke: #fff; stroke-width: 2.6px; stroke-linejoin: round;
}
.map-count {
  fill: var(--muted); font-size: 9px; font-weight: 600;
  text-anchor: middle; dominant-baseline: middle; pointer-events: none;
  font-family: var(--font-num);
}
.belt-marker { cursor: pointer; }
.belt-dot { stroke: #fff; stroke-width: 2.4; transition: stroke-width 0.2s var(--ease); }
.belt-marker:hover .belt-dot { stroke: var(--brand); stroke-width: 4; }
.belt-label {
  fill: var(--ink); font-size: 11.5px; font-weight: 650;
  dominant-baseline: middle; pointer-events: none;
  paint-order: stroke; stroke: #fff; stroke-width: 3.4px; stroke-linejoin: round;
}
.bubble-num {
  fill: #fff; font-size: 10px; font-weight: 700;
  text-anchor: middle; dominant-baseline: middle; pointer-events: none;
  font-family: var(--font-num);
}
.map-status-bar {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  padding: 9px 14px; font-size: 12px; color: var(--muted);
}

.quick-blocks-bar { display: flex; gap: 7px; flex-wrap: wrap; }
.quick-btn {
  border: 1px solid var(--line); color: var(--ink-2); background: var(--surface-low);
  border-radius: var(--radius-full); padding: 7px 14px; font-size: 12px; font-weight: 550;
  transition: all 0.22s var(--ease);
}
.quick-btn:hover { border-color: var(--brand); color: var(--brand); box-shadow: 0 0 12px var(--brand-glow); }
.quick-btn.active { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); font-weight: 650; }

/* ---------------- 5. 右侧研判面板 ---------------- */
.panel-details { min-height: 574px; }
.region-kicker, .modal-kicker, .source-type {
  color: var(--brand); font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
}
.details-header h2 { font-size: 23px; font-weight: 700; margin-top: 7px; letter-spacing: -0.4px; color: var(--ink); }
.details-header p { margin-top: 10px; color: var(--muted); line-height: 1.7; font-size: 13px; }
.details-header b { color: var(--ink); font-family: var(--font-num); }

.metrics-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.metric-card {
  background: var(--surface-low); border: 1px solid var(--line-subtle);
  border-radius: var(--radius-sm); padding: 13px; transition: all 0.22s var(--ease);
}
.metric-card:hover { border-color: var(--brand-tonal); background: var(--brand-soft); }
.metric-card h4 { font-size: 11px; color: var(--muted); font-weight: 500; margin-bottom: 7px; }
.metric-card p { font-size: 17px; font-weight: 700; color: var(--ink); line-height: 1.3; font-family: var(--font-num); }

.strategy-card {
  background: var(--surface-low); border: 1px solid var(--line-subtle);
  border-left: 3px solid var(--brand); padding: 14px; border-radius: var(--radius-sm);
}
.strategy-card strong { font-size: 13px; color: var(--ink); }
.strategy-card p { margin: 7px 0; line-height: 1.65; font-size: 12.5px; color: var(--ink-2); }
.strategy-card small { color: var(--muted-light); font-size: 11px; line-height: 1.55; display: block; }

.sub-panel { border-top: 1px solid var(--line-subtle); padding-top: 15px; }
.sub-title { font-size: 13px; font-weight: 650; margin-bottom: 11px; color: var(--ink); }
.depts-grid { display: flex; flex-wrap: wrap; gap: 7px; }
.dept-badge {
  border: 1px solid var(--brand-tonal); color: var(--brand);
  background: var(--brand-soft); border-radius: var(--radius-full);
  font-size: 11.5px; font-weight: 650; padding: 5px 11px;
}

/* ---------------- 6. 筛选栏 ---------------- */
.filters-bar {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  background: var(--surface-low); border: 1px solid var(--line-subtle);
  padding: 14px; border-radius: var(--radius-sm);
}
.filter-group { display: flex; flex-direction: column; min-width: 0; }
.filter-group label { font-size: 11.5px; color: var(--muted); margin-bottom: 6px; font-weight: 550; }
.form-select {
  width: 100%; height: 36px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: var(--radius-full);
  background: var(--surface); color: var(--ink); font-size: 12.5px;
  outline: none; transition: all 0.25s var(--ease); cursor: pointer;
}
.form-select:hover { border-color: var(--brand-tonal); }
.form-select:focus { border-color: var(--brand); box-shadow: 0 0 12px var(--brand-glow); }
.form-input {
  width: 100%; height: 36px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: var(--radius-full);
  background: var(--surface); color: var(--ink); font-size: 12.5px;
  outline: none; transition: all 0.25s var(--ease);
}
.form-input::placeholder { color: var(--muted-light); }
.form-input:hover { border-color: var(--brand-tonal); }
.form-input:focus { border-color: var(--brand); box-shadow: 0 0 12px var(--brand-glow); }
.key-filter label { color: var(--brand); font-weight: 700; }
.key-filter .form-select { border-color: var(--brand-tonal); background: var(--brand-soft); }
.filter-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.matched-count { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.matched-count b { color: var(--brand); font-family: var(--font-num); }

/* ---------------- 7. 岗位卡片 ---------------- */
.job-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.job-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 15px 16px;
  transition: all 0.26s var(--ease); cursor: pointer;
  display: flex; flex-direction: column;
}
.job-card:hover {
  border-color: rgba(255, 85, 0, 0.35);
  box-shadow: var(--shadow-hover); transform: translateY(-2px);
}
.job-top, .job-card footer { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.job-system {
  color: var(--brand); font-size: 11px; font-weight: 700;
  background: var(--brand-soft); border-radius: var(--radius-full); padding: 3px 10px;
}
.job-num { color: var(--green); font-size: 11.5px; font-weight: 700; font-family: var(--font-num); }
.job-card h4 { font-size: 14px; font-weight: 650; line-height: 1.45; margin: 11px 0 5px; color: var(--ink); }
.job-unit { color: var(--ink-2); font-size: 11.5px; }
.job-work { color: var(--muted); font-size: 11px; margin-top: 4px; }
.job-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 11px; }
.job-tags span {
  font-size: 10.5px; font-weight: 650; border-radius: var(--radius-full);
  padding: 3px 9px; line-height: 1.35; border: 1px solid transparent;
}
.tag-edu   { background: var(--blue-soft);  color: var(--blue); }
.tag-party { background: var(--red-soft);   color: var(--red); }
.tag-base  { background: var(--gold-soft);  color: #b35900; }
.tag-hk    { background: var(--green-soft); color: var(--green); border-color: rgba(35, 120, 4, 0.3) !important; }
.tag-svc   { background: var(--surface-high); color: var(--ink-2); }
.tag-fresh { background: var(--teal-soft);  color: var(--teal); }
.tag-fit   { background: var(--red-soft);   color: var(--red); }
.tag-sex   { background: var(--surface-high); color: var(--ink-2); }
.job-card footer {
  border-top: 1px solid var(--line-subtle); margin-top: 13px; padding-top: 10px;
  color: var(--muted-light); font-size: 10.5px;
}
.empty-tip {
  grid-column: 1 / -1; padding: 30px; text-align: center; color: var(--muted);
  font-size: 13px; background: var(--surface-low);
  border: 1px dashed var(--line); border-radius: var(--radius);
}

/* ---------------- 8. 分页 ---------------- */
.pager {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; padding: 2px; min-height: 18px;
}
.pg-info { color: var(--muted); font-size: 12.5px; }
.pg-info b { color: var(--ink); font-family: var(--font-num); }
.pg-nav { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.pg-btn {
  height: 32px; min-width: 32px; padding: 0 12px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-2); border-radius: var(--radius-full);
  font-size: 12.5px; font-weight: 550; transition: all 0.2s var(--ease);
}
.pg-btn:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); box-shadow: 0 0 10px var(--brand-glow); }
.pg-btn.active {
  background: linear-gradient(135deg, #ff4d00, #ff8533);
  border-color: transparent; color: #fff; font-weight: 700;
  box-shadow: 0 3px 12px rgba(255, 77, 0, 0.35);
}
.pg-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.pg-gap { color: var(--muted-light); padding: 0 2px; }
.pg-size { color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.pg-size select {
  height: 32px; border: 1px solid var(--line); border-radius: var(--radius-full);
  padding: 0 10px; font-size: 12.5px; background: var(--surface); color: var(--ink); cursor: pointer;
}
#section-jobs { scroll-margin-top: 92px; }

/* ---------------- 9. 决策要点 ---------------- */
.decision-columns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.decision-card {
  background: var(--surface-low); border: 1px solid var(--line-subtle);
  border-radius: var(--radius-sm); padding: 15px; border-left: 3px solid var(--brand);
}
.decision-card.highlight-border { border-left-color: var(--gold); background: var(--gold-soft); }
.decision-card.alert-border { border-left-color: var(--red); background: var(--red-soft); }
.decision-badge { font-size: 11px; color: var(--brand); font-weight: 700; margin-bottom: 8px; }
.decision-card.highlight-border .decision-badge { color: var(--gold); }
.decision-card.alert-border .decision-badge { color: var(--red); }
.decision-card h4 { font-size: 13px; font-weight: 650; margin-bottom: 7px; color: var(--ink); }
.decision-card p { font-size: 12px; line-height: 1.7; color: var(--ink-2); }
.decision-card strong { color: var(--ink); }
.decision-card em { font-style: normal; color: var(--brand); font-weight: 600; }

/* ---------------- 10. 数据来源 ---------------- */
.panel-sources { margin: 0 32px 24px; max-width: 1536px; }
.source-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.source-item {
  display: flex; flex-direction: column; gap: 5px; padding: 14px;
  border: 1px solid var(--line); background: var(--surface);
  border-radius: var(--radius-sm); color: var(--ink-2); text-decoration: none;
  min-height: 110px; transition: all 0.24s var(--ease);
}
.source-item:hover { border-color: var(--brand-tonal); background: var(--brand-soft); }
.source-item strong { font-size: 13px; font-weight: 650; color: var(--ink); }
.source-item small { color: var(--muted); line-height: 1.55; font-size: 11.5px; }
.source-item.note .source-type { color: var(--gold); }

/* ---------------- 11. 岗位详情弹窗 ---------------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(25, 27, 31, 0.45);
  backdrop-filter: blur(3px); display: none; align-items: center; justify-content: center; z-index: 1000;
}
.modal-card {
  background: var(--surface); border-radius: var(--radius-lg);
  width: 90%; max-width: 760px; max-height: 86vh; overflow-y: auto;
  padding: 26px; position: relative; box-shadow: 0 12px 40px rgba(25, 27, 31, 0.28);
}
.modal-close {
  position: absolute; top: 14px; right: 18px; background: var(--surface-high);
  border: 0; width: 32px; height: 32px; border-radius: 50%;
  font-size: 20px; line-height: 1; color: var(--muted); transition: all 0.2s var(--ease);
}
.modal-close:hover { background: var(--brand-soft); color: var(--brand); }
.modal-body h2 { font-size: 20px; font-weight: 700; margin: 7px 0 18px; letter-spacing: -0.3px; }
.modal-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.modal-grid div {
  background: var(--surface-low); border: 1px solid var(--line-subtle);
  padding: 11px; border-radius: var(--radius-sm); display: flex; flex-direction: column; gap: 4px;
}
.modal-grid b { color: var(--muted); font-size: 10.5px; font-weight: 500; }
.modal-grid span { color: var(--ink); font-size: 12.5px; line-height: 1.5; }
.modal-desc { margin-top: 16px; line-height: 1.7; color: var(--ink-2); font-size: 12.5px; }
.modal-desc b { color: var(--ink); }
.modal-warning {
  margin-top: 14px; padding: 12px; border-radius: var(--radius-sm);
  border-left: 3px solid var(--gold); background: var(--gold-soft);
  color: #7a4b00; line-height: 1.6; font-size: 11.5px;
}

.app-footer { text-align: center; padding: 22px; font-size: 11.5px; color: var(--muted-light); }

/* ---------------- 12. 响应式 ---------------- */
@media (max-width: 1100px) {
  .top-view-row { grid-template-columns: 1fr; }
  .filters-bar { grid-template-columns: repeat(3, 1fr); }
  .decision-columns, .source-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-ticker { display: none; }
}
@media (max-width: 700px) {
  .top-nav { min-height: auto; padding: 13px 16px; align-items: flex-start; gap: 10px; }
  .nav-left { display: block; gap: 7px; }
  .brand-badge { margin-bottom: 5px; }
  .nav-title { font-size: 16.5px; }
  .tag-hometown { display: block; margin: 4px 0 0; font-size: 11px; }
  .top-nav .btn-outline { font-size: 11px; padding: 0 12px; }
  .dashboard-container { padding: 14px 12px 32px; }
  .panel { padding: 14px; }
  .panel-header { align-items: flex-start; flex-direction: column; }
  .map-controls { width: 100%; }
  .seg-control { width: 100%; }
  .seg-btn { flex: 1; font-size: 11px; padding: 8px 6px; }
  .map-viewport-wrapper { height: 430px; }
  .interactive-map-container { padding: 10px 6px 36px; }
  .map-label { font-size: 9px; }
  .map-count { font-size: 8px; }
  .bubble-num { font-size: 8px; }
  .belt-label { font-size: 10px; }
  .filters-bar { grid-template-columns: 1fr; }
  .filter-actions { align-items: flex-start; flex-direction: column; gap: 7px; }
  .job-cards-grid { grid-template-columns: 1fr; }
  .decision-columns, .source-grid { grid-template-columns: 1fr; }
  .panel-sources { margin: 0 12px 18px; }
  .modal-grid { grid-template-columns: 1fr; }
  .pager { flex-direction: column; align-items: stretch; gap: 9px; }
  .pg-nav { justify-content: center; }
  .pg-info, .pg-size { justify-content: center; text-align: center; }
}
