/* Pac-Rite customer portal — same brand as pacrite.ca (site/assets/css/style.css):
   royal blue #1D419A, navy #103352→#1E5A8A, grey #F2F2F2, ink #111417.
   Mobile first: chefs order from a phone in the kitchen. */

:root {
  --blue: #1D419A;
  --blue-dark: #15306f;
  --navy-1: #103352;
  --navy-2: #1E5A8A;
  --grey: #F2F2F2;
  --line: #dfe3e8;
  --ink: #111417;
  --body: #3d434a;
  --muted: #69717b;
  --ok: #1d7a3e;
  --ok-bg: #e7f5ec;
  --warn: #8a5a00;
  --warn-bg: #fff4dc;
  --err: #b42318;
  --err-bg: #fdecea;
  --radius: 4px;
  --tap: 48px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
/* No sideways sway on phones (Kevin, 2026-10-27): quick taps on + / − never
   double-tap-zoom the page (pinch zoom still works), and a swipe that runs off
   the end of the date strip never drags the whole page left or right. */
html { -webkit-text-size-adjust: 100%; touch-action: manipulation; overflow-x: hidden; overscroll-behavior-x: none; }
@supports (overflow: clip) { html { overflow-x: clip; } }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--ink); background: var(--grey); line-height: 1.5; font-size: 16px;
  min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden;
}
@supports (overflow: clip) { body { overflow-x: clip; } }
#app { flex: 1; display: flex; flex-direction: column; }
img { max-width: 100%; display: block; }
a { color: var(--blue); }
a:hover { color: var(--blue-dark); }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #7aa2ff; outline-offset: 2px; }
.wrap { width: 100%; max-width: 980px; margin: 0 auto; padding: 0 16px; }
.main { flex: 1; padding-top: 20px; padding-bottom: 32px; }
.main.narrow { max-width: 480px; }
.boot { min-height: 60vh; display: flex; align-items: center; justify-content: center; opacity: .6; }
.noscript { padding: 24px; text-align: center; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.strong { font-weight: 700; }
.break { overflow-wrap: anywhere; }
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ---------- header ---------- */
.top { background: #fff; border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.brand img { width: 108px; height: auto; }
.top-mid { flex: 1; min-width: 0; }
.cust { display: block; font-weight: 600; font-size: .9rem; color: var(--body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Way back to the public site (same host: / = pacrite.ca) */
.site-back { flex-shrink: 0; display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--grey); color: var(--blue); font-weight: 700; font-size: .85rem; text-decoration: none; white-space: nowrap; }
.site-back:hover { background: var(--line); }
.langs { display: flex; gap: 2px; background: var(--grey); border-radius: 999px; padding: 3px; flex-shrink: 0; }
.lang { border: 0; background: transparent; border-radius: 999px; min-width: 38px; height: 34px; font-size: .78rem; font-weight: 700; letter-spacing: .04em; cursor: pointer; color: var(--body); }
.lang.on { background: var(--blue); color: #fff; }
.tabs { background: #fff; border-bottom: 1px solid var(--line); }
.tabs-in { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs-in::-webkit-scrollbar { display: none; }
.tab { display: flex; align-items: center; gap: 6px; padding: 0 12px; min-height: 48px; white-space: nowrap; text-decoration: none; color: var(--ink);
  font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; border-bottom: 3px solid transparent; }
.tab:hover { color: var(--blue); }
.tab.on { color: var(--blue); border-bottom-color: var(--blue); }
.accent { height: 5px; background: var(--blue); }

/* ---------- footer ---------- */
.foot { background: var(--navy-1); background: linear-gradient(90deg, var(--navy-1), var(--navy-2)); color: #dfe7f1; padding: 22px 0; font-size: .9rem; }
.foot a { color: #fff; }
.foot .muted { color: #b8c6d8; margin-top: 4px; }
body.has-bar .foot { padding-bottom: 130px; }

/* ---------- type + blocks ---------- */
h1 { font-size: 1.6rem; line-height: 1.2; font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; line-height: 1.3; font-weight: 700; }
.lead { color: var(--body); margin-top: 6px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 16px; margin-bottom: 18px; }
.page-head h1 { flex: 1 1 auto; }
.page-head .lead { flex-basis: 100%; }
.block { margin-bottom: 22px; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.block-title { font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--body); margin-bottom: 10px; }
.block-head .block-title { margin-bottom: 0; }
.hint { color: var(--muted); font-size: .875rem; margin-top: 6px; }
.card { background: #fff; border-radius: var(--radius); padding: 18px; box-shadow: 0 1px 2px rgba(16, 51, 82, .08); margin-bottom: 14px; }
.card h2 { margin-bottom: 12px; }
.cards { display: grid; gap: 12px; }
.cards .card { margin-bottom: 0; }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.k { color: var(--muted); font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.date { font-weight: 700; font-size: 1.08rem; }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.kv:last-child { border-bottom: 0; }
.kv .k { padding-top: 2px; }
.kv span:last-child { text-align: right; min-width: 0; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 10px 20px; border-radius: var(--radius);
  border: 2px solid transparent; font-weight: 700; font-size: .95rem; text-decoration: none; cursor: pointer; text-align: center; line-height: 1.2; }
.btn.small { min-height: 40px; padding: 6px 14px; font-size: .875rem; }
.btn.block { width: 100%; }
.btn.primary { background: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-dark); color: #fff; }
.btn.ghost { background: #fff; color: var(--blue); border-color: #c7d2ea; }
.btn.ghost:hover { border-color: var(--blue); }
.btn.danger { background: var(--err); color: #fff; }
.btn.repeat { background: #c8102e; color: #fff; font-weight: 700; }
.btn.repeat:hover { background: #a00d25; color: #fff; }
.btn.danger-ghost { background: #fff; color: var(--err); border-color: #f1c4bf; }
.btn:disabled { background: #c9ced6; border-color: #c9ced6; color: #fff; cursor: not-allowed; }
.btn.busy { opacity: .7; cursor: progress; }

/* ---------- forms ---------- */
.field { margin-bottom: 16px; }
.field label, .field .label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .95rem; }
input[type=text], input[type=email], input[type=password], input[type=search], textarea {
  width: 100%; min-height: var(--tap); padding: 10px 14px; border: 1.5px solid #c4cad2; border-radius: var(--radius); background: #fff; font-size: 1rem; }
textarea { resize: vertical; min-height: 88px; }
input:focus, textarea:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(29, 65, 154, .18); }
.readonly { min-height: var(--tap); padding: 12px 14px; border-radius: var(--radius); background: var(--grey); overflow-wrap: anywhere; }
.pw { position: relative; }
.pw input { padding-right: 84px; }
.reveal { position: absolute; right: 4px; top: 4px; bottom: 4px; min-width: 72px; border: 0; background: transparent; color: var(--blue); font-weight: 600; font-size: .875rem; cursor: pointer; border-radius: 8px; }

/* ---------- messages ---------- */
.banner { border-radius: var(--radius); padding: 12px 14px; margin: 0 0 14px; font-weight: 500; }
.banner.err { background: var(--err-bg); color: var(--err); }
.banner.ok { background: var(--ok-bg); color: var(--ok); }
.banner.warn { background: var(--warn-bg); color: var(--warn); }
.notice { background: #fff; border-radius: var(--radius); padding: 28px 20px; text-align: center; box-shadow: 0 1px 2px rgba(16, 51, 82, .08); }
.notice h2 { font-size: 1.25rem; margin-bottom: 8px; }
.notice p { color: var(--body); max-width: 460px; margin: 0 auto; }
.notice .row-actions { justify-content: center; margin-top: 18px; }
.notice.ok { background: var(--ok-bg); text-align: left; }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); padding: 60px 0; }
.spin { width: 20px; height: 20px; border: 3px solid #cfd6e3; border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 18px;
  border-radius: 10px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
body.has-bar .toast { bottom: 120px; }

/* ---------- sign-in ---------- */
.auth { padding-top: 8px; }
.auth-card { padding: 24px 20px; }
.auth-card h1 { margin-bottom: 4px; }
.auth-card .lead { margin-bottom: 20px; }
.auth-card form .btn.block { margin-top: 4px; }
.auth-card p.small { margin-top: 16px; }
.auth-foot { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--body); font-size: .95rem; }
.auth-foot .btn { margin-top: 10px; width: 100%; }

/* ---------- order page ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: thin; overscroll-behavior-x: contain; }
.chip { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; min-height: 56px; padding: 8px 14px;
  border-radius: var(--radius); border: 2px solid #c7d2ea; background: #fff; cursor: pointer; text-align: left; }
.chip-day { font-weight: 700; white-space: nowrap; }
.chip-tag { font-size: .72rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.chip.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.chip.on .chip-tag { color: #dbe4ff; }
.quick { display: flex; gap: 8px; flex-wrap: wrap; }
.search { margin-bottom: 10px; }
.items { list-style: none; background: #fff; border-radius: var(--radius); box-shadow: 0 1px 2px rgba(16, 51, 82, .08); overflow: hidden; }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.item.picked { background: #f1f5ff; box-shadow: inset 4px 0 0 var(--blue); }
.item-text { flex: 1; min-width: 0; }
.item-name { font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.item-meta { color: var(--muted); font-size: .85rem; display: flex; flex-wrap: wrap; gap: 2px 10px; margin-top: 2px; }
.usual { color: var(--navy-2); }
.empty-row { padding: 18px; color: var(--muted); text-align: center; }
.stepper { display: flex; align-items: center; flex-shrink: 0; }
.step { width: 48px; height: 48px; border-radius: var(--radius); border: 2px solid #c7d2ea; background: #fff; color: var(--blue); font-size: 1.5rem; font-weight: 700; line-height: 1; cursor: pointer; }
.step:active { background: #e6edff; }
.step:disabled { color: #c3c9d2; border-color: #e3e7ec; cursor: default; }
.qty { width: 52px !important; min-height: 48px !important; margin: 0 6px; padding: 0 !important; text-align: center; font-weight: 800; font-size: 1.15rem !important; }
.edit-extra { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; margin-bottom: 20px; }

.orderbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #fff; border-top: 1px solid var(--line);
  box-shadow: 0 -4px 18px rgba(16, 51, 82, .12); padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); }
.bar-in { display: flex; align-items: center; gap: 12px; }
.bar-sum { flex: 1; min-width: 0; }
.bar-kg { font-weight: 800; font-size: 1.1rem; }
.bar-sub { color: var(--muted); font-size: .8rem; }
.place { min-width: 150px; max-width: 58%; min-height: 52px; font-size: 1rem; }
.bar-meter { height: 4px; background: #e6eaf0; margin: 8px 16px 0; border-radius: 4px; overflow: hidden; max-width: 948px; }
@media (min-width: 980px) { .bar-meter { margin-left: auto; margin-right: auto; } }
.bar-meter span { display: block; height: 100%; background: var(--c-gold, #dfa51f); }
.orderbar .banner { margin: 8px 0 0; }

.done { text-align: center; padding: 28px 20px; }
.done .lead { font-size: 1.1rem; font-weight: 600; color: var(--ink); margin: 8px 0 12px; }
.done .row-actions { justify-content: center; }
.done .mini-lines { display: inline-block; text-align: left; margin: 4px 0 8px; }
.check { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); font-size: 2rem; font-weight: 800; display: flex; align-items: center; justify-content: center; }

/* ---------- orders / standing / invoices ---------- */
.mini-lines { list-style: none; margin: 4px 0 8px; }
.mini-lines li { padding: 3px 0; overflow-wrap: anywhere; }
.mini-lines .n { display: inline-block; min-width: 2ch; font-weight: 800; text-align: right; }
.badge { display: inline-block; padding: 4px 10px; border-radius: 2px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.st-pending .badge, .badge.st-pending { background: var(--warn-bg); color: var(--warn); }
.badge.st-approved, .badge.st-paid { background: var(--ok-bg); color: var(--ok); }
.badge.st-rejected { background: var(--err-bg); color: var(--err); }
.badge.st-cancelled, .badge.st-credit { background: #eceff3; color: var(--body); }
.badge.st-open { background: var(--warn-bg); color: var(--warn); }
.card.order.st-cancelled { opacity: .75; }
.reason { color: var(--err); font-weight: 600; }
.note { white-space: pre-wrap; overflow-wrap: anywhere; }
.card.order p { margin-top: 4px; }

.standing.off { background: #fafbfc; }
.standing.off .mini-lines { color: var(--muted); }
.state { font-size: .875rem; font-weight: 600; margin-top: 2px; }
.state.is-on { color: var(--ok); }
.state.is-off { color: var(--muted); }
.switch-wrap { display: inline-flex; padding: 4px; cursor: pointer; }
.switch { position: relative; width: 64px; height: 36px; border-radius: 999px; border: 0; background: #c9ced6; cursor: pointer; transition: background .15s; flex-shrink: 0; }
.switch .knob { position: absolute; top: 4px; left: 4px; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: left .15s; }
.switch.on { background: var(--ok); }
.switch.on .knob { left: 32px; }
.switch:disabled { opacity: .6; }
.lock { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: #eceff3; color: var(--body); flex-shrink: 0; }
.locked-note { color: var(--warn); background: var(--warn-bg); border-radius: var(--radius); padding: 10px 12px; font-weight: 600; font-size: .92rem; }

.balance { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.bal-box { background: #fff; border-radius: var(--radius); padding: 14px 16px; box-shadow: 0 1px 2px rgba(16, 51, 82, .08); min-width: 0; }
.bal-box .v { font-size: 1.35rem; font-weight: 800; margin-top: 2px; overflow-wrap: anywhere; }
.bal-box.due { background: var(--err-bg); }
.bal-box.due .v { color: var(--err); }
.inv-list { list-style: none; background: #fff; border-radius: var(--radius); box-shadow: 0 1px 2px rgba(16, 51, 82, .08); overflow: hidden; }
.inv { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "main amt" "pdf pdf"; gap: 6px 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); align-items: center; }
.inv:last-child { border-bottom: 0; }
.inv-main { grid-area: main; min-width: 0; }
.inv-no { font-weight: 700; overflow-wrap: anywhere; }
.inv-amt { grid-area: amt; text-align: right; }
.amt { font-weight: 700; white-space: nowrap; }
.inv-amt .badge { margin-top: 4px; }
.inv-pdf { grid-area: pdf; }

.lang-big { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- confirm window ---------- */
.modal { position: fixed; inset: 0; background: rgba(17, 20, 23, .45); display: flex; align-items: flex-end; justify-content: center; z-index: 80; padding: 16px; }
.modal-card { background: #fff; border-radius: var(--radius); padding: 22px 20px; width: 100%; max-width: 440px; box-shadow: 0 10px 40px rgba(0, 0, 0, .25); }
.modal-card p { color: var(--body); margin-top: 8px; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.modal-actions .btn { flex: 1; }

/* ---------- phones: customer name above the title, menu as five equal tabs ---------- */
.eyebrow { font-size: .8rem; font-weight: 700; color: var(--navy-2); margin-bottom: 4px; overflow-wrap: anywhere; }
@media (max-width: 699px) {
  .top-mid .cust { display: none; }
  .tabs-in { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; padding: 0 4px; overflow: visible; }
  .tab { flex-direction: column; justify-content: center; gap: 2px; padding: 6px 2px 4px; min-height: 56px; text-transform: none;
    letter-spacing: 0; font-size: .7rem; line-height: 1.15; text-align: center; white-space: normal; overflow-wrap: anywhere; }
}
@media (min-width: 700px) { .eyebrow { display: none; } }

/* ---------- wider screens ---------- */
@media (min-width: 700px) {
  .main { padding-top: 32px; }
  h1 { font-size: 2rem; }
  .brand img { width: 140px; }
  .top-in { min-height: 76px; }
  .cust { font-size: 1rem; }
  .tab { padding: 0 16px; }
  .cards { grid-template-columns: 1fr 1fr; }
  .inv { grid-template-columns: 1fr auto auto; grid-template-areas: "main amt pdf"; }
  .inv-pdf { text-align: right; min-width: 92px; }
  .modal { align-items: center; }
  .lang-big { grid-template-columns: repeat(4, 1fr); }
  .auth { padding-top: 24px; }
  .auth-card { padding: 32px 30px; }
}

/* ---------- tiles (2026-10-25): square photo tiles, square date tiles, tile grids ---------- */
.chip { width: 84px; min-height: 92px; align-items: center; text-align: center; padding: 8px 6px; gap: 0; }
.chip-wd { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.chip-num { font-size: 1.7rem; font-weight: 800; line-height: 1.1; }
.chip-mon { font-size: .82rem; font-weight: 600; color: var(--body); text-transform: capitalize; }
.chip .chip-tag { margin-top: 2px; font-size: .62rem; }
.chip.on .chip-wd, .chip.on .chip-mon { color: #dbe4ff; }

.items.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; background: transparent; box-shadow: none; overflow: visible; }
.item.tile { flex-direction: column; align-items: stretch; gap: 0; padding: 0; border: 2px solid transparent; border-bottom: 2px solid transparent; background: #fff;
  border-radius: var(--radius); box-shadow: 0 1px 2px rgba(16, 51, 82, .1); overflow: hidden; }
.item.tile.picked { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 1px var(--blue); }
.tile-photo { position: relative; aspect-ratio: 1 / 1; background: #e9edf2; overflow: hidden; }
.tile-photo img { width: 100%; height: 100%; object-fit: cover; }
.tile-photo.no-photo, .mini-photo.no-photo { background: linear-gradient(135deg, var(--navy-1), var(--navy-2)); display: flex; align-items: center; justify-content: center; }
.tile-photo.no-photo .ph-logo { width: 62%; height: auto; object-fit: contain; opacity: .9; }
.tag { position: absolute; left: 8px; top: 8px; padding: 3px 8px; font-size: .7rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; border-radius: 2px; }
.tag.frozen { background: #e3f0ff; color: #0b4a8f; }
/* Frozen items: the product photo under a cold, frosted finish */
.frost img { filter: saturate(.55) brightness(1.08) contrast(.92); }
.frost::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 20% 15%, rgba(255,255,255,.55), transparent 55%),
    radial-gradient(ellipse at 85% 90%, rgba(255,255,255,.45), transparent 50%),
    linear-gradient(160deg, rgba(190,222,255,.42), rgba(120,170,230,.30));
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.55), inset 0 0 28px rgba(200,230,255,.9); }
.mini-photo.frost { position: relative; }
.tile-photo .tag { z-index: 1; }

.tile-count { position: absolute; right: 8px; top: 8px; min-width: 36px; height: 36px; padding: 0 8px; display: none; align-items: center; justify-content: center;
  background: var(--blue); color: #fff; font-weight: 800; font-size: 1.1rem; border-radius: 2px; }
.item.tile.picked .tile-count { display: flex; }
.item.tile .item-text { padding: 10px 12px 6px; flex: 1; }
.item.tile .item-name { font-size: .98rem; }
.item.tile .item-meta { flex-direction: column; gap: 0; }
.item.tile .code { font-size: .78rem; color: #8a929c; }
.item.tile .usual { font-size: .82rem; font-weight: 600; margin-top: 2px; }
.item.tile .stepper { padding: 6px 10px 10px; justify-content: space-between; }
.item.tile .step { width: 44px; height: 44px; }
.item.tile .qty { flex: 1; width: auto !important; min-width: 0; margin: 0 6px; min-height: 44px !important; }
.items.tiles .empty-row { grid-column: 1 / -1; background: #fff; }

.mini-lines .pline { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.mini-photo { width: 44px; height: 44px; flex-shrink: 0; border-radius: 2px; overflow: hidden; background: #e9edf2; }
.mini-photo img { width: 100%; height: 100%; object-fit: cover; }
.mini-photo.no-photo .ph-logo { width: 80%; height: auto; }
.pl-text { min-width: 0; overflow-wrap: anywhere; }
.card { border-radius: var(--radius); }

.inv-list { display: grid; grid-template-columns: 1fr; gap: 8px; background: transparent; box-shadow: none; overflow: visible; }
.inv { background: #fff; border-radius: var(--radius); border-bottom: 0; border-left: 4px solid var(--line);
  box-shadow: 0 1px 2px rgba(16, 51, 82, .1); padding: 14px 16px; }
.inv.is-open { border-left-color: var(--err); }
.inv.is-paid { border-left-color: var(--ok); }
.inv-amt .amt { font-size: 1.1rem; }

@media (min-width: 700px) {
  .items.tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .items.tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .chip { width: 92px; }
}
.pline .n { min-width: 0; }
.more { display: flex; justify-content: center; margin-top: 16px; }

/* ---------- phone first (2026-10-26): chefs order from an iPhone after the shift ----------
   Slim header with a native language picker, an app-style tab bar at the bottom (thumb reach),
   compact product rows instead of square tiles, one-line invoice rows. Wider screens keep the
   tiles and the top menu. */
button, a, input, select, label { -webkit-tap-highlight-color: transparent; }
button, .btn, .step, .tab, .chip { touch-action: manipulation; }
.lang-pick-wrap { display: none; }

@media (max-width: 699px) {
  body { font-size: 16px; }
  .top-in { min-height: 54px; gap: 10px; }
  .brand img { width: 92px; }
  .langs { display: none; }
  .site-back { padding: 0 12px; }
  .lang-pick-wrap { display: inline-flex; position: relative; align-items: center; justify-content: center; height: 36px; min-width: 52px; padding: 0 22px 0 12px;
    border-radius: 999px; background: var(--grey); font-weight: 700; font-size: .85rem; letter-spacing: .04em; color: var(--body); }
  .lang-pick-wrap::after { content: ""; position: absolute; right: 10px; top: 15px; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
  .lang-pick { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; font-size: 16px; cursor: pointer; }
  .accent { height: 3px; }

  /* bottom tab bar */
  .tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; border-top: 1px solid var(--line); border-bottom: 0;
    background: rgba(255, 255, 255, .96); -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px);
    padding-bottom: env(safe-area-inset-bottom); }
  .tabs-in { padding: 0; }
  .tab { min-height: 56px; padding: 6px 2px 4px; font-size: .66rem; font-weight: 600; color: #6b737d; border-bottom: 0; border-top: 0; gap: 3px; }
  .tab .ico { width: 24px; height: 24px; }
  .tab.on { color: var(--blue); }
  .tab.on .ico { stroke-width: 2.4; }
  body.authed .foot { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
  body.authed .toast { bottom: calc(76px + env(safe-area-inset-bottom)); }
  body.authed .orderbar { bottom: calc(57px + env(safe-area-inset-bottom)); padding-bottom: 10px; box-shadow: 0 -2px 10px rgba(16, 51, 82, .10); }
  body.authed.has-bar .foot { padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
  body.authed.has-bar .toast { bottom: calc(150px + env(safe-area-inset-bottom)); }

  /* type + spacing */
  .main { padding-top: 14px; padding-bottom: 24px; }
  h1 { font-size: 1.45rem; }
  .eyebrow { margin-bottom: 2px; }
  .page-head { margin-bottom: 12px; }
  .block { margin-bottom: 18px; }
  .card { padding: 16px; }

  /* order page: smaller day tiles, the red button full width under the title */
  .chips { margin: 0 -16px; padding: 2px 16px 6px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { width: 68px; min-height: 76px; padding: 6px 4px; }
  .chip-num { font-size: 1.45rem; }
  .chip-wd { font-size: .7rem; }
  .chip-mon { font-size: .78rem; }
  .hint { font-size: .82rem; }
  .block-head .quick { width: 100%; }
  .block-head .quick .btn { flex: 1; min-height: 48px; font-size: .95rem; }
  .block-head .quick .btn.ghost { flex: 0 0 auto; }

  /* product rows: photo left, name + case + stepper right */
  .items.tiles { grid-template-columns: 1fr; gap: 8px; }
  .item.tile { display: grid; grid-template-columns: 96px minmax(0, 1fr); grid-template-areas: "ph tx" "ph st"; align-items: start; }
  .item.tile .tile-photo { grid-area: ph; width: 96px; height: 100%; min-height: 96px; aspect-ratio: auto; }
  .item.tile .item-text { grid-area: tx; padding: 10px 12px 2px; }
  .item.tile .stepper { grid-area: st; padding: 4px 10px 10px 12px; justify-content: flex-start; }
  .item.tile .item-name { font-size: .95rem; line-height: 1.25; }
  .item.tile .item-meta { font-size: .8rem; flex-direction: row; gap: 0 8px; }
  .item.tile .usual { font-size: .8rem; }
  .item.tile .step { width: 44px; height: 40px; font-size: 1.35rem; }
  .item.tile .qty { flex: 0 0 56px; width: 56px !important; min-height: 40px !important; font-size: 1.1rem !important; }
  .item.tile .tile-count { display: none !important; }
  .item.tile.picked { background: #f5f8ff; }
  .tile-photo .tag { left: 4px; top: 4px; padding: 2px 5px; font-size: .58rem; letter-spacing: .02em; }
  .tile-photo.no-photo .ph-logo { width: 78%; }
  .bar-kg { font-size: 1.05rem; }
  .place { min-width: 0; flex: 0 0 auto; padding: 10px 18px; }

  /* invoices: one line each, PDF as a square button on the right */
  .balance { gap: 8px; margin-bottom: 14px; }
  .bal-box { padding: 12px; }
  .bal-box .v { font-size: 1.2rem; }
  .inv { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "main amt pdf"; gap: 4px 10px; padding: 12px 10px 12px 14px; }
  .inv-pdf .btn { min-height: 44px; width: 44px; padding: 0; flex-direction: column; gap: 0; font-size: .62rem; }
  .inv-pdf .btn .ico { width: 18px; height: 18px; }
  .inv-amt .amt { font-size: 1rem; }
  .inv-amt .badge { font-size: .7rem; padding: 2px 7px; }

  /* orders + standing cards */
  .row-actions .btn { flex: 1; }
  .auth { padding-top: 0; }
  .auth-card { padding: 22px 18px; box-shadow: none; }
}
