power-compare/app/static/css/style.css
dlawler489 8d394c4dfa
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 19s
Polish dashboard visuals and add a today's-net-position hero
- Chart colors now resolve from the app's own CSS tokens instead of
  hardcoded hex, so they stay in sync with the rest of the theme.
- Unified all three range pickers (TOU, battery, generation chart) on the
  same <select> pattern, replacing the one-off pill-toggle buttons.
- Added shared .card-header/.card-title/.stat-row/.stat-label/.stat-value
  utility classes so cards share consistent typography instead of
  scattered inline styles.
- Added a hero strip showing today's net cost/revenue up front, with a
  dollar-delta comparison against the recent 7-day daily average, so the
  one number that matters most isn't buried mid-page.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-13 15:38:01 +10:00

286 lines
5.7 KiB
CSS

:root {
color-scheme: light dark;
--bg: #ffffff;
--fg: #1a1a1a;
--muted: #6b7280;
--border: #e5e7eb;
--accent: #2563eb;
--good: #16a34a;
--bad: #dc2626;
--battery: #d97706;
--card-bg: #f9fafb;
}
@media (prefers-color-scheme: dark) {
:root {
--bg: #12141a;
--fg: #e8eaed;
--muted: #9aa1ac;
--border: #2a2d35;
--accent: #6ea8fe;
--good: #4ade80;
--bad: #f87171;
--battery: #fbbf24;
--card-bg: #1a1d24;
}
}
* { box-sizing: border-box; }
body {
margin: 0;
background: var(--bg);
color: var(--fg);
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.topnav {
display: flex;
align-items: center;
gap: 1.5rem;
padding: 1rem 1.5rem;
border-bottom: 1px solid var(--border);
}
.topnav .brand {
font-weight: 700;
margin-right: 1rem;
}
.topnav a {
color: var(--muted);
text-decoration: none;
}
.topnav a:hover {
color: var(--fg);
}
.content {
max-width: 1000px;
margin: 0 auto;
padding: 1.5rem;
}
.card {
background: var(--card-bg);
border: 1px solid var(--border);
border-radius: 10px;
padding: 1.25rem;
margin-bottom: 1.25rem;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.card-header {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 0.5rem;
margin-bottom: 0.5rem;
}
.card-title {
margin: 0;
font-size: 1.05rem;
font-weight: 600;
}
.hero-card {
background: linear-gradient(135deg, var(--card-bg), var(--bg));
border: 1px solid var(--border);
border-radius: 10px;
padding: 1.5rem;
margin-bottom: 1.25rem;
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 1rem;
}
.hero-label {
color: var(--muted);
font-size: 0.9rem;
text-transform: uppercase;
letter-spacing: 0.04em;
}
.hero-value {
font-size: 2.4rem;
font-weight: 700;
line-height: 1.1;
margin-top: 0.15rem;
}
.hero-trend {
display: inline-flex;
align-items: center;
gap: 0.35rem;
font-size: 0.9rem;
margin-top: 0.5rem;
padding: 0.25rem 0.6rem;
border-radius: 999px;
background: var(--border);
color: var(--muted);
}
.hero-trend.good { background: color-mix(in srgb, var(--good) 18%, transparent); color: var(--good); }
.hero-trend.bad { background: color-mix(in srgb, var(--bad) 18%, transparent); color: var(--bad); }
table {
width: 100%;
border-collapse: collapse;
}
th, td {
text-align: left;
padding: 0.5rem 0.75rem;
border-bottom: 1px solid var(--border);
}
th {
color: var(--muted);
font-weight: 600;
font-size: 0.85rem;
text-transform: uppercase;
}
.savings-positive { color: var(--good); font-weight: 600; }
.savings-negative { color: var(--bad); }
.stat-row { display: flex; gap: 2rem; flex-wrap: wrap; margin-top: 0.75rem; }
.stat-label { color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; }
.stat-value { font-size: 1.3rem; font-weight: 700; margin-top: 0.2rem; }
.badge {
display: inline-block;
padding: 0.1rem 0.5rem;
border-radius: 4px;
font-size: 0.75rem;
background: var(--border);
color: var(--muted);
}
.badge.current { background: var(--accent); color: white; }
.badge.not-modelable { background: var(--bad); color: white; }
form.settings-form label {
display: block;
margin-top: 0.75rem;
font-size: 0.9rem;
color: var(--muted);
}
form.settings-form input, form.settings-form select {
width: 100%;
padding: 0.5rem;
margin-top: 0.25rem;
background: var(--bg);
color: var(--fg);
border: 1px solid var(--border);
border-radius: 4px;
}
button {
margin-top: 1rem;
padding: 0.6rem 1.2rem;
background: var(--accent);
color: white;
border: none;
border-radius: 6px;
cursor: pointer;
font-size: 0.95rem;
}
.tou-period {
border: 1px solid var(--border);
border-radius: 6px;
padding: 0.75rem;
margin-top: 0.75rem;
}
.p-days-group {
margin-top: 0.75rem;
font-size: 0.9rem;
color: var(--muted);
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.6rem;
}
form.settings-form label.p-day-label {
display: inline-flex;
align-items: center;
gap: 0.25rem;
margin-top: 0;
width: auto;
color: var(--fg);
font-size: 0.85rem;
}
form.settings-form label.p-day-label input {
width: auto;
margin-top: 0;
}
.muted { color: var(--muted); font-size: 0.85rem; }
.chart-container { position: relative; height: 320px; margin-top: 0.75rem; }
.notes { font-size: 0.8rem; color: var(--muted); margin-top: 0.25rem; }
.live-label { fill: var(--muted); font-size: 13px; }
.live-value { fill: var(--fg); font-size: 15px; font-weight: 600; }
.freshness-badge {
display: inline-flex;
align-items: center;
gap: 0.4rem;
font-size: 0.85rem;
color: var(--muted);
}
.freshness-dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: var(--good);
flex-shrink: 0;
}
.freshness-badge.stale { color: var(--bad); }
.freshness-badge.stale .freshness-dot { background: var(--bad); }
.tou-bar-row {
display: flex;
align-items: center;
gap: 0.75rem;
margin-top: 0.5rem;
font-size: 0.9rem;
}
.tou-bar-label { width: 110px; flex-shrink: 0; color: var(--muted); }
.tou-bar-track {
flex: 1;
height: 10px;
background: var(--border);
border-radius: 5px;
overflow: hidden;
}
.tou-bar-fill { height: 100%; border-radius: 5px; }
.tou-bar-fill-cost { background: var(--accent); }
.tou-bar-fill-credit { background: var(--good); }
.tou-bar-amount { width: 130px; flex-shrink: 0; text-align: right; }
select, input[type="date"] {
background: var(--card-bg);
color: var(--fg);
border: 1px solid var(--border);
border-radius: 4px;
padding: 0.35rem 0.5rem;
font-size: 0.9rem;
}
.flow-line {
animation: flow-dash 1s linear infinite;
}
@keyframes flow-dash {
to { stroke-dashoffset: -12; }
}