.portal-shell{position:fixed;inset:0;z-index:9000;background:#07101f}
.portal-shell.hidden{display:none!important}
#portalFrame{width:100%;height:100%;display:block;border:0;background:#07101f}
#l.login{position:fixed;inset:0;z-index:10000;min-height:100vh;background:rgba(2,8,23,.76);backdrop-filter:blur(8px);place-items:center}
#l.login .box{position:relative;width:min(420px,92vw);border:1px solid #dbe3ef;box-shadow:0 28px 90px rgba(0,0,0,.35);padding:28px;border-radius:18px}
.portal-login-close{position:absolute;right:14px;top:12px;background:transparent!important;color:#64748b!important;font-size:25px!important;padding:4px 8px!important}
.portal-password-wrap{position:relative}
.portal-password-wrap input{padding-right:62px}
.portal-password-toggle{position:absolute;right:8px;top:50%;transform:translateY(-62%);background:transparent!important;color:#1677ff!important;font-size:12px!important;font-weight:700;padding:6px!important}


/* ===== TMS 科技版运营数字指挥舱（仅首页） ===== */
.tech-command{--tc:#35c9ff;--tb:#4b8dff;--tg:#24d39a;--ta:#ffb84a;--tr:#ff6279;display:flex;flex-direction:column;gap:14px}
.tech-hero{position:relative;overflow:hidden;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 22px;border:1px solid color-mix(in srgb,var(--ui-primary) 35%,var(--ui-line));border-radius:14px;background:linear-gradient(120deg,color-mix(in srgb,var(--ui-panel) 94%,var(--ui-primary)),var(--ui-panel));box-shadow:var(--ui-shadow)}
.tech-hero:after{content:"";position:absolute;right:-40px;top:-70px;width:330px;height:190px;background:repeating-linear-gradient(90deg,transparent 0 17px,color-mix(in srgb,var(--ui-primary) 13%,transparent) 18px 19px);transform:skewX(-22deg);pointer-events:none}
.tech-eyebrow,.tech-panel-code{font-size:10px;letter-spacing:.16em;color:var(--ui-primary);font-weight:800}.tech-live-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--tg);box-shadow:0 0 12px var(--tg);margin-right:7px}
.tech-hero h2{font-size:24px;margin:5px 0 4px;color:var(--ui-text)}.tech-hero p{margin:0;color:var(--ui-muted);font-size:12px}.tech-hero-actions{display:flex;gap:8px;z-index:1}
.tech-kpi-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:11px}.tech-kpi{position:relative;overflow:hidden;padding:15px 15px 13px;border:1px solid var(--ui-line);border-radius:12px;background:var(--ui-panel);box-shadow:var(--ui-shadow)}
.tech-kpi:before{content:"";position:absolute;left:0;top:0;width:3px;height:100%;background:var(--tc);box-shadow:0 0 14px var(--tc)}.tech-kpi.amber:before{background:var(--ta)}.tech-kpi.blue:before{background:var(--tb)}.tech-kpi.green:before{background:var(--tg)}.tech-kpi.red:before{background:var(--tr)}
.tech-kpi-head{display:flex;justify-content:space-between;color:var(--ui-muted);font-size:11px}.tech-kpi-head i{font-style:normal;opacity:.45;font-family:monospace}.tech-kpi strong{display:block;font-size:27px;line-height:1;margin:13px 0 5px;color:var(--ui-text)}.tech-kpi small{color:var(--ui-muted);font-size:10px}
.tech-meter{height:2px;margin-top:12px;background:var(--ui-line);overflow:hidden}.tech-meter span{display:block;height:100%;background:var(--tc);box-shadow:0 0 8px var(--tc)}.tech-kpi.amber .tech-meter span{background:var(--ta)}.tech-kpi.blue .tech-meter span{background:var(--tb)}.tech-kpi.green .tech-meter span{background:var(--tg)}.tech-kpi.red .tech-meter span{background:var(--tr)}
.tech-main-grid,.tech-bottom-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px}.tech-span-2{grid-column:span 2}.tech-panel{position:relative;overflow:hidden;padding:15px;border:1px solid var(--ui-line);border-radius:13px;background:var(--ui-panel);box-shadow:var(--ui-shadow);min-width:0}.tech-panel:after{content:"";position:absolute;right:0;top:0;width:36px;height:1px;background:var(--ui-primary);box-shadow:0 0 8px var(--ui-primary)}
.tech-panel-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:14px}.tech-panel-head h3{margin:3px 0 0;font-size:14px;color:var(--ui-text)}.tech-panel-tag{padding:4px 7px;border:1px solid var(--ui-line);border-radius:6px;color:var(--ui-muted);font-size:10px}.tech-link{background:transparent!important;color:var(--ui-primary)!important;padding:4px!important;font-size:11px!important}.tech-head-actions{display:flex;gap:7px;align-items:center}
.tech-project-chart{display:flex;flex-direction:column;gap:11px}.tech-project-row{display:grid;grid-template-columns:145px 1fr 65px;align-items:center;gap:12px}.tech-project-name b,.tech-project-name span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tech-project-name b{font-size:11px;color:var(--ui-text)}.tech-project-name span{font-size:9px;color:var(--ui-muted);margin-top:2px}.tech-project-track{height:10px;background:var(--ui-panel-2);border:1px solid var(--ui-line);overflow:hidden}.tech-project-volume{height:100%;background:color-mix(in srgb,var(--ui-primary) 15%,transparent);min-width:5px}.tech-project-volume span{display:block;height:100%;background:linear-gradient(90deg,var(--ui-primary),var(--tc));box-shadow:0 0 8px color-mix(in srgb,var(--ui-primary) 60%,transparent)}.tech-project-stat{text-align:right}.tech-project-stat b,.tech-project-stat small{display:block}.tech-project-stat b{font-size:11px;color:var(--ui-text)}.tech-project-stat small{font-size:9px;color:var(--ui-muted)}
.tech-donut-wrap{display:flex;align-items:center;justify-content:center;gap:24px;min-height:160px}.tech-donut{width:130px;height:130px;border-radius:50%;background:conic-gradient(var(--tg) 0 var(--done),var(--tb) var(--done) calc(var(--done) + var(--run)),var(--ta) calc(var(--done) + var(--run)) 300deg,var(--ui-line) 300deg);display:grid;place-items:center;position:relative;box-shadow:0 0 24px color-mix(in srgb,var(--ui-primary) 10%,transparent)}.tech-donut:after{content:"";position:absolute;inset:13px;border-radius:50%;background:var(--ui-panel)}.tech-donut>div{z-index:1;text-align:center}.tech-donut strong,.tech-donut span{display:block}.tech-donut strong{font-size:25px;color:var(--ui-text)}.tech-donut span{font-size:9px;color:var(--ui-muted)}.tech-legend{display:flex;flex-direction:column;gap:8px;font-size:10px;color:var(--ui-muted)}.tech-legend span{display:grid;grid-template-columns:9px 1fr 25px;gap:6px}.tech-legend i{width:7px;height:7px;border-radius:50%;margin-top:2px}.tech-legend i.green{background:var(--tg)}.tech-legend i.blue{background:var(--tb)}.tech-legend i.amber{background:var(--ta)}.tech-legend i.red{background:var(--tr)}.tech-legend b{color:var(--ui-text);text-align:right}
.tech-resource-grid,.tech-future-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.tech-resource-grid>div,.tech-future-grid>div{padding:11px;border:1px solid var(--ui-line);background:var(--ui-panel-2);border-radius:8px}.tech-resource-grid span,.tech-future-grid span,.tech-resource-grid small,.tech-future-grid small{display:block;font-size:9px;color:var(--ui-muted)}.tech-resource-grid b,.tech-future-grid b{display:block;font-size:20px;color:var(--ui-text);margin:4px 0}.tech-scan-line{height:1px;background:linear-gradient(90deg,transparent,var(--tc),transparent);margin-top:13px;box-shadow:0 0 10px var(--tc)}
.tech-stream{display:flex;flex-direction:column}.tech-stream-row{display:grid;grid-template-columns:12px minmax(160px,1fr) 95px 70px;align-items:center;gap:8px;padding:8px 3px;border-bottom:1px solid var(--ui-line);font-size:10px}.tech-stream-row:last-child{border-bottom:0}.tech-stream-row b,.tech-stream-row small{display:block}.tech-stream-row b{color:var(--ui-text)}.tech-stream-row small{color:var(--ui-muted);margin-top:2px}.tech-stream-row>span{color:var(--ui-text-2)}.tech-stream-row em{font-style:normal;color:var(--ui-primary);text-align:right}.tech-status-dot{width:7px;height:7px;border-radius:50%;background:var(--ta);box-shadow:0 0 7px var(--ta)}.tech-status-dot.done{background:var(--tg);box-shadow:0 0 7px var(--tg)}.tech-status-dot.run{background:var(--tb);box-shadow:0 0 7px var(--tb)}
.tech-alert-list{display:grid;grid-template-columns:1fr 1fr;gap:8px}.tech-alert-list button{display:flex!important;align-items:center;justify-content:space-between;text-align:left;padding:11px!important;border:1px solid var(--ui-line)!important;border-radius:8px!important;background:var(--ui-panel-2)!important;color:var(--ui-text-2)!important}.tech-alert-list b{font-size:17px;color:var(--ui-text)}
.tech-future-grid{grid-template-columns:repeat(4,1fr)}.tech-future-note{margin-top:10px;padding:8px 10px;border-left:2px solid var(--ui-primary);background:var(--ui-panel-2);font-size:9px;color:var(--ui-muted)}
.tech-quick{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.tech-quick button{display:flex!important;align-items:center;gap:11px;padding:12px 14px!important;text-align:left!important;border:1px solid var(--ui-line)!important;border-radius:10px!important;background:var(--ui-panel)!important;color:var(--ui-text)!important}.tech-quick i{width:30px;height:30px;border:1px solid color-mix(in srgb,var(--ui-primary) 45%,var(--ui-line));border-radius:8px;display:grid;place-items:center;font-style:normal;color:var(--ui-primary);background:color-mix(in srgb,var(--ui-primary) 8%,transparent)}.tech-quick span,.tech-quick small{display:block}.tech-quick small{font-size:9px;color:var(--ui-muted);margin-top:2px}.tech-empty{display:grid;place-items:center;min-height:120px;color:var(--ui-muted);font-size:11px}.tech-loading,.tech-error{min-height:280px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;color:var(--ui-muted)}.tech-loading b,.tech-error b{color:var(--ui-text)}.tech-pulse{width:34px;height:34px;border:2px solid var(--ui-primary);border-radius:50%;box-shadow:0 0 18px color-mix(in srgb,var(--ui-primary) 40%,transparent);animation:techpulse 1.1s infinite}.tech-error button{margin-top:8px}@keyframes techpulse{50%{transform:scale(.75);opacity:.35}}
html[data-tms-theme="navy"] .tech-command,html[data-tms-theme="graphite"] .tech-command,html[data-tms-theme="indigo"] .tech-command{filter:saturate(1.08)}
@media(max-width:1100px){.tech-kpi-grid{grid-template-columns:repeat(3,1fr)}.tech-main-grid,.tech-bottom-grid{grid-template-columns:1fr 1fr}.tech-span-2{grid-column:span 2}.tech-quick{grid-template-columns:1fr 1fr}}
@media(max-width:720px){.tech-kpi-grid,.tech-main-grid,.tech-bottom-grid,.tech-quick{grid-template-columns:1fr}.tech-span-2{grid-column:span 1}.tech-project-row{grid-template-columns:110px 1fr 50px}.tech-future-grid{grid-template-columns:1fr 1fr}.tech-hero{align-items:flex-start;flex-direction:column}}



/* ===== v7.2.1 主题/导航颜色优先级修复 ===== */

/* 左侧导航：普通项绝不能被全局主按钮规则染蓝 */
html[data-tms-theme] aside nav button,
html[data-tms-theme] aside nav .nav-title{
  background:transparent!important;
  color:var(--ui-nav)!important;
  box-shadow:none!important;
  border-color:transparent!important;
}
html[data-tms-theme] aside nav button:hover,
html[data-tms-theme] aside nav .nav-title:hover{
  background:var(--ui-sidebar-2)!important;
  color:#fff!important;
}
html[data-tms-theme] aside nav button.active{
  background:var(--ui-nav-active)!important;
  color:#fff!important;
  box-shadow:inset 3px 0 0 var(--ui-primary)!important;
}
html[data-tms-theme="light"] aside nav button.active{
  color:#1769b2!important;
}

/* 主题选择菜单：恢复卡片菜单，不允许被主按钮蓝色覆盖 */
html[data-tms-theme] .theme-panel{
  background:var(--ui-panel)!important;
  border-color:var(--ui-line)!important;
}
html[data-tms-theme] .theme-panel button{
  background:transparent!important;
  color:var(--ui-text-2)!important;
  border:0!important;
  box-shadow:none!important;
  transform:none!important;
}
html[data-tms-theme] .theme-panel button:hover{
  background:var(--ui-panel-2)!important;
  color:var(--ui-text)!important;
}

/* 右上角主题按钮保持中性 */
html[data-tms-theme] .theme-btn{
  background:var(--ui-panel-2)!important;
  color:var(--ui-text-2)!important;
  border:1px solid var(--ui-line)!important;
  box-shadow:none!important;
  transform:none!important;
}

/* 科技首页中的未来计划，去掉旧版蓝白卡片与科技主题冲突 */
html[data-tms-theme] .tech-future-original .future-pool{
  margin-top:12px!important;
  background:var(--ui-panel-2)!important;
  border-color:var(--ui-line)!important;
  box-shadow:none!important;
}
html[data-tms-theme] .tech-future-original .future-date-card{
  background:var(--ui-panel)!important;
  border-color:var(--ui-line)!important;
}
html[data-tms-theme] .tech-future-original .future-date-head{
  background:var(--ui-panel-2)!important;
  color:var(--ui-text)!important;
}
html[data-tms-theme] .tech-future-original .future-stat{
  background:var(--ui-panel)!important;
  border-color:var(--ui-line)!important;
}

/* 首页待办科技卡 */
.tech-todo-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px
}
html[data-tms-theme] .tech-todo-grid button{
  display:grid!important;
  grid-template-columns:34px 1fr 14px;
  align-items:center;
  gap:9px;
  text-align:left!important;
  padding:10px 11px!important;
  background:var(--ui-panel-2)!important;
  color:var(--ui-text)!important;
  border:1px solid var(--ui-line)!important;
  border-radius:9px!important;
  box-shadow:none!important
}
.tech-todo-grid button i{
  width:30px;height:30px;
  display:grid;place-items:center;
  border-radius:8px;
  background:color-mix(in srgb,var(--ui-primary) 10%,transparent);
  font-style:normal
}
.tech-todo-grid button span b,
.tech-todo-grid button span small{display:block}
.tech-todo-grid button span b{font-size:11px}
.tech-todo-grid button span small{font-size:9px;color:var(--ui-muted);margin-top:3px}
.tech-todo-grid button em{font-style:normal;color:var(--ui-muted);text-align:right}

.tech-future-summary{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:8px
}
.tech-future-summary>div{
  padding:10px 12px;
  border:1px solid var(--ui-line);
  border-radius:9px;
  background:var(--ui-panel-2)
}
.tech-future-summary span{
  display:block;
  font-size:9px;
  color:var(--ui-muted)
}
.tech-future-summary b{
  display:block;
  font-size:20px;
  color:var(--ui-text);
  margin-top:5px
}
.tech-future-summary .danger b{color:var(--tr)}
.tech-future-summary b.date{font-size:13px;padding-top:4px}

@media(max-width:720px){
  .tech-todo-grid,.tech-future-summary{grid-template-columns:1fr 1fr}
}



/* ===== TMS v7.3 运营工作台定稿视觉：参考方案A/B ===== */
.opsx-shell{
  --x-blue:#1685ff;--x-cyan:#18c8df;--x-green:#11c99a;--x-amber:#ffad2f;--x-red:#ff5262;
  display:flex;flex-direction:column;gap:12px;color:var(--ui-text)
}
.opsx-page-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:2px}
.opsx-page-head h2{margin:0;font-size:23px;color:var(--ui-text)}
.opsx-page-head p{margin:3px 0 0;color:var(--ui-muted);font-size:11px}
.opsx-head-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}

.opsx-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px}
.opsx-kpi{
  min-width:0;min-height:91px;display:grid;grid-template-columns:42px 1fr 62px;align-items:center;gap:9px;
  padding:12px;border:1px solid var(--ui-line);border-radius:11px;background:var(--ui-panel);
  box-shadow:var(--ui-shadow);cursor:pointer;transition:.15s ease
}
.opsx-kpi:hover{transform:translateY(-1px);border-color:color-mix(in srgb,var(--x-blue) 42%,var(--ui-line))}
.opsx-kpi-icon{width:38px;height:38px;display:grid;place-items:center;border-radius:9px;color:#fff;font-size:18px;background:linear-gradient(135deg,var(--x-blue),#076bf0);box-shadow:0 8px 18px rgba(22,133,255,.20)}
.opsx-kpi.amber .opsx-kpi-icon{background:linear-gradient(135deg,#ffb84d,#ff8f00)}
.opsx-kpi.cyan .opsx-kpi-icon{background:linear-gradient(135deg,#27d4df,#0aa9cf)}
.opsx-kpi.green .opsx-kpi-icon{background:linear-gradient(135deg,#18d5a5,#04aa80)}
.opsx-kpi.red .opsx-kpi-icon{background:linear-gradient(135deg,#ff6572,#f4374c)}
.opsx-kpi-main span{display:block;color:var(--ui-muted);font-size:10px}
.opsx-kpi-main strong{display:block;color:var(--ui-text);font-size:24px;line-height:1;margin:4px 0}
.opsx-kpi-main strong em{font-style:normal;font-size:9px;color:var(--ui-muted);margin-left:4px;font-weight:500}
.opsx-kpi-main small{display:block;color:var(--ui-muted);font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.opsx-spark svg{width:100%;height:32px;overflow:visible}
.opsx-spark polyline{fill:none;stroke:var(--x-blue);stroke-width:2}
.opsx-kpi.amber .opsx-spark polyline{stroke:var(--x-amber)}
.opsx-kpi.cyan .opsx-spark polyline{stroke:var(--x-cyan)}
.opsx-kpi.green .opsx-spark polyline{stroke:var(--x-green)}
.opsx-kpi.red .opsx-spark polyline{stroke:var(--x-red)}

.opsx-main-grid{display:grid;grid-template-columns:1.7fr .9fr 1.15fr 1.05fr;gap:9px;align-items:stretch}
.opsx-panel,.opsx-future{min-width:0;border:1px solid var(--ui-line);border-radius:11px;background:var(--ui-panel);box-shadow:var(--ui-shadow);padding:11px 12px}
.opsx-panel-head{min-height:31px;display:flex;align-items:flex-start;justify-content:space-between;gap:8px;margin-bottom:7px}
.opsx-panel-head h3{margin:0;color:var(--ui-text);font-size:13px}
.opsx-panel-head span{display:block;color:var(--ui-muted);font-size:9px;margin-top:2px}
.opsx-link{background:transparent!important;color:var(--x-blue)!important;border:0!important;padding:2px 0!important;font-size:9px!important;box-shadow:none!important;transform:none!important}

.opsx-chart-legend{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:11px;color:var(--ui-muted);font-size:8px;margin:-3px 2px 2px}
.opsx-chart-legend .blue{color:var(--x-blue)} .opsx-chart-legend .green{color:var(--x-green)}
.opsx-chart-legend .amber{color:var(--x-amber)} .opsx-chart-legend .red{color:var(--x-red)}
.opsx-line-chart{position:relative;height:168px;padding:7px 5px 20px 30px}
.opsx-line-chart svg{width:100%;height:100%;overflow:visible}
.opsx-line-chart .grid line{stroke:var(--ui-line);stroke-width:.45;opacity:.85}
.opsx-line-chart .series{fill:none;stroke-width:1.5;vector-effect:non-scaling-stroke}
.opsx-line-chart .series.blue{stroke:var(--x-blue)} .opsx-line-chart .series.green{stroke:var(--x-green)}
.opsx-line-chart .series.amber{stroke:var(--x-amber)} .opsx-line-chart .series.red{stroke:var(--x-red)}
.opsx-axis.y{position:absolute;left:2px;top:13px;bottom:27px;display:flex;flex-direction:column;justify-content:space-between;color:var(--ui-muted);font-size:8px}
.opsx-xlabels{position:absolute;left:30px;right:6px;bottom:2px;display:flex;justify-content:space-between;gap:4px;color:var(--ui-muted);font-size:7px}
.opsx-xlabels span{max-width:50px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.opsx-donut-area{min-height:172px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px}
.opsx-donut{width:104px;height:104px;border-radius:50%;position:relative;display:grid;place-items:center;background:conic-gradient(var(--x-green) 0 var(--done),var(--x-cyan) var(--done) calc(var(--done) + var(--run)),var(--x-amber) calc(var(--done) + var(--run)) 320deg,color-mix(in srgb,var(--ui-line) 75%,transparent) 320deg)}
.opsx-donut:after{content:"";position:absolute;inset:15px;border-radius:50%;background:var(--ui-panel)}
.opsx-donut div{position:relative;z-index:1;text-align:center}
.opsx-donut strong{display:block;color:var(--ui-text);font-size:22px}.opsx-donut span{display:block;color:var(--ui-muted);font-size:8px}
.opsx-dist-list{width:100%;display:flex;flex-direction:column;gap:4px}
.opsx-dist-list>div{display:grid;grid-template-columns:8px 1fr 22px 25px;align-items:center;gap:5px;color:var(--ui-muted);font-size:8px}
.opsx-dist-list i{width:6px;height:6px;border-radius:50%}.opsx-dist-list i.amber{background:var(--x-amber)}.opsx-dist-list i.cyan{background:var(--x-cyan)}.opsx-dist-list i.green{background:var(--x-green)}.opsx-dist-list i.red{background:var(--x-red)}
.opsx-dist-list b{color:var(--ui-text);text-align:right}.opsx-dist-list em{font-style:normal;text-align:right;color:var(--ui-muted)}

.opsx-resource-cards{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-bottom:9px}
.opsx-resource-cards>div{display:grid;grid-template-columns:26px 1fr auto;align-items:center;gap:5px;min-height:47px;padding:7px;border:1px solid var(--ui-line);border-radius:7px;background:var(--ui-panel-2)}
.opsx-resource-cards i{width:25px;height:25px;display:grid;place-items:center;border-radius:7px;background:color-mix(in srgb,var(--x-blue) 15%,transparent);color:var(--x-blue);font-style:normal}
.opsx-resource-cards span{color:var(--ui-muted);font-size:8px}.opsx-resource-cards b{color:var(--ui-text);font-size:14px}.opsx-resource-cards b small{color:var(--ui-muted);font-size:8px;font-weight:500}
.opsx-rate{margin-top:7px}.opsx-rate>div:first-child{display:flex;justify-content:space-between;color:var(--ui-muted);font-size:8px}.opsx-rate>div:first-child b{color:var(--ui-text)}
.opsx-rate .bar{height:5px;margin-top:4px;border-radius:999px;background:var(--ui-panel-2);overflow:hidden}.opsx-rate .bar i{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,var(--x-blue),var(--x-cyan))}
.opsx-rate .bar.green i{background:linear-gradient(90deg,var(--x-green),#31e2b6)}

.opsx-alert-list{display:flex;flex-direction:column;gap:4px}
html[data-tms-theme] .opsx-alert-list button{display:grid!important;grid-template-columns:31px 1fr 35px;align-items:center;gap:7px;min-height:38px;padding:5px 7px!important;border:0!important;border-bottom:1px solid var(--ui-line)!important;border-radius:0!important;background:transparent!important;color:var(--ui-text)!important;box-shadow:none!important;transform:none!important;text-align:left!important}
.opsx-alert-list button:last-child{border-bottom:0!important}
.opsx-alert-list button>i{width:28px;height:28px;display:grid;place-items:center;border-radius:7px;font-style:normal;color:#fff}
.opsx-alert-list button>i.danger{background:linear-gradient(135deg,#ff6674,#e9384d)}.opsx-alert-list button>i.warn{background:linear-gradient(135deg,#ffbd50,#f2940e)}.opsx-alert-list button>i.ok{background:linear-gradient(135deg,#20d5a6,#079d78)}
.opsx-alert-list button span b,.opsx-alert-list button span small{display:block}.opsx-alert-list button span b{font-size:9px;color:var(--ui-text)}.opsx-alert-list button span small{font-size:8px;color:var(--ui-muted);margin-top:2px}
.opsx-alert-list button em{font-style:normal;color:var(--ui-muted);font-size:8px;text-align:right}

.opsx-future-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;margin:5px 0 8px}
.opsx-future-summary>div{padding:8px 9px;border:1px solid var(--ui-line);border-radius:7px;background:var(--ui-panel-2)}
.opsx-future-summary span{display:block;color:var(--ui-muted);font-size:8px}.opsx-future-summary b{display:block;color:var(--ui-text);font-size:17px;margin-top:3px}.opsx-future-summary .danger b{color:var(--x-red)}.opsx-future-summary b.date{font-size:11px;padding-top:4px}
html[data-tms-theme] .opsx-future-body .future-pool{background:var(--ui-panel-2)!important;border-color:var(--ui-line)!important;box-shadow:none!important}
html[data-tms-theme] .opsx-future-body .future-date-card{background:var(--ui-panel)!important;border-color:var(--ui-line)!important}
html[data-tms-theme] .opsx-future-body .future-date-head{background:var(--ui-panel-2)!important;color:var(--ui-text)!important}
html[data-tms-theme] .opsx-future-body .future-stat{background:var(--ui-panel)!important;border-color:var(--ui-line)!important}

/* 方案A：深海蓝。仅作用于工作台，不覆盖导航层级颜色。 */
html[data-tms-theme="navy"] .opsx-shell{--ui-panel:#071d31;--ui-panel-2:#0b2b48;--ui-line:#174a70;--ui-text:#f5fbff;--ui-text-2:#c8dcec;--ui-muted:#8dadc8;--ui-shadow:0 5px 18px rgba(0,0,0,.16)}
html[data-tms-theme="navy"] .opsx-panel,
html[data-tms-theme="navy"] .opsx-future,
html[data-tms-theme="navy"] .opsx-kpi{background:linear-gradient(145deg,#08223a,#06192b)!important}

/* 方案B：明亮白。 */
html[data-tms-theme="light"] .opsx-shell{--ui-panel:#fff;--ui-panel-2:#f7fbff;--ui-line:#dce8f3;--ui-text:#10233c;--ui-text-2:#4a627d;--ui-muted:#7590aa;--ui-shadow:0 4px 14px rgba(35,78,120,.055)}

/* 石墨黑 / 靛青紫继续继承各自全局主题变量，不造成局部串色。 */

/* 导航一级/二级/三级只使用原主题变量，工作台样式不得污染。 */
html[data-tms-theme] aside nav button,
html[data-tms-theme] aside nav .nav-title{font:inherit}
html[data-tms-theme] aside nav button:not(.active){background:transparent!important}
html[data-tms-theme] aside nav button.active{background:var(--ui-nav-active)!important;box-shadow:inset 3px 0 0 var(--ui-primary)!important}
html[data-tms-theme] .theme-panel button{background:transparent!important;color:var(--ui-text-2)!important}
html[data-tms-theme] .theme-panel button:hover{background:var(--ui-panel-2)!important}

.opsx-loading,.opsx-error{min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;color:var(--ui-muted)}
.opsx-error{border:1px solid var(--ui-line);border-radius:10px;background:var(--ui-panel)}.opsx-error b,.opsx-loading b{color:var(--ui-text)}
.opsx-loader{width:30px;height:30px;border:2px solid var(--ui-line);border-top-color:var(--x-blue);border-radius:50%;animation:opsxspin .8s linear infinite}
@keyframes opsxspin{to{transform:rotate(360deg)}}

@media(max-width:1250px){.opsx-main-grid{grid-template-columns:1.5fr .9fr 1fr}.opsx-alerts{grid-column:1/-1}}
@media(max-width:1050px){.opsx-kpis{grid-template-columns:repeat(3,1fr)}.opsx-main-grid{grid-template-columns:1fr 1fr}.opsx-trend{grid-column:1/-1}}
@media(max-width:720px){.opsx-page-head{align-items:flex-start;flex-direction:column}.opsx-kpis,.opsx-main-grid{grid-template-columns:1fr}.opsx-trend,.opsx-alerts{grid-column:auto}.opsx-future-summary{grid-template-columns:1fr 1fr}.opsx-kpi{grid-template-columns:42px 1fr 70px}}



/* =========================================================
   TMS v7.3.2 四主题导航定稿
   以历史“四主题后台对照稿”为准：
   - 一级分组 = 有层级感的色块标题
   - 二/三级 = 安静文本，不整排亮蓝
   - 当前页面 = 单一高亮
   - 主题菜单 = 单层中性下拉，不重复、不整块染色
   ========================================================= */

/* ---------- 共同结构 ---------- */
html[data-tms-theme] #n{
  padding:8px 7px 10px!important;
}
html[data-tms-theme] #n .nav-group{
  margin:0 0 7px!important;
  padding:0!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
}
html[data-tms-theme] #n .nav-title{
  width:100%!important;
  min-height:34px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:8px!important;
  padding:8px 10px!important;
  margin:0 0 3px!important;
  border-radius:8px!important;
  border:1px solid transparent!important;
  box-shadow:none!important;
  transform:none!important;
  font-size:11px!important;
  line-height:1.2!important;
  font-weight:800!important;
  letter-spacing:.01em!important;
  cursor:pointer!important;
}
html[data-tms-theme] #n .nav-arrow{
  font-size:9px!important;
  opacity:.68!important;
  transition:transform .16s ease!important;
}
html[data-tms-theme] #n .nav-group.collapsed .nav-arrow{
  transform:rotate(-90deg)!important;
}
html[data-tms-theme] #n .nav-items{
  padding:1px 2px 2px!important;
  background:transparent!important;
}
html[data-tms-theme] #n .nav-items button{
  width:100%!important;
  min-height:31px!important;
  display:flex!important;
  align-items:center!important;
  padding:7px 10px 7px 13px!important;
  margin:1px 0!important;
  border:0!important;
  border-radius:7px!important;
  background:transparent!important;
  box-shadow:none!important;
  transform:none!important;
  font-size:10.5px!important;
  line-height:1.25!important;
  font-weight:500!important;
  text-align:left!important;
}
html[data-tms-theme] #n .nav-items button::before{
  content:""!important;
  width:3px!important;
  height:3px!important;
  flex:0 0 3px!important;
  margin-right:8px!important;
  border-radius:50%!important;
  background:currentColor!important;
  opacity:.38!important;
}
html[data-tms-theme] #n .nav-items button.active{
  font-weight:800!important;
}
html[data-tms-theme] #n .nav-items button.active::before{
  width:5px!important;
  height:5px!important;
  flex-basis:5px!important;
  opacity:1!important;
}

/* ---------- 明亮白 / 清新浅蓝 ---------- */
html[data-tms-theme="light"] aside{
  background:#f8fbff!important;
  border-right:1px solid #dce8f4!important;
}
html[data-tms-theme="light"] #n .nav-title{
  background:#eaf4ff!important;
  border-color:#cfe5fb!important;
  color:#245b89!important;
}
html[data-tms-theme="light"] #n .nav-title:hover{
  background:#deefff!important;
  color:#154a78!important;
}
html[data-tms-theme="light"] #n .nav-items button{
  color:#607992!important;
}
html[data-tms-theme="light"] #n .nav-items button:hover{
  background:#eef6fd!important;
  color:#315f89!important;
}
html[data-tms-theme="light"] #n .nav-items button.active{
  background:#ddecff!important;
  color:#176ed1!important;
  box-shadow:inset 3px 0 0 #1685ff!important;
}

/* ---------- 深海蓝 ---------- */
html[data-tms-theme="navy"] aside{
  background:linear-gradient(180deg,#061a2c 0%,#071b2e 55%,#061725 100%)!important;
  border-right:1px solid #153f60!important;
}
html[data-tms-theme="navy"] #n .nav-title{
  background:#0c2f4f!important;
  border-color:#154c73!important;
  color:#d6e9f8!important;
}
html[data-tms-theme="navy"] #n .nav-title:hover{
  background:#103b60!important;
  color:#fff!important;
}
html[data-tms-theme="navy"] #n .nav-items button{
  color:#8facbf!important;
}
html[data-tms-theme="navy"] #n .nav-items button:hover{
  background:#0c2943!important;
  color:#dbeefa!important;
}
html[data-tms-theme="navy"] #n .nav-items button.active{
  background:#0e4774!important;
  color:#fff!important;
  box-shadow:inset 3px 0 0 #20a6ff!important;
}

/* ---------- 石墨黑 ---------- */
html[data-tms-theme="graphite"] aside{
  background:linear-gradient(180deg,#12171c 0%,#151b21 60%,#11161b 100%)!important;
  border-right:1px solid #313a42!important;
}
html[data-tms-theme="graphite"] #n .nav-title{
  background:#2b333a!important;
  border-color:#3b454e!important;
  color:#d5dde3!important;
}
html[data-tms-theme="graphite"] #n .nav-title:hover{
  background:#343e46!important;
  color:#fff!important;
}
html[data-tms-theme="graphite"] #n .nav-items button{
  color:#929fa8!important;
}
html[data-tms-theme="graphite"] #n .nav-items button:hover{
  background:#232a30!important;
  color:#dde4e9!important;
}
html[data-tms-theme="graphite"] #n .nav-items button.active{
  background:#354957!important;
  color:#fff!important;
  box-shadow:inset 3px 0 0 #72a7cf!important;
}

/* ---------- 靛青紫 ---------- */
html[data-tms-theme="indigo"] aside{
  background:linear-gradient(180deg,#101428 0%,#12182f 56%,#0d1225 100%)!important;
  border-right:1px solid #343e72!important;
}
html[data-tms-theme="indigo"] #n .nav-title{
  background:#263363!important;
  border-color:#3a4a83!important;
  color:#e3e7ff!important;
}
html[data-tms-theme="indigo"] #n .nav-title:hover{
  background:#304079!important;
  color:#fff!important;
}
html[data-tms-theme="indigo"] #n .nav-items button{
  color:#9fa8d0!important;
}
html[data-tms-theme="indigo"] #n .nav-items button:hover{
  background:#1d274e!important;
  color:#e5e8ff!important;
}
html[data-tms-theme="indigo"] #n .nav-items button.active{
  background:#3b4d91!important;
  color:#fff!important;
  box-shadow:inset 3px 0 0 #8992ff!important;
}

/* ---------- 底部用户区跟随侧栏，取消突兀蓝块 ---------- */
html[data-tms-theme] .nav-user{
  background:transparent!important;
  border-top:1px solid color-mix(in srgb,var(--ui-line) 65%,transparent)!important;
}
html[data-tms-theme] .nav-user button{
  width:100%!important;
  background:transparent!important;
  border:1px solid color-mix(in srgb,var(--ui-line) 80%,transparent)!important;
  color:var(--ui-nav)!important;
  box-shadow:none!important;
}
html[data-tms-theme] .nav-user button:hover{
  background:color-mix(in srgb,var(--ui-primary) 10%,transparent)!important;
  color:var(--ui-text)!important;
}

/* ---------- 右上角主题按钮与下拉：只有一层 ---------- */
html[data-tms-theme] .theme-switcher{
  position:relative!important;
  z-index:90!important;
}
html[data-tms-theme] .theme-btn{
  min-width:92px!important;
  height:34px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:6px!important;
  padding:0 9px!important;
  border:1px solid var(--ui-line)!important;
  border-radius:8px!important;
  background:var(--ui-panel-2)!important;
  color:var(--ui-text-2)!important;
  box-shadow:none!important;
  transform:none!important;
}
html[data-tms-theme] .theme-panel{
  position:absolute!important;
  top:39px!important;
  right:0!important;
  width:150px!important;
  padding:5px!important;
  margin:0!important;
  display:block!important;
  border:1px solid var(--ui-line)!important;
  border-radius:10px!important;
  background:var(--ui-panel)!important;
  box-shadow:0 12px 30px rgba(0,0,0,.18)!important;
  overflow:hidden!important;
}
html[data-tms-theme] .theme-panel.hidden{
  display:none!important;
}
html[data-tms-theme] .theme-panel button{
  width:100%!important;
  min-height:34px!important;
  display:grid!important;
  grid-template-columns:18px 1fr 15px!important;
  align-items:center!important;
  gap:8px!important;
  padding:7px 8px!important;
  margin:0!important;
  border:0!important;
  border-radius:7px!important;
  background:transparent!important;
  color:var(--ui-text-2)!important;
  box-shadow:none!important;
  transform:none!important;
  text-align:left!important;
  font-size:11px!important;
}
html[data-tms-theme] .theme-panel button:hover{
  background:var(--ui-panel-2)!important;
  color:var(--ui-text)!important;
}
html[data-tms-theme] .theme-panel button em{
  opacity:0!important;
  font-style:normal!important;
  color:var(--ui-primary)!important;
  font-weight:900!important;
}
html[data-tms-theme] .theme-panel button.active{
  background:color-mix(in srgb,var(--ui-primary) 10%,var(--ui-panel-2))!important;
  color:var(--ui-text)!important;
}
html[data-tms-theme] .theme-panel button.active em{
  opacity:1!important;
}

/* 重要：工作台内容按钮样式不反向污染左侧导航和主题菜单 */
html[data-tms-theme] #n button,
html[data-tms-theme] .theme-switcher button{
  transition:background .14s ease,color .14s ease,border-color .14s ease!important;
}
