/* ===== 个股综合页（stock.html?s=代码）— 数据终端形态 ===== */
:root{--sh-blue:#27548c;--sh-up:#e03131;--sh-dn:#0ca678;--sh-mut:#8a93a5;--sh-edge:#e3e4e6;}


/* ---------------- 头部信息横幅 ---------------- */
.sh-hero{background:transparent;border:0;border-bottom:1px solid rgba(39,84,140,.07);padding:14px 0 10px;margin-bottom:10px;}
.sh-hero[hidden]{display:none !important;}   /* 空态整条隐藏（无代码直达时） */
.sh-warn{background:#fff4e6;border:1px solid #ffd8a8;color:#b45309;border-radius:8px;padding:8px 12px;font-size:12.5px;margin-bottom:8px;}
.sh-warn code{background:#fff;border:1px solid #ffd8a8;border-radius:4px;padding:0 5px;}
.sh-warn2{margin-bottom:10px;border-radius:10px;}
.sh-hero-main{display:flex;gap:28px;align-items:flex-start;flex-wrap:wrap;}
.sh-id{min-width:250px;flex:0 0 auto;}
.sh-tt{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.sh-tt h1{font-size:21px;margin:0;color:#1d2b3e;}
.sh-code{background:#dde9f8;color:var(--sh-blue);border-radius:5px;padding:2px 8px;font-size:12px;font-weight:600;}
.sh-ind{background:#e6f4f1;color:#087f5b;border-radius:5px;padding:2px 8px;font-size:12px;}
.sh-px{display:flex;align-items:baseline;gap:10px;margin-top:6px;}
.sh-px b{font-size:34px;font-weight:700;color:#1d2b3e;letter-spacing:.5px;}
.sh-pct{font-size:15px;font-weight:600;}
.sh-px small{color:var(--sh-mut);font-size:11.5px;}
.sh-kv{flex:1 1 420px;display:grid;grid-template-columns:repeat(auto-fill,minmax(118px,1fr));gap:6px 14px;align-content:start;}
.sh-kv .it{font-size:12px;color:var(--sh-mut);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.sh-kv .it b{color:#1d2b3e;font-weight:600;margin-left:4px;font-size:12.5px;}

/* 52 周位置条 */
.sh-w52{margin-top:12px;padding-top:10px;border-top:1px dashed #dfe8f4;}
.sh-trk-cap{font-size:12px;color:var(--sh-mut);margin-bottom:6px;}
.sh-trk-cap b{color:#1d2b3e;}
.sh-trk{position:relative;height:6px;border-radius:3px;background:linear-gradient(90deg,#e7f5ee,#f1f3f5,#fce9e9);}
.sh-trk-line{position:absolute;inset:0;}
.sh-trk-me{position:absolute;top:-4px;width:3px;height:14px;border-radius:2px;transform:translateX(-50%);}
.sh-trk-me.up{background:var(--sh-up);}
.sh-trk-me.dn{background:var(--sh-dn);}
.sh-trk-ax{display:flex;justify-content:space-between;font-size:11px;color:var(--sh-mut);margin-top:5px;}

/* ---------------- 吸顶 Tab ---------------- */
.sh-tabs{display:flex;gap:2px;padding:4px 8px;position:sticky;top:58px;z-index:40;overflow-x:auto;border-bottom:1px solid var(--sh-edge);margin-bottom:12px;}
.sh-tab{border:0;background:none;font-size:13.5px;color:#5a6478;padding:9px 13px;border-radius:8px 8px 0 0;cursor:pointer;white-space:nowrap;border-bottom:2px solid transparent;font-weight:500;}
.sh-tab:hover{color:var(--sh-blue);background:#f2f6fc;}
.sh-tab.on{color:var(--sh-blue);border-bottom-color:var(--sh-blue);font-weight:700;background:#f7fafd;}
.sh-pane{display:none;margin-bottom:12px;padding:14px 18px 16px;}
.sh-pane.on{display:block;}
.sh-pane-h{display:flex;align-items:center;gap:12px;flex-wrap:wrap;font-size:15.5px;font-weight:700;color:#1d2b3e;margin-bottom:10px;}
.sh-pane-h small{font-weight:400;font-size:11.5px;color:var(--sh-mut);}

/* ---------------- 工具栏（粒度 / 区间）---------------- */
.sh-range{margin-left:auto;display:flex;gap:4px;align-items:center;flex-wrap:wrap;}
.sh-range button{border:1px solid var(--sh-edge);background:#fff;border-radius:7px;font-size:12px;color:#5a6478;padding:4px 11px;cursor:pointer;}
.sh-range button:hover{border-color:var(--sh-blue);color:var(--sh-blue);}
.sh-range button.on{background:var(--sh-blue);border-color:var(--sh-blue);color:#fff;font-weight:600;}
.sh-fsbar i{width:1px;height:16px;background:var(--sh-edge);margin:0 4px;}

/* ---------------- 报表宽表 ---------------- */
.sh-fschart-h{font-size:12.5px;color:#5a6478;margin:2px 0 4px;}
.sh-fschart-h b{color:var(--sh-blue);}
.sh-fschart-h small{color:var(--sh-mut);}
.sh-fswrap{overflow:auto;max-height:990px;border:1px solid var(--sh-edge);border-radius:10px;margin-top:8px;background:#fff;}
.sh-fs{border-collapse:separate;border-spacing:0;font-size:12px;min-width:100%;}
.sh-fs th,.sh-fs td{padding:5px 9px;border-bottom:1px solid #eef0f3;border-right:1px solid #f4f5f7;white-space:nowrap;}
.sh-fs thead th{position:sticky;background:#f5f8fc;color:#41506b;font-weight:600;z-index:3;text-align:right;}
.sh-fs thead tr:first-child th{top:0;border-bottom:1px solid var(--sh-edge);text-align:center;font-size:12.5px;}
.sh-fs thead tr:nth-child(2) th{top:33px;font-weight:500;font-size:11.5px;color:var(--sh-mut);}
.sh-fs thead tr:nth-child(2) th.yoyc{color:#9aa3b2;font-weight:400;}
.sh-fs th.acc-col,.sh-fs td.acc-col{position:sticky;left:0;z-index:2;background:#fff;text-align:left;min-width:212px;max-width:280px;border-right:1px solid var(--sh-edge);}
.sh-fs thead th.acc-col{z-index:5;background:#f5f8fc;}
.sh-fs thead tr:first-child th.acc-col{z-index:6;}
.sh-fs td.acc{cursor:pointer;color:#33405a;}
.sh-fs td.accv{cursor:pointer;}
.sh-fs td.accv:hover{background:#eef4fc !important;box-shadow:inset 0 0 0 1px #c7d6ea;}
.sh-fs tr:hover td{background:#f7faff;}
.sh-fs tr:hover td.acc-col{background:#eef4fc;}
.sh-fs tr.grp td{background:#eef2f8;color:#33405a;font-weight:700;border-bottom:1px solid #dfe5ee;}
.sh-fs tr.grp td.acc{cursor:default;}
.sh-fs tr.grp:hover td{background:#eef2f8;}
.sh-fs tr.sum td{font-weight:700;border-top:1px solid #dfe5ee;background:#fbfcfe;}
.sh-fs tr.sum:hover td{background:#f4f7fd;}
.sh-fs td.num{font-variant-numeric:tabular-nums;color:#1d2b3e;}
.sh-fs td.yoy{font-variant-numeric:tabular-nums;}
.sh-fs td.up{color:var(--sh-up);}
.sh-fs td.dn{color:var(--sh-dn);}
.sh-fs td.z0{color:#8a93a5;}
.sh-fs td.hl{background:rgba(255,212,0,.22) !important;box-shadow:inset 0 0 0 1px rgba(224,170,0,.35);}
.sh-fs .unit{color:var(--sh-mut);font-weight:400;font-size:11px;}

/* ---------------- 通用块（KPI / 小图 / 表格 / 提示）---------------- */
.sh-kpis{display:grid;grid-template-columns:repeat(auto-fill,minmax(128px,1fr));gap:8px;margin-bottom:10px;}
.sh-kpi{background:#f8fafc;border:1px solid #edf0f4;border-radius:9px;padding:8px 10px;min-width:0;}
.sh-kpi .k{font-size:11.5px;color:var(--sh-mut);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.sh-kpi .v{font-size:14.5px;font-weight:700;margin-top:2px;font-variant-numeric:tabular-nums;white-space:nowrap;}
.sh-mini{height:240px;}
.sh-mini-lg{height:280px;}
.sh-chart{height:460px;}
.sh-sub{font-size:13.5px;font-weight:700;color:#1d2b3e;margin:12px 0 8px;}
.sh-sub small{font-weight:400;font-size:11px;color:var(--sh-mut);margin-left:6px;}
.sh-note{font-size:11.5px;color:var(--sh-mut);line-height:1.7;margin-top:8px;}
.sh-err{background:#fdf3f3;border:1px solid #f3d4d4;color:#b03535;border-radius:8px;padding:8px 12px;font-size:12.5px;}
.sh-retry{margin-top:8px;}
.sh-retry-b{border:1px solid var(--sh-edge);background:#fff;color:#27548c;border-radius:7px;padding:5px 12px;font-size:12.5px;cursor:pointer;font-family:inherit;}
.sh-retry-b:hover{background:#f4f7fb;}
.sh-empty2{background:#f8fafc;border:1px dashed var(--sh-edge);color:#5a6478;border-radius:8px;padding:10px 12px;font-size:12.5px;line-height:1.7;}
.sh-inline{font-size:12.5px;color:#5a6478;margin:6px 0 2px;}
.sh-inline small{color:var(--sh-mut);margin-left:8px;}
.sh-loading{display:flex;align-items:center;justify-content:center;color:var(--sh-mut);font-size:12.5px;min-height:60px;}
.sh-src{font-size:11.5px;line-height:1.8;}   /* 居中/沉底由 .pfoot（app.css + nav.js fit()）接管 */

.sh-tbl{width:100%;border-collapse:collapse;font-size:12.5px;}
.sh-tbl th{background:#f5f8fc;color:#41506b;font-weight:600;padding:7px 10px;border-bottom:1px solid var(--sh-edge);text-align:left;white-space:nowrap;}
.sh-tbl td{padding:7px 10px;border-bottom:1px solid #eef0f3;white-space:nowrap;}
.sh-tbl td.num,.sh-tbl th.num{text-align:right;font-variant-numeric:tabular-nums;}
.sh-tbl td.nm{white-space:normal;min-width:180px;}
.sh-tbl .up{color:var(--sh-up);font-weight:600;}
.sh-tbl .dn{color:var(--sh-dn);font-weight:600;}
.sh-tbl .z0{color:var(--sh-mut);}

/* ---------------- 行情 · 多基准对比 ---------------- */
.sh-bench{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin:-4px 0 10px;padding:0 2px;}
.sh-bench[hidden]{display:none !important;}   /* display:flex 会压掉 UA 的 [hidden] */
.sh-bench-lead{font-size:11.5px;color:var(--sh-mut);margin-right:2px;}
.sh-bench button{font:inherit;font-size:12px;color:#41506b;background:#fff;border:1px solid var(--sh-edge);
  border-radius:7px;padding:3px 10px;cursor:pointer;transition:.15s;max-width:220px;overflow:hidden;
  text-overflow:ellipsis;white-space:nowrap;}
.sh-bench button:hover{border-color:var(--sh-blue);color:var(--sh-blue);}
.sh-bench button.on{background:var(--sh-blue);border-color:var(--sh-blue);color:#fff;}
.sh-bench button.on::before{content:'✓ ';font-size:11px;}

.sh-stage td.nm{font-weight:600;color:#33405a;min-width:96px;}
.sh-stage tbody tr:last-child td{border-bottom:none;}
.sh-stage thead th.num{font-weight:600;}

.sh-dg{margin-bottom:14px;}
.sh-dg:last-child{margin-bottom:0;}
.sh-dg-h{font-size:12.5px;font-weight:600;color:#41506b;margin:2px 0 7px;padding-left:8px;border-left:3px solid #c7d6ea;line-height:1.3;}
.sh-dg .sh-kpis{margin-bottom:0;}

/* ---------------- 股东 · 十大股东双向条形图 ---------------- */
.sh-hdsum{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:2px 0 8px;font-size:12.5px;color:#33405a;}
.sh-hdsum-t b{font-size:15px;color:#1d2b3e;}
.sh-hdsum-bar{flex:1;min-width:180px;max-width:420px;height:10px;border-radius:6px;background:repeating-linear-gradient(45deg,#eef1f6 0 6px,#f7f9fc 6px 12px);overflow:hidden;}
.sh-hdsum-bar i{display:block;height:100%;background:#5f6ec4;border-radius:6px;}
.sh-hdsum-legend{font-size:11.5px;color:var(--sh-mut);}
.sh-bimap{position:relative;height:340px;}
.sh-bimap .sh-mini{height:340px !important;}
.sh-bimap-wm{position:absolute;right:14px;bottom:22px;font-size:44px;font-weight:800;color:rgba(93,110,196,.07);
  letter-spacing:2px;pointer-events:none;user-select:none;font-variant-numeric:tabular-nums;}
.sh-bictrl{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-top:6px;}
.sh-bictrl button{font:inherit;font-size:12px;color:#41506b;background:#fff;border:1px solid var(--sh-edge);
  border-radius:7px;padding:3px 10px;cursor:pointer;transition:.15s;}
.sh-bictrl button:hover{border-color:var(--sh-blue);color:var(--sh-blue);}
.sh-bictrl button.on{background:var(--sh-blue);border-color:var(--sh-blue);color:#fff;}
.sh-bictrl button:disabled{opacity:.4;cursor:default;border-color:var(--sh-edge);color:#8a93a5;background:#fff;}
.sh-bicur{font-size:11.5px;color:var(--sh-mut);margin:0 4px;}
.sh-bichips{display:flex;gap:4px;overflow-x:auto;max-width:100%;padding-bottom:2px;}
.sh-bichips button{flex:none;font-size:11px;padding:2px 8px;border-radius:6px;}
.sh-bichips button.on{background:#eef3fb;border-color:#b9cce8;color:var(--sh-blue);font-weight:600;}

/* 语义色 */
.up{color:var(--sh-up);}
.dn{color:var(--sh-dn);}
.z0{color:var(--sh-mut);}

/* ---------------- 工具深链（横幅下方）---------------- */
.sh-tools{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin:-2px 0 10px;padding:0 2px;}
.sh-tools[hidden]{display:none !important;}   /* display:flex 会压掉 UA 的 [hidden]，必须显式声明 */
.sh-tools-cap{font-size:11.5px;color:var(--sh-mut);margin-right:3px;}
.sh-tool{display:inline-flex;align-items:center;gap:5px;text-decoration:none;color:#41506b;font-size:12.5px;
  border:1px solid var(--sh-edge);background:#fff;border-radius:8px;padding:4px 11px;transition:.15s;}
.sh-tool b{font-size:12px;font-weight:400;}
.sh-tool:hover{border-color:var(--sh-blue);color:var(--sh-blue);background:#f6f9fd;}

/* ---------------- 事件语义徽章 ---------------- */
.sh-bg{display:inline-block;border-radius:5px;padding:1px 7px;font-size:11px;font-weight:600;line-height:1.6;white-space:nowrap;}
.sh-bg-p{background:#efe9fd;color:#5f3dc4;}
.sh-bg-r{background:#fdeee4;color:#c1451a;}
.sh-bg-c{background:#e3f4f7;color:#0b7285;}
.sh-bg-n{background:#f1f3f5;color:#7a8494;}

/* ---------------- 事件 / 关联表 ---------------- */
.sh-evwrap{overflow:auto;max-height:540px;border:1px solid var(--sh-edge);border-radius:10px;background:#fff;}
.sh-ev thead th{position:sticky;top:0;z-index:2;}
.sh-ev td.sum{white-space:normal;min-width:280px;line-height:1.6;}
.sh-ev tr.fut td{background:#fbfdff;}
.sh-ev tr.fut td:first-child{box-shadow:inset 3px 0 0 #9dc0e8;}
.sh-cb{min-width:100%;}
.sh-live{color:#087f5b;font-weight:600;}

/* ---------------- 同业对比 ---------------- */
.sh-peers td a{color:#33405a;text-decoration:none;}
.sh-peers td a:hover{color:var(--sh-blue);text-decoration:underline;}
.sh-peers tr.me td{background:#eef4fc !important;font-weight:600;}
.sh-peers td.num{font-variant-numeric:tabular-nums;}

/* ---------------- 产业链位置 ---------------- */
.sh-chain{border:1px solid var(--sh-edge);border-radius:10px;padding:10px 12px;margin-bottom:8px;background:#fcfdfe;}
.sh-chain-h{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:13px;color:#1d2b3e;}
.sh-tier{background:#e7eefb;color:var(--sh-blue);border-radius:5px;padding:1px 7px;font-size:11px;white-space:nowrap;}
.sh-node{color:#33405a;font-weight:600;}
.sh-chain-d{font-size:11.5px;color:var(--sh-mut);line-height:1.7;margin-top:5px;}
.sh-chips2{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px;}
.sh-chip2{display:inline-flex;align-items:center;gap:4px;text-decoration:none;font-size:12px;color:#41506b;
  border:1px solid var(--sh-edge);background:#fff;border-radius:7px;padding:3px 9px;}
.sh-chip2:hover{border-color:var(--sh-blue);color:var(--sh-blue);}
.sh-chip2 b{font-weight:600;}

@media (max-width:760px){
  .sh-hero-main{flex-direction:column;gap:12px;}
  .sh-kv{grid-template-columns:repeat(auto-fill,minmax(104px,1fr));}
  .sh-px b{font-size:27px;}
  .sh-fs td.acc-col{min-width:150px;}
  .sh-range{margin-left:0;}
  .sh-tools{gap:4px;}
  .sh-tool{padding:3px 9px;font-size:12px;}
}

/* ---------------- 三表快捷入口（财务详情 · 独立明细页） ---------------- */
.sh-fslinks{display:flex;align-items:center;gap:8px;justify-content:flex-end;font-size:11.5px;color:#9aa3b2;margin:10px 0 2px;}
.sh-fslinks a{color:#27548c;text-decoration:none;border:1px solid #d5e0ef;background:#f6f9fd;border-radius:7px;padding:3px 10px;font-weight:600;cursor:pointer;}
.sh-fslinks a:hover{background:#eef4fc;}


/* ---------------- 财务分析（杜邦 / 盈利 / 偿债 / 营运） ---------------- */
.fa-bar{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0 2px;}
.fa-pill{border:1px solid #dde4ee;background:#fff;color:#3d4657;font-size:12px;padding:4px 12px;border-radius:99px;cursor:pointer;}
.fa-pill:hover{border-color:#b3c7e2;color:#27548c;}
.fa-pill.on{background:#27548c;border-color:#27548c;color:#fff;}
.fa-pill.fa-all{margin-left:auto;}
.fa-note{font-size:11.5px;color:#8a93a5;line-height:1.8;margin-top:8px;}

/* 杜邦分解：报告期胶囊 + 等式行 + 数值盒 */
.fa-periods{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:6px 0 14px;}
.fa-pl{font-size:12px;color:#8a93a5;}
.fa-per{min-width:64px;}
.fa-eq{display:flex;flex-wrap:wrap;align-items:stretch;gap:8px;margin:0 0 10px;}
.fa-eq2{margin-left:26px;}
.fa-cost{margin-left:26px;}
.fa-box{background:#f7f9fc;border:1px solid #eef1f6;border-radius:10px;padding:8px 14px;min-width:118px;text-align:center;}
.fa-box .t{font-size:11.5px;color:#5a6478;margin-bottom:3px;white-space:nowrap;}
.fa-box .v{font-size:15px;font-weight:700;color:#0a0a0a;font-variant-numeric:tabular-nums;white-space:nowrap;}
.fa-box .s{font-size:10.5px;color:#9aa3b2;margin-top:2px;}
.fa-box.fa-main{background:#eef3fb;border-color:#b3c7e2;}
.fa-box.fa-main .v{color:#27548c;font-size:17px;}
.fa-box.fa-dim{background:#fff;}
.fa-box.fa-dim .v{color:#27548c;font-size:14px;}
.fa-op{display:flex;align-items:center;font-size:16px;color:#8a93a5;font-weight:600;padding:0 2px;}
.fa-hint{font-size:11.5px;color:#8a93a5;margin:-2px 0 12px;line-height:1.7;}
.fa-eq2 .fa-box .t,.fa-cost .fa-box .t{white-space:normal;}
@media (max-width:900px){
  .fa-eq2,.fa-cost{margin-left:0;}
  .fa-box{min-width:96px;padding:7px 10px;}
}
.fa-sec{margin-top:16px;}

/* ===== 杜邦树图（pane-fa · tree 视图） ===== */
.fa-treewrap{overflow-x:auto;padding:4px 0 2px;}
/* width:max-content + margin:auto：窄于容器时居中，宽于容器时从左缘起排（flex 居中会把左侧溢出裁成不可滚动） */
.fa-tree{display:flex;justify-content:center;align-items:flex-start;list-style:none;margin:0 auto;padding:0;width:max-content;}
.fa-tree ul{display:flex;justify-content:center;align-items:flex-start;list-style:none;margin:0;padding:0;}
.fa-tree ul{padding-top:24px;position:relative;}
.fa-tree li{display:flex;flex-direction:column;align-items:center;padding:24px 4px 0;position:relative;}
.fa-tree>li{padding-top:0;}
/* 连接线：每个 li 顶部一条横线 + 垂直短线（经典 org-chart 画法） */
.fa-tree li::before,.fa-tree li::after{content:'';position:absolute;top:0;right:50%;width:50%;height:24px;border-top:1px solid #c9d4e3;}
.fa-tree li::after{right:auto;left:50%;border-left:1px solid #c9d4e3;}
.fa-tree li:only-child::before,.fa-tree li:only-child::after{display:none;}
.fa-tree li:only-child{padding-top:0;}
.fa-tree li:first-child::before{border-top:none;}
.fa-tree li:last-child::after{border-top:1px solid #c9d4e3;border-left:none;border-radius:0;}
.fa-tree li:last-child::before{border-top:1px solid #c9d4e3;border-right:1px solid #c9d4e3;border-radius:0 6px 0 0;}
.fa-tree li:first-child::after{border-radius:6px 0 0 0;}
.fa-tree ul ul::before{content:'';position:absolute;top:0;left:50%;width:0;height:24px;border-left:1px solid #c9d4e3;}
/* 节点盒 */
.fa-tn{position:relative;min-width:98px;max-width:150px;padding:7px 9px 6px;border:1px solid #c9d4e3;border-radius:9px;background:#f7f9fc;text-align:center;}
.fa-tn .t{font-size:11px;color:#5a6478;line-height:1.3;}
.fa-tn .v{font-size:12.5px;font-weight:700;color:#0a0a0a;margin-top:2px;white-space:nowrap;font-variant-numeric:tabular-nums;}
.fa-tn.fa-main{background:#eef4fc;border-color:#27548c;}
.fa-tn.fa-main .v{color:#27548c;font-size:14.5px;}
/* 运算符徽标（＋ − × ÷） */
.fa-to{position:absolute;top:-10px;left:-8px;width:19px;height:19px;line-height:17px;border-radius:50%;background:#fff;border:1px solid #c9d4e3;color:#27548c;font-size:12.5px;font-style:normal;font-weight:700;text-align:center;z-index:1;}

