/* Progress System CSS */
/* OnlyFitness - Unified Progress System Styles */

/* ====== CHART STYLES ====== */
/*.chart-container {*/
/*    position: relative;*/
/*    margin-bottom: 2rem;*/
/*}*/

/*.chart-wrapper {*/
/*    position: relative;*/
/*    width: 100%;*/
/*    min-height: 300px;*/
/*}*/

/*!* Mobile responsive chart heights *!*/
/*@media (max-width: 768px) {*/
/*    .chart-wrapper {*/
/*        min-height: 350px;*/
/*        height: 350px;*/
/*    }*/
/*    */
/*    .chart-container canvas {*/
/*        max-height: 350px !important;*/
/*    }*/
/*}*/

/*@media (max-width: 576px) {*/
/*    .chart-wrapper {*/
/*        min-height: 300px;*/
/*        height: 300px;*/
/*    }*/
/*    */
/*    .chart-container canvas {*/
/*        max-height: 300px !important;*/
/*    }*/
/*}*/

/*!* Chart header styling *!*/
/*.chart-header {*/
/*    margin-bottom: 1rem;*/
/*    padding: 0.75rem 1rem;*/
/*    background: linear-gradient(135deg, #f8fafc, #e2e8f0);*/
/*    border-radius: 0.5rem;*/
/*    border-left: 4px solid var(--bs-primary);*/
/*}*/

/*.chart-header h5 {*/
/*    margin: 0;*/
/*    color: var(--bs-dark);*/
/*    font-weight: 600;*/
/*}*/

/*!* No data state *!*/
/*.chart-no-data {*/
/*    min-height: 250px;*/
/*    display: flex;*/
/*    align-items: center;*/
/*    justify-content: center;*/
/*    background: #f8f9fa;*/
/*    border-radius: 0.5rem;*/
/*    border: 2px dashed #dee2e6;*/
/*}*/

/* ====== PROGRESS HEADERS ====== */
.progress-header {
    text-align: center;
    margin-bottom: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Different header colors for different pages */
.progress-header.dashboard {
    background: linear-gradient(135deg, #3b82f6, #1e3a8a);
}

.progress-header.new-measurement {
    background: linear-gradient(135deg, #10b981, #059669);
}

.progress-header.edit-measurement {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.progress-header.history {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.progress-header.analytics {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
}

.progress-header.cluster-selection {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}
.danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}
.progress-header h1 {
    font-size: 1.5rem;
    margin-bottom: 5px;
    font-weight: 600;
}

.progress-header .subtitle {
    opacity: 0.9;
    font-size: 0.9rem;
}

.progress-header .cluster-info,
.progress-header .measurement-info {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px 12px;
    margin-top: 10px;
    display: inline-block;
}

/* ====== CARDS & SECTIONS ====== */
.progress-card {
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-card .card-header {
    background: #f8fafc;
    padding: 15px 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.progress-card .card-header h5 {
    font-weight: 600;
    font-size: 1.1rem;
    color: #374151;
    margin: 0;
}

/* Form sections */
.form-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    margin-bottom: 20px;
    overflow: hidden;
}

.form-section .section-header {
    background: #f8fafc;
    padding: 15px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.form-section .section-header h5 {
    font-weight: 600;
    font-size: 1.1rem;
    color: #374151;
    margin: 0;
}

/* ====== MEASUREMENT CARDS ====== */
.measurement-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.measurement-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.measurement-card .measurement-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.measurement-card .measurement-date {
    font-weight: 600;
    color: #374151;
}

.measurement-card .measurement-actions {
    display: flex;
    gap: 8px;
}

.measurement-card .measurement-value {
    font-size: 1.2rem;
    font-weight: 700;
    margin-right: 10px;
}

.measurement-card .measurement-unit {
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: normal;
}

.measurement-card .measurement-delta {
    font-size: 0.85rem;
    font-weight: 600;
}

.measurement-card .measurement-delta.positive {
    color: #059669;
}

.measurement-card .measurement-delta.negative {
    color: #dc2626;
}

/* ====== MEASUREMENT FORMS ====== */
.measurement-form .card {
    border: 1px solid rgba(0, 0, 0, 0.125);
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.measurement-form .form-range {
    width: 100%;
}

.measurement-form .image-preview img,
.measurement-form .new-image-preview img {
    border: 2px solid #dee2e6;
}

.measurement-form .new-image-preview img {
    border-color: #28a745;
}

.measurement-form h5 {
    color: #495057;
    font-weight: 600;
}

.card-title {
    font-size: 0.95rem;
    font-weight: 600;
}

/* ====== BADGES & INDICATORS ====== */
.badge.bg-warning {
    color: #000 !important;
}

.pr-badge {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #92400e;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
}

/* ====== STATS & ANALYTICS ====== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

.stat-card .stat-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-card .stat-label {
    color: #6b7280;
    font-size: 0.9rem;
}

/* ====== CHART CONTAINERS ====== */
.chart-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

.chart-container .chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-container .chart-header h5 {
    margin: 0;
    font-weight: 600;
    color: #374151;
}

.chart-wrapper {
    position: relative;
    height: 300px;
    margin: 20px 0;
}

/* ====== BUTTONS ====== */
.btn-progress-primary {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-progress-primary:hover {
    background: linear-gradient(135deg, #4f46e5, #4338ca);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-progress-success {
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-progress-success:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-progress-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-progress-danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-progress-outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 6px 14px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-progress-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* ====== FILTERS & CONTROLS ====== */
.filter-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.filter-controls .form-group {
    margin-bottom: 0;
    min-width: 150px;
}

/* ====== RESPONSIVE DESIGN ====== */
@media (max-width: 768px) {
    .progress-header {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .progress-header h1 {
        font-size: 1.25rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(100%, 1fr));
        gap: 15px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-card .stat-value {
        font-size: 1.5rem;
    }
    
    .measurement-card {
        padding: 12px;
    }
    
    .measurement-card .measurement-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .measurement-card .measurement-actions {
        align-self: stretch;
        justify-content: flex-end;
    }
    
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-controls .form-group {
        min-width: auto;
    }
    
    .chart-wrapper {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .progress-header .cluster-info,
    .progress-header .measurement-info {
        display: block;
        margin-top: 15px;
    }
    
    .form-section .section-header {
        padding: 12px 15px;
    }
    
    .chart-container {
        padding: 15px;
    }
    
    .chart-wrapper {
        height: 200px;
    }
}

/* ====== UTILITIES ====== */
.text-progress-primary { color: #6366f1; }
.text-progress-success { color: #10b981; }
.text-progress-warning { color: #f59e0b; }
.text-progress-danger { color: #ef4444; }
.text-progress-info { color: #06b6d4; }

.bg-progress-light { background-color: #f8fafc; }
.border-progress-light { border-color: #e5e7eb; }

/* Animation utilities */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

.slide-up {
    animation: slideUp 0.3s ease-out;
}

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

/* ====== PROGRESS ACTIONS GRID ====== */
.progress-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.progress-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 16px;
    border-radius: 12px;
    background: var(--of-primary, #2563eb);
    color: #fff;
    text-decoration: none;
    transition: all 0.15s ease;
    border: 1px solid transparent;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.15);
    min-height: 100px;
}

.progress-action-btn i {
    font-size: 24px;
}

.progress-action-btn span {
    font-weight: 600;
    font-size: 14px;
    text-align: center;
}

.progress-action-btn:hover {
    filter: brightness(1.05);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.2);
    color: #fff;
}

.progress-action-btn--disabled {
    background: var(--of-surface-muted, #f1f4f9);
    color: var(--of-text-muted, #64748b);
    border-color: var(--of-border, #e2e8f0);
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.6;
}

.progress-action-btn--disabled:hover {
    filter: none;
    transform: none;
    box-shadow: none;
}

@media (max-width: 768px) {
    .progress-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .progress-actions-grid {
        grid-template-columns: 1fr;
    }

    .progress-action-btn {
        min-height: 80px;
        padding: 16px;
    }
}