- Added `get_energy_availability_warning_payload` function to assess energy availability and provide contextual warnings based on multiple health indicators. - Integrated energy availability KPI tile into the nutrition history visualization, enhancing user insights on energy balance. - Updated frontend components to conditionally display the energy availability warning, improving user experience and data interpretation. - Refactored existing logic in `charts.py` to utilize the new energy availability functionality, streamlining data handling.
1331 lines
29 KiB
CSS
1331 lines
29 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;
|
||
/* Höhe der eigentlichen Tab-Zeile (ohne Abstand/Home-Indicator) */
|
||
--nav-h: 56px;
|
||
--nav-pad-top: 8px;
|
||
--header-h: 52px;
|
||
--font: system-ui, -apple-system, 'Segoe UI', sans-serif;
|
||
--capture-content-max: 800px;
|
||
/* Admin: nutzt volle Hauptspalte bis zu dieser Obergrenze (siehe .app-main:has(.admin-shell)) */
|
||
--admin-main-max: min(1560px, calc(100vw - 220px));
|
||
}
|
||
@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; }
|
||
/* unten: Tab-Leiste + Abstand nach oben zur Leiste + Home-Indicator (iPhone) */
|
||
.app-main {
|
||
flex: 1;
|
||
overflow-y: auto;
|
||
padding: 16px 16px calc(var(--nav-h) + var(--nav-pad-top) + env(safe-area-inset-bottom, 0px) + 20px);
|
||
}
|
||
|
||
.bottom-nav {
|
||
position: fixed;
|
||
bottom: 0;
|
||
left: 50%;
|
||
transform: translateX(-50%);
|
||
width: 100%;
|
||
max-width: 600px;
|
||
display: flex;
|
||
align-items: center;
|
||
background: var(--surface);
|
||
border-top: 1px solid var(--border);
|
||
z-index: 20;
|
||
overflow-x: auto;
|
||
overflow-y: visible;
|
||
-webkit-overflow-scrolling: touch;
|
||
scrollbar-width: none;
|
||
-ms-overflow-style: none;
|
||
justify-content: flex-start;
|
||
gap: 2px;
|
||
padding: var(--nav-pad-top) 6px env(safe-area-inset-bottom, 0px);
|
||
min-height: calc(var(--nav-h) + var(--nav-pad-top) + env(safe-area-inset-bottom, 0px));
|
||
height: auto;
|
||
box-sizing: border-box;
|
||
}
|
||
.bottom-nav::-webkit-scrollbar {
|
||
display: none;
|
||
}
|
||
.nav-item {
|
||
flex: 0 0 auto;
|
||
min-width: 56px;
|
||
max-width: 96px;
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
justify-content: center;
|
||
gap: 3px;
|
||
color: var(--text3);
|
||
text-decoration: none;
|
||
font-weight: 500;
|
||
transition: color 0.15s;
|
||
padding: 2px 4px 4px;
|
||
box-sizing: border-box;
|
||
}
|
||
.nav-item span {
|
||
font-size: 10px;
|
||
line-height: 1.15;
|
||
text-align: center;
|
||
max-width: 100%;
|
||
}
|
||
.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; }
|
||
|
||
/* Einstellungen Profil: Label als Überschrift oben, volle Breite, linksbündig */
|
||
.settings-page__field {
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: stretch;
|
||
gap: 8px;
|
||
padding: 12px 0;
|
||
border-bottom: 1px solid var(--border);
|
||
text-align: left;
|
||
}
|
||
.settings-page__field-label {
|
||
display: block;
|
||
font-size: 14px;
|
||
font-weight: 600;
|
||
color: var(--text1);
|
||
text-align: left;
|
||
line-height: 1.3;
|
||
}
|
||
.settings-page__field .form-input {
|
||
width: 100%;
|
||
max-width: 100%;
|
||
min-width: 0;
|
||
text-align: left;
|
||
box-sizing: border-box;
|
||
}
|
||
.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) */
|
||
/* KPI-Kachel-Raster: gemeinsam für Verlauf Körper, Dashboard KPI-Board, …
|
||
Desktop: title-Tooltip; Touch: ℹ → Bottom-Sheet (siehe KpiTilesOverview.jsx) */
|
||
.kpi-tiles-grid,
|
||
.body-kpi-overview {
|
||
display: grid;
|
||
grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
|
||
gap: 8px;
|
||
margin-bottom: 12px;
|
||
}
|
||
.kpi-tiles-card,
|
||
.body-kpi-card {
|
||
background: var(--surface2);
|
||
border-radius: 10px;
|
||
padding: 10px 10px 10px 12px;
|
||
border: 1px solid var(--border);
|
||
cursor: help;
|
||
text-align: left;
|
||
transition: border-color 0.15s ease, box-shadow 0.15s ease;
|
||
}
|
||
@media (hover: none) {
|
||
.kpi-tiles-card,
|
||
.body-kpi-card {
|
||
cursor: default;
|
||
}
|
||
}
|
||
.kpi-tiles-card:hover,
|
||
.body-kpi-card:hover {
|
||
border-color: var(--border2);
|
||
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.07);
|
||
}
|
||
|
||
.kpi-tiles-info-btn,
|
||
.body-kpi-info-btn {
|
||
position: absolute;
|
||
top: 6px;
|
||
right: 6px;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
min-width: 36px;
|
||
min-height: 36px;
|
||
margin: 0;
|
||
padding: 0;
|
||
border: none;
|
||
border-radius: 8px;
|
||
background: transparent;
|
||
color: var(--text3);
|
||
cursor: pointer;
|
||
-webkit-tap-highlight-color: transparent;
|
||
}
|
||
.kpi-tiles-info-btn:active,
|
||
.body-kpi-info-btn:active {
|
||
background: var(--surface);
|
||
color: var(--accent);
|
||
}
|
||
|
||
.kpi-tiles-touch-backdrop,
|
||
.body-kpi-touch-backdrop {
|
||
position: fixed;
|
||
inset: 0;
|
||
z-index: 10050;
|
||
display: flex;
|
||
align-items: flex-end;
|
||
justify-content: center;
|
||
padding: 0 12px;
|
||
padding-bottom: max(12px, env(safe-area-inset-bottom));
|
||
background: rgba(0, 0, 0, 0.45);
|
||
animation: kpi-tiles-fade-in 0.15s ease;
|
||
}
|
||
|
||
@keyframes kpi-tiles-fade-in {
|
||
from { opacity: 0; }
|
||
to { opacity: 1; }
|
||
}
|
||
@keyframes body-kpi-fade-in {
|
||
from { opacity: 0; }
|
||
to { opacity: 1; }
|
||
}
|
||
|
||
.kpi-tiles-touch-sheet,
|
||
.body-kpi-touch-sheet {
|
||
width: 100%;
|
||
max-width: 520px;
|
||
max-height: min(72vh, 560px);
|
||
overflow: auto;
|
||
margin: 0 auto;
|
||
padding: 14px 16px 18px;
|
||
border-radius: 16px 16px 0 0;
|
||
background: var(--surface);
|
||
border: 1px solid var(--border);
|
||
border-bottom: none;
|
||
box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.18);
|
||
}
|
||
|
||
.kpi-tiles-touch-sheet__head,
|
||
.body-kpi-touch-sheet__head {
|
||
display: flex;
|
||
align-items: flex-start;
|
||
justify-content: space-between;
|
||
gap: 12px;
|
||
margin-bottom: 10px;
|
||
}
|
||
|
||
.kpi-tiles-touch-sheet__title,
|
||
.body-kpi-touch-sheet__title {
|
||
margin: 0;
|
||
font-size: 16px;
|
||
font-weight: 700;
|
||
color: var(--text1);
|
||
line-height: 1.3;
|
||
flex: 1;
|
||
min-width: 0;
|
||
}
|
||
|
||
.kpi-tiles-touch-sheet__close,
|
||
.body-kpi-touch-sheet__close {
|
||
flex-shrink: 0;
|
||
width: 40px;
|
||
height: 40px;
|
||
margin: -6px -8px 0 0;
|
||
padding: 0;
|
||
border: none;
|
||
border-radius: 10px;
|
||
background: transparent;
|
||
color: var(--text2);
|
||
font-size: 26px;
|
||
line-height: 1;
|
||
cursor: pointer;
|
||
-webkit-tap-highlight-color: transparent;
|
||
}
|
||
|
||
.kpi-tiles-touch-sheet__close:active,
|
||
.body-kpi-touch-sheet__close:active {
|
||
background: var(--surface2);
|
||
}
|
||
|
||
.kpi-tiles-touch-sheet__body,
|
||
.body-kpi-touch-sheet__body {
|
||
font-size: 13px;
|
||
line-height: 1.5;
|
||
color: var(--text2);
|
||
white-space: pre-wrap;
|
||
word-break: break-word;
|
||
}
|
||
|
||
.kpi-tiles-touch-sheet__body--muted,
|
||
.body-kpi-touch-sheet__body--muted {
|
||
color: var(--text3);
|
||
font-style: italic;
|
||
}
|
||
|
||
/* KPI: Kurz-Hinweis max. 2 Zeilen — Details weiter per ℹ */
|
||
.kpi-tiles-card__hint {
|
||
max-height: 2.8em;
|
||
}
|
||
|
||
/* Verlauf Ernährung: Donut (Ø-Quote) + wöchentliche Makro-Verteilung (E3) */
|
||
.nutrition-macro-pair {
|
||
display: grid;
|
||
gap: 12px;
|
||
margin-bottom: 12px;
|
||
align-items: stretch;
|
||
}
|
||
|
||
@media (min-width: 780px) {
|
||
.nutrition-macro-pair {
|
||
grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.25fr);
|
||
}
|
||
}
|
||
|
||
.nutrition-macro-pair__weekly {
|
||
min-width: 0;
|
||
}
|
||
|
||
/* Einheitliche Chart-Höhe (Donut-Bereich ≈ E3-Balken) */
|
||
.nutrition-macro-pair__chart-wrap {
|
||
width: 100%;
|
||
min-height: 260px;
|
||
}
|
||
|
||
.nutrition-macro-pair__donut-inner {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 12px;
|
||
width: 100%;
|
||
}
|
||
|
||
.nutrition-macro-pair__donut-chart {
|
||
width: 100%;
|
||
min-height: 260px;
|
||
}
|
||
|
||
.nutrition-macro-pair__legend {
|
||
width: 100%;
|
||
padding-top: 2px;
|
||
}
|
||
|
||
.nutrition-macro-pair .card.nutrition-macro-pair__donut,
|
||
.nutrition-macro-pair .card.nutrition-macro-pair__weekly {
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
|
||
.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;
|
||
}
|
||
}
|
||
|
||
/* KI-Analyse (P5): Mobile Prompt-Leiste oben / horizontal, Desktop links ~300px (RESPONSIVE_UI §5.3) */
|
||
.analysis-page__header {
|
||
display: flex;
|
||
justify-content: space-between;
|
||
align-items: flex-start;
|
||
margin-bottom: 16px;
|
||
gap: 12px;
|
||
flex-wrap: wrap;
|
||
}
|
||
.analysis-page__header > div:first-child {
|
||
flex: 1;
|
||
min-width: 0;
|
||
}
|
||
|
||
.analysis-split {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 16px;
|
||
}
|
||
|
||
.analysis-split__nav {
|
||
display: flex;
|
||
flex-direction: row;
|
||
gap: 6px;
|
||
overflow-x: auto;
|
||
padding-bottom: 6px;
|
||
-ms-overflow-style: none;
|
||
scrollbar-width: none;
|
||
}
|
||
|
||
.analysis-split__nav::-webkit-scrollbar {
|
||
display: none;
|
||
}
|
||
|
||
.analysis-split__nav-item {
|
||
flex-shrink: 0;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
padding: 8px 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;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.analysis-split__nav-item:hover {
|
||
border-color: var(--accent);
|
||
color: var(--text1);
|
||
}
|
||
|
||
.analysis-split__nav-item--active {
|
||
border-color: var(--accent);
|
||
background: var(--accent);
|
||
color: white;
|
||
}
|
||
|
||
.analysis-split__nav-item--active:hover {
|
||
color: white;
|
||
}
|
||
|
||
.analysis-split__nav-item--active .muted {
|
||
color: rgba(255, 255, 255, 0.88) !important;
|
||
}
|
||
|
||
.analysis-split__nav-cat-count {
|
||
margin-left: 6px;
|
||
font-size: 11px;
|
||
font-weight: 500;
|
||
opacity: 0.92;
|
||
}
|
||
|
||
.analysis-split__nav-item--active .analysis-split__nav-cat-count {
|
||
color: rgba(255, 255, 255, 0.95);
|
||
opacity: 1;
|
||
}
|
||
|
||
a.analysis-split__nav-item {
|
||
text-decoration: none;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
.analysis-split__main {
|
||
min-width: 0;
|
||
}
|
||
|
||
@media (min-width: 1024px) {
|
||
.analysis-split {
|
||
flex-direction: row;
|
||
align-items: flex-start;
|
||
gap: 24px;
|
||
}
|
||
|
||
.analysis-split__nav-wrap {
|
||
flex: 0 0 300px;
|
||
max-width: 320px;
|
||
position: sticky;
|
||
top: 16px;
|
||
align-self: flex-start;
|
||
}
|
||
|
||
.analysis-split__nav {
|
||
flex-direction: column;
|
||
overflow-x: visible;
|
||
overflow-y: auto;
|
||
max-height: calc(100vh - 140px);
|
||
padding-bottom: 0;
|
||
gap: 8px;
|
||
}
|
||
|
||
.analysis-split__nav-item {
|
||
width: 100%;
|
||
justify-content: flex-start;
|
||
text-align: left;
|
||
border-radius: 10px;
|
||
white-space: normal;
|
||
}
|
||
|
||
.analysis-split__main {
|
||
flex: 1;
|
||
}
|
||
}
|
||
|
||
/* Erfassung: eine einheitliche Inhaltsbreite (Desktop), zentriert; mobil volle Breite */
|
||
.capture-page {
|
||
width: 100%;
|
||
max-width: 100%;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
@media (min-width: 1024px) {
|
||
.capture-page {
|
||
max-width: var(--capture-content-max);
|
||
margin-left: auto;
|
||
margin-right: auto;
|
||
}
|
||
}
|
||
|
||
/* Admin: Session-Metriken / Attributprofile — volle Breite, linksbündig (nicht globale 90px-Zahlfelder) */
|
||
.activity-attribute-profiles .aaf-stack {
|
||
max-width: 42rem;
|
||
}
|
||
.activity-attribute-profiles .aaf-field {
|
||
margin-bottom: 1rem;
|
||
}
|
||
.activity-attribute-profiles .aaf-label {
|
||
display: block;
|
||
font-size: 14px;
|
||
font-weight: 600;
|
||
color: var(--text1);
|
||
text-align: left;
|
||
margin-bottom: 6px;
|
||
line-height: 1.35;
|
||
}
|
||
.activity-attribute-profiles .aaf-sublabel {
|
||
display: block;
|
||
font-size: 12px;
|
||
font-weight: 600;
|
||
color: var(--text2);
|
||
text-align: left;
|
||
margin-bottom: 4px;
|
||
}
|
||
.activity-attribute-profiles .aaf-hint {
|
||
font-size: 12px;
|
||
color: var(--text3);
|
||
text-align: left;
|
||
margin: 6px 0 0;
|
||
line-height: 1.45;
|
||
}
|
||
.activity-attribute-profiles .aaf-input,
|
||
.activity-attribute-profiles textarea.aaf-input {
|
||
display: block;
|
||
width: 100%;
|
||
box-sizing: border-box;
|
||
padding: 10px 12px;
|
||
text-align: left;
|
||
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;
|
||
}
|
||
.activity-attribute-profiles textarea.aaf-input {
|
||
resize: vertical;
|
||
min-height: 4.5rem;
|
||
font-weight: 400;
|
||
}
|
||
.activity-attribute-profiles .aaf-input:focus {
|
||
outline: none;
|
||
border-color: var(--accent);
|
||
}
|
||
.activity-attribute-profiles .aaf-split {
|
||
display: grid;
|
||
grid-template-columns: 1fr 1fr;
|
||
gap: 12px;
|
||
}
|
||
@media (max-width: 560px) {
|
||
.activity-attribute-profiles .aaf-split {
|
||
grid-template-columns: 1fr;
|
||
}
|
||
}
|
||
.activity-attribute-profiles .aaf-field-select {
|
||
padding: 12px 0;
|
||
border-bottom: 1px solid var(--border);
|
||
}
|
||
.activity-attribute-profiles .aaf-field-select:last-child {
|
||
border-bottom: none;
|
||
}
|
||
.activity-attribute-profiles .aaf-field-select .form-label {
|
||
display: block;
|
||
text-align: left;
|
||
margin-bottom: 6px;
|
||
font-weight: 600;
|
||
flex: unset;
|
||
}
|
||
.activity-attribute-profiles .aaf-field-select .form-input,
|
||
.activity-attribute-profiles .aaf-field-select select.form-input {
|
||
width: 100%;
|
||
max-width: none;
|
||
min-width: 0;
|
||
text-align: left;
|
||
box-sizing: border-box;
|
||
padding: 10px 12px;
|
||
}
|
||
.activity-attribute-profiles .aaf-toolbar {
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
align-items: flex-end;
|
||
gap: 12px;
|
||
padding: 12px 0;
|
||
border-bottom: 1px solid var(--border);
|
||
}
|
||
.activity-attribute-profiles .aaf-toolbar .form-label {
|
||
display: block;
|
||
text-align: left;
|
||
margin-bottom: 6px;
|
||
font-weight: 600;
|
||
flex: unset;
|
||
}
|
||
.activity-attribute-profiles .aaf-toolbar__grow {
|
||
flex: 1 1 240px;
|
||
min-width: 0;
|
||
}
|
||
.activity-attribute-profiles .aaf-toolbar .form-input,
|
||
.activity-attribute-profiles .aaf-toolbar select.form-input {
|
||
width: 100%;
|
||
min-width: 140px;
|
||
max-width: none;
|
||
text-align: left;
|
||
box-sizing: border-box;
|
||
padding: 10px 12px;
|
||
}
|
||
.activity-attribute-profiles .aaf-toolbar__compact {
|
||
flex: 0 0 auto;
|
||
}
|
||
.activity-attribute-profiles .aaf-toolbar__compact .form-input,
|
||
.activity-attribute-profiles .aaf-toolbar__compact select.form-input {
|
||
width: 100%;
|
||
min-width: 5rem;
|
||
}
|
||
.activity-attribute-profiles .aaf-inline-edit .form-input,
|
||
.activity-attribute-profiles .aaf-inline-edit select.form-input {
|
||
text-align: left;
|
||
min-width: 4.5rem;
|
||
width: auto;
|
||
max-width: none;
|
||
box-sizing: border-box;
|
||
padding: 8px 10px;
|
||
}
|
||
|
||
/* Erfassung: Sub-Navigation (Mobil = Chips, Desktop = linke Spalte) */
|
||
.capture-shell {
|
||
width: 100%;
|
||
}
|
||
|
||
.capture-shell__layout {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 16px;
|
||
}
|
||
|
||
.capture-shell__nav {
|
||
display: flex;
|
||
flex-direction: row;
|
||
gap: 6px;
|
||
overflow-x: auto;
|
||
padding-bottom: 6px;
|
||
-ms-overflow-style: none;
|
||
scrollbar-width: none;
|
||
}
|
||
|
||
.capture-shell__nav::-webkit-scrollbar {
|
||
display: none;
|
||
}
|
||
|
||
.capture-shell__nav-item {
|
||
flex-shrink: 0;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
padding: 7px 12px;
|
||
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;
|
||
text-decoration: none;
|
||
white-space: nowrap;
|
||
cursor: pointer;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
.capture-shell__nav-item:hover {
|
||
border-color: var(--accent);
|
||
color: var(--text1);
|
||
}
|
||
|
||
.capture-shell__nav-item--active {
|
||
border-color: var(--accent);
|
||
background: var(--accent);
|
||
color: white;
|
||
}
|
||
|
||
.capture-shell__nav-item--active:hover {
|
||
color: white;
|
||
}
|
||
|
||
.capture-shell__nav-item--highlight:not(.capture-shell__nav-item--active) {
|
||
border-color: #7f77dd88;
|
||
background: #7f77dd14;
|
||
}
|
||
|
||
.capture-shell__nav-icon {
|
||
font-size: 15px;
|
||
line-height: 1;
|
||
}
|
||
|
||
.capture-shell__nav-label {
|
||
line-height: 1.2;
|
||
}
|
||
|
||
.capture-shell__main {
|
||
min-width: 0;
|
||
}
|
||
|
||
@media (min-width: 1024px) {
|
||
.capture-shell__layout {
|
||
flex-direction: row;
|
||
align-items: flex-start;
|
||
gap: 24px;
|
||
}
|
||
|
||
.capture-shell__nav-wrap {
|
||
flex: 0 0 260px;
|
||
max-width: 280px;
|
||
position: sticky;
|
||
top: 16px;
|
||
align-self: flex-start;
|
||
}
|
||
|
||
.capture-shell__nav {
|
||
flex-direction: column;
|
||
overflow-x: visible;
|
||
overflow-y: auto;
|
||
max-height: calc(100vh - 140px);
|
||
padding-bottom: 0;
|
||
gap: 8px;
|
||
}
|
||
|
||
.capture-shell__nav-item {
|
||
width: 100%;
|
||
justify-content: flex-start;
|
||
border-radius: 10px;
|
||
white-space: normal;
|
||
padding: 9px 12px;
|
||
}
|
||
|
||
.capture-shell__main {
|
||
flex: 1;
|
||
}
|
||
}
|
||
|
||
/* Einstellungen: gleiche Split-Struktur wie Analyse/Admin */
|
||
.settings-shell {
|
||
width: 100%;
|
||
}
|
||
|
||
/* Referenzwerte: Übersichtskacheln (responsive, bis 4 Spalten Desktop) */
|
||
.ref-value-tiles-grid {
|
||
display: grid;
|
||
gap: 12px;
|
||
grid-template-columns: 1fr;
|
||
}
|
||
|
||
@media (min-width: 520px) {
|
||
.ref-value-tiles-grid {
|
||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||
}
|
||
}
|
||
|
||
@media (min-width: 900px) {
|
||
.ref-value-tiles-grid {
|
||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||
}
|
||
}
|
||
|
||
@media (min-width: 1200px) {
|
||
.ref-value-tiles-grid {
|
||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||
}
|
||
}
|
||
|
||
.ref-value-tile {
|
||
display: block;
|
||
width: 100%;
|
||
margin: 0;
|
||
padding: 14px 14px 12px;
|
||
text-align: left;
|
||
font-family: var(--font);
|
||
border-radius: 12px;
|
||
border: 1.5px solid var(--border2);
|
||
background: var(--surface);
|
||
color: var(--text1);
|
||
cursor: pointer;
|
||
box-sizing: border-box;
|
||
transition: border-color 0.15s, box-shadow 0.15s;
|
||
}
|
||
|
||
.ref-value-tile:hover {
|
||
border-color: var(--accent);
|
||
}
|
||
|
||
.ref-value-tile:focus-visible {
|
||
outline: 2px solid var(--accent);
|
||
outline-offset: 2px;
|
||
}
|
||
|
||
.ref-value-tile--active {
|
||
border-color: var(--accent);
|
||
background: var(--surface2);
|
||
}
|
||
|
||
/* Admin: Split-Layout wie .analysis-split (nur Gruppen in der Nav) */
|
||
.admin-shell {
|
||
width: 100%;
|
||
}
|
||
|
||
.admin-page {
|
||
width: 100%;
|
||
min-width: 0;
|
||
}
|
||
|
||
/* Desktop: volle Breite der Admin-Spalte (nicht wie Erfassung 800px); Lesegröße leicht skaliert */
|
||
@media (min-width: 1024px) {
|
||
.admin-page {
|
||
max-width: 100%;
|
||
margin-left: 0;
|
||
margin-right: 0;
|
||
font-size: clamp(15px, 0.88rem + 0.25vw, 18px);
|
||
}
|
||
}
|
||
|
||
.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;
|
||
}
|
||
}
|
||
|
||
/* 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;
|
||
}
|
||
|
||
/* Admin: mehr horizontaler Raum für Tabellen auf großen Screens (:has ~2022+, sonst bleibt 1200px) */
|
||
.app-main:has(.admin-shell) {
|
||
max-width: var(--admin-main-max);
|
||
}
|
||
|
||
/* 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;
|
||
}
|
||
}
|