:root {
  --ink: #134e4a;
  --muted: #3f6864;
  --paper: #f0fdfa;
  --card: #ffffff;
  --line: #99f6e4;
  --line-strong: #5eead4;
  --primary: #0f766e;
  --accent: #14b8a6;
  --cta: #0d5c56;
  --wash: #ecfdf8;
  --danger: #b45309;
  --ok: #047857;
  --info: #0369a1;
  --warn: #b45309;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(15, 118, 110, 0.08);
  --mono: Consolas, "Courier New", monospace;
  font-family: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--paper); color: var(--ink); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); }
body { min-height: 100vh; display: flex; flex-direction: column; }
button, .cta, a, .nav a { cursor: pointer; transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease; }
@media (prefers-reduced-motion: reduce) {
  button, .cta, a, .nav a { transition: none; }
}

/* —— Shell —— */
.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  background: var(--primary);
  color: #fff;
  border-bottom: 3px solid var(--cta);
}
.topbar a, .topbar .mark { color: #fff; text-decoration: none; font-weight: 700; }
.brand-mark { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark img { height: 28px; width: auto; }
.brand-meta { display: flex; flex-direction: column; gap: 0; line-height: 1.15; }
.brand-meta small {
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.85;
}
.nav { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.nav a {
  color: #fff;
  text-decoration: none;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
}
.nav a:hover, .nav a:focus-visible { background: rgba(255,255,255,0.12); outline: none; }
.nav button, .topbar button {
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 6px;
  background: transparent;
  color: #fff;
  font-size: 14px;
}
.nav button:hover { background: rgba(255,255,255,0.12); }

.stage {
  flex: 1;
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 20px 16px 48px;
}
.skin-portal .stage,
.skin-admin .stage { width: min(1280px, 100%); }

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.foot a { color: var(--muted); }

/* —— Public marketing site (skin-site only) —— */
.skin-site {
  background: #ecfdf8;
}
.skin-site .topbar {
  position: relative;
  z-index: 20;
  padding: 16px 24px;
}
.skin-site:has(.site-hero) .topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
  border-bottom: 0;
}
.skin-site .topbar .nav a:hover,
.skin-site .topbar .nav a:focus-visible {
  background: rgba(255, 255, 255, 0.14);
}
.skin-site .stage {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}
.skin-site .foot {
  background: #0d5c56;
  color: rgba(255, 255, 255, 0.82);
  border-top: 0;
  padding: 20px 24px;
}
.skin-site .foot a { color: #fff; }
.skin-site .foot p { margin: 0; }

.site-hero {
  position: relative;
  min-height: min(92vh, 860px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: #fff;
}
.site-hero-media {
  position: absolute;
  inset: 0;
}
.site-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.04);
  animation: site-hero-drift 28s ease-in-out alternate infinite;
}
.site-hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(13, 92, 86, 0.72) 0%, rgba(15, 118, 110, 0.38) 48%, rgba(15, 118, 110, 0.08) 78%, transparent 100%),
    linear-gradient(180deg, rgba(13, 92, 86, 0.28) 0%, transparent 40%, rgba(13, 92, 86, 0.42) 100%);
}
.site-hero-inner {
  position: relative;
  z-index: 2;
  width: min(720px, 100%);
  padding: 120px 24px 64px;
  animation: site-rise 700ms ease-out both;
}
.site-brand {
  margin: 0 0 18px;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}
.site-brand span { color: #5eead4; }
.site-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(1.7rem, 4.2vw, 2.65rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  max-width: 16ch;
}
.site-lead {
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.55;
  max-width: 38ch;
  color: rgba(255, 255, 255, 0.92);
}
.site-hero .hero-actions { margin-top: 28px; }
.site-hero .cta {
  background: #fff;
  color: var(--cta);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}
.site-hero .cta:hover {
  background: #f0fdfa;
  color: var(--primary);
}
.site-hero .cta.ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: none;
  margin-left: 0;
}
.site-hero .cta.ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.site-wrap {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 0 20px 72px;
}
.site-section {
  padding-top: 64px;
  animation: site-rise 800ms ease-out both;
}
.site-section-head {
  max-width: 40rem;
  margin-bottom: 28px;
}
.site-section-head h2 {
  margin: 0 0 10px;
  font-size: clamp(1.45rem, 3vw, 2rem);
  letter-spacing: -0.02em;
}
.site-section-head p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.55;
}
.site-split {
  display: grid;
  gap: 20px;
}
.site-pillar {
  padding: 8px 0 4px;
  border-top: 3px solid var(--primary);
}
.site-pillar.water { border-top-color: #0369a1; }
.site-pillar h3 {
  margin: 0 0 10px;
  font-size: 1.25rem;
}
.site-pillar p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}
.site-pillar ul {
  margin: 16px 0 0;
  padding-left: 1.15rem;
  color: var(--ink);
  line-height: 1.5;
}
.site-pillar li { margin: 6px 0; }

.site-audience {
  display: grid;
  gap: 28px;
}
.site-audience article {
  padding: 0 0 4px;
  border-top: none;
  display: grid;
  gap: 10px;
}
.site-audience-photo {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--wash);
  border: 1px solid var(--line);
  aspect-ratio: 4 / 3;
}
.site-audience-photo img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
}
.site-audience .kicker {
  margin: 4px 0 0;
}
.site-audience h3 {
  margin: 0 0 4px;
  font-size: 1.15rem;
}
.site-audience p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.site-why-grid {
  display: grid;
  gap: 24px;
}
.site-why-grid article {
  padding: 20px 22px;
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.site-why-grid h3 {
  margin: 0 0 12px;
  font-size: 1.05rem;
}
.site-why-grid ul {
  margin: 0;
  padding-left: 1.15rem;
  line-height: 1.55;
  color: var(--ink);
}
.site-why-grid li { margin: 8px 0; }
.site-why-grid article:last-child {
  background: #f0fdfa;
  border-color: #99f6e4;
}

.site-steps {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: grid;
  gap: 18px;
  max-width: 44rem;
}
.site-steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: start;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
}
.site-steps h3 {
  margin: 2px 0 6px;
  font-size: 1.1rem;
}
.site-steps p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.site-platform {
  display: grid;
  gap: 18px;
}
.site-platform article {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.site-platform h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
}
.site-platform p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.site-close {
  margin-top: 16px;
  padding: 36px 24px;
  background: linear-gradient(160deg, #0f766e 0%, #0d5c56 100%);
  color: #fff;
  border-radius: var(--radius);
}
.site-close .kicker { color: #99f6e4; }
.site-close .site-section-head h2 { color: #fff; }
.site-close .site-section-head p:last-child {
  color: rgba(255, 255, 255, 0.9);
}
.site-close .cta {
  background: #fff;
  color: var(--cta);
}
.site-close .cta:hover {
  background: #f0fdfa;
  color: var(--primary);
}
.site-close .cta.ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.55);
}
.site-close .cta.ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.site-close-note {
  margin: 20px 0 0;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.45;
}
.site-close-note a {
  color: #ccfbf1;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.site-contact-flash {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.95rem;
  line-height: 1.4;
}
.site-contact-flash.ok {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}
.site-contact-flash.err {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.site-contact-form {
  margin-top: 8px;
  max-width: 720px;
}
.site-contact-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.site-contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}
.site-contact-form label {
  margin: 0;
  color: #ecfdf5;
  font-size: 0.85rem;
  font-weight: 600;
}
.site-contact-form input,
.site-contact-form select,
.site-contact-form textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  font-size: 16px;
  font-family: inherit;
  box-sizing: border-box;
}
.site-contact-form textarea {
  min-height: 112px;
  resize: vertical;
}
.site-contact-form input:focus-visible,
.site-contact-form select:focus-visible,
.site-contact-form textarea:focus-visible {
  outline: 2px solid #5eead4;
  outline-offset: 2px;
}
.site-contact-span { grid-column: 1 / -1; }
.site-contact-actions {
  margin-top: 20px;
  flex-wrap: wrap;
}
.site-contact-actions .cta[type="submit"] {
  border: none;
  font: inherit;
  cursor: pointer;
}
@media (max-width: 640px) {
  .site-contact-grid {
    grid-template-columns: 1fr;
  }
  .site-contact-actions .cta,
  .site-contact-actions .cta.ghost {
    width: 100%;
  }
}

.site-proof-band { padding-top: 48px; }
.site-proof-grid {
  display: grid;
  gap: 28px;
}
.site-proof-grid img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  margin-bottom: 16px;
}
.site-proof-grid h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}
.site-proof-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.site-offer {
  margin-top: 24px;
  padding: 36px 0 8px;
  border-top: 1px solid var(--line);
}
.site-invoice-list {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: grid;
  gap: 0;
  max-width: 36rem;
}
.site-invoice-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 1rem;
}
.site-invoice-list span { font-weight: 700; color: var(--ink); }
.site-invoice-list em {
  font-style: normal;
  color: var(--muted);
}

@keyframes site-rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes site-hero-drift {
  from { transform: scale(1.04) translate3d(0, 0, 0); }
  to { transform: scale(1.08) translate3d(-1.5%, -1%, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .site-hero-media img,
  .site-hero-inner,
  .site-section {
    animation: none;
  }
  .site-hero-media img { transform: none; }
}
@media (min-width: 840px) {
  .site-split,
  .site-proof-grid,
  .site-why-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .site-audience { grid-template-columns: 1fr 1fr; gap: 28px 36px; }
  .site-platform { grid-template-columns: 1fr 1fr; gap: 8px 36px; }
  .site-hero-inner { padding: 140px 48px 80px; }
  .site-close { padding: 44px 40px; }
}
@media (max-width: 640px) {
  .skin-site .topbar { padding: 12px; }
  .skin-site .topbar .nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    justify-content: flex-start;
  }
  .site-hero { min-height: 86vh; }
  .site-hero-inner { padding: 108px 16px 48px; }
  .site-wrap { padding: 0 16px 56px; }
  .site-section { padding-top: 48px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .site-hero .cta,
  .site-hero .cta.ghost,
  .site-close .cta,
  .site-close .cta.ghost { width: 100%; }
  .site-close { padding: 28px 16px; }
}

/* —— Page chrome —— */
.page-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 16px;
}
.page-head h1 { margin: 0; font-size: 1.5rem; }
.page-head .lede { margin: 4px 0 0; color: var(--muted); font-size: 14px; max-width: 56ch; }
.eyebrow {
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  overflow: hidden;
}
.panel-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--wash);
}
.panel-head h2 { margin: 0; font-size: 0.95rem; letter-spacing: 0.02em; }
.panel-body { padding: 0; }
.panel-body.padded { padding: 16px; }

/* —— KPI strip —— */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.kpi {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.kpi .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 700;
}
.kpi .value {
  margin-top: 6px;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
}
.kpi .hint { margin-top: 6px; font-size: 12px; color: var(--muted); }

/* —— Badges —— */
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.badge-ok { background: #ecfdf5; color: var(--ok); border-color: #a7f3d0; }
.badge-info { background: #eff6ff; color: var(--info); border-color: #bfdbfe; }
.badge-warn { background: #fffbeb; color: var(--warn); border-color: #fde68a; }
.badge-neutral { background: var(--wash); color: var(--primary); border-color: var(--line); }
.badge-electric { background: #f0fdfa; color: var(--primary); border-color: var(--line-strong); }
.badge-water { background: #eff6ff; color: var(--info); border-color: #bfdbfe; }

.mono { font-family: var(--mono); font-size: 12px; }

/* —— Tables —— */
.data-table-wrap { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.data-table th,
.data-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.data-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: #fff;
  white-space: nowrap;
}
.data-table tbody tr:hover { background: var(--wash); }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table .empty { color: var(--muted); padding: 20px 14px; }

@media (max-width: 720px) {
  .data-table thead { display: none; }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
  .data-table tr {
    border-bottom: 1px solid var(--line);
    padding: 10px 0;
  }
  .data-table td {
    border: 0;
    padding: 4px 14px;
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 8px;
  }
  .data-table td::before {
    content: attr(data-label);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    font-weight: 700;
  }
  .data-table .num { text-align: left; }
}

/* —— Shared marketing / auth / legal —— */
.legal, .auth-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 16px;
}
.skin-site .legal {
  width: min(720px, 100%);
  margin: 96px auto 48px;
}
.kicker {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
  margin: 0 0 8px;
}
h1, h2, h3 { margin-top: 0; line-height: 1.2; }
.cta, .auth-card button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 0;
  border-radius: 6px;
  background: var(--cta);
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
}
.cta:hover, .auth-card button:hover { background: var(--primary); }
.cta.ghost {
  background: transparent;
  color: var(--cta);
  border: 1px solid var(--cta);
  margin-left: 8px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }

.auth-card { max-width: 420px; margin: 48px auto; }
.auth-card .product-chip {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--wash);
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary);
}
label { display: block; margin: 12px 0; font-size: 13px; font-weight: 600; }
input {
  width: 100%;
  min-height: 44px;
  margin-top: 6px;
  padding: 10px 12px;
  font-size: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
}
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.error { color: var(--danger); font-weight: 600; }

.invoice-lines {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--muted);
}
.invoice-lines li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  border-bottom: 1px dashed var(--line);
}

@media (max-width: 640px) {
  .topbar, .foot, .stage { padding-left: 12px; padding-right: 12px; }
  .cta.ghost { margin-left: 0; }
}

/* —— Ops / MDM chrome (sidecar + accordion) —— */
.skin-admin .stage:has(.ops-shell) {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.ops-shell {
  display: flex;
  width: 100%;
  flex: 1;
  align-items: stretch;
  min-height: calc(100vh - 72px);
  position: relative;
}
.ops-sidecar {
  width: 248px;
  flex-shrink: 0;
  background: var(--card);
  border-right: 1px solid var(--line);
  padding: 0 0 24px;
  position: sticky;
  top: 0;
  align-self: flex-start;
  max-height: 100vh;
  overflow-y: auto;
  z-index: 30;
}
.ops-sidecar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line);
}
.ops-sidecar-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.ops-nav-close,
.ops-nav-toggle {
  min-height: 40px;
  min-width: 44px;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
}
.ops-nav-close {
  border-color: var(--line-strong);
  color: var(--ink);
  background: #fff;
}
.ops-nav-toggle:hover,
.ops-nav-close:hover {
  background: rgba(255, 255, 255, 0.12);
}
.ops-nav-close:hover { background: var(--wash); }
.ops-sidecar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(19, 78, 74, 0.35);
  z-index: 25;
  cursor: pointer;
}
.ops-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 10px 0;
  margin: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}
.ops-nav-section {
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
}
.ops-nav-section.is-active-section {
  background: var(--wash);
  border-color: var(--line);
}
.ops-nav-section > summary {
  list-style: none;
  cursor: pointer;
  min-height: 44px;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  user-select: none;
}
.ops-nav-section > summary::-webkit-details-marker { display: none; }
.ops-nav-section > summary::after {
  content: "";
  width: 0.45em;
  height: 0.45em;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 160ms ease;
  flex-shrink: 0;
}
.ops-nav-section[open] > summary::after {
  transform: rotate(-135deg);
  margin-top: 4px;
}
.ops-nav-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 6px 8px;
}
.ops-nav a {
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
}
.ops-nav a:hover, .ops-nav a.is-active {
  background: #fff;
  color: var(--primary);
  box-shadow: var(--shadow);
}
.ops-nav a.is-active {
  outline: 1px solid var(--line-strong);
}
.ops-main {
  flex: 1;
  min-width: 0;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 16px 48px;
}
@media (min-width: 901px) {
  .ops-nav-toggle,
  .ops-nav-close,
  .ops-sidecar-backdrop { display: none !important; }
  .ops-sidecar-head { border-bottom: 0; padding-bottom: 0; }
}
@media (max-width: 900px) {
  .ops-shell { min-height: auto; }
  .ops-sidecar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(300px, 88vw);
    max-height: none;
    transform: translateX(-105%);
    transition: transform 200ms ease;
    box-shadow: 4px 0 24px rgba(15, 118, 110, 0.18);
  }
  .ops-shell.is-nav-open .ops-sidecar { transform: translateX(0); }
  .ops-shell.is-nav-open .ops-sidecar-backdrop { display: block; }
  .ops-main { padding: 16px 12px 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .ops-sidecar,
  .ops-nav-section > summary::after { transition: none; }
}
.badge-suspect { background: #fff1f2; color: #be123c; border-color: #fecdd3; }
.badge-estimated { background: #fffbeb; color: var(--warn); border-color: #fde68a; }
.badge-verified { background: #ecfdf5; color: var(--ok); border-color: #a7f3d0; }
.badge-tamper { background: #fef2f2; color: #991b1b; border-color: #fecaca; }

.heatmap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10px, 1fr));
  gap: 2px;
  padding: 12px 16px 16px;
}
.heatmap .cell {
  aspect-ratio: 1;
  border-radius: 2px;
  background: #ccfbf1;
  min-height: 10px;
}
.heatmap .cell.q-verified { background: #5eead4; }
.heatmap .cell.q-estimated { background: #fbbf24; }
.heatmap .cell.q-suspect,
.heatmap .cell.q-tamper { background: #f87171; }
.heatmap .cell.q-empty { background: #e2e8f0; }
.meta-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  padding: 16px;
}
.meta-grid dt { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin: 0; }
.meta-grid dd { margin: 2px 0 0; font-size: 14px; }
.burn-bar {
  height: 10px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
  margin-top: 8px;
}
.burn-bar > span {
  display: block;
  height: 100%;
  background: var(--primary);
}
.notice-trail { font-size: 13px; color: var(--muted); }
.notice-trail li { margin: 4px 0; }
.field-expand {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 10px 16px 14px;
  padding: 10px 12px;
  background: #fff;
}
.field-expand > summary {
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}
.field-expand .muted { color: var(--muted); font-weight: 500; font-size: 13px; }
.btn-secondary {
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: not-allowed;
  opacity: 0.7;
}
.panel-body.padded { padding: 16px; }
@media (max-width: 640px) {
  .heatmap { grid-template-columns: repeat(auto-fill, minmax(8px, 1fr)); }
}

/* —— Setup console + day-2 forms —— */
.setup-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 20px;
}
.setup-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  color: var(--muted);
}
.setup-step.is-active {
  background: var(--wash);
  color: var(--primary);
  border-color: #99f6e4;
}
.setup-step.is-done {
  color: var(--ok);
  border-color: #a7f3d0;
}
.setup-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.setup-checklist li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  min-height: 44px;
}
.setup-checklist .ok { color: var(--ok); font-weight: 700; }
.setup-checklist .bad { color: #be123c; font-weight: 700; }
.stack-form {
  display: grid;
  gap: 12px;
}
.stack-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.stack-form input,
.stack-form select,
.stack-form textarea {
  min-height: 44px;
  font-size: 16px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font-family: inherit;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.stack-form button,
.btn-sm {
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.btn-sm { font-size: 12px; min-height: 36px; }
.btn-sm.btn-warn { background: var(--warn); }
.grid-form {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: end;
}
.org-profile-form {
  display: grid;
  gap: 16px;
}
.org-profile-form.grid-form {
  display: grid;
}
.field-hint {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
time[data-local-time] {
  white-space: nowrap;
}

.org-section {
  border: 1px solid var(--border, #d7dee8);
  border-radius: 10px;
  padding: 12px 14px 16px;
  margin: 0;
  min-width: 0;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px 16px;
  background: var(--panel-soft, #f7fafc);
}
.org-section legend {
  padding: 0 6px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--ink, #0f172a);
}
.badge-local {
  background: #e0f2fe;
  color: #075985;
}
.check-row {
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.check-row input { width: auto; min-height: 20px; }
.action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 16px;
  margin-top: 20px;
}
.action-row form {
  margin: 0;
  display: flex;
}
.action-row button,
.action-row .cta {
  min-height: 44px;
  padding: 10px 16px;
  box-sizing: border-box;
}
.golive-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  max-width: 280px;
  gap: 16px;
}
.golive-actions form {
  width: 100%;
  margin: 0 0 16px;
}
.golive-actions form:last-child {
  margin-bottom: 0;
}
.golive-actions button,
.golive-actions .cta {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.flash {
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  margin: 0 0 14px;
  font-size: 14px;
}
.flash.ok { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.flash.err { background: #fff1f2; border-color: #fecdd3; color: #9f1239; }
.flash.warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.flash-token-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
}
.flash-token-text {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  min-width: 0;
  flex: 1 1 200px;
}
.flash-token-text .mono {
  word-break: break-all;
}
.flash-token-row .btn-outline {
  flex: 0 0 auto;
  margin-left: auto;
}
.portal-estimate-banner { margin-top: 0; }
.btn-outline {
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--line-strong, #99f6e4);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn-outline:hover,
.btn-outline:focus-visible {
  border-color: var(--primary, #0f766e);
  color: var(--primary, #0f766e);
  outline: 2px solid #99f6e4;
  outline-offset: 2px;
}
.invoice-lines {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.invoice-lines li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.invoice-lines li:last-child { border-bottom: 0; }
.portal-invoice-drawer-root {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
}
.portal-invoice-drawer-root.is-open { pointer-events: auto; }
.portal-invoice-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.portal-invoice-drawer-root.is-open .portal-invoice-backdrop { opacity: 1; }
.portal-invoice-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: min(420px, 100%);
  height: 100%;
  background: #fff;
  box-shadow: -8px 0 28px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.22s ease;
  overflow: auto;
}
.portal-invoice-drawer.is-open { transform: translateX(0); }
.portal-invoice-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}
.portal-invoice-drawer-head h2 {
  margin: 4px 0 0;
  font-size: 1.2rem;
}
.portal-invoice-drawer-body {
  padding: 16px 18px 28px;
}
.portal-invoice-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 0 0 12px;
}
body.portal-drawer-open { overflow: hidden; }
@media (max-width: 640px) {
  .portal-invoice-drawer {
    width: 100%;
    top: auto;
    bottom: 0;
    height: min(88vh, 720px);
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
  }
  .portal-invoice-drawer.is-open { transform: translateY(0); }
}
.pay-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0;
}
.pay-inline select {
  min-height: 44px;
  font-size: 16px;
  max-width: 100%;
}
.pay-inline .cta {
  min-height: 44px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.row-critical { background: #fff7f7; }
.badge-hold { background: #f1f5f9; color: #334155; border-color: #cbd5e1; }
.invoice-print .meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}
.invoice-print .meta-grid dt { font-size: 11px; text-transform: uppercase; color: var(--muted); margin: 0; }
.invoice-print .meta-grid dd { margin: 4px 0 0; font-weight: 600; }
@media print {
  .topbar, .ops-sidecar, .ops-nav-toggle, .no-print, .page-head .action-row { display: none !important; }
  .ops-shell { display: block; }
  .ops-main { max-width: none; padding: 0; }
  .stage { max-width: none; padding: 0; }
  .panel { border: 0; box-shadow: none; }
}
@media (max-width: 640px) {
  .grid-form { grid-template-columns: 1fr; }
  .action-row { max-width: none; }
  .action-row form { flex: 1 1 100%; }
  .action-row button,
  .action-row .cta { width: 100%; }
  .golive-actions { max-width: none; }
  .pay-inline { flex-direction: column; align-items: stretch; }
  .pay-inline select,
  .pay-inline .cta { width: 100%; }
}

/* —— Portal PWA install sheet (website never installs) —— */
.pwa-install {
  z-index: 40;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line-strong);
  box-shadow: 0 8px 24px rgba(15, 118, 110, 0.18);
}
.pwa-install-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px 20px calc(16px + env(safe-area-inset-bottom, 0px));
  border-radius: 16px 16px 0 0;
  transform: translateY(110%);
  transition: transform 280ms ease;
}
.pwa-install-sheet.is-open { transform: translateY(0); }
.pwa-install[hidden] { display: none; }
.pwa-install-handle {
  display: block;
  width: 40px;
  height: 4px;
  margin: 0 auto 12px;
  border-radius: 999px;
  background: var(--line-strong);
}
.pwa-install-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.pwa-install-actions .cta,
.pwa-install-actions .btn-ghost {
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 16px;
}
.pwa-install-actions .btn-ghost {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
}
.pwa-install-ios { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
#pwa-notice-badge:empty,
#pwa-notice-badge[hidden] { display: none; }
#pwa-notice-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  min-height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #b45309;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.portal-notices-list { list-style: none; margin: 0; padding: 0; }
.portal-notices-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.portal-notices-list li:last-child { border-bottom: 0; }
.portal-notices-list .unread { font-weight: 600; }
.downlink-queue table { width: 100%; }
.status-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--line);
}
.status-pill.ok { background: #ecfdf5; color: var(--ok); }
.status-pill.warn { background: #fff7ed; color: var(--warn); }
.status-pill.err { background: #fef2f2; color: #b91c1c; }
@media (min-width: 720px) {
  .pwa-install-sheet {
    left: 50%;
    right: auto;
    width: min(420px, calc(100% - 32px));
    bottom: 24px;
    border-radius: 12px;
    transform: translate(-50%, 110%);
  }
  .pwa-install-sheet.is-open { transform: translate(-50%, 0); }
  .pwa-install-sheet .pwa-install-handle { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pwa-install-sheet { transition: none; }
}

/* Ops tariffs — volume-tiered (SDM630) schedule inputs */
.tariff-subhead {
  margin: 1rem 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
}
.tariff-form .tariff-volume {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--line);
}
.tariff-form .muted.small {
  font-size: 0.85rem;
  line-height: 1.4;
}
.tariff-simple-toggle {
  margin: 12px 0 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--wash, #f0fdfa);
}
.toggle-switch {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  cursor: pointer;
  margin: 0;
}
.toggle-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.toggle-track {
  position: relative;
  flex: 0 0 52px;
  width: 52px;
  height: 32px;
  margin-top: 2px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background 0.15s ease;
}
.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.25);
  transition: transform 0.15s ease;
}
.toggle-switch input:checked + .toggle-track {
  background: var(--primary, #0f766e);
}
.toggle-switch input:checked + .toggle-track .toggle-thumb {
  transform: translateX(20px);
}
.toggle-switch input:focus-visible + .toggle-track {
  outline: 2px solid #99f6e4;
  outline-offset: 2px;
}
.toggle-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.toggle-copy strong {
  font-size: 15px;
  color: var(--ink);
}
.toggle-copy .muted {
  font-size: 13px;
  line-height: 1.35;
  font-weight: 500;
}
.tariff-form .tariff-flat {
  display: block;
  margin-bottom: 12px;
}
.tariff-form .tariff-flat[hidden] {
  display: none !important;
}

/* Header icon action (meter edit pencil, etc.) */
.ops-icon-btn {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--primary, #0f766e);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  flex: 0 0 auto;
}
.ops-icon-btn:hover,
.ops-icon-btn:focus-visible {
  border-color: #99f6e4;
  background: #f0fdfa;
  outline: 2px solid #99f6e4;
  outline-offset: 2px;
}
.ops-icon-btn svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.meter-head-tools {
  align-items: center;
}
.meter-head-tools .ops-icon-btn {
  margin-left: 4px;
}
@media (max-width: 640px) {
  .meter-head-tools .ops-icon-btn {
    margin-left: 0;
    width: 100%;
    max-width: none;
  }
}

/* Meter Controls drawer (side sheet) */
.meter-controls-drawer-root {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
}
.meter-controls-drawer-root.is-open { pointer-events: auto; }
.meter-controls-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.meter-controls-drawer-root.is-open .meter-controls-backdrop { opacity: 1; }
.meter-controls-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: min(400px, 100%);
  height: 100%;
  background: #fff;
  box-shadow: -8px 0 28px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.22s ease;
  overflow: auto;
}
.meter-controls-drawer.is-open { transform: translateX(0); }
.meter-controls-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: #f0fdfa;
  z-index: 1;
}
.meter-controls-drawer-head h2 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--ink, #0f172a);
}
.meter-controls-drawer-body {
  padding: 16px 18px 28px;
}
body.meter-controls-open { overflow: hidden; }
.note-field-wrap {
  position: relative;
  display: block;
}
.note-field-wrap input {
  width: 100%;
  padding-right: 44px;
  box-sizing: border-box;
}
.note-field-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  stroke: var(--primary, #0f766e);
  fill: none;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
  opacity: 0.85;
}
@media (max-width: 640px) {
  .meter-controls-drawer {
    width: 100%;
    top: auto;
    bottom: 0;
    height: min(92vh, 720px);
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
  }
  .meter-controls-drawer.is-open { transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .meter-controls-drawer,
  .meter-controls-backdrop {
    transition: none;
  }
}

/* Ops FAB — add tenant / meter (circle + bottom-right) */
.ops-fab {
  position: fixed;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: max(16px, env(safe-area-inset-bottom, 0px));
  z-index: 60;
  width: 56px;
  height: 56px;
  min-width: 56px;
  min-height: 56px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--primary, #0f766e);
  color: #fff;
  box-shadow: 0 4px 16px rgba(15, 118, 110, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ops-fab:hover,
.ops-fab:focus-visible {
  background: #0d9488;
  outline: 2px solid #99f6e4;
  outline-offset: 2px;
}
.ops-fab svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
}
.ops-fab-dialog {
  width: min(520px, calc(100vw - 32px));
  max-height: min(90vh, 720px);
  margin: auto;
  padding: 0 20px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
  overflow: auto;
}
.ops-fab-dialog--wide {
  width: min(640px, calc(100vw - 32px));
  max-height: min(92vh, 860px);
}
.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}
.dialog-actions .cta,
.dialog-actions .btn-outline {
  min-height: 44px;
  margin: 0;
}
.tariff-edit-open {
  min-height: 44px;
  white-space: nowrap;
}
.ops-fab-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}
.ops-fab-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 0 -20px 16px;
  padding: 16px 20px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.ops-fab-dialog-head h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}
.ops-fab-close {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.ops-fab-close:hover,
.ops-fab-close:focus-visible {
  color: var(--ink);
  border-color: #99f6e4;
}
@media (max-width: 640px) {
  .ops-fab {
    right: max(12px, env(safe-area-inset-right, 0px));
    bottom: max(12px, env(safe-area-inset-bottom, 0px));
  }
  .ops-fab-dialog,
  .ops-fab-dialog--wide {
    width: calc(100vw - 24px);
    padding: 0 16px 16px;
  }
  .ops-fab-dialog-head {
    margin: 0 -16px 12px;
    padding: 14px 16px;
  }
  .dialog-actions {
    flex-direction: row;
    width: 100%;
  }
  .dialog-actions .cta,
  .dialog-actions .btn-outline {
    flex: 1 1 calc(50% - 6px);
  }
}
@media print {
  .ops-fab { display: none !important; }
}

/* —— MDM meter board / fleet (v2.9) —— */
.mdm-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: 16px;
  margin-bottom: 16px;
  align-items: start;
}
.mdm-side { display: flex; flex-direction: column; gap: 16px; }
.mdm-kpis.mdm-electric .kpi:first-child { border-top: 3px solid var(--accent); }
.mdm-kpis.mdm-water .kpi:first-child { border-top: 3px solid #38bdf8; }
.portal-meter-kpis {
  margin: 10px 0 12px;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}
.profile-chart {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 120px;
  width: 100%;
  padding: 4px 0 0;
}
.profile-chart.mini { height: 48px; margin-top: 10px; }
.profile-bar {
  flex: 1 1 0;
  min-width: 2px;
  height: var(--h, 8%);
  border-radius: 2px 2px 0 0;
  background: var(--accent);
  opacity: 0.9;
}
.profile-bar.q-estimated { background: #fbbf24; }
.profile-bar.q-suspect,
.profile-bar.q-tamper,
.profile-bar.q-hold { background: #f87171; }
.profile-legend { margin: 8px 0 0; font-size: 12px; }
.heatmap-intensity .cell.i-0 { opacity: 0.35; }
.heatmap-intensity .cell.i-1 { opacity: 0.55; }
.heatmap-intensity .cell.i-2 { opacity: 0.75; }
.heatmap-intensity .cell.i-3 { opacity: 0.9; }
.heatmap-intensity .cell.i-4 { opacity: 1; box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.25); }
.heatmap-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}
.heatmap-legend .hl::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 4px;
  vertical-align: -1px;
}
.heatmap-legend .hl.verified::before { background: #5eead4; }
.heatmap-legend .hl.estimated::before { background: #fbbf24; }
.heatmap-legend .hl.suspect::before { background: #f87171; }
.panel-head.sub-head { border-top: 1px solid var(--line); background: #fff; }
.meta-grid.tight { padding: 0 0 12px; gap: 8px; }
.control-form { margin-top: 8px; }
.command-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.command-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 12px;
}
.mdm-meta > summary { cursor: pointer; list-style: none; }
.mdm-meta > summary::-webkit-details-marker { display: none; }
.fleet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.fleet-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  min-height: 160px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.fleet-card:hover,
.fleet-card:focus-visible {
  border-color: var(--line-strong);
  box-shadow: 0 4px 14px rgba(15, 118, 110, 0.12);
  outline: none;
}
.fleet-card.fleet-electric { border-top: 3px solid var(--accent); }
.fleet-card.fleet-water { border-top: 3px solid #38bdf8; }
.fleet-card-top {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.fleet-serial {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 2px;
}
.fleet-loc { font-size: 12px; margin-bottom: 10px; }
.fleet-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.fleet-stats .label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 700;
}
.fleet-stats strong { display: block; font-size: 0.95rem; margin-top: 2px; }
.fleet-stats .unit { font-size: 11px; color: var(--muted); }
.fleet-empty { margin: 10px 0 0; font-size: 12px; }
.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: 14px;
}
@media (max-width: 900px) {
  .mdm-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .fleet-stats { grid-template-columns: 1fr 1fr; }
  .profile-chart { height: 88px; }
  .meter-head .action-row { width: 100%; }
}

/* —— Meter parameter graphs (v3.1) —— */
.param-product { margin-bottom: 16px; }
.param-lede { margin: 0 0 12px; font-size: 14px; }
.param-kpis {
  margin: 0 0 10px;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
}
.param-status {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.param-chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.param-chart-card .panel-body { min-height: 140px; }
.series-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--muted);
}
.series-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.series-legend-item i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
}
.series-legend-item strong { color: var(--ink); font-weight: 700; }
.series-chart {
  width: 100%;
  height: 72px;
  background: linear-gradient(180deg, rgba(15, 118, 110, 0.04), transparent 70%);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.series-svg { display: block; width: 100%; height: 72px; }
.field-chip-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 220px;
  overflow: auto;
}
.field-chip-list li {
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  color: #0f766e;
}
@media (max-width: 640px) {
  .param-chart-grid { grid-template-columns: 1fr; }
  .param-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Settings gear + hub (v3.5) */
.ops-sidecar {
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
}
.ops-nav { flex: 1 1 auto; }
.ops-sidecar-foot {
  margin-top: auto;
  position: sticky;
  bottom: 0;
  padding: 10px;
  border-top: 1px solid var(--line);
  background: var(--card);
  z-index: 1;
}
.ops-settings-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}
.ops-settings-link:hover,
.ops-settings-link.is-active {
  background: var(--wash);
  color: var(--brand, #0f766e);
}
.ops-settings-gear {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 14px;
  margin: 0 0 24px;
}
.settings-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
}
.settings-card.is-primary {
  border-color: var(--brand, #0f766e);
  box-shadow: 0 0 0 1px rgba(15, 118, 110, 0.12);
}
.settings-card h2 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}
.settings-card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.95rem;
}
.settings-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.settings-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-weight: 600;
}
.security-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.security-row:last-child { border-bottom: 0; }
.totp-secret {
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  word-break: break-all;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}
.auth-alt {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.auth-alt-label {
  margin: 0 0 10px;
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}
.auth-alt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.btn-oauth {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 96px;
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid var(--line-strong, var(--line));
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn-oauth:hover { background: var(--wash); }
.btn-oauth.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.plain-list { margin: 0; padding-left: 1.1rem; }
.passkey-list { list-style: none; padding: 0; margin: 16px 0 0; }
.break-all { word-break: break-all; }
