/* Levocell energy operations dashboard (blocks/energy-dashboard). Enterprise, light, illustrative figures. */
.lced {
	--ed-bg: #f5f6f7; --ed-panel: #fff; --ed-line: #e3e6ea; --ed-line-2: #eef0f3; --ed-ink: #111827; --ed-ink-2: #374151; --ed-muted: #6b7280;
	--ed-accent: #1f957c; --ed-accent-soft: #e3f3ee; --ed-solar: #d39a2c; --ed-navy: #1e2a4a; --ed-grid: #8a93a3; --ed-ok: #1f9d6b;
	container-type: inline-size; position: relative; overflow: hidden;
	border: 1px solid var(--ed-line); border-radius: 14px; background: var(--ed-bg);
	box-shadow: 0 1px 2px rgba(17, 24, 39, .04), 0 24px 48px -28px rgba(17, 24, 39, .22);
	color: var(--ed-ink); font-size: 12px; line-height: 1.4; text-align: left; -webkit-font-smoothing: antialiased;
}
.lced *, .lced *::before, .lced *::after { box-sizing: border-box; }
.lced p, .lced h4, .lced ul, .lced ol, .lced dl, .lced dd { margin: 0; padding: 0; }
.lced ul, .lced ol { list-style: none; }
.lced small { font-size: 10.5px; color: var(--ed-muted); font-weight: 500; }
.lced svg { display: block; }

/* Header and tabs */
.lced__top { display: flex; align-items: center; gap: 20px; padding: 10px 16px; background: var(--ed-panel); border-bottom: 1px solid var(--ed-line); }
.lced__brand { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.lced__brand b { font-weight: 700; letter-spacing: -.01em; }
.lced__brand > span:last-child { color: var(--ed-muted); font-weight: 500; padding-left: 10px; border-left: 1px solid var(--ed-line); }
.lced__logo-img { display: block; height: 20px; width: auto; max-width: none; }
.lced__logo { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; width: 18px; height: 18px; }
.lced__logo i { border-radius: 2px; background: var(--ed-navy); } .lced__logo i:nth-child(2), .lced__logo i:nth-child(3) { background: var(--ed-accent); }
.lced__crumbs { color: var(--ed-muted); font-size: 12px; }
.lced__crumbs i { font-style: normal; margin: 0 6px; color: #c2c7cf; }
.lced__crumbs b { color: var(--ed-ink); font-weight: 600; }
.lced__meta { margin-left: auto; display: flex; align-items: center; gap: 12px; color: var(--ed-muted); font-variant-numeric: tabular-nums; }
.lced__live { display: inline-flex; align-items: center; gap: 6px; color: var(--ed-ok); font-weight: 600; }
.lced__live i { width: 7px; height: 7px; border-radius: 50%; background: var(--ed-ok); animation: lced-ping 2s ease-out infinite; }
.lced__flag { padding: 2px 8px; border: 1px solid var(--ed-line); border-radius: 4px; font-size: 10.5px; }
.lced__tabs { display: flex; gap: 22px; padding: 0 16px; background: var(--ed-panel); border-bottom: 1px solid var(--ed-line); }
.lced__tabs button { all: unset; box-sizing: border-box; cursor: pointer; padding: 9px 0; color: var(--ed-muted); font: inherit; font-weight: 500; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s; }
.lced__tabs button:hover { color: var(--ed-ink); }
.lced__tabs button[aria-selected="true"] { color: var(--ed-ink); border-bottom-color: var(--ed-accent); font-weight: 600; }
.lced__tabs button:focus-visible { outline: 2px solid var(--ed-accent); outline-offset: 2px; border-radius: 2px; }
.lced__view[hidden], .lced__crumbs [hidden] { display: none !important; }
/* Fleet tab: the UK fleet demo in a frame, sized for its desktop, tablet and phone layouts */
.lced__fleet { position: relative; background: #e8ebf3; }
.lced__fleet-loading { position: absolute; inset: 0; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0; color: #575f84; font-size: 13px; font-weight: 500; background: #e8ebf3; }
.lced__fleet-loading[hidden] { display: none; }
.lced__fleet-loading span { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #c9cfe2; border-top-color: var(--ed-accent); animation: lced-spin .8s linear infinite; }
@keyframes lced-spin { to { transform: rotate(360deg); } }
.lced__fleet iframe { display: block; width: 100%; height: 720px; border: 0; background: #e8ebf3; }
@container (max-width: 900px) { .lced__fleet iframe { height: 1000px; } }
@container (max-width: 560px) { .lced__fleet iframe { height: 760px; } }

/* Main */
.lced__main { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 12px; padding: 12px 12px 0; }
.lced__site { position: relative; background: var(--ed-panel); border: 1px solid var(--ed-line); border-radius: 10px; padding: 12px 14px; min-width: 0; }
.lced__mode { display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 10px; row-gap: 6px; }
.lced__mode small { text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.lced__mode b { font-size: 13px; font-weight: 600; transition: opacity .4s; }
.lced__prog { grid-column: 1 / -1; height: 2px; border-radius: 2px; background: var(--ed-line-2); overflow: hidden; }
.lced__prog i { display: block; height: 100%; width: 0; background: var(--ed-accent); }
.lced__scene { position: relative; margin: 2px -4px -6px; }
.lced__pin { position: absolute; z-index: 2; transform: translate(-50%, -100%); padding: 5px 8px; border-radius: 6px; background: rgba(255, 255, 255, .96); border: 1px solid var(--ed-line); box-shadow: 0 4px 12px rgba(17, 24, 39, .08); white-space: nowrap; pointer-events: none; }
.lced__pin::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 8px; height: 8px; transform: translateX(-50%) rotate(45deg); background: inherit; border-right: 1px solid var(--ed-line); border-bottom: 1px solid var(--ed-line); }
.lced__pin small { display: block; font-size: 9.5px; text-transform: uppercase; letter-spacing: .06em; }
.lced__pin b { display: block; font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; }
.lced__pin b.is-chg { color: var(--ed-accent); } .lced__pin b.is-dis { color: var(--ed-navy); }

.lced__side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.lced__panel { background: var(--ed-panel); border: 1px solid var(--ed-line); border-radius: 10px; padding: 12px 14px; }
.lced__panel h4, .lced__chart h4 { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ed-ink-2); }
.lced__panel h4 small, .lced__chart h4 small { text-transform: none; letter-spacing: 0; }
.lced__rows > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--ed-line-2); }
.lced__rows > div:first-child { border-top: 0; }
.lced__rows dt { color: var(--ed-muted); }
.lced__rows dd { display: flex; align-items: center; font-weight: 600; font-variant-numeric: tabular-nums; white-space: pre; }
.lced__soc { margin-right: 8px; width: 64px; height: 6px; border-radius: 3px; background: var(--ed-line-2); overflow: hidden; }
.lced__soc i { display: block; height: 100%; background: var(--ed-accent); transition: width 1s ease; }
.lced__sched { position: relative; display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; height: 22px; }
.lced__sched span { border-radius: 2px; }
.lced__sched .s-chg { background: #9fd8c8; } .lced__sched .s-dis { background: var(--ed-navy); } .lced__sched .s-idle { background: var(--ed-line-2); }
.lced__sched .now { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--ed-solar); border-radius: 1px; }
.lced__hours { display: flex; justify-content: space-between; margin-top: 4px; color: var(--ed-muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.lced__keys { display: flex; gap: 12px; margin-top: 6px; color: var(--ed-muted); font-size: 10.5px; }
.lced__keys li { display: flex; align-items: center; gap: 5px; }
.lced__keys i, .lced__legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; }
.lced .k-chg { background: #9fd8c8; } .lced .k-dis { background: var(--ed-navy); } .lced .k-idle { background: var(--ed-line-2); border: 1px solid var(--ed-line); }
.lced__logbox { flex: 1; min-height: 0; }
.lced__log li { display: flex; gap: 10px; padding: 4px 0; color: var(--ed-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lced__log li.is-new { animation: lced-in .5s ease both; }
.lced__log time { flex: none; color: var(--ed-muted); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 10.5px; }

/* Chart */
.lced__chart { margin: 12px; padding: 12px 14px 8px; background: var(--ed-panel); border: 1px solid var(--ed-line); border-radius: 10px; }
.lced__legend { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--ed-muted); text-transform: none; letter-spacing: 0; font-weight: 500; }
.lced__legend i { margin-left: 8px; width: 12px; height: 3px; border-radius: 2px; }
.lced .k-load { background: var(--ed-ink); } .lced .k-pv { background: var(--ed-solar); } .lced .k-batt { background: var(--ed-accent); } .lced .k-grid { background: var(--ed-grid); }
.lced__plotwrap { display: grid; grid-template-columns: auto 1fr; gap: 8px; }
.lced__axis { display: flex; flex-direction: column; justify-content: space-between; height: 130px; padding: 2px 0 0; color: var(--ed-muted); font-size: 10px; text-align: right; font-variant-numeric: tabular-nums; }
.lced__axis span { line-height: 1; transform: translateY(-2px); }
.lced__plot { width: 100%; height: 130px; overflow: visible; }

.lced__plot .gl { stroke: var(--ed-line-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.lced__plot text { font-size: 9px; fill: var(--ed-muted); }
.lced__plot .ln { fill: none; stroke-width: 1.8; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.lced__plot .ln.dash { stroke-dasharray: 4 3; }
.lced__plot .ar { fill: var(--ed-solar); opacity: .12; }
.lced__plot .cur { stroke: var(--ed-ink); stroke-width: 1; opacity: .35; vector-effect: non-scaling-stroke; }
.lced__plot .curdot { fill: #fff; stroke: var(--ed-ink); stroke-width: 1.5; vector-effect: non-scaling-stroke; }

@keyframes lced-ping { 0% { box-shadow: 0 0 0 0 rgba(31, 157, 107, .45); } 80%, 100% { box-shadow: 0 0 0 6px rgba(31, 157, 107, 0); } }
@keyframes lced-in { from { opacity: 0; transform: translateY(-4px); } }

/* Tablet: the site full width, the panels below */
@container (max-width: 900px) {
	.lced__main { grid-template-columns: minmax(0, 1fr); }
	.lced__side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.lced__logbox { grid-column: 1 / -1; }
	.lced__crumbs { display: none; }
}
/* Phone */
@container (max-width: 560px) {
	.lced { font-size: 11px; }
	.lced__top { gap: 10px; padding: 9px 12px; }
	.lced__brand > span:last-child, .lced__flag { display: none; }
	.lced__side { grid-template-columns: minmax(0, 1fr); }
	.lced__main { padding: 10px 10px 0; }
	.lced__chart { margin: 10px; }
	.lced__legend { display: none; }
	.lced__pin { padding: 3px 6px; } .lced__pin small { font-size: 8px; } .lced__pin b { font-size: 11px; }
	.lced__pin.is-optional { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	.lced *, .lced *::before, .lced *::after { animation: none !important; transition: none !important; }
}
/* Isometric site: same daylight palette and energy lines as the grid on/off house */
.lced-scene { width: 100%; height: auto; display: block; overflow: visible;
	--lawn: #6f9a77; --side-l: #c9c5bc; --side-r: #b3aea4; --walk: #dedad2; --yard: #e4e1da;
	--wall-l: #f3f1ec; --wall-r: #dfdbd3; --roof: #cfccc5; --frame: #43464f; --glass: #a9bccb;
	--panel: #1f2a55; --cell: #51619e; --shadow: rgba(20, 30, 20, .16); }
.lced-scene polygon, .lced-scene line, .lced-scene path, .lced-scene circle, .lced-scene ellipse { transition: fill .6s, opacity .5s; }
.lced-scene .lawn { fill: var(--lawn); } .lced-scene .side-l { fill: var(--side-l); } .lced-scene .side-r { fill: var(--side-r); }
.lced-scene .walk { fill: var(--walk); } .lced-scene .yard { fill: var(--yard); } .lced-scene .bay { fill: #fff; opacity: .8; }
.lced-scene .shadow { fill: var(--shadow); }
.lced-scene .bld-t { fill: var(--roof); } .lced-scene .bld-l { fill: var(--wall-l); } .lced-scene .bld-r { fill: var(--wall-r); }
.lced-scene .parapet { fill: none; stroke: #b9b5ad; stroke-width: 2; }
.lced-scene .door { fill: #8d929b; } .lced-scene .door-line { fill: #7b808a; } .lced-scene .glass { fill: var(--glass); }
.lced-scene .band { fill: #2f3440; } .lced-scene .sign { fill: #1f957c; }
.lced-scene .panel { fill: var(--panel); stroke: var(--cell); stroke-width: .7; } .lced-scene .cell { stroke: var(--cell); stroke-width: .5; }
.lced-scene .cab-t { fill: #e9ebee; } .lced-scene .cab-l { fill: #d6d9de; } .lced-scene .cab-r { fill: #c2c6cc; } .lced-scene .led { fill: #2fbf8f; }
.lced-scene .bat-t { fill: #f6f6f4; } .lced-scene .bat-l { fill: #e7e7e4; } .lced-scene .bat-r { fill: #cfd0cd; }
.lced-scene .vent { fill: #c3c5c2; } .lced-scene .bat-led { fill: #1f957c; }
.lced-scene .dc-t { fill: #4b505c; } .lced-scene .dc-l { fill: #3a3f4a; } .lced-scene .dc-r { fill: #2e323b; } .lced-scene .dc-door { fill: #4a4f5b; } .lced-scene .dc-led { fill: #7ff0d8; }
.lced-scene .dc-l ~ .vent, .lced-scene .dc-r ~ .vent { fill: #555a66; }
.lced-scene .fence { fill: none; stroke: #9a968e; stroke-width: 1.2; stroke-dasharray: 3 3; }
.lced-scene .tr-t { fill: #a7adb5; } .lced-scene .tr-l { fill: #959ba4; } .lced-scene .tr-r { fill: #858b94; } .lced-scene .tr-fin { fill: #757b84; }
.lced-scene .pole { stroke: #6f6a63; stroke-width: 5; stroke-linecap: round; } .lced-scene .pole.thin { stroke-width: 3.5; }
.lced-scene .wire { fill: none; stroke: #4a4a50; stroke-width: 1.4; }
.lced-scene .post { stroke: #8a8f98; stroke-width: 4; stroke-linecap: round; }
.lced-scene .canopy-t { fill: #e2e4e7; } .lced-scene .canopy-l { fill: #c9ccd1; } .lced-scene .canopy-r { fill: #b8bcc2; }
.lced-scene .ev-t { fill: #f4f5f6; } .lced-scene .ev-l { fill: #e1e3e6; } .lced-scene .ev-r { fill: #c9ccd1; } .lced-scene .ev-led { fill: #1f957c; }
.lced-scene .trunk { stroke: #6b5844; stroke-width: 5; stroke-linecap: round; } .lced-scene .bush { fill: #4c7a58; } .lced-scene .bush-hi { fill: #64946f; }
.lced-scene .line path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.lced-scene .line .base { stroke: rgba(0, 0, 0, .16); stroke-width: 3; }
.lced-scene .line .glow { stroke: #7ff0d8; stroke-width: 8; opacity: 0; filter: url(#lced-blur3); transition: opacity .6s; }
.lced-scene .line .flow { stroke: #2fd3b0; stroke-width: 2.6; stroke-dasharray: 6 10; opacity: 0; animation: lced-flow 1s linear infinite; transition: opacity .6s; }
.lced-scene .line.on .glow { opacity: .6; } .lced-scene .line.on .flow { opacity: 1; }
.lced-scene .line.rev .flow { animation-direction: reverse; }
@keyframes lced-flow { to { stroke-dashoffset: -32; } }
@container (max-width: 560px) { .lced__logo-img { height: 15px; } }
