:root {
    --bg-primary: #121212;
    --bg-secondary: #1E1E1E;
    --text-primary: #E0E0E0;
    --text-secondary: #BDBDBD;
    --accent-blue: #448AFF;
    --accent-warm: #FFAB40;
    --accent-positive: #00E676;
    --accent-negative: #FF5252;
    --border-color: #333333;
    --font-family: 'Inter', sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-family); background-color: var(--bg-primary); color: var(--text-primary); overscroll-behavior: none; }
.app-container { display: flex; height: 100vh; }
.sidebar { width: 60px; background-color: var(--bg-primary); border-right: 1px solid var(--border-color); display: flex; flex-direction: column; align-items: center; padding-top: 20px; z-index: 10; }
.logo { font-size: 24px; font-weight: 700; color: var(--accent-blue); margin-bottom: 40px; }
.nav-links { list-style: none; }
.nav-link { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-bottom: 20px; border-radius: 50%; color: var(--text-secondary); transition: background-color 0.2s, color 0.2s; }
.nav-link:hover { background-color: var(--bg-secondary); color: var(--text-primary); }
.nav-link.active { background-color: var(--accent-blue); color: white; }
.nav-link svg { width: 24px; height: 24px; }
.main-content { flex-grow: 1; overflow-y: auto; padding: 24px; position: relative; }
.page { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.card { background-color: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; }
.large-tile { grid-column: span 2; grid-row: span 2; }
.medium-tile { grid-column: span 1; grid-row: span 2; }
.stat-tile { grid-column: span 1; grid-row: span 1; }
.short-tile { grid-row: span 1; }
.filter-bar-tile { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-end; }
.card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
h2, h3 { font-size: 1.1rem; font-weight: 600; color: var(--text-primary); }
h3 { margin-bottom: 16px; }
.card-header span { font-size: 0.9rem; color: var(--text-secondary); }
.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: auto 0; width: 100%; }
.quad-grid { grid-template-rows: 1fr 1fr; }
.summary-grid div { text-align: center; }
.summary-grid .label { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 4px; text-transform: uppercase; }
.summary-grid .value { font-size: 1.5rem; font-weight: 600; color: var(--text-primary); }
.summary-grid .unit { font-size: 0.9rem; font-weight: 400; color: var(--text-secondary); }
.large-stat { margin: auto; text-align: center; font-size: 2.5rem; font-weight: 700; }
.large-stat .unit { font-size: 1rem; color: var(--text-secondary); }
#today-power-mood { font-size: 4rem; margin: auto; }
.minmax-stat { margin: auto; text-align: center; }
.minmax-stat .values { font-size: 1.5rem; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.minmax-stat .values span:first-child { color: var(--accent-positive); }
.minmax-stat .values span:last-child { color: var(--accent-negative); }
.dual-stat { display: flex; justify-content: space-around; align-items: center; text-align: center; height: 100%; }
.dual-stat > div { line-height: 1.4; }
.dual-stat .value { font-size: 2rem; font-weight: 700; color: var(--accent-warm); display: block; }
#today-cheapest-scale { padding: 20px 0; margin: auto 0; }
.scale-track { position: relative; height: 8px; border-radius: 4px; margin-bottom: 8px; }
.scale-labels, .scale-prices { display: flex; justify-content: space-between; }
.scale-labels { font-size: 0.8rem; color: var(--text-secondary); }
.scale-prices { font-size: 1rem; font-weight: 600; color: var(--text-primary); }
.calculator-inputs { display: flex; gap: 20px; align-items: flex-end; margin-bottom: 20px; flex-wrap: wrap; }
.calculator-inputs > div { display: flex; flex-direction: column; }
label { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 6px; }
input, select { background-color: var(--bg-primary); border: 1px solid var(--border-color); color: var(--text-primary); border-radius: 8px; padding: 8px 12px; font-family: var(--font-family); }
button { background-color: var(--accent-blue); color: white; border: none; border-radius: 8px; padding: 8px 16px; font-family: var(--font-family); font-weight: 600; cursor: pointer; transition: background-color 0.2s; }
button:hover { background-color: #2166D4; }
.export-buttons { display: flex; gap: 10px; margin: auto; }
.export-buttons button { flex-grow: 1; }
.strategy-list { margin: auto 0; font-size: 0.9rem; line-height: 1.6; }
.strategy-list span { font-weight: 600; }
.hidden { display: none !important; }
#loading-overlay { position: absolute; inset: 0; background-color: rgba(18, 18, 18, 0.8); display: flex; align-items: center; justify-content: center; z-index: 100; }
.spinner { border: 4px solid var(--border-color); border-top: 4px solid var(--accent-blue); border-radius: 50%; width: 50px; height: 50px; animation: spin 1s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@media (max-width: 900px) { .large-tile, .medium-tile { grid-column: span 1; grid-row: span 1; } }
@media (max-width: 600px) { .app-container { flex-direction: column; } .sidebar { width: 100%; height: 60px; flex-direction: row; border-right: none; border-bottom: 1px solid var(--border-color); padding: 0 20px; } .logo { margin: 0; } .nav-links { display: flex; flex-grow: 1; justify-content: flex-end; } .nav-link { margin-bottom: 0; margin-left: 10px; } }