@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

/* Deep navy, white, warm neutrals. One accent per screen: the shop's own color, used only where it signals state. */
:root {
  --bg: #f5f2ec; --surface: #ffffff; --sand: #ece6db; --line: #ddd5c7; --ink: #14213d; --muted: #5d6474;
  --primary: #14213d; --primary-ink: #ffffff; --primary-hover: #22345c;
  --ok: #22704a; --warn: #9a5a00; --danger: #a8362a;
  --shop: #14213d; --shop-ink: #ffffff;
  --r: 8px; --r-sm: 6px;
  font-family: 'IBM Plex Sans Arabic', 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 16px; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1424; --surface: #141d33; --sand: #1b2540; --line: #27324f; --ink: #edeef2; --muted: #a1a8b8;
    --primary: #ece6db; --primary-ink: #14213d; --primary-hover: #ffffff;
  }
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; background: var(--bg); line-height: 1.55; }
main { max-width: 1120px; margin: 0 auto; padding: 20px 16px 48px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .4em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 1.75rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }
p { margin: 0 0 .75em; }
a { color: inherit; text-underline-offset: 3px; }
img { max-width: 100%; }
input, select, textarea, button { font: inherit; color: inherit; }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
label { display: grid; gap: 6px; font-weight: 500; font-size: .95rem; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 500; font-size: .95rem; margin-bottom: 8px; }
.icon { flex: none; vertical-align: middle; }

.stack { display: grid; gap: 14px; }
.row { display: flex; gap: 8px; align-items: center; }
.wrap { flex-wrap: wrap; }
.center { text-align: center; justify-items: center; }
.muted { color: var(--muted); }
.error { color: var(--danger); min-height: 1.5em; margin: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.eyebrow { font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 14px; min-height: 40px;
  border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-decoration: none; font-weight: 500; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { background: var(--primary-hover); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.big { padding: 14px 20px; font-size: 1.05rem; width: 100%; min-height: 52px; font-weight: 600; }
.btn:disabled { opacity: .5; cursor: wait; }
.lang-toggle { display: block; width: auto; margin: 0 0 12px; margin-inline-start: auto; padding: 6px 10px;
  font-size: .85rem; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
body > .lang-toggle { margin: 12px 16px 0; margin-inline-start: auto; }

.pill, .tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-sm); background: var(--sand); font-size: .875rem; }
.pill.ok, .tag.ok { color: var(--ok); }
.log-wrap { max-height: 320px; overflow: auto; }
.log { width: 100%; border-collapse: collapse; font-size: .85rem; font-variant-numeric: tabular-nums; }
.log td { padding: 6px 8px; border-top: 1px solid var(--line, #e5e2dc); text-align: start; }
.log tr.ok td:last-child { color: var(--ok); font-weight: 600; }
.tag.off { color: var(--warn); }
.hint { display: flex; gap: 10px; align-items: flex-start; background: var(--sand); border-radius: var(--r-sm); padding: 12px; font-size: .95rem; text-align: start; }

/* customer ticket */
.shop-head { display: flex; align-items: center; gap: 10px; justify-content: center; padding: 8px 0 20px; font-size: 1.05rem; font-weight: 600; }
.shop-head img { width: 40px; height: 40px; object-fit: contain; border-radius: var(--r-sm); }
.ticket { max-width: 440px; }
.num { font-family: 'IBM Plex Sans', system-ui, sans-serif; font-size: clamp(4rem, 22vw, 6.5rem); font-weight: 700; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); padding: 0; margin: 4px 0 0; width: 100%; border-top: 1px solid var(--line); }
.steps li { padding: 10px 4px 0; color: var(--muted); font-size: .85rem; border-top: 3px solid transparent; margin-top: -2px; }
.steps li.on { color: var(--ink); border-color: var(--ink); font-weight: 600; }
.ready-screen { background: var(--shop); color: var(--shop-ink); border-radius: var(--r); padding: 32px 20px; display: grid; gap: 14px; text-align: center; }
.ready-screen.ringing { animation: ring-flash 1s steps(2, jump-none) infinite; }
@keyframes ring-flash { 50% { background: var(--shop-ink); color: var(--shop); } }
@media (prefers-reduced-motion: reduce) { .ready-screen.ringing { animation: none; } }
.ready-screen .btn.dark { background: var(--surface); color: var(--ink); border-color: var(--surface); }
.ready-screen .pill { background: rgb(255 255 255 / .15); color: inherit; justify-self: center; }
.big-input { font-family: 'IBM Plex Sans', system-ui, sans-serif; font-size: 2rem; text-align: center; letter-spacing: .04em; }
.stars { display: flex; flex-direction: row-reverse; justify-content: center; gap: 2px; position: relative; }
.stars input { position: absolute; opacity: 0; width: 1px; height: 1px; inset: 0; }
.stars label { color: var(--line); cursor: pointer; padding: 4px; }
.stars label .icon { width: 32px; height: 32px; }
.stars input:checked ~ label, .stars label:hover, .stars label:hover ~ label { color: var(--warn); }
.stars input:checked ~ label .icon, .stars label:hover .icon, .stars label:hover ~ label .icon { fill: currentColor; }
.stars input:focus-visible + label { outline: 2px solid var(--ink); border-radius: var(--r-sm); }

/* cashier */
.bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 40px; }
.bar strong { font-size: 1.1rem; }
.new-order { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin: 14px 0 20px; }
.new-order .btn.big { width: auto; }
.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
@media (max-width: 760px) { .cols { grid-template-columns: 1fr; } }
.col h2 { font-size: .85rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
  display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 10px; }
.order { background: var(--surface); border: 1px solid var(--line); border-inline-start: 3px solid var(--line); border-radius: var(--r-sm); padding: 12px; margin-bottom: 8px; display: grid; gap: 10px; }
.order.preparing { border-inline-start-color: var(--ink); }
.order.ready { border-inline-start-color: var(--ok); }
.order.done, .order.cancelled { opacity: .55; }
.order-top { display: flex; justify-content: space-between; align-items: baseline; }
.order-top time { font-family: 'IBM Plex Sans', system-ui, sans-serif; font-variant-numeric: tabular-nums; color: var(--muted); font-size: .9rem; display: inline-flex; gap: 4px; align-items: center; }
.num-sm { font-family: 'IBM Plex Sans', system-ui, sans-serif; font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: .8rem; padding: 2px 8px; border-radius: 4px; background: var(--sand); }
.badge.off { color: var(--warn); }
.badge.on { color: var(--ok); }
.actions { display: flex; flex-wrap: wrap; gap: 6px; }
.actions .btn { min-height: 36px; padding: 6px 12px; font-size: .9rem; }
dialog { border: 1px solid var(--line); border-radius: var(--r); padding: 24px; text-align: center; background: var(--surface); color: var(--ink); }
dialog::backdrop { background: rgb(13 20 36 / .55); }
dialog img { width: min(70vw, 300px); background: #fff; padding: 8px; }

/* counter + tv */
.screen { min-height: 100dvh; display: grid; place-content: center; text-align: center; gap: 18px; padding: 24px; }
.qr svg { width: min(58vmin, 400px); height: auto; background: #fff; padding: 12px; border: 1px solid var(--line); }
.lead { font-size: clamp(1.3rem, 3.6vw, 2.2rem); font-weight: 600; margin: 0; display: inline-flex; gap: 10px; align-items: center; justify-content: center; }
.tv { display: grid; grid-template-columns: 3fr 1fr; gap: 32px; min-height: 100dvh; padding: 32px; }
.tv h2 { font-size: 1.1rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.tv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.tv-num { font-family: 'IBM Plex Sans', system-ui, sans-serif; font-size: 4.5rem; font-weight: 700; text-align: center; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); font-variant-numeric: tabular-nums; }
.tv-num.new { background: var(--shop); color: var(--shop-ink); border-color: var(--shop); }
.tv ul { list-style: none; padding: 0; font-family: 'IBM Plex Sans', system-ui, sans-serif; font-size: 2.2rem; font-variant-numeric: tabular-nums; display: grid; gap: 4px; color: var(--muted); }
.overlay { position: fixed; inset: 0; display: grid; place-content: center; gap: 12px; justify-items: center; background: rgb(13 20 36 / .85); color: #fff; font-size: 1.6rem; border: 0; cursor: pointer; z-index: 10; }

/* owner + marketing */
.site-nav { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 4px 0 24px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.site-nav .brand { font-weight: 700; font-size: 1.15rem; letter-spacing: -.01em; }
.site-nav nav { display: flex; gap: 16px; align-items: center; }
.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; padding: 40px 0 48px; }
.hero h1 { font-size: clamp(2rem, 4.4vw, 3rem); letter-spacing: -.02em; }
.hero .lede { font-size: 1.1rem; color: var(--muted); max-width: 34em; }
.hero .facts { display: flex; flex-wrap: wrap; gap: 6px 20px; padding: 0; margin: 20px 0 0; list-style: none; color: var(--muted); font-size: .92rem; }
.hero .facts li { display: inline-flex; gap: 6px; align-items: center; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; gap: 32px; } }
section.block { padding: 40px 0; border-top: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: 240px 1fr; gap: 32px; }
@media (max-width: 760px) { .section-head { grid-template-columns: 1fr; gap: 12px; } }
.flow { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; counter-reset: step; }
.flow li { display: grid; grid-template-columns: 40px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: start; }
.flow li:last-child { border-bottom: 0; }
.flow li::before { counter-increment: step; content: counter(step, decimal-leading-zero); font-family: 'IBM Plex Sans', system-ui, sans-serif; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 1px; }
.specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 32px; margin: 0; }
.specs div { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 640px) { .specs { grid-template-columns: 1fr; } }
.plans { display: grid; grid-template-columns: repeat(2, 1fr); border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.plans > div { padding: 20px; display: grid; gap: 4px; }
.plans > div + div { border-inline-start: 1px solid var(--line); }
@media (max-width: 560px) { .plans { grid-template-columns: 1fr; } .plans > div + div { border-inline-start: 0; border-top: 1px solid var(--line); } }
.price { font-family: 'IBM Plex Sans', system-ui, sans-serif; font-size: 2.2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
details { border-bottom: 1px solid var(--line); padding: 14px 0; }
summary { cursor: pointer; font-weight: 600; }
details p { margin: 8px 0 0; color: var(--muted); }
.auth { max-width: 400px; margin: 10vh auto; }
.progress { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0; margin: 0 0 28px; }
.progress li { border-top: 3px solid var(--line); padding-top: 8px; font-size: .9rem; color: var(--muted); }
.progress li.on { border-color: var(--ink); color: var(--ink); font-weight: 600; }
.wizard { display: grid; grid-template-columns: 1fr 300px; gap: 40px; align-items: start; }
@media (max-width: 800px) { .wizard { grid-template-columns: 1fr; } }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); cursor: pointer; font-weight: 400; font-size: .92rem; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; inset: 0; }
.chip:has(input:checked) { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.option { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); font-weight: 400; cursor: pointer; }
.option:has(input:checked) { border-color: var(--ink); }
.option input { width: auto; margin-top: 5px; }
.phone { width: 280px; margin: 0 auto; border: 9px solid #14213d; border-radius: 36px; overflow: hidden; background: var(--bg); position: sticky; top: 16px; }
.phone-screen { padding: 16px; min-height: 460px; display: grid; align-content: start; gap: 12px; }
.phone .num { font-size: 4rem; }
.go-staff { display: flex; gap: 16px; align-items: center; }
.go-staff img { background: #fff; padding: 6px; border: 1px solid var(--line); }
.links input { font-family: 'IBM Plex Sans', system-ui, sans-serif; font-size: .85rem; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border: 1px solid var(--line); border-radius: var(--r-sm); }
.stat { display: grid; gap: 2px; padding: 14px; border-inline-end: 1px solid var(--line); }
.stat b { font-family: 'IBM Plex Sans', system-ui, sans-serif; font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.bar-row { display: grid; grid-template-columns: 48px 1fr 36px; gap: 8px; align-items: center; font-size: .85rem; font-variant-numeric: tabular-nums; }
.bar-row i { display: block; height: 8px; border-radius: 2px; background: var(--ink); }
input[type=color] { height: 44px; padding: 4px; cursor: pointer; }
.row > input, .row > select { flex: 1; min-width: 0; width: auto; }

/* poster */
.poster { max-width: 720px; text-align: center; display: grid; gap: 16px; justify-items: center; }
.poster .qr-img { width: 68%; max-width: 360px; border: 1px solid var(--line); padding: 10px; background: #fff; }
.poster ol { text-align: start; font-size: 1.15rem; }
@page { size: A4; margin: 16mm; }
@media print { .no-print, .lang-toggle { display: none !important; } body { background: #fff; } }
@media (max-width: 560px) { .site-nav nav a[href^="#"] { display: none; } .site-nav nav { gap: 10px; } }
.version { text-align: center; font-size: .7rem; color: var(--muted); padding: 16px; font-variant-numeric: tabular-nums; direction: ltr; }
