:root {
    --bg-dark: #0b1120;
    --bg-card: #111827;
    --bg-card-hover: #1e293b;
    --border-color: #1f2937;
    --border-highlight: #334155;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent-amber: #f59e0b;
    --accent-emerald: #10b981;
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-rose: #f43f5e;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    min-height: 100vh;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #0f172a;
}
::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

.glass-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.78), rgba(15, 23, 42, 0.92));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.solar-gradient-border {
    border: 1px solid rgba(245, 158, 11, 0.35);
    box-shadow: 0 0 25px -5px rgba(245, 158, 11, 0.15);
}

.ev-gradient-border {
    border: 1px solid rgba(16, 185, 129, 0.35);
    box-shadow: 0 0 25px -5px rgba(16, 185, 129, 0.15);
}

/* Gauge Ring */
.gauge-ring {
    width: 148px;
    height: 148px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: conic-gradient(var(--gauge-color, #10b981) var(--gauge-pct, 75%), #1e293b 0);
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.4);
}

.gauge-inner {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #0f172a;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Hourly Bar Chart */
.hourly-chart-grid {
    display: grid;
    grid-template-columns: repeat(15, minmax(46px, 1fr));
    gap: 6px;
    align-items: end;
    height: 220px;
    padding-top: 24px;
}

.hour-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
    cursor: pointer;
    position: relative;
    padding: 4px 2px;
    border-radius: 8px;
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.hour-col:hover,
.hour-col.selected-hour {
    background-color: rgba(255, 255, 255, 0.07);
}

.hour-col.current-hour-marker {
    outline: 1px dashed rgba(245, 158, 11, 0.7);
    background-color: rgba(245, 158, 11, 0.08);
}

.hour-bar-wrap {
    width: 100%;
    height: 145px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    position: relative;
}

.hour-bar {
    width: 72%;
    border-radius: 6px 6px 2px 2px;
    transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 4px;
    position: relative;
}

/* Basload reference line inside hourly chart */
.baseload-line {
    position: absolute;
    left: 0;
    right: 0;
    border-top: 1.5px dashed rgba(244, 63, 94, 0.65);
    pointer-events: none;
    z-index: 5;
}

/* Timeline Gantt for Sequential Schedule */
.timeline-track {
    position: relative;
    height: 54px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
}

.timeline-block {
    position: absolute;
    top: 6px;
    bottom: 6px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    transition: all 0.25s ease;
}

/* Leaflet map container */
#satellite-map {
    width: 100%;
    height: 430px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 10;
}

.tab-btn {
    padding: 0.55rem 1.1rem;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #94a3b8;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.35);
}

@media (max-width: 900px) {
    .hourly-chart-grid {
        overflow-x: auto;
        padding-bottom: 8px;
    }
}
