/* تمليحه — شاشة الكاشير. Brand: charcoal · Tamliha orange · saffron · cream · Sadu red. */
@font-face { font-family: Messiri; src: url(/fonts/el-messiri-arabic-700-normal.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: Messiri; src: url(/fonts/el-messiri-arabic-600-normal.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: Cairo; src: url(/fonts/cairo-arabic-wght-normal.woff2) format('woff2'); font-weight: 200 1000; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E; }
@font-face { font-family: Cairo; src: url(/fonts/cairo-latin-wght-normal.woff2) format('woff2'); font-weight: 200 1000; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: Corm; src: url(/fonts/cormorant-garamond-latin-700-normal.woff2) format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --ink: #141010; --ink2: #4b3f39; --mute: #8f8078; --paper: #f6f0e8; --card: #ffffff; --cream: #fff3e0; --line: rgba(20, 16, 16, .09);
  --or: #ee6724; --ord: #c9501a; --yel: #f6b13a; --red: #a3271b; --green: #23955a; --blue: #2b6cb0;
  --side: 248px; --r: 16px;
  --sh: 0 1px 2px rgba(20, 16, 16, .06), 0 10px 30px -18px rgba(20, 16, 16, .35);
  --f: 'Cairo', system-ui, sans-serif; --f-ar: 'Messiri', 'Cairo', serif; --f-num: 'Cairo', system-ui, sans-serif; /* numbers: clear lining digits */
}
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: var(--f); background: var(--paper); color: var(--ink); font-size: 15px; line-height: 1.5; font-variant-numeric: lining-nums; -webkit-tap-highlight-color: transparent; overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }
.num { font-family: var(--f-num); font-weight: 800; direction: ltr; unicode-bidi: isolate; }

/* ------------------------------------------------------------ PIN */
.login { position: fixed; inset: 0; display: grid; place-items: center; padding: 20px; background: radial-gradient(120% 80% at 50% 0%, #2a1d17 0%, var(--ink) 60%); color: var(--cream); overflow: auto; }
.login__glow { position: absolute; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(238, 103, 36, .35), transparent 65%); top: -160px; left: 50%; transform: translateX(-50%); filter: blur(10px); pointer-events: none; }
.login__card { position: relative; width: min(380px, 100%); text-align: center; }
.login__logo { width: 112px; height: 112px; margin: 0 auto 14px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 6px rgba(238, 103, 36, .25), 0 20px 50px -20px #000; }
.login h1 { font: 700 30px/1.2 var(--f-ar); }
.login__sub { opacity: .7; margin-top: 4px; }
.pin { display: flex; justify-content: center; gap: 14px; margin: 26px 0 6px; direction: ltr; }
.pin i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 243, 224, .5); transition: all .2s; }
.pin i.on { background: var(--or); border-color: var(--or); transform: scale(1.1); }
.pin.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-10px); } 40%, 80% { transform: translateX(10px); } }
.login__err { min-height: 24px; color: #ff9b74; font-weight: 700; font-size: 14px; }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 10px; direction: ltr; }
.pad button { height: 68px; border-radius: 18px; background: rgba(255, 243, 224, .07); border: 1px solid rgba(255, 243, 224, .12); font: 700 30px/1 var(--f-num); color: var(--cream); transition: background .15s, transform .1s; }
.pad button:active { background: var(--or); transform: scale(.96); }
.pad .pad__fn { font: 700 16px var(--f); display: grid; place-items: center; }
.login__go { width: 100%; height: 60px; margin-top: 14px; font-size: 19px; }
.login__go:disabled { opacity: .35; box-shadow: none; }

/* this device = ONE branch (from its PIN) */
.side__branch { display: grid; gap: 2px; margin: 0 2px 8px; padding: 12px 14px; border-radius: 14px; background: linear-gradient(135deg, var(--or), var(--ord)); color: #fff; box-shadow: 0 12px 26px -16px rgba(238, 103, 36, .95); }
.side__branch small { font-size: 12px; font-weight: 700; opacity: .85; }
.side__branch b { font: 700 26px/1.1 var(--f-ar); }
.side__branch span { font-size: 12px; font-weight: 600; opacity: .9; line-height: 1.35; }
.brpill { display: inline-block; vertical-align: middle; margin-inline-start: 8px; padding: 3px 12px 4px; border-radius: 999px; background: var(--or); color: #fff; font: 700 15px/1.3 var(--f-ar); font-style: normal; }
.brpill:empty { display: none; }

/* ------------------------------------------------------------ layout */
.app { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); height: 100dvh; }
.side { background: var(--ink); color: var(--cream); display: flex; flex-direction: column; padding: 18px 12px calc(14px + env(safe-area-inset-bottom)); gap: 8px; overflow-y: auto; }
.side__brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 18px; border-bottom: 1px solid rgba(255, 243, 224, .1); margin-bottom: 8px; }
.side__brand img { width: 52px; height: 52px; border-radius: 50%; background: #fff; }
.side__brand b { display: block; font: 700 22px/1.1 var(--f-ar); }
.side__brand small { color: var(--or); font-weight: 700; letter-spacing: .02em; }
.side__nav { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.nav { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 14px; border-radius: 12px; text-align: start; font-weight: 700; font-size: 15px; color: rgba(255, 243, 224, .78); transition: background .2s, color .2s; }
.nav:hover { background: rgba(255, 243, 224, .06); color: #fff; }
.nav.is-on { background: var(--or); color: #fff; box-shadow: 0 10px 24px -14px rgba(238, 103, 36, .9); }
.nav span { flex: 1; line-height: 1.3; }
.nav__n { min-width: 26px; height: 26px; padding: 0 8px; border-radius: 13px; display: grid; place-items: center; background: #fff; color: var(--or); font: 700 14px/1 var(--f); }
.nav.is-on .nav__n { background: var(--ink); color: #fff; }
.nav__n--red { background: #ff4d3d; color: #fff; animation: pulse 1.6s infinite; }
.nav__n--mute { background: rgba(255, 243, 224, .16); color: var(--cream); }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 77, 61, .6); } 50% { box-shadow: 0 0 0 7px rgba(255, 77, 61, 0); } }
.nav--out { color: rgba(255, 243, 224, .55); margin-top: 6px; border-top: 1px solid rgba(255, 243, 224, .1); border-radius: 0 0 12px 12px; }

.main { display: flex; flex-direction: column; min-width: 0; height: 100dvh; }
.top { display: flex; align-items: center; gap: 16px; padding: 14px 24px; background: var(--card); border-bottom: 1px solid var(--line); }
.top__title h1 { font: 700 24px/1.15 var(--f-ar); white-space: nowrap; }
.top__title p { color: var(--mute); font-size: 13px; font-weight: 600; white-space: nowrap; }
.search { flex: 1; max-width: 460px; margin-inline-start: auto; display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 14px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); color: var(--mute); }
.search:focus-within { border-color: var(--or); box-shadow: 0 0 0 3px rgba(238, 103, 36, .15); }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--ink); font-weight: 600; }
.top__tools { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }
.tool { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--card); color: var(--ink2); transition: all .2s; }
.tool:hover { border-color: var(--or); color: var(--or); }
.tool.spin svg { animation: spin .8s linear; }
@keyframes spin { to { transform: rotate(-360deg); } }
#mute .off { display: none; }
#mute[aria-pressed="true"] { background: #fde8e3; border-color: #f3b6a6; color: var(--red); }
#mute[aria-pressed="true"] .on { display: none; } #mute[aria-pressed="true"] .off { display: inline; }
.live { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 16px; background: #e8f6ee; color: var(--green); font-weight: 700; font-size: 13px; white-space: nowrap; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: blink 1.4s infinite; }
.live.is-off { background: #fde8e3; color: var(--red); }
@keyframes blink { 50% { opacity: .25; } }
/* the clock — on the left, local Saudi time, 12 hours */
.clock { display: flex; flex-direction: column; align-items: flex-end; padding: 6px 14px; border-radius: 12px; background: var(--ink); color: var(--cream); min-width: 132px; text-align: left; }
.clock b { font: 700 24px/1.05 var(--f); letter-spacing: .02em; direction: rtl; }
.clock small { font-size: 11.5px; font-weight: 600; opacity: .75; white-space: nowrap; }

.view { display: none; flex: 1; min-height: 0; overflow-y: auto; padding: 20px 24px 40px; }
.view.is-on { display: block; }
.view[data-view="orders"].is-on, .view[data-view="calls"].is-on { display: flex; flex-direction: column; }

/* ------------------------------------------------------------ board */
.seg { display: none; gap: 6px; padding: 5px; border-radius: 14px; background: #ece4da; margin-bottom: 14px; }
.seg button { flex: 1; height: 42px; padding: 0 14px; white-space: nowrap; border-radius: 10px; font-weight: 700; font-size: 14px; color: var(--ink2); display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.seg button b { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: rgba(20, 16, 16, .08); display: grid; place-items: center; font-size: 12px; }
.seg button.is-on { background: var(--card); color: var(--ink); box-shadow: var(--sh); }
.seg--inline { display: inline-flex; margin: 0; }
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; flex: 1; min-height: 0; }
.board--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); flex: none; }
.col { background: rgba(255, 255, 255, .5); border: 1px solid var(--line); border-radius: 20px; padding: 14px; min-height: 240px; }
.col h2 { display: flex; align-items: center; gap: 10px; font: 700 18px/1.2 var(--f-ar); padding: 2px 4px 12px; }
.col h2 i { width: 12px; height: 12px; border-radius: 50%; background: var(--c, var(--or)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c, var(--or)) 20%, transparent); }
.col h2 small { color: var(--mute); font: 600 13px var(--f); }
.col h2 b { margin-inline-start: auto; min-width: 30px; height: 28px; padding: 0 9px; border-radius: 14px; display: grid; place-items: center; background: var(--c, var(--or)); color: #fff; font: 700 14px var(--f); }
.col--new { --c: var(--or); } .col--prep { --c: var(--yel); } .col--done { --c: var(--green); }
.col--call { --c: var(--red); } .col--way { --c: var(--blue); }
.col__list { display: flex; flex-direction: column; gap: 12px; }
.col__list:empty::after { content: 'لا يوجد'; display: block; padding: 30px 0; text-align: center; color: var(--mute); font-weight: 600; border: 2px dashed var(--line); border-radius: 14px; }

/* an order card */
.ord { position: relative; background: var(--card); border-radius: var(--r); box-shadow: var(--sh); overflow: hidden; border-top: 5px solid var(--c, var(--or)); }
.ord--new { --c: var(--or); } .ord--preparing { --c: var(--yel); } .ord--delivered { --c: var(--green); }
.ord--call { --c: var(--red); } .ord--onway { --c: var(--blue); } .ord--done { --c: var(--green); }
.ord.is-fresh { animation: fresh 1.2s ease 3; }
@keyframes fresh { 0%, 100% { box-shadow: var(--sh); } 50% { box-shadow: 0 0 0 5px rgba(238, 103, 36, .45), var(--sh); } }
.ord__head { display: flex; align-items: center; gap: 10px; padding: 12px 14px 8px; }
.ord__no { font: 700 30px/1 var(--f-num); color: var(--c); direction: ltr; }
.ord__no small { font: 700 14px var(--f); color: var(--mute); margin-inline-end: 2px; }
.ord__time { margin-inline-start: auto; text-align: end; font-size: 12.5px; font-weight: 700; color: var(--ink2); line-height: 1.25; }
.ord__time small { display: block; color: var(--mute); font-weight: 600; }
.ord__who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 0 14px 10px; }
.ord__who b { font: 700 17px/1.3 var(--f-ar); }
.seat { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 11px; border-radius: 14px; background: var(--ink); color: #fff; font-weight: 700; font-size: 13.5px; }
.seat .num { font-size: 18px; line-height: 1; }
.pay { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 12px; background: #e8f6ee; color: var(--green); font-weight: 700; font-size: 12px; }
.ord__items { list-style: none; padding: 4px 14px 8px; border-top: 1px dashed var(--line); }
.ord__items li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: baseline; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.ord__items li:last-child { border-bottom: 0; }
.ord__items .q { font: 700 17px var(--f); color: var(--or); direction: ltr; text-align: center; background: #fff1e8; border-radius: 8px; padding: 0 4px; }
.ord__items .n b { font-weight: 800; }
.ord__items .n small { display: block; color: var(--mute); font-weight: 600; font-size: 12px; }
.ord__items .n small.free { color: var(--green); }
.ord__items .p { font: 700 18px var(--f-num); color: var(--ink2); direction: ltr; }
.ord__note { margin: 4px 14px 10px; padding: 9px 12px; border-radius: 10px; background: #fff7d6; border: 1px solid #f3dc8a; color: #6b5100; font-weight: 700; font-size: 14px; }
.ord__note::before { content: 'ملاحظات: '; color: #9a7700; }
.ord__sum { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: #faf6f0; border-top: 1px solid var(--line); font-weight: 700; color: var(--ink2); }
.ord__sum .num { font-size: 30px; color: var(--ink); }
.ord__act { display: flex; gap: 8px; padding: 10px 12px 12px; }
.btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 52px; padding: 0 18px; border-radius: 13px; font-weight: 800; font-size: 16px; transition: transform .1s, filter .2s, background .2s; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn--or { background: var(--or); color: #fff; box-shadow: 0 10px 22px -14px rgba(238, 103, 36, .95); }
.btn--yel { background: var(--yel); color: var(--ink); }
.btn--green { background: var(--green); color: #fff; box-shadow: 0 10px 22px -14px rgba(35, 149, 90, .95); }
.btn--blue { background: var(--blue); color: #fff; }
.btn--red { background: var(--red); color: #fff; }
.btn--line { border: 1.5px solid var(--line); background: var(--card); color: var(--ink2); }
.done-tag { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 44px; border-radius: 12px; background: #e8f6ee; color: var(--green); font-weight: 800; }
.ord--done .ord__items, .ord--delivered .ord__items { opacity: .85; }

.sub { display: flex; align-items: center; gap: 10px; margin: 26px 4px 12px; font: 700 18px var(--f-ar); }
.sub b { min-width: 28px; height: 26px; padding: 0 8px; border-radius: 13px; display: grid; place-items: center; background: var(--green); color: #fff; font: 700 13px var(--f); }
.calls-done { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.calls-done .mini { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--card); box-shadow: var(--sh); font-weight: 700; font-size: 14px; }
.calls-done .mini small { margin-inline-start: auto; color: var(--mute); font-weight: 600; }
.calls-done:empty::after { content: 'لا يوجد'; color: var(--mute); font-weight: 600; padding: 4px; }

/* ------------------------------------------------------------ daily */
.dayctl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dayctl__pick { position: relative; display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-weight: 700; }
.dayctl__pick input { border: 0; background: none; font-weight: 700; font-size: 16px; outline: none; direction: ltr; }
.dayctl__pick span { color: var(--mute); font-size: 13.5px; }
.chip { height: 40px; padding: 0 18px; border-radius: 20px; background: var(--ink); color: #fff; font-weight: 700; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin: 18px 0; }
.stat { position: relative; padding: 16px 18px; border-radius: var(--r); background: var(--card); box-shadow: var(--sh); overflow: hidden; }
.stat::before { content: ''; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 5px; background: var(--c, var(--or)); }
.stat small { display: block; color: var(--mute); font-weight: 700; font-size: 13px; }
.stat b { display: block; margin-top: 4px; font: 700 38px/1 var(--f-num); direction: ltr; text-align: start; unicode-bidi: plaintext; }
.stat--sales { --c: var(--green); } .stat--port { --c: var(--yel); } .stat--calls { --c: var(--red); } .stat--done { --c: var(--blue); }
.stats--sm { margin: 0; grid-template-columns: repeat(2, minmax(150px, 1fr)); }
.stats--sm .stat b { font-size: 30px; }
.recent { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 14px; scrollbar-width: thin; }
.recent button { flex: none; display: flex; flex-direction: column; align-items: center; padding: 8px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-weight: 700; font-size: 13px; line-height: 1.3; }
.recent button small { color: var(--mute); font-weight: 600; }
.recent button.is-on { border-color: var(--or); background: #fff1e8; }
.tablewrap { background: var(--card); border-radius: var(--r); box-shadow: var(--sh); overflow: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { position: sticky; top: 0; background: #faf6f0; text-align: start; padding: 12px 14px; color: var(--mute); font-weight: 700; font-size: 13px; white-space: nowrap; }
.tbl td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: top; font-weight: 600; }
.tbl tbody tr { cursor: pointer; transition: background .15s; }
.tbl tbody tr:hover { background: #fffaf3; }
.tbl td.n { font: 700 20px var(--f-num); color: var(--or); }
.tbl td.t { white-space: nowrap; color: var(--ink2); }
.tbl td.s { font: 700 19px var(--f-num); white-space: nowrap; }
.tbl td.items { color: var(--ink2); font-size: 13px; max-width: 360px; }
.badge { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 13px; font-weight: 700; font-size: 12.5px; white-space: nowrap; }
.badge--new { background: #fff1e8; color: var(--ord); } .badge--preparing { background: #fff5dc; color: #9a6400; } .badge--delivered { background: #e8f6ee; color: var(--green); }
.empty { padding: 40px; text-align: center; color: var(--mute); font-weight: 700; }

/* ------------------------------------------------------------ menu availability */
.menuhead { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.stat--on { --c: var(--green); } .stat--off { --c: var(--red); }
.hint { margin: 14px 2px 6px; color: var(--mute); font-weight: 600; font-size: 13.5px; }
.msec h3 { display: flex; align-items: center; gap: 10px; margin: 22px 2px 12px; font: 700 19px var(--f-ar); }
.msec h3 small { color: var(--mute); font: 600 13px var(--f); }
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.mit { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--card); box-shadow: var(--sh); text-align: start; border: 2px solid transparent; transition: border-color .2s, background .2s; width: 100%; }
.mit:hover { border-color: rgba(238, 103, 36, .35); }
.mit img { width: 58px; height: 58px; object-fit: contain; flex: none; }
.mit span { flex: 1; min-width: 0; }
.mit b { display: block; font-weight: 800; font-size: 14.5px; line-height: 1.35; }
.mit small { color: var(--mute); font-weight: 600; font-size: 12.5px; }
.mit small .num { font-size: 15px; color: var(--ink2); }
.mit .sw { position: relative; flex: none; width: 50px; height: 30px; border-radius: 15px; background: var(--green); transition: background .2s; }
.mit .sw::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); transition: transform .25s; transform: translateX(-20px); }
.mit.is-off { background: #fbf3f1; border-color: #f0c8bf; }
.mit.is-off img { filter: grayscale(1); opacity: .45; }
.mit.is-off .sw { background: #c9bdb6; }
.mit.is-off .sw::after { transform: none; }
.mit .st { display: block; margin-top: 2px; font-style: normal; font-weight: 800; font-size: 12px; color: var(--green); }
.mit.is-off .st { color: var(--red); }

/* ------------------------------------------------------------ modal · toasts · unlock */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(20, 16, 16, .55); backdrop-filter: blur(3px); }
.modal__box { width: min(480px, 100%); max-height: 90dvh; overflow-y: auto; background: var(--card); border-radius: 22px; padding: 24px; box-shadow: 0 30px 80px -30px #000; animation: pop .25s ease; }
@keyframes pop { from { transform: scale(.94); opacity: 0; } }
.modal h2 { font: 700 22px/1.35 var(--f-ar); }
.modal__body { margin-top: 10px; color: var(--ink2); font-weight: 600; }
.modal__body .mimg { width: 120px; height: 120px; object-fit: contain; margin: 4px auto 8px; }
.modal__body .ord { box-shadow: none; border: 1px solid var(--line); margin-top: 6px; }
.modal__act { display: flex; gap: 10px; margin-top: 20px; }
.toasts { position: fixed; z-index: 60; top: 16px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; width: min(460px, calc(100% - 24px)); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--ink); color: #fff; font-weight: 700; box-shadow: 0 18px 40px -18px #000; animation: drop .35s ease; pointer-events: auto; }
.toast svg { color: var(--or); }
.toast--new { background: var(--or); } .toast--new svg { color: #fff; }
.toast--call { background: var(--red); } .toast--call svg { color: #fff; }
.toast--ok { background: var(--green); } .toast--ok svg { color: #fff; }
.toast.out { opacity: 0; transform: translateY(-10px); transition: all .3s; }
@keyframes drop { from { transform: translateY(-20px); opacity: 0; } }
.unlock { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 20px; background: rgba(20, 16, 16, .82); backdrop-filter: blur(4px); }
.unlock__box { width: min(400px, 100%); text-align: center; color: var(--cream); }
.unlock__box svg { width: 64px; height: 64px; color: var(--or); margin: 0 auto 10px; animation: ring 1.4s infinite; }
@keyframes ring { 0%, 50%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(-14deg); } 20%, 40% { transform: rotate(14deg); } }
.unlock h2 { font: 700 26px var(--f-ar); }
.unlock p { opacity: .8; margin: 6px 0 18px; }
.unlock .btn { width: 100%; height: 60px; font-size: 19px; }

/* ------------------------------------------------------------ smaller screens */
@media (max-width: 1180px) {
  :root { --side: 92px; }
  .side { padding-inline: 8px; }
  .side__brand { justify-content: center; padding-inline: 0; }
  .side__brand span { display: none; }
  .side__branch { margin: 0 0 8px; padding: 10px 4px; text-align: center; }
  .side__branch small, .side__branch span { display: none; }
  .side__branch b { font-size: 16px; }
  .nav { flex-direction: column; gap: 4px; padding: 10px 4px; text-align: center; font-size: 11.5px; }
  .nav span { flex: none; }
  .nav__n { position: absolute; top: 4px; inset-inline-end: 6px; min-width: 22px; height: 22px; font-size: 12px; }
  .top__title p { display: none; }
}
@media (max-width: 980px) {
  .seg { display: flex; }
  .seg--inline { display: inline-flex; }
  .board:not(.board--2) { grid-template-columns: minmax(0, 1fr); }
  .board:not(.board--2) .col { display: none; }
  .board:not(.board--2) .col.is-on { display: block; }
  .board:not(.board--2) .col h2 { display: none; }
  .board:not(.board--2) .col { background: none; border: 0; padding: 0; }
  .top { flex-wrap: wrap; padding: 12px 16px; gap: 10px; }
  .search { order: 3; flex-basis: 100%; max-width: none; margin: 0; }
  .view { padding: 14px 16px 40px; }
  .live span { display: none; } .live { width: 32px; padding: 0; justify-content: center; }
}
@media (max-width: 640px) {
  :root { --side: 70px; }
  .nav { font-size: 0; padding: 12px 0; }
  .nav svg { width: 24px; height: 24px; }
  .side__brand img { width: 44px; height: 44px; }
  .top__title h1 { font-size: 19px; }
  .clock { min-width: 0; padding: 5px 10px; } .clock b { font-size: 19px; } .clock small { display: none; }
  .tool { width: 40px; height: 40px; }
  .board--2 { grid-template-columns: minmax(0, 1fr); }
  .tbl th:nth-child(5), .tbl td:nth-child(5) { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat b { font-size: 30px; }
}

/* a new order: the whole screen flashes orange for the 3 seconds of the alarm */
body.is-ringing::after { content: ''; position: fixed; inset: 0; z-index: 80; pointer-events: none; border: 12px solid var(--or); box-shadow: inset 0 0 120px rgba(238, 103, 36, .55); animation: ringflash .25s steps(2, jump-none) infinite; }
@keyframes ringflash { 50% { opacity: .15; } }

/* ------------------------------------------------------------ printing: «طباعة · صورة · PDF» on every order + the printer panel */
.ord__pr { display: flex; gap: 6px; padding: 10px 12px 0; }
.prb { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; border-radius: 11px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink2); font-weight: 800; font-size: 14px; transition: background .15s, transform .1s; }
.prb svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.prb:active { transform: scale(.97); }
.prb--main { flex: 1.4; background: var(--ink); border-color: var(--ink); color: #fff; }
.prb:disabled { opacity: .5; }
.tool--pr { position: relative; }
.pr-dot { position: absolute; top: 7px; inset-inline-end: 7px; width: 9px; height: 9px; border-radius: 50%; background: #c9bdb4; box-shadow: 0 0 0 2px var(--card); }
.pr-dot.is-on { background: var(--green); }
.prm { display: grid; gap: 14px; }
.prm__st { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 12px; background: #faf6f0; font-weight: 800; color: var(--ink2); }
.prm__st i { width: 10px; height: 10px; border-radius: 50%; background: #c9bdb4; }
.prm__st.is-on { background: #e8f6ee; color: #17663c; } .prm__st.is-on i { background: var(--green); }
.prm__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 800; color: var(--ink); }
.prm__paper { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: #f1e8dd; }
.prm__paper button { height: 36px; padding: 0 16px; border-radius: 9px; font-weight: 800; color: var(--ink2); }
.prm__paper button.is-on { background: var(--ink); color: #fff; }
.prm__conn { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pconn { display: grid; justify-items: center; gap: 6px; padding: 14px 6px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card); font-weight: 800; font-size: 13.5px; color: var(--ink); text-align: center; transition: border-color .15s, background .15s; }
.pconn svg { width: 26px; height: 26px; fill: none; stroke: var(--or); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.pconn:hover:not(:disabled) { border-color: var(--or); background: #fff7f1; }
.pconn:disabled { opacity: .4; }
.prm__more { display: flex; flex-wrap: wrap; gap: 8px; }
.prm__more .btn { flex: 1 1 140px; height: 48px; font-size: 15px; }
.prm__more .btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.prm__more .btn:disabled { opacity: .45; }
.prm__warn { padding: 10px 12px; border-radius: 10px; background: #fbe4df; color: var(--red); font-weight: 700; font-size: 13.5px; }
.prm__hint { color: var(--mute); font-size: 12.5px; font-weight: 600; line-height: 1.6; }
@media (max-width: 640px) { .prm__conn { grid-template-columns: minmax(0, 1fr); } .pconn { grid-template-columns: auto 1fr; justify-items: start; align-items: center; } }

/* ------------------------------------------------------------ العربية ⇄ English + the sign-out code */
.langbtn { font: 800 15px/1 var(--f); letter-spacing: .02em; color: var(--ink); }
.langbtn--login { position: absolute; z-index: 2; top: calc(16px + env(safe-area-inset-top)); inset-inline-end: 16px; width: 48px; height: 48px; border-radius: 14px; border: 1px solid rgba(255, 243, 224, .25); background: rgba(255, 243, 224, .08); color: var(--cream); }
.nav--lang { color: rgba(255, 243, 224, .78); margin-top: auto; }
.nav--lang + .nav--out { margin-top: 0; }
[dir="ltr"] #dayPrev svg, [dir="ltr"] #dayNext svg { transform: scaleX(-1); }
body.is-en .ord__no small { margin-inline-end: 4px; }
.outcode { display: grid; gap: 6px; margin-top: 14px; font-weight: 800; color: var(--ink); }
.outcode input { height: 54px; padding: 0 16px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--paper); font: 800 26px/1 var(--f-num); letter-spacing: .4em; text-align: center; outline: none; }
.outcode input:focus { border-color: var(--or); box-shadow: 0 0 0 3px rgba(238, 103, 36, .15); }
.outcode__err { min-height: 20px; margin-top: 6px; color: var(--red); font-weight: 800; font-size: 14px; }
/* English (left-to-right): the texts drawn by CSS, the clock, the availability switch */
body.is-en .col__list:empty::after, body.is-en .calls-done:empty::after { content: 'None'; }
body.is-en .ord__note::before { content: 'Notes: '; }
[dir="ltr"] .clock b { direction: ltr; }
[dir="ltr"] .mit .sw::after { transform: translateX(20px); }
[dir="ltr"] .mit.is-off .sw::after { transform: none; }
