/* Cam 24 · giao diện chung (trang đặt món + trang quản lý) */
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-400.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-600.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-700.woff") format("woff"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("/assets/fonts/interd-800.woff") format("woff"); font-weight: 800; font-display: swap; }

:root {
  --g: #407c47; --g-d: #2c5a33; --g-dd: #1e3d23; --g-l: #e4eedf; --g-ll: #f0f5ec;
  --bg: #f6f3e8; --card: #fffdf7; --card2: #f7f4ea; --line: #e2dcc8;
  --ink: #1f2a1f; --mut: #6b7266; --y: #f2e33b; --y-ink: #2b3015;
  --red: #b8392b; --org: #c96a14; --blue: #2a5ea8;
  --r: 18px; --sh: 0 6px 22px rgba(30, 61, 35, 0.1);
  --fh: "Inter Display", "Inter", system-ui, sans-serif;
  --fb: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--fb); color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
input, select, textarea { font-size: 16px; }
h1, h2, h3, h4 { font-family: var(--fh); margin: 0; line-height: 1.15; letter-spacing: -0.01em; }
a { color: var(--g-d); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.hide { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* nút */
.btn { border: 0; border-radius: 14px; padding: 12px 16px; font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; }
.btn-g { background: var(--g); color: #fff; }
.btn-g:active { background: var(--g-d); }
.btn-l { background: var(--g-l); color: var(--g-d); }
.btn-w { background: #fff; color: var(--g-d); border: 1.5px solid var(--line); }
.btn-y { background: var(--y); color: var(--y-ink); }
.btn-r { background: #fbe7e4; color: var(--red); }
.btn:disabled, .btn.dim { opacity: 0.45; }
.btn-sm { padding: 8px 12px; font-size: 13.5px; border-radius: 11px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 99px; background: var(--g-l); color: var(--g-d); }
.pill.closed { background: #fbe7e4; color: var(--red); }
.lk { color: var(--g-d); font-weight: 600; text-decoration: underline; background: none; border: 0; padding: 0; font-size: inherit; }

/* ô nhập */
.fld { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 12px; background: #fff; }
.fld:focus { outline: 2px solid #9cc4a0; border-color: #9cc4a0; }
textarea.fld { min-height: 84px; resize: vertical; }
label.lb { display: block; font-size: 13.5px; font-weight: 600; margin: 0 0 5px; }
.gl { display: grid; gap: 12px; }
.err { color: var(--red); font-size: 12.5px; margin-top: 4px; }
.seg { display: flex; flex-wrap: wrap; gap: 7px; }
.seg button { border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 8px 12px; font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.seg button.on { background: var(--g); border-color: var(--g); color: #fff; }
.seg button:disabled { opacity: 0.4; text-decoration: line-through; }
.dot { width: 16px; height: 16px; border-radius: 50%; display: inline-block; flex: none; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.7), 0 1px 2px rgba(0, 0, 0, 0.2); }
.chk { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.chk input { width: 22px; height: 22px; flex: none; margin: 0; accent-color: var(--g); }
.stp { display: inline-flex; align-items: center; gap: 4px; background: var(--g-l); border-radius: 13px; padding: 4px; }
.stp button { width: 34px; height: 34px; border: 0; border-radius: 10px; background: #fff; font-size: 18px; font-weight: 700; color: var(--g-d); }
.stp b { min-width: 24px; text-align: center; }

/* bảng trượt */
.ov { position: fixed; inset: 0; background: rgba(20, 30, 20, 0.5); z-index: 60; display: flex; align-items: flex-end; justify-content: center; animation: fd 0.2s; }
@keyframes fd { from { opacity: 0; } }
.sh { background: var(--card); width: 100%; max-width: 560px; max-height: 92vh; border-radius: 24px 24px 0 0; display: flex; flex-direction: column; animation: up 0.25s ease-out; }
@keyframes up { from { transform: translateY(40px); opacity: 0.4; } }
@media (min-width: 700px) { .ov { align-items: center; } .sh { border-radius: 24px; max-height: 88vh; } }
.sh .hd { display: flex; align-items: center; gap: 10px; padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
.sh .hd h3 { font-size: 20px; color: var(--g-d); flex: 1; }
.sh .cl { width: 38px; height: 38px; border-radius: 12px; border: 0; background: var(--g-l); color: var(--g-d); font-size: 22px; flex: none; }
.sh .bdy { overflow-y: auto; padding: 14px 18px 18px; flex: 1; overscroll-behavior: contain; }
.sh .ft { padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
.sh .ft .btn { flex: 1; }

/* thông báo nhỏ */
#toasts { position: fixed; top: 10px; left: 0; right: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 12px; }
.toast { pointer-events: auto; background: #1e2a1e; color: #fff; border-radius: 16px; padding: 11px 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); max-width: 460px; width: 100%; font-size: 14px; display: flex; gap: 10px; align-items: center; animation: td 0.3s; }
.toast button { margin-left: auto; background: var(--y); color: var(--y-ink); border: 0; border-radius: 10px; padding: 6px 10px; font-weight: 700; flex: none; }
@keyframes td { from { transform: translateY(-16px); opacity: 0; } }

.tot { background: var(--g-ll); border: 1px solid var(--g-l); border-radius: 14px; padding: 12px 14px; }
.tot div { display: flex; justify-content: space-between; gap: 10px; margin: 3px 0; }
.tot .big { font-weight: 800; font-size: 17px; color: var(--g-d); border-top: 1px dashed #b6cdb4; padding-top: 7px; margin-top: 7px; }
.tot small { color: var(--mut); font-size: 12px; display: block; }
.box { background: var(--card); border: 1px solid #ebe5d2; border-radius: var(--r); box-shadow: var(--sh); padding: 14px; }
.note { background: #fff8d6; border: 1.5px solid #ecdc85; border-radius: 14px; padding: 11px 13px; font-size: 13.5px; }
.pol p { margin: 0 0 8px; font-size: 14.5px; }
