/* Inverter directory cards (/inv-online). */
.inv-compact{display:block;padding:18px;border:1px solid var(--line);border-radius:18px;background:#fff;box-shadow:var(--shadow);color:var(--ink);transition:transform .18s ease,box-shadow .18s ease}
.inv-compact:hover{transform:translateY(-2px);box-shadow:0 14px 30px rgba(18,48,31,.13);border-color:#bfe0c2;text-decoration:none}
.inv-compact .monitor-card-head b{font-size:17px;letter-spacing:-.01em}
.monitor-card-head .live-badge{margin-left:auto;padding:5px 10px;font-size:11px}
.compact-row{display:grid;grid-template-columns:auto auto 1fr;gap:11px;align-items:center;padding:10px 0;border-top:1px solid var(--line)}
.compact-row .row-icon{display:flex;align-items:center;justify-content:center;width:32px;height:32px;flex:0 0 32px;
  border-radius:10px;background:var(--mint);font-size:15px;line-height:1}
.compact-row .row-label{font-size:13px;color:var(--muted);font-weight:600}
.compact-row .row-val{text-align:right}
.compact-row .row-val b{display:block;color:var(--brand2);font-size:18px;font-weight:800;line-height:1.2;font-variant-numeric:tabular-nums}
.compact-row .row-val b small{color:var(--muted);font-size:11px;font-weight:700}
.compact-row .row-val>small{display:block;color:var(--muted);font-size:11px;margin-top:1px}
.compact-bottom{display:flex;justify-content:space-between;gap:10px;border-top:1px solid var(--line);padding-top:11px;font-size:12px;color:var(--muted)}
.compact-bottom .view-more{color:var(--brand2);font-weight:800}

/* Local LuxPower-inspired monitor (/LUX-xxxxx). */
.inverter-page{
  --inv-blue:#1b4332;
  --inv-cyan:#2f9b62;
  --inv-cyan-dark:#1f7f4d;
  --inv-pale:#edf7e9;
  --inv-line:#dce8d8;
  --inv-muted:#6d8073;
  background:linear-gradient(180deg,#eef6eb 0,#f8fbf6 340px,#f3f6f1 100%);
  color:#12301f;
}
.inverter-page .topbar{background:rgba(255,255,255,.9);border-color:var(--inv-line)}
.inverter-page .inverter-wrap{max-width:1280px}
.inverter-page .energy-btn{border-color:#cfdcc8;color:var(--inv-blue);background:#fff}
.inverter-page .energy-btn:hover{background:#edf7e9}

.inverter-page .full-inv-head{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:3px 0 18px}
.inverter-page .inv-heading,.inverter-page .inv-head-actions{display:flex;align-items:center;gap:12px}
.inverter-page .inv-heading .online-dot{width:10px;height:10px;flex:0 0 10px}
.inverter-page .online-dot.offline{background:#c8452f;box-shadow:0 0 0 4px rgba(200,69,47,.13)}
.inverter-page .full-inv-head p{margin:0;color:var(--inv-muted);font-size:11px;font-weight:800;letter-spacing:.09em}
.inverter-page .full-inv-head h1{margin:1px 0 0;color:var(--inv-blue);font:800 25px var(--mono);letter-spacing:-.02em}
.live-badge{padding:7px 11px;border:1px solid var(--inv-line);border-radius:999px;background:#fff;color:var(--inv-muted);font-size:12px;font-weight:700;white-space:nowrap}
.live-badge.online{color:#16895f;background:#eefaf5;border-color:#ccebdd}
.live-badge.offline{color:#a94432;background:#fff2ef;border-color:#f0c9c1}

/* Unified 3D Energy Topology System */
.inverter-page .local-flow{position:relative;overflow:hidden;padding:26px 20px 22px;border:1px solid var(--inv-line);border-radius:28px;background:linear-gradient(170deg,#ffffff 0%,#f8fcf7 50%,#edf7eb 100%);box-shadow:0 14px 40px rgba(18,48,31,.08);margin-bottom:22px}
.inverter-page .local-flow:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 50% 48%,rgba(47,155,98,.14) 0%,transparent 65%);pointer-events:none}

.energy-topology-stage{position:relative;width:100%;max-width:1040px;margin:0 auto;aspect-ratio:16/10;min-height:500px}

/* SVG Continuous Bezier Conduit Canvas */
.topology-svg-canvas{position:absolute;inset:0;width:100%;height:100%;z-index:1;pointer-events:none;overflow:visible}
.conduit-track-bg{fill:none;stroke:#dbe8d8;stroke-width:9;stroke-linecap:round;opacity:.7}
.conduit-flow-line{fill:none;stroke-width:5;stroke-linecap:round;stroke-dasharray:10 18;opacity:.25;transition:opacity .4s ease,stroke .4s ease}
.conduit-flow-line.active{opacity:1}

/* Moving Dash Stream Keyframes */
.conduit-flow-line.active.flow-fwd{animation:dash-fwd var(--conduit-spd, 1.2s) linear infinite}
.conduit-flow-line.active.flow-rev{animation:dash-rev var(--conduit-spd, 1.2s) linear infinite}

/* Energy Photons */
.energy-photon{fill:#ffffff;opacity:0}
.conduit-flow-line.active + .energy-photon{opacity:1}

/* 5 Open Floating 3D Device Nodes (No Cover Cards) */
.topo-node{position:absolute;z-index:3;width:170px;padding:0;background:transparent!important;border:none!important;box-shadow:none!important;backdrop-filter:none!important;text-align:center;display:flex;flex-direction:column;align-items:center;transition:transform .25s cubic-bezier(.34,1.56,.64,1)}
.topo-node:hover{transform:translateY(-4px) scale(1.03)}
.topo-node.active{filter:none}

/* 3D Photorealistic Visual Container */
.topo-3d-visual{position:relative;width:100%;height:120px;display:flex;align-items:center;justify-content:center;margin-bottom:8px}
.topo-node.node-inverter .topo-3d-visual{height:155px}
.topo-3d-img{max-width:100%;max-height:100%;object-fit:contain;filter:drop-shadow(0 12px 18px rgba(0,0,0,.15));transition:transform .3s ease}
.topo-node:hover .topo-3d-img{transform:scale(1.05)}

/* Center Inverter Embedded Live OLED HUD */
.inverter-3d-cockpit{position:relative}
.inv-live-hud{position:absolute;top:24%;left:49.5%;transform:translateX(-50%);width:44%;background:rgba(10,15,29,.95);border:1px solid rgba(16,185,129,.4);border-radius:8px;padding:4px 6px;display:flex;flex-direction:column;align-items:center;box-shadow:0 0 12px rgba(16,185,129,.35),inset 0 0 6px rgba(0,0,0,.85);pointer-events:none}
.hud-brand{font-size:7px;font-weight:800;letter-spacing:.8px;color:#94a3b8}
.hud-power{font-size:14px;font-weight:900;color:#ffffff;font-family:'JetBrains Mono',Consolas,monospace;line-height:1.1}
.hud-power small{font-size:8px;margin-left:2px;color:#34d399}
.hud-state{font-size:6.5px;font-weight:800;color:#10b981;letter-spacing:.5px}

/* Node Titles & Numbers */
.topo-node-info{width:100%;display:flex;flex-direction:column;align-items:center;gap:3px}
.topo-label{font-size:11px;font-weight:850;letter-spacing:.08em;color:#475569;text-transform:uppercase}
.topo-val{font-size:24px;font-weight:900;line-height:1.15;color:#0f172a;font-variant-numeric:tabular-nums;letter-spacing:-.02em;font-family:'JetBrains Mono',Consolas,monospace}
.topo-node.node-inverter .topo-val{font-size:28px;color:#047857}
.topo-status{display:inline-flex;align-items:center;gap:5px;padding:2px 8px;border-radius:999px;font-size:10px;font-weight:750;background:rgba(255,255,255,.8);border:1px solid rgba(226,232,240,.8);box-shadow:0 2px 6px rgba(0,0,0,.03);color:#64748b;margin-top:2px}
.topo-status .status-dot{width:6px;height:6px;border-radius:50%;background:#8ea897;flex:0 0 6px}
.topo-status.producing{background:rgba(254,243,199,.85);border-color:rgba(245,158,11,.3);color:#b45309}.topo-status.producing .status-dot{background:#f59e0b;box-shadow:0 0 8px #f59e0b}
.topo-status.consuming{background:rgba(209,250,229,.85);border-color:rgba(16,185,129,.3);color:#047857}.topo-status.consuming .status-dot{background:#10b981;box-shadow:0 0 8px #10b981}
.topo-status.charging{background:rgba(209,250,229,.85);border-color:rgba(16,185,129,.3);color:#047857}.topo-status.charging .status-dot{background:#10b981;box-shadow:0 0 8px #10b981}
.topo-status.discharging{background:rgba(207,250,254,.85);border-color:rgba(6,182,212,.3);color:#0e7490}.topo-status.discharging .status-dot{background:#06b6d4;box-shadow:0 0 8px #06b6d4}
.topo-status.import{background:rgba(255,237,213,.85);border-color:rgba(249,115,22,.3);color:#c2410c}.topo-status.import .status-dot{background:#f97316;box-shadow:0 0 8px #f97316}
.topo-status.export{background:rgba(236,252,203,.85);border-color:rgba(132,204,22,.3);color:#4d7c0f}.topo-status.export .status-dot{background:#84cc16;box-shadow:0 0 8px #84cc16}

/* Center Inverter Node */
.topo-node.node-inverter{width:200px}

/* Floating Live Conduit Badges */
.conduit-float-badge{position:absolute;z-index:4;transform:translate(-50%,-50%);padding:3px 10px;border-radius:999px;background:#ffffff;border:1.5px solid #d4e4d0;font-size:10.5px;font-weight:850;color:#3b5645;box-shadow:0 4px 12px rgba(0,0,0,.08);font-variant-numeric:tabular-nums;white-space:nowrap;transition:all .3s ease;opacity:.85}
.conduit-float-badge.active{opacity:1;border-color:var(--badge-border, #10b981);color:var(--badge-color, #047857);box-shadow:0 4px 16px var(--badge-glow, rgba(16,185,129,.35))}
.badge-solar.active{--badge-border:#f59e0b;--badge-color:#b45309;--badge-glow:rgba(245,158,11,.35)}
.badge-load.active{--badge-border:#10b981;--badge-color:#047857;--badge-glow:rgba(16,185,129,.35)}
.badge-bat.active{--badge-border:#06b6d4;--badge-color:#0e7490;--badge-glow:rgba(6,182,212,.35)}
.badge-grid.active{--badge-border:#f97316;--badge-color:#c2410c;--badge-glow:rgba(249,115,22,.35)}

/* Battery Mini Progress Bar */
.battery-soc-meter{width:90%;margin:5px 0 3px;display:flex;align-items:center;gap:7px}
.soc-bar-bg{flex:1;height:7px;background:#e5eee2;border-radius:999px;overflow:hidden;position:relative}
.soc-bar-fill{height:100%;border-radius:999px;background:linear-gradient(90deg,#10b981,#34d399);transition:width .6s ease;box-shadow:0 0 6px rgba(16,185,129,.4)}
.soc-bar-fill.low{background:linear-gradient(90deg,#ef4444,#f87171);box-shadow:0 0 6px rgba(239,68,68,.4)}
.soc-bar-fill.mid{background:linear-gradient(90deg,#f59e0b,#fbbf24);box-shadow:0 0 6px rgba(245,158,11,.4)}
.soc-text{font-size:10px;font-weight:800;color:#2c4b37;font-variant-numeric:tabular-nums;white-space:nowrap}

/* Flow Summary Bar */
.flow-balance-bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:10px 16px;padding:12px 18px;margin-top:16px;border-radius:16px;background:rgba(255,255,255,.88);border:1px solid #dbe8d7;box-shadow:0 2px 10px rgba(18,48,31,.04);font-size:12px;color:#45634f}
.balance-item{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
.balance-item b{color:var(--inv-blue);font-weight:800;font-variant-numeric:tabular-nums}
.balance-divider{color:#b6ccba;font-size:14px;font-weight:900}

/* Keyframes */
@keyframes dash-fwd{to{stroke-dashoffset:-56}}
@keyframes dash-rev{to{stroke-dashoffset:56}}
@keyframes inv-spin{to{transform:rotate(360deg)}}

/* Energy Details Redesign */
.inverter-page .full-details{display:grid;gap:18px}
.inverter-page .full-section{padding:22px 24px;border:1px solid rgba(47,155,98,.2);border-radius:22px;background:linear-gradient(170deg,#ffffff 0%,#f9fdf8 100%);box-shadow:0 8px 24px rgba(18,48,31,.06)}
.inverter-page .full-section>header{display:flex;align-items:center;gap:14px;margin-bottom:18px;border-bottom:1px solid #e7f0e4;padding-bottom:12px}
.inverter-page .section-icon{display:grid;place-items:center;width:42px;height:42px;flex:0 0 42px;border-radius:13px;background:linear-gradient(135deg,#edf7ea,#dcf0d6);color:#1b4332;font-size:20px;box-shadow:0 3px 8px rgba(31,127,77,.12)}
.inverter-page .section-icon svg{width:22px;height:22px;stroke-width:2}
.inverter-page .full-section h2{margin:0;color:var(--inv-blue);font-size:19px;font-weight:850;line-height:1.2}
.inverter-page .full-section header p{margin:3px 0 0;color:#678270;font-size:12px}

.inverter-page .full-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(155px,1fr));gap:10px}
.inverter-page .full-tile{min-height:86px;padding:12px 14px;border:1px solid #e1ece0;border-radius:14px;background:#ffffff;box-shadow:0 2px 8px rgba(18,48,31,.03);transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease;position:relative;overflow:hidden}
.inverter-page .full-tile:hover{transform:translateY(-2px);box-shadow:0 8px 18px rgba(18,48,31,.08);border-color:#bfe0c2}
.inverter-page .full-tile .tile-top{display:flex;align-items:center;gap:7px;margin-bottom:6px}
.inverter-page .full-tile .tile-icon{display:flex;align-items:center;justify-content:center;flex:0 0 24px;width:24px;height:24px;border-radius:8px;background:#edf5ec;font-size:13px;line-height:1}
.inverter-page .full-tile .tile-label{display:block;color:#617a69;font-size:11.5px;font-weight:750;line-height:1.25}
.inverter-page .full-tile>b{display:block;margin-top:4px;color:var(--inv-blue);font-size:21px;font-weight:900;line-height:1.2;font-variant-numeric:tabular-nums;letter-spacing:-.01em}
.inverter-page .full-tile>b small{margin-left:4px;color:#557860;font-size:11px;font-weight:700}
.inverter-page .full-tile em{display:block;margin-top:4px;color:#7e9586;font-size:10px;font-style:normal;font-weight:600;line-height:1.25}

/* Featured & Status Tiles */
.inverter-page .full-tile.featured{border-color:#b7dec0;background:linear-gradient(145deg,#f4faf1,#e5f4e0);box-shadow:0 4px 12px rgba(31,127,77,.08)}
.inverter-page .full-tile.featured>b{color:#1a7044;font-size:23px}
.inverter-page .full-tile.featured .tile-icon{background:#ffffff;box-shadow:0 0 0 1px #badfc1}
.inverter-page .full-tile.healthy{background:#f0faf4;border-color:#b8e6ce}.inverter-page .full-tile.healthy>b{color:#0d7a52}
.inverter-page .full-tile.warning{background:#fefbf1;border-color:#f6e2b0}.inverter-page .full-tile.warning>b{color:#a16207}
.inverter-page .full-tile.danger{background:#fef2f2;border-color:#fecaca}.inverter-page .full-tile.danger>b{color:#b91c1c}

/* Mini Progress Gauges in Details Cards */
.tile-gauge{width:100%;height:4px;background:#e2ece0;border-radius:999px;margin-top:6px;overflow:hidden}
.tile-gauge-bar{height:100%;border-radius:999px;background:linear-gradient(90deg,#10b981,#34d399)}
.tile-gauge-bar.solar{background:linear-gradient(90deg,#f59e0b,#fbbf24)}
.tile-gauge-bar.temp-cool{background:#10b981}
.tile-gauge-bar.temp-warm{background:#f59e0b}
.tile-gauge-bar.temp-hot{background:#ef4444}

/* System Alerts */
.system-alert{display:flex;align-items:center;gap:12px;margin-top:16px;padding:14px 18px;border:1px solid;border-radius:16px;font-size:13px;box-shadow:0 4px 14px rgba(0,0,0,.04)}
.system-alert[hidden]{display:none}.system-alert b{white-space:nowrap;font-weight:850}.system-alert span{opacity:.9}
.system-alert.warning{color:#854d0e;background:#fefce8;border-color:#fef08a}
.system-alert.fault{color:#991b1b;background:#fef2f2;border-color:#fecaca}

/* Mobile & Tablet Responsive Design */
@media(max-width:960px){
  .flow-3d-grid-top{grid-template-columns:minmax(140px,1fr) 60px minmax(170px,200px) 60px minmax(140px,1fr)}
  .flow-3d-grid-bottom{grid-template-columns:minmax(140px,1fr) 60px 80px 60px minmax(140px,1fr)}
  .card-3d-visual{height:88px}
  .card-3d-val{font-size:20px}
  .inverter-3d-img{height:124px}
  .inverter-screen-hud{width:68px;top:22px}
  .hud-power{font-size:12px}
}

@media(max-width:960px){
  .energy-topology-stage{min-height:500px}
  .topo-node{width:140px}
  .topo-node.node-inverter{width:170px}
  .topo-3d-visual{height:100px}
  .topo-node.node-inverter .topo-3d-visual{height:130px}
  .topo-val{font-size:20px}
  .topo-node.node-inverter .topo-val{font-size:23px}
  .inv-live-hud{width:46%;top:23%}
  .hud-power{font-size:12px}
}

@media(max-width:760px){
  .inverter-page .local-flow{padding:16px 10px 14px;border-radius:20px}
  .energy-topology-stage{min-height:470px}
  .topo-node{width:115px}
  .topo-node.node-inverter{width:140px}
  .topo-3d-visual{height:80px;margin-bottom:4px}
  .topo-node.node-inverter .topo-3d-visual{height:105px}
  .topo-label{font-size:9.5px}
  .topo-val{font-size:17px}
  .topo-node.node-inverter .topo-val{font-size:19px}
  .topo-status{font-size:8.5px;padding:2px 6px}
  .conduit-float-badge{font-size:9px;padding:2px 6px}
  .conduit-track-bg{stroke-width:7}
  .conduit-flow-line{stroke-width:4}
  .inv-live-hud{width:50%;top:23%;padding:2px 4px}
  .hud-power{font-size:11px}
}

@media(max-width:580px){
  .inverter-page .inverter-wrap{padding-left:6px;padding-right:6px}
  .inverter-page .local-flow{padding:10px 4px 8px;border-radius:16px}
  .energy-topology-stage{aspect-ratio:9/14;min-height:520px;border-radius:18px}
  /* Ultra-clean mobile layout: No overlapping, ample space between nodes */
  .topo-node{width:80px!important}
  .topo-node.node-inverter{width:105px!important}
  .topo-3d-visual{height:58px!important;margin-bottom:2px!important}
  .topo-node.node-inverter .topo-3d-visual{height:80px!important}
  .topo-label{font-size:8px;letter-spacing:.02em}
  .topo-val{font-size:13.5px;letter-spacing:-.02em}
  .topo-node.node-inverter .topo-val{font-size:16px}
  .topo-status{font-size:7px;padding:1px 5px;border-radius:8px;gap:3px}
  .status-dot{width:4px;height:4px}
  .battery-soc-meter{width:95%;margin:3px 0 2px;gap:4px}
  .soc-bar-bg{height:5px}
  .soc-text{font-size:7.5px}
  .inv-live-hud{width:54%;top:22%;padding:2px 3px;border-radius:5px}
  .hud-brand,.hud-state{font-size:5px}
  .hud-power{font-size:9px}
  /* Floating badges are hidden on mobile to keep conduit flow completely unobstructed */
  .conduit-float-badge{display:none!important}
  .conduit-track-bg{stroke-width:5}
  .conduit-flow-line{stroke-width:3.5}
  .flow-balance-bar{font-size:9.5px;padding:7px 8px;gap:6px 8px}
  .inverter-page .full-section{padding:14px}
  .inverter-page .full-tiles{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
  .inverter-page .full-tile{padding:10px}
  .inverter-page .full-tile>b{font-size:17px}
}

.inverter-page .bmsgo-family-banner-logo{max-width:100%;height:auto}

@media(prefers-reduced-motion:reduce){
  .conduit-flow-line,.energy-photon,.inv-ring-spin{animation:none!important}
  .topo-node{transition:none!important}
}

/* Group dashboard uses the inverter flow at a larger width; tune number scale there. */
.inverter-page .group-ring-page .group-inverter{padding:22px 26px}
.inverter-page .group-ring-page .group-inverter>.local-flow{padding:18px 20px 14px;border-radius:20px}
.inverter-page .group-ring-page .local-flow-node strong{font-size:22px;line-height:1.15;font-weight:850;white-space:nowrap}
.inverter-page .group-ring-page .flow-secondary .local-flow-node strong{font-size:21px}
.inverter-page .group-ring-page .local-flow-node small{font-size:12px;line-height:1.35;min-height:17px}
.inverter-page .group-ring-page .inverter-ring{width:150px;height:150px}
.inverter-page .group-ring-page .inverter-ring>div{max-width:120px}
.inverter-page .group-ring-page .inverter-ring strong{display:block;font-size:28px;line-height:1.02;white-space:nowrap}
.inverter-page .group-ring-page .inverter-ring .cu{font-size:26px}
.inverter-page .group-ring-page .inverter-ring span{font-size:12px;letter-spacing:.08em}
.inverter-page .group-ring-page .inverter-ring small{font-size:11px;margin-top:3px}
.inverter-page .group-ring-page .flow-summary{font-size:12px;font-weight:650;color:#496a55}
.inverter-page .group-ring-page .trend-chart{height:60px;margin-top:14px}
@media(max-width:820px){.inverter-page .group-ring-page .group-inverter{padding:16px}.inverter-page .group-ring-page .inverter-ring{width:132px;height:132px}.inverter-page .group-ring-page .inverter-ring>div{max-width:108px}.inverter-page .group-ring-page .inverter-ring strong{font-size:24px}.inverter-page .group-ring-page .inverter-ring .cu{font-size:23px}.inverter-page .group-ring-page .local-flow-node strong,.inverter-page .group-ring-page .flow-secondary .local-flow-node strong{font-size:18px}}
@media(max-width:540px){.inverter-page .group-ring-page .group-inverter{padding:12px}.inverter-page .group-ring-page .group-inverter>.local-flow{padding:14px 8px 12px}.inverter-page .group-ring-page .inverter-ring{width:104px;height:104px}.inverter-page .group-ring-page .inverter-ring>div{max-width:88px}.inverter-page .group-ring-page .inverter-ring strong{font-size:18px}.inverter-page .group-ring-page .inverter-ring .cu{font-size:18px}.inverter-page .group-ring-page .local-flow-node strong,.inverter-page .group-ring-page .flow-secondary .local-flow-node strong{font-size:15px}.inverter-page .group-ring-page .local-flow-node small{font-size:9px}.inverter-page .group-ring-page .flow-summary{font-size:9px}}

/* ============================================================
   Smart Eco-Home 3D Energy Dashboard (FusionSolar / Tesla Style)
   ============================================================ */
.inverter-page .local-flow:has(.smart-eco-dashboard){
  padding:0;
  border:none;
  background:transparent;
  box-shadow:none;
}
.inverter-page .local-flow:has(.smart-eco-dashboard):before{
  display:none;
}

.smart-eco-dashboard{
  position:relative;
  overflow:hidden;
  border-radius:28px;
  background:linear-gradient(180deg,#ebf5fc 0%,#f5f9fc 180px,#ffffff 340px,#f8fafc 100%);
  border:1px solid rgba(203,213,225,0.7);
  box-shadow:0 14px 40px rgba(15,23,42,0.05),0 1px 3px rgba(0,0,0,0.02);
  padding:24px 22px 26px;
  margin-bottom:24px;
}

/* Ambient Morning Sun Flare (day) */
.smart-eco-dashboard::before{
  content:"";
  position:absolute;
  top:-50px;
  right:-50px;
  width:320px;
  height:320px;
  border-radius:50%;
  background:radial-gradient(circle,rgba(253,224,71,0.3) 0%,rgba(254,240,138,0.15) 45%,transparent 70%);
  pointer-events:none;
  z-index:1;
  transition:opacity .6s ease;
}

/* Night sky: deep navy gradient + scattered stars instead of the sun flare */
.smart-eco-dashboard.night{
  background:linear-gradient(180deg,#0b1224 0%,#141d33 200px,#1b2540 360px,#f8fafc 100%);
  border-color:rgba(51,65,110,.6);
}
.smart-eco-dashboard.night::before{
  opacity:0;
}
.smart-eco-dashboard.night::after{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:300px;
  pointer-events:none;
  z-index:1;
  background-image:
    radial-gradient(1.6px 1.6px at 12% 22%,#fff,transparent),
    radial-gradient(1.4px 1.4px at 28% 12%,#fff,transparent),
    radial-gradient(1.8px 1.8px at 42% 30%,#fff,transparent),
    radial-gradient(1.3px 1.3px at 63% 16%,#fff,transparent),
    radial-gradient(1.6px 1.6px at 78% 26%,#fff,transparent),
    radial-gradient(1.3px 1.3px at 88% 10%,#fff,transparent),
    radial-gradient(1.5px 1.5px at 20% 40%,#fff,transparent),
    radial-gradient(1.3px 1.3px at 55% 38%,#fff,transparent);
  opacity:.85;
}
.smart-eco-dashboard.night .eco-home-title,
.smart-eco-dashboard.night .eco-chevron{color:#e2e8f0}
.smart-eco-dashboard.night .eco-weather-pill{background:rgba(15,23,42,.6);border-color:rgba(100,116,139,.5);color:#cbd5e1}
.smart-eco-dashboard.night .eco-house-3d{filter:drop-shadow(0 20px 32px rgba(0,0,0,0.35)) brightness(.78) saturate(.9)}

.weather-icon{display:inline-flex;width:16px;height:16px}
.weather-icon svg{width:100%;height:100%}

/* 1. Header Bar */
.eco-header{
  position:relative;
  z-index:4;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}

.eco-home-selector{
  display:flex;
  align-items:center;
  gap:10px;
  cursor:pointer;
  user-select:none;
}

.eco-avatar{
  width:36px;
  height:36px;
  border-radius:50%;
  background:#ffffff;
  border:1.5px solid #e2e8f0;
  box-shadow:0 2px 8px rgba(15,23,42,0.06);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}

.eco-avatar img{
  width:26px;
  height:26px;
  object-fit:contain;
}

.eco-home-title{
  display:flex;
  align-items:center;
  gap:4px;
  font-size:16px;
  font-weight:750;
  color:#0f172a;
}

.eco-chevron{
  width:18px;
  height:18px;
  color:#64748b;
  transition:transform .2s ease;
}

.eco-home-selector:hover .eco-chevron{
  transform:translateY(1px);
}

.eco-header-right{
  display:flex;
  align-items:center;
  gap:10px;
}

.eco-weather-pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:13px;
  font-weight:600;
  color:#475569;
  background:rgba(255,255,255,0.85);
  border:1px solid rgba(226,232,240,0.8);
  padding:6px 14px;
  border-radius:999px;
  backdrop-filter:blur(6px);
  box-shadow:0 2px 6px rgba(0,0,0,0.02);
}

.eco-live-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:12px;
  font-weight:750;
  color:#047857;
  background:#ecfdf5;
  border:1.5px solid #a7f3d0;
  padding:6px 14px;
  border-radius:999px;
  box-shadow:0 2px 8px rgba(16,185,129,0.12);
}

.eco-radar-dot{
  width:8px;
  height:8px;
  border-radius:50%;
  background:#10b981;
  box-shadow:0 0 0 0 rgba(16,185,129,0.7);
  animation:pulse-live 1.8s infinite;
}

@keyframes pulse-live{
  0%{transform:scale(0.95);box-shadow:0 0 0 0 rgba(16,185,129,0.7);}
  70%{transform:scale(1);box-shadow:0 0 0 7px rgba(16,185,129,0);}
  100%{transform:scale(0.95);box-shadow:0 0 0 0 rgba(16,185,129,0);}
}

/* 2. Central 3D Architecture Stage */
.eco-hero-stage{
  position:relative;
  width:100%;
  max-width:720px;
  margin:0 auto 20px;
  display:flex;
  flex-direction:column;
  align-items:center;
}

/* Floating Solar Ring HUD (Positioned above roof) */
.solar-floating-hud{
  position:absolute;
  top:2px;
  left:50%;
  transform:translateX(-50%);
  width:142px;
  height:142px;
  z-index:6;
  background:#ffffff;
  border-radius:50%;
  box-shadow:0 12px 34px rgba(15,23,42,0.08),0 2px 8px rgba(0,0,0,0.04);
  display:flex;
  align-items:center;
  justify-content:center;
  transition:transform .25s ease,box-shadow .25s ease;
}

.solar-floating-hud:hover{
  transform:translateX(-50%) scale(1.03);
  box-shadow:0 16px 40px rgba(15,23,42,0.12);
}

.solar-ring-svg{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  transform:rotate(-90deg);
}

.solar-ring-svg .ring-bg{
  fill:none;
  stroke:#f1f5f9;
  stroke-width:7;
}

.solar-ring-svg .ring-glow-pulse{
  fill:none;
  stroke:#34d399;
  stroke-width:8;
  opacity:0;
  filter:blur(3px);
  transition:opacity .3s ease;
}

.solar-ring-svg .ring-active{
  fill:none;
  stroke:#10b981;
  stroke-width:7;
  stroke-linecap:round;
  transition:stroke-dashoffset 1s ease-out;
}

.solar-floating-hud.active .ring-glow-pulse{
  opacity:0.35;
}

.solar-hud-content{
  position:relative;
  z-index:2;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  line-height:1;
}

.solar-kw-wrap{
  display:flex;
  align-items:baseline;
  gap:4px;
}

.solar-kw-num{
  font-size:29px;
  font-weight:900;
  color:#0f172a;
  letter-spacing:-0.03em;
  font-family:'JetBrains Mono',-apple-system,sans-serif;
  font-variant-numeric:tabular-nums;
}

.solar-kw-unit{
  font-size:13px;
  font-weight:750;
  color:#64748b;
}

.solar-hud-tag{
  margin-top:5px;
  font-size:12px;
  font-weight:750;
  color:#059669;
  display:inline-flex;
  align-items:center;
  gap:2px;
  letter-spacing:0.02em;
}

/* 3D Scene Container */
.eco-architecture-scene{
  position:relative;
  width:100%;
  margin-top:68px; /* Room for solar HUD */
  min-height:300px;
  display:flex;
  justify-content:center;
  align-items:center;
}

.eco-house-3d{
  width:100%;
  max-width:540px;
  height:auto;
  object-fit:contain;
  display:block;
  filter:drop-shadow(0 20px 32px rgba(15,23,42,0.12));
  pointer-events:none;
  user-select:none;
}

/* Embedded Devices on House */
.house-device-unit{
  position:absolute;
  z-index:4;
  display:flex;
  flex-direction:column;
  align-items:center;
  transition:transform .25s ease;
}

.house-device-unit:hover{
  transform:scale(1.05);
}

.device-battery{
  left:18%;
  bottom:24%;
  width:78px;
}

.device-battery .bat-img{
  width:68px;
  height:auto;
  filter:drop-shadow(0 8px 16px rgba(0,0,0,0.2));
}

.battery-tag-pill{
  display:inline-flex;
  align-items:center;
  gap:4px;
  background:#ffffff;
  border:1.5px solid #e2e8f0;
  padding:3px 8px;
  border-radius:999px;
  font-size:11px;
  font-weight:800;
  color:#0f172a;
  box-shadow:0 4px 12px rgba(0,0,0,0.08);
  margin-bottom:4px;
  white-space:nowrap;
  transition:all .25s ease;
}

.battery-tag-pill.active{
  border-color:#10b981;
  background:#f0fdf4;
  color:#047857;
  box-shadow:0 4px 14px rgba(16,185,129,0.22);
}

.device-inverter{
  left:50%;
  top:48%;
  transform:translateX(-50%);
  width:68px;
}

.device-inverter:hover{
  transform:translateX(-50%) scale(1.05);
}

.device-inverter .inv-img{
  width:64px;
  height:auto;
  filter:drop-shadow(0 10px 22px rgba(0,0,0,0.24));
}

.device-charger{
  right:19%;
  bottom:24%;
  width:74px;
}

.charger-tag-pill{
  display:inline-flex;
  align-items:center;
  gap:4px;
  background:#ffffff;
  border:1.5px solid #e2e8f0;
  padding:3px 8px;
  border-radius:999px;
  font-size:11px;
  font-weight:800;
  color:#0f172a;
  box-shadow:0 4px 12px rgba(0,0,0,0.08);
  margin-bottom:4px;
  white-space:nowrap;
  transition:all .25s ease;
}

.charger-tag-pill.active{
  border-color:#10b981;
  background:#f0fdf4;
  color:#047857;
  box-shadow:0 4px 14px rgba(16,185,129,0.22);
}

.charger-wallbox-icon{
  width:36px;
  height:50px;
  background:linear-gradient(135deg,#334155 0%,#1e293b 100%);
  border-radius:8px;
  border:1.5px solid #475569;
  box-shadow:0 6px 14px rgba(0,0,0,0.22);
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
}

.charger-wallbox-icon::after{
  content:"";
  width:8px;
  height:14px;
  background:#0f172a;
  border-radius:3px;
  position:absolute;
  bottom:-8px;
}

.charger-light-ring{
  width:14px;
  height:14px;
  border-radius:50%;
  border:2.5px solid #10b981;
  box-shadow:0 0 10px #10b981;
}

/* Conduits & Flowing Beads */
.house-conduit-svg{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  z-index:2;
  pointer-events:none;
}

.house-wire-bg{
  fill:none;
  stroke:rgba(148,163,184,0.3);
  stroke-width:6;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.house-wire-active{
  fill:none;
  stroke-width:5;
  stroke-linecap:round;
  stroke-linejoin:round;
  opacity:0;
  transition:opacity .4s ease;
}

.house-wire-active.active{
  opacity:0.95;
}

/* 3. Metrics Trio Cards */
.eco-metrics-trio{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:14px;
  margin-bottom:16px;
}

.eco-metric-card{
  background:#ffffff;
  border-radius:18px;
  padding:16px 12px;
  border:1.5px solid #e2e8f0;
  box-shadow:0 4px 16px rgba(15,23,42,0.04);
  text-align:center;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  transition:all .25s ease;
}

.eco-metric-card:hover{
  transform:translateY(-2px);
  box-shadow:0 8px 24px rgba(15,23,42,0.08);
}

.eco-metric-card.active{
  border-color:#10b981;
  box-shadow:0 6px 20px rgba(16,185,129,0.14),inset 0 0 0 1px rgba(16,185,129,0.15);
}

.metric-val-row{
  display:flex;
  align-items:baseline;
  justify-content:center;
  gap:4px;
}

.metric-big-num{
  font-size:25px;
  font-weight:900;
  color:#0f172a;
  letter-spacing:-0.03em;
  font-family:'JetBrains Mono',-apple-system,sans-serif;
  font-variant-numeric:tabular-nums;
  line-height:1.1;
}

.metric-unit{
  font-size:13px;
  font-weight:750;
  color:#64748b;
}

.metric-label-row{
  font-size:13px;
  font-weight:700;
  color:#64748b;
  display:flex;
  align-items:center;
  gap:3px;
}

.metric-label-row.label-green,
.eco-metric-card.active .metric-label-row{
  color:#059669;
}

/* 4. Statistics Deck */
.eco-stats-card{
  background:#ffffff;
  border-radius:20px;
  padding:16px 18px;
  border:1.5px solid #e2e8f0;
  box-shadow:0 4px 16px rgba(15,23,42,0.04);
}

.eco-stats-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:12px;
  font-size:15px;
  font-weight:800;
  color:#0f172a;
}

.stats-arrow{
  font-size:18px;
  color:#94a3b8;
}

.eco-stats-pills-row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.eco-stat-pill{
  background:#f8fafc;
  border-radius:14px;
  padding:12px 14px;
  display:flex;
  align-items:center;
  gap:12px;
  border:1px solid #f1f5f9;
  transition:all .2s ease;
}

.eco-stat-pill:hover{
  background:#f1f5f9;
}

.stat-pill-icon{
  width:38px;
  height:38px;
  border-radius:10px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
  flex-shrink:0;
}

.stat-pill-icon.zap-icon{
  background:#fef9c3;
  border:1px solid #fef08a;
}

.stat-pill-icon.coin-icon{
  background:#fef3c7;
  border:1px solid #fde68a;
}

.stat-pill-info{
  display:flex;
  flex-direction:column;
  gap:2px;
}

.stat-pill-val{
  font-size:17px;
  font-weight:850;
  color:#0f172a;
  letter-spacing:-0.02em;
  font-family:'JetBrains Mono',-apple-system,sans-serif;
  line-height:1.2;
}

.stat-pill-val small{
  font-size:12px;
  font-weight:700;
  color:#64748b;
}

.stat-pill-label{
  font-size:12px;
  font-weight:600;
  color:#64748b;
  display:inline-flex;
  align-items:center;
  gap:4px;
}

.stat-pill-label .info-bubble{
  font-style:normal;
  color:#94a3b8;
  font-size:11px;
}

/* Responsive adjustments */
@media(max-width:760px){
  .smart-eco-dashboard{padding:18px 14px 20px;border-radius:22px;}
  .eco-hero-stage{max-width:100%;}
  .solar-floating-hud{width:130px;height:130px;}
  .solar-kw-num{font-size:25px;}
  .eco-architecture-scene{margin-top:60px;min-height:260px;}
  .eco-metrics-trio{gap:10px;}
  .eco-metric-card{padding:14px 8px;}
  .metric-big-num{font-size:21px;}
  .eco-stat-pill{padding:10px 12px;gap:10px;}
  .stat-pill-icon{width:34px;height:34px;font-size:16px;}
  .stat-pill-val{font-size:15px;}
}

@media(max-width:580px){
  .smart-eco-dashboard{padding:14px 10px 16px;border-radius:18px;margin-bottom:16px;}
  .eco-home-title span{font-size:14px;}
  .eco-weather-pill{font-size:11px;padding:4px 9px;}
  .eco-live-badge{font-size:11px;padding:4px 9px;}
  .solar-floating-hud{width:115px;height:115px;}
  .solar-kw-num{font-size:21px;}
  .solar-kw-unit{font-size:11px;}
  .solar-hud-tag{font-size:11px;}
  .eco-architecture-scene{margin-top:52px;min-height:220px;}
  .device-battery{left:12%;bottom:22%;width:62px;}
  .device-battery .bat-img{width:52px;}
  .device-inverter{width:54px;}
  .device-inverter .inv-img{width:48px;}
  .device-charger{right:12%;bottom:22%;width:62px;}
  .charger-wallbox-icon{width:28px;height:42px;}
  .charger-light-ring{width:11px;height:11px;}
  .battery-tag-pill,.charger-tag-pill{font-size:9.5px;padding:2px 6px;}
  .eco-metrics-trio{gap:6px;}
  .eco-metric-card{padding:10px 4px;border-radius:14px;}
  .metric-big-num{font-size:17px;}
  .metric-unit{font-size:10px;}
  .metric-label-row{font-size:10px;}
  .eco-stats-pills-row{grid-template-columns:1fr 1fr;gap:8px;}
  .eco-stat-pill{padding:8px 8px;gap:6px;}
  .stat-pill-icon{width:28px;height:28px;font-size:14px;}
  .stat-pill-val{font-size:13.5px;}
  .stat-pill-label{font-size:10px;}
}
