/* 股票趋势筛选工作台 v1.2 视觉:浅色专业金融风,卡片化布局 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  background: #eef1f6; color: #1f2430; min-width: 1080px; }

/* ---------- 顶栏 ---------- */
header { display: flex; justify-content: space-between; align-items: center;
  padding: 10px 28px; background: #fff; border-bottom: 1px solid #e3e7ef;
  box-shadow: 0 1px 6px rgba(31, 45, 80, .06); position: sticky; top: 0; z-index: 20; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, #1f6fd8, #3f8ce8);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px; font-weight: bold; }
h1 { font-size: 19px; font-weight: 600; letter-spacing: .5px; }
h2 { font-size: 16px; margin: 18px 0 10px; padding-left: 10px;
  border-left: 4px solid #1f6fd8; font-weight: 600; }
.hint { font-size: 12px; color: #98a0b0; font-weight: normal; margin-left: 8px; }
.toolbar { display: flex; gap: 10px; align-items: center; }

main { max-width: 1320px; margin: 0 auto; padding: 0 20px 10px; }
section { margin-top: 4px; }

/* ---------- 按钮 ---------- */
button { padding: 6px 15px; border: 1px solid #cfd6e4; background: #fff;
  border-radius: 8px; cursor: pointer; font-size: 13px; color: #333;
  transition: all .15s; }
button:hover { background: #f2f5fa; border-color: #1f6fd8; color: #1f6fd8; }
#btn-refresh { background: #1f6fd8; border-color: #1f6fd8; color: #fff; font-weight: 600; }
#btn-refresh:hover { background: #1a5fc0; color: #fff; }
#btn-refresh:disabled { background: #9db8dd; border-color: #9db8dd; cursor: wait; }

/* ---------- 卡片面板 ---------- */
.panel { background: #fff; border-radius: 12px; padding: 14px 16px;
  box-shadow: 0 1px 4px rgba(31, 45, 80, .05), 0 2px 12px rgba(31, 45, 80, .04);
  margin-bottom: 12px; }
.panel-head { display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px; }
.panel-title { font-size: 14px; font-weight: 600; color: #1f2430; }
.panel-count { font-size: 12px; color: #98a0b0; }

/* ---------- 徽章 ---------- */
.badge { padding: 3px 11px; border-radius: 999px; color: #fff; font-size: 12px;
  display: inline-block; line-height: 1.5; box-shadow: inset 0 -1px 2px rgba(0,0,0,.08); }
.badge.强 { background: linear-gradient(135deg, #e04a3a, #c9392b); }
.badge.正常 { background: linear-gradient(135deg, #d8a01f, #b98a1f); }
.badge.偏弱 { background: linear-gradient(135deg, #35a06a, #2e7d4f); }
.badge.加强 { background: linear-gradient(135deg, #e04a3a, #c9392b); }
.badge.持续强势 { background: linear-gradient(135deg, #f07b32, #e0762e); }
.badge.走弱 { background: linear-gradient(135deg, #35a06a, #2e7d4f); }
.badge.一般 { background: linear-gradient(135deg, #9aa3b5, #8890a0); }
.badge.数据获取失败 { background: #5f6672; }
.badge.启动观察 { background: linear-gradient(135deg, #2f86ec, #1f7ae0); }
.badge.趋势观察 { background: linear-gradient(135deg, #22ab7c, #1a9e6e); }
.badge.高位观察 { background: linear-gradient(135deg, #e04a3a, #c9392b); }
.badge.回调观察 { background: linear-gradient(135deg, #d8a01f, #b98a1f); }
.badge.排除 { background: linear-gradient(135deg, #9aa3b5, #8890a0); }
.badge.多头排列 { background: linear-gradient(135deg, #3f8ce8, #1f6fd8); }
.badge.横盘放量 { background: linear-gradient(135deg, #8e6fd8, #6d4fc4); }

/* ---------- 表格 ---------- */
table { width: 100%; border-collapse: collapse; background: #fff; font-size: 13px; }
th, td { padding: 7px 10px; border-bottom: 1px solid #f0f2f7;
  text-align: right; white-space: nowrap; }
th:nth-child(2), td:nth-child(2), th:first-child, td:first-child, td:last-child { text-align: left; }
th { background: #f8fafd; color: #5a6478; font-weight: 600; cursor: pointer;
  user-select: none; position: sticky; top: 0; z-index: 2; }
th:hover { color: #1f6fd8; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: #eef4fd; }
tbody tr:nth-child(even) { background: #fafbfe; }
tbody tr:nth-child(even):hover { background: #eef4fd; }
.panel table { box-shadow: none; }
tbody tr { cursor: pointer; }

/* ---------- 全部板块折叠面板(滑动的下拉) ---------- */
.sector-all-panel { padding: 10px 16px 14px; }
.toggle-all { width: 100%; display: flex; justify-content: center; align-items: center;
  gap: 8px; border: none; background: transparent; font-size: 14px; font-weight: 600;
  color: #1f6fd8; padding: 4px 0; }
.toggle-all:hover { background: transparent; color: #1a5fc0; }
.toggle-all .arrow { font-size: 12px; transition: transform .15s; }
#sector-all-count { font-size: 12px; color: #98a0b0; font-weight: normal; }
#sector-search { width: 100%; margin: 8px 0 10px; padding: 8px 14px;
  border: 1px solid #dde3ee; border-radius: 999px; font-size: 13px; outline: none;
  background: #f8fafd; transition: all .15s; }
#sector-search:focus { border-color: #1f6fd8; background: #fff;
  box-shadow: 0 0 0 3px rgba(31, 111, 216, .12); }
.scroll-box { max-height: 420px; overflow-y: auto; border: 1px solid #eef0f5;
  border-radius: 10px; }
.scroll-box::-webkit-scrollbar { width: 8px; }
.scroll-box::-webkit-scrollbar-thumb { background: #cfd6e4; border-radius: 4px; }
.scroll-box::-webkit-scrollbar-thumb:hover { background: #b3bccc; }

/* ---------- 个股区 ---------- */
.tabs { display: flex; gap: 8px; margin: 10px 0; flex-wrap: wrap; }
.tabs button { border-radius: 999px; }
.tabs button.active { background: #1f6fd8; color: #fff; border-color: #1f6fd8;
  box-shadow: 0 2px 6px rgba(31, 111, 216, .3); }
.atr-toggle { display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; color: #555; cursor: pointer; user-select: none; }

/* ---------- 涨跌色(A股习惯:红涨绿跌) ---------- */
.pos { color: #d43b2f; font-weight: 600; }
.neg { color: #2e7d4f; font-weight: 600; }
.warn { color: #d43b2f; font-weight: bold; }
.hidden { display: none !important; }

/* ---------- 大盘卡片 ---------- */
#market-section { margin-top: 10px; }
#market-verdict { font-size: 15px; padding: 4px 16px; }
#market-detail { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.market-card { background: #fff; border: 1px solid #eef0f5; border-radius: 10px;
  padding: 12px 16px; font-size: 13px; line-height: 1.7;
  box-shadow: 0 1px 4px rgba(31, 45, 80, .05); transition: all .15s; }
.market-card:hover { transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(31, 45, 80, .1); }
.market-card b { display: block; margin-bottom: 2px; font-size: 14px; }

/* ---------- 进度条 ---------- */
#progress { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #666; }
.bar { width: 180px; height: 8px; background: #e3e6ec; border-radius: 4px; overflow: hidden; }
#progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, #1f6fd8, #3f8ce8);
  border-radius: 4px; transition: width .3s; }

/* ---------- 参数面板 ---------- */
#params-panel { position: fixed; right: 0; top: 0; height: 100vh; width: 340px;
  overflow-y: auto; background: #fff; border-left: 1px solid #e3e6ec;
  box-shadow: -4px 0 16px rgba(31, 45, 80, .08); padding: 16px; z-index: 30; }
#params-panel h3 { font-size: 15px; margin-bottom: 10px; }
#params-inputs label { display: flex; justify-content: space-between; align-items: center;
  margin: 9px 0; font-size: 13px; }
#params-inputs input { width: 92px; padding: 5px 8px; border: 1px solid #dde3ee;
  border-radius: 6px; font-size: 13px; }
#params-inputs input:focus { border-color: #1f6fd8; outline: none; }
.params-actions { margin-top: 16px; display: flex; gap: 8px; }
#btn-recalc { background: #1f6fd8; border-color: #1f6fd8; color: #fff; }
#btn-recalc:hover { background: #1a5fc0; color: #fff; }

/* ---------- K线弹窗 ---------- */
#kline-modal { position: fixed; inset: 0; background: rgba(20, 28, 45, .45);
  z-index: 40; display: flex; align-items: center; justify-content: center; }
.modal-box { width: 880px; height: 580px; background: #fff; border-radius: 14px;
  padding: 14px; box-shadow: 0 12px 40px rgba(0, 0, 0, .25); }
.modal-head { display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px; }
.modal-head button { border: none; font-size: 16px; padding: 2px 8px; }
#kline-chart { width: 100%; height: 520px; }

footer { padding: 22px; text-align: center; font-size: 12px; color: #9aa3b5; }

/* ---------- v1.4 长期平台启动面板 ---------- */
.btn-scan { background: linear-gradient(135deg, #8e6fd8, #6d4fc4); color: #fff; border: 0; border-radius: 8px; padding: 8px 16px; cursor: pointer; font-size: 14px; }
.btn-scan:hover { filter: brightness(1.08); }
.badge.core { background: linear-gradient(135deg, #e6a23c, #c0392b); color: #fff; }
.badge.near { background: linear-gradient(135deg, #4a90d9, #2b6cb0); color: #fff; }
.badge.watch { background: #9aa4b2; color: #fff; }
#platform-table th { position: sticky; top: 0; background: #f5f7fa; }
#platform-table tbody tr { cursor: pointer; }
#platform-table tbody tr:hover { background: #f0f4ff; }
.disclaimer-inline { color: #9aa4b2; font-size: 12px; margin: 8px 0 0; }
#platform-empty { color: #9aa4b2; padding: 12px 0; }
#platform-tabs button.active { background: #eef1ff; color: #4a6cf7; border-color: #4a6cf7; }
#scan-progress { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #666; margin: 8px 0; }
#scan-progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, #8e6fd8, #6d4fc4); }
