:root {
  --red: #e4002b;
  --gold: #b8964e;
  --green: #2e8b4f;
  --green-d: #1f6b3a;
  --ink: #243240;
  --mut: #7c8a99;
  --line: #e4e8ee;
  --bg: #f4f6f8;
  --card: #fff;
  --warn: #e8a33d;
  --bad: #d8413a;
  --ok: #3fae6a;
}

* {
  box-sizing: border-box
}

html,
body {
  margin: 0;
  height: 100%
}

body {
  font: 14px/1.45 "Segoe UI", system-ui, Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink)
}

.hidden {
  display: none !important
}

button {
  font: inherit;
  cursor: pointer
}

/* ---- login ---- */
#login {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background: #4b5560
}

#login .box {
  background: #222a31;
  color: #dfe6ee;
  padding: 28px 30px;
  border-radius: 10px;
  width: 360px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .4)
}

#login h2 {
  margin: 0 0 4px;
  color: #fff;
  font-weight: 600;
  text-align: center
}

#login .logo {
  text-align: center;
  margin-bottom: 14px
}

#login .logo img {
  height: 108px;
  width: auto;
  display: inline-block;
  background: #fff;
  border-radius: 10px;
  padding: 12px 16px;
  box-sizing: border-box
}

#login label {
  display: block;
  font-size: 12px;
  color: #9fb0bf;
  margin: 12px 0 4px
}

#login input {
  width: 100%;
  padding: 9px 11px;
  border-radius: 6px;
  border: 1px solid #3a444d;
  background: #1a2127;
  color: #fff
}

#login button {
  width: 100%;
  margin-top: 18px;
  padding: 10px;
  border: 0;
  border-radius: 6px;
  background: var(--gold);
  color: #1a1a1a;
  font-weight: 700
}

#login .err {
  color: #ff8a8a;
  font-size: 12px;
  margin-top: 10px;
  min-height: 16px
}

#login .hint {
  font-size: 11px;
  color: #7c8a99;
  margin-top: 6px
}

/* ---- app shell ---- */
#app {
  display: flex;
  flex-direction: column;
  height: 100vh
}

/* ===== dashboard selector (exact match to original Selector widget) ===== */
.ds-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  height: 76px;
  min-height: 0;
  padding: 0 50px;
  box-sizing: border-box;
  background: #fff;
  gap: 16px;
  position: relative;
  border-bottom: 1px solid #ececef;
  flex-shrink: 0
}

.ds-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  min-height: 58px
}

.ds-logo {
  height: 100px;
  width: auto;
  align-self: center;
  object-fit: contain;
  margin: -11px 0
}

.ds-col {
  display: flex;
  flex-direction: column
}

.ds-col-store {
  justify-content: center
}

.ds-lbl {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #A1A1AA;
  text-align: center;
  margin: 0 0 6px 0;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box
}

.ds-store,
.ds-sel {
  font-weight: 600;
  font-size: 13px;
  padding: 6px 24px 6px 10px;
  color: #18181B;
  background-color: #FAFAFA;
  border: 1px solid #E4E4E7;
  border-radius: 6px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%2371717A' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center
}

.ds-store {
  width: 200px
}

.ds-sel {
  font-weight: 500;
  color: #52525B;
  background-color: #fff
}

.ds-store:hover,
.ds-sel:hover {
  border-color: #D4D4D8;
  background-color: #F4F4F5
}

.ds-store:focus,
.ds-sel:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(15, 95, 51, .12);
  border-color: #0F5F33
}

.dashboard-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  left: 50%;
  transform: translateX(-50%)
}

.ds-tray {
  display: flex;
  align-items: center;
  background: #F4F4F5;
  border-radius: 10px;
  padding: 4px;
  gap: 2px
}

.dashboard-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 11px 24px;
  font-size: 16px;
  font-weight: 500;
  color: #71717A;
  cursor: pointer;
  position: relative;
  user-select: none;
  white-space: nowrap;
  letter-spacing: -.01em;
  border-radius: 8px;
  transition: all 150ms ease
}

.dashboard-pills:hover {
  color: #3F3F46;
  background-color: rgba(0, 0, 0, .05);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .10)
}

.dashboard-pills.active {
  color: #18181B;
  font-weight: 600;
  background-color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .14), 0 4px 10px rgba(0, 0, 0, .10)
}

.tws-inline {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: flex-end;
  gap: 10px;
  min-height: 58px
}

.ds-lh-tray {
  display: inline-flex;
  align-items: stretch;
  background: #F4F4F5;
  border-radius: 7px;
  padding: 2px;
  margin-bottom: 6px;
  align-self: center;
  height: 24px;
  box-sizing: border-box
}

.ds-lh {
  font-size: 11px;
  font-weight: 600;
  color: #71717A;
  padding: 0 11px;
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: all 120ms ease;
  letter-spacing: -.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center
}

.ds-lh.active {
  background: #fff;
  color: #18181B;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06)
}

.ds-lh:not(.active):hover {
  color: #3F3F46
}

.ds-live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #C4C7C9;
  margin-right: 6px;
  vertical-align: -1px;
  transition: background 150ms ease
}

#segLive.active .ds-live-dot {
  background: #D32F2F;
  animation: tws-live-pulse 1.5s ease-in-out infinite
}

@keyframes tws-live-pulse {

  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(211, 47, 47, .5)
  }

  50% {
    opacity: .55;
    box-shadow: 0 0 0 4px rgba(211, 47, 47, 0)
  }
}

#tws-nav-group {
  display: flex;
  align-items: center;
  gap: 0
}

.ds-arrow {
  width: 29px;
  height: 29px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #71717A;
  user-select: none;
  border: 1px solid #E4E4E7;
  background: #fff;
  font-size: 10px;
  transition: all 120ms ease
}

#mPrev {
  border-radius: 6px 0 0 6px
}

#mNext {
  border-radius: 0 6px 6px 0
}

.ds-arrow:hover {
  background-color: #FAFAFA;
  border-color: #D4D4D8;
  color: #18181B
}

.ds-arrow.ds-arrow-disabled {
  opacity: .3;
  pointer-events: none;
  cursor: default
}

.tws-clickable { cursor: pointer }
.tws-clickable:hover { text-decoration: underline }

.fr-quicklink { cursor: pointer; border-radius: 6px; padding: 2px 6px; margin: 0 -6px; transition: background 120ms ease }
.fr-quicklink:hover { background: #f1f5f3 }
.gen-quicklink { cursor: pointer; border-radius: 6px; padding: 2px 6px; margin: 0 -6px; transition: background 120ms ease }
.gen-quicklink:hover { background: #f1f5f3 }
.row-flash { animation: rowFlash 1.6s ease-out }
@keyframes rowFlash { 0% { background: #fff7d6 } 100% { background: transparent } }

.cat-pie .seg { cursor: pointer; transform-box: view-box; transform-origin: 150px 118px; transition: transform .25s cubic-bezier(.34,1.56,.64,1) }
.cat-pie .seg:hover { transform: scale(1.06); animation: catPulse 1.8s ease-in-out .25s infinite }
@keyframes catPulse { 0%, 100% { transform: scale(1.055) } 50% { transform: scale(1.09) } }

#dpChart { position: relative }

.tws-dp { position: fixed; z-index: 1200; background: #fff; border: 1px solid #E4E4E7; border-radius: 10px; box-shadow: 0 10px 30px rgba(16,24,40,.18); padding: 10px; width: 280px; font-family: 'Segoe UI',Roboto,system-ui,sans-serif; user-select: none }
.tws-dp-hd { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px 8px }
.tws-dp-title { font-weight: 700; font-size: 14px; color: #18181B }
.tws-dp-nav { width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; border-radius: 6px; cursor: pointer; color: #52525B; font-size: 16px }
.tws-dp-nav:hover { background: #F4F4F5 }
.tws-dp-dow { display: grid; grid-template-columns: repeat(7,1fr); gap: 2px; margin-bottom: 4px }
.tws-dp-dow span { text-align: center; font-size: 11px; font-weight: 700; color: #A1A1AA; padding: 2px 0 }
.tws-dp-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 2px }
.tws-dp-empty { height: 32px }
.tws-dp-day { height: 32px; display: flex; align-items: center; justify-content: center; font-size: 13px; color: #3F3F46; cursor: pointer; border-radius: 6px }
.tws-dp-day:hover { background: #ECFDF3 }
.tws-dp-day.in { background: #E6F4EA; border-radius: 0 }
.tws-dp-day.sel { background: #1F8B4D; color: #fff; border-radius: 6px; font-weight: 700 }
.tws-dp-day.fut { color: #D4D4D8 }
.tws-dp-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px }
.tws-dp-btn { border: 0; background: #F4F4F5; color: #3F3F46; border-radius: 6px; padding: 6px 14px; font-weight: 600; cursor: pointer; font-size: 13px }
.tws-dp-btn.primary { background: #1F8B4D; color: #fff }
.tws-dp-btn:hover { filter: brightness(.97) }

.tws-range-label {
  font-size: 13px;
  font-weight: 600;
  color: #18181B;
  min-width: 110px;
  text-align: center;
  cursor: pointer;
  letter-spacing: -.01em;
  padding: 0 4px;
  border-top: 1px solid #E4E4E7;
  border-bottom: 1px solid #E4E4E7;
  height: 29px;
  line-height: 29px;
  background: #fff
}

.ovbtn {
  border: 1px solid var(--line);
  background: #fff;
  color: #69788a;
  border-radius: 14px;
  padding: 3px 11px;
  font-size: 11px;
  margin-left: 5px;
  text-transform: none;
  letter-spacing: 0
}

.ovbtn.on {
  background: var(--green);
  color: #fff;
  border-color: var(--green)
}

.ovbtn {
  border: 1px solid var(--line);
  background: #fff;
  color: #69788a;
  border-radius: 14px;
  padding: 3px 11px;
  font-size: 11px;
  margin-left: 5px;
  text-transform: none;
  letter-spacing: 0
}

.ovbtn.on {
  background: var(--green);
  color: #fff;
  border-color: var(--green)
}

.exp-dd {
  position: relative;
  display: inline-block
}

.exp-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .14);
  z-index: 50;
  min-width: 170px;
  overflow: hidden
}

.exp-menu.hidden {
  display: none
}

.exp-menu>div {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  font-size: 13px;
  cursor: pointer;
  color: var(--ink)
}

.exp-menu>div:hover {
  background: #f4f6f8
}

.exp-menu .material-icons {
  font-size: 18px;
  color: #69788a
}

/* custom report — paged document builder */
.pb-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px
}

.pb-rtitle {
  font-size: 16px;
  font-weight: 700;
  margin-right: 6px
}

.pb-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  background: #fff;
  color: #3f4b59;
  border-radius: 7px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer
}

.pb-btn:hover {
  background: #f4f6f8;
  border-color: #cfd6df
}

.pb-btn .material-icons {
  font-size: 16px
}

.pb-add {
  color: var(--green-d)
}

.pb-add:hover {
  background: #eef6f0
}

.pb-saved {
  max-width: 170px
}

.pb-pages-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #eef1f5;
  border-radius: 7px;
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: #5b6a7b;
  margin-bottom: 14px
}

.pb-pages-bar .pb-count {
  margin-left: auto;
  color: #8b96a3;
  font-weight: 600
}

.pb-stage {
  display: flex;
  justify-content: center;
  background: #e9edf1;
  border-radius: 10px;
  padding: 24px;
  max-height: calc(100vh - 280px);
  overflow: auto
}

#pb-pages-host {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: 100%
}

.pb-page {
  background: #fff;
  width: 820px;
  flex: 0 0 auto;
  min-height: 1040px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .13);
  border-radius: 3px;
  padding: 46px 54px;
  box-sizing: border-box
}

.cr-edit {
  background: #f8fafc;
  border: 1px solid #e6ebf1;
  border-radius: 8px;
  padding: 12px 14px
}

.pb-rpt-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid #ececef;
  padding-bottom: 14px;
  margin-bottom: 18px
}

.pb-doc-title {
  font-size: 24px;
  font-weight: 700;
  color: #243240;
  outline: none
}

.pb-doc-sub {
  font-size: 12px;
  color: #8b96a3;
  margin-top: 3px
}

.pb-doc-logo img {
  height: 30px;
  width: auto;
  display: block
}

.pb-empty {
  text-align: center;
  color: #aab4c0;
  font-size: 14px;
  padding: 80px 20px;
  line-height: 1.7
}

.pb-item {
  border: 1px solid transparent;
  border-radius: 8px;
  margin: 16px 0;
  transition: border-color .15s
}

.pb-item:hover {
  border-color: #e4e8ee
}

.pb-item-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px
}

.pb-item-t {
  font-size: 13px;
  font-weight: 700;
  color: #5b6a7b
}

.pb-item-acts {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity .15s
}

.pb-item:hover .pb-item-acts {
  opacity: 1
}

.pb-mini {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  width: 24px;
  height: 24px;
  cursor: pointer;
  color: #69788a;
  font-size: 12px
}

.pb-mini:hover {
  border-color: var(--green);
  color: var(--green-d)
}

.pb-ph {
  border: 1.5px dashed #cfd6df;
  border-radius: 8px;
  padding: 34px;
  text-align: center;
  color: #9aa7b4;
  font-size: 13px;
  cursor: pointer
}

.pb-plot {
  min-height: 190px
}

.pb-cap {
  font-size: 13px;
  font-weight: 600;
  color: #243240;
  margin-bottom: 6px
}

.pb-text {
  outline: none;
  border: 1px dashed transparent;
  border-radius: 6px;
  padding: 6px;
  font-size: 13px;
  color: #3f4b59;
  min-height: 24px
}

.pb-text:hover,
.pb-text:focus {
  border-color: #e4e8ee
}

.pb-tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px
}

.pb-tbl th {
  text-transform: none;
  font-size: 12px
}

@media print {

  .ds-wrap,
  .subtabs,
  .pb-toolbar,
  .pb-pages-bar,
  nav,
  header {
    display: none !important
  }

  .pb-stage {
    background: #fff;
    padding: 0;
    max-height: none;
    overflow: visible
  }

  .pb-page {
    box-shadow: none
  }
}

.genctl {
  border: 0;
  border-radius: 8px;
  padding: 14px;
  color: #fff;
  font-weight: 700;
  font-size: 15px
}

/* multi-genset site switcher (Genset 1 / Genset 2 …) */
.gen-switch {
  display: inline-flex;
  gap: 4px;
  background: #EEF1F4;
  border-radius: 9px;
  padding: 3px
}

.gen-switch-btn {
  border: 0;
  background: transparent;
  border-radius: 7px;
  padding: 6px 14px;
  font-weight: 700;
  font-size: 14px;
  color: #5b6b7c;
  cursor: pointer
}

.gen-switch-btn.active {
  background: #fff;
  color: var(--green-d);
  box-shadow: 0 1px 3px rgba(16, 24, 40, .12)
}

/* TOU demand-profile meter switcher + breakdown table (electrical KPI) */
.ksv-pk-sel-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 0 10px
}

.ksv-pk-sel-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--green-d);
  text-transform: uppercase;
  letter-spacing: .3px
}

.ksv-pk-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap
}

.ksv-pk-tab {
  font-size: 12px;
  padding: 5px 14px;
  border-radius: 16px;
  cursor: pointer;
  color: #666;
  background: #f0f0f0;
  border: 1px solid #ddd;
  transition: all .2s;
  user-select: none
}

.ksv-pk-tab:hover {
  background: #e3e6e9;
  color: #333
}

.ksv-pk-tab-active,
.ksv-pk-tab-active:hover {
  background: var(--green);
  color: #fff;
  border-color: var(--green)
}

.tdc-tbl {
  width: 100%;
  border-collapse: collapse
}

.tdc-tbl th,
.tdc-tbl td {
  padding: 6px 8px;
  font-size: 13px;
  border-bottom: 1px solid #f0f0f0
}

.tdc-tbl th {
  font-size: 11px;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: .3px
}

.tdc-tbl th:first-child,
.tdc-tbl td:first-child {
  text-align: left
}

.tdc-leg {
  cursor: pointer
}

.tdc-leg:hover {
  background: #fafafa
}

.genctl.start {
  background: var(--ok)
}

.genctl.stop {
  background: var(--bad)
}

.genctl.auto {
  background: #3d7fd6
}

.genctl.man {
  background: var(--warn)
}

main {
  flex: 1;
  overflow: auto;
  padding: 18px 22px
}

/* ---- subtabs ---- */
.subtabs {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px
}

.subtabs button {
  border: 0;
  background: transparent;
  padding: 10px 2px;
  color: #69788a;
  font-weight: 600;
  border-bottom: 2px solid transparent
}

.subtabs button.active {
  color: var(--green-d);
  border-bottom-color: var(--green)
}

/* ---- cards ---- */
.grid {
  display: grid;
  gap: 16px
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px
}

.card h3 {
  margin: 0 0 12px;
  font-size: 13px;
  letter-spacing: .6px;
  color: var(--green-d);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: space-between
}

/* Overview — fills viewport height (2 rows x 3 cols) */
.ov-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;
  gap: 12px;
  padding: 0;
  height: calc(100vh - 112px)
}

.ov-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 13px 15px;
  border-color: #E5E7EB;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04)
}

.ov-card h3 {
  margin: 0 0 9px;
  color: #374151;
  letter-spacing: .03em;
  font-size: 14px
}

.ov-fill {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center
}

.ov-foot {
  font-size: 12px;
  margin-top: 8px
}

.ov-sl {
  font-size: 11px;
  letter-spacing: .4px;
  color: var(--mut);
  text-transform: uppercase
}

.ov-bv {
  font-size: 24px;
  font-weight: 700;
  color: var(--green-d);
  line-height: 1.15
}

.ov-subcard {
  background: #F9FAFB;
  border: 1px solid #EEF0F2;
  border-radius: 9px;
  padding: 8px 11px;
  box-sizing: border-box
}

.ov-bv.sm {
  font-size: 19px
}

.ov-plot-hd {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: .4px;
  color: var(--mut);
  text-transform: uppercase
}

.viewlink {
  font-size: 11px;
  color: var(--green-d);
  font-weight: 600;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0
}

.viewlink:hover {
  text-decoration: underline
}

.live-badge {
  font-size: 11px;
  color: var(--red);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px
}

.live-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 6px var(--red)
}

.big {
  font-size: 34px;
  font-weight: 700;
  color: var(--green-d);
  text-align: center;
  margin: 6px 0
}

.big.na {
  color: var(--mut);
  font-style: italic;
  font-weight: 400
}

.sub {
  text-align: center;
  color: var(--mut);
  font-size: 12px
}

.kv {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px dashed #eef1f4;
  font-variant-numeric: tabular-nums
}

.kv:last-child {
  border-bottom: 0
}

.kv .k {
  color: var(--mut)
}

.kv .v {
  font-weight: 700
}

.bar-row {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 4px 0;
  font-size: 13px
}

.bar-track {
  display: block;
  height: 9px;
  background: #eef1f4;
  border-radius: 5px;
  overflow: hidden
}

.bar-fill {
  display: block;
  height: 100%;
  min-width: 2px;
  background: var(--gold);
  border-radius: 5px
}

/* tables */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px
}

th {
  text-align: left;
  color: var(--mut);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: .4px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  white-space: nowrap
}

td {
  padding: 11px 12px;
  border-bottom: 1px solid #f0f2f5;
  white-space: nowrap
}

tr:hover td {
  background: #fafbfc
}

.acc-parent td {
  cursor: pointer
}

.acc-parent .chev {
  color: var(--green);
  font-size: 11px;
  display: inline-block;
  width: 14px;
  transition: transform .3s cubic-bezier(.4, 0, .2, 1)
}

.acc-parent.open .chev {
  transform: rotate(90deg)
}

tr.child td {
  background: #fbfcfd;
  color: #56657a;
  font-size: 12px;
  padding: 0 !important;
  border-bottom: 0
}

.racc-det {
  max-height: 0;
  overflow: hidden;
  transition: max-height .5s cubic-bezier(.4, 0, .2, 1), padding .5s cubic-bezier(.4, 0, .2, 1);
  padding: 0 16px;
  background: #f8faf9
}

.racc-det.open {
  max-height: 1000px;
  padding: 16px;
  border-bottom: 1px solid #f0f2f5
}

/* ---- expanded fridge row: info grid + history + distribution (matches Unified Dev) ---- */
.racc-di {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 6px
}

.racc-ks {
  flex: 1;
  min-width: 160px
}

.racc-kt {
  font-size: 12px;
  font-weight: 600;
  color: #0F5F33;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .3px
}

.racc-dg {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px
}

.racc-dl {
  font-size: 10px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: .3px;
  margin-bottom: 4px
}

.racc-dv {
  font-size: 14px;
  font-weight: 500;
  color: #1B2A4A
}

.racc-dv.temp-ok {
  color: #1F8B4D
}

.racc-dv.temp-warn {
  color: #F5A623
}

.racc-dv.temp-alarm {
  color: #D32F2F
}

.racc-temp-bar {
  display: flex;
  align-items: center;
  gap: 6px
}

.racc-temp-track {
  flex: 1;
  height: 6px;
  background: #e0e0e0;
  border-radius: 3px;
  position: relative
}

.racc-temp-fill {
  height: 100%;
  border-radius: 3px;
  transition: width .3s
}

.racc-temp-sp {
  position: absolute;
  top: -3px;
  width: 2px;
  height: 12px;
  background: #333;
  border-radius: 1px
}

.fcc-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 4px 0 2px;
  margin-bottom: 2px
}

.fcc-lbl {
  grid-column: 2;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: #333
}

.fcc-pills {
  grid-column: 3;
  justify-self: end;
  display: flex;
  gap: 4px
}

.fcc-pill {
  border: 1px solid #ccc;
  background: #fff;
  color: #666;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 3px;
  cursor: pointer;
  transition: all .15s
}

.fcc-pill:hover {
  border-color: #1F8B4D;
  color: #1F8B4D
}

.fcc-pill.active {
  background: #1F8B4D;
  color: #fff;
  border-color: #1F8B4D
}

.fcc-chart,
.fbc-chart {
  width: 100%;
  position: relative
}

.fr-tip {
  position: absolute;
  pointer-events: none;
  transform: translate(-50%, 0);
  background: rgba(30, 30, 30, .9);
  color: #fff;
  font-size: 12px;
  line-height: 1.35;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  display: none;
  z-index: 6
}

.fr-tip b {
  color: #fff;
  font-weight: 600
}

.fcc-stats {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4px 0 0 44px;
  font-size: 10px;
  color: #666
}

.fcc-stat-col {
  display: flex;
  align-items: center;
  gap: 4px
}

.fcc-stat-swatch {
  width: 10px;
  height: 3px;
  border-radius: 1px;
  flex-shrink: 0
}

.fcc-stat-vals {
  margin-left: auto;
  display: flex;
  gap: 12px;
  padding-right: 16px
}

.fcc-stat-vals span {
  color: #888
}

/* clickable meter rows in the Utilities detail table (toggle a meter on/off the plots) */
.util-meter-row {
  cursor: pointer
}

.util-meter-row:hover {
  background: #eef3f8 !important
}

.util-meter-row.meter-off {
  opacity: .4
}

.util-meter-row.meter-off .meter-sw {
  outline: 1px solid #b0b0b0;
  outline-offset: 1px
}

/* table toolbar: centered title + search/export on the right (matches original) */
.tbl-head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin: 16px 0 8px
}

.tbl-head .panel-title {
  grid-column: 2
}

.tbl-head .tbl-tools {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px
}

.tbl-search {
  padding: 5px 10px;
  border: 1px solid #d7dde3;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
  min-width: 150px
}

.tbl-search:focus {
  border-color: var(--green)
}

.fcc-stat-vals b {
  color: #333;
  font-weight: 600
}

.umrow {
  display: flex;
  gap: 8px;
  padding: 6px 18px;
  font-size: 12.5px;
  color: #56657a;
  border-bottom: 1px dashed #eef1f4
}

.umrow:last-child {
  border-bottom: 0
}

.bms-cir-list {
  display: flex;
  flex-direction: column
}

.bms-cir {
  border-top: 1px solid #f2f2f2
}

.bms-cir:first-child {
  border-top: 0
}

.bms-cir-main {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0
}

.bms-cir-toggle {
  position: relative;
  width: 30px;
  height: 16px;
  border-radius: 9px;
  background: #c4c9ce;
  transition: background .2s;
  flex: 0 0 auto
}

.bms-cir-toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  transition: left .2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .3)
}

.bms-cir-toggle.on {
  background: #0F5F33
}

.bms-cir-toggle.on::after {
  left: 16px
}

.bms-cir-name {
  flex: 1;
  font-size: 13px;
  font-weight: 500
}

.bms-cir-sched {
  font-size: 12px;
  color: #777
}

.bms-cir-sp {
  font-size: 11px;
  color: #0F5F33;
  background: #eef5f0;
  border-radius: 4px;
  padding: 2px 7px;
  margin-left: 8px;
  white-space: nowrap;
  letter-spacing: .2px
}

.bms-cir-edit {
  cursor: pointer;
  color: #bbb;
  padding: 2px 6px
}

.bms-cir-edit:hover {
  color: #0F5F33
}

.bms-loading {
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center
}

.bms-spin {
  width: 26px;
  height: 26px;
  margin: 4px auto;
  border: 3px solid #eef1f4;
  border-top-color: #0F5F33;
  border-radius: 50%;
  animation: spin .8s linear infinite
}

/* cluster hover tooltip listing the sites/devices in the group */
.cl-tip.leaflet-tooltip {
  background: #fff;
  border: 1px solid #E4E4E7;
  border-radius: 9px;
  box-shadow: 0 8px 24px rgba(16, 24, 40, .18);
  padding: 7px 10px;
  font-family: 'Segoe UI', Roboto, system-ui, sans-serif;
  color: #1F2937;
  max-width: 320px
}

.cl-tip.leaflet-tooltip::before {
  display: none
}

.cl-tip .cl-tip-hd {
  font-weight: 700;
  font-size: 12.5px;
  margin-bottom: 4px;
  color: #0F5F33
}

.cl-tip .cl-tip-list {
  column-gap: 16px;
  font-size: 12px;
  line-height: 1.5
}

.cl-tip .cl-tip-r {
  white-space: nowrap;
  display: flex;
  align-items: center
}

.cl-tip .cl-tip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  flex: 0 0 auto
}

/* BMS side filter funnel + dropdown */
.bms-filter-btn {
  flex: 0 0 auto;
  cursor: pointer;
  color: #9aa7b4;
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border-radius: 4px
}

.bms-filter-btn:hover {
  color: #5b6b7c
}

.bms-filter-btn.on,
.bms-filter-btn.open {
  color: var(--green)
}

/* small overlay filter popover anchored to the funnel, like the original (fixed so the panel's overflow can't clip it) */
.bms-filter-pop {
  position: fixed;
  z-index: 1400;
  min-width: 160px;
  background: #fff;
  border: 1px solid #E4E4E7;
  border-radius: 10px;
  box-shadow: 0 8px 26px rgba(16, 24, 40, .18);
  padding: 7px 0
}

.bms-filter-pop .fp-hd {
  font-size: 11px;
  font-weight: 700;
  color: #9AA3AE;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 4px 14px 6px
}

.bms-filter-pop .fp-opt {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px;
  cursor: pointer;
  font-size: 13px;
  color: #374151
}

.bms-filter-pop .fp-opt:hover {
  background: #f3f6f4
}

.bms-filter-pop .fp-ck {
  width: 15px;
  height: 15px;
  border: 1.5px solid #c4ccd4;
  border-radius: 3px;
  flex: 0 0 auto;
  position: relative
}

.bms-filter-pop .fp-opt.on .fp-ck {
  background: var(--green);
  border-color: var(--green)
}

.bms-filter-pop .fp-opt.on .fp-ck::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg)
}

.bms-filter-pop .fp-d {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: 0 0 auto
}

.bms-filter-pop .fp-l {
  flex: 1;
  white-space: nowrap
}

@keyframes spin {
  to {
    transform: rotate(360deg)
  }
}

.chip {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 600
}

.chip.ok {
  background: #e3f5ea;
  color: #1f7a44
}

.chip.warn {
  background: #fdf2dd;
  color: #a9741a
}

.chip.bad {
  background: #fbe5e4;
  color: #bb2a23
}

.chip.idle {
  background: #eef1f4;
  color: #5b6a7b
}

.na {
  color: var(--mut);
  font-style: italic
}

.panel-title {
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin: 18px 0 6px
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  margin: 6px 0 12px
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  margin-bottom: 8px
}

.toolbar input {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px
}

.btn {
  padding: 7px 13px;
  border: 1px solid var(--green);
  background: var(--green);
  color: #fff;
  border-radius: 6px;
  font-weight: 600
}

.btn.ghost {
  background: #fff;
  color: var(--green-d);
  border-color: var(--line)
}

.muted {
  color: var(--mut)
}

.center-msg {
  text-align: center;
  color: var(--mut);
  padding: 30px
}

/* health shield */
.shield {
  width: 120px;
  height: 120px;
  margin: 0 auto;
  display: block
}

/* BMS — fits to viewport height */
.bms-shell {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 16px;
  height: calc(100vh - 116px)
}

.bms-side {
  overflow: auto;
  display: flex;
  flex-direction: column;
  position: relative
}

.bms-side-hd {
  font-size: 17px;
  font-weight: 600;
  padding: 2px 0 8px;
  display: flex;
  align-items: center;
  gap: 6px
}

.bms-back {
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  color: var(--green-d)
}

.bms-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px
}

.bms-tab {
  flex: 1;
  padding: 9px 4px;
  font-weight: 600;
  color: #69788a;
  border-bottom: 2px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer
}

.bms-tab.active {
  color: var(--green-d);
  border-bottom-color: var(--green)
}

.bms-tab .tl {
  display: inline-flex;
  align-items: center;
  gap: 6px
}

.bms-tabs .cnt {
  background: #eef1f5;
  border-radius: 9px;
  padding: 0 7px;
  font-size: 11px;
  color: #56657a
}

.bms-tabs .cnt.crit {
  background: #fbe5e4;
  color: #bb2a23
}

.bms-side-body {
  overflow: auto;
  flex: 1
}

.bms-side-empty {
  color: var(--mut);
  text-align: center;
  padding: 24px;
  font-size: 13px
}

.bms-right {
  min-width: 0;
  position: relative
}

.bms-map,
.bms-fp {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line)
}

.bms-fp {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 0
}

.bms-fp.hidden,
.bms-map.hidden {
  display: none
}

.tws-live-disabled {
  color: #b6bfc9 !important;
  cursor: default
}

.store-pin {
  background: transparent;
  border: 0;
  overflow: visible;
  position: absolute
}

.store-pin svg {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .4))
}

.store-pin-label {
  position: absolute;
  bottom: 36px;
  left: 17px;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 11px;
  font-weight: 700;
  color: #1f2937;
  background: rgba(255, 255, 255, .88);
  padding: 1px 6px;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
  pointer-events: none
}

.dl-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 4px;
  border-bottom: 1px solid #f0f2f5;
  cursor: pointer
}

.dl-item:hover {
  background: #fafbfc
}

.dl-item.dim {
  opacity: .45
}

.dl-ic {
  flex-shrink: 0;
  line-height: 0
}

.dl-ic svg {
  filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .3))
}

.dl-tx {
  min-width: 0
}

.dl-nm {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.dl-ty {
  font-size: 11px;
  color: var(--mut)
}

.bms-al-li {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 4px;
  border-bottom: 1px solid #f0f2f5;
  cursor: pointer
}

.bms-al-li:hover {
  background: #fafbfc
}

.bms-al-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0
}

.bms-al-t {
  font-size: 12.5px;
  font-weight: 600
}

.bms-al-m {
  font-size: 11px;
  color: var(--mut)
}

/* floor-plan = navigable Leaflet image overlay (pan/zoom) */
.fp-leaflet {
  position: absolute;
  inset: 0;
  background: #fff;
  z-index: 1
}

.bms-dicon {
  background: none !important;
  border: none !important;
  cursor: pointer
}

.bms-dicon svg {
  display: block;
  filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .35))
}

.bms-overlay {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  z-index: 15;
  pointer-events: none
}

.bms-overlay>* {
  pointer-events: auto
}

.bms-seg {
  display: inline-flex;
  background: rgba(255, 255, 255, .95);
  border-radius: 22px;
  padding: 3px;
  gap: 2px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12)
}

.bms-seg button {
  border: none;
  background: transparent;
  color: #555;
  font: 600 12px Roboto, system-ui;
  padding: 7px 15px;
  border-radius: 18px;
  cursor: pointer
}

.bms-seg button.active {
  background: #0F5F33;
  color: #fff
}

.bms-ov-pill {
  display: inline-flex;
  flex-direction: column;
  background: rgba(255, 255, 255, .95);
  border-radius: 14px;
  padding: 6px 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12)
}

.bms-ov-pill .lbl {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: #9aa0a8;
  font-weight: 600
}

.bms-ov-pill .v {
  font-size: 15px;
  font-weight: 600
}

.bms-ov-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px;
  border-radius: 22px;
  border: none;
  background: rgba(255, 255, 255, .95);
  color: #0F5F33;
  font: 600 12px Roboto, system-ui;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12)
}

.bms-ov-btn:hover {
  background: #0F5F33;
  color: #fff
}

.bms-ov-btn.ac {
  color: #0277BD
}

.bms-ov-btn.ac:hover {
  background: #0277BD;
  color: #fff
}

.bms-lpop .leaflet-popup-content-wrapper {
  border-radius: 10px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, .2);
  padding: 3px 4px
}

.bms-lpop .leaflet-popup-content {
  margin: 8px 11px;
  line-height: 1.45
}

.bms-pop {
  min-width: 150px;
  max-width: 240px
}

.bms-pop .pn {
  font-size: 13px;
  font-weight: 600;
  color: #1B2A4A;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(0, 0, 0, .07);
  margin-bottom: 4px
}

.bms-pop .pm {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #9aa0a8;
  margin-bottom: 3px
}

.bms-pop .pr .tr {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 1.5px 0;
  font-size: 12px
}

.bms-pop .pr .k {
  color: #888
}

.bms-pop .pr .v {
  font-weight: 600;
  color: #1B2A4A
}

.fp-tip {
  position: fixed;
  transform: translate(-50%, -100%);
  background: #222a31;
  color: #fff;
  font-size: 12px;
  padding: 5px 9px;
  border-radius: 6px;
  pointer-events: none;
  z-index: 2000;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .3)
}

#chart-tip {
  position: fixed;
  display: none;
  background: #222a31;
  color: #fff;
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 7px;
  pointer-events: none;
  z-index: 2000;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .35);
  white-space: nowrap
}

#chart-tip .ct-h {
  font-weight: 700;
  margin-bottom: 4px;
  color: #cdd5e1
}

#chart-tip .ct-r {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 1px 0
}

#chart-tip .ct-d {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  display: inline-block
}

.site-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  margin-bottom: 8px;
  cursor: pointer
}

.site-item:hover {
  border-color: var(--green)
}

.site-item-main {
  flex: 1;
  min-width: 0
}

.site-item .nm {
  font-weight: 700
}

.site-item .st {
  font-size: 12px;
  color: var(--mut)
}

.site-alarm {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 2px 4px;
  border-radius: 6px
}

.site-alarm:hover {
  background: #f1f5f3
}

.site-alarm-n {
  font-size: 11px;
  font-weight: 700;
  color: #6B7280;
  line-height: 1
}

.store-alarm-pop {
  position: fixed;
  display: none;
  z-index: 1500;
  width: 260px;
  overflow: visible;
  background: #fff;
  border: 1px solid #E4E4E7;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(16, 24, 40, .18);
  padding: 8px 10px;
  font-family: 'Segoe UI', Roboto, system-ui, sans-serif
}

.store-alarm-pop .sap-hd {
  font-weight: 700;
  font-size: 12.5px;
  color: #18181B;
  padding: 2px 2px 7px;
  border-bottom: 1px solid #eef0f2;
  margin-bottom: 5px
}

.store-alarm-pop .sap-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 4px 2px
}

.store-alarm-pop .sap-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: 0 0 auto;
  margin-top: 3px
}

.store-alarm-pop .sap-tx {
  min-width: 0
}

.store-alarm-pop .sap-t {
  font-weight: 700;
  font-size: 12.5px;
  color: #1F2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.store-alarm-pop .sap-m {
  font-size: 11px;
  color: #9CA3AF
}

.store-alarm-pop .sap-none {
  color: #6B7280;
  padding: 6px 2px;
  font-size: 12px
}

.store-alarm-pop .sap-more {
  color: #16A34A;
  font-weight: 600;
  font-size: 11px;
  padding: 4px 2px 2px
}

.spark {
  width: 100%;
  height: 70px
}

.gauge-wrap {
  position: relative;
  text-align: center
}

.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(20, 28, 36, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000
}

.modal {
  position: relative;
  background: #fff;
  border-radius: 12px;
  padding: 22px;
  width: min(680px, 92vw);
  max-height: 88vh;
  overflow: auto
}

.modal h2 {
  margin: 0 0 4px
}

.modal .x {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 5;
  border: 0;
  background: #eef1f4;
  color: #5b6b7b;
  border-radius: 6px;
  width: 26px;
  height: 26px;
  padding: 0;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center
}

.modal .x:hover {
  background: #e2e7ec;
  color: #1f2937
}

.statgrid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 14px
}

.statgrid>div {
  padding: 14px;
  border-right: 1px solid var(--line)
}

.statgrid>div:last-child {
  border-right: 0
}

.statgrid .n {
  font-size: 24px;
  font-weight: 700
}

/* BMS device popup card (matches original) */
.modal:has(.dpop) {
  width: fit-content;
  max-width: 92vw;
  padding: 16px 18px
}

.dpop {
  width: 500px;
  max-width: 86vw;
  min-width: 0
}

.dpop-info {
  display: flex;
  gap: 10px;
  margin: 4px 0 2px
}

.dpi-card {
  flex: 1;
  min-width: 0;
  background: #F9FAFB;
  border: 1px solid #EEF0F2;
  border-radius: 9px;
  padding: 8px 11px
}

.dpi-t {
  font-size: 11px;
  font-weight: 700;
  color: var(--green-d);
  text-transform: uppercase;
  letter-spacing: .03em;
  margin-bottom: 5px
}

.dpi-r {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  padding: 2px 0;
  color: #6B7280
}

.dpi-r b {
  color: #111827;
  font-variant-numeric: tabular-nums
}

.dpop-hd {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 8px;
  padding-right: 30px
}

.dpop-ic {
  flex: 0 0 auto
}

.dpop-tt {
  flex: 1;
  min-width: 0
}

.dpop-name {
  font-size: 15px;
  font-weight: 700;
  color: #1f2937;
  line-height: 1.2
}

.dpop-type {
  font-size: 12px;
  color: var(--mut);
  margin-top: 2px
}

.dpop-st {
  font-size: 12px;
  font-weight: 600;
  margin-top: 3px
}

.dpop-tabs {
  display: flex;
  gap: 4px;
  flex: 0 0 auto
}

.dpop-tabs .ovbtn {
  padding: 2px 8px;
  font-size: 11px
}

.dpop-ct-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0 4px
}

.dpop-ct {
  font-size: 18px;
  font-weight: 600;
  color: #374151;
  text-align: left;
  margin: 0
}

.ovl-tip {
  position: absolute;
  z-index: 30;
  pointer-events: none;
  background: #fff;
  border: 1px solid #E4E4E7;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(16, 24, 40, .14);
  padding: 6px 9px;
  font-size: 12px;
  white-space: nowrap
}

.ovl-tip-t {
  font-weight: 700;
  color: #18181B;
  margin-bottom: 3px
}

.ovl-tip-r {
  color: #4B5563;
  line-height: 1.55
}

.ovl-tip-d {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  margin-right: 5px;
  vertical-align: -1px
}

/* plot/chart title — centered, 22px */
.plot-title {
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  color: #374151;
  letter-spacing: .02em;
  margin: 2px 0 8px
}

/* Custom report — telemetry key picker */
.cr-keypick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px 10px;
  max-height: 200px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  margin: 6px 0 12px
}

.cr-keyopt {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 6px;
  font-size: 13px;
  border-radius: 5px;
  cursor: pointer
}

.cr-keyopt:hover {
  background: #f3f6f9
}

.cr-keyopt input {
  accent-color: var(--green)
}

/* Generator/Utility Data Overlay — grouped dropdowns (matches original) */
.gov-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 14px;
  justify-content: center
}

.gov-group {
  position: relative
}

.gov-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border: 1px solid #d7dee5;
  background: #fff;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  color: #455a64;
  cursor: pointer
}

.gov-btn:hover {
  border-color: #b8c4cf
}

.gov-btn.has-sel {
  border-color: var(--green);
  color: var(--green-d);
  background: #f1f8f3
}

.gov-menu {
  position: absolute;
  z-index: 50;
  top: calc(100% + 4px);
  left: 0;
  min-width: 190px;
  background: #fff;
  border: 1px solid #e2e8ee;
  border-radius: 8px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .14);
  padding: 6px;
  max-height: 280px;
  overflow: auto
}

.gov-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  font-size: 13px;
  color: #37474f;
  border-radius: 5px;
  cursor: pointer
}

.gov-opt:hover {
  background: #f3f6f9
}

.gov-opt input {
  accent-color: var(--green);
  width: 15px;
  height: 15px
}

.statgrid .l {
  font-size: 11px;
  color: var(--mut);
  text-transform: uppercase;
  letter-spacing: .4px
}