:root {
  --bg: #f4f7fb;
  --card: #ffffff;
  --border: #e5ecf4;
  --text: #142033;
  --muted: #6b7a90;
  --primary: #2563eb;
  --primary-2: #1d4ed8;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  background: linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
  color: var(--text);
}

.layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: #0f172a;
  color: #fff;
  padding: 24px;
  border-right: 1px solid rgba(255,255,255,0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.brand-badge {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, #22c55e, #2563eb);
  display: grid;
  place-items: center;
  font-size: 22px;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.35);
}
.brand h1 { font-size: 20px; margin: 0; }
.brand p { margin: 4px 0 0; color: #94a3b8; font-size: 13px; }

.side-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 16px;
}
.side-card h3 {
  margin: 0 0 12px;
  font-size: 14px;
  color: #e2e8f0;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.main {
  padding: 24px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.topbar h2 { margin: 0; font-size: 28px; }
.topbar p { margin: 6px 0 0; color: var(--muted); }

.main-card, .data-card, .filter-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.main-card { padding: 22px; margin-bottom: 20px; }
.filter-card { padding: 18px; margin-bottom: 20px; }
.data-card { padding: 20px; }

.stack { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 2fr 1.2fr; gap: 18px; }
.grid-2-even { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

input, select, button, .button-link {
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 12px 14px;
  font-size: 14px;
}
select, input {
  width: 100%;
  background: #fff;
}
button, .button-link {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
}
button.secondary, .button-link.secondary {
  background: #eff6ff;
  color: var(--primary-2);
  border: 1px solid #bfdbfe;
}
button.ghost, .button-link.ghost {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
}
button:hover, .button-link:hover { filter: brightness(0.98); }

.muted { color: var(--muted); }
.small { font-size: 12px; }
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.section-title h3 { margin: 0; font-size: 18px; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.kpi-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 18px;
  min-height: 116px;
}
.kpi-label { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.kpi-value { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; }
.kpi-unit { font-size: 14px; color: var(--muted); margin-left: 6px; }
.kpi-foot { margin-top: 10px; color: #0f766e; font-size: 12px; }

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.portfolio-card {
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 18px;
  background: linear-gradient(180deg, #fff, #f8fbff);
}
.portfolio-card h4 { margin: 0 0 8px; font-size: 16px; }

.energy-flow {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 80px 1fr 80px 1fr;
  align-items: center;
  gap: 8px;
  padding: 12px 0 4px;
}
.flow-box {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 22px 16px;
  min-height: 122px;
  text-align: center;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}
.flow-icon {
  width: 52px; height: 52px; border-radius: 16px;
  display: grid; place-items: center; margin: 0 auto 12px;
  font-size: 26px;
}
.flow-solar .flow-icon { background: rgba(245, 158, 11, 0.12); }
.flow-load .flow-icon { background: rgba(37, 99, 235, 0.12); }
.flow-grid .flow-icon { background: rgba(16, 185, 129, 0.12); }
.flow-label { color: var(--muted); font-size: 13px; }
.flow-value { font-size: 28px; font-weight: 800; margin-top: 8px; }
.flow-sub { color: var(--muted); font-size: 12px; margin-top: 6px; }
.flow-arrow {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(37,99,235,0.15), rgba(37,99,235,0.5), rgba(16,185,129,0.25));
  overflow: hidden;
}
.flow-arrow::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
  transform: translateX(-120%);
  animation: flowPulse 2.2s linear infinite;
}
.flow-arrow::after {
  content: "➜";
  position: absolute;
  right: 6px;
  top: -12px;
  font-size: 22px;
  color: var(--primary);
}
@keyframes flowPulse {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}

.metrics-list { display: grid; gap: 10px; }
.metric-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px; border-radius: 14px; background: #f8fbff; border: 1px solid var(--border);
}

.chart-wrap {
  background: linear-gradient(180deg, #fff, #f8fbff);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 18px;
}
.chart-wrap canvas { width: 100%; height: 320px; }

.filters-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.inline-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }

.table-scroll { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--border); text-align: left; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
tr:hover td { background: #fafcff; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px; padding: 6px 10px; font-size: 12px; font-weight: 700;
  background: #eef2ff; color: #4338ca;
}

@media (max-width: 1180px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { border-right: 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .kpi-grid, .filters-grid, .grid-2, .grid-2-even { grid-template-columns: 1fr; }
  .energy-flow { grid-template-columns: 1fr; }
  .flow-arrow { height: 34px; }
  .flow-arrow::after { top: 2px; left: calc(50% - 10px); right: auto; transform: rotate(90deg); }
}

.hidden-loader {
	display: none;
}

.topbar {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 18px;
}

.badge {
	display: inline-flex;
	align-items: center;
	padding: 6px 12px;
	border-radius: 999px;
	background: #eef2ff;
	color: #3730a3;
	font-size: 12px;
	font-weight: 700;
}

.kpi-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px;
	margin-bottom: 20px;
}

.kpi-card {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 18px;
	padding: 18px;
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.kpi-title {
	color: #64748b;
	font-size: 13px;
	margin-bottom: 10px;
}

.kpi-value {
	font-size: 30px;
	font-weight: 800;
	line-height: 1.1;
	color: #0f172a;
}

.kpi-unit {
	margin-top: 6px;
	color: #94a3b8;
	font-size: 13px;
}

.energy-flow-card {
	background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
	border: 1px solid #e2e8f0;
	border-radius: 22px;
	padding: 16px;
	box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.energy-flow-svg {
	width: 100%;
	height: auto;
	display: block;
}

.flow-node {
	stroke: #cbd5e1;
	stroke-width: 1.5;
}

.flow-solar {
	fill: #fff7ed;
}

.flow-load {
	fill: #eff6ff;
}

.flow-grid {
	fill: #ecfdf5;
}

.flow-label {
	font-size: 16px;
	font-weight: 700;
	fill: #475569;
}

.flow-value {
	font-size: 24px;
	font-weight: 800;
	fill: #0f172a;
}

.flow-line {
	stroke: url(#flowGradient);
	stroke-width: 8;
	stroke-linecap: round;
}

.flow-dot {
	fill: #22c55e;
	filter: drop-shadow(0 0 8px rgba(34, 197, 94, 0.55));
	animation: pulseFlow 2.2s infinite ease-in-out;
}

.flow-dot-2 {
	animation-delay: 0.35s;
}

.flow-dot-3 {
	animation-delay: 0.7s;
}

.flow-dot-4 {
	animation-delay: 1.05s;
}

@keyframes pulseFlow {
	0% {
		transform: scale(0.8);
		opacity: 0.45;
	}
	50% {
		transform: scale(1.35);
		opacity: 1;
	}
	100% {
		transform: scale(0.8);
		opacity: 0.45;
	}
}

.plants-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 18px;
}

.plant-mini-card {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 20px;
	padding: 18px;
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.plant-mini-head h3 {
	margin: 0 0 4px 0;
}

.plant-mini-head p {
	margin: 0 0 14px 0;
	color: #64748b;
	font-size: 14px;
}

.mini-kpis {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
	margin-bottom: 16px;
}

.mini-kpis div {
	background: #f8fafc;
	border-radius: 14px;
	padding: 12px;
	border: 1px solid #e2e8f0;
}

.mini-kpis span {
	display: block;
	color: #64748b;
	font-size: 12px;
	margin-bottom: 6px;
}

.mini-kpis strong {
	font-size: 16px;
	color: #0f172a;
}

.mini-flow {
	display: grid;
	grid-template-columns: 1fr 40px 1fr 40px 1fr;
	align-items: center;
	gap: 8px;
}

.mini-node {
	text-align: center;
	padding: 10px 6px;
	border-radius: 14px;
	font-size: 13px;
	font-weight: 700;
	border: 1px solid #e2e8f0;
}

.mini-node.solar {
	background: #fff7ed;
}

.mini-node.load {
	background: #eff6ff;
}

.mini-node.grid {
	background: #ecfdf5;
}

.mini-arrow {
	height: 4px;
	border-radius: 999px;
	background: linear-gradient(90deg, #f59e0b 0%, #22c55e 100%);
	position: relative;
	overflow: hidden;
}

.mini-arrow::after {
	content: "";
	position: absolute;
	top: -4px;
	left: -14px;
	width: 12px;
	height: 12px;
	border-radius: 999px;
	background: #22c55e;
	box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
	animation: travelDot 1.8s infinite linear;
}

@keyframes travelDot {
	from {
		left: -14px;
	}
	to {
		left: calc(100% + 14px);
	}
}

.empty-state {
	padding: 28px;
	text-align: center;
	color: #64748b;
	background: #fff;
	border: 1px dashed #cbd5e1;
	border-radius: 18px;
}

.hidden-loader {
	display: none;
}

.topbar {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 14px;
}

.badge {
	display: inline-flex;
	align-items: center;
	padding: 6px 12px;
	border-radius: 999px;
	background: #eef2ff;
	color: #3730a3;
	font-size: 12px;
	font-weight: 700;
}

.section-title {
	font-size: 15px;
	font-weight: 700;
	color: #334155;
	margin: 10px 0 12px 0;
}

.kpi-grid.compact {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
	gap: 12px;
	margin-bottom: 16px;
}

.kpi-card {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 16px;
	padding: 14px;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.kpi-title {
	color: #64748b;
	font-size: 12px;
	margin-bottom: 8px;
}

.kpi-value {
	font-size: 24px;
	font-weight: 800;
	line-height: 1.05;
	color: #0f172a;
}

.kpi-unit {
	margin-top: 4px;
	color: #94a3b8;
	font-size: 12px;
}

.energy-flow-card {
	background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
	border: 1px solid #e2e8f0;
	border-radius: 18px;
	padding: 12px;
	box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
	margin-bottom: 16px;
}

.energy-flow-svg {
	width: 100%;
	height: auto;
	display: block;
}

.flow-node {
	stroke: #cbd5e1;
	stroke-width: 1.5;
}

.flow-solar {
	fill: #fff7ed;
}

.flow-load {
	fill: #eff6ff;
}

.flow-grid {
	fill: #ecfdf5;
}

.flow-label {
	font-size: 16px;
	font-weight: 700;
	fill: #475569;
}

.flow-value {
	font-size: 24px;
	font-weight: 800;
	fill: #0f172a;
}

.flow-line {
	stroke: url(#flowGradient);
	stroke-width: 8;
	stroke-linecap: round;
}

.flow-dot {
	fill: #22c55e;
	filter: drop-shadow(0 0 8px rgba(34, 197, 94, 0.55));
	animation: pulseFlow 2.2s infinite ease-in-out;
}

.flow-dot-2 {
	animation-delay: 0.35s;
}

.flow-dot-3 {
	animation-delay: 0.7s;
}

.flow-dot-4 {
	animation-delay: 1.05s;
}

@keyframes pulseFlow {
	0% {
		transform: scale(0.8);
		opacity: 0.45;
	}
	50% {
		transform: scale(1.35);
		opacity: 1;
	}
	100% {
		transform: scale(0.8);
		opacity: 0.45;
	}
}

.overview-lower-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin-top: 14px;
}

.info-panel {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 16px;
	padding: 14px;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.plants-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 18px;
}

.plant-mini-card {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 18px;
	padding: 16px;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.plant-mini-head h3 {
	margin: 0 0 4px 0;
}

.plant-mini-head p {
	margin: 0 0 14px 0;
	color: #64748b;
	font-size: 14px;
}

.mini-kpis {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
	margin-bottom: 14px;
}

.mini-kpis div {
	background: #f8fafc;
	border-radius: 12px;
	padding: 10px;
	border: 1px solid #e2e8f0;
}

.mini-kpis span {
	display: block;
	color: #64748b;
	font-size: 12px;
	margin-bottom: 6px;
}

.mini-kpis strong {
	font-size: 15px;
	color: #0f172a;
}

.mini-flow {
	display: grid;
	grid-template-columns: 1fr 34px 1fr 34px 1fr;
	align-items: center;
	gap: 8px;
}

.mini-node {
	text-align: center;
	padding: 10px 6px;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 700;
	border: 1px solid #e2e8f0;
}

.mini-node.solar {
	background: #fff7ed;
}

.mini-node.load {
	background: #eff6ff;
}

.mini-node.grid {
	background: #ecfdf5;
}

.mini-arrow {
	height: 4px;
	border-radius: 999px;
	background: linear-gradient(90deg, #f59e0b 0%, #22c55e 100%);
	position: relative;
	overflow: hidden;
}

.mini-arrow::after {
	content: "";
	position: absolute;
	top: -4px;
	left: -14px;
	width: 12px;
	height: 12px;
	border-radius: 999px;
	background: #22c55e;
	box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
	animation: travelDot 1.8s infinite linear;
}

@keyframes travelDot {
	from {
		left: -14px;
	}
	to {
		left: calc(100% + 14px);
	}
}

.table-panel {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 16px;
	padding: 14px;
}

.table-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
}

.chart-box {
	height: 320px;
	margin-bottom: 16px;
}

.data-table {
	width: 100%;
	border-collapse: collapse;
}

.data-table th,
.data-table td {
	padding: 10px;
	border-bottom: 1px solid #e5e7eb;
	text-align: left;
	font-size: 14px;
}

.data-table th {
	background: #f8fafc;
	color: #334155;
}

.empty-state {
	padding: 28px;
	text-align: center;
	color: #64748b;
	background: #fff;
	border: 1px dashed #cbd5e1;
	border-radius: 18px;
}

@media (max-width: 980px) {
	.overview-lower-grid {
		grid-template-columns: 1fr;
	}
}

.energy-flow-card-premium {
	position: relative;
	overflow: hidden;
	padding: 22px;
	background:
		radial-gradient(circle at top left, rgba(245, 158, 11, 0.12), transparent 28%),
		radial-gradient(circle at top right, rgba(16, 185, 129, 0.12), transparent 30%),
		linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.energy-flow-card-premium::before {
	content: "";
	position: absolute;
	inset: -30% auto auto -10%;
	width: 320px;
	height: 320px;
	border-radius: 999px;
	background: rgba(37, 99, 235, 0.06);
	filter: blur(24px);
	pointer-events: none;
}

.energy-flow-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 18px;
	margin-bottom: 14px;
	position: relative;
	z-index: 1;
}

.energy-flow-title {
	font-size: 20px;
	font-weight: 800;
	margin-bottom: 6px;
}

.energy-flow-subtitle {
	margin: 0;
	font-size: 14px;
	color: #64748b;
}

.energy-flow-statuses {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	justify-content: flex-end;
}

.flow-status {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 14px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 700;
	border: 1px solid transparent;
	white-space: nowrap;
}
.flow-status::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 999px;
	background: currentColor;
	box-shadow: 0 0 10px currentColor;
}
.flow-status.solar { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.flow-status.load { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.flow-status.grid.export { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.flow-status.grid.import { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }

.energy-flow-hero {
	display: grid;
	grid-template-columns: 250px 1fr 250px;
	gap: 18px;
	align-items: center;
	position: relative;
	z-index: 1;
}

.flow-side-card {
	position: relative;
	border-radius: 26px;
	padding: 22px;
	min-height: 240px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	border: 1px solid #e5e7eb;
	box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
	backdrop-filter: blur(6px);
}
.flow-side-card.solar {
	background: linear-gradient(180deg, rgba(255,247,237,0.96), rgba(255,255,255,0.96));
}
.flow-side-card.grid {
	background: linear-gradient(180deg, rgba(236,253,245,0.96), rgba(255,255,255,0.96));
}
.flow-side-icon {
	width: 62px;
	height: 62px;
	border-radius: 20px;
	display: grid;
	place-items: center;
	font-size: 28px;
	margin-bottom: 16px;
	box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), 0 10px 24px rgba(15, 23, 42, 0.10);
}
.flow-side-card.solar .flow-side-icon { background: rgba(245, 158, 11, 0.18); }
.flow-side-card.grid .flow-side-icon { background: rgba(16, 185, 129, 0.18); }
.flow-side-label {
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-weight: 800;
	color: #64748b;
	margin-bottom: 10px;
}
.flow-side-value {
	font-size: 38px;
	font-weight: 900;
	line-height: 1;
	color: #0f172a;
	letter-spacing: -0.04em;
}
.flow-side-value span {
	font-size: 16px;
	font-weight: 700;
	color: #64748b;
	margin-left: 6px;
}
.flow-side-foot {
	margin-top: 12px;
	font-size: 14px;
	color: #64748b;
}

.flow-center-wrap {
	position: relative;
	min-height: 320px;
	border-radius: 30px;
	padding: 8px;
	background: linear-gradient(180deg, rgba(255,255,255,0.75), rgba(241,245,249,0.88));
	border: 1px solid rgba(226,232,240,0.9);
	box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 18px 38px rgba(15, 23, 42, 0.08);
}

.energy-flow-svg.premium {
	width: 100%;
	height: 320px;
	display: block;
}

.flow-center-orbit {
	fill: rgba(59, 130, 246, 0.04);
	stroke: rgba(59, 130, 246, 0.10);
	stroke-width: 1.5;
}
.flow-line {
	stroke-width: 11;
	stroke-linecap: round;
	filter: url(#softGlow);
}
.flow-line.solar-line { stroke: url(#solarToLoad); }
.flow-line.grid-line { stroke: url(#gridToLoad); }
.flow-arrow-head.solar-arrow { fill: #2563eb; }
.flow-arrow-head.grid-arrow { fill: #10b981; }
.flow-arrow-head.grid-arrow.reverse { fill: #ef4444; }

.flow-dot {
	filter: url(#softGlow);
	animation: premiumPulse 2.1s infinite ease-in-out;
}
.flow-dot.solar-dot { fill: #f59e0b; }
.flow-dot.grid-dot { fill: #10b981; }
.flow-dot.d2 { animation-delay: 0.35s; }
.flow-dot.d3 { animation-delay: 0.6s; }
.flow-dot.d4 { animation-delay: 0.95s; }

.flow-core {
	fill: rgba(37, 99, 235, 0.12);
	stroke: rgba(37, 99, 235, 0.18);
	stroke-width: 2;
}
.flow-core-inner {
	fill: #ffffff;
	stroke: rgba(148, 163, 184, 0.25);
	stroke-width: 1.5;
}
.flow-core-label {
	font-size: 22px;
	font-weight: 800;
	letter-spacing: 0.16em;
	fill: #64748b;
}
.flow-core-value {
	font-size: 34px;
	font-weight: 900;
	fill: #0f172a;
}
.flow-core-sub {
	font-size: 14px;
	fill: #64748b;
}

.energy-flow-metrics {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px;
	margin-top: 18px;
	position: relative;
	z-index: 1;
}
.flow-metric {
	padding: 16px 18px;
	border-radius: 18px;
	border: 1px solid #e2e8f0;
	background: rgba(255,255,255,0.78);
	backdrop-filter: blur(6px);
}
.flow-metric span {
	display: block;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #64748b;
	margin-bottom: 8px;
}
.flow-metric strong {
	font-size: 22px;
	font-weight: 900;
	color: #0f172a;
}
.flow-metric.solar { box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.14); }
.flow-metric.load { box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.14); }
.flow-metric.grid { box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.14); }

@keyframes premiumPulse {
	0% { transform: scale(0.85); opacity: 0.35; }
	50% { transform: scale(1.25); opacity: 1; }
	100% { transform: scale(0.85); opacity: 0.35; }
}

@media (max-width: 1180px) {
	.energy-flow-head {
		flex-direction: column;
		align-items: stretch;
	}
	.energy-flow-statuses {
		justify-content: flex-start;
	}
	.energy-flow-hero {
		grid-template-columns: 1fr;
	}
	.flow-side-card {
		min-height: auto;
		align-items: center;
		text-align: center;
	}
	.energy-flow-metrics {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 720px) {
	.energy-flow-card-premium {
		padding: 16px;
	}
	.flow-center-wrap {
		padding: 4px;
		min-height: 250px;
	}
	.energy-flow-svg.premium {
		height: 240px;
	}
	.flow-side-value {
		font-size: 30px;
	}
}


.locked-field {
	display: grid;
	gap: 6px;
}

.locked-field label {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--muted);
}

.locked-value {
	padding: 12px 14px;
	border-radius: 12px;
	border: 1px solid rgba(37, 99, 235, 0.14);
	background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
	font-weight: 700;
	color: var(--text);
	box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}


.section-title-split {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.predictions-panel {
	margin-top: 22px;
	padding: 22px;
	border-radius: 24px;
	border: 1px solid #e2e8f0;
	background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
	box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.prediction-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 16px;
}

.prediction-card {
	padding: 18px;
	border-radius: 20px;
	border: 1px solid #dbeafe;
	background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
	box-shadow: inset 0 1px 0 rgba(255,255,255,0.85);
}

.prediction-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 12px;
	margin-bottom: 14px;
}

.prediction-head h3 {
	margin: 0;
	font-size: 18px;
	line-height: 1.2;
}

.prediction-main {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	margin-bottom: 14px;
}

.prediction-main div,
.prediction-stats div {
	display: grid;
	gap: 4px;
}

.prediction-main span,
.prediction-stats span {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: #64748b;
}

.prediction-main strong {
	font-size: 24px;
	font-weight: 900;
	color: #0f172a;
}

.prediction-stats {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px 14px;
	padding-top: 14px;
	border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.prediction-stats strong {
	font-size: 16px;
	font-weight: 800;
	color: #0f172a;
}

@media (max-width: 720px) {
	.predictions-panel {
		padding: 16px;
	}
	.prediction-main,
	.prediction-stats {
		grid-template-columns: 1fr;
	}
}
