:root {
  --brand: #d35400;
  --bg: #f6f4f1;
  --card: #ffffff;
  --text: #1f1d1a;
  --muted: #6d6860;
  --line: #e6e1da;
  --ok: #1e8e4f;
  --warn: #c98a00;
  --bad: #c0392b;
  --radius: 14px;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
a { color: var(--brand); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 999px; padding: 10px 18px; font-weight: 600; cursor: pointer;
  background: var(--brand); color: #fff; text-decoration: none; min-height: 42px;
}
.btn:disabled { opacity: .5; cursor: default; }
.btn.secondary { background: #ece7e0; color: var(--text); }
.btn.danger { background: var(--bad); }
.btn.ok { background: var(--ok); }
.btn.small { padding: 6px 12px; min-height: 32px; font-size: 14px; }
.btn.block { width: 100%; }

.card { background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.muted { color: var(--muted); }
.center { text-align: center; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.hidden { display: none !important; }

label.field { display: block; margin-bottom: 12px; font-size: 14px; color: var(--muted); }
label.field input, label.field select, label.field textarea {
  display: block; width: 100%; margin-top: 4px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; color: var(--text); font-size: 16px;
}
label.check { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
textarea { resize: vertical; }

.lang-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; }
.lang-toggle button { border: 0; background: transparent; color: #1f1d1a; padding: 6px 10px; cursor: pointer; font-weight: 600; font-size: 13px; }
.lang-toggle button.on { background: var(--brand); color: #fff; }

#toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 40px); opacity: 0;
  background: #222; color: #fff; padding: 10px 16px; border-radius: 10px; transition: .2s; z-index: 1000; max-width: 90vw;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.error { background: var(--bad); }

.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; justify-content: center; z-index: 100; }
.modal { background: var(--bg); width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; border-radius: 18px 18px 0 0; padding: 18px; }
@media (min-width: 700px) { .modal-back { align-items: center; } .modal { border-radius: 18px; } }

.login-box { max-width: 360px; margin: 12vh auto; padding: 0 16px; }
.login-box h1 { font-size: 22px; }
.error-text { color: var(--bad); min-height: 20px; font-size: 14px; }

/* ---------- guest ---------- */
.g-header { background: #fff; padding: 14px 16px; display: flex; gap: 12px; align-items: center; border-bottom: 1px solid var(--line); }
.g-logo { display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 22px; width: 46px; height: 46px; border-radius: 12px; object-fit: cover; background: var(--brand); flex: none; }
.g-title { font-weight: 700; font-size: 18px; line-height: 1.2; }
.g-table { display: inline-block; background: var(--brand); color: #fff; border-radius: 999px; padding: 2px 10px; font-size: 13px; font-weight: 600; margin-top: 2px; }
.g-cats { position: sticky; top: 0; z-index: 5; background: var(--bg); display: flex; gap: 8px; overflow-x: auto; padding: 10px 16px; scrollbar-width: none; }
.g-cats a { flex: none; padding: 7px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--text); font-size: 14px; font-weight: 600; }
.g-cats a.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.g-section { padding: 4px 16px 8px; }
.g-section h2 { font-size: 18px; margin: 14px 0 10px; scroll-margin-top: 60px; }
.g-item { display: flex; gap: 12px; background: #fff; border-radius: var(--radius); padding: 12px; margin-bottom: 10px; }
.g-item.off { opacity: .55; }
.g-item img { width: 92px; height: 92px; border-radius: 10px; object-fit: cover; flex: none; }
.g-item .info { flex: 1; min-width: 0; }
.g-item .name { font-weight: 650; }
.g-item .desc { color: var(--muted); font-size: 14px; margin: 3px 0 6px; }
.price { font-weight: 700; }
.price-alt { color: var(--muted); font-size: 13px; font-weight: 500; }
.qty { display: inline-flex; align-items: center; gap: 4px; }
.qty button { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
.qty button.minus { background: #ece7e0; color: var(--text); }
.qty span { min-width: 24px; text-align: center; font-weight: 700; }
.badge-off { display: inline-block; font-size: 12px; font-weight: 700; color: var(--bad); }
.g-cartbar { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 30%); }
.g-cartbar .btn { width: 100%; justify-content: space-between; padding: 14px 20px; font-size: 16px; }
.cart-line { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cart-line .n { flex: 1; }
.banner { margin: 12px 16px; padding: 12px 14px; border-radius: 12px; background: #fff3e0; color: #7a4a00; font-size: 14px; }

.status-steps { display: flex; justify-content: space-between; margin: 22px 0; position: relative; }
.status-steps::before { content: ''; position: absolute; top: 15px; left: 12%; right: 12%; height: 3px; background: var(--line); }
.status-step { position: relative; text-align: center; flex: 1; font-size: 13px; color: var(--muted); }
.status-step .dot { width: 32px; height: 32px; border-radius: 50%; background: var(--line); margin: 0 auto 6px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; }
.status-step.done .dot { background: var(--brand); }
.status-step.done { color: var(--text); font-weight: 600; }
.status-big { font-size: 26px; font-weight: 800; margin: 6px 0; }
.pulse { animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .55; } }

/* ---------- kitchen ---------- */
body.kitchen { background: #1c1b1a; color: #f3efe9; }
.k-top { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: #262422; }
.k-top .title { font-weight: 800; font-size: 18px; }
.k-clock { font-variant-numeric: tabular-nums; color: #bdb6ad; }
.k-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 12px; min-height: calc(100vh - 56px); }
@media (max-width: 900px) { .k-cols { grid-template-columns: 1fr; } }
.k-col h2 { margin: 4px 4px 10px; font-size: 16px; text-transform: uppercase; letter-spacing: .05em; color: #bdb6ad; display: flex; gap: 8px; align-items: center; }
.k-col h2 .count { background: #3a3734; border-radius: 999px; padding: 1px 9px; color: #fff; }
.k-card { background: #2d2a27; border-radius: 14px; padding: 14px; margin-bottom: 12px; border-inline-start: 6px solid #6d6860; }
.k-card.new { border-inline-start-color: var(--warn); }
.k-card.fresh { animation: flash 1.2s 3; }
.k-card.accepted { border-inline-start-color: #3b82f6; }
.k-card.ready { border-inline-start-color: var(--ok); }
.k-card.late .k-time { color: #ff6b5b; font-weight: 800; }
@keyframes flash { 50% { background: #4a3a1c; } }
.k-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.k-num { font-size: 22px; font-weight: 800; }
.k-table { font-size: 18px; font-weight: 700; color: #ffd28a; }
.k-time { margin-inline-start: auto; font-variant-numeric: tabular-nums; color: #bdb6ad; }
.k-items { list-style: none; padding: 0; margin: 0 0 10px; font-size: 18px; }
.k-items li { padding: 3px 0; }
.k-items b { display: inline-block; min-width: 34px; color: #ffd28a; }
.k-note { background: #4a3a1c; color: #ffe2a8; border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; font-weight: 600; }
.k-actions { display: flex; gap: 8px; }
.k-actions .btn { flex: 1; min-height: 48px; font-size: 16px; }
.k-empty { color: #6d6860; text-align: center; padding: 30px 0; }
.k-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; z-index: 50; cursor: pointer; }
.k-overlay .btn { font-size: 22px; padding: 22px 36px; }
.k-offline { background: var(--bad); color: #fff; text-align: center; padding: 6px; font-weight: 600; }
.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.pin-pad button { height: 64px; font-size: 24px; border-radius: 14px; border: 0; background: #2d2a27; color: #fff; cursor: pointer; }
.pin-dots { font-size: 32px; letter-spacing: 12px; text-align: center; min-height: 44px; }

/* ---------- owner / admin ---------- */
.o-top { background: #fff; border-bottom: 1px solid var(--line); padding: 12px 16px; display: flex; align-items: center; gap: 12px; }
.o-tabs { display: flex; gap: 6px; padding: 10px 16px; overflow-x: auto; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.o-tabs button { border: 0; background: transparent; padding: 8px 14px; border-radius: 999px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.o-tabs button.on { background: var(--brand); color: #fff; }
.o-main { max-width: 900px; margin: 0 auto; padding: 16px; }
.o-cat { margin-bottom: 18px; }
.o-cat-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.o-cat-head h3 { margin: 0; flex: 1; }
.o-item { display: flex; gap: 12px; align-items: center; background: #fff; border-radius: 12px; padding: 10px; margin-bottom: 8px; }
.o-item img, .o-item .noimg { width: 54px; height: 54px; border-radius: 8px; object-fit: cover; background: #ece7e0; flex: none; }
.o-item .info { flex: 1; min-width: 0; }
.switch { position: relative; width: 46px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #ccc; border-radius: 999px; transition: .2s; cursor: pointer; }
.switch span::before { content: ''; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::before { transform: translateX(20px); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat .v { font-size: 24px; font-weight: 800; }
.o-order { background: #fff; border-radius: 12px; padding: 12px; margin-bottom: 8px; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #ece7e0; }
.pill.new { background: #fff1d6; color: #8a5a00; }
.pill.accepted { background: #dbe8ff; color: #1d4ed8; }
.pill.ready, .pill.served { background: #d9f2e3; color: #13693a; }
.pill.rejected { background: #fbe0dd; color: #a12a1f; }
.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.qr-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; text-align: center; break-inside: avoid; }
.qr-card .qr svg { width: 100%; height: auto; }
.qr-card .rn { font-weight: 800; font-size: 18px; }
.qr-card .tn { font-size: 28px; font-weight: 900; color: var(--brand); margin: 4px 0; }
.logo-preview { width: 72px; height: 72px; border-radius: 14px; object-fit: cover; background: #ece7e0; }
table.list { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; }
table.list td, table.list th { padding: 10px; border-bottom: 1px solid var(--line); text-align: start; font-size: 14px; vertical-align: top; }

@media print {
  .no-print, .o-top, .o-tabs { display: none !important; }
  body, :root { background: #fff; }
  .o-main { max-width: none; padding: 0; }
  .qr-grid { grid-template-columns: repeat(3, 1fr); gap: 8mm; }
  .qr-card { border: 1px dashed #999; }
}

/* ---------- build-your-own (pizza / burger) ---------- */
.bld { position: fixed; inset: 0; z-index: 200; overflow-y: auto; overscroll-behavior: contain; color: #f7efe6;
  background: radial-gradient(120% 70% at 50% 25%, #3a2418 0%, #1d1410 55%, #120d0a 100%); animation: bldIn .3s ease-out; padding-bottom: 96px; }
.bld.leaving { animation: bldOut .25s ease-in forwards; }
@keyframes bldIn { from { opacity: 0; transform: translateY(30px); } }
@keyframes bldOut { to { opacity: 0; transform: translateY(30px); } }
.bld-top { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.bld-title { flex: 1; text-align: center; font-size: 20px; font-weight: 800; letter-spacing: .01em; }
.bld-icon { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: #fff; font-size: 20px; cursor: pointer; }
.bld-choices { display: flex; justify-content: center; gap: 6px; padding: 2px 14px 6px; }
.bld-choices button { border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.05); color: #f7efe6; border-radius: 999px; padding: 7px 16px; font-weight: 700; cursor: pointer; min-width: 46px; transition: .2s; }
.bld-choices button.on { background: var(--brand); border-color: var(--brand); color: #fff; transform: scale(1.06); box-shadow: 0 4px 14px rgba(0,0,0,.35); }
.bld-stage { position: relative; display: flex; align-items: center; justify-content: center; height: min(44vh, 340px); margin: 4px 12px; border-radius: 24px; transition: background .2s, box-shadow .2s; }
.bld-stage.drop-over { background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 2px var(--brand); }
.bld-hint { text-align: center; color: #c9b8a6; font-size: 13px; margin: 4px 0 10px; }
.bld-hint [data-count] { font-weight: 800; color: #fff; display: inline-block; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

.bld-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 6px; padding: 0 12px; max-width: 520px; margin: 0 auto; }
.bld-ing { text-align: center; user-select: none; -webkit-user-select: none; }
.bld-ing.off { opacity: .35; }
.bld-thumb { position: relative; width: 66px; height: 66px; margin: 0 auto; border-radius: 50%; background: rgba(255,255,255,.07);
  border: 2px solid rgba(255,255,255,.12); display: flex; align-items: center; justify-content: center; padding: 10px; cursor: grab; touch-action: none; transition: .2s; }
.bld-burger .bld-thumb { padding: 6px; }
.bld-thumb > svg, .bld-thumb > img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.bld-ing.picked .bld-thumb { border-color: var(--brand); background: rgba(255,255,255,.12); box-shadow: 0 0 0 4px rgba(255,255,255,.06), 0 6px 18px rgba(0,0,0,.4); }
.bld-thumb:active { transform: scale(.92); }
.bld-badge { position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 800; display: none; align-items: center; justify-content: center; padding: 0 5px; }
.bld-ing.picked .bld-badge { display: flex; animation: pop .3s cubic-bezier(.34,1.56,.64,1); }
.bld-minus { position: absolute; top: -4px; left: -4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: #f7efe6; color: #1d1410; font-weight: 900; line-height: 1; display: none; cursor: pointer; padding: 0; }
.bld-ing.picked .bld-minus { display: block; }
@keyframes pop { from { transform: scale(0); } }
.bld-name { font-size: 12.5px; font-weight: 600; margin-top: 6px; line-height: 1.2; }
.bld-price { font-size: 11.5px; color: #c9b8a6; }
.bld-bottom { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, #120d0a 35%); }
.bld-add { width: 100%; max-width: 520px; margin: 0 auto; display: flex; justify-content: space-between; padding: 15px 22px; font-size: 16px; box-shadow: 0 8px 24px rgba(0,0,0,.45); }
.bld-add [data-price] { font-variant-numeric: tabular-nums; }

.bld-ghost { position: fixed; left: 0; top: 0; width: 84px; height: 84px; z-index: 300; pointer-events: none; filter: drop-shadow(0 10px 14px rgba(0,0,0,.5)); }
.bld-ghost > svg, .bld-ghost > img { width: 100%; height: 100%; object-fit: contain; }
.bld-ghost-burger { width: 150px; height: 60px; }
.bld-ghost.dropped { transition: opacity .2s, scale .2s; opacity: 0; scale: .5; }
.bld-ghost.cancel { transition: opacity .2s; opacity: 0; }

/* pizza: top view, toppings rain down and scatter */
.pz { position: relative; width: min(300px, 74vw); aspect-ratio: 1; transform: scale(var(--scale, .9)); transition: transform .45s cubic-bezier(.34,1.56,.64,1); filter: drop-shadow(0 18px 24px rgba(0,0,0,.55)); }
.pz-base, .pz-pieces { position: absolute; inset: 0; }
.pz-base > svg, .pz-base > img { width: 100%; height: 100%; }
.pz-piece { position: absolute; aspect-ratio: 1; transform: translate(-50%, -50%) rotate(var(--rot)); filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)); }
.pz-piece > svg, .pz-piece > img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pz-piece.enter { animation: pzDrop .55s cubic-bezier(.34,1.56,.64,1) both; }
.pz-piece.leave { animation: pzLeave .35s ease-in both; }
@keyframes pzDrop {
  from { opacity: 0; transform: translate(-50%, -50%) translateY(-120px) scale(1.9) rotate(calc(var(--rot) - 120deg)); filter: drop-shadow(0 30px 12px rgba(0,0,0,.2)); }
  55% { opacity: 1; }
  to { transform: translate(-50%, -50%) rotate(var(--rot)); }
}
@keyframes pzLeave { to { opacity: 0; transform: translate(-50%, -50%) scale(0) rotate(calc(var(--rot) + 90deg)); } }

/* burger: side view, layers drop and stack */
.bg { --w: min(250px, 66vw); width: var(--w); display: flex; flex-direction: column; align-items: stretch; filter: drop-shadow(0 18px 20px rgba(0,0,0,.55)); }
.bg-layer { position: relative; height: calc(var(--w) * var(--h) / 200); margin-top: calc(var(--w) * var(--h) / 200 * -0.38); }
.bg-layer:first-child { margin-top: 0; }
.bg-layer > svg, .bg-layer > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; }
.bg-layer.enter { animation: bgGrow .45s ease-out both; }
.bg-layer.enter > svg, .bg-layer.enter > img { animation: bgDrop .6s cubic-bezier(.34,1.4,.64,1) both; transform-origin: 50% 100%; }
.bg-layer.bump > svg, .bg-layer.bump > img { animation: bgBump .6s cubic-bezier(.34,1.56,.64,1); }
@keyframes bgGrow { from { height: 0; margin-top: 0; } }
@keyframes bgDrop {
  0% { transform: translateY(-260px) rotate(-8deg); opacity: 0; }
  30% { opacity: 1; }
  70% { transform: translateY(0) scaleY(.8) scaleX(1.05); }
  100% { transform: none; }
}
@keyframes bgBump { 35% { transform: translateY(-14px); } }

@media (prefers-reduced-motion: reduce) {
  .pz-piece.enter, .bg-layer.enter, .bg-layer.enter > *, .bg-layer.bump > *, .bld { animation: none !important; }
}

/* builder items in the menu + cart */
.g-build { background: linear-gradient(135deg, #2a1a12, #4a2a18); color: #fff; }
.g-build .desc, .g-build .price-alt { color: #e6d3c0; }
.g-build .art { width: 92px; height: 92px; flex: none; display: flex; align-items: center; justify-content: center; }
.g-build .art svg { width: 100%; height: 100%; }
.cart-sub { font-size: 13px; color: var(--muted); }
.takeaway-badge { display: inline-block; background: #1f1d1a; color: #fff; border-radius: 999px; padding: 2px 10px; font-size: 13px; font-weight: 700; }
.k-takeaway { background: #ffd28a; color: #1c1b1a; border-radius: 999px; padding: 2px 10px; font-weight: 800; font-size: 14px; }
.k-recipe { list-style: none; margin: 2px 0 4px 34px; padding: 0; font-size: 16px; color: #e8dfd3; }
.k-recipe li { padding: 1px 0; }
.k-items .k-x2 { background: #ffd28a; color: #1c1b1a; border-radius: 6px; padding: 0 5px; min-width: 0; }
.pz-base > img.round, .g-build .art img.round { border-radius: 50%; }
.bg-layer > img { object-fit: contain; }
.g-build .art img { width: 100%; height: 100%; object-fit: contain; }
.k-flag { display: inline-block; background: #3a2a1c; color: #ffd28a; border: 1px solid #ffd28a; border-radius: 6px; padding: 0 7px; font-size: 15px; font-weight: 700; margin-left: 4px; }

/* ---------- finish: finished product + flag ---------- */
.bld-stage { transition: height .35s ease; }
.bld.finishing .bld-choices, .bld.finishing .bld-hint, .bld.finishing .bld-grid { display: none; }
.bld.finishing .bld-stage { height: min(54vh, 430px); margin-top: 10px; }
.bld.finishing .bld-icon[data-reset] { visibility: hidden; }
.bld.instant *, .bld.instant *::before, .bld.instant *::after { animation-duration: 0s !important; animation-delay: 0s !important; transition: none !important; }
.fin-skip { position: absolute; bottom: 4px; left: 0; right: 0; text-align: center; font-size: 12px; color: #a8957f; animation: fadeIn .4s .3s both; }
.bld.finished .fin-skip { display: none; }
@keyframes fadeIn { from { opacity: 0; } }

/* pizza: oven glow, then sliced */
.pz.baking::before { content: ''; position: absolute; inset: -14%; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, rgba(255,150,40,.6) 0%, rgba(255,90,20,.25) 45%, transparent 68%); animation: ovenGlow 1.3s ease-out both; }
.pz.baking .pz-base, .pz.baking .pz-pieces { animation: bake 1.1s ease both; }
@keyframes ovenGlow { 0% { opacity: 0; transform: scale(.8); } 35% { opacity: 1; } 100% { opacity: .25; transform: scale(1.05); } }
@keyframes bake { 45% { filter: brightness(1.3) saturate(1.35) sepia(.18); } 100% { filter: brightness(1.06) saturate(1.15) sepia(.05); } }
.pz-slices { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.pz-slices line { stroke: rgba(50, 22, 8, .55); stroke-width: .8; stroke-linecap: round; stroke-dasharray: 90; stroke-dashoffset: 90; animation: slice .45s ease-out forwards; }
@keyframes slice { to { stroke-dashoffset: 0; } }

/* burger: pressed down */
.bg { position: relative; }
.bg.press { animation: squash .5s cubic-bezier(.34,1.56,.64,1); transform-origin: 50% 100%; }
@keyframes squash { 40% { transform: scaleY(.95) scaleX(1.03); } }

/* steam */
.fin-steam { position: absolute; left: 50%; top: 12%; width: 90px; height: 90px; transform: translateX(-50%); pointer-events: none; }
.fin-steam i { position: absolute; bottom: 0; width: 14px; height: 70px; border-radius: 50%; background: radial-gradient(ellipse at center, rgba(255,255,255,.55), transparent 70%); filter: blur(4px); opacity: 0; animation: steam 2.6s ease-in infinite; }
.fin-steam i:nth-child(1) { left: 14px; animation-delay: .2s; }
.fin-steam i:nth-child(2) { left: 40px; animation-delay: .9s; }
.fin-steam i:nth-child(3) { left: 64px; animation-delay: 1.5s; }
@keyframes steam { 0% { opacity: 0; transform: translateY(20px) scaleX(.6); } 30% { opacity: .8; } 100% { opacity: 0; transform: translateY(-60px) scaleX(1.4) skewX(12deg); } }

/* the flag on a toothpick / skewer */
.flag { position: absolute; left: 40%; bottom: 50%; width: 0; height: 0; z-index: 6; filter: drop-shadow(1px 3px 3px rgba(0,0,0,.45)); animation: flagDrop .65s cubic-bezier(.34,1.56,.64,1) both; }
.bg .flag { left: 42%; bottom: auto; }
.flag-stick { position: absolute; left: -2px; bottom: 0; width: 4px; height: 92px; border-radius: 2px; background: linear-gradient(90deg, #f3d9ab, #c99556 55%, #93622f); }
.bg .flag-stick { height: 110px; }
.flag-stick::before { content: ''; position: absolute; left: -3px; top: -8px; width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff2c8, var(--brand) 60%); }
.flag-cloth { position: absolute; left: 2px; bottom: 58px; height: 30px; max-width: 190px; padding: 0 20px 0 10px; display: flex; align-items: center;
  color: #fff; font-weight: 800; font-size: 13px; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: var(--brand); background-image: linear-gradient(100deg, rgba(255,255,255,.28), rgba(255,255,255,0) 35%, rgba(0,0,0,.12) 60%, rgba(255,255,255,.18) 85%);
  background-size: 220% 100%; clip-path: polygon(0 0, 100% 0, calc(100% - 11px) 50%, 100% 100%, 0 100%);
  transform-origin: left center; animation: wave 2.6s ease-in-out infinite, sheen 2.6s linear infinite; }
.bg .flag-cloth { bottom: 76px; }
.flag-cloth span { overflow: hidden; text-overflow: ellipsis; }
.flag.wiggle .flag-cloth { animation: wiggle .5s ease, sheen 2.6s linear infinite; }
@keyframes flagDrop { from { opacity: 0; transform: translateY(-170px) rotate(-12deg); } 60% { opacity: 1; } to { transform: none; } }
@keyframes wave { 0%, 100% { transform: skewY(0deg) scaleX(1); } 50% { transform: skewY(-3.5deg) scaleX(.97); } }
@keyframes sheen { from { background-position: 0% 0; } to { background-position: -220% 0; } }
@keyframes wiggle { 30% { transform: rotate(-6deg) scale(1.06); } 60% { transform: rotate(4deg); } }

/* finish panel */
.bld-finish { max-width: 520px; margin: 0 auto; padding: 0 16px; display: none; }
.bld.finished .bld-finish { display: block; animation: finIn .35s ease-out both; }
@keyframes finIn { from { opacity: 0; transform: translateY(16px); } }
.fin-label { display: block; font-size: 13px; color: #c9b8a6; margin: 4px 0 6px; }
.fin-name { display: flex; gap: 8px; align-items: center; }
.fin-name input { flex: 1; min-width: 0; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08);
  color: #fff; font-size: 17px; font-weight: 700; }
.fin-name input:focus { outline: 2px solid var(--brand); }
.fin-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.fin-chip { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.12); }
.fin-chip.main { background: var(--brand); border-color: var(--brand); font-weight: 700; }
.bld .fin-edit { width: 100%; background: rgba(255,255,255,.1); color: #f7efe6; border: 1px solid rgba(255,255,255,.15); }

/* flying into the cart */
.bld-fly { position: fixed; z-index: 400; pointer-events: none; }
.bld-fly > .pz, .bld-fly > .bg { animation: none !important; }
.bounce { animation: cartBounce .5s cubic-bezier(.34,1.56,.64,1); }
@keyframes cartBounce { 35% { transform: scale(1.08); } 65% { transform: scale(.97); } }

/* ---------- receipt (ticket) ---------- */
.rc { max-width: 420px; margin: 0 auto; padding: 16px 16px 28px; }
.rc-head { text-align: center; margin: 6px 0 14px; }
.rc-head.pop .rc-check { animation: checkPop .5s cubic-bezier(.34,1.56,.64,1) both; }
.rc-check { width: 52px; height: 52px; margin: 0 auto 8px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 900; color: #fff; background: var(--ok); }
.rc-check.bad { background: var(--bad); }
@keyframes checkPop { from { transform: scale(0) rotate(-45deg); } }
.rc-title { font-size: 22px; font-weight: 800; }
.rc-sub { color: var(--muted); font-size: 14px; }
/* the printer slot the ticket comes out of */
.rc-slot { height: 10px; margin: 0 6px; border-radius: 6px; background: #2b2724; box-shadow: inset 0 2px 3px rgba(0,0,0,.6); position: relative; z-index: 2; }
.rc-paper-clip { overflow: hidden; margin: -5px 14px 0; padding-bottom: 14px; }
.rc-paper { position: relative; background: #fffdf8; color: #1f1d1a; padding: 18px 16px 16px; font-family: "Courier New", ui-monospace, monospace; font-size: 13.5px; line-height: 1.55;
  box-shadow: 0 6px 16px rgba(0,0,0,.12); }
.rc-paper::after { content: ''; position: absolute; left: 0; right: 0; bottom: -10px; height: 10px;
  background: linear-gradient(-45deg, transparent 7px, #fffdf8 0) 0 0 / 14px 10px, linear-gradient(45deg, transparent 7px, #fffdf8 0) 0 0 / 14px 10px;
  background-repeat: repeat-x; filter: drop-shadow(0 3px 2px rgba(0,0,0,.08)); }
.rc-paper.print { animation: printOut 1.1s steps(9, end) both; }
@keyframes printOut { from { transform: translateY(-100%); } }
.rc-center { text-align: center; }
.rc-logo { width: 40px; height: 40px; margin: 0 auto 4px; border-radius: 10px; object-fit: cover; background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center; font: 800 20px system-ui, sans-serif; }
.rc-name { font: 800 17px system-ui, sans-serif; }
.rc-muted { color: #6d6860; }
.rc-cut { border-top: 1.5px dashed #b9b2a8; margin: 10px 0; }
.rc-row { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.rc-row > span:last-child { white-space: nowrap; }
.rc-num { font: 900 30px system-ui, sans-serif; }
.rc-detail { color: #6d6860; font-size: 12.5px; padding-left: 16px; line-height: 1.4; }
.rc-total { font: 800 18px system-ui, sans-serif; }
.rc-pay { display: flex; gap: 12px; align-items: center; font-size: 12px; color: #6d6860; font-family: system-ui, sans-serif; line-height: 1.4; }
.rc-qr { width: 74px; height: 74px; flex: none; background: #fff; }
.rc-qr svg { width: 100%; height: 100%; display: block; }
/* stamps sit in the lower half so the order number and table stay readable */
.rc-stamp { position: absolute; bottom: 205px; right: 16px; transform: rotate(-12deg); border: 3px solid currentColor; border-radius: 8px; padding: 6px 12px 2px;
  font: 900 26px/1.15 system-ui, sans-serif; letter-spacing: .08em; opacity: .8; mix-blend-mode: multiply; pointer-events: none; }
.rc-stamp.ready { color: #1e8e4f; }
.rc-stamp.paid { color: #c0392b; bottom: 62px; right: 20px; transform: rotate(8deg); }
.rc-stamp.bad { color: #c0392b; }
.rc-stamp.slam { animation: slam .45s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes slam { from { opacity: 0; transform: scale(2.6) rotate(-30deg); } }
.rc-progress { margin: 4px 14px 0; }
.rc-steps { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.rc-steps .on { color: var(--ok); font-weight: 700; }
.rc-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.rc-bar > div { height: 100%; background: var(--ok); border-radius: 3px; transition: width .6s ease; }
.rc-eta { text-align: center; font-size: 13px; color: var(--muted); margin-top: 8px; }
.rc-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin-top: 16px; }
.rc-actions .called { background: #d9f2e3; color: #13693a; }
@media (prefers-reduced-motion: reduce) { .rc-paper.print, .rc-stamp.slam, .rc-head.pop .rc-check { animation: none; } }
.k-calls { padding: 10px 12px 0; display: grid; gap: 8px; }
.k-call { display: flex; align-items: center; gap: 10px; background: #ffd28a; color: #1c1b1a; border-radius: 12px; padding: 10px 14px; font-size: 17px; animation: flash 1.2s 3; }
.k-call .k-time { color: #5a4a2a; margin-inline-start: auto; }
.k-call .btn { background: #1c1b1a; }
.k-paid { background: #1e8e4f; color: #fff; border-radius: 6px; padding: 1px 8px; font-size: 13px; font-weight: 800; }

/* ---------- cash desk + payments ---------- */
.pin-pad.light button { background: #fff; color: var(--text); border: 1px solid var(--line); }
.chips { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.chips button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px; font-weight: 700; cursor: pointer; }
.chips button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.stat-bad { border: 2px solid var(--bad); }
.stat-bad .v { color: var(--bad); }
.cash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.cash-card { background: #fff; border-radius: 14px; padding: 14px; border-inline-start: 6px solid var(--bad); }
.cash-card.is-paid { border-inline-start-color: var(--ok); }
.cash-num { font-size: 24px; font-weight: 900; }
.cash-where { font-weight: 700; }
.cash-total { font-size: 22px; font-weight: 800; }
.pay-badge { display: inline-block; border-radius: 8px; padding: 3px 10px; font-size: 13px; font-weight: 800; }
.pay-badge.ok { background: #d9f2e3; color: #13693a; }
.pay-badge.no { background: #fbe0dd; color: #a12a1f; }
.pay-items { margin: 12px 0; font-size: 14px; display: grid; gap: 4px; }
.pay-total { display: flex; justify-content: space-between; font-size: 22px; font-weight: 900; border-top: 2px solid var(--text); padding-top: 8px; }
.pay-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.pay-method { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px; border-radius: 14px; border: 2px solid var(--line); background: #fff; cursor: pointer; text-align: left; }
.pay-method b { font-size: 20px; }
.pay-method small { color: var(--muted); font-size: 11px; }
.pay-method.on { border-color: var(--ok); background: #effaf3; }
.pay-change-result { font-size: 20px; font-weight: 900; margin: -4px 0 12px; min-height: 26px; }
.pay-change-result.ok { color: var(--ok); }
.pay-change-result.bad { color: var(--bad); }
.o-order.o-unpaid { border-inline-start: 5px solid var(--bad); }
.o-order.o-paid { border-inline-start: 5px solid var(--ok); }

/* ---------- home page ---------- */
.home { max-width: 560px; margin: 8vh auto; padding: 0 16px; text-align: center; }
.home-title { font-size: 34px; margin: 18px 0 6px; }
.home-pitch { max-width: 420px; margin: 0 auto 24px; }
.home-demo { text-align: left; }
.home-demo h2 { margin: 0 0 10px; font-size: 19px; }
.home-label { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 14px 0 8px; }
.home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.home-grid .btn { justify-content: center; }

/* finished burger photo + stronger steam */
.bg.to-hero { opacity: 0; }
.bg-hero { position: absolute; left: 50%; top: calc(50% + 34px); transform: translate(-50%, -50%); z-index: 3;
  filter: drop-shadow(0 22px 26px rgba(0,0,0,.6)); }
.bg-hero > img { width: 100%; height: auto; display: block; }
@keyframes heroIn { from { opacity: 0; transform: translate(-50%, -50%) scale(1.08); } }
.fin-steam { position: absolute; left: 50%; top: 14%; width: 150px; height: 140px; transform: translateX(-50%); pointer-events: none; z-index: 4; }
.bg-hero .fin-steam { top: -95px; }
.fin-steam i { position: absolute; bottom: 0; width: 26px; height: 120px; border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255,255,255,.75), rgba(255,255,255,0) 70%); filter: blur(7px); opacity: 0;
  animation: steamBig 3s ease-in infinite; }
.fin-steam i:nth-child(1) { left: 6px;  animation-delay: .1s; }
.fin-steam i:nth-child(2) { left: 36px; animation-delay: .7s; }
.fin-steam i:nth-child(3) { left: 62px; animation-delay: 1.3s; }
.fin-steam i:nth-child(4) { left: 88px; animation-delay: .4s; }
.fin-steam i:nth-child(5) { left: 116px; animation-delay: 1.9s; }
@keyframes steamBig {
  0% { opacity: 0; transform: translateY(30px) scaleX(.5) scaleY(.6); }
  25% { opacity: .85; }
  60% { opacity: .5; transform: translateY(-30px) scaleX(1.2) skewX(10deg); }
  100% { opacity: 0; transform: translateY(-90px) scaleX(1.7) skewX(-12deg); }
}

/* finished pizza photo fades in over the toppings */
.pz.to-hero .pz-pieces, .pz.to-hero .pz-base { opacity: 0; transition: opacity .5s ease; }
.pz-hero { position: absolute; inset: 0; z-index: 2; animation: pzHeroIn .6s ease-out both; }
.pz-hero > img { width: 100%; height: 100%; display: block; border-radius: 50%; }
@keyframes pzHeroIn { from { opacity: 0; transform: scale(1.06) rotate(-8deg); } }
.pz .fin-steam { z-index: 4; }
.pz .flag { z-index: 6; }
/* pizza steam rises off the top edge, where it shows against the dark background */
.pz .fin-steam { top: -24%; width: 190px; }
.pz .fin-steam i { width: 30px; }
.pz .fin-steam i:nth-child(5) { left: 150px; }

/* ---------- Clic & Croc platform branding ---------- */
:root { --cc-navy: #202B55; --cc-lime: #B7F35A; --cc-coral: #FF986A; --cc-slate: #52618D; }
body.brand-page { --brand: var(--cc-navy); background: #f4f6fb; }
.home-logo { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 22px 0 4px; font-size: 38px; font-weight: 800; letter-spacing: -1.5px; color: var(--cc-navy); }
.home-logo img { width: 64px; height: 64px; }
.home-tagline { color: var(--cc-slate); font-size: 13px; font-weight: 700; letter-spacing: .28em; text-transform: uppercase; margin-bottom: 14px; }
.home-pitch { color: #3d4666; max-width: 420px; margin: 0 auto 24px; }
.brand-page .home-demo { border-top: 5px solid var(--cc-lime); }
.brand-page .home-demo .btn:not(.secondary) { background: var(--cc-navy); }
.brand-page .home-demo .btn.secondary { background: #e9edf8; color: var(--cc-navy); }
.brand-page .lang-toggle button.on { background: var(--cc-navy); }
.admin-brand { display: flex; align-items: center; gap: 10px; flex: 1; color: var(--cc-navy); font-weight: 800; }
.admin-brand img { width: 30px; height: 30px; }
/* "Propulsé par Clic & Croc" */
.powered { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 18px auto 6px; color: #8a8f9f; font-size: 12px; text-decoration: none; }
.powered img { width: 18px; height: 18px; border-radius: 5px; }
.powered b { color: var(--cc-navy); }
:root:has(body.brand-page) { background: #f4f6fb; }
.k-menu { display: inline-block; background: #B7F35A; color: #202B55; border-radius: 6px; padding: 0 7px; font-size: 13px; font-weight: 900; letter-spacing: .06em; margin-left: 4px; }
.k-combo li { color: #d9f7b0; font-weight: 700; }

/* ---------- menus (combos) ---------- */
.cb-sheet { animation: cbIn .4s cubic-bezier(.34,1.4,.64,1); }
@keyframes cbIn { from { transform: translateY(60px); opacity: 0; } }
.cb-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.cb-icons { font-size: 34px; animation: cbWiggle 1.6s ease-in-out infinite; }
@keyframes cbWiggle { 50% { transform: rotate(-8deg) scale(1.08); } }
.cb-title { font-size: 21px; font-weight: 900; }
.cb-price { background: var(--brand); color: #fff; font-weight: 900; font-size: 17px; padding: 6px 12px; border-radius: 999px; white-space: nowrap; }
.cb-label { font-weight: 800; margin: 14px 0 8px; }
.cb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.cb-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border: 2px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; transition: transform .15s, border-color .15s; }
.cb-card img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
.cb-emoji { font-size: 34px; line-height: 56px; }
.cb-name { font-size: 13px; font-weight: 700; text-align: center; line-height: 1.2; }
.cb-extra { position: absolute; top: 4px; right: 4px; background: #fff1d6; color: #8a5a00; font-size: 11px; font-weight: 800; padding: 1px 6px; border-radius: 999px; }
.cb-card.on { border-color: var(--ok); background: #effaf3; transform: scale(1.04); }
.cb-card.on::after { content: '✓'; position: absolute; top: 4px; left: 6px; color: var(--ok); font-weight: 900; }
.cb-save { margin-top: 12px; text-align: center; font-weight: 900; color: var(--ok); animation: pop .35s cubic-bezier(.34,1.56,.64,1); }
.cb-suggest { margin-top: 12px; padding: 12px; border-radius: 14px; background: #fff7ec; border: 1px dashed #f0c48a; }
.cb-suggest-title { font-weight: 800; margin-bottom: 8px; }
.cb-suggest-row { display: flex; gap: 6px; flex-wrap: wrap; }
.cb-suggest-row button { display: flex; flex-direction: column; align-items: center; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 6px 10px; font-weight: 700; font-size: 13px; cursor: pointer; }
.cb-suggest-row small { color: var(--muted); font-weight: 600; }
.cart-combo { color: #1e8e4f; font-weight: 700; }
.combo-card { margin-bottom: 14px; border: 2px dashed #f0c48a; background: #fffaf2; }
.combo-card.on { border: 2px solid var(--ok); background: #f3fbf6; }
.cb-section { font-weight: 800; margin: 14px 0 6px; }
.cb-list { max-height: 220px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.cb-opt { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 14px; }
.cb-opt:last-child { border-bottom: 0; }
.cb-extra-in { width: 64px; padding: 6px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }

/* ---------- shawarma (wrap) builder ---------- */
.pz-wrap { --scale: .95; }
.pz-wrap .pz-base > img { border-radius: 50%; }
.pz-piece.meat { z-index: 0; }
.pz-drizzle { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; filter: drop-shadow(0 1px 1px rgba(0,0,0,.35)); }
.pz-drizzle path { fill: none; stroke-width: 1.5; opacity: .92; stroke-linecap: round; stroke-linejoin: round; }
.pz-drizzle.enter path { stroke-dasharray: 320; stroke-dashoffset: 320; animation: drizzle .9s ease-out forwards; }
@keyframes drizzle { to { stroke-dashoffset: 0; } }
.pz-drizzle.leave { animation: pzFadeOut .35s ease-in forwards; }
@keyframes pzFadeOut { to { opacity: 0; } }
/* finish: the bread folds in from both sides before it becomes the rolled shawarma */
.pz.wrap-fold { animation: wrapFold .55s cubic-bezier(.6,0,.3,1) forwards; }
@keyframes wrapFold { to { transform: scale(var(--scale, .95)) scaleX(.62) rotate(-6deg); } }

/* ---------- installable app + offline (PWA) ---------- */
#cc-net { position: sticky; top: 0; z-index: 60; background: #b3261e; color: #fff; text-align: center; padding: 8px 12px; font-size: 14px; line-height: 1.35; }
#cc-net div { opacity: .92; font-size: 13px; }
#cc-net.big { font-size: 17px; padding: 12px; animation: cc-net-pulse 1.6s ease-in-out infinite; }
#cc-net.big div { font-size: 15px; font-weight: 600; }
@keyframes cc-net-pulse { 50% { background: #e0362c; } }
#cc-install { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 70; display: flex; align-items: center;
  background: #202B55; color: #fff; border-radius: 999px; box-shadow: 0 6px 24px rgba(0,0,0,.3); padding: 4px 4px 4px 6px; }
#cc-install button { border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
#cc-install .cc-install-go { font-weight: 800; padding: 10px 14px; background: #B7F35A; color: #202B55; border-radius: 999px; font-size: 15px; }
#cc-install .cc-install-x { width: 36px; height: 36px; font-size: 22px; opacity: .8; }
.pay-badge.pending { background: #fff4d6; color: #7a5200; border: 1px dashed #d9a400; }
.pay-offline-note { background: #fff4d6; color: #5f4000; border-radius: 12px; padding: 10px 12px; font-size: 14px; margin: 10px 0; }
@media print { #cc-net, #cc-install { display: none !important; } }

/* ---------- Arabic (staff screens, right to left) ---------- */
[dir=rtl] body { font-family: 'Segoe UI', Tahoma, 'Noto Sans Arabic', 'Noto Naskh Arabic', 'Geeza Pro', Arial, sans-serif; }
[dir=rtl] .pay-method { align-items: flex-start; }
.lang-toggle button[lang=ar] { font-weight: 800; }

/* ---------- staff app: welcome screen with 3 doors ---------- */
body.door-page { background: #f4f6fb; }
.door-box { max-width: 420px; margin: 0 auto; padding: 22px 16px 30px; text-align: center; }
.door-box h1 { margin: 10px 0 2px; font-size: 26px; }
.door-logo { display: block; width: 88px; height: 88px; border-radius: 20px; object-fit: cover; margin: 14px auto 0; box-shadow: 0 6px 18px rgba(0,0,0,.15); }
.door { display: flex; align-items: center; gap: 14px; text-align: start; background: #fff; border-radius: 18px; padding: 16px; margin: 12px 0;
  text-decoration: none; color: inherit; box-shadow: 0 2px 10px rgba(32,43,85,.08); border: 2px solid transparent; }
.door:active { border-color: var(--brand); transform: scale(.99); }
.door-icon { font-size: 34px; width: 56px; height: 56px; display: grid; place-items: center; background: #f1f3f9; border-radius: 14px; flex-shrink: 0; }
.door-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.door-text b { font-size: 19px; }
.door-text small { color: #6d6860; font-size: 13px; }
.door-go { font-size: 28px; color: #b4b0aa; }
[dir=rtl] .door-go { transform: scaleX(-1); }
.door-brand { margin-top: 22px; color: #8a8f9c; font-size: 13px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.door-brand img { width: 18px; height: 18px; }

/* phones: top bars wrap so the language buttons are never squeezed */
.lang-toggle { flex-shrink: 0; }
.k-top, .o-top { flex-wrap: wrap; }
.k-top .title { min-width: 0; }
.k-back { text-decoration: none; }
.door-back { color: inherit; opacity: .75; text-decoration: none; font-weight: 600; font-size: 14px; }
.kitchen .door-back { color: #fff; }
.door-now { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; background: #fff7e0; border: 1px solid #f0d58a; border-radius: 12px; padding: 8px 12px; margin: 12px 0 4px; font-size: 14px; }

/* ---------- owner panel: phone layout (bottom bar), icons, stations ---------- */
.o-logo { width: 36px; height: 36px; border-radius: 9px; object-fit: cover; flex: none; }
.o-top { flex-wrap: nowrap !important; gap: 8px; padding: 10px 12px; }
.o-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; }
.o-ic { display: inline-flex; align-items: center; gap: 6px; border: 0; background: #f1f3f9; border-radius: 12px; padding: 8px 12px; font-size: 20px;
  line-height: 1; text-decoration: none; color: inherit; cursor: pointer; flex: none; }
.o-ic span { font-size: 14px; font-weight: 700; }
.o-ic:active { transform: scale(.95); }
.o-tabs button i { font-style: normal; margin-inline-end: 6px; }
.o-more { display: grid; gap: 10px; padding-top: 4px; }
.o-addbtn { font-size: 17px; padding-inline: 22px; }
.o-addopt { width: 100%; border: 0; font: inherit; cursor: pointer; margin: 8px 0; }
.o-stchip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 10px; font: 600 13px system-ui, sans-serif; cursor: pointer; white-space: nowrap; }
.o-strow { display: flex; align-items: center; gap: 12px; width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 10px 12px; margin: 6px 0; font: inherit; cursor: pointer; }
.o-sticon { font-size: 26px; width: 44px; height: 44px; display: grid; place-items: center; background: #f1f3f9; border-radius: 12px; }
.o-icons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.o-icons button { font-size: 24px; width: 48px; height: 48px; border-radius: 12px; border: 2px solid var(--line); background: #fff; cursor: pointer; }
.o-icons button.on { border-color: var(--brand); background: #fff3ea; }
@media (max-width: 759px) {
  .o-ic span { display: none; }
  .o-ic { padding: 9px 10px; }
  .o-tabs { position: fixed; top: auto; bottom: 0; left: 0; right: 0; z-index: 20; border-top: 1px solid var(--line); border-bottom: 0;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); gap: 2px; overflow: visible; box-shadow: 0 -4px 18px rgba(0,0,0,.07); }
  .o-tabs button { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; border-radius: 12px; font-size: 11px; }
  .o-tabs button i { font-size: 22px; margin: 0; }
  .o-tabs button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .o-tabs button.on { background: #f1f3f9; color: var(--brand); }
  .o-main { padding-bottom: 96px; }
}

/* ---------- cash desk: counters, table map, quick cash ---------- */
.cd-main { padding-bottom: 40px; }
.cd-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.cd-stat { border-radius: 18px; padding: 14px 16px; color: #fff; display: flex; flex-direction: column; gap: 2px; box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.cd-stat small { opacity: .85; font-size: 13px; font-weight: 600; }
.cd-stat b { font-size: 24px; font-weight: 900; font-variant-numeric: tabular-nums; }
.cd-stat.got b { font-size: 20px; }
.cd-stat.sales { background: linear-gradient(135deg, #202B55, #3a4a8c); }
.cd-stat.got { background: linear-gradient(135deg, #1e8e4f, #36b36b); }
.cd-stat.left { background: linear-gradient(135deg, #8a8f9c, #a9adb8); }
.cd-stat.left.on { background: linear-gradient(135deg, #c0392b, #e8604c); }
.cd-stat b.bump { animation: cdbump .7s ease-out; }
@keyframes cdbump { 30% { transform: scale(1.12); } }
.cd-serve-note { background: #fff3d6; border: 2px solid #ffc845; border-radius: 14px; padding: 10px 14px; font-weight: 800; margin-bottom: 12px; }
.cd-switch { display: flex; background: #e9ebf2; border-radius: 14px; padding: 4px; margin-bottom: 12px; }
.cd-switch button { flex: 1; border: 0; background: transparent; border-radius: 11px; padding: 10px; font: 700 15px system-ui, sans-serif; cursor: pointer; }
.cd-switch button.on { background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.cd-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.cd-tile { position: relative; aspect-ratio: 1; border: 0; border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font: inherit; cursor: pointer; padding: 6px; transition: transform .12s; }
.cd-tile:active { transform: scale(.94); }
.cd-tile.free { background: #eceef3; color: #8a8f9c; }
.cd-tile.unpaid { background: #e8604c; color: #fff; box-shadow: 0 6px 16px rgba(232,96,76,.35); }
.cd-tile.paid { background: #36b36b; color: #fff; }
.cd-tn { font-size: 28px; font-weight: 900; line-height: 1; }
.cd-amt { font-size: 13px; font-weight: 800; background: rgba(0,0,0,.18); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.cd-sub { font-size: 12px; font-weight: 700; opacity: .9; }
.cd-name { font-size: 13px; font-weight: 800; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cd-tile.take .cd-tn { font-size: 22px; }
.cd-bell { position: absolute; top: -6px; inset-inline-end: -6px; background: #ffc845; border-radius: 50%; width: 28px; height: 28px; display: grid; place-items: center; font-size: 15px;
  box-shadow: 0 2px 6px rgba(0,0,0,.2); animation: kbpulse3 1s infinite alternate; }
@keyframes kbpulse3 { to { transform: scale(1.15); } }
.cd-h { margin: 18px 0 8px; }
.cd-serve { background: #ffc845; color: #3a2a00; font-weight: 800; }
.cd-report { display: block; width: 100%; margin-top: 22px; min-height: 54px; font-size: 17px; background: #202B55; }
.cd-sheet .cash-card { margin-bottom: 10px; }
.pay-quick { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 10px; }
.pay-quick button { flex: 1 1 28%; border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: 12px 6px; font: 800 15px system-ui, sans-serif; cursor: pointer; }
.pay-quick button:active { background: #f1f3f9; transform: scale(.96); }
.pay-quick [data-exact] { background: #202B55; color: #fff; border-color: #202B55; }
.pay-change-result { font-size: 26px !important; font-weight: 900; text-align: center; padding: 10px 0; }

/* ---------- inside the Android app only: press effect, shimmer placeholders ---------- */
.cc-app * { -webkit-tap-highlight-color: transparent; }
.cc-app button, .cc-app .btn, .cc-app .door, .cc-app .cd-tile, .cc-app .o-ic { transition: transform .12s ease, filter .12s ease; }
.cc-app button:active, .cc-app .btn:active, .cc-app .door:active, .cc-app .o-ic:active { transform: scale(.95); filter: brightness(.95); }
.cc-skel { padding: 16px; display: grid; gap: 12px; max-width: 900px; margin: 0 auto; }
.cc-skel-card { background: #fff; border-radius: 16px; padding: 16px; display: grid; gap: 10px; }
.cc-skel-card i { display: block; height: 14px; border-radius: 7px; background: linear-gradient(90deg, #eceef3 25%, #f8f9fc 50%, #eceef3 75%);
  background-size: 200% 100%; animation: ccshim 1.2s infinite linear; }
.cc-skel-card i:first-child { width: 45%; height: 20px; }
.cc-skel-card i:nth-child(2) { width: 92%; }
.cc-skel-card i:nth-child(3) { width: 68%; }
body.kitchen .cc-skel-card { background: #2d2a27; }
body.kitchen .cc-skel-card i { background: linear-gradient(90deg, #3a3734 25%, #4a4642 50%, #3a3734 75%); background-size: 200% 100%; }
@keyframes ccshim { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .cc-skel-card i { animation: none; } .cc-app button:active, .cc-app .btn:active { transform: none; } }

/* ---------- owner: orders tab ---------- */
.od-top { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; }
.od-top .o-ic[disabled] { opacity: .35; }
.od-date { position: relative; display: inline-flex; align-items: center; background: #f1f3f9; border-radius: 12px; padding: 9px 12px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.od-date input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.od-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-bottom: 14px; }
.od-card h3 { margin: 0 0 10px; font-size: 16px; }
.od-best { display: grid; grid-template-columns: 22px minmax(0, 1.4fr) 1fr 28px; align-items: center; gap: 8px; padding: 4px 0; font-size: 14px; }
.od-rank { width: 22px; height: 22px; border-radius: 50%; background: #f1f3f9; display: grid; place-items: center; font-weight: 800; font-size: 12px; }
.od-best:first-child .od-rank { background: #ffd54a; }
.od-bname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.od-bar { height: 10px; background: #f1f3f9; border-radius: 5px; overflow: hidden; }
.od-bar i { display: block; height: 100%; background: var(--brand); border-radius: 5px; }
.od-best b { text-align: end; }
.od-combos { font-size: 13px; margin-top: 8px; }
.od-hours { display: flex; align-items: flex-end; gap: 4px; height: 130px; padding-top: 18px; }
.od-hcol { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.od-hcol i { display: block; width: 100%; max-width: 34px; background: #c9cfe0; border-radius: 6px 6px 2px 2px; }
.od-hcol i.peak { background: var(--brand); }
.od-hcol small { font-size: 11px; color: #8a8f9c; margin-top: 4px; }
.od-hv { position: absolute; top: -16px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.od-tools { position: sticky; top: 0; z-index: 4; background: var(--bg); padding: 6px 0 10px; display: grid; gap: 8px; }
.od-search { width: 100%; font-size: 16px; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); }
.od-row { background: #fff; border-radius: 14px; margin-bottom: 8px; border-inline-start: 5px solid #c9cfe0; overflow: hidden; }
.od-row.st-unpaid { border-inline-start-color: #e8604c; }
.od-row.st-paid { border-inline-start-color: #36b36b; }
.od-row.st-rejected { opacity: .6; }
.od-main { display: flex; align-items: center; gap: 10px; padding: 11px 12px; cursor: pointer; }
.od-l { flex: 1; min-width: 0; }
.od-items { font-size: 13px; color: #6d6860; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.od-r { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; white-space: nowrap; }
.od-chev { color: #8a8f9c; font-size: 14px; }
.od-detail { padding: 0 12px 12px; border-top: 1px dashed var(--line); padding-top: 10px; font-size: 14px; }
.od-sub { font-size: 13px; color: #6d6860; padding-inline-start: 14px; }
.od-note { background: #fff3d6; border-radius: 8px; padding: 6px 10px; margin-top: 6px; font-size: 13px; }
@media (max-width: 759px) { .od-top .o-ic span { display: none; } }

.cd-stat b { white-space: nowrap; font-size: clamp(17px, 4.6vw, 24px); }
.cd-stat.got b { font-size: clamp(15px, 4vw, 20px); }

/* ---------- messages from Clic & Croc (announcements, subscription reminders) ---------- */
#cc-notices { display: grid; gap: 0; }
.cc-notice { display: flex; align-items: center; gap: 10px; padding: 10px 14px; font-size: 14px; font-weight: 600; }
.cc-notice span { flex: 1; }
.cc-notice.info { background: #e8ecfb; color: #2a3a8c; }
.cc-notice.warn { background: #fff1d6; color: #8a5a00; }
.cc-notice.bad { background: #c0392b; color: #fff; }
.cc-notice button { border: 0; background: transparent; color: inherit; font-size: 22px; line-height: 1; cursor: pointer; padding: 0 4px; }

/* ---------- guest menu, new look: banners, icon categories, most ordered, cards ---------- */
.g2-header { align-items: center; border-bottom: 0; padding: 14px 16px 6px; background: var(--bg); }
.g2-header .g-logo { width: 50px; height: 50px; border-radius: 14px; }
.g2-header .g-title { font-size: 19px; font-weight: 800; }
.g2-header .lang-toggle { transform: scale(.85); transform-origin: left center; margin-top: 2px; }
.g2-header .g-table, .g2-header .takeaway-badge { font-size: 14px; padding: 6px 12px; flex: none; }
.g2-banners { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 8px 0 4px; }
.g2-banners::-webkit-scrollbar { display: none; }
.g2-bn { flex: 0 0 100%; scroll-snap-align: center; box-sizing: border-box; padding: 0 16px; display: flex; }
.g2-bn > * { position: relative; }
.g2-bn { position: relative; }
.g2-bn::before { content: ''; position: absolute; inset: 0 16px; border-radius: 22px; background: var(--brand); }
.g2-bn-text { flex: 1; min-width: 0; padding: 18px 0 18px 18px; color: #fff; z-index: 1; }
.g2-bn-text h3 { margin: 0; font-size: 22px; line-height: 1.15; font-weight: 900; }
.g2-bn-text p { margin: 6px 0 0; font-size: 13px; opacity: .9; }
.g2-bn-price { margin-top: 8px; font-weight: 900; font-size: 17px; }
.g2-bn-go { margin-top: 10px; border: 0; background: #1c1b1a; color: #fff; border-radius: 999px; padding: 9px 16px; font: 800 14px system-ui, sans-serif; cursor: pointer; }
.g2-bn-img { flex: 0 0 42%; display: grid; place-items: center; padding: 12px 10px 12px 0; z-index: 1; }
.g2-bn-img img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 5px solid rgba(255,255,255,.85); box-shadow: 0 10px 24px rgba(0,0,0,.25); }
.g2-dots { display: flex; justify-content: center; gap: 5px; margin: 6px 0 2px; }
.g2-dots i { width: 7px; height: 7px; border-radius: 4px; background: #d8d3cb; transition: width .25s; }
.g2-dots i.on { width: 18px; background: var(--brand); }
.g2-cats { gap: 10px; padding: 10px 16px 8px; }
.g2-cats a { flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0; border: 0; background: none; min-width: 58px; font-size: 12px; font-weight: 700; color: var(--text); }
.g2-cats a b { width: 52px; height: 52px; border-radius: 16px; background: #fff; display: grid; place-items: center; font-size: 25px; font-weight: 400; box-shadow: 0 2px 8px rgba(0,0,0,.06); transition: transform .15s; }
.g2-cats a span { max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g2-cats a.on { background: none; color: var(--brand); }
.g2-cats a.on b { outline: 2.5px solid var(--brand); transform: translateY(-2px); }
.g2-pop h2 { margin-bottom: 8px; }
.g2-pop-row { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 8px; margin: 0 -16px; padding-inline: 16px; }
.g2-pop-row::-webkit-scrollbar { display: none; }
.g2-pc { flex: 0 0 140px; background: #fff; border-radius: 18px; padding: 8px; box-shadow: 0 3px 12px rgba(0,0,0,.06); }
.g2-pc-img { height: 96px; border-radius: 13px; overflow: hidden; background: #f1ece5; display: grid; place-items: center; font-size: 34px; }
.g2-pc-img img { width: 100%; height: 100%; object-fit: cover; }
.g2-pc-name { font-size: 13px; font-weight: 700; margin: 7px 2px 4px; line-height: 1.25; height: 2.5em; overflow: hidden; }
.g2-pc-row { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 0 2px; }
.g2-pc-price { color: var(--brand); font-weight: 800; font-size: 13px; }
.g2-plus { width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; flex: none; box-shadow: 0 3px 8px rgba(0,0,0,.18); }
.g2-plus:active { transform: scale(.9); }
.g-item { border-radius: 18px; box-shadow: 0 3px 12px rgba(0,0,0,.05); }
.g-item img { border-radius: 14px; }
.g-item .price { color: var(--brand); font-weight: 800; }
.g-item .qty button { box-shadow: 0 3px 8px rgba(0,0,0,.15); }
.g2-cartbar .btn { background: #1c1b1a; border-radius: 18px; gap: 12px; align-items: center; }
.g2-count { background: var(--brand); color: #fff; border-radius: 999px; padding: 2px 10px; font-size: 14px; }

/* owner: menu banners */
.o-bnrow { display: flex; align-items: center; gap: 12px; padding: 10px; margin-top: 10px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; background: #fff; }
.o-bnrow img, .o-bnph { width: 54px; height: 54px; border-radius: 12px; object-fit: cover; flex: none; display: grid; place-items: center; background: #f1f3f9; font-size: 24px; }
.o-bnpv { display: flex; align-items: center; gap: 10px; margin: -4px 0 10px; font-size: 14px; }
.o-bnpv img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }

.o-cat-head h3 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.g2-flash { animation: g2flash .9s ease-out; }
@keyframes g2flash { 0% { color: var(--brand); transform: translateX(6px); } 100% { transform: none; } }

/* guest: "Ma commande" bar (orders placed from this phone) + back to menu */
.g2-mine-box:empty { display: none; }
.g2-mine-box { padding: 4px 16px 2px; }
.g2-mine { width: 100%; display: flex; align-items: center; gap: 10px; border: 2px solid var(--brand); background: #fff; border-radius: 16px; padding: 10px 12px; font: inherit; cursor: pointer; text-align: start; box-shadow: 0 4px 14px rgba(0,0,0,.06); }
.g2-mine-ic { font-size: 22px; }
.g2-mine-t { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.g2-mine-t small { width: 100%; }
.g2-mine-go { color: var(--brand); font-weight: 800; white-space: nowrap; }
.g2-backrow { padding: 10px 16px 0; }
.g2-back { display: inline-flex; align-items: center; gap: 4px; background: #fff; border-radius: 999px; padding: 7px 14px; font-weight: 800; text-decoration: none; color: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,.06); }

/* customer: progress per counter (bar / kitchen) */
.rc-parts { max-width: 360px; margin: 12px auto 0; display: grid; gap: 6px; padding: 0 16px; }
.rc-part { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #fff; border-radius: 12px; padding: 9px 12px; font-size: 14px; box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.rc-part b { font-size: 13px; }
.rc-part.cooking b { color: #c77700; } .rc-part.ready b { color: #1e8e4f; } .rc-part.served b { color: #1e8e4f; } .rc-part.new b { color: #6d6860; }
.rc-part.served { opacity: .8; }

.rc-part span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-part b { flex: none; }

/* food court: brand switch on the guest menu */
.g3-brands { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; padding: 6px 16px 4px; }
.g3-brands button { display: flex; flex-direction: column; align-items: center; gap: 5px; border: 2px solid transparent; background: #fff; border-radius: 18px; padding: 8px 4px; cursor: pointer;
  font: 800 12px system-ui, sans-serif; color: var(--text); box-shadow: 0 2px 10px rgba(0,0,0,.06); transition: transform .15s; }
.g3-brands button img, .g3-brands .g3-bic { width: 52px; height: 52px; border-radius: 14px; object-fit: cover; display: grid; place-items: center; font-size: 28px; background: #f1ece5; }
.g3-brands button b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g3-brands button.on { border-color: var(--bc); background: color-mix(in srgb, var(--bc) 10%, #fff); transform: translateY(-2px); }
.g3-brands button.on b { color: var(--bc); }

#cc-demo-back { position: fixed; left: 12px; bottom: 84px; z-index: 60; background: #202B55; color: #B7F35A; font-weight: 800; border-radius: 999px; padding: 9px 14px; text-decoration: none; box-shadow: 0 6px 18px rgba(0,0,0,.25); font-size: 14px; }

/* ---------- loyalty card in the cart ---------- */
.loy-box { margin-top: 14px; padding: 12px 14px; border-radius: 16px; background: linear-gradient(135deg, #fff8ec, #fff1f4); border: 1px solid #f3d3b0; }
.loy-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.loy-ic { font-size: 26px; }
.loy-rule { font-size: 13px; color: #8a5a2b; }
.loy-box input[type=tel], .loy-box #lphone { width: 100%; box-sizing: border-box; padding: 11px 12px; border-radius: 12px; border: 1px solid #e8cfb2; font-size: 16px; background: #fff; }
.loy-dots { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0 4px; }
.loy-dots span { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid #e8cfb2; display: grid; place-items: center; font-size: 12px; }
.loy-dots span.on { background: var(--brand, #e8590c); border-color: var(--brand, #e8590c); }
.loy-count { font-size: 14px; margin: 4px 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.loy-tag { font-size: 12px; background: #e7f6ec; color: #1f7a3d; border-radius: 999px; padding: 2px 8px; }
.loy-ready { margin: 8px 0; padding: 10px; border-radius: 12px; background: #fff; border: 2px dashed var(--brand, #e8590c); font-size: 14px; }
.loy-use { display: flex; gap: 8px; align-items: center; margin-top: 8px; font-weight: 600; }
.loy-use input, .loy-wa input { width: 20px; height: 20px; }
.loy-small { font-size: 12px; color: #8a7a6a; margin-top: 6px; }
.loy-wa { display: flex; gap: 8px; align-items: center; font-size: 13px; margin-top: 8px; }
.loy-line { color: #1f7a3d; font-weight: 600; font-size: 15px; margin-top: 6px; }

/* ---------- owner: clients / loyalty ---------- */
.cl-prog { max-width: 640px; }
.cl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cl-types { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.cl-type input { display: none; }
.cl-type span { display: inline-block; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: 14px; cursor: pointer; }
.cl-type input:checked + span { border-color: var(--brand); background: var(--brand); color: #fff; }
.cl-preview { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: linear-gradient(135deg, #fff8ec, #fff1f4); border: 1px dashed #f0c48a; font-size: 14px; }
.cl-preview small { display: block; color: #8a7a6a; margin-bottom: 3px; }
.cl-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; max-width: 640px; }
.cl-stats div { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px; text-align: center; }
.cl-stats b { display: block; font-size: 22px; }
.cl-stats span { font-size: 12px; color: #7a7066; }
.cl-search { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); font-size: 15px; }
.cl-row { display: flex; gap: 10px; align-items: center; padding: 11px 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 8px; }
.cl-ph { flex: 1; min-width: 0; }
.cl-row .muted { font-size: 12px; }
.cl-prog-n { text-align: right; }
.cl-ready { display: block; font-size: 12px; color: #1f7a3d; font-weight: 700; }
.cl-wa { text-decoration: none; }

/* cash desk payment window: loyalty */
.pay-loy { margin: 10px 0; padding: 10px; border-radius: 14px; background: linear-gradient(135deg, #fff8ec, #fff1f4); border: 1px solid #f3d3b0; }
.pay-loy-card { margin-top: 8px; font-size: 15px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pay-loy-card .loy-small { width: 100%; margin: 0; }
.loy-use-btn { margin-top: 6px; width: 100%; background: #1f7a3d; }

/* ---------- owner: period report ---------- */
.op-chips { display: flex; max-width: 100%; flex-wrap: nowrap; overflow-x: auto; margin-bottom: 10px; padding-bottom: 2px; scrollbar-width: none; }
.op-chips button { white-space: nowrap; }
.op-custom { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-bottom: 10px; }
.op-custom label { display: flex; flex-direction: column; font-size: 12px; color: #7a7066; gap: 3px; flex: 1; min-width: 130px; }
.op-custom input { padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line); font-size: 15px; }
.op-title { font-size: 16px; }
.op-vs { display: block; margin-top: 4px; font-weight: 700; opacity: .95; }
.op-vs.up::first-letter { color: #7dffb0; }
.op-vs.down::first-letter { color: #ffb4a8; }
.op-mini { display: flex; gap: 8px; overflow-x: auto; margin: 10px 0 12px; scrollbar-width: none; }
.op-mini div { flex: 1 0 auto; min-width: 110px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 9px 11px; }
.op-mini b { display: block; font-size: 16px; white-space: nowrap; }
.op-mini span { font-size: 12px; color: #7a7066; }
.op-days { display: flex; align-items: flex-end; gap: 3px; height: 160px; padding: 24px 30px 0 4px; overflow-x: auto; }
.op-dcol { flex: 1 0 16px; height: 100%; overflow: visible; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.op-dcol i { display: block; width: 100%; max-width: 30px; background: #c9cfe0; border-radius: 5px 5px 2px 2px; }
.op-dcol i.peak { background: var(--brand); }
.op-dcol small { font-size: 10px; color: #8a8f9c; margin-top: 4px; white-space: nowrap; }
.op-dcol .od-hv { position: absolute; top: -19px; z-index: 1; font-size: 11px; font-weight: 700; white-space: nowrap; }
.op-dish { display: grid; grid-template-columns: 22px minmax(0, 1.4fr) 1fr 34px auto; align-items: center; gap: 8px; padding: 4px 0; font-size: 14px; }
.op-dish b { text-align: end; }
.op-dish > small { font-size: 12px; color: #7a7066; white-space: nowrap; min-width: 64px; text-align: end; }

/* cash desk: combined bill (several orders of a table) */
.grp-wrap { display: flex; gap: 8px; align-items: stretch; }
.grp-wrap > .cash-card { flex: 1; min-width: 0; }
.grp-wrap.off > .cash-card { opacity: .45; }
.grp-tick { display: flex; align-items: center; cursor: pointer; }
.grp-tick input { width: 26px; height: 26px; accent-color: #1f9e5a; }
.grp-bar { position: sticky; bottom: -1px; display: flex; gap: 8px; align-items: center; margin: 12px -4px -4px; padding: 12px; background: #202B55; color: #fff; border-radius: 16px; }
.grp-bar .grp-sum { flex: 1; font-size: 13px; color: #C9D0EA; }
.grp-bar .grp-sum b { color: #fff; font-size: 16px; }
.grp-bar .grp-total { font-size: 20px; font-weight: 800; color: #B7F35A; }
.grp-bar .btn.ok { min-height: 50px; }
.grp-note { font-size: 12px; color: #1f7a3d; font-weight: 700; margin-left: 6px; }

/* app-style confirmation window */
.cc-ask-back { position: fixed; inset: 0; z-index: 1000; background: rgba(12,17,38,.55); display: flex; align-items: center; justify-content: center; padding: 20px; animation: ccAskIn .15s ease-out; }
.cc-ask { background: #fff; color: #1f1d1a; width: 100%; max-width: 380px; border-radius: 20px; padding: 22px 20px 18px; text-align: center; box-shadow: 0 18px 50px rgba(0,0,0,.35); border-top: 6px solid #B7F35A; }
.cc-ask-logo { width: 52px; height: 52px; border-radius: 14px; display: block; margin: 0 auto 12px; }
.cc-ask-text { font-size: 18px; line-height: 1.4; font-weight: 600; margin-bottom: 20px; white-space: pre-line; }
.cc-ask-btns { display: flex; gap: 10px; }
.cc-ask-btns button { flex: 1; min-height: 52px; border-radius: 14px; font-size: 17px; font-weight: 700; border: 0; cursor: pointer; font-family: inherit; }
.cc-ask-no { background: #eef0f6; color: #202B55; }
.cc-ask-yes { background: #202B55; color: #B7F35A; }
.cc-ask-yes.danger { background: #c0392b; color: #fff; }
.cc-ask-btns button:focus-visible { outline: 3px solid #B7F35A; outline-offset: 2px; }
@keyframes ccAskIn { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .cc-ask-back { animation: none; } }
