/* Sun Technology — client account (demo). Light, quiet; the sun's yellow is the one data hue. */
:root {
  --ground: #ffffff;
  --panel: #ffffff;
  --line: #e6e9ef;
  --line-2: #d5dae3;
  --ink: #0B1836;
  --muted: #5A6274;
  --faint: #8a91a1;
  --sun: #F2B800;        /* roof output: bars, lines */
  --sun-ink: #8a6500;    /* sun hue as text, 4.5:1 on white */
  --sun-tint: #fff3c4;
  --use: #9aa3b5;        /* house use: neutral */
  --blue: #004C9C;
  --pos: #1a6b3c; --pos-bg: #e3f4ea;
  --warn: #8a4b00; --warn-bg: #fff1dc;
  --r: 8px;
  --f: 'Manrope', system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 500 15px/1.5 var(--f); }
h1, h2, p, ul, dl, dd, table { margin: 0; }
ul { list-style: none; padding: 0; }
a { color: var(--blue); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; text-align: right; }
.muted { color: var(--muted); font-size: 13px; }

.demo { background: #fffbeb; border-bottom: 1px solid #fde68a; color: #92400e; font-size: 13px; padding: 8px 24px; }
.demo a { color: #92400e; font-weight: 700; margin-left: 8px; }

.top { display: flex; align-items: center; gap: 32px; padding: 14px 32px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand-mark { width: 34px; height: 28px; }
.brand b { font-weight: 800; font-style: italic; font-size: 17px; letter-spacing: -.02em; }
.site { display: flex; flex-direction: column; line-height: 1.25; padding-left: 32px; border-left: 1px solid var(--line); }
.site-name { font-weight: 700; }
.site-sub { color: var(--muted); font-size: 13px; }
.fresh { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #2a9d5c; animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.who { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: #dfe9f7; color: var(--blue); display: grid; place-items: center; font-size: 12px; font-weight: 800; }

.wrap { max-width: 1376px; margin: 0 auto; padding: 28px 32px 64px; display: grid; gap: 20px; }
.title-row h1 { font-size: 26px; font-weight: 800; letter-spacing: -.025em; }
.lead { margin-top: 4px; font-size: 17px; color: var(--ink); max-width: 80ch; }
.lead b { font-weight: 800; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; min-width: 0; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.panel-head h2 { font-size: 15px; font-weight: 700; }

.grid-a { display: grid; grid-template-columns: 7fr 5fr; gap: 20px; }
.grid-b { display: grid; grid-template-columns: 5fr 7fr; gap: 20px; }
.grid-c { display: grid; grid-template-columns: 5fr 4fr 4fr; gap: 20px; }
.grid-c > .panel:last-child { display: flex; flex-direction: column; }
.grid-c > .panel:last-child .btn { margin-top: auto; align-self: flex-start; }

/* power flow */
.flow-stage { position: relative; aspect-ratio: 560 / 300; max-height: 330px; margin: 0 auto; width: 100%; }
.flow-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ln { fill: none; stroke: var(--line); stroke-width: 4; }
.fl { fill: none; stroke: var(--sun); stroke-width: 4; stroke-dasharray: 2 14; stroke-linecap: round; animation: run 1.1s linear infinite; opacity: 0; transition: opacity .3s; }
.fl.on { opacity: 1; }
.fl.rev { animation-direction: reverse; }
.fl.buy { stroke: var(--use); }
@keyframes run { to { stroke-dashoffset: -16; } }
.hub { fill: var(--ink); }
.node { position: absolute; transform: translate(-50%, -50%); background: #fff; border: 1px solid var(--line-2); border-radius: var(--r); padding: 8px 14px; display: grid; justify-items: center; min-width: 118px; }
.node span { font-size: 12px; color: var(--muted); font-weight: 600; }
.node b { font-size: 22px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.n-roof { left: 50%; top: 15%; border-color: var(--sun); background: var(--sun-tint); }
.n-roof b { color: var(--sun-ink); }
.n-house { left: 17%; top: 50%; }
.n-batt { left: 50%; top: 82%; }
.n-grid { left: 83%; top: 50%; }
.soc { display: block; width: 100%; height: 5px; background: var(--line); border-radius: 3px; margin-top: 4px; overflow: hidden; }
.soc i { display: block; height: 100%; background: var(--ink); transition: width .6s; }

/* savings */
.save-big { font-size: 40px; font-weight: 800; letter-spacing: -.035em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.save-tbl { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 14px; }
.save-tbl th { text-align: left; font-weight: 500; color: var(--muted); padding: 9px 0; border-bottom: 1px solid var(--line); }
.save-tbl td { padding: 9px 0 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.save-tbl .tot th, .save-tbl .tot td { color: var(--ink); font-weight: 800; border-bottom: 0; }
.payback { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.pb-head { display: flex; justify-content: space-between; font-weight: 700; }
.pb-head b { font-size: 20px; font-variant-numeric: tabular-nums; }
.pb-bar { height: 10px; background: var(--line); border-radius: 5px; overflow: hidden; }
.pb-bar i { display: block; height: 100%; width: 0; background: var(--sun); transition: width 1.2s cubic-bezier(.2,.7,.2,1); }

/* KPI strip: one divided container */
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--line); border-radius: var(--r); }
.kpis div { padding: 16px 22px; display: grid; gap: 2px; }
.kpis div + div { border-left: 1px solid var(--line); }
.kpis span { font-size: 13px; color: var(--muted); }
.kpis b { font-size: 26px; font-weight: 800; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.kpis b small { font-size: 15px; font-weight: 600; color: var(--muted); margin-left: 3px; }

/* charts */
.key { display: flex; gap: 16px; font-size: 12px; color: var(--muted); flex-wrap: wrap; justify-content: flex-end; }
.key li { display: flex; align-items: center; gap: 6px; }
.key i { width: 10px; height: 10px; border-radius: 2px; }
.k-sun { background: var(--sun); }
.k-use { background: var(--use); height: 3px !important; }
.k-exp { background: none; border-top: 2px dashed var(--ink); height: 0 !important; width: 12px !important; border-radius: 0 !important; }
.chart { height: 230px; position: relative; }
.chart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.chart text { font: 500 11px var(--f); fill: var(--faint); }
.chart .grid { stroke: var(--line); stroke-dasharray: 3 4; }
.chart .bar { fill: var(--sun); transition: opacity .15s; }
.chart .bar.low { fill: #f7d566; }
.chart .bar:hover { opacity: .75; }
.chart .exp { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 3 2; }
.chart .use { fill: none; stroke: var(--use); stroke-width: 2; }
.chart .prod { fill: none; stroke: var(--sun); stroke-width: 2.5; }
.chart .prod-area { fill: var(--sun); opacity: .16; }
.chart .now { stroke: var(--ink); stroke-width: 1; }
.tip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; font-size: 12px; padding: 6px 9px; border-radius: 6px; white-space: nowrap; transform: translate(-50%, -110%); box-shadow: 0 4px 14px rgba(11,24,54,.18); opacity: 0; transition: opacity .12s; }
.tip.on { opacity: 1; }

/* messages */
.msgs { display: grid; }
.msgs li { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.msgs li:first-child { border-top: 0; padding-top: 0; }
.msgs time { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 2px; }
.msgs p { font-size: 14px; }
.msgs .act { margin-top: 8px; display: flex; gap: 12px; align-items: center; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 10px; vertical-align: 2px; }
.pill.ok { background: var(--pos-bg); color: var(--pos); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }

/* bills */
.bills { width: 100%; border-collapse: collapse; font-size: 14px; }
.bills th { font-size: 12px; font-weight: 600; color: var(--muted); text-align: left; padding: 0 0 8px; }
.bills th.num { text-align: right; }
.bills td { padding: 9px 0; border-top: 1px solid var(--line); }
.bills td.num { padding-left: 12px; }
.bills td.was { color: var(--muted); text-decoration: line-through; }
.bills td.paid { font-weight: 800; }

/* equipment */
.eq { display: grid; gap: 10px; margin-bottom: 18px; }
.eq div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; font-size: 14px; }
.eq dt { color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 16px; border-radius: var(--r); background: var(--ink); color: #fff; font: 700 14px var(--f); text-decoration: none; border: 0; cursor: pointer; transition: background-color .15s, transform .1s; }
.btn:hover { background: var(--blue); }
.btn:active { transform: scale(.98); }
.btn-q { background: #fff; color: var(--ink); border: 1px solid var(--line-2); }
.btn-q:hover { background: #f4f6f9; }

@media (prefers-reduced-motion: reduce) { .fl, .dot { animation: none; } .pb-bar i { transition: none; } }

@media (max-width: 1100px) {
  .grid-a, .grid-b { grid-template-columns: 1fr; }
  .grid-c { grid-template-columns: 1fr 1fr; }
  .grid-c > :first-child { grid-column: 1 / -1; }
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .kpis div:nth-child(4) { border-left: 0; }
  .kpis div:nth-child(n+4) { border-top: 1px solid var(--line); }
}
@media (max-width: 720px) {
  .demo { padding: 8px 16px; }
  .top { padding: 10px 16px; gap: 12px; flex-wrap: wrap; }
  .brand b { display: none; }
  .site { padding-left: 12px; }
  .fresh { order: 5; width: 100%; margin: 0; }
  .who-name { display: none; }
  .who { margin-left: auto; }
  .wrap { padding: 18px 16px 48px; gap: 14px; }
  .title-row h1 { font-size: 22px; }
  .lead { font-size: 15px; }
  .panel { padding: 16px; }
  .node { min-width: 88px; padding: 6px 8px; }
  .flow-stage { aspect-ratio: 560 / 340; }
  .node b { font-size: 16px; }
  .node span { font-size: 11px; }
  .save-big { font-size: 34px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpis div { padding: 12px 16px; border-left: 0 !important; border-top: 1px solid var(--line); }
  .kpis div:nth-child(-n+2) { border-top: 0; }
  .kpis div:nth-child(even) { border-left: 1px solid var(--line) !important; }
  .kpis div:last-child { grid-column: 1 / -1; border-left: 0 !important; }
  .kpis b { font-size: 22px; }
  .grid-c { grid-template-columns: 1fr; }
  .chart { height: 190px; }
  .key { justify-content: flex-start; }
  .panel-head { flex-wrap: wrap; }
}
