/* =================================
   ENERGY FORECAST BUDDY
   Professional dashboard theme
   ================================= */

:root {
    --navy: #17324d;
    --navy-light: #254967;
    --teal: #009b83;
    --teal-light: #e5f5f1;
    --background: #f3f6f9;
    --surface: #ffffff;
    --border: #dce4eb;
    --text: #253547;
    --muted: #68798a;
}

/* Base layout */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background: var(--background);
    color: var(--text);
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

.forecastBody {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 30px 36px 60px;
    text-align: left;
}

/* Main heading */

.forecastBody > h1 {
    color: var(--navy);
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.7px;
    margin: 0 0 6px;
}

.forecastBody > h2:first-of-type {
    color: var(--muted);
    font-size: 13px;
    font-weight: 400;
    margin: 0 0 18px;
}

/* Navigation link */

.forecastBody > h4 {
    margin: 0 0 22px;
    font-size: 14px;
    font-weight: 500;
}

.forecastBody a {
    color: var(--teal);
    text-decoration: none;
}

.forecastBody a:hover {
    color: var(--navy);
    text-decoration: underline;
}

/* Supporting information */

.forecastBody > p {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.8;
    margin: 20px 0 28px;
}

/* Forecast day headings */

.forecastBody > h2:not(:first-of-type) {
    color: var(--navy);
    font-size: 19px;
    font-weight: 650;
    margin: 38px 0 16px;
    padding: 0 0 10px;
    border-bottom: 2px solid var(--border);
}

/* Chart container */

#resizable1,
#resizable2 {
    min-width: 0 !important;
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px;
    margin: 0 0 20px;
    box-shadow: 0 2px 8px rgba(24, 48, 72, 0.04);
}

#chart1,
#chart2 {
    width: 100% !important;
    max-width: 100%;
}

/* jqPlot chart text */

.jqplot-title,
.jqplot-yaxis-tick,
.jqplot-xaxis-tick {
    color: var(--text) !important;
    font-family: "Inter", "Segoe UI", Arial, sans-serif !important;
}

.jqplot-highlighter-tooltip {
    background: var(--navy) !important;
    color: white !important;
    border: 0 !important;
    border-radius: 5px;
    padding: 8px 10px !important;
    box-shadow: 0 3px 10px rgba(0,0,0,.15);
}

.jqplot-point-label {
    background: var(--teal-light) !important;
    color: var(--navy) !important;
    border: 0 !important;
    border-radius: 4px;
    padding: 3px 5px !important;
}

/* Data table */

.energyTableWrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin: 0 0 32px;
    box-shadow: 0 2px 8px rgba(24, 48, 72, 0.04);
}

.energyTable {
    width: 100%;
    min-width: 1050px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12px;
    text-align: right;
    white-space: nowrap;
    border: 0;
}

.energyTable td {
    padding: 9px 11px;
    border-right: 0;
    border-bottom: 1px solid #edf0f3;
}

.energyTable tr:last-child td {
    border-bottom: 0;
}

/* First column */

.energyTable .rowTitle {
    position: sticky;
    left: 0;
    z-index: 2;
    text-align: left;
    font-weight: 600;
    color: var(--navy);
    background: #f0f4f7;
    min-width: 190px;
    border-right: 1px solid var(--border);
}

/* Table header */

.energyTable tr.rowNumber1.firstRow td {
    background: var(--navy);
    color: white;
    font-weight: 600;
    border-bottom: 0;
}

.energyTable tr.rowNumber1.firstRow .rowTitle {
    background: var(--navy);
    color: white;
    z-index: 3;
}

/* Alternating rows */

.energyTable tr.rowNumber0 td {
    background: white;
}

.energyTable tr.rowNumber1 td {
    background: #f7f9fb;
}

.energyTable tr.rowNumber0 .rowTitle {
    background: #f0f4f7;
}

.energyTable tr.rowNumber1 .rowTitle {
    background: #eaf0f5;
}

/* Hover effect */

.energyTable tr:not(.firstRow):hover td {
    background: var(--teal-light);
}

.energyTable tr:not(.firstRow):hover .rowTitle {
    background: #d8eee9;
}


/* ==============================
   1. Page header
   ============================== */

.site-header {
    background: #16324f;
    color: #ffffff;
    padding: 18px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 3px solid #2c8c83;
    border-radius: 10px;
}

.site-header .logo {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.4px;
    color: #ffffff;
}

.site-header .header-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-header .header-nav a {
    color: #dce7ef;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.site-header .header-nav a:hover {
    color: #ffffff;
}

/* ==============================
   2. Title section
   ============================== */

.forecast-title {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 0 22px 0;
}

.forecast-title h1 {
    margin: 0 0 8px;
    color: #16324f;
    font-size: 28px;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -0.6px;
}

.forecast-title p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
}

/* ==============================
   3. Summary boxes
   ============================== */

.summary-cards {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 0 28px 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.summary-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px 22px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    min-width: 0;
}

.summary-card .card-label {
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
}

.summary-card .card-value {
    color: #16324f;
    font-size: 30px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.7px;
}

.summary-card .card-detail {
    color: #64748b;
    font-size: 12px;
    margin-top: 8px;
}

/* Optional accent colours */

.summary-card.average-price {
    border-top: 3px solid #2878b5;
}

.summary-card.daily-peak {
    border-top: 3px solid #e39a36;
}

.summary-card.renewables {
    border-top: 3px solid #2c8c83;
}

/* ==============================
   4. Responsive layout
   ============================== */

@media (max-width: 760px) {
    .site-header {
        padding: 16px 20px;
        flex-wrap: wrap;
    }

    .site-header .header-nav {
        gap: 14px;
        flex-wrap: wrap;
    }

    .forecast-title {
        padding: 24px 20px 18px;
    }

    .forecast-title h1 {
        font-size: 23px;
    }

    .summary-cards {
        grid-template-columns: 1fr;
        padding: 0 20px 24px;
        gap: 12px;
    }

    .summary-card {
        padding: 17px 19px;
    }
}

/* Small screens */

@media (max-width: 768px) {
    .forecastBody {
        padding: 20px 14px 40px;
    }

    .forecastBody > h1 {
        font-size: 24px;
    }

    #resizable1,
    #resizable2 {
        padding: 8px;
        overflow-x: auto;
    }
}
