Files
geniusrun/frontend/src/App.css
Christophe Vila 5ebb0f756d feat(frontend): pathname-addressable views, deep links survive login, config page layout
Every view (/activities, /analysis, /plan, /profile, /config) is now
driven by the URL -- one pushState/popstate navigate() replaces the
tab/profile/config state flags, so all views deep-link, survive reload,
and honor Back/Forward. A logged-out visit to any path is stashed by
LoginGate and restored (replaceState) on the first render after the
OIDC round-trip, which otherwise always lands on '/'. The config page
gets Profile-style card spacing and a wider card so environment values
fit on one line.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-04 20:23:05 +02:00

671 lines
10 KiB
CSS

* {
box-sizing: border-box;
}
body {
margin: 0;
font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
background: #0f1115;
color: #e6e6e6;
}
.app {
max-width: 1100px;
margin: 0 auto;
padding: 0 1.5rem 3rem;
}
.app-header {
display: flex;
align-items: center;
gap: 2rem;
padding: 1.5rem 0;
border-bottom: 1px solid #2a2d35;
}
.app-header h1 {
font-size: 1.25rem;
margin: 0;
}
.tabs {
display: flex;
gap: 0.5rem;
}
.tab {
background: none;
border: 1px solid #2a2d35;
color: #b7bcc7;
padding: 0.5rem 1rem;
border-radius: 6px;
cursor: pointer;
}
.tab-icon {
margin-right: 0.4rem;
}
.tab.active {
background: #3b82f6;
border-color: #3b82f6;
color: white;
}
.header-actions {
margin-left: auto;
display: flex;
align-items: center;
gap: 0.6rem;
}
/* Icon-only header buttons (profile / settings / log out): circular chips,
deliberately unlike the rectangular .tab buttons -- these are account/
instance actions, not application views. No visible text: the glyph is
the label (full text lives in title/aria-label). */
.icon-button {
display: inline-flex;
align-items: center;
justify-content: center;
width: 2.2rem;
height: 2.2rem;
background: #1a1d24;
border: 1px solid #2a2d35;
color: #9aa0ab;
border-radius: 999px;
cursor: pointer;
font-size: 0.95rem;
}
.icon-button:hover:not(.active) {
border-color: #3b82f6;
color: #e6e6e6;
}
.icon-button.active {
background: #3b82f6;
border-color: #3b82f6;
color: white;
}
.env-config div {
display: flex;
gap: 1rem;
padding: 0.25rem 0;
}
.env-config dt {
min-width: 18rem;
color: #9aa0ab;
font-family: monospace;
}
.env-config dd {
margin: 0;
font-family: monospace;
overflow-wrap: anywhere;
}
.garmin-connection {
display: flex;
flex-direction: column;
gap: 0.5rem;
padding-top: 0.75rem;
border-top: 1px solid #2a2d35;
}
.garmin-connection-row {
display: flex;
align-items: center;
gap: 0.75rem;
}
.garmin-connection-main {
justify-content: space-between;
}
.garmin-connection-actions {
display: flex;
align-items: center;
gap: 0.75rem;
}
.garmin-connection-status {
display: flex;
align-items: center;
gap: 0.75rem;
}
.garmin-connection-message {
margin: 0;
font-size: 0.8rem;
color: #9aa0ab;
}
.status-dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: #6b7280;
}
.status-dot.status-authenticated {
background: #22c55e;
}
.status-dot.status-mfa_required {
background: #f59e0b;
}
.status-dot.status-failed {
background: #f87171;
}
.status-label {
font-size: 0.85rem;
color: #9aa0ab;
}
.page {
padding-top: 1.5rem;
}
.controls {
display: flex;
gap: 1.5rem;
margin-bottom: 1rem;
}
.controls label,
.kind-editor label {
display: flex;
flex-direction: column;
gap: 0.25rem;
font-size: 0.85rem;
color: #9aa0ab;
}
select,
input,
textarea,
button {
font-family: inherit;
font-size: 0.95rem;
background: #1a1d24;
color: #e6e6e6;
border: 1px solid #2a2d35;
border-radius: 6px;
padding: 0.4rem 0.6rem;
}
button {
cursor: pointer;
}
input[type="color"] {
padding: 0.2rem;
width: 3.5rem;
height: 2rem;
cursor: pointer;
}
.field-hint {
font-size: 0.75rem;
color: #6b7280;
}
button:hover:not(:disabled) {
border-color: #3b82f6;
}
button:disabled {
opacity: 0.5;
cursor: default;
}
.button-danger {
border-color: #7f1d1d;
color: #f87171;
}
.button-danger:hover:not(:disabled) {
background: #7f1d1d;
border-color: #f87171;
color: #fff;
}
.danger-zone-confirm {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.danger-zone-confirm p {
margin: 0;
color: #9aa0ab;
}
.filter-pills {
display: flex;
gap: 0.5rem;
flex-wrap: nowrap;
overflow-x: auto;
margin-bottom: 1rem;
padding-bottom: 0.25rem;
}
.filter-pill {
flex-shrink: 0;
white-space: nowrap;
border-radius: 999px;
padding: 0.35rem 0.9rem;
font-size: 0.85rem;
}
.filter-pill.active {
background: #3b82f6;
border-color: #3b82f6;
color: #fff;
}
.empty-state {
color: #9aa0ab;
}
.review-list {
list-style: none;
padding: 0;
display: flex;
flex-direction: column;
gap: 1rem;
}
.review-list-sentinel {
padding: 1rem 0;
text-align: center;
}
.review-item {
border: 1px solid #2a2d35;
border-radius: 8px;
padding: 1rem;
}
.review-item-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
font-size: 1rem;
}
.review-item-title {
display: flex;
align-items: center;
gap: 0.6rem;
flex-wrap: wrap;
}
.review-item-header span {
color: #9aa0ab;
font-size: 0.85rem;
}
.review-item-datetime {
display: flex;
flex-direction: column;
align-items: flex-end;
flex-shrink: 0;
line-height: 1.3;
}
.review-item-stats {
display: flex;
gap: 1rem;
color: #9aa0ab;
font-size: 0.85rem;
margin-top: 0.25rem;
}
.candidates {
font-size: 0.8rem;
color: #9aa0ab;
margin: 0.5rem 0;
}
.classify-control {
position: relative;
display: flex;
align-items: center;
gap: 0.4rem;
}
.classify-label {
font-size: 0.85rem;
}
.classify-lock {
padding: 0.25rem 0.5rem;
font-size: 0.85rem;
line-height: 1;
}
.classify-dropdown {
position: absolute;
top: 100%;
left: 0;
z-index: 10;
margin-top: 0.25rem;
display: flex;
flex-direction: column;
gap: 0.25rem;
padding: 0.4rem;
background: #14161c;
border: 1px solid #2a2d35;
border-radius: 6px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.classify-dropdown button {
text-align: left;
white-space: nowrap;
}
.classify-dropdown-unassign {
color: #9aa0ab;
padding-bottom: 0.4rem;
margin-bottom: 0.15rem;
border-bottom: 1px solid #2a2d35;
}
.expected-actual-charts {
display: flex;
flex-direction: column;
gap: 1rem;
margin: 0.5rem 0;
}
.mini-chart {
width: 100%;
}
.mini-chart-label {
display: block;
text-align: center;
font-size: 0.75rem;
color: #9aa0ab;
margin-bottom: 0.15rem;
}
.phase-legend {
display: flex;
justify-content: center;
gap: 0.75rem;
flex-wrap: wrap;
}
.phase-legend-item {
display: inline-flex;
align-items: center;
gap: 0.3rem;
font-size: 0.7rem;
color: #9aa0ab;
}
.phase-legend-swatch {
width: 8px;
height: 8px;
border-radius: 2px;
display: inline-block;
}
.review-item-footer {
display: flex;
justify-content: flex-end;
margin-top: 0.5rem;
}
.raw-data-button {
font-size: 0.75rem;
padding: 0.25rem 0.6rem;
color: #9aa0ab;
}
.modal-backdrop {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.6);
display: flex;
align-items: center;
justify-content: center;
z-index: 100;
}
.modal-content {
background: #14161c;
border: 1px solid #2a2d35;
border-radius: 8px;
width: min(1100px, 94vw);
max-height: 88vh;
display: flex;
flex-direction: column;
}
.modal-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0.75rem 1rem;
border-bottom: 1px solid #2a2d35;
font-weight: 600;
}
.modal-header-actions {
display: flex;
gap: 0.5rem;
font-weight: 400;
}
.modal-header-actions button {
font-size: 0.75rem;
padding: 0.25rem 0.6rem;
}
.modal-json {
margin: 0;
padding: 1rem;
overflow: auto;
font-size: 0.8rem;
line-height: 1.5;
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.json-row {
white-space: pre-wrap;
word-break: break-word;
}
.sync-modal-content {
width: min(420px, 90vw);
}
.sync-modal-body {
padding: 1.5rem 1rem;
display: flex;
flex-direction: column;
align-items: center;
gap: 0.75rem;
text-align: center;
}
.sync-modal-progress {
width: 100%;
height: 0.6rem;
}
.sync-modal-label {
margin: 0;
color: #9aa0ab;
font-size: 0.9rem;
}
.sync-modal-spinner {
width: 2rem;
height: 2rem;
border: 3px solid #2a2d35;
border-top-color: #3b82f6;
border-radius: 50%;
animation: sync-modal-spin 0.8s linear infinite;
}
@keyframes sync-modal-spin {
to {
transform: rotate(360deg);
}
}
.sync-modal-actions {
justify-content: flex-end;
padding: 0.75rem 1rem;
border-top: 1px solid #2a2d35;
}
.garmin-mfa-modal-content {
width: min(420px, 90vw);
}
.garmin-mfa-modal-body {
padding: 1.5rem 1rem;
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.garmin-mfa-modal-message {
margin: 0;
color: #9aa0ab;
font-size: 0.9rem;
}
.garmin-mfa-modal-actions {
justify-content: flex-end;
padding: 0.75rem 1rem;
border-top: 1px solid #2a2d35;
}
.json-toggle {
display: inline-block;
width: 1rem;
padding: 0;
border: none;
background: none;
color: #9aa0ab;
cursor: pointer;
font-size: 0.7rem;
font-family: inherit;
}
.json-toggle:hover {
color: #e6e6e6;
}
.json-key {
color: #9aa0ab;
}
.json-bracket {
color: #6b7280;
}
.json-summary {
color: #6b7280;
font-style: italic;
}
.json-string {
color: #6fcf97;
}
.json-number {
color: #6cb6ff;
}
.json-boolean {
color: #f5a742;
}
.json-null {
color: #6b7280;
font-style: italic;
}
.kind-editor {
display: flex;
flex-direction: column;
gap: 0.75rem;
border: 1px solid #2a2d35;
border-radius: 8px;
padding: 1rem;
max-width: 580px;
}
.profile-page,
.config-page {
display: flex;
flex-direction: column;
gap: 1.75rem;
}
/* Wider than the default .kind-editor cap: the environment card lists
URLs/paths as single-line monospace values that would otherwise wrap. */
.config-page .kind-editor {
max-width: 900px;
}
.training-type-list {
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.training-type-item {
display: flex;
flex-direction: column;
gap: 0.5rem;
border: 1px solid #2a2d35;
border-radius: 6px;
padding: 0.75rem;
}
.training-type-header {
display: flex;
justify-content: space-between;
align-items: center;
gap: 0.75rem;
}
.training-type-description {
margin: 0;
font-size: 0.85rem;
color: #9aa0ab;
white-space: pre-wrap;
}
.training-type-meta {
margin: 0;
font-size: 0.8rem;
color: #6b7280;
}
.kind-editor textarea {
font-family: ui-monospace, monospace;
font-size: 0.85rem;
}
.kind-editor-actions {
display: flex;
gap: 0.5rem;
}