/* =========================================
   PAGINA MEDICIONES INBODY — Glassmorphism
   Scoped under .inbody-page
   ========================================= */

.inbody-page {
    padding: clamp(16px, 4vw, 24px);
    padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px));
    max-width: 600px;
    margin: 0 auto;
}

.inbody-page .page-header {
    text-align: center;
    margin-bottom: 20px;
}

.inbody-page .page-header h2 {
    color: white;
    font-size: clamp(20px, 5vw, 24px);
    font-weight: 700;
    margin: 0;
}

/* ===== MEASUREMENTS LIST ===== */
.inbody-page .measurements-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.inbody-page .measurement-card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.inbody-page .measurement-card.expanded {
    background: rgba(255, 255, 255, 0.16);
}

.inbody-page .measurement-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.inbody-page .measurement-date {
    display: flex;
    flex-direction: row;
    gap: 6px;
    color: white;
    font-size: 14px;
    align-items: center;
}

.inbody-page .measurement-date i {
    color: rgba(255, 255, 255, 0.5);
}

.inbody-page .expand-icon {
    color: rgba(255, 255, 255, 0.5);
    transition: transform 0.3s ease;
}

/* ===== MEASUREMENT METRICS (4-col grid) ===== */
.inbody-page .measurement-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.inbody-page .metric {
    text-align: center;
}

.inbody-page .metric-value {
    color: white;
    font-size: 17px;
    font-weight: 700;
    display: block;
}

.inbody-page .metric-value.positive {
    color: #6ee7b7;
}

.inbody-page .metric-value.negative {
    color: #fca5a5;
}

.inbody-page .metric-value.accent {
    color: #67e8f9;
}

.inbody-page .metric-label {
    color: rgba(255, 255, 255, 0.45);
    font-size: 11px;
    display: block;
    margin-top: 2px;
}

/* ===== MEASUREMENT DETAILS (expanded) ===== */
.inbody-page .measurement-details {
    padding-top: 14px;
    margin-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.inbody-page .detail-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.inbody-page .detail-row:last-child {
    border-bottom: none;
}

.inbody-page .detail-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
}

.inbody-page .detail-value {
    color: white;
    font-size: 14px;
    font-weight: 600;
}

.inbody-page .detail-notes {
    margin-top: 10px;
}

.inbody-page .detail-notes .detail-label {
    display: block;
    margin-bottom: 4px;
}

.inbody-page .detail-notes p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
    margin: 0;
    line-height: 1.5;
}

/* ===== COMPARISON CARD ===== */
.inbody-page .comparison-card {
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 18px;
    margin-top: 20px;
}

.inbody-page .card-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.inbody-page .card-header h3 {
    color: white;
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}

.inbody-page .card-icon {
    color: white;
    font-size: 20px;
}

.inbody-page .comparison-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 14px 0;
}

.inbody-page .comparison-item {
    text-align: center;
}

.inbody-page .comparison-label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    display: block;
    margin-bottom: 4px;
}

.inbody-page .comparison-value {
    font-size: 16px;
    font-weight: 700;
    display: block;
}

.inbody-page .comparison-value.positive {
    color: #6ee7b7;
}

.inbody-page .comparison-value.negative {
    color: #fca5a5;
}

.inbody-page .comparison-value.neutral {
    color: white;
}

.inbody-page .comparison-period {
    display: block;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
    margin-top: 4px;
}

/* ===== EMPTY STATE ===== */
.inbody-page .empty-state {
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    border-radius: 20px;
    padding: 40px 24px;
    text-align: center;
}

.inbody-page .empty-state .empty-state-icon {
    color: rgba(255, 255, 255, 0.35);
    font-size: 48px;
    margin-bottom: 16px;
}

.inbody-page .empty-state h3 {
    color: white;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.inbody-page .empty-state p {
    color: rgba(255, 255, 255, 0.55);
    font-size: 14px;
    margin-bottom: 20px;
}

/* ===== LOADING SPINNER ===== */
.inbody-page .loading-container {
    padding: 60px 24px;
    text-align: center;
}

.inbody-page .loading-container .loading-spinner {
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: white;
}

.inbody-page .loading-container .loading-message {
    color: rgba(255, 255, 255, 0.55);
    font-size: 14px;
    margin-top: 12px;
}
