﻿/* =========================
   VCareWithHSize.css (clean)
   Executive Coverage UI
   ========================= */

/* Page */
.vcare-page {
    padding: 12px 2px 24px;
}

/* =========================
   Topbar
   ========================= */
.vcare-topbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}

.vcare-title {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.vcare-sub {
    margin-top: 4px;
    color: rgba(0,0,0,.65);
    font-size: .92rem;
}

.vcare-hint {
    margin-top: 6px;
    color: rgba(0,0,0,.55);
    font-size: .85rem;
}

.vcare-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.vcare-lastupdate {
    font-size: .85rem;
    color: rgba(0,0,0,.65);
    white-space: nowrap;
}

    .vcare-lastupdate .label {
        color: rgba(0,0,0,.55);
    }

    .vcare-lastupdate .value {
        font-weight: 600;
    }

/* Updated pill */
.vcare-updated-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(13,110,253,.10);
    border: 1px solid rgba(13,110,253,.22);
    color: rgba(13,110,253,1);
    font-size: .92rem;
    font-weight: 700;
    line-height: 1.1;
}

    .vcare-updated-pill b {
        font-weight: 900;
        color: rgba(0,0,0,.85);
    }

/* =========================
   Filter
   ========================= */
.vcare-filtercard .card-body {
    padding: 12px 12px 10px;
}

.vcare-label {
    font-size: .9rem;
    font-weight: 600;
}

.vcare-note {
    margin-top: 4px;
    font-size: .82rem;
    color: rgba(0,0,0,.55);
}

/* =========================
   Tabs
   ========================= */
.vcare-tabs {
    margin: 10px 0 12px;
    gap: 8px;
}

    .vcare-tabs .nav-link {
        border-radius: 999px;
        font-weight: 600;
        font-size: .9rem;
        padding: 8px 12px;
    }

        .vcare-tabs .nav-link i {
            opacity: .9;
        }

/* =========================
   Cards
   ========================= */
.vcare-card {
    border-radius: 14px;
}

    .vcare-card .card-header {
        background: transparent;
        border-bottom: 1px solid rgba(0,0,0,.06);
        padding: 12px 14px;
    }

    .vcare-card .card-title {
        font-weight: 700;
        margin: 0;
        font-size: .98rem;
    }

    .vcare-card .card-body {
        padding: 14px;
    }

.vcare-cardheader-split {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.vcare-card--alert {
    border: 1px solid rgba(220,53,69,.18);
}

    .vcare-card--alert .card-header {
        background: rgba(220,53,69,.06);
    }

/* =========================
   KPI
   ========================= */
.vcare-kpi {
    border: 1px solid rgba(0,0,0,.06);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,.04);
}

    .vcare-kpi .card-body {
        padding: 14px;
    }

    .vcare-kpi:before {
        content: "";
        display: block;
        height: 4px;
        background: rgba(0,0,0,.10);
    }

.kpi-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.kpi-label {
    font-weight: 800;
    font-size: .92rem;
    color: rgba(0,0,0,.70);
    margin-bottom: 2px;
}

.kpi-value {
    font-weight: 900;
    font-size: 1.8rem;
    line-height: 1.05;
    letter-spacing: -.5px;
}

.kpi-sub {
    font-size: .85rem;
    color: rgba(0,0,0,.55);
    margin-top: 2px;
}

.kpi-ico {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .kpi-ico i {
        font-size: 1.25rem;
    }

/* Neutral */
.kpi-neutral {
    background: linear-gradient(180deg, rgba(108,117,125,.06), rgba(108,117,125,.02));
}

    .kpi-neutral:before {
        background: rgba(108,117,125,.45);
    }

    .kpi-neutral .kpi-ico {
        background: rgba(108,117,125,.12);
        color: #6c757d;
    }

/* Good */
.kpi-good {
    background: linear-gradient(180deg, rgba(25,135,84,.10), rgba(25,135,84,.02));
}

    .kpi-good:before {
        background: rgba(25,135,84,.75);
    }

    .kpi-good .kpi-ico {
        background: rgba(25,135,84,.14);
        color: #198754;
    }

/* Muted */
.kpi-muted {
    background: linear-gradient(180deg, rgba(108,117,125,.06), rgba(108,117,125,.02));
}

    .kpi-muted:before {
        background: rgba(108,117,125,.45);
    }

    .kpi-muted .kpi-ico {
        background: rgba(108,117,125,.12);
        color: #6c757d;
    }

/* Gap (NEW) */
.kpi-gap {
    background: linear-gradient(180deg, rgba(220,53,69,.10), rgba(220,53,69,.02));
}

    .kpi-gap:before {
        background: rgba(220,53,69,.85);
    }

    .kpi-gap .kpi-ico {
        background: rgba(220,53,69,.14);
        color: #dc3545;
    }

/* Coverage dynamic classes (server-side) */
.kpi-cov.kpi-cov-good {
    background: linear-gradient(180deg, rgba(25,135,84,.10), rgba(25,135,84,.02));
}

    .kpi-cov.kpi-cov-good:before {
        background: rgba(25,135,84,.75);
    }

    .kpi-cov.kpi-cov-good .kpi-ico {
        background: rgba(25,135,84,.14);
        color: #198754;
    }

.kpi-cov.kpi-cov-warn {
    background: linear-gradient(180deg, rgba(255,193,7,.14), rgba(255,193,7,.03));
}

    .kpi-cov.kpi-cov-warn:before {
        background: rgba(255,193,7,.90);
    }

    .kpi-cov.kpi-cov-warn .kpi-ico {
        background: rgba(255,193,7,.18);
        color: #b78103;
    }

.kpi-cov.kpi-cov-bad {
    background: linear-gradient(180deg, rgba(220,53,69,.10), rgba(220,53,69,.02));
}

    .kpi-cov.kpi-cov-bad:before {
        background: rgba(220,53,69,.85);
    }

    .kpi-cov.kpi-cov-bad .kpi-ico {
        background: rgba(220,53,69,.14);
        color: #dc3545;
    }

/* KPI meter */
.kpi-meter {
    height: 7px;
    border-radius: 99px;
    background: rgba(0,0,0,.06);
    margin-top: 10px;
    overflow: hidden;
}

.kpi-meter__bar {
    height: 100%;
    width: 0%;
    border-radius: 99px;
    background: rgba(13,110,253,.65);
}

.kpi-cov-good .kpi-meter__bar {
    background: rgba(25,135,84,.75);
}

.kpi-cov-warn .kpi-meter__bar {
    background: rgba(255,193,7,.90);
}

.kpi-cov-bad .kpi-meter__bar {
    background: rgba(220,53,69,.85);
}

/* Primary highlight (optional on first KPI) */
.kpi-primary {
    transform: translateY(-2px);
    border-width: 2px;
    box-shadow: 0 10px 26px rgba(13,110,253,.12);
    position: relative;
}

    .kpi-primary:before {
        height: 5px;
        background: rgba(13,110,253,.85);
    }

    .kpi-primary .kpi-label {
        color: rgba(13,110,253,.90);
    }

    .kpi-primary .kpi-value {
        font-size: 2.05rem;
    }

    .kpi-primary .kpi-ico {
        width: 54px;
        height: 54px;
        border-radius: 16px;
        background: rgba(13,110,253,.12);
        color: rgba(13,110,253,1);
    }

        .kpi-primary .kpi-ico i {
            font-size: 1.45rem;
        }

    .kpi-primary:after {
        content: "";
        position: absolute;
        right: -20px;
        top: -20px;
        width: 80px;
        height: 80px;
        background: radial-gradient(circle, rgba(13,110,253,.16), rgba(13,110,253,0) 60%);
        pointer-events: none;
    }

/* =========================
   Executive strip (NEW)
   ========================= */
.vcare-execstrip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(0,0,0,.06);
    background: rgba(0,0,0,.015);
    border-radius: 14px;
}

@media (max-width:992px) {
    .vcare-execstrip {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width:576px) {
    .vcare-execstrip {
        grid-template-columns: 1fr;
    }
}

.vcare-execstrip .item .h {
    font-size: .82rem;
    color: rgba(0,0,0,.65);
    font-weight: 700;
    margin-bottom: 2px;
}

.vcare-execstrip .item .v {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.15;
}

.vcare-execstrip .item .u {
    font-size: .85rem;
    font-weight: 700;
    color: rgba(0,0,0,.55);
    margin-left: 4px;
}

/* =========================
   Insight
   ========================= */
.vcare-insight {
    padding-left: 18px;
    margin: 0;
    display: grid;
    gap: 6px;
}

.vcare-callout {
    margin-top: 12px;
    border: 1px dashed rgba(0,0,0,.18);
    background: rgba(0,0,0,.02);
    border-radius: 12px;
    padding: 10px 12px;
}

    .vcare-callout .t {
        font-weight: 700;
        font-size: .9rem;
    }

    .vcare-callout .d {
        margin-top: 2px;
        font-size: .84rem;
        color: rgba(0,0,0,.65);
    }

/* Placeholder chart */
.vcare-chart.ph {
    border-radius: 14px;
    border: 1px dashed rgba(0,0,0,.18);
    background: rgba(0,0,0,.02);
    height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

    .vcare-chart.ph .ph-title {
        font-weight: 800;
        font-size: 1rem;
    }

    .vcare-chart.ph .ph-sub {
        margin-top: 4px;
        font-size: .85rem;
        color: rgba(0,0,0,.6);
    }

/* Chartbox (real charts) */
.vcare-chartbox {
    border: 1px solid rgba(0,0,0,.06);
    border-radius: 14px;
    padding: 12px;
    background: rgba(0,0,0,.01);
    min-height: 260px;
}

@media (max-width:991px) {
    .vcare-chartbox {
        min-height: 220px;
    }
}

.vcare-chartbox--md {
    min-height: 240px;
}

/* Mini legend */
.vcare-mini-legend {
    margin-top: 10px;
    font-size: .84rem;
    color: rgba(0,0,0,.65);
}

    .vcare-mini-legend .dot {
        display: inline-block;
        width: 10px;
        height: 10px;
        border-radius: 999px;
        margin-right: 6px;
        vertical-align: middle;
        background: rgba(0,0,0,.25);
    }

    .vcare-mini-legend .dot-good {
        background: rgba(25,135,84,.75);
    }

    .vcare-mini-legend .dot-muted {
        background: rgba(108,117,125,.75);
    }

/* =========================
   Table
   ========================= */
.vcare-table {
    font-size: .9rem;
}

    .vcare-table thead th {
        font-size: .84rem;
        font-weight: 800;
        background: rgba(0,0,0,.03);
        border-bottom: 1px solid rgba(0,0,0,.06) !important;
    }

    .vcare-table tbody td {
        vertical-align: middle;
    }

.vcare-row-total td {
    font-weight: 900;
    background: rgba(0,0,0,.025);
}

.vcare-group td {
    background: rgba(13,110,253,.06);
    font-weight: 800;
}

.vcare-indent {
    width: 1%;
    white-space: nowrap;
    color: rgba(0,0,0,.35);
}

/* Zone chip */
.vcare-zonechip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,.08);
    background: rgba(0,0,0,.02);
    font-weight: 800;
    font-size: .9rem;
}

    .vcare-zonechip.z-total {
        background: rgba(13,110,253,.08);
        border-color: rgba(13,110,253,.18);
    }

/* Pct cell */
.vcare-pctcell {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

.vcare-pcttext {
    font-weight: 800;
}

.vcare-pct {
    font-weight: 800;
}

/* Progress */
.vcare-progress {
    height: 6px;
    border-radius: 99px;
    background: rgba(0,0,0,.06);
    margin-top: 6px;
}

    .vcare-progress .progress-bar {
        border-radius: 99px;
    }

/* Badges */
.vcare-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 800;
    border: 1px solid transparent;
    line-height: 1;
}

    .vcare-badge.b-good {
        background: rgba(25,135,84,.10);
        border-color: rgba(25,135,84,.20);
        color: #198754;
    }

    .vcare-badge.b-warn {
        background: rgba(255,193,7,.14);
        border-color: rgba(255,193,7,.25);
        color: #b78103;
    }

    .vcare-badge.b-bad {
        background: rgba(220,53,69,.10);
        border-color: rgba(220,53,69,.20);
        color: #dc3545;
    }

    .vcare-badge.b-danger {
        background: rgba(220,53,69,.12);
        border-color: rgba(220,53,69,.22);
        color: #dc3545;
    }

    .vcare-badge.b-muted {
        background: rgba(108,117,125,.10);
        border-color: rgba(108,117,125,.18);
        color: #6c757d;
    }

/* Row emphasis */
.vcare-row-attn {
    background: rgba(220,53,69,.045);
}

/* small icon */
.vcare-mini-ico i {
    font-size: .95rem;
}

/* Badges row */
.vcare-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Footer note */
.vcare-footnote {
    font-size: .82rem;
    color: rgba(0,0,0,.6);
    background: rgba(0,0,0,.015);
    border-top: 1px solid rgba(0,0,0,.06);
}

/* Insight strip (if used) */
.vcare-insightstrip {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.vcare-insightstrip__item .k {
    font-size: .78rem;
    font-weight: 800;
    color: rgba(0,0,0,.55);
    margin-bottom: 2px;
}

.vcare-insightstrip__item .v {
    font-size: .92rem;
    line-height: 1.25;
}

/* Hide sections under development */
.vcare-dev-hide {
    display: none !important;
}

/* =========================
   Print
   ========================= */
@media print {
    .no-print {
        display: none !important;
    }

    .vcare-page {
        padding: 0 !important;
    }

    .card {
        box-shadow: none !important;
    }
}
/* ===== KPI: Gap (ALERT emphasis) ===== */
.vcare-kpi.kpi-gap {
    border: 1px solid rgba(220,53,69,.22);
    background: linear-gradient(180deg, rgba(220,53,69,.14), rgba(220,53,69,.03));
    box-shadow: 0 10px 26px rgba(220,53,69,.12);
}

    .vcare-kpi.kpi-gap:before {
        height: 6px;
        background: rgba(220,53,69,.92);
    }

    .vcare-kpi.kpi-gap .kpi-label {
        color: rgba(220,53,69,.92);
    }

    .vcare-kpi.kpi-gap .kpi-value {
        color: rgba(220,53,69,1);
    }

    .vcare-kpi.kpi-gap .kpi-sub {
        color: rgba(220,53,69,.75);
        font-weight: 700;
    }

    .vcare-kpi.kpi-gap .kpi-ico {
        background: rgba(220,53,69,.16);
        color: rgba(220,53,69,1);
        border: 1px solid rgba(220,53,69,.20);
    }

        .vcare-kpi.kpi-gap .kpi-ico i {
            font-size: 1.35rem; /* ให้เด่นขึ้นนิด */
        }
/* optional: subtle pulse when gap > 0 */
.kpi-gap--pulse {
    animation: vcarePulse 2.2s ease-in-out infinite;
}

@keyframes vcarePulse {
    0%,100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-2px);
    }
}
.kpi-gap--pulse {
    animation: vcarePulse 2.2s ease-in-out infinite;
}

@keyframes vcarePulse {
    0%,100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-2px);
    }
}
/* Zone plain text */
.vcare-zone-text {
    font-weight: 800;
}

/* Gap number emphasis (C) */
.vcare-gapnum {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 56px;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 900;
    border: 1px solid transparent;
}

    .vcare-gapnum.gap-high {
        background: rgba(220,53,69,.12);
        border-color: rgba(220,53,69,.22);
        color: #dc3545;
    }

    .vcare-gapnum.gap-mid {
        background: rgba(255,193,7,.18);
        border-color: rgba(255,193,7,.28);
        color: #b78103;
    }

    .vcare-gapnum.gap-low {
        background: rgba(108,117,125,.10);
        border-color: rgba(108,117,125,.18);
        color: #6c757d;
    }

    .vcare-gapnum.gap-zero {
        background: rgba(25,135,84,.10);
        border-color: rgba(25,135,84,.20);
        color: #198754;
    }

/* Coverage % coloring (optional) */
.vcare-pcttext.pct-good {
    color: #198754;
}

.vcare-pcttext.pct-warn {
    color: #b78103;
}

.vcare-pcttext.pct-bad {
    color: #dc3545;
}

/* Gap share % coloring (optional) */
.vcare-pcttext.gapshare-high {
    color: #dc3545;
}

.vcare-pcttext.gapshare-mid {
    color: #b78103;
}

.vcare-pcttext.gapshare-low {
    color: rgba(0,0,0,.72);
}
/* =========================
   Executive strip (emphasis)
   ========================= */
.vcare-execstrip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(0,0,0,.06);
    background: linear-gradient(180deg, rgba(13,110,253,.04), rgba(0,0,0,.01));
    border-radius: 16px;
    box-shadow: 0 10px 26px rgba(0,0,0,.05);
}

@media (max-width: 992px) {
    .vcare-execstrip {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 576px) {
    .vcare-execstrip {
        grid-template-columns: 1fr;
    }
}

/* item card */
.vcare-execstrip .item {
    position: relative;
    border: 1px solid rgba(0,0,0,.06);
    border-radius: 14px;
    background: rgba(255,255,255,.75);
    padding: 10px 12px;
    overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease;
}

    .vcare-execstrip .item:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 22px rgba(0,0,0,.06);
    }

    /* top accent */
    .vcare-execstrip .item:before {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        height: 5px;
        width: 100%;
        background: rgba(13,110,253,.45);
    }

    /* label */
    .vcare-execstrip .item .h {
        font-size: .78rem;
        font-weight: 800;
        letter-spacing: .2px;
        color: rgba(0,0,0,.62);
        margin-bottom: 4px;
    }

    /* value */
    .vcare-execstrip .item .v {
        display: flex;
        align-items: baseline;
        gap: 6px;
        font-weight: 900;
        font-size: 1.25rem;
        line-height: 1.1;
        color: rgba(0,0,0,.88);
    }

    .vcare-execstrip .item .u {
        font-size: .85rem;
        font-weight: 800;
        color: rgba(0,0,0,.55);
        margin-left: 0;
    }

    /* make numbers stand out a bit */
    .vcare-execstrip .item .v b,
    .vcare-execstrip .item .v strong {
        font-weight: 900;
    }

    /* =========================
   Priority items
   - Use classes: exec-alert / exec-primary / exec-warn
   ========================= */
    .vcare-execstrip .item.exec-primary {
        border-color: rgba(13,110,253,.18);
        background: linear-gradient(180deg, rgba(13,110,253,.10), rgba(255,255,255,.72));
    }

        .vcare-execstrip .item.exec-primary:before {
            background: rgba(13,110,253,.85);
        }

        .vcare-execstrip .item.exec-primary .h {
            color: rgba(13,110,253,.90);
        }

    .vcare-execstrip .item.exec-alert {
        border-color: rgba(220,53,69,.22);
        background: linear-gradient(180deg, rgba(220,53,69,.12), rgba(255,255,255,.72));
    }

        .vcare-execstrip .item.exec-alert:before {
            background: rgba(220,53,69,.92);
        }

        .vcare-execstrip .item.exec-alert .h {
            color: rgba(220,53,69,.92);
        }

        .vcare-execstrip .item.exec-alert .v {
            color: rgba(220,53,69,1);
        }

    .vcare-execstrip .item.exec-warn {
        border-color: rgba(255,193,7,.26);
        background: linear-gradient(180deg, rgba(255,193,7,.16), rgba(255,255,255,.72));
    }

        .vcare-execstrip .item.exec-warn:before {
            background: rgba(255,193,7,.92);
        }

        .vcare-execstrip .item.exec-warn .h {
            color: rgba(183,129,3,.95);
        }

    /* icon badge (optional) */
    .vcare-execstrip .item .mini {
        position: absolute;
        right: 10px;
        top: 10px;
        width: 34px;
        height: 34px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(0,0,0,.04);
        color: rgba(0,0,0,.55);
    }

    .vcare-execstrip .item.exec-alert .mini {
        background: rgba(220,53,69,.14);
        color: rgba(220,53,69,1);
    }

    .vcare-execstrip .item.exec-primary .mini {
        background: rgba(13,110,253,.14);
        color: rgba(13,110,253,1);
    }

    .vcare-execstrip .item.exec-warn .mini {
        background: rgba(255,193,7,.20);
        color: rgba(183,129,3,1);
    }
/* ===== Matrix Responsive ===== */
.vcare-matrix-wrap {
    overflow-x: auto;
}

.vcare-matrix {
    min-width: 1400px; /* กัน header พัง */
    font-size: .85rem;
}

    .vcare-matrix th {
        white-space: nowrap;
        background: rgba(0,0,0,.04);
        font-weight: 800;
    }

    .vcare-matrix td {
        white-space: nowrap;
    }

/* ===== Total row highlight ===== */
.vcare-row-total td {
    background: rgba(13,110,253,.08);
    font-weight: 900;
    border-top: 2px solid rgba(13,110,253,.4);
}

/* % column subtle emphasis */
.vcare-pctcol {
    font-weight: 700;
}

/* Header group row (บนสุด) */
.vcare-matrix thead tr:first-child th {
    background: rgba(13,110,253,.12);
    font-size: .9rem;
}

/* Sticky first column (optional, ดูโปรมาก) */
@media (min-width: 992px) {
   /* .vcare-matrix td:first-child,
    .vcare-matrix th:first-child {
        position: sticky;
        left: 0;
        background: #fff;
        z-index: 2;*/
    }
}
/* ===== 7.1.6: Zero/Empty cell style ===== */
.vcare-zero {
    background: rgba(0,0,0,.06) !important;
    color: rgba(0,0,0,.42) !important;
    font-weight: 600 !important;
}
/* ===== 7.1.7 Sticky first column (Zone) ===== */
.vcare-matrix-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.vcare-matrix {
    min-width: 1400px;
}

    /* ตรึงคอลัมน์แรกทั้งหัวตารางและข้อมูล */
    .vcare-matrix th:first-child,
    .vcare-matrix td:first-child {
        position: sticky;
        left: 0;
        z-index: 3; /* ให้อยู่เหนือ cell อื่น */
        background: #fff; /* กันพื้นหลังโปร่งแล้วทับกัน */
        box-shadow: 6px 0 10px rgba(0,0,0,.06); /* เส้นเงาบอกว่าถูกตรึง */
    }

    /* หัวตารางชั้นบน/ล่าง ให้ z-index สูงกว่า row ปกติอีกนิด */
    .vcare-matrix thead th:first-child {
        z-index: 5;
        background: rgba(13,110,253,.12); /* ตามธีมหัวตารางของพี่ */
    }

    /* แถว total: ตรึงคอลัมน์แรกให้สีเข้ากับ total row */
    .vcare-matrix tr.vcare-row-total td:first-child {
        background: rgba(13,110,253,.08);
    }

    /* ถ้า cell นั้นเป็น vcare-zero ก็ให้พื้นหลังไม่หลุดธีม */
    .vcare-matrix td.vcare-zero:first-child {
        background: rgba(0,0,0,.06) !important;
    }
/* ให้ sticky ใช้งานกับ table ได้ดีขึ้น */
.vcare-matrix {
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

/* wrapper ต้องเป็นตัวเลื่อนแนวนอน */
.vcare-matrix-wrap {
    overflow-x: auto;
    overflow-y: visible;
    position: relative;
}

/* class ที่เราจะใส่ให้คอลัมน์ Zone */
.vcare-sticky-col {
    position: sticky !important;
    left: 0;
    z-index: 6;
    background: #fff;
    box-shadow: 6px 0 10px rgba(0,0,0,.06);
    background-clip: padding-box;
}

/* ถ้าเป็นหัวตาราง ให้สูงกว่า */
.vcare-matrix thead .vcare-sticky-col {
    z-index: 10;
    background: rgba(13,110,253,.12);
}

/* ถ้าเป็นแถว total ให้เข้าธีม total */
.vcare-row-total .vcare-sticky-col {
    background: rgba(13,110,253,.08);
}
/* ===== Sticky Zone column (FINAL) ===== */
.vcare-matrix-wrap {
    overflow-x: auto;
    overflow-y: visible;
    position: relative;
    -webkit-overflow-scrolling: touch;
}

.vcare-matrix {
    min-width: 1400px;
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

/* ใช้ class นี้เท่านั้น */
.vcare-sticky-col {
    position: sticky !important;
    left: 0;
    z-index: 20;
    background: #fff;
    box-shadow: 6px 0 10px rgba(0,0,0,.06);
    background-clip: padding-box;
}

/* header cell ที่ sticky */
.vcare-matrix thead .vcare-sticky-col {
    z-index: 30;
    background: rgba(13,110,253,.12);
}

/* total row */
.vcare-row-total .vcare-sticky-col {
    background: rgba(13,110,253,.08);
}
/* ===== Column group separator ===== */
.vcare-matrix td.vcare-group-end,
.vcare-matrix th.vcare-group-end {
     border-right: 3px solid rgba(0,0,0,.18) !important;
    /* border-right: 3px solid rgba(13,110,253,.45);*/
}

/* ให้ header แถวบน (กลุ่มใหญ่) มีเส้นด้วย */
.vcare-matrix thead tr:first-child th {
    border-right: 3px solid rgba(0,0,0,.18);
}
/* ===== hsize legend ===== */
.vcare-hsize-legend {
    padding: 12px 14px;
    border: 1px solid rgba(0,0,0,.06);
    background: rgba(0,0,0,.015);
    border-radius: 14px;
    font-size: .88rem;
}

    .vcare-hsize-legend .legend-title {
        font-weight: 800;
        margin-bottom: 8px;
        color: rgba(0,0,0,.75);
    }

    .vcare-hsize-legend .legend-grid {
        display: grid;
        grid-template-columns: repeat(4, minmax(0,1fr));
        gap: 6px 16px;
    }

@media (max-width: 992px) {
    .vcare-hsize-legend .legend-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 576px) {
    .vcare-hsize-legend .legend-grid {
        grid-template-columns: 1fr;
    }
}

.vcare-hsize-legend .k {
    display: inline-block;
    min-width: 32px;
    text-align: center;
    padding: 3px 6px;
    margin-right: 6px;
    border-radius: 8px;
    background: rgba(13,110,253,.12);
    font-weight: 800;
    color: rgba(13,110,253,.95);
}
/* ===== Matrix Section Header ===== */
.vcare-sectionhead {
    padding: 12px 14px;
    border: 1px solid rgba(0,0,0,.06);
    background: linear-gradient(180deg, rgba(13,110,253,.06), rgba(0,0,0,.01));
    border-radius: 14px;
    margin-bottom: 10px;
}

    .vcare-sectionhead .t {
        font-weight: 900;
        font-size: 1.3rem;
        line-height: 1.25;
        color: rgba(0,0,0,.86);
    }

    .vcare-sectionhead .s {
        margin-top: 4px;
        font-size: .86rem;
        color: rgba(0,0,0,.62);
    }
