/* GrubNmore Staff App — same design tokens as the Admin (docs/design-spec.md). Phone first, 44px+ tap targets. */
:root {
  --green: #003d29; --green-2: #00543a; --orange: #ff8a00; --orange-pale: #fff4e5; --text: #101828; --muted: #5c6470; --faint: #98a2b3;
  --border: #e8eaec; --border-strong: #d4d8dc; --bg: #f7f8f9; --success: #12805c; --danger: #d92d20; --wa: #25d366;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--text); background: var(--bg); font-size: 16px; line-height: 1.4; -webkit-font-smoothing: antialiased; padding-bottom: env(safe-area-inset-bottom); }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 8px 12px; padding-top: calc(8px + env(safe-area-inset-top)); background: var(--green); color: #fff; }
.bar h1 { font-size: 18px; margin: 0; flex: 1; }
.back { width: 44px; height: 44px; border: 0; background: transparent; color: #fff; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.sync { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.15); }
.sync.off { background: var(--orange); color: #3d1f00; }
main { padding: 14px 14px 40px; max-width: 560px; margin: 0 auto; }
.hello { margin: 4px 0 14px; color: var(--muted); }
.hello b { color: var(--text); font-size: 20px; display: block; }

/* Big home buttons */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { min-height: 104px; border-radius: 14px; border: 1px solid var(--border); background: #fff; padding: 14px; text-align: left; display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; }
.tile svg { width: 28px; height: 28px; color: var(--green); }
.tile b { font-size: 16px; }
.tile small { color: var(--muted); font-size: 13px; }
.tile.primary { background: var(--green); color: #fff; border-color: var(--green); grid-column: 1 / -1; min-height: 90px; flex-direction: row; align-items: center; gap: 14px; justify-content: flex-start; }
.tile.primary svg { color: var(--orange); }
.tile.primary small { color: #cfe3da; }
.card { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 14px; margin-bottom: 12px; }
.card h2 { font-size: 16px; margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.money { font-variant-numeric: tabular-nums; font-weight: 700; }

/* Buttons and form fields */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; border-radius: 12px; border: 1px solid transparent; font-weight: 700; font-size: 16px; cursor: pointer; text-decoration: none; padding: 10px 16px; }
.btn-primary { background: var(--green); color: #fff; }
.btn-secondary { background: #fff; border-color: var(--border-strong); color: var(--text); }
.btn-orange { background: var(--orange); color: #2b1600; }
.btn-wa { background: var(--wa); color: #fff; }
.btn-danger { background: #fff; color: var(--danger); border-color: var(--danger); }
.btn:disabled { opacity: .5; }
.btn + .btn { margin-top: 10px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 700; font-size: 14px; }
.field .hint { font-weight: 400; color: var(--faint); }
.field input, .field select, .field textarea { min-height: 52px; border: 1px solid var(--border-strong); border-radius: 12px; padding: 12px 14px; background: #fff; font-size: 17px; width: 100%; }
.field textarea { min-height: 80px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border-strong); background: #fff; font-weight: 600; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--green); color: #fff; border-color: var(--green); }
.err { background: #fee4e2; color: #8a1c13; border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }

/* Photo */
.photo-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 140px; border: 2px dashed var(--border-strong); border-radius: 14px; background: #fff; color: var(--green); font-weight: 700; cursor: pointer; text-align: center; padding: 12px; }
.photo-btn svg { width: 36px; height: 36px; }
.photo-prev { width: 100%; border-radius: 14px; display: block; margin-bottom: 8px; }
.photo-ok { color: var(--success); font-weight: 700; font-size: 14px; }

/* Orders board */
.group-title { font-size: 13px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 18px 4px 8px; }
.order { background: #fff; border: 1px solid var(--border); border-left: 5px solid var(--border-strong); border-radius: 14px; padding: 14px; margin-bottom: 10px; }
.order.s-pending, .order.s-confirmed { border-left-color: var(--orange); }
.order.s-preparing { border-left-color: #1e3a8a; }
.order.s-ready { border-left-color: var(--success); }
.order.s-out_for_delivery { border-left-color: #0369a1; }
.order .num { font-size: 18px; font-weight: 800; }
.order ul { margin: 8px 0; padding-left: 18px; }
.order li { margin: 2px 0; font-size: 16px; }
.tag { display: inline-block; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 700; background: #f1f2f4; color: var(--muted); }
.tag.warn { background: var(--orange-pale); color: #7a3d00; }
.tag.app { background: #e8eefc; color: #1e3a8a; }
.wait { background: var(--orange-pale); color: #7a3d00; border-radius: 10px; padding: 10px 12px; font-weight: 600; font-size: 14px; margin-top: 8px; }

/* Dish picker */
.dish { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.dish:last-child { border-bottom: 0; }
.step { display: inline-flex; align-items: center; gap: 4px; }
.step button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border-strong); background: #fff; font-size: 22px; font-weight: 700; }
.step span { min-width: 26px; text-align: center; font-weight: 800; }
.sticky-foot { position: sticky; bottom: 0; background: var(--bg); padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); }

/* Entries */
.entry { display: flex; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.entry:last-child { border-bottom: 0; }
.entry .e-main { flex: 1; min-width: 0; }
.entry .e-main b { display: block; }
.entry.void { opacity: .5; text-decoration: line-through; }
.undo { min-height: 40px; padding: 6px 12px; border-radius: 10px; border: 1px solid var(--danger); color: var(--danger); background: #fff; font-weight: 700; }

.login { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; }
.logo { width: 64px; height: 64px; border-radius: 16px; background: var(--green); color: var(--orange); font-weight: 900; font-size: 32px; display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: #101828; color: #fff; padding: 14px 18px; border-radius: 12px; z-index: 50; width: calc(100% - 28px); max-width: 520px; text-align: center; font-weight: 600; }
.toast.err { background: var(--danger); }

/* Sign-in: Show PIN button inside the PIN box */
.pinwrap { position: relative; }
.pinwrap input { padding-right: 76px; }
.pinshow { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); min-height: 40px; padding: 0 14px; border: none; border-radius: 10px; background: #EEF2EF; color: #003d29; font-weight: 700; font-size: 14px; cursor: pointer; }

/* Opening screen (before the app starts) */
.boot { min-height: 80vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; color: #4b5563; }
.boot-help { max-width: 320px; margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: #FFF7E6; color: #5c3d00; font-size: 15px; line-height: 1.45; }
