:root {
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-card-solid: #141414;
    --bg-hover: rgba(255, 255, 255, 0.08);
    --bg-elevated: rgba(255, 255, 255, 0.07);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --text-tertiary: rgba(255, 255, 255, 0.35);
    --accent-push: #ff375f;
    --accent-pull: #0a84ff;
    --accent-legs: #30d158;
    --accent-push-glow: rgba(255, 55, 95, 0.35);
    --accent-pull-glow: rgba(10, 132, 255, 0.35);
    --accent-legs-glow: rgba(48, 209, 88, 0.35);
    --border: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.12);
    --border-strong: rgba(255, 255, 255, 0.16);
    --glass-blur: saturate(180%) blur(24px);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    --success: #30d158;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Segoe UI', sans-serif;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    background:
        radial-gradient(ellipse 100% 60% at 0% 0%, rgba(255, 55, 95, 0.18), transparent 60%),
        radial-gradient(ellipse 100% 60% at 100% 30%, rgba(10, 132, 255, 0.18), transparent 60%),
        radial-gradient(ellipse 100% 60% at 50% 100%, rgba(48, 209, 88, 0.12), transparent 60%),
        var(--bg-primary);
    background-attachment: fixed;
    letter-spacing: -0.01em;
}

#app {
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    position: relative;
    padding-left: var(--safe-left);
    padding-right: var(--safe-right);
}

/* HEADER */
.app-header {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: calc(var(--safe-top) + 14px) 20px 14px;
    border-bottom: 0.5px solid var(--border);
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}

.header-content h1 {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.8px;
    background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 3px;
    font-weight: 400;
}

/* MAIN CONTENT */
.main-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 16px calc(120px + var(--safe-bottom));
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* DAYS GRID */
.days-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.day-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), background 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
    box-shadow: var(--glass-shadow);
}

.day-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, transparent 50%);
    pointer-events: none;
    border-radius: inherit;
}

.day-card:active {
    transform: scale(0.97);
    background: var(--bg-hover);
}

.day-card.push {
    box-shadow: var(--glass-shadow), inset 3px 0 0 var(--accent-push), 0 0 24px -8px var(--accent-push-glow);
}

.day-card.pull {
    box-shadow: var(--glass-shadow), inset 3px 0 0 var(--accent-pull), 0 0 24px -8px var(--accent-pull-glow);
}

.day-card.legs {
    box-shadow: var(--glass-shadow), inset 3px 0 0 var(--accent-legs), 0 0 24px -8px var(--accent-legs-glow);
}

.day-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
}

.day-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    box-shadow: 0 0 8px currentColor;
}

.day-card.push .day-dot { background: var(--accent-push); color: var(--accent-push); }
.day-card.pull .day-dot { background: var(--accent-pull); color: var(--accent-pull); }
.day-card.legs .day-dot { background: var(--accent-legs); color: var(--accent-legs); }

.day-name {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.4px;
}

.day-meta {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.day-last {
    font-size: 12px;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
    z-index: 1;
}

.day-last::before {
    content: 'Letztes:';
    color: var(--text-secondary);
}

/* ACTIVE TRAINING */
.active-training {
    padding-bottom: 20px;
}

.text-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 10px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: var(--glass-shadow);
}

.text-card.has-content {
    border-color: var(--success);
    box-shadow: var(--glass-shadow), 0 0 16px -8px rgba(48, 209, 88, 0.5);
}

.text-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.text-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-primary);
    font-weight: 500;
}

.check-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-light);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
}

.check-btn:active {
    transform: scale(0.9);
}

.check-btn.checked {
    background: linear-gradient(135deg, #34de63, var(--success));
    border-color: var(--success);
    color: white;
    box-shadow: 0 0 16px -4px rgba(48, 209, 88, 0.6);
}

.single-textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.5;
    resize: none;
    min-height: 48px;
    font-family: inherit;
    transition: border-color 0.2s, background 0.2s;
}

.single-textarea:focus {
    outline: none;
    border-color: var(--border-strong);
    background: rgba(255, 255, 255, 0.06);
}

.single-textarea::placeholder {
    color: var(--text-tertiary);
}

/* EXERCISE ITEMS */
.exercises-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.exercise-item {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--glass-shadow);
}

.exercise-item.completed {
    border-color: rgba(48, 209, 88, 0.35);
    background: rgba(48, 209, 88, 0.04);
    box-shadow: var(--glass-shadow), 0 0 20px -10px rgba(48, 209, 88, 0.5);
}

.exercise-item.completed .exercise-name {
    color: var(--success);
}

.exercise-main {
    padding: 16px;
    cursor: pointer;
}

.exercise-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.exercise-name {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.2px;
    flex: 1;
}

.exercise-meta {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-top: 2px;
}

.exercise-check-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-light);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    flex-shrink: 0;
}

.exercise-check-btn:active {
    transform: scale(0.9);
}

.exercise-check-btn.checked {
    background: linear-gradient(135deg, #34de63, var(--success));
    border-color: var(--success);
    color: white;
    box-shadow: 0 0 16px -4px rgba(48, 209, 88, 0.6);
}

/* SINGLE TEXT INPUT */
.exercise-input {
    margin-top: 12px;
}

.exercise-input textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.5;
    resize: none;
    min-height: 48px;
    font-family: inherit;
    transition: border-color 0.2s, background 0.2s;
}

.exercise-input textarea:focus {
    outline: none;
    border-color: var(--border-strong);
    background: rgba(255, 255, 255, 0.06);
}

.exercise-input textarea::placeholder {
    color: var(--text-tertiary);
}

/* EXPANDABLE DETAILS */
.exercise-details {
    padding: 0 16px 16px;
    border-top: 0.5px solid var(--border);
    display: none;
}

.exercise-details.expanded {
    display: block;
}

.exercise-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    padding: 14px 0;
}

.exercise-media {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.media-placeholder {
    aspect-ratio: 1;
    background: var(--bg-hover);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--text-tertiary);
}

.media-video {
    grid-column: span 2;
    aspect-ratio: 16/9;
    background: var(--bg-hover);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--text-tertiary);
}

.media-video-link {
    grid-column: span 2;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.media-video-link .media-video {
    background: rgba(255, 55, 95, 0.15);
    color: var(--accent-push);
    width: 100%;
}

.video-label {
    font-size: 12px;
    color: var(--text-secondary);
}

/* YouTube Inline Embed */
.youtube-container {
    grid-column: span 2;
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    background: var(--bg-hover);
}

/* YouTube Shorts - 9:16 aspect ratio */
.youtube-container.shorts {
    padding-bottom: 177.78%; /* 9:16 = 16/9 * 100 */
    max-width: 280px;
    margin: 0 auto;
}

.youtube-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

.media-video-placeholder {
    grid-column: span 2;
    aspect-ratio: 16/9;
    background: var(--bg-hover);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--text-tertiary);
    cursor: pointer;
}

/* Image Modal */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

.image-modal-img {
    position: relative;
    z-index: 1;
    max-width: 95%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 12px;
}

/* Video Section */
.video-section {
    margin-top: 12px;
}

/* Exercise Images in Training - 2 nebeneinander */
.exercise-images-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 12px 0;
}

.exercise-image-thumb {
    width: 100%;
    aspect-ratio: 16/10;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.exercise-image-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Settings Images Section */
.setting-images-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 0.5px solid var(--border);
}

.setting-images-label {
    display: block;
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.setting-images-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.setting-image-thumb {
    position: relative;
    width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
}

.setting-image-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.delete-setting-image {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.setting-image-upload {
    width: 70px;
    height: 70px;
    border: 2px dashed var(--border-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.setting-image-upload:active {
    background: var(--bg-hover);
    border-color: var(--text-secondary);
}

/* Setting Section Headers */
.setting-section-header {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 20px 0 12px;
    padding-bottom: 8px;
    border-bottom: 0.5px solid var(--border);
}

/* Settings buttons */
.btn-add {
    width: 100%;
    background: var(--bg-hover);
    border: 2px dashed var(--border-light);
    border-radius: 10px;
    padding: 14px;
    color: var(--text-secondary);
    font-size: 15px;
    cursor: pointer;
    margin-top: 12px;
    transition: all 0.2s;
}

.btn-add:active {
    background: var(--bg-card);
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

.btn-delete-small {
    background: rgba(255, 55, 95, 0.15);
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    color: var(--accent-push);
    font-size: 12px;
    cursor: pointer;
    margin-top: 8px;
}

.btn-delete-small:active {
    background: var(--accent-push);
    color: white;
}

select {
    width: 100%;
    background: var(--bg-hover);
    border: 0.5px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238a8a8a' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

select:focus {
    outline: none;
    border-color: var(--border-light);
}

/* Image Library Panel */
.image-library-panel {
    margin-top: 10px;
}

.library-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 0 16px;
    border-bottom: 0.5px solid var(--border);
    margin-bottom: 16px;
}

.back-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 15px;
    cursor: pointer;
    padding: 0;
}

.library-header h3 {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
}

#image-count {
    font-size: 13px;
    color: var(--text-secondary);
}

.library-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.filter-btn {
    background: var(--bg-hover);
    border: 0.5px solid var(--border);
    color: var(--text-secondary);
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn.active {
    background: var(--accent-push);
    border-color: var(--accent-push);
    color: white;
}

.library-upload-btn {
    background: var(--bg-card);
    border: 2px dashed var(--border-light);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin-bottom: 16px;
    transition: all 0.2s;
}

.library-upload-btn:active {
    background: var(--bg-hover);
    border-color: var(--text-secondary);
}

.library-upload-btn span:first-child {
    font-size: 32px;
}

.library-upload-btn span:last-child {
    font-size: 14px;
    color: var(--text-secondary);
}

.image-library-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.library-image-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-hover);
}

.library-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.delete-library-image {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.library-image-item:active .delete-library-image,
.delete-library-image:active {
    opacity: 1;
}

.image-category {
    position: absolute;
    bottom: 4px;
    left: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.empty-images {
    grid-column: span 3;
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
}

.empty-hint {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-top: 8px;
}

.loading-images {
    grid-column: span 3;
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.hidden-file-input {
    display: none !important;
}

/* SUMMARY CARD */
.summary-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-top: 12px;
    box-shadow: var(--glass-shadow);
}

.summary-header {
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-content {
    padding: 0 16px 16px;
}

.summary-content.hidden {
    display: none;
}

.summary-content pre {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
    font-family: 'SF Mono', 'Monaco', monospace;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary);
    white-space: pre-wrap;
    margin-bottom: 12px;
    max-height: 200px;
    overflow-y: auto;
}

.btn-copy {
    width: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
    border: 1px solid var(--border-strong);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    padding: 14px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.15s, background 0.15s;
}

.btn-copy:active {
    transform: scale(0.98);
    background: var(--bg-hover);
}

/* PROFILE */
.profile-view {
    padding-bottom: 20px;
}

.profile-stats {
    display: flex;
    justify-content: space-around;
    padding: 20px 16px;
    margin-bottom: 16px;
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.menu-list {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--glass-shadow);
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 16px;
    min-height: 60px;
    cursor: pointer;
    border-bottom: 0.5px solid var(--border);
    transition: background 0.15s;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item:active {
    background: var(--bg-hover);
}

.menu-icon {
    font-size: 22px;
    width: 32px;
    text-align: center;
}

.menu-text {
    flex: 1;
    font-size: 17px;
}

.menu-arrow {
    color: var(--text-tertiary);
    font-size: 18px;
}

/* BOTTOM NAV - FLOATING GLASS BAR */
.bottom-nav {
    position: fixed;
    bottom: max(6px, var(--safe-bottom));
    left: 12px;
    right: 12px;
    background: rgba(20, 20, 22, 0.65);
    backdrop-filter: saturate(180%) blur(30px);
    -webkit-backdrop-filter: saturate(180%) blur(30px);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl);
    display: flex;
    justify-content: space-around;
    padding: 8px 6px;
    z-index: 1000;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 4px;
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: color 0.2s, transform 0.15s;
    border-radius: var(--radius-md);
    min-height: 48px;
}

.nav-item:active {
    transform: scale(0.92);
}

.nav-icon {
    font-size: 18px;
    font-weight: 700;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item.push .nav-icon {
    color: var(--accent-push);
}

.nav-item.pull .nav-icon {
    color: var(--accent-pull);
}

.nav-item.legs .nav-icon {
    color: var(--accent-legs);
}

.nav-item.active {
    color: var(--text-primary);
}

.nav-item.push.active .nav-icon {
    background: linear-gradient(135deg, rgba(255, 55, 95, 0.25), rgba(255, 55, 95, 0.15));
    box-shadow: 0 0 16px -4px var(--accent-push-glow), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.nav-item.pull.active .nav-icon {
    background: linear-gradient(135deg, rgba(10, 132, 255, 0.25), rgba(10, 132, 255, 0.15));
    box-shadow: 0 0 16px -4px var(--accent-pull-glow), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.nav-item.legs.active .nav-icon {
    background: linear-gradient(135deg, rgba(48, 209, 88, 0.25), rgba(48, 209, 88, 0.15));
    box-shadow: 0 0 16px -4px var(--accent-legs-glow), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.nav-label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* SETTINGS */
.settings-panel {
    margin-top: 10px;
}

.settings-day {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    overflow: hidden;
    box-shadow: var(--glass-shadow);
}

.settings-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 0.5px solid var(--border);
}

.settings-day-content {
    padding: 16px;
}

.settings-day-content.hidden {
    display: none;
}

.setting-group {
    margin-bottom: 14px;
}

.setting-group label {
    display: block;
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.setting-group input,
.setting-group textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 12px;
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
}

.setting-group textarea {
    min-height: 60px;
    resize: vertical;
}

.setting-exercises {
    margin-top: 20px;
}

.setting-exercise {
    background: var(--bg-hover);
    border: 0.5px solid var(--border);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
}

.setting-exercise input,
.setting-exercise textarea {
    width: 100%;
    background: var(--bg-card);
    border: 0.5px solid var(--border);
    border-radius: 8px;
    padding: 10px;
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 8px;
    font-family: inherit;
}

.setting-exercise textarea {
    min-height: 50px;
}

/* ARCHIVE */
.archive-section {
    margin-top: 20px;
}

.archive-item {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--glass-shadow);
}

.archive-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.archive-date {
    font-size: 12px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.archive-delete-all {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    opacity: 0.7;
}

.archive-delete-all:active {
    opacity: 1;
}

.archive-exercises-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.archive-exercise-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-hover);
    border-radius: 8px;
}

.archive-exercise-item.warmup-item {
    border-left: 2px solid var(--accent-push);
}

.archive-exercise-item.abs-item {
    border-left: 2px solid var(--accent-legs);
}

.archive-ex-name {
    font-weight: 500;
    font-size: 13px;
    color: var(--text-primary);
    min-width: 100px;
}

.archive-ex-value {
    flex: 1;
    font-size: 13px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.archive-delete-btn {
    width: 24px;
    height: 24px;
    background: rgba(255, 55, 95, 0.2);
    border: none;
    border-radius: 50%;
    color: var(--accent-push);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.archive-delete-btn:active {
    background: var(--accent-push);
    color: white;
}

.btn-copy-small {
    background: var(--bg-hover);
    border: 0.5px solid var(--border);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-copy-small:active {
    background: var(--bg-card);
}

/* UTILITIES */
.hidden {
    display: none !important;
}

/* TOAST */
.toast {
    position: fixed;
    bottom: calc(110px + var(--safe-bottom));
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(30, 30, 32, 0.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    color: var(--text-primary);
    padding: 12px 24px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2000;
    border: 1px solid var(--border-strong);
    pointer-events: none;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* SCROLLBAR */
::-webkit-scrollbar {
    width: 0;
    height: 0;
}

/* SELECTION */
::selection {
    background: rgba(255, 255, 255, 0.2);
}

/* RESET BUTTON */
.btn-reset {
    width: 100%;
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    padding: 14px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-reset:active {
    background: var(--bg-hover);
    color: var(--text-primary);
    transform: scale(0.98);
}

/* LOGIN SCREEN */
.login-screen {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 0%, rgba(255, 55, 95, 0.25), transparent 60%),
        radial-gradient(ellipse 80% 50% at 80% 100%, rgba(10, 132, 255, 0.25), transparent 60%),
        var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 24px;
}

.login-screen.hidden {
    display: none;
}

.login-container {
    width: 100%;
    max-width: 340px;
    padding: 32px 24px;
    text-align: center;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.login-icon {
    font-size: 64px;
    margin-bottom: 16px;
    filter: drop-shadow(0 4px 20px rgba(255, 55, 95, 0.4));
}

.login-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 32px;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    font-size: 16px;
    color: var(--text-primary);
    outline: none;
    -webkit-appearance: none;
    margin-bottom: 12px;
    transition: border-color 0.2s, background 0.2s;
}

.login-input:focus {
    border-color: var(--accent-push);
    background: rgba(255, 255, 255, 0.08);
}

.login-input::placeholder {
    color: var(--text-tertiary);
}

.login-btn {
    width: 100%;
    background: linear-gradient(135deg, #ff5f7d, var(--accent-push));
    border: none;
    border-radius: var(--radius-md);
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 8px 24px -8px var(--accent-push-glow);
}

.login-btn:active {
    transform: scale(0.98);
    box-shadow: 0 4px 12px -4px var(--accent-push-glow);
}

.login-btn:disabled {
    opacity: 0.5;
    transform: none;
}

.login-error {
    color: var(--accent-push);
    font-size: 14px;
    margin-top: 12px;
}

.login-error.hidden {
    display: none;
}

/* LOGOUT */
.menu-item.logout {
    border-top: 0.5px solid var(--border);
    margin-top: 8px;
}

.menu-item.logout .menu-text {
    color: var(--accent-push);
}

/* OVERVIEW TABS */
.overview-tabs {
    display: flex;
    gap: 6px;
    padding: 4px;
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    margin-bottom: 14px;
    box-shadow: var(--glass-shadow);
}

.overview-tab {
    flex: 1;
    padding: 10px 14px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.overview-tab.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.overview-pane.hidden {
    display: none;
}

/* DIARY OVERVIEW (Startseite-Tab) */
.diary-overview-cta { margin-bottom: 14px; }

.diary-search-wrap { margin-bottom: 14px; }

.diary-search {
    width: 100%;
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    color: var(--text-primary);
    font-size: 15px;
    -webkit-appearance: none;
}

.diary-search:focus { outline: none; border-color: var(--border-strong); }
.diary-search::placeholder { color: var(--text-tertiary); }

.diary-month-group { margin-bottom: 18px; }

.diary-month-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-secondary);
    margin: 0 4px 8px;
    font-weight: 600;
}

.diary-full-entry {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-light);
    border-left: 2px solid var(--accent-pull);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: transform 0.15s;
}

.diary-full-entry:active { transform: scale(0.99); }

.diary-full-date {
    font-size: 11px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    font-weight: 500;
}

.diary-full-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}

/* HEALTH OVERVIEW (Startseite-Tab) */
.health-today-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    box-shadow: var(--glass-shadow);
}

.health-today-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-weight: 600;
}

.health-today-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 24px;
}

.health-today-cell .cell-label {
    font-size: 11px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.health-today-cell .cell-value {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.4px;
    color: var(--text-primary);
}

.health-today-cell .cell-value .unit {
    font-size: 12px;
    font-weight: 500;
    opacity: 0.6;
    margin-left: 2px;
}

.cell-value.weight { color: var(--accent-pull); }
.cell-value.calories { color: var(--accent-push); }
.cell-value.steps { color: var(--accent-legs); }
.cell-value.active { color: var(--text-primary); }

.macros-bar-row {
    margin-top: 6px;
}

.macros-bar {
    display: flex;
    height: 14px;
    border-radius: 7px;
    overflow: hidden;
    background: rgba(255,255,255,0.05);
    margin-bottom: 10px;
}

.macros-bar-fill.protein { background: var(--accent-legs); }
.macros-bar-fill.carbs { background: var(--accent-pull); }
.macros-bar-fill.fat { background: var(--accent-push); }

.macros-legend {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: var(--text-secondary);
}

.macros-legend .dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}

/* DIARY SECTION */
.diary-section { margin-bottom: 16px; }

.diary-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 12px;
    box-shadow: var(--glass-shadow);
}

.diary-cta {
    width: 100%;
    background: linear-gradient(135deg, rgba(10, 132, 255, 0.18), rgba(10, 132, 255, 0.06));
    border: 1px solid rgba(10, 132, 255, 0.35);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: transform 0.15s;
}

.diary-cta:active { transform: scale(0.98); }

.diary-cta-icon { font-size: 26px; flex-shrink: 0; }
.diary-cta-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.diary-cta-title { font-size: 15px; font-weight: 600; }
.diary-cta-sub { font-size: 12px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.diary-recent { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }

.diary-entry {
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border-left: 2px solid var(--accent-pull);
}

.diary-entry-date { font-size: 11px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.diary-entry-text { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }

.diary-modal-content { max-width: 420px; }

.mic-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, rgba(255, 55, 95, 0.18), rgba(255, 55, 95, 0.06));
    border: 1px solid rgba(255, 55, 95, 0.4);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 12px;
}

.mic-icon { font-size: 22px; }

.mic-btn.recording {
    background: linear-gradient(135deg, #ff5f7d, var(--accent-push));
    border-color: var(--accent-push);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 55, 95, 0.5); }
    50%      { box-shadow: 0 0 0 12px rgba(255, 55, 95, 0); }
}

.diary-textarea {
    width: 100%;
    min-height: 140px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.5;
    resize: vertical;
    font-family: inherit;
    margin-bottom: 12px;
}

.diary-textarea:focus { outline: none; border-color: var(--border-strong); }

.diary-date-input {
    display: block;
    margin: 0 auto 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 8px 12px;
    font-size: 14px;
    font-family: inherit;
    text-align: center;
    color-scheme: dark;
    min-width: 160px;
}
.diary-date-input:focus { outline: none; border-color: var(--border-strong); }

/* HEALTH SECTION */
.health-section { margin-bottom: 16px; }

.health-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.health-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    box-shadow: var(--glass-shadow);
}

.health-card-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 6px;
}

.health-card-value {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.health-card-value .unit {
    font-size: 13px;
    font-weight: 500;
    opacity: 0.55;
}

.health-delta {
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
}
.health-delta.up { color: var(--success); }
.health-delta.down { color: var(--accent-push); }

.health-spark {
    display: block;
    width: 100%;
    height: 50px;
    margin-top: 6px;
}

.health-sub {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 6px;
}

.health-progress-track {
    margin-top: 8px;
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 4px;
    overflow: hidden;
}

.health-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.macro-row {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-top: 6px;
}

.macro-ring {
    width: 96px;
    height: 96px;
    flex-shrink: 0;
}

.macro-legend {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.macro-leg {
    display: flex;
    align-items: center;
    gap: 8px;
}

.macro-leg .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.macro-leg b {
    color: var(--text-primary);
    margin-left: auto;
    font-weight: 600;
}

/* PROGRESS */
.progress-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    padding: 10px;
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--glass-shadow);
}

.chip-group {
    display: flex;
    gap: 4px;
    flex: 1;
    min-width: 0;
    padding: 3px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 10px;
}

.chip {
    flex: 1;
    padding: 7px 8px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    white-space: nowrap;
}

.chip.active {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.chip:active {
    transform: scale(0.95);
}

.progress-day-group {
    margin-bottom: 16px;
}

.progress-day-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-secondary);
    margin: 8px 4px 8px;
    font-weight: 600;
}

.progress-day-title.push { color: var(--accent-push); }
.progress-day-title.pull { color: var(--accent-pull); }
.progress-day-title.legs { color: var(--accent-legs); }

.progress-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin-bottom: 8px;
    box-shadow: var(--glass-shadow);
}

.progress-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 6px;
    gap: 10px;
}

.progress-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.progress-current {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.progress-current.push { color: var(--accent-push); }
.progress-current.pull { color: var(--accent-pull); }
.progress-current.legs { color: var(--accent-legs); }

.progress-current .unit {
    font-size: 11px;
    font-weight: 500;
    opacity: 0.65;
    margin-left: 1px;
}

.progress-delta {
    font-size: 11px;
    font-weight: 500;
    margin-left: 6px;
}
.progress-delta.up { color: var(--success); }
.progress-delta.down { color: var(--accent-push); }
.progress-delta.same { color: var(--text-tertiary); }

.progress-sub {
    font-size: 11px;
    color: var(--text-tertiary);
    font-weight: 400;
    margin-top: 2px;
}

.progress-chart {
    display: block;
    width: 100%;
    height: 88px;
    margin: 6px 0 6px;
    overflow: visible;
}

.chart-tooltip {
    background: rgba(20, 20, 22, 0.92);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 9px 11px;
    margin-top: 6px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    animation: tooltipIn 0.18s ease-out;
}

.chart-tooltip.hidden { display: none; }

@keyframes tooltipIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.tt-row { display: flex; justify-content: space-between; align-items: baseline; }
.tt-head { margin-bottom: 4px; }
.tt-date { font-size: 12px; color: var(--text-secondary); font-weight: 500; }
.tt-value { font-size: 17px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.3px; }
.tt-unit { font-size: 11px; font-weight: 500; opacity: 0.6; margin-left: 2px; }
.tt-meta { font-size: 10px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.tt-sets { font-size: 12px; color: var(--text-secondary); line-height: 1.4; font-family: 'SF Mono', monospace; word-break: break-word; }

.chart-empty {
    text-align: center;
    color: var(--text-tertiary);
    font-size: 12px;
    padding: 30px 0;
    font-style: italic;
}

.progress-empty {
    text-align: center;
    color: var(--text-tertiary);
    font-size: 13px;
    padding: 40px 20px;
}

/* MODAL */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1500;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 20px;
    padding-bottom: calc(20px + var(--safe-bottom));
    animation: modalFadeIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.hidden {
    display: none;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    background: rgba(28, 28, 32, 0.85);
    backdrop-filter: saturate(180%) blur(30px);
    -webkit-backdrop-filter: saturate(180%) blur(30px);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl);
    padding: 28px 22px 22px;
    max-width: 380px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    animation: modalSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-title {
    font-size: 19px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px;
    text-align: center;
    letter-spacing: -0.3px;
}

.modal-text {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    margin: 0 0 16px;
    line-height: 1.5;
}

.modal-btn {
    width: 100%;
    padding: 15px 16px;
    border-radius: var(--radius-md);
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
    font-family: inherit;
    color: white;
}

.modal-btn:active {
    transform: scale(0.98);
}

.modal-btn.primary {
    background: linear-gradient(135deg, #ff5f7d, var(--accent-push));
    box-shadow: 0 8px 24px -8px var(--accent-push-glow);
}

.modal-btn.primary:nth-of-type(2) {
    background: linear-gradient(135deg, #3aa1ff, var(--accent-pull));
    box-shadow: 0 8px 24px -8px var(--accent-pull-glow);
}

.modal-btn.secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    box-shadow: none;
    border: 1px solid var(--border-light);
}

/* ARCHIVE DATE EDIT */
.archive-date-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.archive-date.editable {
    cursor: pointer;
    padding: 4px 6px;
    margin: -4px -6px;
    border-radius: 6px;
    transition: background 0.15s;
}

.archive-date.editable:hover {
    background: var(--bg-hover);
}

.archive-date.editable.hidden {
    display: none;
}

.archive-day-tag {
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-hover);
    padding: 2px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.archive-day-tag.hidden {
    display: none;
}

.archive-date-input {
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 13px;
    padding: 4px 8px;
    font-family: inherit;
    color-scheme: dark;
}

.archive-date-input.hidden {
    display: none;
}

/* RESPONSIVE */
@media (min-width: 390px) {
    .day-card {
        padding: 18px 20px;
    }
}
