/* v0.12.0：经营驾驶舱、图表、手机看板、投屏、时间轴、全局搜索、帮助、新手引导、品牌、示例数据 */
/* ---- 图表（growth/charts.py 输出的 SVG） ---- */
.spark{width:120px;height:32px;display:block;margin-top:8px}.spark-area{fill:var(--primary);opacity:.08}.spark-line{fill:none;stroke:var(--primary);stroke-width:1.6;stroke-linejoin:round}.spark-dot{fill:var(--primary)}
.chart{width:100%;height:auto;display:block;overflow:visible}.chart .grid{stroke:var(--line);stroke-width:1}.chart .axis{font-size:12px;fill:#8a94a6}
.chart .line-cur{fill:none;stroke:var(--primary);stroke-width:2.2;stroke-linejoin:round}.chart .line-prev{fill:none;stroke:#b8c2d6;stroke-width:1.6;stroke-dasharray:4 4}
.legend{display:flex;gap:16px;font-size:12px;color:var(--muted);margin-top:6px}.legend span:before{content:'';display:inline-block;width:14px;height:3px;border-radius:2px;margin-right:6px;vertical-align:middle}.lg-cur:before{background:var(--primary)}.lg-prev:before{background:#b8c2d6}
.hbars .bar{fill:var(--primary);opacity:.85}.hbars .bar.warn{fill:#d0454c}.hbars a:hover .bar{opacity:1}.hbars .lbl{font-size:12px;fill:var(--ink)}.hbars .val{font-size:12px;fill:var(--muted)}
.funnel .fbar{fill:var(--primary)}.funnel .f1{opacity:.85}.funnel .f2{opacity:.7}.funnel .f3{opacity:.58}.funnel .f4{opacity:.46}.funnel a:hover .fbar{opacity:1}.funnel .fval{font-size:13px;fill:#fff;font-weight:600}.funnel .fval.out{fill:var(--ink)}.screen .funnel .fval.out{fill:#e6ecf7}
/* ---- 驾驶舱 ---- */
.cockpit-tools{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.alerts{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:12px;margin-bottom:22px}
.alertcard{display:flex;flex-direction:column;gap:4px;padding:14px 16px;border-radius:12px;border:1px solid #f1c9c9;background:#fff6f6;color:#8a2c33;transition:transform .12s}.alertcard:hover{transform:translateY(-1px)}
.alertcard.info{border-color:#f0dfb5;background:#fffaee;color:#7a5a17}.alertcard span{font-size:12px;line-height:1.7}.alertcard em{font-style:normal;font-size:12px;font-weight:600;margin-top:2px}
.okcard{padding:12px 16px;border-radius:10px;background:#edf7f2;color:#217c60;font-size:12px;margin-bottom:22px}
.kpigrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:12px;margin-bottom:22px}
.kpi{display:block;background:#fff;border:1px solid var(--line);border-radius:14px;padding:16px 18px;transition:border-color .15s,box-shadow .15s}.kpi:hover{border-color:#b7c9f6;box-shadow:0 5px 20px #2c4c8e0d}
.kpi-name{font-size:12px;color:var(--muted)}.kpi strong{display:block;font-size:28px;line-height:1.35;margin:4px 0 2px;font-variant-numeric:tabular-nums}.kpi small{font-size:12px}
.kpi-delta{font-size:12px;font-weight:600;color:var(--muted)}.kpi-delta.good{color:#16866a}.kpi-delta.bad{color:#c2323b}
.chartgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.chartgrid .panel{margin:0}.defs{margin-top:18px}.defs summary{cursor:pointer;font-weight:600;font-size:13px}
@media(max-width:1150px){.chartgrid{grid-template-columns:1fr}}
/* ---- 手机看板 ---- */
.mboard{max-width:560px;margin:0 auto}.mboard-head{display:flex;justify-content:space-between;align-items:flex-end;gap:12px;margin-bottom:16px}.mboard-head h1{font-size:24px}.mboard .tabs{width:auto}
.mkpis{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:8px}.mkpi{background:#fff;border:1px solid var(--line);border-radius:12px;padding:12px 14px}.mkpi>span:first-child{font-size:12px;color:var(--muted);display:block}.mkpi strong{display:block;font-size:22px;line-height:1.4;font-variant-numeric:tabular-nums}.mkpi .spark{width:100%;height:24px}
.mboard .alerts{grid-template-columns:1fr}.mlist .factrow b{font-weight:500;text-align:right}.badtext{font-style:normal;color:#c2323b}
/* ---- 投屏 ---- */
body.screen{background:#0e1626;color:#e6ecf7}.screenmain{max-width:none;padding:28px 40px}.screen h1{font-size:36px;color:#fff}.screen p,.screen .muted,.screen small,.screen .kpi-name,.screen .eyebrow{color:#6a758a}
.screen .kpi,.screen .panel,.screen .tabs{background:#16213a;border-color:#24324f}.screen .kpi strong{font-size:40px;color:#fff}.screen .tabs a{color:#6a758a}.screen .tabs .selected{background:#24324f;color:#fff}
.screen .chart .grid{stroke:#24324f}.screen .chart .axis,.screen .hbars .val{fill:#93a3bf}.screen .hbars .lbl{fill:#e6ecf7}.screen .chart .line-prev{stroke:#56657f}.screen h2{color:#fff}.screen .button.secondary{background:#16213a;color:#e6ecf7;border-color:#24324f}
.screen .kpigrid{grid-template-columns:repeat(auto-fill,minmax(230px,1fr))}.screen .pagefooter{border-color:#24324f}.screen .defs{display:none}.screen .factrow{border-color:#24324f}
/* ---- 时间轴 ---- */
.tl-filters{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:18px}.chip{border:1px solid var(--line);background:#fff;border-radius:20px;padding:5px 12px;font-size:12px;color:#5c6982;min-height:32px}.chip em{font-style:normal;color:#6d7583;margin-left:2px}.chip.on{background:#edf2ff;border-color:transparent;color:var(--primary);font-weight:600}
.timeline-dot.blue{background:var(--primary)}.timeline-dot.green{background:#23a982}.timeline-dot.amber{background:#d18e35}.timeline-dot.red{background:#d0454c}.timeline-dot.violet{background:#7662d8}
.tl .timelineitem p{white-space:pre-wrap;overflow-wrap:anywhere}.tl .timelineitem[hidden]{display:none}
/* ---- 全局搜索 / 帮助 ---- */
.gsearch{position:relative}.gsearch input{min-height:36px;width:240px;padding:6px 12px;font-size:12px;border-radius:9px;background:#f5f7fb}.gsearch input:focus{background:#fff}
.gs-results{position:absolute;right:0;top:calc(100% + 6px);width:340px;max-height:420px;overflow:auto;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow);padding:6px;z-index:60}
.gs-results a{display:flex;justify-content:space-between;gap:10px;padding:9px 10px;border-radius:8px;font-size:13px;color:var(--ink)}.gs-results a span{font-size:12px;color:var(--muted)}.gs-results a.on,.gs-results a:hover{background:#edf2ff}
.gs-group{font-size:12px;letter-spacing:1.4px;color:#6d7583;padding:8px 10px 4px}.gs-empty{padding:14px;font-size:12px;color:var(--muted)}
.helpbtn{border:1px solid var(--line);background:#fff;border-radius:50%;width:30px;height:30px;font-weight:700;color:var(--muted);font-size:13px}
.keys{margin:14px 0}.keys td{padding:9px 8px;font-size:13px}.keys td:first-child{width:110px;white-space:nowrap}kbd{display:inline-block;min-width:22px;padding:2px 7px;border:1px solid #d5dbe7;border-bottom-width:2px;border-radius:6px;background:#f8f9fc;font:600 12px/1.4 ui-monospace,Menlo,Consolas,monospace;text-align:center;color:var(--ink)}
.helpfoot{display:flex;gap:10px;flex-wrap:wrap;margin-top:10px}
@media(max-width:800px){.toplinks .deptview,.toplinks a,.toplinks .presence{display:none}.toplinks{gap:8px}.gsearch input{width:160px}.gs-results{position:fixed;left:10px;right:10px;width:auto;top:60px}.helpbtn{display:none}}
/* ---- 新手引导 ---- */
.tour-shade{position:fixed;inset:0;z-index:90;background:transparent}.tour-ring{position:fixed;z-index:91;border-radius:12px;box-shadow:0 0 0 4px var(--primary),0 0 0 9999px #17203366;pointer-events:none;transition:all .2s var(--ease)}
.tour-card{position:fixed;z-index:92;background:#fff;border-radius:14px;padding:18px 18px 12px;box-shadow:var(--shadow)}.tour-card h3{margin:6px 0 4px}.tour-card p{font-size:13px;margin:4px 0 10px}.tour-btns{display:flex;justify-content:flex-end;gap:8px;align-items:center}.tour-btns .textbtn{margin-right:auto;color:var(--muted)}
/* ---- 品牌 / 示例数据 ---- */
.brandlogo{width:42px;height:42px;border-radius:13px;object-fit:contain;background:#fff}
.colorrow{display:flex;gap:8px;margin-top:7px}.colorrow input[type=color]{width:52px;padding:4px;flex:none}.colorrow input{margin-top:0}
.brandpreview{border:1px dashed var(--line);border-radius:12px;padding:18px;margin-bottom:12px}.brandpreview .brand{margin-bottom:10px}
.samplebar{padding:10px 16px;border-radius:10px;background:#fff1e0;border:1px solid #f3d2a5;color:#8a5414;font-size:12px;margin-bottom:18px}.samplebar b{margin-right:6px}.samplebar a{color:#8a5414;font-weight:600;text-decoration:underline;margin-left:6px}.toplinks .deptview{white-space:nowrap}@media(max-width:1500px){.toplinks .presence{display:none}.toplinks{gap:14px}}
