.energy-module {
  min-width: 0;
  color: #18262c;
}

.energy-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.energy-toolbar-spacer {
  flex: 1;
}

#energySettingsBtn {
  min-height: 44px;
  background: #ffffff;
}

.energy-date-range,
.energy-type-filter {
  display: flex;
  align-items: center;
  min-height: 44px;
  border: 1px solid #dce6e4;
  border-radius: 9px;
  background: #ffffff;
  color: #52636b;
}

.energy-date-range {
  gap: 7px;
  padding: 0 10px;
}

.energy-date-range > svg {
  width: 17px;
  height: 17px;
  color: #40555e;
}

.energy-date-range label,
.energy-type-filter {
  position: relative;
}

.energy-date-range label > span,
.energy-type-filter > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.energy-date-range input,
.energy-type-filter select {
  min-height: 38px;
  border: 0;
  background: transparent;
  color: #263740;
  font: inherit;
  font-size: 13px;
}

.energy-date-range input {
  width: 124px;
  padding: 0 4px;
}

.energy-type-filter select {
  min-width: 138px;
  padding: 0 34px 0 14px;
}

.energy-metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.energy-metric {
  display: grid;
  grid-column: span 2;
  grid-template-columns: minmax(0, 1fr) 58px;
  align-items: center;
  gap: 20px;
  min-height: 148px;
  padding: 24px 26px;
  border: 1px solid #dfe8e7;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(32, 69, 65, 0.055);
}

.energy-metric:nth-child(n + 4) {
  grid-column: span 3;
  min-height: 138px;
}

.energy-metric small {
  display: block;
  margin-bottom: 12px;
  color: #34464e;
  font-size: 15px;
  font-weight: 700;
}

.energy-metric strong {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: #12766e;
  font-size: clamp(30px, 2.5vw, 42px);
  line-height: 1;
  letter-spacing: -0.03em;
}

.energy-metric strong em {
  color: #42545c;
  font-size: 13px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0;
}

.energy-metric .metric-note {
  margin-top: 10px;
  color: #76868d;
  font-size: 13px;
}

.energy-metric-action {
  margin-top: 9px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #167a71;
  font-size: 12px;
  font-weight: 750;
}

.energy-metric-action:hover {
  text-decoration: underline;
}

.energy-metric .metric-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #eef7f5;
  color: #168178;
}

.energy-metric .metric-icon svg {
  width: 24px;
  height: 24px;
}

.energy-metric.water strong,
.energy-metric.water .metric-icon {
  color: #337fc7;
}

.energy-metric.water .metric-icon {
  background: #edf5fb;
}

.energy-metric.gas strong,
.energy-metric.gas .metric-icon {
  color: #8359bd;
}

.energy-metric.gas .metric-icon {
  background: #f4effb;
}

.energy-metric.cost strong,
.energy-metric.cost .metric-icon {
  color: #e87422;
}

.energy-metric.cost .metric-icon {
  background: #fff4ea;
}

.energy-metric.deviation.over strong,
.energy-metric.deviation.over .metric-icon {
  color: #df4646;
}

.energy-metric.deviation.over .metric-icon {
  background: #fff0f0;
}

.energy-metric.deviation.under strong,
.energy-metric.deviation.under .metric-icon {
  color: #23816f;
}

.energy-metric.deviation.under .metric-icon {
  background: #edf7f4;
}

.energy-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(320px, 0.8fr);
  gap: 12px;
  margin-bottom: 12px;
}

.energy-panel {
  min-width: 0;
  border: 1px solid #dfe8e7;
  border-radius: 10px;
  background: #ffffff;
}

.energy-trend-panel {
  display: flex;
  flex-direction: column;
}

.energy-trend-panel .energy-panel-head > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.energy-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px 12px;
}

.energy-panel-head h2 {
  color: #1a2b32;
  font-size: 18px;
}

.energy-panel-head p {
  margin-top: 4px;
  color: #78878e;
  font-size: 12px;
}

.energy-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 13px;
  color: #5d6c73;
  font-size: 12px;
}

.energy-chart-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.energy-period-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, 34px);
  overflow: hidden;
  border: 1px solid #d8e2e1;
  border-radius: 7px;
  background: #fff;
}

.energy-period-switch button {
  min-height: 34px;
  border: 0;
  background: transparent;
  color: #53646c;
  font-weight: 750;
}

.energy-period-switch button[aria-pressed="true"] {
  background: #137d74;
  color: #fff;
}

.energy-legend span::before {
  display: inline-block;
  width: 18px;
  height: 3px;
  margin-right: 6px;
  border-radius: 999px;
  background: currentColor;
  content: "";
  vertical-align: middle;
}

.energy-legend .electricity {
  color: #177d74;
}

.energy-legend .water {
  color: #3c83cb;
}

.energy-legend .gas {
  color: #8b63c7;
}

.energy-legend .cost {
  color: #ed7623;
}

.energy-chart-wrap {
  flex: 1;
  min-height: 306px;
  padding: 0 16px;
}

#energyTrendCanvas {
  display: block;
  width: 100%;
  height: 100%;
}

.energy-chart-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin: 0 18px;
  padding: 12px 0 15px;
  border-top: 1px solid #e8eeed;
  color: #4f6068;
  font-size: 12px;
}

.energy-chart-summary strong {
  color: #24363e;
}

.energy-text-button {
  min-height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #137b72;
  font-size: 12px;
  font-weight: 750;
}

.energy-text-button:hover {
  color: #0a5d56;
  text-decoration: underline;
}

.energy-alert-list {
  display: grid;
  gap: 10px;
  padding: 0 14px 14px;
}

.energy-alert {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  padding: 13px;
  border: 1px solid #efd9d5;
  border-radius: 8px;
  background: #fffafa;
}

.energy-alert.medium {
  border-color: #efdfc7;
  background: #fffcf6;
}

.energy-alert.low {
  border-color: #eadfca;
  background: #fffdf8;
}

.energy-alert > svg {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: #dc4444;
}

.energy-alert.medium > svg,
.energy-alert.low > svg {
  color: #e68a24;
}

.energy-alert-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.energy-alert-head strong {
  color: #273940;
  font-size: 14px;
}

.energy-alert-head span {
  padding: 2px 6px;
  border-radius: 4px;
  background: #ffe8e6;
  color: #d74444;
  font-size: 10px;
  font-weight: 750;
}

.energy-alert p {
  margin: 7px 0;
  color: #5d6d74;
  font-size: 12px;
  line-height: 1.55;
}

.energy-alert-meta {
  display: grid;
  gap: 3px;
  color: #849197;
  font-size: 11px;
}

.energy-alert-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 9px;
}

.energy-alert-actions button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #9ec6c1;
  border-radius: 6px;
  background: #ffffff;
  color: #126e66;
  font-size: 11px;
  font-weight: 700;
}

.energy-alert-actions button:disabled {
  border-color: #d9e3e1;
  color: #8b999e;
}

.energy-table-wrap {
  overflow-x: auto;
  border-top: 1px solid #e6eceb;
}

.energy-ranking-table {
  width: 100%;
  min-width: 1260px;
  border-collapse: collapse;
  color: #3b4c54;
  font-size: 12px;
}

.energy-ranking-table th,
.energy-ranking-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #ebf0ef;
  text-align: left;
  white-space: nowrap;
}

.energy-ranking-table th {
  background: #fbfcfc;
  color: #6f7d84;
  font-size: 11px;
  font-weight: 750;
}

.energy-ranking-table tbody tr:last-child td {
  border-bottom: 0;
}

.energy-ranking-total td {
  background: #fbfdfd;
  color: #24363e;
}

.energy-rank-badge {
  display: inline-grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #e8efee;
  color: #6d7b81;
  font-size: 11px;
  font-weight: 800;
}

.energy-ranking-table tr:nth-child(1) .energy-rank-badge {
  background: #f7c84e;
  color: #ffffff;
}

.energy-ranking-table tr:nth-child(2) .energy-rank-badge {
  background: #bcc6cc;
  color: #ffffff;
}

.energy-ranking-table tr:nth-child(3) .energy-rank-badge {
  background: #e7a56b;
  color: #ffffff;
}

.energy-share {
  display: inline-grid;
  grid-template-columns: minmax(42px, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-width: 112px;
}

.energy-share-track {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f0;
}

.energy-share-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #39958c;
}

.energy-share.water .energy-share-track span {
  background: #5d9edd;
}

.energy-share.gas .energy-share-track span {
  background: #936fca;
}

.energy-share.cost .energy-share-track span {
  background: #eb812f;
}

.energy-change.up {
  color: #df4545;
}

.energy-change.down {
  color: #168073;
}

.energy-change.neutral {
  color: #87969c;
  font-weight: 650;
}

.energy-change svg {
  width: 12px;
  height: 12px;
  margin-left: 3px;
  vertical-align: -2px;
  transform: rotate(-90deg);
}

.energy-change.down svg {
  transform: rotate(90deg);
}

.energy-empty {
  padding: 44px 20px;
  color: #849197;
  text-align: center;
}

.energy-reading-dialog {
  width: min(780px, calc(100vw - 64px));
  overflow: hidden;
}

.energy-reading-dialog > form {
  display: flex;
  flex-direction: column;
  max-height: min(1000px, calc(100dvh - 32px));
}

.energy-reading-dialog .dialog-head,
.energy-meter-dialog .dialog-head {
  margin: 0;
  padding: 15px 18px 13px;
  border-bottom: 1px solid #dfe8e7;
  background: #fff;
}

.energy-reading-dialog .dialog-head .icon-btn,
.energy-meter-dialog .dialog-head .icon-btn {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
}

.energy-reading-dialog .dialog-actions,
.energy-meter-dialog .dialog-actions {
  justify-content: flex-end;
  padding: 12px 18px;
  border-top: 1px solid #dfe8e7;
  background: #f8fbfa;
}

.energy-reading-body {
  display: grid;
  gap: 12px;
  overflow-y: visible;
  padding: 14px 18px 16px;
}

.energy-meter-picker {
  display: grid;
  gap: 9px;
}

.energy-meter-picker-head,
.energy-meter-list-head,
.energy-meter-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.energy-meter-picker-head > strong,
.energy-meter-list-head > strong,
.energy-meter-editor-head > strong {
  color: #5e6e76;
  font-size: 13px;
}

.energy-meter-picker-head .energy-text-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.energy-meter-picker-head svg {
  width: 15px;
  height: 15px;
}

.energy-meter-type-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border: 1px solid #dce6e4;
  border-radius: 9px;
  background: #f5f9f8;
}

.energy-meter-type-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #5a6b73;
  font-weight: 750;
}

.energy-meter-type-tabs button b {
  min-width: 20px;
  padding: 2px 5px;
  border-radius: 999px;
  background: #e5eeec;
  font-size: 10px;
}

.energy-meter-type-tabs button[aria-pressed="true"] {
  border-color: #0e796f;
  background: #17857b;
  color: #fff;
}

.energy-meter-type-tabs button[aria-pressed="true"] b {
  background: rgba(255, 255, 255, 0.2);
}

.energy-meter-filter-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.45fr);
  gap: 10px;
}

.energy-meter-filter-grid .field {
  gap: 5px;
}

.energy-meter-filter-grid .field > span {
  color: #66777e;
  font-size: 11px;
  font-weight: 760;
}

.energy-meter-filter-grid select {
  width: 100%;
  min-height: 46px;
  font-weight: 720;
}

.energy-meter-area-chips {
  display: none;
}

.energy-reading-meter-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #dfe8e7;
  border-radius: 8px;
  background: #f7faf9;
}

.energy-meter-empty {
  grid-column: 1 / -1;
  padding: 8px;
  color: #718087;
  font-size: 12px;
  text-align: center;
}

.energy-reading-meter-meta span {
  display: grid;
  gap: 3px;
  color: #7b898f;
  font-size: 11px;
}

.energy-reading-meter-meta strong {
  color: #2d3e46;
  font-size: 13px;
}

.energy-reading-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.energy-reading-grid .wide {
  grid-column: 1 / -1;
}

.energy-current-reading > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  overflow: hidden;
  border: 1px solid #c7d7d5;
  border-radius: 8px;
  background: #ffffff;
}

.energy-current-reading input {
  min-height: 46px;
  border: 0;
  font-size: 21px;
  font-weight: 750;
}

.energy-current-reading strong {
  padding: 0 14px;
  color: #64747b;
  font-size: 13px;
}

.energy-usage-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 14px;
  border: 1px solid #dce7e5;
  border-radius: 8px;
  background: #f7fbfa;
}

.energy-usage-preview span {
  color: #617078;
  font-size: 12px;
}

.energy-usage-preview strong {
  color: #11766d;
  font-size: 22px;
}

.energy-usage-preview.warning {
  border-color: #efd7b4;
  background: #fffaf2;
}

.energy-usage-preview.warning strong {
  color: #dd6e20;
}

.energy-photo-field input {
  min-height: 48px;
  padding: 8px;
  border: 1px dashed #b9ceca;
  background: #fbfdfc;
}

.energy-reading-evidence-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 12px;
  align-items: start;
}

.energy-reading-evidence-grid > div {
  display: grid;
  gap: 8px;
}

.energy-reading-evidence-grid textarea {
  min-height: 92px;
}

.energy-photo-preview {
  min-height: 0;
}

.energy-photo-preview img {
  display: block;
  width: 132px;
  height: 96px;
  object-fit: cover;
  border: 1px solid #dce6e4;
  border-radius: 7px;
}

.energy-ocr-card {
  display: grid;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid #cfe0dd;
  border-radius: 10px;
  background: #f7fbfa;
}

.energy-ocr-card.hidden { display: none; }

.energy-ocr-head,
.energy-ocr-result,
.energy-ocr-confirm {
  display: flex;
  align-items: center;
}

.energy-ocr-head { justify-content: space-between; gap: 12px; }
.energy-ocr-head span { color: #2d454b; font-size: 13px; font-weight: 750; }
.energy-ocr-head strong { color: #147970; font-size: 12px; }
.energy-ocr-result { gap: 8px; }
.energy-ocr-result > span { color: #77878d; font-size: 12px; }
.energy-ocr-result b { color: #14292f; font-size: 26px; line-height: 1; }
.energy-ocr-result small { color: #63757c; font-weight: 700; }
.energy-ocr-card p { margin: 0; color: #687a81; font-size: 12px; line-height: 1.55; }
.energy-ocr-confirm { gap: 8px; color: #2e4249; font-size: 12px; font-weight: 650; }
.energy-ocr-confirm input { width: 18px; height: 18px; accent-color: #168a7f; }
.energy-ocr-card .energy-text-button { justify-self: start; padding: 0; }
.energy-ocr-card.is-medium { border-color: #ead3a5; background: #fffaf1; }
.energy-ocr-card.is-medium .energy-ocr-head strong { color: #af6a13; }
.energy-ocr-card.is-low,
.energy-ocr-card.is-error { border-color: #e9c1bc; background: #fff7f6; }
.energy-ocr-card.is-low .energy-ocr-head strong,
.energy-ocr-card.is-error .energy-ocr-head strong { color: #b64b42; }
.energy-ocr-card.is-loading { border-style: dashed; }

.energy-meter-dialog {
  width: min(920px, calc(100vw - 48px));
  overflow: hidden;
}

.energy-meter-dialog > form {
  display: flex;
  flex-direction: column;
  max-height: min(780px, calc(100dvh - 32px));
}

.energy-meter-manager-body {
  display: grid;
  grid-template-columns: minmax(250px, 0.78fr) minmax(0, 1.4fr);
  min-height: 0;
  overflow: hidden;
}

.energy-meter-list-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 14px;
  border-right: 1px solid #e0e8e7;
  background: #f7faf9;
}

.energy-meter-list-head {
  margin-bottom: 10px;
}

.energy-meter-list-head .btn {
  min-height: 34px;
  padding-inline: 10px;
  font-size: 12px;
}

.energy-meter-list {
  display: grid;
  gap: 12px;
  overflow-y: auto;
}

.energy-meter-list-group {
  display: grid;
  gap: 6px;
}

.energy-meter-list-group > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #64757d;
  font-size: 11px;
}

.energy-meter-list-group > div span {
  min-width: 20px;
  padding: 2px 5px;
  border-radius: 999px;
  background: #e4eeec;
  text-align: center;
}

.energy-meter-list-group > button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #dce6e4;
  border-radius: 8px;
  background: #fff;
  color: #2e4149;
  text-align: left;
}

.energy-meter-list-group > button:hover,
.energy-meter-list-group > button.active {
  border-color: #17857b;
  background: #eef8f6;
}

.energy-meter-list-group > button span {
  min-width: 0;
}

.energy-meter-list-group > button strong,
.energy-meter-list-group > button small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.energy-meter-list-group > button strong {
  font-size: 12px;
}

.energy-meter-list-group > button small,
.energy-meter-list-group > p {
  margin-top: 3px;
  color: #7a898f;
  font-size: 10px;
}

.energy-meter-list-group > button b {
  padding: 3px 6px;
  border-radius: 999px;
  background: #e3f1ed;
  color: #17796f;
  font-size: 10px;
}

.energy-meter-list-group > button b.inactive {
  background: #edf0f0;
  color: #7f8c91;
}

.energy-meter-editor {
  overflow-y: auto;
  padding: 16px 18px;
}

.energy-meter-editor-head {
  margin-bottom: 14px;
}

.energy-meter-editor-head span {
  color: #819096;
  font-size: 11px;
}

.energy-meter-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px 12px;
}

.energy-meter-form-grid .wide {
  grid-column: 1 / -1;
}

.energy-meter-active {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: end;
  min-height: 44px;
  color: #4e6068;
  font-size: 12px;
  font-weight: 720;
}

.energy-meter-active input {
  width: 17px;
  min-height: 17px;
}

.energy-settings-dialog {
  width: min(860px, calc(100vw - 48px));
  overflow: hidden;
}

.energy-settings-dialog > form {
  display: flex;
  flex-direction: column;
  max-height: min(900px, calc(100dvh - 32px));
}

.energy-settings-dialog .dialog-head {
  margin: 0;
  padding: 16px 18px 14px;
  border-bottom: 1px solid #dfe8e7;
  background: #ffffff;
}

.energy-settings-dialog .dialog-head .icon-btn {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
}

.energy-settings-dialog .dialog-actions {
  justify-content: flex-end;
  padding: 12px 18px;
  border-top: 1px solid #dfe8e7;
  background: #f8fbfa;
}

.energy-settings-body {
  display: grid;
  gap: 12px;
  overflow-y: auto;
  padding: 15px 18px 18px;
}

.energy-settings-section,
.energy-cost-breakdown {
  padding: 14px;
  border: 1px solid #dfe8e7;
  border-radius: 9px;
  background: #ffffff;
}

.energy-cost-breakdown {
  background: #f7faf9;
}

.energy-settings-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}

.energy-settings-section-head strong {
  color: #263a43;
  font-size: 14px;
}

.energy-settings-section-head span {
  color: #78878e;
  font-size: 11px;
  text-align: right;
}

.energy-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px 12px;
}

.energy-settings-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.energy-cost-breakdown-grid article {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-height: 68px;
  padding: 10px;
  border: 1px solid #e0e8e7;
  border-radius: 8px;
  background: #ffffff;
}

.energy-cost-breakdown-grid article span,
.energy-cost-breakdown-grid article small {
  display: block;
}

.energy-cost-breakdown-grid article span {
  color: #52646c;
  font-size: 12px;
  font-weight: 750;
}

.energy-cost-breakdown-grid article small {
  margin-top: 5px;
  color: #829097;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.35;
}

.energy-cost-breakdown-grid article strong {
  color: #263a43;
  font-size: 15px;
  white-space: nowrap;
}

.energy-cost-breakdown-grid article.electricity strong {
  color: #177d74;
}

.energy-cost-breakdown-grid article.water strong {
  color: #337fc7;
}

.energy-cost-breakdown-grid article.gas strong {
  color: #8359bd;
}

.energy-cost-breakdown-grid article.total,
.energy-cost-breakdown-grid article.target {
  grid-column: span 3;
  min-height: 58px;
}

.energy-cost-breakdown-grid article.total {
  border-color: #bedbd6;
  background: #eef8f6;
}

.energy-cost-breakdown-grid article.total strong {
  color: #11766d;
  font-size: 20px;
}

.energy-cost-breakdown-grid article.target strong {
  color: #b46b20;
}

.energy-settings-audit > .field {
  margin-bottom: 10px;
}

.energy-settings-audit > p {
  margin: 0;
  color: #718087;
  font-size: 11px;
  line-height: 1.5;
}

.energy-photo-source-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 7px;
}

.energy-photo-source-actions label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #bcd2ce;
  border-radius: 8px;
  background: #f7fbfa;
  color: #12786f;
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
}

.energy-photo-source-actions label:hover {
  border-color: #168c80;
  background: #edf8f5;
}

.energy-photo-source-actions svg {
  width: 17px;
  height: 17px;
}

.energy-photo-source-actions input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  background: none;
  white-space: nowrap;
}

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

.energy-photo-card {
  position: relative;
  display: grid;
  gap: 4px;
  min-width: 0;
}

.energy-photo-card img {
  width: 100%;
  height: 92px;
  object-fit: cover;
  border: 1px solid #d5e2df;
  border-radius: 8px;
  background: #edf3f2;
}

.energy-photo-card > span {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(15, 111, 102, 0.9);
  color: #fff;
  font-size: 9px;
  font-weight: 750;
}

.energy-photo-card button {
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(25, 42, 47, 0.82);
  color: #fff;
}

.energy-photo-card button svg {
  width: 13px;
  height: 13px;
}

.energy-photo-card small {
  overflow: hidden;
  color: #74858b;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.energy-history-panel {
  margin-top: 16px;
  scroll-margin-top: 20px;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.energy-history-panel.is-targeted {
  border-color: rgba(20, 139, 129, 0.66);
  background: rgba(239, 249, 247, 0.94);
  box-shadow: 0 0 0 4px rgba(20, 139, 129, 0.12), 0 16px 36px rgba(30, 83, 79, 0.12);
  outline: none;
}

.energy-history-table-wrap {
  overflow-x: auto;
}

.energy-history-table {
  width: 100%;
  border-collapse: collapse;
}

.energy-history-table th,
.energy-history-table td {
  padding: 13px 15px;
  border-top: 1px solid #e2eae8;
  color: #43565d;
  font-size: 12px;
  text-align: left;
  vertical-align: middle;
}

.energy-history-table th {
  border-top: 0;
  background: #f7faf9;
  color: #718087;
  font-size: 10px;
  letter-spacing: 0.02em;
}

.energy-history-table td strong,
.energy-history-table td small {
  display: block;
}

.energy-history-table td strong {
  color: #2b3f47;
}

.energy-history-table td small {
  margin-top: 4px;
  color: #7a898f;
  font-size: 10px;
}

.energy-photo-count,
.energy-reading-status {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 9px;
  border-radius: 999px;
  background: #eef2f1;
  color: #68777d;
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}

.energy-photo-count.has-photo,
.energy-reading-status.confirmed {
  background: #e7f5f1;
  color: #11766d;
}

.energy-reading-status.corrected {
  background: #fff3df;
  color: #a96512;
}

.energy-reading-status.pending {
  background: #fff0ed;
  color: #b54b42;
}

.energy-history-view {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid #bfd4d0;
  border-radius: 7px;
  background: #fff;
  color: #12786f;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.energy-evidence-dialog {
  width: min(860px, calc(100vw - 48px));
  overflow: hidden;
}

.energy-evidence-dialog > form {
  display: flex;
  flex-direction: column;
  max-height: min(820px, calc(100dvh - 32px));
}

.energy-evidence-dialog .dialog-head {
  margin: 0;
  padding: 16px 18px 14px;
  border-bottom: 1px solid #dfe8e7;
  background: #fff;
}

.energy-evidence-dialog .dialog-actions {
  justify-content: flex-end;
  padding: 12px 18px;
  border-top: 1px solid #dfe8e7;
  background: #f8fbfa;
}

.energy-evidence-body {
  display: grid;
  gap: 14px;
  overflow-y: auto;
  padding: 16px 18px 20px;
}

.energy-evidence-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.energy-evidence-summary > span {
  display: grid;
  gap: 5px;
  padding: 11px 12px;
  border: 1px solid #dfe8e7;
  border-radius: 8px;
  background: #f8fbfa;
}

.energy-evidence-summary small,
.energy-evidence-ocr small {
  color: #79888e;
  font-size: 10px;
}

.energy-evidence-summary strong {
  color: #263b43;
  font-size: 13px;
}

.energy-evidence-ocr {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid #d9e6e3;
  border-radius: 9px;
  background: #f3f9f7;
}

.energy-evidence-ocr > div {
  display: grid;
  gap: 4px;
}

.energy-evidence-ocr > div strong {
  color: #12786f;
  font-size: 17px;
}

.energy-evidence-ocr p {
  grid-column: 1 / -1;
  margin: 0;
  color: #66777e;
  font-size: 11px;
}

.energy-evidence-section-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 9px;
  color: #33474e;
  font-size: 13px;
}

.energy-evidence-section-head span {
  color: #75858b;
  font-size: 11px;
}

.energy-evidence-photos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.energy-evidence-photo {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid #d5e2df;
  border-radius: 9px;
  background: #edf3f2;
}

.energy-evidence-photo img {
  display: block;
  width: 100%;
  height: 170px;
  object-fit: cover;
}

.energy-evidence-photo span {
  position: absolute;
  right: 7px;
  bottom: 7px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(20, 43, 48, 0.82);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
}

.energy-evidence-empty {
  grid-column: 1 / -1;
  padding: 30px;
  border: 1px dashed #cad9d6;
  border-radius: 8px;
  color: #7b898f;
  font-size: 12px;
  text-align: center;
}

.energy-evidence-note {
  padding: 12px 14px;
  border-left: 3px solid #168a7f;
  border-radius: 0 8px 8px 0;
  background: #f7faf9;
}

.energy-evidence-note p {
  margin: 6px 0 0;
  color: #5d7077;
  font-size: 12px;
  line-height: 1.6;
}

@media (max-height: 980px) {
  .energy-reading-body {
    overflow-y: auto;
  }
}

@media (max-width: 1180px) {
  .energy-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .energy-metric {
    grid-column: auto;
    min-height: 132px;
    padding: 20px;
  }

  .energy-metric:nth-child(n + 4) {
    grid-column: auto;
    min-height: 132px;
  }

  .energy-metric:last-child {
    grid-column: 1 / -1;
  }

  .energy-overview-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.85fr);
  }
}

@media (max-width: 920px) {
  .energy-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .energy-metric:last-child {
    grid-column: 1 / -1;
  }

  .energy-overview-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .energy-chart-wrap {
    height: 270px;
  }
}

@media (max-width: 620px) {
  .energy-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .energy-date-range,
  .energy-type-filter,
  #energySettingsBtn {
    width: 100%;
  }

  .energy-toolbar-spacer {
    display: none;
  }

  .energy-date-range {
    justify-content: space-between;
  }

  .energy-date-range input {
    width: 112px;
  }

  .energy-type-filter select {
    width: 100%;
  }

  .energy-metric-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    margin-bottom: 14px;
  }

  .energy-metric {
    grid-column: auto;
    grid-template-columns: minmax(0, 1fr) 46px;
    gap: 16px;
    min-height: 112px;
    padding: 18px;
    border-radius: 12px;
  }

  .energy-metric:nth-child(n + 4),
  .energy-metric:last-child {
    grid-column: auto;
    min-height: 112px;
  }

  .energy-metric .metric-icon {
    width: 44px;
    height: 44px;
  }

  .energy-metric strong {
    font-size: 30px;
  }

  .energy-panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .energy-legend {
    justify-content: flex-start;
  }

  .energy-chart-controls {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .energy-chart-wrap {
    min-height: 238px;
    padding: 0 8px;
  }

  .energy-chart-summary {
    gap: 9px 16px;
  }

  .energy-reading-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
  }

  .energy-reading-dialog > form {
    max-height: calc(100dvh - 16px);
  }

  .energy-reading-body {
    padding: 14px;
  }

  .energy-meter-filter-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .energy-area-filter {
    display: none;
  }

  .energy-meter-area-chips {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding: 1px 1px 4px;
    scrollbar-width: none;
  }

  .energy-meter-area-chips::-webkit-scrollbar {
    display: none;
  }

  .energy-meter-area-chips button {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid #cadad7;
    border-radius: 999px;
    background: #fff;
    color: #52666d;
    font-size: 12px;
    font-weight: 750;
    white-space: nowrap;
  }

  .energy-meter-area-chips button span {
    display: inline-grid;
    min-width: 19px;
    height: 19px;
    place-items: center;
    border-radius: 999px;
    background: #edf3f2;
    color: #687b80;
    font-size: 10px;
  }

  .energy-meter-area-chips button[aria-pressed="true"] {
    border-color: #168c80;
    background: #eaf6f3;
    color: #0e746b;
  }

  .energy-meter-area-chips button[aria-pressed="true"] span {
    background: #168c80;
    color: #fff;
  }

  .energy-reading-grid,
  .energy-reading-meter-meta,
  .energy-reading-evidence-grid,
  .energy-meter-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .energy-reading-grid .wide {
    grid-column: auto;
  }

  .energy-usage-preview {
    align-items: flex-start;
    flex-direction: column;
  }

  .energy-meter-dialog {
    width: calc(100vw - 16px);
  }

  .energy-meter-dialog > form {
    max-height: calc(100dvh - 16px);
  }

  .energy-meter-manager-body {
    grid-template-columns: minmax(0, 1fr);
    overflow-y: auto;
  }

  .energy-meter-list-panel {
    max-height: 220px;
    border-right: 0;
    border-bottom: 1px solid #e0e8e7;
  }

  .energy-meter-editor {
    overflow: visible;
  }

  .energy-meter-form-grid .wide {
    grid-column: auto;
  }

  .energy-settings-dialog {
    width: calc(100vw - 16px);
  }

  .energy-settings-dialog > form {
    max-height: calc(100dvh - 16px);
  }

  .energy-settings-body {
    padding: 12px;
  }

  .energy-settings-grid,
  .energy-settings-grid.three,
  .energy-cost-breakdown-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .energy-cost-breakdown-grid article.total,
  .energy-cost-breakdown-grid article.target {
    grid-column: auto;
  }

  .energy-settings-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .energy-settings-section-head span {
    text-align: left;
  }

  .energy-photo-source-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .energy-photo-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .energy-history-table,
  .energy-history-table tbody,
  .energy-history-table tr,
  .energy-history-table td {
    display: block;
    width: 100%;
  }

  .energy-history-table thead {
    display: none;
  }

  .energy-history-table tbody {
    display: grid;
    gap: 10px;
    padding: 12px;
  }

  .energy-history-table tr {
    padding: 8px 12px;
    border: 1px solid #dfe8e7;
    border-radius: 10px;
    background: #fff;
  }

  .energy-history-table td {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    padding: 8px 0;
    border-top: 1px solid #edf2f1;
  }

  .energy-history-table td:first-child {
    border-top: 0;
  }

  .energy-history-table td::before {
    content: attr(data-label);
    color: #7a898f;
    font-size: 10px;
    font-weight: 700;
  }

  .energy-history-view {
    width: 100%;
  }

  .energy-evidence-dialog {
    width: calc(100vw - 16px);
  }

  .energy-evidence-dialog > form {
    max-height: calc(100dvh - 16px);
  }

  .energy-evidence-body {
    padding: 13px;
  }

  .energy-evidence-summary,
  .energy-evidence-ocr,
  .energy-evidence-photos {
    grid-template-columns: minmax(0, 1fr);
  }

  .energy-evidence-ocr p {
    grid-column: auto;
  }

  .energy-evidence-photo img {
    height: 220px;
  }
}
