:root{
  --ink:#15202b;
  --ink-2:#3d4a57;
  --muted:#5f6f7d;
  --line:#e3e7ed;
  --bg:#f5f6f8;
  --card:#ffffff;
  --navy:#16324f;
  --teal:#2f7d6d;
  --shadow:0 1px 2px rgba(16,32,48,.04),0 12px 32px rgba(16,32,48,.06);
  --radius:13px;
  --topbar-h:92px;
  --font:"PingFang SC","Microsoft YaHei","Noto Sans SC",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
*{box-sizing:border-box}
:focus-visible{outline:2px solid #1f4e79;outline-offset:2px}
.card:focus-visible{outline:2px solid #1f4e79;outline-offset:2px;border-radius:var(--radius)}
html{scroll-behavior:smooth}
body{margin:0;background:var(--bg);color:var(--ink);font-family:var(--font);font-size:15px;line-height:1.6;-webkit-font-smoothing:antialiased;overflow-anchor:none}
a{color:inherit;text-decoration:none}
button{font-family:inherit}
.wrap{max-width:1600px;margin:0 auto;padding:0 28px}

/* ===== 顶部栏：滚动上滑隐藏，向上滚恢复 ===== */
.topbar-slot{height:var(--topbar-h,92px);overflow:hidden;transition:height .28s cubic-bezier(.4,0,.2,1)}
.topbar-slot.hidden{height:0}
.topbar{position:fixed;top:0;left:0;right:0;z-index:50;background:rgba(245,246,248,.96);backdrop-filter:blur(14px);border-bottom:1px solid var(--line);transform:translateY(0);transition:transform .28s cubic-bezier(.4,0,.2,1);will-change:transform}
.topbar.hidden{transform:translateY(-100%)}
.topbar-inner{display:flex;flex-direction:column;gap:8px;padding-top:9px;padding-bottom:9px}
.topbar-main{display:flex;align-items:center;gap:18px;min-width:0}
.brand{display:flex;align-items:center;gap:10px;flex-shrink:0;color:var(--ink)}
.brand-mark{display:grid;place-items:center;width:32px;height:32px;border-radius:8px;flex-shrink:0;overflow:hidden}
.brand-mark svg{width:32px;height:32px;display:block}
.brand-name{font-size:15.5px;font-weight:800;letter-spacing:-.3px;color:var(--navy)}
.search{display:flex;align-items:center;gap:8px;background:#f5f7f9;border:1px solid transparent;border-radius:9px;padding:8px 12px;height:38px;flex:1 1 320px;max-width:620px;transition:.2s}
.search:focus-within{background:#fff;border-color:#b9c6d3;box-shadow:0 0 0 3px rgba(31,78,121,.08)}
.search svg{width:15px;height:15px;fill:none;stroke:var(--muted);stroke-width:2;flex-shrink:0}
.search input{border:none;outline:none;background:transparent;font-size:13px;width:100%;color:var(--ink)}
.drawer-meta{display:flex;align-items:center;gap:22px;margin-left:auto;flex-shrink:0}
.drawer-item{display:flex;align-items:center;gap:6px;font-size:11.5px;color:var(--muted);white-space:nowrap}
.drawer-item svg{width:14px;height:14px;fill:none;stroke:var(--muted);stroke-width:1.7;stroke-linecap:round}
.drawer-item b{font-weight:600;color:var(--ink)}
.data-status-btn{border:0;background:none;padding:0;font-family:inherit;cursor:pointer}
.data-status-btn:hover b{color:var(--navy)}
.status-dot{width:7px;height:7px;border-radius:50%;background:#9aa7b4;display:inline-block;flex-shrink:0}
.status-dot.ok{background:#2f7d6d;box-shadow:0 0 0 2px rgba(47,125,109,.15)}
.status-dot.warn{background:#c19a3d;box-shadow:0 0 0 2px rgba(193,154,61,.18)}

.chips{display:flex;gap:6px;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;padding-bottom:1px}
.chips::-webkit-scrollbar{display:none}
.chip{border:1px solid var(--line);background:#fff;color:var(--ink-2);padding:3px 10px;border-radius:99px;font-size:11.5px;cursor:pointer;transition:.15s;white-space:nowrap;flex-shrink:0}
.chip:hover{border-color:#b9c6d3}
.chip.active{background:var(--navy);border-color:var(--navy);color:#fff}

/* ===== 可自定义导航标签 ===== */
.tabs{display:flex;gap:6px;align-items:center;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;padding-bottom:1px;min-height:27px}
.tabs::-webkit-scrollbar{display:none}
.tab{display:flex;align-items:center;gap:4px;border:1px solid var(--line);background:#fff;color:var(--ink-2);padding:3px 10px;border-radius:99px;font-size:11.5px;font-family:inherit;line-height:1.5;cursor:pointer;transition:.15s;white-space:nowrap;flex-shrink:0}
.tab:hover{border-color:#b9c6d3}
.tab.active{background:var(--navy);border-color:var(--navy);color:#fff}
.tab-op{font-size:9px;line-height:1;opacity:.55;padding:2px 3px;border-radius:3px}
.tab-op:hover{opacity:1;background:rgba(31,78,121,.12)}
.tab.active .tab-op{color:#fff}
.tab.active .tab-op:hover{background:rgba(255,255,255,.2)}
.tab-op.del:hover{background:#b4553f;color:#fff}
.tab.add{border-style:dashed;color:var(--muted);padding:3px 9px;font-weight:700}
.tab.add:hover{color:var(--navy);border-color:#b9c6d3}

/* ===== 图表区：尽量占满可视区域 ===== */
.dashboard{padding-top:10px;padding-bottom:36px}
.tab-note{margin:12px 2px 0;font-size:11px;color:var(--muted);line-height:1.75}
.tab-note summary{cursor:pointer;color:var(--ink-2);font-weight:600;font-size:11.5px;padding:2px 0;display:inline-block}
.tab-note summary:hover{color:var(--navy)}
.tab-note p{margin:6px 2px 0;font-size:11px;color:var(--muted);line-height:1.75}
.tab-note b{color:var(--ink-2);font-weight:600}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(266px,1fr));gap:12px}
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:13px 13px 9px;display:flex;flex-direction:column;min-height:208px;cursor:pointer;transition:.2s;position:relative;overflow:hidden}
.card:hover{transform:translateY(-2px);box-shadow:var(--shadow);border-color:#cfd8e2}
.card-top{display:flex;justify-content:space-between;align-items:flex-start;gap:8px}
.card-cat{font-size:10px;color:var(--teal);font-weight:700;letter-spacing:.5px}
.card-pri{font-size:9.5px;color:var(--muted);border:1px solid var(--line);padding:0 5px;border-radius:5px;white-space:nowrap}
.card-pri.p1{color:var(--navy);border-color:#c4d2e0;background:#f3f7fb}
.card h3{font-size:14px;line-height:1.35;margin:5px 0 1px;font-weight:700;color:var(--ink);letter-spacing:-.2px}
.card-freq{font-size:10.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.card-main{display:flex;align-items:baseline;gap:7px;margin:6px 0 0}
.card-main b{font-size:21px;font-weight:800;color:var(--navy);font-variant-numeric:tabular-nums;line-height:1.15}
.card-main small{font-size:10.5px;color:var(--muted)}
.card-main .period{margin-left:auto;font-size:10px;color:var(--muted);white-space:nowrap}
.spark{height:72px;margin:2px -5px 0;flex:1;min-height:60px}
.card-foot{display:flex;justify-content:space-between;align-items:center;gap:6px;padding-top:6px;border-top:1px solid #eef1f4;font-size:9.5px;color:var(--muted)}
.card-foot .src{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.card-foot .more{color:var(--navy);font-weight:600;white-space:nowrap}
.foot-right{display:flex;align-items:center;gap:6px;flex-shrink:0}
.badge{display:inline-block;font-size:9.5px;padding:0 6px;border-radius:99px;font-weight:600}
.badge.ok{background:#e8f5e9;color:#2e6b3d}
.badge.partial{background:#fff4e5;color:#9a6416}
.badge.proxy{background:#eaf2ff;color:#2c5c96}
.empty{text-align:center;color:var(--muted);padding:40px 0}

/* ===== 弹窗 ===== */
.modal{position:fixed;inset:0;z-index:100;display:none}
.modal.open{display:block}
.modal-backdrop{position:absolute;inset:0;background:rgba(12,22,33,.55);backdrop-filter:blur(3px);animation:fade .2s}
.modal-panel{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:min(980px,94vw);max-height:92vh;overflow:auto;background:#fff;border-radius:16px;box-shadow:0 30px 80px rgba(8,18,30,.3);padding:26px 28px 24px;animation:pop .22s ease-out}
@keyframes fade{from{opacity:0}to{opacity:1}}
@keyframes pop{from{opacity:0;transform:translate(-50%,-47%)}to{opacity:1;transform:translate(-50%,-50%)}}
.modal-close{position:absolute;right:16px;top:14px;width:32px;height:32px;border-radius:50%;border:1px solid var(--line);background:#fff;font-size:20px;line-height:1;color:var(--muted);cursor:pointer}
.modal-close:hover{background:#f5f7f9;color:var(--ink)}
.modal-tags{display:flex;gap:8px;align-items:center;margin-bottom:8px}
.modal-head h3{margin:0 0 4px;font-size:24px;letter-spacing:-.4px;color:var(--navy)}
.modal-sub{margin:0;font-size:12.5px;color:var(--muted)}
.modal-toolbar{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:18px 0 4px;flex-wrap:wrap}
.range-switch{display:flex;background:#eef1f5;padding:3px;border-radius:8px;gap:2px}
.range-switch button{border:none;background:transparent;padding:5px 12px;border-radius:6px;font-size:12px;color:var(--muted);cursor:pointer}
.range-switch button.active{background:#fff;color:var(--navy);font-weight:700;box-shadow:0 1px 3px rgba(16,32,48,.1)}
.modal-source{font-size:11.5px;color:var(--muted)}
.modal-source a{color:var(--teal)}
.modal-chart{height:360px;margin:6px -8px 0}
.modal-foot{margin-top:8px;border-top:1px solid var(--line);padding-top:14px}
.modal-note{font-size:11.5px;color:var(--muted);margin-bottom:12px;line-height:1.65}
.table-head{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:6px}
.table-head h4{margin:0;font-size:13px;color:var(--ink)}
.table-head span{font-size:10.5px;color:var(--muted)}
.table-scroll{max-height:230px;overflow:auto;border:1px solid var(--line);border-radius:8px}
table{width:100%;border-collapse:collapse;font-size:11.5px}
th,td{padding:6px 10px;text-align:right;border-bottom:1px solid #eef1f4;white-space:nowrap;font-variant-numeric:tabular-nums}
th{position:sticky;top:0;background:#f7f9fb;color:var(--ink-2);font-weight:600;text-align:right;z-index:1}
th:first-child,td:first-child{text-align:left}
.export-btn{padding:4px 10px;font-size:11px}
.status-panel{width:min(760px,94vw)}
.status-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;padding-right:32px}
.status-head h3{margin:0 0 4px;font-size:21px;color:var(--navy)}
.status-head p{margin:0;font-size:11.5px;color:var(--muted)}
.status-pill{display:inline-block;padding:3px 10px;border-radius:99px;font-size:11px;font-weight:700;white-space:nowrap}
.status-pill.ok{background:#e8f5e9;color:#2e6b3d}
.status-pill.warn{background:#fff4e5;color:#9a6416}
.status-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:16px 0 18px}
.status-stat{background:#f6f8fa;border:1px solid var(--line);border-radius:9px;padding:10px 12px;display:flex;flex-direction:column;gap:2px}
.status-stat b{font-size:20px;color:var(--navy);line-height:1.2}
.status-stat span{font-size:10.5px;color:var(--muted)}
.status-stat.ok b{color:var(--teal)}
.status-stat.warn b{color:#9a6416}
.status-section{border-top:1px solid var(--line);padding:12px 0 2px}
.status-section h4{margin:0 0 6px;font-size:12.5px;color:var(--ink)}
.status-section p{margin:4px 0;font-size:11.5px;color:var(--ink-2);line-height:1.65}
.status-list{margin:0;padding-left:18px;font-size:11.5px;color:var(--ink-2);line-height:1.7}
.status-more{color:var(--muted)}
.config-panel{width:min(580px,94vw)}
.config-panel h3{margin:0 0 6px;font-size:21px;color:var(--navy)}
.config-sub{font-size:12.5px;color:var(--ink-2);line-height:1.7;margin:0 0 12px}
.config-stats{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 16px}
.config-stats span{background:#f6f8fa;border:1px solid var(--line);border-radius:8px;padding:6px 10px;font-size:11px;color:var(--muted)}
.config-stats b{font-size:14px;color:var(--navy)}
.config-actions{display:flex;gap:10px;flex-wrap:wrap;margin:4px 0 8px}
.config-msg{min-height:18px;font-size:11.5px;color:#9a6416;margin:0 0 6px}
.config-note{font-size:11px;color:var(--muted);line-height:1.6;margin:0}
.feedback-panel{width:min(470px,94vw)}
.feedback-panel h3{margin:0 0 6px;font-size:21px;color:var(--navy)}
.feedback-sub{font-size:12.5px;color:var(--ink-2);line-height:1.7;margin:0 0 16px}
.feedback-mailbox{display:flex;align-items:center;gap:10px;flex-wrap:wrap;background:#f3f7fb;border:1px solid #dbe6f0;border-radius:10px;padding:12px 14px}
.feedback-mailbox-label{flex-shrink:0;font-size:10px;color:#2c5c96;background:#e4eefa;border-radius:4px;padding:1px 6px;font-weight:600}
.feedback-address{flex:1 1 auto;min-width:0;font-size:14px;font-weight:700;color:var(--navy);word-break:break-all;user-select:all;-webkit-user-select:all}
.feedback-copy{flex-shrink:0;padding:6px 14px;font-size:12px}
.feedback-tip{margin:10px 0 0;font-size:11.5px;color:var(--muted);line-height:1.6;min-height:0}
tbody tr:hover{background:#f9fbfd}
tbody tr:last-child td{border-bottom:none}

@media (max-width:1100px){
  .drawer-meta{gap:12px}
  .feedback-entry span,.config-entry span{display:none}
  .drawer-action.feedback-entry,.drawer-action.config-entry{padding:4px 8px}
}
@media (max-width:900px){
  :root{--topbar-h:152px}
  .wrap{padding:0 18px}
  .topbar-inner{padding-top:8px;padding-bottom:8px;gap:7px}
  .topbar-main{flex-wrap:wrap;gap:9px}
  .search{order:5;flex:1 1 100%;max-width:none;height:36px}
  .drawer-meta{margin-left:auto}
  .drawer-item span:not(.local-tag){display:none}
  .chips{flex-wrap:wrap;overflow:visible}
  .dashboard{padding-top:8px}
  .grid{grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:10px}
}
@media (max-width:640px){
  .brand-name{font-size:14.5px}
  .drawer-item{font-size:10.5px}
}
@media (max-width:640px){
  .modal-panel{padding:22px 16px 18px}
  .modal-chart{height:280px}
  .editor-chart{height:260px}
  .grid{grid-template-columns:1fr}
  .edit-banner{flex-wrap:wrap;gap:8px 10px}
  .eb-text{flex:1 1 100%}
  .eb-shape{order:1}
  .eb-combo{order:2;margin-left:auto}
  .eb-done{order:3;margin-left:0}
  .status-grid{grid-template-columns:repeat(2,1fr)}
}
@media (prefers-reduced-motion:reduce){
  *{animation:none!important;transition:none!important;scroll-behavior:auto}
}

/* ===== 本机账户 / 登录入口 ===== */
.drawer-meta{gap:12px;flex-wrap:wrap}
.user-entry{display:flex;align-items:center;gap:6px;border:1px solid var(--line);background:#fff;border-radius:99px;padding:4px 10px;font-size:11.5px;color:var(--ink);cursor:pointer;white-space:nowrap}
.user-entry:hover{border-color:#b9c6d3}
.user-entry.logged-in{border-color:#c4d2e0;background:#f7fafd}
.user-icon{width:14px;height:14px;fill:none;stroke:var(--muted);stroke-width:1.7;stroke-linecap:round}
.avatar{width:20px;height:20px;border-radius:50%;background:var(--navy);color:#fff;font-size:10px;display:grid;place-items:center;font-weight:700;flex-shrink:0}
.local-tag{font-size:9px;background:#eef1f5;color:var(--muted);border-radius:4px;padding:0 4px;line-height:1.6}
.link-btn{border:0;background:none;color:var(--muted);font-size:10.5px;cursor:pointer;padding:2px;text-decoration:underline;text-underline-offset:2px}
.drawer-action{display:flex;align-items:center;gap:5px;border:1px solid var(--line);background:#fff;border-radius:99px;padding:4px 9px;font-size:11px;color:var(--navy);cursor:pointer;white-space:nowrap}
.drawer-action:hover{border-color:#b9c6d3}
.drawer-action.active{background:var(--navy);color:#fff;border-color:var(--navy)}
.drawer-action svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:1.7}

/* ===== 编辑首页 ===== */
.edit-banner{display:flex;justify-content:space-between;align-items:center;gap:16px;background:#fff;border:1px solid var(--line);border-left:3px solid var(--teal);border-radius:10px;padding:9px 14px;margin-bottom:10px;font-size:12px}
.edit-banner b{color:var(--navy);margin-right:10px}
.edit-banner span{color:var(--muted)}
.eb-done{border:1px solid var(--navy);background:var(--navy);color:#fff;border-radius:7px;padding:4px 14px;font-size:11.5px;cursor:pointer;white-space:nowrap;flex-shrink:0}
.eb-shape{display:flex;align-items:center;gap:8px;flex-shrink:0}
.eb-shape>span{font-size:11px;color:var(--muted);white-space:nowrap}
.eb-combo{border:1px solid #c4d2e0;background:#f3f7fb;color:var(--navy);border-radius:7px;padding:4px 12px;font-size:11.5px;cursor:pointer;white-space:nowrap;flex-shrink:0}
.eb-combo:hover{border-color:#9fb2c4;background:#eaf2ff}
.edit-filters{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;background:#fff;border:1px solid var(--line);border-radius:10px;padding:8px 12px;margin-bottom:10px}
.ef-group{display:flex;align-items:center;gap:5px;flex-wrap:wrap;min-width:0}
.ef-label{font-size:11px;color:var(--muted);white-space:nowrap;margin-right:2px}
.ef-chip{border:1px solid var(--line);background:#fff;color:var(--ink-2);border-radius:99px;padding:2px 9px;font-size:11px;line-height:1.6;cursor:pointer;white-space:nowrap;transition:.15s;font-family:inherit}
.ef-chip:hover{border-color:#b9c6d3}
.ef-chip.active{background:var(--navy);border-color:var(--navy);color:#fff}
.ef-tail{margin-left:auto;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.ef-count{font-size:11px;color:var(--muted);white-space:nowrap}
.ef-clear{border:1px solid var(--line);background:#fff;color:var(--ink-2);border-radius:99px;padding:3px 10px;font-size:11px;cursor:pointer;white-space:nowrap;font-family:inherit}
.ef-clear:hover{border-color:#b9c6d3;color:var(--navy)}
.ef-picked{font-size:11px;color:var(--navy);font-weight:600;white-space:nowrap}
.ef-batch{border:1px solid var(--line);background:#fff;color:var(--ink-2);border-radius:99px;padding:3px 10px;font-size:11px;cursor:pointer;white-space:nowrap;font-family:inherit}
.ef-batch:hover:not(:disabled){border-color:#b9c6d3;color:var(--navy)}
.ef-batch:disabled{opacity:.45;cursor:default}
.card-top-left{display:flex;align-items:center;gap:6px;min-width:0}
.card-pick{width:14px;height:14px;margin:0;accent-color:var(--navy);cursor:pointer;flex-shrink:0}
.card.picked{border-color:#9db4ca;box-shadow:0 0 0 2px rgba(31,78,121,.08)}
.grid.edit-mode{cursor:crosshair}
.marquee-box{position:fixed;z-index:90;border:1px solid #1f4e79;background:rgba(31,78,121,.08);border-radius:2px;pointer-events:none}
body.marquee-active{user-select:none;-webkit-user-select:none}
.card-tools{position:absolute;top:8px;right:8px;display:flex;gap:4px;z-index:5}
.tool{width:24px;height:24px;border:1px solid var(--line);background:#fff;border-radius:6px;color:var(--muted);font-size:14px;line-height:1;display:grid;place-items:center;cursor:pointer;padding:0;transition:.15s}
.tool:hover{border-color:#b9c6d3;color:var(--navy)}
.tool.star.on{color:#c19a3d;border-color:#e8d9b5;background:#fffdf6}
.tool.drag{cursor:grab;touch-action:none;letter-spacing:-2px;font-size:12px}
.tool.drag:active{cursor:grabbing}
.tool.edit{width:auto;padding:0 8px;font-size:10px;font-weight:600;color:var(--navy);border-color:#d3dfea;background:#f7fafd}
.tool.edit:hover{background:#eef4fa;border-color:#b9c6d3}
.tool.shape svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.8}
.grid.edit-mode .card:not(.card-wide) .card-top{padding-right:148px}
.grid.edit-mode .card-cat{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.card.card-wide .spark{min-height:74px}
@media (min-width:640px){
  .card.card-wide{grid-column:span 2}
}
.card.dragging{opacity:.55;outline:2px dashed var(--navy);outline-offset:-2px}
body.drag-active{cursor:grabbing;user-select:none}
.card.is-home{box-shadow:inset 0 0 0 1px #dbe6f1}
.card-stats{display:flex;gap:11px;align-items:baseline;margin:4px 0 0;font-size:10px;color:var(--muted);flex-wrap:wrap}
.card-stats span{display:flex;gap:3px;align-items:baseline;white-space:nowrap}
.card-stats i{font-style:normal;color:#6b7885}
.card-stats b{font-weight:700;font-size:11px;font-variant-numeric:tabular-nums}
.card-stats .cut{margin-left:auto;font-size:9.5px;color:#6b7885}
.up{color:#b4553f}
.down{color:#2f7d6d}
.flat{color:var(--ink-2)}
.card{min-height:238px;padding:13px 13px 9px}
.spark{height:78px;min-height:66px}
.card h3 .title-link{border:0;background:none;padding:0;margin:0;font:inherit;color:inherit;text-align:left;cursor:pointer;letter-spacing:inherit}
.card h3 .title-link:hover{color:var(--navy);text-decoration:underline;text-underline-offset:2px}
.card-abbr{display:inline-block;margin-left:6px;padding:0 5px;border-radius:4px;background:#eef4fa;color:#38628c;font-size:9.5px;font-weight:700;letter-spacing:.3px;line-height:1.5;vertical-align:1px;white-space:nowrap}
.title-abbr{display:inline-block;margin-left:8px;padding:1px 7px;border-radius:5px;background:#eef4fa;color:#38628c;font-size:11px;font-weight:700;letter-spacing:.5px;vertical-align:3px;white-space:nowrap}

/* ===== 详情统计 / 图表编辑 ===== */
.modal-stats{display:flex;gap:20px;flex-wrap:wrap;margin-top:10px;font-size:11px;color:var(--muted)}
.modal-stats span{display:flex;align-items:baseline;gap:5px}
.modal-stats i{font-style:normal;color:#6b7885}
.modal-stats small{font-size:10.5px;color:var(--muted)}
.modal-stats b{font-size:15px;color:var(--navy);font-variant-numeric:tabular-nums;font-weight:800}
.modal-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.ghost-btn{border:1px solid var(--line);background:#fff;color:var(--ink-2);border-radius:7px;padding:5px 12px;font-size:11.5px;cursor:pointer}
.ghost-btn:hover{border-color:#b9c6d3;color:var(--navy)}
.primary-btn{border:1px solid var(--navy);background:var(--navy);color:#fff;border-radius:7px;padding:6px 16px;font-size:12px;cursor:pointer}
.primary-btn:hover{background:#1f4e79}
.primary-btn:disabled{opacity:.6;cursor:default}
.chart-editor{background:#f7f9fb;border:1px solid var(--line);border-radius:10px;padding:12px 14px;margin:8px 0 4px}
.ce-head{display:flex;justify-content:space-between;align-items:baseline;font-size:12px;margin-bottom:9px;color:var(--navy)}
.ce-head span{font-size:10.5px;color:var(--muted)}
.ce-series{display:flex;flex-wrap:wrap;gap:7px 16px;margin-bottom:10px}
.ce-series label{display:flex;align-items:center;gap:5px;font-size:11.5px;color:var(--ink-2);cursor:pointer}
.ce-dot{width:8px;height:8px;border-radius:2px;display:inline-block;flex-shrink:0}
.ce-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap;font-size:11.5px;color:var(--muted);margin-bottom:10px}
.ce-label{color:var(--ink-2)}
.segmented.small{display:flex;background:#e9edf2;border-radius:7px;padding:2px;gap:2px}
.segmented.small button{border:0;background:transparent;padding:3px 9px;border-radius:5px;font-size:11px;color:var(--muted);cursor:pointer}
.segmented.small button.active{background:#fff;color:var(--navy);font-weight:700;box-shadow:0 1px 2px rgba(16,32,48,.12)}
.ce-check{display:flex;align-items:center;gap:5px;color:var(--ink-2);cursor:pointer}
.ce-years{display:flex;align-items:center;gap:4px;white-space:nowrap}
.ce-year{display:flex;align-items:center;gap:4px;font-size:11px;color:var(--ink-2);white-space:nowrap}
.ce-year input{width:64px;border:1px solid var(--line);border-radius:6px;padding:3px 6px;font-size:11.5px;font-family:inherit;color:var(--ink);background:#fff;outline:none}
.ce-year input:focus{border-color:#b9c6d3;box-shadow:0 0 0 2px rgba(31,78,121,.08)}
.ce-year-sep{color:var(--muted);font-size:11px}
.ce-actions{display:flex;justify-content:flex-end;gap:8px}
.table-scroll{max-height:340px}

/* ===== 编辑图表弹窗 ===== */
.editor-panel{width:min(860px,94vw)}
.ce-modal-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding-right:34px;margin-bottom:14px}
.ce-modal-head h3{margin:0 0 5px;font-size:21px;color:var(--navy);letter-spacing:-.4px}
.ce-sub{margin:0;font-size:12px;color:var(--muted)}
.ce-modal-head>span{font-size:10.5px;color:var(--muted);white-space:nowrap;padding-top:6px}
.editor-modal .chart-editor{margin:0}
.editor-chart{height:340px;margin:8px -6px 12px}
.editor-modal .ce-actions{margin-top:2px}

/* ===== 自定义组合图表 ===== */
.combo-modal{z-index:125}
.combo-panel{width:min(1180px,96vw);padding:22px 24px 18px}
.combo-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding-right:34px}
.combo-head h3{margin:0 0 5px;font-size:21px;color:var(--navy);letter-spacing:-.4px}
.combo-sub{margin:0;font-size:12px;color:var(--muted);line-height:1.6}
.combo-head>span{font-size:10.5px;color:var(--muted);white-space:nowrap;padding-top:6px}
.combo-body{display:grid;grid-template-columns:minmax(360px,1fr) minmax(0,1.05fr);gap:18px;margin-top:14px}
.combo-form{min-width:0;display:flex;flex-direction:column;gap:10px}
.uc-field{display:flex;flex-direction:column;gap:5px;font-size:11px;color:var(--muted);min-width:0}
.uc-field>span{font-weight:600;color:var(--ink-2)}
.uc-field input,.uc-field select{width:100%;height:32px;border:1px solid var(--line);border-radius:7px;background:#fff;padding:0 9px;font-size:12px;color:var(--ink);font-family:inherit;outline:none}
.uc-field input:focus,.uc-field select:focus{border-color:#9fb3c8;box-shadow:0 0 0 3px rgba(31,78,121,.08)}
.uc-picker{max-height:238px;overflow:auto;border:1px solid var(--line);border-radius:8px;background:#fff}
.uc-group{position:sticky;top:0;z-index:1;background:#f7f9fb;border-bottom:1px solid #eef1f4;padding:4px 9px;font-size:10px;font-weight:700;color:var(--muted);letter-spacing:.5px}
.uc-pick-row{display:flex;align-items:center;gap:7px;padding:6px 9px;border-bottom:1px solid #f0f3f6;cursor:pointer;font-size:11px;line-height:1.35}
.uc-pick-row:last-child{border-bottom:0}
.uc-pick-row:hover{background:#f8fafc}
.uc-pick-row.on{background:#f1f6fb}
.uc-pick-row input{width:13px;height:13px;margin:0;accent-color:var(--navy);flex-shrink:0}
.uc-country{display:inline-flex;align-items:center;justify-content:center;min-width:30px;height:17px;padding:0 4px;border-radius:4px;background:#eef3f8;color:var(--navy);font-size:9px;font-weight:700;flex-shrink:0}
.uc-country.US{background:#f7f2e6;color:#8a641f}
.uc-pick-name{display:flex;flex-direction:column;min-width:0;flex:1}
.uc-pick-name b{font-size:11px;font-weight:600;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.uc-pick-name em{font-style:normal;font-size:10px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.uc-pick-meta{font-size:9.5px;color:var(--muted);white-space:nowrap;flex-shrink:0}
.uc-pick-empty{padding:18px 10px;text-align:center;font-size:11px;color:var(--muted)}
.uc-selected-head{display:flex;justify-content:space-between;align-items:baseline;font-size:11px;color:var(--muted)}
.uc-selected-head span:first-child{font-weight:600;color:var(--ink-2)}
.uc-selected{display:flex;flex-wrap:wrap;gap:5px;min-height:30px}
.uc-chip{display:flex;align-items:center;gap:5px;max-width:100%;background:#f4f7fa;border:1px solid var(--line);border-radius:7px;padding:4px 5px 4px 6px;font-size:10px;color:var(--ink-2)}
.uc-chip-text{display:flex;flex-direction:column;min-width:0;line-height:1.3}
.uc-chip-text b{font-size:10px;font-weight:600;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:190px}
.uc-chip-text em{font-style:normal;font-size:9.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:190px}
.uc-chip button{border:0;background:transparent;color:var(--muted);font-size:13px;line-height:1;padding:0 2px;cursor:pointer;flex-shrink:0}
.uc-chip button:hover{color:#b4553f}
.uc-empty{margin:0;font-size:10.5px;color:var(--muted);line-height:1.6}
.uc-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.uc-range-presets{display:flex;gap:5px;flex-wrap:wrap}
.uc-range-presets button{border:1px solid var(--line);background:#fff;color:var(--ink-2);border-radius:99px;padding:2px 9px;font-size:10.5px;cursor:pointer;font-family:inherit}
.uc-range-presets button:hover{border-color:#b9c6d3;color:var(--navy)}
.uc-range-presets button.active{background:var(--navy);border-color:var(--navy);color:#fff}
.uc-years{display:flex;align-items:center;gap:7px}
.uc-years label{display:flex;align-items:center;gap:5px;font-size:10.5px;color:var(--muted)}
.uc-years input{width:74px;height:30px}
.uc-hint{margin:0;font-size:10.5px;color:var(--muted);line-height:1.65;min-height:17px}
.combo-preview{display:flex;flex-direction:column;min-width:0;border-left:1px solid var(--line);padding-left:18px}
.combo-preview-head{display:flex;justify-content:space-between;align-items:baseline;gap:10px}
.combo-preview-head b{font-size:12px;color:var(--navy)}
.combo-preview-head span{font-size:10px;color:var(--muted);text-align:right}
.combo-chart{height:292px;margin:4px -6px 0;flex:1;min-height:230px}
.combo-note{margin:4px 0 0;font-size:10.5px;color:var(--muted);line-height:1.65}
.uc-actions{display:flex;align-items:center;gap:8px;margin-top:12px;border-top:1px solid var(--line);padding-top:12px}
.uc-actions-spacer{flex:1}
.uc-delete{color:#b4553f;border-color:#edcfc8}
.uc-delete:hover{color:#8f3f2d;border-color:#d9a99f;background:#fff9f7}
@media (max-width:900px){
  .combo-body{grid-template-columns:1fr}
  .combo-preview{border-left:0;border-top:1px solid var(--line);padding-left:0;padding-top:12px}
  .combo-chart{height:250px}
}
@media (max-width:640px){
  :root{--topbar-h:200px}
  .combo-panel{padding:20px 14px 16px}
  .combo-head>span{display:none}
  .combo-head h3{font-size:19px}
  .uc-grid{grid-template-columns:1fr}
  .uc-pick-meta{display:none}
  .combo-chart{height:220px}
  .uc-chip-text b,.uc-chip-text em{max-width:160px}
  .drawer-meta{width:100%;justify-content:flex-end;gap:8px}
  .drawer-item{display:none}
  .data-status-btn{display:flex}
  .data-status-btn>span{display:none}
  .data-status-btn b{font-size:10px}
  .feedback-panel{padding:20px 14px 16px}
  .feedback-mailbox{padding:10px 12px;gap:8px}
  .feedback-address{font-size:13px}
  .feedback-copy{width:100%}
}

/* ===== 标签名称 / 操作确认弹窗 ===== */
.tab-dialog{z-index:130}
.tab-dialog-panel{width:min(400px,92vw);padding:22px 22px 18px}
.tab-dialog-panel h3{margin:0 0 8px;font-size:18px;color:var(--navy);letter-spacing:-.3px}
.td-msg{margin:0 0 12px;font-size:12.5px;line-height:1.7;color:var(--ink-2)}
.td-field{display:block;margin-bottom:8px}
.td-field span{display:block;font-size:11.5px;color:var(--muted);margin-bottom:4px}
.td-field input{width:100%;border:1px solid var(--line);border-radius:8px;padding:8px 10px;font-size:13px;font-family:inherit;color:var(--ink);outline:none}
.td-field input:focus{border-color:#b9c6d3;box-shadow:0 0 0 3px rgba(31,78,121,.08)}
.td-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:8px}

/* ===== 登录 / 注册弹窗 ===== */
.auth-modal{position:fixed;inset:0;z-index:120;display:none}
.auth-modal.open{display:block}
.auth-panel{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:min(430px,92vw);background:#fff;border-radius:16px;box-shadow:0 30px 80px rgba(8,18,30,.3);padding:26px 26px 22px;animation:pop .22s ease-out}
.auth-panel h3{margin:0 0 10px;font-size:21px;color:var(--navy);letter-spacing:-.4px}
.auth-note{font-size:11.5px;line-height:1.7;color:var(--ink-2);background:#f5f8fb;border-left:3px solid var(--teal);border-radius:6px;padding:9px 11px;margin:0 0 14px}
.auth-note b{color:var(--navy)}
.auth-tabs{display:flex;background:#eef1f5;border-radius:8px;padding:3px;gap:2px;margin-bottom:14px}
.auth-tabs button{flex:1;border:0;background:transparent;padding:6px;border-radius:6px;font-size:12.5px;color:var(--muted);cursor:pointer}
.auth-tabs button.active{background:#fff;color:var(--navy);font-weight:700;box-shadow:0 1px 3px rgba(16,32,48,.1)}
.auth-field{display:block;margin-bottom:10px}
.auth-field span{display:block;font-size:11px;color:var(--muted);margin-bottom:4px}
.auth-field input{width:100%;height:38px;border:1px solid var(--line);border-radius:8px;padding:0 11px;font-size:13px;outline:none;color:var(--ink);background:#fff}
.auth-field input:focus{border-color:#9fb3c8;box-shadow:0 0 0 3px rgba(31,78,121,.08)}
.auth-error{color:#b4553f;font-size:11.5px;min-height:16px;margin:2px 0 8px}
.auth-submit{width:100%}
.auth-foot{font-size:10.5px;color:var(--muted);line-height:1.6;margin:12px 0 0;text-align:center}

/* ===== Toast ===== */
.toast{position:fixed;left:50%;bottom:28px;transform:translate(-50%,10px);background:rgba(21,32,43,.94);color:#fff;font-size:12.5px;padding:9px 16px;border-radius:8px;opacity:0;pointer-events:none;transition:.2s;z-index:200;max-width:80vw}
.toast.show{opacity:1;transform:translate(-50%,0)}

@media (max-width:900px){
  .drawer-meta{gap:9px}
  .edit-banner{align-items:flex-start}
  .edit-banner span{display:block;margin:2px 0 0}
  .edit-filters{gap:7px 12px;padding:7px 10px}
  .ef-tail{margin-left:0;width:100%;justify-content:space-between}
  .modal-stats{gap:12px}
}

[hidden]{display:none!important}
