/* ================================================================
   iStar - Diagrama energético vivo v7 Material line
   Estética técnica, fina, monocroma y modular
   ================================================================ */

.istar-energy-flow-v3 {
    position: relative;
    overflow: hidden;
    padding: clamp(72px, 9vw, 118px) 0;
    background:
        radial-gradient(circle at 18% 18%, rgba(44,106,159,.18), transparent 34%),
        radial-gradient(circle at 78% 32%, rgba(241,168,54,.10), transparent 30%),
        linear-gradient(180deg, #071727 0%, #0b2238 52%, #071727 100%);
    color: #fff;
}

.istar-energy-flow-v3::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .18;
    background-image:
        linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 78%, transparent 100%);
}

.istar-energy-flow-v3 .energy-flow-shell {
    position: relative;
    z-index: 1;
}

.istar-energy-flow-v3 .energy-flow-intro {
    max-width: 860px;
    margin: 0 auto clamp(34px, 5vw, 58px);
    text-align: center;
}

.istar-energy-flow-v3 .energy-flow-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    color: #F1A836;
    font-size: .84rem;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.istar-energy-flow-v3 .energy-flow-kicker::before,
.istar-energy-flow-v3 .energy-flow-kicker::after {
    content: "";
    width: 26px;
    height: 1px;
    background: rgba(241,168,54,.65);
}

.istar-energy-flow-v3 .energy-flow-intro h2 {
    margin: 0 0 18px;
    color: #fff;
    font-family: var(--font-heading, inherit);
    font-size: clamp(2.1rem, 4vw, 4.25rem);
    line-height: .98;
    letter-spacing: -.02em;
}

.istar-energy-flow-v3 .energy-flow-intro p {
    max-width: 720px;
    margin: 0 auto;
    color: rgba(255,255,255,.74);
    font-size: clamp(1.02rem, 1.2vw, 1.18rem);
    line-height: 1.65;
}

.istar-energy-flow-v3 .energy-flow-card {
    position: relative;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 34px;
    background:
        linear-gradient(135deg, rgba(255,255,255,.09), rgba(255,255,255,.035)),
        rgba(5, 17, 30, .74);
    box-shadow:
        0 28px 85px rgba(0,0,0,.34),
        inset 0 1px 0 rgba(255,255,255,.08);
    backdrop-filter: blur(14px);
    overflow: hidden;
}

.istar-energy-flow-v3 .energy-flow-card::before {
    content: "";
    position: absolute;
    left: 28px;
    right: 28px;
    top: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(241,168,54,.70), transparent);
}

.istar-energy-flow-v3 .energy-flow-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(330px, .72fr);
    gap: 0;
    min-height: 640px;
}

.istar-energy-flow-v3 .energy-flow-stage {
    position: relative;
    min-width: 0;
    padding: clamp(22px, 3.2vw, 42px);
    border-right: 1px solid rgba(255,255,255,.08);
    background:
        linear-gradient(180deg, rgba(18,64,114,.18), transparent 45%),
        radial-gradient(circle at 50% 25%, rgba(117,170,219,.08), transparent 48%);
}

.istar-energy-flow-v3 .energy-stage-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    padding: 12px 14px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 18px;
    background: rgba(255,255,255,.045);
    color: rgba(255,255,255,.80);
}

.istar-energy-flow-v3 .energy-stage-topbar span {
    color: #F1A836;
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.istar-energy-flow-v3 .energy-stage-topbar small {
    color: rgba(255,255,255,.70);
    font-size: .88rem;
}

.istar-energy-flow-v3 .energy-flow-svg {
    display: block;
    width: 100%;
    height: auto;
    min-height: 430px;
}

.istar-energy-flow-v3 .energy-grid-bg path {
    fill: none;
    stroke: rgba(255,255,255,.055);
    stroke-width: 1;
    stroke-dasharray: 2 12;
    stroke-linecap: round;
}

.istar-energy-flow-v3 .energy-line {
    fill: none;
    stroke: rgba(255,255,255,.10);
    stroke-width: 1.05;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: .42;
    transition: opacity .22s ease, stroke .22s ease, stroke-width .22s ease, filter .22s ease;
}

.istar-energy-flow-v3 .energy-line.active {
    opacity: 1;
    stroke: rgba(241,168,54,.92);
    stroke-width: 1.28;
    marker-end: url(#energyArrowSoft);
    stroke-dasharray: 4 14;
    animation: energyFlowV3Move 1.05s linear infinite;
    filter: drop-shadow(0 0 3px rgba(241,168,54,.18));
}

.istar-energy-flow-v3 .energy-line.active.blue {
    stroke: rgba(117,170,219,.95);
    marker-end: url(#energyArrowBlue);
    filter: drop-shadow(0 0 3px rgba(117,170,219,.16));
}

.istar-energy-flow-v3 .energy-line.active.green {
    stroke: rgba(108,210,150,.95);
    marker-end: url(#energyArrowGreen);
    filter: drop-shadow(0 0 3px rgba(108,210,150,.15));
}

.istar-energy-flow-v3 .energy-line.warning {
    opacity: .78;
    stroke: rgba(255,120,120,.70);
    stroke-width: 1.08;
    marker-end: url(#energyArrowWarning);
    stroke-dasharray: 2 10;
    animation: energyFlowV3Move 1.6s linear infinite;
}

@keyframes energyFlowV3Move {
    from { stroke-dashoffset: 19; }
    to { stroke-dashoffset: 0; }
}

.istar-energy-flow-v3 .energy-node {
    transition: opacity .24s ease, transform .24s ease;
}

.istar-energy-flow-v3 .energy-node-card {
    fill: rgba(255,255,255,.045);
    stroke: rgba(255,255,255,.10);
    stroke-width: .9;
    transition: fill .22s ease, stroke .22s ease, filter .22s ease;
}

.istar-energy-flow-v3 .energy-node-icon {
    color: rgba(255,255,255,.62);
    transition: color .22s ease, opacity .22s ease;
}

.istar-energy-flow-v3 .energy-soft-svg {
    display: block;
    overflow: visible;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.05;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.istar-energy-flow-v3 .energy-soft-svg * {
    vector-effect: non-scaling-stroke;
}

.istar-energy-flow-v3 .energy-node text {
    fill: rgba(255,255,255,.78);
    font-family: var(--font-primary, system-ui, sans-serif);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: .01em;
    transition: fill .22s ease, opacity .22s ease;
}

.istar-energy-flow-v3 .energy-node.active .energy-node-card {
    fill: rgba(241,168,54,.085);
    stroke: rgba(241,168,54,.66);
    filter: drop-shadow(0 10px 24px rgba(241,168,54,.08));
}

.istar-energy-flow-v3 .energy-node.active .energy-node-icon {
    color: #F1A836;
}

.istar-energy-flow-v3 .energy-node.active text {
    fill: #fff;
}

.istar-energy-flow-v3 .energy-node.offline {
    opacity: .35;
}

.istar-energy-flow-v3 .energy-node.offline .energy-node-card {
    fill: rgba(255,255,255,.025);
    stroke: rgba(255,255,255,.075);
}

.istar-energy-flow-v3 .energy-flow-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 22px;
    padding: clamp(28px, 3.2vw, 42px);
    background:
        linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.015)),
        rgba(2, 12, 22, .36);
}

.istar-energy-flow-v3 .energy-flow-panel-head {
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.istar-energy-flow-v3 .energy-flow-panel-head span {
    display: block;
    margin-bottom: 8px;
    color: rgba(255,255,255,.48);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.istar-energy-flow-v3 .energy-flow-panel-head strong {
    display: block;
    color: #fff;
    font-size: clamp(1.55rem, 2.1vw, 2.2rem);
    line-height: 1.05;
    font-family: var(--font-heading, inherit);
    font-weight: 400;
}

.istar-energy-flow-v3 .energy-flow-controls {
    display: grid;
    gap: 18px;
}

.istar-energy-flow-v3 .energy-control-title {
    display: block;
    margin: 0 0 9px;
    color: rgba(255,255,255,.54);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.istar-energy-flow-v3 .energy-control-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 5px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 17px;
    background: rgba(255,255,255,.035);
}

.istar-energy-flow-v3 .energy-btn {
    appearance: none;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: rgba(255,255,255,.70);
    min-height: 42px;
    padding: 10px 9px;
    font: inherit;
    font-size: .92rem;
    font-weight: 750;
    line-height: 1;
    cursor: pointer;
    transition: background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.istar-energy-flow-v3 .energy-btn:hover {
    color: #fff;
    background: rgba(255,255,255,.06);
}

.istar-energy-flow-v3 .energy-btn.active {
    color: #081422;
    background: #F1A836;
    box-shadow: 0 8px 20px rgba(241,168,54,.18);
}

.istar-energy-flow-v3 .energy-flow-explainer {
    position: relative;
    padding: 20px;
    border: 1px solid rgba(255,255,255,.08);
    border-left: 2px solid rgba(241,168,54,.75);
    border-radius: 20px;
    background: rgba(255,255,255,.04);
}

.istar-energy-flow-v3 .energy-flow-explainer strong {
    display: block;
    margin-bottom: 9px;
    color: #fff;
    font-size: 1rem;
    line-height: 1.38;
}

.istar-energy-flow-v3 .energy-flow-explainer span {
    display: block;
    color: rgba(255,255,255,.66);
    font-size: .96rem;
    line-height: 1.58;
}

.istar-energy-flow-v3 .energy-flow-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.istar-energy-flow-v3 .energy-chip {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 999px;
    background: rgba(255,255,255,.035);
    color: rgba(255,255,255,.50);
    font-size: .86rem;
    font-weight: 700;
    transition: color .2s ease, background .2s ease, border-color .2s ease;
}

.istar-energy-flow-v3 .energy-chip.active {
    color: #fff;
    border-color: rgba(241,168,54,.38);
    background: rgba(241,168,54,.11);
}

.istar-energy-flow-v3 .energy-flow-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 2px;
}

.istar-energy-flow-v3 .energy-flow-actions .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
}

@media (max-width: 1120px) {
    .istar-energy-flow-v3 .energy-flow-grid {
        grid-template-columns: 1fr;
    }

    .istar-energy-flow-v3 .energy-flow-stage {
        border-right: 0;
        border-bottom: 1px solid rgba(255,255,255,.08);
    }

    .istar-energy-flow-v3 .energy-flow-panel {
        justify-content: flex-start;
    }
}

@media (max-width: 720px) {
    .istar-energy-flow-v3 {
        padding: 64px 0;
    }

    .istar-energy-flow-v3 .energy-flow-card {
        border-radius: 26px;
    }

    .istar-energy-flow-v3 .energy-flow-stage,
    .istar-energy-flow-v3 .energy-flow-panel {
        padding: 20px;
    }

    .istar-energy-flow-v3 .energy-stage-topbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .istar-energy-flow-v3 .energy-flow-svg {
        min-height: 330px;
    }

    .istar-energy-flow-v3 .energy-control-group {
        grid-template-columns: 1fr;
    }

    .istar-energy-flow-v3 .energy-btn {
        min-height: 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .istar-energy-flow-v3 .energy-line.active,
    .istar-energy-flow-v3 .energy-line.warning {
        animation: none;
    }
}


/* V5 soft icons: nodos más delicados y menos duros */
.istar-energy-flow-linepack .energy-node-card {
    fill: rgba(255,255,255,.035);
    stroke: rgba(255,255,255,.105);
}

.istar-energy-flow-linepack .energy-node.active .energy-node-card {
    fill: rgba(241,168,54,.065);
    stroke: rgba(241,168,54,.50);
    filter: drop-shadow(0 10px 22px rgba(241,168,54,.055));
}

.istar-energy-flow-linepack .energy-soft-svg {
    display: block;
    overflow: visible;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.32;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.istar-energy-flow-linepack .energy-soft-svg * {
    vector-effect: non-scaling-stroke;
}

.istar-energy-flow-linepack .energy-soft-svg path[fill="currentColor"],
.istar-energy-flow-linepack .energy-soft-svg circle[fill="currentColor"],
.istar-energy-flow-linepack .energy-soft-svg rect[fill="currentColor"] {
    stroke: none;
}

.istar-energy-flow-linepack .energy-node-icon {
    color: rgba(255,255,255,.68);
}

.istar-energy-flow-linepack .energy-node.active .energy-node-icon {
    color: #F1A836;
}

/* Ajustes específicos para iconos Flaticon dentro del diagrama */
.istar-energy-flow-linepack .energy-node-icon .istar-icon,
.istar-energy-flow-linepack .energy-node-icon .energy-soft-svg {
    overflow: visible;
}

.istar-energy-flow-linepack .energy-node-card {
    fill: rgba(255,255,255,.065);
    stroke: rgba(255,255,255,.16);
}

.istar-energy-flow-linepack .energy-node.is-active .energy-node-card {
    fill: rgba(255,255,255,.095);
    stroke: rgba(241,168,54,.46);
}


/* V7 Material Symbols line pack: íconos monocromos y más sobrios */
.istar-energy-flow-linepack .energy-node-icon {
    color: rgba(255,255,255,.68);
}

.istar-energy-flow-linepack .energy-node.active .energy-node-icon {
    color: #F1A836;
}

.energy-material-symbol {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 52px;
    line-height: 1;
    color: currentColor;
    font-variation-settings: 'FILL' 0, 'wght' 200, 'GRAD' 0, 'opsz' 48;
    -webkit-font-smoothing: antialiased;
    font-feature-settings: 'liga';
}

.istar-energy-flow-linepack .energy-node-card {
    fill: rgba(255,255,255,.038);
    stroke: rgba(255,255,255,.13);
}

.istar-energy-flow-linepack .energy-node.active .energy-node-card {
    fill: rgba(241,168,54,.050);
    stroke: rgba(241,168,54,.45);
    filter: drop-shadow(0 10px 22px rgba(241,168,54,.05));
}

.istar-energy-flow-linepack .energy-line.active {
    stroke-width: 1.18;
}

.istar-energy-flow-linepack .energy-node-icon foreignObject {
    color: currentColor;
    overflow: visible;
}

/* ================================================================
   v8 Compact layout: nodos 100x100 y panel más compacto
   ================================================================ */
.istar-energy-flow-v3 {
    padding: clamp(56px, 7vw, 90px) 0;
}

.istar-energy-flow-v3 .energy-flow-intro {
    margin-bottom: clamp(24px, 3.6vw, 38px);
}

.istar-energy-flow-v3 .energy-flow-card {
    border-radius: 28px;
}

.istar-energy-flow-v3 .energy-flow-grid {
    grid-template-columns: minmax(0, 1.48fr) minmax(300px, .66fr);
    min-height: 500px;
}

.istar-energy-flow-v3 .energy-flow-stage {
    padding: clamp(18px, 2.4vw, 30px);
}

.istar-energy-flow-v3 .energy-stage-topbar {
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 16px;
}

.istar-energy-flow-v3 .energy-flow-svg {
    min-height: 330px;
    max-height: 390px;
}

.istar-energy-flow-v3 .energy-node-card {
    stroke-width: .85;
}

.istar-energy-flow-v3 .energy-node text {
    font-size: 15px;
    font-weight: 800;
}

.istar-energy-flow-v3 .energy-flow-panel {
    justify-content: flex-start;
    gap: 14px;
    padding: clamp(22px, 2.4vw, 30px);
}

.istar-energy-flow-v3 .energy-flow-panel-head {
    padding-bottom: 12px;
}

.istar-energy-flow-v3 .energy-flow-panel-head span {
    margin-bottom: 5px;
    font-size: .72rem;
}

.istar-energy-flow-v3 .energy-flow-panel-head strong {
    font-size: clamp(1.35rem, 1.75vw, 1.8rem);
}

.istar-energy-flow-v3 .energy-flow-controls {
    gap: 12px;
}

.istar-energy-flow-v3 .energy-control-title {
    margin-bottom: 7px;
    font-size: .72rem;
}

.istar-energy-flow-v3 .energy-control-group {
    gap: 5px;
    padding: 4px;
    border-radius: 15px;
}

.istar-energy-flow-v3 .energy-btn {
    min-height: 36px;
    padding: 8px 7px;
    border-radius: 11px;
    font-size: .86rem;
}

.istar-energy-flow-v3 .energy-flow-explainer {
    padding: 14px 15px;
    border-radius: 16px;
}

.istar-energy-flow-v3 .energy-flow-explainer strong {
    margin-bottom: 6px;
    font-size: .94rem;
    line-height: 1.32;
}

.istar-energy-flow-v3 .energy-flow-explainer span {
    font-size: .89rem;
    line-height: 1.48;
}

.istar-energy-flow-v3 .energy-flow-summary {
    gap: 6px;
}

.istar-energy-flow-v3 .energy-chip {
    min-height: 30px;
    padding: 6px 10px;
    font-size: .80rem;
}

.istar-energy-flow-v3 .energy-flow-actions {
    gap: 8px;
}

.energy-material-symbol {
    font-size: 50px;
    font-variation-settings: 'FILL' 0, 'wght' 330, 'GRAD' 0, 'opsz' 48;
}

.istar-energy-flow-linepack .energy-line.active {
    stroke-width: 1.14;
}

@media (max-width: 1120px) {
    .istar-energy-flow-v3 .energy-flow-grid {
        min-height: 0;
    }

    .istar-energy-flow-v3 .energy-flow-panel {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }

    .istar-energy-flow-v3 .energy-flow-panel-head,
    .istar-energy-flow-v3 .energy-flow-explainer,
    .istar-energy-flow-v3 .energy-flow-summary,
    .istar-energy-flow-v3 .energy-flow-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 720px) {
    .istar-energy-flow-v3 .energy-flow-stage,
    .istar-energy-flow-v3 .energy-flow-panel {
        padding: 16px;
    }

    .istar-energy-flow-v3 .energy-flow-svg {
        min-height: 280px;
    }

    .istar-energy-flow-v3 .energy-flow-panel {
        display: flex;
        gap: 12px;
    }
}

/* ================================================================
   iStar - Simulador interactivo | Skin VRM v1.1
   Solo ajustes visuales: conserva HTML, SVG, coordenadas, lógica JS,
   distribución y comportamiento del simulador compacto v8.
   ================================================================ */

.istar-energy-flow-v3 {
    background:
        radial-gradient(circle at 18% 10%, rgba(117,170,219,.11), transparent 34%),
        radial-gradient(circle at 76% 26%, rgba(241,168,54,.065), transparent 30%),
        linear-gradient(180deg, #071522 0%, #0b1c2a 46%, #071522 100%);
}

.istar-energy-flow-v3::before {
    opacity: .12;
    background-image:
        linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
    background-size: 48px 48px;
}

.istar-energy-flow-v3 .energy-flow-kicker {
    color: #F1A836;
}

.istar-energy-flow-v3 .energy-flow-intro h2 {
    letter-spacing: .02em;
}

.istar-energy-flow-v3 .energy-flow-intro p {
    color: rgba(225,234,242,.72);
}

.istar-energy-flow-v3 .energy-flow-card {
    border-radius: 22px;
    border: 1px solid rgba(117,170,219,.16);
    background:
        linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.015)),
        #252b2d;
    box-shadow:
        0 20px 62px rgba(0,0,0,.32),
        inset 0 1px 0 rgba(255,255,255,.055);
}

.istar-energy-flow-v3 .energy-flow-card::before {
    left: 18px;
    right: 18px;
    background: linear-gradient(90deg, transparent, rgba(117,170,219,.32), rgba(241,168,54,.26), transparent);
}

.istar-energy-flow-v3 .energy-flow-stage {
    border-right: 1px solid rgba(117,170,219,.11);
    background:
        linear-gradient(180deg, rgba(255,255,255,.026), rgba(255,255,255,.010)),
        radial-gradient(circle at 50% 30%, rgba(117,170,219,.055), transparent 48%);
}

.istar-energy-flow-v3 .energy-stage-topbar {
    border: 1px solid rgba(117,170,219,.13);
    border-radius: 13px;
    background: rgba(10, 25, 37, .50);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.istar-energy-flow-v3 .energy-stage-topbar small,
.istar-energy-flow-v3 .energy-stage-topbar span {
    color: rgba(238,244,249,.82);
}

.istar-energy-flow-v3 .energy-stage-topbar span {
    color: #F1A836;
}

.istar-energy-flow-v3 .energy-grid-bg path {
    stroke: rgba(255,255,255,.045);
    stroke-width: .72;
    stroke-dasharray: 1 13;
}

.istar-energy-flow-v3 .energy-line {
    stroke: rgba(205,220,232,.16);
    stroke-width: .72;
    opacity: .56;
}

.istar-energy-flow-v3 .energy-line.active {
    stroke: rgba(241,168,54,.92);
    stroke-width: .92;
    stroke-dasharray: 5 8;
    animation: energyFlowV3Move 1.08s linear infinite;
    filter: drop-shadow(0 0 2px rgba(241,168,54,.20));
}

.istar-energy-flow-v3 .energy-line.active.blue {
    stroke: rgba(178,220,248,.94);
    filter: drop-shadow(0 0 2px rgba(178,220,248,.18));
}

.istar-energy-flow-v3 .energy-line.active.green {
    stroke: rgba(125,220,150,.92);
    filter: drop-shadow(0 0 2px rgba(125,220,150,.16));
}

.istar-energy-flow-v3 .energy-line.warning {
    stroke-width: .88;
    stroke-dasharray: 3 8;
}

@keyframes energyFlowV3Move {
    from { stroke-dashoffset: 13; }
    to { stroke-dashoffset: 0; }
}

.istar-energy-flow-v3 .energy-node-card,
.istar-energy-flow-linepack .energy-node-card {
    fill: rgba(55,60,61,.86);
    stroke: rgba(117,170,219,.22);
    stroke-width: .75;
    filter: none;
}

.istar-energy-flow-v3 .energy-node-icon,
.istar-energy-flow-linepack .energy-node-icon {
    color: rgba(232,240,246,.70);
}

.istar-energy-flow-v3 .energy-node.active .energy-node-card,
.istar-energy-flow-linepack .energy-node.active .energy-node-card {
    fill: rgba(67,76,80,.92);
    stroke: rgba(117,170,219,.62);
    filter: drop-shadow(0 0 10px rgba(117,170,219,.08));
}

.istar-energy-flow-v3 .energy-node.active .energy-node-icon,
.istar-energy-flow-linepack .energy-node.active .energy-node-icon {
    color: #F1A836;
}

.istar-energy-flow-v3 .energy-node text {
    fill: rgba(241,246,250,.80);
    font-weight: 800;
}

.istar-energy-flow-v3 .energy-node.active text {
    fill: #fff;
}

.istar-energy-flow-v3 .energy-node.offline {
    opacity: .32;
}

.istar-energy-flow-v3 .energy-flow-panel {
    background:
        linear-gradient(180deg, rgba(255,255,255,.028), rgba(255,255,255,.010)),
        rgba(21, 35, 47, .52);
}

.istar-energy-flow-v3 .energy-flow-panel-head {
    border-bottom-color: rgba(117,170,219,.13);
}

.istar-energy-flow-v3 .energy-flow-panel-head span,
.istar-energy-flow-v3 .energy-control-title {
    color: rgba(210,225,235,.56);
}

.istar-energy-flow-v3 .energy-control-group {
    border-color: rgba(117,170,219,.13);
    background: rgba(3, 14, 24, .30);
}

.istar-energy-flow-v3 .energy-btn {
    color: rgba(232,240,246,.72);
}

.istar-energy-flow-v3 .energy-btn:hover {
    background: rgba(117,170,219,.10);
}

.istar-energy-flow-v3 .energy-btn.active {
    color: #081422;
    background: #F1A836;
    box-shadow: 0 8px 20px rgba(241,168,54,.16);
}

.istar-energy-flow-v3 .energy-flow-explainer {
    border-color: rgba(117,170,219,.14);
    border-left-color: rgba(241,168,54,.82);
    background: rgba(5, 17, 28, .34);
}

.istar-energy-flow-v3 .energy-flow-explainer span {
    color: rgba(228,238,246,.66);
}

.istar-energy-flow-v3 .energy-chip {
    border-color: rgba(117,170,219,.14);
    background: rgba(5, 17, 28, .32);
    color: rgba(232,240,246,.55);
}

.istar-energy-flow-v3 .energy-chip.active {
    color: #fff;
    border-color: rgba(241,168,54,.40);
    background: rgba(241,168,54,.10);
}

.energy-material-symbol {
    font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 48;
}


/* Skin VRM v1.2: radios visuales alineados a iStar Live */
.istar-energy-flow-v3 .energy-flow-card {
    border-radius: 6px;
}

.istar-energy-flow-v3 .energy-stage-topbar,
.istar-energy-flow-v3 .energy-flow-explainer,
.istar-energy-flow-v3 .energy-control-group,
.istar-energy-flow-v3 .energy-btn {
    border-radius: 6px;
}

.istar-energy-flow-v3 .energy-node-card,
.istar-energy-flow-linepack .energy-node-card {
    rx: 6px;
}

/* =========================================================
   iStar Flow · controles compactos definitivos
   Pegar al final de energy-flow.css
   ========================================================= */

.istar-energy-flow-v3 .energy-control-grid > button.energy-btn,
.istar-energy-flow-v3 .energy-control-grid > button.energy-btn.active,
.istar-energy-flow-v3 .energy-control-grid > button.energy-btn[aria-pressed="true"],
.istar-energy-flow-v3 button.energy-btn[data-energy-time],
.istar-energy-flow-v3 button.energy-btn[data-energy-system] {
    height: 35px !important;
    min-height: 35px !important;
    max-height: 35px !important;

    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 5px !important;
    padding-right: 5px !important;
    padding-block-start: 0 !important;
    padding-block-end: 0 !important;
    padding-inline-start: 5px !important;
    padding-inline-end: 5px !important;

    line-height: 1 !important;
    box-sizing: border-box !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.istar-energy-flow-v3 .energy-control-grid {
    display: flex !important;
    align-items: center !important;
    height: 35px !important;
    min-height: 35px !important;
    max-height: 35px !important;
}
