467bc2a064
- Dashboard.jsx: main landing page after login - Coach greeting based on time of day - Weekly calendar showing workout days - Today's workout card with exercises - Quick stats (workouts/week, streak) - Upcoming workouts list - Full responsive CSS - App.jsx updated to show Dashboard first
776 lines
12 KiB
CSS
776 lines
12 KiB
CSS
.app {
|
|
min-height: 100vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.app.loading {
|
|
justify-content: center;
|
|
align-items: center;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.spinner {
|
|
width: 40px;
|
|
height: 40px;
|
|
border: 3px solid var(--border);
|
|
border-top-color: var(--accent);
|
|
border-radius: 50%;
|
|
animation: spin 1s linear infinite;
|
|
}
|
|
|
|
@keyframes spin {
|
|
to { transform: rotate(360deg); }
|
|
}
|
|
|
|
/* Header */
|
|
.header {
|
|
background: var(--bg-secondary);
|
|
padding: 1rem 1.25rem;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
border-bottom: 1px solid var(--border);
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 100;
|
|
}
|
|
|
|
.header h1 {
|
|
font-size: 1.5rem;
|
|
font-weight: 700;
|
|
}
|
|
|
|
.week-selector {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.75rem;
|
|
}
|
|
|
|
.week-selector button {
|
|
background: var(--bg-card);
|
|
color: var(--text-primary);
|
|
width: 36px;
|
|
height: 36px;
|
|
border-radius: 8px;
|
|
font-size: 1.1rem;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.week-selector button:hover:not(:disabled) {
|
|
background: var(--accent);
|
|
}
|
|
|
|
.week-selector button:disabled {
|
|
opacity: 0.3;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.week-selector span {
|
|
font-weight: 600;
|
|
min-width: 80px;
|
|
text-align: center;
|
|
}
|
|
|
|
/* Main */
|
|
.main {
|
|
flex: 1;
|
|
padding: 1rem;
|
|
max-width: 600px;
|
|
margin: 0 auto;
|
|
width: 100%;
|
|
}
|
|
|
|
/* Program Info */
|
|
.program-info {
|
|
margin-bottom: 1.5rem;
|
|
}
|
|
|
|
.program-info h2 {
|
|
font-size: 1.25rem;
|
|
margin-bottom: 0.5rem;
|
|
color: var(--accent);
|
|
}
|
|
|
|
.program-info p {
|
|
color: var(--text-secondary);
|
|
font-size: 0.9rem;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
/* Days List */
|
|
.days-list h3 {
|
|
font-size: 1rem;
|
|
color: var(--text-secondary);
|
|
margin-bottom: 1rem;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
.day-card {
|
|
background: var(--bg-card);
|
|
border-radius: 12px;
|
|
padding: 1rem;
|
|
margin-bottom: 0.75rem;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
border: 1px solid transparent;
|
|
}
|
|
|
|
.day-card:hover {
|
|
background: var(--bg-card-hover);
|
|
border-color: var(--accent);
|
|
}
|
|
|
|
.day-card:active {
|
|
transform: scale(0.98);
|
|
}
|
|
|
|
.day-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 0.75rem;
|
|
}
|
|
|
|
.day-number {
|
|
font-size: 0.8rem;
|
|
color: var(--text-secondary);
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.day-name {
|
|
font-size: 1.1rem;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.day-exercises {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 0.5rem;
|
|
margin-bottom: 0.75rem;
|
|
}
|
|
|
|
.exercise-tag {
|
|
background: var(--bg-secondary);
|
|
padding: 0.25rem 0.5rem;
|
|
border-radius: 4px;
|
|
font-size: 0.75rem;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.exercise-tag.more {
|
|
background: var(--accent);
|
|
color: white;
|
|
}
|
|
|
|
.day-action {
|
|
text-align: right;
|
|
color: var(--accent);
|
|
font-weight: 600;
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
/* Workout View */
|
|
.workout-header {
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.back-btn {
|
|
background: none;
|
|
color: var(--accent);
|
|
font-size: 0.9rem;
|
|
padding: 0.25rem 0;
|
|
}
|
|
|
|
.header-title h1 {
|
|
font-size: 1.25rem;
|
|
}
|
|
|
|
.header-subtitle {
|
|
font-size: 0.85rem;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
/* Exercise Card */
|
|
.exercise-card {
|
|
background: var(--bg-card);
|
|
border-radius: 12px;
|
|
margin-bottom: 0.75rem;
|
|
overflow: hidden;
|
|
border: 1px solid transparent;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.exercise-card.expanded {
|
|
border-color: var(--accent);
|
|
}
|
|
|
|
.exercise-header {
|
|
padding: 1rem;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.exercise-info h3 {
|
|
font-size: 1rem;
|
|
margin-bottom: 0.25rem;
|
|
}
|
|
|
|
.muscle-group {
|
|
font-size: 0.8rem;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.exercise-meta {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: flex-end;
|
|
gap: 0.25rem;
|
|
}
|
|
|
|
.sets-info {
|
|
font-size: 0.9rem;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.progress-badge {
|
|
background: var(--bg-secondary);
|
|
padding: 0.2rem 0.5rem;
|
|
border-radius: 10px;
|
|
font-size: 0.75rem;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.progress-badge.complete {
|
|
background: var(--success);
|
|
color: var(--bg-primary);
|
|
}
|
|
|
|
/* Exercise Body */
|
|
.exercise-body {
|
|
padding: 0 1rem 1rem;
|
|
border-top: 1px solid var(--border);
|
|
padding-top: 1rem;
|
|
}
|
|
|
|
.progression-hint {
|
|
background: rgba(233, 69, 96, 0.1);
|
|
border: 1px solid var(--accent);
|
|
border-radius: 8px;
|
|
padding: 0.75rem;
|
|
margin-bottom: 1rem;
|
|
font-size: 0.85rem;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.progression-hint strong {
|
|
color: var(--accent);
|
|
}
|
|
|
|
/* Sets List */
|
|
.sets-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.set-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.75rem;
|
|
padding: 0.75rem;
|
|
background: var(--bg-secondary);
|
|
border-radius: 8px;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.set-row.completed {
|
|
background: rgba(78, 204, 163, 0.15);
|
|
border: 1px solid var(--success);
|
|
}
|
|
|
|
.set-number {
|
|
font-size: 0.85rem;
|
|
color: var(--text-secondary);
|
|
min-width: 45px;
|
|
}
|
|
|
|
.set-inputs {
|
|
flex: 1;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.weight-input,
|
|
.reps-input {
|
|
width: 70px;
|
|
padding: 0.6rem;
|
|
background: var(--bg-card);
|
|
border: 1px solid var(--border);
|
|
border-radius: 6px;
|
|
color: var(--text-primary);
|
|
font-size: 1rem;
|
|
text-align: center;
|
|
}
|
|
|
|
.weight-input:focus,
|
|
.reps-input:focus {
|
|
border-color: var(--accent);
|
|
}
|
|
|
|
.input-separator {
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.complete-btn {
|
|
width: 44px;
|
|
height: 44px;
|
|
border-radius: 50%;
|
|
background: var(--bg-card);
|
|
color: var(--text-secondary);
|
|
font-size: 1.25rem;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.complete-btn:hover {
|
|
background: var(--accent);
|
|
color: white;
|
|
}
|
|
|
|
.complete-btn.done {
|
|
background: var(--success);
|
|
color: var(--bg-primary);
|
|
}
|
|
|
|
/* Mobile optimizations */
|
|
@media (max-width: 480px) {
|
|
.header {
|
|
padding: 0.75rem 1rem;
|
|
}
|
|
|
|
.header h1 {
|
|
font-size: 1.25rem;
|
|
}
|
|
|
|
.main {
|
|
padding: 0.75rem;
|
|
}
|
|
|
|
.weight-input,
|
|
.reps-input {
|
|
width: 60px;
|
|
padding: 0.5rem;
|
|
}
|
|
}
|
|
|
|
/* Safe area for notched phones */
|
|
@supports (padding: env(safe-area-inset-bottom)) {
|
|
.main {
|
|
padding-bottom: calc(1rem + env(safe-area-inset-bottom));
|
|
}
|
|
}
|
|
|
|
/* ============================================
|
|
DASHBOARD STYLES
|
|
============================================ */
|
|
|
|
.dashboard {
|
|
min-height: 100vh;
|
|
background: var(--bg);
|
|
}
|
|
|
|
.dashboard.loading {
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
align-items: center;
|
|
gap: 1rem;
|
|
}
|
|
|
|
/* Dashboard Header */
|
|
.dashboard-header {
|
|
background: var(--bg-secondary);
|
|
padding: 1rem 1.25rem;
|
|
border-bottom: 1px solid var(--border);
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 100;
|
|
}
|
|
|
|
.header-top {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
|
|
.header-top h1 {
|
|
font-size: 1.5rem;
|
|
font-weight: 700;
|
|
}
|
|
|
|
.nav-menu {
|
|
display: flex;
|
|
gap: 0.25rem;
|
|
}
|
|
|
|
.nav-btn {
|
|
background: transparent;
|
|
border: none;
|
|
color: var(--text-muted);
|
|
padding: 0.5rem 0.75rem;
|
|
border-radius: 8px;
|
|
font-size: 0.85rem;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.nav-btn:hover,
|
|
.nav-btn.active {
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
}
|
|
|
|
.nav-btn.logout {
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
/* Dashboard Main */
|
|
.dashboard-main {
|
|
padding: 1rem;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 1.5rem;
|
|
max-width: 600px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
/* Coach Greeting */
|
|
.coach-greeting {
|
|
display: flex;
|
|
gap: 1rem;
|
|
padding: 1rem;
|
|
background: linear-gradient(135deg, var(--accent) 0%, #6366f1 100%);
|
|
border-radius: 16px;
|
|
color: white;
|
|
}
|
|
|
|
.coach-avatar {
|
|
font-size: 2.5rem;
|
|
width: 60px;
|
|
height: 60px;
|
|
background: rgba(255,255,255,0.2);
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.coach-message {
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.coach-message p {
|
|
font-size: 1.1rem;
|
|
font-weight: 500;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
/* Week Calendar */
|
|
.week-calendar {
|
|
background: var(--bg-secondary);
|
|
border-radius: 16px;
|
|
padding: 1rem;
|
|
border: 1px solid var(--border);
|
|
}
|
|
|
|
.calendar-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.calendar-title {
|
|
font-weight: 600;
|
|
text-transform: capitalize;
|
|
}
|
|
|
|
.calendar-nav {
|
|
background: var(--bg);
|
|
border: 1px solid var(--border);
|
|
width: 32px;
|
|
height: 32px;
|
|
border-radius: 8px;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
color: var(--text);
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.calendar-nav:hover {
|
|
background: var(--accent);
|
|
color: white;
|
|
border-color: var(--accent);
|
|
}
|
|
|
|
.calendar-days {
|
|
display: grid;
|
|
grid-template-columns: repeat(7, 1fr);
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.calendar-day {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
padding: 0.5rem;
|
|
border-radius: 12px;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
position: relative;
|
|
}
|
|
|
|
.calendar-day:hover {
|
|
background: var(--bg);
|
|
}
|
|
|
|
.calendar-day.today {
|
|
background: var(--accent);
|
|
color: white;
|
|
}
|
|
|
|
.calendar-day.has-workout .day-dot {
|
|
color: var(--success);
|
|
}
|
|
|
|
.calendar-day.today .day-dot {
|
|
color: white;
|
|
}
|
|
|
|
.day-name {
|
|
font-size: 0.7rem;
|
|
text-transform: uppercase;
|
|
color: var(--text-muted);
|
|
margin-bottom: 0.25rem;
|
|
}
|
|
|
|
.calendar-day.today .day-name {
|
|
color: rgba(255,255,255,0.8);
|
|
}
|
|
|
|
.day-date {
|
|
font-size: 1rem;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.day-dot {
|
|
font-size: 0.5rem;
|
|
margin-top: 0.25rem;
|
|
}
|
|
|
|
/* Today's Workout */
|
|
.todays-workout {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.todays-workout h2 {
|
|
font-size: 1.1rem;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.workout-card {
|
|
background: var(--bg-secondary);
|
|
border-radius: 16px;
|
|
padding: 1.25rem;
|
|
border: 1px solid var(--border);
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.workout-card:hover {
|
|
border-color: var(--accent);
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
.workout-card-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.workout-card-header h3 {
|
|
font-size: 1.2rem;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.workout-duration {
|
|
font-size: 0.85rem;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.workout-exercises {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.5rem;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.exercise-preview {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
padding: 0.5rem 0;
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
|
|
.exercise-preview:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.exercise-name {
|
|
font-weight: 500;
|
|
}
|
|
|
|
.exercise-sets {
|
|
color: var(--text-muted);
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.start-workout-btn {
|
|
width: 100%;
|
|
background: var(--accent);
|
|
color: white;
|
|
border: none;
|
|
padding: 1rem;
|
|
border-radius: 12px;
|
|
font-size: 1rem;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.start-workout-btn:hover {
|
|
background: var(--accent-hover);
|
|
transform: scale(1.02);
|
|
}
|
|
|
|
/* Rest Day Card */
|
|
.rest-day-card {
|
|
background: var(--bg-secondary);
|
|
border-radius: 16px;
|
|
padding: 2rem;
|
|
border: 1px solid var(--border);
|
|
text-align: center;
|
|
}
|
|
|
|
.rest-icon {
|
|
font-size: 3rem;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.rest-day-card h3 {
|
|
font-size: 1.2rem;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.rest-day-card p {
|
|
color: var(--text-muted);
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.rest-tips {
|
|
display: flex;
|
|
justify-content: center;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.rest-tips span {
|
|
background: var(--bg);
|
|
padding: 0.5rem 0.75rem;
|
|
border-radius: 20px;
|
|
font-size: 0.85rem;
|
|
}
|
|
|
|
/* Quick Stats */
|
|
.quick-stats {
|
|
display: grid;
|
|
grid-template-columns: repeat(3, 1fr);
|
|
gap: 0.75rem;
|
|
}
|
|
|
|
.stat-card {
|
|
background: var(--bg-secondary);
|
|
border-radius: 12px;
|
|
padding: 1rem;
|
|
text-align: center;
|
|
border: 1px solid var(--border);
|
|
}
|
|
|
|
.stat-value {
|
|
display: block;
|
|
font-size: 1.5rem;
|
|
font-weight: 700;
|
|
color: var(--accent);
|
|
}
|
|
|
|
.stat-label {
|
|
font-size: 0.75rem;
|
|
color: var(--text-muted);
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
/* Upcoming Workouts */
|
|
.upcoming-workouts h2 {
|
|
font-size: 1.1rem;
|
|
font-weight: 600;
|
|
margin-bottom: 0.75rem;
|
|
}
|
|
|
|
.upcoming-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.upcoming-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 1rem;
|
|
background: var(--bg-secondary);
|
|
padding: 1rem;
|
|
border-radius: 12px;
|
|
border: 1px solid var(--border);
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.upcoming-item:hover {
|
|
border-color: var(--accent);
|
|
}
|
|
|
|
.upcoming-day {
|
|
font-weight: 600;
|
|
width: 40px;
|
|
color: var(--accent);
|
|
}
|
|
|
|
.upcoming-name {
|
|
flex: 1;
|
|
}
|
|
|
|
.upcoming-arrow {
|
|
color: var(--text-muted);
|
|
}
|