/* ==========================================================
   THEME — Premium UI layer (chỉ giao diện, không đổi logic)
   Nạp SAU cùng trong _P_Styles để ghi đè bootstrap/site/map.
   ========================================================== */
:root {
    --brand: #1f7a4d;
    --brand-dark: #14532d;
    --brand-soft: #e8f5ee;
    --accent: #0e8aa6;
    --accent-dark: #0b6f86;
    --danger: #e5533d;
    --ink: #14211b;
    --muted: #5b6b63;
    --line: #e3e9e5;
    --surface: #ffffff;
    --surface-glass: rgba(255, 255, 255, .88);
    --radius-sm: 10px;
    --radius: 14px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 2px rgba(16, 40, 28, .06), 0 2px 8px rgba(16, 40, 28, .06);
    --shadow: 0 8px 28px rgba(16, 40, 28, .14);
    --shadow-lg: 0 20px 50px rgba(16, 40, 28, .22);
    --ease: cubic-bezier(.2, .7, .2, 1);
}

body {
    font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--ink);
    background: #f6f9f7;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { color: var(--ink); font-weight: 700; letter-spacing: -.01em; }
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }

:focus-visible { outline: 3px solid rgba(31, 122, 77, .35); outline-offset: 2px; }

/* ---------- Navbar (layout chính) ---------- */
header .navbar {
    background: var(--surface-glass) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line) !important;
    box-shadow: var(--shadow-sm) !important;
    padding: .7rem 0;
}
.navbar-brand { font-weight: 800; color: var(--brand-dark); letter-spacing: -.02em; }
.navbar .nav-link {
    position: relative;
    color: var(--ink) !important;
    font-weight: 500;
    padding: .5rem .9rem;
    border-radius: 999px;
    transition: background .25s var(--ease), color .25s var(--ease);
}
.navbar .nav-link:hover { background: var(--brand-soft); color: var(--brand-dark) !important; }

/* ---------- Footer ---------- */
.footer {
    width: auto;
    left: 12px;
    bottom: 12px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--surface-glass);
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-sm);
    font-size: 12px;
}
.footer-content { gap: 8px; }
.footer a { color: var(--muted) !important; }
.footer img { width: 24px; height: 24px; object-fit: contain; }
main.pb-3 { padding-bottom: 4.5rem !important; }

/* ---------- Button ---------- */
.btn {
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease);
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); }

.btn-search, .btn-reset {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    color: #fff;
    border: 0;
}
.btn-search { background: linear-gradient(135deg, var(--accent), var(--brand)); }
.btn-search:hover { color: #fff; background: linear-gradient(135deg, var(--accent-dark), var(--brand-dark)); }
.btn-reset { background: #fff; color: var(--danger); border: 1px solid #f3c9c1; }
.btn-reset:hover { color: #fff; background: var(--danger); }

/* ---------- Form / Select2 ---------- */
label { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.form-control, .form-select {
    border-radius: var(--radius-sm);
    border-color: var(--line);
    transition: border-color .2s, box-shadow .2s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(31, 122, 77, .14);
}
.select2-container--default .select2-selection--single {
    height: 42px !important;
    padding: 0 6px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
}
.select2-container--default .select2-selection--single:hover { border-color: var(--brand); }
.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(31, 122, 77, .14);
}
.select2-container--default .select2-selection--single .select2-selection__arrow { top: 4px !important; }
.select2-container--default .select2-dropdown {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.select2-container--default .select2-results__option { padding: 9px 12px; font-size: 14px; }
.select2-container--default .select2-results__option--highlighted[aria-selected] { background: var(--brand); }
.select2-container--default .select2-search--dropdown .select2-search__field { border-radius: 8px; border-color: var(--line); }

/* ---------- Template pages (Home / Privacy / Error) ---------- */
main[role="main"] { padding-top: 1.5rem; }
main[role="main"] h1.display-4 { font-weight: 800; color: var(--brand-dark); }
main[role="main"] > .text-center, main[role="main"] > h1, main[role="main"] > h2, main[role="main"] > h3, main[role="main"] > p {
    animation: theme-rise .5s var(--ease) both;
}
@keyframes theme-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Preloader ---------- */
/* ---------- Preloader ---------- */
.preloader_wrapper,
.loader-section .bg {
    background: radial-gradient(ellipse at 50% 40%, #ffffff 0%, #f1f8f4 60%, #e6f2ec 100%);
}
.animation-preloader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 26px;
}
.spinner img {
    width: min(220px, 52vw) !important;
    height: auto;
    object-fit: contain;
    animation: theme-float 2.4s ease-in-out infinite;
    filter: drop-shadow(0 14px 22px rgba(20, 83, 45, .18));
}
/* Thanh tiến trình chạy liên tục (thuần CSS, không đổi markup) */
.animation-preloader::after {
    content: "";
    width: min(160px, 40vw);
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent 0, var(--brand) 40%, var(--accent) 60%, transparent 100%) 0 0 / 200% 100% no-repeat, rgba(31, 122, 77, .14);
    animation: theme-bar 1.4s var(--ease) infinite;
}
@keyframes theme-float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.04); }
}
@keyframes theme-bar {
    from { background-position: 200% 0, 0 0; }
    to { background-position: -100% 0, 0 0; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ==========================================================
   MAP PAGE
   ========================================================== */
.logo_img { width: 72px; top: 12px; transition: transform .3s var(--ease); }
.logo_img:hover { transform: scale(1.05); }
.logo_img img { border-radius: var(--radius-sm); box-shadow: var(--shadow); background: #fff; }

.search_container { top: 14px; }
.active-search {
    padding: 11px 18px;
    border-radius: 999px;
    background: var(--surface-glass);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    font-weight: 600;
    color: var(--brand-dark);
    user-select: none;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s;
}
.active-search:hover { transform: translateY(-1px); background: #fff; box-shadow: var(--shadow-lg); }

.search-content {
    top: 68px;
    width: min(560px, calc(100vw - 24px));
    padding: 18px 20px 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    animation: theme-pop .25s var(--ease) both;
}
.search-content.hidden { display: none; }
@keyframes theme-pop { from { opacity: 0; transform: translateY(-8px) scale(.98); } to { opacity: 1; transform: none; } }
.search-content .container { padding-left: 0; padding-right: 0; }

.filter .title { font-size: 18px; font-weight: 700; color: var(--brand-dark); margin: 0; }
.filter #close i { color: #aab5af; transition: color .2s, transform .2s var(--ease); }
.filter #close:hover i { color: var(--danger); transform: rotate(90deg); }

.nav-tabs { border-bottom: 1px solid var(--line); gap: 6px; margin-top: 10px; }
.nav-tabs .nav-link {
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    color: var(--muted);
    font-weight: 600;
    padding: 8px 14px;
    transition: color .2s, border-color .2s;
}
.nav-tabs .nav-link:hover { color: var(--brand); border-color: transparent; }
.nav-tabs .nav-link.active { color: var(--brand-dark); background: transparent; border-bottom-color: var(--brand); }
.mat-divider { border-top: 0; margin: 4px 0 !important; }
.form-search .form-group { margin-bottom: 2px; }

.pretty.p-default .state label { font-size: 14px; color: var(--ink); }
.button-container { align-items: center; gap: 10px; }

.wecome { right: 14px; bottom: 56px; gap: 10px; }
.link-join { margin-bottom: 0; }
.link-join span { margin-right: 0; }
.link-join span a {
    display: inline-block;
    margin-right: 0;
    padding: 10px 22px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    box-shadow: var(--shadow);
    transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.link-join span a:hover { color: #fff; background: linear-gradient(135deg, var(--brand-dark), var(--accent-dark)); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.qrcode { padding: 6px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.qrcode img { border-radius: 8px; }

/* Popup */
.overlay { background: rgba(10, 24, 17, .55); backdrop-filter: blur(3px); }
.popup-container {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    animation: theme-pop .3s var(--ease) both;
}
.popup-header p { color: var(--brand-dark); font-weight: 800; letter-spacing: .02em; }
.button-close { transition: transform .25s var(--ease), color .2s; }
.button-close:hover { transform: rotate(90deg); color: var(--danger); }

.profile-content { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.profile-footer { background: var(--brand-soft); }
.profile_name span { color: var(--brand-dark); }
.swiper, .swiper img { border-radius: var(--radius-sm); }
.nav-icon .next, .nav-icon .prev { background: rgba(20, 33, 27, .75); border-radius: 6px; }

.icon-container { border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.icon-container:hover { background: var(--brand-soft); box-shadow: var(--shadow-sm); }
.icon-container:hover i { color: var(--brand); box-shadow: none; }
.icon-container .tooltip { border-radius: 8px; background: var(--ink); }
.icon-container .tooltip::after { border-color: var(--ink) transparent transparent transparent; }

.media { border-bottom: 1px solid var(--line); transition: background .2s; }
.media:hover { background: #f8fbf9; }
.media img { border-radius: var(--radius-sm); }
.media-body h6 { color: var(--ink); font-weight: 600; }
.slick-prev:hover::after, .slick-next:hover::after { color: var(--brand); }

/* Marker doanh nghiệp: viền trắng + sóng lan tỏa (không animate transform của chính marker vì Goong dùng nó để định vị) */
.marker {
    border: 2px solid #fff;
    background-color: #fff;
    background-position: center;
    box-shadow: 0 2px 8px rgba(16, 40, 28, .35);
}
.marker::before,
.marker::after {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 2px solid var(--brand);
    opacity: 0;
    pointer-events: none;
    animation: theme-ripple 2.4s ease-out infinite;
}
.marker::after { animation-delay: 1.2s; }
.marker:hover { box-shadow: 0 0 0 3px rgba(31, 122, 77, .35), 0 4px 12px rgba(16, 40, 28, .4); }
@keyframes theme-ripple {
    0% { transform: scale(1); opacity: .65; }
    100% { transform: scale(2.1); opacity: 0; }
}

@media (max-width: 768px) {
    .logo_img { width: 56px; }
    .search_container { left: 76px; }
    .search-content { left: 12px; top: 64px; max-height: calc(100vh - 150px); }
    .wecome { bottom: 52px !important; right: 10px; }
    .link-join span a { padding: 8px 14px; font-size: 12px; }
    .qrcode { width: 64px; }
}

/* ---------- Form bộ lọc (tinh chỉnh) ---------- */
.search-content label {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 6px;
}
.search-content .form-search .row { --bs-gutter-x: 1.25rem; row-gap: 4px; }
.search-content .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 40px;
    padding-left: 12px;
    padding-right: 28px;
    color: var(--ink);
    font-weight: 500;
}
.search-content .select2-container--default .select2-selection--single .select2-selection__arrow { right: 8px; top: 3px !important; }
.search-content .select2-container--default .select2-selection--single .select2-selection__arrow b { border-color: var(--muted) transparent transparent; }
.search-content .select2-container--disabled .select2-selection--single {
    background: #f4f7f5;
    border-style: dashed;
    cursor: not-allowed;
}
.search-content .select2-container--disabled .select2-selection__rendered { color: #9aa8a0 !important; }

/* Hàng hành động: ngăn cách + căn lề đúng với các ô nhập */
.search-content .form-search .row:last-child {
    margin-top: 8px;
    padding: 16px 15px 0;
    flex-direction: row !important;
    flex-wrap: nowrap;
    justify-content: space-between;
    border-top: 1px solid var(--line);
    align-items: center;
}
.search-content .button-container { padding: 0; margin: 0; }
.search-content .button-container + div { width: 120px !important; margin-left: auto; opacity: .95; }
.search-content .btn-search { padding: 11px 22px; box-shadow: 0 6px 16px rgba(14, 138, 166, .28); }
.search-content .btn-reset { padding: 11px 14px; }

.filter #close i { font-size: 22px; }
.pretty.p-default .state label { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 14px; }

/* Ô chọn đang khóa/rỗng: hiện placeholder thay vì trống */
.search-content .select2-selection__rendered:empty::before {
    content: "--Chọn--";
    color: #9aa8a0;
    font-weight: 500;
}

/* "Số sao": checkbox dạng chip có ngôi sao (pretty-checkbox, giữ nguyên input.star-checkbox) */
.search-content .form-check-container { gap: 10px; margin-top: 4px; }
.search-content .pretty { margin: 0; }
.search-content .pretty.p-default .state label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    padding: 7px 16px;
    text-indent: 0;
    text-transform: none;
    letter-spacing: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    cursor: pointer;
    transition: border-color .2s, background .2s, color .2s, box-shadow .2s, transform .2s var(--ease);
}
.search-content .pretty.p-default .state label:after { display: none; }
.search-content .pretty.p-default .state label:before {
    content: "005";
    position: static;
    width: auto;
    height: auto;
    border: 0;
    background: none;
    transform: none;
    font-family: "Font Awesome 6 Free";
    font-weight: 400;
    font-size: 13px;
    line-height: 1;
    color: #c9a227;
    transition: transform .25s var(--ease);
}
.search-content .pretty.p-default:hover .state label { border-color: #f0d36b; background: #fffbea; color: var(--ink); }
.search-content .pretty.p-default:hover .state label:before { transform: rotate(-15deg) scale(1.15); }
.search-content .pretty.p-default input:checked ~ .state label {
    color: #7a5a00;
    background: linear-gradient(135deg, #fff6d6, #ffe9a3);
    border-color: #f0c53c;
    box-shadow: 0 4px 12px rgba(240, 197, 60, .35);
}
.search-content .pretty.p-default input:checked ~ .state label:before { font-weight: 900; color: #f5a800; }
.search-content .pretty.p-default input:focus-visible ~ .state label { box-shadow: 0 0 0 4px rgba(31, 122, 77, .25); }

/* Hàng nút + logo: chặn Bootstrap 5 (.row > * { width:100% }) làm logo tràn khỏi panel */
.search-content .form-search .row:last-child > * {
    width: auto;
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
    margin-top: 0;
}
.search-content .button-container + div { flex-shrink: 0; }

/* Nút điều khiển bản đồ (góc phải) */
.mapboxgl-ctrl-group { border-radius: var(--radius-sm); box-shadow: var(--shadow); overflow: hidden; }
.map-home-btn { display: flex; align-items: center; justify-content: center; color: #333; transition: background .2s, color .2s; }
.map-home-btn i { font-size: 15px; }
.map-home-btn:hover { background: var(--brand-soft); color: var(--brand-dark); }

/* Tooltip marker doanh nghiệp (hiện khi hover) */
.marker:hover { z-index: 5; }
.marker-tip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 14px);
    width: max-content;
    max-width: 240px;
    padding: 9px 13px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, 6px) scale(.96);
    transform-origin: 50% 100%;
    transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
}
.marker-tip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    width: 10px;
    height: 10px;
    background: #fff;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    transform: translate(-50%, -5px) rotate(45deg);
}
.marker-tip strong {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--brand-dark);
    text-transform: uppercase;
}
.marker-tip span {
    font-size: 12px;
    line-height: 1.4;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.marker:hover .marker-tip { opacity: 1; visibility: visible; transform: translate(-50%, 0) scale(1); }

/* ==========================================================
   POPUP CHI TIẾT DOANH NGHIỆP
   (.profile-content được html2canvas chụp: tránh filter/backdrop)
   ========================================================== */
.popup-container {
    padding: 28px 28px 8px;
    border: 1px solid rgba(255, 255, 255, .6);
    scrollbar-width: thin;
    scrollbar-color: #c3cfc8 transparent;
}
.popup-header { padding: 6px 44px 0; margin-bottom: 22px; }
.popup-header p {
    font-size: clamp(20px, 3.2vw, 28px);
    line-height: 1.3;
    padding-bottom: 14px;
    position: relative;
}
.popup-header p::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 64px;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--brand), var(--accent));
    transform: translateX(-50%);
}
.button-close {
    top: 0;
    right: 0;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f1f5f3;
    color: var(--muted);
    transition: background .2s, color .2s, transform .25s var(--ease);
}
.button-close:hover { background: var(--danger); color: #fff; transform: rotate(90deg); }
.button-close i { font-size: 14px; }

/* Thanh công cụ (chụp ảnh / lưu link / lưu vị trí) */
.profile-title { gap: 10px; margin-bottom: 4px; }
.icon-container { margin: 0 0 8px; padding: 0; width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; }
.icon-container > span { display: flex; }
.icon-container i { font-size: 17px; color: var(--muted); }
.icon-container:hover { transform: translateY(-2px); }
.icon-container .tooltip { width: max-content; max-width: 220px; margin-left: 0; transform: translateX(-50%); padding: 6px 10px; font-size: 12px; font-weight: 500; }

/* Thẻ danh thiếp */
.profile-content {
    max-width: none;
    margin-bottom: 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-top: 5px solid var(--brand);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.profile-header {
    margin: 0;
    padding: 14px 18px 12px;
    justify-content: flex-start;
    gap: 14px;
    background: linear-gradient(180deg, var(--brand-soft), #fff);
}
.profile-header .img_logo { width: 52px; height: 52px; flex: none; padding: 3px; background: #fff; border-radius: 12px; box-shadow: var(--shadow-sm); }
.profile-header img { width: 100%; height: 100%; object-fit: contain; border-radius: 9px; }
.profile-name p { font-size: 16px; font-weight: 700; color: var(--brand-dark); }
.profile-body { margin-top: 6px; }
.body-name { padding: 0 18px; text-align: left; }
.body-name p { font-size: 17px; font-weight: 800; line-height: 1.35; color: var(--ink); }
.body-info { margin-top: 12px; padding: 0 18px 16px; gap: 14px; align-items: flex-end; }
.body-info > div:first-child { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.detail-item { align-items: flex-start; gap: 10px; }
.contact-icon {
    flex: none;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand);
}
.contact-icon i { font-size: 12px; }
.detail-item .text { font-size: 13.5px; font-weight: 500; line-height: 1.45; color: var(--ink); padding-top: 3px; word-break: break-word; }
.body-info .qr-profile { width: 64px; height: 64px; margin-right: 0; padding: 3px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-sm); }
.body-info .qr-profile img { object-fit: contain; border-radius: 9px; }
.profile-footer { margin: 0; padding: 10px 18px; justify-content: flex-start; gap: 12px; background: linear-gradient(90deg, var(--brand-soft), #f3fafc); border-top: 1px solid var(--line); }
.profile-footer img { width: 34px; height: 34px; object-fit: contain; }
.profile-footer p { font-size: 12.5px; font-weight: 700; letter-spacing: .02em; }

/* Cột sản phẩm */
.product_content h4 {
    position: relative;
    margin: 0 0 12px;
    padding-left: 12px;
    font-size: 18px;
    font-weight: 800;
}
.product_content h4::before {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    bottom: 3px;
    width: 4px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--brand), var(--accent));
}
.custom-popup .right { max-height: 360px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #c3cfc8 transparent; }

/* Bản đồ nhỏ trong popup */
#mapPopup {
    margin: 6px 0 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

@media (max-width: 768px) {
    .popup-container { padding: 18px 16px 4px; }
    .popup-header { padding: 4px 36px 0; margin-bottom: 14px; }
    .button-close { top: -4px; right: -4px; width: 34px; height: 34px; }
    .body-info { padding: 0 14px 14px; }
    .body-name { padding: 0 14px; }
    .custom-popup .right { max-height: none; }
}

/* Trạng thái rỗng: không có sản phẩm (ghi đè inline style của markup) */
.notifica-not-found {
    width: 100% !important;
    padding: 28px 16px 24px;
    background: linear-gradient(180deg, #f8fbf9, #fff);
    border: 1.5px dashed #cfdad3;
    border-radius: var(--radius);
    animation: theme-rise .4s var(--ease) both;
}
.notifica-not-found img {
    width: 84px;
    height: 84px;
    margin: 0 auto;
    object-fit: contain;
    opacity: .9;
    animation: theme-float 3s ease-in-out infinite;
}
.notifica-not-found p {
    margin: 12px 0 0 !important;
    font-size: 13.5px !important;
    font-style: normal !important;
    font-weight: 500;
    color: var(--muted);
}
.notifica-not-found p::first-letter { text-transform: uppercase; }

/* ==========================================================
   DANH SÁCH SẢN PHẨM TRONG POPUP
   ========================================================== */
.div_list_new_product { padding-bottom: 6px; }
.div_list_new_product .media {
    gap: 14px;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
.div_list_new_product .media:hover {
    transform: translateY(-2px);
    background: #fff;
    border-color: #bfdccc;
    box-shadow: var(--shadow);
}
.div_list_new_product .media > a:first-child { flex: none; line-height: 0; }
.div_list_new_product .media img {
    width: 84px;
    height: 84px;
    min-width: 84px;
    max-width: 84px;
    padding: 0;
    border-radius: 12px;
    background: #eef4f0;
    box-shadow: 0 2px 8px rgba(16, 40, 28, .12);
    transition: transform .35s var(--ease);
}
.div_list_new_product .media:hover img { transform: scale(1.05); }
.div_list_new_product .media-body { width: auto !important; flex: 1; min-width: 0; }
.div_list_new_product .media-body h6 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    transition: color .2s;
}
.div_list_new_product .media:hover h6 { color: var(--brand-dark); }
.div_list_new_product .rating { margin: 0 0 6px; font-size: 11px; gap: 3px; }
/* fa-star-o (FA4) không có trong FA5/6: vẽ sao rỗng */
.rating .fa-star-o { font-weight: 400; font-family: "Font Awesome 6 Free"; }
.rating .fa-star-o::before { content: "\f005"; }

/* Chấm phân trang slick */
.slick-dots { bottom: -22px; }
.slick-dots li { width: 14px; height: 14px; margin: 0 3px; }
.slick-dots li button { width: 14px; height: 14px; padding: 0; }
.slick-dots li button:before {
    content: "";
    left: 50%;
    top: 50%;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #b9c8bf;
    opacity: 1;
    transform: translate(-50%, -50%);
    transition: width .25s var(--ease), background .25s;
}
.slick-dots li.slick-active button:before { width: 20px; border-radius: 999px; background: var(--brand); opacity: 1; }

/* Tiêu đề "Sản phẩm" neo lại khi cuộn danh sách */
.product_content h4 {
    position: sticky;
    top: 0;
    z-index: 3;
    margin: 0 0 6px;
    padding: 8px 0 10px 12px;
    background: #fff;
    box-shadow: 0 8px 8px -8px rgba(16, 40, 28, .18);
}
.product_content h4::before { top: 11px; bottom: 13px; }

/* Nút mũi tên chuyển slide: đưa xuống hàng dưới cùng, ngang với chấm phân trang
   (vị trí cũ nằm phía trên danh sách nên bị tiêu đề sticky che mất) */
.div_list_new_product.slick-dotted.slick-slider { margin-bottom: 46px; }
.div_list_new_product .slick-prev,
.div_list_new_product .slick-next {
    top: auto;
    bottom: -40px;
    transform: none;
    z-index: 4;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--brand-soft);
    box-shadow: var(--shadow-sm);
    transition: background .2s, transform .2s var(--ease);
}
.div_list_new_product .slick-prev { left: 0; right: auto; }
.div_list_new_product .slick-next { right: 0; left: auto; }
.div_list_new_product .slick-prev::after,
.div_list_new_product .slick-next::after {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--brand);
}
.div_list_new_product .slick-prev:hover,
.div_list_new_product .slick-next:hover { background: var(--brand); transform: scale(1.08); }
.div_list_new_product .slick-prev:hover::after,
.div_list_new_product .slick-next:hover::after { color: #fff; }
.div_list_new_product .slick-dots { bottom: -32px; }

/* ==========================================================
   Danh sách sản phẩm: chỉ cuộn vùng slide (slick-list),
   tiêu đề + mũi tên + chấm phân trang luôn hiển thị
   ========================================================== */
.custom-popup .right { max-height: none; overflow: visible; }
.product_content h4 {
    position: relative;
    top: auto;
    z-index: auto;
    margin: 0 0 14px;
    padding: 0 0 0 12px;
    background: none;
    box-shadow: none;
}
.product_content h4::before { top: 3px; bottom: 3px; }

.div_list_new_product.slick-dotted.slick-slider { margin-bottom: 34px; }
.div_list_new_product .slick-list {
    max-height: 350px;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #c3cfc8 transparent;
}
.div_list_new_product .slick-prev,
.div_list_new_product .slick-next {
    top: -46px;
    bottom: auto;
    width: 30px;
    height: 30px;
}
.div_list_new_product .slick-next { right: 0; left: auto; }
.div_list_new_product .slick-prev { right: 38px; left: auto; }
.div_list_new_product .slick-dots { bottom: -28px; }

@media (max-width: 768px) {
    .div_list_new_product .slick-list { max-height: none; overflow-y: hidden; }
}

/* Nút liên kết về TMDT247.VN (bên phải nút Bộ lọc) */
.search_container { display: flex; align-items: center; gap: 10px; }
.btn-tmdt-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    box-shadow: var(--shadow);
    color: #fff;
    font-weight: 600;
    white-space: nowrap;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s;
}
.btn-tmdt-link:hover { color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-lg); background: linear-gradient(135deg, var(--brand-dark), var(--accent-dark)); }
@media (max-width: 768px) {
    .btn-tmdt-link { padding: 11px 14px; }
    .btn-tmdt-link span { display: none; }
}

/* ==========================================================
   TÌM KIẾM / DANH SÁCH / KIỂU BẢN ĐỒ / LIÊN HỆ NHANH / SKELETON
   ========================================================== */
.map-search { position: absolute; top: 14px; left: 480px; width: 320px; z-index: 5; }
.map-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 5px 4px 16px;
    background: var(--surface-glass);
    backdrop-filter: blur(10px);
    border-radius: 999px;
    box-shadow: var(--shadow);
}
.map-search-box > i { color: var(--muted); font-size: 14px; }
.map-search-box input {
    flex: 1;
    min-width: 0;
    padding: 9px 0;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 14px;
    color: var(--ink);
}
.map-search-box:focus-within { box-shadow: 0 0 0 4px rgba(31, 122, 77, .18), var(--shadow); background: #fff; }
.map-search-box button {
    flex: none;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand);
    transition: background .2s, color .2s;
}
.map-search-box button:hover { background: var(--brand); color: #fff; }
.map-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    max-height: 340px;
    overflow-y: auto;
    padding: 6px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    animation: theme-pop .2s var(--ease) both;
}
.map-search-empty, .lp-empty { padding: 18px 12px; text-align: center; font-size: 13px; color: var(--muted); }

/* Dòng doanh nghiệp dùng chung cho kết quả tìm kiếm và danh sách */
.lp-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 9px 10px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    text-align: left;
    transition: background .2s;
}
.lp-item:hover { background: var(--brand-soft); }
.lp-item img { flex: none; width: 44px; height: 44px; border-radius: 10px; background: #eef4f0; box-shadow: var(--shadow-sm); }
.lp-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lp-info strong {
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.lp-info span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-item em {
    flex: none;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
}

/* Panel danh sách */
.list-panel {
    position: fixed;
    left: 14px;
    bottom: 56px;
    z-index: 950;
    width: 340px;
    max-height: min(60vh, 520px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: theme-pop .25s var(--ease) both;
}
.lp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 12px 8px; }
.lp-tabs { display: flex; gap: 6px; background: #f1f5f3; padding: 4px; border-radius: 999px; }
.lp-tab {
    padding: 6px 12px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--muted);
    transition: background .2s, color .2s, box-shadow .2s;
}
.lp-tab.active { background: #fff; color: var(--brand-dark); box-shadow: var(--shadow-sm); }
#lp_close { width: 30px; height: 30px; border: 0; border-radius: 50%; background: #f1f5f3; color: var(--muted); transition: background .2s, color .2s; }
#lp_close:hover { background: var(--danger); color: #fff; }
.lp-sub { padding: 0 16px 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
.lp-sub:empty { display: none; }
.lp-body { flex: 1; overflow-y: auto; padding: 0 6px 8px; scrollbar-width: thin; scrollbar-color: #c3cfc8 transparent; }

/* Nút chọn kiểu bản đồ */
.map-style-ctrl { position: relative; overflow: visible; }
.map-style-menu {
    position: absolute;
    top: 0;
    right: 38px;
    min-width: 130px;
    padding: 6px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
}
.map-style-menu button {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    height: auto;
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink);
}
.map-style-menu button i { width: 16px; text-align: center; color: var(--muted); }
.map-style-menu button:hover { background: var(--brand-soft); }
.map-style-menu button.active { background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; }
.map-style-menu button.active i { color: var(--brand); }

/* Popup: liên hệ nhanh + yêu thích */
.contact-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.act-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.act-btn:hover { color: #fff; transform: translateY(-2px); box-shadow: var(--shadow); }
.act-call { background: linear-gradient(135deg, var(--brand), #2fb585); }
.act-zalo { background: #0068ff; }
.act-route { background: #fff; color: var(--brand-dark); border: 1px solid #bfdccc; }
.act-route:hover { color: var(--brand-dark); background: var(--brand-soft); }
.icon-container.is-fav { background: #fff1ee; border-color: #f3c9c1; }
.icon-container.is-fav i, .icon-container.is-fav:hover i { color: var(--danger); }

/* Skeleton danh sách sản phẩm */
.sk-item { display: flex; gap: 14px; padding: 10px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: var(--radius); }
.sk-img { flex: none; width: 84px; height: 84px; border-radius: 12px; }
.sk-lines { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.sk-lines span { display: block; height: 12px; border-radius: 6px; }
.sk-lines span:last-child { width: 60%; }
.sk-img, .sk-lines span {
    background: linear-gradient(90deg, #eef3f0 25%, #f8fbf9 45%, #eef3f0 65%) 0 0 / 300% 100%;
    animation: theme-shimmer 1.4s linear infinite;
}
@keyframes theme-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

@media (max-width: 768px) {
    .map-search { top: 64px; left: 10px; right: 10px; width: auto; }
    .list-panel { left: 10px; right: 10px; bottom: 52px; width: auto; max-height: 46vh; }
    .panel-open .wecome { display: none; }
}

/* Phóng to mã QR */
.qrcode { cursor: zoom-in; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.qrcode:hover { transform: scale(1.05); box-shadow: var(--shadow-lg); }
.qr-zoom {
    position: fixed;
    inset: 0;
    z-index: 1000001;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 24, 17, .65);
    backdrop-filter: blur(4px);
    cursor: zoom-out;
    opacity: 0;
    transition: opacity .25s var(--ease);
}
.qr-zoom.show { opacity: 1; }
.qr-zoom-box {
    width: min(360px, 80vw);
    padding: 16px;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transform: scale(.6);
    transition: transform .3s var(--ease);
}
.qr-zoom.show .qr-zoom-box { transform: scale(1); }
.qr-zoom-box img { display: block; width: 100%; height: auto; border-radius: 10px; }

/* Thu nhỏ cụm "Tham gia ngay" + QR (desktop; mobile đã có kích thước riêng) */
@media (min-width: 769px) {
    .wecome { gap: 8px; bottom: 52px; }
    .link-join span a { padding: 7px 16px; font-size: 13px; }
    .qrcode { width: 78px; padding: 5px; }
}

.list-panel.hidden, .map-search-results.hidden, .map-style-menu.hidden { display: none; }

/* Phím tắt / điều hướng bàn phím */
.lp-item.active, .lp-item:focus-visible { background: var(--brand-soft); outline: 0; }
.marker:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; z-index: 5; }
.marker:focus-visible .marker-tip { opacity: 1; visibility: visible; transform: translate(-50%, 0) scale(1); }
.button-close:focus-visible { outline: 3px solid rgba(31, 122, 77, .45); outline-offset: 2px; }

/* Trang Home / Error */
.home-hero { max-width: 640px; margin: 0 auto; padding: 56px 16px 24px; text-align: center; animation: theme-rise .5s var(--ease) both; }
.home-hero-logo { width: 120px; height: auto; object-fit: contain; margin-bottom: 18px; }
.home-hero h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 800; margin-bottom: 12px; }
.home-hero h1:not(.text-danger) { color: var(--brand-dark); }
.home-hero p { color: var(--muted); font-size: 1.02rem; line-height: 1.6; }
.home-request-id code { padding: 2px 8px; border-radius: 6px; background: var(--brand-soft); color: var(--ink); }
.home-hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 26px; }
.home-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    box-shadow: var(--shadow);
    color: #fff;
    font-weight: 600;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.home-cta:hover { color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.home-cta-outline { background: #fff; color: var(--brand-dark); border: 1px solid #bfdccc; box-shadow: none; }
.home-cta-outline:hover { color: var(--brand-dark); background: var(--brand-soft); box-shadow: var(--shadow-sm); }

/* Ô tìm kiếm: nút đóng/mở + trạng thái thu gọn */
.map-search-box { padding: 4px 5px 4px 4px; }
.map-search-box .search-toggle { color: var(--brand); }
.map-search-box .search-toggle .ic-close { display: none; }
.map-search-box input { padding-left: 4px; }
.map-search.collapsed { width: auto; }
.map-search.collapsed .map-search-box { padding: 4px; gap: 0; }
.map-search.collapsed .map-search-box > :not(.search-toggle) { display: none; }
.map-search.collapsed .search-toggle { width: 42px; height: 42px; }
.map-search.collapsed .map-search-results { display: none; }

@media (max-width: 768px) {
    .map-search { top: 84px; }
    .map-search:not(.collapsed) .search-toggle .ic-open { display: none; }
    .map-search:not(.collapsed) .search-toggle .ic-close { display: inline; }
}
@media (max-width: 768px) {
    .map-search.collapsed { right: auto; }
}

/* Tab thống kê */
.lp-tab { padding: 6px 9px; font-size: 12px; }
.lp-tabs { gap: 2px; }
.st-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 4px 6px 12px; }
.st-card { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; background: linear-gradient(180deg, var(--brand-soft), #f3fafc); border: 1px solid var(--line); border-radius: var(--radius-sm); text-align: center; }
.st-card strong { font-size: 20px; font-weight: 800; color: var(--brand-dark); line-height: 1.1; }
.st-card span { font-size: 11px; color: var(--muted); font-weight: 600; }
.st-title { padding: 2px 10px 8px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.st-row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 8px 10px 12px; border: 0; border-radius: 10px; background: transparent; font-size: 13px; text-align: left; transition: background .2s; }
.st-row:hover { background: var(--brand-soft); }
.st-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-weight: 500; }
.st-row strong { flex: none; color: var(--brand-dark); }
.st-row i { position: absolute; left: 10px; bottom: 5px; height: 4px; max-width: calc(100% - 20px); border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--accent)); }

/* Mobile: cụm "Tham gia ngay" + QR nhỏ gọn, sát góc */
@media (max-width: 768px) {
    .wecome { right: 6px; bottom: 36px !important; gap: 5px; }
    .link-join span a { padding: 5px 11px; font-size: 11px; }
    .qrcode { width: 52px; padding: 3px; border-radius: 10px; margin-bottom: 0; }
    .qrcode img { border-radius: 6px; }
}

/* Mobile: footer gọn lại, cụm Tham gia nằm trên footer (không bị che) */
@media (max-width: 768px) {
    .footer { left: 6px; bottom: 6px; padding: 4px 10px; font-size: 10px; }
    .footer img { width: 18px; height: 18px; }
    .wecome { z-index: 1001; bottom: 44px !important; }
}

/* ==========================================================
   CHẾ ĐỘ TỐI (body.map-dark, bật khi chọn kiểu bản đồ "Tối")
   Đổi token màu; danh thiếp giữ nền sáng để tải về/chia sẻ đẹp
   ========================================================== */
body.map-dark {
    --brand: #34b27b;
    --brand-dark: #7fdcb2;
    --brand-soft: #1b3a2b;
    --accent: #2aa3c0;
    --accent-dark: #1f8aa6;
    --ink: #e8f0ec;
    --muted: #9db0a6;
    --line: #2b3b33;
    --surface: #17231d;
    --surface-glass: rgba(23, 35, 29, .88);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4), 0 2px 8px rgba(0, 0, 0, .35);
    --shadow: 0 8px 28px rgba(0, 0, 0, .5);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, .65);
    color-scheme: dark;
}
/* Danh thiếp luôn dùng bảng màu sáng */
body.map-dark .profile-content {
    --brand: #1f7a4d;
    --brand-dark: #14532d;
    --brand-soft: #e8f5ee;
    --ink: #14211b;
    --muted: #5b6b63;
    --line: #e3e9e5;
    background: #fff;
}

/* Nền các khối đang gán trắng cứng */
body.map-dark .popup-container,
body.map-dark .list-panel,
body.map-dark .map-search-results,
body.map-dark .map-style-menu,
body.map-dark .qr-zoom-box,
body.map-dark .marker-tip,
body.map-dark .media,
body.map-dark .icon-container,
body.map-dark .search-content { background: var(--surface); }
body.map-dark .marker-tip::after { background: var(--surface); border-color: var(--line); }
body.map-dark .popup-container .button-close,
body.map-dark #lp_close,
body.map-dark .lp-tabs { background: #223229; }
body.map-dark .lp-tab.active { background: #2c4034; color: var(--brand-dark); }
body.map-dark .media:hover,
body.map-dark .div_list_new_product .media:hover { background: #1d2d25; }
body.map-dark .media-body h6, body.map-dark .media-body h6 a { color: var(--ink); }
body.map-dark .qrcode, body.map-dark .logo_img img { background: #fff; }
body.map-dark .notifica-not-found { background: linear-gradient(180deg, #1b2a22, var(--surface)); border-color: #34483d; }
body.map-dark .st-card { background: linear-gradient(180deg, #1d3a2c, #1a2d2a); }

/* Form, Select2, chip sao */
body.map-dark .select2-container--default .select2-selection--single,
body.map-dark .select2-container--default .select2-dropdown { background: #1e2c25; border-color: var(--line); }
body.map-dark .select2-container--default .select2-selection--single .select2-selection__rendered,
body.map-dark .select2-container--default .select2-results__option { color: var(--ink); }
body.map-dark .select2-container--default .select2-search--dropdown .select2-search__field { background: #17231d; color: var(--ink); border-color: var(--line); }
body.map-dark .select2-container--disabled .select2-selection--single { background: #1a2620; }
body.map-dark .pretty.p-default .state label { background: #1e2c25; }
body.map-dark .pretty.p-default:hover .state label { background: #2d2a17; color: var(--ink); }
body.map-dark .pretty.p-default input:checked ~ .state label { color: #ffe9a3; background: linear-gradient(135deg, #4a3d12, #6b5516); }
body.map-dark .btn-reset { background: transparent; border-color: #6b3a32; }
body.map-dark .act-route { background: transparent; color: var(--brand-dark); border-color: #34483d; }
body.map-dark .icon-container.is-fav { background: #3a2220; border-color: #6b3a32; }
body.map-dark .sk-item { border-color: var(--line); }
body.map-dark .sk-img, body.map-dark .sk-lines span { background: linear-gradient(90deg, #223229 25%, #2b3d33 45%, #223229 65%) 0 0 / 300% 100%; }

/* Nút điều khiển bản đồ (đảo màu icon nền sáng của Goong) */
body.map-dark .mapboxgl-ctrl-group { background: var(--surface); }
body.map-dark .mapboxgl-ctrl-group button + button { border-top-color: var(--line); }
body.map-dark .mapboxgl-ctrl-group .mapboxgl-ctrl-icon { filter: invert(1) brightness(1.2); }
body.map-dark .map-home-btn { color: var(--ink); }
body.map-dark .map-style-menu button { color: var(--ink); }
body.map-dark .map-style-menu button:hover, body.map-dark .map-style-menu button.active { background: var(--brand-soft); }

/* Giữ nền đậm cho các nút gradient khi hover (brand-dark ở chế độ tối là màu sáng) */
body.map-dark .btn-search:hover,
body.map-dark .link-join span a:hover,
body.map-dark .btn-tmdt-link:hover { background: linear-gradient(135deg, #14532d, #0b6f86); }
