:root {
  color-scheme: light;
  --bg: #f6efe4;
  --bg-soft: #fbf7f0;
  --card: #fffdfa;
  --card-warm: #fff7eb;
  --text: #332b24;
  --muted: #817469;
  --line: #eadfce;
  --shadow: 0 18px 46px rgba(98, 74, 49, 0.11);
  --good: #7ca982;
  --good-bg: #e8f2e6;
  --warn: #d99b47;
  --warn-bg: #fff1d7;
  --bad: #c96b5b;
  --bad-bg: #fde5df;
  --unknown: #9aa0a6;
  --unknown-bg: #eceef0;
  --blue: #6d9fb6;
  --blue-bg: #e5f2f5;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
  background:
    radial-gradient(circle at 8% 0%, rgba(255, 211, 150, 0.32), transparent 28rem),
    radial-gradient(circle at 92% 4%, rgba(137, 181, 177, 0.24), transparent 25rem),
    var(--bg);
  color: var(--text);
}

button {
  font: inherit;
}

.page-nav {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}

.page-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 8px 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
}

.page-nav a.active {
  color: var(--text);
  background: rgba(255, 253, 250, 0.86);
  border-color: var(--line);
}

.power-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.range-control {
  display: flex;
  padding: 4px;
  border-radius: 8px;
  background: rgba(255, 253, 250, 0.72);
  border: 1px solid var(--line);
}

.range-control button,
.legend-item {
  border: 0;
  cursor: pointer;
  color: var(--muted);
  background: transparent;
}

.range-control button {
  min-height: 34px;
  padding: 0 11px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
}

.range-control button.active {
  color: var(--text);
  background: white;
  box-shadow: 0 2px 10px rgba(98, 74, 49, 0.12);
}

.power-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.power-kpi,
.power-panel {
  background: rgba(255, 253, 250, 0.88);
  border: 1px solid rgba(234, 223, 206, 0.9);
  box-shadow: var(--shadow);
  border-radius: 8px;
}

.power-kpi {
  min-height: 108px;
  padding: 14px;
}

.power-kpi span,
.power-kpi small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.power-kpi strong {
  display: block;
  margin: 11px 0 9px;
  font-size: 24px;
}

.phase-panel {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  margin-bottom: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(234, 223, 206, 0.9);
  border-radius: 8px;
  background: rgba(255, 253, 250, 0.88);
  box-shadow: var(--shadow);
}

.phase-heading {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--line);
}

.phase-heading p {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.phase-heading h2 {
  margin: 0;
  font-size: 18px;
}

.phase-heading > span {
  color: var(--muted);
  font-size: 11px;
}

.phase-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.phase-item {
  min-width: 0;
  padding: 8px 12px;
  background: var(--card);
}

.phase-name {
  display: flex;
  align-items: center;
  gap: 7px;
}

.phase-name i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--phase-color);
}

.phase-current {
  display: block;
  margin: 7px 0 4px;
  font-size: 20px;
}

.phase-item > span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.power-panel {
  padding: 16px;
}

.chart-panel {
  margin-bottom: 10px;
}

.billing-calendar-panel {
  margin-bottom: 10px;
}

.billing-calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.calendar-nav {
  display: grid;
  grid-template-columns: 32px 110px 32px;
  align-items: center;
  gap: 4px;
}

.calendar-nav strong {
  text-align: center;
  font-size: 14px;
}

.calendar-nav button {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: var(--card);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.calendar-nav button:disabled {
  color: var(--line);
  cursor: default;
}

.billing-month-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
  border-block: 1px solid var(--line);
}

.billing-month-summary > div {
  min-width: 0;
  padding: 11px 14px;
  border-right: 1px solid var(--line);
}

.billing-month-summary > div:last-child {
  border-right: 0;
}

.billing-month-summary span,
.billing-day-detail span,
.billing-day-detail small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.billing-month-summary strong {
  display: block;
  margin-top: 5px;
  font-size: 18px;
}

.billing-weekdays,
.billing-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.billing-weekdays span {
  padding: 0 8px 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.billing-calendar {
  gap: 4px;
}

.calendar-cell {
  min-width: 0;
  min-height: 98px;
  padding: 9px;
  border: 1px solid transparent;
  border-radius: 6px;
}

.calendar-day {
  position: relative;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.calendar-day.low { background: var(--good-bg); }
.calendar-day.mid { background: var(--warn-bg); }
.calendar-day.high { background: var(--bad-bg); }

.calendar-day.active {
  border-color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(51, 43, 36, 0.12);
}

.calendar-cell > span,
.calendar-cell > strong,
.calendar-cell > small {
  display: block;
}

.calendar-cell > span {
  color: var(--muted);
  font-size: 11px;
}

.calendar-cell > strong {
  margin-top: 9px;
  font-size: 17px;
}

.calendar-cell > small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.calendar-day > i {
  position: absolute;
  right: 9px;
  bottom: 9px;
  left: 9px;
  height: 3px;
  overflow: hidden;
  background: rgba(109, 159, 182, 0.32);
}

.calendar-day > i b {
  display: block;
  height: 100%;
  background: var(--warn);
}

.calendar-missing {
  background: rgba(255, 253, 250, 0.55);
}

.calendar-missing strong {
  color: var(--line);
}

.billing-day-detail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.billing-day-detail > div {
  min-width: 0;
  padding: 2px 14px;
  border-right: 1px solid var(--line);
}

.billing-day-detail > div:first-child {
  padding-left: 0;
}

.billing-day-detail > div:last-child {
  border-right: 0;
}

.billing-day-detail strong {
  display: block;
  margin: 5px 0 3px;
  font-size: 16px;
}

.billing-empty {
  grid-column: 1 / -1;
}

.power-section-head {
  margin-bottom: 12px;
}

.power-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
}

.legend-item i,
.circuit-row > i {
  display: block;
  background: var(--line-color);
}

.legend-item i {
  width: 16px;
  height: 3px;
  opacity: 0.35;
}

.legend-item.active {
  color: var(--text);
  background: white;
}

.legend-item.active i {
  opacity: 1;
}

.chart-wrap {
  width: 100%;
  min-height: 280px;
  aspect-ratio: 2.8 / 1;
  overflow: hidden;
}

.chart-wrap svg {
  display: block;
  width: 100%;
  height: 100%;
}

.chart-wrap text {
  fill: var(--muted);
  font-size: 12px;
}

.chart-grid {
  stroke: var(--line);
  stroke-width: 1;
}

.power-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.75fr);
  gap: 10px;
}

.circuit-list,
.reading-list {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.circuit-row {
  display: grid;
  grid-template-columns: 4px minmax(180px, 1fr) minmax(190px, auto);
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  background: var(--card);
}

.circuit-row > i {
  width: 4px;
  height: 34px;
  border-radius: 2px;
}

.circuit-row strong,
.circuit-row span {
  display: block;
}

.circuit-row span,
.circuit-values span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.circuit-values {
  text-align: right;
}

.reading-list > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px;
  background: var(--card);
}

.reading-list span {
  color: var(--muted);
  font-size: 13px;
}

.reading-total {
  color: var(--text);
  background: var(--good-bg) !important;
}

.calibration-note {
  margin-top: 12px;
  padding: 12px;
  border-left: 3px solid var(--blue);
  background: var(--blue-bg);
}

.calibration-note p,
.power-notes p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.tariff-status {
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 800;
}

.power-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 10px;
}

.power-notes p {
  margin: 0;
}

.shell {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 42px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 12px;
}

.greeting,
.status-kicker,
.section-head p {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1;
  letter-spacing: 0;
}

.home-line {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.mode-pill {
  min-width: 132px;
  padding: 14px 16px;
  border-radius: 24px;
  background: rgba(255, 253, 250, 0.72);
  border: 1px solid rgba(234, 223, 206, 0.9);
  box-shadow: var(--shadow);
}

.mode-pill span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.mode-pill strong {
  font-size: 22px;
}

.hero-card,
.summary-card,
.wide-panel,
.device-banner,
.room-card {
  background: rgba(255, 253, 250, 0.86);
  border: 1px solid rgba(234, 223, 206, 0.86);
  box-shadow: var(--shadow);
}

.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 0.88fr);
  gap: 12px;
  align-items: stretch;
  min-height: 126px;
  border-radius: 24px;
  padding: 16px;
  margin-bottom: 10px;
}

.hero-card.good { background: linear-gradient(135deg, #fffdfa, var(--good-bg)); }
.hero-card.warn { background: linear-gradient(135deg, #fffdfa, var(--warn-bg)); }
.hero-card.bad { background: linear-gradient(135deg, #fffdfa, var(--bad-bg)); }
.hero-card.unknown { background: linear-gradient(135deg, #fffdfa, var(--unknown-bg)); }

.hero-card h2 {
  margin: 0;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.06;
}

.hero-card p {
  color: var(--muted);
}

.hero-card > div > p:last-child {
  font-size: 12px;
  line-height: 1.5;
  margin: 10px 0 0;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.hero-metrics div {
  display: flex;
  min-height: 78px;
  flex-direction: column;
  justify-content: space-between;
  padding: 11px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.82);
}

.hero-metrics span,
.summary-card span,
.room-meta span {
  color: var(--muted);
  font-size: 12px;
}

.hero-metrics strong {
  font-size: clamp(18px, 1.55vw, 23px);
  line-height: 1;
  white-space: nowrap;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.summary-card {
  min-height: 92px;
  padding: 12px;
  border-radius: 20px;
}

.summary-card strong {
  display: block;
  font-size: 16px;
  margin: 7px 0 5px;
}

.summary-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.38;
}

.summary-card.good { background: linear-gradient(160deg, var(--card), var(--good-bg)); }
.summary-card.warn { background: linear-gradient(160deg, var(--card), var(--warn-bg)); }
.summary-card.bad { background: linear-gradient(160deg, var(--card), var(--bad-bg)); }
.summary-card.unknown { background: linear-gradient(160deg, var(--card), var(--unknown-bg)); }

.section-main,
.wide-panel,
.device-banner {
  border-radius: 22px;
  padding: 14px;
}

.section-main {
  background: rgba(251, 247, 240, 0.55);
}

.wide-panel,
.device-banner {
  margin-bottom: 14px;
}

.device-banners {
  display: grid;
  gap: 14px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 16px;
}

.section-head.compact {
  align-items: start;
  margin-bottom: 12px;
}

.section-head h2 {
  margin: 0;
  font-size: 21px;
}

.section-head h2 span {
  display: inline-flex;
  vertical-align: middle;
  margin-left: 8px;
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--muted);
  font-size: 13px;
}

.section-head span {
  color: var(--muted);
  font-size: 13px;
}

.room-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.room-card {
  cursor: pointer;
  min-height: 212px;
  border-radius: 30px;
  padding: 18px;
  text-align: left;
  color: inherit;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.room-card:hover {
  transform: translateY(-2px);
}

.room-card.good { background: linear-gradient(150deg, var(--card), var(--good-bg)); }
.room-card.warn { background: linear-gradient(150deg, var(--card), var(--warn-bg)); }
.room-card.bad { background: linear-gradient(150deg, var(--card), var(--bad-bg)); }
.room-card.unknown { background: linear-gradient(150deg, var(--card), var(--unknown-bg)); }

.room-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.room-top strong {
  font-size: 19px;
}

.state-chip {
  display: inline-flex;
  max-width: 118px;
  justify-content: center;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.state-chip.good { background: rgba(124, 169, 130, 0.18); color: #476f4d; }
.state-chip.warn { background: rgba(217, 155, 71, 0.2); color: #895a16; }
.state-chip.bad { background: rgba(201, 107, 91, 0.18); color: #964b3e; }
.state-chip.unknown { background: rgba(154, 160, 166, 0.2); color: #62686f; }

.room-reading {
  margin: 24px 0 18px;
  font-size: 23px;
  font-weight: 800;
}

.room-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.room-meta div {
  border: 1px solid rgba(234, 223, 206, 0.78);
  background: rgba(255, 255, 255, 0.48);
}

.room-meta div {
  border-radius: 18px;
  padding: 10px;
}

.room-meta strong {
  display: block;
  margin-top: 4px;
}

.weather-main {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.weather-main h2 {
  margin: 0;
  font-size: 22px;
}

.weather-main p {
  margin: 8px 0 0;
  color: var(--muted);
}

.weather-condition {
  display: grid;
  grid-template-columns: 110px minmax(250px, 1fr);
  align-items: center;
  gap: 10px;
  flex: 0 0 440px;
  border-radius: 20px;
  padding: 10px 12px;
  background: var(--good-bg);
}

.weather-condition span,
.weather-metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.weather-condition strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
  line-height: 1;
}

.weather-condition em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}

.weather-compact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin-top: 0;
}

.weather-compact b {
  display: flex;
  justify-content: space-between;
  gap: 5px;
  align-items: center;
  overflow: hidden;
  border-radius: 10px;
  min-width: 0;
  padding: 5px 7px;
  background: rgba(255, 255, 255, 0.52);
  font-size: 11px;
  line-height: 1;
}

.weather-compact span,
.weather-compact strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weather-compact strong {
  flex: 0 0 auto;
  color: var(--text);
  display: block;
  margin-top: 0;
  font-size: 13px;
  line-height: 1;
}

.banner-devices {
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.banner-devices::-webkit-scrollbar {
  display: none;
}

.weather-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(142px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.weather-metric {
  border-radius: 16px;
  min-width: 0;
  min-height: 48px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(234, 223, 206, 0.78);
}

.weather-metric.good { background: var(--good-bg); }
.weather-metric.warn { background: var(--warn-bg); }
.weather-metric.bad { background: var(--bad-bg); }
.weather-metric.blue { background: var(--blue-bg); }

.weather-metric strong {
  display: block;
  margin-top: 0;
  overflow-wrap: anywhere;
  line-height: 1.15;
  font-size: 14px;
}

.weather-metric {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.banner-room {
  min-width: 184px;
  min-height: 82px;
  border-radius: 16px;
  padding: 9px;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(234, 223, 206, 0.78);
}

.banner-devices {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(2, minmax(82px, auto));
  grid-auto-columns: 184px;
}

.banner-room.active {
  background: var(--blue-bg);
  border-color: rgba(109, 159, 182, 0.38);
}

.banner-room-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}

.banner-room-head strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.banner-room-head span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.banner-room-devices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.banner-room-devices span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  border-radius: 999px;
  padding: 4px 6px;
  color: var(--muted);
  background: rgba(129, 116, 105, 0.1);
  font-size: 11px;
  line-height: 1;
}

.banner-room-devices span.active {
  color: #476f4d;
  background: rgba(124, 169, 130, 0.24);
}

.banner-room-devices span.unknown {
  color: #62686f;
  background: rgba(154, 160, 166, 0.2);
}

.weather-advice {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(52, 43, 36, 0.22);
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 100%);
  height: 100vh;
  overflow: auto;
  padding: 22px;
  background: var(--bg-soft);
  box-shadow: -24px 0 60px rgba(56, 43, 29, 0.18);
  transform: translateX(100%);
  transition: transform 180ms ease;
}

.drawer.open {
  transform: translateX(0);
}

.drawer-close {
  float: right;
  border: 0;
  border-radius: 999px;
  background: var(--card);
  padding: 9px 13px;
  color: var(--muted);
}

.drawer h2 {
  margin: 46px 0 8px;
  font-size: 34px;
}

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

.drawer-card h3 {
  margin: 0 0 12px;
}

.empty {
  color: var(--muted);
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.48);
}

@media (max-width: 980px) {
  .hero-card,
  .device-banners {
    grid-template-columns: 1fr;
  }
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .room-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .power-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .power-layout {
    grid-template-columns: 1fr;
  }
  .billing-month-summary,
  .billing-day-detail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .billing-month-summary > div:nth-child(2),
  .billing-day-detail > div:nth-child(2) {
    border-right: 0;
  }
  .billing-month-summary > div:nth-child(-n + 2),
  .billing-day-detail > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 20px, 1220px);
    padding-top: 18px;
  }
  .topbar {
    display: block;
  }
  .power-header {
    display: block;
  }
  .range-control {
    margin-top: 14px;
    overflow-x: auto;
  }
  .power-kpis {
    grid-template-columns: 1fr;
  }
  .billing-calendar-head {
    align-items: flex-end;
  }
  .calendar-nav {
    grid-template-columns: 30px 88px 30px;
  }
  .calendar-nav button {
    width: 30px;
    height: 30px;
  }
  .billing-month-summary > div {
    padding: 9px 7px;
  }
  .billing-month-summary strong {
    font-size: 16px;
  }
  .billing-calendar {
    gap: 2px;
  }
  .billing-weekdays span {
    padding-inline: 2px;
  }
  .calendar-cell {
    min-height: 60px;
    padding: 6px;
  }
  .calendar-cell > strong {
    margin-top: 7px;
    font-size: 12px;
  }
  .calendar-cell > small,
  .calendar-day > i {
    display: none;
  }
  .billing-day-detail > div {
    padding: 9px 7px;
  }
  .billing-day-detail > div:first-child {
    padding-left: 7px;
  }
  .phase-panel {
    grid-template-columns: 1fr;
  }
  .phase-heading {
    flex-direction: row;
    align-items: end;
    border-right: 0;
  }
  .phase-grid {
    grid-template-columns: 1fr;
  }
  .phase-item {
    display: grid;
    grid-template-columns: 64px minmax(92px, auto) minmax(0, 1fr);
    gap: 8px;
    align-items: center;
  }
  .phase-current {
    margin: 0;
  }
  .phase-item > span {
    text-align: right;
  }
  .chart-wrap {
    min-height: 250px;
    aspect-ratio: 1.35 / 1;
    overflow-x: auto;
  }
  .chart-wrap svg {
    min-width: 720px;
  }
  .circuit-row {
    grid-template-columns: 4px minmax(0, 1fr);
  }
  .circuit-values {
    grid-column: 2;
    text-align: left;
  }
  .mode-pill {
    margin-top: 16px;
  }
  .hero-card {
    border-radius: 28px;
    padding: 20px;
  }
  .hero-metrics,
  .summary-grid,
  .room-grid {
    grid-template-columns: 1fr;
  }
  .section-main,
  .wide-panel,
  .device-banner {
    padding: 14px;
    border-radius: 24px;
  }
  .weather-main {
    display: block;
  }
  .weather-condition {
    margin-top: 14px;
  }
}
