*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    color: #0b2545;
    background:
        radial-gradient(
            circle at 80% 12%,
            rgba(255, 203, 62, 0.22),
            transparent 24%
        ),
        linear-gradient(
            145deg,
            #eef8f3,
            #ffffff 48%,
            #edf4fa
        );
    font-family: Arial, Helvetica, sans-serif;
}

.live-header {
    border-bottom: 1px solid rgba(11, 37, 69, 0.08);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
}

.live-header__inner {
    width: min(1160px, calc(100% - 32px));
    min-height: 78px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 18px;
}

.live-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    color: #0b2545;
    font-size: 19px;
    font-weight: 800;
    text-decoration: none;
}

.live-brand img {
    width: 54px;
    height: 54px;
    object-fit: contain;
}

.back-link {
    margin-left: auto;
    padding: 10px 15px;
    border: 1px solid #c7d7df;
    border-radius: 9px;
    color: #0b2545;
    font-weight: 700;
    text-decoration: none;
}

.live-main {
    width: min(1160px, calc(100% - 32px));
    margin: 0 auto;
    padding: 70px 0;
}

.live-intro {
    max-width: 830px;
    margin: 0 auto 40px;
    text-align: center;
}

.live-kicker {
    margin: 0 0 12px;
    color: #16824b;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.live-intro h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.05;
    letter-spacing: -1.5px;
}

.live-intro > p:not(.live-kicker) {
    margin: 20px auto 0;
    color: #52687b;
    font-size: 19px;
    line-height: 1.6;
}

.live-status {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 20px;
    padding: 9px 14px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 7px 24px rgba(20, 55, 76, 0.08);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e0a800;
    box-shadow: 0 0 0 5px rgba(224, 168, 0, 0.13);
}

.status-dot.is-online {
    background: #20a95a;
    box-shadow: 0 0 0 5px rgba(32, 169, 90, 0.13);
}

.status-dot.is-error {
    background: #d92d20;
    box-shadow: 0 0 0 5px rgba(217, 45, 32, 0.12);
}

.live-dashboard {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.live-card {
    min-height: 195px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(208, 223, 231, 0.9);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 16px 38px rgba(12, 49, 74, 0.08);
}

.live-card--primary {
    color: #ffffff;
    border-color: transparent;
    background:
        linear-gradient(
            145deg,
            #16824b,
            #0f653a
        );
}

.live-card__icon {
    font-size: 32px;
}

.live-card__label {
    margin-top: 18px;
    color: #52687b;
    font-weight: 700;
}

.live-card--primary .live-card__label,
.live-card--primary small {
    color: rgba(255, 255, 255, 0.82);
}

.live-card__value {
    margin-top: 10px;
    font-size: clamp(31px, 4vw, 46px);
    letter-spacing: -1px;
}

.live-card small {
    margin-top: auto;
    padding-top: 15px;
    color: #708394;
}

.is-optional[hidden] {
    display: none;
}

.energy-flow {
    max-width: 820px;
    margin: 45px auto 0;
    padding: 27px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 14px 35px rgba(12, 49, 74, 0.07);
    text-align: center;
}

.energy-flow__sun,
.energy-flow__home {
    font-size: 45px;
}

.energy-flow__line {
    height: 4px;
    border-radius: 99px;
    background:
        linear-gradient(
            to right,
            #f6be28,
            #28a661
        );
    position: relative;
    overflow: hidden;
}

.energy-flow__line::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            to right,
            transparent,
            rgba(255, 255, 255, 0.85),
            transparent
        );
    transform: translateX(-100%);
    animation: energyMove 2.2s linear infinite;
}

.energy-flow p {
    grid-column: 1 / -1;
    margin: 4px 0 0;
    color: #52687b;
}

@keyframes energyMove {
    to {
        transform: translateX(100%);
    }
}

.update-time {
    margin: 24px 0 0;
    color: #62778a;
    text-align: center;
    font-size: 14px;
}

.live-warning {
    max-width: 700px;
    margin: 18px auto 0;
    padding: 13px 16px;
    border-radius: 10px;
    background: #fff4e5;
    color: #92400e;
    text-align: center;
}

.live-footer {
    padding: 24px 16px;
    color: #dbe7ef;
    background: #081d36;
    text-align: center;
}

.live-footer p {
    margin: 0;
}

.live-footer a {
    display: inline-block;
    margin-top: 10px;
    color: #ffffff;
    font-weight: 800;
}

@media (max-width: 900px) {
    .live-dashboard {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 560px) {
    .live-header__inner,
    .live-main {
        width: calc(100% - 24px);
    }

    .live-brand span {
        font-size: 15px;
    }

    .back-link {
        padding: 8px 10px;
        font-size: 13px;
    }

    .live-main {
        padding: 48px 0;
    }

    .live-dashboard {
        grid-template-columns: 1fr;
    }

    .live-card {
        min-height: 160px;
    }

    .energy-flow {
        padding: 21px 16px;
    }

    .energy-flow__sun,
    .energy-flow__home {
        font-size: 35px;
    }
}


/* TOTAL_PRODUCTION_MWH_START */
.live-card__detail {
    display: block;
    margin-top: 6px;
    color: #708394;
    font-size: 14px;
    font-weight: 700;
}
/* TOTAL_PRODUCTION_MWH_END */

/* LIVE_PRODUCTION_CHART_START */
.production-chart {
    margin-top: 42px;
    padding: 30px;
    border: 1px solid rgba(208, 223, 231, 0.9);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 16px 38px rgba(12, 49, 74, 0.08);
}

.production-chart__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 25px;
}

.production-chart__kicker {
    margin: 0 0 7px;
    color: #16824b;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.production-chart h2 {
    margin: 0;
    font-size: clamp(25px, 4vw, 38px);
}

.production-chart__header p:not(.production-chart__kicker) {
    margin: 9px 0 0;
    color: #62778a;
    line-height: 1.5;
}

.production-chart__peak {
    flex: 0 0 auto;
    padding: 13px 17px;
    border-radius: 12px;
    background: #eef8f3;
    text-align: right;
}

.production-chart__peak span,
.production-chart__peak strong {
    display: block;
}

.production-chart__peak span {
    color: #62778a;
    font-size: 13px;
}

.production-chart__peak strong {
    margin-top: 4px;
    color: #126f41;
    font-size: 23px;
}

.production-chart__canvas {
    position: relative;
    margin-top: 26px;
}

#production-chart {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.chart-grid-line {
    stroke: #dce7ec;
    stroke-width: 2;
    stroke-dasharray: 7 8;
}

.chart-area {
    fill: url(#chart-fill);
}

.chart-line {
    fill: none;
    stroke: #16824b;
    stroke-width: 6;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 5px 5px rgba(22, 130, 75, 0.18));
}

.chart-empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    margin: 0;
    color: #708394;
    text-align: center;
}

.chart-empty[hidden] {
    display: none;
}

.chart-time-labels {
    display: flex;
    justify-content: space-between;
    margin: 4px 34px 0;
    color: #708394;
    font-size: 13px;
    font-weight: 700;
}

@media (max-width: 600px) {
    .production-chart {
        padding: 21px 15px;
    }

    .production-chart__header {
        flex-direction: column;
    }

    .production-chart__peak {
        width: 100%;
        text-align: left;
    }

    .chart-line {
        stroke-width: 8;
    }

    .chart-time-labels {
        margin-left: 5px;
        margin-right: 5px;
        font-size: 11px;
    }
}
/* LIVE_PRODUCTION_CHART_END */
