/* Nhận diện Teamo: bạc hà mát + đào cam ấm + kem sữa + vàng chanh */
:root {
  --bac-ha: #2EC4B6;
  --bac-ha-dam: #138A80;
  --bac-ha-nhat: #E3F7F4;
  --dao: #FF8A65;
  --dao-nhat: #FFE9E1;
  --chanh: #FFD966;
  --kem: #FFFBF4;
  --sua: #F3D9B1;
  --muc: #1D3B37;
  --muc-nhat: #5E7C77;
  --vien: #E7E1D6;
  --trang: #ffffff;
  --bo: 18px;
  --bong: 0 6px 20px rgba(29, 59, 55, 0.08);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  font-family: "Be Vietnam Pro", system-ui, sans-serif;
  background: var(--kem);
  color: var(--muc);
  font-size: 16px;
  line-height: 1.5;
}
h1, h2, h3, .logo-chu { font-family: "Baloo 2", "Be Vietnam Pro", sans-serif; }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
.an { display: none !important; }
.khung { max-width: 560px; margin: 0 auto; padding: 0 16px; }

/* Đầu trang */
.dau {
  background: linear-gradient(160deg, var(--bac-ha) 0%, #5ED6C9 100%);
  color: var(--trang);
  border-radius: 0 0 28px 28px;
  padding: 18px 0 26px;
  position: relative;
  overflow: hidden;
}
.dau::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 170px; height: 170px;
  background: var(--chanh); opacity: .35; border-radius: 50%;
}
.dau .khung { position: relative; z-index: 1; }
.thuong-hieu { display: flex; align-items: center; gap: 12px; }
.thuong-hieu img { width: 52px; height: 52px; filter: drop-shadow(0 3px 6px rgba(0,0,0,.12)); border-radius: 50%; background: #fff; }
.logo-chu { font-size: 34px; font-weight: 800; line-height: 1; letter-spacing: .3px; }
.logo-chu span { color: var(--chanh); }
.khau-hieu { margin: 2px 0 0; font-size: 14px; opacity: .95; }
.thong-tin { margin: 16px 0 0; display: grid; gap: 6px; font-size: 14px; }
.thong-tin a { color: #fff; font-weight: 600; }
.trang-thai {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 12px;
  background: rgba(255,255,255,.22); padding: 4px 12px; border-radius: 99px; font-size: 13px; font-weight: 600;
}
.trang-thai i { width: 8px; height: 8px; border-radius: 50%; background: #B8FFB0; display: inline-block; }
.trang-thai.nghi i { background: #FFB4A0; }

/* Thanh nhóm món */
.thanh-nhom {
  position: sticky; top: 0; z-index: 5; background: var(--kem);
  display: flex; gap: 8px; overflow-x: auto; padding: 14px 16px 10px; scrollbar-width: none;
  max-width: 560px; margin: 0 auto;
}
.thanh-nhom::-webkit-scrollbar { display: none; }
.thanh-nhom button {
  flex: none; border: 1.5px solid var(--vien); background: var(--trang); color: var(--muc);
  padding: 6px 16px; border-radius: 99px; font-weight: 600; font-size: 14px;
}
.thanh-nhom button.chon { background: var(--muc); color: #fff; border-color: var(--muc); }

/* Thẻ món */
.nhom-tieu-de { font-size: 22px; margin: 14px 0 8px; }
.ds-mon { display: grid; gap: 12px; }
.mon {
  display: flex; gap: 14px; align-items: center; background: var(--trang);
  border-radius: var(--bo); padding: 12px; box-shadow: var(--bong);
}
.mon .hinh {
  flex: none; width: 74px; height: 74px; border-radius: 16px; display: grid; place-items: center;
}
.mon .hinh svg { width: 52px; height: 52px; }
.mon .noi-dung { flex: 1; min-width: 0; }
.mon h3 { margin: 0; font-size: 18px; line-height: 1.25; }
.mon .mo-ta { margin: 2px 0 0; font-size: 13px; color: var(--muc-nhat); }
.mon .gia { margin-top: 4px; font-size: 14px; color: var(--muc-nhat); }
.mon .gia b { color: var(--bac-ha-dam); font-size: 16px; }
.nut-them {
  flex: none; width: 42px; height: 42px; border-radius: 50%; border: 0;
  background: var(--dao); color: #fff; font-size: 26px; line-height: 1; display: grid; place-items: center;
  box-shadow: 0 4px 10px rgba(255,138,101,.4);
}
.mon.het { opacity: .55; }
.mon.het .nut-them { background: var(--vien); box-shadow: none; font-size: 12px; width: auto; padding: 0 10px; border-radius: 99px; color: var(--muc-nhat); }

.ghi-chu-ship {
  margin: 22px 0 120px; background: var(--bac-ha-nhat); border-radius: var(--bo); padding: 14px 16px; font-size: 14px;
}
.ghi-chu-ship h3 { margin: 0 0 4px; font-size: 18px; }
.ghi-chu-ship p { margin: 2px 0; }
.chan-trang { text-align: center; font-size: 12px; color: var(--muc-nhat); margin: -100px 0 110px; }

/* Thanh giỏ hàng dưới đáy */
.thanh-gio {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(255,251,244,0) 0%, var(--kem) 35%);
}
.thanh-gio button {
  width: 100%; max-width: 528px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between;
  border: 0; border-radius: 99px; background: var(--muc); color: #fff; padding: 14px 20px; font-weight: 700; font-size: 16px;
  box-shadow: 0 8px 20px rgba(29,59,55,.25);
}
.thanh-gio .so { background: var(--chanh); color: var(--muc); border-radius: 99px; padding: 1px 10px; margin-right: 8px; }

/* Bảng trượt (chọn món, giỏ hàng) */
.man { position: fixed; inset: 0; background: rgba(20,40,37,.45); z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.bang {
  background: var(--kem); width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto;
  border-radius: 24px 24px 0 0; padding: 8px 16px calc(20px + env(safe-area-inset-bottom));
  animation: len .22s ease-out;
}
@keyframes len { from { transform: translateY(40px); } to { transform: none; } }
.bang .tay-cam { width: 44px; height: 5px; border-radius: 9px; background: var(--vien); margin: 4px auto 10px; }
.bang-dau { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bang-dau h2 { margin: 0; font-size: 24px; line-height: 1.2; }
.nut-dong { border: 0; background: var(--trang); width: 36px; height: 36px; border-radius: 50%; font-size: 20px; box-shadow: var(--bong); }
.muc { margin-top: 16px; }
.muc > label, .muc .nhan { display: block; font-weight: 700; margin-bottom: 8px; font-size: 15px; }
.muc .phu { font-weight: 400; color: var(--muc-nhat); font-size: 13px; }
.lua-chon { display: flex; flex-wrap: wrap; gap: 8px; }
.lua-chon button {
  border: 1.5px solid var(--vien); background: var(--trang); border-radius: 12px; padding: 8px 14px; font-size: 14px; font-weight: 600; color: var(--muc);
}
.lua-chon button.chon { border-color: var(--bac-ha); background: var(--bac-ha-nhat); color: var(--bac-ha-dam); }
.lua-chon button:disabled { opacity: .45; }
.o-nhap, textarea.o-nhap {
  width: 100%; border: 1.5px solid var(--vien); border-radius: 12px; padding: 11px 13px; background: var(--trang); font-size: 16px;
}
.o-nhap:focus { outline: none; border-color: var(--bac-ha); }
textarea.o-nhap { resize: vertical; min-height: 64px; }
.so-luong { display: inline-flex; align-items: center; gap: 4px; background: var(--trang); border-radius: 99px; padding: 4px; box-shadow: var(--bong); }
.so-luong button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--bac-ha-nhat); color: var(--bac-ha-dam); font-size: 20px; font-weight: 700; }
.so-luong span { min-width: 30px; text-align: center; font-weight: 700; }
.chan-bang { display: flex; align-items: center; gap: 12px; margin-top: 20px; }
.nut-chinh {
  flex: 1; border: 0; border-radius: 99px; background: var(--dao); color: #fff; padding: 14px 18px; font-weight: 700; font-size: 16px;
  box-shadow: 0 6px 16px rgba(255,138,101,.35);
}
.nut-chinh:disabled { opacity: .6; }
.nut-phu {
  width: 100%; border: 1.5px solid var(--bac-ha); background: var(--trang); color: var(--bac-ha-dam);
  border-radius: 99px; padding: 12px 18px; font-weight: 700; font-size: 15px; margin-top: 10px;
}
.nut-nho { border: 1.5px solid var(--bac-ha); background: var(--trang); color: var(--bac-ha-dam); border-radius: 12px; padding: 9px 12px; font-weight: 600; font-size: 14px; }

/* Giỏ hàng */
.dong-gio { display: flex; gap: 10px; align-items: flex-start; background: var(--trang); border-radius: 14px; padding: 10px 12px; margin-top: 8px; }
.dong-gio .ct { flex: 1; font-size: 13px; color: var(--muc-nhat); }
.dong-gio .ct b { color: var(--muc); font-size: 15px; }
.dong-gio .phai { text-align: right; }
.dong-gio .phai .tien { font-weight: 700; }
.dong-gio .so-luong { box-shadow: none; background: var(--kem); margin-top: 4px; }
.dong-gio .so-luong button { width: 28px; height: 28px; font-size: 16px; }
.vi-tri { display: flex; gap: 8px; flex-wrap: wrap; }
#ban-do { height: 240px; border-radius: 14px; margin-top: 10px; border: 1.5px solid var(--vien); }
.ket-qua-km { margin-top: 8px; font-size: 14px; background: var(--bac-ha-nhat); color: var(--bac-ha-dam); border-radius: 12px; padding: 8px 12px; font-weight: 600; }
.bang-tien { margin-top: 18px; background: var(--trang); border-radius: 14px; padding: 12px 14px; font-size: 15px; }
.bang-tien div { display: flex; justify-content: space-between; padding: 3px 0; }
.bang-tien .tong { border-top: 1.5px dashed var(--vien); margin-top: 6px; padding-top: 8px; font-weight: 800; font-size: 18px; }
.loi { color: #C2410C; font-size: 14px; margin-top: 10px; font-weight: 600; }
.bay { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Đặt xong */
.xong { text-align: center; }
.xong .tich { width: 72px; height: 72px; border-radius: 50%; background: var(--bac-ha); color: #fff; font-size: 40px; display: grid; place-items: center; margin: 6px auto 8px; }
.xong .ma { display: inline-block; background: var(--chanh); padding: 2px 12px; border-radius: 8px; font-weight: 800; letter-spacing: .5px; }
.qr-khung { background: #fff; border-radius: 18px; padding: 16px; margin: 16px auto 0; max-width: 300px; box-shadow: var(--bong); }
.qr-khung #qr { display: grid; place-items: center; margin: 8px 0; }
.qr-khung #qr img, .qr-khung #qr canvas { width: 220px !important; height: 220px !important; }
.qr-khung p { margin: 2px 0; font-size: 13px; color: var(--muc-nhat); }
.qr-khung .stk { font-weight: 800; color: var(--muc); font-size: 16px; letter-spacing: .5px; }

.trang-thai-don {
  margin: 12px auto 0; border-radius: 14px; padding: 10px 14px; font-size: 14px; font-weight: 600; text-align: left;
  background: #FFF6D6; color: #8A6A00; display: flex; gap: 10px; align-items: flex-start;
}
.trang-thai-don.ok { background: var(--bac-ha-nhat); color: var(--bac-ha-dam); }
.trang-thai-don .bieu-tuong { font-size: 20px; line-height: 1.2; }
.trang-thai-don small { display: block; font-weight: 400; opacity: .85; }
#don-gan-day .trang-thai-don { margin: 14px 0 0; cursor: pointer; }
@keyframes nhay { 0%,100% { transform: scale(1); } 50% { transform: scale(1.04); } }
.trang-thai-don.vua-doi { animation: nhay .5s ease 2; }

.thong-bao {
  position: fixed; left: 50%; top: 16px; transform: translateX(-50%); z-index: 50; background: var(--muc); color: #fff;
  padding: 10px 18px; border-radius: 99px; font-size: 14px; font-weight: 600; box-shadow: var(--bong); max-width: calc(100% - 32px); text-align: center;
}
