/* =========================================================
   Footer Modern V1.9 — reference-exact + balanced short page
   Mục tiêu:
   - Bố cục/nhịp gần footer tham khảo Tailwind: pt-12, gap-8, mb-12, pt-8/pb-8.
   - Không body flex, không margin-top:auto, không sticky/fixed footer.
   - Trang dài: footer có chiều cao tự nhiên.
   - Trang ngắn desktop: phần chiều cao thiếu được phân bổ cân đối trong footer,
     tránh một dải trắng lớn chỉ nằm trên hoặc dưới.
   ========================================================= */

.stc-footer-modern,
.stc-footer-modern * { box-sizing: border-box; }

html,
body {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.stc-footer-modern {
    --stc-footer-fill: 0px;
    position: relative !important;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    color: #667085;
    min-height: 0 !important;
    z-index: 2;
}

.stc-footer-modern > .container {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto !important;
    padding-left: 28px;
    padding-right: 28px;
}

/* Reference: pt-12 + grid 4 cols + gap-8 + mb-12.
   Phần fill chỉ được cộng nhẹ và phân tán, không dồn thành 1 khoảng trống. */
.stc-footer-grid {
    display: grid;
    grid-template-columns: minmax(300px, 1.2fr) repeat(3, minmax(150px, .8fr));
    align-items: start;
    column-gap: 64px;
    row-gap: 32px;
    margin: 0 !important;
    padding-top: calc(48px + (var(--stc-footer-fill) * .18)) !important;
    padding-bottom: calc(48px + (var(--stc-footer-fill) * .42)) !important;
}

.stc-footer-brand { min-width: 0; }

.stc-footer-logo {
    display: inline-flex;
    align-items: center;
    margin: 0 0 16px;
    text-decoration: none;
}

.stc-footer-logo img {
    display: block;
    width: auto;
    height: 32px;
    max-width: 205px;
    object-fit: contain;
}

.stc-footer-brand > p {
    max-width: 390px;
    margin: 0;
    color: #667085;
    font-size: 14px;
    line-height: 1.72;
    font-weight: 400;
}

.stc-footer-col { min-width: 0; }

.stc-footer-col h3 {
    margin: 0 0 24px;
    color: #111827;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 800;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.stc-footer-col ul {
    display: grid;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.stc-footer-col li { margin: 0; padding: 0; }

.stc-footer-col a,
.stc-footer-legal a {
    color: #667085;
    text-decoration: none;
    transition: color .18s ease;
}

.stc-footer-col a {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 400;
}

.stc-footer-col a:hover,
.stc-footer-legal a:hover { color: #1677ff; }

/* Reference: pt-8 + border-top + pb-8 on desktop. */
.stc-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 0 !important;
    padding-top: 32px !important;
    padding-bottom: calc(32px + (var(--stc-footer-fill) * .40)) !important;
    border-top: 1px solid #eef1f5;
}

.stc-footer-bottom p {
    margin: 0;
    color: #7a8799;
    font-size: 12px;
    line-height: 1.5;
    font-weight: 400;
}

.stc-footer-legal {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.stc-footer-legal a {
    font-size: 12px;
    line-height: 1.5;
    font-weight: 400;
}

/* Tuyệt đối không để các bản CSS cũ ép body/footer theo viewport. */
@media (min-width: 768px) {
    html,
    body {
        min-height: 0 !important;
        height: auto !important;
    }

    body {
        display: block !important;
    }

    .stc-footer-modern {
        margin-top: 0 !important;
        min-height: 0 !important;
        height: auto !important;
    }
}

/* Back-to-top không được chiếm document flow. */
.back-to-top {
    position: fixed !important;
    top: auto !important;
    left: auto !important;
    right: 22px !important;
    bottom: 22px !important;
    width: 42px !important;
    height: 42px !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 1050 !important;
}

.back-to-top .back-to-top-icon {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #1677ff !important;
    border-radius: 50% !important;
    box-shadow: 0 8px 22px rgba(22,119,255,.22) !important;
}

.back-to-top .back-to-top-icon img {
    display: block !important;
    width: 16px !important;
    height: 16px !important;
    margin: 0 !important;
}

.mobile-bottom-nav { display: none !important; }

@media (max-width: 1199px) {
    .stc-footer-modern > .container {
        padding-left: 24px;
        padding-right: 24px;
    }

    .stc-footer-grid {
        grid-template-columns: minmax(260px, 1.12fr) repeat(3, minmax(140px, .78fr));
        column-gap: 40px;
    }
}

@media (max-width: 991px) {
    .stc-footer-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 32px 28px;
    }

    .stc-footer-brand { grid-column: 1 / -1; }
    .stc-footer-brand > p { max-width: 680px; }
}

@media (max-width: 767px) {
    .mobile-bottom-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        display: grid !important;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        background: rgba(255,255,255,.96);
        border-top: 1px solid #e5e7eb;
        box-shadow: 0 -4px 20px rgba(0,0,0,.07);
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
        z-index: 1040;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .mobile-bottom-nav a {
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        padding: 6px 2px;
        color: #6b7280;
        font-size: 10px;
        font-weight: 500;
        text-decoration: none;
        border-radius: 10px;
    }

    .mobile-bottom-nav a i {
        width: 34px;
        height: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 9px;
        font-size: 18px;
    }

    .mobile-bottom-nav a.active { color: #1677ff; font-weight: 600; }
    .mobile-bottom-nav a.active i { color: #1677ff; background: #eaf3ff; }

    .stc-footer-modern {
        --stc-footer-fill: 0px !important;
        margin-top: 0 !important;
        padding-bottom: 70px !important;
    }

    .stc-footer-modern > .container {
        padding-left: 18px;
        padding-right: 18px;
    }

    .stc-footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px 20px;
        padding: 30px 0 25px !important;
    }

    .stc-footer-brand { grid-column: 1 / -1; }
    .stc-footer-logo img { height: 32px; max-width: 170px; }
    .stc-footer-brand > p { font-size: 12.5px; line-height: 1.62; }
    .stc-footer-col h3 { margin-bottom: 14px; font-size: 12.5px; }
    .stc-footer-col ul { gap: 10px; }
    .stc-footer-col a { font-size: 12px; }

    .stc-footer-bottom {
        align-items: flex-start;
        flex-direction: column;
        gap: 9px;
        padding: 15px 0 17px !important;
    }

    .stc-footer-legal { gap: 10px 18px; }
}

@media (max-width: 420px) {
    .stc-footer-grid { gap: 24px 14px; }
}
/* MOBILE - căn giữa 2 dòng cuối footer */
@media (max-width: 767px) {
    .stc-footer-bottom {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        gap: 10px !important;
    }

    .stc-footer-bottom > p {
        width: 100% !important;
        margin: 0 !important;
        text-align: center !important;
    }

    .stc-footer-legal {
        width: 100% !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 22px !important;
        text-align: center !important;
    }
}
/* =========================================================
   Mobile Bottom Nav V2 — Lucide SVG / F12-inspired, site-native
   - Chỉ lấy icon + nhịp tương tác từ mẫu tham khảo.
   - Giữ màu xanh, font và kích thước phù hợp giao diện hiện tại.
   ========================================================= */
.mobile-bottom-nav .mobile-bottom-nav-icon {
    width: 34px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 10px;
    color: inherit;
    background: transparent;
    transition: color .18s ease, background-color .18s ease, transform .18s ease;
}

.mobile-bottom-nav .mobile-bottom-nav-icon svg {
    display: block;
    width: 20px;
    height: 20px;
    overflow: visible;
    stroke: currentColor;
    vector-effect: non-scaling-stroke;
}

.mobile-bottom-nav .mobile-bottom-nav-label {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.05;
}

.mobile-bottom-nav a.active .mobile-bottom-nav-icon {
    color: #1677ff;
    background: #eaf3ff;
    transform: scale(1.08);
}

.mobile-bottom-nav a.active .mobile-bottom-nav-icon svg {
    stroke-width: 2.35;
}

@media (max-width: 767px) {
    .mobile-bottom-nav {
        height: calc(66px + env(safe-area-inset-bottom));
        min-height: 66px;
        align-items: stretch;
        padding: 4px max(4px, env(safe-area-inset-left)) calc(4px + env(safe-area-inset-bottom)) max(4px, env(safe-area-inset-right));
        background: rgba(255,255,255,.94);
        border-top-color: #e8edf4;
        box-shadow: 0 -7px 24px rgba(17,24,39,.06);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
    }

    .mobile-bottom-nav a {
        position: relative;
        height: 100%;
        gap: 3px;
        padding: 4px 2px;
        color: #7b8798;
        font-size: 10px;
        line-height: 1.05;
        font-weight: 600;
        border-radius: 12px;
        transition: color .18s ease, transform .18s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-bottom-nav a:active {
        transform: scale(.97);
    }

    .mobile-bottom-nav a.active {
        color: #1677ff;
        font-weight: 700;
    }

    /* FontAwesome cũ nếu còn sót trong cache/HTML khác sẽ không phá layout. */
    .mobile-bottom-nav a > i {
        display: none !important;
    }
}

/* Tablet/touch nav do header-modern-v1.css bật cũng dùng đúng icon SVG mới. */
@media (min-width: 768px) and (max-width: 1600px) {
    html.stc-tablet-mobile-ui .mobile-bottom-nav .mobile-bottom-nav-icon,
    html.stc-touch-nav .mobile-bottom-nav .mobile-bottom-nav-icon {
        width: 34px;
        height: 30px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
        color: inherit;
    }

    html.stc-tablet-mobile-ui .mobile-bottom-nav .mobile-bottom-nav-icon svg,
    html.stc-touch-nav .mobile-bottom-nav .mobile-bottom-nav-icon svg {
        width: 20px;
        height: 20px;
        stroke: currentColor;
    }

    html.stc-tablet-mobile-ui .mobile-bottom-nav a.active .mobile-bottom-nav-icon,
    html.stc-touch-nav .mobile-bottom-nav a.active .mobile-bottom-nav-icon {
        color: #1677ff;
        background: #eef6ff;
        transform: scale(1.08);
    }
}

/* =========================================================
   Mobile Bottom Nav V3 — Account click / Back-to-top hitbox fix
   Nguyên nhân: wrapper .back-to-top bị position:fixed 42x42 ở góc phải
   dù icon đang opacity:0, nên vùng trong suốt đè lên tab Tài khoản.
   ========================================================= */
.back-to-top {
    position: static !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    width: 0 !important;
    height: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: none !important;
    z-index: auto !important;
}

.back-to-top .back-to-top-icon {
    pointer-events: none !important;
    visibility: hidden !important;
}

.back-to-top .back-to-top-icon.show {
    pointer-events: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
}

@media (max-width: 767px) {
    .mobile-bottom-nav,
    .mobile-bottom-nav a {
        pointer-events: auto !important;
    }

    .mobile-bottom-nav a {
        z-index: 2;
        touch-action: manipulation;
    }

    .back-to-top .back-to-top-icon {
        right: 16px !important;
        bottom: calc(78px + env(safe-area-inset-bottom)) !important;
    }
}

/* =========================================================
   Mobile Bottom Nav V4 — Services bottom sheet
   Dịch vụ là nút mở nhanh 4 dịch vụ chính thay vì điều hướng thẳng.
   ========================================================= */
.mobile-services-overlay,
.mobile-services-sheet {
    display: none;
}

@media (max-width: 767px) {
    .mobile-bottom-nav > a,
    .mobile-bottom-nav > button {
        min-width: 0;
        height: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        padding: 4px 2px;
        margin: 0;
        color: #7b8798;
        background: transparent;
        border: 0;
        outline: 0;
        font: inherit;
        font-size: 10px;
        line-height: 1.05;
        font-weight: 600;
        text-decoration: none;
        border-radius: 12px;
        cursor: pointer;
        position: relative;
        z-index: 2;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        transition: color .18s ease, transform .18s ease;
    }

    .mobile-bottom-nav > a:active,
    .mobile-bottom-nav > button:active {
        transform: scale(.97);
    }

    .mobile-bottom-nav > a.active,
    .mobile-bottom-nav > button.active,
    .mobile-bottom-nav > button[aria-expanded="true"] {
        color: #1677ff;
        font-weight: 700;
    }

    .mobile-bottom-nav > a.active .mobile-bottom-nav-icon,
    .mobile-bottom-nav > button.active .mobile-bottom-nav-icon,
    .mobile-bottom-nav > button[aria-expanded="true"] .mobile-bottom-nav-icon {
        color: #1677ff;
        background: #eaf3ff;
        transform: scale(1.08);
    }

    .mobile-services-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1060;
        background: rgba(15, 23, 42, .34);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity .22s ease, visibility .22s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-services-overlay.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .mobile-services-sheet {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1070;
        width: 100%;
        padding: 8px 16px calc(18px + env(safe-area-inset-bottom));
        background: #fff;
        border-radius: 22px 22px 0 0;
        box-shadow: 0 -18px 48px rgba(15, 23, 42, .16);
        transform: translateY(105%);
        visibility: hidden;
        pointer-events: none;
        transition: transform .26s cubic-bezier(.22,.8,.25,1), visibility .26s ease;
    }

    .mobile-services-sheet.is-open {
        transform: translateY(0);
        visibility: visible;
        pointer-events: auto;
    }

    .mobile-services-handle {
        width: 38px;
        height: 4px;
        margin: 0 auto 12px;
        border-radius: 99px;
        background: #d8dee8;
    }

    .mobile-services-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        padding: 0 2px 14px;
        border-bottom: 1px solid #eef2f7;
    }

    .mobile-services-head > div {
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .mobile-services-head strong {
        color: #111827;
        font-size: 17px;
        line-height: 1.25;
        font-weight: 800;
    }

    .mobile-services-head span {
        color: #7b8798;
        font-size: 11.5px;
        line-height: 1.4;
        font-weight: 500;
    }

    .mobile-services-close {
        width: 36px;
        height: 36px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
        padding: 0;
        border: 1px solid #e7edf5;
        border-radius: 11px;
        color: #657386;
        background: #f8fafc;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-services-close svg {
        width: 18px;
        height: 18px;
        stroke: currentColor;
    }

    .mobile-services-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding-top: 14px;
    }

    .mobile-services-grid > a {
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 11px;
        padding: 13px 12px;
        color: #182230;
        background: #f8fafc;
        border: 1px solid #e8edf4;
        border-radius: 14px;
        text-decoration: none;
        -webkit-tap-highlight-color: transparent;
        transition: border-color .18s ease, background-color .18s ease, transform .18s ease;
    }

    .mobile-services-grid > a:active {
        transform: scale(.98);
    }

    .mobile-services-grid > a.active {
        color: #0b67df;
        background: #f1f7ff;
        border-color: #b9d8ff;
    }

    .mobile-service-icon {
        width: 38px;
        height: 38px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
        border-radius: 11px;
        color: #1677ff;
        background: #eaf3ff;
    }

    .mobile-service-icon svg {
        width: 19px;
        height: 19px;
        stroke: currentColor;
    }

    .mobile-services-grid > a > span:last-child {
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .mobile-services-grid strong {
        overflow: hidden;
        color: inherit;
        font-size: 12.5px;
        line-height: 1.25;
        font-weight: 800;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-services-grid small {
        overflow: hidden;
        color: #8490a2;
        font-size: 10.5px;
        line-height: 1.25;
        font-weight: 500;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    html.mobile-services-open,
    body.mobile-services-open {
        overflow: hidden !important;
        overscroll-behavior: none;
    }
}

/* =========================================================
   Mobile Bottom Nav V5 — Services floating popover
   Mô phỏng card nổi 2x2 ngay phía trên bottom nav như mẫu F12,
   nhưng giữ font/layout gốc của website và không khóa trang bằng overlay.
   ========================================================= */
.mobile-services-popover { display: none; }

@media (max-width: 1600px) {
    /* Vô hiệu hoàn toàn bottom-sheet/overlay V4 nếu CSS cũ còn cache. */
    .mobile-services-overlay,
    .mobile-services-sheet { display: none !important; }

    .mobile-services-popover {
        position: fixed;
        left: 24px;
        right: 24px;
        bottom: calc(78px + env(safe-area-inset-bottom));
        z-index: 1065;
        display: block;
        width: auto;
        max-width: 420px;
        margin: 0 auto;
        padding: 14px;
        background: rgba(255,255,255,.985);
        border: 1px solid #edf0f4;
        border-radius: 22px;
        box-shadow: 0 14px 38px rgba(15,23,42,.12);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(10px) scale(.985);
        transform-origin: 35% 100%;
        transition: opacity .18s ease, transform .2s cubic-bezier(.22,.8,.25,1), visibility .18s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-services-popover.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0) scale(1);
    }

    .mobile-services-popover .mobile-services-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
        margin: 0;
        padding: 0;
    }

    .mobile-services-popover .mobile-service-card {
        min-width: 0;
        min-height: 108px;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 8px;
        padding: 14px 13px 12px;
        margin: 0;
        color: #111827;
        background: #fff;
        border: 1px solid #edf0f3;
        border-radius: 18px;
        text-decoration: none;
        box-shadow: 0 1px 2px rgba(15,23,42,.02);
        transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
        touch-action: manipulation;
    }

    .mobile-services-popover .mobile-service-card:active {
        transform: scale(.975);
    }

    .mobile-services-popover .mobile-service-card.active {
        border-color: #dce7f7;
        box-shadow: 0 0 0 1px rgba(22,119,255,.04);
    }

    .mobile-services-popover .mobile-service-icon {
        width: 40px;
        height: 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 40px;
        border-radius: 13px;
    }

    .mobile-services-popover .mobile-service-icon svg {
        width: 21px;
        height: 21px;
        display: block;
        stroke: currentColor;
        vector-effect: non-scaling-stroke;
    }

    .mobile-services-popover .mobile-service-hosting .mobile-service-icon {
        color: #1677ff;
        background: #edf5ff;
    }

    .mobile-services-popover .mobile-service-vps .mobile-service-icon {
        color: #b547ff;
        background: #faf1ff;
    }

    .mobile-services-popover .mobile-service-domain .mobile-service-icon {
        color: #13b981;
        background: #ecfbf5;
    }

    .mobile-services-popover .mobile-service-cronjob .mobile-service-icon {
        color: #f59e0b;
        background: #fff8e8;
    }

    .mobile-services-popover .mobile-service-copy {
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
        line-height: 1.1;
    }

    .mobile-services-popover .mobile-service-copy strong {
        display: block;
        margin: 0;
        color: #171717;
        font-size: 15px;
        line-height: 1.15;
        font-weight: 750;
        letter-spacing: -.015em;
    }

    .mobile-services-popover .mobile-service-copy small {
        display: block;
        margin: 0;
        color: #a1a1aa;
        font-size: 11px;
        line-height: 1.2;
        font-weight: 500;
    }



    /* Nạp tiền dùng cùng popover với Dịch vụ nhưng chỉ có 2 phương thức. */
    .mobile-deposit-popover {
        transform-origin: 55% 100%;
    }
    .mobile-deposit-popover .mobile-deposit-bank .mobile-service-icon {
        color: #1677ff;
        background: #edf5ff;
    }
    .mobile-deposit-popover .mobile-deposit-card .mobile-service-icon {
        color: #8b5cf6;
        background: #f4efff;
    }
    .mobile-bottom-nav > button.mobile-deposit-trigger[aria-expanded="true"] {
        color: #111827;
    }
    .mobile-bottom-nav > button.mobile-deposit-trigger[aria-expanded="true"] .mobile-bottom-nav-icon {
        color: #111827;
        background: #f4f4f5;
        transform: scale(1.08);
    }

    /* Khi menu mở, tab Dịch vụ nổi bật theo đúng cảm giác mẫu: tối + nền xám nhẹ. */
    .mobile-bottom-nav > button.mobile-services-trigger[aria-expanded="true"] {
        color: #111827;
    }

    .mobile-bottom-nav > button.mobile-services-trigger[aria-expanded="true"] .mobile-bottom-nav-icon {
        color: #111827;
        background: #f4f4f5;
        transform: scale(1.08);
    }
}

@media (max-width: 390px) {
    .mobile-services-popover {
        left: 18px;
        right: 18px;
        padding: 12px;
    }

    .mobile-services-popover .mobile-service-card {
        min-height: 102px;
        padding: 12px;
    }
}

/* =========================================================
   Mobile Bottom Nav V6 — Đồng bộ typography với giao diện gốc
   Website dùng Inter 400/500/600/700. V5 dùng font-weight 750
   khiến trình duyệt tự synthesize nét chữ, nhìn lệch so với site.
   ========================================================= */
@media (max-width: 767px) {
    .mobile-services-popover,
    .mobile-services-popover * {
        font-family: Inter, inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
        font-synthesis: none;
    }

    .mobile-services-popover .mobile-service-copy {
        gap: 3px;
        line-height: 1.25;
    }

    .mobile-services-popover .mobile-service-copy strong {
        margin: 0;
        color: #1d1d1d;
        font-family: inherit !important;
        font-size: 14px;
        line-height: 1.3;
        font-weight: 600;
        letter-spacing: 0;
    }

    .mobile-services-popover .mobile-service-copy small {
        margin: 0;
        color: #9aa3af;
        font-family: inherit !important;
        font-size: 11px;
        line-height: 1.35;
        font-weight: 400;
        letter-spacing: 0;
    }

    /* Đồng bộ luôn chữ bottom nav để card và thanh menu cùng một hệ chữ. */
    .mobile-bottom-nav > a,
    .mobile-bottom-nav > button,
    .mobile-bottom-nav .mobile-bottom-nav-label {
        font-family: Inter, inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
        letter-spacing: 0 !important;
        font-synthesis: none;
    }

    .mobile-bottom-nav > a,
    .mobile-bottom-nav > button {
        font-weight: 500;
    }

    .mobile-bottom-nav > a.active,
    .mobile-bottom-nav > button.active,
    .mobile-bottom-nav > button[aria-expanded="true"] {
        font-weight: 600;
    }
}

/* =========================================================
   Mobile Bottom Nav V7 — Tiêu đề dịch vụ đậm, đen
   Giữ đúng font Inter của site, dùng weight 700 có sẵn thay vì synthesize.
   ========================================================= */
@media (max-width: 767px) {
    .mobile-services-popover .mobile-service-copy strong {
        color: #111827 !important;
        font-weight: 700 !important;
        font-size: 14px;
        line-height: 1.25;
        letter-spacing: 0;
    }

    .mobile-services-popover .mobile-service-copy small {
        color: #9ca3af !important;
        font-weight: 400 !important;
    }

    .mobile-bottom-nav > button.mobile-services-trigger[aria-expanded="true"] .mobile-bottom-nav-label {
        color: #111827 !important;
        font-weight: 700 !important;
    }
}

/* =========================================================
   Back to top V8 — compact Lucide arrow-up
   Chọn lọc từ mẫu F12: mobile 36px, desktop 40px, icon 16px.
   Không dùng ảnh cũ và không để vùng click vô hình đè bottom nav.
   ========================================================= */
.back-to-top {
    position: static !important;
    width: 0 !important;
    height: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: none !important;
}

.back-to-top .back-to-top-icon {
    position: fixed !important;
    right: 24px !important;
    bottom: 24px !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: #1677ff !important;
    color: #fff !important;
    box-shadow: 0 6px 18px rgba(22, 119, 255, .22) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(8px) scale(.96) !important;
    transition: opacity .22s ease, transform .22s ease, background-color .22s ease !important;
    z-index: 1050 !important;
    text-decoration: none !important;
    line-height: 1 !important;
}

.back-to-top .back-to-top-icon svg {
    width: 16px !important;
    height: 16px !important;
    display: block !important;
    flex: 0 0 16px !important;
    color: currentColor !important;
}

.back-to-top .back-to-top-icon.show {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) scale(1) !important;
}

.back-to-top .back-to-top-icon:hover,
.back-to-top .back-to-top-icon:focus-visible {
    background: #1268df !important;
    color: #fff !important;
    transform: translateY(0) scale(1.08) !important;
    outline: none !important;
}

.back-to-top .back-to-top-icon:active {
    transform: translateY(0) scale(.95) !important;
}

@media (max-width: 767px) {
    .back-to-top .back-to-top-icon {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        min-height: 36px !important;
        right: 16px !important;
        bottom: calc(76px + env(safe-area-inset-bottom)) !important;
        box-shadow: 0 5px 14px rgba(22, 119, 255, .20) !important;
    }

    .back-to-top .back-to-top-icon:hover,
    .back-to-top .back-to-top-icon:focus-visible {
        transform: translateY(0) scale(1) !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .back-to-top .back-to-top-icon {
        transition: none !important;
    }
}

/* ==========================================================
   v48 — đồng bộ kích thước logo GIF ở footer với header.
   Logo thường vẫn giữ kích thước cũ; chỉ GIF được tăng vì canvas
   rộng làm phần hình thật nhìn nhỏ nếu dùng height 32px.
   ========================================================== */
.stc-footer-modern.stc-footer-logo-is-gif .stc-footer-logo img {
    height: 48px !important;
    max-width: 250px !important;
    transform: scale(1.06);
    transform-origin: left center;
}

@media (max-width: 767.98px) {
    .stc-footer-modern.stc-footer-logo-is-gif .stc-footer-logo img {
        height: 42px !important;
        max-width: 215px !important;
        transform: scale(1.04);
    }
}

@media (max-width: 380px) {
    .stc-footer-modern.stc-footer-logo-is-gif .stc-footer-logo img {
        height: 40px !important;
        max-width: 200px !important;
    }
}


/* ==========================================================
   v49 — tăng logo toàn bộ footer, không phụ thuộc định dạng file.
   Đồng bộ kích thước với header để GIF/PNG/JPG đều không bị quá nhỏ.
   ========================================================== */
.stc-footer-modern .stc-footer-logo img,
.stc-footer-modern.stc-footer-logo-is-gif .stc-footer-logo img {
    width: auto !important;
    height: 64px !important;
    max-height: 64px !important;
    max-width: 340px !important;
    object-fit: contain !important;
    transform: none !important;
}

@media (max-width: 991.98px) {
    .stc-footer-modern .stc-footer-logo img,
    .stc-footer-modern.stc-footer-logo-is-gif .stc-footer-logo img {
        height: 58px !important;
        max-height: 58px !important;
        max-width: 310px !important;
    }
}

@media (max-width: 767.98px) {
    .stc-footer-modern .stc-footer-logo img,
    .stc-footer-modern.stc-footer-logo-is-gif .stc-footer-logo img {
        height: 54px !important;
        max-height: 54px !important;
        max-width: min(280px, 76vw) !important;
    }
}

@media (max-width: 390px) {
    .stc-footer-modern .stc-footer-logo img,
    .stc-footer-modern.stc-footer-logo-is-gif .stc-footer-logo img {
        height: 50px !important;
        max-height: 50px !important;
        max-width: 245px !important;
    }
}

/* ==========================================================
   v51 — Logout confirmation synchronized with the modern UI
   ========================================================== */
#logoutModal.stc-logout-modal {font-family: Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif !important;}
#logoutModal.stc-logout-modal .modal-dialog {max-width: 430px !important; padding: 12px !important;}
#logoutModal.stc-logout-modal .modal-content {
    border: 1px solid #dce5ef !important;
    border-radius: 18px !important;
    background: #fff !important;
    box-shadow: 0 24px 70px rgba(24,45,69,.2) !important;
    overflow: hidden !important;
}
#logoutModal .stc-logout-modal-head {
    position: relative !important; display: flex !important; align-items: center !important; gap: 12px !important;
    padding: 20px 54px 16px 20px !important; border-bottom: 1px solid #edf2f7 !important;
}
#logoutModal .stc-logout-modal-icon {
    width: 44px !important; height: 44px !important; flex: 0 0 44px !important; display: inline-flex !important; align-items: center !important; justify-content: center !important;
    border: 1px solid #ffd6d9 !important; border-radius: 13px !important; background: #fff3f4 !important; color: #dc3545 !important;
}
#logoutModal .stc-logout-modal-icon svg {width: 20px !important; height: 20px !important;}
#logoutModal .stc-logout-modal-copy {min-width: 0 !important;}
#logoutModal .stc-logout-modal-copy h5 {margin: 0 !important; color: #1f3145 !important; font-size: 16px !important; line-height: 1.3 !important; font-weight: 800 !important;}
#logoutModal .stc-logout-modal-copy p {margin: 4px 0 0 !important; color: #8999aa !important; font-size: 10.75px !important; line-height: 1.45 !important; font-weight: 500 !important;}
#logoutModal .stc-logout-modal-close {
    position: absolute !important; top: 15px !important; right: 15px !important; width: 32px !important; height: 32px !important;
    display: inline-flex !important; align-items: center !important; justify-content: center !important; padding: 0 !important;
    border: 1px solid transparent !important; border-radius: 9px !important; background: transparent !important; color: #94a3b8 !important;
}
#logoutModal .stc-logout-modal-close:hover {background: #f4f7fa !important; color: #52677e !important;}
#logoutModal .stc-logout-modal-close svg {width: 16px !important; height: 16px !important;}
#logoutModal .stc-logout-modal-body {padding: 20px !important; color: #52677e !important; font-size: 12.5px !important; line-height: 1.6 !important; font-weight: 500 !important;}
#logoutModal .stc-logout-modal-actions {
    display: flex !important; align-items: center !important; justify-content: flex-end !important; gap: 8px !important;
    padding: 14px 18px 18px !important; border-top: 1px solid #edf2f7 !important; background: #fbfdff !important;
}
#logoutModal .stc-logout-modal-cancel,
#logoutModal .stc-logout-modal-confirm {
    min-height: 40px !important; display: inline-flex !important; align-items: center !important; justify-content: center !important; gap: 7px !important;
    padding: 0 15px !important; border-radius: 10px !important; font-size: 11.75px !important; line-height: 1 !important; font-weight: 750 !important; text-decoration: none !important;
}
#logoutModal .stc-logout-modal-cancel {border: 1px solid #d8e3ed !important; background: #fff !important; color: #52677e !important;}
#logoutModal .stc-logout-modal-cancel:hover {background: #f4f8fc !important;}
#logoutModal .stc-logout-modal-confirm {border: 1px solid #dc3545 !important; background: #dc3545 !important; color: #fff !important;}
#logoutModal .stc-logout-modal-confirm:hover {background: #c72f3e !important; border-color: #c72f3e !important; color: #fff !important;}
#logoutModal .stc-logout-modal-confirm svg {width: 15px !important; height: 15px !important;}
@media (max-width: 575.98px) {
    #logoutModal.stc-logout-modal .modal-dialog {margin: 0 auto !important; padding: 14px !important;}
    #logoutModal .stc-logout-modal-actions {display: grid !important; grid-template-columns: 1fr 1fr !important;}
    #logoutModal .stc-logout-modal-cancel,#logoutModal .stc-logout-modal-confirm {width: 100% !important;}
}


/* =========================================================
   V106 — iPad/Surface quick-nav popovers
   Cho phép 2 nút Dịch vụ/Nạp tiền mở menu nổi giống mobile.
   ========================================================= */
@media (min-width:768px) and (max-width:1600px){
    html.stc-tablet-mobile-ui .mobile-services-popover{
        bottom:calc(82px + env(safe-area-inset-bottom));
        max-width:460px;
    }
    html.stc-tablet-mobile-ui .mobile-services-popover .mobile-services-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
    html.stc-tablet-mobile-ui .mobile-bottom-nav > button[aria-expanded="true"] .mobile-bottom-nav-icon{
        transform:none!important;
    }
}
