:root {
    --bg: #f7f5f1;
    --paper: #fff;
    --cream: #fbf6ec;
    --ink: #2e2a22;
    --muted: #8a8477;
    --line: rgba(46, 42, 34, .1);
    --gold: #a97a45;
    --gold-2: #b8823d;
    --blue: #6e8299;
    --blue-soft: #eaf0f2;
    --sand: #f1e7d5;
    --green: #7a8a6e;
    --danger: #b5745a;
    --shadow: 0 12px 34px rgba(0, 0, 0, .08);
    --radius: 16px;
    --font-head: "Baloo 2", sans-serif;
    --font-body: "Be Vietnam Pro", sans-serif;
    --font-hand: "Caveat", cursive;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}

/* ============================================================
   FORM ELEMENT SYSTEM — source of truth, đồng bộ toàn site
   Chiều cao 44px khớp với .btn, không override ở chỗ khác.
   ============================================================ */
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="color"]):not([type="hidden"]),
select,
textarea {
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    outline: 0;
    box-sizing: border-box;
}

textarea {
    min-height: 100px;
    padding: 10px 12px;
    resize: vertical;
}

/* Standard select class — marker cho tất cả <select> trong admin, style từ selector chung bên trên */
.admin-select { }

/* Reset global styles cho input bên trong TomSelect */
.ts-control input,
.ts-dropdown input {
    min-height: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

button {
    border: 0;
    cursor: pointer;
}

main {
    min-height: calc(100vh - 240px);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    height: 64px;
    padding: 0 24px;
    background: rgba(255, 255, 255, .9);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

.brand,
.site-nav {
    display: flex;
    align-items: center;
}

.brand {
    gap: 9px;
    font-family: var(--font-head);
    font-weight: 800;
}

.brand-mark {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 9px;
    background: var(--gold);
    color: #fff;
}

.brand-name {
    font-size: 19px;
}

.brand-name span,
.footer-logo span,
.hero h1 span {
    color: var(--gold-2);
}

.site-nav {
    gap: 22px;
    font-size: 13px;
    font-weight: 600;
    color: #5b5548;
}

.site-nav a {
    padding: 4px 0;
    border-bottom: 2px solid transparent;
}

.site-nav a.active {
    color: var(--ink);
    border-bottom-color: var(--gold);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: transparent;
}

.nav-toggle span {
    display: block;
    width: 21px;
    height: 2px;
    background: var(--ink);
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 520px;
    padding: 78px 24px 58px;
    background:
        linear-gradient(rgba(247, 245, 241, .9), rgba(247, 245, 241, .96)),
        repeating-linear-gradient(0deg, #dcd7cc 0 1px, transparent 1px 28px),
        repeating-linear-gradient(90deg, #dcd7cc 0 1px, transparent 1px 28px);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}

.eyebrow,
.handwritten {
    font-family: var(--font-hand);
    font-weight: 700;
    color: var(--blue);
}

.eyebrow {
    margin: 0 0 8px;
    font-size: 22px;
}

.hero h1,
.landing-hero h1 {
    margin: 0;
    font-family: var(--font-head);
    font-size: clamp(42px, 7vw, 74px);
    line-height: .98;
}

.hero p:not(.eyebrow),
.landing-hero p,
.section-head p,
.page-intro p {
    color: var(--muted);
    line-height: 1.7;
}

.hero p:not(.eyebrow) {
    max-width: 620px;
    margin: 18px auto 24px;
}

.hero-search,
.listing-search {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 640px;
    margin: 0 auto;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 5px 16px rgba(0, 0, 0, .06);
}

.hero-search input,
.listing-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--ink);
}

.hero-search button {
    padding: 9px 16px;
    border-radius: 10px;
    background: var(--ink);
    color: #fff;
    font-weight: 700;
}

.quick-filters,
.hero-actions,
.tag-row,
.chip-cloud,
.card-actions,
.footer-social,
.time-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quick-filters {
    justify-content: center;
    margin-top: 14px;
}

.quick-filters a,
.food-cloud a,
.chip-cloud button,
.chip-cloud a,
.time-row button {
    padding: 8px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: #5b5548;
    font-size: 12px;
    font-weight: 700;
}

.quick-filters .active,
.food-cloud .active,
.chip-cloud .active,
.time-row .active {
    border-color: var(--ink);
    background: var(--ink);
    color: #fff;
}

.hero-actions {
    justify-content: center;
    margin-top: 18px;
}

/* ============================================================
   BUTTON SYSTEM — source of truth, dùng toàn bộ site
   Không override padding/min-height ở chỗ khác, chỉ dùng
   các size class và color class bên dưới.
   ============================================================ */

/* --- Base --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
    border: 0;
    text-decoration: none;
}

/* --- Sizes --- */
.btn-sm {
    min-height: 30px;
    padding: 0 10px;
    font-size: 11px;
    border-radius: 8px;
}

.btn-lg {
    min-height: 52px;
    padding: 0 22px;
    font-size: 15px;
    border-radius: 14px;
}

.btn-icon {
    min-height: 44px;
    width: 44px;
    padding-inline: 0;
    background: #f5f2ec;
}

.btn-icon.btn-sm {
    min-height: 30px;
    width: 30px;
}

/* --- Colors --- */
.btn-dark {
    background: var(--ink);
    color: #fff;
}

.btn-gold {
    background: var(--gold);
    color: #fff;
}

.btn-light {
    background: #fff;
    color: var(--ink);
    border: 1px solid var(--line);
}

.btn-outline {
    border: 1.5px solid var(--ink);
    background: transparent;
    color: var(--ink);
}

.btn-info {
    background: var(--blue);
    color: #fff;
}

.btn-success {
    background: var(--green);
    color: #fff;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-warning {
    background: #c48a2e;
    color: #fff;
}

/* btn-compact = alias của btn-sm (backward compat) */
.btn-compact {
    min-height: 30px;
    padding: 0 10px;
    font-size: 11px;
    border-radius: 8px;
}

/* btn-small = alias của btn-sm */
.btn-small {
    min-height: 30px;
    padding: 0 10px;
    font-size: 11px;
    border-radius: 8px;
}

/* btn-big = alias của btn-lg */
.btn-big {
    min-height: 52px;
    padding: 0 22px;
    font-size: 15px;
    border-radius: 14px;
}

.hero-map-grid .pin,
.mini-map span {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50% 50% 50% 0;
    background: var(--gold);
    transform: rotate(-45deg);
    box-shadow: 0 0 0 7px rgba(169, 122, 69, .15);
}

.pin-one {
    left: 18%;
    top: 28%;
}

.pin-two {
    right: 18%;
    top: 32%;
    background: var(--blue) !important;
}

.pin-three {
    left: 58%;
    bottom: 20%;
}

.section,
.page-intro,
.breadcrumb,
.landing-hero {
    max-width: 1180px;
    margin: 0 auto;
    padding: 34px 24px;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.section-head h2,
.page-intro h1,
.note-card h2,
.related-video h2 {
    margin: 0;
    font-family: var(--font-head);
    font-size: 28px;
    line-height: 1.1;
}

.section-head p,
.page-intro p {
    margin: 4px 0 0;
}

.section-head a {
    color: var(--gold);
    font-size: 12px;
    font-weight: 800;
}

.featured-grid,
.places-grid,
.related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.place-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(46, 42, 34, .06);
    border-radius: var(--radius);
    box-shadow: 0 3px 12px rgba(0, 0, 0, .04);
}

.tilt-left {
    transform: rotate(-1deg);
}

.tilt-right {
    transform: rotate(1deg);
}

.place-photo {
    position: relative;
    display: grid;
    aspect-ratio: 16 / 9;
    min-height: 166px;
    place-items: center;
    text-align: center;
    font: 700 11px ui-monospace, Menlo, monospace;
    color: #a8916b;
}

.ph {
    display: grid;
    place-items: center;
    text-align: center;
    font: 700 11px ui-monospace, Menlo, monospace;
}

.ph-warm {
    background: repeating-linear-gradient(45deg, #e7dbc5, #e7dbc5 10px, #f1e7d5 10px, #f1e7d5 20px);
    color: #a8916b;
}

.ph-cool {
    background: repeating-linear-gradient(45deg, #dce3e8, #dce3e8 10px, #eaeff2 10px, #eaeff2 20px);
    color: var(--blue);
}

.ph-sand {
    background: repeating-linear-gradient(45deg, #e9dfc9, #e9dfc9 10px, #f3eada 10px, #f3eada 20px);
    color: #a8916b;
}

.ph-muted {
    background: repeating-linear-gradient(45deg, #f0ede6, #f0ede6 10px, #f7f5f1 10px, #f7f5f1 20px);
    color: #b4ab9a;
}

.place-badge {
    display: inline-flex;
    align-items: center;
    width: max-content;
    padding: 5px 10px;
    border-radius: 10px;
    color: #fff;
    font-size: 10px;
    font-style: normal;
    font-weight: 800;
    white-space: nowrap;
}

.place-photo .place-badge {
    position: absolute;
    top: 10px;
    left: 10px;
}

.badge-blue {
    background: var(--blue);
}

.badge-gold,
.badge-copper {
    background: var(--gold-2);
}

.badge-green {
    background: var(--green);
}

.video-dot {
    position: absolute;
    top: 10px;
    right: 10px;
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, .5);
    color: #fff;
    font-size: 12px;
}

.place-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    padding: 15px;
}

.place-body h3 {
    margin: 0;
    font: 800 18px/1.1 var(--font-head);
}

.place-meta,
.place-summary,
.muted {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.open-line {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    color: #5b5548;
    font-size: 12px;
    font-weight: 600;
}

.open-line span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.is-open span,
.map-place-card .is-open::before {
    background: #6e9c6e;
}

.is-closed span,
.map-place-card .is-closed::before {
    background: var(--danger);
}

.tag {
    padding: 4px 9px;
    border-radius: 8px;
    background: var(--blue-soft);
    color: #4d7086;
    font-size: 10.5px;
    font-weight: 700;
}

.tag-food {
    background: var(--sand);
    color: #8a6a35;
}

.card-actions {
    margin-top: auto;
    padding-top: 6px;
}

.card-actions .btn-dark {
    flex: 1;
}

.split-section {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 26px;
}

.section-head.compact {
    margin-bottom: 12px;
}

.province-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.province-card {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 16px;
    border-radius: 14px;
}

.province-card strong {
    font: 800 17px var(--font-head);
}

.province-card span {
    font-size: 12px;
    font-weight: 700;
}

.tone-warm {
    background: var(--sand);
    color: #8a6a35;
}

.tone-cool {
    background: var(--blue-soft);
    color: #4d7086;
}

.food-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.memory-row,
.video-row {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 4px 4px 18px;
}

.memory-card {
    flex: 0 0 180px;
    padding: 10px 10px 18px;
    background: #fff;
    box-shadow: 0 9px 24px rgba(0, 0, 0, .1);
}

.memory-card > span {
    height: 130px;
}

.memory-card strong,
.memory-card em {
    display: block;
}

.memory-card strong {
    margin-top: 9px;
    font: 800 15px var(--font-head);
}

.memory-card em {
    color: var(--gold);
    font-family: var(--font-hand);
    font-size: 17px;
}

.rotate-1 {
    transform: rotate(-3deg);
}

.rotate-2 {
    transform: rotate(2deg);
}

.rotate-3 {
    transform: rotate(-1deg);
}

.video-card {
    flex: 0 0 260px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    border-radius: 15px;
    background: #fff;
}

.video-card span,
.video-link span {
    width: max-content;
    padding: 5px 9px;
    border-radius: 8px;
    background: var(--ink);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    margin-top: 20px;
    padding: 30px 24px;
    background: var(--ink);
    color: rgba(255, 255, 255, .68);
}

.site-footer > div {
    max-width: 520px;
}

.footer-logo {
    color: #fff;
    font: 800 22px var(--font-head);
}

.footer-social a {
    padding: 7px 11px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    font-size: 12px;
}

.page-intro {
    padding-bottom: 0;
}

.page-intro h1,
.landing-hero h1 {
    font-size: 38px;
}

.listing-search {
    max-width: none;
    margin: 16px 0 14px;
}

.listing-search.compact {
    margin: 0;
    box-shadow: none;
    background: #f5f2ec;
}

.mobile-filter-btn {
    display: none;
    padding: 8px 12px;
    border-radius: 9px;
    background: var(--ink);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.listing-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.quick-filters.small {
    justify-content: flex-start;
    margin: 0;
}

.listing-toolbar label {
    color: var(--muted);
    font-size: 12px;
}

.listing-toolbar select,
.map-filter select {
    font-weight: 700;
}

.listing-layout {
    display: grid;
    grid-template-columns: 270px 1fr;
    gap: 24px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px 24px 70px;
}

.filter-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 18px;
    border-radius: var(--radius);
    background: #fff;
}

.filter-card section {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.filter-card h3 {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.check-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 9px 0;
    font-size: 13px;
}

.check-row span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.check-row i {
    width: 16px;
    height: 16px;
    border: 1.5px solid rgba(46, 42, 34, .25);
    border-radius: 5px;
}

.check-row em {
    color: #b4ab9a;
    font-size: 12px;
    font-style: normal;
}

.chip-cloud.soft button {
    background: #f5f2ec;
    font-weight: 600;
}

.filter-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.mobile-filter-head,
.drawer-scrim {
    display: none;
}

.state-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.state-switch span {
    color: #b4ab9a;
    font-size: 12px;
}

.state-switch button {
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    color: #5b5548;
    font-size: 12px;
    font-weight: 800;
}

.state-switch button.active {
    background: var(--ink);
    color: #fff;
}

.empty-state {
    max-width: 480px;
    margin: 28px auto;
    padding: 34px;
    text-align: center;
    border-radius: var(--radius);
    background: #fff;
}

.empty-state strong {
    display: block;
    font: 800 24px var(--font-head);
}

.empty-state p {
    color: var(--muted);
}

.empty-state.standalone {
    margin-top: 80px;
}

.load-more {
    margin-top: 26px;
    text-align: center;
}

.skeleton-card {
    min-height: 310px;
    padding: 14px;
    gap: 14px;
}

.skeleton-card span,
.skeleton-card b,
.skeleton-card p {
    display: block;
    border-radius: 12px;
    background: linear-gradient(90deg, #eee8dc 25%, #f8f3ea 37%, #eee8dc 63%);
    background-size: 400% 100%;
    animation: qlm-shine 1.4s ease infinite;
}

.skeleton-card span {
    height: 150px;
}

.skeleton-card b {
    width: 70%;
    height: 20px;
}

.skeleton-card p {
    width: 90%;
    height: 14px;
}

@keyframes qlm-shine {
    from {
        background-position: 100% 50%;
    }
    to {
        background-position: 0 50%;
    }
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.breadcrumb strong {
    color: var(--ink);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 26px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px 40px;
}

.gallery-has-avatar {
    position: relative;
}

.gallery-avatar {
    position: absolute;
    bottom: -32px;
    left: 18px;
    width: 72px;
    height: 72px;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
    z-index: 2;
}

.gallery-has-avatar + .detail-title {
    padding-top: 42px;
}

.gallery-main {
    height: 350px;
    border-radius: 18px;
    font-size: 13px;
}

.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.gallery-thumbs span {
    height: 76px;
    border-radius: 11px;
}

.detail-title {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-top: 22px;
}

.detail-title h1 {
    margin: 0 0 10px;
    font: 800 34px var(--font-head);
}

.info-grid,
.detail-two-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.info-grid {
    margin-top: 18px;
    padding: 17px 18px;
    border-radius: 15px;
    background: #fff;
}

.info-grid b {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.info-grid span {
    font-size: 13px;
    line-height: 1.6;
}

.note-card {
    margin-top: 18px;
    padding: 20px;
    border-radius: 15px;
    background: #fff;
}

.note-card p,
.note-card li {
    color: #5b5548;
    font-size: 13.5px;
    line-height: 1.75;
}

.note-card ul {
    margin: 0;
    padding-left: 18px;
}

.note-card em {
    display: block;
    margin-top: 10px;
    font-size: 18px;
}

.related-video {
    margin-top: 24px;
}

.video-link {
    display: grid;
    grid-template-columns: 70px 1fr auto;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    padding: 12px 14px;
    border-radius: 13px;
    background: #fff;
}

.video-link small {
    color: var(--gold);
    font-weight: 800;
}

.detail-side {
    position: sticky;
    top: 86px;
    height: max-content;
}

.side-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    border-radius: 15px;
    background: #fff;
}

.mini-map {
    position: relative;
    height: 190px;
    margin-top: 16px;
    overflow: hidden;
    border-radius: 15px;
    background:
        linear-gradient(rgba(247, 245, 241, .55), rgba(247, 245, 241, .7)),
        repeating-linear-gradient(0deg, #dcd7cc 0 1px, transparent 1px 22px),
        repeating-linear-gradient(90deg, #dcd7cc 0 1px, transparent 1px 22px);
}

.mini-map span {
    top: 50%;
    left: 50%;
}

.mini-map small {
    position: absolute;
    bottom: 9px;
    left: 10px;
    padding: 4px 7px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .8);
    color: var(--muted);
    font: 700 10px ui-monospace, Menlo, monospace;
}

.mini-map iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.info-periods {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 5px;
}

.info-periods span {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.4;
}

.info-periods span b {
    display: inline;
    color: var(--text);
    font-size: 12px;
    text-transform: none;
    letter-spacing: 0;
    margin-bottom: 0;
}

.info-periods span em {
    font-style: normal;
    color: var(--muted);
}

.place-card-compact {
    display: grid;
    grid-template-columns: 118px 1fr;
}

.place-card-compact .place-photo {
    min-height: 100%;
}

.place-card-compact .place-summary,
.place-card-compact .video-dot {
    display: none;
}

.landing-hero {
    padding-top: 58px;
    padding-bottom: 20px;
}

.map-page {
    display: flex;
    height: calc(100vh - 64px);
    min-height: 560px;
}

.map-top-bar {
    display: none;
}

.page-map .site-header {
    height: 60px;
}

.page-map main {
    min-height: 0;
    overflow: visible;
}

.page-map .map-page {
    height: calc(100vh - 60px);
}

@media (min-width: 961px) {
    .page-map .real-map-shell {
        height: calc(100vh - 60px);
    }
}

.map-list {
    z-index: 8;
    display: flex;
    flex: 0 0 380px;
    min-width: 0;
    flex-direction: column;
    background: #fff;
    border-right: 1px solid var(--line);
}

.sheet-handle {
    display: none;
}

.map-filter {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 15px 16px 8px;
}

.map-filter .chip-cloud {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #c8bfb0 #f5f2ec;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
}

.map-filter .chip-cloud::-webkit-scrollbar {
    height: 4px;
}

.map-filter .chip-cloud::-webkit-scrollbar-track {
    background: #f5f2ec;
    border-radius: 4px;
}

.map-filter .chip-cloud::-webkit-scrollbar-thumb {
    background: #c8bfb0;
    border-radius: 4px;
}

.map-filter select {
    width: max-content;
    background: #f5f2ec;
}

.time-row {
    align-items: center;
}

.time-row b {
    color: #b4ab9a;
    font-size: 11px;
}

.time-row button {
    padding: 5px 10px;
    font-size: 10.5px;
}

.map-count {
    margin: 0;
    padding: 6px 16px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.map-card-list {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    padding: 8px 12px 16px;
}

.map-place-card {
    display: flex;
    gap: 10px;
    width: 100%;
    padding: 10px;
    text-align: left;
    border: 1.5px solid transparent;
    border-radius: 13px;
    background: #f9f7f3;
}

.map-place-card.active {
    border-color: var(--gold);
    background: #fbf3e7;
}

.map-thumb {
    display: grid;
    flex: 0 0 60px;
    height: 60px;
    place-items: center;
    border-radius: 10px;
    background: var(--sand);
    font-size: 20px;
}

.map-place-card strong,
.map-place-card small,
.map-place-card em,
.map-place-card i {
    display: block;
}

.map-place-card strong {
    font: 800 15px var(--font-head);
}

.map-place-card small {
    color: var(--muted);
    font-size: 11px;
}

.map-place-card em {
    position: relative;
    margin: 5px 0;
    padding-left: 12px;
    color: #5b5548;
    font-size: 11px;
    font-style: normal;
    font-weight: 600;
}

.map-place-card em::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.map-place-card i {
    width: max-content;
    padding: 3px 8px;
    border-radius: 7px;
    background: var(--sand);
    color: #8a6a35;
    font-size: 10px;
    font-style: normal;
    font-weight: 700;
}

.mock-map {
    position: relative;
    flex: 1;
    overflow: hidden;
}

.map-grid-bg {
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(0deg, #dcd7cc 0 1px, transparent 1px 30px),
        repeating-linear-gradient(90deg, #dcd7cc 0 1px, transparent 1px 30px),
        #edeae3;
}

.land,
.river,
.road {
    position: absolute;
}

.land {
    background: #dce6d6;
    opacity: .8;
}

.land-one {
    left: 6%;
    top: 8%;
    width: 22%;
    height: 26%;
    border-radius: 40% 60% 55% 45%;
}

.land-two {
    right: 8%;
    bottom: 10%;
    width: 26%;
    height: 20%;
    border-radius: 50% 40% 60% 45%;
}

.river {
    left: 0;
    top: 60%;
    width: 100%;
    height: 26px;
    transform: rotate(-4deg);
    background: #cbdce3;
    opacity: .85;
}

.road {
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}

.road-one {
    left: 0;
    top: 18%;
    width: 100%;
    height: 10px;
}

.road-two {
    left: 0;
    top: 63%;
    width: 100%;
    height: 9px;
    transform: rotate(2deg);
}

.road-three {
    left: 34%;
    top: 0;
    width: 9px;
    height: 100%;
    transform: rotate(6deg);
}

.map-marker {
    position: absolute;
    z-index: 4;
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 50% 50% 50% 0;
    background: var(--ink);
    color: #fff;
    box-shadow: 0 3px 8px rgba(0, 0, 0, .25);
    transform: translate(-50%, -100%) rotate(-45deg);
    transition: transform .15s, background .15s;
}

.map-marker::first-letter {
    transform: rotate(45deg);
}

.map-marker.active {
    z-index: 9;
    background: var(--gold);
    transform: translate(-50%, -100%) rotate(-45deg) scale(1.16);
}

.map-popup {
    position: absolute;
    z-index: 12;
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 10px;
    width: 260px;
    padding: 14px;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
    transform: translate(-50%, calc(-100% - 46px));
}

.map-popup > button {
    position: absolute;
    top: 8px;
    right: 9px;
    background: transparent;
    color: #b4ab9a;
    font-weight: 800;
}

.map-popup .ph {
    width: 64px;
    height: 64px;
    border-radius: 9px;
}

.map-popup strong,
.map-popup small,
.map-popup span {
    display: block;
}

.map-popup small {
    margin: 2px 0 6px;
    color: var(--muted);
    font-size: 11px;
}

.map-popup span {
    width: max-content;
    padding: 3px 8px;
    border-radius: 7px;
    background: var(--sand);
    color: #8a6a35;
    font-size: 10px;
    font-weight: 700;
}

.map-popup a {
    grid-column: 1 / -1;
    padding: 9px;
    text-align: center;
    border-radius: 9px;
    background: var(--ink);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.map-controls {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.map-controls button {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .12);
}

.open-google {
    position: absolute;
    right: 16px;
    bottom: 16px;
    z-index: 10;
    padding: 11px 16px;
    border-radius: 12px;
    background: var(--gold);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .15);
}

.map-location-prompt {
    position: absolute;
    left: 16px;
    top: 16px;
    z-index: 510;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    max-width: 290px;
    padding: 14px 15px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(46, 42, 34, .16);
    animation: mapPromptIn .28s ease both;
}

.map-location-prompt[hidden] {
    display: none;
}

.map-lp-icon {
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

.map-lp-body strong {
    display: block;
    font-family: var(--font-head);
    font-size: 14px;
    line-height: 1.2;
    margin-bottom: 3px;
}

.map-lp-body small {
    display: block;
    font-size: 11px;
    color: var(--muted);
    line-height: 1.45;
    margin-bottom: 10px;
}

.map-lp-actions {
    display: flex;
    gap: 6px;
}

.map-lp-actions button {
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    border: none;
    white-space: nowrap;
}

.map-lp-actions [data-prompt-allow] {
    background: var(--ink);
    color: #fff;
}

.map-lp-actions [data-prompt-skip] {
    background: var(--sand);
    color: var(--ink);
}

@keyframes mapPromptIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 960px) {
    .map-location-prompt {
        top: 12px;
        left: 12px;
        right: 12px;
        max-width: none;
    }
}

.admin-shell {
    display: flex;
    min-height: 100vh;
    min-width: 0;
    background: var(--bg);
}
.admin-sidebar {
    width: 250px;
    flex-shrink: 0;
    padding: 22px;
    background: var(--ink);
    color: #fff;
}

.admin-sidebar nav {
    display: grid;
    gap: 8px;
    margin-top: 24px;
}

.admin-sidebar a {
    padding: 10px 12px;
    border-radius: 10px;
    color: rgba(255, 255, 255, .72);
    font-size: 13px;
    font-weight: 700;
}

.admin-sidebar a.active {
    background: rgba(255, 255, 255, .12);
    color: #fff;
}

.admin-main {
    flex: 1;
    min-width: 0;
    padding: 24px;
}

.admin-top {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 14px;
}

.stat-card,
.admin-panel {
    padding: 18px;
    border-radius: 16px;
    background: #fff;
    min-width: 0;
}

.stat-card strong {
    display: block;
    font: 800 30px var(--font-head);
}

.admin-panel {
    margin-top: 18px;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
}

.admin-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.admin-table-head,
.admin-pagination,
.admin-filter-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-pagination {
    justify-content: flex-end;
}

.admin-table td small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

.admin-filter-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
}

.admin-filter-grid > label {
    flex: 1 1 140px;
}

.admin-filter-grid > .admin-filter-actions {
    margin-left: auto;
    flex-shrink: 0;
}

.admin-filter-grid label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.admin-filter-grid input,
.admin-filter-grid select {
    width: 100%;
}

.admin-filter-actions {
    justify-content: flex-start;
}

.admin-filter-source-panel {
    display: none !important;
}

.admin-filter-inline {
    margin: 12px 0 16px;
    padding: 12px;
    border: 1px solid rgba(46, 42, 34, .08);
    border-radius: 16px;
    background: #fffaf0;
}

.admin-filter-inline .admin-filter-actions {
    justify-content: flex-end;
}

.admin-table-head-muted {
    display: none !important;
}

.admin-status {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--paper);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.admin-status-published {
    background: #e8f8ed;
    color: #157347;
}

.admin-status-draft {
    background: #fff3cd;
    color: #9a6700;
}

.admin-status-disabled {
    background: #f8d7da;
    color: #842029;
}

.admin-pagination {
    margin-top: 14px;
    justify-content: flex-end;
}

.admin-pagination .btn:disabled {
    cursor: not-allowed;
    opacity: .45;
}
.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 12px;
}

:where(.admin-form-grid) label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    grid-column: span 3;
}

.admin-form-grid input,
.admin-form-grid textarea,
.admin-form-grid select {
    width: 100%;
}

.admin-form-grid > .full {
    grid-column: 1 / -1;
}

.admin-form-grid label:has([name="location_id"]),
.admin-form-grid label:has([name="location_text"]),
.admin-form-grid label:has([name="ward_text"]),
.admin-form-grid .admin-filter-actions:has([data-suggest-location]) {
    display: none;
}

.admin-hours-editor {
    display: grid;
    gap: 10px;
}

.admin-hours-template {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.88);
}

.admin-hours-template label {
    margin: 0;
}

.admin-hours-template-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}
.admin-hours-template-inputs select { width: 92px; flex-shrink: 0; }
.admin-hours-template-inputs select:nth-child(2) { width: 82px; }
.admin-hours-template-inputs select:nth-child(5) { width: 92px; }
.admin-hours-template-inputs select:nth-child(6) { width: 82px; }

.admin-hours-table th,
.admin-hours-table td {
    vertical-align: middle;
}

.admin-hours-summary-row.is-editing {
    background: rgba(255, 248, 230, 0.75);
}

.admin-hours-sale-toggle {
    white-space: nowrap;
}

.admin-hours-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.admin-hours-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 4px 10px;
    border: 1px solid rgba(46, 42, 34, 0.1);
    border-radius: 999px;
    background: #fff;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.admin-hours-actions {
    white-space: nowrap;
}

.admin-hours-editor-row td {
    padding: 0 !important;
    border-top: 0;
}

.admin-hours-editor-panel {
    display: grid;
    gap: 10px;
    padding: 14px;
    border-top: 1px dashed rgba(46, 42, 34, 0.12);
    background: rgba(255, 249, 240, 0.74);
}

.admin-hours-slots {
    display: grid;
    gap: 8px;
}

.admin-hours-slot {
    display: flex;
    align-items: center;
    gap: 6px;
}
.admin-hours-slot select { width: 92px; flex-shrink: 0; }
.admin-hours-slot select:nth-child(2) { width: 82px; }
.admin-hours-slot select:nth-child(5) { width: 92px; }
.admin-hours-slot select:nth-child(6) { width: 82px; }
.admin-hours-slot button { width: 42px; flex-shrink: 0; }

.admin-hours-editor select,
.admin-hours-template select {
    min-width: 0;
}

.admin-opening-hours-editor {
    display: grid;
    gap: 12px;
}

.admin-opening-hours-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.admin-opening-hours-bulk {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

.bulk-timeadd {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bulk-timeadd > span {
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
}

.admin-opening-hours-bulk > .admin-bulk-select-label:first-of-type {
    flex: 4;
}
.admin-opening-hours-bulk > .admin-bulk-select-label:last-of-type {
    flex: 3;
    min-width: 0;
}

.admin-bulk-select-label {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
}

.admin-bulk-select-label select[multiple] {
    height: 38px;
    min-width: 80px;
    padding: 2px 6px;
    font-size: 12px;
}

/* TomSelect cho Tháng bán / Nghỉ âm: ẩn search input & placeholder */
.admin-bulk-select-label .ts-control input,
.admin-bulk-select-label .ts-control .ts-placeholder { display: none !important; }

/* Chip to như Giờ bán */
.admin-bulk-select-label .ts-wrapper {
    min-width: 100px;
    cursor: pointer;
}
.admin-bulk-select-label .ts-wrapper.multi .ts-control {
    padding: 4px 6px;
    gap: 4px;
    min-height: 38px;
}
.admin-bulk-select-label .ts-wrapper.multi .item {
    font-size: 1em;
    padding: 5px 10px;
    border-radius: 6px;
}

.admin-opening-hours-bulk-inputs {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border: 1px solid rgba(46, 42, 34, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.86);
}
.admin-opening-hours-bulk-inputs select { width: 66px; flex-shrink: 0; }
.admin-opening-hours-bulk-inputs span { width: 14px; text-align: center; flex-shrink: 0; }

.admin-opening-hours-bulk-inputs select {
    width: 66px;
    min-width: 0;
    height: 38px;
    padding: 0 10px;
}

.admin-opening-hours-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}
.admin-opening-hours-day-card {
    flex: 1 1 120px;
}

.admin-opening-hours-day-card {
    display: grid;
    grid-template-rows: auto 1fr;
    min-width: 0;
    border: 1px solid rgba(46, 42, 34, 0.08);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(46, 42, 34, 0.04);
}

.admin-opening-hours-day-head-label {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    min-height: 34px;
    padding: 5px 8px;
    border-bottom: 1px solid rgba(46, 42, 34, 0.07);
    background: rgba(255, 252, 247, 0.95);
    font-weight: 900;
    font-size: 13px;
}
.admin-opening-hours-day-head-label > span { flex: 1; }

.admin-opening-hours-day-head-label input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #2c2418;
}

.admin-opening-hours-cell-body {
    position: relative;
    display: grid;
    grid-template-rows: 1fr;
    gap: 8px;
    min-height: 80px;
    padding: 10px;
}

.admin-opening-hours-summary {
    display: grid;
    gap: 7px;
    align-content: start;
    min-height: 32px;
    color: var(--muted);
}

.admin-opening-hours-range {
    position: relative;
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 32px;
    padding: 6px 5px 6px 9px;
    border: 1px solid rgba(46, 42, 34, 0.1);
    border-radius: 8px;
    background: #fff;
    font-size: 12px;
    font-weight: 800;
}
.admin-opening-hours-range > span:first-child {
    flex: 1;
    min-width: 0;
}

.admin-add-hour-btn {
    /* .btn base cung cấp: display inline-flex, align/justify-center, cursor, font-weight */
    min-height: 18px;
    width: 18px;
    height: 18px;
    padding: 0;
    border: 1px solid rgba(46, 42, 34, 0.2);
    border-radius: 999px;
    background: #fff;
    color: #2c2418;
    font-size: 12px;
    line-height: 1;
    flex-shrink: 0;
}

.admin-add-hour-btn:hover,
.admin-range-icon:hover {
    border-color: rgba(46, 42, 34, 0.24);
    background: #fff7e8;
}

.admin-range-icon,
.admin-icon-btn {
    /* .btn base cung cấp: display inline-flex, align/justify-center, cursor */
    min-height: 28px;
    width: 28px;
    min-width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 9px;
    line-height: 1;
}

.admin-range-icon {
    border: 1px solid rgba(46, 42, 34, 0.12);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    cursor: pointer;
}

.admin-opening-hours-editor-panel {
    display: grid;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed rgba(46, 42, 34, 0.12);
}

.admin-opening-hours-editor-panel[hidden] {
    display: none;
}

.admin-opening-hours-editor-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-opening-hours-slot-list {
    display: none;
}

.admin-opening-hours-edit-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.admin-opening-hours-edit-form select {
    flex: 1;
    min-width: 80px;
}

.admin-opening-hours-edit-form span {
    display: none;
}

.admin-opening-hours-edit-form .admin-icon-btn {
    justify-self: end;
}

.admin-opening-hours-edit-form select {
    min-width: 0;
}

.admin-schedule-rule {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.92);
}

.admin-schedule-rule-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 10px;
    align-items: end;
}

.admin-schedule-rule-grid label:has([data-rule-title]),
.admin-schedule-rule-grid label:has([data-rule-note]) {
    grid-column: span 5;
}
.admin-schedule-rule-grid label {
    grid-column: span 2;
}

.admin-schedule-time {
    display: flex;
    gap: 8px;
}
.admin-schedule-time input,
.admin-schedule-time select {
    flex: 1;
    min-width: 0;
}

.admin-schedule-rule-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-schedule-rule-groups {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 12px;
}

.admin-schedule-rule-group {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px dashed rgba(46, 42, 34, 0.12);
    border-radius: 12px;
    background: rgba(255, 250, 242, 0.8);
}

.admin-hours-editor-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-month-lunar-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-month-editor {
    display: grid;
    gap: 10px;
}

.admin-month-editor[hidden],
.admin-lunar-editor[hidden] {
    display: none;
}

.admin-month-toggle,
.admin-lunar-toggle {
    width: auto;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid rgba(46, 42, 34, 0.1);
    border-radius: 999px;
    background: #fff;
}

.admin-check-grid.admin-month-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    overflow: visible;
    padding-bottom: 0;
}

.admin-month-grid .check-row,
.admin-lunar-grid .check-row {
    flex: 0 0 auto;
    width: auto;
    min-height: 36px;
    padding: 7px 12px;
    border: 1px solid rgba(46, 42, 34, 0.12);
    border-radius: 999px;
    background: #fff;
    white-space: nowrap;
}

.admin-month-grid .check-row:has(input:checked),
.admin-lunar-grid .check-row:has(input:checked),
.admin-month-toggle:has(input:checked),
.admin-lunar-toggle:has(input:checked) {
    border-color: rgba(180, 128, 24, 0.28);
    background: #fff7e8;
    box-shadow: inset 0 0 0 1px rgba(223, 171, 54, 0.12);
}

.admin-lunar-editor {
    display: grid;
    gap: 10px;
}

.admin-check-grid.admin-lunar-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-check-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 8px;
}

@media (max-width: 960px) {
    .admin-hours-template {
        display: grid;
        justify-content: stretch;
    }

    .admin-hours-template-inputs,
    .admin-hours-slot {
        grid-template-columns: 1fr 1fr;
    }

    .admin-hours-template-inputs span,
    .admin-hours-slot span {
        display: none;
    }

    .admin-hours-table {
        display: block;
        overflow-x: auto;
    }

    .admin-hours-editor-actions {
        justify-content: stretch;
    }

    .admin-hours-editor-actions .btn {
        width: 100%;
    }

    .admin-check-grid {
        grid-template-columns: 1fr 1fr;
    }

    .admin-opening-hours-head,
    .admin-opening-hours-editor-head,
    .admin-schedule-rule-actions {
        display: grid;
    }

    .admin-opening-hours-head {
        grid-template-columns: 1fr;
    }

    .admin-opening-hours-bulk-inputs {
        display: grid;
        grid-template-columns: 1fr 1fr auto 1fr 1fr 34px;
    }

    .admin-opening-hours-bulk-inputs select {
        width: 100%;
    }

    .admin-opening-hours-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .admin-opening-hours-cell-body {
        min-height: 96px;
    }

    .admin-month-grid,
    .admin-lunar-grid {
        flex-wrap: wrap;
        overflow-x: visible;
    }

    .admin-schedule-rule-grid,
    .admin-schedule-rule-groups {
        grid-template-columns: 1fr;
    }

    .admin-schedule-rule-grid label:has([data-rule-title]),
    .admin-schedule-rule-grid label:has([data-rule-note]) {
        grid-column: auto;
    }
}

@media (max-width: 520px) {
    .admin-month-toggle,
    .admin-lunar-toggle {
        width: 100%;
    }

    .admin-opening-hours-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-opening-hours-day-card {
        flex: 0 0 calc(50% - 5px);
        max-width: calc(50% - 5px);
    }
}

.admin-actions {
    white-space: nowrap;
}

.admin-actions form {
    display: inline;
}

.admin-actions a,
.admin-actions button {
    margin-right: 4px;
}

.check-row {
    align-content: center;
    grid-template-columns: auto 1fr;
}

.check-row input {
    width: auto;
}

.location-tree {
    display: grid;
    gap: 10px;
}

.location-node {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--paper);
}

.location-node .location-node {
    margin-top: 10px;
    background: #fff;
}

.location-node summary {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    cursor: pointer;
    list-style: none;
}

.location-node summary::-webkit-details-marker {
    display: none;
}

.location-node summary::before {
    content: '▸';
    color: var(--muted);
    font-weight: 900;
}

.location-node[open] > summary::before {
    content: '▾';
}

.location-node summary small,
.location-node-actions em,
.location-place-list span {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.location-node-actions {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    white-space: nowrap;
}

.location-node-body {
    display: grid;
    gap: 10px;
    padding: 0 14px 14px 34px;
}

.location-place-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.location-place-list li {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 10px;
    background: #fff;
}


/* Place media preview frames */
.place-media-preview-row {
    margin-bottom: 4px;
    align-items: flex-start;
}

.place-cover-frame {
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    border: 2px dashed var(--border);
    background: var(--surface2, #f1f5f9);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-width: 0;
}

.place-cover-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.place-avatar-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.place-avatar-frame {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    border: 2px dashed var(--border);
    background: var(--surface2, #f1f5f9);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.place-avatar-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 600px) {
    .place-media-preview-row {
        flex-direction: column;
    }
    .place-cover-frame {
        flex: none;
        width: 100%;
    }
    .place-avatar-wrap {
        flex: none;
        flex-direction: column;
        width: 100%;
        align-items: stretch;
        gap: 6px;
    }
    .place-avatar-frame {
        max-width: 100%;
        border-radius: 10px;
    }
    .place-avatar-wrap .ccp-zoom {
        max-width: 100%;
    }
}

.place-frame-placeholder {
    font-size: 11px;
    color: var(--muted);
    pointer-events: none;
}

/* Inline crop (cover + avatar shared) */
.place-cover-frame.ccp-active,
.place-avatar-frame.ccp-active {
    cursor: grab;
    user-select: none;
    touch-action: none;
}
.place-cover-frame.ccp-active:active,
.place-avatar-frame.ccp-active:active {
    cursor: grabbing;
}
.ccp-img {
    position: absolute;
    max-width: none;
    max-height: none;
    pointer-events: none;
    display: block;
}
.ccp-bar {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 6px 0 2px;
    width: 100%;
}
.ccp-bar[hidden] {
    display: none !important;
}
.ccp-zoom {
    width: 100%;
    accent-color: var(--gold);
    cursor: pointer;
    height: 4px;
}
.ccp-bar .btn {
    align-self: flex-start;
}
/* Avatar crop bar — compact, centered under avatar */
.place-avatar-wrap .ccp-bar {
    align-items: center;
    gap: 4px;
}
.place-avatar-wrap .ccp-zoom {
    width: 100%;
    max-width: 110px;
}
.place-avatar-wrap .ccp-bar .btn {
    align-self: center;
}

.tag-picker {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

/* Tag pill — dùng --tag-color nếu có, fallback màu mặc định */
.tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 9px;
    border-radius: 999px;
    border: 1.5px solid color-mix(in srgb, var(--tag-color, #94a3b8) 40%, transparent);
    background: color-mix(in srgb, var(--tag-color, #94a3b8) 15%, #fff);
    color: color-mix(in srgb, var(--tag-color, #64748b) 80%, #000);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s, outline .1s;
    outline: 2px solid transparent;
}

.tag-pill.tag-pill-active {
    border: 2px solid var(--tag-color, #94a3b8);
    box-shadow: 0 2px 8px color-mix(in srgb, var(--tag-color, #94a3b8) 45%, transparent);
    outline: none;
}

.tag-picker-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 4px;
}

.tag-selected-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 28px;
    margin-bottom: 6px;
}

.tag-selected-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1.5px solid color-mix(in srgb, var(--tag-color, #94a3b8) 40%, transparent);
    background: color-mix(in srgb, var(--tag-color, #94a3b8) 20%, #fff);
    color: color-mix(in srgb, var(--tag-color, #64748b) 80%, #000);
    font-size: 12px;
    font-weight: 700;
    cursor: default;
}

.tag-pill-x {
    cursor: pointer;
    opacity: .6;
    font-size: 14px;
    line-height: 1;
}

.tag-pill-x:hover { opacity: 1; }

/* Taxonomy tag admin */
.tax-field-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 6px;
}

.tax-color-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tax-color-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform .12s, border-color .12s;
}

.tax-color-swatch:hover { transform: scale(1.15); }
.tax-color-swatch.active { border-color: #2c2418; transform: scale(1.15); }

.tax-icon-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.tax-icon-btn {
    /* .btn base cung cấp: display inline-flex, align/justify-center, cursor */
    min-height: 36px;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 8px;
    border: 1.5px solid var(--line);
    background: var(--paper);
    font-size: 18px;
    transition: border-color .12s, background .12s;
}

.tax-icon-btn:hover { border-color: var(--accent); background: var(--surface); }
.tax-icon-btn.active { border-color: var(--accent); background: var(--sand); }

.tax-icon-group { margin-bottom: 10px; }
.tax-icon-group-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 4px;
}

.tax-preview-pill { pointer-events: none; }

.json-import-box {
    margin-bottom: 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--paper);
}

.json-import-box textarea {
    width: 100%;
    margin: 10px 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.rating-list,
.menu-list {
    display: grid;
    gap: 10px;
}

.rating-list div,
.menu-list div {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 12px;
    padding: 12px;
    border-radius: 12px;
    background: var(--paper);
}

.rating-list small,
.menu-list small,
.menu-list em {
    grid-column: 1 / -1;
    color: var(--muted);
}

.login-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
    background: var(--bg);
}

.login-card {
    width: min(420px, 100%);
    padding: 28px;
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--shadow);
}

.form-error {
    padding: 10px 12px;
    border-radius: 10px;
    background: #fff0ec;
    color: #9f4d35;
    font-size: 13px;
    font-weight: 700;
}

.admin-inline-feedback {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid transparent;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.admin-inline-feedback-success {
    background: linear-gradient(135deg, #ecfdf3 0%, #f6fff9 100%);
    border-color: #b7ebc6;
    color: #166534;
}

.admin-inline-feedback-error {
    background: linear-gradient(135deg, #fff1f2 0%, #fff7f7 100%);
    border-color: #fecdd3;
    color: #b42318;
}

.admin-inline-feedback-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.82);
    flex: 0 0 24px;
}

.admin-inline-feedback-text {
    font-size: 13px;
    line-height: 1.55;
    font-weight: 700;
}

@media (max-width: 960px) {
    .site-nav {
        position: fixed;
        inset: 64px 12px auto;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px;
        border-radius: 16px;
        background: #fff;
        box-shadow: var(--shadow);
    }

    .site-nav.open {
        display: flex;
    }

    .site-nav a {
        padding: 12px;
    }

    .nav-toggle {
        display: flex;
    }

    .featured-grid,
    .related-grid,
    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .listing-layout,
    .detail-layout,
    .split-section {
        grid-template-columns: 1fr;
    }

    .filter-sidebar {
        position: fixed;
        inset: auto 0 0;
        z-index: 70;
        max-height: 82vh;
        overflow: auto;
        padding: 0 14px 14px;
        border-radius: 22px 22px 0 0;
        background: #fff;
        box-shadow: 0 -8px 32px rgba(0, 0, 0, .18);
        transform: translateY(110%);
        transition: transform .25s;
    }

    .filter-sidebar.open {
        transform: translateY(0);
    }

    .mobile-filter-head {
        position: sticky;
        top: 0;
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 4px 8px;
        background: #fff;
    }

    .mobile-filter-head button {
        background: transparent;
        color: var(--muted);
        font-weight: 800;
    }

    .drawer-scrim {
        position: fixed;
        inset: 0;
        z-index: 60;
        background: rgba(20, 18, 14, .35);
        opacity: 0;
        pointer-events: none;
        transition: opacity .25s;
    }

    .drawer-scrim.open {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-filter-btn {
        display: inline-flex;
    }

    .detail-side {
        position: static;
    }

    .map-page {
        position: relative;
    }

    .map-top-bar {
        display: flex;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        z-index: 25;
        flex-direction: column;
        gap: 6px;
        background: #fff;
        border-radius: 0 0 18px 18px;
        box-shadow: 0 4px 18px rgba(46, 42, 34, .13);
        padding: 10px 12px 8px;
    }

    .map-top-search-input {
        width: 100%;
    }

    .map-top-chips {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: thin;
        scrollbar-color: #c8bfb0 #f5f2ec;
        padding-bottom: 6px;
        gap: 6px;
    }

    .map-top-chips::-webkit-scrollbar {
        height: 3px;
    }

    .map-top-chips::-webkit-scrollbar-track {
        background: transparent;
    }

    .map-top-chips::-webkit-scrollbar-thumb {
        background: #c8bfb0;
        border-radius: 4px;
    }

    .real-map-shell .map-empty-state {
        width: calc(100% - 32px);
        padding: 20px 16px;
    }

    .real-map-shell .map-empty-state strong {
        font-size: 18px;
    }

    .real-map-shell .map-empty-state p {
        font-size: 13px;
    }

    .map-list {
        position: absolute;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 20;
        height: 92%;
        flex-basis: auto;
        width: auto;
        overflow: hidden;
        border-radius: 22px 22px 0 0;
        box-shadow: 0 -10px 30px rgba(0, 0, 0, .18);
        transform: translateY(calc(100% - 32px));
        transition: transform .38s cubic-bezier(.32,.72,0,1);
    }

    .map-list.mid {
        transform: translateY(52%);
    }

    .map-list.expanded {
        transform: translateY(0);
    }

    .map-list .map-filter {
        display: none;
    }

    .sheet-handle {
        display: flex;
        justify-content: center;
        padding: 9px 0 2px;
        background: transparent;
    }

    .sheet-handle span {
        width: 40px;
        height: 4px;
        border-radius: 999px;
        background: rgba(46, 42, 34, .2);
    }

    .admin-shell {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: sticky;
        top: 0;
        z-index: 50;
        padding: 14px 16px;
        border-radius: 0 0 18px 18px;
        box-shadow: 0 10px 28px rgba(0, 0, 0, .16);
    }

    .admin-sidebar .brand {
        justify-content: center;
    }

    .admin-sidebar nav {
        display: flex;
        gap: 8px;
        margin-top: 12px;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: none;
    }

    .admin-sidebar nav::-webkit-scrollbar {
        display: none;
    }

    .admin-sidebar a {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .admin-main {
        padding: 16px;
    }
}

@media (max-width: 768px) {
    .site-header {
        padding-inline: 16px;
    }

    .brand-name {
        font-size: 17px;
    }

    .hero {
        min-height: auto;
        padding: 50px 16px 40px;
    }

    .hero-content {
        text-align: left;
    }

    .hero-search,
    .quick-filters,
    .hero-actions {
        justify-content: flex-start;
    }

    .hero-search button {
        display: none;
    }

    .section,
    .page-intro,
    .breadcrumb,
    .landing-hero {
        padding-inline: 16px;
    }

    .section-head,
    .detail-title,
    .site-footer,
    .admin-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .featured-grid,
    .places-grid,
    .related-grid,
    .province-grid,
    .info-grid,
    .detail-two-col,
    .stat-grid,
    .admin-form-grid {
        grid-template-columns: 1fr;
    }

    .listing-layout,
    .detail-layout {
        padding-inline: 16px;
    }

    .state-switch {
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .gallery-main {
        height: 240px;
    }

    .gallery-thumbs {
        grid-template-columns: repeat(4, 90px);
        overflow-x: auto;
    }

    .video-link {
        grid-template-columns: 1fr;
    }

    .place-card-compact {
        grid-template-columns: 1fr;
    }

    .map-popup {
        width: 230px;
    }
}

/* Public site — small mobile (≤ 520px) */
@media (max-width: 520px) {
    .site-header {
        padding-inline: 12px;
        gap: 12px;
        height: 56px;
    }

    .brand-name {
        font-size: 15px;
    }

    .hero {
        padding: 36px 12px 28px;
    }

    .section,
    .page-intro,
    .breadcrumb,
    .landing-hero {
        padding-inline: 12px;
    }

    .section-head h2 {
        font-size: 22px;
    }

    .page-intro h1,
    .landing-hero h1 {
        font-size: 28px;
    }

    .hero-search,
    .listing-search {
        padding: 9px 12px;
        gap: 8px;
    }

    .quick-filters a,
    .chip-cloud button,
    .chip-cloud a,
    .time-row button {
        padding: 6px 10px;
        font-size: 11px;
    }

    .hero-actions {
        margin-top: 14px;
        gap: 6px;
    }

    .btn {
        font-size: 12px;
    }

    .place-body {
        padding: 12px;
    }

    .place-body h3 {
        font-size: 16px;
    }

    .site-footer {
        padding: 20px 12px;
        gap: 14px;
    }

    .footer-logo {
        font-size: 19px;
    }

    .gallery-main {
        height: 180px;
    }

    .gallery-thumbs {
        grid-template-columns: repeat(3, 76px);
    }

    .map-popup {
        width: 190px;
    }

    .listing-layout,
    .detail-layout {
        padding-inline: 12px;
    }
}


@media (max-width: 960px) {
    .admin-table {
        min-width: 620px;
    }

    .admin-filter-grid {
        grid-template-columns: 1fr;
    }

    .admin-table-head,
    .admin-pagination {
        align-items: flex-end;
        justify-content: flex-end;
    }
}


.admin-top-v2 {
    align-items: flex-start;
}

.admin-top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.admin-avatar-menu {
    position: relative;
}

.admin-avatar-menu summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    list-style: none;
}

.admin-avatar-menu summary::-webkit-details-marker {
    display: none;
}

.admin-avatar-menu[open] summary {
    box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
}

.admin-avatar-menu a {
    display: block;
    min-width: 150px;
    padding: 10px 12px;
    color: var(--ink);
    font-weight: 800;
}

.admin-avatar-menu a:hover {
    background: var(--paper);
}

.admin-avatar-menu[open]::after {
    content: '';
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    width: 170px;
    height: calc(100% + 78px);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .12);
    z-index: -1;
}

.admin-avatar {
    display: inline-grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 999px;
    background: var(--gold);
    color: #fff;
    font-weight: 900;
}

.admin-grid-3 {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 14px;
}

.permission-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--paper);
}

.inline-input {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}
.inline-input input,
.inline-input select {
    flex: 1;
    min-width: 0;
}

.admin-status-trash {
    background: #eceff3;
    color: #495057;
}

.dashboard-bars {
    display: grid;
    gap: 10px;
}

.dashboard-bars span {
    display: block;
    width: var(--w);
    min-width: 90px;
    padding: 9px 12px;
    border-radius: 999px;
    background: var(--gold);
    color: #fff;
    font-weight: 900;
}

@media (max-width: 960px) {
    .admin-top-actions,
    .inline-input {
        width: 100%;
        grid-template-columns: 1fr;
        justify-content: stretch;
    }

    .admin-top-actions .btn,
    .inline-input .btn {
        width: 100%;
        justify-content: center;
    }
}

.admin-grid-2 {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 14px;
}

.admin-grid-2 .admin-panel,
.admin-grid-3 .admin-panel {
    min-width: 0;
}



.place-form-v2 {
    align-items: start;
}

.place-form-v2 .admin-inline-details {
    grid-column: 1 / -1;
    border: 1px dashed rgba(46, 42, 34, 0.14);
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(255, 248, 230, 0.95), rgba(249, 241, 225, 0.92));
    overflow: hidden;
}

.place-form-v2 .admin-inline-details summary {
    padding: 12px 14px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    color: #6c4c13;
}

.place-form-v2 .admin-inline-details > .admin-form-grid {
    padding: 14px;
}

.admin-advanced-toggle-wrap {
    display: flex;
    align-items: flex-end;
}

.admin-advanced-toggle-wrap .btn {
    white-space: nowrap;
    font-size: 11px;
}

.admin-advanced-toggle-wrap .btn.active {
    background: var(--gold);
    color: #fff;
    border-color: var(--gold);
}


.place-form-v2 label:has([name="visited_at"]),
.place-form-v2 label:has(textarea[name="summary"]) {
    display: none;
}

.admin-form-divider {
    height: 1px;
    background: var(--line);
    margin: 4px 0;
}

.admin-accordion {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
}

.admin-accordion summary {
    padding: 14px 16px;
    cursor: pointer;
    background: var(--paper);
    font-weight: 900;
    color: var(--ink);
}

.admin-accordion > .admin-form-grid {
    padding: 16px;
}

.admin-opening-hours-editor {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.admin-opening-hours-day-card {
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.admin-opening-hours-day-card.is-active {
    border-color: rgba(212, 170, 87, 0.28);
    box-shadow: 0 12px 24px rgba(145, 101, 22, 0.1);
}

.admin-opening-hours-day-card.is-active .admin-opening-hours-day-head-label {
    background: linear-gradient(180deg, #fffaf1, #fff4e3);
    border-bottom-color: rgba(212, 170, 87, 0.2);
}

.admin-opening-hours-day-card.is-editing {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(145, 101, 22, 0.14);
}

.admin-opening-hours-day-card.is-empty .admin-opening-hours-summary {
    opacity: 0.9;
}

.admin-opening-hours-range {
    border-color: rgba(212, 170, 87, 0.22);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 246, 226, 0.98));
    box-shadow: 0 8px 16px rgba(148, 106, 28, 0.06);
}

.admin-opening-hours-empty,
.admin-opening-hours-off {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.admin-opening-hours-empty {
    color: #9a6a18;
    background: rgba(255, 236, 197, 0.86);
}

.admin-opening-hours-off {
    color: #786b54;
    background: rgba(236, 231, 222, 0.9);
}

.dynamic-list {
    display: grid;
    gap: 12px;
}

.dynamic-list[hidden] {
    display: none;
}

.dynamic-row {
    position: relative;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--paper);
}
.rating-row {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: end;
}
.rating-inline-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 0;
}
.rating-inline-item {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--surface, #f5f5f5);
    border-radius: 8px;
    padding: 5px 8px;
}
.rating-inline-item .rating-criterion-input {
    width: 110px;
    font-size: 14px;
}

.rating-inline-item .rating-criterion-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
    min-width: 60px;
}
.rating-inline-item .rating-score-input {
    width: 56px;
    font-size: 14px;
    text-align: center;
}
.rating-inline-item .rating-remove-btn {
    background: none;
    border: none;
    color: var(--muted, #999);
    cursor: pointer;
    padding: 0 3px;
    font-size: 16px;
    line-height: 1;
}

.dish-row {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: stretch;
    overflow: visible;
}

/* Tất cả label trong dish-row: flex column → controls fill đều chiều cao */
.dish-row label {
    display: flex;
    flex-direction: column;
}
.dish-row label > input,
.dish-row label > select,
.dish-row label > .ts-wrapper { flex: 1; }
.dish-row label > .ts-wrapper { display: flex; flex-direction: column; }
.dish-row label > .ts-wrapper.single > .ts-control { flex: 1; align-items: center; }
.dish-row label > .ts-wrapper.multi > .ts-control { flex: 1; align-content: flex-start; }

/* Behavior riêng: ẩn search input + placeholder cho Giờ bán và Tháng bán */
.dish-row .dish-hour-col .ts-control input,
.dish-row .dish-hour-col .ts-control .ts-placeholder,
.dish-row .dish-month-col .ts-control input,
.dish-row .dish-month-col .ts-control .ts-placeholder { display: none !important; }

/* Behavior riêng: chip style cho Giờ bán và Tháng bán */
.dish-row .dish-hour-col .ts-wrapper.multi .item,
.dish-row .dish-month-col .ts-wrapper.multi .item {
    font-size: 1em;
    padding: 5px 10px;
    border-radius: 6px;
}

.dish-row .col-full,
.dish-row .full { grid-column: 1 / -1; }
.dish-row .btn { grid-column: 1 / -1; justify-self: end; }

.dish-remove-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 0;
    background: rgba(0, 0, 0, .12);
    color: var(--ink);
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background .15s;
}
.dish-remove-btn:hover { background: rgba(200, 50, 50, .18); color: #b91c1c; }
.dish-month-col .ts-wrapper.multi .item.range-start {
    border-radius: 6px 0 0 6px;
    margin-right: 0;
    border-right: none;
}
.dish-month-col .ts-wrapper.multi .item.range-mid {
    border-radius: 0;
    margin-left: 0;
    margin-right: 0;
    border-left: none;
    border-right: none;
}
.dish-month-col .ts-wrapper.multi .item.range-end {
    border-radius: 0 6px 6px 0;
    margin-left: 0;
    border-left: none;
}
.dish-chip-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
}
.dish-chip-label {
    font-size: 11px;
    font-weight: 800;
    color: var(--muted);
    margin-right: 2px;
    white-space: nowrap;
}
.dish-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border: 1px solid var(--line);
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    background: #fff;
    white-space: nowrap;
    transition: background 0.1s, border-color 0.1s;
}
.dish-chip.active {
    background: var(--gold-bg, #fdf3dc);
    border-color: var(--gold);
    color: var(--gold-dark, #7a5500);
}
.dish-chip input { display: none; }

.dynamic-row label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.dynamic-row .full {
    grid-column: 1 / -1;
}

.dynamic-row .btn {
    align-self: end;
}

.upload-box {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
    padding: 12px;
    border: 1px dashed var(--line);
    border-radius: 14px;
    background: var(--paper);
}

.upload-box .muted {
    width: 100%;
    margin: 0;
}

.admin-media-config-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.admin-media-config-row .upload-box {
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
    padding: 0;
    background: none;
}

.admin-upload-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    background: var(--paper);
    font-size: 12px;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
    white-space: nowrap;
    transition: border-color .15s, background .15s;
}

.admin-upload-label:hover {
    border-color: var(--accent);
    background: var(--surface);
}

.admin-upload-label::before {
    content: '\2191';
    font-size: 14px;
    line-height: 1;
}

.admin-upload-label input[type="file"] {
    display: none;
}

.admin-media-config-row label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    white-space: nowrap;
}

.admin-media-config-row label input:not([type="checkbox"]),
.admin-media-config-row label select {
    font-size: 13px;
}

.admin-media-config-row .check-row {
    flex-direction: row;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.admin-media-manager {
    display: grid;
    gap: 12px;
}

/* Media library page (qlm-media-*) */
.qlm-media-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.qlm-media-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.qlm-media-filters select,
.qlm-media-search {
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 13px;
    background: #fff;
}

.qlm-media-search {
    min-width: 200px;
}

.qlm-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.qlm-media-item {
    position: relative;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(15,23,42,.05);
}

.qlm-media-thumb {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--paper);
}

.qlm-media-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.qlm-media-video-thumb {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--muted);
}

.qlm-media-item-info {
    padding: 8px 10px;
    display: grid;
    gap: 2px;
}

.qlm-media-item-name {
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
}

.qlm-media-item-info .muted {
    font-size: 11px;
}

.qlm-media-delete-form {
    position: absolute;
    top: 6px;
    right: 6px;
}

.qlm-media-delete-btn {
    /* .btn base cung cấp: display inline-flex, align/justify-center, cursor */
    min-height: 24px;
    width: 24px;
    height: 24px;
    padding: 0;
    border-radius: 50%;
    background: rgba(0,0,0,.55);
    border: none;
    color: #fff;
    font-size: 14px;
    line-height: 1;
    opacity: 0;
    transition: opacity .15s;
}

.qlm-media-item:hover .qlm-media-delete-btn {
    opacity: 1;
}

.qlm-media-pagination {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.qlm-media-pagination .btn.active {
    background: var(--dark);
    color: #fff;
}

/* Place card with real photo */
.place-photo.has-photo {
    background-size: cover;
    background-position: center;
}
.place-photo.has-photo span {
    display: none;
}

/* Lightbox */
.qlm-lightbox[hidden] { display: none !important; }
.qlm-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.88);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    animation: qlmLbIn .15s ease;
}
@keyframes qlmLbIn { from { opacity: 0 } to { opacity: 1 } }
.qlm-lightbox-img {
    max-width: 92vw;
    max-height: 92vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 40px rgba(0,0,0,.6);
    cursor: default;
}
.qlm-lightbox-close {
    position: absolute;
    top: 14px;
    right: 18px;
    background: none;
    border: none;
    color: #fff;
    font-size: 38px;
    line-height: 1;
    cursor: pointer;
    opacity: .8;
}
.qlm-lightbox-close:hover { opacity: 1; }
.qlm-zoomable { cursor: zoom-in; }

/* Image resize sizes setting */
.qlm-resize-sizes {
    border: 1px solid var(--border, #ddd);
    border-radius: 8px;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.qlm-resize-sizes legend {
    font-weight: 600;
    font-size: 13px;
    padding: 0 6px;
    color: var(--text);
}
.qlm-resize-size-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 400;
}
.qlm-resize-size-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* existing admin media toolbar */
.admin-media-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-media-library {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 12px;
}

.admin-media-empty {
    grid-column: 1 / -1;
    padding: 18px;
    border: 1px dashed var(--line);
    border-radius: 16px;
    background: #fff;
    color: var(--muted);
}

.admin-media-card {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    min-width: 0;
}

.admin-media-preview {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    background: var(--paper);
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.admin-media-preview img,
.admin-media-preview video {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: #000;
}

.admin-media-card-body {
    display: grid;
    gap: 8px;
}

.admin-media-card-body strong {
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

.admin-media-card-body small,
.admin-media-card-body p {
    margin: 0;
    color: var(--muted);
}

.admin-media-roles {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    padding: 6px;
    background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 100%);
    border-radius: 0 0 14px 14px;
}

.admin-media-choice {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 4px 4px;
    border-radius: 6px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    cursor: pointer;
    text-align: center;
}

.admin-media-choice:has(input:checked) {
    background: rgba(169, 122, 69, 0.85);
}

.admin-media-choice span {
    font-size: 0.72em;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-media-choice input {
    width: auto;
    flex-shrink: 0;
    accent-color: var(--gold);
}

.admin-media-card-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 4px;
    border-top: 1px solid var(--line);
    margin-top: 4px;
}

@media (max-width: 960px) {
    .upload-box {
        grid-template-columns: 1fr;
    }
}


.real-photo {
    width: 100%;
    min-height: 320px;
    object-fit: cover;
    border-radius: 24px;
    display: block;
}

.real-thumbs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.real-thumbs img,
.public-image-grid img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--paper);
}

.rating-summary-card {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 16px 0;
    padding: 16px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--line);
}

.rating-summary-card strong {
    font: 900 30px var(--font-head);
    color: var(--gold);
}

.rating-summary-card span,
.rating-summary-card em {
    color: var(--muted);
    font-weight: 800;
}

.rating-detail-box[hidden] {
    display: none;
}

.rich-note {
    line-height: 1.8;
    color: var(--ink);
}

.public-image-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.dish-list-public div em {
    color: var(--gold);
    font-weight: 900;
}

@media (max-width: 768px) {
    .real-photo {
        min-height: 220px;
    }

    .real-thumbs,
    .public-image-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .admin-sidebar {
        padding-inline: 12px;
    }

    .admin-main {
        padding: 12px;
    }

    .admin-top {
        gap: 12px;
        margin-bottom: 14px;
    }

    .admin-top h1 {
        font-size: 26px;
        line-height: 1.1;
    }

    .admin-top .muted {
        font-size: 12px;
    }

    .admin-top-actions,
    .admin-avatar-menu,
    .admin-avatar-menu summary {
        width: 100%;
    }

    .admin-avatar-menu summary {
        justify-content: center;
    }

    .admin-avatar-menu[open]::after {
        right: auto;
        left: 0;
        width: 100%;
    }

    .stat-card,
    .admin-panel {
        padding: 14px;
        border-radius: 14px;
    }

    .stat-card strong {
        font-size: 26px;
    }

    .admin-table {
        min-width: 560px;
    }

    .admin-table th,
    .admin-table td {
        padding: 10px;
        font-size: 12px;
    }

    .admin-form-grid input,
    .admin-form-grid textarea,
    .admin-form-grid select,
    .admin-filter-grid input,
    .admin-filter-grid select {
        font-size: 16px;
    }

    .admin-actions,
    .admin-actions form,
    .admin-actions button,
    .admin-actions a {
        width: 100%;
    }

    .admin-actions a,
    .admin-actions button {
        justify-content: center;
        text-align: center;
    }

    .admin-accordion summary {
        padding: 13px 14px;
    }

    .admin-accordion > .admin-form-grid {
        padding: 14px;
    }
}

/* Admin mobile app theme */
.admin-mobile-menu-toggle,
.admin-menu-scrim {
    display: none;
}

.admin-shell-v2 {
    width: 100%;
    max-width: none;
}

.admin-main,
.admin-panel,
.admin-top,
.admin-form-grid,
.admin-table-wrap,
.admin-opening-hours-editor,
.admin-opening-hours-bulk,
.admin-filter-grid,
.admin-accordion,
.admin-inline-details {
    min-width: 0;
}

/* Global: tất cả flex container trong admin tự động wrap thay vì overflow */
.admin-panel > *,
.admin-form-grid > * {
    min-width: 0;
}

/* Input with inline action button (e.g. search + add) */
.input-action {
    position: relative;
}

.input-action input {
    padding-right: 52px;
}

.input-action .btn-inner {
    position: absolute;
    top: 4px;
    right: 4px;
    bottom: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    padding: 0;
    border: none;
    border-radius: 7px;
    background: var(--accent, #a07840);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: opacity .15s;
}

.input-action .btn-inner:hover {
    opacity: .85;
}


@media (max-width: 960px) {
    html,
    body {
        width: 100%;
        min-width: 0;
        overflow-x: hidden;
    }

    body.admin-menu-open {
        overflow: hidden;
    }

    .admin-shell,
    .admin-shell-v2 {
        display: block;
        width: 100vw;
        min-height: 100svh;
        background: #f6f1e8;
    }

    .admin-mobile-menu-toggle {
        position: fixed;
        top: max(10px, env(safe-area-inset-top));
        left: 12px;
        z-index: 120;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        min-width: 48px;
        min-height: 44px;
        padding: 10px 13px;
        border: 1px solid rgba(255, 255, 255, .45);
        border-radius: 14px;
        background: rgba(46, 42, 34, .94);
        color: #fff;
        box-shadow: 0 12px 28px rgba(0, 0, 0, .22);
        font-weight: 900;
        line-height: 1;
    }

    .admin-mobile-menu-toggle span:first-child {
        font-size: 20px;
        line-height: 1;
    }

    .admin-menu-scrim {
        position: fixed;
        inset: 0;
        z-index: 100;
        display: block;
        border: 0;
        background: rgba(20, 17, 13, .46);
        backdrop-filter: blur(2px);
    }

    .admin-menu-scrim[hidden] {
        display: none;
    }

    .admin-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 110;
        display: flex;
        flex-direction: column;
        width: min(82vw, 320px);
        max-width: 320px;
        padding: calc(18px + env(safe-area-inset-top)) 16px calc(18px + env(safe-area-inset-bottom));
        border-radius: 0 24px 24px 0;
        background: var(--ink);
        box-shadow: 18px 0 40px rgba(0, 0, 0, .28);
        transform: translateX(-104%);
        transition: transform .22s ease;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    body.admin-menu-open .admin-sidebar {
        transform: translateX(0);
    }

    .admin-sidebar .brand {
        justify-content: flex-start;
        padding: 6px 6px 14px;
    }

    .admin-sidebar nav {
        display: grid;
        gap: 10px;
        margin-top: 8px;
        overflow: visible;
        padding-bottom: 0;
    }

    .admin-sidebar a {
        display: flex;
        align-items: center;
        min-height: 46px;
        padding: 12px 14px;
        border-radius: 14px;
        color: rgba(255, 255, 255, .82);
        font-size: 15px;
        font-weight: 800;
        white-space: normal;
    }

    .admin-sidebar a.active {
        background: #fff;
        color: var(--ink);
    }

    .admin-main {
        width: 100vw;
        min-height: 100svh;
        padding: calc(64px + env(safe-area-inset-top)) 12px calc(18px + env(safe-area-inset-bottom));
        overflow-x: hidden;
    }

    .admin-top,
    .admin-top-v2 {
        position: sticky;
        top: 0;
        z-index: 40;
        align-items: stretch;
        gap: 10px;
        width: calc(100vw - 24px);
        margin: -12px 0 12px;
        padding: 12px 0 10px;
        background: linear-gradient(180deg, #f6f1e8 76%, rgba(246, 241, 232, 0));
        flex-direction: column;
    }

    .admin-top h1 {
        margin-left: 54px;
        font-size: clamp(24px, 7vw, 34px);
        line-height: 1.05;
    }

    .admin-top .muted {
        display: none;
    }

    .admin-top-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
        gap: 8px;
    }

    .admin-top-actions > .btn,
    .admin-avatar-menu,
    .admin-avatar-menu summary {
        width: 100%;
    }

    .admin-avatar-menu summary {
        justify-content: center;
        min-height: 44px;
    }

    .admin-panel,
    .stat-card,
    .admin-accordion,
    .login-card {
        width: 100%;
        max-width: none;
        border-radius: 18px;
    }

    .admin-panel {
        padding: 14px;
        margin-top: 12px;
        overflow-x: visible;
    }

    .stat-grid,
    .admin-grid-2,
    .admin-grid-3,
    .location-admin-grid,
    .admin-filter-grid {
        grid-template-columns: 1fr !important;
        width: 100%;
    }

    /* admin-form-grid: 2-col grid on mobile */
    .admin-form-grid,
    .place-form-v2 {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        width: 100%;
        gap: 10px;
    }

    /* Reset desktop col-* spans: tất cả items auto-flow (half-width) */
    .admin-form-grid > label,
    .admin-form-grid > [class*="col-"] {
        grid-column: auto;
    }

    /* Full-width: col-12 (luôn full) và col-md-12 (mobile override) */
    .admin-form-grid > .col-12,
    .admin-form-grid > .col-md-12,
    .admin-form-grid > .full {
        grid-column: 1 / -1;
    }

    .admin-form-grid label {
        gap: 7px;
        font-size: 13px;
        font-weight: 800;
    }

    .admin-form-grid input:not([type="checkbox"]):not([type="radio"]),
    .admin-form-grid textarea,
    .admin-form-grid select,
    .admin-filter-grid input:not([type="checkbox"]):not([type="radio"]),
    .admin-filter-grid select {
        width: 100%;
        font-size: 16px;
    }

    .admin-form-grid textarea {
        min-height: 120px;
    }

    .admin-accordion > .admin-form-grid {
        padding: 14px;
    }

    .admin-accordion summary {
        min-height: 48px;
        padding: 13px 14px;
        font-size: 15px;
    }

    .admin-actions,
    .admin-filter-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
        gap: 8px;
    }

    .admin-pagination {
        display: flex;
        justify-content: flex-end;
        width: 100%;
        gap: 8px;
    }

    .admin-actions form,
    .admin-actions a,
    .admin-actions button,
    .admin-filter-actions .btn {
        width: 100%;
    }

    .admin-actions a,
    .admin-actions button,
    .admin-filter-actions .btn,
    .admin-form-grid button {
        justify-content: center;
        min-height: 44px;
        padding: 11px 14px;
        border-radius: 13px;
        text-align: center;
        font-size: 14px;
        font-weight: 900;
    }

    .admin-table-wrap,
    .admin-panel:has(.admin-table) {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 8px;
    }

    .admin-table {
        min-width: 620px;
    }

    .admin-table th,
    .admin-table td {
        padding: 11px 10px;
        font-size: 13px;
        vertical-align: top;
    }

    /* Dish row: 2-col layout on mobile */
    .dish-row {
        grid-template-columns: 1fr 1fr;
    }

    .dish-row > [class*="col-"] {
        grid-column: auto;
    }

    /* Tên món, Tháng bán, Ghi chú, List ảnh → full width on mobile */
    .dish-row > label.col-2,
    .dish-row > label.col-3,
    .dish-row > label.col-5,
    .dish-row > div.col-8 {
        grid-column: 1 / -1;
    }

    /* Giá + Điểm (col-1) → mỗi cái nửa hàng, tự auto */

    /* Rating inline: 2-col grid */
    .rating-inline-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 8px;
    }

    .rating-inline-item {
        min-width: 0;
    }

    .rating-inline-item .rating-criterion-input {
        flex: 1 1 0%;
        min-width: 0;
    }

    /* Opening hours: stack bulk section vertically to prevent horizontal overflow */
    .admin-opening-hours-head {
        grid-template-columns: 1fr;
    }

    .admin-opening-hours-bulk {
        flex-direction: column;
        align-items: stretch;
    }

    .bulk-timeadd {
        flex: none;
        width: 100%;
    }

    .admin-opening-hours-bulk-inputs {
        grid-template-columns: 1fr 1fr auto 1fr 1fr 34px;
    }

    .admin-opening-hours-bulk-inputs select {
        width: 100%;
    }

    .admin-opening-hours-cell-body {
        min-height: 96px;
    }

    .admin-schedule-rule-grid,
    .admin-schedule-rule-groups {
        grid-template-columns: 1fr;
    }

    /* Prevent any child from causing page-level horizontal scroll */
    .admin-form-grid,
    .admin-opening-hours-editor,
    .admin-accordion {
        max-width: 100%;
    }
}

@media (max-width: 520px) {
    .admin-main {
        padding-right: 10px;
        padding-left: 10px;
    }

    .admin-top,
    .admin-top-v2 {
        width: calc(100vw - 20px);
    }

    .admin-mobile-menu-toggle {
        left: 10px;
        padding-inline: 12px;
    }

    .admin-mobile-menu-toggle span:last-child {
        display: none;
    }

    .admin-sidebar {
        width: min(86vw, 304px);
    }

    .admin-top h1 {
        margin-left: 52px;
        font-size: 25px;
    }

    .admin-panel,
    .stat-card {
        padding: 12px;
        border-radius: 16px;
    }

    .admin-table {
        min-width: 560px;
    }
}

/* Admin mobile topbar and nested navigation */
.admin-mobile-topbar {
    display: none;
}

.admin-nav-group {
    display: grid;
    gap: 6px;
}

.admin-nav-parent {
    position: relative;
}

button.admin-nav-parent {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

button.admin-nav-parent::after {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    opacity: .6;
    transition: transform .2s;
    flex-shrink: 0;
}

.admin-nav-group.open > button.admin-nav-parent::after {
    transform: rotate(-135deg);
}

button.admin-nav-parent {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, .72);
    font-size: 13px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

button.admin-nav-parent.active {
    background: rgba(255, 255, 255, .12);
    color: #fff;
}

.admin-subnav {
    display: grid;
    gap: 5px;
    margin: -2px 0 6px 12px;
    padding-left: 10px;
    border-left: 1px solid rgba(255, 255, 255, .16);
}

.admin-sidebar .admin-subnav a {
    min-height: 34px;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 12px;
    color: rgba(255, 255, 255, .62);
}

.admin-sidebar .admin-subnav a.active {
    background: rgba(255, 255, 255, .16);
    color: #fff;
}

@media (min-width: 961px) {
    .admin-nav-group:not(.open) .admin-subnav {
        display: none;
    }
}

@media (max-width: 960px) {
    .admin-mobile-topbar {
        position: fixed;
        top: 0;
        right: 0;
        left: 0;
        z-index: 95;
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: calc(58px + env(safe-area-inset-top));
        padding: calc(8px + env(safe-area-inset-top)) 12px 8px;
        background: rgba(246, 241, 232, .96);
        border-bottom: 1px solid rgba(46, 42, 34, .08);
        box-shadow: 0 10px 28px rgba(46, 42, 34, .12);
        backdrop-filter: blur(14px);
    }

    .admin-mobile-brand {
        display: inline-flex;
        align-items: center;
        gap: 9px;
        min-width: 0;
        color: var(--ink);
        font-weight: 900;
    }

    .admin-mobile-brand .brand-mark {
        width: 38px;
        height: 38px;
        box-shadow: 0 8px 18px rgba(46, 42, 34, .16);
    }

    .admin-mobile-brand .brand-name {
        color: var(--ink);
        font-size: 18px;
    }

    .admin-mobile-menu-toggle {
        position: static;
        z-index: 1;
        flex: 0 0 auto;
        min-width: 48px;
        min-height: 42px;
        padding: 9px 12px;
        border-radius: 13px;
        box-shadow: none;
    }

    .admin-mobile-menu-toggle span:first-child {
        font-size: 13px;
    }

    .admin-mobile-menu-toggle span:last-child {
        font-size: 20px;
        line-height: 1;
    }

    .admin-main {
        padding-top: calc(76px + env(safe-area-inset-top));
    }

    .admin-top,
    .admin-top-v2 {
        margin-top: 0;
    }

    .admin-top h1 {
        margin-left: 0;
    }

    .admin-sidebar .admin-subnav {
        margin: 0 0 8px 14px;
        padding-left: 12px;
        border-left-color: rgba(255, 255, 255, .22);
    }

    .admin-sidebar .admin-subnav a {
        min-height: 42px;
        padding: 10px 12px;
        font-size: 14px;
    }

    .location-section-tabs {
        display: none;
    }
}

@media (max-width: 520px) {
    .admin-mobile-topbar {
        padding-right: 10px;
        padding-left: 10px;
    }

    .admin-mobile-brand .brand-name {
        font-size: 16px;
    }

    .admin-mobile-menu-toggle span:first-child {
        display: inline;
    }
}

@media (max-width: 520px) {
    .admin-mobile-topbar .admin-mobile-menu-toggle span:first-child {
        display: inline;
    }
}

/* Admin right drawer and mobile feature popups */
.admin-menu-profile {
    display: grid;
    gap: 8px;
    margin: 14px 0 18px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .08);
}

.admin-menu-profile-main {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-menu-profile-main span:last-child {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.admin-menu-profile-main strong,
.admin-menu-profile-main small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-menu-profile-main small {
    color: rgba(255, 255, 255, .58);
    font-size: 11px;
    font-weight: 800;
}

.admin-menu-logout {
    justify-content: center;
    min-height: 36px;
    background: rgba(255, 255, 255, .1);
}

.admin-mobile-feature-shell {
    display: contents;
}

.admin-mobile-feature-trigger,
.admin-mobile-feature-close {
    display: none;
}

@media (max-width: 960px) {
    .admin-sidebar {
        right: 0;
        left: auto;
        border-radius: 24px 0 0 24px;
        box-shadow: -18px 0 40px rgba(0, 0, 0, .28);
        transform: translateX(104%);
    }

    body.admin-menu-open .admin-sidebar {
        transform: translateX(0);
    }

    .admin-menu-profile {
        margin-top: 8px;
        background: rgba(255, 255, 255, .1);
    }

    .admin-menu-profile-main,
    .admin-menu-logout {
        min-height: 46px;
        border-radius: 14px;
    }

    .admin-mobile-feature-shell {
        display: block;
        width: 100%;
    }

    .admin-mobile-feature-trigger {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        min-height: 48px;
        margin-top: 10px;
        padding: 13px 14px;
        border: 1px solid rgba(46, 42, 34, .08);
        border-radius: 16px;
        background: #fff;
        color: var(--ink);
        box-shadow: 0 10px 24px rgba(46, 42, 34, .08);
        font-weight: 900;
        text-align: left;
    }

    .admin-mobile-feature-trigger::after {
        content: '+';
        display: grid;
        width: 28px;
        height: 28px;
        place-items: center;
        border-radius: 50%;
        background: var(--sand);
        color: var(--ink);
        font-size: 20px;
        line-height: 1;
    }

    .admin-mobile-feature-shell > .admin-panel,
    .admin-mobile-feature-shell > .admin-accordion {
        position: fixed;
        inset: auto 0 0;
        z-index: 130;
        display: none;
        max-height: min(86svh, 760px);
        width: 100vw;
        margin: 0;
        padding: 56px 14px calc(16px + env(safe-area-inset-bottom));
        border-radius: 24px 24px 0 0;
        overflow-y: auto;
        box-shadow: 0 -22px 46px rgba(0, 0, 0, .24);
    }

    .admin-mobile-feature-shell.open > .admin-panel,
    .admin-mobile-feature-shell.open > .admin-accordion {
        display: block;
    }

    .admin-mobile-feature-shell.open::before {
        content: '';
        position: fixed;
        inset: 0;
        z-index: 125;
        background: rgba(20, 17, 13, .48);
        backdrop-filter: blur(2px);
    }

    .admin-mobile-feature-close {
        position: absolute;
        top: 12px;
        right: 14px;
        z-index: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 34px;
        padding: 7px 11px;
        border: 0;
        border-radius: 999px;
        background: var(--ink);
        color: #fff;
        font-weight: 900;
    }

    body.admin-feature-open {
        overflow: hidden;
    }

    .admin-mobile-feature-shell.open .admin-table-wrap,
    .admin-mobile-feature-shell.open .admin-panel:has(.admin-table) {
        overflow-x: auto;
    }
}

/* Admin single profile entry */
.admin-menu-logo-profile {
    align-items: center;
    margin-bottom: 16px;
}

.admin-menu-logo-profile .brand-name {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.admin-menu-logo-profile .brand-name small {
    overflow: hidden;
    color: rgba(255, 255, 255, .58);
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-menu-logo-profile.active {
    background: rgba(255, 255, 255, .12);
}

@media (max-width: 960px) {
    .admin-menu-logo-profile {
        min-height: 58px;
        margin: 0 0 12px;
        padding: 10px;
        border-radius: 16px;
        background: rgba(255, 255, 255, .08);
    }

    .admin-menu-logo-profile.active {
        background: #fff;
    }

    .admin-menu-logo-profile.active .brand-name,
    .admin-menu-logo-profile.active .brand-name small {
        color: var(--ink);
    }

    .admin-top-actions:empty {
        display: none;
    }
}

/* Admin table-first actions */
.admin-table-head .btn {
    flex: 0 0 auto;
}

@media (max-width: 960px) {
    .admin-mobile-feature-shell + .admin-panel {
        margin-top: 10px;
    }

    .admin-mobile-feature-shell:has(+ .admin-panel .admin-table) .admin-mobile-feature-trigger {
        margin-top: 12px;
        border-color: rgba(243, 178, 60, .32);
        background: linear-gradient(135deg, #fff8e6, #fff);
    }

    .admin-table-head {
        gap: 10px;
    }

    .admin-table-head .btn {
        width: 100%;
        justify-content: center;
    }
}

.admin-table-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

@media (max-width: 960px) {
    .admin-table-actions {
        display: grid;
        width: 100%;
        justify-content: stretch;
    }
}

.province-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.province-tags small {
    border: 1px solid rgba(123, 86, 37, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1;
    padding: 6px 9px;
}
/* Pagination */
.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin: 14px 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}

.pagination-summary {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.pagination-controls,
.pagination-size {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination-size label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.pagination-size select {
    min-width: 82px;
}

@media (max-width: 768px) {
    .pagination-bar,
    .pagination-controls,
    .pagination-size,
    .pagination-size label {
        display: grid;
        width: 100%;
    }

    .pagination-controls .btn,
    .pagination-size select {
        width: 100%;
        justify-content: center;
    }
}

/* Rich pagination */
.pagination-bar {
    display: grid;
    grid-template-columns: auto auto auto;
    align-items: center;
    justify-content: end;
    gap: 12px;
    box-shadow: 0 10px 26px rgba(46, 42, 34, .06);
}

.pagination-controls {
    justify-content: flex-end;
}

.pagination-item,
.pagination-ellipsis {
    display: inline-grid;
    min-width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--ink);
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
    transition: background .15s, color .15s, transform .15s, border-color .15s;
}

.pagination-item:hover {
    border-color: rgba(243, 178, 60, .65);
    background: #fff8e6;
    transform: translateY(-1px);
}

.pagination-item.active {
    border-color: var(--ink);
    background: var(--ink);
    color: #fff;
    box-shadow: 0 8px 18px rgba(46, 42, 34, .18);
}

.pagination-item.disabled {
    opacity: .35;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-edge,
.pagination-prev,
.pagination-next {
    font-size: 18px;
}

.pagination-ellipsis {
    border-color: transparent;
    background: transparent;
    color: var(--muted);
    min-width: 28px;
}

.pagination-size {
    justify-content: flex-end;
}

.pagination-size select {
    font-weight: 900;
}

@media (max-width: 768px) {
    .pagination-bar {
        grid-template-columns: 1fr;
        align-items: stretch;
        justify-content: end;
    }

    .pagination-summary {
        text-align: right;
    }

    .pagination-controls {
        display: flex;
        justify-content: flex-end;
        gap: 6px;
        overflow-x: auto;
        padding-bottom: 3px;
        -webkit-overflow-scrolling: touch;
    }

    .pagination-item,
    .pagination-ellipsis {
        min-width: 36px;
        height: 36px;
        flex: 0 0 auto;
    }

    .pagination-size,
    .pagination-size label {
        display: flex;
        justify-content: flex-end;
    }
}

/* Admin table search and classification */
.admin-table-tools {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    margin: 12px 0;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fffaf0;
}

.admin-table-tools label {
    flex: 1;
    min-width: 0;
}

.admin-table-tools input,
.admin-table-tools select {
    width: 100%;
    border-radius: 12px;
}

.admin-table-count {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 11px;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .admin-table-tools {
        flex-wrap: wrap;
    }

    .admin-table-tools label {
        flex: 1 1 100%;
    }

    .admin-table-count {
        width: 100%;
        justify-content: center;
    }
}

.province-main-link {
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-decoration: none;
}

.province-tags a,
.province-tags span {
    border: 1px solid rgba(123, 86, 37, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1;
    padding: 6px 9px;
    text-decoration: none;
}

.province-tags a:hover,
.province-tags a.active {
    background: var(--ink);
    color: #fff;
}

.province-detail-tags {
    margin-bottom: 22px;
}

/* Admin wide table horizontal scroll */
.admin-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

.admin-table-wrap .admin-table {
    width: max-content;
    min-width: 100%;
}

.admin-table-wrap::-webkit-scrollbar {
    height: 10px;
}

.admin-table-wrap::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(46, 42, 34, .28);
}

.admin-table-wrap::-webkit-scrollbar-track {
    border-radius: 999px;
    background: rgba(46, 42, 34, .08);
}

@media (max-width: 960px) {
    .admin-table-wrap {
        margin-inline: -4px;
        padding: 0 4px 8px;
    }
}

/* Admin compact table actions */
.admin-per-page-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.admin-per-page-inline select {
    min-width: 72px;
}

/* btn-compact → dùng .btn-sm thay thế; giữ selector để tương thích HTML cũ */
.btn.btn-compact {
    min-height: 30px;
    padding: 0 10px;
    font-size: 11px;
    border-radius: 8px;
}

.admin-table-wrap {
    position: relative;
    border: 1px solid rgba(46, 42, 34, .08);
    border-radius: 14px;
}

.admin-table-wrap::after {
    content: '↔';
    position: absolute;
    right: 8px;
    bottom: 8px;
    display: none;
    width: 26px;
    height: 26px;
    place-items: center;
    border-radius: 50%;
    background: rgba(46, 42, 34, .72);
    color: #fff;
    font-size: 12px;
    pointer-events: none;
}

@media (max-width: 960px) {
    .pagination-bar {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 10px;
    }

    .pagination-item,
    .pagination-ellipsis {
        min-width: 34px;
        height: 34px;
        border-radius: 10px;
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .admin-table-actions {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-end;
        gap: 7px;
    }

    .admin-table-actions .muted {
        grid-column: 1 / -1;
    }

    .admin-table-wrap::after {
        display: grid;
    }

    .pagination-controls {
        justify-content: flex-end;
    }
}

@media (max-width: 520px) {
    .pagination-summary {
        font-size: 12px;
    }

    .pagination-item,
    .pagination-ellipsis {
        min-width: 30px;
        height: 30px;
        border-radius: 9px;
        font-size: 12px;
    }

    .pagination-edge {
        display: none;
    }

    .admin-table-actions {
        gap: 7px;
    }
}

.province-food-tags {
    margin: -8px 0 24px;
}

.home-location-card {
    align-items: center;
    background: linear-gradient(135deg, rgba(255,255,255,.9), rgba(255,244,220,.9));
    border: 1px solid rgba(197, 142, 52, 0.22);
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin: 0 0 14px;
    padding: 14px;
}

.home-location-card span {
    color: var(--ink);
    font-weight: 800;
    line-height: 1.45;
}

.home-location-card .btn {
    flex: 0 0 auto;
    white-space: nowrap;
}
.admin-remember-login {
    align-items: center;
    color: var(--muted);
    display: flex !important;
    flex-direction: row !important;
    font-size: 0.95rem;
    font-weight: 700;
    gap: 8px;
    margin: -4px 0 2px;
}

.admin-remember-login input {
    height: 16px !important;
    min-height: 16px !important;
    width: 16px !important;
}

@media (min-width: 961px) {
    .page-provinces .landing-hero .eyebrow,
    .page-provinces .landing-hero h1 {
        font-family: var(--font-body);
        letter-spacing: -.02em;
    }

    .page-provinces .landing-hero .eyebrow {
        font-size: 16px;
        font-weight: 800;
    }

    .page-provinces .landing-hero h1 {
        font-size: clamp(34px, 4.2vw, 54px);
        line-height: 1.18;
        font-weight: 800;
    }
}

.lang-switcher {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, .7);
}

.lang-switcher a {
    min-width: 30px;
    padding: 4px 8px;
    border: 0;
    border-radius: 999px;
    text-align: center;
    font-size: 11px;
    font-weight: 800;
}

.lang-switcher a.active {
    background: var(--gold);
    color: #fff;
}

@media (max-width: 960px) {
    .lang-switcher {
        margin-top: 8px;
        align-self: flex-start;
    }
}

@media (min-width: 961px) {
    .page-provinces .landing-hero {
        padding-top: 56px;
        padding-bottom: 20px;
    }

    .page-provinces .province-index-section {
        display: grid;
        gap: 18px;
        padding-top: 18px;
    }

    .page-provinces .province-index-section .section-head {
        margin-bottom: 0;
    }

    .page-provinces .province-index-section .section-head h2 {
        font-size: 34px;
    }

    .page-provinces .province-index-section .listing-search {
        max-width: none;
        margin: 0;
        padding: 15px 18px;
        border-radius: 18px;
    }

    .page-provinces .province-index-section .province-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px;
        align-items: stretch;
    }

    .page-provinces .province-index-section .province-card {
        min-height: 154px;
        padding: 22px 18px;
        border: 1px solid rgba(46, 42, 34, .06);
        box-shadow: 0 14px 34px rgba(46, 42, 34, .06);
    }

    .page-provinces .province-index-section .province-card strong {
        font-size: 22px;
        line-height: 1.05;
    }

    .page-provinces .province-index-section .province-card span {
        font-size: 14px;
    }

    .page-provinces .province-index-section .province-tags {
        margin-top: 14px;
    }
}

@media (min-width: 1200px) {
    .page-provinces .province-index-section .province-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}


@media (min-width: 961px) {
    .page-provinces .landing-hero {
        max-width: 1180px;
        padding-top: 54px;
        padding-bottom: 18px;
    }

    .page-provinces .province-index-section {
        display: block;
        max-width: 1180px;
        padding-top: 18px;
        padding-bottom: 54px;
    }

    .page-provinces .province-index-section .section-head {
        align-items: center;
        margin-bottom: 16px;
    }

    .page-provinces .province-index-section .listing-search {
        width: 100%;
        max-width: none;
        margin: 0 0 18px;
        padding: 16px 18px;
        border-radius: 18px;
        box-shadow: 0 12px 32px rgba(46, 42, 34, .08);
    }

    .page-provinces .province-index-section .province-grid {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 14px;
        align-items: stretch;
        clear: both;
    }

    .page-provinces .province-index-section .province-card {
        width: auto;
        min-width: 0;
        min-height: 168px;
        padding: 22px 18px;
        border: 1px solid rgba(46, 42, 34, .06);
        box-shadow: 0 14px 34px rgba(46, 42, 34, .06);
    }

    .page-provinces .province-index-section .province-card strong {
        font-size: 22px;
        line-height: 1.06;
    }

    .page-provinces .province-index-section .province-card span {
        font-size: 14px;
    }
}

@media (min-width: 961px) and (max-width: 1199px) {
    .page-provinces .province-index-section .province-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}


@media (min-width: 961px) {
    .page-provinces .landing-hero .eyebrow {
        font-family: var(--font-hand);
        font-size: 22px;
        letter-spacing: 0;
    }

    .page-provinces .landing-hero h1 {
        font-family: var(--font-head);
        font-size: clamp(46px, 5.2vw, 68px);
        line-height: 1;
        letter-spacing: 0;
    }
}

/* Admin action buttons: keep search visible, move feature forms behind buttons. */
.admin-action-shell {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 14px auto;
}

.admin-filter-actions .admin-action-shell,
.admin-table-head .admin-action-shell {
    margin: 0 0 0 auto;
}

.admin-feature-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.admin-filter-grid > .admin-feature-actions {
    grid-column: 1 / -1;
    width: 100%;
}

.admin-action-dialog form button[type="submit"],
.admin-action-dialog form button:not([type]) {
    background: var(--gold);
    color: #fff;
}

.admin-panel .pagination-bar,
.admin-panel .admin-pagination {
    margin-left: auto;
    width: fit-content;
    max-width: 100%;
}

.admin-panel .pagination-bar {
    justify-content: end;
}

.admin-panel .pagination-controls,
.admin-panel .pagination-size,
.admin-panel .pagination-size label {
    justify-content: flex-end;
}

.admin-panel > .admin-action-shell {
    width: 100%;
}

.admin-action-source-panel {
    display: none !important;
}

.admin-action-trigger {
    min-height: 38px;
    padding: 9px 14px;
}

.admin-action-modal[hidden] {
    display: none !important;
}

.admin-action-modal {
    align-items: center;
    background: rgba(15, 23, 42, 0.58);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 18px;
    position: fixed;
    z-index: 2600;
}

.admin-action-dialog {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.26);
    max-height: calc(100vh - 36px);
    max-width: 920px;
    overflow: auto;
    padding: 18px;
    width: min(920px, 100%);
}

.admin-action-dialog-head {
    align-items: center;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin: 0 0 14px;
    padding: 0 0 12px;
}

.admin-action-close {
    background: #f3f4f6;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
    padding: 8px 12px;
}

body.admin-action-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .admin-action-shell {
        margin-bottom: 10px;
        width: 100%;
    }

    .admin-feature-actions {
        width: 100%;
    }

    .admin-panel .pagination-bar,
    .admin-panel .admin-pagination {
        width: 100%;
    }

    .admin-action-trigger {
        font-size: 13px;
        min-height: 34px;
        padding: 8px 11px;
    }

    .admin-action-modal {
        align-items: flex-end;
        padding: 10px;
    }

    .admin-action-dialog {
        border-radius: 18px 18px 12px 12px;
        max-height: 86vh;
        padding: 14px;
    }
}

.real-map-shell {
    position: relative;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    background: #dfe9df;
}

.real-map {
    position: absolute;
    inset: 0;
    z-index: 1;
    min-height: 100%;
}

.map-loading {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 500;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .94);
    color: var(--ink);
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 8px 22px rgba(46, 42, 34, .12);
}

.map-loading[hidden] {
    display: none;
}

.real-map-shell .map-empty-state {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 520;
    width: min(360px, calc(100% - 32px));
    transform: translate(-50%, -50%);
}

.leaflet-place-marker {
    border: 0;
    background: transparent;
}

.leaflet-place-pin {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 50% 50% 50% 0;
    background: var(--ink);
    color: #fff;
    box-shadow: 0 8px 18px rgba(46, 42, 34, .26);
    transform: rotate(-45deg);
    transform-origin: center;
    font-size: 18px;
    transition: background .15s, transform .15s;
}

.leaflet-place-pin::first-letter {
    display: inline-block;
    transform: rotate(45deg);
}

.leaflet-place-pin.active {
    background: var(--gold);
    transform: rotate(-45deg) scale(1.12);
}

.leaflet-popup-content-wrapper {
    border-radius: 16px;
    box-shadow: 0 16px 36px rgba(46, 42, 34, .18);
}

.leaflet-place-popup {
    min-width: 190px;
    font-family: var(--font-body);
}

.leaflet-place-popup strong,
.leaflet-place-popup small,
.leaflet-place-popup span {
    display: block;
}

.leaflet-place-popup strong {
    font-family: var(--font-head);
    font-size: 18px;
    line-height: 1.1;
}

.leaflet-place-popup small {
    margin: 3px 0 8px;
    color: var(--muted);
    font-size: 12px;
}

.leaflet-place-popup span {
    width: max-content;
    margin-bottom: 10px;
    padding: 4px 9px;
    border-radius: 999px;
    background: var(--sand);
    color: #8a6a35;
    font-size: 11px;
    font-weight: 800;
}

.leaflet-place-popup a {
    display: block;
    padding: 9px 10px;
    border-radius: 10px;
    background: var(--ink);
    color: #fff;
    text-align: center;
    font-size: 12px;
    font-weight: 800;
}

.leaflet-container {
    font-family: var(--font-body);
}

@media (max-width: 960px) {
    .real-map-shell {
        height: calc(100vh - 60px);
        position: relative;
        overflow: hidden;
    }
}

/* =====================================================
   Tom Select — override để match với theme QuocLocalMaps
   ===================================================== */
.ts-wrapper {
    width: 100%;
}
.ts-wrapper.single .ts-control {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    font-family: var(--font-body);
    font-size: inherit;
    color: var(--ink);
    cursor: text;
    min-height: 44px;
    box-shadow: none;
}
.ts-wrapper.multi .ts-control {
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    font-family: var(--font-body);
    font-size: inherit;
    color: var(--ink);
    min-height: 44px;
    gap: 4px;
}
.ts-wrapper.single.input-active .ts-control,
.ts-wrapper.multi.input-active .ts-control {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(169, 122, 69, .12);
}
.ts-control input {
    font-family: var(--font-body) !important;
    font-size: inherit !important;
    color: var(--ink) !important;
}
.ts-wrapper .ts-control::after {
    display: none;
}
.ts-dropdown {
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow);
    background: #fff;
    font-family: var(--font-body);
    font-size: inherit;
    color: var(--ink);
    margin-top: 4px;
    overflow: hidden;
}
.ts-dropdown .ts-dropdown-content {
    max-height: 220px;
}
.ts-dropdown-header {
    padding: 8px 10px;
    border-bottom: 1px solid var(--line);
}
.ts-dropdown .option {
    padding: 9px 12px;
    color: var(--ink);
}
.ts-dropdown .option:hover,
.ts-dropdown .option.active {
    background: var(--sand);
    color: var(--ink);
}
.ts-dropdown .option.selected {
    background: var(--gold);
    color: #fff;
}
.ts-dropdown .option.selected.active {
    background: var(--gold-2);
}
.ts-wrapper.multi .item {
    background: var(--sand);
    border: 1px solid rgba(169, 122, 69, .2);
    border-radius: 6px;
    color: var(--ink);
    padding: 2px 8px;
    font-size: 0.875em;
}
.ts-wrapper.multi .item .remove {
    color: var(--muted);
    border-left: 1px solid rgba(169, 122, 69, .2);
    margin-left: 4px;
    padding-left: 4px;
}
.ts-wrapper.plugin-remove_button .item .remove:hover {
    background: var(--danger);
    color: #fff;
}
.ts-wrapper.focus .ts-control {
    border-color: var(--line);
    box-shadow: none;
}
/* Admin form grid tương thích */
.admin-form-grid .ts-wrapper {
    width: 100%;
}
.admin-form-grid .ts-wrapper.single .ts-control {
    border-radius: 10px;
}
/* Listing toolbar (public site) */
.listing-toolbar .ts-wrapper,
.map-filter .ts-wrapper {
    min-width: 140px;
}
.listing-toolbar .ts-wrapper.single .ts-control,
.map-filter .ts-wrapper.single .ts-control {
    border-radius: 999px;
    padding: 0 14px;
    font-size: 0.9em;
}

/* Tom Select — dish name AJAX dropdown */
.ts-dish-parent {
    color: var(--muted);
    font-size: 0.82em;
    margin-right: 4px;
}
.ts-dropdown .option .ts-dish-parent::after {
    content: "›";
    margin: 0 3px;
}
/* Search box bên trong dropdown (plugin dropdown_input) */
.plugin-dropdown_input .ts-dropdown .dropdown-input-wrap,
.ts-dropdown-header-inner {
    padding: 4px 8px;
    border-bottom: 1px solid var(--line);
    background: #fff;
}
.plugin-dropdown_input .ts-dropdown .dropdown-input,
.ts-dropdown-header-inner input {
    display: block;
    width: 100%;
    padding: 4px 8px;
    border: none !important;
    border-radius: 0;
    background: transparent !important;
    font-family: var(--font-body);
    font-size: 0.95em;
    color: var(--ink);
    outline: 0 !important;
    box-sizing: border-box;
    box-shadow: none !important;
}
.plugin-dropdown_input .ts-dropdown .dropdown-input:focus,
.ts-dropdown-header-inner input:focus {
    outline: 0 !important;
    box-shadow: none !important;
    border: none !important;
}
/* Nút thêm món mới trong TomSelect dish — ôm sát right/top/bottom */
.ts-control.has-dish-add-btn {
    position: relative;
    flex-wrap: nowrap;
    padding-right: 48px;
    overflow: hidden;
}

.ts-control.has-dish-add-btn input,
.ts-control.has-dish-add-btn .item {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1 1 0;
}

.ts-control .ts-dish-add-btn {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    aspect-ratio: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-radius: 0 9px 9px 0;
    background: var(--gold);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background .15s;
}

.ts-control .ts-dish-add-btn:hover { background: var(--gold-2); }
.ts-control .ts-dish-add-btn:disabled { opacity: 0.5; cursor: wait; }
/* Modal thêm món tầng 2 */
.dish-add-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.dish-add-overlay[hidden] { display: none; }
.dish-add-modal {
    background: #fff;
    border-radius: 10px;
    padding: 24px;
    width: 360px;
    max-width: calc(100vw - 32px);
    display: flex;
    flex-direction: column;
    gap: 18px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}
.dam-title {
    font-weight: 600;
    font-size: 1.05em;
}
.dam-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.dam-body label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.88em;
    font-weight: 600;
    color: var(--ink-2, #555);
}
.dam-body strong.dam-dish-name {
    font-size: 1em;
    color: var(--ink, #222);
    font-weight: 500;
    padding: 4px 0;
}
.dam-body select,
.dam-body input[type="text"],
.dam-body input:not([type]) {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid var(--border, #ddd);
    border-radius: 5px;
    font-size: 0.95em;
    font-family: inherit;
    box-sizing: border-box;
}
.dam-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
.dam-new-row[style*="display: none"] { display: none !important; }

/* ── Dish Image Picker ───────────────────────────────────────────── */
.dish-img-list-col {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: flex-start;
    align-content: flex-start;
    min-height: 40px;
}

.dish-img-list-col .dish-img-panel {
    top: 0;
}

.dish-img-list-col .dish-img-thumb {
    flex: none;
    width: 80px;
    height: 60px;
    min-height: 0;
}

.dish-img-btn-col label,
.dish-img-btn-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dish-best-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    cursor: pointer;
}

.dish-best-col input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--gold, #c8a84b);
    cursor: pointer;
}

.dish-img-picker {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dish-img-thumb {
    position: relative;
    flex: 1;
    min-height: 72px;
}

.dish-img-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--line);
    display: block;
}

.dish-img-clear {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    border: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dish-img-pick-btn { width: 100%; }

.dish-img-panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 200;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    max-height: 220px;
    overflow-y: auto;
    box-shadow: var(--shadow);
}

.dish-img-panel[hidden] {
    display: none;
}

.dish-img-panel-item {
    cursor: pointer;
    border-radius: 6px;
    overflow: hidden;
    aspect-ratio: 1;
    border: 2px solid transparent;
    padding: 0;
    background: var(--bg);
}

.dish-img-panel-item:hover { border-color: var(--gold); }

.dish-img-panel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dish-img-empty {
    color: var(--muted);
    font-size: 12px;
    text-align: center;
    padding: 10px;
    grid-column: 1 / -1;
}

/* ── Toast Notification ──────────────────────────────────────────── */
.qlm-toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.qlm-toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 260px;
    max-width: 360px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid transparent;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .14);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    pointer-events: auto;
    animation: qlm-toast-in .22s ease forwards;
}

.qlm-toast.is-hiding {
    animation: qlm-toast-out .22s ease forwards;
}

.qlm-toast--success {
    background: linear-gradient(135deg, #ecfdf3 0%, #f6fff9 100%);
    border-color: #b7ebc6;
    color: #166534;
}

.qlm-toast--error {
    background: linear-gradient(135deg, #fff1f2 0%, #fff7f7 100%);
    border-color: #fecdd3;
    color: #b42318;
}

.qlm-toast--info {
    background: linear-gradient(135deg, #eff6ff 0%, #f5f9ff 100%);
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.qlm-toast__icon {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .8);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
}

.qlm-toast__msg {
    flex: 1;
}

.qlm-toast__close {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    border: 0;
    background: transparent;
    cursor: pointer;
    opacity: .5;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    color: inherit;
}

.qlm-toast__close:hover {
    opacity: 1;
}

@keyframes qlm-toast-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes qlm-toast-out {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(8px); }
}

/* ── Field Validation ────────────────────────────────────────────── */
.field-error {
    display: block;
    margin-top: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    background: #fff0ec;
    color: #9f4d35;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.45;
}

.field-has-error input,
.field-has-error select,
.field-has-error textarea {
    border-color: var(--danger) !important;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(181, 116, 90, .18);
}

/* ── 12-Column Grid Utility ──────────────────────────────────────── */
/*
  Usage:
    <div class="qlm-grid">
      <div class="col-8 col-md-12 col-sm-12">main</div>
      <div class="col-4 col-md-12 col-sm-12">sidebar</div>
    </div>

  Breakpoints:
    default      = all screens (desktop-first base)
    col-md-*     = max-width: 768px  (tablet + mobile)
    col-sm-*     = max-width: 520px  (mobile only)
*/

.qlm-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--qlm-grid-gap, 16px);
}

.qlm-grid--gap-sm { --qlm-grid-gap: 8px; }
.qlm-grid--gap-lg { --qlm-grid-gap: 24px; }
.qlm-grid--gap-0  { --qlm-grid-gap: 0; }

/* base col-* (all screens) */
.col-1  { grid-column: span 1; }
.col-2  { grid-column: span 2; }
.col-3  { grid-column: span 3; }
.col-4  { grid-column: span 4; }
.col-5  { grid-column: span 5; }
.col-6  { grid-column: span 6; }
.col-7  { grid-column: span 7; }
.col-8  { grid-column: span 8; }
.col-9  { grid-column: span 9; }
.col-10 { grid-column: span 10; }
.col-11 { grid-column: span 11; }
.col-12 { grid-column: span 12; }
.col-auto { grid-column: auto; }
.col-full { grid-column: 1 / -1; }

/* col-md-* overrides at admin mobile (≤ 960px) */
@media (max-width: 960px) {
    .col-md-1  { grid-column: span 1; }
    .col-md-2  { grid-column: span 2; }
    .col-md-3  { grid-column: span 3; }
    .col-md-4  { grid-column: span 4; }
    .col-md-5  { grid-column: span 5; }
    .col-md-6  { grid-column: span 6; }
    .col-md-7  { grid-column: span 7; }
    .col-md-8  { grid-column: span 8; }
    .col-md-9  { grid-column: span 9; }
    .col-md-10 { grid-column: span 10; }
    .col-md-11 { grid-column: span 11; }
    .col-md-12 { grid-column: span 12; }
    .col-md-auto { grid-column: auto; }
    .col-md-full { grid-column: 1 / -1; }
}

/* col-sm-* overrides at mobile only (≤ 520px) */
@media (max-width: 520px) {
    .col-sm-1  { grid-column: span 1; }
    .col-sm-2  { grid-column: span 2; }
    .col-sm-3  { grid-column: span 3; }
    .col-sm-4  { grid-column: span 4; }
    .col-sm-5  { grid-column: span 5; }
    .col-sm-6  { grid-column: span 6; }
    .col-sm-7  { grid-column: span 7; }
    .col-sm-8  { grid-column: span 8; }
    .col-sm-9  { grid-column: span 9; }
    .col-sm-10 { grid-column: span 10; }
    .col-sm-11 { grid-column: span 11; }
    .col-sm-12 { grid-column: span 12; }
    .col-sm-auto { grid-column: auto; }
    .col-sm-full { grid-column: 1 / -1; }
}

/* ── Background Color Utilities ──────────────────────────────────── */
.bg-paper    { background: var(--paper); }
.bg-cream    { background: var(--cream); }
.bg-sand     { background: var(--sand); }
.bg-ink      { background: var(--ink); }
.bg-blue     { background: var(--blue); }
.bg-blue-soft{ background: var(--blue-soft); }
.bg-gold     { background: var(--gold); }
.bg-green    { background: var(--green); }
.bg-danger   { background: var(--danger); }
.bg-muted    { background: var(--muted); }
.bg-white    { background: #fff; }
.bg-none     { background: none; }

/* ── Text Color Utilities ─────────────────────────────────────────── */
.text-ink    { color: var(--ink); }
.text-muted  { color: var(--muted); }
.text-blue   { color: var(--blue); }
.text-gold   { color: var(--gold); }
.text-green  { color: var(--green); }
.text-danger { color: var(--danger); }
.text-white  { color: #fff; }

/* ── Display Utilities ────────────────────────────────────────────── */
.d-none         { display: none; }
.d-block        { display: block; }
.d-inline       { display: inline; }
.d-inline-block { display: inline-block; }
.d-flex         { display: flex; }
.d-inline-flex  { display: inline-flex; }
.d-grid         { display: grid; }

/* ── Flex Utilities ───────────────────────────────────────────────── */
.flex-wrap      { flex-wrap: wrap; }
.flex-nowrap    { flex-wrap: nowrap; }
.flex-col       { flex-direction: column; }
.flex-row       { flex-direction: row; }
.flex-1         { flex: 1; }
.flex-auto      { flex: auto; }
.flex-shrink-0  { flex-shrink: 0; }
.flex-grow-1    { flex-grow: 1; }

.align-start    { align-items: flex-start; }
.align-center   { align-items: center; }
.align-end      { align-items: flex-end; }
.align-stretch  { align-items: stretch; }

.justify-start  { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end    { justify-content: flex-end; }
.justify-between{ justify-content: space-between; }
.justify-around { justify-content: space-around; }

/* ── Gap Utilities ────────────────────────────────────────────────── */
.gap-0  { gap: 0; }
.gap-1  { gap: 4px; }
.gap-2  { gap: 8px; }
.gap-3  { gap: 12px; }
.gap-4  { gap: 16px; }
.gap-5  { gap: 20px; }
.gap-6  { gap: 24px; }
.gap-8  { gap: 32px; }

/* ── Spacing Utilities ────────────────────────────────────────────── */
/* Margin */
.m-0  { margin: 0; }
.m-1  { margin: 4px; }
.m-2  { margin: 8px; }
.m-3  { margin: 12px; }
.m-4  { margin: 16px; }
.m-5  { margin: 20px; }
.m-6  { margin: 24px; }
.m-auto { margin: auto; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 20px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }

.ml-0 { margin-left: 0; }
.ml-1 { margin-left: 4px; }
.ml-2 { margin-left: 8px; }
.ml-3 { margin-left: 12px; }
.ml-4 { margin-left: 16px; }
.ml-auto { margin-left: auto; }

.mr-0 { margin-right: 0; }
.mr-1 { margin-right: 4px; }
.mr-2 { margin-right: 8px; }
.mr-3 { margin-right: 12px; }
.mr-4 { margin-right: 16px; }
.mr-auto { margin-right: auto; }

/* Padding */
.p-0  { padding: 0; }
.p-1  { padding: 4px; }
.p-2  { padding: 8px; }
.p-3  { padding: 12px; }
.p-4  { padding: 16px; }
.p-5  { padding: 20px; }
.p-6  { padding: 24px; }

.pt-0 { padding-top: 0; }
.pt-1 { padding-top: 4px; }
.pt-2 { padding-top: 8px; }
.pt-3 { padding-top: 12px; }
.pt-4 { padding-top: 16px; }
.pt-5 { padding-top: 20px; }
.pt-6 { padding-top: 24px; }

.pb-0 { padding-bottom: 0; }
.pb-1 { padding-bottom: 4px; }
.pb-2 { padding-bottom: 8px; }
.pb-3 { padding-bottom: 12px; }
.pb-4 { padding-bottom: 16px; }
.pb-5 { padding-bottom: 20px; }
.pb-6 { padding-bottom: 24px; }

.pl-0 { padding-left: 0; }
.pl-1 { padding-left: 4px; }
.pl-2 { padding-left: 8px; }
.pl-3 { padding-left: 12px; }
.pl-4 { padding-left: 16px; }
.pl-6 { padding-left: 24px; }

.pr-0 { padding-right: 0; }
.pr-1 { padding-right: 4px; }
.pr-2 { padding-right: 8px; }
.pr-3 { padding-right: 12px; }
.pr-4 { padding-right: 16px; }
.pr-6 { padding-right: 24px; }

/* ── Typography Utilities ─────────────────────────────────────────── */
.fw-400  { font-weight: 400; }
.fw-500  { font-weight: 500; }
.fw-600  { font-weight: 600; }
.fw-700  { font-weight: 700; }
.fw-800  { font-weight: 800; }

.fs-xs   { font-size: 11px; }
.fs-sm   { font-size: 12px; }
.fs-base { font-size: 13px; }
.fs-md   { font-size: 15px; }
.fs-lg   { font-size: 18px; }
.fs-xl   { font-size: 22px; }

.text-left   { text-align: left; }
.text-center { text-align: center; }
.text-right  { text-align: right; }

/* ── Width / Height Utilities ─────────────────────────────────────── */
.w-full  { width: 100%; }
.w-auto  { width: auto; }
.h-full  { height: 100%; }
.h-auto  { height: auto; }
.min-w-0 { min-width: 0; }

/* ── Border Radius Utilities ──────────────────────────────────────── */
.rounded-sm  { border-radius: 6px; }
.rounded     { border-radius: 10px; }
.rounded-md  { border-radius: 16px; }
.rounded-lg  { border-radius: 24px; }
.rounded-full{ border-radius: 999px; }
.rounded-0   { border-radius: 0; }

/* ── Overflow Utilities ───────────────────────────────────────────── */
.overflow-hidden { overflow: hidden; }
.overflow-auto   { overflow: auto; }
.overflow-x-auto { overflow-x: auto; }

/* ── Opacity Utilities ────────────────────────────────────────────── */
.opacity-50  { opacity: .5; }
.opacity-75  { opacity: .75; }
.opacity-100 { opacity: 1; }

/* ── Cursor Utilities ─────────────────────────────────────────────── */
.cursor-pointer  { cursor: pointer; }
.cursor-default  { cursor: default; }
.cursor-not-allowed { cursor: not-allowed; }

/* ── Admin Autocomplete ───────────────────────────────────────────── */
.admin-ac {
    position: relative;
    width: 100%;
}
.admin-ac-display {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 30px 8px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23999' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E") no-repeat right 10px center;
    cursor: pointer;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
    user-select: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    outline: none;
    transition: border-color .15s;
}
.admin-ac-display:focus,
.admin-ac-display:hover {
    border-color: var(--ink);
}
.admin-ac-display.admin-ac-has-value {
    color: var(--ink);
}
.admin-ac-drop {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.10);
    max-height: 280px;
    overflow-y: auto;
    z-index: 300;
    margin: 0;
    padding: 4px 0;
    list-style: none;
}
.admin-ac-search-row {
    padding: 6px 8px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 2px;
    cursor: default;
    position: sticky;
    top: 0;
    background: #fff;
}
.admin-ac-search-row:hover {
    background: #fff;
}
.admin-ac-search {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 13px;
    outline: none;
}
.admin-ac-search:focus {
    border-color: var(--ink);
}
.admin-ac-drop li {
    padding: 9px 14px;
    cursor: pointer;
    color: var(--ink);
    font-size: 14px;
    font-weight: 400;
    transition: background .1s;
}
.admin-ac-drop li:hover,
.admin-ac-drop li.ac-hi {
    background: var(--sand);
}
.admin-ac-drop li[data-val=""] {
    color: var(--muted);
    border-bottom: 1px solid var(--line);
    margin-bottom: 2px;
}

