/* One local stylesheet for the dashboard and application-local login flow. */
:root {
  --paper: #f6f4ef;
  --card: #fffefa;
  --ink: #292d26;
  --muted: #74786e;
  --line: #e5e5dc;
  --green: #38553f;
  --sage: #eaf0e5;
  --ochre: #b58a42;
  --clay: #b4775e;
  --radius: 18px;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 15px;
  line-height: 1.55;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: var(--green);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button,
input {
  font: inherit;
}
button,
a,
input,
summary {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.6;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid #ae8b50;
  outline-offset: 4px;
}
h1,
h2,
p {
  margin-top: 0;
}
h1,
h2 {
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.15;
}
h1 {
  font-size: clamp(28px, 3.1vw, 42px);
  margin-bottom: 12px;
}
h2 {
  font-size: 24px;
  margin-bottom: 14px;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.16em;
  font-weight: 650;
  margin-bottom: 15px;
  color: var(--muted);
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.06em;
  color: var(--ink);
}
.brand:hover {
  text-decoration: none;
}
.brand-dot {
  color: var(--ochre);
}
.mark {
  width: 36px;
  height: 36px;
}
.mark rect {
  fill: var(--green);
}
.mark path {
  stroke: var(--paper);
  stroke-width: 3;
  stroke-linecap: round;
}
.status-dot,
.tiny-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #729274;
  flex-shrink: 0;
}
.status-dot.stale {
  background: var(--ochre);
}
[hidden] {
  display: none !important;
}
.sidebar {
  width: 220px;
  position: fixed;
  inset: 0 auto 0 0;
  border-right: 1px solid var(--line);
  background: #f0efe7;
  padding: 36px 25px;
  display: flex;
  flex-direction: column;
}
.nav-label {
  margin-top: 62px;
  padding-left: 13px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 13px;
  color: #686f61;
  padding: 12px 13px;
  border-radius: 9px;
  font-size: 13px;
  margin-bottom: 6px;
}
.nav-item.selected {
  background: #e2e7d9;
  color: var(--green);
  font-weight: 600;
}
.nav-item:hover {
  background: #e5e8dd;
  text-decoration: none;
}
.nav-item span {
  font-size: 20px;
  line-height: 1;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 40px;
}
.device-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.sidebar-bottom p {
  margin: 6px 0 22px;
}
.logout {
  border: 0;
  padding: 0;
  background: none;
  color: var(--muted);
  font-size: 12px;
}
.mobile-security {
  display: none;
}
.dashboard {
  margin-left: 220px;
  padding: 44px 40px 24px;
  max-width: 1660px;
}
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
}
.page-header .muted {
  margin-bottom: 0;
  font-size: 13px;
}
.connection {
  display: flex;
  gap: 8px;
  align-items: center;
  white-space: nowrap;
  font-size: 12px;
  background: #eaf0e4;
  border: 1px solid #dfe6d7;
  padding: 7px 12px;
  border-radius: 30px;
}
.connection.stale {
  background: #f5ecdb;
  border-color: #eadfc7;
}
.connection.stale .status-dot {
  background: var(--ochre);
}
.notice {
  padding: 12px 16px;
  background: #f4e9d6;
  border: 1px solid #e7d9bd;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 20px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.metric-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 17px;
  min-width: 0;
}
.metric-card.featured {
  background: var(--sage);
  border-color: #dbe3d3;
}
.metric-label {
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.metric-label > span {
  font-size: 22px;
  color: var(--green);
  line-height: 1;
}
.metric-label .ochre {
  color: var(--ochre);
}
.metric-label .clay {
  color: var(--clay);
}
.metric-value {
  font-size: clamp(26px, 3vw, 43px);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1.3;
  margin-top: 23px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.metric-value > span {
  font-size: 16px;
  letter-spacing: 0;
  color: var(--muted);
  font-weight: 400;
}
.metric-detail {
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
  margin-bottom: 20px;
}
.metric-bottom {
  font-size: 9px;
  letter-spacing: 0.1em;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  gap: 7px;
  align-items: center;
}
.featured .metric-bottom {
  border-color: #d8e0d1;
}
.tiny-dot {
  width: 5px;
  height: 5px;
}
.chart-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 27px 28px 0;
  margin-bottom: 24px;
}
.chart-header {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
}
.chart-header .eyebrow {
  margin-bottom: 9px;
}
.chart-header h2 {
  margin-bottom: 0;
}
.range-control {
  display: flex;
  padding: 4px;
  background: #f1f1e9;
  border: 1px solid #e9e9df;
  border-radius: 8px;
  gap: 2px;
}
.range-control button {
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 11px;
  padding: 7px 13px;
  border-radius: 5px;
  white-space: nowrap;
}
.range-control button[aria-pressed="true"] {
  background: var(--card);
  color: var(--green);
  box-shadow: 0 1px 4px #232d2212;
}
.chart-legend {
  display: flex;
  gap: 23px;
  align-items: center;
  margin-top: 25px;
  font-size: 11px;
  color: var(--muted);
}
.chart-legend > span {
  display: flex;
  align-items: center;
  gap: 7px;
}
.chart-unit {
  margin-left: auto;
}
.legend-line {
  width: 17px;
  height: 3px;
  border-radius: 2px;
  display: inline-block;
}
.import-line {
  background: #648167;
}
.export-line {
  background: #bb975a;
}
.chart-container {
  position: relative;
  margin-top: 20px;
  min-height: 180px;
}
#power-chart {
  width: 100%;
  display: block;
  min-height: 180px;
  overflow: visible;
}
.chart-empty {
  position: absolute;
  inset: 30% 0 auto;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.chart-grid {
  stroke: #eaeae1;
  stroke-width: 1;
  stroke-dasharray: 3 4;
}
.chart-text {
  fill: #85897d;
  font-size: 11px;
  font-family: inherit;
}
.series {
  fill: none;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.series.import {
  stroke: #648167;
}
.series.export {
  stroke: #bb975a;
}
.chart-footer {
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 0;
  font-size: 10px;
  color: var(--muted);
}
.chart-data {
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
  padding: 13px 0;
}
.chart-data summary {
  cursor: pointer;
}
.table-scroll {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin: 15px 0;
}
td,
th {
  padding: 9px 8px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.details-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 24px;
}
.detail-card {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: var(--radius);
  padding: 26px 28px;
}
.detail-card.quiet {
  background: #eeeee5;
}
.detail-card h2 {
  font-size: 23px;
}
.detail-card > p:not(.eyebrow) {
  font-size: 12px;
  max-width: 490px;
  line-height: 1.9;
}
.detail-card dl {
  margin: 22px 0 0;
}
.detail-card dl > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  font-size: 12px;
}
.detail-card dl > div:last-child {
  border-bottom: 0;
}
.detail-card dt {
  color: var(--muted);
}
.detail-card dd {
  margin: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.page-footer {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #85897d;
  padding: 30px 0 0;
}
.page-footer > span:first-child {
  font-size: 9px;
  letter-spacing: 0.14em;
}
.footer-divider {
  padding: 0 9px;
  color: #a5aa9b;
}
.skip-link {
  position: fixed;
  top: -80px;
  left: 10px;
  background: var(--card);
  padding: 15px;
  z-index: 10;
}
.skip-link:focus {
  top: 10px;
}
.auth-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100dvh;
}
.auth-story {
  background: #eeeee3;
  border-right: 1px solid var(--line);
  padding: 45px 60px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.auth-copy {
  margin: auto 0;
  padding: 80px 0;
  max-width: 540px;
}
.auth-copy h1 {
  font-size: clamp(38px, 4.5vw, 66px);
  line-height: 1.08;
  margin-bottom: 24px;
}
.auth-copy > p:not(.eyebrow) {
  font-size: 15px;
  color: var(--muted);
  max-width: 340px;
  line-height: 1.9;
}
.auth-illustration {
  width: 100%;
  margin-top: 40px;
}
.illustration-grid {
  fill: none;
  stroke: #d9decf;
  stroke-dasharray: 3 5;
}
.illustration-line {
  stroke: #6b876b;
  stroke-width: 2.5;
  fill: none;
  stroke-linejoin: round;
}
.auth-footer {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}
.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  background: #fbfaf6;
}
.auth-card {
  width: 100%;
  max-width: 370px;
}
.auth-card h1,
.auth-card h2 {
  font-size: 34px;
  margin-bottom: 16px;
}
.auth-card > .eyebrow {
  margin-bottom: 45px;
}
.auth-card p {
  font-size: 13px;
  line-height: 1.8;
}
.step-label {
  font-size: 10px !important;
  letter-spacing: 0.12em;
  color: #8a907e;
  margin-bottom: 14px;
}
.auth-security {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 32px;
  color: var(--muted);
  font-size: 10px !important;
}
.auth-card form {
  margin-top: 28px;
}
.form-field {
  margin-bottom: 19px;
}
.form-field label {
  display: block;
  font-size: 12px;
  margin-bottom: 7px;
}
.form-field input:not([type="checkbox"]) {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #dcded1;
  border-radius: 9px;
  background: #fffefa;
  color: var(--ink);
}
.form-field input[type="checkbox"] {
  margin-right: 7px;
}
.form-field small,
.helptext {
  font-size: 11px;
  color: var(--muted);
}
.errorlist {
  list-style: none;
  padding: 10px 12px;
  border-radius: 7px;
  background: #f7e8df;
  color: #85452e;
  font-size: 12px;
}
.button,
.btn {
  display: inline-block;
  border: 1px solid var(--line);
  padding: 11px 16px;
  border-radius: 8px;
  text-align: center;
  background: var(--card);
  color: var(--ink);
  font-size: 13px;
}
.primary,
.btn-primary,
.btn-success {
  background: var(--green);
  color: #fffefa;
  border-color: var(--green);
}
.primary:hover {
  background: #2c4633;
}
.full,
.btn-block {
  width: 100%;
}
.subtle,
.btn-link {
  border-color: transparent;
  background: none;
  color: var(--muted);
}
.auth-card img {
  max-width: 100%;
  height: auto;
}
.auth-card pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.auth-card .btn {
  margin-top: 10px;
}
.auth-card hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 22px 0;
}
.auth-card ul {
  padding-left: 20px;
  font-size: 13px;
}
@media (min-width: 1600px) {
  .dashboard {
    padding-left: 60px;
    padding-right: 60px;
  }
}
@media (max-width: 1150px) {
  .sidebar {
    width: 190px;
    padding-left: 20px;
    padding-right: 20px;
  }
  .dashboard {
    margin-left: 190px;
    padding: 35px 25px;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metric-value {
    font-size: 39px;
  }
  .auth-story {
    padding: 35px;
  }
  .details-grid {
    gap: 16px;
  }
}
@media (max-width: 760px) {
  .sidebar {
    position: static;
    width: auto;
    padding: 17px 22px;
    flex-direction: row;
    align-items: center;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    gap: 18px;
  }
  .brand {
    font-size: 25px;
  }
  .sidebar .mark {
    width: 30px;
    height: 30px;
  }
  .nav-label,
  .sidebar .nav-item,
  .device-label,
  .sidebar-bottom > p {
    display: none;
  }
  .sidebar-bottom {
    margin-left: auto;
    margin-top: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 16px;
  }
  .mobile-security {
    display: inline-block;
    font-size: 12px;
    color: var(--muted);
  }
  .dashboard {
    margin: 0;
    padding: 28px 18px 20px;
  }
  .page-header {
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 25px;
  }
  .page-header h1 {
    font-size: 29px;
  }
  .page-header .eyebrow {
    font-size: 8px;
  }
  .connection {
    font-size: 10px;
    padding: 6px 8px;
    margin-top: 4px;
  }
  .metrics {
    gap: 11px;
    margin-bottom: 20px;
  }
  .metric-card {
    padding: 18px 15px 14px;
    border-radius: 13px;
  }
  .metric-value {
    font-size: 34px;
  }
  .metric-detail {
    font-size: 10px;
    min-height: 30px;
  }
  .metric-bottom {
    font-size: 8px;
  }
  .chart-card {
    padding: 20px 16px 0;
    border-radius: 13px;
  }
  .chart-header {
    align-items: flex-start;
    flex-direction: column;
  }
  .chart-header h2 {
    font-size: 23px;
  }
  .range-control {
    align-self: flex-start;
  }
  .chart-legend {
    gap: 14px;
    font-size: 10px;
  }
  .chart-unit {
    display: none !important;
  }
  .chart-footer {
    font-size: 9px;
    flex-wrap: wrap;
  }
  .details-grid {
    grid-template-columns: 1fr;
  }
  .detail-card {
    padding: 23px;
    border-radius: 13px;
  }
  .page-footer {
    font-size: 9px;
  }
  .auth-layout {
    grid-template-columns: 1fr;
  }
  .auth-story {
    padding: 22px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .auth-copy,
  .auth-footer {
    display: none;
  }
  .auth-panel {
    padding: 45px 25px;
    align-items: flex-start;
  }
  .auth-card > .eyebrow {
    margin-bottom: 28px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button,
  a {
    transition:
      background 0.15s,
      color 0.15s;
  }
}
