Initial commit

This commit is contained in:
2025-11-15 13:38:10 +02:00
commit bfe5d92add
21 changed files with 4627 additions and 0 deletions

462
src/styles.css Normal file
View File

@@ -0,0 +1,462 @@
:root {
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
color: #f5f5f5;
background-color: #05060a;
}
*,
*::before,
*::after {
box-sizing: border-box;
}
body,
html,
#root {
margin: 0;
padding: 0;
height: 100%;
}
/* MAIN SCREEN LAYOUT */
.screen {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
background: radial-gradient(circle at top left, #1b2140, #05060a 55%);
padding: 4px 16px 8px;
gap: 8px;
/* whole screen scrolls */
overflow-y: auto;
-webkit-overflow-scrolling: touch;
}
.top-bar {
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 2px;
/* small tweak */
}
.top-bar-left {
display: flex;
flex-direction: column;
}
.brand {
font-size: 1.4rem;
font-weight: 600;
}
.subtitle {
font-size: 0.85rem;
color: #b0b4c3;
}
.top-bar-right {
display: flex;
align-items: center;
gap: 8px;
font-size: 0.9rem;
}
.status-dot {
width: 10px;
height: 10px;
border-radius: 999px;
background: #34c759;
}
.status-label {
color: #b0b4c3;
}
.center-message {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
font-size: 1rem;
color: #e5e5ea;
}
.center-message.error {
color: #ff453a;
}
/* CONTENT AREA just layout, NO own scrolling now */
.content {
display: grid;
grid-template-rows: auto auto minmax(0, 1fr);
gap: 10px;
/* small extra space above nav */
padding-bottom: 12px;
}
/* PANELS */
.panel {
background: rgba(9, 11, 22, 0.9);
border-radius: 16px;
padding: 12px 14px;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.panel-header {
display: flex;
flex-direction: column;
gap: 2px;
margin-bottom: 8px;
}
.panel-header h2 {
font-size: 1rem;
margin: 0;
}
.panel-subtitle {
font-size: 0.8rem;
color: #a2a6b8;
}
.panel-main {
display: flex;
flex-direction: column;
gap: 10px;
}
/* CURRENT SOH SECTION */
.current-soh-row {
display: flex;
justify-content: space-between;
gap: 12px;
}
.current-soh-value {
flex: 1;
}
.current-soh-value .value {
display: block;
font-size: 2.2rem;
font-weight: 600;
}
.soh-change {
flex: 1;
display: flex;
flex-direction: column;
gap: 4px;
}
.summary-row {
display: flex;
gap: 12px;
}
.summary-item {
flex: 1;
}
.label {
display: block;
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.06em;
color: #a2a6b8;
}
.value {
display: block;
font-size: 1rem;
font-weight: 500;
}
.secondary {
display: block;
font-size: 0.8rem;
color: #8a8ea0;
}
.delta-tag {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 3px 8px;
border-radius: 999px;
font-size: 0.8rem;
font-weight: 500;
background: #2c2f3e;
}
.delta-tag.small {
font-size: 0.75rem;
padding: 2px 6px;
}
.delta-up {
color: #34c759;
}
.delta-down {
color: #ff453a;
}
.delta-flat {
color: #f5f5f5;
}
/* Chart */
.panel-chart {
display: flex;
flex-direction: column;
}
.chart-wrapper {
position: relative;
width: 100%;
height: 80px;
}
.chart-svg {
width: 100%;
height: 100%;
}
.chart-line {
stroke: #4da6ff;
stroke-width: 0.8;
}
.chart-dot {
fill: #ffffff;
}
.chart-placeholder {
font-size: 0.9rem;
color: #a2a6b8;
}
.chart-labels {
display: flex;
justify-content: space-between;
margin-top: 4px;
font-size: 0.7rem;
color: #a2a6b8;
}
/* Session list */
.panel-list {
display: flex;
flex-direction: column;
min-height: 0;
}
/* IMPORTANT: remove its own scrolling, let whole screen handle it */
.session-list {
margin-top: 6px;
display: flex;
flex-direction: column;
gap: 6px;
padding-right: 4px;
}
.session-row {
display: flex;
align-items: center;
justify-content: space-between;
padding: 6px 8px;
border-radius: 10px;
background: rgba(17, 20, 36, 0.9);
}
.session-main {
display: flex;
flex-direction: column;
gap: 2px;
}
.session-title {
font-size: 0.9rem;
font-weight: 500;
}
.session-subtitle {
font-size: 0.8rem;
color: #a2a6b8;
}
.session-metrics {
display: flex;
gap: 10px;
align-items: center;
}
.session-metric {
text-align: right;
}
/* STATUS BAR */
.status-bar {
display: flex;
align-items: center;
justify-content: space-between;
padding: 2px 4px 4px;
font-size: 0.8rem;
color: #cfd2e1;
opacity: 0.9;
}
.status-left,
.status-center,
.status-right {
display: flex;
align-items: center;
gap: 8px;
}
.status-time {
font-weight: 500;
}
.status-temp {
padding: 2px 6px;
border-radius: 999px;
background: rgba(255, 255, 255, 0.06);
}
.status-car {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 2px 8px;
border-radius: 999px;
background: rgba(0, 0, 0, 0.35);
font-size: 0.82rem;
}
.status-car-range {
font-weight: 500;
}
.status-icon {
opacity: 0.9;
}
/* QUICK STRIP */
.quick-strip {
display: flex;
gap: 8px;
margin-bottom: 2px;
}
.quick-btn {
flex: 1;
border: none;
border-radius: 999px;
padding: 4px 8px;
background: rgba(21, 24, 40, 0.9);
color: #e7e9f5;
display: flex;
align-items: center;
gap: 6px;
font-size: 0.8rem;
}
.quick-btn-active {
background: linear-gradient(120deg, #2bcbff, #5e72eb);
}
.quick-icon {
font-size: 1rem;
}
.quick-label {
white-space: nowrap;
}
/* BOTTOM NAV fixed overlay inside the car screen */
.bottom-nav {
position: sticky;
bottom: 0;
display: flex;
justify-content: space-around;
align-items: center;
padding-top: 6px;
padding-bottom: 6px;
margin-top: 4px;
border-top: 1px solid rgba(255, 255, 255, 0.06);
border-radius: 16px;
background: rgba(5, 6, 10, 0.95)
}
.nav-button {
flex: 1;
border: none;
background: transparent;
color: #8c90a4;
display: flex;
flex-direction: column;
align-items: center;
gap: 2px;
font-size: 0.75rem;
padding: 4px 0;
}
.nav-icon {
font-size: 1.1rem;
}
.nav-button-active {
color: #ffffff;
font-weight: 500;
}
.nav-button-active .nav-icon {
transform: translateY(-1px);
}
/* INFOTAINMENT VIEWPORT fixed 21:9 ratio */
#viewport-wrapper {
width: 100vw;
height: 100vh;
background: #000;
display: flex;
align-items: center;
justify-content: center;
}
#viewport {
aspect-ratio: 21 / 9;
width: min(90vw, 1600px);
max-height: 90vh;
border-radius: 20px;
background: #05060a;
overflow: hidden;
display: flex;
box-shadow:
0 0 40px rgba(0, 0, 0, 0.6),
0 0 0 8px #111;
}
#root {
width: 100%;
height: 100%;
}