587 lines
14 KiB
CSS
587 lines
14 KiB
CSS
:root {
|
|
--bg: #f4f3ef;
|
|
--surface: #ffffff;
|
|
--surface2: #f9f8f5;
|
|
--border: rgba(0,0,0,0.09);
|
|
--border2: rgba(0,0,0,0.16);
|
|
--text1: #1c1b18;
|
|
--text2: #5a5955;
|
|
--text3: #9a9892;
|
|
--accent: #1D9E75;
|
|
--accent-light: #E1F5EE;
|
|
--accent-dark: #0a5c43;
|
|
--danger: #D85A30;
|
|
--warn: #EF9F27;
|
|
--nav-h: 64px;
|
|
--header-h: 52px;
|
|
--font: system-ui, -apple-system, 'Segoe UI', sans-serif;
|
|
}
|
|
@media (prefers-color-scheme: dark) {
|
|
:root {
|
|
--bg: #181816; --surface: #222220; --surface2: #1e1e1c;
|
|
--border: rgba(255,255,255,0.08); --border2: rgba(255,255,255,0.14);
|
|
--text1: #eeecea; --text2: #aaa9a4; --text3: #686762;
|
|
--accent-light: #04342C; --accent-dark: #5DCAA5;
|
|
}
|
|
}
|
|
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
|
html, body, #root { height: 100%; }
|
|
body { font-family: var(--font); background: var(--bg); color: var(--text1); -webkit-text-size-adjust: 100%; }
|
|
|
|
.app-shell { display: flex; flex-direction: column; height: 100%; max-width: 600px; margin: 0 auto; }
|
|
.app-header {
|
|
height: var(--header-h); display: flex; align-items: center; padding: 0 16px;
|
|
background: var(--surface); border-bottom: 1px solid var(--border);
|
|
position: sticky; top: 0; z-index: 10;
|
|
}
|
|
.app-logo { font-size: 18px; font-weight: 700; color: var(--accent); letter-spacing: -0.02em; }
|
|
.app-main { flex: 1; overflow-y: auto; padding: 16px 16px calc(var(--nav-h) + 16px); }
|
|
|
|
.bottom-nav {
|
|
position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
|
|
width: 100%; max-width: 600px;
|
|
height: var(--nav-h); display: flex; align-items: stretch;
|
|
background: var(--surface); border-top: 1px solid var(--border);
|
|
z-index: 20;
|
|
}
|
|
.nav-item {
|
|
flex: 1; display: flex; flex-direction: column; align-items: center;
|
|
justify-content: center; gap: 3px; color: var(--text3);
|
|
text-decoration: none; font-size: 10px; font-weight: 500;
|
|
transition: color 0.15s; padding-bottom: env(safe-area-inset-bottom, 0);
|
|
}
|
|
.nav-item.active { color: var(--accent); }
|
|
.nav-item svg { flex-shrink: 0; }
|
|
|
|
/* Cards */
|
|
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
|
|
.card + .card { margin-top: 12px; }
|
|
.card-title { font-size: 13px; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 10px; }
|
|
|
|
/* Stats grid */
|
|
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
|
|
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
|
|
.stat-val { font-size: 26px; font-weight: 700; color: var(--text1); line-height: 1; }
|
|
.stat-label { font-size: 12px; color: var(--text3); margin-top: 3px; }
|
|
.stat-delta { font-size: 12px; font-weight: 600; margin-top: 4px; }
|
|
.delta-pos { color: var(--accent); }
|
|
.delta-neg { color: var(--danger); }
|
|
|
|
/* Form */
|
|
.form-section { margin-bottom: 20px; }
|
|
.form-section-title {
|
|
font-size: 13px; font-weight: 600; color: var(--text3);
|
|
text-transform: uppercase; letter-spacing: 0.05em;
|
|
margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border);
|
|
}
|
|
.form-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
|
|
.form-row:last-child { border-bottom: none; }
|
|
.form-label { flex: 1; font-size: 14px; color: var(--text1); }
|
|
.form-sub { font-size: 11px; color: var(--text3); display: block; margin-top: 1px; }
|
|
.form-input {
|
|
width: 90px; padding: 7px 10px; text-align: right;
|
|
font-family: var(--font); font-size: 15px; font-weight: 500; color: var(--text1);
|
|
background: var(--surface2); border: 1.5px solid var(--border2);
|
|
border-radius: 8px; transition: border-color 0.15s;
|
|
}
|
|
.form-input:focus { outline: none; border-color: var(--accent); }
|
|
.form-unit { font-size: 12px; color: var(--text3); width: 24px; }
|
|
.form-select {
|
|
font-family: var(--font); font-size: 13px; color: var(--text1);
|
|
background: var(--surface2); border: 1.5px solid var(--border2);
|
|
border-radius: 8px; padding: 7px 10px; width: 100%;
|
|
}
|
|
|
|
/* Buttons */
|
|
.btn {
|
|
display: inline-flex; align-items: center; gap: 6px;
|
|
font-family: var(--font); font-size: 14px; font-weight: 600;
|
|
padding: 10px 18px; border-radius: 10px; border: none; cursor: pointer;
|
|
transition: opacity 0.15s, transform 0.1s;
|
|
}
|
|
.btn:active { transform: scale(0.97); }
|
|
.btn-primary { background: var(--accent); color: white; }
|
|
.btn-secondary { background: var(--surface2); border: 1px solid var(--border2); color: var(--text2); }
|
|
.btn-danger { background: #FCEBEB; color: var(--danger); }
|
|
.btn-full { width: 100%; justify-content: center; }
|
|
.btn:disabled { opacity: 0.5; pointer-events: none; }
|
|
|
|
/* Badge */
|
|
.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 4px; }
|
|
|
|
/* AI content */
|
|
.ai-content { font-size: 14px; line-height: 1.7; color: var(--text2); white-space: pre-wrap; }
|
|
.ai-content strong { color: var(--text1); font-weight: 600; }
|
|
|
|
/* Photo grid */
|
|
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
|
|
.photo-thumb { aspect-ratio: 1; border-radius: 8px; object-fit: cover; width: 100%; cursor: pointer; }
|
|
|
|
/* Tabs */
|
|
.tabs { display: flex; gap: 4px; background: var(--surface2); border-radius: 10px; padding: 3px; margin-bottom: 16px; }
|
|
.tab { flex: 1; text-align: center; padding: 7px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--text3); cursor: pointer; border: none; background: transparent; font-family: var(--font); }
|
|
.tab.active { background: var(--surface); color: var(--text1); box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
|
|
|
|
/* Section */
|
|
.section-gap { margin-bottom: 16px; }
|
|
.page-title { font-size: 20px; font-weight: 700; margin-bottom: 16px; }
|
|
|
|
/* Verlauf: Mobile Tabs horizontale Leiste, Desktop vertikal links (P4 / RESPONSIVE_UI §5.2) */
|
|
.history-page__title {
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.history-page__layout {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 16px;
|
|
}
|
|
|
|
.history-tabs {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.history-tabs__scroller {
|
|
display: flex;
|
|
flex-direction: row;
|
|
gap: 6px;
|
|
overflow-x: auto;
|
|
padding-bottom: 6px;
|
|
-ms-overflow-style: none;
|
|
scrollbar-width: none;
|
|
}
|
|
|
|
.history-tabs__scroller::-webkit-scrollbar {
|
|
display: none;
|
|
}
|
|
|
|
.history-tab-btn {
|
|
white-space: nowrap;
|
|
flex-shrink: 0;
|
|
padding: 7px 14px;
|
|
border-radius: 20px;
|
|
border: 1.5px solid var(--border2);
|
|
background: var(--surface);
|
|
color: var(--text2);
|
|
font-family: var(--font);
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.history-tab-btn:hover {
|
|
border-color: var(--accent);
|
|
color: var(--text1);
|
|
}
|
|
|
|
.history-tab-btn.history-tab-btn--active {
|
|
border-color: var(--accent);
|
|
background: var(--accent);
|
|
color: white;
|
|
}
|
|
|
|
.history-tab-btn.history-tab-btn--active:hover {
|
|
color: white;
|
|
}
|
|
|
|
@media (min-width: 1024px) {
|
|
.history-page__layout {
|
|
flex-direction: row;
|
|
align-items: flex-start;
|
|
gap: 24px;
|
|
}
|
|
|
|
.history-tabs {
|
|
flex: 0 0 260px;
|
|
max-width: 280px;
|
|
position: sticky;
|
|
top: 16px;
|
|
align-self: flex-start;
|
|
}
|
|
|
|
.history-tabs__scroller {
|
|
flex-direction: column;
|
|
overflow-x: visible;
|
|
overflow-y: auto;
|
|
max-height: calc(100vh - 120px);
|
|
padding-bottom: 0;
|
|
gap: 8px;
|
|
}
|
|
|
|
.history-tab-btn {
|
|
display: flex;
|
|
align-items: center;
|
|
width: 100%;
|
|
text-align: left;
|
|
border-radius: 10px;
|
|
white-space: normal;
|
|
flex-shrink: 0;
|
|
padding: 10px 14px;
|
|
}
|
|
|
|
.history-content {
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
}
|
|
|
|
.muted { color: var(--text3); font-size: 13px; }
|
|
.empty-state { text-align: center; padding: 48px 16px; color: var(--text3); }
|
|
.empty-state h3 { font-size: 16px; color: var(--text2); margin-bottom: 6px; }
|
|
.spinner { width: 20px; height: 20px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; display: inline-block; }
|
|
@keyframes spin { to { transform: rotate(360deg); } }
|
|
@keyframes slideDown {
|
|
from { transform: translate(-50%, -20px); opacity: 0; }
|
|
to { transform: translate(-50%, 0); opacity: 1; }
|
|
}
|
|
|
|
/* Additional vars */
|
|
:root {
|
|
--warn-bg: #FAEEDA;
|
|
--warn-text: #7a4b08;
|
|
}
|
|
@media (prefers-color-scheme: dark) {
|
|
:root {
|
|
--warn-bg: #3a2103;
|
|
--warn-text: #FAC775;
|
|
}
|
|
}
|
|
|
|
/* 6-item nav - smaller labels */
|
|
.nav-item span { font-size: 11px; }
|
|
|
|
/* 7-item nav scrollable */
|
|
.bottom-nav { overflow-x: auto; }
|
|
.nav-item span { font-size: 11px; }
|
|
.nav-item { min-width: 60px; }
|
|
|
|
/* Header with profile avatar */
|
|
.app-header { display:flex; align-items:center; justify-content:space-between; }
|
|
.app-header a { display:flex; }
|
|
|
|
/* ── Responsive shell: Desktop sidebar (≥1024px) — spec RESPONSIVE_UI.md ───── */
|
|
.app-shell__column {
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex: 1;
|
|
min-width: 0;
|
|
min-height: 0;
|
|
}
|
|
|
|
.desktop-sidebar {
|
|
display: none;
|
|
flex-direction: column;
|
|
width: 220px;
|
|
height: 100vh;
|
|
position: fixed;
|
|
left: 0;
|
|
top: 0;
|
|
z-index: 30;
|
|
background: var(--surface);
|
|
border-right: 1px solid var(--border);
|
|
padding: 16px 0 16px;
|
|
}
|
|
|
|
.desktop-sidebar__brand {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
padding: 0 16px 20px;
|
|
border-bottom: 1px solid var(--border);
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.desktop-sidebar__logo {
|
|
width: 40px;
|
|
height: 40px;
|
|
border-radius: 50%;
|
|
border: 3px solid var(--accent);
|
|
flex-shrink: 0;
|
|
opacity: 0.85;
|
|
}
|
|
|
|
.desktop-sidebar__title {
|
|
font-size: 15px;
|
|
font-weight: 700;
|
|
color: var(--accent);
|
|
letter-spacing: -0.02em;
|
|
line-height: 1.2;
|
|
}
|
|
|
|
.desktop-sidebar__nav {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 2px;
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
padding: 0 0 12px;
|
|
}
|
|
|
|
.desktop-sidebar__link {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
padding: 10px 16px 10px 13px;
|
|
text-decoration: none;
|
|
color: var(--text2);
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
border-left: 3px solid transparent;
|
|
border-radius: 0 8px 8px 0;
|
|
transition: background 0.15s, color 0.15s;
|
|
}
|
|
|
|
.desktop-sidebar__link:hover {
|
|
background: var(--surface2);
|
|
color: var(--text1);
|
|
}
|
|
|
|
.desktop-sidebar__link.desktop-sidebar__link--active {
|
|
background: var(--accent-light);
|
|
color: var(--accent);
|
|
border-left-color: var(--accent);
|
|
}
|
|
|
|
.desktop-sidebar__footer {
|
|
border-top: 1px solid var(--border);
|
|
padding: 16px 12px 0;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.desktop-sidebar__user {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
flex: 1;
|
|
min-width: 0;
|
|
text-decoration: none;
|
|
color: inherit;
|
|
}
|
|
|
|
.desktop-sidebar__user-text {
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-width: 0;
|
|
}
|
|
|
|
.desktop-sidebar__user-name {
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
color: var(--text1);
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.desktop-sidebar__user-tier {
|
|
font-size: 11px;
|
|
color: var(--text3);
|
|
text-transform: lowercase;
|
|
}
|
|
|
|
.desktop-sidebar__logout {
|
|
flex-shrink: 0;
|
|
background: none;
|
|
border: none;
|
|
padding: 8px;
|
|
cursor: pointer;
|
|
color: var(--text3);
|
|
border-radius: 8px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.desktop-sidebar__logout:hover {
|
|
color: var(--danger);
|
|
background: rgba(216, 90, 48, 0.08);
|
|
}
|
|
|
|
@media (max-width: 1023px) {
|
|
.app-shell {
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 100%;
|
|
max-width: 600px;
|
|
margin: 0 auto;
|
|
}
|
|
}
|
|
|
|
@media (min-width: 1024px) {
|
|
.app-shell {
|
|
display: block;
|
|
max-width: none;
|
|
margin: 0;
|
|
width: 100%;
|
|
min-height: 100%;
|
|
}
|
|
|
|
.desktop-sidebar {
|
|
display: flex;
|
|
}
|
|
|
|
.app-shell__column {
|
|
margin-left: 220px;
|
|
min-height: 100vh;
|
|
}
|
|
|
|
.app-header--mobile {
|
|
display: none !important;
|
|
}
|
|
|
|
.bottom-nav {
|
|
display: none !important;
|
|
}
|
|
|
|
.app-main {
|
|
padding: 24px 32px 32px;
|
|
padding-bottom: max(32px, env(safe-area-inset-bottom, 0px));
|
|
max-width: 1200px;
|
|
margin-left: auto;
|
|
margin-right: auto;
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
/* Dashboard (P3): Begrüßung + Kennzahlen-Zeile */
|
|
.dashboard-greeting {
|
|
display: flex;
|
|
align-items: baseline;
|
|
justify-content: space-between;
|
|
gap: 16px;
|
|
flex-wrap: wrap;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.dashboard-greeting__meta {
|
|
margin-top: 0 !important;
|
|
text-align: right;
|
|
}
|
|
}
|
|
|
|
/* ── Dashboard layout (Mobile baseline + Desktop im Block oben teilweise) ─ */
|
|
|
|
.dashboard-page {
|
|
width: 100%;
|
|
}
|
|
|
|
.dashboard-greeting {
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
/*
|
|
* Dashboard-Raster (KPI, Nebeneinander-Kacheln): 2 / 4 Spalten.
|
|
* StatCard, DashboardTile: span via --tile-sm / --tile-lg (JS clamp).
|
|
*/
|
|
.dashboard-stat-grid,
|
|
.dashboard-tile-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
gap: 8px;
|
|
}
|
|
|
|
.dashboard-stat-grid--mobile-4col,
|
|
.dashboard-tile-grid--mobile-4col {
|
|
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
}
|
|
|
|
.dashboard-stat-card {
|
|
background: var(--surface);
|
|
border-radius: 12px;
|
|
padding: 12px 10px;
|
|
border: 1px solid var(--border);
|
|
transition: border-color 0.15s;
|
|
}
|
|
|
|
.dashboard-stat-card,
|
|
.dashboard-tile {
|
|
min-width: 0;
|
|
box-sizing: border-box;
|
|
grid-column: span var(--tile-sm, 1);
|
|
}
|
|
|
|
@media (min-width: 1024px) {
|
|
.dashboard-stat-card,
|
|
.dashboard-tile {
|
|
grid-column: span var(--tile-lg, 1);
|
|
}
|
|
}
|
|
|
|
/* ── Dashboard-Abschnitte (Überschrift + Trennlinie) ─ */
|
|
.dashboard-section {
|
|
margin-bottom: 22px;
|
|
}
|
|
|
|
.dashboard-section:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.dashboard-section__header {
|
|
display: flex;
|
|
align-items: flex-end;
|
|
justify-content: space-between;
|
|
gap: 12px;
|
|
flex-wrap: wrap;
|
|
padding-bottom: 10px;
|
|
margin-bottom: 12px;
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
|
|
.dashboard-section__headline {
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.dashboard-section__title {
|
|
font-size: 13px;
|
|
font-weight: 700;
|
|
color: var(--text3);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.05em;
|
|
margin: 0;
|
|
}
|
|
|
|
.dashboard-section__description {
|
|
font-size: 12px;
|
|
color: var(--text3);
|
|
margin: 4px 0 0 0;
|
|
line-height: 1.35;
|
|
max-width: 640px;
|
|
}
|
|
|
|
.dashboard-section__body {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 12px;
|
|
}
|
|
|
|
.dashboard-section__actions {
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.dashboard-pill-row {
|
|
display: flex;
|
|
gap: 6px;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
/* Ernährung/Aktivität: Raster wie KPI; Kacheln per DashboardTile steuerbar */
|
|
.dashboard-summary-row.dashboard-tile-grid {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.dashboard-erholung-grid .dashboard-tile > .card,
|
|
.dashboard-summary-row .dashboard-tile > .card {
|
|
height: 100%;
|
|
}
|
|
|
|
@media (min-width: 1024px) {
|
|
.dashboard-stat-grid,
|
|
.dashboard-tile-grid {
|
|
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
gap: 10px;
|
|
}
|
|
}
|