
:root{
  --brd-bg0:#040913;
  --brd-bg1:#071323;
  --brd-panel:#0b1729;
  --brd-panel2:#10223d;
  --brd-line:#234066;
  --brd-text:#eaf6ff;
  --brd-muted:#9db5d2;
  --brd-cyan:#4addff;
  --brd-green:#66ff95;
  --brd-orange:#ffb84d;
  --brd-red:#ff6378;
  --brd-purple:#a98cff;
}
html,body{
  margin:0 !important;
  width:100% !important;
  min-height:100% !important;
  background:radial-gradient(circle at 20% 0, rgba(74,221,255,.16), transparent 30%),
             radial-gradient(circle at 90% 0, rgba(169,140,255,.12), transparent 30%),
             linear-gradient(180deg,#06101d,#040913) !important;
  color:var(--brd-text) !important;
  font-family:Arial,Helvetica,sans-serif !important;
  overflow-x:hidden !important;
}
body.brd-command-center-active > *:not(#brd-live-command-center):not(script):not(style){
  position:absolute !important;
  left:-99999px !important;
  top:auto !important;
  width:1px !important;
  height:1px !important;
  overflow:hidden !important;
  opacity:0 !important;
  pointer-events:none !important;
}
#brd-live-command-center{
  min-height:100vh;
  box-sizing:border-box;
  padding:14px;
  background:
    linear-gradient(180deg,rgba(74,221,255,.06),transparent 18%),
    radial-gradient(circle at 50% 110%, rgba(102,255,149,.09), transparent 32%);
}
#brd-live-command-center *{ box-sizing:border-box; }
.brd-shell{
  max-width:1500px;
  margin:0 auto;
  border:1px solid rgba(74,221,255,.18);
  border-radius:24px;
  background:linear-gradient(180deg,rgba(9,18,33,.94),rgba(5,11,21,.96));
  box-shadow:0 18px 44px rgba(0,0,0,.40), inset 0 1px 0 rgba(255,255,255,.04);
  overflow:hidden;
}
.brd-topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  padding:14px 18px;
  border-bottom:1px solid rgba(74,221,255,.16);
  background:linear-gradient(180deg,rgba(17,35,61,.96),rgba(9,20,37,.92));
}
.brd-brand{display:flex;align-items:center;gap:12px;min-width:0}
.brd-brand img{width:62px;height:62px;object-fit:contain;filter:drop-shadow(0 8px 18px rgba(0,0,0,.45));flex:0 0 auto}
.brd-brand h1{margin:0;font-size:25px;line-height:1.05;letter-spacing:.02em}
.brd-brand p{margin:4px 0 0;color:var(--brd-muted);font-size:13px}
.brd-pills{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.brd-pill{
  display:inline-flex;align-items:center;gap:7px;
  padding:8px 12px;border-radius:999px;
  background:rgba(7,17,31,.9);
  border:1px solid rgba(74,221,255,.18);
  color:#dff8ff;font-size:12.5px;font-weight:800;
  white-space:nowrap;
}
.brd-dot{width:9px;height:9px;border-radius:50%;background:var(--brd-green);box-shadow:0 0 14px rgba(102,255,149,.9)}
.brd-main{
  display:grid;
  grid-template-columns:minmax(280px,330px) minmax(0,1fr);
  gap:14px;
  padding:14px;
}
.brd-column{display:flex;flex-direction:column;gap:14px;min-width:0}
.brd-card{
  position:relative;
  border:1px solid rgba(74,221,255,.14);
  border-radius:20px;
  padding:14px;
  background:linear-gradient(180deg,rgba(13,27,48,.96),rgba(8,17,31,.96));
  box-shadow:0 10px 22px rgba(0,0,0,.20), inset 0 1px 0 rgba(255,255,255,.035);
  overflow:hidden;
  min-width:0;
}
.brd-card:before{
  content:"";
  position:absolute;inset:0;
  background:linear-gradient(120deg,rgba(74,221,255,.035),transparent 40%,rgba(169,140,255,.03));
  pointer-events:none;
}
.brd-card > *{position:relative}
.brd-card h2{
  margin:0 0 10px;
  font-size:13px;
  letter-spacing:.11em;
  text-transform:uppercase;
  color:#cbf7ff;
}
.brd-hero-value{font-size:26px;font-weight:900;line-height:1.08;margin-bottom:4px;word-break:break-word}
.brd-sub{color:var(--brd-muted);font-size:13px;margin:0}
.brd-mini-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}
.brd-mini,.brd-detail,.brd-kpi{
  border-radius:14px;
  padding:10px 11px;
  background:rgba(5,13,25,.72);
  border:1px solid rgba(74,221,255,.10);
  min-width:0;
}
.brd-mini label,.brd-detail label,.brd-kpi label{
  display:block;
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:.09em;
  color:#8dabca;
  margin-bottom:5px;
}
.brd-mini strong,.brd-detail strong{
  font-size:14px;
  overflow-wrap:anywhere;
}
.brd-gauges{
  display:grid;
  grid-template-columns:repeat(3,minmax(150px,1fr));
  gap:10px;
}
.brd-gauge-card{
  text-align:center;
  border-radius:18px;
  padding:12px 9px 10px;
  background:linear-gradient(180deg,rgba(16,33,58,.98),rgba(7,16,29,.98));
  border:1px solid rgba(74,221,255,.15);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035);
  min-width:0;
}
.brd-gauge-title{
  margin:0 0 8px;
  font-size:11.5px;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#d8fbff;
  font-weight:900;
}
.brd-gauge{
  position:relative;
  width:clamp(108px, 12vw, 148px);
  height:clamp(108px, 12vw, 148px);
  margin:0 auto 8px;
}
.brd-gauge svg{width:100%;height:100%;transform:rotate(-90deg)}
.brd-track{fill:none;stroke:rgba(255,255,255,.075);stroke-width:12}
.brd-progress{fill:none;stroke-width:12;stroke-linecap:round;transition:stroke-dashoffset .5s ease;filter:drop-shadow(0 0 10px currentColor)}
.brd-center{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column}
.brd-number{font-size:clamp(19px, 2.4vw, 28px);font-weight:900;line-height:1;color:#fff}
.brd-unit{font-size:11px;color:#b6cce8;margin-top:3px}
.brd-status{font-size:11.5px;color:var(--brd-muted);min-height:28px;line-height:1.3}
.brd-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(105px,1fr));gap:8px}
.brd-kpi strong{font-size:20px;overflow-wrap:anywhere}
.brd-kpi small{display:block;margin-top:5px;color:var(--brd-muted);font-size:11px}
.brd-detail-grid{display:grid;grid-template-columns:repeat(3,minmax(105px,1fr));gap:8px}
.brd-trend-wrap{
  width:100%;
  border-radius:16px;
  overflow:hidden;
  background:rgba(3,10,20,.62);
  border:1px solid rgba(74,221,255,.12);
}
#brd-live-trend{
  display:block;
  width:100%;
  height:210px;
}
.brd-legend{
  display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-top:8px;color:var(--brd-muted);font-size:12px;
}
.brd-legend span{display:inline-flex;align-items:center;gap:6px}
.brd-swatch{width:10px;height:10px;border-radius:50%;display:inline-block}
.brd-banner{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}
.brd-banner p{margin:0 0 5px;color:var(--brd-muted);line-height:1.45;font-size:13px}
.brd-banner strong{color:#fff}
.brd-button{
  display:inline-flex;align-items:center;justify-content:center;
  padding:10px 15px;border-radius:999px;
  background:linear-gradient(135deg,var(--brd-cyan),#8df1ff);
  color:#04101d;text-decoration:none;font-weight:900;
  box-shadow:0 12px 22px rgba(74,221,255,.20);
}
.brd-note{color:#94adc9;line-height:1.45;font-size:12.5px}
.brd-ok{color:var(--brd-green)}
.brd-warn{color:var(--brd-orange)}
.brd-danger{color:var(--brd-red)}
.brd-missing{color:#ffd19a}
.brd-footer{padding:0 14px 14px}
.brd-footer-line{
  padding:12px 16px;
  border-radius:16px;
  background:rgba(5,13,25,.7);
  border:1px solid rgba(74,221,255,.11);
  color:#9eb6d2;
  font-size:12px;
}
@media(max-width:1180px){
  .brd-main{grid-template-columns:1fr}
  .brd-gauges{grid-template-columns:repeat(3,minmax(145px,1fr))}
}
@media(max-width:760px){

  /* Mobile order: show gauges first, then test identity and details */
  .brd-main{
    display:flex;
    flex-direction:column;
  }
  .brd-column{
    display:contents;
  }
  .brd-core-card{ order:1; }
  .brd-active-card{ order:3; }
  .brd-details-card{ order:4; }
  .brd-trend-card{ order:2; }
  .brd-kpi-card{ order:5; }
  .brd-diagnostics-card{ order:6; }
  .brd-credit-card{ order:7; }
  #brd-live-command-center{padding:6px}
  .brd-shell{border-radius:14px}
  .brd-topbar{
    padding:9px;
    flex-direction:column;
    align-items:flex-start;
    gap:8px;
  }
  .brd-brand{align-items:center;gap:8px}
  .brd-brand h1{font-size:17px}
  .brd-brand p{font-size:11px;line-height:1.25}
  .brd-brand img{width:42px;height:42px}
  .brd-pills{justify-content:flex-start;width:100%;gap:6px}
  .brd-pill{font-size:10.5px;padding:6px 8px}
  .brd-main{padding:7px;gap:7px}
  .brd-column{gap:7px}
  .brd-card{padding:8px;border-radius:14px}
  .brd-card h2{font-size:10.5px;margin-bottom:7px;letter-spacing:.08em}
  .brd-hero-value{font-size:18px}
  .brd-sub{font-size:11px}
  .brd-mini-grid{grid-template-columns:1fr 1fr;gap:6px;margin-top:8px}
  .brd-gauges{grid-template-columns:1fr 1fr 1fr;gap:6px}
  .brd-gauge-card{padding:7px 4px 6px;border-radius:13px}
  .brd-gauge{width:82px;height:82px;margin-bottom:4px}
  .brd-track,.brd-progress{stroke-width:10px}
  .brd-gauge-title{font-size:9px;margin-bottom:4px;letter-spacing:.05em}
  .brd-number{font-size:17px}
  .brd-unit{font-size:9px}
  .brd-status{font-size:9px;min-height:23px;line-height:1.15}
  .brd-kpi-grid{grid-template-columns:1fr 1fr;gap:6px}
  .brd-detail-grid{grid-template-columns:1fr 1fr;gap:6px}
  .brd-mini,.brd-detail,.brd-kpi{padding:7px 7px;border-radius:11px}
  .brd-mini label,.brd-detail label,.brd-kpi label{font-size:8.5px;margin-bottom:4px}
  .brd-mini strong,.brd-detail strong{font-size:11.5px}
  .brd-kpi strong{font-size:14.5px}
  .brd-kpi small{font-size:9.5px}
  #brd-live-trend{height:150px}
  .brd-legend{font-size:10px;gap:7px;margin-top:6px}
  .brd-banner p{font-size:11px}
  .brd-button{padding:8px 11px;font-size:11px}
  .brd-footer{padding:0 7px 7px}
  .brd-footer-line{padding:9px 10px;font-size:10.5px}
}
@media(max-width:390px){
  .brd-gauges{grid-template-columns:1fr 1fr}
  .brd-gauge{width:88px;height:88px}
  .brd-mini-grid,.brd-kpi-grid,.brd-detail-grid{grid-template-columns:1fr 1fr}
}


/* v1.4.4 stability and long-path cleanup */
#brd-latest-file{
  display:block;
  max-height:4.8em;
  overflow:hidden;
  word-break:break-all;
  overflow-wrap:anywhere;
  line-height:1.2;
}
.brd-detail strong{
  overflow-wrap:anywhere;
}


/* v1.4.5 Charge Wait and Last Test Results */
.brd-results-card .brd-kpi-grid{
  grid-template-columns:repeat(5,minmax(120px,1fr));
}
.brd-result-note{
  color:var(--brd-muted);
  font-size:12px;
  line-height:1.35;
  margin-top:10px;
}
#brd-run-result{
  overflow-wrap:anywhere;
}
#brd-latest-file{
  display:none !important;
}
.brd-private-hidden{
  display:none !important;
}
@media(max-width:1180px){
  .brd-results-card .brd-kpi-grid{ grid-template-columns:repeat(3,minmax(120px,1fr)); }
}
@media(max-width:760px){
  .brd-results-card .brd-kpi-grid{ grid-template-columns:1fr 1fr; }
  .brd-results-card{ order:5; }
  .brd-kpi-card{ order:6; }
  .brd-diagnostics-card{ order:7; }
  .brd-credit-card{ order:8; }
}


/* v1.4.7 Home link in live command center */
.brd-home-link{
  text-decoration:none;
  color:#04101d !important;
  background:linear-gradient(135deg,var(--brd-cyan),#8df1ff) !important;
  box-shadow:0 10px 20px rgba(74,221,255,.18);
}
.brd-home-link:hover,
.brd-home-link:focus{
  filter:brightness(1.08);
  transform:translateY(-1px);
}
