/* 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}

.inverter-page .local-flow{position:relative;overflow:hidden;padding:20px 28px 15px;border:1px solid var(--inv-line);border-radius:22px;background:#fff;box-shadow:0 6px 22px rgba(18,48,31,.08)}
.inverter-page .local-flow:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 50% -25%,rgba(183,227,75,.13),transparent 40%);pointer-events:none}
.flow-primary{position:relative;display:grid;grid-template-columns:minmax(115px,1fr) minmax(88px,118px) 160px minmax(88px,118px) minmax(115px,1fr);align-items:center;max-width:900px;margin:0 auto}
.local-flow-node{text-align:center;min-width:0;color:var(--inv-muted)}
.local-flow-node .flow-icon{display:grid;place-items:center;width:52px;height:52px;margin:0 auto 7px;border:1px solid #d2e6cc;border-radius:15px;background:linear-gradient(145deg,#fbfdf9,#eaf5e5);color:#1b4332}
.local-flow-node .flow-icon svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
.local-flow-node .flow-label{display:block;font-size:13px;color:#4e6d59}
.local-flow-node strong{display:block;margin-top:1px;color:var(--inv-blue);font-size:22px;line-height:1.2;font-weight:850;font-variant-numeric:tabular-nums}
.local-flow-node small{display:block;margin-top:3px;color:var(--inv-muted);font-size:11px;line-height:1.25}

.inverter-ring{position:relative;width:154px;height:154px;justify-self:center;border-radius:50%;display:grid;place-items:center;background:conic-gradient(var(--inv-cyan) 0 82%,#dcefd7 82% 100%);box-shadow:0 9px 25px rgba(31,127,77,.14)}
.inverter-ring:before{content:"";position:absolute;inset:8px;border-radius:50%;background:#fff}
.inverter-ring:after{content:"";position:absolute;inset:-6px;border:1px dashed rgba(47,155,98,.35);border-radius:50%;animation:inv-spin 12s linear infinite}
.inverter-ring>div{position:relative;z-index:1;text-align:center;max-width:128px}
.inverter-ring span{display:block;color:#617a68;font-size:10px;font-weight:800;letter-spacing:.13em}
.inverter-ring strong{display:block;color:var(--inv-blue);font-size:28px;line-height:1.12;font-weight:900;font-variant-numeric:tabular-nums}
.inverter-ring small{display:block;margin-top:4px;color:#238656;font-size:10px;font-weight:800;line-height:1.25}

.flow-arrow{position:relative;width:calc(100% - 8px);min-width:56px;height:14px;justify-self:center;color:#cbd8c7}
.flow-arrow span{position:absolute;left:1px;right:1px;top:6px;height:2px;border-radius:10px;background:repeating-linear-gradient(90deg,currentColor 0 4px,transparent 4px 8px)}
.flow-arrow span:after{content:"";position:absolute;top:-1.5px;left:0;width:5px;height:5px;border-radius:50%;background:transparent}
.flow-arrow i{position:absolute;top:3px;width:6px;height:6px;border-top:1.5px solid currentColor;border-right:1.5px solid currentColor}
.flow-arrow.right i{right:0;transform:rotate(45deg)}
.flow-arrow.left i{left:0;transform:rotate(-135deg)}
.flow-arrow.active{color:var(--inv-cyan)}
.flow-arrow.active span{background:repeating-linear-gradient(90deg,#62bd7d 0 5px,transparent 5px 10px);background-size:20px 100%}
.flow-arrow.right.active span{animation:dash-right .75s linear infinite}
.flow-arrow.left.active span{animation:dash-left .75s linear infinite}
.flow-arrow.active span:after{background:var(--accent);box-shadow:0 0 0 2px rgba(47,155,98,.13),0 0 6px rgba(47,155,98,.4);animation:energy-right 1.35s linear infinite}
.flow-arrow.left.active span:after{animation-name:energy-left}

.flow-divider{position:relative;width:62%;height:1px;margin:13px auto 12px;background:var(--inv-line)}
.flow-secondary{position:relative;display:grid;grid-template-columns:minmax(120px,1fr) minmax(76px,100px) 42px minmax(76px,100px) minmax(120px,1fr);align-items:center;max-width:650px;margin:0 auto}
.flow-secondary .local-flow-node strong{font-size:20px}
.flow-hub{width:42px;height:42px;display:grid;place-items:center;border:1px solid #cce2c6;border-radius:50%;background:var(--inv-pale);color:var(--inv-blue);font-size:17px;font-weight:900;box-shadow:0 0 0 4px rgba(183,227,75,.11)}
.flow-summary{position:relative;margin:12px 0 0;text-align:center;color:#597361;font-size:11px}

.details-heading{align-items:center!important;margin-top:28px!important}
.inverter-page .section-title h2{color:var(--inv-blue)}
.inverter-page .section-title p{color:var(--inv-muted)}
.inverter-page .inv-card-meta{color:#789080;font-size:11px;font-weight:800;letter-spacing:.08em}
.inverter-page .full-details{display:grid;gap:15px}
.inverter-page .full-section{padding:19px;border:1px solid var(--inv-line);border-radius:18px;background:#fff;box-shadow:0 4px 17px rgba(18,48,31,.055)}
.inverter-page .full-section>header{display:flex;align-items:center;gap:11px;margin-bottom:14px}
.inverter-page .section-icon{display:grid;place-items:center;width:38px;height:38px;flex:0 0 38px;border-radius:11px;background:var(--inv-pale);color:var(--inv-blue);font-size:18px;line-height:1}
.inverter-page .section-icon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.inverter-page .full-section h2{margin:0;color:var(--inv-blue);font-size:17px;line-height:1.2}
.inverter-page .full-section header p{margin:2px 0 0;color:var(--inv-muted);font-size:11px}
.inverter-page .full-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:8px}
.inverter-page .full-tile{min-height:82px;padding:11px 12px;border:1px solid transparent;border-radius:12px;
  background:#f3f7f1;transition:transform .15s,box-shadow .15s}
.inverter-page .full-tile:hover{transform:translateY(-1px);box-shadow:0 5px 14px rgba(18,48,31,.08)}
.inverter-page .full-tile .tile-top{display:flex;align-items:center;gap:6px;margin-bottom:4px}
.inverter-page .full-tile .tile-icon{display:flex;align-items:center;justify-content:center;flex:0 0 22px;
  width:22px;height:22px;border-radius:7px;background:rgba(255,255,255,.75);font-size:12px;line-height:1}
.inverter-page .full-tile .tile-label{display:block;color:var(--inv-muted);font-size:11px;line-height:1.25}
.inverter-page .full-tile>b{display:block;margin-top:3px;color:var(--inv-blue);font-size:19px;font-weight:800;line-height:1.25;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.inverter-page .full-tile>b small{margin-left:4px;color:#5d7965;font-size:10px;font-weight:700}
.inverter-page .full-tile em{display:block;margin-top:3px;color:#839589;font-size:9.5px;font-style:normal;line-height:1.2}
.inverter-page .full-tile.featured{border-color:#cce4c5;background:linear-gradient(145deg,#f2faee,#e8f5e3)}
.inverter-page .full-tile.featured>b{color:#247c50;font-size:21px}
.inverter-page .full-tile.featured .tile-icon{background:#fff;box-shadow:0 0 0 1px #cce4c5}
.inverter-page .full-tile .text-value{font-size:14px;line-height:1.35;font-weight:800}
.inverter-page .full-tile.healthy{background:#eef9f4}.inverter-page .full-tile.healthy>b{color:#16865d}
.inverter-page .full-tile.warning{background:#fff8e8;border-color:#f3dfae}.inverter-page .full-tile.warning>b{color:#9b6700}
.inverter-page .full-tile.danger{background:#fff0ed;border-color:#f1c6bd}.inverter-page .full-tile.danger>b{color:#b33c28}
.system-alert{display:flex;align-items:center;gap:12px;margin-top:14px;padding:12px 15px;border:1px solid;border-radius:13px;font-size:12px}
.system-alert[hidden]{display:none}.system-alert b{white-space:nowrap}.system-alert span{opacity:.86}
.system-alert.warning{color:#815a09;background:#fff8e8;border-color:#efd89d}
.system-alert.fault{color:#9d3423;background:#fff0ed;border-color:#edbeb5}

@keyframes dash-right{to{background-position:20px 0}}
@keyframes dash-left{to{background-position:-20px 0}}
@keyframes energy-right{0%{left:0;opacity:0}12%{opacity:1}88%{opacity:1}100%{left:calc(100% - 5px);opacity:0}}
@keyframes energy-left{0%{left:calc(100% - 5px);opacity:0}12%{opacity:1}88%{opacity:1}100%{left:0;opacity:0}}
@keyframes inv-spin{to{transform:rotate(360deg)}}

@media(max-width:760px){
  .inverter-page .full-inv-head{align-items:flex-start;flex-direction:column}
  .inverter-page .inv-head-actions{width:100%;justify-content:space-between}
  .flow-primary{grid-template-columns:minmax(92px,1fr) 42px 130px 42px minmax(92px,1fr)}
  .inverter-ring{width:124px;height:124px}.inverter-ring strong{font-size:22px}.inverter-ring small{font-size:9px}
  .local-flow-node .flow-icon{width:44px;height:44px;border-radius:12px}.local-flow-node .flow-icon svg{width:21px;height:21px}
  .local-flow-node strong{font-size:18px}.flow-arrow{width:calc(100% - 6px);min-width:0}
  .flow-divider{width:82%}
}

@media(max-width:540px){
  .inverter-page .inverter-wrap{padding-left:12px;padding-right:12px}
  .inverter-page .full-inv-head h1{font-size:20px}
  .inverter-page .inv-head-actions{gap:7px}.live-badge{padding:6px 8px;font-size:10px}.inverter-page .energy-btn{padding:8px 10px;font-size:11px}
  .inverter-page .local-flow{padding:17px 8px 13px;border-radius:17px}
  .flow-primary{grid-template-columns:minmax(64px,1fr) 22px 102px 22px minmax(64px,1fr)}
  .inverter-ring{width:98px;height:98px}.inverter-ring:before{inset:6px}.inverter-ring>div{max-width:86px}.inverter-ring span{font-size:7px}.inverter-ring strong{font-size:17px}.inverter-ring small{font-size:7.5px;margin-top:2px}
  .local-flow-node .flow-icon{width:36px;height:36px;margin-bottom:5px}.local-flow-node .flow-icon svg{width:18px;height:18px}
  .local-flow-node .flow-label{font-size:10px}.local-flow-node strong,.flow-secondary .local-flow-node strong{font-size:14px}.local-flow-node small{font-size:8px}
  .flow-arrow{width:calc(100% - 3px);min-width:0;height:12px}.flow-arrow span{top:5px}.flow-arrow i{top:3px;width:5px;height:5px}
  .flow-divider{width:92%;margin:11px auto 10px}
  .flow-secondary{grid-template-columns:minmax(75px,1fr) 25px 36px 25px minmax(75px,1fr);max-width:330px}.flow-hub{width:34px;height:34px;font-size:13px}
  .flow-summary{font-size:8.5px;margin-top:9px}
  .inverter-page .full-section{padding:14px}.inverter-page .full-tiles{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.inverter-page .full-tile{min-height:72px;padding:10px}.inverter-page .full-tile>b{font-size:16px}.inverter-page .full-tile .text-value{font-size:12px}
  .system-alert{align-items:flex-start;flex-direction:column;gap:2px}
}

@media(max-width:360px){
  .flow-primary{grid-template-columns:minmax(57px,1fr) 16px 88px 16px minmax(57px,1fr)}
  .inverter-ring{width:86px;height:86px}.inverter-ring strong{font-size:15px}.local-flow-node strong{font-size:12px}
  .flow-secondary{grid-template-columns:minmax(67px,1fr) 19px 32px 19px minmax(67px,1fr)}.flow-hub{width:31px;height:31px}
}

@media(prefers-reduced-motion:reduce){.flow-arrow.active span,.flow-arrow.active span:after,.inverter-ring:after{animation:none}.inv-compact{transition:none}}

/* 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}}
