/**
 * Progress Page - Weight Section (Log + Progress + Chart + Table)
 * قسم الوزن الكامل
 */

/* Weight Log */
.weight-log-card,
.weight-logged-card {
    margin-bottom: var(--spacing-lg);
}

.weight-input-group {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

.weight-input-field {
    flex: 1;
    padding: var(--spacing-md);
    border: 2px solid rgba(197, 160, 89, 0.2);
    border-radius: var(--radius-md);
    background: #ffffff;
    color: #c5a059 !important;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Cairo', sans-serif;
    transition: all var(--transition-smooth);
    -webkit-text-fill-color: #c5a059 !important;
}

.weight-input-field::placeholder {
    color: rgba(197, 160, 89, 0.4) !important;
    -webkit-text-fill-color: rgba(197, 160, 89, 0.4) !important;
}

.weight-input-field:focus {
    outline: none;
    border-color: #c5a059;
    box-shadow: 0 0 0 4px rgba(197, 160, 89, 0.1);
    color: #c5a059 !important;
    -webkit-text-fill-color: #c5a059 !important;
}

.weight-input-field::-webkit-input-placeholder {
    color: rgba(197, 160, 89, 0.4) !important;
    -webkit-text-fill-color: rgba(197, 160, 89, 0.4) !important;
}

.weight-input-field::-moz-placeholder {
    color: rgba(197, 160, 89, 0.4) !important;
    opacity: 1;
}

.weight-input-field:-ms-input-placeholder {
    color: rgba(197, 160, 89, 0.4) !important;
}

.weight-unit-label {
    font-weight: 600;
    color: #8a8880;
    font-size: 14px;
}

.weight-log-btn {
    white-space: nowrap;
}

.xp-badge {
    font-size: 12px;
    opacity: 0.8;
}

/* Weight Logged Confirmation */
.weight-logged-card {
    background: #ffffff !important;
    border: 1px solid rgba(197, 160, 89, 0.2) !important;
    box-shadow: 0 10px 30px rgba(197, 160, 89, 0.05) !important;
}

.weight-logged-content {
    text-align: center;
    padding: var(--spacing-xl);
}

.weight-logged-icon {
    font-size: 48px;
    margin-bottom: var(--spacing-md);
    color: #c5a059 !important;
    animation: scale-in 0.5s ease-out;
}

@keyframes scale-in {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.weight-logged-message {
    font-size: 18px;
    font-weight: 700;
    color: #c5a059 !important;
    margin-bottom: var(--spacing-xs);
}

.weight-logged-value {
    font-size: 32px;
    font-weight: 900;
    color: #8a8880 !important;
}

/* Weight Tracking Locked */
.weight-locked-card {
    border: 1px dashed rgba(197, 160, 89, 0.4) !important; 
    background: #ffffff !important;
    text-align: center;
    border-radius: var(--radius-xl);
    box-shadow: 0 10px 30px rgba(197, 160, 89, 0.05) !important;
}

.weight-locked-content {
    padding: var(--spacing-xl);
}

.weight-locked-icon {
    font-size: 40px; 
    margin-bottom: var(--spacing-md); 
    color: #c5a059;
}

.weight-locked-title {
    margin-bottom: var(--spacing-xs); 
    font-size: 18px; 
    color: #8a8880;
    font-weight: 700;
}

.weight-locked-desc {
    color: #8a8880; 
    margin: 0; 
    font-size: 15px; 
    font-weight: 600;
}

/* Progress to Target */
.progress-percent-badge {
    font-size: 18px;
    font-weight: 700;
    color: #c5a059 !important;
    padding: var(--spacing-xs) var(--spacing-md);
    background: rgba(197, 160, 89, 0.1);
    border-radius: var(--radius-full);
    border: 1px solid rgba(197, 160, 89, 0.3);
}

.progress-bar-container {
    margin-bottom: var(--spacing-md);
}

.progress-bar-fill {
    background: #c5a059 !important;
}

.progress-markers {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #8a8880;
    flex-wrap: wrap;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-md);
}

.weight-lost-card {
    margin-top: var(--spacing-md);
    padding: var(--spacing-md);
    background: rgba(197, 160, 89, 0.05) !important;
    border: 1px solid rgba(197, 160, 89, 0.2) !important;
    border-radius: var(--radius-md);
    text-align: center;
}

.weight-lost-label {
    font-size: 12px;
    color: #8a8880 !important;
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
}

.weight-lost-value {
    font-size: 28px;
    font-weight: 900;
    color: #c5a059 !important;
}

/* Journey Stats */
.weight-journey-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.weight-stat-card {
    background: #ffffff !important;
    border: 1px solid rgba(197, 160, 89, 0.15) !important;
    border-radius: var(--radius-lg);
    padding: var(--spacing-md) !important;
    text-align: center;
    transition: all var(--transition-smooth);
    box-shadow: 0 4px 20px rgba(197, 179, 88, 0.04) !important;
}

@media (min-width: 768px) {
    .weight-stat-card {
        padding: var(--spacing-lg) !important;
    }
}

.weight-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(197, 179, 88, 0.12) !important;
    border-color: rgba(197, 160, 89, 0.4) !important;
}

.weight-stat-icon {
    font-size: 24px;
    margin-bottom: var(--spacing-xs);
    color: #c5a059;
}

.weight-stat-label {
    font-size: 11px !important;
    color: #8a8880 !important;
    margin-bottom: var(--spacing-sm) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    font-weight: 700 !important;
    opacity: 0.8;
}

.weight-stat-value {
    font-size: 26px !important;
    font-weight: 900 !important;
    color: #6c5e06 !important;
    margin-bottom: 2px !important;
    line-height: 1.2 !important;
}

.weight-stat-unit {
    font-size: 12px;
    color: #8a8880;
}

.weight-stat-change {
    font-size: 20px;
    font-weight: 900;
    margin-bottom: var(--spacing-xs);
}

.weight-stat-change.positive {
    color: #58cc02;
}

.weight-stat-change.negative {
    color: #ff4b4b;
}

.weight-stat-change.neutral {
    color: #8a8880;
}

.weight-stat-percentage {
    font-size: 11px;
    color: #8a8880;
    font-weight: 600;
}

.no-data-message {
    font-size: 12px;
    color: #8a8880;
    font-style: italic;
}

.weight-chart-container {
    position: relative;
    width: 100%;
    margin-bottom: var(--spacing-lg);
    min-height: 350px;
    overflow: hidden;
    background: #ffffff !important;
    border: 1px solid rgba(197, 160, 89, 0.1) !important;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 15px rgba(197, 160, 89, 0.02) !important;
}

.chart-empty-state {
    text-align: center;
    padding: var(--spacing-2xl);
    color: #8a8880;
}

.chart-empty-icon {
    font-size: 48px;
    margin-bottom: var(--spacing-md);
    color: #c5a059;
}

.chart-empty-text {
    font-size: 14px;
    font-weight: 500;
}

/* Progress Summary */
.progress-summary-card {
    background: #ffffff !important;
    border: 1px solid rgba(197, 160, 89, 0.2) !important;
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    margin-top: var(--spacing-lg);
    box-shadow: 0 10px 30px rgba(197, 160, 89, 0.05) !important;
}

.progress-summary-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid rgba(197, 160, 89, 0.1) !important;
}

.progress-summary-icon {
    display: inline-flex !important;
    align-items: center !important;
}

.progress-summary-title-main {
    margin: 0 !important;
}

.progress-summary-title-sub {
    font-size: 12px;
    color: #8a8880;
    font-weight: 500;
}

.progress-summary-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
}

.progress-summary-stat-item {
    background: rgba(197, 160, 89, 0.03) !important;
    border: 1px solid rgba(197, 160, 89, 0.1) !important;
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    text-align: center;
    transition: all var(--transition-smooth);
}

.progress-summary-stat-item:hover {
    background: rgba(197, 160, 89, 0.05) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(197, 160, 89, 0.03);
}

.progress-summary-stat-item.highlight {
    background: rgba(197, 160, 89, 0.07) !important;
    border-color: rgba(197, 160, 89, 0.3) !important;
}

.progress-summary-stat-label {
    font-size: 11px;
    color: #8a8880;
    margin-bottom: var(--spacing-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.progress-summary-stat-value {
    font-size: 24px;
    font-weight: 900;
    color: #c5a059;
}

.progress-summary-stat-value.positive {
    color: #58cc02;
}

.progress-summary-stat-value.negative {
    color: #ff4b4b;
}

.progress-summary-stat-value.neutral {
    color: #8a8880;
}

.stat-unit {
    font-size: 14px;
    color: #8a8880;
    font-weight: 600;
}

/* Tracking Table */
.weight-tracking-table-wrapper {
    margin-top: var(--spacing-lg);
    background: #ffffff !important;
    border: 1px solid rgba(197, 160, 89, 0.2) !important;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(197, 160, 89, 0.05) !important;
}

.weight-tracking-table-header {
    padding: var(--spacing-md) var(--spacing-lg);
    background: rgba(197, 160, 89, 0.03);
    border-bottom: 1px solid rgba(197, 160, 89, 0.1);
}

.weight-tracking-table-title {
    font-size: 16px;
    font-weight: 700;
    color: #1c1b19;
}

.weight-tracking-table {
    width: 100%;
    border-collapse: collapse;
}

.weight-tracking-table thead {
    background: rgba(197, 160, 89, 0.02);
}

.weight-tracking-table th {
    padding: var(--spacing-md);
    text-align: start;
    font-size: 12px;
    font-weight: 700;
    color: #8a8880;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(197, 160, 89, 0.1);
}

.weight-tracking-table tbody tr {
    border-bottom: 1px solid rgba(197, 160, 89, 0.05);
    transition: all var(--transition-fast);
}

.weight-tracking-table tbody tr:hover {
    background: rgba(197, 160, 89, 0.02);
}

.weight-tracking-table td {
    padding: var(--spacing-md);
    font-size: 14px;
    color: #1c1b19;
}

.change-indicator {
    display: inline-block;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 700;
}

.change-indicator.positive {
    color: #58cc02;
    background: rgba(88, 204, 2, 0.1);
}

.change-indicator.negative {
    color: #ff4b4b;
    background: rgba(255, 75, 75, 0.1);
}

.change-indicator.neutral {
    color: #8a8880;
    background: rgba(197, 160, 89, 0.1);
}

.weight-tracking-table-empty {
    padding: var(--spacing-2xl);
    text-align: center;
    color: #8a8880;
}

.weight-tracking-table-empty-icon {
    font-size: 48px;
    margin-bottom: var(--spacing-md);
    color: #c5a059;
}

.weight-tracking-table-empty-text {
    font-size: 14px;
    font-weight: 600;
}

/* Change Bars */
.weight-change-bar {
    height: 4px;
    background: rgba(197, 160, 89, 0.1);
    border-radius: var(--radius-full);
    margin-top: var(--spacing-sm);
    overflow: hidden;
    width: 100%;
}
.weight-change-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 1s ease-out;
}
.weight-change-bar-fill.positive {
    background: #58cc02;
}
.weight-change-bar-fill.negative {
    background: #ff4b4b;
}

/* Bullet Chart */
.progress-bullet-chart { margin-top: var(--spacing-md); }
.bullet-track {
    position: relative; height: 12px;
    background: rgba(197, 160, 89, 0.1);
    border-radius: var(--radius-full);
    overflow: visible;
}
.bullet-range {
    height: 100%;
    background: rgba(197, 160, 89, 0.05);
    border-radius: var(--radius-full);
}
.bullet-current {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 16px; height: 16px;
    background: #c5a059;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.9);
    box-shadow: 0 0 8px rgba(197, 160, 89, 0.6);
    z-index: 2;
    transition: inset-inline-start 1s cubic-bezier(0.4, 0, 0.2, 1);
}
.bullet-start-marker {
    position: absolute; top: -2px;
    width: 2px; height: 16px;
    background: #8a8880;
    opacity: 0.5; z-index: 1;
}
.bullet-target-marker {
    position: absolute; top: -2px;
    width: 2px; height: 16px;
    background: #ffc800;
    z-index: 1;
    box-shadow: 0 0 4px #ffc800;
}
.bullet-labels {
    display: flex; justify-content: space-between;
    font-size: 10px; color: #8a8880;
    margin-top: var(--spacing-xs); font-weight: 600;
}

.progress-summary-reordered {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}
.progress-summary-reordered .highlight {
    grid-column: 1 / -1;
}

/* Responsive adjustment for journey stats */
@media (max-width: 480px) {
    .weight-journey-stats {
        grid-template-columns: 1fr !important;
        gap: var(--spacing-md);
    }
    .progress-summary-reordered {
        grid-template-columns: 1fr !important;
    }
}
/* Maintenance Range Slider Track & Badges */
.maintenance-track {
    position: relative;
    height: 12px;
    background: rgba(197, 160, 89, 0.08) !important;
    border: 1px solid rgba(197, 160, 89, 0.15) !important;
    border-radius: var(--radius-full);
}
.weight-progress-section .bullet-current {
    width: 18px !important;
    height: 18px !important;
    background: #6c5e06 !important;
    border: 2px solid #ffffff !important;
    box-shadow: 0 4px 10px rgba(108, 94, 6, 0.3) !important;
}

/* ============================================================================
   👑 CUSTOM OVERRIDES FOR BLACK/GOLD CARD THEME (PREMIUM WELLNESS)
   ============================================================================ */
html body .weight-log-card,
html body .weight-logged-card,
html body .weight-locked-card {
    background: #121212 !important;
    border: 1px solid rgba(197, 160, 89, 0.3) !important;
    border-radius: 16px !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55), 0 0 20px rgba(197, 160, 89, 0.05) !important;
    color: #ffffff !important;
    padding: 24px !important;
}

/* Card Titles */
html body .weight-log-card h2,
html body .weight-logged-card h3,
html body .weight-locked-card h3 {
    color: #C5A059 !important;
    -webkit-text-fill-color: #C5A059 !important;
    font-weight: 800 !important;
    font-size: 13px !important;
    letter-spacing: 0.15em !important;
    text-transform: uppercase !important;
    font-family: 'Cairo', 'Inter', sans-serif !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 0 16px 0 !important;
}

/* Outline Gold Material Symbols */
html body .weight-log-card .material-symbols-outlined,
html body .weight-logged-card .material-symbols-outlined,
html body .weight-locked-card .material-symbols-outlined {
    color: #C5A059 !important;
    -webkit-text-fill-color: #C5A059 !important;
    font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24 !important;
    font-size: 24px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Quick weight input styling */
html body #quickWeightInput {
    background: #1c1c1c !important;
    border-bottom: 2px solid rgba(197, 160, 89, 0.25) !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    color: #ffffff !important;
    border-radius: 4px 4px 0 0 !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
}

html body #quickWeightInput:focus {
    border-bottom-color: #C5A059 !important;
    background: #242424 !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Input labels and unit text */
html body .weight-log-card span.text-on-surface-variant {
    color: #C5A059 !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
    opacity: 0.8;
}

/* Submit Log Button */
html body #logWeightBtn {
    background: #C5A059 !important;
    color: #121212 !important;
    border: 1px solid #C5A059 !important;
    border-radius: 12px !important;
    padding: 12px 24px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(197, 160, 89, 0.2) !important;
}

html body #logWeightBtn:hover {
    background: #dfb56c !important;
    box-shadow: 0 6px 20px rgba(197, 160, 89, 0.4) !important;
    transform: translateY(-1px) !important;
}

html body #logWeightBtn:active {
    transform: translateY(1px) !important;
}

html body #logWeightBtn .material-symbols-outlined {
    color: #121212 !important;
    -webkit-text-fill-color: #121212 !important;
    font-weight: 800 !important;
}

/* XP Badge on Button */
html body #logWeightBtn span.bg-primary-fixed {
    background: #121212 !important;
    color: #C5A059 !important;
    border: 1px solid #C5A059 !important;
}

/* Logged weight info text */
html body .weight-logged-card .text-primary,
html body .weight-logged-card .font-headline-sm {
    color: #C5A059 !important;
    font-family: 'Cairo', 'Inter', sans-serif !important;
}

html body .weight-logged-card .text-on-surface-variant {
    color: rgba(255, 255, 255, 0.7) !important;
    font-family: 'Inter', sans-serif !important;
}

/* Locked state text */
html body .weight-locked-card .text-on-surface {
    color: #ffffff !important;
    font-family: 'Cairo', 'Inter', sans-serif !important;
}

html body .weight-locked-card .text-on-surface-variant {
    color: #1a1c1c !important; /* Black */
    font-family: 'Cairo', 'Inter', sans-serif !important;
}

/* Progress percent badge */
html body .progress-percent-badge {
    background: rgba(197, 160, 89, 0.1) !important;
    color: #C5A059 !important;
    border: 1px solid rgba(197, 160, 89, 0.35) !important;
    font-family: 'Inter', sans-serif !important;
}

/* Progress bar container and fill */
html body .progress-bar-container {
    background: #1c1c1c !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

html body .progress-bar-fill {
    background: linear-gradient(90deg, #C5A059, #dfb56c) !important;
}

/* Range slider track for maintenance zone */
html body .maintenance-track {
    background: #1c1c1c !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* Maintenance green zone overlay overrides */
html body .maintenance-track div[style*="left: 12.5%"] {
    background: rgba(197, 160, 89, 0.12) !important;
    border-left: 1px solid rgba(197, 160, 89, 0.25) !important;
    border-right: 1px solid rgba(197, 160, 89, 0.25) !important;
}

/* Current pos marker handle */
html body .maintenance-track .bullet-current {
    background: #C5A059 !important;
    border-color: #ffffff !important;
    box-shadow: 0 0 10px rgba(197, 160, 89, 0.5) !important;
}

html body .maintenance-track .bullet-current div {
    background: #121212 !important;
}

/* Target center line */
html body .maintenance-track div[class*="bg-primary/40"] {
    background: #C5A059 !important;
}

/* Progress markers under track */
html body .progress-markers div,
html body .progress-markers span {
    color: rgba(255, 255, 255, 0.7) !important;
    font-family: 'Inter', sans-serif !important;
}

html body .progress-markers .text-primary span,
html body .progress-markers .text-primary {
    color: #C5A059 !important;
}

/* Footer summary card (weight lost/deviating) */
html body .weight-lost-card {
    background: rgba(197, 160, 89, 0.08) !important;
    border: 1px solid rgba(197, 160, 89, 0.2) !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
}

html body .weight-lost-label {
    color: rgba(255, 255, 255, 0.8) !important;
    font-family: 'Cairo', 'Inter', sans-serif !important;
}

html body .weight-lost-value {
    color: #C5A059 !important;
    font-weight: 700 !important;
    font-family: 'Inter', sans-serif !important;
}

/* Responsive adjustment */
@media (max-width: 768px) {
    html body .weight-log-card,
    html body .weight-logged-card,
    html body .weight-locked-card,
    html body .weight-progress-section {
        padding: 16px !important;
    }
}
