/* 观星台 · 经营总览（驾驶舱）—— 参考京东商智布局：一屏内按重要性自上而下排布 */
.gh-main{padding:10px 20px 14px;max-width:1580px;font-variant-numeric:tabular-nums}
.workbench-horizontal .workbench-main.gh-main{padding:10px 20px 14px;max-width:1580px}

/* ---------- 筛选条 ---------- */
.gh-filters{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:7px 12px;margin-bottom:10px;background:#fff;border:1px solid var(--wb-line);border-radius:10px;position:sticky;top:52px;z-index:18}
.gh-seg{display:flex;background:#f2f5fa;border-radius:7px;padding:2px;gap:2px}
.gh-seg button{border:0;background:transparent;padding:4px 11px;border-radius:5px;font-size:12.5px;color:#3a4a63;cursor:pointer}
.gh-seg button.on{background:#fff;color:var(--wb-blue);font-weight:600;box-shadow:0 1px 4px #17233a14}
.gh-filters label{display:flex;align-items:center;gap:6px;font-size:12.5px;color:#708097}
.gh-filters select{border:1px solid var(--wb-line);background:#fff;border-radius:6px;padding:0 22px 0 8px;font-size:12.5px;color:#3a4a63;height:28px;min-height:28px;max-width:190px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10'%3E%3Cpath d='M2 4l3 3 3-3' fill='none' stroke='%23708097' stroke-width='1.4'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 8px center;appearance:none}
.gh-filters .gh-spacer{flex:1}
.gh-hint{font-size:11.5px;color:#93a1b5}
.gh-btn{border:1px solid var(--wb-line);background:#fff;border-radius:6px;height:28px;padding:0 12px;font-size:12.5px;color:#3a4a63;cursor:pointer}
.gh-btn:hover{border-color:#c9d6ea}
.gh-btn.primary{background:var(--wb-blue);border-color:var(--wb-blue);color:#fff;font-weight:600}

/* ---------- 通用卡片 ---------- */
.gh-card{background:#fff;border:1px solid var(--wb-line);border-radius:10px;box-shadow:0 1px 2px #17233a08;min-width:0}
.gh-card-h{display:flex;align-items:center;gap:8px;padding:8px 14px 0}
.gh-card-h h3{margin:0;font-size:13px;font-weight:600;letter-spacing:.2px;color:#17233a}
.gh-card-h .gh-sub{font-size:11.5px;color:#93a1b5;font-weight:400}
.gh-card-h .gh-right{margin-left:auto;display:flex;align-items:center;gap:10px}
.gh-link{font-size:12px;color:var(--wb-blue);text-decoration:none;white-space:nowrap}
.gh-link::after{content:"›";font-size:14px;line-height:1;margin-left:2px}
.gh-empty{margin:0;padding:16px 14px;font-size:12px;color:#93a1b5}
.num{font-variant-numeric:tabular-nums}

/* ---------- KPI ---------- */
.gh-top{display:grid;grid-template-columns:minmax(0,.82fr) minmax(0,1.3fr);gap:10px}
.gh-kpi{padding:11px 16px 12px;position:relative;overflow:hidden;display:flex;flex-direction:column;justify-content:center;gap:2px}
.gh-kpi-label{font-size:12px;color:#708097;white-space:nowrap}
.gh-kpi-v{display:flex;align-items:baseline;gap:3px;margin-top:3px;line-height:1.15}
.gh-kpi-v strong{font-size:30px;font-weight:700;letter-spacing:-.6px;color:#17233a}
.gh-kpi-v span{font-size:11.5px;color:#93a1b5}
.gh-kpi-v small{font-size:11px;color:#93a1b5;margin-left:4px}
.gh-kpi-meta{margin-top:5px;display:grid;gap:2px;font-size:11.5px;color:#708097}
.gh-kpi-meta i{font-style:normal;color:#3a4a63}
.gh-kpi-prev{font-style:normal;font-size:11px;color:#93a1b5;margin-left:6px}
.gh-kpi-top{font-size:11.5px;color:#93a1b5}
.gh-kpi-top:empty{display:none}
.gh-kpi-top b{font-weight:600;color:#3a4a63;margin-right:5px}
.gh-kpi.accent{background:linear-gradient(180deg,#f7faff,#fff 62%)}
.gh-kpi.accent::before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:linear-gradient(180deg,#0665ff,#6f9bff)}
.up{color:#d93a3a}.down{color:#0f9d58}.warnc{color:#e0811a}.badc{color:#d93a3a}

/* ---------- 第二行：目标 + 趋势 ---------- */
.gh-row2{display:grid;grid-template-columns:minmax(0,2.05fr) minmax(0,1fr);gap:10px;margin-top:10px}
.gh-goal-body{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:5px 14px 0}
.gh-gauge{text-align:center;min-width:0}
.gh-gauge-ring{position:relative;width:100%;max-width:170px;height:86px;margin:0 auto}
.gh-gauge-ring canvas{width:100%!important;height:100%!important}
.gh-gauge-ring b{position:absolute;left:0;right:0;bottom:1px;font-size:19px;font-weight:700;color:var(--wb-blue);line-height:1}
.gh-gauge-ring b small{font-size:11px;font-weight:400;color:#93a1b5;margin-left:1px}
.gh-gauge-cap{font-size:11.5px;color:#708097;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gh-goal-note{margin:7px 14px 6px;padding:5px 9px;border-radius:7px;background:#fdf6ea;border:1px solid #f6e2c2;font-size:11px;color:#8a5a12;line-height:1.5}
.gh-goal-note b{color:#b93b3b}
.gh-goal-foot{display:flex;gap:8px;padding:0 14px 9px;font-size:11px;color:#708097}
.gh-goal-foot div{flex:1;min-width:0;background:#f7f9fc;border-radius:6px;padding:4px 8px;display:flex;align-items:baseline;gap:5px;justify-content:space-between}
.gh-goal-foot b{display:inline;font-size:12px;color:#17233a;margin:0;white-space:nowrap}

.gh-tabs{display:flex;background:#f2f5fa;border-radius:6px;padding:2px;gap:1px}
.gh-tabs button{border:0;background:transparent;font-size:11.5px;padding:3px 9px;border-radius:4px;color:#708097;cursor:pointer}
.gh-tabs button.on{background:#fff;color:var(--wb-blue);font-weight:600;box-shadow:0 1px 3px #17233a14}
.gh-trend{position:relative;height:206px}
.gh-trend canvas{position:absolute;left:10px;top:6px;width:calc(100% - 20px)!important;height:calc(100% - 6px)!important}
.gh-trend-empty{position:absolute;inset:0;display:grid;place-items:center;margin:0;font-size:12px;color:#93a1b5;background:#ffffffd0;z-index:1}
.gh-trend-empty[hidden]{display:none!important}
.gh-legend{display:flex;align-items:center;gap:14px;padding:2px 14px 9px;font-size:11.5px;color:#708097;flex-wrap:wrap}
.gh-legend i{display:inline-block;width:14px;height:2px;border-radius:2px;margin-right:5px;vertical-align:2px}
.gh-legend i.solid{background:var(--wb-blue)}
.gh-legend i.dash{background:repeating-linear-gradient(90deg,#b9c6da 0 4px,transparent 4px 7px)}
.gh-legend-yoy{color:#d93a3a;font-weight:600}
.gh-legend-tail{margin-left:auto;color:#93a1b5}

/* ---------- 第三行 ---------- */
.gh-row3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:10px}
.gh-ranks{padding:2px 6px 2px}
.gh-rank{display:grid;grid-template-columns:18px minmax(0,1fr) 84px 40px;align-items:center;gap:8px;padding:3.5px 8px;border-radius:6px}
.gh-rank:hover{background:#f8fafd}
.gh-rank .no{font-size:11px;color:#93a1b5;text-align:center}
.gh-rank .no.top{color:#fff;background:#e0811a;border-radius:4px;font-weight:600;font-size:10.5px;line-height:16px}
.gh-rank .nm{font-size:12.5px;color:#3a4a63;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gh-rank .nm em{font-style:normal;font-size:10px;color:#93a1b5;margin-left:4px}
.gh-rank .bar{position:relative;height:6px;background:#eef2f8;border-radius:3px}
.gh-rank .bar i{position:absolute;left:0;top:0;bottom:0;border-radius:3px;background:var(--wb-blue);max-width:100%}
.gh-rank .bar i.warn{background:#e8a13c}
.gh-rank .bar i.bad{background:#e06a6a}
.gh-rank .bar u{position:absolute;top:-2px;bottom:-2px;width:1px;background:#9fb0c8;opacity:.85}
.gh-rank .pct{font-size:12px;text-align:right;color:#17233a}
.gh-rank .pct.lag{color:#c94a4a}
.gh-rank-foot{display:flex;justify-content:space-between;padding:5px 14px 7px;margin-top:2px;border-top:1px dashed var(--wb-line);font-size:11px;color:#93a1b5}

.gh-mod{padding:9px 14px 12px}
.gh-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:9px}
.gh-metric{background:#f7f9fc;border-radius:8px;padding:8px 6px;text-align:center;min-width:0}
.gh-metric b{display:block;font-size:22px;font-weight:700;line-height:1.1;color:#17233a;letter-spacing:-.4px}
.gh-metric span{display:block;font-size:11px;color:#708097;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gh-metric.red{background:#fdf0f0}.gh-metric.red b{color:#c24545}
.gh-metric.amber{background:#fff7ea}.gh-metric.amber b{color:#b6761e}
.gh-metric.blue{background:#eef3ff}.gh-metric.blue b{color:#2a5bd7}
.gh-mod-line{font-size:11.5px;color:#708097;padding:0 1px}
.gh-mod-line i{font-style:normal;color:#3a4a63}
.gh-mod-note{margin-top:7px;font-size:11px;line-height:1.55;color:#93a1b5;background:#f8fafd;border-radius:6px;padding:6px 8px}
.gh-mod-note.warn{color:#a8700f;background:#fdf6ea}
.gh-mod-note.warn::before{content:"⚠ ";font-size:10px}

/* ---------- 气温 ---------- */
.gh-weather{padding:5px 14px 10px}
.gh-wx-top{display:flex;align-items:flex-end;gap:8px}
.gh-wx-top strong{font-size:25px;line-height:1.1;font-weight:700;color:#c9541f}
.gh-wx-top span{font-size:11.5px;color:#708097;padding-bottom:3px}
.gh-wx-cities{display:flex;flex-wrap:wrap;gap:5px;margin:7px 0 8px}
.gh-wx-city{font-size:11.5px;padding:2px 8px;border-radius:5px;background:#fff3ea;color:#a8501c;border:1px solid #f8ddc8}
.gh-wx-city b{font-weight:600}
.gh-wx-week{display:flex;align-items:flex-end;gap:8px;padding:6px 8px;background:#fbfcfe;border:1px solid #eef2f8;border-radius:7px}
.gh-wx-week-h{font-size:11px;color:#708097;white-space:nowrap;line-height:1.5;width:52px;flex:0 0 auto}
.gh-wx-bars{flex:1;display:grid;grid-template-columns:repeat(7,1fr);gap:5px;align-items:end;height:50px}
.gh-wx-bars div{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;height:100%;gap:2px}
.gh-wx-bars b{font-size:10px;color:#a8501c;font-weight:600;line-height:1}
.gh-wx-bars i{display:block;width:100%;max-width:16px;border-radius:3px 3px 1px 1px;background:linear-gradient(180deg,#f0a06a,#f8cdaf);min-height:4px}
.gh-wx-bars span{font-size:9.5px;color:#93a1b5;line-height:1}
.gh-wx-tip{margin-top:7px;font-size:10.5px;color:#708097;line-height:1.5;background:#f8fafd;border-radius:6px;padding:6px 8px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.gh-wx-tip b{color:#3a4a63}

/* ---------- 底脚 ---------- */
.gh-foot{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:10px;padding:0 2px;font-size:11.5px;color:#93a1b5}
.gh-foot .gh-sep{width:1px;height:10px;background:var(--wb-line)}
.gh-foot .gh-spacer{flex:1}

/* ---------- 一屏（2026-11-10）：常见笔记本屏不再需要滚动 ----------
   以前页面高度写死在 943px（顶栏 52 + 筛选 48 + 首行 220 + 二行 364 + 三行 176 + 页脚 18），
   1440×900 下第三行永远被切掉，1366×768 只剩标题。现在顶栏 52 固定，剩下的按行分配：
   二行（趋势 + 店铺达成）吃掉剩余高度，趋势图与排名列表随屏高伸缩，排名放不下时自己滚。 */
@media (min-width:1181px) and (min-height:760px){
  .workbench-horizontal .workbench-main.gh-main{height:calc(100dvh - 52px);min-height:0;display:flex;flex-direction:column}
  /* 注意：各区块都在 #ghHome 里，真正要分配高度的是这一层（main 的直接子元素只有骨架屏和它） */
  .gh-main>#ghHome{flex:1 1 auto;min-height:0;display:flex;flex-direction:column}
  #ghHome>.gh-filters{flex:0 0 auto;position:static}
  #ghHome>.gh-top,#ghHome>.gh-row3,#ghHome>.gh-foot{flex:0 0 auto}
  #ghHome>.gh-row2{flex:1 1 auto;min-height:180px;grid-template-rows:minmax(0,1fr)}
  #ghHome .gh-row2>.gh-card{display:flex;flex-direction:column;min-height:0;overflow:hidden}
  #ghHome .gh-row2>.gh-card>.gh-card-h{flex:0 0 auto}
  #ghHome .gh-trend{flex:1 1 auto;height:auto;min-height:120px}
  #ghHome .gh-legend{flex:0 0 auto}
  #ghHome .gh-ranks{flex:1 1 auto;min-height:0;overflow:auto;scrollbar-width:thin;scrollbar-color:#c9d4e4 transparent}
  #ghHome .gh-rank-foot{flex:0 0 auto;margin-top:auto}
  /* 列表溢出时：底部淡出 + 页脚补一句「可上下滚动」，避免最后一行被切一半像没渲染完 */
  #ghHome .gh-ranks.is-scroll{-webkit-mask-image:linear-gradient(180deg,#000 calc(100% - 16px),rgba(0,0,0,.1));mask-image:linear-gradient(180deg,#000 calc(100% - 16px),rgba(0,0,0,.1))}
  #ghHome .gh-ranks.is-scroll+.gh-rank-foot::after{content:"· 可上下滚动";color:#b3bfd0;margin-left:6px}
}

/* 短屏笔记本（768~840 高）：把首行 KPI 与三行卡片收紧一点，把高度让给趋势图，避免曲线被压成一条扁线 */
@media (min-width:1181px) and (min-height:760px) and (max-height:840px){
  .gh-kpi{padding:8px 14px 9px}
  .gh-kpi-v strong{font-size:26px}
  .gh-kpi-prev{display:none}
  .gh-gauge-ring{height:70px}
  .gh-goal-note{margin:5px 14px 4px;padding:4px 8px}
  .gh-goal-foot{padding:0 14px 6px}
  .gh-mod{padding:7px 14px 9px}
  .gh-metric b{font-size:20px}
  .gh-metric{padding:6px 5px}
  .gh-foot{margin-top:6px}
}

@media(max-width:1180px){
  .gh-top{grid-template-columns:1fr}
  .gh-row2,.gh-row3{grid-template-columns:1fr}
  .gh-kpi{flex-direction:row;flex-wrap:wrap;align-items:baseline;gap:12px}
  .gh-trend{height:180px}
  .gh-legend-tail{display:none}
  .gh-filters{position:static}
}

/* ---------- 每日日报弹窗（P0-A） ---------- */
.gh-dr-scrim{position:fixed;inset:0;background:#0f1a2e59;z-index:60;backdrop-filter:blur(2px)}
.gh-dr{position:fixed;z-index:61;top:50%;left:50%;transform:translate(-50%,-50%);width:min(560px,calc(100vw - 40px));max-height:82vh;display:flex;flex-direction:column;background:#fff;border:1px solid var(--wb-line);border-radius:12px;box-shadow:0 18px 48px #17233a2e;overflow:hidden}
.gh-dr-head{display:flex;align-items:flex-start;gap:12px;padding:14px 16px 10px;border-bottom:1px solid var(--wb-line)}
.gh-dr-head h2{margin:0;font-size:15px;color:#17233a}
.gh-dr-head p{margin:3px 0 0;font-size:12px;color:#93a1b5}
.gh-dr-head .gh-btn{margin-left:auto;flex-shrink:0}
.gh-dr-body{padding:12px 16px 16px;overflow:auto}
.gh-dr-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:10px}
.gh-dr-bar label{display:flex;align-items:center;gap:6px;font-size:12.5px;color:#708097}
.gh-dr-bar input[type=date]{border:1px solid var(--wb-line);border-radius:6px;height:28px;padding:0 8px;font-size:12.5px;color:#3a4a63}
.gh-dr-status{font-size:12px;color:#3a4a63}
.gh-dr-kpis{display:grid;gap:5px;padding:10px 12px;background:#f8fafd;border-radius:8px;margin-bottom:12px}
.gh-dr-line{display:flex;justify-content:space-between;gap:12px;font-size:12.5px;color:#708097}
.gh-dr-line b{color:#17233a;font-weight:600;font-variant-numeric:tabular-nums}
.gh-dr h3{margin:12px 0 6px;font-size:12.5px;color:#17233a}
.gh-dr-shop{display:flex;justify-content:space-between;gap:12px;padding:5px 2px;border-bottom:1px dashed #e8eef6;font-size:12.5px;color:#3a4a63}
.gh-dr-shop b{font-variant-numeric:tabular-nums;color:#17233a}
.gh-dr-warn{margin:10px 0 0;font-size:12.5px;color:#b0541e}
.gh-dr-mute{margin:8px 0 0;font-size:12px;color:#93a1b5}
.gh-dr-foot{margin:14px 0 0;font-size:12px;color:#93a1b5;display:grid;gap:6px}
.gh-dr-warn-text{color:#b0541e}
/* 修复：hidden 属性被 display:flex 压掉，导致弹窗关不掉 */
.gh-dr[hidden],.gh-dr-scrim[hidden]{display:none!important}
