/* (same CSS you already liked) — trimmed only where safe */
    :root{
      --bg:#070a12;
      --txt: rgba(255,255,255,.92);
      --muted: rgba(255,255,255,.62);
      --neon-cyan:#4dfcff;
      --neon-green:#66ffb5;
      --neon-amber:#ffd27a;
      --neon-red:#ff5d7a;
      --r16:16px; --r22:22px;
      --glow-green:0 0 10px rgba(102,255,181,.32), 0 0 26px rgba(102,255,181,.18);
      --glow-red:0 0 10px rgba(255,93,122,.32), 0 0 28px rgba(255,93,122,.18);
      --glow-amber:0 0 10px rgba(255,210,122,.28), 0 0 24px rgba(255,210,122,.16);
    }
    *{ box-sizing:border-box; }
    html,body{ height:100%; margin:0; }
    body{
      color:var(--txt);
      font-family: ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Arial;
      background:
        radial-gradient(1200px 700px at 20% -20%, rgba(77,252,255,.11), transparent 55%),
        radial-gradient(900px 600px at 90% 10%, rgba(122,167,255,.12), transparent 55%),
        radial-gradient(800px 520px at 70% 120%, rgba(102,255,181,.08), transparent 58%),
        var(--bg);
    }
    .muted{ color:var(--muted); }
    .small{ font-size:12px; }
    .mono{ font-variant-numeric: tabular-nums; }
    .right{ text-align:right; }

    .app{ display:grid; grid-template-columns:72px 1fr; min-height:100vh; }
    .rail{
      position:sticky; top:0; height:100vh;
      border-right: 1px solid rgba(255,255,255,.08);
      background: rgba(0,0,0,.18);
      backdrop-filter: blur(10px);
      display:flex; flex-direction:column; align-items:center;
      padding:12px 8px; gap:12px;
    }
    .rail .rbtn{
      width:44px; height:44px; border-radius:14px;
      border:1px solid rgba(255,255,255,.10);
      background: rgba(255,255,255,.04);
      color: rgba(255,255,255,.85);
      display:grid; place-items:center;
      cursor:pointer;
    }
    .rail .spacer{ flex:1; }

    .content{ display:flex; flex-direction:column; min-width:0; }
    .topbar{
      position:sticky; top:0; z-index:10;
      display:flex; align-items:center; justify-content:space-between; gap:14px;
      padding:14px 18px;
      background: linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,.20));
      border-bottom: 1px solid rgba(255,255,255,.10);
      backdrop-filter: blur(10px);
    }
    .brand{ display:flex; align-items:center; gap:12px; min-width:280px; }
    .logo{
      width:44px; height:44px; border-radius:16px;
      border: 1px solid rgba(77,252,255,.20);
      background: radial-gradient(circle at 30% 30%, rgba(77,252,255,.22), transparent 55%), rgba(255,255,255,.04);
      display:grid; place-items:center;
      font-weight:900;
    }
    .brand h1{ margin:0; font-size:18px; }
    .toolbar{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; justify-content:flex-end; }
    .search{
      width:min(420px, 52vw);
      padding:10px 12px;
      border-radius: 999px;
      border:1px solid rgba(255,255,255,.12);
      background: rgba(255,255,255,.05);
      color: var(--txt);
      outline:none;
    }
    .tbtn{
      display:inline-flex; align-items:center; gap:8px;
      padding:10px 12px;
      border-radius:999px;
      border: 1px solid rgba(255,255,255,.12);
      background: rgba(255,255,255,.05);
      color: rgba(255,255,255,.88);
      cursor:pointer;
      user-select:none;
    }
    .tbtn.on{
      border-color: rgba(77,252,255,.24);
      background: rgba(77,252,255,.08);
      box-shadow: 0 0 20px rgba(77,252,255,.12);
    }
/* forms factors */
.input, .select{
      height:42px; border-radius:14px; border:1px solid rgba(255,255,255,.10);
      background:#070a12; padding:0 12px; color: rgba(255,255,255,.90); outline:none;
      width:100%;
      
    }
  /*---------------------*/
    .chips{ display:flex; flex-wrap:wrap; gap:10px; padding: 10px 18px 0; }
    .chip{
      border-radius: 999px;
      border: 1px solid rgba(255,255,255,.10);
      background: rgba(255,255,255,.04);
      color: rgba(255,255,255,.86);
      padding: 9px 12px;
      cursor:pointer;
      display:flex; gap:8px; align-items:center;
    }
    .chip.on{
      border-color: rgba(77,252,255,.24);
      background: rgba(77,252,255,.08);
      box-shadow: 0 0 22px rgba(77,252,255,.10);
    }
    .chip .count{
      padding:2px 8px;
      border-radius:999px;
      border:1px solid rgba(255,255,255,.10);
      background: rgba(0,0,0,.18);
      font-weight:800;
      font-size:12px;
    }

    #banner{
      display:none;
      margin: 12px 18px 0;
      padding: 10px 12px;
      border-radius: 14px;
      border:1px solid rgba(255,93,122,.24);
      background: rgba(255,93,122,.10);
      color: rgba(255,255,255,.92);
      box-shadow: var(--glow-red);
    }
    #banner.show{ display:block; }

    .main{ padding: 14px 18px 26px; }
    .grid{ display:grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap:14px; }
    @media (max-width: 1220px){ .grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); } }
    @media (max-width: 820px){
      .app{ grid-template-columns: 1fr; }
      .rail{ display:none; }
      .grid{ grid-template-columns: 1fr; }
      .brand{ min-width:unset; }
      .search{ width: 100%; }
    }

    .card{
      text-align:left; width:100%;
      border-radius: var(--r22);
      border: 1px solid rgba(255,255,255,.10);
      background: radial-gradient(120% 140% at 30% 0%, rgba(77,252,255,.10), transparent 48%), rgba(255,255,255,.03);
      box-shadow: 0 18px 46px rgba(0,0,0,.42);
      padding:14px 14px 12px;
      cursor:pointer;
      position:relative; overflow:hidden;
    }
    .sev{ position:absolute; inset:0 auto auto 0; width:100%; height:4px; }
    .sev.warn{ background: linear-gradient(90deg, rgba(255,210,122,.85), rgba(255,210,122,.10)); }
    .sev.crit{ background: linear-gradient(90deg, rgba(255,93,122,.90), rgba(255,93,122,.10)); }
    .sev.none{ background: linear-gradient(90deg, rgba(255,255,255,.10), rgba(255,255,255,0)); }

    .card-head{ display:flex; justify-content:space-between; align-items:flex-start; gap:12px; padding-top:4px; }
    .card-title{ display:flex; gap:10px; align-items:flex-start; min-width:0; }
    .title{ font-weight: 900; font-size:16px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width: 420px; color: rgba(69, 246, 249, 0.22) }
    .title.run-glow{
  color: rgba(230,255,246,.98);
  text-shadow:
    0 0 10px rgba(53,240,165,.45),
    0 0 18px rgba(53,240,165,.28),
    0 0 28px rgba(53,240,165,.16);
}

    .dot{ width:10px; height:10px; border-radius:999px; margin-top:6px; flex:0 0 auto; }
    .dot.running{ background: var(--neon-green); box-shadow: var(--glow-green); }
    .dot.stopped{ background: rgba(200,200,200,.75); }
    .dot.fault{ background: var(--neon-red); box-shadow: var(--glow-red); }
    .dot.maint{ background: var(--neon-amber); box-shadow: var(--glow-amber); }

    .badge{
      font-size:12px; padding:6px 10px; border-radius:999px;
      border:1px solid rgba(255,255,255,.10);
      background: rgba(0,0,0,.16);
      font-weight:800; line-height:1;
    }
    .badge.running{ border-color: rgba(102,255,181,.28); background: rgba(102,255,181,.10); box-shadow: var(--glow-green); }
    .badge.stopped{ border-color: rgba(255,255,255,.14); background: rgba(255,255,255,.06); }
    .badge.fault{ border-color: rgba(255,93,122,.30); background: rgba(255,93,122,.12); box-shadow: var(--glow-red); }
    .badge.maint{ border-color: rgba(255,210,122,.30); background: rgba(255,210,122,.12); box-shadow: var(--glow-amber); }
    .badge.stale{ border-color: rgba(255,210,122,.30); background: rgba(255,210,122,.12); box-shadow: var(--glow-amber); }

    .card-body{ margin-top:12px; }
    .kpi{ display:flex; justify-content:space-between; align-items:baseline; margin-bottom: 10px; }
    .kpi-label{ font-size:12px; color:var(--muted); }
    .kpi-val{ font-weight: 950; font-size: 20px; color:var(--muted);}

    .row{ display:grid; grid-template-columns: 1fr 1fr; gap:12px; }
    .box{
      border-radius: var(--r16);
      border:1px solid rgba(255,255,255,.10);
      background: rgba(255,255,255,.03);
      padding:12px;
      min-height: 104px;
    }
    .box.warn{ border-color: rgba(255,210,122,.26); background: rgba(255,210,122,.08); }
    .pill{ font-size:11px; font-weight:900; padding:4px 8px; border-radius: 999px; border:1px solid rgba(255,255,255,.10); background: rgba(0,0,0,.14); }
    .pill.warn{ border-color: rgba(255,210,122,.30); background: rgba(255,210,122,.12); box-shadow: var(--glow-amber); }

    .gauge{ display:flex; gap:10px; align-items:center; }
    .gauge-inner{
      width:44px; height:70px;
      border-radius: 12px;
      border:1px solid rgba(255,255,255,.10);
      background: rgba(0,0,0,.16);
      overflow:hidden; position:relative;
    }
    .gauge-fill{
      position:absolute; left:0; right:0; bottom:0;
      background: linear-gradient(180deg, rgba(102,255,181,.55), rgba(102,255,181,.15));
      height:0%; transition: height .35s ease;
    }
    .gauge-pct{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  color:var(--muted);
  font-weight:900;
  font-size:12px; /* adjust */
  text-shadow:0 0 10px rgba(0,0,0,.55);
  z-index:2;
  pointer-events:none;
}


    .gauge-label{ font-weight: 900; font-size: 14px; color:var(--muted); }

    .temp-track{
      height:10px; border-radius:999px;
      background: rgba(255,255,255,.06);
      border:1px solid rgba(255,255,255,.08);
      overflow:hidden; margin-bottom: 8px;
    }
    .temp-fill{ height:100%; background: linear-gradient(90deg, rgba(122,167,255,.65), rgba(122,167,255,.18)); width:50%; }
    .temp-fill.na{ background: linear-gradient(90deg, rgba(255,255,255,.22), rgba(255,255,255,.08)); }

    .alarms{ display:flex; gap:10px; flex-wrap:wrap; margin-top:12px; }
    .alarm-chip{
      font-size:12px; padding:8px 12px; border-radius:999px; font-weight:800;
      color: rgba(255,255,255,.92);
      background: linear-gradient(180deg, rgba(255,90,140,.22), rgba(255,90,140,.10));
      border: 1px solid rgba(255,90,140,.42);
      box-shadow: 0 0 18px rgba(255,90,140,.20);
    }

    .utilsline{ display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }
    .utag{
      font-size:11px; padding:6px 10px; border-radius:999px;
      border:1px solid rgba(255,255,255,.10);
      background: rgba(255,255,255,.04);
      color: rgba(255,255,255,.82);
    }

    /* Modal - opaque and readable */
    .modal-open{ overflow:hidden; }
    body.modal-open .topbar, body.modal-open .main{ pointer-events:none; user-select:none; opacity:.55; }

    .backdrop{
      position:fixed; inset:0; display:none; place-items:center;
      padding:18px; background: rgba(0,0,0,.86); backdrop-filter: blur(8px);
      z-index:9999;
    }
    .backdrop.open{ display:grid; }

    .modal{
      width:min(1120px, 96vw); max-height:92vh; overflow:auto;
      border-radius: 22px;
      border: 1px solid rgba(77,252,255,.18);
      background: rgba(10,14,22,.985);
      box-shadow: 0 18px 55px rgba(0,0,0,.68), 0 0 36px rgba(77,252,255,.10);
      padding: 14px;
    }
    .modal-head{ display:flex; justify-content:space-between; gap:12px; padding: 6px 4px 12px; border-bottom:1px solid rgba(255,255,255,.12); }
    .modal-title{ display:flex; gap:10px; align-items:flex-start; min-width:0; }
    .modal-actions{ display:flex; gap:12px; flex-wrap:wrap; justify-content:flex-end; align-items:center; }
    .btn{
      border:1px solid rgba(77,252,255,.22); background: rgba(77,252,255,.07); text-decoration: none;
      color: rgba(255,255,255,.90); border-radius: 12px; padding: 9px 11px; cursor:pointer; display:inline-grid; place-items:center;
    }
    .btn:hover{ background: rgba(88,140,255,.28); }
    .mini{ height:34px; padding:0 10px; border-radius:12px; font-size:12px; }
    .rangebar{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
    .rangebtn{
      padding: 8px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.12);
      background: rgba(255,255,255,.05); color: rgba(255,255,255,.88); font-weight: 850; cursor:pointer;
    }
    .rangebtn.on{ border-color: rgba(77,252,255,.24); background: rgba(77,252,255,.08); box-shadow: 0 0 18px rgba(77,252,255,.10); }
    .range-link{
      font-size:12px; color: rgba(255,255,255,.72); text-decoration:none;
      padding:6px 10px; border-radius:999px; border:1px solid rgba(255,255,255,.10); background: rgba(0,0,0,.16);
    }

    .modal-kpis{ display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap:10px; margin: 12px 4px 10px; }
    @media (max-width: 980px){ .modal-kpis{ grid-template-columns: repeat(2, minmax(0,1fr)); } }
    .kpiBox{ border-radius: 16px; border:1px solid rgba(255,255,255,.10); background: rgba(255,255,255,.03); padding: 10px 12px; }
    .kpiBox .big{ margin-top:4px; font-weight:950; font-size: 18px; }
    .panel{ border-radius:16px; border:1px solid rgba(255,255,255,.10); background: rgba(255,255,255,.03); padding:12px; }
    .panel-head{ display:flex; align-items:baseline; justify-content:space-between; gap:10px; flex-wrap:wrap; margin-bottom:8px; }
    .panel-title{ font-weight:900; }
    .utils{ display:flex; flex-wrap:wrap; gap:8px; }
    .uitem{ font-size:12px; padding:7px 10px; border-radius:999px; border:1px solid rgba(255,255,255,.10); background: rgba(255,255,255,.04); }

    .alert-panels{ display:grid; grid-template-columns:1fr 1fr; gap:12px; margin: 10px 4px 14px; }
    @media (max-width: 980px){ .alert-panels{ grid-template-columns:1fr; } }
    .alert-panel{ border-radius:16px; padding:12px; border:1px solid rgba(255,255,255,.10); background: rgba(255,255,255,.04); }
    .alert-panel-head{ display:flex; justify-content:space-between; margin-bottom:8px; }
    .alert-panel-title{ font-weight:900; }
    .alert-panel-count{ padding:4px 10px; border-radius:999px; font-weight:900; background: rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.12); }
    .alert-list{ display:flex; flex-direction:column; gap:8px; max-height:220px; overflow:auto; padding-right:4px; }
    .alert-item{ border-radius:12px; padding:10px; background: rgba(0,0,0,.18); border:1px solid rgba(255,255,255,.10); }
    .alert-item .msg{ font-weight:850; }
    .alert-item .ts{ margin-top:4px; font-size:12px; color: rgba(255,255,255,.62); }
    .alert-item.active{ border-color: rgba(255,90,140,.42); background: rgba(255,90,140,.12); box-shadow: 0 0 18px rgba(255,90,140,.16); }
    .alert-item.history{ border-color: rgba(120,180,255,.28); background: rgba(120,180,255,.08); }

    .modal-grid{ display:grid; grid-template-columns: 1fr 1fr; gap:14px; margin: 0 4px 10px; }
    @media (max-width: 980px){ .modal-grid{ grid-template-columns: 1fr; } }
    .chartWrap{ height:280px; border-radius:16px; border:1px solid rgba(255,255,255,.10); background: rgba(255,255,255,.03); padding:10px; }
    .table{ display:flex; flex-direction:column; gap:8px; }
    .trow{ display:grid; grid-template-columns: 1.2fr 1.2fr .5fr .6fr; gap:10px; padding:10px; border-radius:14px; border:1px solid rgba(255,255,255,.10); background: rgba(255,255,255,.03); font-size:13px; }
    .trow.thead{ background: rgba(255,255,255,.06); font-weight:900; font-size:12px; color: rgba(255,255,255,.80); }
    .trow.fuel{ grid-template-columns: 1.2fr .7fr .6fr .6fr; }
