:root { --bg: #0B0E33; --panel: #151A52; --panel2: #1D2468; --line: rgba(175,195,255,.16); --text: #F2F4FF;
  --muted: #B5C4FF; --cyan: #28C1FA; --green: #34D399; --amber: #FFB86B; --red: #FF7A8A;
  --font: "Segoe UI", system-ui, -apple-system, "Noto Sans Arabic", Tahoma, sans-serif; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 18px; }
body { padding-bottom: env(safe-area-inset-bottom); }
.bar { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  padding-top: calc(10px + env(safe-area-inset-top)); background: var(--panel); border-bottom: 1px solid var(--line); }
.logo { width: 38px; height: 38px; object-fit: contain; }
.who { flex: 1; display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.who b { font-size: 18px; }
.pill { font-size: 13px; color: var(--muted); }
.pill.ok { color: var(--green); } .pill.wait { color: var(--amber); } .pill.bad { color: var(--red); }
main { padding: 14px; max-width: 560px; margin: 0 auto; }
button { font: inherit; border: 0; border-radius: 14px; color: var(--text); cursor: pointer; }
.chip { background: var(--panel2); padding: 8px 14px; font-size: 15px; border: 1px solid var(--line); }
.big { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 76px;
  font-size: 22px; font-weight: 700; margin: 0 0 12px; padding: 14px; }
.big .ico { font-size: 30px; }
.primary { background: var(--cyan); color: #04143A; }
.green { background: var(--green); color: #04261A; }
.amber { background: var(--amber); color: #3A2200; }
.ghost { background: var(--panel2); border: 1px solid var(--line); }
.row { display: flex; gap: 10px; } .row > * { flex: 1; }
h2 { font-size: 19px; margin: 22px 2px 10px; color: var(--muted); font-weight: 600; }
h1 { font-size: 23px; margin: 6px 2px 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin-bottom: 10px;
  display: flex; align-items: center; gap: 12px; }
.card .info { flex: 1; min-width: 0; }
.card .info b { display: block; font-size: 19px; }
.card .info span { display: block; color: var(--muted); font-size: 15px; margin-top: 3px; }
.card button { padding: 14px 18px; font-size: 18px; font-weight: 700; }
.card.pick { cursor: pointer; } .card.pick:active { background: var(--panel2); }
.money { font-weight: 800; font-size: 20px; color: var(--amber); white-space: nowrap; }
.empty { color: var(--muted); padding: 10px 4px 4px; }
label { display: block; margin: 0 2px 14px; color: var(--muted); font-size: 16px; }
input { display: block; width: 100%; margin-top: 6px; font: inherit; font-size: 22px; color: var(--text); background: var(--panel);
  border: 2px solid var(--line); border-radius: 14px; padding: 14px; }
input:focus { outline: none; border-color: var(--cyan); }
input.pct { font-size: 34px; text-align: center; font-weight: 700; }
.quick { display: flex; gap: 8px; margin-top: 8px; } .quick button { flex: 1; background: var(--panel2); padding: 12px; font-size: 18px; }
.total { background: var(--panel2); border-radius: 16px; padding: 16px; text-align: center; margin: 6px 0 16px; }
.total b { display: block; font-size: 38px; color: var(--green); margin-top: 4px; }
.total span { color: var(--muted); font-size: 15px; }
.err { color: var(--red); min-height: 24px; margin: 4px 2px 10px; }
.names { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.names button { min-height: 90px; font-size: 24px; font-weight: 700; background: var(--panel); border: 2px solid var(--line); }
.names button.on { border-color: var(--cyan); background: var(--panel2); }
.dots { display: flex; justify-content: center; gap: 14px; margin: 18px 0; direction: ltr; }
.dots i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--muted); }
.dots i.on { background: var(--cyan); border-color: var(--cyan); }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; direction: ltr; }
.pad button { min-height: 72px; font-size: 30px; font-weight: 700; background: var(--panel); border: 1px solid var(--line); }
.photo-btn { width: 100%; padding: 16px; background: var(--panel2); border: 2px dashed var(--line); font-size: 19px; margin-bottom: 14px; }
.thumb { max-width: 100%; border-radius: 12px; margin: -4px 0 14px; display: block; }
.warn { background: rgba(255,122,138,.14); color: var(--red); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; font-size: 16px; }
.back { background: none; color: var(--muted); padding: 6px 2px; font-size: 17px; margin-bottom: 4px; }
#toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--green); color: #04261A; font-weight: 700; padding: 14px 22px; border-radius: 14px; opacity: 0;
  transition: opacity .25s; pointer-events: none; z-index: 9; font-size: 19px; white-space: normal; text-align: center;
  width: max-content; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; }
a.tel { color: var(--cyan); text-decoration: none; }
.card .info span { unicode-bidi: plaintext; text-align: start; }
a.tel, .money, .pct, .dots, input[type=tel], input[inputmode=decimal], input[inputmode=numeric] { direction: ltr; unicode-bidi: isolate; }
a.tel { display: inline-block; }
.total .calc { display: block; margin-top: 4px; unicode-bidi: isolate; }

.cash { background: rgba(255,184,107,.12); border: 1px solid rgba(255,184,107,.35); border-radius: 16px; padding: 14px;
  margin: 2px 0 12px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cash .info { flex: 1; min-width: 150px; } .cash .info span { display: block; color: var(--muted); font-size: 15px; }
.cash .info b { display: block; font-size: 30px; color: var(--amber); margin: 2px 0; unicode-bidi: isolate; }
.cash .pend { color: var(--amber) !important; }
.cash button { padding: 14px 16px; font-size: 17px; font-weight: 700; }
button.wa, a.wa { background: #25D366; color: #052E16; font-weight: 700; }
a.big { border-radius: 14px; }
.card button.wa { padding: 12px 14px; font-size: 16px; }

.card .info .pill { display: inline-block; margin-top: 6px; font-weight: 600; }
.card .info .calc { unicode-bidi: isolate; }
a.big.wa { color: #052E16; }
.card .info .pill.ok { color: var(--green); } .card .info .pill.wait { color: var(--amber); } .card .info .pill.bad { color: var(--red); }

.prog { height: 12px; border-radius: 99px; background: rgba(175,195,255,.16); overflow: hidden; margin: 8px 0 4px; direction: ltr; }
.prog i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #28C1FA, #34D399); transition: width .6s; }
.prog.full i { background: #34D399; }
.card.full { border-color: rgba(52,211,153,.7); background: rgba(52,211,153,.10); }
.est { font-size: 14px; color: var(--muted); }
/* new customer form: the phone number already belongs to a customer */
.dup { background: rgba(255,184,107,.12); border: 1px solid rgba(255,184,107,.35); border-radius: 16px; padding: 14px; margin: -4px 0 16px; }
.dup:empty { display: none; }
.dup p { margin: 0 0 12px; font-size: 18px; color: var(--text); }
.dup .anyway { display: block; width: 100%; padding: 12px; font-size: 16px; color: var(--muted); }
/* watch-only account */
.watch { background: rgba(40, 193, 250, 0.12); border: 1px solid rgba(40, 193, 250, 0.4); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; font-weight: 600; }
.state { font-weight: 700; padding: 6px 12px; border-radius: 999px; white-space: nowrap; }
.state.busy { background: rgba(255, 184, 107, 0.16); color: #FFB86B; }
.state.free { background: rgba(52, 211, 153, 0.16); color: #34D399; }
