* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* The hidden attribute must always hide, full stop. Several unrelated
   author rules set display:flex/grid/block on classes that sometimes carry
   [hidden] (e.g. .settings-card, .dashboard-view) — any such rule, even at
   lower specificity, silently wins over the UA stylesheet's [hidden]{display:
   none} because author styles beat UA styles regardless of specificity. That
   produced real invisible-but-interactive, overlapping content. */
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: #07120f;
  color: #ffffff;
  line-height: 1.6;
}

header {
  min-height: 100vh;
  padding: 28px 8%;
  background:
    linear-gradient(rgba(7, 18, 15, 0.75), rgba(7, 18, 15, 0.95)),
    url("https://images.unsplash.com/photo-1509391366360-2e959784a276?auto=format&fit=crop&w=1600&q=80");
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 120px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
}

.nav-links a {
  color: #d7e7df;
  text-decoration: none;
  margin-left: 24px;
  font-size: 0.95rem;
}

.hero {
  max-width: 820px;
}

.badge {
  display: inline-block;
  background: rgba(55, 255, 162, 0.12);
  color: #7dffbd;
  padding: 8px 14px;
  border: 1px solid rgba(125, 255, 189, 0.35);
  border-radius: 999px;
  font-size: 0.9rem;
  margin-bottom: 24px;
}

h1 {
  font-size: clamp(2.8rem, 7vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: -3px;
  margin-bottom: 28px;
}

.hero p {
  font-size: 1.25rem;
  max-width: 680px;
  color: #d7e7df;
  margin-bottom: 34px;
}

.buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  padding: 15px 24px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  display: inline-block;
}

.btn-primary {
  background: #7dffbd;
  color: #07120f;
}

.btn-secondary {
  border: 1px solid rgba(255,255,255,0.35);
  color: #ffffff;
}

section {
  padding: 90px 8%;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -1.5px;
  margin-bottom: 24px;
}

.section-text {
  max-width: 760px;
  color: #c7d8d0;
  font-size: 1.15rem;
  margin-bottom: 36px;
}

.problem {
  background: #0b1b17;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 22px;
  padding: 28px;
}

.card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.card p {
  color: #c7d8d0;
}

.solution {
  background: #07120f;
}

.trust {
  margin-top: -12px;
  color: #7dffbd;
  font-weight: 700;
}

.dashboard {
  margin-top: 28px;
  background: #0e221d;
  border: 1px solid rgba(125, 255, 189, 0.18);
  border-radius: 28px;
  padding: 28px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.35);
}

.metric {
  background: rgba(255,255,255,0.055);
  border-radius: 18px;
  padding: 22px;
  margin-bottom: 16px;
}

.metric span {
  color: #7dffbd;
  font-size: 2rem;
  font-weight: 800;
  display: block;
}

.chart {
  min-height: 260px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(125,255,189,0.22), rgba(125,255,189,0.02)),
    repeating-linear-gradient(
      to right,
      rgba(255,255,255,0.05) 0,
      rgba(255,255,255,0.05) 1px,
      transparent 1px,
      transparent 70px
    );
  position: relative;
  overflow: hidden;
}

.chart::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 45px;
  height: 90px;
  background: linear-gradient(
    135deg,
    transparent 0%,
    transparent 15%,
    #7dffbd 16%,
    #7dffbd 18%,
    transparent 19%,
    transparent 38%,
    #7dffbd 39%,
    #7dffbd 41%,
    transparent 42%,
    transparent 60%,
    #7dffbd 61%,
    #7dffbd 63%,
    transparent 64%
  );
  opacity: 0.9;
}

.careers {
  background: #07120f;
}

.contact {
  background: #0b1b17;
}

form {
  max-width: 680px;
  display: grid;
  gap: 16px;
}

input,
textarea {
  width: 100%;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  color: #ffffff;
  font-size: 1rem;
}

input::placeholder,
textarea::placeholder {
  color: #9db0a8;
}

textarea {
  min-height: 150px;
  resize: vertical;
}

button {
  border: none;
  cursor: pointer;
  font-size: 1rem;
  width: fit-content;
}

#form-status {
  color: #7dffbd;
  min-height: 24px;
  font-weight: 700;
}

footer {
  padding: 28px 8%;
  color: #9db0a8;
  background: #07120f;
  border-top: 1px solid rgba(255,255,255,0.08);
}

@media (max-width: 850px) {
  nav {
    margin-bottom: 80px;
  }

  .nav-links {
    display: none;
  }

  .cards,
  .dashboard {
    grid-template-columns: 1fr;
  }

  h1 {
    letter-spacing: -1.5px;
  }
}

/* Dashboard preview page */

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
  background: #07120f;
}

.sidebar {
  padding: 28px;
  background: #0b1b17;
  border-right: 1px solid rgba(255,255,255,0.08);
  position: sticky;
  top: 0;
  height: 100vh;
}

.side-nav {
  margin-top: 48px;
  display: grid;
  gap: 14px;
}

.side-nav a {
  color: #c7d8d0;
  text-decoration: none;
  padding: 12px 14px;
  border-radius: 12px;
}

.side-nav a:hover {
  background: rgba(125,255,189,0.1);
  color: #7dffbd;
}

.app-main {
  padding: 32px;
}

.app-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.eyebrow {
  color: #7dffbd;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.app-topbar h1 {
  font-size: clamp(2rem, 4vw, 3.6rem);
  letter-spacing: -2px;
  margin: 0;
}

.system-pill {
  background: rgba(125,255,189,0.12);
  border: 1px solid rgba(125,255,189,0.35);
  color: #7dffbd;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 800;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 18px;
}

.dash-card,
.dashboard-panel {
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  padding: 24px;
}

.dash-card.primary {
  border-color: rgba(125,255,189,0.4);
  background: rgba(125,255,189,0.09);
}

.dash-card p {
  color: #c7d8d0;
}

.dash-card h2 {
  font-size: 2.2rem;
  margin: 10px 0;
  color: #ffffff;
}

.dash-card span {
  color: #9db0a8;
}


.timeframe-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.timeframe-buttons button {
  background: rgba(255,255,255,0.06);
  color: #c7d8d0;
  border: 1px solid rgba(255,255,255,0.12);
  padding: 8px 10px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
}

.timeframe-buttons button.active {
  background: #7dffbd;
  color: #07120f;
}
.dashboard-panel {
  margin-bottom: 18px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.production-layout {
  display: grid;
  grid-template-columns: 2fr 300px;
  gap: 20px;
}

.production-chart {
  min-height: 240px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(125,255,189,0.16), rgba(125,255,189,0.02)),
    repeating-linear-gradient(
      to right,
      rgba(255,255,255,0.04) 0,
      rgba(255,255,255,0.04) 1px,
      transparent 1px,
      transparent 50px
    );
  display: flex;
  align-items: end;
  gap: 8px;
  padding: 18px;
}

.chart-bar-group {
  flex: 1;
  height: 190px;
  display: grid;
  grid-template-rows: 18px 1fr 30px;
  align-items: end;
  justify-items: center;
  min-width: 18px;
}

.chart-value {
  font-size: 0.7rem;
  color: #c7d8d0;
}

.chart-bar {
  width: 100%;
  max-width: 34px;
  min-height: 6px;
  background: #7dffbd;
  border-radius: 12px 12px 0 0;
  align-self: end;
}

.chart-label {
  font-size: 0.7rem;
  color: #9db0a8;
  height: 28px;
  line-height: 14px;
  text-align: center;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.comparison-card {
  display: grid;
  gap: 12px;
}

.comparison-card div,
.diagnosis-box,
.asset-list div {
  background: rgba(255,255,255,0.055);
  border-radius: 16px;
  padding: 16px;
}

.comparison-card span,
.asset-list span {
  display: block;
  color: #9db0a8;
  margin-bottom: 6px;
}

.comparison-card strong {
  font-size: 1.35rem;
}

.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.alert {
  padding: 14px;
  border-radius: 14px;
  margin-top: 12px;
}

.alert.good {
  background: rgba(125,255,189,0.12);
  color: #7dffbd;
}

.alert.danger {
  background: rgba(255, 80, 80, 0.15);
  border: 1px solid rgba(255, 80, 80, 0.4);
  color: #ff8b8b;
}

.alert.danger strong {
  color: #ff6b6b;
}

.evidence-list {
  margin-top: 10px;
  padding-left: 18px;
  color: #c7d8d0;
}

.evidence-list li {
  margin-bottom: 8px;
}

.diagnosis-box {
  margin-top: 14px;
}

.diagnosis-box p {
  color: #c7d8d0;
}

.asset-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.asset-list strong {
  display: block;
  margin-bottom: 6px;
}

.asset-list em {
  color: #7dffbd;
  font-style: normal;
  font-weight: 800;
}

@media (max-width: 950px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .dashboard-grid,
  .production-layout,
  .two-column,
  .asset-list {
    grid-template-columns: 1fr;
  }
}

.health-history-layout {
  display: grid;
  grid-template-columns: 1.5fr 280px;
  gap: 18px;
  align-items: stretch;
}

.health-chart {
  height: 230px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(125,255,189,0.12), rgba(125,255,189,0.02)),
    repeating-linear-gradient(
      to right,
      rgba(255,255,255,0.04) 0,
      rgba(255,255,255,0.04) 1px,
      transparent 1px,
      transparent 80px
    );
  padding: 12px 16px;
  overflow: hidden;
}

.health-chart svg {
  width: 100%;
  height: 220px;
  overflow: visible;
}

.health-summary {
  height: 230px;
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  gap: 6px;
}

.health-summary div {
  min-height: 0;
  background: rgba(255,255,255,0.055);
  border-radius: 14px;
  padding: 6px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.health-summary span {
  font-size: 0.85rem;
}

.health-summary strong {
  font-size: 1.1rem;
}

.health-trend-negative {
  color: #ff6b6b;
  font-weight: 700;
}

.health-trend-positive {
  color: #7dffbd;
  font-weight: 700;
}

.health-trend-neutral {
  color: #ffd76a;
  font-weight: 700;
}

.site-info {
  margin-top: 10px;
  margin-bottom: 24px;
  padding: 18px 22px;
  border-radius: 20px;
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(255,255,255,0.08);
}

.site-info h2 {
  margin: 0 0 6px;
  font-size: 1.4rem;
}

.site-info p {
  margin: 3px 0;
  color: #9db0a8;
}

#alerts .alert {
  cursor: pointer;
}

#alerts .alert.active {
  outline: 2px solid #7dffbd;
}

/* Login and signup */
body.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 78% 18%, rgba(104, 207, 130, 0.1), transparent 28%),
    radial-gradient(circle at 18% 82%, rgba(242, 184, 75, 0.06), transparent 30%),
    var(--ds-bg);
  color: var(--ds-text);
  color-scheme: dark;
}

.login-card {
  width: min(420px, calc(100% - 40px));
  padding: 40px;
  border: 1px solid var(--ds-border-strong);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.03), transparent 48%),
    var(--ds-surface);
  box-shadow: 0 30px 78px rgba(0, 0, 0, 0.42);
}

.login-card .logo {
  margin: 0;
  color: var(--ds-text);
}

.login-card h1 {
  margin-bottom: 8px;
  color: var(--ds-text);
}

.login-card p {
  margin-bottom: 24px;
  color: var(--ds-muted);
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-form input {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--ds-border-strong);
  border-radius: 10px;
  background: var(--ds-bg);
  color: var(--ds-text);
  box-sizing: border-box;
}

.login-form input:focus {
  border-color: var(--ds-green);
  outline: 3px solid rgba(104, 207, 130, 0.14);
}

.login-form input::placeholder {
  color: var(--ds-muted-soft);
}

.login-form button {
  width: 100%;
  border: none;
  cursor: pointer;
}

.login-card .btn-primary {
  background: var(--ds-green);
  color: #10161d;
}

.login-card .btn-primary:hover {
  background: var(--ds-green-hover);
}

.login-card .btn-secondary {
  border: 1px solid var(--ds-border-strong);
  background: var(--ds-surface-raised);
  color: var(--ds-text);
  text-align: center;
}

.login-card .btn-secondary:hover {
  border-color: var(--ds-green-border);
  background: var(--ds-green-soft);
  color: var(--ds-green);
}

#loginStatus,
#signupStatus {
  min-height: 20px;
  margin: 0;
  color: var(--ds-danger);
}

.empty-dashboard{
  max-width:600px;
  margin:120px auto;
  padding:40px;
  text-align:center;
  background:#10221b;
  border:1px solid rgba(125,255,189,0.18);
  border-radius:18px;
}

.empty-dashboard p{
  color:#9db0a8;
  margin:16px 0 28px;
}

.empty-dashboard .btn{
  margin:6px;
}
/* Fixed, single-screen dashboard application */
.dashboard-page {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #eef3f0;
  color: #16221e;
  line-height: 1.4;
}

.dashboard-page section {
  padding: 0;
}

.dashboard-page .app-shell {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  overflow: hidden;
  background: #eef3f0;
  transform-origin: top left;
  will-change: transform;
}

.dashboard-page .sidebar {
  position: relative;
  top: auto;
  height: 100%;
  min-height: 0;
  padding: 24px 16px 18px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  background: #10231d;
  border-right: 0;
  color: #fff;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.brand-mark,
.provider-logo {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  background: #79efb1;
  color: #10231d;
  font-weight: 900;
}

.sidebar-brand .logo {
  font-size: 1.15rem;
  line-height: 1.1;
}

.sidebar-brand span {
  color: #91aaa0;
  font-size: 0.72rem;
}

.dashboard-page .side-nav {
  margin: 24px 0 0;
  display: grid;
  align-content: start;
  gap: 6px;
}

.side-nav-item {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #b7c9c1;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: left;
}

.side-nav-item:hover,
.side-nav-item.active {
  background: rgba(121, 239, 177, 0.12);
  color: #79efb1;
}

.nav-icon {
  width: 24px;
  color: #668078;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.side-nav-item.active .nav-icon {
  color: #79efb1;
}

.sidebar-footer {
  display: grid;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.side-link,
.sidebar-logout {
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #91aaa0;
  font: inherit;
  font-size: 0.82rem;
  text-align: left;
  text-decoration: none;
}

.side-link:hover,
.sidebar-logout:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.dashboard-page .app-main {
  min-width: 0;
  min-height: 0;
  height: 100%;
  padding: 0;
  display: grid;
  grid-template-rows: 82px minmax(0, 1fr);
  overflow: hidden;
}

.dashboard-page .app-topbar {
  min-width: 0;
  min-height: 0;
  height: 82px;
  margin: 0;
  padding: 12px 24px;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  align-items: center;
  gap: 24px;
  background: rgba(15, 23, 31, 0.96);
  border-bottom: 1px solid var(--ds-border);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.16);
}

.topbar-site {
  min-width: 0;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 18px;
  align-items: center;
}

.topbar-site > label {
  color: #73867e;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-page .site-selector {
  grid-row: 2;
  width: 150px;
  height: 36px;
  padding: 0 34px 0 10px;
  border: 1px solid #ccd9d2;
  border-radius: 9px;
  background: #f7faf8;
  color: #16221e;
  font-weight: 700;
}

.site-meta {
  grid-column: 2;
  grid-row: 1 / span 2;
  min-width: 0;
  display: grid;
  grid-template-columns: auto auto minmax(70px, 1fr);
  column-gap: 10px;
  row-gap: 3px;
  align-items: baseline;
}

.site-meta strong {
  grid-column: 1 / -1;
  overflow: hidden;
  color: #16221e;
  font-size: 0.95rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-meta span {
  overflow: hidden;
  color: #73867e;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#siteLocation {
  grid-column: 1;
}

#siteSize {
  grid-column: 2;
}

.site-meta .site-weather {
  grid-column: 3;
  justify-self: start;
  margin-left: 54px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #31473d;
  font-weight: 700;
}

.site-meta .site-weather-icon {
  overflow: visible;
  font-size: 1.15rem;
  line-height: 1;
}

.site-meta .site-weather-temperature {
  color: #31473d;
  font-size: 0.88rem;
  font-weight: 700;
}

.topbar-date {
  justify-self: end;
}

.topbar-live {
  display: grid;
  justify-items: end;
}

.topbar-live span {
  color: #73867e;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.topbar-live strong {
  color: #16221e;
  font-size: 1.35rem;
}

.dashboard-page .system-pill {
  padding: 9px 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #bde8d0;
  border-radius: 999px;
  background: #effaf4;
  color: #1f7147;
  font-size: 0.78rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #31b46d;
  box-shadow: 0 0 0 4px rgba(49, 180, 109, 0.12);
}

.dashboard-stage {
  min-width: 0;
  min-height: 0;
  height: 100%;
  padding: 14px 18px 16px;
  overflow: hidden;
}

.dashboard-view {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: none;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
}

.dashboard-view.active {
  display: grid;
}

.dashboard-view[hidden] {
  display: none !important;
}

.view-heading {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.dashboard-page .eyebrow {
  margin: 0 0 3px;
  color: #2a8c5c;
  font-size: 0.68rem;
}

.dashboard-page .view-heading h1 {
  margin: 0;
  color: #16221e;
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.view-date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #73867e;
  font-size: 0.78rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.view-date-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.overview-layout {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(150px, 1.2fr) minmax(120px, 0.8fr) minmax(92px, 0.55fr);
  gap: 14px;
}

.system-performance-card,
.overview-metric,
.overview-note,
.dashboard-page .dashboard-panel,
.dashboard-page .comparison-card > div,
.dashboard-page .health-summary > div,
.settings-card {
  border: 1px solid #dce6e1;
  background: #fff;
  box-shadow: 0 8px 30px rgba(27, 53, 43, 0.055);
}

.system-performance-card {
  min-height: 0;
  padding: 24px 28px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 170px;
  align-items: center;
  gap: 24px;
  border-radius: 18px;
}

.performance-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #79efb1;
  color: #10231d;
  font-size: 2.3rem;
  font-weight: 900;
}

.performance-copy span,
.overview-metric span,
.settings-card span,
.panel-label {
  color: #73867e;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.performance-copy h2 {
  margin: 6px 0 5px;
  color: #16221e;
  font-size: clamp(1.15rem, 2vw, 1.7rem);
  line-height: 1.15;
}

.performance-copy p,
.settings-copy p,
.settings-card p {
  color: #73867e;
  font-size: 0.84rem;
}

.health-gauge {
  height: 100%;
  min-height: 96px;
  padding: 16px;
  display: grid;
  place-content: center;
  justify-items: center;
  border-radius: 14px;
  background: #f1f8f4;
  text-align: center;
}

.health-gauge span {
  color: #73867e;
  font-size: 0.72rem;
}

.health-gauge strong {
  color: #1f7147;
  font-size: 1.65rem;
}

.overview-metrics {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.overview-metric {
  min-width: 0;
  padding: 18px;
  display: grid;
  align-content: center;
  border-radius: 15px;
}

.overview-metric strong {
  margin: 5px 0 2px;
  overflow: hidden;
  color: #16221e;
  font-size: clamp(1.3rem, 2.2vw, 2rem);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-metric small {
  color: #8b9d95;
  font-size: 0.7rem;
}

.overview-note {
  min-height: 0;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-radius: 15px;
  background: #153329;
  border-color: #153329;
}

.overview-note .eyebrow {
  color: #79efb1;
}

.overview-note h2 {
  margin: 0;
  color: #fff;
  font-size: 1.05rem;
}

.text-action {
  flex: 0 0 auto;
  padding: 9px 14px;
  border: 1px solid rgba(121, 239, 177, 0.35);
  border-radius: 9px;
  background: rgba(121, 239, 177, 0.1);
  color: #79efb1;
  font-weight: 800;
}

.production-heading {
  align-items: end;
}

.dashboard-page .timeframe-buttons {
  margin: 0;
  flex-wrap: nowrap;
}

.dashboard-page .timeframe-buttons button {
  padding: 8px 14px;
  border-color: #d2ded8;
  background: #fff;
  color: #60736b;
  border-radius: 8px;
}

.dashboard-page .timeframe-buttons button.active {
  border-color: #153329;
  background: #153329;
  color: #fff;
}

.production-page-layout,
.performance-page-layout,
.alerts-page-layout,
.settings-layout {
  min-width: 0;
  min-height: 0;
  display: grid;
  gap: 14px;
}

.production-page-layout {
  grid-template-columns: minmax(0, 1fr) 245px;
}

.dashboard-page .dashboard-panel {
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 18px;
  border-radius: 16px;
}

.production-panel {
  display: flex;
  min-height: 0;
}

.dashboard-page .production-chart {
  position: relative;
  display: block;
  width: 100%;
  min-height: 320px;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background:
    radial-gradient(circle at 78% 18%, rgba(230, 162, 60, 0.09), transparent 34%),
    linear-gradient(180deg, rgba(66, 175, 116, 0.08), rgba(66, 175, 116, 0.015));
  overflow: hidden;
}

.dashboard-page .production-chart-svg {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 320px;
  overflow: visible;
}

.dashboard-page .production-grid-line {
  stroke: #dfe8e3;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.dashboard-page .production-grid-line-vertical {
  stroke-dasharray: 4 9;
  opacity: 0.72;
}

.dashboard-page .production-axis-label,
.dashboard-page .production-axis-unit,
.dashboard-page .production-legend text {
  fill: #71857c;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
}

.dashboard-page .production-axis-label-x {
  font-size: 12px;
}

.dashboard-page .production-axis-dot {
  fill: #9aaea5;
}

.dashboard-page .production-actual-area {
  fill: url(#actualProductionFill);
}

.dashboard-page .production-expected-area {
  fill: url(#expectedProductionFill);
}

.dashboard-page .production-actual-line,
.dashboard-page .production-expected-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.dashboard-page .production-actual-line {
  stroke: #31b46d;
  stroke-width: 3.5;
}

.dashboard-page .production-expected-line {
  stroke: #e6a23c;
  stroke-width: 2.5;
  stroke-dasharray: 9 7;
}

.dashboard-page .production-legend-dot-actual,
.dashboard-page .production-current-point {
  fill: #31b46d;
}

.dashboard-page .production-legend-dot-expected {
  fill: #e6a23c;
}

.dashboard-page .production-current-line {
  stroke: rgba(49, 180, 109, 0.48);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.dashboard-page .production-current-halo {
  fill: rgba(49, 180, 109, 0.18);
}

.dashboard-page .production-current-point {
  stroke: #ffffff;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.production-summary {
  min-height: 0;
  display: grid;
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-page .comparison-card > div {
  min-height: 0;
  padding: 14px;
  display: grid;
  align-content: center;
  border-radius: 13px;
}

.dashboard-page .comparison-card span {
  color: #73867e;
  font-size: 0.72rem;
}

.dashboard-page .comparison-card strong {
  color: #16221e;
  font-size: 1.3rem;
}

.performance-page-layout {
  grid-template-columns: minmax(0, 1fr) 270px;
}

.performance-main-column {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
}

.health-component-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.health-component-card {
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid var(--ds-border, #293540);
  border-radius: 13px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.028), transparent 48%),
    var(--ds-surface, #121a22);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.health-component-card > span {
  display: block;
  overflow: hidden;
  color: var(--ds-muted, #8d99a6);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.health-component-card > strong {
  display: block;
  margin-top: 7px;
  color: var(--ds-text, #f4f7f8);
  font-size: 1.28rem;
  line-height: 1;
}

.health-component-card > strong small {
  margin-left: 2px;
  color: var(--ds-muted, #8d99a6);
  font-size: 0.68rem;
  font-weight: 600;
}

.health-component-track {
  height: 4px;
  margin-top: 10px;
  border-radius: 999px;
  background: rgba(141, 153, 166, 0.18);
  overflow: hidden;
}

.health-component-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--ds-green, #68cf82);
}

.health-component-warning .health-component-track i {
  background: var(--ds-amber, #f2b84b);
}

.health-component-danger .health-component-track i {
  background: var(--ds-danger, #ff6b6b);
}

.health-component-empty {
  grid-column: 1 / -1;
  padding: 14px;
  border: 1px solid var(--ds-border, #293540);
  border-radius: 13px;
  color: var(--ds-muted, #8d99a6);
  background: var(--ds-surface, #121a22);
}

.health-chart-panel {
  display: flex;
}

.dashboard-page .health-chart {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 12px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(66, 175, 116, 0.07), rgba(66, 175, 116, 0.01)),
    repeating-linear-gradient(to top, #e8efeb 0, #e8efeb 1px, transparent 1px, transparent 25%);
}

.dashboard-page .health-chart svg {
  width: 100%;
  height: 100%;
}

.dashboard-page .health-summary {
  height: auto;
  min-height: 0;
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-page .health-summary > div {
  min-height: 0;
  padding: 14px;
  border-radius: 13px;
}

.dashboard-page .health-summary span {
  color: #73867e;
  font-size: 0.72rem;
}

.dashboard-page .health-summary strong {
  color: #16221e;
  font-size: 1.08rem;
}

.alerts-page-layout {
  /* Restore the two-column definition when root-cause analysis is re-enabled. */
  /* grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); */
  grid-template-columns: minmax(0, 1fr);
}

.alerts-list-panel,
.root-cause-panel,
.assets-panel {
  overflow: hidden;
}

.panel-label {
  padding-bottom: 10px;
  border-bottom: 1px solid #e4ebe7;
}

.dashboard-page #alerts,
.dashboard-page #rootCause {
  height: calc(100% - 30px);
  min-height: 0;
  padding-top: 2px;
  overflow: auto;
  scrollbar-width: thin;
}

.dashboard-page .alert {
  margin-top: 10px;
  padding: 13px;
  border: 1px solid #dce6e1;
  background: #f7faf8;
  color: #32443c;
}

.dashboard-page .alert.good {
  border-color: #bde8d0;
  background: #effaf4;
  color: #1f7147;
}

.dashboard-page .alert.danger,
.dashboard-page .alert.warning {
  border-color: #efc5c5;
  background: #fff4f4;
  color: #9c3d3d;
}

.dashboard-page #alerts .alert.active {
  outline: 2px solid #43ad76;
}

.dashboard-page .diagnosis-box {
  margin-top: 10px;
  padding: 13px;
  border: 1px solid #e1e9e5;
  border-radius: 12px;
  background: #f8faf9;
}

.dashboard-page .diagnosis-box strong {
  color: #16221e;
}

.dashboard-page .diagnosis-box p {
  color: #60736b;
  font-size: 0.84rem;
}

.assets-panel {
  display: flex;
}

.dashboard-page .asset-list {
  width: 100%;
  min-height: 0;
  padding: 2px 4px 18px 2px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 16px;
  overflow: auto;
  scrollbar-width: thin;
}

.dashboard-page .asset-list div {
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.dashboard-page .asset-list span {
  display: initial;
  margin: 0;
  color: inherit;
}

.dashboard-page .asset-list strong {
  display: initial;
  margin: 0;
}

.dashboard-page .asset-list em {
  color: inherit;
  font-style: normal;
  font-weight: inherit;
}

.dashboard-page .asset-site-tree {
  --asset-row-columns: minmax(280px, 1.55fr) minmax(105px, 0.52fr) minmax(330px, 1.45fr) 36px;
  display: grid;
  gap: 14px;
}

.dashboard-page .asset-site-tree + .asset-site-tree {
  padding-top: 18px;
  border-top: 1px solid #dce6e1;
}

.dashboard-page .asset-site-heading {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid #d7e4de;
  border-radius: 12px;
  background: #f5f9f7;
}

.dashboard-page .asset-site-heading > div {
  display: grid;
  gap: 2px;
}

.dashboard-page .asset-site-heading span {
  color: #73867e;
  font-size: 0.76rem;
}

.dashboard-page .asset-site-heading strong {
  color: #16221e;
  font-size: 1rem;
}

.dashboard-page .asset-battery-section {
  padding-top: 14px;
  border-top: 1px solid #dce6e1;
}

.dashboard-page .asset-battery-list {
  overflow: visible;
  border: 1px solid #dce6e1;
  border-radius: 14px;
  background: #ffffff;
}

.dashboard-page .asset-battery-list > [data-asset-card]:first-child {
  border-radius: 13px 13px 0 0;
}

.dashboard-page .asset-battery-list > [data-asset-card]:last-child {
  border-radius: 0 0 13px 13px;
}

.dashboard-page .asset-battery-list > [data-asset-card]:only-child {
  border-radius: 13px;
}

.dashboard-page .asset-tree-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #315c49;
}

.dashboard-page .asset-tree-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-page .asset-tree-icon-panel {
  color: #386c55;
}

.dashboard-page .asset-inverter-list,
.dashboard-page .asset-battery-list,
.dashboard-page .asset-string-list,
.dashboard-page .asset-panel-list {
  display: grid;
}

.dashboard-page .asset-inverter-root-list {
  gap: 12px;
}

.dashboard-page .asset-inverter-block {
  position: relative;
  border: 1px solid #dce6e1;
  border-radius: 14px;
  background: #ffffff;
  overflow: visible;
}

.dashboard-page .asset-inverter-block > .asset-tree-row {
  border-radius: 13px;
}

.dashboard-page .asset-battery-list > [data-asset-card] + [data-asset-card],
.dashboard-page .asset-string-block + .asset-string-block,
.dashboard-page .asset-panel-list > [data-asset-card] + [data-asset-card] {
  border-top: 1px solid #e1e9e5;
}

.dashboard-page .asset-tree-row {
  position: relative;
  min-width: 0;
  min-height: 58px;
  padding: 9px 12px;
  display: grid;
  grid-template-columns: var(--asset-row-columns);
  align-items: center;
  gap: 14px;
  background: #ffffff;
}

.dashboard-page .asset-tree-row:hover {
  background: #fbfdfc;
}

.dashboard-page .asset-tree-row.asset-menu-open {
  z-index: 1000;
}

.dashboard-page .asset-row-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.dashboard-page .asset-tree-toggle,
.dashboard-page .asset-tree-toggle-spacer {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
}

.dashboard-page .asset-tree-toggle {
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: transparent;
  color: #52675e;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  transition: transform 160ms ease, background 160ms ease;
}

.dashboard-page .asset-tree-toggle[aria-expanded="false"] {
  transform: rotate(-90deg);
}

.dashboard-page .asset-tree-toggle:hover,
.dashboard-page .asset-tree-toggle:focus-visible {
  background: #eef5f1;
  color: #153329;
  outline: none;
}

.dashboard-page .asset-row-name {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.dashboard-page .asset-row-name strong,
.dashboard-page .asset-row-name span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-page .asset-row-name strong {
  color: #16221e;
  font-size: 0.87rem;
}

.dashboard-page .asset-row-name span {
  color: #6d8077;
  font-size: 0.75rem;
}

.dashboard-page .asset-row-status {
  min-width: 0;
}

.dashboard-page .asset-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #53675e;
  font-size: 0.76rem;
  font-weight: 700;
}

.dashboard-page .asset-status > span {
  display: block;
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #8ea097;
}

.dashboard-page .asset-status-online {
  color: #198754;
}

.dashboard-page .asset-status-online > span {
  background: #22a861;
}

.dashboard-page .asset-status-warning,
.dashboard-page .asset-status-maintenance {
  color: #a36d13;
}

.dashboard-page .asset-status-warning > span,
.dashboard-page .asset-status-maintenance > span {
  background: #e8a52c;
}

.dashboard-page .asset-status-offline {
  color: #a23d3d;
}

.dashboard-page .asset-status-offline > span {
  background: #d95b5b;
}

.dashboard-page .asset-row-metrics {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(78px, 1fr));
  align-items: center;
  gap: 12px;
}

.dashboard-page .asset-row-metric {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.dashboard-page .asset-row-metric span,
.dashboard-page .asset-row-metric strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-page .asset-row-metric span {
  color: #7a8c84;
  font-size: 0.68rem;
}

.dashboard-page .asset-row-metric strong {
  color: #263b33;
  font-size: 0.76rem;
  font-weight: 700;
}

.dashboard-page .asset-tree-children {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  overflow: visible;
}

.dashboard-page .asset-tree-children[hidden] {
  display: none;
}

.dashboard-page .asset-string-children,
.dashboard-page .asset-panel-children {
  margin-left: 0;
  background: #ffffff;
  overflow: visible;
}

.dashboard-page .asset-tree-level-2 .asset-row-identity {
  padding-left: 34px;
}

.dashboard-page .asset-tree-level-3 .asset-row-identity {
  padding-left: 68px;
}

.dashboard-page .asset-tree-level-3 {
  background: #fbfdfc;
}

.dashboard-page .asset-tree-level-3 .asset-tree-icon {
  width: 24px;
  height: 24px;
  background: transparent;
}

.dashboard-page .asset-string-list > .asset-string-block:first-child > .asset-tree-row,
.dashboard-page .asset-panel-list > [data-asset-card]:first-child {
  border-top: 1px solid #e1e9e5;
}

.dashboard-page .asset-section-empty,
.dashboard-page .asset-child-empty {
  min-height: 92px;
  padding: 20px;
  display: grid;
  place-content: center;
  gap: 4px;
  color: #71837b;
  text-align: center;
}

.dashboard-page .asset-section-empty strong {
  color: #31463d;
}

.dashboard-page .asset-section-empty-compact {
  min-height: 66px;
}

.dashboard-page .asset-child-empty {
  min-height: 68px;
  font-size: 0.8rem;
}

.dashboard-page .asset-list-empty {
  min-height: 220px;
  display: grid;
  place-items: center;
  place-content: center;
  gap: 9px;
  border: 1px dashed #b9ccc2;
  border-radius: 14px;
  background: #f7faf8;
  color: #71837b;
  text-align: center;
}

.dashboard-page .asset-list-empty .asset-tree-icon {
  width: 44px;
  height: 44px;
}

.dashboard-page .asset-list-empty strong {
  color: #263b33;
  font-size: 1rem;
}

.dashboard-page .asset-card-actions {
  position: relative;
  z-index: 2;
  justify-self: end;
  flex: 0 0 auto;
}

.dashboard-page .asset-card-menu-button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #50665d;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
}

.dashboard-page .asset-card-menu-button:not(:disabled):hover,
.dashboard-page .asset-card-menu-button:not(:disabled):focus-visible {
  border-color: #d5e2dc;
  background: #ffffff;
  color: #153329;
  outline: none;
}

.dashboard-page .asset-card-menu-button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.dashboard-page .asset-card-menu {
  position: fixed;
  z-index: 100000;
  width: 168px;
  padding: 6px;
  display: grid;
  gap: 2px;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid #c8d8d0;
  border-radius: 11px;
  background: #ffffff !important;
  opacity: 1 !important;
  box-shadow: 0 22px 52px rgba(16, 39, 30, 0.3);
}

.dashboard-page .asset-card-menu[hidden] {
  display: none;
}

.dashboard-page .asset-card-menu button {
  width: 100%;
  padding: 9px 10px;
  border-radius: 7px;
  background: #ffffff;
  color: #243b32;
  font-size: 0.84rem;
  font-weight: 650;
  text-align: left;
}

.dashboard-page .asset-card-menu button:hover,
.dashboard-page .asset-card-menu button:focus-visible {
  background: #eef7f2;
  color: #1e7149;
  outline: none;
}

.dashboard-page .asset-card-menu .asset-delete-menu-item {
  color: #a23d3d;
}

.dashboard-page .asset-card-menu .asset-delete-menu-item:hover,
.dashboard-page .asset-card-menu .asset-delete-menu-item:focus-visible {
  background: #fff1f1;
  color: #8c2f2f;
}

.dashboard-page .asset-actions {
  position: relative;
  flex: 0 0 auto;
}

.dashboard-page .asset-add-button {
  padding: 10px 15px;
  border-radius: 9px;
  background: #153329;
  color: #ffffff;
  font-weight: 700;
}

.dashboard-page .asset-add-button:not(:disabled):hover {
  background: #1d493a;
}

.dashboard-page .asset-type-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  right: 0;
  width: 180px;
  padding: 7px;
  display: grid;
  gap: 3px;
  border: 1px solid #dce6e1;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(27, 53, 43, 0.16);
}

.dashboard-page .asset-type-menu[hidden] {
  display: none;
}

.dashboard-page .asset-type-menu button {
  width: 100%;
  padding: 10px 11px;
  border-radius: 8px;
  background: transparent;
  color: #243b32;
  font-size: 0.88rem;
  font-weight: 650;
  text-align: left;
}

.dashboard-page .asset-type-menu button:hover,
.dashboard-page .asset-type-menu button:focus-visible {
  background: #eef7f2;
  color: #1e7149;
  outline: none;
}

.dashboard-page .asset-dialog {
  width: min(650px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: #ffffff;
  color: #16221e;
  box-shadow: 0 28px 80px rgba(10, 28, 21, 0.28);
  overflow: auto;
}

.dashboard-page .asset-dialog::backdrop {
  background: rgba(8, 24, 18, 0.55);
  backdrop-filter: blur(3px);
}

.dashboard-page .asset-form {
  width: 100%;
  max-width: none;
  padding: 24px;
  gap: 18px;
  box-sizing: border-box;
}

.dashboard-page .asset-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.dashboard-page .asset-dialog-header h2 {
  margin: 0;
  color: #16221e;
  font-size: 1.45rem;
}

.dashboard-page .asset-dialog-close {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eef3f0;
  color: #42584f;
  font-size: 1.45rem;
  line-height: 1;
}

.dashboard-page .asset-site-context {
  margin: -6px 0 0;
  color: #667a71;
  font-size: 0.9rem;
}

.dashboard-page .asset-form-fields {
  display: grid;
  gap: 14px;
}

.dashboard-page .asset-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-page .asset-form-grid label {
  min-width: 0;
  display: grid;
  gap: 6px;
  color: #263b33;
  font-size: 0.84rem;
  font-weight: 700;
}

.dashboard-page .asset-form-wide {
  grid-column: 1 / -1;
}

.dashboard-page .asset-form input,
.dashboard-page .asset-form select {
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #ccd9d2;
  border-radius: 9px;
  background: #ffffff;
  color: #16221e;
  font: inherit;
  box-sizing: border-box;
}

.dashboard-page .asset-form input:focus,
.dashboard-page .asset-form select:focus {
  border-color: #43ad76;
  outline: 3px solid rgba(67, 173, 118, 0.13);
}

.dashboard-page .asset-form input::placeholder {
  color: #91a199;
}

.dashboard-page .asset-parent-empty {
  padding: 18px;
  border: 1px dashed #b9ccc2;
  border-radius: 12px;
  background: #f6faf8;
  color: #60736b;
  text-align: center;
}

.dashboard-page .asset-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.dashboard-page .asset-cancel-button,
.dashboard-page .asset-save-button {
  padding: 10px 16px;
  border-radius: 9px;
  font-weight: 700;
}

.dashboard-page .asset-cancel-button {
  border: 1px solid #ccd9d2;
  background: #ffffff;
  color: #42584f;
}

.dashboard-page .asset-save-button {
  background: #153329;
  color: #ffffff;
}

.dashboard-page .asset-form-message {
  min-height: 20px;
  margin: -8px 0 0;
  color: #9c3d3d;
  font-size: 0.86rem;
  font-weight: 650;
}

.dashboard-page .asset-delete-dialog {
  width: min(500px, calc(100% - 32px));
}

.dashboard-page .asset-delete-message {
  margin: 0;
  color: #263b33;
  line-height: 1.55;
}

.dashboard-page .asset-delete-restriction {
  margin: -6px 0 0;
  padding: 12px 14px;
  border: 1px solid #ead8d8;
  border-radius: 10px;
  background: #fff7f7;
  color: #7c4747;
  font-size: 0.86rem;
  line-height: 1.45;
}

.dashboard-page .asset-delete-button {
  padding: 10px 16px;
  border-radius: 9px;
  background: #a23d3d;
  color: #ffffff;
  font-weight: 700;
}

.dashboard-page .asset-delete-button:not(:disabled):hover {
  background: #842f2f;
}

.settings-layout {
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  align-content: start;
}

.settings-card {
  min-height: 150px;
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  border-radius: 16px;
}

.settings-copy {
  min-width: 0;
  flex: 1;
}

.settings-card h2 {
  margin: 3px 0 5px;
  color: #16221e;
  font-size: 1.25rem;
}

.settings-card .btn {
  flex: 0 0 auto;
  padding: 11px 16px;
  border-radius: 9px;
  background: #153329;
  color: #fff;
}

.muted-card {
  background: #f7faf8;
  box-shadow: none;
}

.empty-dashboard {
  height: 100%;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  padding: 32px !important;
  background: #eef3f0;
  color: #16221e;
}

.empty-dashboard h1 {
  margin: 0;
  color: #16221e;
  font-size: 2rem;
}

.empty-dashboard p {
  color: #73867e;
}

@media (max-width: 900px) and (pointer: coarse) {
  .dashboard-page {
    overflow: auto;
  }

  .dashboard-page .app-shell {
    min-height: 100vh;
    height: auto;
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .sidebar-brand > div:last-child,
  .side-nav-item:not(.active) {
    font-size: 0;
  }

  .dashboard-page .sidebar {
    min-height: 100vh;
  }

  .dashboard-page .app-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .topbar-live {
    display: none;
  }

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

.dashboard-page .chart-empty {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #73867e;
  font-size: 0.85rem;
}

.dashboard-page button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

/* DeSolar landing page */

.landing-page {
  min-height: 100vh;
  background: #f2f3f5;
  color: #18202b;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

.landing-page a {
  color: inherit;
}

.landing-header {
  min-height: 0;
  padding: 0;
  background: #ffffff;
  border-bottom: 1px solid #dde1e6;
  display: block;
}

.landing-nav {
  width: min(1220px, calc(100% - 48px));
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #18202b;
  text-decoration: none;
  font-size: 1.12rem;
  font-weight: 800;
}

.landing-brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: #f4a51c;
  color: #151b25;
  font-size: 1rem;
}

.landing-nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}

.landing-nav-links a,
.landing-careers-link {
  color: #596273;
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 700;
}

.landing-nav-links a:hover,
.landing-careers-link:hover {
  color: #18202b;
}

.landing-nav-cta {
  padding: 11px 17px;
  border-radius: 9px;
  background: #20283a;
  color: #ffffff !important;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 800;
}

.landing-hero,
.landing-product,
.landing-process,
.landing-contact {
  width: min(1220px, calc(100% - 48px));
  margin: 0 auto;
}

.landing-hero {
  min-height: 650px;
  padding: 76px 0 82px;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(560px, 1.1fr);
  align-items: center;
  gap: 70px;
}

.landing-hero-copy {
  max-width: 560px;
}

.landing-kicker {
  margin: 0 0 16px;
  color: #8b5a00;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.landing-page h1,
.landing-page h2,
.landing-page h3,
.landing-page p {
  margin-top: 0;
}

.landing-page h1 {
  margin-bottom: 24px;
  color: #18202b;
  font-size: clamp(3.2rem, 5.6vw, 5.75rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.landing-lead {
  max-width: 540px;
  margin-bottom: 30px;
  color: #596273;
  font-size: 1.16rem;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.landing-button {
  width: fit-content;
  padding: 13px 20px;
  border: 1px solid transparent;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 0.94rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.landing-button.primary {
  background: #f4a51c;
  color: #18202b;
}

.landing-button.primary:hover {
  background: #e39612;
}

.landing-button.secondary {
  border-color: #ccd2da;
  background: #ffffff;
  color: #20283a;
}

.landing-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: #697384;
  font-size: 0.84rem;
  font-weight: 700;
}

.landing-proof span::before {
  content: "✓";
  margin-right: 7px;
  color: #d78600;
}

.landing-preview {
  min-width: 0;
}

.preview-window {
  min-height: 455px;
  border: 1px solid #cfd4db;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 28px 70px rgba(30, 38, 52, 0.16);
  display: grid;
  grid-template-columns: 72px 1fr;
  overflow: hidden;
  transform: perspective(1100px) rotateY(-3deg) rotateX(1deg);
  transform-origin: center;
}

.preview-sidebar {
  padding: 22px 18px;
  background: #242b37;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.preview-logo {
  width: 36px;
  height: 36px;
  margin-bottom: 18px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: #f4a51c;
  color: #1d2430;
  font-weight: 900;
}

.preview-nav {
  width: 30px;
  height: 8px;
  border-radius: 999px;
  background: #626a78;
}

.preview-nav.active {
  background: #f4a51c;
}

.preview-main {
  padding: 24px;
  background: #f7f7f8;
}

.preview-topbar,
.preview-health,
.preview-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.preview-topbar {
  margin-bottom: 22px;
}

.preview-topbar small,
.preview-health small,
.preview-metrics small,
.preview-score small {
  display: block;
  color: #7b8493;
  font-size: 0.72rem;
  font-weight: 700;
}

.preview-topbar strong,
.preview-health strong {
  display: block;
  color: #202735;
  font-size: 0.98rem;
}

.preview-status {
  padding: 6px 10px;
  border-radius: 999px;
  background: #e5f3e9;
  color: #36704a;
  font-size: 0.7rem;
  font-weight: 800;
}

.preview-health {
  padding: 20px;
  border-radius: 15px;
  background: #ffffff;
  border: 1px solid #e0e3e7;
}

.preview-check {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: #f4a51c;
  color: #ffffff;
  font-size: 1.35rem;
  font-weight: 900;
}

.preview-health > div:nth-child(2) {
  margin-right: auto;
}

.preview-score {
  min-width: 62px;
  text-align: right;
}

.preview-score strong {
  font-size: 1.5rem;
}

.preview-metrics {
  margin: 16px 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.preview-metrics div {
  padding: 14px;
  border: 1px solid #e0e3e7;
  border-radius: 12px;
  background: #ffffff;
}

.preview-metrics strong {
  display: block;
  margin-top: 5px;
  color: #202735;
  font-size: 1rem;
}

.preview-chart {
  height: 190px;
  padding: 18px 18px 12px;
  border: 1px solid #e0e3e7;
  border-radius: 14px;
  background: #ffffff;
}

.preview-chart-header {
  color: #656e7d;
  font-size: 0.75rem;
  font-weight: 800;
}

.preview-bars {
  height: 125px;
  margin-top: 18px;
  border-bottom: 1px solid #d8dce1;
  display: flex;
  align-items: end;
  justify-content: space-around;
  gap: 12px;
}

.preview-bars i {
  width: 9%;
  min-height: 8px;
  border-radius: 6px 6px 0 0;
  background: #f4a51c;
  opacity: 0.9;
}

.landing-product,
.landing-process,
.landing-contact {
  padding: 96px 0;
}

.landing-product {
  border-top: 1px solid #dce0e5;
}

.landing-section-heading {
  max-width: 720px;
  margin-bottom: 48px;
}

.landing-section-heading.compact {
  margin-bottom: 38px;
}

.landing-page h2 {
  margin-bottom: 18px;
  color: #18202b;
  font-size: clamp(2.2rem, 4vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.landing-section-heading > p:last-child,
.landing-contact-copy > p,
.landing-feature-card p,
.landing-process-step p {
  color: #667081;
}

.landing-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.landing-feature-card {
  min-height: 260px;
  padding: 28px;
  border: 1px solid #d9dde3;
  border-radius: 16px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
}

.landing-feature-card.featured {
  background: #20283a;
  border-color: #20283a;
}

.landing-feature-card.featured h3,
.landing-feature-card.featured p,
.landing-feature-card.featured .feature-number {
  color: #ffffff;
}

.feature-number {
  margin-bottom: auto;
  color: #9b6811;
  font-size: 0.8rem;
  font-weight: 900;
}

.landing-feature-card h3,
.landing-process-step h3 {
  margin-bottom: 10px;
  color: #202735;
  font-size: 1.28rem;
}

.landing-process {
  border-top: 1px solid #dce0e5;
}

.landing-process-grid {
  border-top: 1px solid #ccd2d9;
}

.landing-process-step {
  padding: 26px 0;
  border-bottom: 1px solid #ccd2d9;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.landing-process-step > strong {
  color: #d48600;
  font-size: 1.65rem;
}

.landing-process-step p {
  margin-bottom: 0;
}

.landing-contact {
  margin-bottom: 78px;
  padding: 58px;
  border-radius: 22px;
  background: #20283a;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(380px, 1.05fr);
  gap: 70px;
}

.landing-contact h2,
.landing-contact-copy > p,
.landing-contact .landing-kicker,
.landing-contact .landing-careers-link {
  color: #ffffff;
}

.landing-contact-copy > p {
  opacity: 0.72;
}

.landing-contact .landing-careers-link {
  display: inline-block;
  margin-top: 18px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.landing-contact-form {
  max-width: none;
  display: grid;
  gap: 14px;
}

.landing-contact-form label {
  display: grid;
  gap: 7px;
  color: #dfe3e8;
  font-size: 0.82rem;
  font-weight: 800;
}

.landing-contact-form input,
.landing-contact-form textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #596174;
  border-radius: 8px;
  background: #2a3346;
  color: #ffffff;
  font: inherit;
}

.landing-contact-form textarea {
  min-height: 110px;
  resize: vertical;
}

.landing-contact-form input:focus,
.landing-contact-form textarea:focus {
  outline: 2px solid #f4a51c;
  outline-offset: 1px;
}

.form-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.landing-contact-form #form-status {
  min-height: 20px;
  margin: 0;
  color: #f6c267;
  font-size: 0.86rem;
}

.landing-footer {
  width: min(1220px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 34px;
  border-top: 1px solid #d7dce2;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: #707988;
  font-size: 0.85rem;
}

.landing-footer p,
.landing-footer span {
  margin: 0;
}

@media (max-width: 1050px) {
  .landing-hero {
    grid-template-columns: 1fr;
    gap: 52px;
  }

  .landing-hero-copy {
    max-width: 760px;
  }

  .landing-preview {
    max-width: 780px;
  }

  .landing-contact {
    grid-template-columns: 1fr;
    gap: 38px;
  }
}

@media (max-width: 760px) {
  .landing-nav {
    width: min(100% - 30px, 1220px);
    height: 68px;
  }

  .landing-nav-links a {
    display: none;
  }

  .landing-nav-links a[href="/login.html"] {
    display: inline-block;
  }

  .landing-nav-cta {
    padding: 9px 12px;
    font-size: 0.82rem;
    white-space: nowrap;
  }

  .landing-hero,
  .landing-product,
  .landing-process,
  .landing-contact,
  .landing-footer {
    width: min(100% - 30px, 1220px);
  }

  .landing-hero {
    min-height: 0;
    padding: 60px 0 68px;
  }

  .landing-page h1 {
    font-size: clamp(2.8rem, 13vw, 4.4rem);
  }

  .preview-window {
    min-height: 390px;
    grid-template-columns: 54px 1fr;
    transform: none;
  }

  .preview-sidebar {
    padding: 18px 11px;
  }

  .preview-main {
    padding: 15px;
  }

  .preview-health {
    align-items: flex-start;
  }

  .preview-health > div:nth-child(2) {
    min-width: 0;
  }

  .preview-score {
    display: none;
  }

  .preview-metrics {
    grid-template-columns: 1fr;
  }

  .preview-metrics div:nth-child(n + 2) {
    display: none;
  }

  .landing-feature-grid {
    grid-template-columns: 1fr;
  }

  .landing-feature-card {
    min-height: 220px;
  }

  .landing-product,
  .landing-process {
    padding: 70px 0;
  }

  .landing-contact {
    margin-bottom: 54px;
    padding: 34px 22px;
  }

  .landing-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

.dashboard-page .empty-dashboard {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 32px 24px;
  box-sizing: border-box;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 14px;
}
@media (max-width: 1050px) {
  .dashboard-page .asset-site-tree {
    --asset-row-columns: minmax(245px, 1.4fr) minmax(90px, 0.5fr) minmax(210px, 1fr) 36px;
  }

  .dashboard-page .asset-row-metrics {
    grid-template-columns: repeat(2, minmax(78px, 1fr));
  }

  .dashboard-page .asset-row-metric:nth-child(n + 3) {
    display: none;
  }
}

@media (max-width: 760px) {
  .dashboard-page .assets-panel {
    padding: 10px;
  }

  .dashboard-page .asset-tree-row,
  .dashboard-page .asset-tree-level-2,
  .dashboard-page .asset-tree-level-3 {
    min-height: 72px;
    grid-template-columns: minmax(0, 1fr) 36px;
    gap: 8px;
  }

  .dashboard-page .asset-row-status {
    grid-column: 1;
    margin-left: 68px;
  }

  .dashboard-page .asset-tree-level-2 .asset-row-status {
    margin-left: 86px;
  }

  .dashboard-page .asset-tree-level-3 .asset-row-status {
    margin-left: 104px;
  }

  .dashboard-page .asset-row-metrics {
    display: none;
  }

  .dashboard-page .asset-card-actions {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .dashboard-page .asset-tree-children,
  .dashboard-page .asset-string-children,
  .dashboard-page .asset-panel-children {
    margin: 0;
  }

  .dashboard-page .asset-tree-level-2 .asset-row-identity {
    padding-left: 18px;
  }

  .dashboard-page .asset-tree-level-3 .asset-row-identity {
    padding-left: 36px;
  }

}

@media (max-width: 650px) {
  .dashboard-page .asset-form-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-page .asset-form-wide {
    grid-column: auto;
  }

  .dashboard-page .asset-form {
    padding: 20px;
  }
}

/* Settings management */
.dashboard-page .settings-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 16px;
}

.dashboard-page .settings-card {
  min-height: 138px;
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  border-radius: 16px;
  box-sizing: border-box;
}

.dashboard-page .settings-card-provider {
  grid-column: 1 / -1;
}

.dashboard-page .settings-icon,
.dashboard-page .provider-logo {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eef7f2;
  color: #1f7147;
  font-size: 1rem;
  font-weight: 900;
}

.dashboard-page .provider-logo {
  background: #153329;
  color: #ffffff;
}

.dashboard-page .settings-copy {
  min-width: 0;
  flex: 1;
}

.dashboard-page .settings-copy p {
  margin: 0;
  line-height: 1.5;
}

.dashboard-page .settings-card-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 9px;
}

.dashboard-page .settings-card-provider .settings-card-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dashboard-page .enphase-system-select {
  min-width: 240px;
  max-width: 360px;
  min-height: 42px;
  padding: 10px 34px 10px 12px;
  border: 1px solid #c9d7d0;
  border-radius: 9px;
  background: #ffffff;
  color: #294238;
  font: inherit;
}


.dashboard-page .enphase-system-select:focus {
  border-color: #43ad76;
  outline: 3px solid rgba(67, 173, 118, 0.13);
}

.dashboard-page .provider-option-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0 18px;
}

.dashboard-page .provider-option {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 13px 15px;
  border: 1px solid #d3e0d9;
  border-radius: 12px;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dashboard-page .provider-option:hover:not(:disabled) {
  border-color: #43ad76;
  background: #f4fbf7;
}

.dashboard-page .provider-option:disabled {
  cursor: default;
  opacity: 0.6;
}

.dashboard-page .provider-option-logo {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #153329;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 900;
}

.dashboard-page .provider-option-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.dashboard-page .provider-option-copy strong {
  font-weight: 750;
  color: #1c3a2e;
}

.dashboard-page .provider-option-copy span {
  font-size: 0.85rem;
  color: #5c7268;
}

.dashboard-page .provider-option-tag {
  flex: 0 0 auto;
  padding: 3px 10px;
  border-radius: 999px;
  background: #eef2f0;
  color: #5c7268;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.dashboard-page .provider-field {
  display: grid;
  gap: 7px;
}

.dashboard-page .provider-field-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #263b33;
  font-size: 0.84rem;
  font-weight: 700;
}

.dashboard-page .provider-help-button {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #b8cac1;
  border-radius: 50%;
  background: transparent;
  color: #537064;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.dashboard-page .provider-help-button:hover,
.dashboard-page .provider-help-button:focus-visible {
  border-color: #43ad76;
  color: #43ad76;
  outline: none;
}

.dashboard-page .provider-field-help {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #d7e2dc;
  border-radius: 9px;
  background: #f3f7f5;
  color: #5c7268;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.45;
}

.dashboard-page .provider-request textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #c9d7d0;
  border-radius: 9px;
  background: #ffffff;
  color: #294238;
  font: inherit;
  resize: vertical;
}

.dashboard-page .provider-request textarea:focus {
  border-color: #43ad76;
  outline: 3px solid rgba(67, 173, 118, 0.13);
}

.dashboard-page .settings-card .btn {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 10px 15px;
  border-radius: 9px;
  background: #153329;
  color: #ffffff;
  font-weight: 750;
  white-space: nowrap;
}

.dashboard-page .settings-card .settings-secondary-button {
  border: 1px solid #c9d7d0;
  background: #ffffff;
  color: #294238;
}

.dashboard-page .settings-card .btn:not(:disabled):hover {
  transform: translateY(-1px);
}

.dashboard-page .settings-card .settings-secondary-button:not(:disabled):hover {
  border-color: #8eaa9c;
  background: #f5faf7;
}

.dashboard-page .settings-card .btn:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

.dashboard-page .settings-dialog {
  width: min(680px, calc(100% - 32px));
}

.dashboard-page .settings-form-note {
  margin: -2px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f3f7f5;
  color: #61766d;
  font-size: 0.83rem;
  line-height: 1.5;
}

.dashboard-page .asset-form-message[data-state="success"] {
  color: #1f7147;
}

.dashboard-page .asset-form-message[data-state="error"] {
  color: #9c3d3d;
}

@media (max-width: 1100px) {
  .health-component-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .performance-page-layout {
    grid-template-columns: 1fr;
  }

  .health-component-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .dashboard-page .settings-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-page .settings-card-provider {
    grid-column: auto;
  }
}


/* Tesla-inspired DeSolar theme: layered charcoal, soft white, green and solar amber */
:root {
  --ds-bg: #0b1117;
  --ds-shell: #0e151c;
  --ds-surface: #121a22;
  --ds-surface-raised: #18222c;
  --ds-surface-soft: #202b36;
  --ds-border: #293540;
  --ds-border-strong: #3a4855;
  --ds-text: #f4f7f8;
  --ds-muted: #98a5b1;
  --ds-muted-soft: #6f7c88;
  --ds-green: #68cf82;
  --ds-green-hover: #7bdd92;
  --ds-green-soft: rgba(104, 207, 130, 0.13);
  --ds-green-border: rgba(104, 207, 130, 0.38);
  --ds-amber: #f2b84b;
  --ds-amber-hover: #f7c765;
  --ds-amber-soft: rgba(242, 184, 75, 0.13);
  --ds-amber-border: rgba(242, 184, 75, 0.38);
  --ds-danger: #ef6b6b;
  --ds-danger-soft: rgba(239, 107, 107, 0.13);
  --ds-danger-border: rgba(239, 107, 107, 0.38);
}

/* Dashboard */
.dashboard-page {
  background: var(--ds-bg);
  color: var(--ds-text);
  color-scheme: dark;
}

.dashboard-page .app-shell,
.dashboard-page .empty-dashboard {
  background: var(--ds-bg);
  color: var(--ds-text);
}

.dashboard-page .sidebar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 28%),
    #0d141b;
  color: var(--ds-text);
  border-right: 1px solid var(--ds-border);
  box-shadow: 16px 0 42px rgba(0, 0, 0, 0.18);
}

.dashboard-page .sidebar-brand,
.dashboard-page .sidebar-footer {
  border-color: var(--ds-border);
}

.dashboard-page .brand-mark,
.dashboard-page .provider-logo {
  background: var(--ds-amber);
  color: #10161d;
  box-shadow: 0 6px 22px rgba(242, 184, 75, 0.2);
}

.dashboard-page .sidebar-brand span,
.dashboard-page .side-link,
.dashboard-page .sidebar-logout,
.dashboard-page .nav-icon {
  color: var(--ds-muted);
}

.dashboard-page .side-nav-item {
  color: #d7dde2;
}

.dashboard-page .side-nav-item:hover,
.dashboard-page .side-nav-item.active {
  background: var(--ds-green-soft);
  color: var(--ds-text);
  box-shadow: inset 2px 0 0 var(--ds-green);
}

.dashboard-page .side-nav-item.active .nav-icon,
.dashboard-page .side-nav-item:hover .nav-icon {
  color: var(--ds-green);
}

.dashboard-page .side-link:hover,
.dashboard-page .sidebar-logout:hover {
  background: rgba(255, 255, 255, 0.055);
  color: var(--ds-text);
}


.dashboard-page .topbar-site > label,
.dashboard-page .site-meta span,
.dashboard-page .topbar-live span,
.dashboard-page .view-date,
.dashboard-page .performance-copy span,
.dashboard-page .overview-metric span,
.dashboard-page .settings-card span,
.dashboard-page .panel-label,
.dashboard-page .performance-copy p,
.dashboard-page .settings-copy p,
.dashboard-page .settings-card p,
.dashboard-page .health-gauge span,
.dashboard-page .overview-metric small,
.dashboard-page .comparison-card span,
.dashboard-page .health-summary span,
.dashboard-page .chart-empty,
.dashboard-page .asset-row-name span,
.dashboard-page .asset-row-metric span,
.dashboard-page .asset-site-heading span,
.dashboard-page .asset-site-context,
.dashboard-page .asset-section-empty,
.dashboard-page .asset-child-empty,
.dashboard-page .asset-list-empty,
.dashboard-page .settings-form-note,
.dashboard-page .empty-dashboard p {
  color: var(--ds-muted);
}

.dashboard-page .site-meta strong,
.dashboard-page .topbar-live strong,
.dashboard-page .view-heading h1,
.dashboard-page .performance-copy h2,
.dashboard-page .overview-metric strong,
.dashboard-page .comparison-card strong,
.dashboard-page .health-summary strong,
.dashboard-page .diagnosis-box strong,
.dashboard-page .asset-site-heading strong,
.dashboard-page .asset-row-name strong,
.dashboard-page .asset-row-metric strong,
.dashboard-page .asset-section-empty strong,
.dashboard-page .asset-list-empty strong,
.dashboard-page .asset-dialog-header h2,
.dashboard-page .settings-card h2,
.dashboard-page .empty-dashboard h1 {
  color: var(--ds-text);
}

.dashboard-page .topbar-live strong,
.dashboard-page #actualProduction,
.dashboard-page #currentHealthScore,
.dashboard-page #healthScore {
  color: var(--ds-green);
}

.dashboard-page #expectedProduction {
  color: var(--ds-amber);
}

.dashboard-page .site-selector,
.dashboard-page .asset-form input,
.dashboard-page .asset-form select {
  border-color: var(--ds-border-strong);
  background: var(--ds-surface);
  color: var(--ds-text);
}

.dashboard-page .site-selector:focus,
.dashboard-page .asset-form input:focus,
.dashboard-page .asset-form select:focus {
  border-color: var(--ds-green);
  outline: 3px solid rgba(104, 207, 130, 0.15);
}

.dashboard-page .asset-form input::placeholder {
  color: var(--ds-muted-soft);
}

.dashboard-page .system-pill {
  border-color: var(--ds-green-border);
  background: var(--ds-green-soft);
  color: #c9f2d3;
}

.dashboard-page .status-dot {
  background: var(--ds-green);
  box-shadow: 0 0 0 4px rgba(104, 207, 130, 0.13), 0 0 16px rgba(104, 207, 130, 0.28);
}

.dashboard-page .dashboard-stage {
  background:
    radial-gradient(circle at 82% 4%, rgba(104, 207, 130, 0.065), transparent 28%),
    radial-gradient(circle at 18% 96%, rgba(242, 184, 75, 0.035), transparent 34%),
    var(--ds-bg);
}

.dashboard-page .eyebrow {
  color: var(--ds-green);
}

.dashboard-page .system-performance-card,
.dashboard-page .overview-metric,
.dashboard-page .overview-note,
.dashboard-page .dashboard-panel,
.dashboard-page .comparison-card > div,
.dashboard-page .health-summary > div,
.dashboard-page .settings-card {
  border-color: var(--ds-border);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.028), transparent 48%),
    var(--ds-surface);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
}

.dashboard-page .performance-icon {
  border: 1px solid var(--ds-green-border);
  background: linear-gradient(145deg, rgba(104, 207, 130, 0.42), rgba(104, 207, 130, 0.18));
  color: #dcf8e3;
  box-shadow: inset 0 0 22px rgba(104, 207, 130, 0.18);
}

.dashboard-page .health-gauge {
  border: 1px solid var(--ds-green-border);
  background: var(--ds-green-soft);
}

.dashboard-page .health-gauge strong {
  color: var(--ds-green);
}

.dashboard-page .overview-note {
  border-color: var(--ds-green-border);
  background:
    linear-gradient(120deg, rgba(104, 207, 130, 0.14), rgba(104, 207, 130, 0.035)),
    var(--ds-surface);
}

.dashboard-page .overview-note .eyebrow,
.dashboard-page .text-action {
  color: var(--ds-green);
}

.dashboard-page .text-action {
  border-color: var(--ds-green-border);
  background: var(--ds-green-soft);
}

.dashboard-page .text-action:hover {
  background: rgba(104, 207, 130, 0.21);
}

.dashboard-page .timeframe-buttons button {
  border-color: var(--ds-border-strong);
  background: var(--ds-surface);
  color: var(--ds-muted);
}

.dashboard-page .timeframe-buttons button:hover {
  border-color: var(--ds-green-border);
  color: var(--ds-green);
}

.dashboard-page .timeframe-buttons button.active,
.dashboard-page .asset-add-button,
.dashboard-page .asset-save-button,
.dashboard-page .settings-button {
  border-color: var(--ds-green);
  background: var(--ds-green);
  color: #10161d;
}

.dashboard-page .timeframe-buttons button.active:hover,
.dashboard-page .asset-add-button:not(:disabled):hover,
.dashboard-page .asset-save-button:not(:disabled):hover,
.dashboard-page .settings-button:not(:disabled):hover {
  background: var(--ds-green-hover);
  border-color: var(--ds-green-hover);
}

.dashboard-page .production-chart {
  background:
    radial-gradient(circle at 72% 20%, rgba(104, 207, 130, 0.1), transparent 35%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 62%),
    #0d141b;
}

.dashboard-page .production-grid-line {
  stroke: #2b3741;
}

.dashboard-page .production-grid-line-vertical {
  opacity: 0.62;
}

.dashboard-page .production-axis-label,
.dashboard-page .production-axis-unit,
.dashboard-page .production-legend text {
  fill: #9aa7b2;
}

.dashboard-page .production-axis-dot {
  fill: #65727e;
}

.dashboard-page .production-actual-line {
  stroke: var(--ds-green);
}

.dashboard-page .production-expected-line {
  stroke: var(--ds-amber);
  opacity: 0.9;
}

.dashboard-page .production-legend-dot-actual,
.dashboard-page .production-current-point {
  fill: var(--ds-green);
}

.dashboard-page .production-legend-dot-expected {
  fill: var(--ds-amber);
}

.dashboard-page .production-current-line {
  stroke: rgba(104, 207, 130, 0.48);
}

.dashboard-page .production-current-halo {
  fill: rgba(104, 207, 130, 0.17);
}

.dashboard-page .production-current-point {
  stroke: #f4f7f8;
}

.dashboard-page .health-chart {
  background:
    linear-gradient(180deg, rgba(104, 207, 130, 0.055), transparent),
    repeating-linear-gradient(to top, #26323c 0, #26323c 1px, transparent 1px, transparent 25%),
    #0d141b;
}

.dashboard-page .health-trend-positive {
  color: var(--ds-green);
}

.dashboard-page .health-trend-neutral {
  color: var(--ds-amber);
}

.dashboard-page .health-trend-negative {
  color: var(--ds-danger);
}

.dashboard-page .panel-label {
  border-color: var(--ds-border);
}

.dashboard-page .alert,
.dashboard-page .diagnosis-box {
  border-color: var(--ds-border);
  background: var(--ds-surface-raised);
  color: #dbe1e6;
}

.dashboard-page .alert.good {
  border-color: var(--ds-green-border);
  background: var(--ds-green-soft);
  color: #c9f2d3;
}

.dashboard-page .alert.warning {
  border-color: var(--ds-amber-border);
  background: var(--ds-amber-soft);
  color: #f7d997;
}

.dashboard-page .alert.danger {
  border-color: var(--ds-danger-border);
  background: var(--ds-danger-soft);
  color: #f5b0b0;
}

.dashboard-page #alerts .alert.active {
  outline-color: var(--ds-green);
}

.dashboard-page .diagnosis-box p {
  color: var(--ds-muted);
}

.dashboard-page .asset-site-tree + .asset-site-tree,
.dashboard-page .asset-battery-section,
.dashboard-page .asset-battery-list,
.dashboard-page .asset-inverter-block,
.dashboard-page .asset-string-list > .asset-string-block:first-child > .asset-tree-row,
.dashboard-page .asset-panel-list > [data-asset-card]:first-child,
.dashboard-page .asset-battery-list > [data-asset-card] + [data-asset-card],
.dashboard-page .asset-string-block + .asset-string-block,
.dashboard-page .asset-panel-list > [data-asset-card] + [data-asset-card] {
  border-color: var(--ds-border);
}

.dashboard-page .asset-site-heading,
.dashboard-page .asset-battery-list,
.dashboard-page .asset-inverter-block,
.dashboard-page .asset-tree-row,
.dashboard-page .asset-tree-children,
.dashboard-page .asset-string-children,
.dashboard-page .asset-panel-children,
.dashboard-page .asset-tree-level-3 {
  background: var(--ds-surface) !important;
}

.dashboard-page .asset-site-heading {
  border-color: var(--ds-border);
}

.dashboard-page .asset-tree-row:hover,
.dashboard-page .asset-tree-level-3:hover {
  background: var(--ds-surface-raised) !important;
}

.dashboard-page .asset-tree-icon,
.dashboard-page .asset-tree-icon-panel {
  color: #b7c2cb;
}

.dashboard-page .asset-tree-toggle,
.dashboard-page .asset-card-menu-button {
  color: var(--ds-muted);
}

.dashboard-page .asset-tree-toggle:hover,
.dashboard-page .asset-tree-toggle:focus-visible,
.dashboard-page .asset-card-menu-button:not(:disabled):hover,
.dashboard-page .asset-card-menu-button:not(:disabled):focus-visible {
  border-color: var(--ds-green-border);
  background: var(--ds-green-soft);
  color: var(--ds-green);
}

.dashboard-page .asset-status {
  color: #dbe1e6;
}

.dashboard-page .asset-status-online {
  color: var(--ds-green);
}

.dashboard-page .asset-status-online > span {
  background: var(--ds-green);
}

.dashboard-page .asset-status-warning,
.dashboard-page .asset-status-maintenance {
  color: var(--ds-amber);
}

.dashboard-page .asset-status-warning > span,
.dashboard-page .asset-status-maintenance > span {
  background: var(--ds-amber);
}

.dashboard-page .asset-status-offline {
  color: var(--ds-danger);
}

.dashboard-page .asset-status-offline > span {
  background: var(--ds-danger);
}

.dashboard-page .asset-list-empty,
.dashboard-page .asset-parent-empty {
  border-color: var(--ds-border-strong);
  background: var(--ds-surface);
}

.dashboard-page .asset-card-menu,
.dashboard-page .asset-type-menu,
.dashboard-page .asset-dialog {
  border-color: var(--ds-border-strong);
  background: #111922;
  color: var(--ds-text);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.68);
}

.dashboard-page .asset-card-menu button,
.dashboard-page .asset-type-menu button {
  background: #111922;
  color: #edf1f4;
}

.dashboard-page .asset-card-menu button:hover,
.dashboard-page .asset-card-menu button:focus-visible,
.dashboard-page .asset-type-menu button:hover,
.dashboard-page .asset-type-menu button:focus-visible {
  background: var(--ds-green-soft);
  color: var(--ds-green);
}

.dashboard-page .asset-card-menu .asset-delete-menu-item,
.dashboard-page .asset-card-menu .asset-delete-menu-item:hover,
.dashboard-page .asset-card-menu .asset-delete-menu-item:focus-visible {
  color: var(--ds-danger);
}

.dashboard-page .asset-dialog::backdrop {
  background: rgba(3, 7, 11, 0.8);
  backdrop-filter: blur(4px);
}

.dashboard-page .asset-dialog-close {
  background: var(--ds-surface-soft);
  color: var(--ds-text);
}

.dashboard-page .provider-field-label {
  color: var(--ds-text);
}

.dashboard-page .provider-help-button {
  border-color: var(--ds-border-strong);
  color: var(--ds-text-muted, #8d99a6);
}

.dashboard-page .provider-field-help {
  border-color: var(--ds-border-strong);
  background: var(--ds-surface-soft);
  color: var(--ds-text-muted, #8d99a6);
}

.dashboard-page .asset-form-grid label,
.dashboard-page .asset-delete-message {
  color: #edf1f4;
}

.dashboard-page .asset-cancel-button,
.dashboard-page .settings-secondary-button {
  border-color: var(--ds-border-strong);
  background: var(--ds-surface-raised);
  color: var(--ds-text);
}

.dashboard-page .asset-cancel-button:hover,
.dashboard-page .settings-secondary-button:not(:disabled):hover {
  border-color: var(--ds-green-border);
  background: var(--ds-green-soft);
  color: var(--ds-green);
}

.dashboard-page .asset-delete-restriction,
.dashboard-page .settings-form-note {
  border: 1px solid var(--ds-border);
  background: var(--ds-surface-raised);
  color: var(--ds-muted);
}

.dashboard-page .asset-delete-button {
  background: var(--ds-danger);
}

.dashboard-page .asset-delete-button:not(:disabled):hover {
  background: #f07d7d;
}

.dashboard-page .settings-icon,
.dashboard-page .provider-logo {
  background: var(--ds-green-soft);
  color: var(--ds-green);
  border: 1px solid var(--ds-green-border);
}

.dashboard-page .settings-card-provider {
  border-color: var(--ds-green-border);
}

.dashboard-page .asset-form-message[data-state="success"] {
  color: var(--ds-green);
}

.dashboard-page .asset-form-message[data-state="error"] {
  color: var(--ds-danger);
}

.dashboard-page .asset-form-message:not([data-state]) {
  color: var(--ds-muted);
}

.dashboard-page ::selection {
  background: var(--ds-green);
  color: #10161d;
}

.dashboard-page * {
  scrollbar-color: #53616d #121a22;
}

/* Landing page */
.landing-page {
  background:
    radial-gradient(circle at 82% 10%, rgba(104, 207, 130, 0.055), transparent 26%),
    var(--ds-bg);
  color: var(--ds-text);
  color-scheme: dark;
}

.landing-header {
  background: rgba(14, 21, 28, 0.97);
  border-color: var(--ds-border);
}

.landing-brand {
  color: var(--ds-text);
}

.landing-brand-mark,
.preview-logo {
  background: var(--ds-amber);
  color: #10161d;
  box-shadow: 0 6px 20px rgba(242, 184, 75, 0.18);
}

.landing-nav-links a,
.landing-careers-link {
  color: var(--ds-muted);
}

.landing-nav-links a:hover,
.landing-careers-link:hover {
  color: var(--ds-text);
}

.landing-nav-cta,
.landing-button.primary {
  background: var(--ds-green);
  color: #10161d !important;
}

.landing-nav-cta:hover,
.landing-button.primary:hover {
  background: var(--ds-green-hover);
}

.landing-hero {
  position: relative;
}

.landing-kicker {
  color: var(--ds-green);
}

.landing-page h1,
.landing-page h2,
.landing-page h3 {
  color: var(--ds-text);
}

.landing-lead,
.landing-section-heading > p:last-child,
.landing-contact-copy > p,
.landing-feature-card p,
.landing-process-step p {
  color: var(--ds-muted);
}

.landing-button.secondary {
  border-color: var(--ds-border-strong);
  background: var(--ds-surface);
  color: var(--ds-text);
}

.landing-button.secondary:hover {
  border-color: var(--ds-green-border);
  background: var(--ds-green-soft);
}

.landing-proof {
  color: var(--ds-muted);
}

.landing-proof span::before {
  color: var(--ds-green);
}

.preview-window {
  border-color: var(--ds-border-strong);
  background: var(--ds-surface);
  box-shadow: 0 30px 82px rgba(0, 0, 0, 0.38);
}

.preview-sidebar {
  background: #0d141b;
}

.preview-nav {
  background: #4b5965;
}

.preview-nav.active {
  background: var(--ds-green);
}

.preview-main {
  background: var(--ds-bg);
}

.preview-topbar small,
.preview-health small,
.preview-metrics small,
.preview-score small {
  color: var(--ds-muted);
}

.preview-topbar strong,
.preview-health strong,
.preview-metrics strong {
  color: var(--ds-text);
}

.preview-status {
  background: var(--ds-green-soft);
  color: var(--ds-green);
  border: 1px solid var(--ds-green-border);
}

.preview-health,
.preview-metrics div,
.preview-chart {
  border-color: var(--ds-border);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.025), transparent 50%),
    var(--ds-surface);
}

.preview-check {
  background: var(--ds-green-soft);
  border: 1px solid var(--ds-green-border);
  color: var(--ds-green);
}

.preview-bars {
  border-color: var(--ds-border-strong);
}

.preview-bars i {
  background: var(--ds-green);
}

.preview-bars i:nth-child(5),
.preview-bars i:nth-child(6) {
  background: var(--ds-amber);
}

.landing-product,
.landing-process {
  border-color: var(--ds-border);
}

.landing-feature-card {
  border-color: var(--ds-border);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.025), transparent 48%),
    var(--ds-surface);
  box-shadow: 0 15px 34px rgba(0, 0, 0, 0.16);
}

.landing-feature-card.featured {
  border-color: var(--ds-green-border);
  background:
    linear-gradient(145deg, rgba(104, 207, 130, 0.12), rgba(104, 207, 130, 0.025)),
    var(--ds-surface-raised);
}

.landing-feature-card.featured h3,
.landing-feature-card.featured p {
  color: var(--ds-text);
}

.landing-feature-card.featured .feature-number,
.feature-number,
.landing-process-step > strong {
  color: var(--ds-amber);
}

.landing-process-grid,
.landing-process-step {
  border-color: var(--ds-border);
}

.landing-contact {
  border: 1px solid var(--ds-border-strong);
  background:
    radial-gradient(circle at 12% 12%, rgba(104, 207, 130, 0.08), transparent 30%),
    var(--ds-surface-raised);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.24);
}

.landing-contact h2,
.landing-contact-copy > p,
.landing-contact .landing-kicker,
.landing-contact .landing-careers-link {
  color: var(--ds-text);
}

.landing-contact .landing-kicker {
  color: var(--ds-green);
}

.landing-contact-form label {
  color: #dce3e8;
}

.landing-contact-form input,
.landing-contact-form textarea {
  border-color: var(--ds-border-strong);
  background: var(--ds-surface);
  color: var(--ds-text);
}

.landing-contact-form input:focus,
.landing-contact-form textarea:focus {
  border-color: var(--ds-green);
  outline: 3px solid rgba(104, 207, 130, 0.14);
}

.landing-contact-form #form-status {
  color: var(--ds-green);
}

.landing-footer {
  border-color: var(--ds-border);
  color: var(--ds-muted);
}

.landing-page ::selection {
  background: var(--ds-green);
  color: #10161d;
}

/* Overview dashboard redesign */
.dashboard-page .dashboard-view[data-dashboard-view="overview"] {
  min-height: 0;
  height: 100%;
}

/* Overview has one child (.overview-dashboard-layout), not the usual heading
   + content pair the base .dashboard-view.active grid expects — without this
   override its single child lands in the "auto" heading row (sized to
   content) while the flexible content row sits empty beneath it. Scoped to
   .active (not just the data-attribute) so it never fights the [hidden]
   toggle that shows/hides views. */
.dashboard-page .dashboard-view[data-dashboard-view="overview"].active {
  grid-template-rows: minmax(0, 1fr);
}

.dashboard-page .overview-dashboard-layout {
  min-height: 0;
  height: 100%;
  display: grid;
  /* Bottom row hugs the title-only alert rows; the chart absorbs the rest. */
  grid-template-rows: 84px minmax(0, 1fr) auto;
  gap: 14px;
}

.dashboard-page .overview-top-grid,
.dashboard-page .overview-bottom-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.dashboard-page .overview-top-grid {
  align-items: stretch;
}

.dashboard-page .overview-primary-card {
  min-height: 0;
  height: 100%;
  box-sizing: border-box;
  padding: 8px 18px;
  border: 1px solid var(--ds-border, #27313b);
  border-radius: 18px;
  background: linear-gradient(
    145deg,
    rgba(24, 33, 43, 0.92),
    rgba(15, 22, 30, 0.96)
  );
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.dashboard-page .overview-card-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ds-text-muted, #8d99a6);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-page .overview-live-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 999px;
  background: var(--ds-green, #3ddc84);
  box-shadow: 0 0 14px rgba(61, 220, 132, 0.65);
}

.dashboard-page .overview-live-card strong {
  display: block;
  margin-top: 4px;
  color: var(--ds-green, #3ddc84);
  font-size: 1.6rem;
  line-height: 1;
  font-weight: 600;
}

.dashboard-page .overview-live-card p,
.dashboard-page .overview-status-copy p {
  margin: 3px 0 0;
  color: var(--ds-text-muted, #8d99a6);
  font-size: 0.78rem;
}

.dashboard-page .overview-status-content {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 3px;
}

.dashboard-page .overview-health-ring {
  --health-score: 0deg;
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: conic-gradient(
    var(--ds-green, #3ddc84) var(--health-score),
    rgba(141, 153, 166, 0.18) 0
  );
}

.dashboard-page .overview-health-ring::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--ds-surface, #111821);
}

.dashboard-page .overview-health-ring strong {
  position: relative;
  z-index: 1;
  color: var(--ds-text, #f4f7f8);
  font-size: 1.1rem;
  line-height: 1;
}

.dashboard-page .overview-status-copy {
  min-width: 0;
}

.dashboard-page .overview-status-copy h2 {
  margin: 0;
  overflow: hidden;
  color: var(--ds-green, #3ddc84);
  font-size: clamp(0.95rem, 1.35vw, 1.2rem);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-page .overview-status-copy p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-page .overview-production-panel {
  min-height: 0;
  height: auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-self: stretch;
  padding: 10px 0 8px;
  overflow: hidden;
}

.dashboard-page .overview-chart-toolbar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 4px;
  padding: 0 14px;
}

.dashboard-page .production-legend-inline {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--ds-text-muted, #8d99a6);
  font-size: 0.86rem;
}

.dashboard-page .production-legend-inline span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dashboard-page .legend-line {
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: var(--ds-green, #3ddc84);
}

.dashboard-page .legend-line.expected {
  background: repeating-linear-gradient(
    90deg,
    var(--ds-amber, #f5b942) 0 7px,
    transparent 7px 11px
  );
}

.dashboard-page .overview-production-chart {
  position: relative;
  display: block;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  max-width: none;
}

.dashboard-page .overview-production-chart .production-chart-svg {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.dashboard-page .overview-production-chart .production-legend {
  display: none;
}

.dashboard-page .overview-bottom-grid {
  /* Restore two columns when the recommended-action card is re-enabled. */
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}

.dashboard-page .overview-bottom-grid > .dashboard-panel {
  min-height: 0;
  height: 100%;
  padding: 12px;
  overflow: hidden;
}

.dashboard-page #overviewAlerts {
  min-height: 0;
  display: grid;
  gap: 6px;
}

.dashboard-page .overview-alert-row {
  width: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--ds-border, #27313b);
  border-radius: 10px;
  background: rgba(24, 33, 43, 0.7);
  color: inherit;
  text-align: left;
}

.dashboard-page .overview-alert-row > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.dashboard-page .overview-alert-row strong,
.dashboard-page .overview-action-content strong {
  color: var(--ds-text, #f4f7f8);
}

.dashboard-page .overview-alert-row strong,
.dashboard-page .overview-alert-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-page .overview-alert-row small,
.dashboard-page .overview-action-content p {
  color: var(--ds-text-muted, #8d99a6);
}

.dashboard-page .overview-alert-icon,
.dashboard-page .overview-action-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  background: rgba(61, 220, 132, 0.14);
  color: var(--ds-green, #3ddc84);
  font-weight: 800;
}

.dashboard-page .overview-alert-icon.warning {
  color: var(--ds-amber, #f5b942);
  background: rgba(245, 185, 66, 0.14);
}

.dashboard-page .overview-alert-icon.danger {
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.14);
}

.dashboard-page .overview-alert-severity {
  color: var(--ds-amber, #f5b942);
  font-size: 0.74rem;
  text-transform: capitalize;
}

.dashboard-page .overview-action-card {
  display: flex;
  align-items: center;
}

.dashboard-page .overview-action-content {
  width: 100%;
  min-height: 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.dashboard-page .overview-action-content > div {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.dashboard-page .overview-action-content p {
  margin: 0;
  display: -webkit-box;
  overflow: hidden;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.dashboard-page .overview-action-content .text-action {
  justify-self: start;
  margin-top: 0;
}

.dashboard-page .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 920px) and (pointer: coarse) {
  .dashboard-page .overview-top-grid,
  .dashboard-page .overview-bottom-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) and (pointer: coarse) {
  .dashboard-page .overview-primary-card {
    padding: 14px 18px;
  }

  .dashboard-page .overview-status-content {
    gap: 12px;
  }

  .dashboard-page .overview-health-ring {
    flex-basis: 68px;
    width: 68px;
    height: 68px;
  }

  .dashboard-page .overview-health-ring strong {
    font-size: 1.45rem;
  }

  .dashboard-page .overview-chart-toolbar {
    gap: 10px;
  }
}

.dashboard-page .settings-delete-button {
  margin-right: auto;
}

/* Green/yellow icon refresh */
.site-icon {
  display: block;
  max-width: 100%;
  height: auto;
  flex: 0 0 auto;
}

.landing-brand-name {
  color: var(--ds-text);
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.site-icon-nav {
  width: 42px;
}

.site-icon-footer {
  width: 40px;
}

.site-icon-sidebar {
  width: 84px;
  margin: 0 auto;
}

.site-icon-auth {
  width: 88px;
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.auth-brand .logo {
  color: var(--ds-text);
}


.sidebar-brand > div {
  width: 100%;
  text-align: center;
}

.sidebar-brand span {
  display: block;
  margin-top: 10px;
}

.landing-nav {
  min-height: 84px;
}

@media (max-width: 720px) {
  .site-icon-nav,
  .site-icon-footer {
    width: 36px;
  }

  .site-icon-sidebar {
    width: 72px;
  }

  .site-icon-auth {
    width: 76px;
  }

  .landing-brand-name {
    font-size: 1rem;
  }
}

/* Landing preview refresh to match the actual dashboard more closely */
.preview-window {
  min-height: 470px;
  grid-template-columns: 92px 1fr;
}

.preview-sidebar {
  padding: 20px 16px;
  justify-content: flex-start;
  border-right: 1px solid var(--ds-border);
}

.preview-logo {
  width: 58px;
  height: auto;
  margin: 0 0 16px;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-weight: inherit;
}

.preview-main {
  padding: 20px;
  background:
    radial-gradient(circle at 72% 26%, rgba(89, 210, 124, 0.08), transparent 26%),
    linear-gradient(180deg, rgba(12, 18, 24, 0.98), rgba(8, 13, 18, 1));
}

.preview-topbar {
  align-items: flex-start;
  margin-bottom: 18px;
}

.preview-topbar-meta {
  margin-top: 4px;
}

.preview-health,
.preview-metrics div,
.preview-chart {
  background: rgba(12, 20, 29, 0.96);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

.preview-health {
  border-radius: 18px;
}

.preview-check {
  background: rgba(89, 210, 124, 0.14);
  border: 1px solid rgba(89, 210, 124, 0.3);
}

.preview-score strong {
  color: var(--ds-green);
}

.preview-metrics {
  margin: 14px 0;
}

.preview-metrics strong {
  color: var(--ds-text);
}

.preview-chart {
  height: 205px;
  border-radius: 18px;
}

.preview-chart-header {
  color: var(--ds-text);
}

.preview-bars {
  border-bottom-color: rgba(138, 152, 166, 0.18);
}

/* Mobile app shell: sidebar becomes a fixed bottom tab bar. Back-to-website
   and Log out don't fit in the bar, so dashboard.js relocates them into the
   Settings view on load at this breakpoint; the rules below style them once
   they land there. */
@media (max-width: 640px) {
  /* Restore the fixed-viewport, internal-scroll-per-view model the desktop
     layout uses (the 900px/pointer:coarse rule above switches to page
     scroll, which breaks every "chart fills remaining space" flex/grid rule
     sized off a real height). Views with unbounded content (alerts, assets)
     already scroll internally via their own overflow:auto containers. */
  .dashboard-page {
    overflow: hidden;
  }

  .dashboard-page .app-shell {
    grid-template-columns: 1fr;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
  }

  .dashboard-page .sidebar .sidebar-brand,
  .dashboard-page .sidebar .sidebar-footer {
    display: none;
  }

  .dashboard-page .sidebar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    height: auto;
    min-height: 0;
    padding: 0;
    display: block;
    border-top: 1px solid var(--ds-border);
    z-index: 40;
  }

  .dashboard-page .side-nav {
    margin: 0;
    display: flex;
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
  }

  .dashboard-page .side-nav-item {
    flex: 1 1 0;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-height: 56px;
    padding: 6px 2px;
    font-size: 0.62rem;
    text-align: center;
    white-space: nowrap;
  }

  .dashboard-page .nav-icon {
    display: none;
  }

  .dashboard-page .app-main {
    grid-template-rows:
      calc(60px + env(safe-area-inset-top, 0px))
      minmax(0, 1fr);
    padding-bottom: 64px;
  }

  /* Topbar: one clean row — site picker on the left, weather and date on
     the right. The site name/location/size text duplicates what the picker
     already shows and was overlapping the date block at this width. */
  .dashboard-page .app-topbar {
    height: calc(60px + env(safe-area-inset-top, 0px));
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding:
      calc(8px + env(safe-area-inset-top, 0px))
      14px
      8px;
  }

  .dashboard-page .topbar-site {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }

  .dashboard-page .topbar-site > label {
    display: none;
  }

  .dashboard-page .site-selector {
    width: auto;
    min-width: 0;
    max-width: 132px;
    flex: 0 1 132px;
    padding-left: 10px;
    padding-right: 28px;
    text-overflow: ellipsis;
  }

  .dashboard-page .site-meta {
    display: flex;
    align-items: center;
    min-width: 0;
  }

  .dashboard-page .site-meta > :not(.site-weather) {
    display: none;
  }

  .dashboard-page .site-meta .site-weather {
    flex: 0 0 auto;
    margin-left: 0;
    white-space: nowrap;
  }

  .dashboard-page .topbar-date {
    gap: 5px;
    font-size: 0.72rem;
  }

  /* Overview: compact chart-forward layout, no page scroll. The system-status
     card is dropped (redundant with the alerts list below it) so the chart
     gets most of the vertical space; the live-production number moves into a
     slim single-row header instead of its own card. */
  .dashboard-page .overview-dashboard-layout {
    grid-template-rows: 52px minmax(0, 1fr) auto;
    gap: 10px;
  }

  .dashboard-page .overview-top-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-page .overview-status-card {
    display: none;
  }

  .dashboard-page .overview-live-card {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 0 4px;
    background: none;
    border: 0;
    box-shadow: none;
  }

  .dashboard-page .overview-live-card .overview-card-label {
    margin: 0;
  }

  .dashboard-page .overview-live-card strong {
    margin: 0;
  }

  .dashboard-page .overview-production-panel {
    padding: 4px 0;
  }

  .dashboard-page .overview-chart-toolbar {
    padding: 0 4px;
    gap: 10px;
  }

  .dashboard-page .overview-chart-toolbar .production-legend-inline {
    display: none;
  }

  .dashboard-page .overview-timeframe-buttons {
    gap: 4px;
  }

  .dashboard-page .overview-timeframe-buttons button {
    padding: 5px 8px;
    font-size: 0.76rem;
  }

  .dashboard-page .overview-bottom-grid > .dashboard-panel {
    padding: 10px;
  }

  /* Production: the chart/comparison-card pair is a fixed-width 2-column
     grid (chart + a 245px sidebar) with no prior responsive override — at
     phone widths the sidebar alone would be wider than the screen. Stack
     instead, and compact the heading row and stat cards to fit without
     needing to scroll. */
  .view-heading {
    min-height: 0;
    gap: 10px;
  }

  .dashboard-page .eyebrow {
    display: none;
  }

  .dashboard-page .view-heading h1 {
    font-size: 1.15rem;
  }

  .dashboard-page .timeframe-buttons {
    gap: 4px;
  }

  .dashboard-page .timeframe-buttons button {
    padding: 5px 8px;
    font-size: 0.76rem;
  }

  .dashboard-page .production-page-layout {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 10px;
  }

  .dashboard-page .dashboard-panel {
    padding: 10px;
  }

  .dashboard-page .production-chart,
  .dashboard-page .production-chart-svg {
    min-height: 0;
  }

  .dashboard-page .comparison-card.production-summary {
    /* Base .production-summary hardcodes 4 explicit rows for the desktop
       stacked layout; left as-is with 2 columns it'd form a 2x4 grid with 2
       empty 1fr rows silently doubling the card's height. */
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, auto);
    gap: 8px;
  }

  .dashboard-page .comparison-card.production-summary > div {
    padding: 8px 10px;
  }

  .dashboard-page .comparison-card span {
    font-size: 0.66rem;
    margin-bottom: 2px;
  }

  .dashboard-page .comparison-card strong {
    font-size: 1rem;
  }



  .dashboard-page .site-meta .site-weather-icon {
    font-size: 1.2rem;
  }

  .dashboard-page .site-meta .site-weather-temperature {
    font-size: 0.9rem;
    font-weight: 800;
  }

  /* Settings: the content area itself scrolls; cards keep their natural height. */
  .dashboard-page .dashboard-view[data-dashboard-view="settings"] {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .dashboard-page .settings-layout {
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    padding-bottom: 16px;
  }

  .dashboard-page .settings-card {
    min-height: auto;
    flex: 0 0 auto;
    padding: 16px;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: start;
    gap: 14px;
  }

  .dashboard-page .settings-copy {
    min-width: 0;
  }

  .dashboard-page .settings-copy p {
    overflow-wrap: anywhere;
  }

  .dashboard-page .settings-card-actions,
  .dashboard-page .settings-card > .btn {
    grid-column: 1 / -1;
    width: 100%;
    margin: 0;
  }

  .dashboard-page .settings-card-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-page .settings-card-actions .btn,
  .dashboard-page .settings-card > .btn,
  .dashboard-page .enphase-system-select {
    width: 100%;
    max-width: none;
  }

  .dashboard-view[data-dashboard-view="settings"] .sidebar-footer {
    display: grid;
    flex: 0 0 auto;
    gap: 8px;
    border-top: 1px solid var(--ds-border);
    padding: 14px 0 4px;
    margin: 0;
  }

  .dashboard-view[data-dashboard-view="settings"] .side-link,
  .dashboard-view[data-dashboard-view="settings"] .sidebar-logout {
    color: var(--ds-muted);
  }

  .dashboard-view[data-dashboard-view="settings"] .side-link:hover,
  .dashboard-view[data-dashboard-view="settings"] .sidebar-logout:hover {
    color: var(--ds-text);
    background: var(--ds-surface-raised);
  }

}

