:root {
  --chinh: #0F6E5F; --chinh-dam: #0B5649; --chinh-nhat: #E1F0EC; --nen: #F5F7F6; --the: #FFFFFF;
  --chu: #1B2421; --chu-phu: #5B6763; --vien: #DDE3E0;
  --tot: #1D7A46; --tot-nhat: #E2F3E8; --vang: #9A6200; --vang-nhat: #FBF0D9; --do: #B3362C; --do-nhat: #FBE6E3; --sao: #E0A100;
  --bo: 14px; --bong: 0 1px 2px rgba(20,40,35,.05), 0 6px 18px rgba(20,40,35,.08);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--chu); background: var(--nen); }
a { color: var(--chinh); }
img { max-width: 100%; }
h1 { font-size: 1.3rem; margin: .2rem 0 .6rem; line-height: 1.3; text-wrap: balance; }
h2 { font-size: 1.05rem; margin: 1.1rem 0 .5rem; }
:focus-visible { outline: 2px solid var(--chinh); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- Dau trang, menu day ---------- */
.dau { position: sticky; top: 0; z-index: 1000; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 16px; padding-top: max(8px, env(safe-area-inset-top)); background: var(--chinh); color: #fff; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; color: #fff; text-decoration: none; min-width: 0; }
.logo span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logo small { display: block; font-weight: 400; font-size: .75rem; opacity: .9; }
.nut-dau { position: relative; color: #fff; text-decoration: none; font-size: 1.2rem; min-width: 42px; min-height: 42px; display: grid; place-items: center; border-radius: 12px; background: rgba(255,255,255,.15); }
.nut-dau b { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; border-radius: 9px; background: var(--do); font-size: .7rem; line-height: 18px; text-align: center; padding: 0 4px; }
main { max-width: 1180px; margin: 0 auto; padding: 14px max(16px, env(safe-area-inset-right)) 96px max(16px, env(safe-area-inset-left)); }
.menu-day { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000; display: grid; grid-template-columns: repeat(4, 1fr);
  background: #fff; border-top: 1px solid var(--vien); padding: 4px 6px max(4px, env(safe-area-inset-bottom)); }
.menu-day a { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 54px; color: var(--chu-phu); text-decoration: none; font-size: .76rem; font-weight: 600; border-radius: 12px; }
.menu-day a .bt { font-size: 1.25rem; line-height: 1.1; }
.menu-day a.chon { color: var(--chinh); background: var(--chinh-nhat); }
@media (min-width: 900px) { .menu-day { max-width: 640px; margin: 0 auto; border-radius: 16px 16px 0 0; border: 1px solid var(--vien); } }

/* ---------- Nut, o nhap ---------- */
.nut { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 8px 18px; border: 0; border-radius: 12px;
  background: var(--chinh); color: #fff; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.nut:hover { background: var(--chinh-dam); }
.nut:disabled { opacity: .55; cursor: default; }
.nut-nho { min-height: 38px; padding: 5px 12px; font-size: .9rem; border-radius: 10px; }
.nut-vien { background: #fff; color: var(--chinh); box-shadow: inset 0 0 0 1.5px var(--chinh); }
.nut-vien:hover { background: var(--chinh-nhat); }
.nut-xam { background: #EDF1EF; color: var(--chu); }
.nut-xam:hover { background: #E2E8E5; }
.nut-do { background: #fff; color: var(--do); box-shadow: inset 0 0 0 1.5px #EBB9B3; }
.nut-do:hover { background: var(--do-nhat); }
.nut-zalo { background: #0068FF; }
.nut-zalo:hover { background: #0058D6; }
.nut-rong { width: 100%; }
.hang-nut { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.hang-nut > .nut { flex: 1 1 140px; }
label.o { display: flex; flex-direction: column; gap: 4px; font-size: .88rem; font-weight: 600; color: var(--chu-phu); margin-bottom: 10px; }
label.o small { font-weight: 400; }
input, select, textarea { font: inherit; color: var(--chu); border: 1px solid var(--vien); background: #fff; border-radius: 10px; padding: 9px 11px; width: 100%; min-width: 0; }
textarea { resize: vertical; }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--chinh); }
.chon-o { display: flex; gap: 8px; align-items: flex-start; font-size: .95rem; margin: 8px 0; cursor: pointer; }
.chon-o input { margin-top: 4px; }
.luoi2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 520px) { .luoi2 { grid-template-columns: 1fr; } }

/* ---------- Khoi chung ---------- */
.the { background: var(--the); border: 1px solid var(--vien); border-radius: var(--bo); padding: 16px; margin-bottom: 14px; }
.the h2:first-child { margin-top: 0; }
.hep { max-width: 520px; margin: 0 auto; }
.phu { color: var(--chu-phu); font-size: .9rem; }
.trong { color: var(--chu-phu); text-align: center; padding: 28px 12px; }
.chip { display: inline-block; font-size: .75rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--chinh-nhat); color: var(--chinh); white-space: nowrap; }
.chip.tot { background: var(--tot-nhat); color: var(--tot); }
.chip.vang { background: var(--vang-nhat); color: var(--vang); }
.chip.do { background: var(--do-nhat); color: var(--do); }
.chip.xam { background: #EDF1EF; color: var(--chu-phu); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.goi-y { border-radius: 10px; padding: 10px 12px; font-size: .92rem; margin: 8px 0; background: var(--chinh-nhat); }
.goi-y.vang { background: var(--vang-nhat); }
.goi-y.tot { background: var(--tot-nhat); }
.goi-y.do { background: var(--do-nhat); }
#thong-bao { position: fixed; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 2000; display: flex; flex-direction: column; gap: 6px; width: min(440px, calc(100% - 32px)); }
#thong-bao div { background: var(--chu); color: #fff; padding: 10px 14px; border-radius: 10px; font-size: .92rem; }
#thong-bao div.loi { background: var(--do); }

/* ---------- Trang tim ---------- */
.loc { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin-bottom: 12px; }
.loc label { display: flex; flex-direction: column; gap: 2px; font-size: .75rem; font-weight: 600; color: var(--chu-phu); flex: 1 1 130px; }
.loc select, .loc input { padding: 7px 9px; font-size: .92rem; }
.loc .chon-o { flex: 0 0 auto; flex-direction: row; align-items: center; margin: 0 0 8px; font-size: .88rem; color: var(--chu); }
.chia { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 860px) { .chia { grid-template-columns: 1fr; } }
.ban-do { position: relative; height: min(68vh, 620px); border-radius: var(--bo); overflow: hidden; border: 1px solid var(--vien); z-index: 0; }
@media (min-width: 861px) { .ban-do { position: sticky; top: 72px; } }
@media (max-width: 860px) { .ban-do { height: 46vh; } }
.nut-quanh { position: absolute; top: 10px; right: 10px; z-index: 500; box-shadow: var(--bong); }
.ghim-gia { background: #fff; color: var(--chu); font-weight: 700; font-size: 12px; padding: 3px 8px; border-radius: 999px; box-shadow: 0 2px 8px rgba(0,0,0,.25);
  white-space: nowrap; border: 2px solid #fff; transform: translate(-50%, -100%); display: inline-block; font-family: "Be Vietnam Pro", system-ui, sans-serif; }
.ghim-gia.sap { border-color: var(--vang); }
.ghim-gia.chon { background: var(--chinh); color: #fff; border-color: var(--chinh); }
.leaflet-div-icon { background: none; border: 0; }
.ds { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.dau-ds { display: flex; justify-content: space-between; align-items: center; font-size: .88rem; color: var(--chu-phu); }
.the-can { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; background: #fff; border: 1px solid var(--vien); border-radius: var(--bo); padding: 10px; text-decoration: none; color: inherit; }
.the-can:hover, .the-can.chon { border-color: var(--chinh); box-shadow: 0 0 0 1px var(--chinh); }
.the-can .anh { width: 112px; height: 100px; border-radius: 10px; object-fit: cover; background: var(--chinh-nhat); }
.the-can h3 { margin: 0 0 2px; font-size: .98rem; line-height: 1.35; }
.gia { font-weight: 700; font-size: 1.02rem; font-variant-numeric: tabular-nums; }
.gia small { font-weight: 400; color: var(--chu-phu); font-size: .8rem; }
.meta { color: var(--chu-phu); font-size: .85rem; }

/* ---------- Chi tiet ---------- */
.chi-tiet { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 860px) { .chi-tiet { grid-template-columns: 1fr; } }
.anh-lon { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 12px; }
.anh-lon img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; cursor: zoom-in; background: var(--chinh-nhat); }
.anh-lon img:first-child { grid-column: 1 / -1; aspect-ratio: 16/10; }
.bang { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; font-variant-numeric: tabular-nums; }
.bang .k { color: var(--chu-phu); }
.bang .v { text-align: right; }
ul.gon { margin: 0; padding-left: 20px; }
.ban-do-nho { height: 220px; border-radius: 12px; overflow: hidden; border: 1px solid var(--vien); margin: 8px 0; z-index: 0; position: relative; }
.dg { border-top: 1px solid var(--vien); padding-top: 12px; margin-top: 12px; }
.dg:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.diem { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: .85rem; color: var(--chu-phu); margin: 4px 0; }
.diem b { color: var(--chu); }
.tra-loi { background: var(--nen); border-radius: 10px; padding: 8px 12px; font-size: .92rem; margin-top: 6px; }
.sao { display: inline-flex; gap: 2px; }
.sao button { border: 0; background: none; font-size: 1.6rem; line-height: 1; color: #D5DCD8; cursor: pointer; padding: 0 2px; }
.sao button.bat { color: var(--sao); }
.hang-sao { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 4px 0; }
.xem-anh { position: fixed; inset: 0; z-index: 3000; background: rgba(0,0,0,.9); display: grid; place-items: center; padding: 16px; }
.xem-anh img { max-height: 92vh; border-radius: 8px; }

/* ---------- Dang tin ---------- */
.ban-do-ghim { height: 320px; border-radius: 12px; overflow: hidden; border: 1px solid var(--vien); margin: 8px 0; z-index: 0; position: relative; }
.anh-chon { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin: 8px 0; }
.anh-chon div { position: relative; }
.anh-chon img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.anh-chon button { position: absolute; top: 4px; right: 4px; border: 0; border-radius: 50%; width: 26px; height: 26px; background: rgba(0,0,0,.65); color: #fff; cursor: pointer; }
.muc { border-top: 1px solid var(--vien); padding: 10px 0; display: flex; flex-direction: column; gap: 6px; }
.muc:first-of-type { border-top: 0; }

/* ===== Trang quan tri ===== */
body.qt main { padding-bottom: 40px; }
body.qt #thong-bao { bottom: calc(20px + env(safe-area-inset-bottom)); }
.qt-menu { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; scrollbar-width: none; }
.qt-menu a { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--vien);
  color: var(--chu); text-decoration: none; font-size: .9rem; font-weight: 600; }
.qt-menu a.chon { background: var(--chinh); border-color: var(--chinh); color: #fff; }
.qt-menu .so { min-width: 20px; height: 20px; border-radius: 10px; background: var(--do); color: #fff; font-size: .72rem; line-height: 20px; text-align: center; padding: 0 5px; }
.so-lieu { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.so-lieu a, .so-lieu div { background: #fff; border: 1px solid var(--vien); border-radius: var(--bo); padding: 12px 14px; text-decoration: none; color: inherit; }
.so-lieu b { display: block; font-size: 1.6rem; font-variant-numeric: tabular-nums; line-height: 1.2; }
.so-lieu span { color: var(--chu-phu); font-size: .85rem; }
.so-lieu .can-xu-ly { border-color: var(--vang); background: var(--vang-nhat); }
.tin-qt { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; }
.tin-qt img { width: 120px; height: 96px; object-fit: cover; border-radius: 10px; background: var(--chinh-nhat); }
.tin-qt h3 { margin: 0 0 2px; font-size: 1rem; }
@media (max-width: 520px) { .tin-qt { grid-template-columns: 1fr; } .tin-qt img { width: 100%; height: 160px; } }
