:root{
  --primary: #279f7c;
  --primary-2: #1f8667;
  --accent: #f1793a;

  --bg: #f4f6f7;
  --card: rgba(255,255,255,0.86);
  --text: #12202a;
  --muted: #667085;
  --border: rgba(16,24,40,0.10);

  --shadow: 0 18px 50px rgba(16,24,40,0.12);
  --radius: 18px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  background:
    radial-gradient(1200px 700px at 18% 0%, rgba(39,159,124,0.14), transparent 60%),
    radial-gradient(900px 600px at 88% 10%, rgba(241,121,58,0.14), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 14px/1.4 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.page{ max-width: 100%; margin: 0 auto; padding: 18px; }

.topbar{
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.72);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.brand{ display:flex; align-items:center; gap:12px; }
.brand__mark{
  width:44px;
  height:44px;
  border-radius: 14px;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  background: #fff;
}

.brand__mark img{
  width:100%;
  height:100%;
  object-fit:contain;
}
.brand__name{ font-weight: 1100; letter-spacing: .2px; }
.brand__sub{ color: var(--muted); font-size: 12px; margin-top: 2px; }

.btn{
  appearance:none;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 10px 14px;
  font-weight: 1100;
  cursor:pointer;
  user-select:none;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.btn--big{ padding: 12px 18px; border-radius: 16px; }
.btn--primary{
  background: var(--primary);
  color:#fff;
  box-shadow: 0 12px 26px rgba(39,159,124,0.22);
}
.btn--primary:hover{ background: var(--primary-2); transform: translateY(-1px); }
.btn--ghost{
  background: rgba(255,255,255,0.72);
  border-color: var(--border);
  color: var(--text);
}
.btn--ghost:hover{
  background: rgba(39,159,124,0.09);
  border-color: rgba(39,159,124,0.25);
}

.grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 14px;
}

/* status inside the circle */
#statusCenter{
  margin-top: 10px;
  font-size: 14px;
  font-weight: 700;
  opacity: 0.85;
  text-align: center;
  min-height: 18px;
}

.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.card--main{ padding: 14px; }
.card--side{ padding: 14px; }

.statusRow{
  display:flex; align-items:center; justify-content:space-between;
  gap: 12px; flex-wrap: wrap;
}

.statusPill{
  display:inline-flex; align-items:center; gap:10px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(39,159,124,0.25);
  background: rgba(39,159,124,0.10);
  font-weight: 1100;
}
.statusPill .dot{
  width:10px; height:10px; border-radius: 99px;
  background: var(--primary);
  box-shadow: 0 0 0 6px rgba(39,159,124,0.10);
}
.statusPill.is-warn{
  border-color: rgba(241,121,58,0.35);
  background: rgba(241,121,58,0.12);
}
.statusPill.is-warn .dot{
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(241,121,58,0.12);
}

.connected{ display:flex; gap: 8px; align-items:baseline; color: var(--muted); }
.connected__value{ color: var(--text); font-weight: 1100; }

.meterWrap{ padding: 8px 0 0; }

.meter{
  position: relative;
  width: min(520px, 100%);
  aspect-ratio: 1 / 1;
  margin: 10px auto 6px;
}

.ticks{
  position:absolute;
  inset: 14px;
  border-radius: 999px;
  background:
    repeating-conic-gradient(
      from -90deg,
      rgba(16,24,40,0.0) 0deg,
      rgba(16,24,40,0.0) 6deg,
      rgba(16,24,40,0.18) 6deg,
      rgba(16,24,40,0.18) 6.8deg
    );
  -webkit-mask: radial-gradient(circle, transparent 66%, #000 67%);
          mask: radial-gradient(circle, transparent 66%, #000 67%);
  opacity: .45;
}

.ring{ position:absolute; inset:0; transform: rotate(-90deg); }
.ring__track{
  fill:none;
  stroke: rgba(16,24,40,0.10);
  stroke-width: 16;
}
.ring__prog{
  fill:none;
  stroke: url(#ringGrad);
  stroke-width: 16;
  stroke-linecap: round;
  stroke-dasharray: 603;
  stroke-dashoffset: 603;
  transition: stroke-dashoffset .12s linear;
  filter: drop-shadow(0 10px 18px rgba(39,159,124,0.12));
}

.needle{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  pointer-events:none;
}
.needle__arm{
  width: 6px;
  height: 124px;
  border-radius: 99px;
  background: linear-gradient(180deg, var(--accent), var(--primary));
  transform-origin: 50% calc(100% - 10px);
  transform: rotate(-120deg);
  box-shadow: 0 14px 22px rgba(241,121,58,0.10);
}
.needle__cap{
  position:absolute;
  width: 18px; height: 18px;
  border-radius: 99px;
  background: #fff;
  border: 2px solid rgba(16,24,40,0.10);
  box-shadow: 0 10px 18px rgba(16,24,40,0.12);
}

.center{
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
}

.center__label{
  font-size: 12px;
  letter-spacing: .18em;
  font-weight: 1100;
  color: var(--muted);
}
.center__value{
  margin-top: 6px;
  font-size: 74px;
  font-weight: 1200;
  line-height: 1;
  color: var(--text);
}
.center__unit{
  margin-top: 6px;
  color: var(--muted);
  font-weight: 900;
}

.center__sub{
  margin-top: 12px;
  display:flex;
  gap: 8px;
  flex-wrap:wrap;
  justify-content:center;
}
.chip{
  display:inline-flex;
  align-items:baseline;
  gap:6px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(16,24,40,0.10);
  background: rgba(255,255,255,0.62);
}
.chip__k{ color: var(--muted); font-weight: 900; font-size: 12px; }
.chip__v{ font-weight: 1200; color: var(--accent); }
.chip__u{ color: var(--muted); font-weight: 900; font-size: 12px; }

.who{
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
  max-width: 360px;
}

.ctaRow{
  display:flex;
  justify-content:center;
  gap: 10px;
  margin: 10px 0 2px;
  flex-wrap: wrap;
}

.mini{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 10px;
  margin-top: 12px;
}
.mini__item{
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.70);
}
.mini__label{ color: var(--muted); font-size: 12px; font-weight: 900; }
.mini__val{
  margin-top: 8px;
  font-size: 22px;
  font-weight: 1200;
  display:flex; gap:6px; align-items:baseline;
}
.mini__val span:first-child{ color: var(--accent); }
.mini__unit{ font-size: 12px; color: var(--muted); font-weight: 900; }

.tip{ margin-top: 10px; color: var(--muted); font-size: 12px; }

.sideTitle{ font-weight: 1200; margin-bottom: 10px; }
.sideRow{
  display:flex; justify-content:space-between; gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(16,24,40,0.10);
}
.sideKey{ color: var(--muted); font-weight: 900; }
.sideVal{ font-weight: 1200; }
.divider{ height: 1px; background: rgba(16,24,40,0.08); margin: 12px 0; }
.sideHint{ color: var(--muted); font-size: 12px; line-height: 1.5; min-height: 1px; }

@media (max-width: 980px){
  .grid{ grid-template-columns: 1fr; }
}
@media (max-width: 520px){
  .center__value{ font-size: 62px; }
  .mini{ grid-template-columns: 1fr; }
}
