/* =========================================================
   Bit刚刚交易体系 - 方案三正式版
   左侧导航 + 右侧专业工作台
   仅前端布局，不改交易公式
   ========================================================= */

:root{
  --s3-bg:#071019;
  --s3-panel:#0b1722;
  --s3-panel2:#0e1d2a;
  --s3-border:#203d52;
  --s3-border2:#2b5878;
  --s3-text:#e8f2f8;
  --s3-muted:#8ea8ba;
  --s3-blue:#2b92ff;
  --s3-blue2:#126fd2;
  --s3-green:#35df89;
  --s3-red:#ff6675;
  --s3-gold:#f6c74d;
  --s3-side:224px;
}

html{scroll-behavior:smooth}
body{background:var(--s3-bg)!important}

body.scheme3-ready main{
  max-width:none!important;
  width:auto!important;
  margin:0!important;
  padding:0!important;
}

.scheme3-shell{
  display:grid;
  grid-template-columns:var(--s3-side) minmax(0,1fr);
  min-height:calc(100vh - 58px);
}

.scheme3-sidebar{
  position:sticky;
  top:0;
  align-self:start;
  height:100vh;
  box-sizing:border-box;
  border-right:1px solid #183246;
  background:linear-gradient(180deg,#08121c 0%,#091621 65%,#071019 100%);
  padding:14px 10px;
  display:flex;
  flex-direction:column;
  z-index:70;
}

.scheme3-side-brand{
  display:flex;
  gap:9px;
  align-items:center;
  min-height:42px;
  padding:4px 8px 12px;
  border-bottom:1px solid #173044;
  margin-bottom:10px;
}
.scheme3-side-logo{
  width:30px;height:30px;border-radius:8px;
  display:grid;place-items:center;
  background:linear-gradient(145deg,#126dd2,#37a3ff);
  color:#fff;font-size:16px;font-weight:900;
  box-shadow:0 6px 18px rgba(31,126,219,.24);
}
.scheme3-side-brand strong{display:block;color:#eef8ff;font-size:14px}
.scheme3-side-brand small{display:block;color:#6f8ea4;font-size:10px;margin-top:2px}

.scheme3-nav-group{margin-bottom:12px}
.scheme3-nav-label{
  padding:7px 10px 5px;
  color:#58798f;
  font-size:10px;
  font-weight:800;
  letter-spacing:.1em;
}
.scheme3-nav-btn{
  width:100%;
  border:1px solid transparent!important;
  background:transparent!important;
  color:#b9cfdd!important;
  border-radius:8px!important;
  padding:10px 11px!important;
  margin:2px 0!important;
  display:flex!important;
  align-items:center!important;
  gap:9px!important;
  justify-content:flex-start!important;
  font-size:13px!important;
  font-weight:700!important;
  cursor:pointer;
  text-align:left!important;
}
.scheme3-nav-btn:hover{
  background:#0d2231!important;
  color:#fff!important;
  border-color:#1b4059!important;
}
.scheme3-nav-btn.active{
  background:linear-gradient(90deg,#0e64bd,#177ddd)!important;
  color:#fff!important;
  border-color:#2c91ee!important;
  box-shadow:0 5px 16px rgba(19,108,198,.22);
}
.scheme3-nav-btn .ico{
  width:18px;text-align:center;font-size:14px;opacity:.95
}
.scheme3-nav-count{
  margin-left:auto;
  min-width:20px;
  padding:2px 6px;
  border-radius:999px;
  background:#263b15;
  color:#cde76f;
  font-size:10px;
  text-align:center;
}
.scheme3-side-bottom{margin-top:auto;border-top:1px solid #173044;padding-top:9px}

.scheme3-workspace{
  min-width:0;
  padding:12px 14px 28px;
  box-sizing:border-box;
}

.scheme3-workspace > section,
.scheme3-workspace > .panel,
.scheme3-workspace > .table-panel{
  margin-bottom:12px!important;
}

.scheme3-workspace .search-panel{
  padding:10px 12px!important;
}

.scheme3-workspace .search-panel .section-title{
  display:none!important;
}

/* 顶部旧“最新”入口退出视觉层 */
#h1LatestBtn,#m5LatestBtn{display:none!important}

/* 原顶部关键K入口隐藏，左侧导航替代 */
.scheme3-workspace .search-panel #openKeyK{display:none!important}

/* 关键K核心主区 */
.scheme3-keyk-section{
  border:1px solid #1e6ca9!important;
  border-radius:12px;
  background:
    radial-gradient(circle at 92% 10%,rgba(37,139,255,.14),transparent 30%),
    linear-gradient(135deg,#091620,#0b1a27 56%,#0a1721)!important;
  box-shadow:0 10px 28px rgba(0,0,0,.16);
  overflow:hidden;
}

.scheme3-keyk-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 16px 7px;
}
.scheme3-keyk-title{
  display:flex;align-items:center;gap:9px;flex-wrap:wrap
}
.scheme3-keyk-title strong{font-size:20px;color:#fff}
.scheme3-keyk-title .core{
  font-size:10px;font-weight:900;
  padding:3px 7px;border-radius:999px;
  color:#06131d;background:#55b2ff;
}
.scheme3-keyk-sub{font-size:11px;color:#7fa4bc;margin-top:4px}

.scheme3-keyk-section #keyKPanel{
  display:block!important;
  position:static!important;
  inset:auto!important;
  z-index:auto!important;
  background:transparent!important;
  overflow:visible!important;
  padding:0 10px 12px!important;
}
.scheme3-keyk-section #keyKPanel.hidden{display:block!important}
.scheme3-keyk-section #keyKPanel > div{
  max-width:none!important;
  margin:0!important;
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
  padding:8px 5px 2px!important;
  box-sizing:border-box!important;
  color:inherit!important;
}
.scheme3-keyk-section #keyKPanel > div > div:first-child{
  display:none!important;
}
#closeKeyK{display:none!important}

/* 关键K表格 */
.scheme3-keyk-section table{
  border-collapse:collapse!important;
}
.scheme3-keyk-section th{
  background:#102435!important;
  color:#9eb7c8!important;
}
.scheme3-keyk-section td,.scheme3-keyk-section th{
  border-bottom:1px solid #1c3445!important;
}

/* 我的关键K */
.scheme3-mykeyk{
  border:1px solid #25465d;
  border-radius:10px;
  background:#0a1721;
  padding:12px;
}
.scheme3-section-head{
  display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:9px
}
.scheme3-section-head strong{font-size:15px;color:#eef8ff}
.scheme3-section-head small{color:#6f8ea4}
.scheme3-mykeyk-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:7px;
}
.scheme3-mykeyk-item{
  min-width:0;
  border:1px solid #24465d;
  background:#0c1b27;
  border-radius:8px;
  padding:8px 9px;
  display:grid;
  grid-template-columns:auto auto 1fr auto;
  gap:8px;
  align-items:center;
  font-size:12px;
}
.scheme3-mykeyk-item b{color:#fff}
.scheme3-mykeyk-item span{color:#9fb6c5}
.scheme3-mykeyk-item .long{color:var(--s3-green);font-weight:800}
.scheme3-mykeyk-item .short{color:var(--s3-red);font-weight:800}
.scheme3-mykeyk-empty{
  grid-column:1/-1;
  text-align:center;color:#718da0;
  padding:16px 8px;
  border:1px dashed #24465d;
  border-radius:8px;
}

/* 辅助判断容器 */
.scheme3-assist-section{
  border:1px solid #203d52;
  border-radius:10px;
  background:#091620;
  padding:12px;
}
.scheme3-assist-grid{
  display:grid;
  grid-template-columns:1.15fr 1.15fr;
  gap:10px;
}
.scheme3-assist-grid > section{
  margin:0!important;
  height:100%;
}
.scheme3-assist-grid .breadth-panel,
.scheme3-assist-grid .day-structure-panel{
  border:0!important;
  background:#0d1c28!important;
}

/* 全市场扫描组合 */
.scheme3-market-section{
  border:1px solid #203d52;
  border-radius:10px;
  background:#091620;
  padding:10px;
}
.scheme3-market-section > section,
.scheme3-market-section > .table-panel{
  margin:0 0 9px!important;
}
.scheme3-market-section > :last-child{margin-bottom:0!important}

/* 页面原模块标题统一 */
.scheme3-workspace .section-title{
  font-weight:800!important;
}

/* 宽屏优化 */
@media(min-width:1450px){
  :root{--s3-side:236px}
  .scheme3-workspace{padding-left:18px;padding-right:18px}
}

/* 平板/手机：左侧变顶部横向导航 */
@media(max-width:900px){
  .scheme3-shell{display:block}
  .scheme3-sidebar{
    position:sticky;
    top:0;
    width:100%;
    height:auto;
    padding:7px 8px;
    border-right:0;
    border-bottom:1px solid #183246;
    overflow-x:auto;
    display:block;
  }
  .scheme3-side-brand,.scheme3-nav-label,.scheme3-side-bottom{display:none!important}
  .scheme3-nav-group{
    display:flex;
    gap:6px;
    margin:0;
    width:max-content;
  }
  .scheme3-nav-btn{
    width:auto!important;
    white-space:nowrap!important;
    padding:8px 10px!important;
  }
  .scheme3-nav-btn .ico{width:auto}
  .scheme3-nav-count{margin-left:4px}
  .scheme3-workspace{padding:9px 8px 22px}
  .scheme3-mykeyk-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .scheme3-assist-grid{grid-template-columns:1fr}
}

@media(max-width:560px){
  .scheme3-mykeyk-grid{grid-template-columns:1fr}
  .scheme3-keyk-head{padding:12px 11px 5px}
  .scheme3-keyk-title strong{font-size:18px}
}


/* KEYK_POPUP_RESTORE_FIX_20260901 */
.scheme3-keyk-section{display:none!important}
#keyKPanel{position:fixed!important;inset:0!important;z-index:9999!important;background:rgba(0,0,0,.72)!important;overflow:auto!important;padding:18px!important;box-sizing:border-box!important}
#keyKPanel.hidden{display:none!important}
#keyKPanel:not(.hidden){display:block!important}
#keyKPanel > div{max-width:1180px!important;margin:0 auto!important;background:#111827!important;border:1px solid #374151!important;border-radius:14px!important;padding:16px!important;color:#e5e7eb!important;box-sizing:border-box!important}
#keyKPanel > div > div:first-child{display:flex!important}
#closeKeyK{display:inline-block!important}
.scheme3-sidebar [data-s3-action="keyk"]{display:flex!important}



/* KEYK_PERMANENT_CORE_FINAL_20260901 */

/* 关键K必须是首页主视觉，不再弹窗 */
.scheme3-keyk-section{
  display:block!important;
  border:1px solid #1676d2!important;
  border-radius:12px!important;
  background:
    radial-gradient(circle at 95% 0%,rgba(37,139,255,.12),transparent 32%),
    linear-gradient(180deg,#091725 0%,#0a1824 100%)!important;
  box-shadow:0 10px 28px rgba(0,0,0,.18)!important;
  overflow:hidden!important;
  margin-bottom:12px!important;
}

.scheme3-keyk-head{
  padding:14px 16px 10px!important;
  border-bottom:1px solid #16354b!important;
}
.scheme3-keyk-title strong{
  font-size:22px!important;
  letter-spacing:.01em;
}
.scheme3-keyk-sub{
  font-size:12px!important;
  color:#8ba9bd!important;
}

/* 彻底取消旧弹窗外观 */
.scheme3-keyk-section #keyKPanel,
#keyKPanel.scheme3-keyk-embedded{
  display:block!important;
  position:static!important;
  inset:auto!important;
  z-index:auto!important;
  width:auto!important;
  height:auto!important;
  min-height:0!important;
  background:transparent!important;
  overflow:visible!important;
  padding:0 12px 14px!important;
  box-sizing:border-box!important;
}

.scheme3-keyk-section #keyKPanel.hidden,
#keyKPanel.scheme3-keyk-embedded.hidden{
  display:block!important;
}

.scheme3-keyk-section #keyKPanel > div,
#keyKPanel.scheme3-keyk-embedded > div{
  max-width:none!important;
  width:100%!important;
  margin:0!important;
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
  padding:12px 0 0!important;
  color:#e5e7eb!important;
  box-sizing:border-box!important;
}

/* 原弹窗标题栏关闭，外层使用新的核心标题 */
.scheme3-keyk-section #keyKPanel > div > div:first-child,
#keyKPanel.scheme3-keyk-embedded > div > div:first-child{
  display:none!important;
}
#closeKeyK{display:none!important}

/* 查询条件区更像正式工作台 */
.scheme3-keyk-section #keyKPanel > div > div:nth-child(2){
  display:grid!important;
  grid-template-columns:minmax(150px,1.25fr) minmax(110px,.8fr) minmax(120px,.9fr) minmax(145px,1fr) minmax(145px,1fr) auto auto auto!important;
  gap:10px!important;
  align-items:end!important;
  margin:0 0 12px!important;
}
.scheme3-keyk-section #keyKPanel label > div{
  color:#8ea7b9!important;
  font-size:11px!important;
  margin-bottom:5px!important;
}
.scheme3-keyk-section #keyKPanel input,
.scheme3-keyk-section #keyKPanel select,
.scheme3-keyk-section #keyKPanel button{
  min-height:38px;
  border-radius:8px!important;
}
.scheme3-keyk-section #scanKeyK{
  background:linear-gradient(180deg,#147dea,#0b65c6)!important;
  border-color:#2b91f0!important;
  color:#fff!important;
  font-weight:800!important;
}

/* 状态文字压缩 */
#keyKStatus{
  margin:5px 0 10px!important;
  padding:0 2px!important;
  font-size:12px!important;
  color:#7896aa!important;
}

/* 新增4张统计卡 */
.scheme3-keyk-summary{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin:0 0 12px;
}
.scheme3-keyk-stat{
  min-height:86px;
  border:1px solid #24465d;
  border-radius:10px;
  background:linear-gradient(180deg,#0e2030,#0b1a27);
  padding:12px 14px;
  box-sizing:border-box;
  display:flex;
  flex-direction:column;
  justify-content:center;
}
.scheme3-keyk-stat span{
  color:#8fa8ba;
  font-size:12px;
  margin-bottom:5px;
}
.scheme3-keyk-stat b{
  color:#eef8ff;
  font-size:27px;
  line-height:1;
}
.scheme3-keyk-stat.long{
  border-color:rgba(53,223,137,.3);
  background:linear-gradient(180deg,rgba(30,91,63,.34),#0b1a27);
}
.scheme3-keyk-stat.long b{color:#35df89}
.scheme3-keyk-stat.short{
  border-color:rgba(255,102,117,.3);
  background:linear-gradient(180deg,rgba(105,44,51,.34),#0b1a27);
}
.scheme3-keyk-stat.short b{color:#ff6675}
.scheme3-keyk-stat.saved{
  border-color:rgba(246,199,77,.28);
  background:linear-gradient(180deg,rgba(90,75,31,.28),#0b1a27);
}
.scheme3-keyk-stat.saved b{color:#f6c74d}

/* 关键K表格 */
.scheme3-keyk-section #keyKPanel > div > div:last-child{
  border:1px solid #1d3d53;
  border-radius:9px;
  overflow:auto!important;
}
.scheme3-keyk-section #keyKPanel table{
  width:100%!important;
  min-width:980px!important;
  border-collapse:collapse!important;
}
.scheme3-keyk-section #keyKPanel th{
  position:sticky;
  top:0;
  z-index:2;
  background:#10263a!important;
  color:#9db4c4!important;
  font-size:12px!important;
  font-weight:800!important;
}
.scheme3-keyk-section #keyKPanel td,
.scheme3-keyk-section #keyKPanel th{
  padding:10px 9px!important;
  border-bottom:1px solid #1a3548!important;
  text-align:center!important;
}
.scheme3-keyk-section #keyKPanel tbody tr:hover{
  background:#0d2232!important;
}

/* 左侧导航：关键K永远第一主入口 */
.scheme3-sidebar [data-s3-action="keyk"]{display:none!important}
.scheme3-sidebar [data-s3-target="scheme3KeyK"]{display:flex!important}

/* 顶部原关键K普通按钮继续隐藏，避免重复 */
.scheme3-workspace .search-panel #openKeyK{display:none!important}

@media(max-width:1250px){
  .scheme3-keyk-section #keyKPanel > div > div:nth-child(2){
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
  }
}
@media(max-width:900px){
  .scheme3-keyk-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
  .scheme3-keyk-section #keyKPanel > div > div:nth-child(2){
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}
@media(max-width:560px){
  .scheme3-keyk-summary{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  .scheme3-keyk-stat{min-height:72px;padding:10px}
  .scheme3-keyk-stat b{font-size:22px}
  .scheme3-keyk-section #keyKPanel > div > div:nth-child(2){
    grid-template-columns:1fr 1fr!important;
  }
}

