/* Base styles shared by all screens. Flat, neutral, system font – the venue's own colour is the only accent. */
:root {
  --brand: #1f3a5f;          /* overridden per venue (Admin → Settings) */
  --brand-ink: #ffffff;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --faint: #9a9a9a;
  --line: #e6e6e6;
  --fill: #f4f4f4;
  --bg: #ffffff;
  --surface: #ffffff;        /* buttons, inputs, sheets – follows the menu background on themed menus */
  --border: #d6d6d6;
  --cat: var(--text);        /* category titles on the guest menu */
  --font-display: var(--font);
  --green: #1e7d45;
  --green-bg: #e9f5ee;
  --red: #c0392b;
  --red-bg: #fbecea;
  --amber: #a15c00;
  --amber-bg: #fdf3e2;
  --blue-bg: #eaf1fb;
  --radius: 8px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  /* legacy aliases used by older markup */
  --ink: var(--text);
  --blue: var(--brand);
  --card: #ffffff;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; color: var(--text); background: var(--bg); line-height: 1.45;
  -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand); }
h1, h2, h3 { font-weight: 700; letter-spacing: -.01em; font-family: var(--font-display); }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.ic { flex: none; display: inline-block; vertical-align: -3px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border: 1px solid transparent;
  border-radius: var(--radius); padding: .65rem 1rem; font-weight: 600; background: var(--brand); color: var(--brand-ink);
  min-height: 44px; text-decoration: none; transition: filter .15s; }
.btn:hover { filter: brightness(.94); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn.secondary:hover { background: var(--fill); filter: none; }
.btn.ghost { background: transparent; color: var(--muted); border-color: transparent; }
.btn.danger { background: var(--surface); color: var(--red); border-color: #e6b3ad; }
.btn.danger:hover { background: var(--red-bg); filter: none; }
.btn.success { background: var(--green); color: #fff; }
.btn.block { width: 100%; }
.btn.sm { padding: .4rem .75rem; min-height: 36px; font-size: .88rem; }
.icon-btn { border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); min-width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem; padding: 0 .6rem; font-weight: 600; color: var(--text); }

/* Inputs */
.input, textarea.input, select.input { width: 100%; border: 1px solid var(--border); border-radius: var(--radius); padding: .65rem .8rem;
  background: var(--surface); outline: none; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
label.field { display: block; margin-bottom: .8rem; }
label.field > span { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .3rem; color: #333; }

/* Chips & badges */
.chip { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: .38rem .85rem; white-space: nowrap;
  font-size: .88rem; color: var(--text); }
.chip.active { background: var(--text); border-color: var(--text); color: var(--bg); }
.badge { display: inline-flex; align-items: center; gap: .25rem; border-radius: 4px; padding: .1rem .45rem; font-size: .75rem;
  font-weight: 600; background: var(--blue-bg); color: #24518a; }
.badge.green { background: var(--green-bg); color: var(--green); }
.badge.amber { background: var(--amber-bg); color: var(--amber); }
.badge.red { background: var(--red-bg); color: var(--red); }
.badge.gray { background: var(--fill); color: var(--muted); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }

/* Bottom sheet / modal */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .4); z-index: 50; display: flex; align-items: flex-end;
  justify-content: center; animation: fade .15s; }
.sheet { background: var(--surface); width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; border-radius: 12px 12px 0 0;
  padding: 1.25rem 1.1rem calc(1.1rem + env(safe-area-inset-bottom)); animation: up .2s ease-out; position: relative; }
.sheet::before { content: ''; position: absolute; top: 7px; left: 50%; transform: translateX(-50%); width: 36px; height: 4px;
  border-radius: 2px; background: #d9d9d9; }
@media (min-width: 700px) {
  .sheet-backdrop { align-items: center; }
  .sheet { border-radius: 12px; }
  .sheet::before { display: none; }
}
.sheet h2 { margin: .2rem 0 .8rem; font-size: 1.3rem; line-height: 1.25; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
@keyframes up { from { transform: translateY(24px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

/* Toast */
#toasts { position: fixed; left: 50%; top: 12px; transform: translateX(-50%); z-index: 100; display: grid; gap: .5rem;
  width: min(92vw, 420px); }
.toast { background: #1a1a1a; color: #fff; border-radius: var(--radius); padding: .75rem 1rem; font-weight: 500;
  animation: drop .2s ease-out; box-shadow: 0 4px 14px rgba(0, 0, 0, .15); }
.toast.err { background: var(--red); }
@keyframes drop { from { transform: translateY(-8px); opacity: 0; } }

/* Quantity stepper */
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.qty button { border: 0; background: transparent; width: 38px; height: 40px; display: grid; place-items: center; color: var(--text); }
.qty button:hover { background: var(--fill); }
.qty span { min-width: 26px; text-align: center; font-weight: 700; }

.empty { text-align: center; color: var(--muted); padding: 2.5rem 1rem; }
.empty .ic { color: #b5b5b5; }
.spinner { width: 26px; height: 26px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%;
  animation: spin .8s linear infinite; margin: 3rem auto; }
@keyframes spin { to { transform: rotate(360deg); } }
