html,body{
  margin:0;
  padding:0;
  background:#0b1220;
  color:#e5e7eb;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"PingFang SC","Microsoft YaHei",sans-serif;
}
.cockpit-app{ min-height:100vh; }
.topbar{
  height:56px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 16px;
  background:#111827;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.brand{
  font-size:20px;
  font-weight:700;
}
.topbar-right{
  font-size:13px;
  color:#94a3b8;
}
.cockpit-main{
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:12px;
}
.cockpit-row{
  display:grid;
  gap:12px;
}
.cockpit-row-3{
  grid-template-columns:1fr 1fr 4fr;
}
.cockpit-row-4{
  grid-template-columns:2fr 4fr;
}
.panel{
  background:#111827;
  border:1px solid rgba(255,255,255,.08);
  border-radius:14px;
  padding:14px;
  box-sizing:border-box;
  box-shadow:0 6px 24px rgba(0,0,0,.22);
}
.panel-system{
  width:100%;
}
#panelSignal{ min-height:320px; }
#panelInfo{ min-height:240px; }
#panelEvents{ min-height:240px; }
.panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:12px;
}
.panel-title{
  font-size:16px;
  font-weight:700;
}
.panel-body{
  color:#94a3b8;
  font-size:13px;
}
.kv{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:8px 0;
  border-bottom:1px solid rgba(255,255,255,.06);
}
.kv span:first-child{ color:#94a3b8; }
.sys-live-row{
  display:flex;
  align-items:center;
  gap:10px;
  padding-top:12px;
}
.live-lamp{
  width:10px;
  height:10px;
  border-radius:50%;
  background:#ef4444;
  display:inline-block;
}
.switch{
  margin-left:auto;
  font-size:12px;
  color:#94a3b8;
}
.switch input{ margin-right:6px; }
.event-head,.event-row{
  display:grid;
  grid-template-columns:120px 60px 1fr;
  gap:10px;
  align-items:center;
}
.event-head{
  padding:6px 0 10px 0;
  color:#94a3b8;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.events-list{ padding-top:8px; }
.event-row{
  padding:10px 0;
  border-bottom:1px solid rgba(255,255,255,.06);
}
.event-row span:last-child{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.sig-toolbar{
  display:flex;
  gap:8px;
  margin-bottom:10px;
}
.sig-toolbar select{
  background:#0b1220;
  color:#e5e7eb;
  border:1px solid rgba(255,255,255,.08);
  border-radius:8px;
  padding:6px 8px;
}
.sig-meta{
  display:flex;
  gap:18px;
  margin-bottom:12px;
  color:#94a3b8;
}
.sig-chart-box{
  height:270px;
  min-height:270px;
  max-height:270px;
  border:1px dashed rgba(255,255,255,.12);
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  color:#64748b;
}
.info-tabs{
  display:flex;
  gap:8px;
  margin-bottom:12px;
}
.info-tab{
  background:#0b1220;
  color:#cbd5e1;
  border:1px solid rgba(255,255,255,.08);
  border-radius:8px;
  padding:6px 12px;
  cursor:pointer;
}
.info-tab.active{
  background:#1d4ed8;
  color:#fff;
}
.info-table-box{
  min-height:170px;
  border:1px dashed rgba(255,255,255,.12);
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  color:#64748b;
}
.topnav{
  display:flex;
  align-items:center;
  gap:10px;
}
.topnav-link{
  color:#94a3b8;
  text-decoration:none;
  padding:6px 12px;
  border-radius:8px;
}
.topnav-link:hover{
  background:rgba(255,255,255,.06);
  color:#e5e7eb;
}
.topnav-link.active{
  background:#1d4ed8;
  color:#fff;
}
.panel-system{
  padding-top:12px;
  padding-bottom:12px;
}
.system-strip{
  display:grid;
  grid-template-columns:1fr 1fr 1fr 2fr;
  gap:14px;
  align-items:center;
}
.strip-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:42px;
  padding:0 10px;
  border:1px solid rgba(255,255,255,.06);
  border-radius:10px;
  background:rgba(255,255,255,.02);
}
.strip-item span{
  color:#94a3b8;
}
.strip-item b{
  color:#e5e7eb;
  font-weight:600;
}
.strip-live{
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:42px;
  padding:0 10px;
  border:1px solid rgba(255,255,255,.06);
  border-radius:10px;
  background:rgba(255,255,255,.02);
}
.navstrip{
  height:46px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  padding:0 16px;
  border-bottom:1px solid rgba(255,255,255,.06);
  background:#0f172a;
}
.topbar{
  height:52px;
}
.cockpit-main{
  gap:10px;
  padding:10px;
}
.cockpit-row{
  gap:10px;
}
.panel-system{
  padding:10px 12px;
}
.system-strip{
  grid-template-columns:140px 1fr 1fr 1fr 2fr;
  gap:10px;
}
.system-tag{
  display:flex;
  align-items:center;
  font-size:16px;
  font-weight:700;
  color:#fff;
}
.strip-item,
.strip-live{
  min-height:36px;
}
.panel{
  padding:12px;
}
.panel-head{
  margin-bottom:8px;
}
.kv{
  padding:6px 0;
}
#panelSignal{
  min-height:250px;
}
#panelEvents{
  min-height:180px;
}
#panelInfo{
  min-height:180px;
}
.sig-toolbar{
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:8px;
}
.sig-meta-inline{
  display:flex;
  gap:14px;
  margin-left:auto;
  color:#94a3b8;
  font-size:13px;
}
.sig-chart-box{
  min-height:160px;
}
.info-table-box{
  min-height:120px;
}
.topbar{
  height:44px;
  padding:0 12px;
}
.brand{
  font-size:18px;
}
.topbar-right{
  font-size:12px;
}
.navstrip{
  height:38px;
  padding:0 12px;
}
.topnav{
  gap:6px;
}
.topnav-link{
  padding:4px 10px;
  font-size:12px;
}
.cockpit-main{
  gap:8px;
  padding:8px;
}
.cockpit-row{
  gap:8px;
}
.panel-system{
  padding:8px 10px;
}
.system-strip{
  grid-template-columns:120px 1fr 1fr 1fr auto;
  gap:8px;
}
.system-tag{
  font-size:14px;
}
.strip-item,
.strip-live{
  min-height:32px;
  padding:0 8px;
  border-radius:8px;
}
.strip-item span,
.strip-live span,
.switch{
  font-size:12px;
}
.live-lamp{
  width:8px;
  height:8px;
}
.panel{
  padding:10px;
}
.panel-head{
  margin-bottom:6px;
}
.panel-title{
  font-size:14px;
}
.kv{
  padding:5px 0;
}
#panelSignal{
  min-height:220px;
}
#panelEvents{
  min-height:165px;
}
#panelInfo{
  min-height:165px;
}
.sig-chart-box{
  min-height:135px;
}
.info-table-box{
  min-height:100px;
}
.sig-toolbar{
  margin-bottom:6px;
}
.sig-toolbar select{
  padding:5px 8px;
}
#panelSignal{
  border-color:rgba(59,130,246,.18);
  box-shadow:0 10px 28px rgba(0,0,0,.24);
}
#panelSignal .panel-title{
  font-size:15px;
  letter-spacing:.3px;
}
#panelSignal .sig-chart-box{
  background:rgba(255,255,255,.015);
}
#panelAccount,
#panelPool{
  background:#0d1830;
  border-color:rgba(255,255,255,.06);
}
#panelAccount .panel-title,
#panelPool .panel-title{
  font-size:13px;
  color:#e2e8f0;
}
#panelAccount .kv,
#panelPool .kv{
  padding:4px 0;
}
#panelAccount .kv span:first-child,
#panelPool .kv span:first-child{
  color:#a8b3c7;
}
#panelInfo{
  border-color:rgba(59,130,246,.14);
  box-shadow:0 8px 24px rgba(0,0,0,.22);
}
#panelInfo .panel-title{
  font-size:15px;
}
#panelInfo .info-table-box{
  background:rgba(255,255,255,.015);
}
#panelEvents{
  background:#0d1830;
  border-color:rgba(255,255,255,.06);
}
#panelEvents .panel-title{
  font-size:13px;
}
.event-head{
  font-size:12px;
}
.navstrip{
  background:linear-gradient(180deg,#0f172a 0%,#0d1628 100%);
}
.panel-system{
  background:linear-gradient(180deg,#101b33 0%,#0d1830 100%);
  border-color:rgba(255,255,255,.07);
}
#panelSignal .panel-title,
#panelInfo .panel-title,
.system-tag{
  text-shadow:0 0 10px rgba(255,255,255,.04);
}
#panelAccount .panel-title,
#panelPool .panel-title,
#panelEvents .panel-title{
  opacity:.94;
}
.footerbar{
  height:30px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 12px;
  border-top:1px solid rgba(255,255,255,.06);
  color:#8ea0bf;
  font-size:12px;
  background:#0b1324;
}
.live-state-wrap{
  display:flex;
  align-items:center;
  gap:10px;
}
.strip-live{
  gap:16px;
}
.slider-switch{
  display:flex;
  align-items:center;
  gap:8px;
  margin-left:auto;
}
.slider-switch input{
  display:none;
}
.slider-ui{
  position:relative;
  width:34px;
  height:18px;
  border-radius:999px;
  background:#334155;
  display:inline-block;
  transition:.2s ease;
}
.slider-ui::after{
  content:"";
  position:absolute;
  top:2px;
  left:2px;
  width:14px;
  height:14px;
  border-radius:50%;
  background:#fff;
  transition:.2s ease;
}
.slider-switch input:checked + .slider-ui{
  background:#2563eb;
}
.slider-switch input:checked + .slider-ui::after{
  transform:translateX(16px);
}
.switch-text{
  font-size:12px;
  color:#cbd5e1;
}
.topnav{
  margin-left:4px;
}
.strip-live{
  width:auto;
  min-width:0;
  justify-content:flex-end;
  gap:10px;
  padding-left:10px;
  padding-right:10px;
}
.live-spacer{
  display:none;
}
.live-state-wrap{
  display:flex;
  align-items:center;
  gap:8px;
  margin-left:0;
  margin-right:6px;
}
#sysLiveText{
  white-space:nowrap;
}
.slider-switch{
  gap:6px;
  margin-left:0;
}
.switch-text{
  white-space:nowrap;
  font-size:12px;
}
.system-strip{
  align-items:center;
}
.strip-live{
  justify-self:end;
  width:auto;
  max-width:max-content;
}
#panelSignal,
#panelInfo{
  background:linear-gradient(180deg,#0d1a33 0%,#0b1730 100%);
  border-color:rgba(59,130,246,.20);
  box-shadow:0 10px 30px rgba(0,0,0,.26);
}
#panelSignal .panel-head,
#panelInfo .panel-head{
  padding-bottom:6px;
}
#panelSignal .panel-title,
#panelInfo .panel-title{
  font-size:15px;
  letter-spacing:.4px;
  color:#f8fbff;
  text-shadow:0 0 12px rgba(59,130,246,.10);
}
.sig-chart-box,
.info-table-box{
  background:
    linear-gradient(180deg,rgba(255,255,255,.02),rgba(255,255,255,.01)),
    linear-gradient(90deg,rgba(59,130,246,.03),rgba(0,0,0,0));
  border-color:rgba(255,255,255,.10);
}
.sig-chart-box,
.info-table-box{
  box-shadow:inset 0 1px 0 rgba(255,255,255,.03);
}
.sig-chart-box{
  color:#6f87b3;
}
.info-table-box{
  color:#6f87b3;
}
.sig-toolbar select{
  border-color:rgba(255,255,255,.10);
  background:#0a1428;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.02);
}
.sig-meta-inline{
  color:#c7d4ea;
}
.info-tab{
  box-shadow:inset 0 1px 0 rgba(255,255,255,.03);
}
.info-tab.active{
  background:linear-gradient(180deg,#2f6bff 0%,#2156db 100%);
  box-shadow:0 4px 14px rgba(37,99,235,.20);
}
#panelAccount,
#panelPool,
#panelEvents{
  background:linear-gradient(180deg,#0b1832 0%,#0a1530 100%);
  box-shadow:0 6px 18px rgba(0,0,0,.18);
}
#panelEvents .event-row,
#panelAccount .kv,
#panelPool .kv{
  opacity:.96;
}
#panelAccount .panel-title,
#panelPool .panel-title,
#panelEvents .panel-title{
  color:#edf3ff;
  letter-spacing:.2px;
}
.event-head{
  color:#aebcd4;
}
.navstrip{
  box-shadow:inset 0 1px 0 rgba(255,255,255,.02);
}
.panel-system{
  box-shadow:0 8px 20px rgba(0,0,0,.18);
}
.topnav-link.active{
  box-shadow:0 4px 12px rgba(37,99,235,.22);
}
.info-pane{
  display:none;
}
.info-pane.active{
  display:block;
}
.info-grid{
  display:grid;
  grid-template-columns:1.2fr .9fr .9fr 1fr 1fr 1fr;
  gap:10px;
  align-items:center;
}
.info-grid.head{
  padding:10px 0;
  color:#aebcd4;
  border-bottom:1px solid rgba(255,255,255,.08);
  font-size:12px;
}
.info-grid.row{
  padding:12px 0;
  border-bottom:1px solid rgba(255,255,255,.06);
  color:#d7e2f2;
}
.info-grid span{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
#panelInfo .panel-body{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.info-pane{
  display:none;
}
.info-pane.active{
  display:block;
}
.info-grid{
  display:grid;
  grid-template-columns:1.2fr .9fr .9fr 1fr 1fr 1fr;
  gap:10px;
  align-items:center;
}
.info-grid.head{
  padding:10px 0;
  color:#aebcd4;
  border-bottom:1px solid rgba(255,255,255,.08);
  font-size:12px;
}
.info-grid.row{
  padding:12px 0;
  border-bottom:1px solid rgba(255,255,255,.06);
  color:#d7e2f2;
}
.info-grid span{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
#panelInfo .panel-body{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.info-grid.head{
  padding:8px 0;
  font-size:12px;
}
.info-grid.row{
  padding:7px 0;
  min-height:0;
  font-size:12px;
}
.info-pane .info-grid.row:nth-of-type(odd){
  background:rgba(255,255,255,.015);
}
.info-pane .info-grid.row:nth-of-type(even){
  background:rgba(255,255,255,.005);
}
#infoPanePos .info-grid-9{
  grid-template-columns: 1.45fr 1.25fr .55fr .55fr .80fr .95fr .80fr .75fr 1.30fr;
  gap: 8px;
}
#infoPaneClosed .info-grid-9{
  grid-template-columns: 1.35fr 1.20fr .55fr .55fr .80fr .95fr .95fr .80fr 1.05fr;
  gap: 8px;
}
.event-head{
  padding:8px 0;
  font-size:12px;
}
.event-row{
  padding:7px 0;
  min-height:0;
  font-size:12px;
}
.events-list .event-row:nth-child(odd){
  background:rgba(255,255,255,.015);
}
.events-list .event-row:nth-child(even){
  background:rgba(255,255,255,.005);
}
.pager{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  padding-top:8px;
}
.pager-btn{
  background:#0a1428;
  color:#d7e2f2;
  border:1px solid rgba(255,255,255,.08);
  border-radius:8px;
  padding:4px 10px;
  font-size:12px;
  cursor:pointer;
}
.pager-btn:disabled{
  opacity:.4;
  cursor:default;
}
.pager-info{
  font-size:12px;
  color:#9fb0cd;
}
/* ===== COCKPIT HEADBAR FINAL ===== */
.cockpit-headbar{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  height:64px !important;
  min-height:64px !important;
  padding:8px 16px !important;
  overflow:hidden !important;
}
.cockpit-brand-row{
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  flex-wrap:nowrap !important;
  white-space:nowrap !important;
  flex:0 0 auto !important;
}
.cockpit-logo-box{
  width:32px !important;
  height:32px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  overflow:hidden !important;
  flex:0 0 32px !important;
}
.cockpit-word-box{
  width:140px !important;
  height:28px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  overflow:hidden !important;
  flex:0 0 140px !important;
}
.cockpit-title-box{
  width:132px !important;
  height:28px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  overflow:hidden !important;
  flex:0 0 132px !important;
}
.cockpit-logo-img{
  width:28px !important;
  height:28px !important;
  display:block !important;
}
.cockpit-word-img{
  width:132px !important;
  height:20px !important;
  max-width:132px !important;
  max-height:20px !important;
  object-fit:contain !important;
  display:block !important;
}
.cockpit-title-text{
  display:block !important;
  font-size:14px !important;
  line-height:1 !important;
  font-weight:800 !important;
  color:#fff !important;
  margin:0 !important;
  padding:0 !important;
}
.cockpit-head-actions{
  display:flex !important;
  align-items:center !important;
  flex:0 0 auto !important;
}
.cockpit-login-btn{
  height:32px !important;
  padding:0 14px !important;
  border-radius:8px !important;
  border:1px solid rgba(59,130,246,.55) !important;
  background:linear-gradient(135deg,#1d4ed8,#2563eb) !important;
  color:#fff !important;
  font-size:13px !important;
  font-weight:700 !important;
  box-shadow:0 0 14px rgba(37,99,235,.28) !important;
}
.cockpit-headbar{
  height:52px !important;
  min-height:52px !important;
  padding:4px 16px 2px 16px !important;
  align-items:flex-end !important;
}
.cockpit-brand-row,
.cockpit-head-actions{
  transform:translateY(1px) !important;
}
.cockpit-headbar{
  height:52px !important;
  min-height:52px !important;
  padding:4px 16px 2px 16px !important;
  align-items:flex-end !important;
}
.cockpit-brand-row,
.cockpit-head-actions{
  transform:translateY(1px) !important;
}
.cockpit-brand-row{
  gap:4px !important;
}
.cockpit-logo-box{
  margin-right:2px !important;
}
.cockpit-word-box{
  margin-right:14px !important;
}
.cockpit-title-box{
  justify-content:flex-start !important;
}
.cockpit-title-text{
  font-size:13px !important;
  transform:translateY(1px) !important;
  letter-spacing:0 !important;
}
.cockpit-login-btn{
  height:30px !important;
  padding:0 13px !important;
  border-radius:9px !important;
  font-size:13px !important;
}
.cockpit-headbar{
  height:48px !important;
  min-height:48px !important;
  padding:2px 16px !important;
  align-items:center !important;
}
.cockpit-brand-row,
.cockpit-head-actions{
  transform:none !important;
}
.cockpit-brand-row{
  gap:2px !important;
}
.cockpit-logo-box{
  margin-right:0 !important;
}
.cockpit-word-box{
  margin-right:12px !important;
}
.cockpit-word-box{
  width:122px !important;
  flex:0 0 122px !important;
}
.cockpit-word-img{
  width:118px !important;
  max-width:118px !important;
}
.cockpit-head-actions{
  align-items:center !important;
}
.cockpit-login-btn{
  height:28px !important;
  padding:0 12px !important;
  border-radius:8px !important;
}
.cockpit-headbar{
  height:44px !important;
  min-height:44px !important;
  padding:1px 16px !important;
}
.cockpit-brand-row{
  gap:0px !important;
}
.cockpit-logo-box{
  margin-right:-2px !important;
}
.cockpit-brand-row,
.cockpit-head-actions{
  transform:translateY(1px) !important;
}
.cockpit-word-box,
.cockpit-title-box{
  transform:translateY(2px) !important;
}
.cockpit-word-img{
  transform:translateY(4px) !important;
}
.cockpit-title-text{
  transform:translateY(4px) !important;
}
.cockpit-word-img{
  filter:
    drop-shadow(0 0 4px rgba(0,224,120,.18))
    drop-shadow(0 0 10px rgba(0,224,120,.08));
}
.cockpit-logo-img{
  filter:drop-shadow(0 0 6px rgba(0,224,120,.12));
}
.cockpit-headbar{
  box-shadow:
    inset 0 -1px 0 rgba(255,255,255,.05),
    0 6px 18px rgba(0,0,0,.16);
  background:
    linear-gradient(180deg, rgba(10,22,46,.96), rgba(8,18,38,.98));
}
.cockpit-login-btn{
  box-shadow:
    0 0 0 1px rgba(96,165,250,.12),
    0 8px 18px rgba(37,99,235,.22),
    inset 0 1px 0 rgba(255,255,255,.12) !important;
}
.cockpit-login-btn:hover{
  filter:brightness(1.04);
}
.cockpit-title-text{
  text-shadow:0 1px 2px rgba(0,0,0,.22);
}
.cockpit-headbar{
  background:
    linear-gradient(180deg,#071327 0%, #08162c 100%) !important;
}
.navstrip{
  background:
    linear-gradient(180deg,#0a1b36 0%, #0b1d3b 100%) !important;
}
.cockpit-headbar{
  border-bottom:1px solid rgba(255,255,255,.05) !important;
}
.navstrip{
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.03),
    inset 0 -1px 0 rgba(255,255,255,.04) !important;
}
.topnav{
  background:transparent !important;
}
.topnav-link{
  color:#d7e6ff !important;
}
.topnav-link.active{
  box-shadow:0 6px 16px rgba(37,99,235,.22) !important;
}
.navstrip{
  background:
    linear-gradient(180deg,#0f2447 0%, #0b1d3b 100%) !important;
}
.cockpit-headbar{
  border-bottom:
    1px solid rgba(255,255,255,.06) !important;
}
.navstrip{
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.04),
    inset 0 -1px 0 rgba(0,0,0,.35);
}
.topnav-link{
  color:#cfe0ff !important;
}
.topnav-link.active{
  background:#2a66ff !important;
}
.cockpit-word-img{
  transform:translateY(-2px) !important;
}
/* ===== STATUS LAMP ===== */

.status-lamp{
  width:10px;
  height:10px;
  border-radius:50%;
  display:inline-block;
  margin-right:6px;
}
.lamp-run{
  background:#22c55e;
  box-shadow:0 0 6px rgba(34,197,94,.7);
  animation:lamp-breath 2s infinite;
}

.lamp-stop{
  background:#ef4444;
  box-shadow:0 0 6px rgba(239,68,68,.7);
}

.lamp-warn{
  background:#f59e0b;
  animation:lamp-blink 1s infinite;
}
@keyframes lamp-breath{
  0%,100%{opacity:.6}
  50%{opacity:1}
}

@keyframes lamp-blink{
  50%{opacity:.3}
}

/* ===== BEACON LAMP V2 ===== */
.status-lamp{
  position:relative;
  display:inline-block;
  width:14px;
  height:18px;
  margin-right:8px;
  vertical-align:middle;
}
.status-lamp::before{
  content:"";
  position:absolute;
  left:3px;
  top:1px;
  width:10px;
  height:10px;
  border-radius:6px 6px 4px 4px;
  background:linear-gradient(#ff6b6b,#ef4444);
  box-shadow:
    0 0 8px rgba(239,68,68,.55),
    inset 0 -2px 3px rgba(0,0,0,.22),
    inset 0 2px 3px rgba(255,255,255,.35);
}
.status-lamp::after{
  content:"";
  position:absolute;
  left:2px;
  bottom:1px;
  width:12px;
  height:3px;
  border-radius:2px;
  background:rgba(210,220,235,.75);
}
.status-lamp-wrap{
  position:relative;
  display:inline-flex;
  align-items:center;
}
.status-lamp-wrap::before,
.status-lamp-wrap::after{
  content:"";
  position:absolute;
  top:0;
  width:10px;
  height:14px;
  border:2px solid rgba(255,255,255,.26);
  border-top-color:transparent;
  border-bottom-color:transparent;
  border-radius:50%;
}
.status-lamp-wrap::before{
  left:-8px;
  border-right:none;
}
.status-lamp-wrap::after{
  right:-8px;
  border-left:none;
}
/* ===== BEACON LAMP V3 ===== */
.status-lamp{
  position:relative;
  display:inline-block;
  width:16px;
  height:20px;
  margin-right:8px;
  vertical-align:middle;
  background:transparent !important;
  box-shadow:none !important;
}
.status-lamp::before{
  content:"";
  position:absolute;
  left:3px;
  top:1px;
  width:10px;
  height:10px;
  border-radius:6px 6px 4px 4px;
  background:#ef4444;
  box-shadow:
    0 0 8px rgba(239,68,68,.55),
    inset 0 -2px 3px rgba(0,0,0,.22);
}
.status-lamp::after{
  content:"";
  position:absolute;
  left:1px;
  bottom:1px;
  width:14px;
  height:5px;
  border-radius:3px;
  background:rgba(210,220,235,.75);
  box-shadow:
    inset 0 -1px 2px rgba(0,0,0,.25),
    0 1px 1px rgba(0,0,0,.12);
}
.status-lamp-wrap{
  position:relative;
  display:inline-flex;
  align-items:center;
}
.status-lamp-wrap > .status-lamp{
  z-index:2;
}
.status-lamp-wrap .status-lamp-stem{
  position:absolute;
  left:7px;
  top:10px;
  width:2px;
  height:6px;
  background:rgba(210,220,235,.7);
  border-radius:2px;
}
.status-lamp-wrap::before,
.status-lamp-wrap::after{
  content:"";
  position:absolute;
  top:1px;
  width:10px;
  height:12px;
  border:2px solid rgba(255,255,255,.22);
  border-top-color:transparent;
  border-bottom-color:transparent;
  border-radius:50%;
}
.status-lamp-wrap::before{ left:-8px; border-right:none; }
.status-lamp-wrap::after{ right:-8px; border-left:none; }

/* ===== TERMINAL BEACON FINAL ===== */
.status-lamp-wrap{
  position:relative !important;
  display:inline-flex !important;
  align-items:flex-end !important;
  justify-content:center !important;
  width:22px !important;
  height:20px !important;
  margin-right:8px !important;
  vertical-align:middle !important;
}
.status-lamp-wrap::before,
.status-lamp-wrap::after{
  content:"" !important;
  position:absolute !important;
  top:1px !important;
  width:6px !important;
  height:10px !important;
  border:2px solid rgba(255,255,255,.26) !important;
  border-top-color:transparent !important;
  border-bottom-color:transparent !important;
  border-radius:50% !important;
}
.status-lamp-wrap::before{ left:0 !important; border-right:none !important; }
.status-lamp-wrap::after{ right:0 !important; border-left:none !important; }
.status-lamp-stem{
  position:absolute !important;
  left:10px !important;
  bottom:4px !important;
  width:2px !important;
  height:5px !important;
  background:rgba(210,220,235,.78) !important;
  border-radius:2px !important;
  z-index:1 !important;
}
.status-lamp{
  position:absolute !important;
  left:6px !important;
  top:1px !important;
  width:10px !important;
  height:11px !important;
  border-radius:6px 6px 4px 4px !important;
  background:linear-gradient(180deg,#ff7a7a,#ef4444) !important;
  box-shadow:
    0 0 10px rgba(239,68,68,.55) !important,
    inset 0 -2px 3px rgba(0,0,0,.24) !important,
    inset 0 2px 3px rgba(255,255,255,.28) !important;
  z-index:2 !important;
}
.status-lamp::after{
  content:"" !important;
  position:absolute !important;
  left:-1px !important;
  bottom:-6px !important;
  width:12px !important;
  height:3px !important;
  border-radius:2px !important;
  background:rgba(210,220,235,.82) !important;
  box-shadow:0 1px 1px rgba(0,0,0,.15) !important;
}
.status-lamp::before{
  content:"" !important;
  position:absolute !important;
  left:2px !important;
  top:2px !important;
  width:4px !important;
  height:3px !important;
  border-radius:50% !important;
  background:rgba(255,255,255,.78) !important;
}
.status-lamp.lamp-stop{
  background:linear-gradient(180deg,#ff7a7a,#ef4444) !important;
}
.status-lamp.lamp-run{
  background:linear-gradient(180deg,#5ee38e,#22c55e) !important;
}
.status-lamp.lamp-warn{
  background:linear-gradient(180deg,#ffd36b,#f59e0b) !important;
}

/* ===== PANEL SYSTEM LAMP OVERRIDE ===== */
#panelSystem .live-state-wrap{
  display:inline-flex !important;
  align-items:center !important;
  gap:8px !important;
}
#panelSystem #sysLiveLamp{
  position:relative !important;
  left:auto !important;
  top:auto !important;
  bottom:auto !important;
  display:inline-block !important;
  width:14px !important;
  height:18px !important;
  margin-right:0 !important;
  vertical-align:middle !important;
  background:transparent !important;
  box-shadow:none !important;
  border-radius:0 !important;
}
#panelSystem #sysLiveLamp::before{
  content:"" !important;
  position:absolute !important;
  left:2px !important;
  top:1px !important;
  width:10px !important;
  height:10px !important;
  border-radius:6px 6px 4px 4px !important;
  background:linear-gradient(180deg,#ff7a7a,#ef4444) !important;
  box-shadow:
    0 0 8px rgba(239,68,68,.45) !important,
    inset 0 2px 2px rgba(255,255,255,.24) !important,
    inset 0 -2px 3px rgba(0,0,0,.20) !important;
}
#panelSystem #sysLiveLamp::after{
  content:"" !important;
  position:absolute !important;
  left:1px !important;
  bottom:1px !important;
  width:12px !important;
  height:3px !important;
  border-radius:2px !important;
  background:rgba(210,220,235,.85) !important;
  box-shadow:
    inset 0 -1px 1px rgba(0,0,0,.18) !important,
    0 1px 1px rgba(0,0,0,.12) !important;
}
#panelSystem .live-state-wrap{
  line-height:1 !important;
}
#panelSystem #sysLiveText{
  display:inline-block !important;
  transform:translateY(1px) !important;
}

/* ===== EVENTS / INFO HEIGHT ALIGN V2 ===== */
#panelEvents,
#panelInfo{
  min-height:360px !important;
  height:360px !important;
}
#panelEvents .panel-body,
#panelInfo .panel-body{
  min-height:280px !important;
  height:280px !important;
  display:flex !important;
  flex-direction:column !important;
}
.events-list{
  min-height:210px !important;
  flex:1 1 auto !important;
}

.event-row{
  min-height:32px !important;
  line-height:32px !important;
}
#panelEvents .pager,
#panelInfo .pager{
  margin-top:auto !important;
}

.info-pane{
  flex:1 1 auto !important;
}

/* ===== RESET BAD HEIGHT PUSH ===== */
#panelEvents,
#panelInfo{
  height:auto !important;
  min-height:0 !important;
}

#panelEvents .panel-body,
#panelInfo .panel-body{
  height:auto !important;
  min-height:0 !important;
}
#panelEvents,
#panelInfo{
  height:390px !important;
  min-height:390px !important;
  max-height:390px !important;
  overflow:hidden !important;
}
#panelEvents .panel-body,
#panelInfo .panel-body{
  display:flex !important;
  flex-direction:column !important;
  height:calc(100% - 54px) !important;
  overflow:hidden !important;
}
.events-list,
.info-pane{
  flex:1 1 auto !important;
  min-height:0 !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
}
#panelEvents .pager,
#panelInfo .pager{
  flex:0 0 auto !important;
  margin-top:8px !important;
  padding-top:8px !important;
}
.event-row{
  min-height:28px !important;
  line-height:28px !important;
}

#panelEvents .events-list{
  padding-bottom:4px !important;
}
.info-grid.row{
  min-height:28px !important;
  line-height:28px !important;
}

/* ===== INFO TABS GAP TIGHTEN ===== */
#panelInfo .panel-body{
  gap:4px !important;
}

#panelInfo .info-tabs{
  margin-bottom:2px !important;
  padding-bottom:0 !important;
}
#panelInfo .info-grid.head{
  margin-top:0 !important;
  padding-top:2px !important;
  padding-bottom:6px !important;
}
#panelInfo .info-tabs,
#panelInfo .tabs,
#panelInfo .tab-row{
  row-gap:0 !important;
  column-gap:10px !important;
}

/* ===== nav tools ===== */
.navstrip{
  display:flex; align-items:center; justify-content:space-between;
}
.navtools{
  display:flex; align-items:center; gap:8px; margin-left:16px;
}
.navtool-btn{
  min-width:72px; height:32px; padding:0 12px; border-radius:10px;
  border:1px solid rgba(255,255,255,.14); background:rgba(255,255,255,.06);
  color:#eaf2ff; cursor:pointer; font-size:13px;
}
.navtool-btn:hover{ transform:translateY(-1px); }
body.theme-light .navtool-btn{
  border:1px solid rgba(15,23,42,.14); background:rgba(15,23,42,.04); color:#0f172a;
}

/* ===== light theme baseline ===== */
body.theme-light{
  background:#f3f6fb;
  color:#0f172a;
}
body.theme-light .cockpit-app,
body.theme-light .panel,
body.theme-light .topbar,
body.theme-light .navstrip,
body.theme-light .footerbar{
  color:#0f172a;
}
body.theme-light .panel{
  background:#ffffff;
  border-color:rgba(15,23,42,.10);
}
body.theme-light .topnav-link{
  color:#334155;
}
body.theme-light .topnav-link.active{
  color:#0f172a;
}
body.theme-light .topbar,
body.theme-light .navstrip,
body.theme-light .footerbar{
  background:#ffffff;
  border-color:rgba(15,23,42,.08);
}
body.theme-light .cockpit-title-text{
  color:#0f172a;
}
body.theme-light select,
body.theme-light button{
  color:#0f172a;
}
body.theme-light #sigChartBox{
  background:#f8fafc;
  color:#475569;
  border-color:rgba(15,23,42,.08);
}

/* ===== light polish: layout layers ===== */
body.theme-light .topbar,
body.theme-light .navstrip,
body.theme-light .footerbar{
  background:linear-gradient(180deg,#ffffff 0%,#f7faff 100%);
  box-shadow:0 1px 0 rgba(15,23,42,.06);
}
body.theme-light .panel{
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
  box-shadow:0 6px 18px rgba(15,23,42,.05);
}
body.theme-light .topnav-link{
  color:#334155;
}
body.theme-light .topnav-link.active{
  color:#ffffff;
  background:linear-gradient(180deg,#4f8cff 0%,#2f6df6 100%);
}
body.theme-light .navtool-btn,
body.theme-light .cockpit-login-btn{
  box-shadow:0 2px 8px rgba(15,23,42,.06);
}
body.theme-light .event-head,
body.theme-light .info-grid.head{
  color:#475569;
}
body.theme-light .event-row,
body.theme-light .info-grid.row{
  border-color:rgba(15,23,42,.08);
}
body.theme-light .pager-btn,
body.theme-light .info-tab{
  box-shadow:0 2px 6px rgba(15,23,42,.05);
}
body.theme-light select{
  background:#ffffff;
  border-color:rgba(15,23,42,.12);
  color:#0f172a;
}
body.theme-light #sigChartBox{
  background:linear-gradient(180deg,#f8fbff 0%,#f3f7fd 100%);
  border-color:rgba(15,23,42,.08);
}
body.theme-light .system-strip,
body.theme-light .strip-item,
body.theme-light .strip-live{
  background:rgba(255,255,255,.72);
}
body.theme-light .strip-item,
body.theme-light .strip-live{
  border-color:rgba(15,23,42,.10);
}
body.theme-light .switch.slider-switch{
  background:transparent;
}

/* ===== LIGHT MODE COMPONENT FIX ===== */

body.theme-light{
  background:#eef2f7;
}


/* 卡片 */
body.theme-light .panel{
  background:#ffffff;
  border:1px solid rgba(15,23,42,.06);
  box-shadow:0 4px 12px rgba(15,23,42,.05);
}


/* K线区域 */
body.theme-light #sigChartBox{
  background:#f6f8fc;
  border:1px dashed rgba(15,23,42,.12);
}


/* Tab按钮 */
body.theme-light .info-tab{
  background:#f1f5f9;
  color:#334155;
  border:1px solid rgba(15,23,42,.08);
}

body.theme-light .info-tab.active{
  background:linear-gradient(180deg,#4f8cff,#2f6df6);
  color:#ffffff;
}


/* 表头 */
body.theme-light .info-grid.head,
body.theme-light .event-head{
  color:#475569;
}

/* 表格行 */
body.theme-light .info-grid.row,
body.theme-light .event-row{
  border-bottom:1px solid rgba(15,23,42,.06);
}


/* light: top right tool buttons visible */
body.theme-light .navtool-btn{
  background:#ffffff;
  color:#0f172a;
  border:1px solid rgba(15,23,42,.12);
  box-shadow:0 2px 8px rgba(15,23,42,.08);
}


/* light: nav links readable on dark/nav gradient */
body.theme-light .topnav-link{
  color:#f8fafc;
}
body.theme-light .topnav-link:hover{
  color:#ffffff;
}


/* light: login button clearer */
body.theme-light .cockpit-login-btn{
  border:1px solid rgba(255,255,255,.18);
  box-shadow:0 2px 8px rgba(15,23,42,.10);
}


/* ===== LIGHT MODE PANELS ===== */

body.theme-light .panel{
  background:#ffffff;
  border:1px solid rgba(15,23,42,.06);
  box-shadow:0 4px 14px rgba(15,23,42,.06);
}


body.theme-light .panel-title{
  color:#0f172a;
}

body.theme-light .panel .k{
  color:#64748b;
}

body.theme-light .panel .v{
  color:#0f172a;
}


body.theme-light .info-grid.head{
  color:#475569;
}

body.theme-light .info-grid.row{
  border-bottom:1px solid rgba(15,23,42,.08);
}


body.theme-light .event-head{
  color:#475569;
}

body.theme-light .event-row{
  border-bottom:1px solid rgba(15,23,42,.08);
}


/* ===== light force panels ===== */
body.theme-light #panelAccount,
body.theme-light #panelPool,
body.theme-light #panelSignal,
body.theme-light #panelEvents,
body.theme-light #panelInfo{
  background:#ffffff !important;
  border:1px solid rgba(15,23,42,.08) !important;
  box-shadow:0 4px 14px rgba(15,23,42,.06) !important;
}


body.theme-light #panelAccount .panel-body,
body.theme-light #panelPool .panel-body,
body.theme-light #panelSignal .panel-body,
body.theme-light #panelEvents .panel-body,
body.theme-light #panelInfo .panel-body{
  background:transparent !important;
  color:#0f172a !important;
}


body.theme-light #panelAccount .panel-title,
body.theme-light #panelPool .panel-title,
body.theme-light #panelSignal .panel-title,
body.theme-light #panelEvents .panel-title,
body.theme-light #panelInfo .panel-title{
  color:#0f172a !important;
}


body.theme-light #panelAccount .kv span,
body.theme-light #panelPool .kv span{
  color:#334155 !important;
}
body.theme-light #panelAccount .kv span:last-child,
body.theme-light #panelPool .kv span:last-child{
  color:#0f172a !important;
}


body.theme-light #panelEvents .event-head,
body.theme-light #panelInfo .info-grid.head{
  color:#475569 !important;
}
body.theme-light #panelEvents .event-row,
body.theme-light #panelInfo .info-grid.row{
  border-bottom:1px solid rgba(15,23,42,.08) !important;
  color:#0f172a !important;
}


body.theme-light #panelInfo .info-tab{
  background:#f1f5f9 !important;
  color:#334155 !important;
  border:1px solid rgba(15,23,42,.08) !important;
}
body.theme-light #panelInfo .info-tab.active{
  color:#ffffff !important;
}


.info-pane.active{
  display:block !important;
}


/* ===== FINAL INFO PANE SWITCH ===== */
.info-pane{
  display:none !important;
  flex:1 1 auto !important;
  min-height:0 !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
}


/* ===== FINAL INFO PANE ACTIVE WINS ===== */
.info-pane.active{
  display:block !important;
}


/* light: info tabs */
body.theme-light #panelInfo .info-tab.active{
  background:linear-gradient(180deg,#4f8cff 0%,#2f6df6 100%) !important;
  color:#ffffff !important;
  border-color:#2f6df6 !important;
  box-shadow:0 4px 12px rgba(47,109,246,.20) !important;
}


body.theme-light #panelInfo .info-tab{
  background:#f8fafc !important;
  color:#334155 !important;
  border:1px solid rgba(15,23,42,.10) !important;
  opacity:1 !important;
}
body.theme-light #panelInfo .info-tab:hover{
  background:#eef4ff !important;
}


/* light: pager buttons */
body.theme-light .pager-btn{
  background:#f8fafc !important;
  color:#334155 !important;
  border:1px solid rgba(15,23,42,.10) !important;
  box-shadow:none !important;
}
body.theme-light .pager-btn:hover{
  background:#eef4ff !important;
}


body.theme-light .pager-btn:disabled{
  background:#e5e7eb !important;
  color:#94a3b8 !important;
  border-color:#d1d5db !important;
  opacity:1 !important;
  cursor:not-allowed !important;
}


/* light: signal meta */
body.theme-light .sig-meta-inline,
body.theme-light .sig-meta-inline span,
body.theme-light #sigLast,
body.theme-light #sigChg{
  color:#334155 !important;
}


/* light: switch text */
body.theme-light .switch-text{
  color:#334155 !important;
}
body.theme-light #sysLiveText{
  color:#0f172a !important;
}


/* light: chart area */
body.theme-light #sigChartBox{
  background:#f8fafc !important;
  border:1px dashed rgba(15,23,42,.12) !important;
  color:#64748b !important;
}


/* light: top header */
body.theme-light .topbar{
  background:linear-gradient(180deg,#ffffff 0%,#f7faff 100%) !important;
  border-bottom:1px solid rgba(15,23,42,.08) !important;
  box-shadow:0 1px 0 rgba(15,23,42,.04) !important;
}


/* light: nav strip */
body.theme-light .navstrip{
  background:linear-gradient(180deg,#ffffff 0%,#f7faff 100%) !important;
  border-top:1px solid rgba(15,23,42,.04) !important;
  border-bottom:1px solid rgba(15,23,42,.08) !important;
}


body.theme-light .topnav-link{
  color:#334155 !important;
}
body.theme-light .topnav-link:hover{
  color:#0f172a !important;
}
body.theme-light .topnav-link.active{
  color:#ffffff !important;
}


body.theme-light .cockpit-title-text{
  color:#0f172a !important;
}
body.theme-light .cockpit-headbar{
  color:#0f172a !important;
}


/* light: system strip label */
body.theme-light .system-tag{
  color:#0f172a !important;
  font-weight:800 !important;
}
body.theme-light .strip-item span{
  color:#64748b !important;
}


body.theme-light .navtool-btn{
  background:#ffffff !important;
  color:#0f172a !important;
}
body.theme-light .cockpit-login-btn{
  box-shadow:0 2px 8px rgba(15,23,42,.10) !important;
}


/* --- info pane top-right filters --- */
.panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.info-filters{
  display:flex;
  align-items:center;
  gap:10px;
  margin-left:auto;
}

.cockpit-select{
  min-width: 190px;
  height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(110,150,255,.22);
  background: rgba(7,19,46,.92);
  color: #eef4ff;
  outline: none;
  font-size: 15px;
}

.cockpit-select:focus{
  border-color: rgba(106,149,255,.55);
  box-shadow: 0 0 0 2px rgba(79,124,255,.12);
}

.info-filters #infoTimeFilter{
  min-width: 140px;
}

#panelInfo .info-filters{ margin-left:auto; display:flex; gap:10px; align-items:center; }
#panelInfo .cockpit-select{ min-width:170px; height:38px; }
#panelInfo #infoTimeFilter{ min-width:130px; }

/* v1 beauty: nav buttons compact */
.navtool-btn{
  height: 46px !important;
  min-height: 46px !important;
  padding: 0 18px !important;
  font-size: 16px !important;
  border-radius: 14px !important;
}

.panel-meta{
  margin-left:auto;
  font-size:14px;
  color:#a9b9dd;
  white-space:nowrap;
}

.system-tag.sub{
  margin-left:10px;
  font-size:14px;
  color:#9bb0da;
  font-weight:600;
}
.strip-item{
  min-width: 150px !important;
  padding: 10px 14px !important;
}

#panelSystem .system-strip{
  gap: 10px !important;
}
#panelSystem .strip-live{
  margin-left: 28px !important;
}
#panelSystem .strip-item b{
  font-size: 18px !important;
}

/* round2: navtools match topnav size */
.navtools{
  display:flex;
  align-items:center;
  gap:10px;
}
.navtool-btn{
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 16px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  border-radius: 12px !important;
}

/* round2: system strip restore */
#panelSystem .system-strip{
  display:flex;
  align-items:center;
  gap:14px !important;
  flex-wrap:nowrap;
}

#panelSystem .strip-item{
  min-width: 220px !important;
  height: 76px !important;
  padding: 14px 18px !important;
  border-radius: 16px !important;
}

#panelSystem .strip-item b{
  font-size: 22px !important;
  font-weight: 800 !important;
}

#panelSystem .strip-live{
  margin-left: 18px !important;
}

.exchange-live-badge{
  display:flex;
  align-items:center;
  gap:12px;
  height:40px;
  min-width:170px;
  padding:0 16px;
  border-radius:12px;
  background:linear-gradient(180deg, rgba(40,78,128,.95), rgba(28,58,100,.95));
  border:1px solid rgba(120,170,255,.18);
  color:#dbe8ff;
  font-size:14px;
  font-weight:700;
  white-space:nowrap;
}
.exchange-live-badge .dot{
  width:10px;
  height:10px;
  border-radius:50%;
  background:#28c76f;
  box-shadow:0 0 8px rgba(40,199,111,.55);
  flex:0 0 auto;
}

/* round2: account currency smaller */
#panelAccount .panel-meta{
  font-size: 12px !important;
  font-weight: 500 !important;
  opacity: .9;
}

/* one-shot: navtool size match topnav */
.navtool-btn{
  min-width: auto !important;
  height: 30px !important;
  padding: 0 10px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
}

/* one-shot: flatten navtool buttons only */
.navtool-btn{
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 10px !important;
  border-radius: 7px !important;
  line-height: 28px !important;
}

/* one-shot: panelSystem one-line height */
#panelSystem .system-strip{
  display:flex;
  align-items:center;
  gap:14px !important;
  flex-wrap:nowrap;
}
#panelSystem .strip-item,
#panelSystem .strip-live,
#panelSystem .exchange-live-badge{
  height:40px !important;
  min-height:40px !important;
  border-radius:12px !important;
}

#panelSystem .strip-item{
  min-width:170px !important;
  padding:0 16px !important;
}
#panelSystem .strip-item span{
  line-height:40px !important;
}
#panelSystem .strip-item b{
  line-height:40px !important;
  font-size:18px !important;
}

#panelSystem .strip-live{
  min-width:220px !important;
  padding:0 14px !important;
  display:flex !important;
  align-items:center !important;
}
#panelSystem .live-state-wrap,
#panelSystem .slider-switch{
  height:40px !important;
  display:flex !important;
  align-items:center !important;
}

#panelSystem .switch-text,
#panelSystem #sysLiveText{
  line-height:40px !important;
}
#panelSystem .status-lamp{
  margin-top:0 !important;
}

/* one-shot: fix system-tag only */
#panelSystem .system-tag{
  display:flex !important;
  align-items:center !important;
  height:40px !important;
  min-width:88px !important;
  white-space:nowrap !important;
  writing-mode:horizontal-tb !important;
  font-size:16px !important;
}

/* one-shot: system row tighter */
#panelSystem .system-strip{
  gap:8px !important;
}
#panelSystem .system-tag,
#panelSystem .exchange-live-badge,
#panelSystem .strip-item,
#panelSystem .strip-live{
  height:34px !important;
  min-height:34px !important;
}

#panelSystem .system-tag{
  min-width:72px !important;
  font-size:14px !important;
}
#panelSystem .exchange-live-badge{
  min-width:150px !important;
  padding:0 12px !important;
  font-size:13px !important;
}

#panelSystem .strip-item{
  min-width:120px !important;
  padding:0 12px !important;
  border-radius:10px !important;
}
#panelSystem .strip-item span,
#panelSystem .strip-item b{
  line-height:34px !important;
}

#panelSystem .strip-live{
  min-width:170px !important;
  padding:0 10px !important;
  margin-left:4px !important;
}
#panelSystem .live-state-wrap,
#panelSystem .slider-switch{
  height:34px !important;
}

/* one-shot: system row tighter v2 */
#panelSystem .system-tag,
#panelSystem .exchange-live-badge,
#panelSystem .strip-item,
#panelSystem .strip-live{
  height:30px !important;
  min-height:30px !important;
}

#panelSystem .system-tag{
  min-width:68px !important;
  font-size:13px !important;
}
#panelSystem .strip-item span,
#panelSystem .strip-item b{
  line-height:30px !important;
}

#panelSystem .strip-item{
  min-width:110px !important;
  padding:0 10px !important;
}
#panelSystem .strip-item:nth-of-type(3){
  min-width:150px !important;
  padding:0 14px !important;
}

#panelSystem .strip-live{
  min-width:190px !important;
  margin-left:14px !important;
  padding:0 10px !important;
}
#panelSystem .exchange-live-badge{
  min-width:145px !important;
  padding:0 12px !important;
}

/* one-shot: system row fix3 */
#panelSystem .strip-item,
#panelSystem .strip-live{
  height:28px !important;
  min-height:28px !important;
}
#panelSystem .strip-item span,
#panelSystem .strip-item b{
  line-height:28px !important;
}

#panelSystem .strip-item:nth-of-type(4){
  min-width:170px !important;
  padding:0 14px !important;
}
#panelSystem .strip-live{
  margin-left:auto !important;
  min-width:210px !important;
}

#panelSystem .live-state-wrap,
#panelSystem .slider-switch{
  height:28px !important;
  min-height:28px !important;
  align-items:center !important;
}
#panelSystem .switch-text,
#panelSystem #sysLiveText{
  line-height:28px !important;
}

/* one-shot: system row fix4 */
#panelSystem .system-tag,
#panelSystem .exchange-live-badge,
#panelSystem .strip-item,
#panelSystem .strip-live{
  height:24px !important;
  min-height:24px !important;
}

#panelSystem .strip-item span,
#panelSystem .strip-item b,
#panelSystem .switch-text,
#panelSystem #sysLiveText{
  line-height:24px !important;
}

#panelSystem .strip-item:nth-of-type(3){
  min-width:92px !important;
  padding:0 8px !important;
}

#panelSystem .strip-live{
  min-width:168px !important;
  padding:0 8px !important;
}
#panelSystem .live-state-wrap,
#panelSystem .slider-switch{
  height:24px !important;
  min-height:24px !important;
}

/* one-shot: tighten panelSystem outer padding only */
#panelSystem{
  padding-top:6px !important;
  padding-bottom:6px !important;
  padding-left:10px !important;
  padding-right:10px !important;
}

/* one-shot: system values same size as labels */
#panelSystem .strip-item b{
  font-size:13px !important;
  font-weight:600 !important;
  line-height:24px !important;
}
/* === cockpit v1 signal polish v1 === */
#panelSignal .panel-head{
  margin-bottom: 10px;
}
.sig-toolbar{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}
.sig-meta-inline{
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:20px;
  font-weight:700;
}
#sigChartBox{
  padding:8px;
  border-radius:18px;
}

/* --- signal chart final height override --- */
#panelSignal{
  min-height: 0 !important;
}
#panelSignal .panel-body{
  display: block !important;
}
/* #sigChartBox{
  height: 230px !important;
  min-height: 230px !important;
  max-height: 230px !important;
} */
.ck-wrap{
  display:flex;
  flex-direction:column;
  gap:6px;
  height:100%;
  min-height:0;
}
.ck-main{
  position:relative;
  flex:1 1 auto;
  min-height:220px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:12px;
  overflow:hidden;
}
.ck-energy{
  position:relative;
  flex:0 0 42px;
  min-height:42px;
  max-height:42px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:12px;
  overflow:hidden;
}
#ckCanvas,
#ckEnergyCanvas{
  display:block;
  width:100%;
  height:100%;
}
.ck-price-scale{
  position:absolute;
  top:0;
  right:0;
  width:64px;
  height:100%;
  border-left:1px solid rgba(255,255,255,.08);
  pointer-events:none;
}
.ck-price-tag{
  position:absolute;
  right:6px;
  top:10px;
  padding:2px 6px;
  font-size:12px;
  line-height:1.4;
  color:#e5e7eb;
  background:rgba(11,18,32,.92);
  border:1px solid rgba(255,255,255,.12);
  border-radius:6px;
  pointer-events:none;
}
/* --- signal chart width fix --- */
#sigChartBox{
  display:block !important;
}
.ck-wrap{
  width:100% !important;
}
.ck-main,
.ck-energy{
  width:100% !important;
}
.ck-price-scale{
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  align-items:flex-end;
  padding:8px 6px 8px 4px;
  box-sizing:border-box;
}
.ck-scale-tick{
  font-size:11px;
  line-height:1;
  color:rgba(229,231,235,.72);
}
/* ===== system status switch final ===== */
.visually-hidden{
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  padding:0 !important;
  margin:-1px !important;
  overflow:hidden !important;
  clip:rect(0,0,0,0) !important;
  white-space:nowrap !important;
  border:0 !important;
}
#panelSystem .live-state-wrap{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:20px;
  min-width:20px;
  margin-right:8px;
}
#panelSystem .live-state-wrap #sysLiveLamp{
  position:relative !important;
  left:auto !important;
  top:auto !important;
  display:inline-block !important;
  margin-right:0 !important;
}
#panelSystem .live-state-wrap #sysLiveLamp.lamp-live{
  background:linear-gradient(180deg,#5ee38e,#22c55e) !important;
  animation:lamp-breath 1.6s ease-in-out infinite;
}
#panelSystem .live-state-wrap #sysLiveLamp.lamp-stop{
  animation:none !important;
}
#panelSystem .exchange-live-badge{
  background:rgba(255,255,255,.02) !important;
  border:1px solid rgba(255,255,255,.06) !important;
  color:#dbe8ff !important;
  box-shadow:none !important;
}
body.theme-light #panelSystem .exchange-live-badge{
  background:rgba(255,255,255,.72) !important;
  border-color:rgba(15,23,42,.10) !important;
  color:#0f172a !important;
}
#panelSystem .strip-live{
  min-width:auto !important;
  padding:0 8px !important;
}
#panelSystem .system-status-switch{
  position:relative;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  width:78px;
  min-width:78px;
}
#panelSystem .system-status-switch{
  height:32px !important;
  min-height:32px !important;
  margin-left:auto;
  cursor:pointer;
}
#panelSystem .system-status-switch input{
  position:absolute;
  inset:0;
  opacity:0;
  margin:0;
  cursor:pointer;
}
#panelSystem .system-status-switch .slider-ui{
  position:relative;
  width:78px;
  height:32px;
}
#panelSystem .system-status-switch .slider-ui{
  border-radius:999px;
  background:#232a35 !important;
  border:1px solid rgba(255,255,255,.10);
  box-shadow:inset 0 1px 2px rgba(255,255,255,.05);
  transition:background .22s ease, border-color .22s ease, box-shadow .22s ease;
}
#panelSystem .system-status-switch .slider-ui::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.03);
}
#panelSystem .system-status-switch .slider-ui::after{
  content:attr(data-state);
  position:absolute;
  top:3px;
  left:3px;
  width:26px;
  height:26px;
  border-radius:50%;
  background:#ffffff !important;
  color:#111827;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:10px;
  font-weight:800;
}
#panelSystem .system-status-switch .slider-ui::after{
  letter-spacing:.2px;
  box-shadow:0 3px 10px rgba(0,0,0,.28);
  transform:translateX(0);
  transition:transform .22s ease, box-shadow .22s ease;
}
#panelSystem .system-status-switch input:checked + .slider-ui{
  background:#16a34a !important;
  border-color:rgba(34,197,94,.55);
  box-shadow:0 0 0 1px rgba(34,197,94,.12), 0 0 18px rgba(34,197,94,.20);
}
#panelSystem .system-status-switch input:checked + .slider-ui::after{
  transform:translateX(46px);
  animation:system-switch-breathe 1.6s ease-in-out infinite;
}
body.theme-light #panelSystem .system-status-switch .slider-ui{
  background:#3a414c !important;
  border-color:rgba(15,23,42,.12);
}
body.theme-light #panelSystem .system-status-switch input:checked + .slider-ui{
  background:#16a34a !important;
}
@keyframes system-switch-breathe{
  0%,100%{
    box-shadow:0 3px 10px rgba(0,0,0,.28), 0 0 0 rgba(255,255,255,0);
  }
  50%{
    box-shadow:0 5px 14px rgba(0,0,0,.32), 0 0 12px rgba(255,255,255,.38);
  }
}

/* ===== lamp fix part1 ===== */
#panelSystem .live-state-wrap #sysLiveLamp{
  width:20px !important;
  height:20px !important;
  min-width:20px !important;
  min-height:20px !important;
  border-radius:50% !important;
  background:#ef4444 !important;
  box-shadow:0 0 6px rgba(239,68,68,.45) !important;
}

/* ===== lamp fix part2 ===== */
#panelSystem .live-state-wrap #sysLiveLamp::before,
#panelSystem .live-state-wrap #sysLiveLamp::after{
  content:none !important;
  display:none !important;
}

/* ===== lamp fix part3 ===== */
#panelSystem .live-state-wrap #sysLiveLamp.lamp-live{
  background:#22c55e !important;
  box-shadow:0 0 8px rgba(34,197,94,.55) !important;
  animation:lamp-breath 1.6s ease-in-out infinite !important;
}
#panelSystem .live-state-wrap #sysLiveLamp.lamp-stop{
  background:#ef4444 !important;
  box-shadow:0 0 6px rgba(239,68,68,.45) !important;
  animation:none !important;
}

/* ===== switch fix part1 ===== */
#panelSystem .system-status-switch{
  width:68px !important;
  min-width:68px !important;
  height:26px !important;
  min-height:26px !important;
}
#panelSystem .system-status-switch .slider-ui{
  width:68px !important;
  height:26px !important;
}

/* ===== switch fix part2 ===== */
#panelSystem .system-status-switch .slider-ui::after{
  top:2px !important;
  left:2px !important;
  width:22px !important;
  height:22px !important;
  font-size:9px !important;
  line-height:22px !important;
  content:attr(data-state) !important;
}

/* ===== switch fix part3 ===== */
#panelSystem .system-status-switch input:checked + .slider-ui::after{
  transform:translateX(42px) !important;
}
/* account subrow */
#panelAccount .panel-head-row{display:flex;align-items:center;}
#panelAccount .account-subrow{
  margin-top:10px;display:flex;align-items:center;
  justify-content:space-between;gap:12px;
}
#panelAccount .acct-transfer-row{display:flex;align-items:center;}
#panelAccount .funds-transfer-entry{
  display:inline-flex;align-items:center;gap:8px;
  min-height:34px;padding:0 14px;border-radius:999px;
  border:1px solid rgba(148,163,184,.28);
  background:rgba(15,23,42,.72);color:#e5edf7;
  cursor:pointer;
}
#panelAccount .funds-transfer-entry-label{
  font-size:13px;font-weight:600;letter-spacing:.2px;
}
#panelAccount .funds-transfer-icon{
  position:relative;width:18px;height:12px;display:inline-block;
}
#panelAccount .funds-transfer-arrow{
  position:absolute;top:50%;width:8px;height:8px;
  border-top:1.5px solid #9fb3c8;border-right:1.5px solid #9fb3c8;
  transform:translateY(-50%) rotate(45deg);
}
#panelAccount .funds-transfer-arrow-left{left:1px;transform:translateY(-50%) rotate(-135deg);}
#panelAccount .funds-transfer-arrow-right{right:1px;}
/* funds transfer button final */
#panelAccount .funds-transfer-entry{
  background:#f5c542 !important;
  color:#0f172a !important;
  border:1px solid #eab308 !important;
  min-height:36px;
  padding:0 16px;
  white-space:nowrap;
}
#panelAccount .funds-transfer-icon{display:none !important;}
#panelAccount .funds-transfer-entry-label{
  display:inline-block;
  white-space:nowrap;
  line-height:1;
  font-size:13px;
  font-weight:700;
}
#panelAccount .acct-transfer-row{flex:0 0 auto;}
/* transfer button flatten + meta right */
#panelAccount .account-subrow{align-items:center;}
#panelAccount .funds-transfer-entry{
  min-height:30px !important;
  padding:0 12px !important;
  border-radius:999px !important;
}
#panelAccount .funds-transfer-entry-label{
  font-size:12px !important;
  line-height:1 !important;
}
#panelAccount .panel-meta{
  margin-left:auto !important;
  text-align:right !important;
}
/* account row tighten */
#panelAccount .panel-subrow.account-subrow{
  display:flex !important; align-items:center !important;
  justify-content:space-between !important; width:100% !important;
}
#panelAccount .funds-transfer-entry{
  min-height:26px !important; padding:0 10px !important;
  border-radius:999px !important;
}
#panelAccount .funds-transfer-entry-label{
  font-size:12px !important; line-height:1 !important;
}
#panelAccount .panel-subrow.account-subrow > .panel-meta{
  margin-left:auto !important; flex:0 0 auto !important;
  text-align:right !important;
}
/* pool mini chart */
#panelPool .panel-body{display:flex;flex-direction:column;min-height:100%;}
#panelPool .pool-chart-wrap{margin-top:auto;padding-top:12px;}
#panelPool .pool-chart-title{font-size:12px;color:#93a4bf;margin-bottom:8px;}
#panelPool .pool-bars{display:flex;align-items:flex-end;gap:8px;height:120px;}
#panelPool .pool-bar-col{flex:1;display:flex;flex-direction:column;align-items:center;gap:6px;}
#panelPool .pool-bar{width:100%;max-width:34px;border-radius:8px 8px 0 0;background:#1d4ed8;min-height:10px;}
#panelPool .pool-bar-label{font-size:11px;color:#93a4bf;white-space:nowrap;}
#panelPool .pool-bar-value{font-size:12px;color:#eef4ff;font-weight:600;}
/* compact mini charts */
#panelPool .pool-chart-wrap,#panelAccount .acct-chart-wrap{margin-top:auto;padding-top:10px;}
#panelPool .pool-chart-title,#panelAccount .acct-chart-title{font-size:12px;color:#93a4bf;margin-bottom:6px;}
#panelPool .pool-bars,#panelAccount .acct-bars{display:flex;align-items:flex-end;gap:6px;height:84px;overflow:hidden;}
#panelPool .pool-bar-col,#panelAccount .acct-bar-col{flex:1;display:flex;flex-direction:column;align-items:center;gap:4px;min-width:0;}
#panelPool .pool-bar,#panelAccount .acct-bar{width:100%;max-width:24px;border-radius:6px 6px 0 0;min-height:8px;}
#panelPool .pool-bar{background:#2d55d3;}
#panelAccount .acct-bar{background:#14b8a6;}
#panelPool .pool-bar-label,#panelAccount .acct-bar-label{font-size:10px;color:#93a4bf;white-space:nowrap;}
#panelPool .pool-bar-value,#panelAccount .acct-bar-value{font-size:11px;color:#eef4ff;font-weight:600;line-height:1;}
#panelAccount .panel-body,#panelPool .panel-body{
  display:flex;flex-direction:column;min-height:100%;
}
#panelAccount .panel-body .kv,#panelPool .panel-body .kv{
  flex:0 0 auto;
}
/* chart position fix */
#panelAccount .panel-body,#panelPool .panel-body{
  display:flex !important;
  flex-direction:column !important;
  height:calc(100% - 0px) !important;
  overflow:hidden !important;
}
#panelAccount .acct-chart-wrap,#panelPool .pool-chart-wrap{
  margin-top:auto !important;
  padding-top:8px !important;
  padding-bottom:6px !important;
  flex:0 0 auto !important;
}
#panelAccount .acct-bars,#panelPool .pool-bars{
  height:64px !important;
  gap:5px !important;
  align-items:flex-end !important;
}
#panelAccount .acct-bar,#panelPool .pool-bar{
  max-width:20px !important;
}
#panelAccount .acct-chart-title,#panelPool .pool-chart-title{
  margin-bottom:4px !important;
}
#panelAccount .acct-chart-wrap{
  transform:translateY(-6px) !important;
}
#panelPool .pool-chart-wrap{
  transform:translateY(-2px) !important;
}
/* anchor charts inside panels */
#panelAccount .panel-body,#panelPool .panel-body{
  position:relative !important;
  display:block !important;
  overflow:hidden !important;
  padding-bottom:118px !important;
}
#panelAccount .acct-chart-wrap,#panelPool .pool-chart-wrap{
  position:absolute !important;
  left:0 !important; right:0 !important; bottom:8px !important;
  margin-top:0 !important; padding-top:0 !important;
  padding-bottom:0 !important; transform:none !important;
}
#panelAccount .acct-bars,#panelPool .pool-bars{
  height:52px !important;
  gap:4px !important;
}
#panelAccount .acct-bar,#panelPool .pool-bar{
  max-width:18px !important;
}
#panelAccount .acct-chart-title,#panelPool .pool-chart-title{
  margin-bottom:2px !important;
}
/* chart pull back up */
#panelAccount .acct-chart-wrap,
#panelPool .pool-chart-wrap{
  bottom:56px !important;
  left:12px !important;
  right:12px !important;
  z-index:2 !important;
}
#panelAccount .panel-body,
#panelPool .panel-body{
  padding-bottom:150px !important;
}
#panelAccount .acct-bars,
#panelPool .pool-bars{
  height:46px !important;
  gap:4px !important;
}
#panelAccount .acct-bar,
#panelPool .pool-bar{
  max-width:16px !important;
}
/* chart back to normal flow */
#panelAccount .panel-body,#panelPool .panel-body{
  position:static !important;
  display:flex !important;
  flex-direction:column !important;
  overflow:hidden !important;
  padding-bottom:0 !important;
}
#panelAccount .acct-chart-wrap,#panelPool .pool-chart-wrap{
  position:static !important;
  left:auto !important; right:auto !important; bottom:auto !important;
  margin-top:14px !important;
  padding-top:0 !important; padding-bottom:0 !important;
  transform:none !important;
}
#panelAccount .acct-bars,#panelPool .pool-bars{
  height:72px !important;
  gap:6px !important;
}
#panelAccount .acct-bar,#panelPool .pool-bar{
  max-width:22px !important;
}
#panelAccount .acct-chart-title,#panelPool .pool-chart-title{
  margin-bottom:6px !important;
}
/* pool body down align to account total */
#panelPool .panel-body{
  padding-top:28px !important;
}
/* account block pull up a bit */
#panelAccount .account-subrow{
  margin-top:6px !important;
  margin-bottom:6px !important;
}
#panelAccount .panel-body{
  padding-top:6px !important;
}
#panelAccount .acct-chart-wrap{
  margin-top:10px !important;
}
#panelAccount .acct-chart-title{
  margin-bottom:4px !important;
}
/* account chart move down one row */
#panelAccount .acct-chart-wrap{
  margin-top:22px !important;
}
/* pool body move down one more row */
#panelPool .panel-body{
  padding-top:44px !important;
}
/* pool body move down one more step */
#panelPool .panel-body{
  padding-top:60px !important;
}
/* fine move charts upward */
#panelAccount .acct-chart-wrap,
#panelPool .pool-chart-wrap{
  margin-top:8px !important;
}
#panelAccount .acct-bars,
#panelPool .pool-bars{
  height:66px !important;
}
#panelAccount .panel-head{
  border-bottom:1px solid rgba(148,163,184,.10) !important;
  padding:14px 14px 10px !important;
}
#panelAccount .account-subrow{
  margin-top:8px !important;
  padding:8px 8px !important;
  border:1px solid rgba(148,163,184,.14) !important;
  border-radius:12px !important;
  background:rgba(15,23,42,.24) !important;
}
#panelPool .panel-head{
  border-bottom:1px solid rgba(148,163,184,.10) !important;
  padding:14px 14px 10px !important;
}
/* account top row flatten + widen */
#panelAccount .account-subrow{
  margin-top:4px !important;
  padding:6px 12px !important;
  min-height:48px !important;
  border-radius:18px !important;
}
#panelAccount .funds-transfer-entry{
  min-height:26px !important;
  padding:0 18px !important;
}
#panelAccount .funds-transfer-entry-label{
  font-size:12px !important;
  line-height:1 !important;
}
#panelAccount .panel-meta{
  margin-left:auto !important;
  white-space:nowrap !important;
}
/* remove account top outer shell */
#panelAccount .account-subrow{
  padding:0 !important;
  min-height:auto !important;
  border:none !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
}
#panelAccount .account-subrow{
  display:flex !important;
  align-items:center !important;
  gap:12px !important;
  margin-top:4px !important;
  margin-bottom:8px !important;
}
#panelAccount .panel-meta{
  margin-left:auto !important;
  white-space:nowrap !important;
}
/* split row left/right + move up */
#panelAccount .account-subrow{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:0 !important;
  margin-top:-2px !important;
  margin-bottom:6px !important;
}
#panelAccount .acct-transfer-row{
  flex:0 0 auto !important;
}
#panelAccount .panel-meta{
  margin-left:auto !important;
  text-align:right !important;
  flex:0 0 auto !important;
  white-space:nowrap !important;
}
/* account row real split */
#panelAccount .account-subrow{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  width:100% !important;
  margin-top:-4px !important;
  margin-bottom:6px !important;
}
#panelAccount .acct-transfer-row{margin-right:auto !important;}
#panelAccount .panel-meta{margin-left:auto !important; text-align:right !important;}
/* pool subrow */
#panelPool .pool-subrow{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  width:100% !important;
  margin-top:-4px !important;
  margin-bottom:10px !important;
}
#panelPool .pool-best-label{font-size:13px;color:#e5edf7;font-weight:600;}
#panelPool .pool-subrow .panel-meta{margin-left:auto !important; white-space:nowrap !important;}
/* pool top shell */
#panelPool .pool-subrow{
  padding:8px 10px !important;
  border:1px solid rgba(148,163,184,.16) !important;
  border-radius:12px !important;
  background:rgba(15,23,42,.22) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.03) !important;
  margin-top:-2px !important;
  margin-bottom:8px !important;
}
#panelPool .panel-body{
  padding-top:10px !important;
}
#panelPool .panel-body > .kv:first-of-type{
  margin-top:0 !important;
}
#panelPool .panel-head{
  padding-bottom:6px !important;
}
#panelPool .pool-subrow + *{
  margin-top:0 !important;
}
/* remove pool outer shell */
#panelPool .pool-subrow{
  padding:0 !important;
  border:none !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  margin-top:-4px !important;
  margin-bottom:4px !important;
}
#panelPool .pool-best-label{
  display:inline-flex !important;
  align-items:center !important;
  min-height:28px !important;
  padding:0 12px !important;
  border-radius:999px !important;
  background:rgba(16,185,129,.16) !important;
  border:1px solid rgba(16,185,129,.32) !important;
  color:#d1fae5 !important;
}
#panelPool .panel-head{
  padding-bottom:2px !important;
}
#panelPool .panel-body{
  padding-top:2px !important;
}
#panelPool .panel-body > .kv:first-of-type{
  margin-top:-2px !important;
}
/* account body move up to align with pool signal */
#panelAccount .panel-body{
  padding-top:0 !important;
}
#panelAccount .panel-body > .kv:first-of-type{
  margin-top:-18px !important;
}
/* account body realign with pool signal */
#panelAccount .panel-body{
  padding-top:18px !important;
}
#panelAccount .panel-body > .kv:first-of-type{
  margin-top:0 !important;
}
/* panel heads move up a bit */
#panelAccount .panel-head,
#panelPool .panel-head{
  padding-top:10px !important;
  padding-bottom:4px !important;
}
#panelAccount .panel-title,
#panelPool .panel-title{
  margin-top:-2px !important;
}
/* account first divider slightly up */
#panelAccount .panel-body{
  padding-top:10px !important;
}
#panelAccount .panel-body > .kv:first-of-type{
  margin-top:-8px !important;
  padding-top:0 !important;
}
/* move account data block upward one row */
#panelAccount .panel-body > .kv{
  position:relative !important;
  top:-8px !important;
}
#panelAccount .acct-chart-wrap{
  margin-top:0 !important;
}
/* reveal total row + move account body slightly down */
#panelAccount .panel-body{
  padding-top:16px !important;
}
#panelAccount .panel-body > .kv:first-of-type{
  margin-top:0 !important;
  padding-top:0 !important;
}
#panelAccount .panel-body > .kv{
  position:relative !important;
  top:0 !important;
}
/* reveal total row + move account body slightly down */
#panelAccount .panel-body{
  padding-top:16px !important;
}
#panelAccount .panel-body > .kv:first-of-type{
  margin-top:0 !important;
  padding-top:0 !important;
}
#panelAccount .panel-body > .kv{
  position:relative !important;
  top:0 !important;
}
/* unify left pills */
#panelAccount .funds-transfer-entry,
#panelPool .pool-best-label{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-height:28px !important;
  padding:0 14px !important;
  border-radius:999px !important;
  font-size:12px !important;
  font-weight:700 !important;
}
#panelAccount .funds-transfer-entry{
  background:#f5c542 !important;
  border:1px solid #eab308 !important;
  color:#0f172a !important;
}
#panelPool .pool-best-label{
  background:rgba(16,185,129,.16) !important;
  border:1px solid rgba(16,185,129,.32) !important;
}
/* account body pull back up by half step */
#panelAccount .panel-body{
  padding-top:8px !important;
}
/* account body up 1mm fine tune */
#panelAccount .panel-body{
  padding-top:6px !important;
}
/* account body up another 1mm */
#panelAccount .panel-body{
  padding-top:4px !important;
}
/* account chart down 4mm */
#panelAccount .acct-chart-wrap{
  margin-top:18px !important;
}
/* pool chart down 2mm */
#panelPool .pool-chart-wrap{
  margin-top:8px !important;
}
/* pool chart down 1mm more */
#panelPool .pool-chart-wrap{
  position: relative !important;
  top: 4px !important;
}
/* account chart up 1mm */
#panelAccount .acct-chart-wrap{
  margin-top:14px !important;
}
/* account title bigger + up 1mm */
#panelAccount .panel-title{
  font-size:20px !important;
  position:relative !important;
  top:-4px !important;
}
/* unify main panel titles to signal title size */
#panelAccount .panel-title,
#panelPool .panel-title,
#panelSignal .panel-title{
  font-size:17px !important;
  font-weight:600 !important;
  position:relative !important;
  top:0 !important;
}
/* move account + info titles up 1mm */
#panelAccount .panel-title,
#panelInfo .panel-title{
  position:relative !important;
  top:-4px !important;
}
/* move pool title up 1mm */
#panelPool .panel-title{
  position:relative !important;
  top:-4px !important;
}
/* funds transfer align left edge */
#panelAccount .acct-transfer-row{
  margin-left:0 !important;
  padding-left:0 !important;
}
#panelAccount .funds-transfer-entry{
  margin-left:0 !important;
}
/* pool meta same size as account meta */
#panelPool .pool-subrow .panel-meta{
  font-size:inherit !important;
  font-weight:inherit !important;
  letter-spacing:inherit !important;
  line-height:inherit !important;
  color:inherit !important;
}
/* pool meta match account currency size */
#panelPool .pool-subrow .panel-meta{
  font-size:13px !important;
  font-weight:500 !important;
  line-height:1.2 !important;
}
/* events panel content down 3mm */
#panelEvents .panel-body{
  padding-top:12px !important;
}
/* events title down 1mm + match signal title */
#panelEvents .panel-title{
  font-size:17px !important;
  font-weight:600 !important;
  position:relative !important;
  top:4px !important;
}
/* info title match signal title */
#panelInfo .panel-title{
  font-size:17px !important;
  font-weight:600 !important;
}

/* funds transfer modal shell */
#fundsTransferModal{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:rgba(2,6,23,.58);
  backdrop-filter:blur(2px);
  z-index:1200;
}
#fundsTransferModal.ftModalOpen{
  display:flex;
}
#fundsTransferModal .ftModalDialog{
  width:min(270px, calc(100vw - 28px));
  border:1px solid rgba(148,163,184,.18);
  border-radius:14px;
  background:linear-gradient(180deg, rgba(24,30,40,.96), rgba(15,20,28,.96));
  box-shadow:0 10px 24px rgba(2,6,23,.38);
  color:#e5edf7;
}
#fundsTransferModal .ftModalHead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:16px 18px 12px;
  border-bottom:1px solid rgba(148,163,184,.12);
}
#fundsTransferModal .ftModalTitle{
  margin:0;
  font-size:16px;
  font-weight:700;
  letter-spacing:.2px;
}
#fundsTransferModal .ftModalCloseBtn{
  min-height:30px;
  padding:0 12px;
  border-radius:999px;
  border:1px solid rgba(148,163,184,.24);
  background:rgba(38,46,58,.76);
  color:#e2e8f0;
  cursor:pointer;
}
#fundsTransferModal .ftModalCloseBtn:hover{
  background:rgba(57,69,84,.84);
}
#fundsTransferModal .ftModalBody{
  padding:16px 18px 20px;
}
#fundsTransferModal .ftFormShell{
  display:flex;
  flex-direction:column;
  gap:12px;
}
#fundsTransferModal .ftFormPanel{
  padding:12px;
  border:1px solid rgba(148,163,184,.14);
  border-radius:12px;
  background:rgba(24,31,42,.62);
}
#fundsTransferModal .ftFormRow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-height:34px;
  padding:0 2px;
}
#fundsTransferModal .ftFormLabel{
  color:#9fb0c6;
  font-size:13px;
}
#fundsTransferModal .ftFormValue{
  color:#e8effa;
  font-size:13px;
  font-weight:600;
}
#fundsTransferModal .ftSwapWrap{
  display:flex;
  justify-content:center;
  margin:4px 0;
}
#fundsTransferModal .ftSwapBtn{
  width:34px;
  height:34px;
  border-radius:999px;
  border:1px solid rgba(148,163,184,.28);
  background:rgba(36,46,60,.88);
  color:#dbe7f8;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition:background .2s ease, border-color .2s ease;
}
#fundsTransferModal .ftSwapBtn:hover{
  background:rgba(56,70,88,.9);
  border-color:rgba(148,163,184,.44);
}
#fundsTransferModal .ftSwapIcon{
  font-size:14px;
  line-height:1;
}
#fundsTransferModal .ftSwapBtn.ftSwapSpin{
  animation:ftSwapSpin 1s ease;
}
@keyframes ftSwapSpin{
  0%{ transform:rotate(0deg); }
  45%{ transform:rotate(180deg); }
  100%{ transform:rotate(360deg); }
}
#fundsTransferModal .ftFormRowAmount{
  align-items:flex-start;
  flex-direction:column;
  gap:8px;
  padding-left:0;
  padding-right:12px;
}
#fundsTransferModal .ftFormAmountWrap{
  width:100%;
  display:flex;
  align-items:center;
  gap:8px;
  margin-left:-10px;
}
#fundsTransferModal .ftFormInput{
  flex:1;
  height:36px;
  border-radius:10px;
  border:1px solid rgba(148,163,184,.2);
  background:rgba(20,28,38,.82);
  color:#eef4ff;
  padding:0 12px;
  outline:none;
}
#fundsTransferModal .ftFormInput:focus{
  border-color:rgba(148,163,184,.44);
  box-shadow:0 0 0 2px rgba(148,163,184,.12);
}
#fundsTransferModal .ftFormGhostBtn{
  min-width:58px;
  height:36px;
  border-radius:10px;
  border:1px solid rgba(148,163,184,.2);
  background:rgba(37,47,61,.78);
  color:#d9e3f2;
  cursor:pointer;
}
#fundsTransferModal .ftFormGhostBtn:hover{
  background:rgba(56,70,88,.84);
}
#fundsTransferModal .ftFormPrimaryBtn{
  margin-top:2px;
  height:40px;
  border:0;
  border-radius:10px;
  background:linear-gradient(180deg, #f5c542, #eab308);
  color:#0f172a;
  font-size:14px;
  font-weight:700;
  cursor:pointer;
}
#fundsTransferModal .ftFormPrimaryBtn:hover{
  filter:brightness(1.03);
}
#fundsTransferModal .ftFormExecMsg{
  min-height:18px;
  margin-top:4px;
  font-size:12px;
  line-height:1.4;
  color:#97a8be;
}
#fundsTransferModal .ftFormExecMsg.ftExecOk{
  color:#8bd5b4;
}
#fundsTransferModal .ftFormExecMsg.ftExecErr{
  color:#f2b2b2;
}
#fundsTransferModal .ftPreviewWrap{
  margin-top:4px;
  padding:8px 10px;
  margin-left:-4px;
  border:1px solid rgba(148,163,184,.22);
  border-radius:10px;
  background:linear-gradient(180deg, rgba(39,48,61,.76), rgba(32,41,53,.78));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04), inset 0 -1px 0 rgba(2,6,23,.28);
}
#fundsTransferModal .ftPreviewLine{
  margin:0;
  color:#97a8be;
  line-height:1.45;
  font-size:13px;
}
#fundsTransferModal .ftPreviewValue{
  color:#e4ecf8;
  font-weight:600;
}

/* cockpit login modal */
#ckLoginModal{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:rgba(2,6,23,.62);
  backdrop-filter:blur(3px);
  z-index:1300;
}
#ckLoginModal.ckLoginOpen{
  display:flex;
}
#ckLoginModal .ckLoginDialog{
  width:min(360px, calc(100vw - 28px));
  border:1px solid rgba(148,163,184,.22);
  border-radius:12px;
  background:linear-gradient(180deg, rgba(24,30,40,.96), rgba(15,20,28,.96));
  box-shadow:0 12px 28px rgba(2,6,23,.42);
  color:#e5edf7;
}
#ckLoginModal .ckLoginHead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:14px 14px 10px;
  border-bottom:1px solid rgba(148,163,184,.14);
}
#ckLoginModal .ckLoginTitle{
  margin:0;
  font-size:15px;
  font-weight:700;
}
#ckLoginModal .ckLoginCloseBtn{
  width:30px;
  height:30px;
  border-radius:999px;
  border:1px solid rgba(148,163,184,.28);
  background:rgba(37,47,61,.78);
  color:#dce5f3;
  cursor:pointer;
}
#ckLoginModal .ckLoginBody{
  padding:14px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
#ckLoginModal .ckLoginLabel{
  font-size:12px;
  color:#9fb0c6;
}
#ckLoginModal .ckLoginInput{
  height:36px;
  border-radius:10px;
  border:1px solid rgba(148,163,184,.22);
  background:rgba(20,28,38,.8);
  color:#edf4ff;
  padding:0 10px;
  outline:none;
}
#ckLoginModal .ckLoginInput:focus{
  border-color:rgba(148,163,184,.48);
  box-shadow:0 0 0 2px rgba(148,163,184,.12);
}
#ckLoginModal .ckLoginSubmitBtn{
  margin-top:4px;
  height:38px;
  border:0;
  border-radius:10px;
  background:linear-gradient(180deg, #f5c542, #eab308);
  color:#0f172a;
  font-weight:700;
  cursor:pointer;
}
#ckLoginModal .ckLoginMsg{
  min-height:18px;
  font-size:12px;
  color:#fbbf24;
}

.ckGuestPlaceholder{
  color:#9fb0c6;
  font-size:13px;
  padding:8px 0;
}

/* final align cleanup: account/pool subrow left-right split only */
#panelAccount .panel-head,
#panelPool .panel-head{
  display:block !important;
}

#panelAccount .panel-subrow.account-subrow,
#panelPool .panel-subrow.pool-subrow{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  width:100% !important;
  gap:0 !important;
}

#panelAccount .panel-subrow.account-subrow .panel-meta,
#panelPool .panel-subrow.pool-subrow .panel-meta{
  margin-left:auto !important;
  text-align:right !important;
  white-space:nowrap !important;
  position:static !important;
  transform:none !important;
}

/* mm-level micro adjustments only */
#panelAccount .panel-title{
  position:relative !important;
  transform:translateY(-2mm) !important;
}

#panelPool .panel-title{
  position:relative !important;
  transform:translateY(-2mm) !important;
}

#panelAccount .funds-transfer-entry{
  position:relative !important;
  transform:translateX(-3mm) !important;
}

#panelAccount .panel-subrow.account-subrow .panel-meta{
  position:relative !important;
  transform:translateX(3mm) !important;
}

#panelPool .pool-best-label{
  position:relative !important;
  transform:translateX(-3mm) !important;
}

#panelPool .pool-subrow .panel-meta{
  position:relative !important;
  transform:translateX(3mm) !important;
}

/* final tighten: secondary nav strip only */
.navstrip{
  min-height:36px !important;
  height:36px !important;
  padding:0 12px !important;
}
.topnav{
  gap:6px !important;
}
.topnav-link{
  padding:4px 10px !important;
  line-height:1.15 !important;
}
.navtools{
  gap:6px !important;
  margin-left:10px !important;
}
.navtool-btn{
  height:24px !important;
  min-height:24px !important;
  padding:0 8px !important;
  line-height:24px !important;
  border-radius:6px !important;
  font-size:12px !important;
}

/* ===== light theme final polish (visual only) ===== */
body.theme-light{
  --lt-page-bg:#f4f7fb;
  --lt-top-bg:#ffffff;
  --lt-surface:#ffffff;
  --lt-inner:#f8fbff;
  --lt-border:#d9e2ee;
  --lt-border-strong:#c8d5e6;
  --lt-text:#0f172a;
  --lt-text-2:#344155;
  --lt-text-3:#64748b;
  --lt-accent:#1d4ed8;
  --lt-accent-soft:#dbeafe;
  --lt-shadow:0 4px 12px rgba(15,23,42,.06);
  --lt-shadow-soft:0 2px 8px rgba(15,23,42,.04);
}

body.theme-light{
  background:var(--lt-page-bg) !important;
  color:var(--lt-text) !important;
}
body.theme-light .topbar,
body.theme-light .navstrip,
body.theme-light .footerbar{
  background:var(--lt-top-bg) !important;
  border-color:var(--lt-border) !important;
  box-shadow:var(--lt-shadow-soft) !important;
}
body.theme-light .panel,
body.theme-light #panelAccount,
body.theme-light #panelPool,
body.theme-light #panelSignal,
body.theme-light #panelEvents,
body.theme-light #panelInfo{
  background:var(--lt-surface) !important;
  border:1px solid var(--lt-border) !important;
  box-shadow:var(--lt-shadow) !important;
  color:var(--lt-text) !important;
}

/* type hierarchy */
body.theme-light .cockpit-title-text,
body.theme-light .system-tag{
  color:var(--lt-text) !important;
  font-weight:700 !important;
}
body.theme-light .panel-title{
  color:var(--lt-text) !important;
  font-weight:700 !important;
}
body.theme-light .event-head,
body.theme-light .info-grid.head,
body.theme-light .strip-item span,
body.theme-light .strip-live span,
body.theme-light .panel-meta,
body.theme-light .pool-best-label{
  color:var(--lt-text-2) !important;
  font-weight:600 !important;
}
body.theme-light .kv span:last-child,
body.theme-light .strip-item b,
body.theme-light .event-row,
body.theme-light .info-grid.row{
  color:var(--lt-text) !important;
}
body.theme-light .footerbar,
body.theme-light .pager-info,
body.theme-light .topbar-right,
body.theme-light .kv span:first-child{
  color:var(--lt-text-3) !important;
}

/* inner surfaces */
body.theme-light #sigChartBox,
body.theme-light .sig-chart-box,
body.theme-light .info-table-box,
body.theme-light .events-list,
body.theme-light #infoRowsPos,
body.theme-light #infoRowsClosed,
body.theme-light .pool-chart-wrap,
body.theme-light .acct-chart-wrap{
  background:var(--lt-inner) !important;
  border:1px solid var(--lt-border) !important;
  box-shadow:none !important;
}

/* list/table readability */
body.theme-light .event-head,
body.theme-light .info-grid.head{
  background:#f2f6fd !important;
  border-bottom:1px solid var(--lt-border-strong) !important;
}
body.theme-light .event-row,
body.theme-light .info-grid.row{
  border-bottom:1px solid #e4ebf5 !important;
}
body.theme-light .event-row:nth-child(even),
body.theme-light .info-pane .info-grid.row:nth-of-type(even){
  background:#fbfdff !important;
}
body.theme-light .event-row:nth-child(odd),
body.theme-light .info-pane .info-grid.row:nth-of-type(odd){
  background:#f7faff !important;
}

/* controls */
body.theme-light .cockpit-select,
body.theme-light select,
body.theme-light .pager-btn,
body.theme-light .navtool-btn,
body.theme-light .cockpit-login-btn,
body.theme-light .info-tab{
  background:#ffffff !important;
  color:var(--lt-text-2) !important;
  border:1px solid var(--lt-border-strong) !important;
  border-radius:8px !important;
  box-shadow:none !important;
}
body.theme-light .pager-btn:hover,
body.theme-light .navtool-btn:hover,
body.theme-light .cockpit-login-btn:hover,
body.theme-light .info-tab:hover,
body.theme-light .cockpit-select:hover,
body.theme-light select:hover{
  border-color:#9fb4cf !important;
  background:#f8fbff !important;
}
body.theme-light .pager-btn:disabled{
  color:#94a3b8 !important;
  background:#f4f7fb !important;
  border-color:#dbe4f0 !important;
}
body.theme-light .info-tab.active,
body.theme-light .topnav-link.active{
  background:var(--lt-accent-soft) !important;
  border-color:#b7cdf6 !important;
  color:#1e3a8a !important;
}
body.theme-light .cockpit-select:focus,
body.theme-light select:focus,
body.theme-light .pager-btn:focus,
body.theme-light .navtool-btn:focus,
body.theme-light .info-tab:focus{
  outline:none !important;
  border-color:#87a9de !important;
  box-shadow:0 0 0 2px rgba(59,130,246,.14) !important;
}

/* light-only: unify account/data-pool pills */
body.theme-light #panelAccount .funds-transfer-entry,
body.theme-light #panelPool .pool-best-label{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-height:28px !important;
  height:28px !important;
  padding:0 12px !important;
  border-radius:999px !important;
  font-size:12px !important;
  font-weight:700 !important;
  line-height:1 !important;
  border:1px solid var(--lt-border-strong) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.7), 0 1px 2px rgba(15,23,42,.06) !important;
}
body.theme-light #panelAccount .funds-transfer-entry{
  background:linear-gradient(180deg,#fff6d8,#ffe9a8) !important;
  border-color:#e6c777 !important;
  color:#5f4300 !important;
}
body.theme-light #panelPool .pool-best-label{
  background:linear-gradient(180deg,#eff7ff,#e3f0ff) !important;
  border-color:#b8d3f3 !important;
  color:#1e3a5f !important;
  opacity:1 !important;
}

/* dark/default: unify account/data-pool pills (light keeps body.theme-light overrides) */
#panelAccount .funds-transfer-entry,
#panelPool .pool-best-label{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  align-self:center !important;
  flex:0 0 auto !important;
  min-height:28px !important;
  height:28px !important;
  line-height:28px !important;
  padding-left:14px !important;
  padding-right:14px !important;
  border-radius:999px !important;
  border-width:1px !important;
  border-style:solid !important;
  border-color:rgba(96,165,250,.42) !important;
  background:linear-gradient(180deg,#2f6bff,#2458d9) !important;
  color:#f8fbff !important;
  font-size:12px !important;
  font-weight:700 !important;
  letter-spacing:.2px !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08), 0 1px 3px rgba(2,6,23,.36) !important;
  vertical-align:middle !important;
  white-space:nowrap !important;
  text-align:center !important;
  opacity:1 !important;
  margin:0 !important;
}

/* ===== mobile v1 summary layer (scoped only) ===== */
#mobileHome,
#mobileBottomNav{
  display:none;
}

body.is-mobile-v1 #cockpitApp{
  padding-bottom:72px;
}

body.is-mobile-v1 #mobileHome{
  display:flex;
  flex-direction:column;
  gap:10px;
}

body.is-mobile-v1 #mobileBottomNav{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  z-index:1400;
  display:flex;
  gap:8px;
  padding:10px 12px calc(10px + env(safe-area-inset-bottom));
  background:rgba(8,16,34,.95);
  border-top:1px solid rgba(148,163,184,.22);
  backdrop-filter:blur(8px);
}

body.is-mobile-v1 .mobile-bottom-btn{
  flex:1 1 0;
  height:38px;
  border-radius:10px;
  border:1px solid rgba(148,163,184,.30);
  background:rgba(30,41,59,.60);
  color:#dbe7f8;
  font-size:13px;
  font-weight:600;
}

body.is-mobile-v1 .mobile-bottom-btn.active{
  border-color:rgba(96,165,250,.55);
  background:rgba(37,99,235,.30);
  color:#f8fbff;
}

body.is-mobile-v1 #panelAccount .panel-body .kv.mobile-acct-hide{
  display:none !important;
}

body.is-mobile-v1 #panelInfo .info-pane.is-cardified .info-grid.head{
  display:none !important;
}

body.is-mobile-v1 #panelInfo .info-pane.is-cardified .info-grid.row{
  display:block !important;
  padding:10px 12px !important;
  margin-bottom:8px;
  border:1px solid rgba(148,163,184,.24);
  border-radius:10px;
  background:linear-gradient(180deg, rgba(14,23,42,.92), rgba(11,18,34,.92));
}

body.is-mobile-v1 #panelInfo .info-pane.is-cardified .info-grid.row span{
  display:flex !important;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:2px 0;
  white-space:normal;
}

body.is-mobile-v1 #panelInfo .info-pane.is-cardified .info-grid.row span::before{
  content:attr(data-label);
  flex:0 0 auto;
  color:#97a8be;
  font-size:12px;
}

body.is-mobile-v1[data-mobile-tab="home"] #panelPool,
body.is-mobile-v1[data-mobile-tab="home"] #panelSignal{
  display:none !important;
}

body.is-mobile-v1[data-mobile-tab="home"] #panelAccount .acct-chart-wrap{
  display:block !important;
}

body.is-mobile-v1[data-mobile-tab="signal"] #mobileHome,
body.is-mobile-v1[data-mobile-tab="signal"] #panelSystem,
body.is-mobile-v1[data-mobile-tab="signal"] #panelPool,
body.is-mobile-v1[data-mobile-tab="signal"] #panelEvents,
body.is-mobile-v1[data-mobile-tab="signal"] #panelInfo,
body.is-mobile-v1[data-mobile-tab="signal"] #panelAccount{
  display:none !important;
}

body.is-mobile-v1[data-mobile-tab="signal"] #panelSignal{
  display:block !important;
}

body.is-mobile-v1[data-mobile-tab="pool"] #mobileHome,
body.is-mobile-v1[data-mobile-tab="pool"] #panelSystem,
body.is-mobile-v1[data-mobile-tab="pool"] #panelSignal,
body.is-mobile-v1[data-mobile-tab="pool"] #panelEvents,
body.is-mobile-v1[data-mobile-tab="pool"] #panelInfo,
body.is-mobile-v1[data-mobile-tab="pool"] #panelAccount{
  display:none !important;
}

body.is-mobile-v1[data-mobile-tab="pool"] #panelPool{
  display:block !important;
}

body.is-mobile-v1[data-mobile-tab="signal"] #panelSignal .sig-chart-box,
body.is-mobile-v1[data-mobile-tab="pool"] #panelPool .pool-chart-wrap{
  display:block !important;
}

body.is-mobile-v1[data-mobile-tab="home"] #panelSignal .sig-chart-box,
body.is-mobile-v1[data-mobile-tab="home"] #panelPool .pool-chart-wrap{
  display:none !important;
}

body.theme-light.is-mobile-v1 #mobileBottomNav{
  background:rgba(255,255,255,.96);
  border-top:1px solid rgba(15,23,42,.14);
}

body.theme-light.is-mobile-v1 .mobile-bottom-btn{
  border:1px solid rgba(148,163,184,.50);
  background:#ffffff;
  color:#334155;
}

body.theme-light.is-mobile-v1 .mobile-bottom-btn.active{
  border-color:#93c5fd;
  background:#dbeafe;
  color:#1e3a8a;
}

body.theme-light.is-mobile-v1 #panelInfo .info-pane.is-cardified .info-grid.row{
  background:#ffffff;
  border:1px solid #d6e0ee;
}

/* ===== mobile v1 hard-fix: width clamp + full-page visibility ===== */
html.is-mobile-v1,
body.is-mobile-v1{
  width:100% !important;
  max-width:100% !important;
  box-sizing:border-box !important;
  overflow-x:hidden !important;
}

body.is-mobile-v1 *,
body.is-mobile-v1 *::before,
body.is-mobile-v1 *::after{
  box-sizing:border-box !important;
}

body.is-mobile-v1 #cockpitApp,
body.is-mobile-v1 .cockpit-main,
body.is-mobile-v1 .cockpit-row,
body.is-mobile-v1 .cockpit-row-3,
body.is-mobile-v1 .cockpit-row-4,
body.is-mobile-v1 #panelSystem,
body.is-mobile-v1 #mobileHome,
body.is-mobile-v1 #panelAccount,
body.is-mobile-v1 #panelEvents,
body.is-mobile-v1 #panelInfo,
body.is-mobile-v1 #panelSignal,
body.is-mobile-v1 #panelPool,
body.is-mobile-v1 #mobileBottomNav,
body.is-mobile-v1 #panelInfo .info-pane.is-cardified,
body.is-mobile-v1 #panelInfo .info-pane.is-cardified .info-grid.row{
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  overflow-x:hidden !important;
}

body.is-mobile-v1 #mobileHome > *,
body.is-mobile-v1 .cockpit-main > *,
body.is-mobile-v1 .cockpit-row > *,
body.is-mobile-v1 .panel-body > *{
  min-width:0 !important;
}

body.is-mobile-v1 .cockpit-main{
  display:block !important;
  padding:12px !important;
  padding-bottom:calc(84px + env(safe-area-inset-bottom)) !important;
  overflow:visible !important;
}

body.is-mobile-v1 #cockpitApp{
  min-height:100vh !important;
  padding-bottom:calc(84px + env(safe-area-inset-bottom)) !important;
  overflow-x:hidden !important;
}

body.is-mobile-v1 .cockpit-row,
body.is-mobile-v1 .cockpit-row-3,
body.is-mobile-v1 .cockpit-row-4{
  display:block !important;
  grid-template-columns:1fr !important;
  gap:0 !important;
}

body.is-mobile-v1 #panelAccount,
body.is-mobile-v1 #panelEvents,
body.is-mobile-v1 #panelInfo,
body.is-mobile-v1 #panelSignal,
body.is-mobile-v1 #panelPool{
  margin:0 0 10px 0 !important;
}

body.is-mobile-v1 #panelEvents,
body.is-mobile-v1 #panelInfo,
body.is-mobile-v1 #panelEvents .panel-body,
body.is-mobile-v1 #panelInfo .panel-body,
body.is-mobile-v1 #panelSystem,
body.is-mobile-v1 #panelSystem .panel-body,
body.is-mobile-v1 #panelPool,
body.is-mobile-v1 #panelPool .panel-body,
body.is-mobile-v1 #panelSignal,
body.is-mobile-v1 #panelSignal .panel-body{
  height:auto !important;
  min-height:0 !important;
  max-height:none !important;
  overflow:visible !important;
}

body.is-mobile-v1 #panelPool .pool-chart-wrap,
body.is-mobile-v1 #panelSignal .sig-chart-box{
  width:100% !important;
  max-width:100% !important;
}

body.is-mobile-v1 #mobileBottomNav{
  width:100% !important;
  max-width:100% !important;
}

body.is-mobile-v1 #panelSystem .system-strip{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:8px !important;
}

body.is-mobile-v1 #panelSystem .system-strip > *{
  min-width:0 !important;
  width:100% !important;
  max-width:100% !important;
}

body.is-mobile-v1 #panelInfo .info-filters{
  width:100% !important;
  max-width:100% !important;
  margin-left:0 !important;
  gap:8px !important;
  flex-wrap:wrap !important;
}

body.is-mobile-v1 #panelInfo .cockpit-select,
body.is-mobile-v1 #panelInfo #infoTimeFilter,
body.is-mobile-v1 #panelInfo #infoSymbolFilter{
  min-width:0 !important;
  width:100% !important;
  max-width:100% !important;
}

body.is-mobile-v1 #panelSignal .sig-toolbar{
  flex-wrap:wrap !important;
}

body.is-mobile-v1 #panelSignal .sig-toolbar > *{
  min-width:0 !important;
}

body.is-mobile-v1[data-mobile-tab="home"] #panelSignal,
body.is-mobile-v1[data-mobile-tab="home"] #panelPool{
  display:none !important;
}

body.is-mobile-v1[data-mobile-tab="home"] #mobileHome{
  display:flex !important;
}

body.is-mobile-v1[data-mobile-tab="signal"] #mobileHome,
body.is-mobile-v1[data-mobile-tab="signal"] #panelPool,
body.is-mobile-v1[data-mobile-tab="signal"] #panelSystem,
body.is-mobile-v1[data-mobile-tab="signal"] #panelAccount,
body.is-mobile-v1[data-mobile-tab="signal"] #panelEvents,
body.is-mobile-v1[data-mobile-tab="signal"] #panelInfo{
  display:none !important;
}

body.is-mobile-v1[data-mobile-tab="signal"] #panelSignal{
  display:block !important;
}

body.is-mobile-v1[data-mobile-tab="pool"] #mobileHome,
body.is-mobile-v1[data-mobile-tab="pool"] #panelSignal,
body.is-mobile-v1[data-mobile-tab="pool"] #panelSystem,
body.is-mobile-v1[data-mobile-tab="pool"] #panelAccount,
body.is-mobile-v1[data-mobile-tab="pool"] #panelEvents,
body.is-mobile-v1[data-mobile-tab="pool"] #panelInfo{
  display:none !important;
}

body.is-mobile-v1[data-mobile-tab="pool"] #panelPool{
  display:block !important;
}
