* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: #f2f4f7; color: #1b1f24; font-family: system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif; font-size: 18px; padding-bottom: 84px; }
[hidden] { display: none !important; }
button { font: inherit; cursor: pointer; border: 0; }
button:disabled { opacity: .5; }
input { font: inherit; }

.primary { background: #1c7ed6; color: #fff; padding: 14px 18px; border-radius: 12px; font-weight: 700; font-size: 18px; }
.ghost { background: #e4e8ee; color: #1b1f24; padding: 10px 14px; border-radius: 10px; font-size: 16px; }
.err { color: #c92a2a; font-size: 16px; margin: 6px 0 0; }
.empty { color: #7b8794; text-align: center; padding: 22px 0; font-size: 18px; }

/* login */
.center { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 18px; }
.card { background: #fff; border-radius: 16px; padding: 26px; width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.card h1 { font-size: 22px; margin: 0; text-align: center; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 16px; }
input { padding: 14px; border-radius: 12px; border: 1px solid #cfd6df; background: #fff; font-size: 18px; width: 100%; }
#login-btn { width: 100%; }

/* top bar */
header#top { position: sticky; top: 0; z-index: 5; background: #fff; display: flex; align-items: center; gap: 10px; padding: 12px 16px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
header#top strong { font-size: 17px; flex: 1; }
.who { font-size: 14px; color: #7b8794; }

main { padding: 12px; max-width: 900px; margin: 0 auto; }
.pg h2 { font-size: 22px; margin: 6px 4px 10px; }

/* orders: stacked blocks */
.block { background: #fff; border-radius: 16px; padding: 14px; margin-bottom: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.05); }
.block h2 { display: flex; justify-content: space-between; align-items: center; font-size: 21px; margin: 0 0 12px; }
.cnt { background: #e4e8ee; border-radius: 99px; padding: 2px 12px; font-size: 18px; }
.list { display: flex; flex-direction: column; gap: 10px; }
.ocard { border-left: 8px solid #999; background: #f8f9fb; border-radius: 12px; padding: 12px 14px; }
#l-new .ocard { border-color: #e03131; }
#l-cooking .ocard { border-color: #f08c00; }
#l-ready .ocard { border-color: #2f9e44; }
#l-served .ocard { border-color: #adb5bd; opacity: .75; }
.otop { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 16px; color: #495057; margin-bottom: 6px; }
.tno { font-weight: 800; color: #1b1f24; font-size: 19px; }
.age.late { color: #e03131; font-weight: 700; }
.oname { font-size: 22px; font-weight: 700; }
.onote { background: #fff4d6; color: #7a5a00; padding: 6px 10px; border-radius: 8px; margin-top: 6px; font-size: 16px; }
.big-btn { margin-top: 10px; width: 100%; background: #1c7ed6; color: #fff; padding: 14px; border-radius: 12px; font-size: 19px; font-weight: 700; }
.wait { margin-top: 8px; color: #7b8794; font-size: 15px; }

/* menu: big cards */
.chips { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { background: #fff; border: 1px solid #cfd6df; padding: 10px 16px; border-radius: 99px; white-space: nowrap; font-size: 17px; }
.chip.on { background: #1c7ed6; color: #fff; border-color: #1c7ed6; }
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-bottom: 14px; }
.mcard { background: #fff; border-radius: 16px; overflow: hidden; padding-bottom: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.05); display: flex; flex-direction: column; }
.mcard img { width: 100%; height: 170px; object-fit: cover; background: #e4e8ee; }
.mcard > div { padding: 0 12px; }
.mth { font-size: 21px; font-weight: 700; margin-top: 10px; }
.men { color: #7b8794; font-size: 16px; margin-top: 2px; }
.mpr { color: #1c7ed6; font-size: 22px; font-weight: 800; margin-top: 8px; }
.mst { color: #e03131; font-weight: 700; margin-top: 4px; }
.mcard.off { opacity: .55; }

/* search */
#p-search .big { margin-bottom: 14px; }
.row { display: flex; gap: 10px; margin-bottom: 14px; }
.row .big { flex: 1; }
#p-search .primary { flex-shrink: 0; }
#q-table-res h3 { font-size: 20px; margin: 10px 0; }
.srow { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid #eef1f5; font-size: 18px; }
.tag { font-size: 14px; padding: 3px 10px; border-radius: 99px; background: #e4e8ee; white-space: nowrap; }

/* bottom tabs */
nav#tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: #fff; display: flex; box-shadow: 0 -2px 10px rgba(0,0,0,.08); padding-bottom: env(safe-area-inset-bottom); }
nav#tabbar button { flex: 1; background: none; padding: 10px 4px 12px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 22px; color: #7b8794; }
nav#tabbar button span { font-size: 15px; font-weight: 600; }
nav#tabbar button.on { color: #1c7ed6; }

#toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: #333; color: #fff; padding: 12px 18px; border-radius: 99px; font-size: 16px; z-index: 30; max-width: 92%; text-align: center; }
