/* Commercial product palette and shared component spacing. */
:root {
  --blue: #205b9c;
  --navy: #153f70;
  --text: #23364c;
  --muted: #758599;
  --border: #dde4ec;
  --background: #f2f5f9;
  --red: #c93636;
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  font-size: 14px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--background);
}
h1,
h2,
h3,
p {
  margin: 0;
}
a {
  text-decoration: none;
  color: inherit;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #86b4e1;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
svg {
  width: 20px;
  height: 20px;
  display: block;
  flex-shrink: 0;
}
small {
  font-size: 12px;
}
.topbar {
  height: 72px;
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: var(--navy);
  color: white;
  gap: 16px;
  border-bottom: 3px solid #2866a8;
}
.topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar-brand img {
  border-radius: 6px;
}
.topbar-brand strong {
  font-size: 23px;
  letter-spacing: 1px;
}
.topbar-brand > span {
  font-size: 14px;
  color: #cfdeef;
  border-left: 1px solid #557595;
  padding-left: 16px;
  margin-left: 3px;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
}
.demo-label {
  border: 1px solid #7594b7;
  color: #d4e4f5;
  padding: 3px 7px;
  border-radius: 3px;
  font-size: 11px;
}
.login-header-text {
  color: #d0e0ef;
}
.sidebar {
  position: fixed;
  top: 72px;
  bottom: 0;
  left: 0;
  width: 204px;
  background: white;
  border-right: 1px solid var(--border);
  padding: 23px 12px;
  display: flex;
  flex-direction: column;
  z-index: 10;
}
.side-heading {
  color: #8b98a7;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 14px 17px;
}
.sidebar nav {
  display: grid;
  gap: 6px;
}
.sidebar a {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px;
  border-radius: 5px;
  color: #55677b;
  border-left: 3px solid transparent;
}
.sidebar a.active {
  background: #e8f0fa;
  border-left-color: var(--blue);
  color: var(--blue);
  font-weight: 650;
}
.sidebar a:hover {
  background: #f0f5fb;
}
.sidebar a b {
  font-size: 11px;
  background: #ffeded;
  color: var(--red);
  margin-left: auto;
  padding: 2px 6px;
  border-radius: 4px;
}
.side-foot {
  margin-top: auto;
  padding: 17px 14px 0;
  border-top: 1px solid var(--border);
}
.side-foot strong {
  font-size: 13px;
}
.side-foot p {
  margin-top: 8px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
}
.side-foot > span {
  color: #9ba6b2;
  font-size: 10px;
  display: block;
  margin-top: 16px;
}
.app-shell {
  min-height: 100vh;
}
.app-shell main {
  margin-left: 204px;
  padding: 28px 30px;
  max-width: 1750px;
  min-height: calc(100vh - 116px);
}
.page-footer {
  margin-left: 204px;
  padding: 12px 30px 20px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 11px;
  color: #98a4b3;
}
.mode-login .sidebar {
  display: none;
}
.mode-login main,
.mode-login .page-footer {
  margin-left: 0;
}
.mode-login main {
  max-width: none;
  padding: 60px 30px;
  min-height: calc(100vh - 125px);
  display: grid;
  place-items: center;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 24px;
}
.page-heading h1 {
  font-size: 25px;
  font-weight: 700;
}
.page-heading p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 8px;
}
.heading-actions,
.button-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #cbd7e4;
  background: white;
  border-radius: 5px;
  padding: 10px 16px;
  min-height: 39px;
  font-size: 13px;
  white-space: nowrap;
}
.button svg {
  width: 16px;
  height: 16px;
}
.button:hover {
  background: #edf3fa;
}
.button.primary {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
  font-weight: 600;
}
.button.primary:hover {
  background: var(--navy);
}
.button.danger {
  color: var(--red);
  border-color: #e7b4b4;
  background: #fff9f9;
}
.button.small {
  font-size: 12px;
  padding: 6px 11px;
  min-height: 30px;
}
.button.light {
  background: transparent;
  color: white;
  border-color: #7799bb;
  font-size: 12px;
  padding: 7px 12px;
  min-height: 32px;
}
.text-link {
  border: 0;
  padding: 0;
  background: none;
  color: var(--blue);
  font-size: 13px;
  cursor: pointer;
}
.icon-button {
  border: 0;
  background: none;
  font-size: 24px;
  width: 32px;
  height: 32px;
}
input,
select {
  padding: 10px 12px;
  background: white;
  border: 1px solid #d1dce7;
  border-radius: 5px;
  color: #506377;
  font-size: 13px;
}
input[type="search"] {
  min-width: 250px;
}
.login-layout {
  width: min(1100px, 100%);
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  background: white;
  border: 1px solid #d5e0ed;
  border-radius: 8px;
  box-shadow: 0 8px 30px #263f5c12;
  overflow: hidden;
  min-height: 540px;
}
.login-intro {
  padding: 56px 42px;
  background: #e9f0f8;
  border-right: 1px solid #d8e2ee;
}
.product-tag {
  color: #527698;
  font-size: 13px;
  margin-bottom: 19px;
  font-weight: 600;
}
.login-intro h1 {
  color: #183f6a;
  font-size: 32px;
  letter-spacing: 1px;
  line-height: 1.5;
}
.login-intro > p {
  color: #67839e;
  margin-top: 15px;
  line-height: 1.8;
  font-size: 14px;
}
.product-features {
  display: grid;
  gap: 20px;
  margin-top: 40px;
}
.product-features > div {
  display: flex;
  align-items: center;
  gap: 13px;
  color: #436485;
}
.product-features svg {
  color: #2b639e;
  width: 23px;
  height: 23px;
}
.login-scene {
  margin-top: 43px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  color: #89a2be;
}
.login-scene > div {
  text-align: center;
  font-size: 42px;
  color: #4e7093;
}
.login-scene svg {
  width: 42px;
  height: 42px;
  margin: 0 auto 11px;
}
.login-scene small {
  display: block;
  font-size: 11px;
  color: #7790a8;
  margin-top: 4px;
}
.intro-caption {
  margin-top: 36px;
  border-top: 1px solid #d3dfec;
  padding-top: 20px;
  color: #728aa2;
  font-size: 12px;
}
.entry-card {
  padding: 45px 40px;
}
.entry-card h2 {
  font-size: 24px;
  color: #263e58;
}
.entry-card > p {
  color: #8794a3;
  margin-top: 12px;
  font-size: 13px;
}
.entry-tabs {
  display: flex;
  margin: 28px 0 25px;
  border-bottom: 1px solid var(--border);
}
.entry-tabs button {
  width: 50%;
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 13px;
  background: none;
  font-size: 15px;
  color: #7a8999;
}
.entry-tabs button.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
  font-weight: 700;
}
.identity-options {
  display: grid;
  gap: 16px;
}
.identity-card {
  display: flex;
  align-items: center;
  gap: 15px;
  border: 1px solid #ceddeb;
  background: #f9fbfe;
  border-radius: 6px;
  padding: 22px 17px;
  text-align: left;
  width: 100%;
}
.identity-card:hover {
  border-color: var(--blue);
  background: #edf4fc;
}
.role-avatar {
  width: 44px;
  height: 44px;
  background: #deebfa;
  color: var(--blue);
  border-radius: 5px;
  display: grid;
  place-items: center;
  font-size: 20px;
  flex-shrink: 0;
}
.identity-card > span:nth-child(2) {
  flex: 1;
}
.identity-card strong {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 16px;
}
.identity-card strong b {
  font-size: 11px;
  background: #e6eef8;
  color: #627fa0;
  padding: 3px 6px;
  border-radius: 3px;
  font-weight: 500;
}
.identity-card small {
  display: block;
  margin-top: 8px;
  color: #8392a4;
}
.identity-card svg {
  color: #6085af;
  width: 18px;
}
.entry-help {
  font-size: 12px;
  color: #8c98a6;
  margin-top: 20px;
}
.demo-notice {
  background: #f3f6fa;
  border-left: 3px solid #b4c7dd;
  color: #7c8b9d;
  padding: 12px;
  font-size: 11px;
  line-height: 1.8;
  margin-top: 23px;
}
.role-description {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 15px 0;
}
.role-description h3 {
  font-size: 17px;
}
.role-description p {
  font-size: 12px;
  color: #8090a2;
  margin-top: 7px;
}
.entry-capabilities {
  margin: 20px 0 26px;
  line-height: 2.5;
  padding-left: 20px;
  color: #6d8196;
}
.enter-button {
  width: 100%;
  height: 44px;
}
.panel {
  background: white;
  border: 1px solid var(--border);
  border-radius: 7px;
  overflow: hidden;
  min-width: 0;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 23px;
  gap: 15px;
  border-bottom: 1px solid #e9eef4;
}
.panel-head h2 {
  font-size: 16px;
  font-weight: 650;
}
.panel-head h2 small {
  font-size: 11px;
  color: #8b98a8;
  font-weight: 400;
  margin-left: 8px;
}
.panel-note {
  padding: 15px 23px;
  color: #8d9bab;
  background: #fafbfd;
  font-size: 12px;
  line-height: 1.8;
  border-top: 1px solid #edf0f4;
}
.spaced {
  margin-top: 20px;
}
.metrics,
.user-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 23px;
}
.user-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.stat-card {
  background: white;
  border: 1px solid var(--border);
  border-top: 3px solid #427aaf;
  border-radius: 6px;
  padding: 21px 23px;
}
.stat-card > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.stat-card span {
  color: #75859a;
  font-size: 13px;
}
.stat-card svg {
  color: #7194bb;
}
.stat-card strong {
  display: block;
  font-size: 34px;
  color: #23486f;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  margin-top: 16px;
}
.stat-card strong small {
  font-size: 13px;
  font-weight: 400;
  color: #8a99aa;
  margin-left: 8px;
}
.stat-card p {
  color: #95a1b0;
  font-size: 11px;
  margin-top: 14px;
}
.stat-card.warning {
  border-top-color: #ca644a;
}
.stat-card.warning strong {
  color: #bf4c39;
}
.user-home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
  gap: 22px;
}
.user-side {
  display: grid;
  gap: 20px;
  align-content: start;
}
.control-panel .panel-head {
  border-bottom: 0;
  padding-bottom: 12px;
}
.meter-location {
  padding: 0 23px;
  font-size: 12px;
  color: #8897a8;
}
.control-stage {
  padding: 34px 25px 40px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 25px;
  min-height: 256px;
}
.control-status h3 {
  font-size: 21px;
  margin-top: 18px;
  color: #2d4f6d;
}
.control-status p {
  margin-top: 12px;
  color: #8b9aab;
  font-size: 13px;
  line-height: 1.7;
}
.status-dot {
  display: block;
  background: #2d9b75;
  width: 17px;
  height: 17px;
  border: 4px solid #d4eee4;
  box-sizing: content-box;
  border-radius: 50%;
}
.status-dot.red {
  background: var(--red);
  border-color: #ffe5e5;
}
.status-dot.gray {
  background: #8a98a9;
  border-color: #e9eef3;
}
.valve-control {
  min-width: 166px;
  min-height: 78px;
  background: var(--blue);
  color: white;
  border: 1px solid #174d84;
  border-radius: 6px;
  padding: 17px 25px;
  box-shadow: 0 3px 0 #143f7033;
}
.valve-control.on {
  background: var(--navy);
}
.valve-control.off {
  background: white;
  color: var(--blue);
  border-color: #709ccc;
}
.valve-control .power-symbol {
  display: none;
}
.valve-control strong {
  font-size: 19px;
  display: block;
}
.valve-control small {
  margin-top: 8px;
  display: block;
  font-size: 11px;
  opacity: 0.6;
}
.control-foot {
  display: flex;
  justify-content: space-between;
  padding: 19px 23px;
  background: #f8fafc;
  border-top: 1px solid #e9eef5;
  font-size: 12px;
  color: #90a0b2;
}
.control-foot strong {
  color: #456583;
  margin-left: 9px;
}
.control-panel.hazard {
  border-color: #e8b6b6;
}
.bill-preview {
  padding: 24px;
}
.bill-preview > span {
  font-size: 13px;
  color: #7e8fa3;
}
.bill-preview > strong {
  display: block;
  font-size: 32px;
  color: #244c75;
  margin-top: 13px;
  font-variant-numeric: tabular-nums;
}
.bill-preview > p {
  color: #90a0b2;
  font-size: 11px;
  margin-top: 12px;
  margin-bottom: 23px;
}
.security-summary {
  padding: 22px;
}
.security-summary strong {
  color: #337d68;
  font-size: 15px;
}
.security-summary p {
  color: #8b9aaa;
  font-size: 12px;
  line-height: 1.8;
  margin-top: 10px;
  margin-bottom: 18px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #eaf5ef;
  color: #318460;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  white-space: nowrap;
}
.badge i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.badge.alarm,
.badge.pending {
  background: #fff0ed;
  color: #c55c48;
}
.badge.offline {
  background: #eef1f5;
  color: #8996a5;
}
.badge.acknowledged {
  background: #edf3fa;
  color: #7087a2;
}
.badge.paid {
  background: #eaf5ef;
  color: #318460;
}
.danger-text {
  color: var(--red);
}
.subtle {
  color: #8a98aa;
  font-size: 12px;
}
.block {
  display: block;
  margin-top: 5px;
  color: #97a4b3;
  font-size: 11px;
}
.alert-strip {
  background: #fff1ee;
  border: 1px solid #f0ceca;
  border-radius: 5px;
  color: #ae5447;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 14px 18px;
  margin-bottom: 22px;
  font-size: 13px;
}
.alert-strip .text-link {
  margin-left: auto;
  color: #a94638;
}
.control-panel .alert-strip {
  margin: 0;
  border-radius: 0;
  border-inline: 0;
  border-bottom: 0;
  font-size: 11px;
}
.meter-selector {
  display: flex;
  gap: 14px;
  margin-bottom: 22px;
}
.meter-selector > button {
  flex: 1;
  border: 1px solid #d7e0ea;
  border-radius: 5px;
  padding: 17px 19px;
  background: white;
  text-align: left;
}
.meter-selector > button.active {
  border: 2px solid var(--blue);
  padding: 16px 18px;
  background: #f7faff;
}
.meter-selector strong {
  display: block;
  font-size: 14px;
}
.meter-selector > button > span {
  display: block;
  margin-top: 12px;
  color: #8d9bac;
  font-size: 11px;
}
.meter-selector .badge {
  font-size: 10px;
}
.bill-row {
  display: flex;
  gap: 22px;
  align-items: center;
  padding: 25px 23px;
  border-bottom: 1px solid #edf0f5;
}
.bill-row:last-child {
  border: 0;
}
.bill-row > div {
  flex: 1;
}
.bill-row h3 {
  font-size: 15px;
}
.bill-row p {
  color: #90a0b0;
  font-size: 12px;
  margin-top: 10px;
}
.bill-row > strong {
  font-size: 21px;
  min-width: 105px;
  color: #365b7c;
  font-variant-numeric: tabular-nums;
}
.paid-note {
  color: #8797aa;
  font-size: 12px;
  min-width: 85px;
  text-align: center;
}
.tabs {
  display: flex;
  border: 1px solid #dbe3ee;
  border-radius: 4px;
  overflow: hidden;
}
.tabs button {
  background: white;
  color: #8c9bae;
  border: 0;
  padding: 7px 12px;
  font-size: 12px;
}
.tabs button.active {
  background: #e8f0fb;
  color: var(--blue);
  font-weight: 600;
}
.usage-bars {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  height: 240px;
  padding: 28px 30px;
}
.usage-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  gap: 12px;
  color: #8c9bae;
  font-size: 11px;
}
.usage-column strong {
  color: #4f708e;
  font-size: 12px;
  font-weight: 500;
}
.usage-column > div {
  height: 135px;
  width: 27px;
  position: relative;
}
.usage-column b {
  width: 100%;
  position: absolute;
  bottom: 0;
  background: #6e9dca;
  border-radius: 3px 3px 0 0;
}
.usage-column:last-child b {
  background: var(--blue);
}
.security-banner {
  display: flex;
  align-items: center;
  gap: 19px;
  background: #eaf3f2;
  border: 1px solid #cbe2dc;
  padding: 26px;
  border-radius: 6px;
  margin-bottom: 22px;
  color: #367c6a;
}
.security-banner.alert {
  background: #fff0ed;
  border-color: #ebccc5;
  color: #b75244;
}
.security-banner > svg {
  width: 36px;
  height: 36px;
}
.security-banner h2 {
  font-size: 18px;
}
.security-banner p {
  font-size: 12px;
  margin-top: 10px;
  opacity: 0.7;
}
.meter-safety-list {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 22px;
}
.safety-card {
  padding: 23px;
}
.safety-card > div:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.safety-card h3 {
  font-size: 14px;
}
.safety-card p {
  font-size: 12px;
  margin: 17px 0;
  color: #8d9bac;
}
.admin-overview-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 22px;
  margin-bottom: 22px;
}
.trend-chart {
  width: 100%;
  height: 290px;
  padding: 20px 16px 7px;
}
.trend-chart text {
  font-size: 11px;
  fill: #91a0b1;
  font-family: inherit;
}
.map-canvas {
  position: relative;
  aspect-ratio: 8/5;
  background: #eaf0f6;
  overflow: hidden;
}
.map-schematic,
.map-base,
.map-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.map-overlay {
  z-index: 2;
}
.map-base {
  object-fit: fill;
}
.map-marker {
  cursor: pointer;
}
.map-marker:hover circle,
.map-marker:focus circle {
  stroke: #ffd87e;
  stroke-width: 5;
}
.map-source {
  position: absolute;
  z-index: 3;
  top: 12px;
  left: 12px;
  padding: 6px 9px;
  border-radius: 3px;
  font-size: 10px;
  background: #ffffffeb;
  color: #74879c;
  pointer-events: none;
}
.map-legend {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 11px;
  color: #547ca3;
}
.legend-note {
  margin-left: auto;
  color: #91a0b1;
  font-size: 10px;
}
.heat-legend {
  width: 85px;
  height: 8px;
  background: linear-gradient(90deg, #4aaeb1, #ffcd45, #ec4f38);
  border-radius: 2px;
}
.map-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.3fr) minmax(250px, 1fr);
  gap: 22px;
}
.ranking {
  padding: 0 18px;
  max-height: 560px;
  overflow: auto;
}
.ranking > button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 17px 0;
  border: 0;
  border-bottom: 1px solid #ebeff4;
  background: none;
  text-align: left;
  font-size: 13px;
}
.ranking > button > b {
  font-size: 12px;
  color: #8e9db0;
  width: 18px;
}
.ranking > button > span {
  flex: 1;
}
.ranking small {
  display: block;
  color: #9aa6b5;
  font-size: 10px;
  margin-top: 5px;
}
.ranking strong {
  color: #42668b;
  font-size: 15px;
  font-weight: 500;
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  white-space: nowrap;
}
th {
  font-size: 12px;
  color: #8292a6;
  background: #f7f9fc;
  font-weight: 500;
  padding: 15px 22px;
  border-bottom: 1px solid #e6ecf3;
}
td {
  padding: 17px 22px;
  font-size: 13px;
  color: #60758d;
  border-bottom: 1px solid #edf1f6;
}
tbody tr:hover {
  background: #f9fbfe;
}
tr:last-child td {
  border: 0;
}
.table-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 22px;
  border-top: 1px solid #e8edf4;
  color: #92a0b2;
  font-size: 12px;
}
.filters {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 23px;
  border-bottom: 1px solid #ecf0f5;
}
.empty-state {
  padding: 45px 20px;
  text-align: center;
  color: #97a5b5;
  font-size: 13px;
}
.demo-settings {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 25px;
}
.demo-settings h3 {
  font-size: 15px;
}
.demo-settings p {
  color: #90a0b1;
  font-size: 12px;
  margin-top: 10px;
}
dialog {
  width: min(510px, calc(100% - 32px));
  border: 1px solid #d4dfeb;
  border-radius: 8px;
  padding: 25px;
  box-shadow: 0 20px 60px #142f4c35;
  color: var(--text);
  max-height: 88vh;
  overflow: auto;
}
dialog::backdrop {
  background: #13284075;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 25px;
}
.modal-header h2 {
  font-size: 19px;
}
.modal-description {
  color: #7b8da3;
  font-size: 14px;
  line-height: 1.9;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 26px;
  flex-wrap: wrap;
}
.alarm-modal {
  text-align: center;
}
.alarm-modal-icon {
  height: 65px;
  width: 65px;
  color: white;
  background: #cf4444;
  border: 5px solid #fff0f0;
  border-radius: 50%;
  font-size: 40px;
  font-weight: 600;
  margin: 0 auto 20px;
}
.alarm-modal h3 {
  color: #b73535;
  font-size: 23px;
}
.alarm-modal > p {
  color: #8493a5;
  margin-top: 12px;
  font-size: 13px;
}
.alarm-modal-note {
  background: #fff3f1;
  color: #ba6658;
  padding: 17px;
  line-height: 1.9;
  margin-top: 24px;
  font-size: 12px;
}
.payment-preview {
  text-align: center;
  padding: 15px 0;
}
.payment-preview > span {
  font-size: 13px;
  color: #8394a8;
}
.payment-preview strong {
  display: block;
  font-size: 38px;
  color: #285f92;
  margin-top: 20px;
}
.payment-preview p {
  color: #92a0b0;
  margin-top: 18px;
  font-size: 12px;
}
.payment-success {
  text-align: center;
  font-size: 45px;
  color: #2e9773;
  padding: 10px 0 30px;
}
.payment-success h3 {
  font-size: 21px;
  margin-top: 10px;
}
.payment-success p {
  color: #8596aa;
  font-size: 12px;
  margin-top: 15px;
}
.full-width {
  width: 100%;
}
.detail-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #8d9bae;
  font-size: 12px;
  margin-bottom: 23px;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.detail-grid > div {
  background: #f3f6fa;
  padding: 17px;
  border-radius: 4px;
}
.detail-grid span {
  display: block;
  color: #8b9cb0;
  font-size: 12px;
}
.detail-grid strong {
  display: block;
  color: #416185;
  font-size: 18px;
  margin-top: 13px;
  font-weight: 500;
}
#toasts {
  position: fixed;
  z-index: 99;
  bottom: 25px;
  right: 25px;
  display: grid;
  gap: 10px;
}
.toast {
  background: #234666;
  color: white;
  padding: 15px 20px;
  border-radius: 6px;
  font-size: 13px;
  max-width: 350px;
  box-shadow: 0 5px 20px #14304b25;
}
.toast.error {
  background: #ad4d40;
}
/* Mobile customer controls are deliberately large and easy to press. */
@media (max-width: 1200px) {
  .admin-overview-grid {
    grid-template-columns: 1fr;
  }
  .map-page-grid {
    grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr);
  }
  .meter-safety-list {
    grid-template-columns: 1fr 1fr;
  }
  .control-stage {
    flex-direction: column;
    text-align: center;
  }
  .status-dot {
    margin: auto;
  }
  .control-stage {
    min-height: 280px;
  }
  .stat-card {
    padding: 18px;
  }
}
@media (max-width: 900px) {
  .sidebar {
    width: 175px;
    padding-inline: 8px;
  }
  .app-shell main {
    margin-left: 175px;
    padding: 24px 20px;
  }
  .page-footer {
    margin-left: 175px;
    padding-inline: 20px;
  }
  .user-home-grid {
    grid-template-columns: 1fr;
  }
  .user-side {
    grid-template-columns: 1fr 1fr;
  }
  .login-layout {
    grid-template-columns: 1fr 1fr;
  }
  .login-intro {
    padding: 40px 25px;
  }
  .login-intro h1 {
    font-size: 27px;
  }
  .entry-card {
    padding: 35px 25px;
  }
  .login-scene > span {
    font-size: 9px;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .map-page-grid {
    grid-template-columns: 1fr;
  }
  .map-legend {
    flex-wrap: wrap;
  }
  .legend-note {
    width: 100%;
    margin: 0;
  }
}
@media (max-width: 680px) {
  .topbar {
    height: 65px;
    padding: 0 15px;
  }
  .topbar-brand {
    gap: 8px;
  }
  .topbar-brand strong {
    font-size: 19px;
  }
  .topbar-brand > span {
    display: none;
  }
  .topbar-brand img {
    width: 30px;
    height: 30px;
  }
  .topbar-right {
    gap: 9px;
  }
  .current-user {
    display: none;
  }
  .login-header-text {
    font-size: 10px;
  }
  .sidebar {
    top: auto;
    bottom: 0;
    width: 100%;
    border: 0;
    border-top: 1px solid #d1dce8;
    height: 64px;
    padding: 0;
    background: white;
    z-index: 30;
  }
  .side-heading,
  .side-foot {
    display: none;
  }
  .sidebar nav {
    display: flex;
    gap: 0;
    height: 100%;
    overflow-x: auto;
  }
  .sidebar a {
    flex: 1;
    min-width: 68px;
    padding: 8px 9px;
    border: 0;
    flex-direction: column;
    gap: 5px;
    font-size: 10px;
    border-radius: 0;
    justify-content: center;
    white-space: nowrap;
  }
  .sidebar a svg {
    height: 18px;
    width: 18px;
  }
  .sidebar a b {
    display: none;
  }
  .sidebar a.active {
    background: #eaf2fc;
  }
  .app-shell main {
    margin-left: 0;
    padding: 20px 15px 28px;
    min-height: calc(100vh - 160px);
  }
  .page-footer {
    margin-left: 0;
    padding: 10px 15px 83px;
    font-size: 9px;
    flex-direction: column;
    gap: 5px;
  }
  .mode-login main {
    padding: 22px 15px;
  }
  .mode-login .page-footer {
    padding-bottom: 20px;
  }
  .login-layout {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  .login-intro {
    padding: 25px;
    border-right: 0;
    border-bottom: 1px solid #dce5ef;
  }
  .login-intro h1 {
    font-size: 25px;
  }
  .login-intro > p {
    font-size: 12px;
    margin-top: 10px;
  }
  .product-tag {
    font-size: 11px;
    margin-bottom: 10px;
  }
  .product-features,
  .login-scene,
  .intro-caption {
    display: none;
  }
  .entry-card {
    padding: 27px 23px;
  }
  .entry-card h2 {
    font-size: 22px;
  }
  .entry-card > p {
    font-size: 12px;
  }
  .entry-tabs {
    margin-top: 22px;
  }
  .identity-card {
    padding: 19px 14px;
    gap: 12px;
  }
  .identity-card strong {
    font-size: 15px;
  }
  .identity-card strong b {
    font-size: 9px;
  }
  .identity-card small {
    font-size: 11px;
  }
  .role-avatar {
    height: 39px;
    width: 39px;
    font-size: 18px;
  }
  .page-heading {
    flex-wrap: wrap;
    margin-bottom: 19px;
    align-items: flex-start;
  }
  .page-heading h1 {
    font-size: 22px;
  }
  .page-heading p {
    font-size: 12px;
  }
  .heading-actions {
    flex-wrap: wrap;
    width: 100%;
  }
  .heading-actions .button {
    padding: 8px 12px;
    font-size: 12px;
  }
  .user-metrics {
    gap: 8px;
    margin-bottom: 18px;
  }
  .stat-card {
    padding: 16px 11px;
  }
  .stat-card span {
    font-size: 11px;
  }
  .stat-card strong {
    font-size: 24px;
    margin-top: 13px;
  }
  .stat-card strong small {
    font-size: 10px;
    margin-left: 3px;
  }
  .stat-card p {
    font-size: 9px;
    line-height: 1.6;
    margin-top: 10px;
  }
  .metrics {
    gap: 10px;
  }
  .user-home-grid,
  .user-side {
    grid-template-columns: 1fr;
    gap: 17px;
  }
  .panel-head {
    padding: 18px;
    gap: 10px;
  }
  .panel-head h2 {
    font-size: 14px;
  }
  .meter-location {
    padding-inline: 18px;
  }
  .control-stage {
    padding: 23px 15px 35px;
    gap: 27px;
  }
  .control-status h3 {
    font-size: 20px;
    margin-top: 12px;
  }
  .control-status p {
    font-size: 12px;
    margin-top: 8px;
  }
  .valve-control {
    height: 184px;
    width: 184px;
    min-width: 0;
    border-radius: 50%;
    padding: 20px;
    border: 8px solid #e2ecf8;
    box-shadow: 0 4px 0 #ccd9e8;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
  }
  .valve-control.off {
    border-color: #e1e8f1;
    box-shadow: 0 4px 0 #d7dfe9;
  }
  .valve-control .power-symbol {
    display: block;
    position: relative;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    margin-bottom: 8px;
  }
  /* 几何图形绘制电源图标，避免手机字体缺少字形。 */
  .power-symbol .power-ring {
    position: absolute;
    left: 3px;
    bottom: 0;
    width: 42px;
    height: 42px;
    border: 4px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
  }
  .power-symbol .power-line {
    position: absolute;
    left: 22px;
    top: 0;
    width: 4px;
    height: 25px;
    background: currentColor;
    border-radius: 3px;
  }
  .valve-control strong {
    font-size: 20px;
  }
  .valve-control small {
    font-size: 10px;
    margin-top: 8px;
  }
  .control-foot {
    padding: 15px 18px;
    font-size: 10px;
    gap: 10px;
  }
  .control-foot strong {
    margin-left: 4px;
  }
  .meter-selector {
    gap: 8px;
    overflow-x: auto;
  }
  .meter-selector > button {
    min-width: 145px;
    padding: 14px 12px;
  }
  .meter-selector > button.active {
    padding: 13px 11px;
  }
  .meter-selector strong {
    font-size: 12px;
  }
  .meter-selector .badge {
    font-size: 9px;
  }
  .bill-row {
    padding: 20px 18px;
    gap: 13px;
    flex-wrap: wrap;
  }
  .bill-row > div {
    min-width: calc(100% - 120px);
  }
  .bill-row h3 {
    font-size: 14px;
  }
  .bill-row p {
    font-size: 11px;
  }
  .bill-row > strong {
    font-size: 20px;
    min-width: 90px;
  }
  .bill-row > .button {
    margin-left: auto;
  }
  .tabs button {
    font-size: 10px;
    padding: 7px 10px;
  }
  .usage-bars {
    padding: 25px 18px;
    gap: 6px;
  }
  .usage-column > div {
    width: 20px;
  }
  .usage-column span {
    font-size: 10px;
  }
  .security-banner {
    padding: 20px 17px;
    gap: 12px;
  }
  .security-banner h2 {
    font-size: 16px;
  }
  .security-banner p {
    font-size: 11px;
    line-height: 1.7;
  }
  .meter-safety-list {
    grid-template-columns: 1fr;
  }
  .alert-strip {
    padding: 12px;
    font-size: 11px;
    gap: 9px;
    flex-wrap: wrap;
  }
  .alert-strip > span {
    display: none;
  }
  .map-panel .panel-head {
    flex-wrap: wrap;
  }
  .map-source {
    font-size: 8px;
    padding: 4px 6px;
    top: 7px;
    left: 7px;
  }
  .map-legend {
    padding: 12px 16px;
    font-size: 10px;
    gap: 10px;
  }
  .trend-chart {
    height: 230px;
    padding-inline: 5px;
  }
  .admin-overview-grid {
    gap: 18px;
  }
  .filters {
    padding: 15px;
    gap: 8px;
    flex-wrap: wrap;
  }
  input[type="search"] {
    min-width: 150px;
    width: 100%;
  }
  th,
  td {
    padding: 14px 16px;
    font-size: 11px;
  }
  .demo-settings {
    padding: 20px;
    flex-wrap: wrap;
  }
  #toasts {
    left: 15px;
    right: 15px;
    bottom: 82px;
  }
  .toast {
    max-width: none;
  }
  .mode-login #toasts {
    bottom: 20px;
  }
  .detail-status {
    flex-wrap: wrap;
  }
  .detail-grid > div {
    padding: 14px;
  }
  .detail-grid strong {
    font-size: 15px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
