/* GIAO DIỆN PHÂN HỆ: THEO DÕI SỨC KHỎE - FITNESS & HEALTH TRACKING APP */

.health-container {
    padding: 16px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* ================= 1. GIAO DIỆN DESKTOP (BẢO LƯU 100% HIỆN CÓ) ================= */
/* ================= 1. GIAO DIỆN DESKTOP (THIẾT KẾ MỚI GỌN GÀNG THEO HÌNH MẪU) ================= */
.desktop-only-health {
    display: block;
}

.mobile-only-health {
    display: none;
}

/* HEADER DESKTOP MỚI */
.health-dt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    background: #ffffff;
    padding: 12px 18px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    flex-wrap: wrap;
}

.health-dt-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.btn-hd-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13.5px;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-hd-back:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

.hd-member-name {
    margin: 0;
    font-size: 19px;
    font-weight: 800;
    color: #075985;
    letter-spacing: -0.2px;
}

.hd-member-badge {
    font-size: 13px;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 500;
}

.btn-hd-add-record {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: #ea580c;
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(234, 88, 12, 0.25);
    transition: all 0.15s ease;
}

.btn-hd-add-record:hover {
    background: #c2410c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.35);
}

/* THANH TAB PHẲNG DESKTOP */
.health-dt-tabs-nav {
    display: flex;
    gap: 24px;
    border-bottom: 1.5px solid #e2e8f0;
    margin-bottom: 18px;
    padding-left: 4px;
}

.health-dt-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 4px;
    background: none;
    border: none;
    border-bottom: 2.5px solid transparent;
    font-size: 14.5px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-bottom: -1.5px;
}

.health-dt-tab-btn:hover {
    color: #0284c7;
}

.health-dt-tab-btn.active {
    color: #0284c7;
    font-weight: 700;
    border-bottom-color: #0284c7;
}

/* KHỐI TỔNG QUAN HIỆN TẠI (4 METRIC CARDS) */
.hd-overview-section {
    margin-bottom: 20px;
}

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

.hd-overview-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
}

.hd-overview-sub {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 500;
}

.hd-overview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.hd-overview-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease;
}

.hd-overview-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.hd-oc-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.hd-oc-icon-box.orange {
    background: #fff7ed;
    color: #ea580c;
}

.hd-oc-icon-box.blue {
    background: #eff6ff;
    color: #0284c7;
}

.hd-oc-icon-box.red {
    background: #fef2f2;
    color: #ef4444;
}

.hd-oc-icon-box.purple {
    background: #faf5ff;
    color: #9333ea;
}

.hd-oc-content {
    flex: 1;
    min-width: 0;
}

.hd-oc-title {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 2px;
}

.hd-oc-val-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.hd-oc-val {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}

.hd-oc-unit {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
}

.hd-oc-baseline {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 2px;
}

.hd-oc-tag {
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.hd-oc-tag.good {
    background: #dcfce7;
    color: #16a34a;
}

.hd-oc-tag.alert {
    background: #fee2e2;
    color: #dc2626;
}

.hd-oc-tag.muscle-up {
    background: #fee2e2;
    color: #dc2626;
}

.hd-oc-tag.neutral {
    background: #f1f5f9;
    color: #64748b;
}

/* KHỐI CARD DANH SÁCH LẦN ĐO KÈM BỘ LỌC TÍCH HỢP */
.hd-records-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    overflow: hidden;
    margin-bottom: 24px;
}

.hd-unified-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid #f1f5f9;
    flex-wrap: wrap;
    background: #ffffff;
}

.hd-records-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
}

.hd-records-count {
    font-weight: 700;
    color: #0284c7;
}

.hd-period-pills {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hd-period-btn {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s ease;
}

.hd-period-btn:hover {
    background: #f8fafc;
    color: #1e293b;
}

.hd-period-btn.active {
    background: #0284c7;
    border-color: #0284c7;
    color: #ffffff;
    font-weight: 700;
}

.hd-date-filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hd-date-input-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12.5px;
}

.hd-date-label {
    color: #64748b;
    font-weight: 500;
    font-size: 12px;
}

.hd-date-val {
    border: none;
    background: transparent;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    width: 85px;
    cursor: pointer;
    outline: none;
}

.hd-date-arrow {
    color: #94a3b8;
    font-size: 12px;
}

.btn-hd-filter {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    background: #0284c7;
    border: none;
    border-radius: 6px;
    color: #ffffff;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-hd-filter:hover {
    background: #0369a1;
}

.btn-hd-reset {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-hd-reset:hover {
    background: #f1f5f9;
}

/* BẢNG DATA TABLE MỚI */
.hd-data-table thead th {
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
    font-size: 13px;
    padding: 12px 14px;
    border-bottom: 1px solid #e2e8f0;
    border-top: none;
}

.hd-table-row {
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.12s ease;
}

.hd-table-row:hover {
    background: #f8fafc;
}

.hd-tb-cycle {
    font-weight: 800;
    color: #0284c7;
    font-size: 14px;
}

.hd-tb-date {
    font-size: 12px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 3px;
}

.hd-badge-origin {
    background: #e0e7ff;
    color: #3730a3;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 4px;
}

.hd-tb-val {
    font-weight: 800;
    font-size: 14px;
    color: #0f172a;
}

.hd-tb-delta {
    font-size: 12px;
    font-weight: 700;
    margin-top: 3px;
    display: inline-block;
}

.hd-tb-delta.good {
    color: #16a34a;
}

.hd-tb-delta.alert {
    color: #dc2626;
}

.hd-tb-delta.muscle {
    color: #dc2626;
}

.hd-tb-rounds {
    color: #7c3aed;
    font-weight: 600;
    font-size: 13px;
}

.btn-hd-row-detail {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-hd-row-detail:hover {
    border-color: #0284c7;
    color: #0284c7;
    background: #f0f9ff;
}

/* THANH HEADER GỌN GÀNG CŨ (BẢO LƯU DỰ PHÒNG) */
.health-compact-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    background: #ffffff;
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid #e2ede8;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    flex-wrap: wrap;
    gap: 10px;
}

.health-member-info-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.health-member-name {
    font-size: 17px;
    font-weight: 800;
    color: #0369a1;
}

.health-member-meta {
    font-size: 13px;
    color: #64748b;
    background: #f1f5f9;
    padding: 3px 10px;
    border-radius: 6px;
    font-weight: 600;
}

/* DẢI CHỈ SỐ TÓM TẮT DESKTOP */
.health-compact-stats-strip {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.health-stat-pill {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    flex: 1;
    min-width: 180px;
}

.health-stat-pill .stat-icon {
    font-size: 15px;
    display: inline-flex;
    align-items: center;
}

.health-stat-pill .stat-name {
    font-weight: 700;
    color: #64748b;
}

.health-stat-pill .stat-val {
    font-weight: 800;
    color: #0f172a;
    font-size: 14.5px;
}

/* HUY HIỆU CHÊNH LỆCH DELTA DESKTOP */
.health-delta-down {
    color: #0284c7;
    background: #f0f9ff;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.health-delta-up {
    color: #f97316;
    background: #fff7ed;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.health-delta-up.good {
    color: #16a34a;
    background: #f0fdf4;
}

.health-delta-neutral {
    color: #64748b;
    background: #f1f5f9;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

/* THANH ĐIỀU HƯỚNG TAB CHÍNH GỌN */
.health-tabs-compact {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid #E2E8F0;
    margin-bottom: 14px;
}

.health-tab-btn-compact {
    padding: 9px 16px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 13.5px;
    font-weight: 600;
    color: #64748B;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.health-tab-btn-compact:hover {
    color: #0F172A;
}

.health-tab-btn-compact.active {
    color: #2563EB;
    border-bottom-color: #2563EB;
    font-weight: 700;
}

/* NÚT CHUYỂN ĐỔI CHU KỲ DESKTOP */
.health-period-pills {
    display: inline-flex;
    background: #F1F5F9;
    padding: 3px;
    border-radius: 8px;
    gap: 2px;
}

.health-period-btn {
    padding: 5px 12px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #64748B;
    cursor: pointer;
    transition: all 0.15s ease;
}

.health-period-btn.active {
    background: #FFFFFF;
    color: #2563EB;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.health-period-btn:hover:not(.active) {
    color: #0F172A;
}

/* BẢNG 2 CỘT THÔNG SỐ TRUYỀN THỐNG */
.health-two-column-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #FFFFFF;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #E2E8F0;
    margin-bottom: 16px;
}

.health-two-column-table th {
    background: #F8FAFC;
    padding: 12px 16px;
    font-size: 13.5px;
    font-weight: 600;
    color: #0F172A;
    border-bottom: 1px solid #E2E8F0;
    text-align: left;
}

.health-two-column-table td {
    padding: 11px 16px;
    font-size: 13.5px;
    border-bottom: 1px solid #F1F5F9;
}

.health-two-column-table td.param-name {
    font-weight: 600;
    color: #334155;
    width: 45%;
    background: #FAFAFA;
}

.health-two-column-table td.param-value {
    font-weight: 600;
    color: #0F172A;
}


/* ================= 2. GIAO DIỆN MOBILE UI (FITNESS & HEALTH TRACKING APP) ================= */

/* Card thành viên ở màn hình danh sách ngoài cùng */
.health-mobile-members-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.m-member-health-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.m-member-health-card:active {
    transform: scale(0.99);
}

.m-member-hc-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.m-member-hc-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #E0F2FE;
    color: #0284C7;
    font-weight: 800;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.m-member-hc-info {
    flex: 1;
    min-width: 0;
}

.m-member-hc-name {
    font-size: 16px;
    font-weight: 800;
    color: #0F172A;
    line-height: 1.3;
}

.m-member-hc-sub {
    font-size: 12.5px;
    color: #64748B;
    margin-top: 2px;
}

.m-member-hc-addr {
    font-size: 12px;
    color: #94A3B8;
    margin-top: 1px;
}

.m-member-hc-arrow {
    color: #94A3B8;
}

.m-member-hc-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #F1F5F9;
    font-size: 12px;
}

.m-member-hc-last-date {
    color: #475569;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.m-member-hc-badge {
    background: #EFF6FF;
    color: #0284C7;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
}

/* Header Profile Thành Viên (Màn hình 1 Mobile) */
.health-mobile-profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    background: transparent;
}

.m-btn-back-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid #E2E8F0;
    background: #FFFFFF;
    color: #0F172A;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.m-profile-info-col {
    flex: 1;
    min-width: 0;
}

.m-profile-name {
    font-size: 17px;
    font-weight: 800;
    color: #0F172A;
    line-height: 1.25;
}

.m-profile-sub1 {
    font-size: 12.5px;
    color: #64748B;
    margin-top: 2px;
}

.m-profile-sub2 {
    font-size: 12px;
    color: #94A3B8;
}

.m-btn-add-orange-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #EA580C;
    border: none;
    color: #FFFFFF;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.35);
    transition: transform 0.15s ease;
}

.m-btn-add-orange-circle:active {
    transform: scale(0.94);
}

/* Tiêu đề từng mục (Section Header) */
.m-health-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    cursor: pointer;
}

.m-health-section-title {
    font-size: 16px;
    font-weight: 800;
    color: #0F172A;
    letter-spacing: -0.3px;
}

.m-health-section-arrow {
    color: #64748B;
    display: inline-flex;
}

.m-health-filter-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid #E2E8F0;
    background: #FFFFFF;
    color: #0284C7;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Lưới 2 cột Metric Cards (Cân nặng, % Mỡ, Cơ bắp, Vòng eo) */
.m-health-metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.m-metric-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    cursor: pointer;
    transition: transform 0.15s ease;
}

.m-metric-card:active {
    transform: scale(0.98);
}

.m-metric-card-top {
    display: flex;
    align-items: center;
    gap: 8px;
}

.m-metric-icon-box {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
}

.m-metric-icon-box.orange {
    background: #FFF7ED;
    color: #EA580C;
}

.m-metric-icon-box.blue {
    background: #EFF6FF;
    color: #0284C7;
}

.m-metric-icon-box.yellow {
    background: #FEF3C7;
    color: #D97706;
}

.m-metric-icon-box.purple {
    background: #F3E8FF;
    color: #9333EA;
}

.m-metric-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.m-metric-val {
    font-size: 20px;
    font-weight: 800;
    color: #0F172A;
    margin: 8px 0 2px 0;
    line-height: 1.2;
}

.m-metric-unit {
    font-size: 14px;
    font-weight: 600;
    color: #475569;
}

.m-metric-baseline {
    font-size: 11.5px;
    color: #94A3B8;
}

.m-metric-subtext {
    font-size: 11.5px;
    color: #64748B;
    margin-bottom: 2px;
}

.m-metric-tag-wrap {
    margin-top: 6px;
}

.m-metric-tag {
    font-size: 11px;
    font-weight: 700;
    padding: 2.5px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.m-metric-tag.positive {
    background: #DCFCE7;
    color: #15803D;
}

.m-metric-tag.alert {
    background: #FFEDD5;
    color: #C2410C;
}

.m-metric-tag.neutral {
    background: #F1F5F9;
    color: #64748B;
}

/* Dải nút Sắp xếp chu kỳ (Segmented Pills) */
.m-health-period-bar {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 4px;
}

.m-health-period-bar::-webkit-scrollbar {
    display: none;
}

.m-period-pill {
    padding: 6px 14px;
    border: 1px solid #E2E8F0;
    background: #FFFFFF;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 600;
    color: #64748B;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.m-period-pill.active {
    background: #EFF6FF;
    border-color: #0284C7;
    color: #0284C7;
    font-weight: 700;
}

/* Danh sách Card Lần Đo (Màn hình 1 Mobile) */
.m-health-records-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.m-health-record-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
    cursor: pointer;
    transition: transform 0.15s ease;
}

.m-health-record-card:active {
    transform: scale(0.99);
}

.m-rc-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.m-rc-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #F3E8FF;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.m-rc-title-wrap {
    flex: 1;
    min-width: 0;
}

.m-rc-title {
    font-size: 14.5px;
    font-weight: 700;
    color: #0F172A;
    line-height: 1.3;
}

.m-rc-date {
    font-size: 12px;
    color: #64748B;
}

.m-rc-arrow {
    color: #94A3B8;
    display: inline-flex;
}

.m-rc-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #F1F5F9;
    text-align: center;
    gap: 4px;
}

.m-rc-stat-val {
    font-size: 14px;
    font-weight: 800;
    color: #0F172A;
}

.m-rc-stat-label {
    font-size: 11px;
    color: #94A3B8;
    margin-top: 2px;
}

.m-rc-stat-diff {
    font-size: 10.5px;
    margin-top: 2px;
}

.m-rc-delta {
    font-weight: 700;
}

.m-rc-delta.good {
    color: #16A34A;
}

.m-rc-delta.alert {
    color: #EA580C;
}

.m-rc-delta.neutral {
    color: #94A3B8;
}

.m-no-records-card {
    text-align: center;
    padding: 30px 16px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    color: #94A3B8;
    font-size: 13.5px;
}


/* ================= 3. MÀN HÌNH CHI TIẾT LẦN ĐO TRÊN MOBILE (MÀN HÌNH 2) ================= */
.m-record-detail-container {
    animation: fadeIn 0.15s ease;
}

.m-detail-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.m-detail-back-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid #E2E8F0;
    background: #FFFFFF;
    color: #0F172A;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.m-detail-topbar-title {
    font-size: 17px;
    font-weight: 800;
    color: #0F172A;
}

.m-detail-delete-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid #FEE2E2;
    background: #FEF2F2;
    color: #DC2626;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.m-detail-period-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.m-badge-newest {
    margin-left: auto;
    background: #DCFCE7;
    color: #15803D;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
}

.m-card-diff-tag {
    font-size: 11.5px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}

.m-card-diff-tag.good {
    color: #16A34A;
    background: #DCFCE7;
}

.m-card-diff-tag.alert {
    color: #EA580C;
    background: #FFEDD5;
}

.m-card-diff-tag.neutral {
    color: #94A3B8;
}

/* Các Card Nhóm Chỉ Số Chi Tiết (Full Width) */
.m-detail-group-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
    cursor: pointer;
}

.m-detail-group-content {
    flex: 1;
    min-width: 0;
}

.m-detail-group-title {
    font-size: 14px;
    font-weight: 700;
    color: #0F172A;
}

.m-detail-group-desc {
    font-size: 12.5px;
    color: #475569;
    margin-top: 2px;
}

.m-detail-actions-footer {
    margin-top: 18px;
    padding-bottom: 24px;
}

.m-detail-edit-btn {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 10px;
    background: #2563EB !important;
    border-color: #2563EB !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}


/* ================= 4. BOTTOM SHEET BỘ LỌC THỜI GIAN TRÊN MOBILE (MÀN HÌNH 3) ================= */
.m-filter-sheet-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
    z-index: 1050;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.m-filter-bottom-sheet {
    background: #FFFFFF;
    width: 100%;
    max-width: 480px;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    padding: 14px 20px 24px 20px;
    box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.15);
    animation: slideUpSheet 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpSheet {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.m-sheet-handle {
    width: 40px;
    height: 4px;
    background: #CBD5E1;
    border-radius: 2px;
    margin: 0 auto 12px auto;
}

.m-sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.m-sheet-title {
    font-size: 16.5px;
    font-weight: 800;
    color: #0F172A;
}

.m-sheet-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #F1F5F9;
    color: #475569;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.m-sheet-period-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
}

.m-sheet-period-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.m-sheet-period-item:hover {
    background: #F8FAFC;
}

.m-sheet-period-item.active {
    background: #EFF6FF;
    color: #0284C7;
    font-weight: 700;
}

.m-sheet-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.m-sheet-check-icon {
    color: #0284C7;
    font-weight: 800;
    font-size: 15px;
}

.m-sheet-custom-date-section {
    border-top: 1px solid #F1F5F9;
    padding-top: 14px;
    margin-bottom: 18px;
}

.m-sheet-section-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 10px;
}

.m-sheet-date-inputs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.m-sheet-date-box {
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    padding: 8px 12px;
    background: #F8FAFC;
    cursor: pointer;
}

.m-sheet-date-label {
    font-size: 11px;
    color: #64748B;
    display: block;
    margin-bottom: 2px;
}

.m-sheet-date-input-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.m-sheet-date-val {
    border: none;
    background: transparent;
    outline: none;
    font-size: 13.5px;
    font-weight: 600;
    color: #0F172A;
    width: 100%;
    cursor: pointer;
}

.m-sheet-apply-btn {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 10px;
    background: #2563EB !important;
    border-color: #2563EB !important;
}


/* ================= 5. RESPONSIVE BREAKPOINT CHO MOBILE (< 768px) ================= */
@media (max-width: 768px) {
    .health-container {
        padding: 10px 12px;
    }

    .desktop-only-health {
        display: none !important;
    }

    .mobile-only-health {
        display: block !important;
    }

    .health-tabs-scrollable {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 6px;
        padding-bottom: 4px;
    }

    .health-tabs-scrollable::-webkit-scrollbar {
        display: none;
    }

    .health-tab-btn-compact {
        padding: 8px 12px;
        font-size: 13px;
        flex-shrink: 0;
    }

    .health-new-record-card {
        padding: 14px;
        border-radius: 12px;
    }
}
