/* Local Food Delivery – restaurant & admin panel styles */
:root {
  --brand: #FEF505; --brand-d: #E9DF00; --brand-soft: #FFFCD6; --brand-ink: #1C1C1C; --brand-text: #8A6A00;
  --green: #1F8A3B; --green-soft: #E8F5EC; --red: #E43B4F; --red-soft: #FDECEE; --yellow-soft: #FFF7E0; --blue: #2563EB; --blue-soft: #EAF1FF;
  --ink: #1C1C1C; --text: #3D4152; --muted: #6B6E7B; --line: #E7E7EA; --bg: #F5F6F8; --card: #fff;
  --side: #15161A; --side-tx: #B9BAC3;
  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: var(--font); font-size: 14px; color: var(--text); background: var(--bg); line-height: 1.5; }
a { color: var(--brand-text); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { color: var(--ink); margin: 0 0 .5em; line-height: 1.25; }
h1 { font-size: 22px; } h2 { font-size: 17px; } h3 { font-size: 15px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); } .sm { font-size: 12.5px; }
.nowrap { white-space: nowrap; }

/* ---------- auth screens ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(900px 400px at 80% -10%, #FFF7A8, transparent 60%), linear-gradient(180deg, #FFFDE6, #F5F6F8); }
.auth-box { width: 100%; max-width: 440px; background: #fff; border-radius: 22px; padding: 28px 24px; box-shadow: 0 20px 60px rgba(0,0,0,.08); }
.auth-box.wide { max-width: 640px; }
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.auth-brand img { width: 60px; height: 60px; border-radius: 12px; object-fit: contain; background: var(--brand); border: 1px solid var(--line); }
.auth-brand b { font-size: 19px; font-style: italic; color: var(--ink); font-weight: 800; letter-spacing: -.02em; }
.auth-brand b span { color: var(--brand-text); }
.auth-brand small { display: block; color: var(--muted); font-size: 12px; }
.auth-switch { text-align: center; margin-top: 16px; font-size: 13.5px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 1fr; min-height: 100vh; }
.side { position: fixed; top: 0; right: auto; bottom: 0; left: 0; width: 250px; background: var(--side); color: var(--side-tx); display: flex; flex-direction: column; z-index: 60; transform: translateX(-100%); transition: transform .2s; }
.side.open { transform: none; box-shadow: 20px 0 60px rgba(0,0,0,.3); }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; color: #fff; }
.side-brand img { width: 52px; height: 52px; border-radius: 10px; object-fit: contain; background: var(--brand); }
.side-brand b { display: block; line-height: 1.15; font-style: italic; font-size: 15px; font-weight: 800; letter-spacing: -.02em; }
.side-brand b span { color: var(--brand); }
.side-brand small { display: block; font-size: 11px; color: var(--side-tx); font-weight: 500; }
.side nav { flex: 1; overflow: auto; padding: 6px 10px; }
.side nav a { display: flex; align-items: center; gap: 12px; color: var(--side-tx); padding: 10px 12px; border-radius: 10px; font-weight: 500; margin-bottom: 2px; position: relative; }
.side nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side nav a.on { background: var(--brand); color: var(--brand-ink); }
.side nav a .ic { width: 20px; text-align: center; font-size: 16px; }
.side nav a .cnt { margin-left: auto; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; border-radius: 10px; padding: 0 7px; min-width: 20px; text-align: center; }
.side-ft { padding: 14px; border-top: 1px solid rgba(255,255,255,.08); font-size: 12.5px; }
.side-ft a, .side-ft button { color: var(--side-tx); background: none; border: 0; padding: 6px 0; display: block; }
.side-ft a:hover, .side-ft button:hover { color: #fff; }
.backdrop { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0,0,0,.4); z-index: 55; }
.main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 40; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 10px 16px; min-height: 60px; }
.topbar h1 { margin: 0; font-size: 18px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.burger { border: 0; background: var(--bg); width: 40px; height: 40px; border-radius: 10px; font-size: 20px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.bell { position: relative; border: 0; background: var(--bg); width: 40px; height: 40px; border-radius: 10px; font-size: 18px; }
.bell .cnt { position: absolute; top: -4px; right: -4px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; border-radius: 10px; padding: 1px 6px; }
.content { padding: 18px 16px 40px; max-width: 1280px; }

/* ---------- open/close switch ---------- */
.store-sw { display: flex; align-items: center; gap: 8px; background: var(--bg); border-radius: 999px; padding: 5px 6px 5px 12px; font-weight: 600; font-size: 13px; }
.store-sw.on { background: var(--green-soft); color: var(--green); }
.store-sw.off { background: var(--red-soft); color: var(--red); }
.sw { position: relative; width: 42px; height: 24px; flex-shrink: 0; }
.sw input { opacity: 0; width: 0; height: 0; position: absolute; }
.sw span { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: #CFD0D6; border-radius: 24px; transition: .2s; cursor: pointer; }
.sw span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.sw input:checked + span { background: var(--green); }
.sw input:checked + span::after { transform: translateX(18px); }
.sw input:focus-visible + span { outline: 3px solid rgba(138, 106, 0, .55); }

/* ---------- cards / stats ---------- */
.card { background: var(--card); border-radius: 16px; border: 1px solid var(--line); padding: 18px; }
.card + .card { margin-top: 16px; }
.card-hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card-hd h2 { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; position: relative; overflow: hidden; }
.stat small { color: var(--muted); font-size: 12px; font-weight: 500; display: block; }
.stat b { display: block; font-size: 22px; color: var(--ink); font-weight: 700; margin-top: 2px; letter-spacing: -.01em; }
.stat .ic { position: absolute; right: 12px; top: 12px; font-size: 22px; opacity: .9; }
.stat.hl { background: linear-gradient(135deg, var(--brand), #FFE94D); border: 0; }
.stat.hl small, .stat.hl b { color: var(--brand-ink); }
.grid2 { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
/* grid children may shrink below their content (wide tables scroll inside .tbl-wrap instead of stretching the page) */
.grid2 > *, .stats > *, .form-grid > * { min-width: 0; }
.chart-box { position: relative; height: 260px; }

/* ---------- buttons / forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; border-radius: 10px; padding: 9px 16px; font-weight: 600; font-size: 13.5px; background: var(--brand); color: var(--brand-ink); white-space: nowrap; transition: background .15s; }
.btn:hover { background: var(--brand-d); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-sec { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-sec:hover { background: var(--bg); }
.btn-green { background: var(--green); color: #fff; } .btn-green:hover { background: #17702F; }
.btn-red { background: var(--red); color: #fff; } .btn-red:hover { background: #c22a3d; }
.btn-ghost-red { background: #fff; color: var(--red); border-color: #F5C2C9; } .btn-ghost-red:hover { background: var(--red-soft); }
.btn-wa { background: #25D366; color: #fff; } .btn-wa:hover { background: #1ebe5b; }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.link { background: none; border: 0; color: var(--brand-text); font-weight: 600; padding: 0; }
.form { display: grid; gap: 14px; }
.form-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
.field { display: grid; gap: 5px; font-size: 13px; font-weight: 600; color: var(--ink); align-content: start; }
.field small { font-weight: 400; color: var(--muted); }
.field.full { grid-column: 1 / -1; }
.input, .field input:not([type=checkbox]):not([type=radio]):not([type=file]), .field select, .field textarea {
  width: 100%; border: 1px solid #D6D7DC; border-radius: 10px; padding: 10px 12px; font-size: 14px; background: #fff; outline: 0; font-weight: 400; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand-text); box-shadow: 0 0 0 3px rgba(233, 223, 0, .35); }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 13.5px; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--brand); }
.err { background: var(--red-soft); color: #A3162A; border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.ok { background: var(--green-soft); color: var(--green); border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.note { background: var(--yellow-soft); color: #7A5200; border-radius: 12px; padding: 12px 14px; font-size: 13px; margin-bottom: 16px; border: 1px solid #FFE3A3; }
.img-field { display: flex; gap: 12px; align-items: center; }
.img-prev { width: 76px; height: 76px; border-radius: 12px; background: var(--bg) center/cover no-repeat; border: 1px dashed #C9CAD0; display: flex; align-items: center; justify-content: center; font-size: 26px; flex-shrink: 0; }
.img-prev.wide { width: 140px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.toolbar .input { width: auto; flex: 1 1 200px; padding: 9px 12px; }
.toolbar select.input { flex: 0 1 180px; }
.seg { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; overflow-x: auto; max-width: 100%; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 8px; font-weight: 600; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.seg button.on { background: var(--ink); color: #fff; }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-weight: 600; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 11px 14px; background: #FAFAFB; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr:hover td { background: #FCFCFD; }
.tbl .thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: var(--brand-soft); display: inline-flex; align-items: center; justify-content: center; font-size: 22px; }
.tbl b { color: var(--ink); font-weight: 600; }
.empty-row { text-align: center; color: var(--muted); padding: 30px !important; }

/* Phones: every table row becomes a card (column title above each value, action buttons wrap) –
   no sideways scrolling to reach Edit / status / delete. Cells get data-label from panel-common.js. */
@media (max-width: 1199px) {
  .tbl-wrap { overflow: visible; border: 0; border-radius: 0; background: none; }
  table.tbl { display: block; width: 100%; }
  /* one card per row on phones, 2–3 side by side where there is room (tablets, small laptops) */
  .tbl tbody { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 10px; width: 100%; }
  .tbl tbody > tr:only-child { grid-column: 1 / -1; }
  .tbl thead { display: none; }
  .tbl tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 6px 14px; margin-bottom: 0; align-content: start; }
  .tbl tr:hover td { background: none; }
  .tbl td { display: block; min-width: 0; padding: 7px 0; border-bottom: 0; overflow-wrap: anywhere; }
  .tbl td:first-child, .tbl td:nth-child(2), .tbl td[data-label=""], .tbl td.nowrap, .tbl td[colspan] { grid-column: 1 / -1; }
  .tbl td.nowrap { white-space: normal; display: flex; flex-wrap: wrap; gap: 6px; border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 2px; }
  .tbl td::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: 10.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
  .tbl td[data-label=""]::before, .tbl td:not([data-label])::before, .tbl td.nowrap::before { content: none; }
  .tbl td select.input { width: 100%; }
  .tbl .thumb { width: 40px; height: 40px; }
}
@media (max-width: 699px) {
  /* filters: full-width rows, date pickers side by side */
  .toolbar > .input, .toolbar > select.input, .toolbar > .btn { flex: 1 1 100%; }
  .toolbar > input[type="date"].input { flex: 1 1 calc(50% - 4px) !important; min-width: 0; }
  .toolbar > .btn.btn-sec { flex: 1 1 calc(50% - 4px); }
}


/* ---------- pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.p-placed { background: var(--brand-soft); color: var(--brand-text); }
.p-confirmed, .p-in_progress { background: var(--blue-soft); color: var(--blue); }
.p-preparing { background: #F3E8FF; color: #7E22CE; }
.p-out_for_delivery { background: #E0F7FA; color: #00838F; }
.p-delivered, .p-approved, .p-resolved, .p-visible, .p-active { background: var(--green-soft); color: var(--green); }
.p-cancelled, .p-rejected, .p-blocked, .p-hidden, .p-inactive { background: var(--red-soft); color: var(--red); }
.p-pending, .p-open { background: var(--yellow-soft); color: #946200; }
.p-closed { background: #EEE; color: #555; }
.fi { width: 14px; height: 14px; border: 1.5px solid var(--green); border-radius: 3px; display: inline-flex; align-items: center; justify-content: center; vertical-align: -2px; }
.fi::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.fi-nonveg { border-color: #B5371F; } .fi-nonveg::after { background: #B5371F; }
.fi-egg { border-color: #D4A20C; } .fi-egg::after { background: #D4A20C; }
.radios { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-pill { position: relative; cursor: pointer; }
.radio-pill input { position: absolute; opacity: 0; pointer-events: none; }
.radio-pill span { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border: 1.5px solid var(--line); border-radius: 10px; font-weight: 600; font-size: 14px; background: #fff; }
.radio-pill span::before { content: ''; width: 16px; height: 16px; border: 2px solid #C9CBD2; border-radius: 4px; flex-shrink: 0; }
.radio-pill input:checked + span::before { content: '✓'; color: #fff; font-size: 12px; line-height: 12px; text-align: center; border-color: currentColor; background: currentColor; }
.radio-pill input:checked + span::before { color: inherit; }
.rp-veg input:checked + span { border-color: var(--green); background: #EEF8F1; color: #17702F; }
.rp-nonveg input:checked + span { border-color: #B5371F; background: #FCEFEC; color: #B5371F; }
.rp-egg input:checked + span { border-color: #D4A20C; background: #FFF8E3; color: #8A6A00; }
.rp-veg input:checked + span::before, .rp-nonveg input:checked + span::before, .rp-egg input:checked + span::before { content: '✓'; color: #fff; background: currentColor; }
.radio-pill input:focus-visible + span { outline: 3px solid rgba(138, 106, 0, .55); outline-offset: 2px; }
.auto-tag { font-weight: 500; color: var(--muted); font-size: 12px; }

/* ---------- order cards ---------- */
.orders { display: grid; gap: 14px; }
.ocard { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.ocard.new { border-color: var(--brand-text); box-shadow: 0 0 0 3px rgba(233, 223, 0, .45); }
.ocard-hd { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: flex-start; }
.ocard-hd b { font-size: 15px; color: var(--ink); }
.ocard-items { margin: 12px 0; padding: 10px 12px; background: var(--bg); border-radius: 10px; font-size: 13.5px; }
.ocard-items div { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; }
.ocard-meta { font-size: 13px; display: grid; gap: 3px; }
.ocard-ft { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px dashed var(--line); padding-top: 12px; margin-top: 12px; }
.total { font-size: 16px; font-weight: 700; color: var(--ink); }

/* ---------- menu manager ---------- */
.mc-list { display: grid; gap: 8px; }
.mc-row { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.mc-row b { flex: 1; color: var(--ink); }
.item-row { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.item-row:last-child { border-bottom: 0; }
.item-row .thumb { width: 54px; height: 54px; border-radius: 12px; object-fit: cover; background: var(--brand-soft); display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0; }
.item-row .nm { flex: 1; min-width: 0; }
.item-row .nm b { color: var(--ink); display: block; }
.item-row .nm small { color: var(--muted); }
.item-row.na { opacity: .6; }
.group-hd { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin: 18px 0 2px; }

/* ---------- reviews / notifications / list ---------- */
.list-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.stars { color: #F5B400; letter-spacing: 1px; }
.reply { background: var(--bg); border-radius: 10px; padding: 8px 12px; margin-top: 8px; font-size: 13px; }
.bars { display: grid; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 130px 1fr 60px; gap: 10px; align-items: center; font-size: 13px; }
.bar { height: 10px; background: var(--bg); border-radius: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--brand-d); border-radius: 6px; }

/* ---------- modal / toast ---------- */
.modal { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(15,15,16,.5); z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.modal-box { background: #fff; width: 100%; max-width: 640px; max-height: 94vh; border-radius: 20px 20px 0 0; display: flex; flex-direction: column; }
.modal-hd { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal-hd h2 { margin: 0; }
.modal-bd { padding: 18px; overflow: auto; }
.modal-ft { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }
.x { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--bg); font-size: 22px; line-height: 1; }
.geo-search { position: relative; margin-top: 6px; }
.geo-search input { width: 100%; }
.geo-results { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 1200; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px rgba(0,0,0,.16); max-height: 280px; overflow: auto; }
.geo-results button { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 10px 14px; cursor: pointer; font: inherit; }
.geo-results button:hover, .geo-results button:focus { background: #F8F8F9; }
.geo-results b { display: block; font-size: 14px; color: var(--ink); }
.geo-results small, .geo-msg { display: block; font-size: 12.5px; color: var(--muted); font-weight: 400; }
.geo-msg { padding: 12px 14px; }
.geo-addr { justify-self: start; margin: 6px 0 2px; font-size: 13px; }
.map-pick { height: 260px; border-radius: 12px; border: 1px solid var(--line); position: relative; overflow: hidden; }
.map-pick .pin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -100%); z-index: 500; font-size: 34px; pointer-events: none; line-height: 1; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 12px; z-index: 300; opacity: 0; transition: .25s; pointer-events: none; font-weight: 500; max-width: 92vw; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.alert-pop { position: fixed; top: 16px; right: 16px; z-index: 300; background: #fff; border-left: 5px solid var(--brand-d); border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.2); padding: 14px 16px; width: min(340px, 92vw); animation: drop .3s; }
@keyframes drop { from { transform: translateY(-20px); opacity: 0; } }
.alert-pop b { display: block; color: var(--ink); font-size: 15px; }
.loading { padding: 50px 0; text-align: center; color: var(--muted); }
.spinner { width: 22px; height: 22px; border: 3px solid var(--brand-soft); border-top-color: var(--brand-text); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; vertical-align: middle; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 700px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .modal { align-items: center; padding: 20px; }
  .modal-box { border-radius: 20px; }
  .content { padding: 24px; }
}
@media (min-width: 1000px) {
  .shell { grid-template-columns: 250px 1fr; }
  .side { position: sticky; top: 0; height: 100vh; transform: none; }
  .burger, .backdrop { display: none !important; }
  .grid2 { grid-template-columns: 1.6fr 1fr; }
  .grid2.even { grid-template-columns: 1fr 1fr; }
}
@media print {
  .side, .topbar, .btn, .toolbar, .seg { display: none !important; }
  body { background: #fff; }
}

/* Phones (kept at the end so it overrides the base rules above) */
@media (max-width: 699px) {
  /* dish rows: photo + name on top, switch & buttons on the line below */
  .item-row { flex-wrap: wrap; row-gap: 8px; }
  .item-row .nm { flex: 1 1 calc(100% - 70px); }
  .item-row > .sw { margin-left: 66px; margin-right: auto; }
  .mc-row { flex-wrap: wrap; }
  .mc-row b { flex: 1 1 60%; }
  /* iPhone zooms the page when a field's text is smaller than 16px */
  input, select, textarea, .input { font-size: 16px !important; }
  /* popup forms fit the visible screen even with the browser address bar showing */
  .modal-box { max-height: 92vh; max-height: 92dvh; }
}

/* Tablets & laptops: action buttons may wrap to 2 lines so wide tables (restaurants) fit without sideways scrolling */
@media (min-width: 1200px) {
  .tbl td.nowrap { white-space: normal; min-width: 150px; }
  .tbl td.nowrap .btn { margin: 2px 0; }
}
@media (min-width: 1200px) and (max-width: 1399px) {
  .tbl th, .tbl td { padding-left: 10px; padding-right: 10px; }
}
