body{
    
/*    background:#f8fafc*/
/*    min-height: 80vh;*/
/*    display: grid;
    place-items: center;*/
    background: radial-gradient(1000px 600px at 10% -10%, #e6f0ff, transparent 60%), radial-gradient(900px 700px at 110% 10%, #e6fff3, transparent 60%), linear-gradient(135deg, #f8fafc, #ffffff);
/*    padding: 24px;*/
}
.card{border-radius:1rem}
.btn{border-radius:.75rem}
/* Bảng xét nghiệm – tối ưu hiển thị mobile */
.xn-table {
    table-layout: auto;
}



@media (max-width: 576px) {
    .xn-table th,
    .xn-table td {
        vertical-align: top;
    }

        .xn-table th:nth-child(1),
        .xn-table td:nth-child(1) {
            width: 36px; 
            min-width: 36px;
            /*text-align: center;*/
            white-space: nowrap;
        }

        .xn-table th:nth-child(2),
        .xn-table td:nth-child(2) {
            width: 68vw;
            max-width: 68vw;
            white-space: normal; 
            word-break: keep-all; 
            line-height: 1.3;
        }

        
        .xn-table th:nth-child(3),
        .xn-table td:nth-child(3) {
            width: calc(100vw - 36px - 68vw); 
            text-align: right;
            white-space: normal;
        }

   
        .xn-table th:nth-child(4),
        .xn-table td:nth-child(4) {
            text-align: right;
            white-space: nowrap;
        }

    .xn-table > :not(caption) > * > * {
        padding-top: .5rem;
        padding-bottom: .5rem;
    }
}

.kq-low {
    color: #1200f7 !important;
    font-weight: 700;
}

.kq-high {
    color: #dc2626 !important;
    font-weight: 700;
}

.kq-err {
    color: #dc2626 !important;
    font-weight: 700;
}

.kq-ok {
}

.col-kq {
    text-align: center;
}

.col-bt {
    text-align: right;
    color: #64748b;
}

.res {
    text-align: right;
}

    .res .value {
        font-weight: 700;
        line-height: 1.2;
    }

    .res .note {
        font-size: .75rem;
        color: #94a3b8;
    }

    .res .range {
        font-size: .775rem;
        color: #64748b;
    }

@media (max-width: 576px) {
    .table td, .table th {
        padding: .5rem .75rem;
    }

    .res .value {
        font-size: 1rem;
    }
}

.page-wrap {
    padding-block: 18px;
}

.card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(16,24,40,.06);
}

.card-header {
    border-bottom: 0;
    background: linear-gradient(135deg,#0ea5e9,#2563eb);
    color: #fff;
    border-radius: 16px 16px 0 0;
    padding: 16px 18px;
}

.avatar {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #fff2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    color: #fff;
    border: 2px solid #ffffff40;
}

.stat {
    font-size: 13px;
    color: #ffffff
}

.chip {
    font-size: 12px;
    padding: .25rem .5rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: #0f172a
}

.table thead th {
    background: #f8fafc;
    font-weight: 600
}

.table td, .table th {
    vertical-align: middle;
}

.sticky-side {
    position: sticky;
    top: 16px
}

.section-title {
    font-weight: 700;
    font-size: 18px
}

.empty {
    color: #64748b;
    background: #f8fafc;
    border: 1px dashed #e2e8f0;
    border-radius: 12px;
    padding: 14px;
    text-align: center
}

@media (max-width: 991.98px) {
    .sticky-side {
        position: static
    }

    .card-header {
        border-radius: 12px 12px 0 0
    }
}

.brand-wrap {
    gap: .75rem
}

.brand-logo {
    height: 100px;
    width: auto;
    margin-bottom: 12px;
}

.brand-name {
    font-weight: 800;
    line-height: 1;
    font-size: 1.05rem;
    letter-spacing: .3px
}

.brand-sub {
    font-size: .82rem;
    opacity: .9
}

@media (max-width: 767.98px) {
    .brand-logo {
        height: 36px
    }

    .brand-name {
        font-size: 1rem
    }

    .brand-sub {
        font-size: .8rem
    }
}

.brand {
    text-align: center;
    color: #fff;
    padding: 24px 16px;
    background: linear-gradient(135deg,#1677ff,#33c2ff);
    border-radius: 16px;
}

.logo-stroke {
    filter: drop-shadow( 1px 0 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow( 0 1px 0 #fff) drop-shadow( 0 -1px 0 #fff) drop-shadow( 1px 1px 0 #fff) drop-shadow(-1px 1px 0 #fff) drop-shadow( 1px -1px 0 #fff) drop-shadow(-1px -1px 0 #fff) drop-shadow(0 8px 14px rgba(0,0,0,.18));  /* nổi khối */
/*    filter: drop-shadow( 0px 0 0 #fff) drop-shadow(0px 0 0 #fff) drop-shadow( 0 0px 0 #fff) drop-shadow( 0 0px 0 #fff) drop-shadow( 0px 0px 0 #fff) drop-shadow(0px 0px 0 #fff) drop-shadow( 0px 0px 0 #fff) drop-shadow(0px 0px 0 #fff) drop-shadow(0 0px 0px rgba(0,0,0,0.05));*/
}

@media (max-width:576px) {
    .brand-logo {
        max-height: 56px;
    }

    .brand h1 {
        font-size: 20px;
        margin: .5rem 0 0;
    }

    .brand .slogan {
        font-size: 14px;
        opacity: .95;
    }
}


/*Chẩn đoán hình ảnh**/
/* Nút size mini */
.btn-xs {
    padding: .15rem .4rem;
    font-size: .75rem;
    border-radius: .5rem;
}

.cdha-actions {
    display: flex;
    gap: .375rem;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
}

@media (max-width: 576px) {
    .table > :not(caption) > * > * {
        padding-top: .45rem;
        padding-bottom: .45rem;
    }

    .cdha-table {
        table-layout: auto;
    }

        /* # cột */
        .cdha-table th:nth-child(1),
        .cdha-table td:nth-child(1) {
            width: 36px;
            min-width: 36px;
            text-align: center;
            white-space: nowrap;
        }

        .cdha-table th:nth-child(2),
        .cdha-table td:nth-child(2) {
/*            width: 52vw;
            max-width: 52vw;*/
            white-space: nowrap;
            word-break: keep-all;
            line-height: 1.3;
        }

        .cdha-table th:nth-child(3),
        .cdha-table td:nth-child(3) {
            text-align: left;
            white-space: nowrap;
        }

        .cdha-table th:nth-child(4),
        .cdha-table td:nth-child(4) {
            text-align: left;
            white-space: nowrap;
        }
}


/*Menu */
.tab-tiles {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2,minmax(0,1fr));
    padding-left: 0; /* bỏ padding ul mặc định */
}

    .tab-tiles .nav-item {
        list-style: none;
    }
/* bỏ dấu list */

@media (min-width:768px) {
    .tab-tiles {
        grid-template-columns: repeat(4,minmax(0,1fr));
    }
}

/* Ô gạch */
.tab-tiles .tile {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 56px;
/*    padding: 12px 14px;*/
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
    background: var(--bs-light);
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
    transition: all .18s ease;
    font-weight: 600;
    color: inherit;
}

    .tab-tiles .tile .title {
        line-height: 1.2;
        text-align: left
    }

    .tab-tiles .tile .count {
        padding: 2px 10px;
        border-radius: 999px;
        background: var(--bs-primary);
        color: #fff;
        font-weight: 700;
        font-size: .9rem;
    }

    /* Trạng thái Active/Hover */
    .tab-tiles .tile:hover {
        transform: translateY(-1px)
    }

    .tab-tiles .tile.active,
    .tab-tiles .tile:focus {
        background: var(--bs-primary) !important;
        color: #fff !important;
        border-color: var(--bs-primary) !important;
    }

        .tab-tiles .tile.active .count {
            background: rgba(255,255,255,.25)
        }



/*ĐƠN THUỐC  */
/* Nút header giãn đều giữa chip và nội dung */
.rx-head {
    padding-left: 16px;
    padding-right: 16px;
    gap: 12px; /* tạo khoảng giữa chip và nội dung */
    align-items: flex-start; /* giúp 2 dòng trong nội dung thẳng đẹp */
}

/* CHIP inline trong header (không absolute) */
.rx-chip-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px 6px 12px;
    border-radius: 999px;
    color: #fff;
    font-weight: 700;
    background: linear-gradient(135deg, var(--bs-primary), #3aa0ff);
    box-shadow: 0 8px 16px rgba(13,110,253,.25);
    white-space: nowrap;
}

    .rx-chip-inline .lbl {
        opacity: .95;
        letter-spacing: .2px
    }

    .rx-chip-inline .num {
        width: 28px;
        height: 28px;
        border-radius: 50%;
        background: rgba(255,255,255,.22);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: .95rem;
        line-height: 1;
    }

/* Nội dung header */
.rx-head__content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.rx-head__row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap
}

.rx-title {
    font-weight: 700;
    color: var(--bs-body-color)
}

.rx-badge {
    font-size: .8rem;
    padding: .25rem .5rem;
    border-radius: 999px;
    background: rgba(13,110,253,.12);
    color: var(--bs-primary);
    font-weight: 600
}

.rx-meta {
    font-size: .95rem;
    color: var(--bs-secondary-color);
    display: flex;
    flex-wrap: wrap;
    gap: 8px
}

    .rx-meta .dot {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: var(--bs-secondary-color);
        align-self: center;
        margin: 0 2px
    }

/* Bảng thuốc giữ gọn */
.rx-table td, .rx-table th {
    vertical-align: middle
}

/* Mobile */
@media (max-width: 480px) {
    .rx-head {
        padding-left: 12px;
        padding-right: 12px;
        gap: 8px
    }

    .rx-meta {
        font-size: .9rem
    }

    .rx-chip-inline .num {
        width: 26px;
        height: 26px;
        font-size: .9rem
    }
}

/* Khung đơn có chip */
.rx-card {
    position: relative;
    border-radius: 14px;
    overflow: visible
}

/* Chip tròn “Đơn N” */
.rx-chip {
    position: absolute;
    top: -14px;
    left: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px 6px 12px;
    border-radius: 999px;
    color: #fff;
    font-weight: 700;
    background: linear-gradient(135deg, var(--bs-primary), #3aa0ff);
    box-shadow: 0 8px 16px rgba(13,110,253,.25);
    z-index: 2;
}

    .rx-chip .lbl {
        opacity: .95;
        letter-spacing: .2px
    }

    .rx-chip .num {
        width: 28px;
        height: 28px;
        border-radius: 50%;
        background: rgba(255,255,255,.22);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: .95rem;
        line-height: 1;
    }

/* Header accordion cho đơn thuốc */
.rx-head {
    padding-left: 16px;
    padding-right: 16px
}

.rx-head__content {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px
}

.rx-head__row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap
}

.rx-title {
    font-weight: 700;
    color: var(--bs-body-color)
}

.rx-badge {
    font-size: .8rem;
    padding: .25rem .5rem;
    border-radius: 999px;
    background: rgba(13,110,253,.12);
    color: var(--bs-primary);
    font-weight: 600
}

.rx-meta {
    font-size: .95rem;
    color: var(--bs-secondary-color);
    display: flex;
    flex-wrap: wrap;
    gap: 8px
}

    .rx-meta .dot {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: var(--bs-secondary-color);
        align-self: center;
        margin: 0 2px;
    }

/* Bảng thuốc gọn gàng hơn trên mobile */
.rx-table td, .rx-table th {
    vertical-align: middle
}

@media (max-width: 480px) {
    .rx-chip {
        left: 12px;
        top: -12px
    }

    .rx-head {
        padding-left: 12px;
        padding-right: 12px
    }

    .rx-meta {
        font-size: .9rem
    }
}
/* FIX TAB CONTENT: chặn tab ẩn vẫn chiếm khoảng trắng khi Bootstrap CDN/CSS bị lỗi */
#resultTabs + .tab-content { width:100%; clear:both; }
#resultTabs + .tab-content > .tab-pane { display:none !important; opacity:1 !important; visibility:visible !important; height:auto !important; min-height:0 !important; margin:0 !important; }
#resultTabs + .tab-content > .tab-pane.active,
#resultTabs + .tab-content > .tab-pane.show { display:block !important; }
#resultTabs + .tab-content > .tab-pane:not(.active):not(.show) { display:none !important; }
.tab-pane:not(.active):not(.show) .card,
.tab-pane:not(.active):not(.show) .table-responsive,
.tab-pane:not(.active):not(.show) table { display:none !important; }
.tab-tiles { align-items:stretch; margin-bottom:14px !important; }
@media (min-width:768px) { .tab-tiles { grid-template-columns:repeat(4,minmax(0,1fr)); } .tab-tiles .nav-item:nth-child(5){ grid-column:1 / span 1; } }


/* EMR PDF tab - scoped, không phụ thuộc CSS bảng/bootstrap button */
#tab-emr .emr-doc-panel{background:#fff;border:1px solid #e5e7eb;border-radius:18px;padding:18px;box-shadow:0 10px 30px rgba(15,23,42,.06);width:100%;max-width:100%;overflow:hidden;margin-top:4px;}
#tab-emr .emr-doc-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:14px;margin-bottom:14px;border-bottom:1px solid #eef2f7;}
#tab-emr .emr-doc-title{font-size:18px;font-weight:800;color:#0f172a;line-height:1.2;}
#tab-emr .emr-doc-subtitle{font-size:13px;color:#64748b;margin-top:4px;}
#tab-emr .emr-doc-total{flex:0 0 auto;background:#eff6ff;color:#1d4ed8;border:1px solid #bfdbfe;border-radius:999px;padding:7px 12px;font-size:13px;font-weight:700;white-space:nowrap;}
#tab-emr .emr-doc-empty{min-height:140px;border:1px dashed #cbd5e1;border-radius:16px;background:#f8fafc;color:#64748b;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;font-weight:600;}
#tab-emr .emr-empty-icon{font-size:34px;line-height:1;}
#tab-emr .emr-doc-list{display:flex;flex-direction:column;gap:10px;}
#tab-emr .emr-doc-item{display:grid;grid-template-columns:44px minmax(0,1fr) auto;align-items:center;gap:14px;padding:14px;border:1px solid #e5e7eb;border-radius:16px;background:linear-gradient(180deg,#ffffff,#fbfdff);box-shadow:0 3px 12px rgba(15,23,42,.035);}
#tab-emr .emr-doc-index{width:36px;height:36px;border-radius:12px;background:linear-gradient(135deg,#0ea5e9,#2563eb);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:14px;}
#tab-emr .emr-doc-info{min-width:0;}
#tab-emr .emr-doc-name{font-weight:800;color:#0f172a;font-size:15px;line-height:1.35;white-space:normal;word-break:break-word;}
#tab-emr .emr-doc-meta{display:flex;flex-wrap:wrap;gap:6px 14px;margin-top:6px;font-size:12.5px;color:#64748b;}
#tab-emr .emr-doc-meta span{display:inline-flex;align-items:center;max-width:100%;}
#tab-emr .emr-doc-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;}
#tab-emr a.emr-action,#tab-emr a.emr-action:visited{display:inline-flex!important;align-items:center;justify-content:center;min-height:34px;padding:8px 12px!important;border-radius:10px!important;text-decoration:none!important;font-size:13px!important;font-weight:800!important;line-height:1!important;white-space:nowrap!important;border:1px solid transparent!important;box-shadow:none!important;opacity:1!important;visibility:visible!important;}
#tab-emr a.emr-action-primary{background:#2563eb!important;color:#fff!important;border-color:#2563eb!important;}
#tab-emr a.emr-action-primary:hover{background:#1d4ed8!important;color:#fff!important;}
#tab-emr a.emr-action-secondary{background:#fff!important;color:#334155!important;border-color:#cbd5e1!important;}
#tab-emr a.emr-action-secondary:hover{background:#f8fafc!important;color:#0f172a!important;}
@media(max-width:768px){#tab-emr .emr-doc-panel{padding:12px;border-radius:14px;}#tab-emr .emr-doc-header{align-items:flex-start;flex-direction:column;}#tab-emr .emr-doc-item{grid-template-columns:38px minmax(0,1fr);gap:10px;padding:12px;}#tab-emr .emr-doc-actions{grid-column:1 / -1;justify-content:flex-start;padding-left:48px;}#tab-emr a.emr-action{flex:1 1 130px;}}
@media(max-width:420px){#tab-emr .emr-doc-actions{padding-left:0;}#tab-emr .emr-doc-item{grid-template-columns:1fr;}#tab-emr .emr-doc-index{display:none;}#tab-emr a.emr-action{width:100%;}}

/* =========================================================
   V4 UX - Bộ chuyển lần khám + giao diện tinh gọn
   Chỉ thay đổi trình bày, không thay đổi route/API nghiệp vụ.
   ========================================================= */

/* Tinh gọn khoảng trắng tổng thể */
.page-wrap {
    padding-block: 10px;
}

.card-body {
    padding: 1rem;
}

.brand-logo {
    height: 74px;
    margin-bottom: 8px;
}

/* Bộ chọn lịch sử khám */
.visit-switcher {
    overflow: hidden;
    border: 1px solid #e5eaf1;
    background: rgba(255,255,255,.94);
}

.visit-switcher__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 16px;
    color: #0f172a;
    background: linear-gradient(135deg, #f8fbff 0%, #eef6ff 100%);
    border-bottom: 1px solid #e6edf5;
}

.visit-switcher__heading {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.visit-switcher__icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: #0d6efd;
    background: #fff;
    border: 1px solid #dce9f8;
    box-shadow: 0 4px 12px rgba(13,110,253,.08);
    font-size: 1.05rem;
}

.visit-switcher__eyebrow {
    color: #64748b;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    line-height: 1.1;
}

.visit-switcher__title {
    margin-top: 2px;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.25;
}

.visit-switcher__count {
    flex: 0 0 auto;
    padding: .35rem .65rem;
    border-radius: 999px;
    color: #0d6efd;
    background: #fff;
    border: 1px solid #dce9f8;
    font-size: .8rem;
    font-weight: 800;
}

.visit-switcher__body {
    padding: 14px 16px 16px;
}

.visit-picker-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 230px);
    gap: 12px;
    align-items: end;
}

.visit-picker__label {
    display: block;
    margin-bottom: 6px;
    color: #475569;
    font-size: .8rem;
    font-weight: 700;
}

.visit-select-wrap {
    position: relative;
}

.visit-select-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
    color: #0d6efd;
    pointer-events: none;
}

.visit-select {
    min-height: 44px;
    padding-left: 38px;
    border-radius: 12px;
    border-color: #d9e2ec;
    font-weight: 650;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(15,23,42,.03);
}

.visit-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 .2rem rgba(13,110,253,.10);
}

.visit-current {
    min-height: 67px;
    padding: 9px 12px;
    border-radius: 12px;
    border: 1px solid #d9e8ff;
    background: linear-gradient(135deg, #f8fbff, #eef6ff);
}

.visit-current__label {
    color: #0d6efd;
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.visit-current__main {
    margin-top: 1px;
    color: #0f172a;
    font-weight: 800;
    line-height: 1.25;
}

.visit-current__date {
    margin-top: 1px;
    color: #64748b;
    font-size: .78rem;
}

.visit-quick-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 13px;
    margin-bottom: 7px;
    color: #475569;
    font-size: .78rem;
    font-weight: 700;
}

.visit-quick-hint {
    color: #94a3b8;
    font-weight: 500;
}

.visit-strip-shell {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    align-items: stretch;
    gap: 7px;
}

.visit-strip {
    display: flex;
    gap: 8px;
    min-width: 0;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
    padding: 2px 1px 5px;
}

.visit-strip::-webkit-scrollbar {
    display: none;
}

.visit-strip:focus-visible {
    outline: 2px solid rgba(13,110,253,.35);
    outline-offset: 3px;
    border-radius: 10px;
}

.visit-chip {
    position: relative;
    min-width: 154px;
    flex: 0 0 auto;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 9px 11px;
    border-radius: 12px;
    color: #334155;
    text-decoration: none;
    background: #fff;
    border: 1px solid #e2e8f0;
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.visit-chip:hover {
    color: #0f172a;
    border-color: #b8d5ff;
    box-shadow: 0 5px 14px rgba(15,23,42,.07);
    transform: translateY(-1px);
}

.visit-chip.is-active {
    color: #fff;
    border-color: #0d6efd;
    background: linear-gradient(135deg, #168df1, #2667ed);
    box-shadow: 0 7px 16px rgba(13,110,253,.18);
}

.visit-chip__id {
    font-size: .84rem;
    font-weight: 800;
    line-height: 1.2;
}

.visit-chip__date {
    color: #64748b;
    font-size: .73rem;
    line-height: 1.2;
}

.visit-chip.is-active .visit-chip__date {
    color: rgba(255,255,255,.88);
}

.visit-chip__state {
    margin-top: 2px;
    color: rgba(255,255,255,.94);
    font-size: .68rem;
    font-weight: 700;
}

.visit-scroll-btn {
    width: 34px;
    min-width: 34px;
    padding: 0;
    border: 1px solid #dbe4ee;
    border-radius: 10px;
    color: #475569;
    background: #fff;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.visit-scroll-btn:hover:not(:disabled) {
    color: #0d6efd;
    border-color: #b8d5ff;
    background: #f5f9ff;
}

.visit-scroll-btn:disabled {
    opacity: .32;
    cursor: default;
}

/* Tabs kết quả: 5 mục trên một hàng ở desktop, cuộn ngang ở mobile */
@media (min-width: 992px) {
    .tab-tiles {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 9px;
    }

    .tab-tiles .tile {
        min-height: 50px;
        padding: 9px 11px;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .tab-tiles {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 9px;
    }
}

@media (max-width: 767.98px) {
    .page-wrap {
        padding-block: 4px;
    }

    .card {
        border-radius: 13px;
    }

    .card-body {
        padding: .85rem;
    }

    .brand-logo {
        height: 46px;
        max-height: 46px;
        margin-bottom: 5px;
    }

    .visit-switcher__header {
        padding: 11px 12px;
    }

    .visit-switcher__body {
        padding: 11px 12px 13px;
    }

    .visit-picker-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .visit-current {
        min-height: 0;
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        column-gap: 8px;
        padding: 8px 10px;
    }

    .visit-current__label,
    .visit-current__main,
    .visit-current__date {
        margin: 0;
    }

    .visit-current__date {
        text-align: right;
    }

    .visit-strip-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .visit-scroll-btn {
        display: none;
    }

    .visit-chip {
        min-width: 142px;
        padding: 8px 10px;
    }

    .tab-tiles {
        display: flex;
        flex-wrap: nowrap;
        gap: 8px;
        overflow-x: auto;
        scrollbar-width: none;
        scroll-snap-type: x proximity;
        padding-bottom: 3px;
    }

    .tab-tiles::-webkit-scrollbar {
        display: none;
    }

    .tab-tiles .nav-item {
        flex: 0 0 150px;
        min-width: 150px;
        scroll-snap-align: start;
    }

    .tab-tiles .tile {
        min-height: 48px;
        padding: 8px 10px;
        border-radius: 11px;
        font-size: .86rem;
    }

    .tab-tiles .tile .count {
        padding: 2px 7px;
        font-size: .78rem;
    }
}

@media (max-width: 420px) {
    .visit-switcher__icon {
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }

    .visit-switcher__title {
        font-size: .92rem;
    }

    .visit-switcher__count {
        padding: .3rem .5rem;
        font-size: .74rem;
    }

    .visit-current {
        grid-template-columns: 1fr auto;
    }

    .visit-current__label {
        grid-column: 1 / -1;
        margin-bottom: 1px;
    }
}
