/* Training Tracker Styles */

.training-header {
    margin-bottom: 2rem;
}

/* Search Section */
.search-section {
    margin-bottom: 1.5rem;
}

.search-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.search-input-container {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.search-input-container:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-icon {
    font-size: 1.25rem;
    margin-right: 0.75rem;
    color: #9ca3af;
}

.exercise-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    color: #333;
}

.exercise-search-input::placeholder {
    color: #9ca3af;
}

.clear-search-btn {
    background: #e5e7eb;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6b7280;
    font-size: 0.875rem;
    transition: all 0.2s;
    margin-left: 0.5rem;
}

.clear-search-btn:hover {
    background: #d1d5db;
    color: #374151;
}

/* Quick Reference Section */
.quick-reference-section {
    margin-bottom: 2rem;
}

.quick-ref-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.quick-ref-card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.quick-ref-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #10b981 0%, #059669 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.quick-ref-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 102, 255, 0.15);
    border-color: #10b981;
}

.quick-ref-card:hover::before {
    opacity: 1;
}

.quick-ref-card.active {
    border-color: #10b981;
    background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 100%);
}

.quick-ref-card.active::before {
    opacity: 1;
}

.quick-ref-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.quick-ref-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quick-ref-icon {
    font-size: 1.5rem;
}

.quick-ref-date {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 600;
    background: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.quick-ref-session {
    font-size: 0.875rem;
    color: #4b5563;
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-style: italic;
}

.quick-ref-exercises {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.quick-ref-exercise {
    font-size: 0.875rem;
    color: #6b7280;
    padding: 0.5rem;
    background: #f9fafb;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quick-ref-exercise-name {
    font-weight: 600;
    color: #111827;
}

.quick-ref-exercise-weight {
    font-weight: 700;
    color: #10b981;
    font-size: 0.9rem;
}

.quick-ref-stats {
    display: flex;
    gap: 1rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f3f4f6;
    font-size: 0.75rem;
    color: #6b7280;
}

.quick-ref-stat {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.quick-ref-stat-value {
    font-weight: 700;
    color: #111827;
}

.quick-ref-empty {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
    font-size: 0.9rem;
}

/* Last Time Badge */
.last-time-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e40af;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.last-time-badge:hover {
    background: linear-gradient(135deg, #bfdbfe 0%, #93c5fd 100%);
    transform: scale(1.02);
}

.last-time-badge-icon {
    font-size: 1rem;
}

.last-time-popup {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border: 2px solid #3b82f6;
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

.last-time-popup-title {
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.last-time-popup-details {
    color: #4b5563;
    line-height: 1.6;
}

.last-time-popup-details strong {
    color: #111827;
}

@media (max-width: 768px) {
    .quick-ref-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-ref-card {
        padding: 1rem;
    }
}

.header-actions {
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.view-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
    background: #f5f7fa;
    padding: 0.25rem;
    border-radius: 10px;
}

.view-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
}

.view-btn:hover {
    background: rgba(0, 102, 255, 0.1);
    color: #0066ff;
}

.view-btn.active {
    background: #0066ff;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 102, 255, 0.3);
}

.view-icon {
    font-size: 1.1rem;
}

/* Dashboard Progress Section */
.dashboard-progress-section {
    margin-bottom: 2rem;
}

.progress-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* On larger screens, make combined card span appropriately */
@media (min-width: 1024px) {
    .progress-grid {
        grid-template-columns: 400px repeat(auto-fit, minmax(300px, 1fr));
    }
}

.streak-weight-card, .goal-card, .rings-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.streak-weight-card:hover, .goal-card:hover, .rings-card:hover {
    box-shadow: 0 4px 16px rgba(0, 102, 255, 0.12);
    transform: translateY(-2px);
}

/* Combined Streak & Weight Card */
.streak-weight-header {
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f5f7fa;
}

.streak-weight-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0066ff;
    margin: 0;
}

.streak-weight-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.streak-circle-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.streak-circle-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
}

.streak-circle-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.streak-circle-progress {
    stroke: #0066ff;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.8s ease;
}

.streak-circle-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.8rem;
    font-weight: 900;
    color: #0066ff;
    transition: transform 0.3s ease;
}

.streak-circle-value.animate {
    animation: pulse 0.3s ease;
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.streak-circle-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.streak-circle-meta {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
    text-align: center;
}

.weight-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
    text-align: center;
}

.goal-card-header, .rings-card-header, .weight-card-header {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f5f7fa;
}

.goal-card-title, .rings-card-title, .weight-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0066ff;
    margin: 0;
}

.goal-card-content {
    min-height: 60px;
}

.goal-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #333;
}

.goal-loading, .goal-empty, .rings-loading, .rings-empty {
    text-align: center;
    color: #999;
    font-size: 0.9rem;
    padding: 1rem 0;
}

/* Progress Rings */
.rings-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.dashboard-ring-mini {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 12px;
}

.ring-mini-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #333;
    text-align: center;
}

.ring-mini-ring-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
}

.ring-mini-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.ring-mini-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.3rem;
    font-weight: 700;
    color: #0066ff;
}

.ring-mini-progress {
    stroke: #0066ff;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

.ring-mini-progress.body-fat {
    stroke: #ef4444;
}

.ring-mini-progress.lean-mass {
    stroke: #10b981;
}

.ring-mini-progress.muscle-mass {
    stroke: #3b82f6;
}

.ring-mini-progress.visceral-fat {
    stroke: #f59e0b;
}

.ring-mini-target {
    font-size: 0.85rem;
    color: #666;
    text-align: center;
    font-weight: 500;
}

/* Weight Section (inside combined card) */
.weight-value {
    font-size: 2rem;
    font-weight: 700;
    color: #0066ff;
}

.weight-delta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.delta-arrow {
    font-size: 1.2rem;
    font-weight: 700;
}

.delta-arrow.delta-positive {
    color: #10b981;
}

.delta-arrow.delta-negative {
    color: #ef4444;
}

.delta-text {
    color: #666;
}

.delta-text.delta-positive {
    color: #10b981;
    font-weight: 600;
}

.delta-text.delta-negative {
    color: #ef4444;
    font-weight: 600;
}

.weight-chart-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #f5f7fa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.weight-chart-toggle:hover {
    background: #0066ff;
    color: white;
    border-color: #0066ff;
}

.chart-toggle-icon {
    font-size: 1.1rem;
}

.weight-chart-container {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #f5f7fa;
    grid-column: 1 / -1;
}

.weight-chart-header {
    margin-bottom: 1rem;
}

.chart-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.graph-timeframe-buttons {
    display: flex;
    gap: 0.5rem;
}

.graph-timeframe-buttons .timeframe-btn {
    padding: 0.4rem 0.8rem;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.graph-timeframe-buttons .timeframe-btn:hover {
    background: #f5f7fa;
    border-color: #0066ff;
}

.graph-timeframe-buttons .timeframe-btn.active {
    background: #0066ff;
    color: white;
    border-color: #0066ff;
}

.chart-close-btn {
    padding: 0.4rem 0.8rem;
    background: #f5f7fa;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.chart-close-btn:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

.weight-chart-wrapper {
    position: relative;
    height: 250px;
    margin-top: 1rem;
}

/* Date Picker Section */
.date-picker-section {
    margin-bottom: 2rem;
}

.date-picker-wrapper {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.date-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.date-picker-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0066ff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.date-icon-large {
    font-size: 1.5rem;
}

.date-picker-main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.date-picker-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.date-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 200px;
}

.quick-dates-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.quick-dates-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #666;
}

.quick-dates-list {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.quick-date-btn {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-date-btn:hover {
    background: #0066ff;
    color: white;
    border-color: #0066ff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 102, 255, 0.3);
}

.quick-date-btn.active {
    background: #0066ff;
    color: white;
    border-color: #0066ff;
    box-shadow: 0 2px 8px rgba(0, 102, 255, 0.3);
}

.date-picker-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.date-nav-btn {
    padding: 0.5rem 0.75rem;
    background: #f5f7fa;
    color: #333;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 40px;
}

.date-nav-btn:hover {
    background: #0066ff;
    color: white;
    border-color: #0066ff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 102, 255, 0.3);
}

.date-picker-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

.date-icon {
    font-size: 1.1rem;
}

.date-picker-input {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
}

.date-picker-input:hover {
    border-color: #0066ff;
}

.date-picker-input:focus {
    outline: none;
    border-color: #0066ff;
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.today-btn {
    padding: 0.5rem 1rem;
    background: #0066ff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.today-btn:hover {
    background: #0052cc;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 102, 255, 0.3);
}

.clear-filter-btn {
    padding: 0.5rem 1rem;
    background: #6b7280;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.clear-filter-btn:hover {
    background: #4b5563;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(107, 114, 128, 0.3);
}

.back-link {
    color: #0066ff;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}

.back-link:hover {
    opacity: 0.7;
}

.training-stats {
    margin-bottom: 3rem;
}

.body-diagram-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    background: transparent;
}

.body-diagram-wrapper {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.body-diagram-image {
    width: 100%;
    height: auto;
    display: block;
    max-width: 500px;
}

.body-overlay-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.body-region {
    position: absolute;
    pointer-events: all;
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
    border: 2px solid transparent;
}

.body-region.clickable:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.body-region.clickable:active {
    transform: scale(0.95);
}

.body-region.active {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.4);
}

.body-part {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
}

.body-part.clickable {
    cursor: pointer;
    animation: pulse 2s ease-in-out infinite;
}

.body-part.clickable:hover {
    opacity: 1 !important;
    filter: brightness(1.15) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    transform: scale(1.08);
    transform-origin: center;
    animation: none;
}

.body-part.clickable:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 0.85;
    }
}

.body-part[data-category="Chest"]:hover {
    fill: #3b82f6 !important;
    stroke: #1e40af !important;
}

.body-part[data-category="Back"]:hover {
    fill: #6366f1 !important;
    stroke: #312e81 !important;
}

.body-part[data-category="Legs"]:hover {
    fill: #a855f7 !important;
    stroke: #6b21a8 !important;
}

.body-part[data-category="Arms"]:hover {
    fill: #ec4899 !important;
    stroke: #9f1239 !important;
}

.body-part[data-category="Shoulders"]:hover {
    fill: #f59e0b !important;
    stroke: #92400e !important;
}

.body-part[data-category="Core"]:hover {
    fill: #10b981 !important;
    stroke: #065f46 !important;
}

.body-diagram-hint {
    margin-top: 1.5rem;
    text-align: center;
    color: #6b7280;
    font-size: 0.9rem;
    animation: fadeInUp 0.6s ease-out;
}

.body-diagram-hint p {
    margin: 0 0 0.75rem 0;
}

.show-all-btn {
    padding: 0.5rem 1.5rem;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.show-all-btn:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

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

@media (max-width: 768px) {
    .body-diagram-container {
        padding: 1.5rem;
    }
    
    .body-diagram-wrapper {
        max-width: 300px;
    }
}

.training-exercises {
    margin-bottom: 2rem;
}

.category-nav {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    padding: 1rem;
    background: #f5f7fa;
    border-radius: 12px;
    justify-content: center;
}

.category-nav-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    transition: all 0.3s ease;
    min-width: 120px;
    justify-content: center;
}

.category-nav-btn:hover {
    background: #0066ff;
    color: white;
    border-color: #0066ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
}

.category-nav-btn.active {
    background: #0066ff;
    color: white;
    border-color: #0066ff;
    box-shadow: 0 2px 8px rgba(0, 102, 255, 0.2);
}

.category-nav-btn .nav-icon {
    font-size: 1.2rem;
}

.category-nav-btn .nav-label {
    font-weight: 600;
}

.category-section {
    margin-bottom: 3rem;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e5e7eb;
}

.category-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0066ff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-icon {
    font-size: 1.75rem;
}

.category-count {
    font-size: 0.875rem;
    color: #666;
    background: #f5f7fa;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
}

.category-exercises {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.exercise-card {
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
}

.exercise-header {
    background: linear-gradient(135deg, #0066ff 0%, #0052cc 100%);
    color: white;
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.exercise-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.exercise-count {
    font-size: 0.875rem;
    opacity: 0.9;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
}

.exercise-content {
    background: white;
    padding: 1.5rem;
}

.progression-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.progression-table th {
    background: #f5f7fa;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    color: #333;
    border-bottom: 2px solid #e5e7eb;
}

.progression-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.progression-table tr:hover {
    background: #f9fafb;
}

.progression-table .date-col {
    min-width: 120px;
}

.progression-table .weight-col {
    font-weight: 600;
    color: #0066ff;
}

.progression-table .sets-reps-col {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

.progression-table .est-1rm-col {
    text-align: center;
    min-width: 100px;
    font-weight: 600;
    color: #059669;
}

.progression-table .next-target-col {
    text-align: left;
    min-width: 200px;
}

.next-target-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
}

.progression-summary {
    background: #f9fafb;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid #667eea;
}

.best-recent-set,
.estimated-1rm,
.next-target-highlight {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.next-target-highlight {
    margin-bottom: 0;
}

.next-target-value {
    color: #667eea;
    font-weight: 600;
}

.pr-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.pr-badge.all-time-pr {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    animation: pulse 2s infinite;
}

.pr-badge.recent-pr {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.pr-badge-small {
    display: inline-block;
    font-size: 0.875rem;
    margin-left: 0.25rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.last-time-1rm {
    display: block;
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.quick-ref-next-target {
    font-size: 0.8rem;
    color: #667eea;
    font-weight: 500;
    margin-top: 0.25rem;
}

/* Slimmed Quick Reference Styles */
.quick-ref-next-target-main {
    margin: 1rem 0;
    padding: 0.75rem;
    background: linear-gradient(135deg, #f0f7ff 0%, #ffffff 100%);
    border-left: 4px solid #667eea;
    border-radius: 8px;
}

.quick-ref-target-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.quick-ref-target-value {
    font-size: 1rem;
    color: #667eea;
    font-weight: 700;
}

.quick-ref-pr-highlights {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
}

.quick-ref-pr-item {
    font-size: 0.85rem;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    border-radius: 6px;
    font-weight: 600;
}

.quick-ref-pr-item.all-time {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    animation: pulse 2s infinite;
}

.quick-ref-pr-item.recent {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}

.quick-ref-empty-gentle {
    padding: 1rem;
    text-align: center;
    color: #9ca3af;
    font-style: italic;
    font-size: 0.9rem;
}

.quick-ref-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: #9ca3af;
}

.quick-ref-empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.quick-ref-target-value.pr-potential {
    color: #f59e0b;
    font-weight: 800;
}

.quick-ref-pr-hint {
    font-size: 0.75rem;
    color: #f59e0b;
    margin-top: 0.25rem;
    font-weight: 600;
}

.quick-ref-volume-badge {
    margin-top: 0.75rem;
    padding: 0.5rem;
    background: #f3f4f6;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #4b5563;
    font-weight: 600;
    text-align: center;
}

.quick-ref-lagging-nudge {
    margin-top: 0.75rem;
    padding: 0.5rem;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-left: 3px solid #ef4444;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #991b1b;
    font-weight: 600;
    text-align: center;
}

.quick-ref-card.lagging-body-part {
    border: 2px solid #ef4444;
    background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);
}

/* Sortable Table Styles */
.table-wrapper {
    overflow-x: auto;
}

.sortable-table th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 2rem;
}

.sortable-table th.sortable:hover {
    background: #f3f4f6;
}

.sort-indicator {
    position: absolute;
    right: 0.5rem;
    color: #9ca3af;
    font-size: 0.75rem;
}

.sortable-table th.sortable.active .sort-indicator {
    color: #667eea;
}

.missing-data {
    color: #9ca3af;
    font-style: italic;
    font-size: 0.875rem;
}

/* Mobile: Collapsible tables */
@media (max-width: 768px) {
    .progression-table {
        display: block;
    }
    
    .progression-table thead {
        display: none;
    }
    
    .progression-table tbody,
    .progression-table tr,
    .progression-table td {
        display: block;
        width: 100%;
    }
    
    .progression-table tr {
        margin-bottom: 1rem;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        padding: 1rem;
        background: white;
    }
    
    .progression-table td {
        border: none;
        padding: 0.5rem 0;
        text-align: left;
    }
    
    .progression-table td:before {
        content: attr(data-label) ": ";
        font-weight: 600;
        color: #6b7280;
        display: inline-block;
        width: 120px;
    }
    
    .progression-table .date-col:before { content: "Date: "; }
    .progression-table .weight-col:before { content: "Weight: "; }
    .progression-table .sets-reps-col:before { content: "Sets × Reps: "; }
    .progression-table .est-1rm-col:before { content: "Est. 1RM: "; }
    .progression-table .next-target-col:before { content: "Next Target: "; }
    .progression-table .notes-col:before { content: "Notes: "; }
}

.next-weight-suggestion {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f0f7ff;
    border-left: 4px solid #0066ff;
    border-radius: 8px;
}

.next-weight-suggestion h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    color: #0066ff;
}

.next-weight-suggestion p {
    margin: 0.25rem 0;
    color: #333;
}

.next-weight-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0066ff;
}

.no-data {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
}

.no-data-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.loading-state {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.chart-container {
    margin-top: 1.5rem;
}

.chart-toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #f5f7fa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: #333;
    transition: all 0.2s;
    width: 100%;
    text-align: left;
}

.chart-toggle-btn:hover {
    background: #e5e7eb;
    border-color: #0066ff;
}

.chart-toggle-icon {
    font-size: 0.75rem;
    color: #0066ff;
    transition: transform 0.2s;
}

.chart-wrapper {
    margin-top: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.chart-wrapper canvas {
    max-height: 300px;
}

/* Day View Styles */
.day-view-content {
    padding: 1rem 0;
}

.day-view-placeholder {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
}

.placeholder-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.day-view-header {
    background: linear-gradient(135deg, #0066ff 0%, #0052cc 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 16px rgba(0, 102, 255, 0.2);
}

.day-view-date {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.day-view-session {
    font-size: 1.1rem;
    opacity: 0.95;
    font-weight: 500;
}

.day-view-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.day-stat-card {
    background: rgba(255, 255, 255, 0.15);
    padding: 1rem;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.day-stat-label {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-bottom: 0.25rem;
}

.day-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.day-exercises-grid {
    display: grid;
    gap: 1.5rem;
    margin-top: 2rem;
}

.day-exercise-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.day-exercise-card:hover {
    box-shadow: 0 4px 16px rgba(0, 102, 255, 0.15);
    transform: translateY(-2px);
}

.day-exercise-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f5f7fa;
}

.day-exercise-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0066ff;
    margin: 0;
}

.day-exercise-weight {
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    background: #f5f7fa;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
}

.day-exercise-sets {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.day-set-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 3px solid #0066ff;
}

.day-set-info {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.day-set-number {
    font-weight: 700;
    color: #0066ff;
    min-width: 60px;
}

.day-set-details {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.day-set-weight {
    font-weight: 600;
    color: #333;
}

.day-exercise-notes {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #f0f7ff;
    border-left: 3px solid #0066ff;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #555;
    font-style: italic;
}

.no-workout-message {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
}

.no-workout-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-workout-message h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.no-workout-message p {
    font-size: 1rem;
    color: #666;
}

.placeholder-hint {
    font-size: 0.9rem;
    color: #999;
    margin-top: 0.5rem;
}

/* Full Day View Styles */
.day-sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.day-section-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

.day-section-header {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f5f7fa;
}

.day-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0066ff;
    margin: 0 0 0.25rem 0;
}

.day-section-session {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.day-section-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.day-stat-mini {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.day-stat-mini-label {
    font-size: 0.75rem;
    color: #666;
    font-weight: 500;
}

.day-stat-mini-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0066ff;
}

.day-exercises-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.day-exercise-item {
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 3px solid #0066ff;
}

.day-exercise-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.day-exercise-item-name {
    font-size: 1rem;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.day-exercise-item-weight {
    font-size: 0.875rem;
    font-weight: 600;
    color: #666;
    background: white;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.day-exercise-item-sets {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.day-set-mini {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-size: 0.875rem;
    color: #666;
}

.day-set-mini-number {
    font-weight: 700;
    color: #0066ff;
    min-width: 60px;
}

.day-set-mini-details {
    flex: 1;
}

.day-exercise-item-notes {
    margin-top: 0.75rem;
    padding: 0.5rem;
    background: #f0f7ff;
    border-left: 2px solid #0066ff;
    border-radius: 4px;
    font-size: 0.875rem;
    color: #555;
    font-style: italic;
}

/* Nutrition Section */
.day-nutrition-totals {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
}

.nutrition-total-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.nutrition-total-label {
    font-size: 0.75rem;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nutrition-total-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0066ff;
}

.day-meals-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.day-meal-item {
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 3px solid #10b981;
}

.day-meal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.day-meal-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #333;
    margin: 0;
    text-transform: capitalize;
}

.day-meal-kcal {
    font-size: 0.875rem;
    font-weight: 600;
    color: #10b981;
}

.day-meal-description {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.day-meal-macros {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
}

/* Supplements Section */
.day-supplements-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.day-supplement-item {
    padding: 0.75rem 1rem;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 3px solid #e5e7eb;
    transition: all 0.2s;
}

.day-supplement-item.taken {
    border-left-color: #10b981;
    background: #f0fdf4;
}

.day-supplement-item.missed {
    border-left-color: #ef4444;
    background: #fef2f2;
}

.day-supplement-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.day-supplement-icon {
    font-size: 1rem;
}

.day-supplement-dose {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.25rem;
    margin-left: 1.75rem;
}

/* Notes Section */
.day-notes-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f0f7ff;
    border-radius: 12px;
    border-left: 4px solid #0066ff;
}

.day-notes-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0066ff;
    margin: 0 0 0.75rem 0;
}

.day-notes-content {
    font-size: 0.95rem;
    color: #333;
    line-height: 1.6;
    margin: 0;
}

.day-view-weight {
    font-size: 1rem;
    opacity: 0.9;
    margin-top: 0.5rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .progress-grid {
        grid-template-columns: 1fr;
    }

    .streak-weight-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .streak-circle-wrapper {
        width: 100px;
        height: 100px;
    }

    .streak-circle-value {
        font-size: 2rem;
    }

    .rings-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .weight-value {
        font-size: 1.5rem;
    }

    .chart-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .graph-timeframe-buttons {
        width: 100%;
        justify-content: space-between;
    }

    .graph-timeframe-buttons .timeframe-btn {
        flex: 1;
    }
    .header-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .view-controls {
        width: 100%;
    }

    .date-picker-wrapper {
        padding: 1rem;
    }

    .date-picker-header {
        flex-direction: column;
        align-items: stretch;
    }

    .date-picker-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .date-input-wrapper {
        width: 100%;
    }

    .date-picker-input {
        flex: 1;
        width: 100%;
    }

    .quick-dates-container {
        flex-direction: column;
        align-items: stretch;
    }

    .quick-dates-list {
        width: 100%;
    }

    .quick-date-btn {
        flex: 1;
        min-width: 0;
    }

    .date-picker-container {
        flex-wrap: wrap;
        width: 100%;
    }

    .day-sections-grid {
        grid-template-columns: 1fr;
    }

    .day-nutrition-totals {
        grid-template-columns: repeat(2, 1fr);
    }

    .exercise-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .progression-table {
        font-size: 0.875rem;
    }

    .progression-table th,
    .progression-table td {
        padding: 0.5rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .day-view-stats {
        grid-template-columns: 1fr;
    }

    .day-set-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .day-set-info {
        width: 100%;
        justify-content: space-between;
    }
}

