body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(86, 204, 242, 0.18), transparent 32%),
        linear-gradient(180deg, #f7fbff 0%, #eef4f8 100%);
    color: #152033;
}

.dashboard-hero {
    padding: 2rem;
    border-radius: 1.75rem;
    background: linear-gradient(135deg, #ffffff 0%, #f1f7fb 100%);
    border: 1px solid rgba(21, 32, 51, 0.08);
    box-shadow: 0 20px 50px rgba(20, 40, 80, 0.08);
}

.dashboard-kicker {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(47, 128, 237, 0.12);
    color: #1f5eb8;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.dashboard-title {
    font-size: clamp(2rem, 5vw, 3.8rem);
    line-height: 1;
    letter-spacing: -0.04em;
    margin-bottom: 1rem;
}

.dashboard-subtitle {
    max-width: 42rem;
    font-size: 1.05rem;
    color: #526077;
}

.dashboard-panel {
    min-height: 100%;
    padding: 1.75rem;
    border-radius: 1.5rem;
    background: #152033;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.dashboard-panel-label {
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
}

.dashboard-panel-count {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
    margin-top: 0.5rem;
}

.app-tile {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    overflow: hidden;
    border-radius: 1.75rem;
    background: #d8e8f7;
    box-shadow: 0 18px 40px rgba(21, 32, 51, 0.12);
    transform: translateY(0);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.app-tile:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 54px rgba(21, 32, 51, 0.16);
}

.app-tile-media {
    min-height: 220px;
    background: linear-gradient(135deg, #2f80ed 0%, #56ccf2 100%);
}

.app-tile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.app-tile-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.4rem;
    color: #ffffff;
    background: #152033;
}

.app-tile-title {
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
    font-weight: 700;
}

.app-tile-description {
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.8);
}

.app-tile-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.app-tile-cta::after {
    content: '\2192';
}

.weather-card-theme .app-tile-body {
    background: linear-gradient(180deg, #16304d 0%, #0d1b2d 100%);
}

.stations-card-theme .app-tile-media {
    background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
}

.stations-card-theme .app-tile-body {
    background: linear-gradient(180deg, #115e59 0%, #0f3f3d 100%);
}

.weather-page-header {
    padding: 2rem;
    border-radius: 1.75rem;
    background: linear-gradient(135deg, #16304d 0%, #2f80ed 100%);
    color: #ffffff;
    box-shadow: 0 20px 45px rgba(21, 32, 51, 0.14);
}

.stations-page-header {
    padding: 2rem;
    border-radius: 1.75rem;
    background: linear-gradient(135deg, #115e59 0%, #14b8a6 100%);
    color: #ffffff;
    box-shadow: 0 20px 45px rgba(15, 118, 110, 0.22);
}

.weather-page-header .text-muted {
    color: rgba(255, 255, 255, 0.78) !important;
}

.stations-page-header .text-muted {
    color: rgba(255, 255, 255, 0.82) !important;
}

.weather-back-btn {
    border-color: rgba(255, 255, 255, 0.55);
    color: #ffffff;
}

.weather-back-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.85);
    color: #ffffff;
}

.stations-back-btn {
    background: rgba(17, 94, 89, 0.45);
    border-color: rgba(255, 255, 255, 0.65);
    color: #ffffff;
}

.stations-back-btn:hover {
    background: rgba(17, 94, 89, 0.72);
    border-color: rgba(255, 255, 255, 0.9);
    color: #ffffff;
}

.station-teal-btn {
    background: #0f766e;
    border-color: #0f766e;
    color: #ffffff;
}

.station-teal-btn:hover {
    background: #115e59;
    border-color: #115e59;
    color: #ffffff;
}

.weather-filters {
    border: 1px solid rgba(21, 32, 51, 0.08);
    background: linear-gradient(180deg, #ffffff 0%, #f6f9fc 100%);
}

.weather-status {
    border: 1px solid rgba(21, 32, 51, 0.1);
}

.kpi-card {
    min-height: 120px;
    padding: 1rem 1.1rem;
    border-radius: 1rem;
    border: 1px solid rgba(21, 32, 51, 0.08);
    background: #ffffff;
    box-shadow: 0 10px 25px rgba(21, 32, 51, 0.06);
}

.kpi-label {
    margin-bottom: 0.35rem;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #526077;
}

.kpi-value {
    margin-bottom: 0;
    font-size: 1.6rem;
    font-weight: 800;
    color: #152033;
    line-height: 1.1;
}

.kpi-anomaly {
    margin-top: 0.45rem;
    margin-bottom: 0;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.kpi-anomaly.anomaly-up {
    color: #0b7a3b;
}

.kpi-anomaly.anomaly-down {
    color: #b42318;
}

.kpi-anomaly.anomaly-good {
    color: #0b7a3b;
}

.kpi-anomaly.anomaly-bad {
    color: #b42318;
}

.kpi-anomaly.anomaly-neutral {
    color: #526077;
}

.weather-metric-select {
    min-width: 220px;
}

.weather-chart-shell {
    position: relative;
    height: 320px;
    width: 100%;
}

.weather-chart-shell-trend {
    height: 420px;
}

#weather-main-chart {
    height: 100% !important;
    width: 100% !important;
}

@media (max-width: 767.98px) {
    .dashboard-hero,
    .weather-page-header,
    .stations-page-header {
        padding: 1.5rem;
    }

    .app-tile-media {
        min-height: 180px;
    }

    .weather-metric-select {
        min-width: 180px;
    }

    .weather-chart-shell {
        height: 260px;
    }

    .weather-chart-shell-trend {
        height: 300px;
    }
}

/* ─── Climate app theme (purple) ───────────────────────────────────────────── */

.climate-card-theme .app-tile-media {
    background: linear-gradient(135deg, #3b0764 0%, #7c3aed 100%);
}

.climate-card-theme .app-tile-body {
    background: linear-gradient(180deg, #2e1065 0%, #1c0a3d 100%);
}

.climate-page-header {
    padding: 2rem;
    border-radius: 1.75rem;
    background: linear-gradient(135deg, #2e1065 0%, #7c3aed 100%);
    color: #ffffff;
    box-shadow: 0 20px 45px rgba(60, 7, 100, 0.22);
}

.climate-page-header .text-muted {
    color: rgba(255, 255, 255, 0.78) !important;
}

.climate-back-btn {
    border-color: rgba(255, 255, 255, 0.55);
    color: #ffffff;
}

.climate-back-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.85);
    color: #ffffff;
}

.worker-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    width: fit-content;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.worker-status::before {
    content: '';
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 999px;
    background: currentColor;
}

.worker-status.worker-status-loading {
    color: rgba(255, 255, 255, 0.85);
    border-color: rgba(255, 255, 255, 0.45);
}

.worker-status.worker-status-healthy {
    color: #b9ffd7;
    border-color: rgba(185, 255, 215, 0.7);
    background: rgba(16, 185, 129, 0.18);
}

.worker-status.worker-status-unhealthy {
    color: #ffd0d0;
    border-color: rgba(255, 208, 208, 0.7);
    background: rgba(220, 38, 38, 0.2);
}

.climate-status-badge {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.climate-status-badge.badge-complete {
    background: rgba(16, 185, 129, 0.15);
    color: #065f46;
}

.climate-status-badge.badge-pending,
.climate-status-badge.badge-running {
    background: rgba(124, 58, 237, 0.15);
    color: #5b21b6;
}

.climate-status-badge.badge-failed {
    background: rgba(220, 38, 38, 0.12);
    color: #991b1b;
}

.climate-status-badge.badge-none {
    background: rgba(82, 96, 119, 0.12);
    color: #526077;
}

.climate-summary-placeholder {
    padding: 2rem;
    border-radius: 1.25rem;
    border: 2px dashed rgba(124, 58, 237, 0.25);
    background: rgba(124, 58, 237, 0.04);
    color: #526077;
    text-align: center;
}

.climate-chart-shell {
    position: relative;
    height: 320px;
    width: 100%;
}

#climate-comparison-chart,
#climate-trend-chart {
    height: 100% !important;
    width: 100% !important;
}

@media (max-width: 767.98px) {
    .climate-page-header {
        padding: 1.5rem;
    }

    .climate-chart-shell {
        height: 260px;
    }
}
