:root {
  --bg: #f4f3ee;
  --surface: #fbfbf8;
  --surface-2: #efeee8;
  --border: #dcdad3;
  --text: #1d1c1a;
  --muted: #6b6a6b;
  --primary: #1d1c1a;
  --primary-600: #3a3936;
  --primary-50: #ebeae4;
  --accent: #9a8a6a;
  --success: #15803d;
  --success-50: #f0fdf4;
  --warning: #b45309;
  --warning-50: #fffbeb;
  --danger: #b91c1c;
  --danger-50: #fef2f2;
  --info: #0e7490;
  --info-50: #ecfeff;
  --sidebar: #1d1c1a;
  --sidebar-text: #d9d7cf;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(29, 28, 26, .06), 0 1px 3px rgba(29, 28, 26, .08);
  --font: 'Tajawal', 'Segoe UI', Tahoma, Arial, sans-serif;
  /* the café's own look (archivecoffee.ae): a serif for names and titles, a typewriter face for small labels */
  --font-display: 'Marcellus', 'Amiri', Georgia, 'Times New Roman', serif;
  --font-mono: 'Inconsolata', 'Tajawal', ui-monospace, Consolas, monospace; /* Arabic letters fall back to Tajawal */
  --ink: #1d1c1a;
  --paper: #f4f3ee;
}

* { box-sizing: border-box; }
svg[aria-hidden] { width: 1.15em; height: 1.15em; vertical-align: -0.2em; flex: none; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.55; }
a { color: var(--primary); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.ltr { direction: ltr; unicode-bidi: embed; display: inline-block; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.mt-0 { margin-top: 0; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar { background: var(--sidebar); color: var(--sidebar-text); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 40; }
.brand { padding: 18px 18px 14px; display: flex; gap: 10px; align-items: center; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand-logo { width: 40px; height: 40px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; color: var(--ink); flex: none; }
.brand-logo svg { width: 22px; height: 22px; }
/* «الإعدادات ← بيانات الشركة والشعار»: the logo, its buttons, and the print preview */
.settings-co { align-items: start; }
.logo-edit { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.logo-box { width: 170px; height: 120px; border: 1px dashed var(--border); border-radius: 12px; display: grid; place-items: center; background: #fff; padding: 8px; flex: none; }
.logo-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-actions { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 200px; align-items: flex-start; }
.logo-preview { margin-top: 12px; background: #eee; padding: 12px; text-align: center; border-radius: 10px; max-height: 75vh; overflow: auto; }
.logo-preview img { width: 100%; max-width: 360px; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
/* the company's logo in its place (the side menu, the sign-in, the customers' display) */
.brand-logo.has-img { background: #fff; padding: 3px; overflow: hidden; }
.brand-logo.has-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-name { color: var(--paper); font-family: var(--font-display); font-weight: 400; font-size: 19px; line-height: 1.25; }
.brand-sub { font-size: 12px; color: #9a9890; }
.nav { padding: 10px 8px 20px; display: flex; flex-direction: column; gap: 2px; }
.nav-group { font-size: 12px; color: #8e8c85; padding: 14px 12px 4px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 999px; color: var(--sidebar-text); font-size: 14.5px; }
.nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav a.active { background: var(--paper); color: var(--ink); font-weight: 700; }
.nav a .badge { margin-inline-start: auto; }
.nav svg { width: 18px; height: 18px; flex: none; }

.main { min-width: 0; display: flex; flex-direction: column; }
/* the owner's other systems (the car wash…): apart from the café's menu, a small button in the bottom corner across
   from the side menu (bottom-left in Arabic); its list opens upward */
.dropdown.other-sys { position: fixed; bottom: 14px; inset-inline-end: 14px; z-index: 45; }
.other-sys-btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--border);
  background: rgba(251, 251, 248, .92); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); color: var(--muted); font-size: 13px; font-weight: 700;
  cursor: pointer; box-shadow: 0 6px 18px -8px rgba(29, 28, 26, .35); opacity: .8; transition: opacity .15s, color .15s; }
.other-sys-btn:hover, .other-sys-btn:focus-visible { opacity: 1; color: var(--ink); }
.other-sys-btn svg { width: 16px; height: 16px; }
.other-sys .dropdown-menu { top: auto; bottom: calc(100% + 8px); inset-inline-end: 0; min-width: 230px; }
.other-sys .dropdown-menu a { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 9px; color: var(--text); font-weight: 600; }
.other-sys .dropdown-menu a:hover { background: var(--surface-2); }
.other-sys-head { font-size: 12px; color: var(--muted); padding: 4px 10px 6px; }
@media (max-width: 760px) { .other-sys-btn span { display: none; } .other-sys-btn { width: 36px; padding: 0; justify-content: center; } }
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); padding: 10px 22px; display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 20; }
.topbar h1 { font-family: var(--font-display); font-size: 23px; margin: 0; font-weight: 400; letter-spacing: -.01em; }
.topbar .spacer { flex: 1; }
.clock { font-weight: 700; color: var(--muted); }
.icon-btn.menu-toggle { display: none; }
.content { padding: 20px 22px; width: 100%; }

.user-chip { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; line-height: 1.25; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.dropdown { position: relative; }
.dropdown-menu { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(29, 28, 26,.14); min-width: 220px; padding: 6px; z-index: 50; }
.dropdown-menu button { display: flex; gap: 8px; align-items: center; width: 100%; text-align: start; background: none; border: 0; padding: 9px 12px; border-radius: 7px; cursor: pointer; }
.dropdown-menu button:hover { background: var(--surface-2); }

.icon-btn { position: relative; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); display: grid; place-items: center; cursor: pointer; }
.icon-btn svg { width: 19px; height: 19px; }
.pdot { position: absolute; top: 5px; inset-inline-end: 5px; width: 9px; height: 9px; border-radius: 50%; background: #cbd5e1; border: 2px solid var(--surface); }
.pdot.on { background: var(--success); }
.pdot.warn { background: var(--accent); animation: pulse 1.2s infinite; }
.chips label.chip { display: inline-flex; }
.chips label.chip input { width: 15px; height: 15px; }

/* the kitchen screen for a kitchen user: no side menu, the whole width for the orders */
.shell.kiosk { grid-template-columns: 1fr; }
.shell.kiosk .sidebar, .shell.kiosk .menu-toggle { display: none !important; }
.shell.kiosk .content { padding: 12px 16px; }
.shell.kiosk .topbar { background: var(--sidebar); color: #efede6; border-bottom-color: #000; }
.shell.kiosk .topbar h1 { color: #efede6; font-size: 17px; opacity: .85; }
.shell.kiosk .topbar .clock { color: #efede6; font-size: 18px; }
.shell.kiosk .user-chip, .shell.kiosk .icon-btn { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.15); color: #efede6; }
.shell.kiosk .user-chip .muted { color: #bdbbb3; }
.kiosk-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; }
.kiosk-brand .brand-logo { width: 34px; height: 34px; border-radius: 10px; }
.shell.kiosk .ticket li { font-size: 18px; }
.shell.kiosk .ticket-head .no { font-size: 30px; }

/* ---------- the customers' display (a TV), in the café's own look (archivecoffee.ae): paper and ink, the numbers in
   its serif, hairlines, round labels, and its drawing — stone faces asleep in a sea of clouds — along the bottom ---------- */
.tv { position: fixed; inset: 0; background: var(--paper); color: var(--ink); display: flex; flex-direction: column; overflow: hidden; z-index: 30; }
.tv.idle { cursor: none; }
.tv-art { position: absolute; inset-inline: 0; bottom: 0; width: 100%; height: auto; max-height: 46vh; object-fit: cover; object-position: center bottom; z-index: 0;
  pointer-events: none; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 35%); mask-image: linear-gradient(to bottom, transparent 0, #000 35%); }
.tv-head, .tv-main { position: relative; z-index: 1; }
.tv-head { display: flex; align-items: center; justify-content: space-between; gap: 2vw; padding: 2.2vh 3vw; border-bottom: 1px solid var(--border); }
.tv-brand { display: flex; align-items: center; gap: 1.2vw; font-family: var(--font-display); font-size: clamp(22px, 3.2vw, 56px); font-weight: 400; letter-spacing: -.01em; }
.tv-brand .brand-logo { width: clamp(40px, 4.4vw, 82px); height: clamp(40px, 4.4vw, 82px); border-radius: 50%; background: var(--ink); color: var(--paper); }
.tv-brand .brand-logo.has-img { background: #fff; }
.tv-brand .brand-logo svg { width: 55%; height: 55%; }
.tv-clock { font-family: var(--font-mono); font-size: clamp(20px, 2.8vw, 50px); font-weight: 500; color: var(--muted); direction: ltr; }
.tv-off { background: var(--danger-50); color: var(--danger); border: 1px solid #fecaca; padding: 6px 16px; border-radius: 999px; font-weight: 800; font-size: clamp(13px, 1.4vw, 24px); }
/* landscape: the ready zone fills the screen — the newest number huge, the others in a row below it — and the
   orders being prepared run along the bottom, over the drawing */
.tv-main { flex: 1; display: flex; flex-direction: column; gap: 2vh; padding: 2.4vh 3vw 2.6vh; min-height: 0; }
.tv-title { align-self: flex-start; font-size: min(3.6vh, 2.5vw); font-weight: 800; display: inline-flex; align-items: center; gap: .6vw;
  background: var(--ink); color: var(--paper); border-radius: 999px; padding: .5vh 1.4vw; line-height: 1.35; }
.tv-title svg { width: .95em; height: .95em; }
.tv-title.prep { background: transparent; color: var(--ink); border: 1px solid var(--ink); font-size: min(3vh, 2.1vw); white-space: nowrap; align-self: center; }
.tv-readyzone { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.tv-hero { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; padding-bottom: 1vh; }
.tv-hero .lbl { font-family: var(--font-mono); font-size: min(4.2vh, 3vw); font-weight: 600; color: var(--muted); line-height: 1.2; }
.tv-hero .n { font-family: var(--font-num); font-size: min(27vh, 21vw); font-weight: 400; line-height: .98; color: var(--ink); letter-spacing: -.02em; }
.tv-hero .who { font-family: var(--font-display); font-size: min(5.5vh, 4vw); color: var(--ink); line-height: 1.2; }
.tv-hero .cap { font-family: var(--font-display); font-size: min(4vh, 2.8vw); color: var(--muted); line-height: 1.3; }
.tv-hero.empty .n { color: #c9c7c0; }
.tv-hero.empty .cap { color: #9a9890; }
.tv-hero.fresh .n { animation: tvpulse 1s 5; }
@keyframes tvpulse { 50% { transform: scale(1.05); } }
/* Arabic and English together: the English under / beside the Arabic, smaller */
.tv small { font-size: .62em; opacity: .7; margin-inline-start: .5em; font-weight: 600; }
.tv[dir="ltr"] { font-family: 'Tajawal', 'Segoe UI', Arial, sans-serif; }
.tv-others { display: flex; justify-content: center; gap: 1.4vw; flex-wrap: nowrap; overflow: hidden; padding-top: 1.6vh; border-top: 1px solid var(--border); min-height: 0; }
.tv-others:empty { display: none; }
.tv-num { background: rgba(251, 251, 248, .85); border: 1px solid var(--border); border-radius: 999px; padding: .5vh 1.8vw; display: flex; flex-direction: column; align-items: center; min-width: 9vw; flex: none; }
.tv-num .pre { font-family: var(--font-mono); font-size: min(1.8vh, 1.25vw); color: var(--muted); font-weight: 600; }
.tv-num b { font-family: var(--font-num); font-size: min(6.5vh, 4.6vw); font-weight: 700; line-height: 1.1; color: var(--ink); }
.tv-num span { font-size: min(2.4vh, 1.6vw); color: var(--muted); font-weight: 700; max-width: 14vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-num.big { background: var(--ink); border-color: var(--ink); min-width: 12vw; border-radius: 2.4vw; padding: .8vh 2vw; }
.tv-num.big b { font-size: min(10vh, 7.2vw); color: var(--paper); }
.tv-num.big .pre, .tv-num.big span { color: #bdbbb3; }
.tv-prepzone { display: flex; align-items: center; gap: 2vw; background: rgba(244, 243, 238, .82); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  border: 1px solid var(--border); border-radius: 999px; padding: 1.2vh 1.4vw 1.2vh 2vw; min-height: 0; }
.tv-strip { display: flex; gap: 1vw; flex-wrap: nowrap; overflow: hidden; flex: 1; }
.tv-strip .tv-num { padding: .3vh 1.3vw; min-width: 7vw; }
.tv-strip .tv-num b { font-size: min(5.4vh, 3.8vw); color: #4a4946; }
.tv-empty { color: #9a9890; font-family: var(--font-display); font-size: min(5vh, 3.4vw); }
/* the numbers: the serif of the drawing's world, with a «1» that cannot be read as an «I» */
.tv { --font-num: 'Amiri', Georgia, 'Times New Roman', serif; }
/* the call: the number full screen on paper, the drawing beneath it */
.tv-pop { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 5; animation: fade .3s; cursor: pointer;
  padding-bottom: 14vh; background: linear-gradient(to bottom, var(--paper) 52%, rgba(244, 243, 238, 0) 78%), url('/img/login-art.webp') center bottom / 100% auto no-repeat, var(--paper); }
.tv-pop .lbl { font-family: var(--font-mono); font-size: clamp(26px, 3.8vw, 72px); color: var(--muted); font-weight: 600; }
.tv-pop .n { font-family: var(--font-num); font-size: clamp(130px, 27vw, 480px); font-weight: 400; color: var(--ink); line-height: 1; letter-spacing: -.02em; }
.tv-pop .who { font-family: var(--font-display); font-size: clamp(26px, 4vw, 72px); color: var(--ink); }
.tv-pop .s { font-size: clamp(24px, 3.6vw, 66px); background: var(--ink); color: var(--paper); border-radius: 999px; padding: .4vh 2.4vw; font-weight: 800; margin-top: 1.4vh; display: flex; gap: 1vw; align-items: center; }
.tv-pop .s svg { width: 1em; height: 1em; }
/* only the sound button, at the bottom under the strip (Esc leaves, F fills the screen — on the keyboard) */
.tv-main { padding-bottom: calc(2.6vh + 44px); }
.tv.idle.sound-on .tv-main { padding-bottom: 2.6vh; }
.tv-tools { position: absolute; bottom: 1.2vh; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; transition: opacity .4s; z-index: 6; }
.tv.idle.sound-on .tv-tools { opacity: 0; pointer-events: none; }
.tv-btn { background: rgba(251, 251, 248, .92); color: var(--ink); border: 1px solid var(--border); border-radius: 999px; padding: 8px 15px; font: inherit; font-weight: 700; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.tv-btn svg { width: 18px; height: 18px; }
.tv-btn.on { border-color: var(--ink); }
.tv-btn.attn { background: var(--ink); border-color: var(--ink); color: var(--paper); animation: pulse 1.6s infinite; }
/* a TV turned upright still works: the strip wraps, and the tall version of the drawing */
@media (orientation: portrait) {
  .tv-strip, .tv-others { flex-wrap: wrap; } .tv-hero .n { font-size: 30vw; } .tv-prepzone { border-radius: 4vw; }
  .tv-pop { background: linear-gradient(to bottom, var(--paper) 45%, rgba(244, 243, 238, 0) 70%), url('/img/login-art-narrow.webp') center bottom / 100% auto no-repeat, var(--paper); }
}

/* ---------- the front screen: the customer's side of a two-screen cashier device (pages-front.js), in the café's own
   look — paper and ink, a printed menu, the drawing beneath ---------- */
.front { position: fixed; inset: 0; background: var(--paper); color: var(--ink); display: flex; flex-direction: column; overflow: hidden; z-index: 30; user-select: none; }
.front[dir="ltr"] { font-family: 'Tajawal', 'Segoe UI', Arial, sans-serif; }
.front small { font-size: .6em; opacity: .7; margin-inline-start: .45em; font-weight: 600; }
/* Arabic and English together: the English beside a label, under a name; numbers always in English digits, left to right */
.front small.en { font-family: 'Tajawal', 'Segoe UI', Arial, sans-serif; letter-spacing: 0; font-size: .72em; opacity: .78; }
.front small.en2 { display: block; margin: .1em 0 0; font-family: var(--font-display); font-size: .62em; opacity: .62; font-weight: 400; direction: ltr; text-align: start; unicode-bidi: plaintext; }
.front[dir="rtl"] small.en2 { text-align: right; }
.front .amt { direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
.front .num { font-variant-numeric: lining-nums tabular-nums; }
.front-cat small.en2 { font-size: .5em; }
.front-honor { font-family: var(--font-display); font-size: clamp(18px, 1.9vw, 32px); line-height: 1.35; }
.front-honor small.en2 { font-size: .62em; margin-top: .3em; }
.front[dir="ltr"] .front-honor { font-size: clamp(16px, 1.6vw, 28px); }
.front-big-en { font-size: .42em; color: var(--muted); margin-top: .1em; }
.front-lines .nm small.add { margin-top: .15em; }
.front-lines .nm small.add .en { opacity: .8; }
.front-art { position: absolute; inset-inline: 0; bottom: 0; width: 100%; height: auto; max-height: 40vh; object-fit: cover; object-position: center bottom; z-index: 0; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 40%); mask-image: linear-gradient(to bottom, transparent 0, #000 40%); opacity: .95; transition: opacity .4s; }
.front[data-mode="cart"] .front-art, .front[data-mode="pay"] .front-art { opacity: .35; }
.front-head, .front-main { position: relative; z-index: 1; }
.front-head { display: flex; align-items: center; justify-content: space-between; gap: 2vw; padding: 2.4vh 3.4vw; border-bottom: 1px solid var(--border); }
.front-brand { display: flex; align-items: center; gap: 1vw; font-family: var(--font-display); font-size: clamp(22px, 3vw, 50px); letter-spacing: -.01em; }
.front-brand .brand-logo { width: clamp(38px, 4vw, 72px); height: clamp(38px, 4vw, 72px); border-radius: 50%; background: var(--ink); color: var(--paper); }
.front-brand .brand-logo.has-img { background: #fff; }
.front-brand .brand-logo svg { width: 55%; height: 55%; }
.front-welcome { font-family: var(--font-display); font-size: clamp(18px, 2.2vw, 38px); color: var(--muted); }
.front-main { flex: 1; min-height: 0; display: flex; padding: 3vh 4vw 4vh; }
.front .lbl { font-family: var(--font-mono); font-size: clamp(16px, 2.2vw, 36px); font-weight: 600; color: var(--muted); }
.front .cur { font-size: .62em; color: var(--muted); font-weight: 600; }
.front-pill { display: inline-flex; align-items: center; gap: .5em; border: 1px solid var(--ink); border-radius: 999px; padding: .25em 1em; font-weight: 700; font-size: clamp(14px, 1.6vw, 26px); background: rgba(244, 243, 238, .92); }
.front-pill.dark { background: var(--ink); color: var(--paper); margin-top: 2vh; }
.fade-in { animation: fade .35s; }
/* the menu: like a printed one — a numbered list, the name in the serif, a dotted line to the price */
.front-menu { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.front-menu-head { display: flex; align-items: center; gap: 1.6vw; margin-bottom: 2.2vh; }
.front-menu-head h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(30px, 4.4vw, 76px); margin: 0; line-height: 1.1; }
.front-dots { display: flex; gap: 6px; margin-inline-start: auto; }
.front-dots i { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--ink); }
.front-dots i.on { background: var(--ink); }
.front-items { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6vh 4vw; align-content: start; }
.front-items li { display: flex; align-items: baseline; gap: 1vw; padding-bottom: 1.2vh; border-bottom: 1px solid var(--border); }
.front-items li.out { opacity: .45; }
.front-items .no { flex: none; display: inline-grid; place-items: center; min-width: 2.3em; height: 1.6em; border: 1px solid var(--ink); border-radius: 999px; font-family: var(--font-mono); font-size: clamp(11px, 1.1vw, 18px); font-weight: 600; align-self: center; }
.front-items .nm { display: flex; flex-direction: column; min-width: 0; }
/* the product's picture beside its name (the menu and the order) */
.front .th { flex: none; width: clamp(48px, 5.6vw, 96px); aspect-ratio: 1; object-fit: cover; border-radius: 14px; align-self: center; background: var(--surface-2); }
.front-lines .th { width: clamp(40px, 4.2vw, 72px); border-radius: 12px; }
.front-items li, .front-lines li { align-items: center; }
.front-items .nm b { font-family: var(--font-display); font-weight: 400; font-size: clamp(18px, 2.2vw, 38px); line-height: 1.25; }
.front-items .nm small { margin: 0; font-size: clamp(12px, 1.15vw, 19px); color: var(--muted); opacity: 1; font-weight: 400; }
.front-items .lead { flex: 1; border-bottom: 2px dotted #c4c2bb; min-width: 2vw; transform: translateY(-.35em); }
.front-items .pr { flex: none; font-family: 'Amiri', Georgia, serif; font-weight: 700; font-size: clamp(18px, 2vw, 34px); }
/* the order being taken: its lines, and the total */
.front-order { flex: 1; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 4vw; min-height: 0; }
.front-lines { display: flex; flex-direction: column; min-height: 0; }
.front-sec { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.6vh; font-size: clamp(16px, 1.8vw, 30px); }
.front-lines ul { list-style: none; margin: 0; padding: 0; overflow: auto; scrollbar-width: none; flex: 1; min-height: 0; }
.front-lines li { display: flex; align-items: baseline; gap: 1.2vw; padding: 1.3vh 0; border-bottom: 1px solid var(--border); animation: fade .3s; }
.front-lines .q { flex: none; font-family: var(--font-mono); font-weight: 600; font-size: clamp(16px, 1.8vw, 30px); color: var(--muted); min-width: 2.6em; }
.front-lines .nm { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.front-lines .nm b { font-family: var(--font-display); font-weight: 400; font-size: clamp(20px, 2.4vw, 40px); line-height: 1.25; }
.front-lines .nm small { margin: 0; font-size: clamp(13px, 1.3vw, 21px); color: var(--muted); opacity: 1; }
.front-lines .pr { flex: none; font-family: 'Amiri', Georgia, serif; font-weight: 700; font-size: clamp(18px, 2.1vw, 36px); }
.front-sum { align-self: end; background: rgba(251, 251, 248, .9); border: 1px solid var(--border); border-radius: 28px; padding: 3vh 2.4vw; display: flex; flex-direction: column; gap: 1.2vh;
  box-shadow: 0 24px 60px -34px rgba(29, 28, 26, .3); }
.front-sum .r { display: flex; justify-content: space-between; gap: 1vw; font-size: clamp(16px, 1.7vw, 28px); }
.front-sum .r.muted { color: var(--muted); }
.front-sum .tot { margin-top: 1vh; padding-top: 1.6vh; border-top: 1px solid var(--ink); display: flex; flex-direction: column; gap: .4vh; }
.front-sum .tot .v { font-family: 'Amiri', Georgia, serif; font-weight: 700; font-size: clamp(30px, 4.2vw, 72px); line-height: 1.1; }
/* the number, the payment, the thanks: centred, large */
.front-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .6vh; padding-bottom: 8vh; }
.front-no { font-family: 'Amiri', Georgia, serif; font-size: clamp(110px, 22vw, 400px); line-height: 1; }
.front-no.small { font-size: clamp(70px, 12vw, 220px); }
.front-amount { font-family: 'Amiri', Georgia, serif; font-weight: 700; font-size: clamp(64px, 11vw, 200px); line-height: 1.05; }
.front-due { font-size: clamp(20px, 2.6vw, 44px); margin-top: 1vh; }
.front-due b { font-family: 'Amiri', Georgia, serif; }
.front-big { font-family: var(--font-display); font-size: clamp(46px, 8vw, 140px); line-height: 1.1; margin-bottom: 1vh; }
.front-pay { display: flex; gap: 3vw; margin-top: 2vh; font-size: clamp(18px, 2.2vw, 38px); }
.front-pay > div { display: flex; flex-direction: column; align-items: center; gap: .3vh; border: 1px solid var(--border); background: rgba(251, 251, 248, .9); border-radius: 22px; padding: 1.4vh 2.4vw; }
.front-pay span { color: var(--muted); font-size: .7em; font-weight: 700; }
.front-pay b { font-family: 'Amiri', Georgia, serif; font-size: 1.5em; }
.front-pay .chg { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.front-pay .chg span, .front-pay .chg .cur { color: #bdbbb3; }
.front-hint { position: absolute; bottom: 1.6vh; left: 50%; transform: translateX(-50%); z-index: 2; background: var(--ink); color: var(--paper); border-radius: 999px; padding: 6px 16px;
  font-size: 13px; font-weight: 700; transition: opacity .6s; }
.front-hint.gone { opacity: 0; pointer-events: none; }
@media (orientation: portrait), (max-width: 760px) {
  .front-items { grid-template-columns: 1fr; }
  .front-order { grid-template-columns: 1fr; }
  .front-sum { align-self: stretch; }
}

/* ---------- elements ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--border); background: var(--surface); padding: 8px 15px; border-radius: 999px; cursor: pointer; font-weight: 600; white-space: nowrap; transition: background .15s, border-color .15s, transform .05s; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-600); }
.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-success:hover { background: #126c34; }
.btn-info { background: var(--info); border-color: var(--info); color: #fff; }
.btn-info:hover { background: #0b5f76; }
.btn-warning { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-warning:hover { background: #7d6f54; }
.btn-danger { background: var(--surface); border-color: #fecaca; color: var(--danger); }
.btn-danger:hover { background: var(--danger-50); }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.btn-lg { padding: 13px 20px; font-size: 17px; font-weight: 800; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-block { width: 100%; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; font-family: var(--font-display); font-size: 19px; font-weight: 400; }
.card-body { padding: 16px; }
.card + .card { margin-top: 16px; }

.toolbar { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .spacer { flex: 1; }
.toolbar label.field { min-width: 140px; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.stat::before { content: ''; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 4px; background: var(--accent); }
.stat.s-success::before { background: var(--success); }
.stat.s-info::before { background: var(--info); }
.stat.s-danger::before { background: var(--danger); }
.stat.s-primary::before { background: var(--primary); }
.stat.s-warning::before { background: var(--warning, #d97706); }
.stats.compact { margin-bottom: 4px; gap: 10px; }
.stats.compact .stat { padding: 8px 12px; box-shadow: none; }
.stats.compact .value { font-size: 18px; }
.stat .value.small { font-size: 15px; }
.stat .label { color: var(--muted); font-size: 13px; }
.stat .value { font-size: 23px; font-weight: 800; margin-top: 2px; }
.stat .sub { font-size: 12.5px; color: var(--muted); }
.stat.link { cursor: pointer; }
.stat.link:hover { border-color: var(--primary); }

label.field { display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; color: var(--muted); font-weight: 600; }
.input { border: 1px solid var(--border); background: var(--surface); border-radius: 9px; padding: 8px 10px; color: var(--text); width: 100%; min-width: 0; }
.input:focus { outline: 2px solid rgba(29, 28, 26,.22); border-color: var(--primary); }
textarea.input { resize: vertical; min-height: 64px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-size: 14px; color: var(--text); font-weight: 500; }
.check input { width: 17px; height: 17px; accent-color: var(--primary); }

.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: start; font-weight: 700; color: var(--muted); font-size: 12.5px; background: var(--surface-2); padding: 9px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #f6f5f0; }
.table tr.clickable { cursor: pointer; }
.table tfoot td { font-weight: 800; background: var(--surface-2); border-top: 2px solid var(--border); }
.table .end { text-align: end; }
.table tr.muted-row td { opacity: .55; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #ebeae4; color: #4a4946; white-space: nowrap; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #cffafe; color: #155e75; }
.badge-primary { background: var(--primary-50); color: var(--primary); }
.nav .badge { background: var(--accent); color: #fff; }

.alert { padding: 11px 14px; border-radius: 10px; margin: 12px 0; border: 1px solid; }
.alert-danger { background: var(--danger-50); border-color: #fecaca; color: #7f1d1d; }
.alert-warning { background: var(--warning-50); border-color: #fde68a; color: #78350f; }
.alert-info { background: var(--info-50); border-color: #a5f3fc; color: #155e75; }
.alert-success { background: var(--success-50); border-color: #bbf7d0; color: #14532d; }
.empty { padding: 36px 16px; text-align: center; color: var(--muted); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tabs a, .tabs button { padding: 10px 16px; border: 0; background: none; color: var(--muted); font-weight: 700; border-bottom: 3px solid transparent; cursor: pointer; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tabs a.active, .tabs button.active { color: var(--primary); border-bottom-color: var(--primary); }

/* the date / month / time fields (text fields with English digits, core.js) and their calendar */
.dt-input { background-repeat: no-repeat; background-position: right 9px center; background-size: 16px; padding-right: 32px; cursor: pointer; font-variant-numeric: tabular-nums; }
.dt-date, .dt-month { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237b6a5e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 10h18'/%3E%3C/svg%3E"); }
.dt-time { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237b6a5e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); }
.dt-pop { position: fixed; z-index: 300; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 12px 32px rgba(29, 28, 26, .18); padding: 10px; width: 272px; font-size: 14px; animation: fade .12s; }
.dt-pop.dt-pop-time { width: 236px; }
.dt-pop button { font: inherit; border: 0; background: none; cursor: pointer; color: var(--text); border-radius: 8px; font-variant-numeric: tabular-nums; }
.dt-pop button:hover:not(:disabled) { background: var(--primary-50); color: var(--primary); }
.dt-pop button:disabled { opacity: .3; cursor: default; }
.dt-pop button.on { background: var(--primary); color: #fff; }
.dt-pop button.today:not(.on) { box-shadow: inset 0 0 0 1.5px var(--accent); }
.dt-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.dt-head b { font-weight: 800; }
.dt-head button { width: 32px; height: 32px; font-size: 22px; line-height: 1; }
.dt-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.dt-grid i { font-style: normal; font-size: 12px; color: var(--muted); font-weight: 700; padding: 4px 0; }
.dt-grid button { height: 34px; }
.dt-months { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.dt-months button { padding: 8px 4px; font-size: 13px; }
.dt-months b { display: block; font-size: 15px; }
.dt-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dt-cols > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; max-height: 220px; overflow-y: auto; align-content: start; position: relative; }
.dt-cols small { grid-column: 1 / -1; color: var(--muted); font-weight: 700; text-align: center; position: sticky; top: 0; background: var(--surface); padding-bottom: 2px; }
.dt-cols button { padding: 6px 0; }
.dt-foot { display: flex; justify-content: space-between; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.dt-foot button { padding: 5px 12px; font-weight: 700; color: var(--primary); }

.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: none; padding: 7px 14px; cursor: pointer; font-weight: 600; }
.seg button + button { border-inline-start: 1px solid var(--border); }
.seg button.active { background: var(--primary); color: #fff; }

/* ---------- modal / toast ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(20, 19, 17,.45); display: grid; place-items: center; padding: 16px; z-index: 100; animation: fade .12s; }
.modal { background: var(--surface); border-radius: 14px; width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal.wide { width: min(900px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; font-family: var(--font-display); font-size: 21px; font-weight: 400; }
.close-x { border: 0; background: none; font-size: 26px; line-height: 1; cursor: pointer; color: var(--muted); }
.modal-body { padding: 18px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--border); flex-wrap: wrap; }
#toast-root { position: fixed; bottom: 18px; inset-inline-start: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast { background: #1d1c1a; color: #fff; padding: 11px 16px; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.2); max-width: 380px; animation: fade .15s; }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } }

/* ---------- login ---------- */
/* in the café's own look (archivecoffee.ae): paper, ink, a serif name, typewriter labels, hairlines, round buttons */
.login-wrap { min-height: 100vh; display: flex; flex-direction: column; background: var(--paper); color: var(--ink); }
.login-top { display: flex; align-items: center; gap: 12px; padding: 22px clamp(18px, 4vw, 48px); }
.login-top .login-mark { font-family: var(--font-display); font-size: 26px; letter-spacing: -.01em; line-height: 1; display: flex; align-items: center; gap: 10px; }
.login-top .login-mark .brand-logo { width: 38px; height: 38px; background: var(--ink); color: var(--paper); }
.login-top .login-mark .brand-logo.has-img { background: #fff; }
.login-top .spacer { flex: 1; }
.login-wrap { position: relative; overflow: hidden; }
.login-top { position: relative; z-index: 2; }
.login-main { position: relative; z-index: 2; flex: 1; display: grid; place-items: center; padding: 8px 18px clamp(150px, 24vw, 330px); }
.login-card { width: min(380px, 100%); background: rgba(251, 251, 248, .9); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--border); border-radius: 22px; padding: 26px 24px 22px; box-shadow: 0 1px 0 rgba(29, 28, 26, .04), 0 24px 60px -30px rgba(29, 28, 26, .25); }
.login-card h2 { font-family: var(--font-display); font-weight: 400; font-size: 28px; margin: 0 0 16px; text-align: center; }
.login-card .login-for { text-align: center; color: var(--muted); margin: -8px 0 14px; font-size: 14px; }
.login-card form { display: grid; gap: 14px; }
.login-card .field > span { font-weight: 700; font-size: 13px; color: var(--ink); }
.login-card .input { background: var(--paper); border-color: var(--border); border-radius: 12px; padding: 11px 13px; font-size: 16px; }
.login-card .input:focus { outline: 2px solid rgba(29, 28, 26, .15); border-color: var(--ink); background: #fff; }
.login-card .btn-primary { margin-top: 4px; }
.login-card .btn-primary .arrow { font-family: var(--font-mono); }
.login-top .lang-switch { margin: 0; }
/* the café's drawing (from archivecoffee.ae): stone faces asleep in a sea of clouds, along the bottom of the page and
   fading into the paper above it — and, as on the site, the two people walking together toward the horizon.
   The walkers are drawn over the drawing in its own measures (fractions of its width and height), so they stay in
   place at any size: --ps is where the shown part of the drawing starts, --pw how much of it is shown (all of it on
   a wide screen; on a phone the tall version, which is the part from .57005 to .8). */
.login-scene { --ps: 0; --pw: 1; position: absolute; inset-inline: 0; bottom: 0; z-index: 1; pointer-events: none;
  inline-size: 100%; aspect-ratio: 1920 / 474; direction: ltr;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22%); mask-image: linear-gradient(to bottom, transparent 0, #000 22%); }
.login-scene picture, .login-scene .login-plate { position: absolute; inset: 0; display: block; inline-size: 100%; block-size: 100%; }
.login-scene .walk { position: absolute; inset: 0; transform-origin: calc((.696745 - var(--ps)) / var(--pw) * 100%) 66.297%; }
.login-scene .walk__frame { position: absolute; left: calc((.677083 - var(--ps)) / var(--pw) * 100%); width: calc(.039583 / var(--pw) * 100%); top: 49.578%; height: 18.987%; }
.login-scene .walk__still { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; }
.login-scene .walk__fig { position: absolute; top: 0; block-size: 100%; inline-size: 57.8947%; overflow: hidden; }
.login-scene .walk__fig--man { left: -.0822368%; }
.login-scene .walk__fig--woman { left: 42.5165%; }
.login-scene .walk__strip { position: absolute; top: 0; left: 0; block-size: 100%; max-inline-size: none; }
.login-scene .walk__strip--man { inline-size: 3900%; }   /* 39 steps */
.login-scene .walk__strip--woman { inline-size: 2900%; } /* 29 steps */
/* a cloud that hides them where they appear and where they vanish */
.login-scene .walk__veil { position: absolute; opacity: 0;
  background: radial-gradient(closest-side, var(--paper) 45%, rgba(244, 243, 238, .75) 72%, transparent); }
.login-scene .walk__veil--far { left: calc((2566 / 3840 - var(--ps)) / var(--pw) * 100%); inline-size: calc(220 / 3840 / var(--pw) * 100%); top: 43.7764%; block-size: 13.7131%; }
.login-scene .walk__veil--near { left: calc((2521 / 3840 - var(--ps)) / var(--pw) * 100%); inline-size: calc(310 / 3840 / var(--pw) * 100%); top: 46.9409%; block-size: 27.4262%; }
@media (prefers-reduced-motion: no-preference) {
  /* moving: the still picture gives way to the two walking, step by step, smaller and smaller into the distance */
  .login-scene .walk__still { visibility: hidden; }
  .login-scene .walk { animation: login-walk-away 41s linear -1.87s infinite; }
  .login-scene .walk__strip--man { animation: login-stride 1.625s steps(39) infinite; }
  .login-scene .walk__strip--woman { animation: login-stride 1.208s steps(29) -.45s infinite; }
  .login-scene .walk__veil--far { animation: login-veil-far 41s linear -1.87s infinite; }
  .login-scene .walk__veil--near { animation: login-veil-near 41s ease-in-out 35.03s infinite; }
}
@keyframes login-stride { 100% { translate: -100%; } }
@keyframes login-walk-away {
  0% { opacity: 0; translate: 0 1.566%; scale: 1.06; }
  3.415% { opacity: 1; translate: 0 .376%; scale: 1.0144; }
  10% { translate: 0 -1.654%; scale: .9366; }
  20% { translate: 0 -4.20%; scale: .8390; }
  30% { translate: 0 -6.27%; scale: .7598; }
  40% { translate: 0 -7.98%; scale: .6943; }
  50% { translate: 0 -9.421%; scale: .6391; }
  60% { translate: 0 -10.65%; scale: .5921; }
  70% { translate: 0 -11.70%; scale: .5519; }
  76.829% { opacity: 1; translate: 0 -12.352%; scale: .5269; }
  85.044% { opacity: .04; translate: 0 -13.054%; scale: .5; }
  85.366%, 100% { opacity: 0; translate: 0 -13.054%; scale: .5; }
}
@keyframes login-veil-far { 0%, 68% { opacity: 0; } 80.5%, 85.4% { opacity: .92; } 95%, 100% { opacity: 0; } }
@keyframes login-veil-near { 0% { opacity: 0; } 8%, 13.5% { opacity: .97; } 20%, 100% { opacity: 0; } }
@media (max-width: 700px) {
  .login-main { place-items: start center; padding-top: 18px; padding-bottom: 46vh; }
  .login-scene { --ps: .57005; --pw: .22995; aspect-ratio: 883 / 948; }
}

/* ---------- POS (cashier) ---------- */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 16px; align-items: start; }
.pos-menu { min-width: 0; }
.pos-top { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.pos-top .input { max-width: 320px; }
.cat-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; }
.cat-tab { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 7px 14px; cursor: pointer; white-space: nowrap; font-weight: 700; display: inline-flex; gap: 6px; align-items: center; }
.cat-tab.active { background: var(--cat, var(--primary)); border-color: var(--cat, var(--primary)); color: #fff; }
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 10px; }
.prod { border: 1px solid var(--border); background: var(--surface); border-radius: 12px; padding: 12px 10px 10px; cursor: pointer; text-align: center; display: flex; flex-direction: column; gap: 4px; align-items: center; min-height: 112px; box-shadow: var(--shadow); border-top: 4px solid var(--cat, var(--accent)); transition: transform .08s, box-shadow .12s; position: relative; user-select: none; }
.prod:hover { box-shadow: 0 6px 16px rgba(29, 28, 26,.12); }
.prod:active { transform: scale(.97); }
.prod .ico { font-size: 26px; line-height: 1; }
/* «ألوان البرنامج»: the ready colours as small previews (the side menu and a button), and any colour */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.theme-sw { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 8px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); cursor: pointer; font: inherit; font-size: 13px; font-weight: 700; }
.theme-sw:hover { background: var(--surface-2); }
.theme-sw.on { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-50); }
.theme-sw .sw { display: flex; width: 72px; height: 44px; border-radius: 10px; overflow: hidden; border: 1px solid rgba(0, 0, 0, .08); background: #f4f3ee; }
.theme-sw .sw i { width: 24px; background: var(--s); }
.theme-sw .sw b { margin: auto; width: 30px; height: 12px; border-radius: 999px; background: var(--p); }
.theme-custom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.theme-custom input[type=color] { width: 54px; height: 34px; padding: 0; border: 1px solid var(--border); border-radius: 10px; background: none; cursor: pointer; }
/* the products page: a small picture in the list, and the picture in the product's form */
.p-thumb { display: block; width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: var(--surface-2); }
.p-thumb.none { border: 1px dashed var(--border); }
.p-img-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.p-img-box { width: 110px; height: 110px; border-radius: 16px; border: 1px dashed var(--border); background: var(--surface-2); display: grid; place-items: center; overflow: hidden; color: var(--muted); flex: none; }
.p-img-box img { width: 100%; height: 100%; object-fit: cover; }
.p-img-box svg { width: 34px; height: 34px; }
/* a product with its picture: the picture on top, round-cornered, the name and price under it */
.prod.has-img { padding-top: 8px; }
.prod .pimg { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 9px; background: var(--surface-2); margin-bottom: 4px; pointer-events: none; }
.prod .n { font-weight: 700; font-size: 14.5px; line-height: 1.3; }
.prod .p { color: var(--primary); font-weight: 800; font-size: 14px; margin-top: auto; }
.prod.out { opacity: .72; }
.prod .out-tag { position: absolute; top: 6px; inset-inline-start: 6px; background: var(--danger); color: #fff; border-radius: 6px; font-size: 11px; font-weight: 800; padding: 1px 6px; }
.prod .add-tag-p { position: absolute; top: 6px; inset-inline-start: 6px; background: var(--info-50); color: var(--info); border: 1px solid #a5f3fc; border-radius: 6px; font-size: 13px; font-weight: 900; width: 20px; height: 20px; display: grid; place-items: center; }
.line-addons { font-size: 12.5px; color: var(--info); font-weight: 600; line-height: 1.4; }
.it-addons { display: block; margin-inline-start: 34px; color: var(--info); font-size: 14px; }
.it-addons b { display: block; }
/* the add-ons window at the cashier */
.addon-group { margin-bottom: 16px; }
.addon-group h4 { margin: 0 0 8px; display: flex; gap: 8px; align-items: center; font-size: 15.5px; }
.addon-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.addon-opt { border: 2px solid var(--border); border-radius: 12px; padding: 10px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; background: var(--surface); user-select: none; }
.addon-opt:hover { border-color: var(--accent); }
.addon-opt.on { border-color: var(--primary); background: var(--primary-50); }
.addon-opt.out { border-style: dashed; }
.addon-opt .an { font-weight: 800; }
.addon-opt .ap { color: var(--primary); font-weight: 700; font-size: 13px; }
.addon-opt .aq { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.ad-foot { display: flex; gap: 10px; align-items: center; width: 100%; flex-wrap: wrap; }
.ad-foot .input { flex: 1; min-width: 160px; }
.ad-qty { display: flex; align-items: center; gap: 8px; }
.ad-qty b { min-width: 24px; text-align: center; font-size: 18px; }

/* ---------- the add-ons control panel («الإضافات»): group cards and the group editor ---------- */
.ag-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.ag-kpi { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow); }
.ag-kpi b { display: block; font-size: 24px; font-weight: 900; line-height: 1.15; }
.ag-kpi div > span { color: var(--muted); font-size: 13px; }
.ag-kpi-i { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; flex: none; }
.ag-kpi-i svg { width: 22px; height: 22px; }
.ag-kpi-i.k1 { background: var(--primary-50); color: var(--primary); }
.ag-kpi-i.k2 { background: var(--info-50); color: var(--info); }
.ag-kpi-i.k3 { background: var(--success-50); color: var(--success); }
.ag-kpi-i.k4 { background: var(--surface-2); color: var(--muted); }
.ag-kpi.warn .ag-kpi-i.k4 { background: var(--warning-50); color: var(--warning); }
.ag-kpi.warn b { color: var(--warning); }
.ag-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.ag-bar .spacer { flex: 1; }
.ag-search { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 0 12px; min-width: 240px; flex: 0 1 380px; color: var(--muted); transition: border-color .15s, box-shadow .15s; }
.ag-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(154, 138, 106, .18); }
.ag-search input { border: 0; outline: 0; background: none; padding: 10px 0; width: 100%; font: inherit; color: var(--text); }
.ag-search.sm { min-width: 170px; flex: 0 1 240px; padding: 0 10px; }
.ag-search.sm input { padding: 7px 0; font-size: 14px; }
.ag-hint { display: flex; gap: 8px; align-items: flex-start; color: var(--muted); font-size: 13.5px; margin: 4px 2px 14px; }
.ag-hint svg { color: var(--accent); margin-top: 3px; }
.ag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; align-items: start; }
.ag-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 1px 2px rgba(29, 28, 26, .05), 0 6px 18px rgba(29, 28, 26, .06); overflow: hidden; transition: box-shadow .18s, transform .18s; }
.ag-card:hover { box-shadow: 0 2px 4px rgba(29, 28, 26, .06), 0 14px 30px rgba(29, 28, 26, .10); transform: translateY(-2px); }
.ag-card.off { opacity: .6; }
.ag-head { display: flex; gap: 12px; align-items: center; padding: 16px 16px 10px; }
.ag-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none; color: #fff; background: linear-gradient(135deg, var(--primary), var(--accent)); box-shadow: 0 6px 14px rgba(29, 28, 26, .25); }
.ag-ico.multiple { background: linear-gradient(135deg, #0e7490, #2bb3c8); box-shadow: 0 6px 14px rgba(14, 116, 144, .25); }
.ag-ico svg { width: 22px; height: 22px; }
.ag-title { flex: 1; min-width: 0; }
.ag-title h3 { margin: 0 0 5px; font-size: 17px; font-weight: 800; }
.ag-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.ag-pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); white-space: nowrap; }
.ag-pill.red { background: var(--danger-50); color: var(--danger); border-color: #fecaca; }
.ag-pill.soft { background: var(--info-50); color: var(--info); border-color: #bae6fd; }
.ag-pill.gray { opacity: .85; }
.ag-acts { display: flex; gap: 6px; align-items: center; }
.ag-icon { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--muted); transition: background .15s, color .15s, border-color .15s; flex: none; }
.ag-icon:hover { background: var(--surface-2); color: var(--text); }
.ag-icon.danger:hover { background: var(--danger-50); color: var(--danger); border-color: #fecaca; }
.ag-opts { list-style: none; margin: 0; padding: 0 10px 10px; }
.ag-opts li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 4px 12px; align-items: center; padding: 9px 8px; border-radius: 10px; }
.ag-opts li + li { border-top: 1px dashed var(--border); }
.ag-opts li:hover { background: var(--surface-2); }
.ag-opts li.off { opacity: .55; }
.ag-on { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.ag-def { color: #e3a008; display: inline-grid; }
.ag-def svg { fill: currentColor; }
.ag-sub { display: flex; gap: 10px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.ag-sub .pos { color: var(--success); font-weight: 700; }
.ag-sub .neg { color: var(--danger); font-weight: 700; }
.ag-price { font-weight: 800; color: var(--primary); background: var(--primary-50); padding: 3px 10px; border-radius: 999px; font-size: 13.5px; min-width: 66px; text-align: center; }
.ag-price.free { color: var(--success); background: var(--success-50); font-weight: 700; }
.ag-opts .ag-none { display: block; color: var(--muted); padding: 16px 8px; text-align: center; }
.ag-foot { display: flex; gap: 10px; align-items: center; padding: 10px 16px 12px; border-top: 1px solid var(--border); background: var(--surface-2); }
.ag-prods { flex: 1; display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; }
.ag-chip { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: #fff; color: var(--text); border: 1px solid var(--border); border-inline-start: 3px solid var(--c, var(--accent)); }
.ag-chip.more { color: var(--muted); border-inline-start-color: var(--border); }
.ag-link { flex: none; }
.ag-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 44px 20px; background: var(--surface); border: 2px dashed var(--border); border-radius: 18px; color: var(--muted); text-align: center; }
.ag-empty svg { width: 42px; height: 42px; color: var(--accent); }
.ag-empty b { color: var(--text); font-size: 16px; }

.modal.ag-modal { width: min(1000px, 100%); }
.ag-modal .modal-body { background: var(--bg); padding: 14px; }
.ag-editor { display: grid; gap: 14px; }
.ag-sec { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px; box-shadow: var(--shadow); }
.ag-sec-h { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.ag-sec-h h4 { margin: 0; font-size: 16px; font-weight: 800; }
.ag-sec-h .spacer { flex: 1; }
.ag-num { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 13.5px; flex: none; }
.ag-field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 700; color: var(--muted); min-width: 0; }
.ag-field > span:first-child { white-space: nowrap; }
.ag-field .input { color: var(--text); font-weight: 600; }
.ag-big { font-size: 17px; padding: 11px 14px; font-weight: 700 !important; }
.ag-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.ag-choice-card { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: center; text-align: start; border: 2px solid var(--border); background: var(--surface); border-radius: 14px; padding: 12px 14px; cursor: pointer; font: inherit; color: var(--text); transition: border-color .15s, background .15s, box-shadow .15s; }
.ag-choice-card:hover { border-color: var(--accent); }
.ag-choice-i { grid-row: span 2; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); transition: background .15s, color .15s; }
.ag-choice-card b { font-size: 15px; }
.ag-choice-card small { color: var(--muted); font-size: 12.5px; }
.ag-choice-card.on { border-color: var(--primary); background: var(--primary-50); box-shadow: 0 0 0 3px rgba(29, 28, 26, .10); }
.ag-choice-card.on .ag-choice-i { background: var(--primary); color: #fff; }
.ag-toggles { display: flex; gap: 14px 26px; flex-wrap: wrap; align-items: center; }
.ag-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; position: relative; }
.ag-switch input { position: absolute; opacity: 0; pointer-events: none; }
.ag-switch i { width: 44px; height: 25px; border-radius: 999px; background: #d6d4cc; position: relative; transition: background .2s; flex: none; }
.ag-switch i::after { content: ''; position: absolute; top: 3px; right: 3px; width: 19px; height: 19px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: right .2s; }
.ag-switch input:checked + i { background: var(--success); }
.ag-switch input:checked + i::after { right: 22px; }
.ag-switch input:focus-visible + i { box-shadow: 0 0 0 3px rgba(154, 138, 106, .35); }
.ag-switch span { display: flex; flex-direction: column; line-height: 1.3; }
.ag-switch small { color: var(--muted); font-size: 12px; }
.ag-switch.sm { flex-direction: column; gap: 4px; align-self: flex-end; }
.ag-switch.sm i { width: 38px; height: 21px; }
.ag-switch.sm i::after { width: 15px; height: 15px; }
.ag-switch.sm input:checked + i::after { right: 20px; }
.ag-stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface); width: fit-content; }
.ag-stepper button { border: 0; background: var(--surface-2); width: 34px; cursor: pointer; color: var(--text); display: grid; place-items: center; transition: background .15s, color .15s; }
.ag-stepper button:hover { background: var(--primary-50); color: var(--primary); }
.ag-stepper .input { border: 0; border-radius: 0; width: 58px; text-align: center; padding: 8px 4px; -moz-appearance: textfield; appearance: textfield; }
.ag-stepper .input::-webkit-inner-spin-button, .ag-stepper .input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.ag-stepper.sm button { width: 28px; }
.ag-stepper.sm .input { width: 44px; padding: 7px 2px; }
.ag-bulk { background: var(--surface-2); border: 1.5px dashed var(--accent); border-radius: 12px; padding: 10px; margin-bottom: 12px; animation: agIn .2s ease-out; }
.ag-bulk textarea { width: 100%; resize: vertical; font: inherit; line-height: 1.7; }
.ag-bulk-a { display: flex; gap: 8px; margin-top: 8px; }
.ag-preview { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: linear-gradient(135deg, var(--primary-50), var(--surface)); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; font-size: 12.5px; color: var(--muted); font-weight: 700; }
#ag-prev { display: flex; gap: 6px; flex-wrap: wrap; }
.ag-prev-opt { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1.5px solid var(--border); border-radius: 999px; padding: 4px 12px; color: var(--text); font-size: 13px; }
.ag-prev-opt b { color: var(--primary); }
.ag-prev-opt.on { border-color: var(--primary); background: var(--primary-50); }
.ag-prev-m { width: 13px; height: 13px; border: 2px solid #c4c2bb; flex: none; }
.ag-prev-m.radio { border-radius: 50%; }
.ag-prev-m.box { border-radius: 4px; }
.ag-prev-opt.on .ag-prev-m { border-color: var(--primary); background: radial-gradient(var(--primary) 42%, transparent 48%); }
.ag-opts-ed { display: grid; gap: 10px; }
.ag-opt { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); padding: 10px 12px; transition: box-shadow .15s, border-color .15s, background .35s; }
.ag-opt:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(154, 138, 106, .14); }
.ag-opt.enter { animation: agIn .25s ease-out; }
.ag-opt.leave { animation: agOut .2s ease-in forwards; }
.ag-opt.moved { background: var(--primary-50); }
@keyframes agIn { from { opacity: 0; transform: translateY(-6px) scale(.985); } }
@keyframes agOut { to { opacity: 0; transform: scale(.97); } }
.ag-opt-main { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.ag-opt-main .grow { flex: 1 1 200px; }
.ag-field.w-price { width: 140px; }
.ag-field.w-qty { width: 124px; }
.ag-order { display: flex; flex-direction: column; gap: 2px; align-self: center; }
.ag-order button { border: 0; background: none; color: #b5b3ab; cursor: pointer; padding: 0; height: 17px; display: grid; place-items: center; border-radius: 5px; }
.ag-order button:hover { color: var(--primary); background: var(--primary-50); }
.ag-affix { position: relative; display: block; }
.ag-affix .input { padding-right: 40px; }
.ag-affix i { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 12px; color: var(--muted); pointer-events: none; }
.ag-star { display: flex; flex-direction: column; align-items: center; gap: 1px; border: 1px solid var(--border); background: var(--surface); border-radius: 10px; padding: 5px 9px; cursor: pointer; color: #c4c2bb; font: inherit; transition: all .15s; }
.ag-star small { font-size: 11px; color: var(--muted); font-weight: 700; }
.ag-star:hover { border-color: #f6d27a; }
.ag-star.on { color: #e3a008; border-color: #f6d27a; background: var(--warning-50); }
.ag-star.on svg { fill: currentColor; }
.ag-opt-foot { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); }
.ag-opt-foot .spacer { flex: 1; }
.ag-margin { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.ag-margin .pos { color: var(--success); }
.ag-margin .neg { color: var(--danger); }
.ag-rec-btn svg:last-child { transition: transform .2s; }
.ag-rec-btn.open svg:last-child { transform: rotate(180deg); }
.ag-rec { margin-top: 10px; padding: 12px; background: var(--surface-2); border-radius: 12px; display: grid; gap: 10px; animation: agIn .2s ease-out; }
.ag-add-opt { width: 100%; margin-top: 10px; border: 2px dashed var(--border); background: transparent; border-radius: 14px; padding: 12px; font: inherit; font-weight: 800; color: var(--primary); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: border-color .15s, background .15s; }
.ag-add-opt:hover { border-color: var(--primary); background: var(--primary-50); }
.ag-add-opt small { color: var(--muted); font-weight: 600; }
.ag-pcats { display: grid; gap: 14px; max-height: 340px; overflow-y: auto; padding: 2px 2px 4px; }
.ag-pcat-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; font-size: 14px; padding-inline-start: 8px; border-inline-start: 3px solid var(--c); }
.ag-linkbtn { border: 0; background: none; color: var(--info); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.ag-linkbtn:hover { background: var(--info-50); }
.ag-pchips { display: flex; flex-wrap: wrap; gap: 7px; }
.ag-pchip { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--border); background: var(--surface); border-radius: 999px; padding: 6px 13px; font: inherit; font-size: 13.5px; font-weight: 700; color: var(--text); cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.ag-pchip svg { width: 0; opacity: 0; transition: width .15s, opacity .15s; }
.ag-pchip:hover { border-color: var(--c); }
.ag-pchip.on { border-color: var(--primary); background: var(--primary-50); color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.ag-pchip.on svg { width: 1em; opacity: 1; }
.ag-ed-foot { display: flex; align-items: center; gap: 8px; width: 100%; flex-wrap: wrap; }
.ag-ed-foot .spacer { flex: 1; }
#ag-sum { color: var(--muted); font-size: 13.5px; display: flex; align-items: center; gap: 6px; }
#ag-sum b { color: var(--text); }
.shake { animation: shake .35s; border-color: var(--danger) !important; }
@keyframes shake { 25% { transform: translateX(4px); } 50% { transform: translateX(-4px); } 75% { transform: translateX(2px); } }
@media (max-width: 760px) {
  .ag-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ag-grid { grid-template-columns: 1fr; }
  .ag-choice { grid-template-columns: 1fr; }
  .ag-search { min-width: 0; flex: 1 1 100%; }
  .ag-field.w-price, .ag-field.w-qty { width: calc(50% - 5px); }
  .ag-opts li { grid-template-columns: minmax(0, 1fr) auto; }
  .ag-sub { grid-column: 1 / -1; grid-row: 2; }
  .ag-foot { flex-wrap: wrap; }
}
/* «طلب شراء وتوفير حاجيات» (pages-requests.js) */
.rq-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.rq-h { margin: 14px 0 8px; font-size: 15px; display: flex; align-items: center; gap: 6px; }
.rq-supplies { display: grid; gap: 8px; }
.rq-supply { border: 1px solid var(--border); border-inline-start: 3px solid var(--success); border-radius: 10px; padding: 8px 12px; background: var(--surface); display: grid; gap: 3px; }
.rq-supply-h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rq-supply-h .spacer { flex: 1; }
.rq-kpis.rq-kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#rq-sum .alert { margin: 10px 0; }
.rq-levels { display: grid; gap: 2px; font-size: 13px; }
.rq-got { display: grid; gap: 2px; font-size: 13.5px; }
.rq-got svg { width: 14px; height: 14px; vertical-align: -2px; }
.rq-levels svg { width: 14px; height: 14px; vertical-align: -2px; }
.rq-src { min-width: 190px; padding: 6px 8px; font-size: 13px; }
.rq-kpi { font: inherit; color: inherit; text-align: start; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.rq-kpi:hover { border-color: var(--accent); }
.rq-kpi.on { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(29, 28, 26, .12); }
.ag-kpi-i.k-warn { background: var(--warning-50); color: var(--warning); }
.rq-form { display: grid; gap: 12px; }
.rq-pri { display: flex; align-items: center; gap: 10px; }
.rq-pri .seg button[data-p=urgent].active { background: var(--danger); }
.rq-lines-h { display: flex; align-items: center; gap: 10px; }
.rq-lines-h h4 { margin: 0; }
.rq-lines-h .spacer { flex: 1; }
#rq-lines { display: grid; gap: 8px; }
.rq-line { display: grid; grid-template-columns: 30px minmax(0, 2.2fr) 92px 110px minmax(0, 1.4fr) 34px; gap: 6px 8px; align-items: center; border: 1px solid var(--border); border-radius: 12px; padding: 8px 10px; background: var(--surface); }
.rq-line:focus-within { border-color: var(--accent); }
.rq-kind { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); }
.rq-kind.free { background: var(--info-50); color: var(--info); }
.rq-kind svg { width: 16px; height: 16px; }
.rq-stock { grid-column: 2 / -1; }
.rq-stock svg { width: 14px; height: 14px; vertical-align: -2px; }
.rq-add { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rq-add .ag-add-opt { margin-top: 0; }
.rq-head { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.rq-meta { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 16px; background: var(--surface-2); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.rq-meta > div { display: flex; flex-direction: column; gap: 2px; }
.rq-meta > div > span:first-child { color: var(--muted); font-size: 12.5px; }
.rq-foot { display: flex; gap: 8px; flex-wrap: wrap; width: 100%; align-items: center; }
.rq-foot .spacer { flex: 1; }
.rq-aq { display: flex; align-items: center; gap: 6px; }
.rq-aq .input { width: 100px; }
@media (max-width: 760px) {
  .rq-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rq-line { grid-template-columns: 30px minmax(0, 1fr) minmax(0, 1fr) 34px; }
  .rq-kind { grid-row: 1; grid-column: 1; }
  .rq-name { grid-row: 1; grid-column: 2 / 4; }
  .rq-line [data-del] { grid-row: 1; grid-column: 4; }
  .rq-qty { grid-row: 2; grid-column: 2; }
  .rq-unit { grid-row: 2; grid-column: 3; }
  .rq-note { grid-row: 3; grid-column: 2 / 4; }
  .rq-stock { grid-row: 4; grid-column: 2 / 4; }
  .rq-add { grid-template-columns: 1fr; }
}
/* the tabs in the middle (auto margins: still scrolls from the start when they do not fit) */
.tabs.center a:first-child, .tabs.center button:first-child { margin-inline-start: auto; }
.tabs.center a:last-child, .tabs.center button:last-child { margin-inline-end: auto; }
/* «قائمة الإضافات»: the add row at the top, then every add-on with edit / delete on its row */
.ai-add { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow); margin-bottom: 14px; }
.ai-add-h { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.ai-add-h .ag-kpi-i { width: 36px; height: 36px; border-radius: 11px; }
.ai-add-h .ag-kpi-i svg { width: 18px; height: 18px; }
.ai-add-h b { display: block; font-size: 16px; font-weight: 800; }
.ai-add-h small { color: var(--muted); font-size: 12.5px; }
.ai-add-f { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.ai-add-f .grow { flex: 1 1 220px; }
.ag-field.w-group { width: 200px; }
.ai-add-btn { padding: 9px 24px; }
.ai-gnote:not(:empty) { margin-top: 8px; display: flex; align-items: center; gap: 6px; }
.ai-gnote svg { width: 15px; height: 15px; vertical-align: -2px; }
.ai-table td { white-space: nowrap; }
.ai-table td:nth-child(2) { white-space: normal; min-width: 150px; }
.ai-table .ag-price { display: inline-block; }
.ai-table .ag-def svg { width: 15px; height: 15px; vertical-align: -2px; }
.ai-acts { display: inline-flex; gap: 6px; }
.ai-table tr.ai-editing td { background: var(--primary-50); }
.ai-table tr.ai-editing .input { min-width: 90px; padding: 6px 8px; }
.ai-table tr.ai-editing .ag-affix .input { padding-right: 40px; }
.ai-table tr.ai-editing [data-k=name] { min-width: 170px; }
.ai-table tr.ai-new td { animation: aiFlash 1.8s ease-out; }
@keyframes aiFlash { from { background: var(--success-50); } }
@media (max-width: 760px) {
  .ag-field.w-group { width: 100%; }
  .ai-add-btn { width: 100%; }
}
/* recipe editor and option rows in the admin */
.rec-row, .opt-row { display: grid; gap: 8px; align-items: center; margin-bottom: 6px; }
.rec-row { grid-template-columns: minmax(0, 2fr) 100px 92px 80px 34px; }
/* a recipe line typed in another unit: what it takes out of the stock, under the line */
.rec-row .rec-hint { grid-column: 1 / -1; margin-top: -4px; }
.rec-row .rec-hint:empty { display: none; }
.rec-row .rec-unit-sel { padding-inline: 6px; }
.opt-row { grid-template-columns: minmax(0, 2fr) 100px 90px 90px 70px 60px auto 34px; background: var(--surface-2); padding: 8px; border-radius: 10px; border: 1px solid var(--border); }
.opt-recipe { grid-column: 1 / -1; background: var(--surface); border: 1px dashed var(--border); border-radius: 10px; padding: 10px; }
.prod-pick { max-height: 300px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; padding: 10px; }
.prod-pick .pcat { margin: 8px 0 4px; font-weight: 800; display: flex; gap: 8px; align-items: center; }
.prod-pick .chips { gap: 4px 12px; }
.group-card .card-head { background: var(--surface-2); }
.stock-bar { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-top: 4px; border: 1px solid var(--border); }
.stock-bar i { display: block; height: 100%; background: var(--success); }
.stock-bar i.low { background: var(--accent); }
.stock-bar i.out { background: var(--danger); }
/* a purchase line split between the places (part to the shop, part home) */
.rec-row.pur-row { grid-template-columns: minmax(0, 2fr) 100px 100px 110px 100px 34px; }
.pur-line { border: 1px solid var(--border); border-radius: 10px; padding: 8px; margin-bottom: 8px; background: var(--surface); }
.pur-line .rec-row { margin-bottom: 0; }
.split-row { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); font-size: 13px; }
.split-row label { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.split-row label .input { width: 92px; padding: 5px 8px; }
.split-row label.is-def .input { background: var(--surface-2); }
.split-row .spacer { flex: 1; }
/* the transfer between the places: what is sent and what stays, per material */
.xfer-wrap { max-height: 52vh; overflow: auto; border: 1px solid var(--border); border-radius: 10px; }
.xfer-wrap table { margin: 0; }
.xfer-wrap thead th { position: sticky; top: 0; background: var(--surface-2); z-index: 1; }
.xfer-wrap td .input { width: 96px; padding: 5px 8px; }
.xfer-wrap tr.sending td { background: var(--surface-2); }
.xfer-wrap tr.sending td:first-child { box-shadow: inset -3px 0 0 var(--primary); }
.xfer-sum { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; margin-top: 10px; font-weight: 700; }
@media (max-width: 760px) {
  .rec-row { grid-template-columns: minmax(0, 1fr) 76px 80px 34px; }
  .rec-row.pur-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rec-row.pur-row > :first-child { grid-column: 1 / -1; }
  .split-row label .input { width: 74px; }
  .rec-row .rec-cost, .rec-row.pur-row .rec-unit { display: none; }
  .opt-row { grid-template-columns: 1fr 1fr; }
}
.prod .q { position: absolute; top: 6px; inset-inline-end: 6px; background: var(--primary); color: #fff; border-radius: 999px; min-width: 22px; height: 22px; font-size: 12px; font-weight: 800; display: grid; place-items: center; padding: 0 6px; }

.pos-cart { position: sticky; top: 76px; display: flex; flex-direction: column; max-height: calc(100vh - 96px); }
.type-switch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 12px; border-bottom: 1px solid var(--border); }
.type-btn { border: 2px solid var(--border); background: var(--surface); border-radius: 12px; padding: 9px 4px; cursor: pointer; font-weight: 800; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 13.5px; }
.type-btn svg { width: 22px; height: 22px; }
.type-btn.active.t-dine_in { border-color: var(--primary); background: var(--primary-50); color: var(--primary); }
.type-btn.active.t-takeaway { border-color: var(--success); background: var(--success-50); color: var(--success); }
.type-btn.active.t-delivery { border-color: var(--info); background: var(--info-50); color: var(--info); }
.type-btn.active.t-counter { border-color: var(--accent); background: var(--warning-50); color: var(--warning); }
.type-fields { padding: 12px; border-bottom: 1px solid var(--border); display: grid; gap: 8px; }
.type-fields .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
/* a takeaway's vehicle: emirate · category · number (required) */
.plate-row { display: grid; grid-template-columns: 1.3fr .9fr 1.2fr; gap: 6px; align-items: center; }
.plate-row .plate-lbl { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; color: var(--muted); }
.plate-row .plate-lbl svg { width: 16px; height: 16px; }
.plate-row .input { min-width: 0; padding-inline: 8px; }
.plate-row input[data-plate=number] { font-weight: 800; letter-spacing: 1px; text-align: center; }
.pick-btn { display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 2px dashed var(--border); border-radius: 10px; padding: 10px 12px; background: var(--surface-2); cursor: pointer; font-weight: 700; width: 100%; }
.pick-btn.set { border-style: solid; border-color: var(--primary); background: var(--primary-50); color: var(--primary); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 5px 12px; cursor: pointer; font-weight: 700; font-size: 13.5px; }
.chip.active { background: var(--info); border-color: var(--info); color: #fff; }
.add-banner { background: var(--warning-50); border-bottom: 1px solid #fde68a; color: #78350f; padding: 10px 12px; display: flex; gap: 8px; align-items: center; font-weight: 700; }
.cart-lines { overflow-y: auto; flex: 1; min-height: 80px; }
.cart-line { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.cart-line b { font-size: 14.5px; }
.cart-line .note { grid-column: 1 / -1; font-size: 12.5px; color: var(--warning); }
.cart-line .ctrl { display: flex; align-items: center; gap: 6px; }
.qty-btn { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-weight: 800; font-size: 16px; display: grid; place-items: center; }
.qty-btn:hover { background: var(--surface-2); }
.qty-btn svg { width: 15px; height: 15px; }
.cart-line .lt { font-weight: 800; min-width: 70px; text-align: end; }
.cart-empty { padding: 30px 12px; text-align: center; color: var(--muted); }
.cart-totals { padding: 10px 14px; border-top: 1px solid var(--border); background: var(--surface-2); display: grid; gap: 3px; }
.cart-totals .r { display: flex; justify-content: space-between; font-size: 14px; }
.cart-totals .r.big { font-size: 21px; font-weight: 800; color: var(--primary); margin-top: 4px; }
.cart-actions { padding: 12px; display: grid; grid-template-columns: auto 1fr; gap: 8px; }

.table-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.tbl { border: 2px solid var(--border); border-radius: 12px; padding: 12px 6px; text-align: center; cursor: pointer; background: var(--surface); }
.tbl .tn { font-size: 22px; font-weight: 800; }
.tbl .ts { font-size: 12px; color: var(--muted); }
.tbl:hover { border-color: var(--primary); }
.tbl.busy { background: var(--warning-50); border-color: #fbbf24; }
.tbl.busy .ts { color: var(--warning); font-weight: 700; }
.tbl.selected { background: var(--primary); border-color: var(--primary); color: #fff; }
.tbl.selected .ts { color: #efede6; }
.zone-title { font-weight: 800; margin: 14px 0 8px; color: var(--muted); font-size: 13.5px; }
.zone-title:first-child { margin-top: 0; }

.big-no { font-size: 64px; font-weight: 900; color: var(--primary); text-align: center; line-height: 1; margin: 6px 0 2px; }
.quick-notes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

/* ---------- order tickets (kitchen + collection) ---------- */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.board-col { background: rgba(255,255,255,.5); border: 1px solid var(--border); border-radius: 14px; padding: 10px; min-height: 200px; }
.board-col > h3 { margin: 2px 4px 10px; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.tickets { display: grid; gap: 10px; }
.ticket { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.ticket-head { display: flex; align-items: center; gap: 10px; padding: 9px 12px; color: #fff; }
.ticket-head .no { font-size: 26px; font-weight: 900; line-height: 1; }
.ticket-head .meta { flex: 1; line-height: 1.3; font-size: 13.5px; }
.ticket-head .meta b { font-size: 15px; }
.ticket-head .timer { font-weight: 800; font-size: 15px; background: rgba(0,0,0,.18); padding: 3px 9px; border-radius: 8px; direction: ltr; }
.k-new .ticket-head { background: var(--accent); }
.k-preparing .ticket-head { background: var(--info); }
.k-ready .ticket-head { background: var(--success); }
.ticket.late { border-color: var(--danger); box-shadow: 0 0 0 2px rgba(185,28,28,.35); }
.ticket.late .timer { background: var(--danger); animation: pulse 1.2s infinite; }
.ticket.fresh { animation: flash 1s 3; }
@keyframes pulse { 50% { opacity: .55; } }
@keyframes flash { 50% { box-shadow: 0 0 0 4px rgba(154, 138, 106,.6); } }
.ticket ul { list-style: none; margin: 0; padding: 6px 12px; }
.ticket li { padding: 6px 0; border-bottom: 1px dashed var(--border); font-size: 16px; }
.ticket li:last-child { border-bottom: 0; }
.ticket li .qn { display: inline-block; min-width: 34px; font-weight: 900; color: var(--primary); }
.ticket li .it-note { display: block; color: var(--danger); font-size: 13.5px; font-weight: 700; margin-inline-start: 34px; }
.ticket li.done { opacity: .45; text-decoration: line-through; }
.ticket li .add-tag { font-size: 11px; background: var(--warning-50); color: var(--warning); border-radius: 6px; padding: 1px 6px; margin-inline-start: 6px; font-weight: 800; text-decoration: none; }
.ticket .o-note { margin: 0 12px 8px; padding: 6px 10px; border-radius: 8px; background: var(--warning-50); color: #78350f; font-weight: 700; font-size: 13.5px; }
.ticket-foot { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); background: var(--surface-2); align-items: center; }
.ticket-foot .btn-lg { flex: 1; padding: 10px; font-size: 16px; }
.ticket .amount { font-size: 20px; font-weight: 900; color: var(--primary); }

.kitchen-full { position: fixed; inset: 0; z-index: 60; background: #171614; overflow: auto; padding: 14px; }
.kitchen-full .board-col { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1); }
.kitchen-full .board-col > h3, .kitchen-full .kbar { color: #efede6; }
.kbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.kbar .spacer { flex: 1; }
.kbar .k-count { font-weight: 800; font-size: 15px; }
/* numbered explanation steps (cash receivers…) */
ol.steps { margin: 0; padding-inline-start: 22px; display: grid; gap: 6px; line-height: 1.7; }
/* storage places (the shop, home) */
.place-card .card-head h3 { display: inline-flex; align-items: center; gap: 6px; }
.place-card .card-head h3 svg { width: 20px; height: 20px; }
.place-card .card-head { gap: 8px; }
/* kitchen screens: which screen this is, choosing one, and how the other screens are doing with the order */
.kbar .k-screen { display: inline-flex; align-items: center; gap: 6px; font-weight: 900; font-size: 19px; color: var(--primary); }
.kbar .k-screen svg { width: 22px; height: 22px; }
.kitchen-full .kbar .k-screen { color: #e6d3a8; }
.k-stations button { font-size: 14.5px; }
.k-parts { display: flex; flex-wrap: wrap; gap: 5px; padding: 6px 10px 0; }
.k-part { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 800; border-radius: 999px; padding: 2px 9px;
  background: var(--warning-50); color: var(--warning); border: 1px solid transparent; }
.k-part svg { width: 13px; height: 13px; }
.k-part.p-preparing { background: var(--info-50); color: var(--info); }
.k-part.p-ready { background: #dcfce7; color: #166534; }
.k-part.mine { border-color: currentColor; }
.ticket li .st-tag { font-size: 11px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); border-radius: 6px; padding: 0 6px; margin-inline-start: 6px; font-weight: 700; }
.st-assign { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }

.hand-card .ticket-foot { flex-wrap: wrap; }
.collect-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }

/* payment dialog */
.pay-total { text-align: center; padding: 10px; border-radius: 12px; background: var(--primary-50); margin-bottom: 14px; }
.pay-total .v { font-size: 34px; font-weight: 900; color: var(--primary); }
.methods { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 14px; }
.method { border: 2px solid var(--border); border-radius: 12px; padding: 12px; cursor: pointer; background: var(--surface); font-weight: 800; display: flex; gap: 8px; align-items: center; justify-content: center; }
.method.active { border-color: var(--primary); background: var(--primary-50); color: var(--primary); }
.method:disabled { opacity: .4; cursor: not-allowed; }
.cash-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.change-box { margin-top: 12px; padding: 10px 14px; border-radius: 10px; background: var(--success-50); color: var(--success); font-weight: 800; font-size: 18px; display: flex; justify-content: space-between; }
.change-box.bad { background: var(--danger-50); color: var(--danger); }

/* order details */
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; margin-bottom: 14px; }
.kv div { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dashed var(--border); padding: 4px 0; }
.kv span:first-child { color: var(--muted); }
.timeline { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.timeline .step { flex: 1; min-width: 110px; border-radius: 10px; padding: 8px 10px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; }
.timeline .step b { display: block; font-size: 13.5px; }
.timeline .step.on { background: var(--success-50); border-color: #bbf7d0; }

/* charts */
.bars { display: flex; align-items: flex-end; gap: 8px; height: 180px; padding-top: 10px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; min-width: 0; }
.bar .col { width: 100%; max-width: 46px; background: linear-gradient(180deg, var(--accent), var(--primary)); border-radius: 6px 6px 2px 2px; min-height: 2px; }
.bar .lbl { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.bar .val { font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.hbar { display: grid; grid-template-columns: 120px 1fr auto; gap: 10px; align-items: center; margin: 7px 0; font-size: 14px; }
.hbar .track { background: var(--surface-2); border-radius: 999px; height: 10px; overflow: hidden; border: 1px solid var(--border); }
.hbar .fill { height: 100%; background: var(--accent); border-radius: 999px; }

/* commission on the daily target */
.cbars { display: flex; gap: 4px; align-items: flex-end; overflow-x: auto; overflow-y: hidden; padding-top: 6px; }
.cbar { flex: 1; min-width: 26px; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.cbar .cw { position: relative; width: 100%; height: 170px; }
.cbar .col { position: absolute; bottom: 0; inset-inline: 14%; border-radius: 5px 5px 2px 2px; background: #d6d3d1; }
.cbar .col.ok { background: var(--success); }
.cbar .col.miss { background: var(--accent); }
.cbar .tl { position: absolute; inset-inline: 0; height: 0; border-top: 2px dashed var(--danger); }
.cbar .v { font-size: 10px; color: var(--muted); white-space: nowrap; }
.cbar .l { font-size: 11px; color: var(--muted); text-align: center; line-height: 1.2; }
.day-card.on .card-head { background: var(--success-50); }
.lvl { display: grid; grid-template-columns: 1fr 1fr 30px; gap: 8px; align-items: end; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px dashed var(--border); }
.lvl .field { font-size: 12px; }
.lvl .input { padding: 6px 8px; font-weight: 800; font-size: 15px; }
.target-card .bigline { font-size: 15px; margin: 6px 0; }
.target-card .meter { height: 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; position: relative; }
.target-card .meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--success)); border-radius: 999px; }

.perm-group { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.perm-group h4 { margin: 0 0 6px; font-size: 14px; }
.perm-group .check { display: flex; margin: 5px 0; }

.report-sheet .line { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--border); }
.report-sheet .line.total { font-weight: 800; font-size: 16px; border-bottom: 2px solid var(--border); }
.report-sheet .line.grand { font-weight: 900; font-size: 19px; color: var(--primary); border: 0; padding-top: 10px; }
.report-sheet h4 { margin: 16px 0 6px; color: var(--muted); font-size: 14px; }

.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; }

/* ---------- print (receipt 80mm / reports A4) ---------- */
#print-root { display: none; }
@media print {
  body > *:not(#print-root) { display: none !important; }
  #print-root { display: block; }
  body { background: #fff; }
  @page { margin: 6mm; }
}
.receipt { width: 72mm; margin: 0 auto; font-size: 12.5px; color: #000; font-family: var(--font); }
.receipt h2 { text-align: center; margin: 0; font-size: 17px; }
.receipt .r-logo { display: block; margin: 0 auto 6px; max-width: 60%; max-height: 28mm; object-fit: contain; }
.receipt .c { text-align: center; }
.receipt .big { font-size: 30px; font-weight: 900; text-align: center; margin: 4px 0; }
.receipt hr { border: 0; border-top: 1px dashed #000; margin: 6px 0; }
.receipt table { width: 100%; border-collapse: collapse; }
.receipt td { padding: 2px 0; vertical-align: top; }
.receipt td.e { text-align: end; white-space: nowrap; }
.receipt .tot td { font-weight: 800; font-size: 15px; }
.receipt .kt li { font-size: 16px; font-weight: 800; padding: 3px 0; }
.receipt .kt { list-style: none; padding: 0; margin: 0; }
.receipt .kt .nt { display: block; font-size: 13px; font-weight: 700; }
/* the working day: when each day's work ends (settings, commission targets) */
.day-ends { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 10px; }
.day-ends .field.late select { border-color: var(--info); }
.day-end-field { margin-bottom: 10px; }
.day-end-field .input { font-size: 13.5px; }
/* the money (as in the car wash system): totals rows, a select with an add button, the box note */
.table tr.row-total td { font-weight: 800; border-top: 2px solid var(--border); background: var(--surface-2); }
.inline-add { display: flex; gap: 8px; align-items: center; }
.inline-add select { flex: 1; }
.box-note { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; background: var(--info-50); border-radius: 8px; padding: 8px 10px; }
/* printed A4 documents: the payment voucher (سند صرف) and the cash deposit slip, with signature boxes */
.doc-preview { border: 1px solid var(--border); border-radius: 10px; padding: 18px; background: #fff; color: #000; }
.doc-print { color: #000; font-family: var(--font); font-size: 14px; }
.doc-print h2 { margin: 0 0 4px; text-align: center; font-size: 20px; }
.doc-print h3 { margin: 2px 0 12px; text-align: center; font-size: 17px; }
.doc-print table { width: 100%; border-collapse: collapse; }
.doc-print th, .doc-print td { border: 1px solid #555; padding: 6px 9px; text-align: start; vertical-align: top; }
.doc-print th { width: 30%; background: #f3f3f3; font-weight: 700; }
/* a printed report table (the fingerprint attendance, the audit log's counts): plain, small enough for many columns */
.doc-print.table-print { font-size: 12px; }
.doc-print.table-print th { width: auto; }
.doc-print.table-print th, .doc-print.table-print td { padding: 4px 6px; }
/* the audit log: the kinds of movement (add / edit / delete / cancel / other), and each group's counts as a bar */
.audit-kinds { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-top: 10px; }
.audit-kinds .check { gap: 4px; }
.audit-stat { cursor: pointer; }
.audit-stat.on { outline: 2px solid var(--primary); }
.audit-drill { display: inline-block; min-width: 28px; padding: 2px 6px; border-radius: 6px; text-align: center; text-decoration: underline dotted; color: inherit; }
.audit-drill:hover { background: var(--surface-2); }
.audit-bar { display: flex; height: 10px; min-width: 6px; border-radius: 5px; overflow: hidden; background: var(--surface-2); }
.audit-bar span { display: block; min-width: 2px; }
.audit-bar .k-add { background: #16a34a; }
.audit-bar .k-edit { background: #0891b2; }
.audit-bar .k-delete { background: #dc2626; }
.audit-bar .k-cancel { background: #f59e0b; }
.audit-bar .k-other { background: #94a3b8; }
.signatures { display: flex; gap: 18px; margin: 30px 0 14px; break-inside: avoid; }
.sign-box { flex: 1; border: 1px solid #000; border-radius: 6px; padding: 10px 12px 12px; }
.sign-line { height: 32px; display: flex; align-items: flex-end; border-bottom: 1px dotted #000; padding-bottom: 2px; }
.print-report { color: #000; font-family: var(--font); }
.print-report h1 { font-size: 20px; margin: 0 0 4px; }
.print-report table { width: 100%; border-collapse: collapse; font-size: 12px; }
.print-report th, .print-report td { border: 1px solid #999; padding: 4px 6px; text-align: start; }

/* ---------- the reports center (التقارير) ---------- */
.rc-hero { display: flex; gap: 16px 24px; align-items: center; flex-wrap: wrap; background: linear-gradient(120deg, #1d1c1a 0%, #3a3936 55%, #1d1c1a 100%); color: #f4f3ee; border-radius: 20px; padding: 20px 22px; margin-bottom: 16px; box-shadow: 0 12px 30px rgba(29, 28, 26, .18); }
.rc-hero-t { display: flex; gap: 14px; align-items: center; flex: 1 1 320px; }
.rc-hero-i { width: 52px; height: 52px; border-radius: 16px; background: rgba(255, 255, 255, .12); display: grid; place-items: center; flex: none; }
.rc-hero-i svg { width: 26px; height: 26px; }
.rc-hero h2 { margin: 0; font-size: 22px; font-weight: 900; color: #fff; }
.rc-hero p { margin: 2px 0 0; font-size: 13.5px; opacity: .8; }
.rc-hero .rc-range { margin: 0; flex: 0 1 auto; background: transparent; border: 0; padding: 0; }
.rc-hero .rc-range .field { color: #f4f3ee; }
.rc-hero .rc-range .field > span, .rc-hero .rc-range label { color: #f4f3ee; }
.rc-hero .rc-range .input { background: rgba(255, 255, 255, .95); }
.rc-hero .seg { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .2); }
.rc-hero .seg button { color: #f4f3ee; }
.rc-hero .seg button + button { border-color: rgba(255, 255, 255, .2); }
.rc-hero .seg button:hover { background: rgba(255, 255, 255, .12); }
.rc-period { margin: -4px 4px 18px; display: flex; gap: 6px; align-items: center; }
.rc-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.rc-kpi { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px 12px; box-shadow: var(--shadow); overflow: hidden; min-width: 0; }
.rc-kpi-top { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; font-weight: 700; }
.rc-kpi-i { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--tone-50); color: var(--tone); }
.rc-kpi-v { font-size: 24px; font-weight: 900; margin: 8px 0 4px; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-kpi-f { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--muted); min-height: 18px; }
.rc-kpi-s { color: var(--muted); }
.rc-spark { position: absolute; inset-inline: 0; bottom: 0; width: 100%; height: 30px; opacity: .9; pointer-events: none; }
.rc-spark .l { fill: none; stroke: var(--tone); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.rc-spark .a { fill: var(--tone-50); stroke: none; }
.rc-kpi:has(.rc-spark) { padding-bottom: 34px; }
.rc-delta { display: inline-flex; gap: 3px; align-items: center; font-weight: 800; padding: 1px 8px; border-radius: 999px; font-size: 12px; }
.rc-delta.up { background: var(--success-50); color: var(--success); }
.rc-delta.down { background: var(--danger-50); color: var(--danger); }
.rc-delta.flat { background: var(--surface-2); color: var(--muted); }
/* the tones of the cards and figures */
.t1 { --tone: var(--primary); --tone-50: var(--primary-50); }
.t2 { --tone: var(--info); --tone-50: var(--info-50); }
.t3 { --tone: #b45309; --tone-50: #fff7ed; }
.t4 { --tone: var(--success); --tone-50: var(--success-50); }
.t5 { --tone: #7c3aed; --tone-50: #f5f3ff; }
.t6 { --tone: var(--danger); --tone-50: var(--danger-50); }
.rc-sec { margin-bottom: 20px; }
.rc-sec > header { display: flex; gap: 10px; align-items: baseline; margin: 0 4px 10px; flex-wrap: wrap; }
.rc-sec > header h3 { margin: 0; font-size: 17px; font-weight: 900; }
.rc-sec > header small { color: var(--muted); }
.rc-sec-i { align-self: center; width: 30px; height: 30px; border-radius: 10px; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; }
.rc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.rc-card { position: relative; display: flex; flex-direction: column; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 16px; text-decoration: none; color: var(--text); box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s, border-color .18s; overflow: hidden; }
.rc-card::before { content: ''; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 4px; background: var(--tone); opacity: .85; }
.rc-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(29, 28, 26, .12); border-color: color-mix(in srgb, var(--tone) 35%, var(--border)); }
.rc-card-i { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--tone-50); color: var(--tone); }
.rc-card-i svg { width: 23px; height: 23px; }
.rc-card-b b { display: block; font-size: 16px; font-weight: 800; margin-bottom: 3px; }
.rc-card-b small { color: var(--muted); font-size: 13px; line-height: 1.5; display: block; }
.rc-card-h { margin-top: auto; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding-top: 10px; border-top: 1px dashed var(--border); font-size: 13px; }
.rc-card-h small { color: var(--muted); }
.rc-card-h b { font-size: 15.5px; font-weight: 800; color: var(--tone); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 65%; }
.rc-card-h.neg b { color: var(--danger); }
.rc-card-go { position: absolute; top: 16px; inset-inline-end: 16px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); transition: background .18s, color .18s, transform .18s; }
.rc-card:hover .rc-card-go { background: var(--tone); color: #fff; transform: translateX(-3px); }
/* one report */
.rc-head { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 14px 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
.rc-back { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--border); display: grid; place-items: center; color: var(--muted); background: var(--surface-2); transition: background .15s, color .15s; }
.rc-back svg { transform: scaleX(-1); }
.rc-back:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.rc-head-i { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; background: var(--tone-50); color: var(--tone); flex: none; }
.rc-head-i svg { width: 25px; height: 25px; }
.rc-head-t { flex: 1 1 260px; min-width: 0; }
.rc-crumb { font-size: 12.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.rc-crumb a { color: var(--info); text-decoration: none; font-weight: 700; }
.rc-head-t h2 { margin: 2px 0; font-size: 20px; font-weight: 900; }
.rc-head-t p { margin: 0; color: var(--muted); font-size: 13px; }
.rc-head-a { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rc-switch { display: flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: 10px; padding: 0 0 0 4px; padding-inline-start: 10px; background: var(--surface); color: var(--muted); }
.rc-switch select { border: 0; background: none; padding: 8px 6px; font: inherit; font-weight: 700; color: var(--text); max-width: 210px; cursor: pointer; }
.rc-range { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px; margin-bottom: 14px; }
.rc-body { display: grid; gap: 0; }
.rc-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); margin-bottom: 14px; min-width: 0; overflow: hidden; }
.rc-panel > header { display: flex; gap: 10px; align-items: center; padding: 14px 16px 6px; }
.rc-panel > header h3 { margin: 0; font-size: 15.5px; font-weight: 800; }
.rc-panel > header small { color: var(--muted); font-size: 12px; }
.rc-panel > header .spacer { flex: 1; }
.rc-panel-i { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); flex: none; }
.rc-panel-b { padding: 8px 16px 16px; }
.rc-grid { display: grid; gap: 14px; }
.rc-grid > .rc-panel, .rc-grid > .rc-stack { margin-bottom: 0; }
.rc-grid { margin-bottom: 14px; }
.rc-grid.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rc-grid.g-12 { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
.rc-stack { display: grid; gap: 14px; }
.rc-stack .rc-panel { margin: 0; }
.rc-none { color: var(--muted); text-align: center; padding: 24px 8px; font-size: 13.5px; }
.rc-note { display: flex; gap: 10px; align-items: flex-start; background: var(--warning-50); border: 1px solid #fde68a; color: #92400e; border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; }
.rc-boxname { margin: 0 4px 12px; font-size: 16px; display: flex; gap: 8px; align-items: center; }
.rc-table .table-wrap { margin: 0 -16px -16px; border-radius: 0; }
.rc-table .table { margin: 0; }
/* columns */
.rc-cols { display: flex; align-items: flex-end; gap: 4px; padding: 22px 2px 0; }
.rc-col { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; cursor: default; }
.rc-col i { display: block; width: 100%; max-width: 46px; border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg, var(--accent), var(--primary)); transition: filter .15s, transform .15s; transform-origin: bottom; animation: rcGrow .5s ease-out; }
.rc-cols.c2 .rc-col i { background: linear-gradient(180deg, #22a3b8, var(--info)); }
.rc-cols.c3 .rc-col i { background: linear-gradient(180deg, #f59e0b, #b45309); }
.rc-cols.c6 .rc-col i { background: linear-gradient(180deg, #f87171, var(--danger)); }
.rc-col.mark i { background: linear-gradient(180deg, #34d399, var(--success)); }
.rc-col:hover i { filter: brightness(1.12); }
.rc-col-v { font-size: 10.5px; font-weight: 800; color: var(--muted); margin-bottom: 3px; white-space: nowrap; }
.rc-col-l { font-size: 11px; color: var(--muted); height: 18px; line-height: 18px; margin-top: 4px; white-space: nowrap; }
@keyframes rcGrow { from { transform: scaleY(0); } }
/* the ring */
.rc-donut { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.rc-donut-g { position: relative; width: 170px; height: 170px; flex: none; }
.rc-donut-g svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.rc-donut-g circle { transition: stroke-width .15s; }
.rc-donut-g circle:hover { stroke-width: 7.5; }
.rc-donut-c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.rc-donut-c b { font-size: 24px; font-weight: 900; line-height: 1; }
.rc-donut-c small { color: var(--muted); }
.rc-legend { list-style: none; margin: 0; padding: 0; flex: 1 1 180px; display: grid; gap: 6px; min-width: 0; }
.rc-legend li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto 52px; gap: 8px; align-items: center; font-size: 13.5px; }
.rc-legend i { width: 12px; height: 12px; border-radius: 4px; }
.rc-legend span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-legend small { color: var(--muted); text-align: end; }
/* horizontal bars */
.rc-hbars { display: grid; gap: 9px; }
.rc-hbar { display: grid; grid-template-columns: minmax(80px, 150px) minmax(0, 1fr) auto 50px; gap: 10px; align-items: center; font-size: 13.5px; }
.rc-hbar-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.rc-hbar-t { height: 12px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.rc-hbar-t i { display: block; height: 100%; border-radius: 999px; animation: rcGrowX .5s ease-out; transform-origin: right; }
@keyframes rcGrowX { from { transform: scaleX(0); } }
.rc-hbar small { color: var(--muted); text-align: end; }
.rc-hbar-x { grid-column: 2 / -1; margin-top: -6px; font-size: 11.5px; color: var(--muted); }
/* the income statement */
.rc-sheet .rc-line { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: baseline; padding: 7px 4px; border-bottom: 1px dashed var(--border); }
.rc-sheet .rc-line small { color: var(--muted); font-size: 11.5px; min-width: 44px; text-align: end; }
.rc-sheet .rc-line b { min-width: 90px; text-align: end; }
.rc-sheet .rc-line.minus { color: #4a4946; }
.rc-sheet .rc-line.sub { background: var(--surface-2); border-radius: 8px; font-weight: 800; border-bottom-color: transparent; margin: 4px 0; padding: 8px 8px; }
.rc-sheet .rc-line.grand { font-size: 18px; font-weight: 900; color: var(--success); border: 2px solid var(--success-50); background: var(--success-50); border-radius: 12px; padding: 12px 10px; margin-top: 10px; }
.rc-sheet .rc-line.grand.neg { color: var(--danger); background: var(--danger-50); border-color: var(--danger-50); }
.rc-sheet h4 { margin: 14px 4px 4px; color: var(--muted); font-size: 13px; }
/* the busy hours */
.rc-heat-wrap { overflow-x: auto; }
.rc-heat { display: grid; gap: 3px; min-width: 520px; }
.rc-heat-h { font-size: 11px; color: var(--muted); text-align: center; }
.rc-heat-d { font-size: 12.5px; font-weight: 700; align-self: center; }
.rc-heat-c { height: 30px; border-radius: 6px; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff;
  background: color-mix(in srgb, var(--primary) calc(var(--v) * 100%), var(--surface-2)); transition: transform .12s; }
.rc-heat-c:hover { transform: scale(1.12); position: relative; z-index: 1; }
.rc-heat-key { display: flex; gap: 4px; align-items: center; justify-content: flex-end; margin-top: 8px; }
.rc-heat-key i { width: 18px; height: 10px; border-radius: 3px; background: var(--primary); }
.rc-heat-key i:nth-child(1) { opacity: .15; } .rc-heat-key i:nth-child(2) { opacity: .35; } .rc-heat-key i:nth-child(3) { opacity: .55; } .rc-heat-key i:nth-child(4) { opacity: .75; }
/* small bits */
.rc-rank { display: inline-grid; place-items: center; min-width: 24px; height: 24px; border-radius: 8px; background: var(--surface-2); font-weight: 800; font-size: 12px; }
.rc-share { height: 4px; background: var(--surface-2); border-radius: 999px; margin-top: 4px; overflow: hidden; min-width: 60px; }
.rc-share i { display: block; height: 100%; background: var(--accent); }
.rc-margin { font-weight: 800; color: var(--success); font-size: 13px; }
.rc-margin.low { color: var(--danger); }
.rc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rc-chip { background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 700; }
.rc-chip small { color: var(--muted); font-weight: 600; }
.rc-print .rc-cols { break-inside: avoid; }
.rc-print .rc-panel { box-shadow: none; break-inside: avoid; border-color: #bbb; }
.rc-print .rc-kpis { grid-template-columns: repeat(4, 1fr); }
.rc-print .rc-spark { display: none; }
@media (max-width: 1100px) { .rc-grid.g-12 { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .rc-grid.g-2 { grid-template-columns: 1fr; }
  .rc-hero { padding: 16px; }
  .rc-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rc-kpi-v { font-size: 19px; }
  .rc-hbar { grid-template-columns: 90px minmax(0, 1fr) auto; }
  .rc-hbar small { display: none; }
  .rc-head-a { width: 100%; }
  .rc-switch { flex: 1; }
  .rc-switch select { max-width: none; width: 100%; }
}

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .pos { grid-template-columns: minmax(0, 1fr) 350px; }
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; width: 250px; transform: translateX(100%); transition: transform .2s; }
  .sidebar.open { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.35); }
  .icon-btn.menu-toggle { display: grid; }
  /* tablets keep the cart beside the menu */
  .pos { grid-template-columns: minmax(0, 1fr) 300px; gap: 10px; }
  .prod-grid { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
  .type-btn { font-size: 12px; padding: 7px 2px; }
  .pos-cart { min-width: 0; }
  .cart-actions { grid-template-columns: 1fr; }
  .cart-actions .btn-lg { order: -1; white-space: normal; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .user-chip .name { display: none; }
  .clock { display: none; }
}
@media (max-width: 640px) {
  .content { padding: 14px 12px; }
  .topbar { padding: 8px 12px; }
  .board { grid-template-columns: 1fr; }
  .pos { grid-template-columns: 1fr; }
  .pos-cart { position: static; max-height: none; order: -1; }
  .cart-lines { max-height: 260px; }
  .form-grid, .kv { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat .value { font-size: 19px; }
  .hbar { grid-template-columns: 90px 1fr auto; }
}

/* ---------- cheques (pages-cheques.js; the leaf's own styles are in CHEQUE_CSS there, shared with its printed page) ---------- */
.cheque-amount { text-align: center; padding: 12px; margin-bottom: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.cheque-amount .big { font-size: 26px; font-weight: 800; }
.cq-infos { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px 16px; margin-bottom: 12px; font-size: 13.5px; }
.cq-info > .muted { font-size: 12px; }
.cheque-preview { overflow: auto; padding: 12px; margin-top: 12px; background: var(--surface-2); border-radius: var(--radius); }
.cheque-preview .cheque-leaf { outline: 1px dashed #94a3b8; margin: 0 auto; box-shadow: var(--shadow); }
.cheque-preview.small-preview { padding: 8px; }
.layout-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 10px; }
.layout-table td { padding: 4px 8px; vertical-align: middle; }
.invoice-picks { display: grid; gap: 6px; max-height: 200px; overflow: auto; padding: 8px; border: 1px solid var(--border); border-radius: 8px; }
.cheque-box { border: 1px dashed var(--primary); border-radius: var(--radius); padding: 10px 12px; background: var(--surface-2); }
.cheque-box-head { font-weight: 800; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; color: var(--primary); }
.cheque-box-head svg { width: 18px; height: 18px; }
.cheque-box [data-cheque-words] { margin-top: 6px; }
.cq-name-en { padding: 8px 2px; display: flex; gap: 6px; align-items: center; }
.cq-name-en svg { width: 16px; height: 16px; color: var(--muted); }
.cq-books { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); gap: 14px; }
.cq-book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.table tr.row-danger td { background: color-mix(in srgb, var(--danger, #dc2626) 6%, transparent); }
.cheque-copy h3 { display: flex; gap: 8px; align-items: center; justify-content: center; }
.cheque-copy h4 { margin: 14px 0 6px; }

/* ---------- the English interface (public/js/i18n.js: the page turns left-to-right) ---------- */
@media (max-width: 960px) {
  html[dir="ltr"] .sidebar { transform: translateX(-100%); }
  html[dir="ltr"] .sidebar.open { transform: none; }
}
html[dir="ltr"] .ag-switch i::after { right: auto; left: 3px; transition: left .2s; }
html[dir="ltr"] .ag-switch input:checked + i::after { left: 22px; }
html[dir="ltr"] .ag-switch.sm input:checked + i::after { left: 20px; }
html[dir="ltr"] .rc-card:hover .rc-card-go { transform: translateX(3px); }
.lang-switch svg, .dropdown-menu [data-act="lang"] svg { width: 16px; height: 16px; }
/* the language button of the top bar: «English» / «العربية» */
.topbar .lang-btn { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; padding-inline: 12px; }
.topbar .lang-btn svg { width: 17px; height: 17px; }
.topbar .lang-btn span { font-family: system-ui, "Segoe UI", Tahoma, sans-serif; }
@media (max-width: 600px) { .topbar .lang-btn span { display: none; } .topbar .lang-btn { padding-inline: 9px; } }

/* ---------- human resources (as in the car wash system: public/js/pages-hr.js) ---------- */
.emp-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; vertical-align: middle; margin-inline-end: 8px; border: 1px solid var(--border); }
.emp-images { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.emp-images > div { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.emp-image-box { width: 100%; height: 150px; border: 1px dashed var(--border); border-radius: var(--radius); background: var(--surface-2); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.emp-image-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.emp-images .btn input[type=file] { display: none; }
.batch-box { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px 4px; margin: 0; }
.batch-box legend { font-weight: 700; padding: 0 6px; color: var(--primary); }
.batch-box .form-grid { margin-top: 8px; }
.batch-total { font-size: 15px; }
.hr-info { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 16px; margin-bottom: 12px; font-size: 13px; }
.salary-slip .table th { width: 55%; }
.salary-slip .hr-info { font-size: 13px; }
.att-off td { opacity: .55; }
