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

        :root {
            --bg: #f8fafc;
            --surface: #ffffff;
            --surface-2: #f1f5f9;
            --border: rgba(0, 0, 0, 0.08);
            --border-md: rgba(0, 0, 0, 0.14);
            --text: #0f172a;
            --text-2: #475569;
            --text-3: #94a3b8;
            --green: #1D9E75;
            --green-light: #E1F5EE;
            --green-dark: #0F6E56;
            --blue: #378ADD;
            --blue-light: #E6F1FB;
            --blue-dark: #185FA5;
            --amber: #BA7517;
            --amber-light: #FAEEDA;
            --red: #A32D2D;
            --red-light: #FCEBEB;
            --radius: 8px;
            --radius-lg: 12px;
        }

        html.dark {
            --bg: #0f172a;
            --surface: #1e293b;
            --surface-2: #162032;
            --border: rgba(255, 255, 255, 0.08);
            --border-md: rgba(255, 255, 255, 0.14);
            --text: #f1f5f9;
            --text-2: #94a3b8;
            --text-3: #475569;
            --green-light: #04342C;
            --green-dark: #9FE1CB;
            --blue-light: #042C53;
            --blue-dark: #85B7EB;
            --amber-light: #412402;
            --amber: #EF9F27;
            --red-light: #501313;
            --red: #F09595;
        }

        @media (prefers-color-scheme: dark) {
            html:not(.light) {
                --bg: #0f172a;
                --surface: #1e293b;
                --surface-2: #162032;
                --border: rgba(255, 255, 255, 0.08);
                --border-md: rgba(255, 255, 255, 0.14);
                --text: #f1f5f9;
                --text-2: #94a3b8;
                --text-3: #475569;
                --green-light: #04342C;
                --green-dark: #9FE1CB;
                --blue-light: #042C53;
                --blue-dark: #85B7EB;
                --amber-light: #412402;
                --amber: #EF9F27;
                --red-light: #501313;
                --red: #F09595;
            }
        }

        body {
            font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
            background: var(--bg);
            color: var(--text);
            min-height: 100vh;
            padding: 24px 20px;
            transition: background 0.2s, color 0.2s;
        }

        .dash {
            max-width: 1100px;
            margin: 0 auto;
        }

        .top-bar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 12px;
            margin-bottom: 24px;
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .logo-icon {
            width: 38px;
            height: 38px;
            border-radius: var(--radius);
            background: var(--green);
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .logo-icon svg {
            width: 24px;
            height: 24px;
        }

        .logo-name {
            font-size: 17px;
            font-weight: 600;
            color: var(--text);
        }

        .logo-sub {
            font-size: 12px;
            color: var(--text-2);
            margin-top: 1px;
        }

        .top-right {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        select {
            padding: 7px 12px;
            font-size: 13px;
            border-radius: 99px;
            border: 0.5px solid var(--border-md);
            background: var(--surface);
            color: var(--text);
            cursor: pointer;
            outline: none;
            appearance: none;
            padding-right: 28px;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 10px center;
        }

        .icon-btn {
            width: 34px;
            height: 34px;
            border-radius: 99px;
            border: 0.5px solid var(--border-md);
            background: var(--surface);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            color: var(--text-2);
            transition: background 0.15s;
        }

        .icon-btn:hover {
            background: var(--surface-2);
        }

        .icon-btn.active {
            color: var(--green);
            border-color: var(--green);
            background: var(--green-light);
        }

        html.dark .icon-btn.active {
            color: var(--green-dark);
            background: rgba(29, 158, 117, 0.15);
        }

        .icon-btn i {
            font-size: 16px;
        }

        .icon-btn.spinning i {
            animation: spin 0.8s linear infinite;
        }

        @keyframes spin {
            to {
                transform: rotate(360deg);
            }
        }

        .alerts-wrapper {
            position: relative;
        }

        .alerts-popover {
            display: none;
            position: absolute;
            top: 42px;
            right: 0;
            width: 250px;
            background: var(--surface);
            border: 0.5px solid var(--border-md);
            border-radius: var(--radius-lg);
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
            padding: 14px;
            z-index: 50;
            text-align: left;
        }

        .alerts-popover.open {
            display: block;
        }

        .alerts-popover h4 {
            font-size: 13px;
            font-weight: 600;
            color: var(--text);
            margin: 0 0 10px;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .alerts-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            font-size: 12px;
            color: var(--text-2);
            margin-bottom: 10px;
        }

        .alerts-row label {
            display: flex;
            align-items: center;
            gap: 6px;
            cursor: pointer;
        }

        .alerts-row input[type="number"] {
            width: 62px;
            padding: 4px 6px;
            font-size: 12px;
            border: 0.5px solid var(--border-md);
            border-radius: var(--radius);
            background: var(--surface-2);
            color: var(--text);
        }

        .alerts-row input[type="checkbox"] {
            accent-color: var(--green);
        }

        .alerts-note {
            font-size: 10px;
            color: var(--text-3);
            line-height: 1.4;
            margin: 0;
        }

        .summary-row {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 10px;
            margin-bottom: 20px;
        }

        .summary-row.cols-5 {
            grid-template-columns: repeat(5, minmax(0, 1fr));
        }

        @media (max-width: 640px) {

            .summary-row,
            .summary-row.cols-5 {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        .stat {
            background: var(--surface-2);
            border-radius: var(--radius);
            padding: 14px 16px;
        }

        .stat-label {
            font-size: 11px;
            color: var(--text-2);
            margin-bottom: 6px;
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .stat-label i {
            font-size: 13px;
        }

        .stat-value {
            font-size: 22px;
            font-weight: 600;
            color: var(--text);
            line-height: 1;
        }

        .stat-unit {
            font-size: 13px;
            font-weight: 400;
            color: var(--text-2);
        }

        .stat-meta {
            font-size: 11px;
            margin-top: 6px;
            color: var(--text-2);
        }

        .now-banner {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 10px 14px;
            background: var(--green-light);
            border-radius: var(--radius);
            margin-bottom: 20px;
            font-size: 13px;
            color: var(--green-dark);
        }

        .now-dot {
            width: 7px;
            height: 7px;
            border-radius: 50%;
            background: var(--green);
            flex-shrink: 0;
        }

        .now-banner i {
            font-size: 15px;
        }

        .chart-container {
            background: var(--surface);
            border: 0.5px solid var(--border);
            border-radius: var(--radius-lg);
            padding: 20px;
            margin-bottom: 20px;
            position: relative;
            height: 280px;
            width: 100%;
        }

        .tabs {
            display: flex;
            gap: 3px;
            background: var(--surface-2);
            padding: 4px;
            border-radius: var(--radius);
            width: fit-content;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }

        .tab {
            padding: 7px 16px;
            font-size: 13px;
            font-weight: 500;
            border-radius: 6px;
            cursor: pointer;
            color: var(--text-2);
            border: none;
            background: transparent;
            transition: all 0.15s;
        }

        .tab.active {
            background: var(--surface);
            color: var(--text);
            border: 0.5px solid var(--border);
        }

        /* Historic Tab Styles */
        .tab.historic-tab {
            background: var(--amber-light);
            color: var(--amber);
            border: 0.5px solid rgba(239, 159, 39, 0.4);
        }

        html.dark .tab.historic-tab {
            color: #facc15;
        }

        .section-label {
            font-size: 11px;
            font-weight: 600;
            color: var(--text-3);
            letter-spacing: 0.06em;
            text-transform: uppercase;
            margin: 20px 0 10px;
        }

        .slots {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(115px, 1fr));
            gap: 8px;
        }

        .slot {
            background: var(--surface);
            border-radius: var(--radius);
            border: 0.5px solid var(--border);
            padding: 12px;
            cursor: default;
            transition: border-color 0.15s;
        }

        .slot.current {
            border: 1.5px solid var(--green);
        }

        .slot-time {
            font-size: 12px;
            color: var(--text-2);
            margin-bottom: 7px;
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .slot-time .now-dot {
            width: 6px;
            height: 6px;
        }

        .slot-price {
            font-size: 19px;
            font-weight: 600;
            color: var(--text);
            line-height: 1;
        }

        .slot-price span {
            font-size: 12px;
            font-weight: 400;
            color: var(--text-2);
        }

        .slot-bar-track {
            height: 3px;
            background: var(--border);
            border-radius: 2px;
            margin-top: 9px;
            overflow: hidden;
        }

        .slot-bar-fill {
            height: 100%;
            border-radius: 2px;
        }

        .slot-tag {
            font-size: 10px;
            margin-top: 5px;
        }

        .pending-msg {
            text-align: center;
            padding: 48px 20px;
            color: var(--text-2);
            font-size: 14px;
        }

        .pending-msg i {
            font-size: 32px;
            color: var(--text-3);
            display: block;
            margin-bottom: 10px;
        }

        .loading-overlay {
            text-align: center;
            padding: 60px 20px;
            color: var(--text-2);
            font-size: 14px;
        }

        .loading-overlay i {
            font-size: 28px;
            color: var(--text-3);
            display: block;
            margin-bottom: 10px;
            animation: spin 1s linear infinite;
        }

        /* Calendar Wrapper */
        .date-picker-wrapper {
            position: relative;
            display: inline-block;
        }

        #historic-date-picker {
            opacity: 0;
            position: absolute;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            cursor: pointer;
            z-index: 10;
        }

        .footer-container {
            max-width: 1100px;
            margin: 40px auto 0;
            padding: 20px 0;
            border-top: 0.5px solid var(--border);
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 20px;
        }

        .footer-text {
            font-size: 13px;
            color: var(--text-2);
        }

        .links-group {
            display: flex;
            align-items: center;
            gap: 20px;
        }

        #bmc-container {
            display: flex;
            align-items: center;
        }

        .social-link {
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-2);
            transition: opacity 0.2s;
            width: 24px;
            height: 24px;
        }

        .social-link:hover {
            opacity: 0.7;
        }

        .bluesky-icon {
            width: 100%;
            height: 100%;
            fill: var(--text-2);
        }

        .sr-only {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
            border-width: 0;
        }
