@import url("fonts.css");

/* RITS Dine - styles
   Brand colours come from the RITS Dine logo. Change them here only.
   POS button sizes come from Back office > Settings (--cat-w, --item-w ...). */
:root {
  --teal: #079e9b;
  --teal-dark: #057c79;
  --teal-soft: #dff2f1;
  --ink: #303538;
  --flame: #f56d02;
  --flame-soft: #fff0e4;
  --bg: #eef2f2;
  --line: #d5dede;
  --muted: #626c6e;   /* 8.3.20: a little darker - small grey labels read at 4.5:1 */
  --red: #c8372d;
  --white: #fff;
  --font: "Inter", "Noto Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
  --cat-w: 150px; --cat-h: 56px; --item-w: 140px; --item-h: 110px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 15px/1.45 var(--font); color: var(--ink); background: var(--bg); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--flame); outline-offset: 2px; }
a { color: var(--teal-dark); }
small { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
h1 { font-size: 26px; margin: 0 0 18px; font-weight: 700; }
h2 { font-size: 19px; margin: 22px 0 10px; }
h3 { font-size: 15px; margin: 16px 0 8px; color: var(--muted); }
.muted { color: var(--muted); } .center { text-align: center; } .bad { color: var(--red); font-weight: 600; }

/* ---------- Buttons and forms ---------- */
.btn { border: 1px solid var(--line); background: var(--white); border-radius: 8px; padding: 10px 16px; min-height: 44px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn.primary, .btn.dark { background: var(--ink); color: var(--white); border-color: var(--ink); }
.btn.primary { background: var(--teal); border-color: var(--teal); font-weight: 600; }   /* 8.3.20: bold - reads on the theme colour */
.btn.danger { background: var(--red); color: var(--white); border-color: var(--red); }
.btn.big { width: 100%; padding: 14px; font-size: 17px; font-weight: 600; }
.btn.small { min-height: 34px; padding: 5px 10px; font-size: 13px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.link { background: none; border: 0; color: var(--teal-dark); text-decoration: underline; padding: 4px; }
label { display: block; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
input, select, textarea { display: block; width: 100%; margin-top: 4px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--white); font-size: 15px; }
input[type=color] { padding: 2px; height: 42px; }
input:focus, select:focus { border-color: var(--teal); outline: none; }
label.check { display: flex; gap: 8px; align-items: center; color: var(--ink); }
label.check input { width: auto; margin: 0; }
.row { display: flex; gap: 10px; justify-content: flex-end; align-items: center; margin-top: 16px; flex-wrap: wrap; }
.row .btn { min-height: 52px; min-width: 110px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
.alert { padding: 12px 14px; border-radius: 8px; margin-bottom: 14px; border-left: 5px solid; background: var(--white); }
.alert.ok { border-color: var(--teal); } .alert.err { border-color: var(--red); color: var(--red); }
.alert.warn { border-color: var(--flame); }
.tr { display: flex; gap: 6px; align-items: flex-end; } .tr input { flex: 1; } .tr .btn { min-height: 42px; }

/* ---------- Login and installer ---------- */
body.auth { display: grid; place-items: center; min-height: 100%; padding: 20px;
  background: linear-gradient(160deg, var(--teal) 0 38%, var(--bg) 38%); }
.card { background: var(--white); border-radius: 14px; padding: 28px; width: 100%; max-width: 380px; box-shadow: 0 12px 40px rgba(3, 60, 58, .18); }
.card.wide { max-width: 720px; }
.card .logo { display: block; width: 190px; margin: -6px auto 12px; }
.card h1 { text-align: center; }
details { margin: 10px 0 14px; } summary { cursor: pointer; color: var(--teal-dark); margin-bottom: 10px; }

/* ---------- POS: top bar ---------- */
body.pos { display: flex; flex-direction: column; height: 100vh; overflow: hidden; user-select: none; }
.posbar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--ink); color: var(--white);
  flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.posbar::-webkit-scrollbar { display: none; }
.posbar > * { flex: 0 0 auto; }
.homebtn { border: 0; background: var(--white); border-radius: 8px; padding: 3px 6px; height: 44px; }
.homebtn img { height: 38px; display: block; }
.where { font-size: 18px; font-weight: 700; padding: 0 6px; }
.tool { border: 1px solid #596064; background: none; color: var(--white); border-radius: 8px; padding: 4px 10px;
  min-height: 44px; white-space: nowrap; text-decoration: none; display: inline-flex; flex-direction: column;
  justify-content: center; align-items: center; line-height: 1.15; font-size: 14px; }
.tool small { color: #aeb7b9; font-size: 11px; }
@media (max-width: 1200px) { .tool small { display: none; } .where { font-size: 16px; } }
@media (max-width: 820px) { .tool { padding: 4px 8px; font-size: 13px; } .clock { display: none; } }
.spacer { flex: 1; } .me, .clock { color: #cfd6d7; font-size: 14px; } .clock { font-weight: 700; font-size: 16px; }
.screen { flex: 1; min-height: 0; overflow: auto; }

/* ---------- POS: start screen ---------- */
#scrStart { padding: 24px; }
.bigtypes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; max-width: 1000px; margin: 0 auto; }
.bigtypes button { aspect-ratio: 1.35; border: 0; border-radius: 18px; color: var(--white); font-size: 30px; font-weight: 700;
  display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(0, 0, 0, .12); }
.bigtypes button small { color: rgba(255, 255, 255, .9); font-size: 22px; }
.bigtypes .ico { width: 62px; height: 62px; display: block; margin: 0 auto 4px; }
.bigtypes [data-start=dine_in] { background: var(--teal); }
.bigtypes [data-start=takeaway] { background: var(--flame); }
.bigtypes [data-start=delivery] { background: var(--ink); }
.bigtypes button:active { transform: scale(.98); }
.runhead { max-width: 1000px; margin: 28px auto 10px; }
.runhead span { background: var(--flame); color: var(--white); border-radius: 12px; padding: 0 9px; font-size: 14px; }
.running { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; max-width: 1000px; margin: 0 auto; }
.runcard { text-align: left; border: 1px solid var(--line); border-left: 6px solid var(--teal); border-radius: 10px; background: var(--white); padding: 10px 12px; display: grid; }
.runcard.t-takeaway { border-left-color: var(--flame); } .runcard.t-delivery { border-left-color: var(--ink); }
.runcard b { font-size: 17px; } .runcard span { font-size: 13px; color: var(--muted); } .runcard em { font-style: normal; font-weight: 700; font-size: 17px; }

/* ---------- POS: tables ---------- */
#scrTables { padding: 16px; }
.areas { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.areas button { border: 1px solid var(--line); background: var(--white); border-radius: 22px; padding: 10px 20px; font-weight: 600; min-height: 44px; }
.areas button.on { background: var(--ink); color: var(--white); border-color: var(--ink); }
.tablemap { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.tbl { aspect-ratio: 1.2; border-radius: 14px; border: 2px solid var(--teal); background: var(--teal-soft); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.tbl b { font-size: 26px; } .tbl.busy { border-color: var(--flame); background: var(--flame-soft); } .tbl.busy small { color: var(--ink); font-weight: 600; }

/* ---------- POS: order screen ---------- */
.poswrap { display: grid; grid-template-columns: var(--cat-w) 1fr 380px; overflow: hidden; }
.catcol { display: flex; flex-direction: column; min-height: 0; background: var(--white); border-right: 1px solid var(--line); }
.cats { flex: 1; overflow-y: auto; }
.cats button { display: block; width: 100%; min-height: var(--cat-h); text-align: left; border: 0; border-bottom: 1px solid var(--line);
  background: none; padding: 8px 10px; font-weight: 600; border-left: 6px solid var(--line); line-height: 1.2; }
.cats button.on { background: var(--teal-soft); border-left-color: var(--teal) !important; }
.menuwrap { display: flex; flex-direction: column; min-height: 0; }
.search { margin: 10px 12px 0; width: auto; }
.menu { flex: 1; overflow-y: auto; padding: 10px 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--item-w), 1fr));
  grid-auto-rows: var(--item-h); gap: 10px; align-content: start; }
.item { position: relative; border: 1px solid var(--line); background: var(--white); border-radius: 12px; padding: 8px 10px; text-align: left;
  display: flex; flex-direction: column; font-weight: 600; line-height: 1.2; overflow: hidden; }
.item span { line-height: 1.2; overflow-wrap: anywhere; display: block; padding-right: 34px; }   /* never under the code */
.item small { color: inherit; opacity: .8; line-height: 1.15; display: block; overflow-wrap: anywhere; }
.item b { margin-top: auto; font-size: 16px; }
.item i { position: absolute; top: 6px; right: 8px; font-style: normal; font-size: 11px; opacity: .7; max-width: 32px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.catfind { width: calc(100% - 16px); margin: 8px; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line); flex: 0 0 auto; }
.item.hasimg { padding-top: 0; } .item img { width: calc(100% + 20px); margin: 0 -10px 4px; height: 45%; object-fit: cover; }
.item:active { transform: scale(.97); }
.empty { color: var(--muted); padding: 20px; list-style: none; text-align: center; grid-column: 1 / -1; }

.ticket { display: flex; flex-direction: column; background: var(--white); border-left: 1px solid var(--line); min-height: 0; }
.tkhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.tkhead strong { display: block; font-size: 18px; } .tkhead span { font-size: 13px; color: var(--muted); }
.tkbtns { display: flex; gap: 6px; }
.lines { list-style: none; margin: 0; padding: 0; flex: 1; overflow-y: auto; }
.lines li { display: grid; grid-template-columns: 1fr auto 70px; gap: 8px; align-items: center; padding: 7px 14px; border-bottom: 1px solid var(--bg); }
.lines li.unsent { background: #fffaf3; box-shadow: inset 4px 0 var(--flame); }
.lines li.empty { display: block; }
.lines.split li { grid-template-columns: 1fr auto; }
.ln span { font-weight: 600; } .ln .mods { color: var(--teal-dark); } .ln .note { color: var(--flame); }
.qty { display: flex; align-items: center; gap: 4px; }
.qty button { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); font-size: 20px; }
.qty b { min-width: 28px; text-align: center; }
.amt { text-align: right; font-weight: 600; }
.totals { padding: 8px 14px; border-top: 1px solid var(--line); }
.totals div { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.totals .grand { font-size: 22px; font-weight: 700; color: var(--ink); }
.tkactions { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; padding: 0 14px 8px; }
.tkactions .btn { min-height: 52px; font-weight: 600; }
.btn.pay { background: var(--flame); border-color: var(--flame); color: var(--white); font-size: 21px; font-weight: 700; min-height: 62px; border-radius: 12px; }
.ticket > .btn.pay { margin: 0 14px 14px; }
.row .btn.pay { min-height: 56px; font-size: 19px; padding: 0 28px; }
.mobilebar { display: none; }

/* ---------- Modals ---------- */
.modal { position: fixed; inset: 0; background: rgba(20, 30, 32, .55); display: none; place-items: center; z-index: 50; padding: 16px; }
.modal.top { z-index: 70; }
.modal.show { display: grid; }
.box { background: var(--white); border-radius: 14px; padding: 20px 22px; width: 100%; max-width: 600px; max-height: 94vh; overflow-y: auto; }
.box.small { max-width: 380px; }
.box h2 { margin-top: 0; } .box h2 small { display: inline; font-size: 15px; }
.tablegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.tablegrid button { min-height: 70px; border-radius: 10px; border: 2px solid var(--teal); background: var(--teal-soft); font-size: 18px; font-weight: 700; }
.openlist button, .found button { display: grid; grid-template-columns: 110px 1fr auto; width: 100%; text-align: left; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--white); margin-bottom: 6px; }
.found button { display: block; } .found { margin: -6px 0 10px; }
.openlist em { font-style: normal; font-weight: 700; }
.actgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.actgrid button { min-height: 72px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); font-size: 17px; font-weight: 600; }
.actgrid button.danger { background: #fbe9e7; color: var(--red); border-color: #efc1bb; }
.seg { display: flex; gap: 6px; margin-bottom: 14px; }
.seg button { flex: 1; min-height: 52px; border: 2px solid var(--line); border-radius: 10px; background: var(--white); font-weight: 600; }
.seg button.on { border-color: var(--teal); background: var(--teal-soft); }
.qtybig { display: flex; align-items: center; justify-content: center; gap: 18px; margin-bottom: 12px; }
.qtybig button { width: 64px; height: 56px; font-size: 28px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.qtybig b { font-size: 30px; min-width: 50px; text-align: center; }
.modgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 14px; }
.mod { display: block; border: 2px solid var(--line); border-radius: 10px; padding: 10px; color: var(--ink); font-weight: 600; margin: 0; cursor: pointer; }
.mod input { display: none; } .mod.on { border-color: var(--teal); background: var(--teal-soft); }
.paytotal { display: flex; justify-content: space-between; align-items: center; background: var(--ink); color: var(--white); border-radius: 10px; padding: 10px 16px; }
.paytotal b { font-size: 34px; } .paytotal small { color: #ffc79b; }
.payfields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.payfields button { border: 2px solid var(--line); border-radius: 10px; background: var(--white); padding: 8px 12px; text-align: left; font-size: 26px; font-weight: 700; }
.payfields button.on { border-color: var(--teal); background: var(--teal-soft); }
.quick { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.quick button { flex: 1; min-height: 48px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); font-weight: 600; }
.quick [data-disc] { background: var(--flame-soft); border-color: #f7c79e; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.keypad button { min-height: 54px; font-size: 22px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.paysum { display: flex; justify-content: space-between; margin-top: 10px; font-size: 16px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--white);
  padding: 12px 20px; border-radius: 10px; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 90; max-width: 90vw; }
.toast.show { opacity: 1; } .toast.bad { background: var(--red); }

/* Tablets and phones */
@media (max-width: 1100px) { .poswrap { grid-template-columns: var(--cat-w) 1fr 330px; } .me { display: none; } }
@media (max-width: 800px) {
  .posbar .tool small, .clock { display: none; } .posbar a.tool:not(.out) { display: none; }
  #scrStart { padding: 12px; } .bigtypes { gap: 8px; } .bigtypes button { font-size: 18px; aspect-ratio: 1; } .bigtypes .ico { width: 40px; height: 40px; } .bigtypes button small { font-size: 14px; }
  .poswrap { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .cats { display: flex; overflow-x: auto; border: 0; }
  .cats button { flex: 0 0 auto; width: auto; min-height: 52px; border-left: 0 !important; border-bottom: 4px solid transparent; }
  .cats button.on { border-bottom-color: var(--teal); }
  .menu { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); grid-auto-rows: 96px; padding-bottom: 80px; }
  .ticket { position: fixed; inset: 0 0 64px 0; z-index: 20; transform: translateY(100%); transition: transform .2s; }
  .ticket.open { transform: none; }
  .mobilebar { display: flex; gap: 8px; justify-content: center; align-items: center; position: fixed; left: 0; right: 0; bottom: 0;
    height: 64px; border: 0; background: var(--teal); color: var(--white); font-size: 17px; z-index: 30; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
}

/* ---------- Back office ---------- */
.topbar { display: flex; align-items: center; gap: 16px; padding: 8px 20px; background: var(--ink); color: var(--white); flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--white); text-decoration: none; font-size: 19px; }
.brand img { height: 36px; background: var(--white); border-radius: 6px; padding: 2px 4px; }
.brand b { color: #4fd3cf; }
.topbar nav { display: flex; gap: 2px; flex: 1; flex-wrap: wrap; }
.topbar nav a { color: #cfd6d7; text-decoration: none; padding: 8px 11px; border-radius: 8px; }
.topbar nav a.on { background: var(--teal); color: var(--white); }
.who { font-size: 14px; } .who small { display: inline; color: #9aa4a6; } .who a { color: #4fd3cf; margin-left: 8px; }
.page { max-width: 1200px; margin: 0 auto; padding: 24px 20px; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin-bottom: 18px; }
.panel > h2:first-child { margin-top: 0; }
.panel.danger { border-color: #e7b8b3; }
table.list { width: 100%; border-collapse: collapse; background: var(--white); }
table.list th, table.list td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
table.list th { font-size: 13px; color: var(--muted); font-weight: 600; background: #f7f9f9; }
table.list td.n, table.list th.n { text-align: right; }
table.list tr.off td { color: var(--muted); text-decoration: line-through; }
.swatch { display: inline-block; width: 16px; height: 16px; border-radius: 4px; vertical-align: middle; border: 1px solid var(--line); }
.thumb { width: 44px; height: 34px; object-fit: cover; border-radius: 6px; vertical-align: middle; }
.inline { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.inline label { margin: 0; flex: 1; min-width: 120px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 18px; }
.stats div { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.stats b { display: block; font-size: 23px; }
.up { color: #11865a; font-weight: 600; } .down { color: var(--red); font-weight: 600; }
.chart { width: 100%; height: 220px; display: block; }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 20px; }

/* 2.1: day start box, timers, waiter picker */
.daybox { max-width: 1000px; margin: 0 auto 20px; background: var(--white); border: 2px dashed var(--flame); border-radius: 16px; padding: 30px; text-align: center; }
.daybox h2 { margin-top: 0; } .daybox .btn.pay { padding: 0 40px; }
.runcard small.late, .tbl small.tm { color: var(--red); font-weight: 600; }
.tbl small.tm { color: var(--ink); }
.tablegrid button.on { background: var(--teal); color: var(--white); }
@media print { .topbar, .foot, .noprint { display: none !important; } body { background: #fff; } .page { max-width: none; padding: 0; } .panel { border: 0; padding: 0; } table.list th, table.list td { padding: 4px 6px; font-size: 12px; } }
/* Reports */
.rephead { display: grid; grid-template-columns: 1fr 1.4fr 1fr; align-items: center; margin-bottom: 10px; }
.rephead h2 { margin: 0; } .rephead .c { text-align: center; } .rephead .r { text-align: right; }
.tablewrap { overflow-x: auto; }
table.list tr.tot td { font-weight: 700; border-top: 2px solid var(--ink); background: #f7f9f9; }
optgroup { font-weight: 700; }
@media print { @page { size: A4; margin: 12mm; } .report table.list { font-size: 11px; } h1 { display: none; } }
/* 8.3.30: every report fits an A4 page (portrait): no floating buttons on the paper (they made an extra empty page),
   wide tables use the whole width, smaller letters and wrap long words instead of running off the right side */
@media print {
  .botwrap, .botbtn, .botpanel, .toast, .modal, .navtoggle { display: none !important; }
  html, body { width: auto !important; min-width: 0 !important; }
  .tablewrap { overflow: visible !important; }
  .report table.list, table.list { width: 100% !important; max-width: 100%; table-layout: auto; }
  .report table.list th, .report table.list td { white-space: normal !important; overflow-wrap: anywhere; word-break: normal; }
  .report table.list.wide th, .report table.list.wide td { padding: 2px 3px; font-size: 8.5px; }
  .report table.list.mid th, .report table.list.mid td { padding: 3px 4px; font-size: 9.5px; }
  .report table.list tr { break-inside: avoid; } .report table.list thead { display: table-header-group; }
}

/* 2.2: start steps */
.steps { display: flex; justify-content: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.steps b { padding: 6px 14px; border-radius: 20px; background: var(--bg); color: var(--muted); font-size: 14px; }
.steps b.on { background: var(--flame); color: var(--white); } .steps b.done { background: var(--teal); color: var(--white); }

/* Toggle switch */
label.switch { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 15px; cursor: pointer; }
label.switch input { display: none; }
label.switch span { width: 46px; height: 26px; border-radius: 13px; background: #c6cfd0; position: relative; flex: none; transition: background .2s; }
label.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .2s; }
label.switch input:checked + span { background: var(--teal); }
label.switch input:checked + span::after { left: 23px; }
label.switch input:disabled + span { opacity: .6; }
label.switch small { display: inline; }
/* Reservations */
.tbl.reserved { border-color: #7b4fb5; background: #f1eafb; }
.tbl.reserved small.rs { color: #5b2f95; font-weight: 700; }
.reslist button { grid-template-columns: 70px 1fr auto; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; background: var(--bg); }
.badge.booked { background: #f1eafb; color: #5b2f95; } .badge.seated { background: var(--teal-soft); color: var(--teal-dark); }
.badge.cancelled, .badge.no_show { background: #fbe9e7; color: var(--red); }
/* Purchase entry screen */
table.list.buy td, table.list.buy th { padding: 4px 6px; }
table.list.buy input, table.list.buy select { margin: 0; padding: 6px 8px; }
table.list.buy .n input { text-align: right; }
.sumbox { border-collapse: collapse; min-width: 260px; }
.sumbox td { padding: 4px 10px; } .sumbox .tot td { font-weight: 700; font-size: 17px; border-top: 2px solid var(--ink); }

/* ---------- Customer phone page (QR ordering) ---------- */
body.guest { background: var(--bg); padding-bottom: 80px; }
.guesthead { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--ink); color: var(--white); position: sticky; top: 0; z-index: 10; }
.guesthead img { height: 36px; background: var(--white); border-radius: 6px; padding: 2px; }
.guesthead small { color: #cfd6d7; }
.tablechip { margin-left: auto; background: var(--flame); border-radius: 14px; padding: 4px 12px; font-weight: 700; }
.guestwrap { max-width: 720px; margin: 0 auto; padding: 12px; }
.gcats { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; }
.gcats button { flex: 0 0 auto; border: 1px solid var(--line); background: var(--white); border-radius: 20px; padding: 8px 16px; font-weight: 600; }
.gcats button.on { background: var(--teal); border-color: var(--teal); color: var(--white); }
.gcats button.on small { color: rgba(255,255,255,.85); }
.gitems { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.gitem { border: 1px solid var(--line); background: var(--white); border-radius: 12px; padding: 10px; text-align: left; font-weight: 600; overflow: hidden; }
.gitem img { width: calc(100% + 20px); margin: -10px -10px 6px; height: 110px; object-fit: cover; }
.gitem .offer, .item .offer { display: inline-block; background: #c62828; color: #fff; font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 6px; margin: 2px 0; }
.gitem s { color: #888; font-weight: 400; font-size: .85em; }
.item b s { color: rgba(255,255,255,.75); font-weight: 400; font-size: .85em; margin-right: 3px; }
.gitem .combo, .item .combo { display: block; color: #666; font-weight: 400; font-size: 11px; line-height: 1.25; }
.ticket .promo { display: block; color: #c62828; font-size: 11px; font-weight: 600; }
.gitem b { display: block; margin-top: 6px; color: var(--teal-dark); }
.cartbar { position: fixed; left: 0; right: 0; bottom: 0; height: 64px; border: 0; background: var(--flame); color: var(--white);
  font-size: 17px; display: flex; align-items: center; justify-content: center; gap: 10px; z-index: 20; }
.cartbar em { font-style: normal; text-decoration: underline; }
.statusbar { position: fixed; left: 0; right: 0; bottom: 64px; background: var(--teal); color: var(--white); padding: 8px 14px; text-align: center; z-index: 19; }
/* ---------- QR orders waiting at the counter ---------- */
.qralert { background: var(--red); color: var(--white); padding: 10px 14px; display: flex; align-items: center; gap: 12px; font-weight: 700; }
.qralert button { border: 1px solid #fff; background: none; color: #fff; border-radius: 8px; padding: 6px 14px; }
.blink { animation: blink 1s steps(2, start) infinite; }
@keyframes blink { to { opacity: .45; } }
/* QR cards for the tables */
.qrcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.qrcard { border: 1px dashed var(--line); border-radius: 12px; padding: 12px; text-align: center; background: var(--white); }
.qrcard .big { font-size: 22px; font-weight: 700; margin: 4px 0 8px; }
.qrcard .qrbox { width: 140px; margin: 0 auto 8px; }
/* 8.3.30: only the QR-cards page hides its table when printing (this rule hid EVERY report table - reports printed blank) */
@media print { body:has(.qrcards) table.list { display: none !important; } .qrcards { grid-template-columns: repeat(3, 1fr); } }
/* Kiosk */
.token { font-size: 90px; font-weight: 800; text-align: center; color: var(--teal); line-height: 1.1; }
.ar { direction: rtl; }
/* Waiting area screen */
body.calldisplay { background: var(--ink); color: var(--white); height: 100vh; display: flex; flex-direction: column; }
body.calldisplay header { display: flex; align-items: center; gap: 12px; padding: 10px 20px; font-size: 22px; }
body.calldisplay header img { height: 40px; background: #fff; border-radius: 8px; padding: 3px; }
body.calldisplay header span { margin-left: auto; color: #e6ecee; }
/* the two buttons of the waiting-area screen: white text on a solid dark button, readable on the teal and the grey panels */
body.calldisplay .dispbtn { position: fixed; bottom: 16px; z-index: 5; background: #11181b; color: #ffffff; border: 2px solid #ffffff;
  border-radius: 10px; padding: 10px 16px; font-size: 16px; font-weight: 600; min-height: 44px; box-shadow: 0 2px 8px rgba(0,0,0,.45); }
body.calldisplay main { flex: 1; display: grid; grid-template-columns: 2fr 1fr; gap: 20px; padding: 20px; min-height: 0; }
body.calldisplay .now { background: var(--teal); border-radius: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
body.calldisplay .now small, body.calldisplay .prev small { font-size: 22px; color: rgba(255,255,255,.85); }
#bigNo { font-size: 26vh; font-weight: 800; line-height: 1; }
#bigName { font-size: 4vh; }
body.calldisplay .prev { background: #3c4245; border-radius: 20px; padding: 20px; text-align: center; }
#prevList { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 12px; }
#prevList span { background: #55605f; border-radius: 12px; padding: 8px 18px; font-size: 5vh; font-weight: 700; }
/* Numbers waiting to be collected, on the POS start screen */
.readybar { max-width: 1000px; margin: 0 auto 14px; background: var(--white); border: 1px solid var(--line); border-left: 6px solid var(--teal);
  border-radius: 10px; padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.readybar b { margin-right: 6px; }
.rdy { display: inline-flex; align-items: center; gap: 6px; background: var(--bg); border-radius: 20px; padding: 4px 6px 4px 12px; }
.rdy em { font-style: normal; font-weight: 700; font-size: 20px; }
/* Main menu with sub-menus */
.mgroup { position: relative; }
.mgroup > button { background: none; border: 0; color: #fff; font: inherit; font-weight: 600; padding: 8px 12px; border-radius: 8px; cursor: pointer; }
.mgroup > button i { font-style: normal; opacity: .6; margin-left: 4px; font-size: 11px; }
.mgroup:hover > button, .mgroup.open > button { background: rgba(255,255,255,.12); color: var(--white); }
.mgroup.on > button { background: var(--teal); color: var(--white); }
.msub { display: none; position: absolute; left: 0; top: 100%; z-index: 40; min-width: 230px; background: var(--white);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 22px rgba(0,0,0,.16); padding: 6px; }
.mgroup:hover .msub, .mgroup.open .msub { display: block; }
.msub a, .msub a small, .msub a:visited { display: block; padding: 9px 12px; border-radius: 8px; color: #000; font-weight: 600; }
.msub a.on, .msub a.on small { color: #fff; }
.msub a:hover { background: var(--bg); }
/* 8.3.19: sub-menu inside a menu (Reports > VAT reports) - opens in place, works with touch */
.msubg > summary { padding: 9px 12px; border-radius: 8px; color: #000; font-weight: 600; cursor: pointer; list-style: none; }
.msubg > summary::-webkit-details-marker { display: none; }
.msubg > summary::after { content: ' \25B8'; opacity: .6; }
.msubg[open] > summary::after { content: ' \25BE'; }
.msubg > summary:hover { background: var(--bg); }
.msubg > a { padding-left: 26px; font-weight: 500; }
.msub a.on { background: var(--teal); color: var(--white); }
@media (max-width: 800px) { .msub { position: static; box-shadow: none; border: 0; padding: 0; } .mgroup.open .msub { display: block; } }

/* ---------- Owner dashboard ---------- */
body.owner { background: var(--bg); }
.ownerhead { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--ink); color: var(--white); position: sticky; top: 0; z-index: 10; }
.ownerhead img { height: 34px; background: var(--white); border-radius: 6px; padding: 2px; }
.ownerhead small { display: block; color: #cfd6d7; }
.ownerhead .btn { margin-left: auto; }
.ownerwrap { max-width: 1000px; margin: 0 auto; padding: 12px; }
.ranges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; align-items: center; }
.ranges button[data-r] { border: 1px solid var(--line); background: var(--white); border-radius: 18px; padding: 7px 14px; font-weight: 600; }
.ranges button[data-r].on { background: var(--teal); border-color: var(--teal); color: var(--white); }
.ownercards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.ocard { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.ocard small { color: var(--muted); display: block; }
.ocard b { font-size: 24px; display: block; margin-top: 2px; }
.ocard i { font-style: normal; color: var(--muted); font-size: 12px; }
.ownercards.small .ocard b { font-size: 18px; }
.ainote { background: #eef7f7; border-left: 5px solid var(--teal); border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 140px; }
.bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.bar span { width: 100%; background: var(--teal); border-radius: 4px 4px 0 0; }
.bar small { font-size: 10px; color: var(--muted); }

/* ---------- RITS Bot ---------- */
.botwrap { position: fixed; right: 16px; bottom: 16px; z-index: 60; }
body.pos .botbtn { width: 46px; height: 46px; font-size: 20px; opacity: .9; }
.botbtn { width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--teal); color: #fff; font-size: 26px; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.botpanel { width: min(360px, 92vw); height: min(520px, 76vh); background: var(--white); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25); display: flex; flex-direction: column; overflow: hidden; }
.botpanel header { display: flex; align-items: center; gap: 8px; background: var(--ink); color: #fff; padding: 8px 12px; }
.botpanel header select { margin-left: auto; padding: 3px 6px; border-radius: 6px; }
.botpanel header button { background: none; border: 0; color: #fff; font-size: 16px; }
.botlog { flex: 1; overflow: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
.botlog .bot, .botlog .me { padding: 9px 12px; border-radius: 12px; max-width: 86%; line-height: 1.45; }
.botlog .bot { background: var(--white); border: 1px solid var(--line); align-self: flex-start; }
.botlog .me { background: var(--teal); color: #fff; align-self: flex-end; }
.botask { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--line); }
.botask input { flex: 1; margin: 0; }
.botask button { padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--white); }
.botask button.on { background: var(--flame); color: #fff; }
.botfoot { display: block; text-align: center; color: var(--muted); padding: 4px 0 8px; font-size: 11px; }

/* ---------- Search anything, and the text size buttons ---------- */
.omni { position: relative; margin-left: auto; }
.omni input { width: 230px; margin: 0; padding: 7px 10px; border-radius: 18px; border: 1px solid #45525455; background: rgba(255,255,255,.12); color: #fff; }
.omni input::placeholder { color: #cfd6d7; }
.omnibox { position: absolute; right: 0; top: 110%; width: 340px; max-height: 60vh; overflow: auto; background: var(--white);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 22px rgba(0,0,0,.18); padding: 6px; z-index: 50; }
.omnibox a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--ink); font-weight: 600; }
.omnibox a:hover { background: var(--bg); }
.omnibox a small { display: block; color: var(--muted); font-weight: 400; font-size: 11px; }
.omnibox .muted { display: block; padding: 8px 10px; }
.textsize { display: flex; gap: 4px; margin: 0 10px; }
.textsize button { border: 1px solid #45525455; background: rgba(255,255,255,.12); color: #fff; border-radius: 8px; padding: 6px 9px; font-weight: 700; }

/* ---------- Chair map of a table ---------- */
.chairmap { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 10px; margin: 10px 0; }
.chair { border: 2px solid var(--line); background: var(--white); border-radius: 12px; padding: 10px 6px; text-align: center; }
.chair b { display: block; font-size: 20px; }
.chair small { color: var(--muted); font-size: 11px; }
.chair.taken { background: #fdf0e3; border-color: var(--flame); }
.chair.picked { background: var(--teal); border-color: var(--teal); color: #fff; }
.chair.picked small { color: rgba(255,255,255,.85); }
.tbl.full { background: #fdeceb; border-color: var(--red); }
/* Which login this page is (POS or Back office) */
.loginfor { text-align: center; margin: 4px 0 12px; padding: 10px; border-radius: 12px; color: #fff; }
.loginfor b { display: block; font-size: 20px; } .loginfor small { color: rgba(255,255,255,.85); font-size: 14px; }
.loginfor.pos { background: linear-gradient(135deg, #ffb347, #f06a00); } .loginfor.office { background: linear-gradient(135deg, #1fd1c2, #0a7d76); }
.otherlogin { font-size: 13px; margin-top: 4px; }
/* Support details under the login box */
.support { text-align: center; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); line-height: 1.6; }
.support b { color: var(--ink); display: block; }
/* Help buttons and their box */
.helpbtn { border: 1px solid var(--teal); background: var(--white); color: var(--teal); width: 24px; height: 24px;
  border-radius: 50%; font-weight: 700; line-height: 1; cursor: pointer; vertical-align: middle; margin-left: 6px; }
.helpbtn:hover { background: var(--teal); color: #fff; }
.helpbox { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 70; align-items: center; justify-content: center; padding: 20px; }
.helpbox.show { display: flex; }
.helpbox .inner { background: var(--white); border-radius: 14px; padding: 20px 24px; max-width: 620px; }
.helpbox h2 { margin-top: 0; color: var(--teal); }
.helpbox p { line-height: 1.6; }
.cats button.dragging { opacity: .6; outline: 2px dashed var(--flame); }

/* ---------- POS on smaller screens: everything stays on one page ---------- */
@media (max-width: 1200px) {
  .poswrap { grid-template-columns: 132px 1fr 330px; }
  .menu { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); grid-auto-rows: 104px; gap: 8px; padding: 8px; }
  .item { padding: 6px 8px; } .item b { font-size: 15px; }
  .cats button { padding: 10px 8px; }
}
@media (max-width: 900px) {
  .poswrap { grid-template-columns: 112px 1fr 290px; }
  .menu { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); grid-auto-rows: 96px; }
  .ticket .tkbtns .btn { padding: 5px 8px; }
}
/* phone: categories across the top, items full width, bill as a bottom sheet */
@media (max-width: 700px) {
  .poswrap { grid-template-columns: 1fr; grid-template-rows: auto auto 1fr; }
  .catcol { flex-direction: row; align-items: center; gap: 6px; border-right: 0; border-bottom: 1px solid var(--line);
            overflow-x: auto; padding: 6px; }
  .catfind { width: 150px; margin: 0; flex: 0 0 auto; }
  .cats { display: flex; flex-direction: row; gap: 6px; overflow-x: auto; overflow-y: hidden; flex: 1; }
  .cats button { flex: 0 0 auto; white-space: nowrap; border-left: 0; border-bottom: 4px solid transparent; border-radius: 10px;
                 padding: 8px 12px; }
  .cats button.on { background: var(--teal); color: #fff; }
  .menu { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); grid-auto-rows: 92px; padding-bottom: 180px; }
  .ticket { position: fixed; left: 0; right: 0; bottom: 0; top: auto; max-height: 58vh; border-top: 2px solid var(--teal);
            border-radius: 14px 14px 0 0; box-shadow: 0 -8px 24px rgba(0,0,0,.22); z-index: 40; }
}

}

/* Arranging categories */
.catbar { display: flex; gap: 6px; align-items: center; padding: 8px; flex: 0 0 auto; }
.catbar .catfind { margin: 0; flex: 1; min-width: 0; }
#catArrange.on { background: var(--flame); color: #fff; border-color: var(--flame); }
.cats.arranging button { cursor: grab; touch-action: none; outline: 1px dashed var(--line); }
.cats button { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.cats button.dragging { opacity: .75; outline: 2px solid var(--flame); background: #fff4e8; transform: scale(1.03); z-index: 3; }

.botwrap.moving { opacity: .85; }
.botwrap.moving .botbtn, .botwrap.moving .botpanel { box-shadow: 0 0 0 3px var(--flame), 0 10px 26px rgba(0,0,0,.35); }
.botbtn { touch-action: none; -webkit-touch-callout: none; user-select: none; }
.botpanel header { cursor: grab; touch-action: none; }

/* Paper designer */
.designgrid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 12px; align-items: start; }
.previewbox { position: sticky; top: 8px; }
.paperframe { height: 78vh; border: 1px solid var(--line); background: #fff; max-width: 100%; }
.papertabs .muted { margin-left: 8px; }
table.sections td, table.sections th { padding: 6px 6px; vertical-align: middle; }
table.sections select, table.sections input[type=number] { margin: 0; padding: 5px 6px; }
.mini { display: inline-block; font-size: 11px; margin-right: 6px; }
.mini input { display: block; }
@media (max-width: 1100px) { .designgrid { grid-template-columns: 1fr; } .previewbox { position: static; } }

.okc { color: #0a8a4a; font-weight: 700; }

.flagrow { display: flex; gap: 18px; flex-wrap: wrap; margin: 6px 0 4px; }
.pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; background: #e7ecee; color: #4a5558; margin-left: 6px; }
.pill.off { background: #fdecea; color: #c0392b; }

/* PIN login */
.logmode { margin-bottom: 10px; }
.pindots { display: flex; justify-content: center; gap: 10px; margin: 8px 0 12px; }
.pindots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--teal); display: block; }
.pindots i.on { background: var(--teal); }
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.pinpad button { padding: 14px 0; font-size: 22px; font-weight: 700; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); }
.pinpad button:active { background: var(--teal); color: #fff; }
.pinpad button.alt { font-size: 14px; font-weight: 600; color: var(--muted); }

/* Closing time bar */
.closebar { background: linear-gradient(90deg, #f59e0b, #f97316); color: #fff; font-weight: 700; padding: 9px 16px; text-align: center; }
.closebar.blocked { background: linear-gradient(90deg, #dc2626, #b91c1c); }
.closebar-hide { margin-left: 12px; padding: 4px 14px; min-height: 32px; border: 1px solid #fff; border-radius: 6px; background: transparent; color: #fff; font-weight: 700; cursor: pointer; }

/* Kiosk and QR menu: category tiles, then the products */
.gtitle { margin: 4px 2px 12px; font-size: 22px; } .gtitle small, .ghead h2 small { display: block; font-size: 14px; color: var(--muted); font-weight: 500; }
.gtiles { display: grid; gap: 12px; }
.gtile { border: 0; border-radius: 18px; padding: 16px 12px 14px; color: var(--tfg, #fff); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px;
  /* 8.3.32: no color-mix() - older Android WebView / kiosk browsers do not know it and then drew NO background (white text on white) */
  background-color: var(--tc); background-image: linear-gradient(150deg, rgba(0,0,0,0), rgba(0,0,0,.38)); box-shadow: 0 8px 20px rgba(0,0,0,.16); min-height: 120px; justify-content: center; }
.gtile:active { transform: scale(.97); }
.gtile .gdot { width: 46px; height: 46px; border-radius: 50%; background: var(--tdot, rgba(255,255,255,.22)); display: grid; place-items: center; font-size: 22px; font-weight: 800; }
.gtile b { font-size: 17px; line-height: 1.2; overflow-wrap: anywhere; color: inherit; } .gtile small { opacity: .9; color: inherit; font-size: 13px; } .gtile i { font-style: normal; font-size: 12px; opacity: .85; }
.gtiles.kiosk .gtile { min-height: 150px; } .gtiles.kiosk .gtile .gdot { width: 56px; height: 56px; font-size: 26px; } .gtiles.kiosk .gtile b { font-size: 20px; }
.ghead { display: flex; align-items: center; gap: 14px; margin: 2px 0 12px; } .ghead h2 { margin: 0; font-size: 22px; }
.gback { border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 10px 16px; font-weight: 700; font-size: 15px; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.gback small { display: block; font-weight: 500; color: var(--muted); }

/* ---------- Floor plan: the restaurant as it is ---------- */
.fplanbox { position: relative; overflow: hidden; border-radius: 16px; }
.fplan { position: absolute; left: 0; top: 0; width: 1200px; height: 700px; border-radius: 14px; overflow: hidden;
  background: repeating-linear-gradient(90deg, rgba(0,0,0,.05) 0 2px, transparent 2px 70px), linear-gradient(135deg, #e2c9a2, #d5b88c 55%, #cdae80);
  box-shadow: inset 0 0 0 5px #6b513c, inset 0 0 70px rgba(60,35,10,.28); }
.fplan.edit { background-image: linear-gradient(rgba(60,35,10,.10) 1px, transparent 1px), linear-gradient(90deg, rgba(60,35,10,.10) 1px, transparent 1px), linear-gradient(135deg, #e6d2b0, #dcc196);
  background-size: 50px 50px, 50px 50px, auto; }
.ftable { position: absolute; }
.ftable .fbody { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: #fff; line-height: 1.1;
  background: linear-gradient(145deg, #b98350, #8b5a2e); border: 3px solid rgba(40,22,8,.45); border-radius: 14px;
  box-shadow: 0 10px 18px rgba(40,22,8,.35), inset 0 2px 0 rgba(255,255,255,.28); }
.ftable.fs-round .fbody { border-radius: 50%; }
.flabel { display: block; text-shadow: 0 1px 3px rgba(0,0,0,.55); } .flabel b { font-size: 21px; display: block; } .flabel small { display: block; font-size: 12px; opacity: .95; font-weight: 600; }
.fchair { position: absolute; width: 22px; height: 22px; border-radius: 7px; background: linear-gradient(145deg, #5a4636, #3b2d21); border-top: 6px solid #241a12; box-shadow: 0 3px 5px rgba(0,0,0,.35); }
.fchair.taken { background: linear-gradient(145deg, #ffb25b, #f07d12); border-top-color: #b85b00; }
.ftable.busy .fbody { background: linear-gradient(145deg, #f59a3c, #d46a0c); }
.ftable.full .fbody { background: linear-gradient(145deg, #ec5b52, #b32d25); }
.ftable.reserved .fbody { background: linear-gradient(145deg, #9a6ee0, #6c3fb7); }
.ftable.free .fbody { border-color: rgba(7,158,155,.85); }
.ftable.inactive { opacity: .45; } .ftable.inactive .fbody { border-style: dashed; }
.ftable.sel .fbody, .fitem.sel { outline: 3px solid #f56d02; outline-offset: 4px; }
.fhandle { position: absolute; right: -11px; bottom: -11px; width: 20px; height: 20px; background: #f56d02; border: 2px solid #fff; border-radius: 5px; cursor: nwse-resize; z-index: 3; touch-action: none; }
.fitem { position: absolute; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px; }
.fitem > span:first-child { text-shadow: 0 1px 2px rgba(0,0,0,.5); text-align: center; }
.fitem.k-wall { background: linear-gradient(#5a5f63, #3b3f42); border-radius: 3px; box-shadow: 0 3px 6px rgba(0,0,0,.35); }
.fitem.k-door { background: repeating-linear-gradient(90deg, #9a6b3b 0 8px, #b98350 8px 16px); border-radius: 2px; box-shadow: 0 0 0 2px rgba(255,255,255,.55); }
.fitem.k-plant { background: radial-gradient(circle at 35% 30%, #67c27a, #2f8d4a 70%); border-radius: 50%; box-shadow: 0 5px 8px rgba(0,0,0,.3); }
.fitem.k-bar { background: linear-gradient(#7a5233, #4e3320); border-radius: 10px; box-shadow: 0 6px 10px rgba(0,0,0,.35); }
.fitem.k-kitchen { background: linear-gradient(135deg, #cfd8dc, #8fa1a9); color: #26323a; border-radius: 10px; border: 3px solid #607d8b; }
.fitem.k-kitchen > span:first-child { text-shadow: none; }
.fitem.k-cashier { background: linear-gradient(135deg, #14b8b3, #087b79); border-radius: 10px; box-shadow: 0 5px 8px rgba(0,0,0,.3); }
.fitem.k-text { color: #3b2d21; font-size: 18px; } .fitem.k-text > span:first-child { text-shadow: none; }
.fplan.edit .ftable, .fplan.edit .fitem { cursor: grab; touch-action: none; }
.fempty { position: absolute; inset: 0; display: grid; place-items: center; font-size: 20px; color: #6b513c; pointer-events: none; }
/* the designer page */
.fdesign .fbar { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin-bottom: 10px; display: grid; gap: 8px; }
.fareas, .ftools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fdesign button { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 7px 12px; font-weight: 600; cursor: pointer; }
.fdesign button.on { background: var(--teal); color: #fff; border-color: var(--teal); } .fdesign button.alt { color: var(--teal); border-style: dashed; }
.fdesign button.danger { background: #fdecea; color: #c0392b; border-color: #f3c0ba; width: 100%; margin-top: 10px; }
.fnote { color: var(--muted); margin-left: auto; font-size: 13px; }
.fmain { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 12px; align-items: start; }
.fstage { background: #dfe6e8; border-radius: 14px; padding: 8px; overflow: hidden; } .fcanvaswrap { position: relative; overflow: hidden; border-radius: 12px; }
.fprops h3 { margin-top: 0; } .fprops label { display: block; margin-bottom: 8px; } .fprops input[type=text], .fprops input:not([type]) { width: 100%; }
.fstep { display: flex; gap: 6px; } .fstep input { text-align: center; } .fshape, .frow { display: flex; gap: 6px; margin: 8px 0; } .fshape button, .frow button { flex: 1; }
.fhelp { padding-left: 18px; line-height: 1.7; }
@media (max-width: 900px) { .fmain { grid-template-columns: 1fr; } }
/* the POS table screen as a plan */
.tablemap.plan { display: block; padding: 6px 0; }
.tablemap.plan .fplan .ftable { cursor: pointer; }
.viewtoggle { margin-left: auto; display: inline-flex; gap: 4px; }
.viewtoggle button { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 6px 12px; font-weight: 600; }
.viewtoggle button.on { background: var(--teal); color: #fff; border-color: var(--teal); }

/* ---------- Login: the restaurant as the background ---------- */
body.auth { background: #1b1410; overflow-x: hidden; }
body.auth .scene { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
body.auth .card { position: relative; z-index: 2; background: rgba(22,16,12,.60); -webkit-backdrop-filter: blur(16px) saturate(1.25); backdrop-filter: blur(16px) saturate(1.25);
  border: 1px solid rgba(255,255,255,.18); color: #fff; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
body.auth .card .logo { background: #fff; border-radius: 16px; padding: 8px 14px; }
body.auth label, body.auth .muted, body.auth .support, body.auth .support b { color: #eadfce; }
body.auth .support { border-top-color: rgba(255,255,255,.18); }
body.auth input { background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.26); color: #fff; }
body.auth input:focus { border-color: #14c9c4; box-shadow: 0 0 0 3px rgba(20,201,196,.28); outline: none; }
body.auth .seg button { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.22); color: #fff; }
body.auth .seg button small { color: #d9cdbb; }
body.auth .seg button.on { background: linear-gradient(135deg, #0aa6a2, #067a77); border-color: #14c9c4; }
body.auth .btn.primary { background: linear-gradient(135deg, #0cb5b0, #067a77); border: 0; box-shadow: 0 8px 22px rgba(7,158,155,.45); }
body.auth .pinpad button { background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.24); color: #fff; }
body.auth .pinpad button:active { background: #0aa6a2; }
body.auth .pindots i { border-color: #14c9c4; } body.auth .pindots i.on { background: #14c9c4; }
body.auth .installlink { color: #9fe9e6; font-weight: 600; }
body.auth .alert { backdrop-filter: blur(6px); }

/* compact login card: fits a 768 px screen */
body.auth .card { padding: 16px 22px 14px; max-width: 372px; width: 100%; }
body.auth .card .logo { height: 64px; width: auto; max-width: 70%; display: block; margin: 0 auto 8px; padding: 5px 12px; box-sizing: content-box; }
body.auth .card .seg { margin-bottom: 8px; }
body.auth .card .seg button { padding: 7px 8px; font-size: 14px; } body.auth .card .seg button small { font-size: 11px; }
body.auth .card label { margin-bottom: 6px; font-size: 13px; } body.auth .card input { padding: 9px 12px; }
body.auth .card .btn.big { padding: 12px; margin-top: 4px; }
body.auth .card .support { margin-top: 8px; padding-top: 8px; font-size: 12px; line-height: 1.5; }
body.auth .card p.center { margin: 6px 0 2px; }
body.auth .pinpad button { padding: 10px 0; font-size: 20px; } body.auth .pinpad { gap: 6px; margin-bottom: 8px; }
body.auth .pindots { margin: 4px 0 8px; }
@media (max-height: 760px) { body.auth .card .logo { height: 52px; } body.auth .card .muted.center { display: none; } }

.mi { width: 1em; height: 1em; vertical-align: -0.12em; display: inline-block; }

/* =====================================================================
   Modern order screens (7.9.0): soft glass panels, gradients, gentle motion
   ===================================================================== */
body.pos { background: radial-gradient(1200px 600px at 12% -10%, #cfeceb 0%, transparent 60%), radial-gradient(900px 500px at 100% 0%, #fde3cc 0%, transparent 55%), linear-gradient(180deg, #eef3f5, #e3ebef); }
body.pos .posbar { background: linear-gradient(135deg, #1f2a31, #303a41); border-bottom: 1px solid rgba(255,255,255,.10); box-shadow: 0 6px 22px rgba(15,25,32,.28); position: relative; z-index: 5; }
body.pos .tool { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); border-radius: 12px; transition: background .15s, transform .12s, box-shadow .2s; }
body.pos .tool:hover { background: rgba(255,255,255,.16); box-shadow: 0 0 0 2px rgba(20,201,196,.35); }
body.pos .tool:active { transform: scale(.96); }
body.pos .tool.out { background: rgba(229,72,61,.18); border-color: rgba(229,72,61,.5); }
body.pos .where { letter-spacing: .2px; }

/* start screen */
body.pos .bigtypes button { border: 0; border-radius: 26px; color: #fff; position: relative; overflow: hidden; box-shadow: 0 18px 34px rgba(20,40,50,.28), inset 0 1px 0 rgba(255,255,255,.35);
  transition: transform .18s cubic-bezier(.2,.8,.2,1), box-shadow .25s; }
body.pos .bigtypes button::before { content: ""; position: absolute; inset: -40% -20% auto -20%; height: 90%; background: radial-gradient(closest-side, rgba(255,255,255,.28), transparent); pointer-events: none; }
body.pos .bigtypes button:hover { transform: translateY(-4px); box-shadow: 0 24px 44px rgba(20,40,50,.34), inset 0 1px 0 rgba(255,255,255,.4); }
body.pos .bigtypes button:active { transform: scale(.97); }
body.pos .bigtypes button:nth-child(1) { background: linear-gradient(145deg, #12bdb8, #05706e); }
body.pos .bigtypes button:nth-child(2) { background: linear-gradient(145deg, #ff9a3d, #e25a00); }
body.pos .bigtypes button:nth-child(3) { background: linear-gradient(145deg, #4b5a66, #20292f); }
body.pos .bigtypes .ico { filter: drop-shadow(0 4px 6px rgba(0,0,0,.25)); }
body.pos .runhead { color: #2b3a43; }
body.pos .runcard { border: 1px solid rgba(255,255,255,.7); border-left: 6px solid var(--teal); border-radius: 16px; background: rgba(255,255,255,.72); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 8px 20px rgba(30,50,60,.10); transition: transform .15s, box-shadow .2s; }
body.pos .runcard:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(30,50,60,.16); }
body.pos .runcard small.late { color: #d93025; font-weight: 700; }

/* order screen: categories, items, ticket */
body.pos .catcol { background: rgba(255,255,255,.62); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-right: 1px solid rgba(255,255,255,.7); }
body.pos .cats button { margin: 4px 8px; width: calc(100% - 16px); border-radius: 14px; border: 1px solid rgba(20,40,50,.08); background: rgba(255,255,255,.85); box-shadow: 0 2px 6px rgba(30,50,60,.06);
  transition: transform .12s, box-shadow .2s, background .2s; }
body.pos .cats button:hover { box-shadow: 0 6px 14px rgba(30,50,60,.12); }
body.pos .cats button:active { transform: scale(.97); }
body.pos .cats button.on { background: linear-gradient(135deg, #12bdb8, #078582); color: #fff; border-color: transparent; box-shadow: 0 8px 18px rgba(7,133,130,.38); }
body.pos .cats button.on small { color: rgba(255,255,255,.88); }
body.pos .menu { gap: 12px; padding: 12px; }
body.pos .item { border: 1px solid rgba(255,255,255,.8); border-radius: 18px; background: linear-gradient(160deg, rgba(255,255,255,.96), rgba(244,249,251,.92)); box-shadow: 0 8px 18px rgba(30,50,60,.10), inset 0 1px 0 #fff;
  transition: transform .14s cubic-bezier(.2,.8,.2,1), box-shadow .2s; }
body.pos .item:hover { transform: translateY(-3px); box-shadow: 0 16px 28px rgba(30,50,60,.16); }
body.pos .item:active { transform: scale(.96); box-shadow: 0 4px 10px rgba(30,50,60,.12); }
body.pos .item b { display: inline-block; align-self: flex-start; background: linear-gradient(135deg, #12bdb8, #078582); color: #fff; padding: 3px 11px; border-radius: 999px; font-size: 14px; box-shadow: 0 4px 10px rgba(7,133,130,.3); }
body.pos .item.hasimg img { border-radius: 14px 14px 0 0; }
body.pos .search input, body.pos .search { border-radius: 14px; }
body.pos .search input { box-shadow: 0 4px 12px rgba(30,50,60,.08); border: 1px solid rgba(20,40,50,.10); }
body.pos .ticket { background: rgba(255,255,255,.80); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-left: 1px solid rgba(255,255,255,.8); box-shadow: -10px 0 30px rgba(30,50,60,.10); }
body.pos .tkhead h2, body.pos .tkhead b { letter-spacing: .2px; }
body.pos .lines li { border-radius: 12px; margin: 3px 8px; border-bottom: 0; background: rgba(238,244,247,.7); transition: background .15s; }
body.pos .lines li.unsent { background: #fff6ea; box-shadow: inset 4px 0 var(--flame); }
body.pos .totals { background: linear-gradient(180deg, transparent, rgba(231,240,244,.9)); }
body.pos .btn { border-radius: 14px; transition: transform .12s, box-shadow .2s, filter .2s; }
body.pos .btn:active { transform: scale(.97); }
body.pos .btn.dark { background: linear-gradient(135deg, #3a4651, #1f2a31); border-color: #1f2a31; box-shadow: 0 8px 18px rgba(31,42,49,.35); }
body.pos .btn.pay { background: linear-gradient(135deg, #ff9a3d, #e25a00); border-color: #e25a00; box-shadow: 0 12px 26px rgba(226,90,0,.42); letter-spacing: .3px; }
body.pos .btn.pay:hover { filter: brightness(1.06); }
body.pos .btn.pay:disabled { filter: grayscale(.4); box-shadow: none; opacity: .65; }
body.pos .qralert { background: linear-gradient(90deg, #d93025, #b3261e); box-shadow: 0 6px 18px rgba(179,38,30,.35); }

/* tables */
body.pos .areas button { border-radius: 999px; box-shadow: 0 3px 8px rgba(30,50,60,.08); }
body.pos .areas button.on { background: linear-gradient(135deg, #12bdb8, #078582); border-color: transparent; color: #fff; box-shadow: 0 6px 14px rgba(7,133,130,.35); }
body.pos .tbl { border-radius: 18px; box-shadow: 0 8px 18px rgba(30,50,60,.10); transition: transform .14s, box-shadow .2s; }
body.pos .tbl:hover { transform: translateY(-3px); box-shadow: 0 14px 26px rgba(30,50,60,.16); }

/* windows (modals) */
body.pos .modal.show { background: rgba(15,25,32,.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
body.pos #modalBox { border-radius: 22px; background: rgba(255,255,255,.96); box-shadow: 0 30px 70px rgba(10,20,26,.45); border: 1px solid rgba(255,255,255,.8); animation: popin .18s cubic-bezier(.2,.9,.3,1.2); }
@keyframes popin { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
body.pos .toast { border-radius: 14px; backdrop-filter: blur(8px); }
@media (prefers-reduced-motion: reduce) { body.pos * { transition: none !important; animation: none !important; } }

.ftable .flabel small, .fplan small { color: #fff; opacity: .95; }
.ftable .flabel { color: #fff; }
.tablemap.plan .fplan { cursor: default; }

@media (max-width: 700px) { .tablemap.plan { overflow-x: auto; -webkit-overflow-scrolling: touch; } .tablemap.plan .fplanbox { margin: 0; } }

/* Payment window: two columns on a counter screen, so it fits a 15" screen with no scrolling */
@media (min-width: 900px) {
  #modalBox:has(> .keypad) { width: min(940px, 94vw); max-width: 940px; display: grid; grid-template-columns: 1.08fr 1fr; column-gap: 18px; row-gap: 8px; align-items: start;
    grid-template-areas: "title title" "total keys" "fields keys" "quick keys" "sum row"; }
  #modalBox:has(> .keypad) > h2 { grid-area: title; margin: 0 0 2px; }
  #modalBox:has(> .keypad) > .paytotal { grid-area: total; margin: 0; }
  #modalBox:has(> .keypad) > .payfields { grid-area: fields; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  #modalBox:has(> .keypad) > .payfields button { min-height: 0; padding: 8px 10px; }
  #modalBox:has(> .keypad) > .quick { grid-area: quick; margin: 0; flex-wrap: wrap; }
  #modalBox:has(> .keypad) > .keypad { grid-area: keys; margin: 0; }
  #modalBox:has(> .keypad) > .keypad button { padding: 10px 0; min-height: 48px; }
  #modalBox:has(> .keypad) > .paysum { grid-area: sum; align-self: center; margin: 0; }
  #modalBox:has(> .keypad) > .row { grid-area: row; margin: 0; }
}
/* any window: never taller than the screen */
#modalBox { max-height: calc(100vh - 20px); overflow-y: auto; }

/* ---------- Phone layout of the POS (like the kiosk): tiles, then rows ---------- */
body.pos.mob .poswrap { grid-template-columns: 1fr !important; grid-template-rows: 1fr; }
body.pos.mob .catcol { display: none !important; }
body.pos.mob .menu { display: block !important; padding: 10px 10px 92px; overflow-y: auto; }
body.pos.mob .ticket { position: fixed; inset: 0 0 64px 0; z-index: 20; transform: translateY(100%); transition: transform .2s; }
body.pos.mob .ticket.open { transform: none; }
body.pos.mob .mobilebar { display: flex; gap: 8px; justify-content: center; align-items: center; position: fixed; left: 0; right: 0; bottom: 0;
  height: 64px; border: 0; background: linear-gradient(135deg, #12bdb8, #078582); color: #fff; font-size: 17px; z-index: 30; box-shadow: 0 -6px 18px rgba(0,0,0,.18); }
.mtiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 10px; }
.mtile { border: 0; border-radius: 18px; padding: 14px 12px; min-height: 100px; color: var(--tfg, #fff); text-align: left; display: flex; flex-direction: column; justify-content: flex-end; gap: 3px;
  background-color: var(--tc); background-image: linear-gradient(150deg, rgba(0,0,0,0), rgba(0,0,0,.36)); box-shadow: 0 8px 18px rgba(0,0,0,.15); }   /* 8.3.32: no color-mix() */
.mtile:active { transform: scale(.97); }
.mtile b { font-size: 17px; line-height: 1.2; overflow-wrap: anywhere; } .mtile small { opacity: .92; font-size: 13px; color: inherit; } .mtile i { font-style: normal; font-size: 12px; opacity: .85; }
.mhead { display: flex; align-items: center; gap: 10px; margin: 2px 0 10px; } .mhead h3 { margin: 0; font-size: 19px; overflow-wrap: anywhere; }
.mback { border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 14px; font-weight: 700; font-size: 15px; white-space: nowrap; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.mrows { display: flex; flex-direction: column; gap: 8px; }
.mrow { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; min-height: 60px;
  border-radius: 14px; background: #fff; border: 1px solid rgba(20,40,50,.10); box-shadow: 0 3px 10px rgba(30,50,60,.07); color: var(--ink); }
.mrow:active { background: #e8f6f6; transform: scale(.99); }
.mrow .mtxt { min-width: 0; } .mrow .nm { display: block; font-weight: 700; font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; }
.mrow small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; } .mrow i { display: block; font-style: normal; font-size: 11px; color: var(--muted); }
.mrow b { background: linear-gradient(135deg, #12bdb8, #078582); color: #fff; padding: 6px 12px; border-radius: 999px; font-size: 15px; white-space: nowrap; }
/* phone layout wins over the older small-screen sheet */
body.pos.mob .ticket { top: 0 !important; bottom: 64px !important; left: 0 !important; right: 0 !important; max-height: none !important; height: auto !important;
  border-radius: 0 !important; transform: translateY(110%) !important; box-shadow: none; }
body.pos.mob .ticket.open { transform: none !important; }
.mtile small, .mtile i { color: #fff !important; }

.qsmore { margin: 10px 0; border: 1px dashed var(--line); border-radius: 12px; padding: 8px 12px; background: #fbfdfd; }
.qsmore summary { cursor: pointer; padding: 4px 0; }

#pSave small, #pOk small { display: block; font-size: 11px; font-weight: 500; opacity: .85; }

/* ZATCA page */
.zsteps { line-height: 1.7; padding-left: 20px; }
.zenv { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.zenv label { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; cursor: pointer; }
.zenv label.on, .zenv label:has(input:checked) { border-color: var(--teal); background: #e6f6f6; font-weight: 700; }
.xmlbox { max-height: 360px; overflow: auto; background: #f4f7f8; padding: 10px; font-size: 11px; white-space: pre-wrap; word-break: break-all; }

/* the licensed edition in the POS header: [ QSR Edition ] / [ Dine Edition ] / [ Hub Edition ] */
.edbadge { flex: 0 0 auto; white-space: nowrap; font-size: 12px; font-weight: 700; letter-spacing: .3px; color: #ffffff;
  border: 1px solid rgba(255,255,255,.55); border-radius: 6px; padding: 3px 8px; }
@media (max-width: 820px) { .edbadge { font-size: 10px; padding: 2px 5px; } }
.fsrow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0; }
.fsrow select, .fsrow input[type=number] { width: auto; }
.fsbox summary { cursor: pointer; color: var(--teal, #0a8f88); }

/* ---------- 8.3.12 POS start screen: clear running orders, filters, readable top bar ---------- */
/* top bar: every button stays on screen (wraps to a 2nd row instead of hiding off the edge), English + Arabic kept */
.posbar { flex-wrap: wrap; row-gap: 6px; overflow: visible; }
.posbar { gap: 6px; }
.tool { font-size: 15px; font-weight: 600; min-height: 48px; padding: 4px 9px; }
.tool small { color: #dfe6e8; font-size: 12px; font-weight: 500; }
body.pos .tool { background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.28); }
body.pos .tool:focus-visible { outline: 3px solid #14c9c4; outline-offset: 2px; }
.me { color: #fff; font-weight: 600; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.posbar .where { padding: 0 2px; }
@media (max-width: 1200px) { .tool small { display: block; } }
@media (max-width: 820px) { .tool { font-size: 14px; padding: 4px 9px; } .posbar .tool small { display: block; font-size: 11px; } }

.runtop { max-width: 1180px; margin: 24px auto 12px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.runtop .runhead { margin: 0; font-size: 22px; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.runhead small { font-size: 15px; font-weight: 500; color: #5b6b74; margin-left: 4px; }
.runfilter { display: flex; flex-wrap: wrap; gap: 8px; }
.runfilter button { min-height: 48px; min-width: 104px; padding: 4px 14px; border-radius: 12px; border: 2px solid #c9d3d8; background: #fff; color: #1f2a31;
  font-size: 16px; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.runfilter button small { font-size: 13px; font-weight: 500; color: #5b6b74; }
.runfilter button b { background: #e6ecef; color: #1f2a31; border-radius: 10px; padding: 1px 9px; font-size: 14px; }
.runfilter button.on { background: #1f2a31; border-color: #1f2a31; color: #fff; }
.runfilter button.on small { color: #d3dbde; } .runfilter button.on b { background: #14c9c4; color: #06272a; }

.running { max-width: 1180px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
body.pos .runcard { background: #fff; border: 1px solid #d5dde1; border-left: 8px solid var(--teal); border-radius: 16px; padding: 14px 16px; gap: 6px; color: #1f2a31; cursor: pointer; min-height: 200px; align-content: start; }
body.pos .runcard.t-takeaway { border-left-color: #e8730c; } body.pos .runcard.t-delivery { border-left-color: #2f3d47; }
.runcard i { font-style: normal; font-weight: 500; color: #5b6b74; font-size: .85em; }
.runcard .rc-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.runcard .rc-type { font-size: 16px; font-weight: 800; color: #1f2a31; text-transform: uppercase; letter-spacing: .02em; }
.runcard .rc-st { font-size: 13px; font-weight: 700; border-radius: 999px; padding: 3px 10px; display: inline-flex; flex-direction: column; align-items: center; line-height: 1.15; }
.runcard .rc-st i { font-size: 11px; color: inherit; opacity: .85; }
.rc-st.s-new { background: #fde7c7; color: #8a4500; } .rc-st.s-part { background: #fff3c4; color: #6b5200; }
.rc-st.s-sent { background: #d4f4e2; color: #0d5c33; } .rc-st.s-wait { background: #e4dcff; color: #4527a0; }
.runcard .rc-id { display: flex; flex-direction: column; line-height: 1.1; }
.runcard .rc-id small { font-size: 14px; font-weight: 600; color: #3d4c55; }
.runcard .rc-id strong { font-size: 34px; font-weight: 800; color: #111a20; }
.runcard .rc-where { font-size: 14px; color: #3d4c55; min-height: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.runcard .rc-kot { font-size: 14px; color: #3d4c55; } .runcard .rc-kot b { font-size: 17px; color: #111a20; margin-left: 4px; }
.runcard .rc-foot { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px dashed #d5dde1; padding-top: 6px; }
.runcard .rc-items { font-size: 15px; font-weight: 600; color: #3d4c55; }
body.pos .runcard em { font-size: 22px; font-weight: 800; color: #111a20; font-style: normal; }
.runcard .rc-time { font-size: 14px; font-weight: 600; color: #3d4c55; display: flex; align-items: center; gap: 5px; }
.runcard .rc-time.late { color: #c62828; }
.closebar { font-size: 16px; font-weight: 600; }
@media (max-width: 800px) { .running { grid-template-columns: 1fr 1fr; gap: 10px; } .runcard .rc-id strong { font-size: 28px; } body.pos .runcard { min-height: 0; } }
@media (max-width: 520px) { .running { grid-template-columns: 1fr; } .runfilter button { min-width: 0; flex: 1 1 40%; } }
/* 8.3.12 item pictures: the picture keeps its shape and the name and price are never cut off */
.menu:has(.item.hasimg) { grid-auto-rows: minmax(var(--item-h), auto); }
.item.hasimg img { height: auto; aspect-ratio: 16 / 10; flex: none; }
.item.hasimg b { margin-top: 6px; }
@media (max-width: 1360px) { body.pos .posbar .me { display: none; } }   /* 8.3.12: keeps the top bar on one row on 1280 px tablets */

/* 8.3.14 waiter call: the customer's service buttons and the POS call strip */
.svcwrap { padding: 16px; max-width: 560px; margin: 0 auto; }
.svcwrap h2 small { display: block; font-size: 15px; color: var(--muted, #667); }
.svcgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.svc { min-height: 92px; border: 1px solid #d5dcdd; border-radius: 14px; background: #fff; color: #15191b; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 18px; cursor: pointer; }
.svc small { font-size: 15px; color: #4a5356; }
.svc.order { grid-column: 1 / -1; background: var(--teal, #138a80); border-color: transparent; color: #fff; }
.svc.order small { color: #e6f6f4; }
.svc:disabled { opacity: .5; }
.waitercallbar { position: fixed; left: 10px; bottom: calc(112px + env(safe-area-inset-bottom, 0px)); z-index: 21; border: 0; border-radius: 24px; padding: 11px 16px; background: var(--teal, #138a80); color: #fff; box-shadow: 0 4px 18px #0002; font-weight: 700; }
.callstrip { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 8px 12px; background: #fff4e5; border-bottom: 2px solid #f26b1d; }
.callstrip[hidden] { display: none; }
.callchip { display: flex; align-items: center; gap: 8px; padding: 6px 10px; font-size: 16px; border-radius: 10px; background: #fff; border: 1px solid #f0c9a8; color: #15191b; font-weight: 600; min-height: 44px; }
.callchip.esc { border: 2px solid #c0392b; }
.callchip.ack { border-color: #8fd0c8; background: #eefaf8; }
.callchip button { min-height: 36px; padding: 4px 12px; border-radius: 8px; border: 0; font-weight: 700; cursor: pointer; }
.callchip .go { background: #f26b1d; color: #fff; }
.callchip .done { background: #138a80; color: #fff; }
.wcgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.wccard { border: 1px solid #d5dcdd; border-radius: 12px; padding: 14px; background: #fff; }
.wccard.urgent { border: 2px solid #c0392b; }
.wccard h3 { margin: 10px 0 4px; }
.wctable { font-size: 20px; font-weight: 800; }
@media (max-width: 480px) { .svcgrid { grid-template-columns: 1fr; } .waitercallbar { left: 8px; bottom: calc(110px + env(safe-area-inset-bottom, 0px)); font-size: 13px; } }

/* 8.3.19: installer (first screen of a fresh installation) fits every screen - phone, tablet, laptop, large monitor */
body.auth.install { padding: 16px; align-items: start; }
body.auth.install .card.wide { max-width: 980px; width: 100%; padding: 18px 24px 20px; margin: auto; }
body.auth.install .card h1 { margin: 2px 0 6px; font-size: clamp(20px, 2.6vw, 28px); }
body.auth.install .card h2 { font-size: 16px; margin: 12px 0 8px; }
body.auth.install .card .logo { height: clamp(44px, 8vh, 64px); }
body.auth.install .instcols { display: grid; grid-template-columns: 1fr; gap: 0 28px; }
body.auth.install .card input, body.auth.install .card select { font-size: 16px; min-height: 44px; box-sizing: border-box; }   /* 16px: phones do not zoom in */
body.auth.install label.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; margin: 0; }
body.auth.install label.check input { min-height: 0; width: 20px; height: 20px; flex: none; }
body.auth.install details summary { color: #9fe9e6; min-height: 44px; display: flex; align-items: center; cursor: pointer; }
body.auth.install .btn.big { width: 100%; min-height: 50px; margin-top: 10px; }
@media (min-width: 700px) and (max-width: 959px) {   /* tablet: two columns, one field per line */
  body.auth.install .instcols { grid-template-columns: 1fr 1fr; }
  body.auth.install .instcols > section + section { border-left: 1px solid rgba(255,255,255,.14); padding-left: 20px; }
  body.auth.install .grid2 { grid-template-columns: 1fr; }
}
@media (min-width: 960px) {                      /* laptop and bigger: two columns, so Install is on the screen without scrolling */
  body.auth.install { align-items: center; }
  body.auth.install .instcols { grid-template-columns: 1.15fr 1fr; }
  body.auth.install .instcols > section + section { border-left: 1px solid rgba(255,255,255,.14); padding-left: 28px; }
}
@media (max-width: 520px) {                      /* phone: full width, one column */
  body.auth.install { padding: 8px; }
  body.auth.install .card.wide { padding: 14px 14px 18px; border-radius: 12px; }
  body.auth.install .grid2 { grid-template-columns: 1fr; }
}
@media (max-height: 480px) and (orientation: landscape) {   /* phone turned sideways */
  body.auth.install .card .logo { display: none; }
  body.auth.install .instcols { grid-template-columns: 1fr 1fr; }
  body.auth.install .instcols > section + section { padding-left: 16px; }
  body.auth.install .grid2 { grid-template-columns: 1fr; }
}
/* 8.3.19: login screen right after installation - the "Installation complete" message was white text on white (invisible) */
body.auth .alert { background: rgba(255,255,255,.94); color: #10302f; }
body.auth .alert.err { color: #b3261e; }
body.auth .card .installlink, body.auth .card a { display: inline-block; padding: 6px 4px; }     /* easier to tap */
@media (max-height: 480px) and (orientation: landscape) {     /* phone turned sideways: no logo, less space */
  body.auth { padding: 8px; }
  body.auth .card .logo { display: none; }
  body.auth .card .seg button { padding: 5px 8px; }
  body.auth:not(.install) .card { max-width: 640px; display: grid; grid-template-columns: 1fr 1fr; column-gap: 18px; align-items: start; }
  body.auth:not(.install) .card > * { grid-column: 1; margin-top: 0; }
  body.auth:not(.install) .card > #paneW, body.auth:not(.install) .card > #paneP { grid-column: 2; grid-row: 1 / span 12; }
  body.auth:not(.install) .card .support { font-size: 11px; }
}
@media (max-width: 520px) and (max-height: 700px) { body.auth .card .logo { height: 48px; } }   /* small phones: whole login on one screen */
/* 8.3.19: back office on a phone - the menu folds into one "Menu" button (the header was half the screen) */
.topbar .navtoggle { display: none; }
@media (max-width: 800px) {
  .topbar { gap: 8px; padding: 8px 12px; }
  .topbar .navtoggle { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; min-height: 44px; padding: 0 14px; border-radius: 10px;
                       border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
  .topbar > nav, .topbar > .omni, .topbar > .textsize, .topbar > .who { display: none; }
  .topbar.navopen > nav { display: flex; flex-direction: column; flex-basis: 100%; gap: 4px; }
  .topbar.navopen > .omni, .topbar.navopen > .textsize, .topbar.navopen > .who { display: flex; flex-basis: 100%; flex-wrap: wrap; align-items: center; gap: 8px; }
  .topbar.navopen > .omni input { width: 100%; }
  .topbar.navopen .mgroup > button { width: 100%; text-align: left; min-height: 44px; }
  .topbar.navopen .msub a, .topbar.navopen .msubg > summary { min-height: 40px; display: flex; align-items: center; }
}
/* 8.3.20: menu colours follow the theme. Each theme sets the colours below; text on a theme colour comes from
   --ink-fg / --teal-fg (worked out by the program for the colours chosen in Designer), so every menu reads in every theme. */
body.office { --bar-fg: var(--ink-fg, #fff); --sub-bg: #fff; --sub-fg: #1c2526; --sub-hover: #edf2f2; --sub-line: #e3e8e8; }
.topbar, .topbar .brand span, .topbar .who, .topbar .who a, .topbar .who small, .topbar .mgroup > button, .topbar .navtoggle { color: var(--bar-fg); }
.topbar .mgroup > button i { color: inherit; }
.topbar .mgroup.on > button { background: var(--teal-sel, var(--teal)); color: var(--teal-sel-fg, #fff); }
.topbar .msub { background: var(--sub-bg); border-color: var(--sub-line); }
.topbar .msub a, .topbar .msub a:visited, .topbar .msub a small, .topbar .msubg > summary { color: var(--sub-fg); }
.topbar .msub a:hover, .topbar .msubg > summary:hover { background: var(--sub-hover); color: var(--sub-fg); }
.topbar .msub a.on, .topbar .msub a.on:visited, .topbar .msub a.on small { background: var(--teal-sel, var(--teal)); color: var(--teal-sel-fg, #fff); }

/* ===== 8.3.22 Restaurant look for the table QR and the kiosk (Settings > Look of the table QR and kiosk screens) ===== */
body.guest.th-rest { --g-ink: #2a1c14; --g-soft: #6b5547; --g-card: rgba(255,255,255,.9); --g-line: #eadccd; background: #fbf6f0; color: var(--g-ink); }
body.guest.th-rest .guesthead { background: #2a1c14; }
body.guest.th-rest .tablechip { background: var(--gaccent); color: var(--gaccent-fg, #fff); }
body.guest.th-rest .gtitle, body.guest.th-rest .ghead h2 { font-family: Georgia, 'Times New Roman', serif; }
body.guest.th-rest .gtile, body.guest.th-rest .gitem { background: var(--g-card); border-color: var(--g-line); border-radius: 18px; backdrop-filter: blur(2px); }
/* 8.3.30: restaurant look - light card, dark words, the category colour on the top edge and the letter circle (was white on white) */
body.guest.th-rest .gtile { color: var(--g-ink); border: 1px solid var(--g-line); border-top: 6px solid var(--tc); box-shadow: 0 6px 16px rgba(42,28,20,.10); }
body.guest.th-rest .gtile .gdot { background: var(--tc); color: var(--tfg, #fff); }
body.guest.th-rest .gtile small, body.guest.th-rest .gtile i { color: var(--g-soft); opacity: 1; }
body.guest.th-rest .gitem b { color: var(--g-ink); }
body.guest.th-rest .gitem img { height: 120px; }
body.guest.th-rest .cartbar { background: var(--g-ink); left: 12px; right: 12px; bottom: 12px; border-radius: 16px; height: 60px; }
body.guest.th-rest .cartbar em { color: #f4c27a; }
body.guest.th-rest .guestwrap { position: relative; z-index: 1; }
/* floating pictures behind the menu */
.gfloat { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.gfloat img { position: absolute; object-fit: contain; opacity: .55; filter: drop-shadow(0 8px 16px rgba(42,28,20,.18)); }
.gfloat .f1 { animation: gfl1 9s ease-in-out infinite; } .gfloat .f2 { animation: gfl2 11s ease-in-out infinite; }
@keyframes gfl1 { 0%,100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-16px) rotate(5deg); } }
@keyframes gfl2 { 0%,100% { transform: translateY(0) rotate(5deg); } 50% { transform: translateY(14px) rotate(-6deg); } }
@media (prefers-reduced-motion: reduce) { .gfloat img, .kgo { animation: none !important; } }
body.at-welcome .guesthead, body.at-welcome .gfloat, body.at-welcome .waitercallbar { display: none; }
body.at-welcome { padding-bottom: 0; }
body.at-welcome .guestwrap { max-width: none; padding: 0; }
/* table QR welcome */
.welcome { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: #2a1c14; }
.wcover { flex: 1 0 34vh; background: radial-gradient(circle at 20% 30%, #7a3e1d 0, transparent 45%), radial-gradient(circle at 85% 60%, #b8692e 0, transparent 40%), #2a1c14; }
.wcover { position: relative; }
.wcover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.wsheet { position: relative; z-index: 1; background: #fbf6f0; border-radius: 28px 28px 0 0; margin-top: -28px; padding: 26px 20px 24px; display: flex; flex-direction: column; gap: 16px; max-width: 640px; width: 100%; box-sizing: border-box; align-self: center; }
.wshop { display: flex; align-items: center; gap: 12px; }
.wshop img { width: 54px; height: 54px; border-radius: 14px; object-fit: contain; background: #fff; border: 1px solid #eadccd; }
.wshop h1 { margin: 0; font: 700 25px Georgia, 'Times New Roman', serif; color: #2a1c14; }
.wshop p { margin: 2px 0 0; color: #6b5547; font-size: 14px; }
.wtext { margin: 0; color: #4a372b; line-height: 1.55; }
.wgo { min-height: 58px; border: 0; border-radius: 16px; background: var(--gaccent); color: var(--gaccent-fg, #fff); font-size: 19px; font-weight: 700; cursor: pointer; box-shadow: 0 10px 22px rgba(42,28,20,.22); }
.wgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.wbtn { min-height: 56px; border-radius: 14px; border: 1px solid #e3d5c6; background: #fff; color: #2a1c14; font-weight: 600; font-size: 15px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; }
.wbtn small { color: #6b5547; font-weight: 500; font-size: 12px; }
.wbtn:disabled { opacity: .6; }
/* kiosk attract screen */
.attract { position: relative; height: 100vh; height: 100dvh; overflow: hidden; background: #140e0a; color: #fff; }
.kbg, .kbg img, .kshade { position: absolute; inset: 0; }
.kbg { background: radial-gradient(circle at 30% 25%, #6e3a1c 0, transparent 50%), radial-gradient(circle at 75% 55%, #9c5a28 0, transparent 45%), #140e0a; }
.kbg img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s; }
.kbg img.on { opacity: 1; }
.kshade { background: linear-gradient(to bottom, rgba(20,14,10,.15) 30%, rgba(20,14,10,.85) 72%); }
.ktop { position: absolute; top: 5vh; left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ktop img { width: 96px; height: 96px; object-fit: contain; border-radius: 24px; background: #fff; padding: 6px; box-sizing: border-box; }
.ktop h1 { margin: 0; font: 700 clamp(28px, 4.5vw, 46px) Georgia, 'Times New Roman', serif; text-shadow: 0 2px 12px rgba(0,0,0,.4); }
.kbottom { position: absolute; left: 6vw; right: 6vw; bottom: 6vh; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.kbottom h2 { margin: 0; font: 700 clamp(30px, 5.5vw, 60px)/1.1 Georgia, 'Times New Roman', serif; }
.kbottom p { margin: 0; color: #f4c27a; font-size: clamp(20px, 3vw, 30px); font-weight: 600; }
.kbottom small { color: #d7c3b0; font-size: 15px; }
.kgo { width: min(100%, 720px); min-height: clamp(84px, 12vh, 130px); border: 0; border-radius: 28px; background: var(--gaccent); color: var(--gaccent-fg, #fff);
       font-size: clamp(26px, 4vw, 40px); font-weight: 700; cursor: pointer; box-shadow: 0 14px 34px rgba(0,0,0,.4); animation: kpulse 2.4s ease-in-out infinite; }
@keyframes kpulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.04); } }
/* 8.3.24: items that sell out */
.item, .gitem { position: relative; }
.item.soldout, .gitem.soldout { filter: grayscale(1); opacity: .55; cursor: not-allowed; }
.leftbadge { position: absolute; bottom: 8px; right: 8px; font-style: normal; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 8px; background: #2f6b3a; color: #fff; z-index: 2; }
.item.soldout .leftbadge { background: #5b4a3f; }
/* 8.3.30: phone / tablet list rows show the count too */
.mrow .leftbadge { position: static; display: inline-block; margin-top: 4px; }
.mrow.soldout { filter: grayscale(1); opacity: .55; cursor: not-allowed; } .mrow.soldout .leftbadge { background: #5b4a3f; }
.gsold, .gfew { position: absolute; bottom: 10px; right: 10px; font-style: normal; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 8px; color: #fff; z-index: 2; }
.gsold { background: #5b4a3f; } .gfew { background: #b4540f; }
/* 8.3.25: kiosk - Eat here / Take away on the start screen */
.kboth { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; width: min(100%, 720px); }
.kboth .kgo { width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.kboth .kgo small { font-size: .55em; font-weight: 600; opacity: .9; color: #fff; }
.kboth .kpick + .kpick { background: #2f6b3a; animation-delay: 1.2s; }
/* 8.3.26: customer display (second screen facing the customer) */
body.cdisp { margin: 0; height: 100vh; height: 100dvh; overflow: hidden; background: #f6f1ea; color: #2a1c14; font-size: clamp(14px, 1.6vw, 22px); }
.cdmsg { margin: 20vh auto; max-width: 560px; padding: 24px; background: #fff; border-radius: 16px; text-align: center; }
.cdgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 40%); height: 100%; }
.cdads { position: relative; background: #2a1c14; color: #fff; overflow: hidden; }
.cdads > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s; }
.cdads > img.on { opacity: 1; }
.cdshop { position: absolute; top: 20px; left: 20px; display: flex; align-items: center; gap: 12px; background: rgba(20,14,10,.55); padding: 10px 16px 10px 10px; border-radius: 16px; }
.cdshop img { width: 56px; height: 56px; object-fit: contain; background: #fff; border-radius: 12px; }
.cdshop span { opacity: .85; }
.cdchips { position: absolute; left: 20px; right: 20px; bottom: 20px; display: flex; flex-wrap: wrap; gap: 10px; }
.cdchips span { background: rgba(255,255,255,.18); padding: 8px 14px; border-radius: 999px; font-weight: 600; backdrop-filter: blur(4px); }
.cdchips .hot { background: var(--gaccent); }
.cdbill { display: flex; flex-direction: column; gap: 12px; padding: 22px; box-sizing: border-box; overflow: hidden; }
.cdhead { display: flex; justify-content: space-between; align-items: baseline; } .cdhead b { font-size: 1.3em; } .cdhead span { color: #6b5547; }
.cdlines { flex: 1; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; }
.cdlines > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #e7dccf; }
.cdlines small { display: block; color: #6b5547; font-size: .8em; }
.cdsum > div { display: flex; justify-content: space-between; padding: 2px 0; color: #4a372b; }
.cdtot { display: flex; justify-content: space-between; align-items: center; background: var(--gaccent); color: var(--gaccent-fg, #fff); border-radius: 16px; padding: 14px 18px; }
.cdtot strong { font-size: 2em; }
.cdthanks { margin: auto 0; display: flex; flex-direction: column; gap: 16px; text-align: center; } .cdthanks > b { font-size: 1.6em; }
.cdtoken b { font-size: 2.2em; color: var(--gaccent); }
body.cdidle .cdgrid { grid-template-columns: 1fr; } body.cdidle .cdbill { display: none; }
@media (orientation: portrait) { .cdgrid { grid-template-columns: 1fr; grid-template-rows: 38% 1fr; } body.cdidle .cdgrid { grid-template-rows: 1fr; } }

/* 8.3.49 live kitchen status */
.rc-st.s-ks { background: #e8ecee; color: #44525a; } .rc-st.s-kr { background: #d6e8ff; color: #0d3f8a; } .rc-st.s-kp { background: #ffe9b8; color: #7a4a00; }
.rc-st.s-kd { background: #1f9d55; color: #fff; animation: kdpulse 1.4s ease-in-out infinite; } .rc-st.s-kv { background: #e2e6e8; color: #5a6a72; }
@keyframes kdpulse { 50% { box-shadow: 0 0 0 5px rgba(31,157,85,.3); } }
.kst { display: block; margin-top: 3px; padding: 2px 8px; border-radius: 999px; font-weight: 700; font-size: 12px; }
.kst.k-sent { background: #e8ecee; color: #44525a; } .kst.k-received { background: #d6e8ff; color: #0d3f8a; } .kst.k-preparing { background: #ffe9b8; color: #7a4a00; }
.kst.k-ready { background: #1f9d55; color: #fff; } .kst.k-served { background: #e2e6e8; color: #5a6a72; }
.readystrip { background: #e8f8ee; border-bottom-color: #1f9d55; }
.callchip.ready { border: 2px solid #1f9d55; background: #fff; }
.modalhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 3; background: inherit; padding: 2px 0 8px; }
.modalhead h2 { margin: 0; }

/* 8.3.50: dine-in cards - the identifiers a cashier scans for (table, KOT, order number) are bold and darker; the rest stays regular */
.runcard.t-dine_in .rc-where .dn { font-weight: 900; color: #0a1116; font-size: 16px; }
.runcard.t-dine_in .rc-id strong { font-weight: 900; color: #000; }
.runcard.t-dine_in .rc-kot b { font-weight: 900; color: #000; font-size: 18px; }
/* 8.3.50: out-of-stock sticker on the tile (daily count 0, or the store has none) */
.item.soldout, .mrow.soldout, .item.na, .mrow.na { position: relative; overflow: hidden; }
.item.soldout::after, .mrow.soldout::after, .item.na::after, .mrow.na::after { content: 'OUT OF STOCK · نفد'; position: absolute; top: 50%; right: 8px; transform: translateY(-50%) rotate(-6deg); padding: 2px 8px; border-radius: 6px; background: #d93025; color: #fff; font: 800 10px/1.5 var(--font, sans-serif); letter-spacing: .03em; z-index: 3; box-shadow: 0 1px 4px rgba(0,0,0,.35); pointer-events: none; white-space: nowrap; }
.item.soldout { filter: none; opacity: 1; } .item.soldout > *:not(.leftbadge) { filter: grayscale(1); opacity: .5; }
.mrow.soldout { filter: none; opacity: 1; } .mrow.soldout > * { filter: grayscale(1); opacity: .5; }

.item.na::after, .mrow.na::after { content: 'NOT NOW · غير متاح'; background: #475569; }
.item.na > *:not(.leftbadge), .mrow.na > * { opacity: .55; }
.item.na .leftbadge, .mrow.na .leftbadge { background: #475569; }

/* 8.3.56: the active table session card on the guest phone page (order number, status, waiter reply) */
.sesscard { margin: 8px 12px; padding: 10px 12px; border-radius: 14px; background: #fff; color: #1a1a1a; font-size: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,.14); border-left: 5px solid var(--gaccent, #c2571d); position: relative; z-index: 3; }
.sesscard .sc-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.sesscard .sc-no { font-weight: 800; font-size: 17px; white-space: nowrap; }
.sesscard .sc-state { margin-top: 4px; font-weight: 600; }
.sesscard .sc-total { color: #555; margin-top: 2px; }
.sesscard .sc-call { margin-top: 6px; padding: 6px 8px; border-radius: 8px; background: #fff4e5; }
.sesscard .sc-btns { display: flex; gap: 8px; margin-top: 8px; }
.sesscard .sc-btns .btn { flex: 1; padding: 10px 8px; }

/* 8.3.57: rounds, customer cancel, Show bill */
.rnd { margin: 12px 0 2px; font-size: 13px; font-weight: 700; opacity: .75; }
.lines .chg { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.lines .mini { min-height: 36px; padding: 4px 12px; border-radius: 10px; border: 1px solid #c9c4bb; background: #fff; color: #1a1a1a; font-size: 14px; font-weight: 600; }
.lines .mini.bad { border-color: #c0392b; color: #c0392b; }
.lines .mini:disabled { opacity: .5; }
.lines .left { display: block; width: 100%; opacity: .7; }
.totals > div:not(.grand) { display: flex; justify-content: space-between; padding: 2px 0; font-size: 14px; }
.arx { display: inline-block; margin-inline-start: 8px; unicode-bidi: isolate; }
