/* SunMonitor custom styles — light & clean energy theme */

:root {
  --sm-green: #198754;
  --sm-green-dark: #146c43;
  --sm-green-soft: #e8f5ef;
  --sm-amber: #fd7e14;
  --sm-ink: #212529;
  --sm-muted: #6c757d;
}

body {
  background:
    radial-gradient(1200px 400px at 80% -10%, rgba(253, 216, 133, 0.25), transparent 60%),
    radial-gradient(900px 380px at -10% 0%, rgba(25, 135, 84, 0.12), transparent 55%),
    #f7f9f8;
  min-height: 100vh;
}

.navbar {
  backdrop-filter: blur(6px);
  background: rgba(255, 255, 255, 0.85) !important;
}

.brand-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.card {
  border: 0;
  border-radius: 1rem;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.06);
}

.kwh-card .kwh-value {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  color: var(--sm-green-dark);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.kwh-card .kwh-unit {
  font-size: 0.45em;
  font-weight: 600;
  color: var(--sm-muted);
  margin-left: 0.25rem;
}

.chart-card .chart-wrap {
  position: relative;
  height: clamp(280px, 48vh, 460px);
}

.mini-stat {
  border-radius: 0.75rem;
  background: var(--sm-green-soft);
  padding: 0.5rem 0.75rem;
}

.mini-stat .label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--sm-muted);
}

.mini-stat .value {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* inverter breakdown rows */
.inv-row {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  grid-template-areas: "name value" "bar bar";
  gap: 0.15rem 0.5rem;
  align-items: center;
  padding: 0.35rem 0;
}
.inv-row + .inv-row {
  border-top: 1px dashed rgba(16, 24, 40, 0.08);
}
.inv-name { grid-area: name; font-weight: 600; font-size: 0.85rem; }
.inv-value { grid-area: value; text-align: right; font-variant-numeric: tabular-nums; font-size: 0.85rem; }
.inv-bar {
  grid-area: bar;
  height: 5px;
  border-radius: 3px;
  background: rgba(16, 24, 40, 0.06);
  overflow: hidden;
}
.inv-bar-fill { height: 100%; border-radius: 3px; }
.inv-offline .inv-name, .inv-offline .inv-value { color: var(--sm-muted); }

/* year heatmap (GitHub-style grid) */
.heat-scroll { overflow-x: auto; padding-bottom: 0.25rem; }
.heat-grid {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: 18px repeat(7, 13px);
  grid-auto-columns: 13px;
  gap: 2px;
  min-width: max-content;
}
.heat-cell {
  width: 13px;
  height: 13px;
  border-radius: 3px;
  display: inline-block;
}
.heat-grid .heat-cell { width: auto; height: auto; }
.heat-month { font-size: 0.65rem; color: var(--sm-muted); white-space: nowrap; }
.h-empty, .legend-h-empty { background: #e9ecef; }
.h-future { background: transparent; }
.h0 { background: #edf7f0; }
.h1 { background: #b7e1c4; }
.h2 { background: #6ac288; }
.h3 { background: #2e9e5b; }
.h4 { background: #146c43; }

.landing-hero {
  padding: 4rem 1rem 3rem;
  text-align: center;
}

.landing-hero img.hero-icon {
  width: 96px;
  height: 96px;
  object-fit: contain;
  margin-bottom: 1.25rem;
}

.landing-hero h1 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.table > :not(caption) > * > * {
  padding: 0.5rem 0.75rem;
}

.empty-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

footer.site-footer {
  color: var(--sm-muted);
  font-size: 0.875rem;
}
