Files
training-tracker/frontend/css/styles.css
2026-01-19 19:50:33 +01:00

477 lines
7.8 KiB
CSS

/* Reset and Base Styles */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
--primary-color: #4f46e5;
--primary-dark: #4338ca;
--secondary-color: #6b7280;
--success-color: #10b981;
--danger-color: #ef4444;
--background-color: #f3f4f6;
--card-background: #ffffff;
--text-color: #1f2937;
--text-secondary: #6b7280;
--border-color: #e5e7eb;
--shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
--shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
--radius: 12px;
--radius-sm: 8px;
--nav-height: 64px;
--header-height: 56px;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
background-color: var(--background-color);
color: var(--text-color);
line-height: 1.5;
min-height: 100vh;
-webkit-font-smoothing: antialiased;
}
#app {
display: flex;
flex-direction: column;
min-height: 100vh;
}
/* Header */
.header {
position: fixed;
top: 0;
left: 0;
right: 0;
height: var(--header-height);
background: var(--card-background);
border-bottom: 1px solid var(--border-color);
display: flex;
align-items: center;
justify-content: center;
z-index: 100;
padding: 0 16px;
}
.header-title {
font-size: 18px;
font-weight: 600;
}
/* Main Content */
.main-content {
flex: 1;
padding: calc(var(--header-height) + 16px) 16px calc(var(--nav-height) + 16px);
max-width: 600px;
margin: 0 auto;
width: 100%;
}
/* Views */
.view {
display: none;
}
.view.active {
display: block;
}
.view-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 16px;
}
.view-header h2 {
font-size: 24px;
font-weight: 600;
}
/* Sections */
.section {
margin-top: 24px;
}
.section h3 {
font-size: 16px;
font-weight: 600;
color: var(--text-secondary);
margin-bottom: 12px;
}
.section h4 {
font-size: 14px;
font-weight: 600;
margin-bottom: 8px;
}
/* Buttons */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 10px 20px;
border: none;
border-radius: var(--radius-sm);
font-size: 14px;
font-weight: 500;
cursor: pointer;
transition: all 0.2s;
}
.btn-primary {
background: var(--primary-color);
color: white;
}
.btn-primary:hover {
background: var(--primary-dark);
}
.btn-secondary {
background: var(--border-color);
color: var(--text-color);
}
.btn-secondary:hover {
background: #d1d5db;
}
.btn-text {
background: transparent;
color: var(--primary-color);
padding: 8px 12px;
}
.btn-danger {
background: var(--danger-color);
color: white;
}
.btn-large {
width: 100%;
padding: 14px 24px;
font-size: 16px;
}
.btn-small {
padding: 6px 12px;
font-size: 12px;
}
/* Quick Actions */
.quick-actions {
margin-bottom: 24px;
}
/* Cards */
.card-list {
display: flex;
flex-direction: column;
gap: 12px;
}
.card {
background: var(--card-background);
border-radius: var(--radius);
padding: 16px;
box-shadow: var(--shadow);
}
.card-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
margin-bottom: 8px;
}
.card-title {
font-size: 16px;
font-weight: 600;
}
.card-subtitle {
font-size: 13px;
color: var(--text-secondary);
}
.card-body {
margin-top: 8px;
}
.card-actions {
display: flex;
gap: 8px;
margin-top: 12px;
}
.badge {
display: inline-block;
padding: 2px 8px;
border-radius: 12px;
font-size: 11px;
font-weight: 500;
text-transform: uppercase;
}
.badge-strength {
background: #dbeafe;
color: #1e40af;
}
.badge-cardio {
background: #fef3c7;
color: #92400e;
}
/* Empty State */
.empty-state {
text-align: center;
color: var(--text-secondary);
padding: 32px 16px;
}
/* Forms */
.form {
display: flex;
flex-direction: column;
gap: 16px;
}
.form-group {
display: flex;
flex-direction: column;
gap: 6px;
}
.form-group label {
font-size: 14px;
font-weight: 500;
color: var(--text-secondary);
}
.form-group input,
.form-group select,
.form-group textarea {
padding: 12px;
border: 1px solid var(--border-color);
border-radius: var(--radius-sm);
font-size: 16px;
background: var(--card-background);
color: var(--text-color);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
outline: none;
border-color: var(--primary-color);
box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}
.form-row {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 12px;
}
/* Tabs */
.tabs {
display: flex;
gap: 8px;
margin-bottom: 16px;
overflow-x: auto;
padding-bottom: 4px;
}
.tab {
padding: 8px 16px;
border: none;
background: var(--border-color);
border-radius: 20px;
font-size: 14px;
font-weight: 500;
color: var(--text-secondary);
cursor: pointer;
white-space: nowrap;
transition: all 0.2s;
}
.tab.active {
background: var(--primary-color);
color: white;
}
/* Modal */
.modal {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: flex-end;
justify-content: center;
z-index: 200;
}
.modal.hidden {
display: none;
}
.modal-content {
background: var(--card-background);
border-radius: var(--radius) var(--radius) 0 0;
padding: 20px;
width: 100%;
max-width: 600px;
max-height: 90vh;
overflow-y: auto;
}
.modal-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
}
.modal-header h3 {
font-size: 18px;
font-weight: 600;
}
/* Bottom Navigation */
.bottom-nav {
position: fixed;
bottom: 0;
left: 0;
right: 0;
height: var(--nav-height);
background: var(--card-background);
border-top: 1px solid var(--border-color);
display: flex;
justify-content: space-around;
align-items: center;
padding-bottom: env(safe-area-inset-bottom);
}
.nav-item {
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
padding: 8px 16px;
background: none;
border: none;
color: var(--text-secondary);
cursor: pointer;
transition: color 0.2s;
}
.nav-item.active {
color: var(--primary-color);
}
.nav-icon {
font-size: 20px;
}
.nav-label {
font-size: 11px;
font-weight: 500;
}
/* Plan Exercise Item */
.plan-exercise-item {
display: flex;
gap: 8px;
align-items: flex-start;
padding: 12px;
background: var(--background-color);
border-radius: var(--radius-sm);
margin-bottom: 8px;
}
.plan-exercise-item select {
flex: 1;
}
.plan-exercise-item input {
width: 70px;
}
.plan-exercise-item .btn {
padding: 8px;
}
/* Session Entry */
.session-entry {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px;
background: var(--background-color);
border-radius: var(--radius-sm);
}
.entry-info {
flex: 1;
}
.entry-name {
font-weight: 500;
}
.entry-details {
font-size: 13px;
color: var(--text-secondary);
}
/* Utilities */
.hidden {
display: none !important;
}
.text-center {
text-align: center;
}
.mt-2 {
margin-top: 8px;
}
.mt-4 {
margin-top: 16px;
}
/* Responsive adjustments for larger screens */
@media (min-width: 640px) {
.modal-content {
border-radius: var(--radius);
margin-bottom: 20px;
}
.modal {
align-items: center;
}
}
@media (min-width: 768px) {
:root {
--header-height: 64px;
}
.header-title {
font-size: 20px;
}
.main-content {
padding: calc(var(--header-height) + 24px) 24px calc(var(--nav-height) + 24px);
}
}