/* Dnairo System — dashboard, auth and shared components.
   Tokens: docs/design/DESIGN_SYSTEM.md. RTL-first: logical properties only. */

/* Cairo @font-face lives in fonts.css (linked before this file). */

:root {
  --brand-500: #7C3AED;
  --brand-600: #6D28D9;
  --brand-700: #5B21B6;   /* hover/pressed shade: darker than 600 (the ramp ran the wrong way) */
  --brand-100: #EADFFF;   /* one value with landing.css and tokens.css */
  --brand-50: #F5F0FF;
  /* Brand shade for small text and small filled badges: 4.5:1 on white and on --page (WCAG AA).
     Big buttons and surfaces keep --brand-500 (DESIGN_SYSTEM §1). Same rule as ThemeColor::ink(). */
  --brand-ink: #6D28D9;
  --brand-gradient: linear-gradient(270deg, #6D28D9, #8B5CF6);

  --ink-900: #121619;
  --ink-800: #181C1F;
  --ink-700: #2A3036;
  --ink-600: #475467;
  --ink-500: #667085;   /* smallest readable grey: hints, captions (4.5:1 on white and --page) */
  --ink-400: #98A2B3;   /* icons, placeholders and borders only — too light for text */
  --line: #E6E9EE;
  --surface: #FFFFFF;
  --surface-2: #FAFCFE;
  --page: #F4F6F8;

  --whatsapp: #0D9641;
  --success: #12A150; --success-bg: #E8F7EC; --success-ink: #0E8040;
  --danger: #E5383B;  --danger-bg: #FDECEC; --danger-ink: #CB3134;   /* *-ink: text on white or on the -bg tint */
  --warning: #F5A524; --warning-bg: #FFF7E0;
  --gold: #FDB653;
  --chart-2: #7C5CFC; --chart-2-bg: #F3E8FF;

  --r-sm: 6px; --r-md: 8px; --r-lg: 12px; --r-xl: 16px; --r-pill: 999px;   /* UI v2: tighter corners, an operations tool not a brochure */
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-md: 0 8px 24px rgba(16, 24, 40, .08);
  --shadow-brand: none;   /* UI v2: no orange glow under buttons and the menu */

  --font: "Cairo", system-ui, "Segoe UI", Tahoma, sans-serif;
  --sidebar-w: 248px;
  /* Dashboard content: never wider than 1440px with its gutters (DESIGN_SYSTEM §3) so tables and
     charts don't stretch on 1920px screens; --gutter is the minimum side padding. */
  --content-max: 1376px;
  --gutter: 32px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-900);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.3; }
h1 { font-size: 24px; font-weight: 800; letter-spacing: -.2px; }
h2 { font-size: 17px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
p { margin: 0; }
a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--color-focus, #6D28D9); outline-offset: 2px; }   /* 3:1 on white (WCAG 1.4.11); the light tint was invisible */
.sidebar :focus-visible { outline-color: #fff; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-600); }
.text-center { text-align: center; }
.small { font-size: 13px; }
.ltr { direction: ltr; unicode-bidi: embed; }

.icon {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}
.icon-lg { width: 24px; height: 24px; }
/* Directional icons flip in RTL (arrows point "forward" = left). */
[dir="rtl"] .icon-dir { transform: scaleX(-1); }

/* ---------- Logo ---------- */
.logo { font-weight: 800; font-size: 24px; letter-spacing: -.5px; direction: ltr; display: inline-flex; color: var(--ink-900); }
.logo span { color: var(--brand-500); }
.logo--light { color: #fff; }
/* DEC-044: the wordmark image (205×78 source, shown near half size for 2× screens). */
.logo img { display: block; height: 38px; width: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px;
  border: 1px solid transparent; border-radius: var(--r-md);
  font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none !important; white-space: nowrap;
  transition: background-color .15s, box-shadow .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }
.btn-primary { background: var(--color-brand-ink, #6D28D9); color: #fff; }   /* UI v2: 5.3:1 white text (WCAG 1.4.3) */
.btn-primary:hover { background: var(--color-brand-strong, #5B21B6); }
.btn-secondary { background: var(--surface); color: var(--ink-900); border-color: #D0D5DD; box-shadow: 0 1px 2px rgba(16, 24, 40, .05); }
.btn-secondary:hover { background: #F9FAFB; border-color: #98A2B3; }
.btn-whatsapp { background: var(--whatsapp); color: #fff; }
.btn-whatsapp:hover { background: #0B7F37; }
.btn-danger { background: var(--danger-ink); color: #fff; }   /* destructive actions: 4.5:1 white text */
.btn-gold { background: var(--gold); color: var(--ink-900); }
.btn-gold:hover { background: #F7A93A; }
.btn-link { background: none; min-height: auto; padding: 0; color: var(--brand-ink); }
.btn-sm { min-height: 32px; padding: 0 12px; font-size: 13px; border-radius: var(--r-md); }
.btn-lg { min-height: 48px; font-size: 15px; }   /* DESIGN_SYSTEM: 48, or 52 in large forms — 56px read as oversized */
.btn-block { width: 100%; }

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; margin-block-end: 16px; align-content: start; }   /* side by side with a taller field (one with a hint), the label and box stay at the top */
.label { font-weight: 700; font-size: 13px; color: var(--ink-700); }
.label .req { color: var(--danger-ink); margin-inline-start: 2px; }
.input, .select, .textarea {
  width: 100%; min-height: 40px; padding: 8px 12px;
  background: var(--surface); border: 1px solid #D0D5DD; border-radius: var(--r-md); box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
  transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 110px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--ink-400); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--brand-ink); box-shadow: 0 0 0 3px var(--brand-100); background: #fff;   /* the darker border is the 3:1 indicator */
}
.input-wrap { position: relative; }
.input-wrap .icon { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-400); pointer-events: none; }
.input-wrap .input { padding-inline-start: 44px; }
/* An LTR input (email) inside the RTL wrap: its inline-start is the left, but the icon sits on the
   right — swap the paddings so long values never run under the icon. */
.input-wrap .input.ltr { padding-inline: 14px 44px; }
.input-wrap--action .input { padding-inline-end: 48px; }
.input-action {
  position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; width: 36px; height: 36px;
  border: 0; border-radius: 10px; background: transparent; color: var(--ink-600); cursor: pointer;
}
.input-action .icon { position: static; transform: none; color: inherit; }
.input-action:hover, .input-action[aria-pressed="true"] { background: var(--page); color: var(--ink-900); }
.input-affix { display: flex; align-items: stretch; direction: ltr; }
.input-affix .affix {
  display: flex; align-items: center; padding: 0 12px; background: var(--page);
  border: 1px solid var(--line); border-inline-end: 0; border-radius: var(--r-md) 0 0 var(--r-md);
  color: var(--ink-600); font-size: 14px; white-space: nowrap;
}
.input-affix .input { border-radius: 0 var(--r-md) var(--r-md) 0; flex: 1 1 auto; min-width: 0; }   /* min-width: inputs never push the page wider on phones */
.hint { font-size: 13px; color: var(--ink-500); line-height: 1.5; }
.field-error { font-size: 13px; color: var(--danger-ink); }
.hint-ok { color: var(--success-ink); }
.has-error .input, .has-error .select, .has-error .textarea { border-color: var(--danger); background: #fff; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.check input { width: 20px; height: 20px; flex: none; accent-color: var(--brand-500); }
/* Native file inputs: the browser's grey button looks out of place next to our fields. */
input[type="file"] { max-width: 100%; font-size: 13px; color: var(--ink-600); }
input[type="file"]::file-selector-button {
  min-height: 38px; margin-inline-end: 10px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  color: var(--ink-900); font: 600 13px var(--font); cursor: pointer;
}
input[type="file"]::file-selector-button:hover { background: var(--page); border-color: var(--ink-400); }

.dropzone {
  display: grid; justify-items: center; gap: 6px; padding: 24px; text-align: center;
  border: 1.5px dashed var(--line); border-radius: var(--r-lg); background: var(--surface-2); color: var(--ink-600);
}
.dropzone .icon { width: 32px; height: 32px; color: var(--brand-500); }

/* Toggle switch */
.switch { position: relative; display: inline-block; width: 42px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track { position: absolute; inset: 0; background: var(--line); border-radius: var(--r-pill); transition: .2s; cursor: pointer; }
.switch .track::after {
  content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 18px; height: 18px;
  background: #fff; border-radius: 50%; box-shadow: var(--shadow-sm); transition: .2s;
}
.switch input:checked + .track { background: var(--brand-500); }
.switch input:checked + .track::after { inset-inline-start: 21px; }
.switch input:focus-visible + .track { box-shadow: 0 0 0 4px var(--brand-50); }

/* ---------- Cards, badges, alerts ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: 20px; }
.card-actions { margin-block-start: 18px; }
.card-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; margin-block-end: 16px; }
.card-header h2 { font-size: 16px; }
.card-header > span.small, .card-header > a.small { white-space: nowrap; }   /* "آخر 30 يوم" stays on one line next to the title; a paragraph (a request's details line) wraps on a phone */
.card-header + .hint { margin-block: -8px 16px; }   /* a card's lead hint sits under its title, apart from the first field */

.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px;
  border-radius: var(--r-sm); font-size: 12px; font-weight: 700; line-height: 1.6; white-space: nowrap;
}
.badge-brand { background: var(--brand-ink); color: #fff; }
.badge-success { background: var(--success-bg); color: var(--success-ink); }
.badge-warning { background: var(--warning-bg); color: #9A6100; }
.badge-danger { background: var(--danger-bg); color: var(--danger-ink); }
.badge-muted { background: var(--page); color: var(--ink-600); }

.alert {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px;
  border: 1px solid transparent; border-inline-start-width: 4px; border-radius: var(--r-md); font-size: 14px; margin-block-end: 16px;
}
.alert .icon { margin-block-start: 2px; }
.alert-success { background: var(--success-bg); color: #0B6B35; border-color: #A6E3BD; border-inline-start-color: var(--success); }
.alert-error { background: var(--danger-bg); color: #A3171A; border-color: #F7C5C6; border-inline-start-color: var(--danger); }
.alert-warning { background: var(--warning-bg); color: #7A4D00; border-color: #F8DFA0; border-inline-start-color: var(--warning); }

/* KPI card (dashboard home) */
.kpi { display: flex; align-items: center; gap: 16px; }
.kpi-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-md); flex: none; }
.kpi-icon .icon { width: 20px; height: 20px; }
.kpi-icon--green { background: var(--success-bg); color: var(--success); }
.kpi-icon--purple { background: var(--chart-2-bg); color: var(--chart-2); }
.kpi-icon--orange { background: var(--brand-100); color: var(--brand-ink); }
.kpi-icon--yellow { background: var(--warning-bg); color: var(--warning); }
.kpi-value { font-size: 26px; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; letter-spacing: -.3px; }
.kpi-label { color: var(--ink-600); font-size: 13px; font-weight: 600; }
/* DEC-158 — «نبض النهارده»: four figures, then the takings hour by hour */
.pulse__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.pulse__kpi { display: grid; gap: 4px; align-content: start; font-size: 14px; }
.pulse__kpi .kpi-value { font-size: 24px; overflow-wrap: anywhere; }
.pulse__gain { color: var(--success-ink); }
.pulse__loss { color: var(--danger-ink); }
.pulse__hours { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(10px, 1fr); align-items: end; gap: 3px; height: 84px; margin: 0; padding: 0; list-style: none; }
.pulse__hours li { display: grid; grid-template-rows: 1fr auto; height: 100%; text-align: center; }
.pulse__bar { align-self: end; height: var(--h, 0%); min-height: 2px; border-radius: 3px 3px 0 0; background: var(--brand-500); }
.pulse__h { font-size: 12px; color: var(--ink-600); }
.kpi-delta { font-size: 12px; color: var(--ink-500); margin-block-start: 4px; }
.kpi-delta b { color: var(--success-ink); font-weight: 700; }

/* Table */
.table-wrap { overflow-x: auto; position: relative; }   /* contains .sr-only (absolute) cells, which would otherwise widen the page on phones */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: start; font-weight: 700; color: var(--ink-600); font-size: 13px; padding: 10px 14px; background: #F8FAFC; border-block-end: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 14px; border-block-end: 1px solid var(--line); vertical-align: middle; font-variant-numeric: tabular-nums; }
.table tbody tr:hover > td { background: #FAFBFC; }
.table tr:last-child td, .table tr:last-child th { border-block-end: 0; }
.thumb { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--page); }

/* Stepper (registration) */
.stepper { display: flex; justify-content: space-between; list-style: none; margin: 0 0 28px; padding: 0; counter-reset: step; }
.stepper li { flex: 1; display: grid; justify-items: center; gap: 6px; position: relative; font-size: 12px; color: var(--ink-500); }
.stepper li::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  border: 1.5px solid var(--line); background: #fff; font-weight: 700; color: var(--ink-600); z-index: 1;
}
.stepper li:not(:last-child)::after { content: ""; position: absolute; top: 16px; inset-inline-start: 50%; width: 100%; height: 1.5px; background: var(--line); }
.stepper li.is-current { color: var(--brand-ink); font-weight: 700; }
.stepper li.is-current::before { background: var(--brand-ink); border-color: var(--brand-ink); color: #fff; }
.stepper li.is-done::before { content: "✓"; background: var(--brand-50); border-color: var(--brand-500); color: var(--brand-ink); }

/* ---------- Dashboard layout ---------- */
.dash { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 4px; padding: 16px 12px;
  background: var(--surface); color: var(--ink-700); border-inline-end: 1px solid var(--line);
}
.sidebar-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 6px 12px; }
.sidebar-head .logo img { width: 96px; height: auto; }
.sidebar .logo { margin: 0; }
.sidebar .sidebar-close { display: none; width: 36px; height: 36px; background: transparent; border-color: var(--line); color: var(--ink-700); }
.sidebar-close:hover { background: var(--page); }
.nav { display: grid; gap: 4px; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 10px;
  border-radius: var(--r-md); color: inherit; font-size: 14px; font-weight: 500; line-height: 1.4; text-decoration: none;   /* one size and weight for every link in the menu */
}
.nav a .icon { width: 18px; height: 18px; color: var(--ink-500); flex: none; }
.nav a:hover { background: #F2F4F7; color: var(--ink-900); }
.nav a.is-active { background: var(--color-brand-50, #F5F0FF); color: var(--brand-ink); font-weight: 500; }   /* told by colour, background and the edge, not a bolder (wider) font */
.nav a.is-active .icon { color: var(--brand-ink); }
.nav a.is-active::before { content: ""; position: absolute; inset-block: 8px; inset-inline-start: -12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand-ink); }
/* DEC-181: the owner's menu in groups that fold — the title is a full-width target, the arrow turns when open. */
.nav--grouped { gap: 2px; }
.nav-group__title {
  display: flex; align-items: center; justify-content: space-between; min-height: 32px; padding: 0 10px; margin-block-start: 10px;
  border-radius: var(--r-md); color: var(--ink-500); font-size: 14px; font-weight: 700; line-height: 1.4; cursor: pointer; list-style: none;   /* the same size as the links; the group is told by weight and colour */
}
.nav-group__title::-webkit-details-marker { display: none; }
.nav-group__title::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .15s; }   /* open: pointing down */
.nav-group:not([open]) .nav-group__title::after { transform: rotate(135deg); }   /* closed: pointing to the start of the line (right to left: left) */
.nav-group__title:hover { color: var(--ink-900); background: #F2F4F7; }
.nav-group__title:focus-visible { outline: 2px solid var(--color-focus, #6D28D9); outline-offset: 2px; }
.nav-group__links { display: grid; gap: 2px; }
.nav--grouped a { min-height: 36px; }
.nav-filter { padding-block-end: 4px; }
.nav-filter .input.input-sm { width: 100%; max-width: none; min-height: 36px; background: var(--page); border-color: var(--line); color: var(--ink-900); box-shadow: none; font-size: 14px; }   /* the whole width of the menu (.input-sm alone caps it at 90px) */
.nav-filter .input::placeholder { color: var(--ink-500); }
.nav-filter p { margin: 8px 10px 0; color: var(--ink-500); }
.sidebar-card { margin-block-start: auto; display: grid; gap: 8px; padding: 14px; border: 1px solid #F8DFA0; border-radius: var(--r-lg); background: #FFFBEB; color: var(--ink-700); text-align: center; }
.sidebar-card .icon { justify-self: center; width: 28px; height: 28px; color: var(--gold); }
.sidebar-card strong { color: #7A4D00; }
.sidebar-help { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--page); font-size: 12.5px; color: inherit; text-decoration: none; }

.main { min-width: 0; display: flex; flex-direction: column; }
/* One gutter for the top bar, banners and content: at least --gutter, and on wide screens whatever
   centres a --content-max column (percentages resolve against .main's width). */
.topbar, .status-banner, .maintenance-banner, .content { padding-inline: max(var(--gutter), calc((100% - var(--content-max)) / 2)); }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 60px; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(8px); border-block-end: 1px solid var(--line);
}
.topbar-start, .topbar-end { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-who { min-width: 0; }
.topbar-who strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-100); color: var(--brand-ink); font-weight: 800; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-md); border: 1px solid #D0D5DD; background: var(--surface); cursor: pointer; color: var(--ink-700); }
.menu-toggle { display: none; }
/* minmax: wide tables scroll inside .table-wrap instead of widening the page.
   The content box is a size container: page grids below follow the width actually left next to the
   sidebar (697px at 1025px, 984px at 1024px when the sidebar is a drawer), not the window width. */
.content {
  container: content / inline-size;
  padding-block: 20px 48px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-content: start;
}
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; padding-block-end: 4px; }
.page-head p { color: var(--ink-600); margin-block-start: 4px; font-size: 14px; }
/* Dashboard page titles (the marketing site has its own .page-head in site.css): icon, title and
   status badge wrap as one line on phones. */
.content .page-head > div:first-child { min-width: 0; }
.content .page-head h1 { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; }
.content .page-head h1 .icon-brand { margin: 0; vertical-align: 0; }
.content .page-head > .row { flex: none; }
/* Focused flows (choose payment method, payment status): one centred column, header included. */
.page-narrow { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; width: 100%; max-width: 760px; margin-inline: auto; }
.page-narrow .pay-form, .page-narrow .payment-status { max-width: none; }
.status-banner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; padding-block: 12px; font-weight: 600; font-size: 14px; }
.status-banner--pending { background: var(--warning-bg); color: #7A4D00; }
.status-banner--grace { background: var(--danger-bg); color: #A3171A; }
.grid { display: grid; gap: 20px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2, .grid-2-md, .grid-2-lg, .grid-2-xl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--top { align-items: start; }   /* cards keep their own height instead of stretching to the tallest */
/* Fields side by side inside a card: as many 200px+ columns as fit (the card's width, not the page's). */
.grid-fields { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px 16px; }
/* Three short fields (appearance highlights): one row in a wide card, one per line in a narrow one
   (the card is a .cq container) — auto-fit gave an awkward 2 + 1. */
.grid-thirds { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@container (max-width: 419px) { .grid-thirds { grid-template-columns: minmax(0, 1fr); } }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row--between { justify-content: space-between; margin-block-end: 22px; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; align-content: start; }   /* start: a stretched card never spreads its fields apart */
.icon-inline { display: inline-block; vertical-align: middle; margin-inline-end: 6px; }
.list-plain { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.list-plain li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); }
.sidebar-logout { margin: 0; }
.sidebar-logout button { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 10px; border: 0; border-radius: var(--r-md); background: transparent; color: var(--ink-600); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.sidebar-logout button:hover { background: var(--danger-bg); color: var(--danger-ink); }

/* ---------- Auth layout (split screen, login design) ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; background: var(--surface); }
.auth-brand {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  padding: 48px; color: #fff;
  background:
    radial-gradient(120% 80% at 80% 110%, rgba(139, 92, 246, .55), transparent 60%),
    radial-gradient(60% 50% at 10% 0%, rgba(109, 40, 217, .25), transparent 70%),
    var(--ink-900);
}
.auth-brand > * { position: relative; z-index: 1; }
/* Login design: big burger photo at the panel's inner edge, the feature list on the outer half. */
.auth-brand > .auth-brand__photo { position: absolute; z-index: 0; inset-inline-start: 0; bottom: -2%; width: 47%; max-width: 380px; height: auto; -webkit-mask-image: linear-gradient(0deg, #000 70%, transparent 100%); mask-image: linear-gradient(0deg, #000 70%, transparent 100%); }
.auth-brand--photo .auth-features { max-width: 48%; margin-inline-start: auto; }
.auth-brand--photo .auth-features li { flex-direction: row-reverse; justify-content: flex-start; text-align: start; }
.auth-brand--photo .auth-features li > span:last-child { flex: 1; }
.auth-brand--photo .auth-features { margin-block-end: 8%; }
/* Registration design (image 2): welcome, burger photo, feature card. */
.auth-brand--register { justify-content: flex-start; align-items: center; text-align: center; gap: 18px; }
.auth-brand--register .logo { align-self: flex-start; }
.reg-welcome__hello { font-size: 30px; font-weight: 800; margin: 12px 0 0; }
.reg-welcome__name { direction: ltr; font-size: 44px; font-weight: 900; color: var(--brand-500); line-height: 1.15; margin: 0; }
.auth-brand--register h2 { font-size: 26px; }
/* The register brand panel is a sticky 100vh column: the photo takes the height the text and the
   feature card leave, so the card is not cut off on 900px-high laptop screens. */
.reg-photo { width: auto; max-width: 64%; height: clamp(140px, 100vh - 570px, 420px); object-fit: contain; margin: -6px auto -46px; -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 62%, transparent 100%); mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 62%, transparent 100%); }
.auth--register .auth-brand { position: sticky; top: 0; height: 100vh; }
.reg-features { width: 100%; max-width: 360px; padding: 18px; text-align: start; background: rgba(18, 22, 25, .82); border: 1px solid rgba(255, 255, 255, .08); border-radius: 16px; backdrop-filter: blur(6px); }
.reg-features li { font-size: 14px; font-weight: 600; }
.reg-features .kpi-icon { width: 38px; height: 38px; border-radius: 10px; }
.auth-brand h2 { font-size: 36px; font-weight: 800; line-height: 1.35; }
.auth-brand h2 span { color: var(--brand-500); }
.auth-subline { color: rgba(255, 255, 255, .75); margin-block-start: 12px; }
.auth-feature-body { font-size: 13px; color: rgba(255, 255, 255, .7); }
.auth-features { display: grid; gap: 16px; list-style: none; margin: 0; padding: 0; }
.auth-features li { display: flex; align-items: center; gap: 14px; }
.auth-features .kpi-icon { width: 48px; height: 48px; background: rgba(255, 255, 255, .06); color: var(--brand-500); border: 1px solid rgba(255, 255, 255, .08); }
.auth-panel { display: grid; place-items: center; padding: 48px 24px; }
.auth-box { width: 100%; max-width: 460px; }
.auth-box h1 { font-size: clamp(26px, 4.4vw + 10px, 32px); text-align: center; }   /* 26px on a phone, 32px from a tablet */
.auth-box .lead { text-align: center; color: var(--ink-600); margin: 8px 0 28px; }
.auth-foot { text-align: center; margin-block-start: 24px; color: var(--ink-600); }
.auth-demo { margin-block-start: 12px; }   /* DEC-140 */
.auth-foot a { text-decoration: underline; text-underline-offset: 3px; font-weight: 700; }   /* a link inside a sentence must not rely on colour alone (Lighthouse link-in-text-block) */
.divider { display: flex; align-items: center; gap: 12px; color: var(--ink-500); margin: 18px 0; font-size: 14px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- Registration & settings components ---------- */
.auth--register { grid-template-columns: 1.35fr 1fr; }
.auth-box--wide { max-width: 640px; }
/* DEC-035 — short registration steps: one narrow column, big fields, full-width "التالي". */
.auth-box--steps { max-width: 520px; }
.auth-box--steps h1 { font-size: clamp(24px, 3vw + 13px, 28px); text-align: start; }
.auth-box--steps .lead { text-align: start; margin: 6px 0 22px; }
.reg-progress { height: 6px; margin: 0 0 8px; background: var(--page); border-radius: var(--r-pill); overflow: hidden; }
.reg-progress > span { display: block; height: 100%; background: var(--brand-gradient); border-radius: inherit; transition: width .3s; }
.reg-step-of { margin: 0 0 14px; font-size: 13px; font-weight: 700; color: var(--brand-ink); }
.auth-box--steps .stepper { margin-block-end: 22px; }
.auth-box--steps .stepper li span { font-size: 12px; }
.reg-form { display: grid; gap: 16px; }
.reg-form .field { margin: 0; }
.input-lg { min-height: 54px; font-size: 16px; }
.reg-back { justify-self: center; }
/* DEC-116: the 6-digit email code */
.reg-code { text-align: center; font-size: 1.75rem; letter-spacing: .5em; font-variant-numeric: tabular-nums; }
.reg-resend { gap: 8px; text-align: center; }
.type-cards { border: 0; padding: 0; margin: 0; }
.type-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.type-group { margin: 16px 0 8px; color: var(--ink-600); font-size: 13px; font-weight: 700; }   /* DEC-136: restaurants, cafés and the rest */
.type-group:first-of-type { margin-top: 4px; }
.type-card-opt { cursor: pointer; }
.type-card-opt input { position: absolute; opacity: 0; }
.type-card-opt > span { display: grid; justify-items: center; gap: 6px; padding: 14px 6px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--surface); text-align: center; font-size: 13px; transition: border-color .15s, background .15s; }
.type-card-opt > span .icon { color: var(--ink-600); }
.type-card-opt input:checked + span { border-color: var(--brand-500); background: var(--brand-50); color: var(--brand-600); }
.type-card-opt input:checked + span .icon { color: var(--brand-500); }
.type-card-opt input:focus-visible + span { box-shadow: 0 0 0 4px var(--brand-50); }
.link-affix .affix { font-size: 13px; }
.reg-more { border: 1px dashed var(--line); border-radius: var(--r-md); padding: 10px 14px; }
.reg-more > summary { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--brand-ink); list-style: none; }
.reg-more > summary::-webkit-details-marker { display: none; }
.reg-more[open] > summary { margin-block-end: 10px; }
.logo-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.logo-row .label { margin: 0; }
.reg-summary { display: flex; gap: 14px; align-items: flex-start; padding: 6px 16px; border: 1px solid var(--line); border-radius: var(--r-lg); margin-block-end: 14px; }
.reg-summary dl { flex: 1; margin: 0; }
.reg-summary__row { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 0; border-block-end: 1px solid var(--line); }
.reg-summary__row:last-child { border-block-end: 0; }
.reg-summary__row dt { color: var(--ink-600); font-size: 13px; }
.reg-summary__row dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.reg-summary__row a { color: var(--brand-ink); }
.reg-price { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-lg); background: var(--brand-50); margin-block-end: 16px; }
.reg-price p { margin: 4px 0 0; }
@media (max-width: 480px) {
  .type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reg-summary__row { grid-template-columns: 1fr auto; }
  .reg-summary__row dt { grid-column: 1 / -1; }
}
.auth-features--light { margin: 0 0 28px; }
.auth-features--light li { color: var(--ink-900); }
.auth-features--light .kpi-icon { background: var(--brand-50); border-color: var(--brand-100); color: var(--brand-ink); }   /* the dark panel's white-alpha tile vanished on white */
.auth-box .btn-block + .hint { margin-block-start: 10px; }
.text-brand { color: var(--brand-ink); }
.icon-xl { width: 44px; height: 44px; }
.section-title { font-size: 15px; font-weight: 700; margin: 22px 0 12px; }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-block-start: 24px; }
.form-actions > .btn:only-child { margin-inline-start: auto; }

.logo-field { justify-items: center; text-align: center; }
.logo-picker { position: relative; cursor: pointer; }
.logo-picker__img {
  display: grid; place-items: center; width: 112px; height: 112px; border-radius: 50%; overflow: hidden;
  background: var(--ink-900); color: var(--brand-500); border: 3px solid #fff; box-shadow: var(--shadow-md);
}
.logo-picker__img img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.logo-picker__img--sm { width: 72px; height: 72px; }
.logo-picker__cam {
  position: absolute; inset-block-end: 2px; inset-inline-start: 2px; display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); color: var(--ink-900);
}
.logo-picker:focus-within .logo-picker__img { outline: 3px solid var(--brand-100); }

.chip-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-block-end: 18px; }
.chip-option input { position: absolute; opacity: 0; }
.chip-option__box {
  position: relative; display: grid; justify-items: center; gap: 6px; padding: 14px 8px; min-height: 92px;
  border: 1.5px solid var(--line); border-radius: var(--r-lg); background: var(--surface); cursor: pointer;
  font-size: 13px; font-weight: 600; text-align: center; color: var(--ink-700); transition: .15s;
}
.chip-option__box .icon { color: var(--ink-600); }
.chip-option input:checked + .chip-option__box { border-color: var(--brand-500); background: var(--brand-50); color: var(--brand-600); }
.chip-option input:checked + .chip-option__box .icon { color: var(--brand-500); }
.chip-option input:checked + .chip-option__box::after {
  content: "✓"; position: absolute; top: -8px; inset-inline-end: -8px; display: grid; place-items: center;
  width: 22px; height: 22px; border-radius: 50%; background: var(--brand-ink); color: #fff; font-size: 12px;
}
.chip-option input:focus-visible + .chip-option__box { box-shadow: 0 0 0 4px var(--brand-50); }

.plan-card { padding: 24px; border: 1.5px solid var(--brand-500); border-radius: var(--r-lg); background: linear-gradient(180deg, var(--brand-50), #fff 40%); }
.plan-card__head { display: flex; align-items: center; gap: 14px; margin-block-end: 16px; }
.plan-card__price { font-size: 30px; font-weight: 800; color: var(--ink-900); }
.plan-card__price span { font-size: 15px; font-weight: 600; color: var(--ink-600); }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.check-list li { display: flex; align-items: center; gap: 10px; }
.check-list .icon { color: var(--success); }
.plan-note { margin-block-start: 12px; }

.review-block { padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r-lg); margin-block-end: 14px; }
.review-block header { display: flex; align-items: center; justify-content: space-between; margin-block-end: 12px; }
.review-block h2 { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.review-block header a { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; }
.review-block dl, .kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; font-size: 14px; }
.review-block dt, .kv dt { color: var(--ink-600); }
.review-block dd, .kv dd { margin: 0; font-weight: 600; }
.review-grid { display: flex; gap: 18px; align-items: flex-start; }
.review-logo { width: 72px; height: 72px; border-radius: var(--r-md); object-fit: contain; border: 1px solid var(--line); }
.kv { margin-block-end: 20px; }
/* Two key/value groups side by side when the card is wide (admin restaurant details). */
.kv-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 0 40px; }
.kv-cols .section-title { margin-block-start: 0; }

.swatches { display: flex; flex-wrap: wrap; gap: 10px; }   /* 38px dots + 10px gaps: the 7 colours fit one row in a half-width tablet card */
.swatch { position: relative; cursor: pointer; }
.swatch input[type="radio"] { position: absolute; opacity: 0; }
.swatch__dot { display: block; width: 38px; height: 38px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); }
.swatch input:checked + .swatch__dot { outline: 3px solid var(--c); outline-offset: 3px; }
.swatch input:focus-visible + .swatch__dot { box-shadow: 0 0 0 4px var(--brand-50); }
.swatch--custom { display: flex; align-items: center; }
.colour-code { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }   /* DEC-149: a picker and its code side by side */
.colour-code--wide { display: flex; flex-wrap: nowrap; }
.colour-code--wide .input-hex { min-height: 48px; }
.colour-code--wide input[type="color"] { flex: 1 1 auto; min-width: 0; }
.input-hex { width: 8.5em; flex: 0 0 auto; min-height: 42px; padding: 6px 10px; font-family: ui-monospace, Consolas, monospace; letter-spacing: .04em; }
.input-hex[aria-invalid="true"] { border-color: var(--danger); }
.swatch--inline { display: inline-block; vertical-align: middle; cursor: default; }
.swatch--inline .swatch__dot { width: 18px; height: 18px; }
.swatch--custom input[type="color"] { width: 42px; height: 42px; padding: 2px; border: 1px solid var(--line); border-radius: 50%; background: #fff; cursor: pointer; }
.swatch--custom input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.swatch--custom input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 50%; }
.swatch--custom input[type="color"]::-moz-color-swatch { border: 0; border-radius: 50%; }
.swatch--custom input[type="radio"]:checked ~ input[type="color"] { outline: 3px solid var(--brand-500); outline-offset: 2px; }
.theme-preview { background: var(--c); color: var(--c-text); pointer-events: none; }
.cover-preview { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; border-radius: var(--r-md); margin-block-end: 8px; }

.hours-table th { width: 90px; font-weight: 700; color: var(--ink-900); }
.hours-table td { padding: 8px 6px; }
.input-time { min-height: 40px; padding: 6px 10px; direction: ltr; }
.input-time:disabled { opacity: .45; }

.check-dot { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line); flex: none; }
.check-dot--done { background: var(--success); border-color: var(--success); color: #fff; }
.check-dot .icon { width: 14px; height: 14px; }
.list-plain li.is-done { color: var(--ink-600); }
/* DEC-229: «ملفي» in the team app */
.team-file__part > summary { cursor: pointer; font-weight: 700; padding-block: 6px; }
.team-file__rows { gap: 8px; margin-top: 8px; }
.team-file__rows li { flex-wrap: wrap; padding: 10px 12px; }
.team-file__slip { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px 12px; margin: 8px 0 0; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); }
.team-file__slip dt { color: var(--ink-600); font-size: .85rem; }
.team-file__slip dd { margin: 0; font-weight: 700; }

/* ---------- Menu management (D2, D3) ---------- */
.icon-brand { color: var(--brand-500); display: inline-block; vertical-align: -4px; margin-inline-end: 8px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px; }
.toolbar__filters { display: flex; gap: 10px; flex-wrap: wrap; }
.toolbar > .input-wrap { flex: 1 1 240px; max-width: 420px; }   /* admin search: uses the free space instead of a 210px box */
.toolbar__filters .select { width: auto; min-width: 160px; }
.toolbar__filters .input-wrap { min-width: 240px; }
/* D2 panes follow the content width: one column, then categories + items with the phone preview
   under the categories, and the three-pane design (image 5) only when the items table still gets
   ~770px (1920px screens) — at 1440px a third pane squeezed the table to 540px. */
.menu-layout { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "cats" "items" "preview"; gap: 16px; align-items: start; }
.menu-categories { grid-area: cats; }
.menu-items { grid-area: items; }
.menu-preview { grid-area: preview; }
@container content (min-width: 860px) {
  .menu-layout { grid-template-columns: 300px minmax(0, 1fr); grid-template-rows: auto 1fr; grid-template-areas: "cats items" "preview items"; }
}
@container content (min-width: 1300px) {
  .menu-layout { grid-template-columns: 300px minmax(0, 1fr) 300px; grid-template-rows: auto; grid-template-areas: "cats items preview"; }
}
/* Full-width preview on tablets: title and button beside the phone instead of a tall empty card. */
@container content (min-width: 560px) and (max-width: 859px) {
  .menu-preview__body { display: grid; grid-template-columns: minmax(0, 1fr) 264px; grid-template-areas: "head phone" "cta phone"; gap: 8px 32px; }
  .menu-preview__body > .card-header { grid-area: head; align-self: end; margin: 0; }
  .menu-preview__body > .phone-preview { grid-area: phone; }
  .menu-preview__body > .btn { grid-area: cta; align-self: start; justify-self: start; width: auto; }
}
.item-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.item-badges:empty { display: none; }
.menu-categories, .menu-items, .menu-preview { padding: 18px; }

.cat-row { display: flex; align-items: center; gap: 8px; min-height: 60px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--ink-900); text-decoration: none !important; margin-block-end: 8px; }
.cat-row.is-active { border-color: var(--brand-500); background: var(--brand-50); }
.cat-row.is-muted .cat-row__name { color: var(--ink-500); text-decoration: line-through; }
.cat-row__link { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; color: inherit; text-decoration: none !important; }
.cat-row__icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--brand-50); color: var(--brand-ink); flex: none; overflow: hidden; }
.cat-row__icon img { width: 100%; height: 100%; object-fit: cover; }
.cat-row__name { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-row__count { flex: none; min-width: 28px; padding: 2px 8px; border-radius: var(--r-pill); background: var(--page); color: var(--ink-600); font-size: 12px; font-weight: 700; text-align: center; }
.sortable { list-style: none; margin: 0; padding: 0; }
.sortable .is-dragging { opacity: .45; }
.drag-handle { cursor: grab; color: var(--ink-400); letter-spacing: -3px; user-select: none; }
.move-btns { display: inline-flex; flex-direction: column; gap: 2px; }
.move-cell { white-space: nowrap; }
.move-cell .move-btns { flex-direction: row; }
.icon-btn--xs { width: 28px; height: 28px; border-radius: 8px; font-size: 10px; }
.icon-btn--xs .icon { width: 16px; height: 16px; }
/* Touch screens (tablets included): the row menus (⋮, ✎) grow to a 36px target; the stacked ▲▼ pair
   stays 28px so category rows keep room for the name. */
.popover > summary.icon-btn--xs { font-size: 16px; font-weight: 800; }   /* the ⋮ glyph at the 10px ▲▼ size was a speck */
@media (pointer: coarse) { .popover > summary.icon-btn--xs { width: 36px; height: 36px; } }

.popover { position: relative; }
.popover > summary { list-style: none; cursor: pointer; }
/* DEC-181: a folded card (e.g. the books' export for another program) — the summary is the card's title row. */
.details-summary { cursor: pointer; display: flex; align-items: center; min-height: 40px; font-weight: 700; color: var(--brand-ink); }
details[open] > .details-summary { margin-block-end: 12px; }
.popover > summary::-webkit-details-marker { display: none; }
.popover__body {
  position: absolute; z-index: 30; top: calc(100% + 6px); inset-inline-start: 0; width: 280px;
  padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-md);
}
.popover--end .popover__body { inset-inline-start: auto; inset-inline-end: 0; }
.popover__menu { width: 230px; padding: 6px; display: grid; }
.popover__menu a, .popover__menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px;
  background: none; color: var(--ink-900); font-size: 14px; font-weight: 600; text-align: start; cursor: pointer; text-decoration: none !important;
}
.popover__menu a:hover, .popover__menu button:hover { background: var(--page); }
.popover__menu form { margin: 0; }
.text-danger, .btn-danger-link { color: var(--danger-ink) !important; }

.icon-picker { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.icon-picker__opt input { position: absolute; opacity: 0; }
.icon-picker__opt span { display: grid; place-items: center; height: 34px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink-600); cursor: pointer; }
.icon-picker__opt input:checked + span { border-color: var(--brand-500); background: var(--brand-50); color: var(--brand-ink); }
.icon-picker__opt input:focus-visible + span { box-shadow: 0 0 0 3px var(--brand-100); }

.empty-state { display: grid; justify-items: center; gap: 12px; padding: 40px 16px; color: var(--ink-500); text-align: center; }
.items-table td { padding-block: 10px; }
.items-table th, .items-table td { padding-inline: 8px; }
.items-table .item-cell .stack { min-width: 110px; }
.items-table .thumb { width: 48px; height: 48px; }
.items-table th.col-stat { white-space: normal; line-height: 1.3; font-size: 12px; }
.items-table tr.is-muted .item-cell strong { color: var(--ink-500); }
.item-cell { color: inherit; text-decoration: none !important; flex-wrap: nowrap; }
.thumb--empty { display: grid; place-items: center; color: var(--ink-400); }
.clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; max-width: 320px; }
.nowrap { white-space: nowrap; }
.sr-only-th { width: 1px; }
/* Items card on phones (a size container; after the base .items-table rules so it wins): the status switch and the ⋮ menu must stay on screen, so
   the 30-day counters (also in analytics) and the price column give way — the price moves under the
   name — and the ▲▼ pair stacks. Drag-and-drop does not work on touch screens anyway. */
.menu-items { container: items / inline-size; }
.item-cell__price { display: none; font-size: 13px; font-weight: 700; }
@container items (max-width: 519px) {
  .items-table .col-stat, .items-table .col-price { display: none; }
  .item-cell__price { display: block; }
  .items-table th, .items-table td { padding-inline: 4px; }
  .items-table .item-cell { gap: 8px; }
  /* min-width 0: the item column is what the table squeezes; a fixed minimum spilled the text under the switch. */
  .items-table .item-cell .stack { min-width: 0; }
  .items-table .thumb { width: 40px; height: 40px; }
  .items-table .move-cell .drag-handle { display: none; }
  .items-table .move-cell .move-btns { flex-direction: column; }
}

/* Phone preview (D10): the menu is laid out at a real 375px phone width and scaled to the 240px
   screen of the frame (×0.64). At the frame width itself (~240px) the public menu broke the
   restaurant name letter by letter and overlapped the bottom bar labels.
   Own class, not .phone: the marketing site's phone mock-ups (site.css) use .phone and app.css loads there too. */
.phone-preview { position: relative; flex: none; margin: 0 auto; width: 264px; max-width: 100%; height: 528px; padding: 12px; overflow: hidden; border-radius: 36px; background: var(--ink-900); box-shadow: var(--shadow-md); }
.phone-preview iframe {
  position: absolute; top: 12px; inset-inline-start: 12px; width: 375px; height: 788px;
  border: 0; border-radius: 40px; background: #fff;
  transform: scale(.64); transform-origin: top right;   /* RTL: the frame is anchored on its right (inline-start) edge */
}

.grid-item-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
.stack-lg { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-content: start; }
@container content (min-width: 760px) {
  .grid-item-form { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); }
}
/* Tablet portrait: image and status cards side by side under the form, the save buttons below both;
   the square drop zone is capped so it is not a 700px empty box. */
@container content (min-width: 560px) and (max-width: 759px) {
  .grid-item-form > .stack-lg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-item-form > .stack-lg > .stack { grid-column: 1 / -1; }
}
@container content (max-width: 759px) {
  .image-drop { width: 100%; max-width: 320px; margin-inline: auto; }
}
.section-title--first { margin-block-start: 0; }
.image-drop { display: grid; place-items: center; aspect-ratio: 1; border: 1.5px dashed var(--line); border-radius: var(--r-lg); background: var(--surface-2); color: var(--brand-500); cursor: pointer; overflow: hidden; margin-block-end: 8px; }
.image-drop img { width: 100%; height: 100%; object-fit: cover; }
/* The preview wrapper fills the square, so a small upload (e.g. the 400px "sm" variant) covers a wide drop zone. */
.image-drop > [data-image-preview] { display: grid; place-items: center; width: 100%; height: 100%; }
.toggle-row { display: flex; align-items: flex-start; gap: 12px; padding-block: 10px; border-block-end: 1px solid var(--line); }
.toggle-row:last-of-type { border-block-end: 0; }
.addon-rows { display: grid; gap: 8px; margin-block-end: 10px; }
/* DEC-277 */
.notice-row { border: 1px solid var(--line); border-radius: var(--radius, 12px); padding: 10px 12px; }
.notice-row > summary { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.notice-row__thumb { flex: none; width: 72px; height: 36px; border-radius: 6px; object-fit: cover; }
.notice-row__text { flex: 1; min-width: 0; overflow: hidden; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.notice-row[open] .notice-row__text { white-space: normal; overflow-wrap: anywhere; }
.notice-form { margin-block-start: 12px; }
.notice-form__image { display: block; width: 240px; max-width: 100%; height: auto; margin-block-end: 8px; border-radius: 8px; }
.notice-row__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 12px; padding-block-start: 12px; border-block-start: 1px solid var(--line); }
.size-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-block: 10px; }   /* DEC-276 */
.size-presets > span { flex-basis: 100%; }
.addon-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px auto auto; gap: 8px; align-items: center; }
.addon-row .input { min-height: 42px; }
/* Phones: name, price and × on one line, the "متاح" check under them (after the base rule so it wins). */
@container content (max-width: 559px) {
  .addon-row { grid-template-columns: minmax(0, 1fr) 90px auto; row-gap: 4px; }
  .addon-row [data-addon-remove] { grid-row: 1; grid-column: 3; }
  .addon-row .check { grid-row: 2; grid-column: 1 / -1; }
}
/* DEC-283: a store's colour-and-size row — name, price, stock, barcode, SKU, «متاح», ×; on a phone the name and price, then the counts. */
.addon-row--variant { grid-template-columns: minmax(0, 1.3fr) 90px 72px minmax(0, 1fr) minmax(0, 1fr) auto auto; }
@container content (max-width: 759px) {
  .addon-row--variant { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
  .addon-row--variant > input[name$="[name]"], .addon-row--variant > input[data-name="name"] { grid-column: 1 / 3; }
  .addon-row--variant [data-size-remove] { grid-row: 1; grid-column: 3; }
  .addon-row--variant .check { grid-column: 1 / -1; }
}
.variant-maker { display: grid; gap: 8px; padding: 12px; margin-block-end: 12px; border: 1px dashed var(--line); border-radius: var(--r-md); background: var(--surface-2); }
.variant-maker .hint { margin: 0; }
.size-presets[hidden] { display: none; }
.input-affix--end .input { border-radius: var(--r-md) 0 0 var(--r-md); }
.input-affix--end .affix { border-radius: 0 var(--r-md) var(--r-md) 0; border-inline-end: 1px solid var(--line); border-inline-start: 0; }

/* ---------- Share & print (D9) ---------- */
.copy-field { direction: ltr; }
.copy-field .input { border-radius: var(--r-md) 0 0 var(--r-md); }
.copy-field .btn { border-radius: 0 var(--r-md) var(--r-md) 0; box-shadow: none; white-space: nowrap; flex: none; }
.qr-card { text-align: center; }
.qr-box { width: min(280px, 100%); margin: 0 auto 10px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; }
.qr-box svg { width: 100%; height: auto; }
.qr-card .row { justify-content: center; }
/* DEC-304 — «الـ QR الموحد»: the code first on a phone, then the form, then the page's preview; side by side when there is room. */
.links-layout { display: grid; gap: 16px; align-items: start; }
.links-layout > * { min-width: 0; }
.links-form { display: grid; gap: 16px; }
.links-downloads { margin-block-start: 10px; }
.links-qr .copy-field, .links-qr .hint { text-align: start; }
@media (min-width: 1100px) {
  .links-layout { grid-template-columns: minmax(0, 1fr) 320px; grid-template-areas: "form qr" "form preview"; }
  .links-qr { grid-area: qr; }
  .links-form { grid-area: form; }
  .links-preview-card { grid-area: preview; }
}
.links-readonly { margin: 0; display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; font-weight: 600; }
.links-buttons { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 10px 16px; margin-block-start: 12px; }
.links-buttons .icon { width: 18px; height: 18px; color: var(--ink-500); }
.links-looks { border: 0; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 14px 12px; }
.links-look { position: relative; cursor: pointer; display: grid; gap: 8px; justify-items: center; text-align: center; font-size: 13px; font-weight: 600; }
.links-look input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.links-look__card { width: 100%; max-width: 104px; aspect-ratio: 148 / 210; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.links-look--clean .links-look__card { background: linear-gradient(var(--c) 0 20%, #fff 20%); }
.links-look--brand .links-look__card { background: var(--c); border-color: transparent; }
.links-look--dark .links-look__card { background: #121619; border-color: transparent; box-shadow: inset 0 3px 0 var(--c); }
/* the luxury looks: their ground and a double frame in their metal */
.links-look:is(.links-look--gold, .links-look--emerald, .links-look--navy, .links-look--marble, .links-look--burgundy, .links-look--rose, .links-look--sand, .links-look--mono) .links-look__card { border: 1.5px solid var(--lux-line, #D4B260); box-shadow: inset 0 0 0 3px var(--lux-bg), inset 0 0 0 4px var(--lux-line, #D4B260); background: radial-gradient(circle at 50% 22%, var(--lux-glow), var(--lux-bg) 75%); }
.links-look--gold { --lux-bg: #0C0C0D; --lux-glow: #2E2920; }
.links-look--emerald { --lux-bg: #06291F; --lux-glow: #12573F; }
.links-look--navy { --lux-bg: #0A1628; --lux-glow: #1B3866; }
.links-look--marble { --lux-bg: #FAF8F4; --lux-glow: #FFFFFF; }
.links-look--burgundy { --lux-bg: #3A0D17; --lux-glow: #6E2536; }
.links-look--rose { --lux-bg: #FBF1EE; --lux-glow: #FFFFFF; --lux-line: #C98D7A; }
.links-look--sand { --lux-bg: #EFE6D8; --lux-glow: #F8F3EA; --lux-line: #A47C52; }
.links-look--mono { --lux-bg: #FFFFFF; --lux-glow: #FFFFFF; --lux-line: #121619; }
.links-look__qr { width: 48%; aspect-ratio: 1; border: 4px solid #fff; border-radius: 6px; background: repeating-conic-gradient(#121619 0 25%, #fff 0 50%) 0 0 / 8px 8px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); }
.links-look input:checked + .links-look__card { outline: 3px solid var(--brand-500); outline-offset: 3px; }
.links-look input:focus-visible + .links-look__card { outline: 3px solid var(--color-focus); outline-offset: 3px; }
.icon-flip { transform: rotate(180deg); }
.print-body { background: #fff; }
.print-toolbar { display: flex; gap: 10px; justify-content: center; padding: 16px; }
.poster { width: 105mm; min-height: 148mm; margin: 0 auto 24px; padding: 10mm 8mm; border: 2px solid var(--c); border-radius: 6mm; display: grid; justify-items: center; align-content: start; gap: 4mm; text-align: center; background: #fff; }
.poster__head { display: grid; justify-items: center; gap: 2mm; }
.poster__head img { width: 20mm; height: 20mm; object-fit: contain; }
.poster__head h1 { font-size: 20pt; }
.poster__head p { color: var(--ink-600); }
.poster__head .poster__branch { padding: 1mm 4mm; border: 1.5px solid var(--c); border-radius: 99px; color: var(--ink-900); font-weight: 700; }   /* DEC-040: which branch this table belongs to */
.poster__qr { width: 62mm; }
.poster__qr svg { width: 100%; height: auto; }
.poster__cta { font-size: 15pt; font-weight: 800; color: var(--c); }
.poster__sub { color: var(--ink-600); }
.poster__url { font-size: 9pt; color: var(--ink-500); }
.poster { page: poster; }
@page poster { size: A6; margin: 0; }
@page { size: A4; margin: 14mm; }
@media print {
  .no-print { display: none !important; }
  .poster { margin: 0; border: 0; }
  .receipt { box-shadow: none; border: 0; padding: 0; }
}
/* DEC-193: a dashboard page printed (or saved as PDF) is its content only — no menu, bar, banners or buttons — under a
   head with the restaurant, the page and when it was printed; cards become plain boxes that do not split. */
.print-only { display: none; }
@media print {
  body { background: #fff !important; }
  .dash { display: block !important; }
  .sidebar, .sidebar-backdrop, .topbar, .status-banner, .demo-banner, .maintenance-banner, .flash, .alert, .tour, .btn, .pf-tabs, .books-period { display: none !important; }
  .print-only { display: block !important; }
  .content { padding: 0 !important; margin: 0 !important; max-width: none !important; }
  .card { box-shadow: none !important; border: 1px solid #d0d5dd !important; break-inside: avoid; }
  .grid { display: block !important; }
  .grid > * { margin-bottom: 10px; }
  .table-wrap { overflow: visible !important; }
  .table th, .table td { padding: 4px 8px !important; font-size: 11px !important; }
  a { color: inherit !important; text-decoration: none !important; }
  .print-head { display: flex !important; justify-content: space-between; align-items: baseline; border-bottom: 2px solid #101828; padding-bottom: 6px; margin-bottom: 12px; font-size: 12px; }
  .print-head strong { font-size: 16px; }
}
/* DEC-194: «مكتب المحاسب» — actions, the month in six figures, then two columns of cards; nothing stacked full width */
.desk-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.desk-action { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 14px; border-radius: var(--r-md); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-900); font-weight: 700; text-decoration: none; }
.desk-action:hover { box-shadow: inset 0 0 0 2px var(--brand-500); }
.desk-action .icon { width: 22px; height: 22px; color: var(--brand-600, #6D28D9); flex: 0 0 auto; }
.desk-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
@media (max-width: 900px) { .desk-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .desk-kpis { grid-template-columns: minmax(0, 1fr); } }
.desk-kpi { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: var(--r-lg, 14px); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.desk-kpi--accent { box-shadow: inset 0 0 0 2px var(--brand-100, #ffe1d2); background: var(--brand-50, #fff6f1); }
.desk-kpi__label { color: var(--ink-600); font-size: 13px; font-weight: 600; }
.desk-kpi__value { font-size: 22px; font-variant-numeric: tabular-nums; }
.desk-kpi__sub { font-size: 12px; color: var(--ink-500); }
.desk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
@media (max-width: 900px) { .desk-grid { grid-template-columns: minmax(0, 1fr); } }
.desk-card .card-header h2 { display: flex; align-items: center; gap: 8px; font-size: 17px; }
.desk-card .card-header h2 .icon { width: 20px; height: 20px; color: var(--brand-600, #6D28D9); }
.desk-list { list-style: none; margin: 0; padding: 0; }
.desk-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.desk-list li:last-child { border-bottom: 0; }
.desk-list__total { font-weight: 800; }
.desk-tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.desk-task a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-md); background: var(--page, #f5f7f9); color: var(--ink-900); text-decoration: none; font-weight: 600; }
.desk-task a:hover { box-shadow: inset 0 0 0 1px var(--brand-500); }
.desk-task__dot { flex: 0 0 10px; height: 10px; border-radius: 50%; background: var(--ink-400, #98a2b3); }
.desk-task--danger .desk-task__dot { background: var(--danger-600, #b42318); }
.desk-task--warning .desk-task__dot { background: var(--warning-600, #b54708); }
.desk-task--info .desk-task__dot { background: var(--info-600, #1570ef); }
.desk-task__go { margin-inline-start: auto; width: 18px; height: 18px; color: var(--ink-400, #98a2b3); }
.desk-clear { display: flex; align-items: center; gap: 8px; color: var(--success-700, #027a48); font-weight: 600; }
.desk-due { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
@media (max-width: 600px) { .desk-due { grid-template-columns: minmax(0, 1fr); } }
.desk-due__head { font-weight: 800; margin: 0 0 4px; }
/* DEC-195: the desk reworked — head with the period, the payment form, alert card, tasks with their weight, bars */
.desk-head { align-items: center; }
.desk-head .row { gap: 10px; align-items: center; flex-wrap: wrap; }
.desk-kpi--alert { box-shadow: inset 0 0 0 2px var(--danger-200, #fecdca); background: var(--danger-50, #fef3f2); }
.desk-pay { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; align-items: end; padding-top: 12px; }
.desk-pay__note { grid-column: span 2; }
@media (max-width: 600px) { .desk-pay__note { grid-column: auto; } }
.desk-task__level { flex: 0 0 auto; min-width: 64px; text-align: center; padding: 3px 8px; border-radius: var(--r-pill); font-size: 12px; font-weight: 800; background: var(--ink-100, #f2f4f7); color: var(--ink-700); }
.desk-task--danger .desk-task__level { background: var(--danger-50, #fef3f2); color: var(--danger-700, #b42318); }
.desk-task--warning .desk-task__level { background: var(--warning-50, #fffaeb); color: var(--warning-700, #b54708); }
.desk-task--info .desk-task__level { background: var(--info-50, #eff8ff); color: var(--info-700, #175cd3); }
.desk-task__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.desk-task__text strong { font-size: 14px; }
.desk-legend { display: inline-flex; align-items: center; gap: 6px; }
.desk-legend__in, .desk-legend__out { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--brand-500, #7C3AED); }
.desk-legend__out { background: var(--ink-300, #d0d5dd); margin-inline-start: 8px; }
.desk-bars { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; align-items: end; height: 170px; padding-top: 8px; }
.desk-bars__month { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.desk-bars__pair { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 4px; }
.desk-bars__in, .desk-bars__out { width: 38%; min-height: 2px; border-radius: 4px 4px 0 0; background: var(--brand-500, #7C3AED); }
.desk-bars__out { background: var(--ink-300, #d0d5dd); }
.badge-danger { background: var(--danger-50, #fef3f2); color: var(--danger-700, #b42318); }
/* DEC-193: a receipt or payment voucher, A5 */
.voucher { max-width: 148mm; margin: 24px auto; padding: 18px 22px; border: 2px solid var(--ink-900, #101828); border-radius: 8px; background: #fff; }
.voucher__head { text-align: center; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 12px; }
.voucher__head h1 { font-size: 22px; margin: 6px 0; }
.voucher__meta { display: flex; justify-content: space-between; font-size: 13px; }
.voucher__rows { display: grid; grid-template-columns: max-content 1fr; gap: 10px 16px; margin: 0; font-size: 15px; }
.voucher__rows dt { color: var(--ink-600); }
.voucher__rows dd { margin: 0; border-bottom: 1px dotted var(--line); }
.voucher__signs { display: flex; justify-content: space-between; gap: 24px; margin-top: 36px; font-size: 13px; }
.voucher__signs div { flex: 1; text-align: center; }
.voucher__signs span { display: block; border-top: 1px solid var(--ink-900, #101828); margin-top: 34px; }
@page voucher { size: A5; margin: 10mm; }
.voucher { page: voucher; }
/* DEC-196: the CSV / PDF buttons over a table, and what is set aside when one table is printed */
.table-export { display: flex; justify-content: flex-end; gap: 6px; margin: 4px 0 6px; }
@media print { .print-hide { display: none !important; } }
.books-period { align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 14px; }
.books-period .input-sm { width: 170px; max-width: 100%; min-height: 36px; }
.books-amount { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.books-amount--neg { color: var(--danger-600, #b42318); }

/* Responsive grids use minmax(0, 1fr), never 1fr: a plain 1fr track grows to its widest child
   (a table), which widens the whole page on phones instead of letting .table-wrap scroll. */
/* ---------- Analytics (D1, D5, D6) ---------- */
.grid-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.period-tabs { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; background: #EEF1F4; border: 0; border-radius: var(--r-md); }
.period-tabs a { padding: 5px 12px; border-radius: 6px; color: var(--ink-600); font-size: 13px; font-weight: 700; text-decoration: none; }
.period-tabs a:hover { color: var(--ink-900); }
.period-tabs a[aria-current="page"] { background: var(--surface); color: var(--ink-900); box-shadow: 0 1px 3px rgba(16, 24, 40, .12); }
/* DEC-181: on a touch screen a tab is a finger's height (40px), not the 28–32px a mouse is fine with. */
@media (pointer: coarse) {
  .period-tabs a, .pf-tabs a { display: inline-flex; align-items: center; min-height: 40px; }
}
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart-grid { stroke: var(--line); stroke-width: 1; }
.chart-axis { font: 11px var(--font); fill: var(--ink-500); }   /* labels are text: --ink-400 is icons-only (DESIGN_SYSTEM §1) */
/* SvgChart draws in a 640-unit viewBox, so axis labels scale with the card: 11 units are 5px in a
   300px card and 16px in a 900px one. .chart-box (a size container around each chart) resizes the
   labels in viewBox units so they render at roughly 10–13px at every width. */
.chart-box { container-type: inline-size; }
@container (min-width: 820px) { .chart .chart-axis { font-size: 11px; } }
@container (max-width: 560px) { .chart .chart-axis { font-size: 14px; } }
@container (max-width: 440px) { .chart .chart-axis { font-size: 17px; } }
@container (max-width: 340px) { .chart .chart-axis { font-size: 21px; } }
.chart-donut { width: 150px; height: 150px; flex: none; }
.chart-donut__total { font: 800 22px var(--font); fill: var(--ink-900); }
.legend { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-600); }
.legend i, .donut-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.legend i:not(:first-child) { margin-inline-start: 8px; }
.donut-wrap { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: center; }
.donut-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; flex: 1; min-width: 140px; font-size: 13px; }
.donut-legend li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.hbars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; font-size: 14px; }
.hbars__track { grid-column: 1 / -1; grid-row: 2; height: 8px; background: var(--page); border-radius: var(--r-pill); overflow: hidden; }
.hbars__track > span { display: block; height: 100%; background: var(--brand-gradient); border-radius: inherit; }
.hbars__value { font-weight: 700; }
.split-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.split-list li { display: grid; grid-template-columns: 90px minmax(0, 1fr) 44px; align-items: center; gap: 10px; font-size: 14px; }
.split-list .hbars__track { grid-column: auto; grid-row: auto; }
.split-list b { text-align: end; }
.kpi-icon--sm { width: 32px; height: 32px; border-radius: var(--r-sm); }
.kpi-icon--sm .icon { width: 16px; height: 16px; }
.event-cell { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
/* Interactions table in a phone-width wrapper (.cq): source and device give way so the event, item and
   time fit without sideways scrolling. */
@container (max-width: 479px) {
  .activity-table .col-source, .activity-table .col-device { display: none; }
  .activity-table th, .activity-table td { padding-inline: 4px; }
  .activity-table .event-cell { gap: 8px; }
}
.delta-up { color: var(--success-ink) !important; }
.delta-down { color: var(--danger-ink) !important; }
.delta-flat { color: var(--ink-600) !important; }
.share-mini { display: grid; gap: 12px; align-content: start; }
.share-mini__body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
/* Full-width share card on tablets: QR beside the link and buttons. */
@container content (min-width: 560px) and (max-width: 899px) {
  .share-mini__body { grid-template-columns: 148px minmax(0, 1fr); align-items: center; column-gap: 24px; }
  .share-mini__body > .share-mini__qr { grid-row: span 2; }
  .share-mini__body > .share-mini__url { text-align: start; align-self: end; }
  .share-mini__body > .stack { align-self: start; }
}
.share-mini__qr { width: 148px; height: 148px; justify-self: center; padding: 8px; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; }
.shortcuts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.shortcuts a { display: grid; justify-items: center; gap: 8px; padding: 16px 8px; border: 1px solid var(--line); border-radius: var(--r-md); text-align: center; font-size: 14px; font-weight: 600; color: var(--ink-800); text-decoration: none; }
.shortcuts a:hover { border-color: var(--brand-500); background: var(--brand-50); }
.setup-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 24px; }
.setup-steps li { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.setup-steps li.is-done { color: var(--ink-500); text-decoration: line-through; }
.conversion { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.conversion__value { font-size: 40px; font-weight: 800; color: var(--brand-500); }
.pager { display: flex; justify-content: center; align-items: center; gap: 12px; padding-block-start: 16px; }
.col-stat { text-align: center; color: var(--ink-600); }

/* ---------- Setup guide (DEC-036) ---------- */
.setup-guide { border: 1.5px solid var(--brand-100); background: linear-gradient(180deg, var(--brand-50), var(--surface) 70%); }
.setup-guide__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.setup-guide__head h2 { font-size: 20px; }
.setup-guide__head p { margin: 4px 0 0; }
.setup-guide__count { font-weight: 800; color: var(--brand-ink); white-space: nowrap; }
.setup-guide__bar { height: 8px; margin: 14px 0 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill); overflow: hidden; }
.setup-guide__bar > span { display: block; height: 100%; background: var(--brand-gradient); }
.setup-guide__steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.setup-guide__steps li { display: grid; grid-template-rows: auto 1fr auto; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.setup-guide__steps li.is-next { border-color: var(--brand-500); box-shadow: 0 8px 20px rgba(124, 58, 237, .12); }
.setup-guide__steps li.is-done { opacity: .7; }
.setup-guide__steps li.is-done strong { text-decoration: line-through; }
.setup-guide__num { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--page); color: var(--ink-600); }
.setup-guide__steps li.is-next .setup-guide__num { background: var(--brand-ink); color: #fff; }
.setup-guide__steps li.is-done .setup-guide__num { background: var(--success-bg); color: var(--success); }
.setup-guide__text { display: grid; gap: 2px; }
.setup-guide__steps .btn { justify-self: start; }
@container content (max-width: 1039px) { .setup-guide__steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container content (max-width: 539px) { .setup-guide__steps { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Admin (X1–X7) ---------- */
.state-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-block-end: 8px; }
.state-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-md); text-decoration: none; color: var(--ink-900); }
.state-chip:hover { border-color: var(--brand-500); }
.admin-actions { display: grid; gap: 10px; align-content: start; }
.admin-actions details > summary { list-style: none; cursor: pointer; }
.admin-actions details > summary::-webkit-details-marker { display: none; }
.admin-actions details[open] { padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
.admin-actions details[open] > summary { margin-block-end: 12px; }
.danger-zone[open] { border-color: var(--danger) !important; background: var(--danger-bg) !important; }
.audit-details { display: block; min-width: 220px; max-width: 360px; white-space: pre-wrap; word-break: break-all; font-size: 12px; color: var(--ink-600); }   /* min-width: on phones the table scrolls instead of breaking the JSON one character per line */
.input-date { width: auto; display: inline-block; }
.maintenance-banner { background: var(--warning-bg); color: var(--ink-800); padding-block: 10px; font-size: 14px; border-block-end: 1px solid var(--warning); }

/* ---------- Billing (B1–B5) ---------- */
.method-list { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; }
.method-option { display: block; cursor: pointer; }
.method-option input { position: absolute; opacity: 0; pointer-events: none; }
.method-option__box { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--surface); transition: border-color .15s, background .15s; }
.method-option__box > span:last-child { display: grid; gap: 2px; }
.method-option input:checked + .method-option__box { border-color: var(--brand-500); background: var(--brand-50); }
.method-option input:focus-visible + .method-option__box { outline: 3px solid rgba(124, 58, 237, .35); outline-offset: 2px; }

/* Official payment-method marks (DEC-091 follow-up): the gateway's own logos, never redrawn. */
.pay-logo { display: block; flex: none; width: 92px; height: auto; border-radius: 8px; box-shadow: 0 0 0 1px rgba(15, 23, 42, .08); background: #fff; }
.pay-logos-box { display: grid; gap: 8px; padding-top: 4px; }
.pay-logos-box__title { margin: 0; font-size: 13px; font-weight: 700; color: var(--ink-600); }
.pay-logos { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pay-logos .pay-logo { width: 76px; border-radius: 6px; }

.method-option__box { position: relative; }
.method-option__box:hover { border-color: rgba(124, 58, 237, .45); }
.method-option__box::after { content: ""; flex: none; margin-inline-start: auto; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); transition: border-color .15s, background .15s; }
.method-option input:checked + .method-option__box::after { border-color: var(--brand-500); background: radial-gradient(circle, var(--brand-500) 0 5px, transparent 6px); }
.pay-form { max-width: 560px; display: grid; gap: 18px; }
.pay-summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r-md); background: var(--page); }
.pay-summary strong { font-size: 20px; }
.payment-status { max-width: 640px; display: grid; justify-items: center; gap: 14px; text-align: center; padding-block: 32px; }
.payment-status__icon { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-500); }
.payment-status__icon--ok { background: var(--success-bg); color: var(--success); }
.payment-status__icon--bad { background: var(--danger-bg); color: var(--danger); }
.pay-code { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border: 2px dashed var(--brand-500); border-radius: var(--r-md); background: var(--brand-50); }
.pay-code bdi { font: 700 28px/1.2 ui-monospace, Consolas, monospace; letter-spacing: 2px; }
.pay-steps { text-align: start; margin: 0; padding-inline-start: 22px; display: grid; gap: 6px; color: var(--ink-700); }
.spinner { width: 34px; height: 34px; border: 4px solid var(--brand-100); border-top-color: var(--brand-500); border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.receipt { max-width: 760px; margin: 0 auto 32px; padding: 32px; grid-template-columns: minmax(0, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); display: grid; gap: 22px; }
.receipt__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; border-block-end: 2px solid var(--brand-500); padding-block-end: 16px; }
.receipt__meta { text-align: end; }
.receipt__meta h1 { font-size: 24px; }
.receipt__table tfoot th { font-size: 16px; border-block-start: 2px solid var(--line); padding: 12px; text-align: start; }
/* Payment history in a phone-width card (.cq): the method column gives way, the date wraps above the
   time and the cells get tighter, so the status and the receipt button stay on screen without scrolling. */
@container (max-width: 479px) {
  .pay-history .col-method { display: none; }
  .pay-history td.col-date { white-space: normal; }
  .pay-history th, .pay-history td { padding-inline: 4px; }
}

/* ---------- Error page ---------- */
.error-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; text-align: center; }
.error-box { max-width: 480px; display: grid; gap: 14px; justify-items: center; }
.error-code { font-size: 88px; font-weight: 800; line-height: 1; background: var(--brand-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.debug { text-align: start; direction: ltr; font: 12px/1.5 ui-monospace, Consolas, monospace; background: var(--ink-900); color: #F5F7F9; padding: 16px; border-radius: var(--r-md); overflow: auto; max-height: 50vh; width: min(900px, 92vw); }

/* ---------- Responsive ---------- */
/* Page grids answer to the content width (container "content", see .content), so the same rules
   hold with the sidebar open (1025px+) or folded into the drawer (≤1024px). */
@container content (max-width: 1039px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container content (max-width: 759px) {
  .grid-2-md { grid-template-columns: minmax(0, 1fr); }
}
@container content (max-width: 1099px) {
  .grid-2-lg { grid-template-columns: minmax(0, 1fr); }
}
@container content (max-width: 1299px) {
  .grid-2-xl { grid-template-columns: minmax(0, 1fr); }
}
@container content (max-width: 899px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* An odd last card takes the full row instead of leaving a hole. */
  .grid-3 > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .grid-main { grid-template-columns: minmax(0, 1fr); }
}
@container content (max-width: 639px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: minmax(0, 1fr); }
}
/* Content 900–1039px (1024px tablets, 1280px laptops): the four KPI cards stay on one row with a
   smaller icon and padding instead of a 2×2 block of half-empty cards. */
@container content (min-width: 900px) and (max-width: 1039px) {
  .grid-4.grid-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .grid-4.grid-kpis .kpi { gap: 12px; padding: 18px; }
  .grid-4.grid-kpis .kpi-icon { width: 44px; height: 44px; border-radius: var(--r-md); }
  .grid-4.grid-kpis .kpi-icon .icon { width: 22px; height: 22px; }
  .grid-4.grid-kpis .kpi-value { font-size: 24px; }
}
/* Small laptops: a slimmer sidebar and gutter leave ~60px more for tables. */
@media (min-width: 1025px) and (max-width: 1279px) {
  :root { --sidebar-w: 240px; --gutter: 24px; }
}
@media (max-width: 1024px) {
  :root { --gutter: 20px; }
  .dash { grid-template-columns: minmax(0, 1fr); }
  /* Closed drawer is also visibility:hidden so its links can't receive keyboard focus off-screen. */
  .sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; width: min(var(--sidebar-w), 86vw); height: auto; z-index: 40; transform: translateX(100%); visibility: hidden; transition: transform .2s, visibility 0s .2s; }
  .dash.nav-open .sidebar { transform: none; visibility: visible; box-shadow: var(--shadow-md); transition: transform .2s; }
  /* Backdrop behind the open drawer; a click on it closes the drawer (dashboard.js). */
  .dash::after { content: ""; position: fixed; inset: 0; z-index: 39; background: rgba(18, 22, 25, .5); opacity: 0; visibility: hidden; transition: opacity .2s, visibility 0s .2s; }
  .dash.nav-open::after { opacity: 1; visibility: visible; transition: opacity .2s; }
  html:has(.dash.nav-open) { overflow: hidden; }
  .sidebar .sidebar-close { display: grid; }
  .menu-toggle { display: grid; }
  .auth, .auth--register { grid-template-columns: minmax(0, 1fr); }
  .auth-brand { display: none; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .card { padding-inline: 18px; }   /* 24px side padding on a 360px phone left 280px for tables and fields */
  .chip-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .review-block dl, .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .review-block dd, .kv dd { margin-block-end: 8px; }
  .content { padding-block: 20px 40px; gap: 20px; }
  .topbar { min-height: 64px; gap: 10px; }
  .topbar .avatar { width: 40px; height: 40px; }
  h1 { font-size: 24px; }
  .stepper li span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* DEC-036 — item form: rarely-used fields folded */
.more-options { border-block-start: 1px solid var(--line); padding-block-start: 14px; margin-block-start: 6px; }
.more-options > summary { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--brand-ink); list-style: none; }
.more-options > summary::-webkit-details-marker { display: none; }
.more-options[open] > summary { margin-block-end: 14px; }

/* Registration on phones: the brand panel is hidden, so the logo sits above the steps. */
.reg-mobile-logo { display: none; margin-block-end: 18px; }
@media (max-width: 1024px) { .reg-mobile-logo { display: inline-flex; } .auth--register .auth-panel { align-items: start; padding-top: 28px; } }

/* Opening hours in a narrow card (phones): day name on its own line, then from / to / closed — the table
   never widens the page. The hours card is a size container (.cq), so this follows the card width. */
.cq { container-type: inline-size; }
@container (max-width: 479px) {
  .hours-table, .hours-table tbody { display: block; }
  .hours-table tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 6px 8px; align-items: center; padding: 10px 0; border-block-end: 1px solid var(--line); }
  .hours-table th { grid-column: 1 / -1; width: auto; padding: 0; }
  .hours-table td { padding: 0; }
  .input-time { width: 100%; min-width: 0; }
}

/* Phones: filters stack full-width and long values (emails, links) wrap instead of widening the page. */
.kv dd { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .toolbar__filters, .toolbar > .input-wrap { width: 100%; max-width: none; }
  .toolbar__filters > *, .toolbar__filters .select, .toolbar__filters .input-wrap { width: 100%; min-width: 0; }
  .toolbar__filters label { display: grid; gap: 4px; }
  .toolbar__filters .input-date { width: 100%; }
  .page-head > * { min-width: 0; max-width: 100%; }
}

/* LTR values (emails, phones) in RTL key/value lists line up with their Arabic neighbours on the
   right instead of drifting to the far left of the cell. */
.kv dd.ltr { text-align: end; }

/* Restaurant info (D8): with two columns the hours card — which holds the form's save button —
   follows the long info card down the page (72px sticky top bar + 24px). */
@container content (min-width: 1100px) {
  .hours-card { position: sticky; top: 96px; }
}

/* Receipt on phones: smaller frame, the period may wrap. */
@media (max-width: 640px) {
  .print-toolbar { flex-wrap: wrap; padding-inline: 16px; }
  .receipt { margin-inline: 12px; padding: 20px; }
  .receipt__head { flex-wrap: wrap; }
  .receipt__table td.nowrap { white-space: normal; }
}

/* ---------- Auth & registration on tablets (641–1024px) ----------
   The brand panel is hidden below 1024px; a centred white card on the page grey keeps the form
   from floating alone on a blank screen. Phones keep the full-bleed form. */
.auth-mobile-logo { display: none; }
@media (max-width: 1024px) {
  .auth-mobile-logo { display: flex; justify-content: center; margin-block-end: 24px; }
  .auth-mobile-logo .logo { font-size: 26px; }
}
@media (min-width: 641px) and (max-width: 1024px) {
  .auth { background: var(--page); }
  .auth-panel { padding: 56px 32px; }
  .auth-box { padding: 40px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-md); }
  .auth--register .auth-panel { padding-block: 40px; }
}

/* Tablets: the narrow column of a .grid-main (lists, donut, shortcuts) drops under the wide one;
   two of its cards fit side by side there. */
@container content (min-width: 560px) and (max-width: 899px) {
  .grid-main > .stack-lg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Phones: KPI cards two per row, icon above the number — four full-width cards filled the
   whole first screen before any chart. */
@container content (max-width: 639px) {
  .grid-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .grid-kpis > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .grid-kpis .kpi { flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px; }
  .grid-kpis .kpi-icon { width: 40px; height: 40px; border-radius: var(--r-md); }
  .grid-kpis .kpi-icon .icon { width: 22px; height: 22px; }
  .grid-kpis .kpi-value { font-size: 24px; }
  .grid-kpis .kpi-label { font-size: 13px; line-height: 1.4; }
}
/* Phones: the top bar's "مشاهدة المنيو" becomes an icon button (the label stays for screen readers). */
@media (max-width: 480px) {
  .topbar-end .btn { width: 44px; min-height: 44px; padding: 0; }
  .topbar-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  /* DEC-181: the restaurant's name, not a decoration, gets the room — the letter avatar goes and the name may take two lines. */
  .topbar .avatar { display: none; }
  .topbar-who strong { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; font-size: 15px; line-height: 1.3; }
  .topbar-who .small { display: none; }
}

/* DEC-039 — demo dashboard banner (/demo). */
.demo-banner { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; margin: 0; padding: 8px max(var(--gutter), calc((100% - var(--content-max)) / 2)); border-radius: 0; background: var(--brand-50); border-block-end: 1px solid var(--brand-100); color: var(--ink-900); font-weight: 600; font-size: 13.5px; }
.demo-banner span { flex: 1 1 220px; }
/* DEC-224: an admin inside a restaurant's dashboard; DEC-223: the restaurant's login on the admin pages */
.act-as-banner { background: var(--warning-bg); border-color: var(--warning); }
.owner-access > summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; font-weight: 700; font-size: 1.05rem; }
.owner-access > summary::-webkit-details-marker { display: none; }
.owner-access > summary .badge { margin-inline-start: auto; }
.owner-access[open] > summary { margin-bottom: 14px; }
.owner-access-sent { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.owner-access-sent > span { flex: 1 1 220px; }

/* DEC-040 branches / DEC-041 team */
.branch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 20px; }
.branch-card { display: grid; gap: 14px; align-content: start; }
.branch-card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.branch-card__head h2 { font-size: 18px; margin: 0; }
.branch-card .card-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.branch-card .card-actions form { margin: 0; }
.check-row { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 6px 0 16px; }
.branch-prices { display: grid; gap: 10px; }
.branch-price-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px auto; align-items: center; gap: 10px; padding: 10px 0; border-block-end: 1px solid var(--line); }
.branch-price-row:last-child { border-block-end: 0; }
.branch-price-row .input { min-width: 0; }
.team-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.team-member { padding: 14px 0; border-block-end: 1px solid var(--line); }
.team-member:last-child { border-block-end: 0; }
.team-member.is-muted .team-member__main { opacity: .65; }
.team-member__main { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.team-member__main .stack { flex: 1 1 180px; min-width: 0; }
.team-member__main .stack .hint { overflow-wrap: anywhere; }
.team-member details { margin-top: 10px; }
.team-member details form + form { margin-top: 10px; }

/* Admin tables on phones: a 6-column table scrolled sideways with no hint and looked cut off.
   Each row becomes a card and each cell reads "label … value" (labels from dashboard.js). */
@media (max-width: 640px) {
  .table--cards thead { display: none; }
  .table--cards, .table--cards tbody, .table--cards tr, .table--cards td { display: block; width: 100%; }
  .table--cards tr { padding: 4px 12px; margin-block-end: 10px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
  .table--cards td, .table--cards tr:last-child td { padding: 8px 0; border-block-end: 1px dashed var(--line); text-align: left; overflow-wrap: anywhere; white-space: normal; }
  .table--cards tr td:last-child { border-block-end: 0; }
  /* float: right + margin-left, not logical values: the app is dir="rtl", but some cells are .ltr (IP, codes). */
  .table--cards td[data-label]::before { content: attr(data-label); float: right; margin-left: 12px; color: var(--ink-500); font-size: 12px; font-weight: 600; }
  .table--cards td::after { content: ""; display: block; clear: both; }
  .table--cards td[colspan] { text-align: center; }
  .table--cards .audit-details { min-width: 0; max-width: 100%; text-align: start; }
  .table--cards .nowrap { white-space: normal; }
}
.share-branches { margin-block-end: 16px; display: grid; gap: 10px; }
/* The A6 card (105mm ≈ 397px) is wider than a 360px phone: shrink it on screen only, print stays A6. */
@media screen and (max-width: 440px) {
  .poster { width: auto; max-width: calc(100vw - 24px); min-height: 0; padding: 8mm 5mm; }
  .print-toolbar { flex-wrap: wrap; max-width: calc(100vw - 24px); margin-inline: auto; }
}
/* Three small counters (X8) stay on one row on phones instead of three full-height cards. */
@media (max-width: 640px) {
  .stat-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .stat-row > :last-child:nth-child(odd) { grid-column: auto; }
  .stat-row .kpi { flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; text-align: center; }
  .stat-row .kpi-icon { width: 34px; height: 34px; }
  .stat-row .kpi-value { font-size: 22px; }
  .stat-row .kpi-label { font-size: 12px; }
}
/* O-03: admin warning when no support channel is set. */
.alert-card { display: flex; align-items: center; gap: 14px; margin-block-end: 16px; border: 1px solid var(--warning); background: var(--warning-bg); color: #7A4D00; }
.alert-card > div { flex: 1; }
.alert-card p { margin: 2px 0 0; }
@media (max-width: 640px) { .alert-card { flex-wrap: wrap; } .alert-card .btn { width: 100%; } }
/* O-02: account closure request in the owner's settings — quiet until opened. */
.danger-card { border: 1px solid color-mix(in srgb, var(--danger) 35%, var(--line)); }
.danger-card details > summary { list-style: none; cursor: pointer; display: inline-flex; }
.danger-card details > summary::-webkit-details-marker { display: none; }
.danger-card details[open] { padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); }
.danger-card details[open] > summary { margin-block-end: 12px; }
/* U-02: the demo banner took a third of a phone screen; one line there. */
.demo-banner__short { display: none; }
@media (max-width: 640px) {
  .demo-banner { flex-wrap: nowrap; gap: 8px; padding: 8px 10px; font-size: 13px; }
  .demo-banner__long { display: none; }
  .demo-banner .demo-banner__short { display: block; flex: 1 1 auto; min-width: 0; }
  .demo-banner .btn { flex: none; padding-inline: 10px; }
  .demo-banner__copy span { display: none; }   /* DEC-140: the link icon alone keeps the banner one line */
}
/* DEC-215: «شاهد كـ» — the demo as each role; a row of its own, scrolling sideways on a phone. */
.demo-banner .demo-banner__roles { order: 9; flex: 1 1 100%; display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.demo-banner__roles > span { flex: none; color: var(--ink-600); font-weight: 700; }
.demo-banner__roles a { flex: none; display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border: 1px solid var(--brand-100); border-radius: 999px; background: #fff; color: var(--ink-900); font-size: 14px; font-weight: 700; text-decoration: none; }
.demo-banner__roles a:hover { border-color: var(--brand-500); }
.demo-banner__roles a.is-on { background: var(--ink-900); border-color: var(--ink-900); color: #fff; }
@media (max-width: 640px) { .demo-banner { flex-wrap: wrap; } }
/* Form actions: full width on phones, the button's own width from tablet up — a 500–700px orange
   slab under a form read as an oversized button (review 2026-10-17). */
.btn-fit { width: 100%; }
@media (min-width: 640px) { .btn-fit { width: auto; min-width: 200px; justify-self: start; align-self: start; } }
.theme-preview { justify-self: start; min-width: 160px; }
/* Popovers never wider than the screen. */
.popover__body { max-width: calc(100vw - 32px); }
/* Touch: 28px icon buttons and 26px text buttons were below a comfortable tap size. */
@media (max-width: 767px) {
  .icon-btn--xs { width: 36px; height: 36px; }
  .btn-link { min-height: 36px; display: inline-flex; align-items: center; }
}
/* O-01: branch tabs above the period tabs on the statistics pages. */
.stats-filters { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.branch-scope { margin: 0; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--r-md); background: var(--brand-50); color: var(--brand-ink); font-weight: 600; font-size: 14px; }
@media (max-width: 767px) { .stats-filters { align-items: stretch; } }
/* DEC-042 — "continue with Google": white button with Google's mark (their branding), same size as our buttons. */
.btn-google { background: #fff; color: #1f1f1f; border: 1px solid #dadce0; font-weight: 600; }
.btn-google:hover { background: #f8faff; border-color: #c6dafc; }
.btn-google .google-mark { flex: none; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--ink-500); font-size: 13px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.alert-info { background: var(--brand-50); color: var(--ink-800); border: 1px solid var(--brand-100); }
.google-link .btn-google { width: auto; }
/* DEC-050 — coupon box on B2 and the featured-coupon offer on B1 and registration. */
.coupon-box { display: grid; gap: 14px; margin-block-end: 16px; }
.coupon-box__title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 16px; }
.coupon-form { display: grid; gap: 6px; }
.coupon-form__row { display: flex; gap: 8px; }
.coupon-form__row .input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: .04em; }
.coupon-form__row .btn { flex: none; }
.coupon-offer { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border: 1.5px dashed var(--brand-500); border-radius: var(--r-md); background: var(--brand-50); color: var(--ink-800); }
.coupon-offer > div { display: grid; gap: 2px; min-width: 0; }
.coupon-offer strong { color: var(--brand-ink); font-size: 16px; }
.coupon-offer--link { text-decoration: none; }
.coupon-applied { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: var(--r-md); background: var(--success-bg); color: var(--success-ink); }
.coupon-applied__text { flex: 1; min-width: 160px; font-weight: 600; }
.coupon-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: #fff; border: 1px solid currentColor; font-weight: 700; letter-spacing: .04em; }
.pay-summary--lines { display: grid; gap: 8px; }
.pay-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.pay-line--discount { color: var(--success-ink); font-weight: 600; }
.pay-line--total { padding-block-start: 8px; border-block-start: 1px solid var(--line); }
.coupon-code { font-weight: 700; letter-spacing: .04em; }
.text-success { color: var(--success-ink); }
/* DEC-051 — guided tour. The page stays visible through the spotlight; the card follows the element
   on wide screens and becomes a top/bottom sheet on phones. Above the drawer (z-index 40). */
.tour { position: fixed; inset: 0; z-index: 1000; }
.tour--center { background: rgba(18, 22, 25, .6); display: grid; place-items: center; padding: 16px; }
.tour__spot { position: fixed; border-radius: var(--r-md); box-shadow: 0 0 0 9999px rgba(18, 22, 25, .6); outline: 3px solid var(--brand-500); outline-offset: 0; transition: left .2s, top .2s, width .2s, height .2s; pointer-events: none; }
.tour__card { position: fixed; width: min(360px, calc(100vw - 24px)); display: grid; gap: 10px; padding: 18px 18px 16px; border-radius: var(--r-lg); background: var(--surface); color: var(--ink-900); box-shadow: 0 18px 48px rgba(16, 24, 40, .28); }
.tour--center .tour__card { position: relative; width: min(420px, 100%); }
.tour--sheet .tour__card { inset-inline: 12px; width: auto; }
.tour__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tour__count { font-size: 12px; font-weight: 700; color: var(--brand-ink); }
.tour__end { border: 0; background: none; padding: 0 10px; margin: -10px -10px -10px -4px; min-height: var(--target-min); font: inherit; font-size: 13px; color: var(--ink-600); cursor: pointer; text-decoration: underline; }
.tour__title { margin: 0; font-size: 18px; line-height: 1.4; }
.tour__body { margin: 0; color: var(--ink-700, #344054); line-height: 1.7; font-size: 15px; }
.tour__dots { display: flex; gap: 5px; flex-wrap: wrap; }
.tour__dots[hidden] { display: none; }
.tour__dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.tour__dots span.is-on { width: 18px; border-radius: 3px; background: var(--brand-500); }
.tour__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; }
.tour__actions [hidden] { display: none; }
.tour__actions .btn { min-width: 96px; min-height: var(--target-min); }
.tour__actions .tour__skip { min-width: 0; padding: 0 10px; color: var(--ink-600); text-decoration: underline; }
.tour__actions [aria-disabled="true"] { opacity: .55; }
@media (prefers-reduced-motion: reduce) { .tour__spot { transition: none; } }
/* DEC-282 — a step the member does himself: the page stays usable around the spotlight (lighter shade, clicks pass),
   the card says what is still needed, and on a phone with the keyboard up it keeps only its title, line and buttons. */
.tour--live { pointer-events: none; }
.tour--live .tour__card { pointer-events: auto; }
.tour--live .tour__spot { box-shadow: 0 0 0 9999px rgba(18, 22, 25, .35); }
.tour__error, .tour__status { margin: 0; padding: 8px 10px; border-radius: var(--radius-sm); font-size: var(--text-sm); line-height: 1.6; }
.tour__error { background: var(--color-danger-bg); color: var(--color-danger-ink); }
.tour__status { background: var(--color-brand-50); color: var(--color-brand-ink); font-weight: 600; }
.tour__status.is-ok { background: var(--color-success-bg); color: var(--color-success-ink); }
.tour__status.is-nudge { animation: tour-nudge .35s ease; }
.tour__error[hidden], .tour__status[hidden], .tour__extra[hidden] { display: none; }
@keyframes tour-nudge { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@media (prefers-reduced-motion: reduce) { .tour__status.is-nudge { animation: none; outline: 2px solid var(--color-brand-ink); } }
.tour--sheet .tour__card { max-height: calc(100dvh - 24px); overflow-y: auto; }
.tour--tight .tour__card { gap: 6px; padding: 12px 14px; }
.tour--tight .tour__body, .tour--tight .tour__dots, .tour--tight .tour__extra { display: none; }
.tour--tight .tour__title { font-size: 16px; }
.guide-qr { display: grid; justify-items: center; gap: 6px; margin: 0; }
.guide-qr__code { width: min(180px, 60vw); padding: 8px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: #fff; }
.guide-qr__code svg { display: block; width: 100%; height: auto; }
.guide-qr__url { font-size: var(--text-xs); color: var(--color-text-muted); word-break: break-all; text-align: center; }
[data-tour] { scroll-margin-block-start: 84px; }   /* DEC-051: a tour step scrolled to its top stays below the sticky top bar */
.coupon-applies { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 10px; }
.coupon-applies legend { padding: 0; margin-block-end: 8px; }
.coupon-rules { margin: 0; padding-inline-start: 18px; display: grid; gap: 8px; line-height: 1.7; }
.toolbar__filters input[type="search"] { flex: 1 1 240px; width: auto; min-width: 0; }   /* X4 search shares the row with the filters */
/* DEC-053 — "continue where you stopped" on the registration welcome page. */
.reg-resume { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; margin-block-end: 14px; border-radius: var(--r-lg); border: 1.5px solid var(--brand-500); background: var(--brand-50); }
.reg-resume[hidden] { display: none; }
.reg-resume > div { flex: 1 1 180px; min-width: 0; }
.reg-resume p { margin: 2px 0 0; }
/* DEC-053 — setup assistant: the bar above every page, the reminder, and its own page. */
.setup-bar { display: grid; gap: 8px; margin-block-end: 18px; padding: 16px 18px; border: 1.5px solid var(--brand-500); border-radius: var(--r-lg); background: linear-gradient(180deg, var(--brand-50), var(--surface) 70%); box-shadow: var(--shadow-sm); }
.setup-bar--start { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.setup-bar__lead { display: flex; align-items: center; gap: 8px; margin: 0; }
.setup-bar__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.setup-bar__count { font-size: 13px; font-weight: 700; color: var(--brand-ink); }
.setup-bar__later { border: 0; background: none; padding: 6px 4px; min-height: 36px; font: inherit; font-size: 13px; color: var(--ink-600); text-decoration: underline; cursor: pointer; }
.setup-bar__progress, .setup-nag__progress { height: 6px; margin: 0; border-radius: 999px; background: var(--line); overflow: hidden; }
.setup-bar__progress span, .setup-nag__progress span { display: block; height: 100%; border-radius: inherit; background: var(--brand-gradient, var(--brand-500)); }
.setup-bar__title { margin: 4px 0 0; font-size: 18px; }
.setup-bar__body { margin: 0; color: var(--ink-700); line-height: 1.7; }
.setup-bar__hint { margin: 0; display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--brand-ink); }
.setup-bar__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 4px; }
.setup-bar__actions form { margin: 0; }
@media (max-width: 640px) { .setup-bar__actions > * { flex: 1 1 100%; } .setup-bar__actions .btn { width: 100%; } }
.setup-pill { display: inline-flex; align-items: center; gap: 6px; margin-block-end: 14px; padding: 8px 14px; border-radius: 999px; background: var(--brand-50); border: 1px solid var(--brand-100); color: var(--brand-ink); font-weight: 700; font-size: 14px; text-decoration: none; }
.setup-nag { border: 0; border-radius: var(--r-xl); padding: 24px; width: min(420px, calc(100vw - 32px)); text-align: center; display: grid; gap: 12px; box-shadow: 0 24px 60px rgba(16, 24, 40, .3); color: var(--ink-900); }
.setup-nag:not([open]) { display: none; }
.setup-nag::backdrop { background: rgba(18, 22, 25, .6); }
.setup-nag h2 { margin: 0; font-size: 20px; }
.setup-nag p { margin: 0; line-height: 1.7; }
.setup-nag__icon { justify-self: center; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--brand-50); color: var(--brand-500); }
.setup-nag__actions { display: grid; gap: 8px; }
.setup-nag__actions form { margin: 0; display: grid; }
.setup-paths { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.setup-path { display: grid; gap: 10px; align-content: start; }
.setup-path h2 { margin: 0; font-size: 18px; }
.setup-path p { margin: 0; }
.setup-hub__progress { margin-block-end: 16px; }
.setup-next { display: grid; gap: 8px; margin-block-end: 16px; border: 1.5px solid var(--brand-500); }
.setup-next h2, .setup-next p { margin: 0; }
.setup-steps { list-style: none; margin: 0; padding: 8px 18px; display: grid; }
.setup-steps__item { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-block-end: 1px solid var(--line); }
.setup-steps__item:last-child { border-block-end: 0; }
.setup-steps__item a { flex: 1; font-weight: 600; color: inherit; }
.setup-steps__num { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%; border: 1.5px solid var(--line); font-size: 13px; font-weight: 700; }
.setup-steps__item--done .setup-steps__num { background: var(--success); border-color: var(--success); color: #fff; }
.setup-steps__item--current .setup-steps__num { border-color: var(--brand-500); color: var(--brand-500); }
.setup-steps__item--done a, .setup-steps__item--skipped a { color: var(--ink-600); }
/* Phones: the payment methods side by side in one row, smaller text (owner's request 2026-10-18). */
@media (max-width: 640px) {
  .method-list { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
  .method-list > legend { grid-column: 1 / -1; }
  .method-option__box { flex-direction: column; justify-content: flex-start; text-align: center; gap: 6px; padding: 10px 6px; height: 100%; }
  .method-option__box::after { display: none; }
  .method-option__box .pay-logo { width: 100%; max-width: 92px; }
  .method-option__box .kpi-icon { width: 36px; height: 36px; border-radius: 10px; }
  .method-option__box .kpi-icon .icon { width: 18px; height: 18px; }
  .method-option__box > span:last-child { gap: 2px; }
  .method-option__box strong { font-size: 13px; line-height: 1.3; }
  .method-option__box .small { font-size: 12px; line-height: 1.4; }   /* DEC-239: whole, never cut at three lines ("طلب دفع عل…") */
  .method-option { height: 100%; }
}
/* DEC-056 — package choice on the payment page. */
.package-box { display: grid; gap: 10px; margin-block-end: 16px; }
.package-line { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--surface); cursor: pointer; }
.package-line--base { cursor: default; background: var(--surface-2); }
.package-line input { width: 20px; height: 20px; flex: none; accent-color: var(--brand-500); }
.package-line:has(input:checked) { border-color: var(--brand-500); background: var(--brand-50); }
.package-line .kpi-icon { width: 40px; height: 40px; border-radius: 12px; }
.package-line__text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.package-line__price { font-weight: 800; white-space: nowrap; }
@media (max-width: 640px) { .package-line .kpi-icon { display: none; } .package-line { padding: 10px 12px; gap: 10px; } .package-line__text strong { font-size: 14px; } }
/* DEC-057 — menu upload: photos grid, the owner's progress, the uploader banner and team form. */
.upload-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.upload-photos a { display: block; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 3 / 4; background: var(--surface-2); }
.upload-photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.upload-track { list-style: none; margin: 0 0 16px; padding: 14px 18px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.upload-track__step { display: grid; justify-items: center; gap: 6px; text-align: center; font-size: 13px; color: var(--ink-600); }
.upload-track__step.is-done .setup-steps__num { background: var(--success); border-color: var(--success); color: #fff; }
.upload-track__step.is-now { color: var(--brand-ink); font-weight: 700; }
.upload-track__step.is-now .setup-steps__num { background: var(--brand-500); border-color: var(--brand-500); color: #fff; }
.upload-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-inline: 16px; }
.uploader-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.uploader-form .input-sm { width: 90px; display: inline-block; }
/* DEC-058 — the cashier screen: catalog and order side by side on a computer, stacked on a phone. */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .pos { grid-template-columns: minmax(0, 1fr); } }
.pos__catalog { display: grid; gap: 12px; padding: 16px; }
.pos__tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pos__tools .input { flex: 1 1 220px; min-width: 0; }
.pos__cats { display: flex; gap: 6px; flex-wrap: wrap; }
.pos__cats button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; min-height: 36px; }
.pos__cats button.is-on { background: var(--brand-500); border-color: var(--brand-500); color: #fff; }
.pos__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; max-height: calc(100vh - 260px); overflow: auto; padding: 2px; }
.pos__item { display: grid; gap: 4px; align-content: start; text-align: start; padding: 12px; min-height: 76px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--surface); font: inherit; cursor: pointer; }
.pos__item:hover, .pos__item:focus-visible { border-color: var(--brand-500); background: var(--brand-50); }
.pos__item strong { font-size: 14px; line-height: 1.35; }
.pos__item span { font-size: 13px; color: var(--brand-ink); font-weight: 700; }
.pos__item.is-out { opacity: .45; cursor: not-allowed; }
.pos__order { display: grid; gap: 12px; padding: 16px; position: sticky; top: 84px; }
.pos__order-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pos__order-head h2 { margin: 0; font-size: 18px; }
.pos__lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 38vh; overflow: auto; }
.pos__empty { padding: 18px 4px; text-align: center; font-size: 14px; }
.pos__line { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: var(--r-md); background: var(--surface-2); }
.pos__line-name { display: grid; gap: 2px; min-width: 0; }
.pos__line-name strong { font-size: 14px; }
.pos__qty { display: inline-flex; align-items: center; gap: 6px; }
.pos__qty button { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font: inherit; font-size: 18px; cursor: pointer; }
.pos__line-total { font-weight: 700; white-space: nowrap; }
.pos__fields { display: grid; gap: 8px; }
.pos__row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: center; }
.pos__row[hidden] { display: none; }
.pos__seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 4px; border-radius: var(--r-md); background: var(--surface-2); }
.pos__seg label { cursor: pointer; }
.pos__seg input { position: absolute; opacity: 0; pointer-events: none; }
.pos__seg span { display: block; text-align: center; padding: 8px 4px; border-radius: 8px; font-size: 13px; font-weight: 700; }
.pos__seg input:checked + span { background: var(--surface); box-shadow: var(--shadow-sm); color: var(--brand-ink); }
.pos__seg input:focus-visible + span { outline: 2px solid var(--brand-500); }
.pos__change { font-weight: 700; color: var(--success-ink); }
.pos__totals { display: grid; gap: 4px; padding-block-start: 8px; border-block-start: 1px solid var(--line); }
.pos__totals > div { display: flex; justify-content: space-between; }
.pos__grand { font-size: 22px; font-weight: 800; }
.pos__msg { margin: 0; padding: 8px 10px; border-radius: 8px; background: var(--danger-bg); color: var(--danger-ink); font-size: 14px; }
.pos__msg.is-ok { background: var(--success-bg); color: var(--success-ink); }
.pos kbd { font: inherit; font-size: 11px; opacity: .8; border: 1px solid rgba(255, 255, 255, .5); border-radius: 4px; padding: 0 4px; }
.pos__print { position: absolute; width: 0; height: 0; border: 0; visibility: hidden; }
.pos-addons { border: 0; border-radius: var(--r-lg); padding: 20px; width: min(380px, calc(100vw - 32px)); }
.pos-addons::backdrop { background: rgba(18, 22, 25, .55); }
.pos-addons h2 { margin: 0 0 12px; font-size: 18px; }
.pos-addons__list { display: grid; gap: 8px; margin-block-end: 14px; }
.pos-addons__actions { display: flex; gap: 8px; }
/* DEC-059 — the Windows cashier: the whole window, connection state always visible. */
.pos-app-body { margin: 0; min-height: 100vh; background: var(--page); }
.pos-appbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 16px; background: var(--surface); border-block-end: 1px solid var(--line); }
.pos-appbar__logo { display: inline-flex; height: 28px; }
.pos-appbar__logo svg, .pos-appbar__logo img { height: 28px; width: auto; }
.pos-appbar__who { display: grid; line-height: 1.3; }
.pos-appbar__end { display: flex; gap: 8px; margin-inline-start: auto; }
.pos-appbar__end form { margin: 0; }
.pos-net { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-pill); background: var(--success-bg); color: var(--success-ink); font-size: 13px; font-weight: 700; }
.pos-net::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pos-net.is-off { background: var(--warning-bg); color: #9A6100; }
.pos-pending { padding: 4px 10px; border-radius: var(--r-pill); background: var(--brand-50); color: var(--brand-ink); font-size: 13px; font-weight: 700; }
.pos-pending[hidden], .pos-login[hidden] { display: none; }
.pos-login { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 0; padding: 10px 16px; background: var(--danger-bg); color: var(--danger-ink); font-weight: 700; }
.pos-app-main { padding: 12px 16px; }
.pos--app .pos__order { top: 64px; }
.pos--app .pos__grid { max-height: calc(100vh - 210px); }
.pos-download { display: grid; gap: 12px; padding: 20px; margin-block-start: 16px; }
.pos-download__head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pos-download__head > div { flex: 1 1 320px; min-width: 0; }
.pos-download__head h2 { margin: 0 0 4px; font-size: 18px; }
.pos-download__head p { margin: 0; }
.pos-download__icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: var(--r-md); background: var(--brand-50); color: var(--brand-ink); }
.pos-download__steps { margin: 0; padding-inline-start: 20px; display: grid; gap: 4px; font-size: 14px; }
/* DEC-145: the pairing code, read across the counter and typed in the program */
.pos-device-code { margin-block-end: 16px; border: 2px solid var(--brand-500); }
.pos-device-code h2 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 18px; }
.pos-device-code__value { margin: 0; font: 800 clamp(28px, 7vw, 44px)/1.2 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .12em; color: var(--brand-ink); text-align: center; overflow-wrap: anywhere; }
tr.is-void td { opacity: .6; }
/* The cashier's receipt: 80 mm thermal paper. */
.receipt-80 { width: 72mm; margin: 0 auto; padding: 4mm 0; font-size: 12px; line-height: 1.5; color: #000; }
.receipt-80 header { display: grid; gap: 2px; text-align: center; padding-block-end: 6px; border-block-end: 1px dashed #000; }
.receipt-80__name { font-size: 16px; }
.receipt-80__qr { display: grid; justify-items: center; gap: 2px; padding-block: 6px; text-align: center; }
.receipt-80__qr bdi { overflow-wrap: anywhere; }
.receipt-80__title { font-size: 14px; border: 1px solid #000; padding: 2px 4px; }
.receipt-80__tax { border-block-start: 1px dashed #000; padding-block-start: 4px; }
.receipt-80__qr svg { width: 34mm; height: 34mm; }
.receipt-80__void { font-size: 18px; border: 2px solid #000; padding: 2px; }
.receipt-80 table { width: 100%; border-collapse: collapse; margin-block: 6px; }
.receipt-80 td { padding: 3px 0; vertical-align: top; }
.receipt-80 td.num { text-align: left; white-space: nowrap; }
.receipt-80 dl { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; margin: 0; padding-block-start: 6px; border-block-start: 1px dashed #000; }
.receipt-80 dd { margin: 0; text-align: left; }
.receipt-80__total { font-size: 15px; font-weight: 800; }
.receipt-80 footer { margin-block-start: 8px; text-align: center; font-size: 11px; }
@media print { @page { size: 80mm auto; margin: 0; } .print-body:has(.receipt-80) { margin: 0; } }
/* DEC-244: a menu order on paper — the kitchen's ticket (big, no prices), then the cashier's copy; each its own page, so a
   receipt printer cuts between them. Printed from the orders page through a hidden frame (.print-frame). */
.order-slip + .order-slip { margin-block-start: 8mm; }
.order-slip__title { display: inline-flex; align-items: center; gap: 4px; justify-self: center; padding: 1px 10px; border: 2px solid #000; font-size: 14px; }
.order-slip__no { font-size: 30px; line-height: 1.1; }
.order-slip__lines { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; font-size: 16px; }
.order-slip__lines li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px; padding-block-end: 6px; border-block-end: 1px dashed #000; }
.order-slip__lines small { display: block; font-size: 13px; }
.order-slip__qty { font-size: 18px; }
.order-slip__note { margin: 6px 0 0; padding: 4px 6px; border: 1px solid #000; font-weight: 700; overflow-wrap: anywhere; }
.receipt-80 .order-slip__who { grid-template-columns: auto minmax(0, 1fr); padding-block: 6px 0; }
.receipt-80 .order-slip__who dd { text-align: start; overflow-wrap: anywhere; }
@media print { .order-slip { break-after: page; } .order-slip:last-of-type { break-after: auto; } .order-slip + .order-slip { margin-block-start: 0; } }
.print-frame { position: fixed; inset-inline-start: 0; inset-block-end: 0; width: 0; height: 0; border: 0; }

/* DEC-362 — the Bluetooth receipt printer (bt-print.js): its setup dialog (the confirm dialog's look) and the message a print that did
   not go through leaves on screen until answered. */
.bt-dialog .field { margin: 0; }
.bt-dialog__state { margin: 0; padding: var(--space-3); border-radius: var(--radius-md); background: var(--color-surface-sunken); font-weight: 700; overflow-wrap: anywhere; }
.bt-dialog__older { display: grid; gap: var(--space-2); }
.bt-dialog__older summary { cursor: pointer; font-weight: 700; min-height: var(--target-min); display: flex; align-items: center; text-decoration: underline; text-underline-offset: 4px; }
.bt-dialog__older ol { margin: 0; padding-inline-start: var(--space-5); }
.bt-toast { position: fixed; inset-inline: 16px; inset-block-end: 16px; z-index: 1200; display: grid; gap: var(--space-2); max-width: 440px; margin-inline: auto; padding: var(--space-4); border-radius: var(--radius-lg); border: 1px solid var(--color-border); border-inline-start: 4px solid var(--color-danger); background: var(--color-surface); color: var(--color-text); box-shadow: var(--elev-3); }
.bt-toast[hidden] { display: none; }
.bt-toast p { margin: 0; font-weight: 700; }
.bt-toast__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.bt-toast__actions .btn { min-height: var(--target-min); }
@media print { .bt-toast, .bt-dialog { display: none !important; } }
/* DEC-252: delivery by the kilometre on the delivery page */
.per-km { min-width: 0; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
.per-km legend { display: inline-flex; align-items: center; gap: 6px; padding: 0 6px; font-weight: 700; }
.per-km__example { margin: 0; }
@media (max-width: 640px) { .per-km .grid-3 { grid-template-columns: 1fr; } }
/* DEC-250: the order printer program offered to the owner */
.printer-offer { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 16px; border-inline-start: 4px solid var(--brand-600); }
.printer-offer[hidden] { display: none; }
.printer-offer__icon { flex: 0 0 auto; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--brand-50); color: var(--brand-700); }
.printer-offer__body { flex: 1 1 auto; min-width: 0; }
.printer-offer h2 { font-size: 1.05rem; margin: 0; }
.printer-offer p { margin: 0; }
@media (max-width: 560px) { .printer-offer { flex-direction: column; } }
/* DEC-249: how to print at once (the shortcut), folded under the orders */
.print-help { margin-top: 16px; }
.print-help > summary { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 700; list-style: none; }
.print-help > summary::-webkit-details-marker { display: none; }
.print-help[open] > summary { margin-bottom: 12px; }
.print-help ol { padding-inline-start: 20px; margin: 0 0 12px; }
.print-help .hint { margin-top: 8px; }
.pos-void { flex-basis: 100%; }
.pos-void[open] > form { margin-block-start: 8px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); max-width: 280px; }
/* Registration step 4: ready-made categories by group. */
.chip-group-title { font-size: 15px; margin: 18px 0 10px; color: var(--ink-700); }
.chip-group-title:first-of-type { margin-top: 4px; }
/* Menu upload: pick every page at once. */
.upload-drop { display: grid; justify-items: center; gap: 6px; padding: 22px 16px; border: 2px dashed var(--line); border-radius: var(--r-lg); background: var(--surface-2); text-align: center; cursor: pointer; }
.upload-drop:hover, .upload-drop:focus-within { border-color: var(--brand-500); background: var(--brand-50); }
.upload-drop input[type="file"] { max-width: 100%; font-size: 14px; }
/* Cashier: cash received, quick amounts, change; printing controls. */
.pos-cash { display: grid; gap: 8px; padding: 12px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); }
.pos-cash[hidden] { display: none; }
.pos-cash__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.pos-cash__head .label { margin: 0; }
.pos-cash__quick { display: flex; flex-wrap: wrap; gap: 6px; }
.pos-cash__quick:empty { display: none; }
.pos-cash__bill { border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 14px; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; min-height: 36px; }
.pos-cash__bill:hover, .pos-cash__bill:focus-visible { border-color: var(--brand-500); background: var(--brand-50); }
.pos-cash__change { display: block; font-size: 14px; color: var(--ink-500); }
.pos-cash__change.is-change { font-size: 22px; font-weight: 800; color: var(--success-ink); }
.pos-cash__change.is-short { font-size: 18px; font-weight: 800; color: var(--danger-ink); }
.pos__msg-change { display: block; font-size: 22px; font-weight: 800; margin-top: 4px; }
.pos__print-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pos__print-row [hidden] { display: none; }
.pos__autoprint { margin-inline-start: auto; }
/* DEC-063 — cashier controls: shift and branch banners, the manager's PIN, split payment, charges,
   open orders on tables, a copy mark on reprints, report sums and busy hours. */
/* DEC-181 — the cashier as a screen of its own: no dashboard menu or top bar, its own slim header, and the order
   column kept beside the items down to tablet width (it used to fall under them below 1100px). */
.dash--focus { grid-template-columns: minmax(0, 1fr); }
.dash--focus .sidebar, .dash--focus .topbar { display: none; }
.dash--focus .content { padding-block-start: 12px; }
.pos-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.pos-head__title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 20px; }
@media (min-width: 760px) { .dash--focus .pos { grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); } }
.dash--focus .pos__grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); max-height: calc(100vh - 200px); }
.dash--focus .pos__order { top: 12px; }
.pos-start .pos-start__branch { flex: 0 1 220px; }
.pos-more .popover__body { z-index: 40; }
.pos-more > summary { display: inline-flex; align-items: center; gap: 6px; }
.pos-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; }
.pos-banner[hidden] { display: none; }
.pos-banner > span { flex: 1 1 220px; font-weight: 700; }
.pos__tools--links { flex-wrap: wrap; }
.pos__tools--links .badge { margin-inline-start: 2px; }
.select.is-invalid { border-color: var(--danger); }
.pos__totals { margin: 0; }
.pos__totals dt, .pos__totals dd { margin: 0; }
.pos__totals > div[hidden] { display: none; }
.pos-pin { display: grid; gap: 6px; padding: 10px 12px; border-radius: var(--r-md); background: var(--warning-bg); color: #7A4D00; }
.pos-pin[hidden] { display: none; }
.pos-pin .label { display: flex; align-items: center; gap: 6px; margin: 0; color: inherit; }
.pos-split { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 12px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); }
.pos-split[hidden] { display: none; }
.pos-split__part { display: grid; gap: 4px; font-size: 13px; font-weight: 700; }
.pos-split output { grid-column: 1 / -1; }
/* DEC-155 — «كل واحد نصيبه»: a row per person, the share and its way of paying */
.pos-shares { grid-column: 1 / -1; display: grid; gap: 6px; padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
.pos-shares__head { display: flex; gap: 8px; align-items: center; }
.pos-shares__head .input { width: 88px; flex: none; }
.pos-shares__list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.pos-shares__list[hidden] { display: none; }
.pos-shares__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--r-sm); background: var(--surface); }
.pos-shares__who { font-size: 13px; font-weight: 700; min-width: 48px; }
.pos-shares__amount { font-weight: 800; margin-inline-end: auto; }
.pos-shares__ways { display: flex; flex-wrap: wrap; gap: 4px; }
.pos__hint { margin: 0; color: #7A4D00; font-weight: 700; text-align: center; }
.pos__hint[hidden] { display: none; }
.pos__open-head { margin: 0; padding: 8px 10px; border-radius: 8px; background: var(--brand-50); color: var(--brand-ink); font-weight: 800; }
.pos__open-head[hidden] { display: none; }
.pos__line.is-sent { opacity: .7; }
.pos__qty-sent { font-weight: 700; }
.pos__qty .pos__note-btn { font-size: 15px; color: var(--ink-600); }
.pos__stock { font-size: 12px; color: var(--ink-500); }
.pos-tables { width: min(720px, calc(100vw - 32px)); }
.pos-tables__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-block-end: 12px; }
.pos-tables__head h2 { margin: 0; }
.pos-tables__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; max-height: 70vh; overflow: auto; }
/* DEC-228: the captains' orders in the browser cashier */
.pos-waiter__list { display: grid; gap: 10px; max-height: 70vh; overflow: auto; }
.pos-waiter__order { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); }
.pos-waiter__order ul { margin: 0; padding-inline-start: 18px; }
.pos-waiter__order .btn { justify-self: start; }
.pos-table { display: grid; gap: 4px; padding: 12px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--surface); font: inherit; text-align: center; cursor: pointer; color: inherit; }
.pos-table:hover, .pos-table:focus-visible { border-color: var(--brand-500); }
.pos-table.is-busy { border-color: var(--brand-500); background: var(--brand-50); cursor: default; }
.pos-table__main { display: grid; gap: 2px; border: 0; background: none; font: inherit; cursor: pointer; color: inherit; padding: 0; }
.pos-table strong { font-size: 18px; }
.receipt-80__copy { display: block; margin: 4px auto; padding: 0 8px; border: 2px solid #000; font-size: 14px; width: max-content; }
.pos-links { margin-block-end: 12px; flex-wrap: wrap; }
.pos-sums { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; margin: 0; max-width: 480px; }
.pos-sums dt, .pos-sums dd { margin: 0; }
.pos-sums dd { text-align: left; white-space: nowrap; }
.pos-hours { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pos-hours li { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 8px; font-size: 13px; }
.pos-hours__bar { height: 10px; border-radius: 999px; background: var(--surface-2); position: relative; overflow: hidden; }
.pos-hours__bar::after { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: var(--w, 0%); background: var(--brand-500); border-radius: inherit; }
.input.input-sm { padding-block: 6px; max-width: 90px; }
@media (max-width: 560px) { .pos-split { grid-template-columns: minmax(0, 1fr); } }
.pos__row--more:not(:has(> :not([hidden]))) { display: none; }
.pos__row--more > [data-pos-reason]:only-of-type, .pos__row--more > [hidden] + [data-pos-reason] { grid-column: 1 / -1; }
/* DEC-064 — the three tiers: the picker on the payment page, the list on the subscription page. */
.tier-picker { border: 0; padding: 0; margin: 0 0 12px; min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tier-option { cursor: pointer; }
.tier-option input { position: absolute; opacity: 0; pointer-events: none; }
.tier-option__box { display: grid; gap: 4px; height: 100%; padding: 12px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.tier-option__price { font-size: 18px; font-weight: 800; color: var(--ink-900); }
.tier-option input:checked + .tier-option__box { border-color: var(--brand-500); background: var(--brand-50); box-shadow: 0 0 0 2px var(--brand-100); }
.tier-option input:focus-visible + .tier-option__box { outline: 2px solid var(--brand-500); }
.tier-option--hot .tier-option__box strong::after { content: " ★"; color: var(--brand-500); }
.tier-list { display: grid; gap: 10px; }
.tier-row { display: grid; gap: 6px; padding: 12px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.tier-row.is-current { border-color: var(--brand-500); background: var(--brand-50); }
.tier-row__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tier-row__head bdi { font-weight: 800; }
.tier-row .check-list { margin: 0; }
.tier-row .btn { justify-self: start; }
@media (max-width: 560px) { .tier-picker { grid-template-columns: minmax(0, 1fr); } }
/* DEC-065 — menu orders: the inbox cards, the kitchen tickets, the count in the menu. */
.nav-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-inline-start: auto; border-radius: 999px; background: var(--danger, #d92d20); color: #fff; font-size: 12px; font-weight: 800; line-height: 1; }
.nav-count[hidden] { display: none; }
.orders-tabs { margin-block-end: 14px; }
.orders-tabs a { display: inline-flex; align-items: center; gap: 6px; }
.orders-tabs .nav-count { margin: 0; }
.order-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; align-items: start; }
.order-card { display: grid; gap: 10px; padding: 16px; border-inline-start: 4px solid var(--line); }
.order-card--new { border-inline-start-color: var(--warning, #f79009); }
.order-card--accepted, .order-card--preparing { border-inline-start-color: var(--brand-500); }
.order-card--ready { border-inline-start-color: var(--success, #12b76a); }
.order-card--cancelled { opacity: .75; }
.order-card__head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.order-card__no { font-size: 18px; }
.order-card__time { margin-inline-start: auto; }
.order-card__who { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 0; font-size: 14px; }
.order-card__who dt { color: var(--ink-500); }
.order-card__who dd { margin: 0; overflow-wrap: anywhere; }
/* DEC-142: a WhatsApp order to check, who may cancel, and the order's steps */
.order-card__via .icon { width: 14px; height: 14px; }
.order-card__via-hint { margin: 0; }
.order-card__cancel-note { margin: 0; align-self: center; }
.order-card__history { font-size: 13px; }
.order-card__history summary { display: inline-flex; align-items: center; min-height: 36px; color: var(--ink-600); font-weight: 700; cursor: pointer; }
.order-card__history ol { display: grid; gap: 4px; margin: 4px 0 0; padding: 0; list-style: none; }
.order-card__history li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; align-items: baseline; }
.order-card__history li span { overflow-wrap: anywhere; }
.order-card__lines { list-style: none; margin: 0; padding: 8px 0; border-block: 1px dashed var(--line); display: grid; gap: 6px; font-size: 14px; }
.order-card__lines li { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: start; }
.order-card__lines small { display: block; color: var(--ink-500); }
.order-card__qty { font-weight: 800; }
.order-card__note { display: flex; gap: 6px; margin: 0; padding: 8px 10px; border-radius: var(--r-sm); background: var(--warning-bg); font-size: 14px; }
.order-card__total { display: flex; justify-content: space-between; font-weight: 800; }
.order-card__off { display: flex; justify-content: space-between; color: var(--success-ink); font-size: 14px; font-weight: 700; }   /* DEC-068 */
.order-card__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.order-card__actions form { margin: 0; }
.order-card__cancel { flex-basis: 100%; }
.order-card__cancel[open] > form { margin-block-start: 8px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
/* DEC-361: a transfer's screenshot and the restaurant's answer */
.order-card--transfer { border-color: var(--warning); }
.order-card__transfer { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; padding: 10px; border-radius: var(--r-md); background: var(--warning-bg); }
.order-card__proof { flex: none; display: block; width: 72px; height: 120px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); }
.order-card__proof img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.order-card__transfer-body { flex: 1 1 160px; min-width: 0; display: grid; gap: 4px; }
.order-card__transfer-body p { margin: 0; overflow-wrap: anywhere; }
.order-card__transfer-head { font-weight: 800; }
.order-card__transfer-body a { min-height: 44px; display: inline-flex; align-items: center; font-weight: 700; }
.order-card__transfer-actions { flex-basis: 100%; }
[data-orders-sound].is-on { border-color: var(--success, #12b76a); color: var(--success-ink); }
.kitchen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; align-items: start; }
.kitchen-ticket { display: grid; gap: 10px; padding: 16px; border-top: 6px solid var(--brand-500); }
.kitchen-ticket--preparing { border-top-color: var(--warning, #f79009); }
.kitchen-ticket__head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.kitchen-ticket__head strong { font-size: 26px; }
.kitchen-ticket__head bdi { margin-inline-start: auto; font-weight: 700; }
.kitchen-ticket__lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 18px; }
.kitchen-ticket__lines small { display: block; font-size: 14px; color: var(--ink-600); }
.kitchen-ticket__note { margin: 0; color: #9a3412; font-weight: 700; }
.kitchen-ticket form { display: grid; gap: 8px; margin: 0; }
/* DEC-152: how long in the kitchen; red past the restaurant's minutes; «مستعجل» stands out. */
.kitchen-ticket__time { margin-inline-start: auto; font-weight: 700; color: var(--ink-700); }
.kitchen-ticket__time.is-late { color: var(--danger-ink); }
.kitchen-ticket.is-late { border-top-color: var(--danger); box-shadow: 0 0 0 2px var(--danger-bg); }
.kitchen-ticket.is-rush { outline: 3px solid var(--brand-500); outline-offset: -3px; }
.kitchen-ticket__rush { margin: 0; padding: 4px 10px; border-radius: var(--r-pill); background: var(--brand-500); color: #fff; font-weight: 800; justify-self: start; }
.kitchen-sections { margin-bottom: 12px; }
.kitchen-cooks { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
/* DEC-153 — the employee's app, the clocking page and screen, the owner's places */
.team { max-width: 640px; margin: 0 auto; padding-bottom: 24px; }
.team__body { padding: 16px; }
.team__now { border-inline-start: 6px solid var(--warning); }
.team__now.is-in { border-inline-start-color: var(--success); }
.team__state { margin: 0; font-size: 20px; font-weight: 800; }
.team__stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin: 0; }
.team__stats div { padding: 10px; border-radius: var(--r-md); background: var(--page); }
.team__stats dt { font-size: 13px; color: var(--ink-700); }
.team__stats dd { margin: 0; font-size: 20px; font-weight: 800; }
.team-here__status { min-height: 24px; margin: 0; font-weight: 700; color: var(--success-ink); }
.team-here__status.is-bad { color: var(--danger-ink); }
.team-qr { max-width: 260px; margin: 0 auto; }
.team-qr svg { width: 100%; height: auto; display: block; }
.team-metric { display: inline-block; margin-inline-end: 10px; white-space: nowrap; }
.clock-screen-body { margin: 0; min-height: 100vh; display: grid; place-items: center; background: #fff; }
.clock-screen { text-align: center; padding: 24px; }
.clock-screen h1 { margin: 0 0 8px; font-size: 32px; }
.clock-screen__lead { font-size: 22px; font-weight: 700; }
.clock-screen__qr { width: min(70vmin, 520px); margin: 16px auto; }
.clock-screen__qr svg { width: 100%; height: auto; display: block; }
.kitchen-section-form__cats { display: flex; flex-wrap: wrap; gap: 8px 16px; }
/* DEC-152 — «مسببات الحساسية» */
.allergen-group summary { min-height: 40px; display: flex; align-items: center; cursor: pointer; }
.allergen-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.allergen-row { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); display: grid; gap: 6px; }
.allergen-row__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.allergen-has { color: var(--danger-ink); font-weight: 700; font-size: 14px; }
.allergen-may summary { cursor: pointer; color: var(--ink-700); }
.allergen-checks { display: flex; flex-wrap: wrap; gap: 6px 14px; padding-top: 6px; }

/* DEC-069 — the menu's look on the appearance page: radio cards with a small drawing of each choice. */
.look-form { margin-block-start: 20px; }
.look-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.look-option { position: relative; display: grid; justify-items: center; gap: 6px; padding: 10px 8px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--surface); font-size: 13.5px; font-weight: 700; text-align: center; cursor: pointer; }
.look-option input { position: absolute; opacity: 0; }
.look-option:has(input:checked) { border-color: var(--brand-ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-500) 18%, transparent); color: var(--brand-ink); }
.look-option:has(input:focus-visible) { outline: 3px solid var(--brand-ink); outline-offset: 2px; }
fieldset[disabled] .look-option { opacity: .55; cursor: not-allowed; }
.look-option__art { width: 100%; max-width: 72px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: linear-gradient(#F5F7F9 0 0) 8px 8px / 56px 10px no-repeat, linear-gradient(var(--brand-500) 0 0) 8px 24px / 30px 10px no-repeat, #fff; }
.look-option--dark .look-option__art { background-color: #171B20; background-image: linear-gradient(#2F363E 0 0), linear-gradient(var(--brand-500) 0 0); }
.look-option--auto .look-option__art { background: linear-gradient(105deg, #fff 50%, #171B20 50%); }
.look-option--soft .look-option__art { border-radius: 18px; }
.look-option--sharp .look-option__art { border-radius: 2px; }

/* DEC-379: the ways the menu's screen shows the menu, chosen on the share page (look-option's frame, each with its own drawing). */
.tv-styles { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
.tv-art { display: block; width: 100%; max-width: 104px; height: auto; }
.tv-art__screen { fill: #171B20; }
.tv-art__photo { fill: var(--brand-500); opacity: .85; }
.tv-art__ink { fill: #E8ECF0; opacity: .8; }

/* DEC-081 — the menu template picker on the appearance page: one card per template with a small
   sketch of its feel, its name and line, and a preview link (D10 in a new tab). */
.template-form { margin-block-start: 20px; }
.template-form fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.template-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr)); gap: 10px; }   /* two on a phone */
.template-option { position: relative; display: grid; align-content: start; gap: 2px; padding: 10px 10px 2px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.template-option:has(input:checked) { border-color: var(--brand-ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-500) 18%, transparent); }
.template-option:has(input:focus-visible) { outline: 3px solid var(--brand-ink); outline-offset: 2px; }
.template-option__pick { display: grid; gap: 4px; cursor: pointer; }
.template-option__pick input { position: absolute; opacity: 0; }
.template-option.is-locked .template-option__pick { cursor: not-allowed; }
.template-option.is-locked .template-option__art, .template-option.is-locked .template-option__desc { opacity: .6; }
.template-option__name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-block-start: 4px; font-size: 14.5px; font-weight: 700; }
.template-option:has(input:checked) .template-option__name { color: var(--brand-ink); }
.template-option__name .badge .icon { width: 12px; height: 12px; }
.template-option__desc { font-size: 12.5px; line-height: 1.55; color: var(--ink-600); }
.template-option__preview { justify-self: start; min-height: 44px; }   /* a full touch target */
.template-option__art { position: relative; display: block; height: 64px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #F5F7F9; }
.template-option__art i { position: absolute; display: block; }
/* The sketches: i1 = heading, i2 / i3 = two items. Classic first; each template overrides what differs. */
.template-option__art i:nth-child(1) { inset-block-start: 8px; inset-inline-start: 8px; width: 45%; height: 9px; border-radius: 4px; background: var(--brand-500); }
.template-option__art i:nth-child(2), .template-option__art i:nth-child(3) { inset-block-start: 24px; width: calc(50% - 12px); height: 32px; border-radius: 7px; background: #fff; box-shadow: 0 1px 3px rgba(16, 24, 40, .12); }
.template-option__art i:nth-child(2) { inset-inline-start: 8px; }
.template-option__art i:nth-child(3) { inset-inline-end: 8px; }
.template-option--noir .template-option__art { background: #15181C; }
.template-option--noir .template-option__art i:nth-child(1) { inset-inline-start: 35%; width: 30%; height: 2px; }
.template-option--noir .template-option__art i:nth-child(2), .template-option--noir .template-option__art i:nth-child(3) { inset-inline: 10px; width: auto; height: 12px; border-radius: 3px; background: #23282E; box-shadow: none; }
.template-option--noir .template-option__art i:nth-child(2) { inset-block-start: 20px; }
.template-option--noir .template-option__art i:nth-child(3) { inset-block-start: 40px; }
.template-option--paper .template-option__art { background: #F7F1E3; }
.template-option--paper .template-option__art i:nth-child(1) { inset-inline-start: 30%; width: 40%; height: 8px; border-radius: 0; background: #2B2118; }
.template-option--paper .template-option__art i:nth-child(2), .template-option--paper .template-option__art i:nth-child(3) { inset-inline: 10px; width: auto; height: 4px; border-radius: 0; background: radial-gradient(circle, #8A7B66 1px, transparent 1.4px) 0 50% / 5px 4px repeat-x; box-shadow: none; }
.template-option--paper .template-option__art i:nth-child(2) { inset-block-start: 28px; }
.template-option--paper .template-option__art i:nth-child(3) { inset-block-start: 44px; }
.template-option--gallery .template-option__art { background: #fff; }
.template-option--gallery .template-option__art i:nth-child(1) { inset-block: 6px; width: calc(33% - 6px); height: auto; border-radius: 6px; background: linear-gradient(transparent 55%, rgba(0, 0, 0, .55)), var(--brand-500); }
.template-option--gallery .template-option__art i:nth-child(2), .template-option--gallery .template-option__art i:nth-child(3) { inset-block: 6px; width: calc(33% - 6px); height: auto; border-radius: 6px; background: linear-gradient(transparent 55%, rgba(0, 0, 0, .55)), #C9CFD8; box-shadow: none; }
.template-option--gallery .template-option__art i:nth-child(2) { inset-inline-start: 34%; }
.template-option--magazine .template-option__art { background: #FBFAF7; }
.template-option--magazine .template-option__art i:nth-child(1) { width: 60%; height: 14px; border-radius: 2px; background: #121619; }
.template-option--magazine .template-option__art i:nth-child(2) { inset-block-start: 28px; width: 40%; height: 28px; border-radius: 2px; background: color-mix(in srgb, var(--brand-500) 35%, #fff); box-shadow: none; }
.template-option--magazine .template-option__art i:nth-child(3) { inset-block-start: 32px; width: calc(60% - 22px); height: 6px; border-radius: 2px; background: #98A2B3; box-shadow: 0 10px 0 #D0D5DD, 0 20px 0 #D0D5DD; }
.template-option--minimal .template-option__art { background: #fff; }
.template-option--minimal .template-option__art i:nth-child(1) { width: 25%; height: 5px; background: #98A2B3; }
.template-option--minimal .template-option__art i:nth-child(2), .template-option--minimal .template-option__art i:nth-child(3) { inset-inline: 10px; width: auto; height: 14px; border-radius: 0; border-block-end: 1px solid #E4E7EC; background: linear-gradient(#EEF0F3 0 0) 0 0 / 14px 12px no-repeat; box-shadow: none; }
.template-option--minimal .template-option__art i:nth-child(2) { inset-block-start: 22px; }
.template-option--minimal .template-option__art i:nth-child(3) { inset-block-start: 42px; }
.template-option--street .template-option__art { background: var(--brand-500); }
.template-option--street .template-option__art i:nth-child(1) { height: 10px; border-radius: 0; background: #121619; }
.template-option--street .template-option__art i:nth-child(2), .template-option--street .template-option__art i:nth-child(3) { width: calc(50% - 16px); height: 28px; border: 2px solid #121619; border-radius: 2px; box-shadow: 3px 3px 0 #121619; }
.template-option--cafe .template-option__art { background: #F6EEE3; }
.template-option--cafe .template-option__art i:nth-child(1) { inset-inline-start: 30%; width: 40%; border-radius: 99px; background: color-mix(in srgb, var(--brand-500) 45%, #fff); }
.template-option--cafe .template-option__art i:nth-child(2), .template-option--cafe .template-option__art i:nth-child(3) { border-radius: 14px; background: radial-gradient(circle at 50% 40%, #E8D9C4 7px, transparent 7.5px), #fff; box-shadow: 0 4px 10px rgba(120, 80, 40, .12); }
.template-option--oriental .template-option__art { background: radial-gradient(circle, rgba(122, 77, 0, .14) 1.2px, transparent 1.6px) 0 0 / 8px 8px, #EFE3CF; }
.template-option--oriental .template-option__art i:nth-child(1) { inset-inline-start: 30%; width: 40%; height: 7px; border-radius: 2px; background: #7A3E12; }
.template-option--oriental .template-option__art i:nth-child(2), .template-option--oriental .template-option__art i:nth-child(3) { border-radius: 16px 16px 3px 3px; background: #FFF9EF; box-shadow: inset 0 0 0 1.5px #B7895A; }
.template-option--fresh .template-option__art { background: #FFF8EC; }
.template-option--fresh .template-option__art i:nth-child(1) { border-radius: 99px; }
.template-option--fresh .template-option__art i:nth-child(2) { border-radius: 12px; background: #D9F5E6; box-shadow: none; }
.template-option--fresh .template-option__art i:nth-child(3) { border-radius: 12px; background: #FFE1EC; box-shadow: none; }

/* DEC-071 — the customers list. */
.customers-search { flex-wrap: wrap; align-items: center; gap: 8px; }
.customers-search .input { flex: 1 1 220px; max-width: 360px; }
.customers-table td { vertical-align: middle; }
.customers-table form { margin: 0; }
.pager { justify-content: center; gap: 10px; align-items: center; }

/* DEC-072 — the customer asked to use their points. */
.order-card__points { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--surface-2); font-size: 13.5px; }
.order-card__points span { display: inline-flex; align-items: center; gap: 6px; }
.order-card__points form { margin: 0; }
.loyalty-form { margin-block-start: 20px; }

/* DEC-073 — the customers' ratings. */
.reviews-avg { display: flex; align-items: baseline; gap: 6px; margin: 0; font-size: 28px; color: #B54708; }
.reviews-avg b { color: var(--ink-900, #121619); }
.reviews-settings { flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-block-end: 16px; }
.reviews-filter { flex-wrap: wrap; gap: 6px; }
.reviews-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.review { display: grid; gap: 6px; padding: 12px 0; border-block-end: 1px solid var(--line); }
.review:last-child { border-block-end: 0; }
.review.is-muted { opacity: .65; }
.review__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.review__stars { color: #DC6803; font-size: 18px; letter-spacing: 1px; }
.review__comment { margin: 0; white-space: pre-line; }
.review form { margin: 0; }

/* DEC-074 — tables calling, the tables page and the printed cards. */
.calls { display: grid; gap: 8px; margin-block-end: 14px; }
.call { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 14px; border: 2px solid #F79009; border-radius: var(--r-md); background: #FFFAEB; animation: call-pulse 1.6s ease-in-out 3; }
.call--bill { border-color: var(--brand-500); background: #FFF4ED; }
.call strong { flex: 1 1 180px; }
.call form { margin: 0; }
@keyframes call-pulse { 50% { box-shadow: 0 0 0 6px rgba(247, 144, 9, .25); } }
.table-qr-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.table-qr-list li { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.table-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(62mm, 1fr)); gap: 6mm; padding: 6mm; }
.table-card { display: grid; justify-items: center; gap: 2mm; padding: 5mm; border: 1.5px dashed #98A2B3; border-radius: 4mm; text-align: center; break-inside: avoid; }
.table-card__name { margin: 0; font-weight: 800; color: var(--c, #121619); }
.table-card__qr svg { width: 44mm; height: 44mm; }
.table-card__table { margin: 0; font-size: 22px; font-weight: 800; }
.table-card__hint { margin: 0; font-size: 12px; color: #475467; }

/* DEC-076 — item labels in the item form, and the printable menu. */
.tag-picks { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-pick { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer; font-size: 14px; }
.tag-pick:has(input:checked) { border-color: var(--brand-ink); background: var(--brand-50, #FFF4ED); }
.tag-pick input { accent-color: var(--brand-ink); }
.menu-sheet { max-width: 190mm; margin: 0 auto; padding: 10mm; color: #121619; }
.menu-sheet__head { display: flex; align-items: center; gap: 14px; padding-bottom: 6mm; border-bottom: 3px solid var(--c, #121619); }
.menu-sheet__head h1 { margin: 0; font-size: 26px; }
.menu-sheet__head p { margin: 2px 0 0; color: #475467; }
.menu-sheet__head img { border-radius: 50%; }
.menu-sheet__section { margin-top: 7mm; break-inside: avoid-page; }
.menu-sheet__section h2 { margin: 0 0 3mm; color: var(--c, #121619); font-size: 19px; }
.menu-sheet__section ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 3mm; }
.menu-sheet__section li { break-inside: avoid; }
.menu-sheet__section li.is-off { opacity: .5; }
.menu-sheet__section li p { margin: 1mm 0 0; color: #475467; font-size: 13px; }
.menu-sheet__item { display: flex; align-items: baseline; gap: 6px; }
.menu-sheet__dots { flex: 1; border-bottom: 1px dotted #98A2B3; }
.menu-sheet__price { font-weight: 800; white-space: nowrap; }
.menu-sheet__price del { color: #98A2B3; font-weight: 400; }
.menu-sheet__meta { font-size: 12px !important; }
.menu-sheet__foot { margin-top: 8mm; text-align: center; color: #475467; font-size: 12px; }

/* DEC-077 — online payments. */
.pay-balance { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 0; }
.pay-balance dd { margin: 0; font-weight: 700; }
.pay-balance__due { padding-top: 6px; border-top: 1px solid var(--line); font-size: 18px; font-weight: 800; }
.admin-refund { flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.admin-refund form { margin: 0; gap: 6px; }

/* DEC-078 — the extra features card. */
.feature-links { margin-block-end: 18px; }
.feature-links .card-header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; }
.feature-links__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.feature-link { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1.5px solid var(--line); border-radius: var(--r-md); color: inherit; text-decoration: none; }
.feature-link:hover { border-color: var(--brand-ink); }
.feature-link__icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: #FFF4ED; color: var(--brand-ink); }
.feature-link__txt { display: grid; flex: 1; min-width: 0; }
.feature-link__txt small { color: var(--ink-500); font-size: 12.5px; }
.feature-link.is-locked { background: var(--surface-2); }
.feature-link.is-locked .feature-link__icon { background: var(--page); color: var(--ink-500); }
.feature-link .badge .icon { width: 12px; height: 12px; }
/* DEC-079 — the custom domain steps, records and check. */
.domain-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; padding: 0; }
.domain-steps li { display: flex; align-items: center; gap: 8px; flex: 1 1 200px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); font-size: 14px; }
.domain-steps li span { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--page); font-weight: 800; }
.domain-steps li.is-current { border-color: var(--brand-ink); }
.domain-steps li.is-current span { background: var(--brand-ink); color: #fff; }
.dns-table code { padding: 2px 6px; border-radius: 6px; background: var(--page); font-size: 13.5px; user-select: all; }
.dns-table .d-block { display: block; margin-top: 2px; color: var(--ink-500); }
.dns-check { list-style: none; margin: 6px 0 0; padding: 0; font-size: 12.5px; }
.dns-check .is-ok { color: var(--success-ink); }
.dns-check .is-wait { color: #B54708; }
/* DEC-079 — the three ways and the code snippets. */
.domain-ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin-block-end: 16px; }
.domain-way { display: grid; gap: 4px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.domain-way.is-current { border-color: var(--brand-ink); box-shadow: 0 0 0 3px #FFF4ED; }
.domain-way code { justify-self: start; padding: 1px 6px; border-radius: 6px; background: var(--page); }
.code-snippet { margin: 0; padding: 10px 12px; overflow-x: auto; border-radius: var(--r-sm); background: #121619; color: #E4E7EC; font-size: 13px; line-height: 1.6; white-space: pre-wrap; word-break: break-all; }
/* DEC-083 — the domain's automatic set-up, step by step (owner), and its error line (admin). */
.auto-steps { display: grid; gap: 8px; margin: 4px 0 0; padding: 0; list-style: none; }
.auto-steps li { display: flex; align-items: center; gap: 10px; color: var(--ink-500); font-size: 14.5px; }
.auto-steps li > span, .auto-steps li > .icon { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border: 1.5px solid var(--line); border-radius: 50%; font-size: 12.5px; font-weight: 800; }
.auto-steps li > .icon { padding: 4px; border-color: var(--success, #12A150); background: var(--success, #12A150); color: #fff; }
.auto-steps li.is-done { color: var(--ink-700, inherit); }
.auto-steps li.is-current { color: var(--ink); font-weight: 800; }
.auto-steps li.is-current > span { border-color: var(--brand-ink); color: var(--brand-ink); }
.prov-error { display: block; margin-top: 2px; }

/* DEC-064 — registration step 5: the three tiers, each with what it has; the owner picks one. */
.reg-tiers { margin: 4px 0 18px; padding: 0; border: 0; }
.reg-tiers > .label { margin-block-end: 4px; font-size: 17px; }
.reg-tiers__list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-block: 10px 6px; }
.reg-tier { position: relative; display: block; cursor: pointer; }
.reg-tier input { position: absolute; opacity: 0; inset-block-start: 18px; inset-inline-start: 18px; }
.reg-tier__box { display: grid; gap: 6px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: var(--r-lg); background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.reg-tier--hot .reg-tier__box { border-color: color-mix(in srgb, var(--brand-ink) 45%, var(--line)); }
.reg-tier__tag { justify-self: start; }
.reg-tier__name { font-size: 17px; }
.reg-tier__price { color: var(--brand-ink); font-weight: 800; font-size: 16px; }
.reg-tier .check-list { gap: 6px; margin-block: 4px; }
.reg-tier__pick { justify-self: start; margin-block-start: 4px; padding: 6px 14px; border: 1.5px solid var(--line); border-radius: 999px; font-size: 13.5px; font-weight: 700; color: var(--ink-700); }
.reg-tier input:checked + .reg-tier__box { border-color: var(--brand-ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-500) 18%, transparent); }
.reg-tier input:checked + .reg-tier__box .reg-tier__pick { border-color: var(--brand-ink); background: var(--brand-ink); color: #fff; }
.reg-tier input:focus-visible + .reg-tier__box { outline: 3px solid var(--brand-ink); outline-offset: 2px; }
.reg-tiers.has-error .reg-tier__box, .reg-tiers.is-invalid .reg-tier__box { border-color: var(--danger, #D92D20); }


/* DEC-084 — the currency switch next to prices, with the data sources it has to name. */
.currency-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-block: 8px 12px; font-size: 14px; }
.currency-switch__label { font-weight: 700; }
.currency-switch--fixed { gap: 8px; }   /* DEC-091: prices in pounds for everyone — a note, no choice */
.currency-switch--fixed .icon { color: var(--brand-500); flex: none; }
.currency-switch select { min-height: 40px; padding: 4px 32px 4px 12px; border: 1.5px solid var(--line, #E4E7EC); border-radius: 10px; background-color: var(--surface, #fff); font: inherit; font-size: 14px; }
.currency-switch__note { flex-basis: 100%; font-size: 12px; }
.currency-switch__note a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* DEC-115 — reading a menu from photos / a PDF: the box on the job page, the progress and the review. */
.upload-pdf { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--brand-ink); font-weight: 700; font-size: 13px; text-decoration: none; }
.imp-bar { width: 100%; height: 12px; accent-color: var(--brand-500); }
.imp-cat { gap: 12px; }
.imp-item { display: grid; grid-template-columns: auto minmax(0, 1fr) 96px; gap: 12px; align-items: start; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.imp-item.is-existing { opacity: .6; }
.imp-item__use { padding-top: 10px; }
.imp-item__fields { display: grid; gap: 8px; min-width: 0; }
.imp-item__row { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 8px; }
.imp-item__photo { display: grid; gap: 6px; justify-items: center; font-size: 12px; }
.imp-item__photo img { width: 96px; height: 96px; object-fit: cover; border-radius: var(--r-md); border: 1px solid var(--line); }
.imp-price.is-invalid { border-color: var(--danger, #D92D20); }
.imp-actions { position: sticky; bottom: 0; padding: 12px 0; background: var(--bg, #fff); }
/* Ready menus, phase 3: the restaurant's own details read from the photos (import review, admin) */
.imp-info__row { display: grid; gap: 6px; padding-block: 10px; border-top: 1px solid var(--line); }
.imp-info__row:first-of-type { border-top: 0; }
.imp-info__hours { margin: 0; padding-inline-start: 18px; }
.imp-info__logo { width: 96px; height: 96px; object-fit: contain; border-radius: var(--r-md); border: 1px solid var(--line); background: #fff; }
.imp-info__color { width: 64px; height: 40px; padding: 2px; border: 1px solid var(--line); border-radius: var(--r-md); background: none; }
/* Ready menus, phase 3: from the menu photos alone (admin/ready-new) and the check screen (admin/ready-check) */
.ready-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.ready-steps li { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface, #fff); font-size: .95rem; }
.ready-steps__n { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand-ink); color: #fff; font-weight: 700; font-size: .85rem; }
.ready-drop { position: relative; display: grid; justify-items: center; gap: 6px; padding: 28px 16px; text-align: center; border: 2px dashed var(--line); border-radius: var(--r-lg); cursor: pointer; }
.ready-drop:hover, .ready-drop:focus-within { border-color: var(--brand-600); background: var(--brand-50); }
.ready-drop__input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.ready-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.ready-thumbs:empty { display: none; }
.ready-thumbs__item { display: inline-grid; place-items: center; width: 64px; height: 84px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-md); font-size: .8rem; font-weight: 700; }
.ready-thumbs__item img { width: 100%; height: 100%; object-fit: cover; }
.ready-more summary { cursor: pointer; font-weight: 600; padding-block: 6px; }
.ready-more[open] summary { margin-bottom: 10px; }
/* DEC-244: the menu as photos or as typed text — two big choices, and only the chosen one's panel shows (no script needed). */
.ready-source { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 8px; }
.ready-source__options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ready-source__option { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); font-weight: 700; text-align: center; cursor: pointer; }
.ready-source__option input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.ready-source__option:has(input:checked) { border-color: var(--brand-600); background: var(--brand-50); color: var(--brand-ink); box-shadow: inset 0 0 0 1px var(--brand-600); }
.ready-source__option:has(input:focus-visible) { outline: 2px solid var(--brand-600); outline-offset: 2px; }
form[data-ready-photos]:has(input[name="menu_source"][value="text"]:checked) [data-source-panel="photos"],
form[data-ready-photos]:has(input[name="menu_source"][value="photos"]:checked) [data-source-panel="text"] { display: none; }
.ready-actions summary { cursor: pointer; font-weight: 600; padding-block: 6px; color: var(--ink-600); }.ready-actions[open] summary { margin-bottom: 10px; }
.ready-price { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 8px; align-items: center; }
.ready-price .label { margin: 0; }
.ready-numbers ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.ready-numbers__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-md); }
.ready-numbers__number { font-weight: 600; min-width: 8.5rem; }
.ready-logo { display: block; width: 72px; height: 72px; object-fit: contain; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; margin-bottom: 6px; }
/* DEC-246: the cover as it is cut for the menu (2:1), never wider than its field */
.ready-cover { display: block; width: 100%; max-width: 240px; aspect-ratio: 2 / 1; object-fit: cover; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2, #f4f4f5); margin-bottom: 6px; }
.ready-items__cat { margin: 10px 0 0; font-size: 1rem; color: var(--ink-600); }
.ready-item { display: grid; grid-template-columns: minmax(0, 1fr) 96px auto; gap: 8px; align-items: center; }
.ready-item__sizes { grid-column: 2; }
.ready-item__choices { grid-column: 1 / -1; }
.ready-item + .ready-item { padding-top: 10px; border-top: 1px solid var(--line); }
.ready-item__delete { color: var(--danger-ink); white-space: nowrap; }
.ready-hours { display: grid; gap: 8px; }
.ready-hours__row { display: grid; grid-template-columns: 4.75rem minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.ready-hours__row .input-time { min-width: 0; }
.ready-hours__row input:disabled { opacity: .45; }
@media (max-width: 420px) {
  .ready-item { grid-template-columns: minmax(0, 1fr) 84px; }
  .ready-item__delete { grid-column: 1 / -1; }
  .ready-hours__row { grid-template-columns: 4.25rem minmax(0, 1fr) minmax(0, 1fr); }
  .ready-hours__row .check { grid-column: 2 / -1; }
}
.field.is-needed .input { border-color: var(--warning); box-shadow: 0 0 0 3px var(--warning-bg); }
/* Admin → new restaurant: the two modes as option cards */
.nr-mode { margin: 0; min-inline-size: 0; }
.nr-mode > legend { float: inline-start; width: 100%; padding: 0; }
.nr-mode__option { display: flex; gap: 10px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-md); cursor: pointer; }
.nr-mode__option > span { display: grid; gap: 4px; }
.nr-mode__option input { margin-top: 4px; accent-color: var(--brand-600); }
.nr-mode__option:has(input:checked) { border-color: var(--brand-600); background: var(--brand-50); }
.nr-submit { position: sticky; bottom: 0; z-index: 2; padding-block: 12px; background: var(--page); }
/* Every menu design as a picture to pick (partials/template-picker: manual add, a ready menu's check screen) */
.tpl-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; margin-top: 8px; }
.tpl-picker__cell { display: grid; gap: 6px; align-content: start; }
.tpl-picker__preview { justify-content: center; }
.tpl-preview { width: min(440px, calc(100vw - 24px)); height: min(860px, calc(100dvh - 24px)); padding: 0; border: 0; border-radius: var(--r-lg); background: var(--surface); box-shadow: 0 24px 60px rgba(0, 0, 0, .35); overflow: hidden; }
.tpl-preview[open] { display: flex; flex-direction: column; }
.tpl-preview::backdrop { background: rgba(18, 22, 25, .6); }
.tpl-preview__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.tpl-preview__bar strong { flex: 1 1 auto; min-width: 0; }
.tpl-preview__frame { flex: 1; width: 100%; border: 0; background: var(--page); }
.tpl-picker__option { position: relative; display: grid; gap: 6px; padding: 6px; border: 2px solid var(--line); border-radius: var(--r-md); cursor: pointer; background: var(--surface); }
.tpl-picker__option input { position: absolute; opacity: 0; pointer-events: none; }
.tpl-picker__option:has(input:checked) { border-color: var(--brand-600); box-shadow: 0 0 0 3px var(--brand-50); }
.tpl-picker__option:has(input:focus-visible) { outline: 2px solid var(--brand-600); outline-offset: 2px; }
.tpl-picker__shot { display: block; aspect-ratio: 300 / 400; overflow: hidden; border-radius: calc(var(--r-md) - 4px); background: var(--page); }
.tpl-picker__shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.tpl-picker__name { font-weight: 600; font-size: .9rem; line-height: 1.4; }
.tpl-picker__name .badge { margin-inline-start: 4px; vertical-align: middle; }
@media (max-width: 640px) {
  .imp-item { grid-template-columns: auto minmax(0, 1fr); }
  .imp-item__photo { grid-column: 1 / -1; grid-template-columns: 96px 1fr; justify-items: start; align-items: center; }
}

/* DEC-117 — Menu Design Studio (templates/owner/design-studio.php, js/studio.js) */
.studio-en { color: var(--ink-500); font-size: .62em; font-weight: 700; }
.badge-soft { background: var(--brand-50); color: var(--brand-ink); }
.studio-current { display: grid; grid-template-columns: 120px minmax(0, 1fr); align-items: start; gap: 18px; margin-bottom: 16px; }
.studio-current__thumb { width: 120px; height: auto; aspect-ratio: 300 / 520; border-radius: var(--r-md); object-fit: cover; object-position: top; box-shadow: var(--shadow-md); }
.studio-current__label { color: var(--brand-ink); font-size: 13px; font-weight: 800; }
.studio-current h2 { font-size: 20px; }
.studio-tools { display: grid; gap: 12px; margin-bottom: 16px; }
.studio-filters { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.studio-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: var(--r-pill); background: var(--surface); color: var(--ink-700); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.studio-chip small { color: var(--ink-500); font-weight: 600; }
.studio-chip.is-active { border-color: var(--brand-ink); background: var(--brand-ink); color: #fff; }
.studio-chip.is-active small { color: rgba(255, 255, 255, .85); }
.studio-chip--kind { min-height: 36px; font-size: 13px; }
.studio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 16px; }
.studio-card { display: grid; grid-template-rows: auto 1fr; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-sm); transition: box-shadow .18s, transform .18s; }
.studio-card.is-current { border-color: var(--brand-ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-500) 20%, transparent); }
.studio-card__shot { position: relative; display: block; aspect-ratio: 300 / 400; overflow: hidden; background: var(--page); }
.studio-card__shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.studio-card__badge { position: absolute; top: 10px; inset-inline-start: 10px; display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: var(--r-pill); background: var(--brand-ink); color: #fff; font-size: 12px; font-weight: 800; }
.studio-card__badge .icon { width: 14px; height: 14px; }
.studio-card__body { display: grid; align-content: start; gap: 6px; padding: 12px 14px 14px; }
.studio-card__body h3 { font-size: 16px; line-height: 1.35; }
.studio-card__desc { display: -webkit-box; overflow: hidden; color: var(--ink-600); font-size: 13px; line-height: 1.6; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.studio-card__tags { display: flex; flex-wrap: wrap; gap: 4px; }
.studio-card__tags .badge { font-size: 12px; }
.studio-card__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
@media (hover: hover) {
  .studio-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
  .studio-card:hover .studio-card__shot img { transform: scale(1.03); }
}
.studio-preview { width: min(100% - 16px, 1480px); max-width: none; max-height: calc(100vh - 16px); padding: 0; border: 0; border-radius: var(--r-xl); background: var(--page); box-shadow: 0 30px 80px rgba(16, 24, 40, .35); }
.studio-preview::backdrop { background: rgba(16, 24, 40, .6); }
.studio-preview__head { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
.studio-preview__head h2 { flex: 1; min-width: 140px; font-size: 18px; }
.studio-devices { display: flex; gap: 6px; }
.studio-preview__note { display: flex; align-items: center; gap: 6px; margin: 10px 16px 0; }
.studio-stage { display: flex; justify-content: center; overflow: hidden; margin: 12px 16px 16px; }
.studio-stage iframe { flex: none; border: 0; border-radius: 18px; background: #fff; box-shadow: 0 10px 30px rgba(16, 24, 40, .18); transform-origin: top center; }
.studio-link { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 16px; }
.studio-link__thumb { width: 96px; height: auto; aspect-ratio: 300 / 520; border-radius: var(--r-md); object-fit: cover; object-position: top; }
@media (max-width: 560px) {
  .studio-current { grid-template-columns: 84px minmax(0, 1fr); gap: 12px; }
  .studio-current__thumb { width: 84px; }
  .studio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .studio-card__desc { -webkit-line-clamp: 2; }
  .studio-card__tags { display: none; }
  .studio-card__actions .btn { flex: 1; justify-content: center; }
  .studio-preview { width: 100%; max-height: 100vh; border-radius: 0; }
  .studio-devices { order: 3; width: 100%; overflow-x: auto; }
}
/* DEC-084: the data sources' credits, at the bottom of the pages that use them (partials/data-credits) */
.data-credits { margin: 14px 0 0; font-size: 12px; opacity: .8; }
.data-credits a { color: inherit; }
/* DEC-126: admin → reaching restaurants */
.outreach-bar { justify-content: space-between; gap: 12px; }
.outreach-search { flex-wrap: nowrap; }
.outreach-search .input { min-width: 0; width: min(280px, 60vw); }
.outreach-count { margin-inline-start: 4px; font-size: 12px; opacity: .8; }
.outreach-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.outreach-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 14px; }
.outreach-row__who { display: grid; gap: 2px; flex: 1 1 200px; min-width: 0; }

/* ===== DEC-131: hiring — a worker's profile, their area, the restaurants' search ===== */
.wp { display: grid; gap: 22px; }
.wp-head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 18px; }
.wp-photo { display: grid; flex: none; place-items: center; width: 112px; height: 112px; overflow: hidden; border-radius: 50%; background: var(--brand-50); color: var(--brand-600); font-size: 42px; font-weight: 800; box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--brand-100); }
.wp-photo img { width: 100%; height: 100%; object-fit: cover; }
.wp-id { display: grid; flex: 1 1 260px; gap: 6px; min-width: 0; }
.wp-name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font-size: 24px; font-weight: 800; }
.wp-verified { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: var(--r-pill); background: #E7F6EE; color: #0F7A46; font-size: 13px; font-weight: 700; }
.wp-verified .icon { width: 16px; height: 16px; }
.wp-specialty { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.wp-specialty span { padding: 2px 10px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink-700); font-size: 13px; font-weight: 700; box-shadow: inset 0 0 0 1px var(--line); }
.wp-specialty span.is-primary { background: var(--brand-500); color: #fff; box-shadow: none; }
.wp-headline { margin: 0; color: var(--ink-700); font-size: 16px; font-weight: 600; }
.wp-facts { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 4px 0 0; padding: 0; list-style: none; color: var(--ink-600); font-size: 14px; }
.wp-facts li { display: inline-flex; align-items: center; gap: 5px; }
.wp-facts .icon { width: 16px; height: 16px; color: var(--ink-500); }
.wp-avail span { width: 9px; height: 9px; border-radius: 50%; background: #98A2B3; }
.wp-avail--now { color: #0F7A46; font-weight: 700; }
.wp-avail--now span { background: #12B76A; box-shadow: 0 0 0 3px #D1FADF; }
.wp-avail--from span { background: #F79009; }
.wp-health { color: #0F7A46; }
.wp-health .icon { color: #12B76A; }
.wp-phone { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r-md); background: #E7F6EE; }
.wp-phone > span { display: inline-flex; align-items: center; gap: 6px; margin-inline-end: auto; font-size: 18px; font-weight: 800; }
.wp-sec h3 { margin: 0 0 10px; font-size: 16px; font-weight: 800; }
.wp-bio { margin: 0; color: var(--ink-700); line-height: 1.9; }
.wp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.wp-chips li { padding: 3px 10px; border-radius: var(--r-pill); background: var(--brand-50); color: var(--brand-ink); font-size: 13px; font-weight: 700; }
.wp-chips .wp-pay { background: #FEF6E7; color: #93370D; }
.wp-skills { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.wp-skills li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-radius: var(--r-md); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; font-weight: 600; }
.wp-level { display: inline-flex; gap: 3px; }
.wp-level b { width: 14px; height: 6px; border-radius: 3px; background: var(--line); }
.wp-level--1 b:nth-child(-n+1), .wp-level--2 b:nth-child(-n+2), .wp-level--3 b { background: var(--brand-500); }
.wp-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.wp-gallery a, .wp-gallery figure { position: relative; display: block; margin: 0; overflow: hidden; border-radius: var(--r-md); background: var(--surface-2); }
.wp-gallery img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.wp-gallery a span, .wp-gallery figcaption { position: absolute; inset: auto 0 0; padding: 18px 8px 6px; background: linear-gradient(transparent, rgba(16, 24, 40, .75)); color: #fff; font-size: 12px; font-weight: 700; }
.wp-timeline { display: grid; gap: 10px; margin: 0; padding: 0; padding-inline-start: 18px; list-style: none; border-inline-start: 2px solid var(--line); }
.wp-timeline li { position: relative; line-height: 1.7; }
.wp-timeline li::before { content: ""; position: absolute; top: 9px; inset-inline-start: -25px; width: 12px; height: 12px; border-radius: 50%; background: var(--brand-500); box-shadow: 0 0 0 3px #fff; }
.wp-timeline small { display: block; color: var(--ink-500); }
.wp-certs { display: grid; gap: 6px; margin: 0 0 6px; padding: 0; list-style: none; }
.wp-certs li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-weight: 600; }
.wp-certs .icon { color: var(--brand-500); }
.wp-certs small { color: var(--ink-500); }
.wp-public { padding-block: clamp(28px, 2vw + 20px, 56px) 64px; }
.wp-public .wp { padding: clamp(18px, 2vw + 10px, 32px); border: 1px solid var(--line); border-radius: 24px; background: #fff; }
.wp-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; padding: 20px 22px; border-radius: 20px; background: var(--ink-900); color: #fff; }
.wp-cta h2 { margin: 0 0 4px; font-size: 19px; }
.wp-cta p { margin: 0; color: rgba(255, 255, 255, .78); }
.wp-join-link { margin-top: 14px; text-align: center; }
.join-points { display: grid; gap: 8px; margin: 4px 0 20px; padding: 0; list-style: none; }
.join-points li { display: flex; align-items: flex-start; gap: 8px; color: var(--ink-700); font-size: 14.5px; line-height: 1.7; }
.join-points .icon { flex: none; width: 18px; height: 18px; margin-top: 3px; color: #12B76A; }

.wk-avail.is-on { box-shadow: inset 0 0 0 2px #12B76A; }
.wk-percent { display: inline-grid; place-items: center; min-width: 56px; height: 34px; padding: 0 10px; border-radius: var(--r-pill); background: var(--brand-50); color: var(--brand-ink); font-weight: 800; }
.wk-bar { height: 10px; margin: 4px 0 14px; overflow: hidden; border-radius: var(--r-pill); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.wk-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand-500), #FDB022); }
.wk-tips { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.wk-tips a { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.wk-req-list, .wk-requests { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.wk-req-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.wk-req-list .btn { margin-inline-start: auto; }
.wk-requests li { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.wk-requests li:first-child { border-top: 0; }
.wk-requests p { margin: 6px 0; color: var(--ink-700); }
.wk-answer { display: flex; flex-wrap: wrap; gap: 8px; }
.wk-photo-form { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.wk-photo-form .wp-photo { width: 84px; height: 84px; font-size: 30px; }
.wk-photo-form > div:nth-of-type(2) { flex: 1 1 220px; }
.wk-pay { display: flex; gap: 8px; }
.wk-pay .input:first-child { flex: 1; }
.wk-pay select { flex: 0 0 120px; }
.wk-checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.wk-others { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.wk-skills-form { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.wk-skills-form h3 { margin: 0 0 4px; font-size: 16px; }
.wk-skill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin: 12px 0 16px; }
.wk-skill { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px; padding-inline-start: 12px; border-radius: var(--r-md); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-weight: 600; }
.wk-skill .input { width: auto; min-width: 96px; height: 38px; }
.wk-rows { display: grid; gap: 6px; margin: 0 0 16px; padding: 0; list-style: none; }
.wk-rows li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: var(--r-md); background: var(--surface-2); }
.wk-rows li > span { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.wk-inline { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; }
.wk-inline > .field { flex: 1 1 180px; margin: 0; }
.wk-gallery { margin-bottom: 16px; }
.wk-gallery figure form { position: absolute; top: 6px; inset-inline-end: 6px; }
.wk-switch { align-items: flex-start; margin-bottom: 12px; }
.wk-switch span { display: grid; gap: 2px; }
.wk-switch small { color: var(--ink-500); }
.wk-link { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-radius: var(--r-md); background: var(--surface-2); word-break: break-all; }
.card--danger { box-shadow: inset 0 0 0 1px #FECDCA; }

.hr-filters { display: grid; gap: 14px; }
.hr-search { display: flex; gap: 10px; }
.hr-search .input-wrap { flex: 1; }
.hr-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.hr-row label { display: grid; gap: 4px; color: var(--ink-600); font-size: 13px; font-weight: 700; }
.hr-toggles { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.hr-saved { display: flex; flex-wrap: wrap; gap: 8px; }
.hr-saved a { display: grid; padding: 8px 14px; border-radius: var(--r-md); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-900); font-weight: 700; text-decoration: none; }
.hr-saved small { color: var(--ink-500); font-weight: 600; }
.hr-count { margin: 4px 0 12px; color: var(--ink-600); font-weight: 700; }
.hr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.hr-card { overflow: hidden; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); transition: box-shadow .18s, transform .18s; }
.hr-card:hover { box-shadow: var(--shadow-md), inset 0 0 0 1px var(--brand-100); transform: translateY(-2px); }
.hr-card__link { display: grid; gap: 6px; padding: 0 16px 16px; color: inherit; text-decoration: none; }
.hr-card__cover { height: 86px; margin-inline: -16px; background: linear-gradient(135deg, var(--brand-50), #FEF0C7) center / cover no-repeat; }
.hr-card__photo { display: grid; place-items: center; width: 68px; height: 68px; margin-top: -36px; overflow: hidden; border-radius: 50%; background: var(--brand-500); color: #fff; font-size: 26px; font-weight: 800; box-shadow: 0 0 0 4px var(--surface); }
.hr-card__photo img { width: 100%; height: 100%; object-fit: cover; }
.hr-card h3 { display: flex; align-items: center; gap: 6px; margin: 2px 0 0; font-size: 17px; font-weight: 800; }
.hr-card h3 .wp-verified { padding: 2px 6px; }
.hr-card__spec { margin: 0; color: var(--brand-ink); font-weight: 800; }
.hr-card__head { display: -webkit-box; margin: 0; overflow: hidden; color: var(--ink-600); font-size: 14px; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.hr-card .wp-facts { margin: 0; font-size: 13px; }
.hr-card .wp-chips li { font-size: 12px; }
.hr-invite { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
.hr-invite h2 { margin: 0 0 4px; font-size: 17px; }
.hr-invite p { margin: 0; color: var(--ink-600); }
.hr-invite code { padding: 8px 12px; border-radius: var(--r-md); background: var(--surface-2); font-size: 14px; }
.hr-show { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.hr-contact { position: sticky; top: 90px; display: grid; gap: 10px; }
.hr-contact h2 { margin: 0; font-size: 18px; }
.hr-state { display: flex; align-items: center; gap: 8px; margin: 0; padding: 12px; border-radius: var(--r-md); background: var(--surface-2); font-weight: 700; }
.hr-state--pending { background: #FEF6E7; color: #93370D; }
.hr-state--ok { background: #E7F6EE; color: #0F7A46; }

.aw-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.aw-card { display: grid; gap: 6px; padding: 12px; border-radius: var(--r-md); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.aw-card img { width: 100%; max-height: 200px; object-fit: contain; border-radius: var(--r-sm); background: #fff; }
.aw-actions { display: flex; gap: 8px; }
.aw-search { display: flex; gap: 6px; }

@media (max-width: 900px) {
  .hr-show { grid-template-columns: minmax(0, 1fr); }
  .hr-contact { position: static; }
  .hr-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .hr-row, .wk-others { grid-template-columns: minmax(0, 1fr); }
  .wp-photo { width: 88px; height: 88px; font-size: 34px; }
  .wp-name { font-size: 21px; }
  .hr-search { flex-direction: column; }
}

/* DEC-132: jobs */
.hr-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.jb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.jb-item { display: grid; gap: 8px; align-content: start; }
.jb-card { border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); transition: box-shadow .18s; }
.jb-card:hover { box-shadow: var(--shadow-md), inset 0 0 0 1px var(--brand-100); }
.jb-card__link { display: grid; gap: 8px; padding: 16px; color: inherit; text-decoration: none; }
.jb-card__top { display: flex; flex-wrap: wrap; gap: 6px; }
.jb-card__spec { padding: 2px 10px; border-radius: var(--r-pill); background: var(--brand-500); color: #fff; font-size: 12.5px; font-weight: 800; }
.jb-card__type { padding: 2px 10px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink-700); font-size: 12.5px; font-weight: 700; box-shadow: inset 0 0 0 1px var(--line); }
.jb-card h3 { margin: 0; font-size: 18px; font-weight: 800; }
.jb-card__rest { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--ink-700); font-weight: 700; }
.jb-card__rest .icon { width: 16px; height: 16px; color: var(--ink-500); }
.jb-card__pay { color: #0F7A46; font-weight: 800; }
.jb-card .wp-facts { margin: 0; }
.jb-apply { display: flex; gap: 8px; }
.jb-apply .input { flex: 1; }
.jb-applied { display: flex; align-items: center; gap: 6px; margin: 0; padding: 10px 12px; border-radius: var(--r-md); background: #E7F6EE; color: #0F7A46; font-weight: 700; }
.jb-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; align-items: start; }
.jb-col { display: grid; gap: 10px; }
.jb-col--hired { box-shadow: inset 0 0 0 2px #12B76A; }
.jb-app { display: grid; gap: 6px; padding: 10px; border-radius: var(--r-md); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.jb-app__who { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.jb-app__who .hr-card__photo { width: 44px; height: 44px; margin: 0; font-size: 18px; box-shadow: none; }
.jb-app__who > span:last-child { display: grid; }
.jb-app p { margin: 0; }
.jb-app__phone { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.jb-app__phone a { display: inline-flex; align-items: center; gap: 4px; }
.jb-app__move { display: flex; gap: 6px; }
.jb-app__move .input { height: 36px; }
.jb-public { padding-block: 28px 64px; }
.jb-public .jb-card { margin-block: 12px; }
.jb-filter { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.jb-filter .input { flex: 1 1 200px; }
.jb-empty { padding: 30px; border-radius: 16px; background: var(--surface-2); color: var(--ink-600); text-align: center; }
.jb-desc { margin-top: 14px; padding: 18px; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.jb-desc h2 { margin: 0 0 8px; font-size: 17px; }
.jb-desc p { line-height: 1.9; }
.jb-howto { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.jb-howto p { flex: 1 1 100%; margin: 0; }

/* DEC-133: one-shift requests */
.ug-list { display: grid; gap: 10px; }
.ug-offer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 14px; border-radius: var(--r-md); background: #FFF6ED; box-shadow: inset 0 0 0 1px #FED7AA; }
.ug-offer p { margin: 0 0 4px; }
.ug-offer__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ug-offer__head .icon { color: var(--brand-500); }
.ug-offer__when { font-weight: 700; }
.ug-offer--over, .ug-offer--closed, .ug-offer--declined { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); opacity: .8; }
.ug-offer--chosen { background: #E7F6EE; box-shadow: inset 0 0 0 1px #A6F4C5; }
.ug-home { box-shadow: inset 0 0 0 2px var(--brand-500); }
.ug-yes { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.ug-chosen { box-shadow: inset 0 0 0 2px #12B76A; }

/* DEC-134 — المكسب والخسارة */
.pf-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 0 0 18px; }
.pf-tabs { display: flex; flex-wrap: wrap; gap: 0 4px; border-block-end: 1px solid var(--line); }
.pf-tabs a { padding: 10px 12px; margin-block-end: -1px; border-radius: 0; background: none; box-shadow: none; color: var(--ink-600); font-weight: 700; font-size: 14px; text-decoration: none; border-block-end: 2px solid transparent; }
.pf-tabs a:hover { color: var(--ink-900); border-block-end-color: #D0D5DD; box-shadow: none; }
.pf-tabs a.is-active { background: none; color: var(--brand-ink); border-block-end-color: var(--brand-ink); box-shadow: none; }   /* UI v2: an underline, readable at any size */
/* DEC-207: the accounts' many tabs: one row that slides on a phone, so the page's content is on the first screen */
@media (max-width: 760px) {
  .pf-tabs--scroll { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity; padding-block-end: 4px; margin-inline: -16px; padding-inline: 16px; scrollbar-width: thin; }
  .pf-tabs--scroll a { flex: 0 0 auto; white-space: nowrap; scroll-snap-align: start; }
}
.pf-month { display: flex; align-items: center; gap: 8px; margin: 0; }
.pf-month .input { width: auto; min-width: 150px; }
.pf-start { margin-bottom: 20px; }
.pf-start h2 { margin: 0 0 12px; font-size: 18px; }
.pf-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.pf-steps li > * { display: flex; align-items: center; gap: 10px; height: 100%; padding: 14px; border-radius: var(--r-md); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); color: inherit; text-decoration: none; }
.pf-steps a:hover { box-shadow: inset 0 0 0 1px var(--brand-500); }
.pf-steps b { display: grid; flex: 0 0 32px; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--brand-100); color: var(--brand-ink); }
.pf-result { margin-bottom: 20px; text-align: center; }
.pf-result--win { background: linear-gradient(160deg, #E8F7EC, var(--surface) 70%); box-shadow: inset 0 0 0 1px #A6F4C5; }
.pf-result--loss { background: linear-gradient(160deg, var(--danger-bg), var(--surface) 70%); box-shadow: inset 0 0 0 1px #F9C0C1; }
.pf-result p { margin: 0; }
.pf-result__label { font-weight: 700; color: var(--ink-700); }
.pf-result__value { margin: 6px 0 !important; font-size: clamp(32px, 7vw, 48px); font-weight: 800; line-height: 1.1; direction: ltr; unicode-bidi: isolate; }
.pf-result--win .pf-result__value { color: var(--success-ink); }
.pf-result--loss .pf-result__value { color: var(--danger-ink); }
.pf-result__sub { color: var(--ink-600); }
.pf-result__note { margin-top: 8px !important; font-size: 13px; color: var(--ink-500); }
.pf-be { margin: 0 0 8px; font-weight: 600; }
.pf-bar { margin-bottom: 8px; }
.pf-alert { display: flex; gap: 8px; margin: 0 0 8px; padding: 10px 12px; border-radius: var(--r-md); font-size: 14px; list-style: none; }
.pf-alert--ok { background: var(--success-bg); color: var(--success-ink); }
.pf-alert--warn { background: var(--warning-bg); color: #8A5A00; }
.pf-alert--bad { background: var(--danger-bg); color: var(--danger-ink); }
.pf-chart { display: flex; align-items: flex-end; gap: 10px; height: 200px; padding-top: 8px; }
.pf-chart__col { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; min-width: 0; }
.pf-chart__bar { display: block; width: min(48px, 100%); border-radius: 6px 6px 2px 2px; }
.pf-chart__bar--win { background: linear-gradient(180deg, #32D583, var(--success)); }
.pf-chart__bar--loss { background: linear-gradient(180deg, #F97066, var(--danger)); }
.pf-chart__val { font-size: 12px; font-weight: 700; color: var(--ink-700); direction: ltr; white-space: nowrap; }
.pf-chart__m { font-size: 12px; color: var(--ink-500); white-space: nowrap; }
.pf-cost-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 16px; }
.pf-money { display: flex; align-items: center; gap: 8px; }
.pf-money .input { flex: 1; min-width: 0; }
.pf-money span { flex: 0 0 auto; font-size: 13px; color: var(--ink-500); }
.pf-sub { margin: 8px 0 10px; font-size: 15px; }
.pf-own { display: grid; gap: 8px; margin-bottom: 16px; }
.pf-own__row { display: grid; grid-template-columns: 1fr minmax(140px, 220px); gap: 8px; align-items: start; }
.pf-own__row .field-error { grid-column: 1 / -1; }
.pf-quads { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 20px; }
.pf-quad { display: grid; gap: 4px; margin: 0; padding: 14px; font-size: 13px; color: var(--ink-600); }
.pf-quad b { font-size: 15px; color: var(--ink-900); }
.pf-quad--star { box-shadow: inset 0 3px 0 #FDB022; }
.pf-quad--puzzle { box-shadow: inset 0 3px 0 #7A5AF8; }
.pf-quad--plowhorse { box-shadow: inset 0 3px 0 #2E90FA; }
.pf-quad--dog { box-shadow: inset 0 3px 0 var(--danger); }
.pf-items td, .pf-items th { vertical-align: middle; }
.pf-items .pf-cat td { padding-top: 14px; font-size: 13px; font-weight: 700; color: var(--ink-500); background: var(--surface-2); }
.pf-cost-cell { min-width: 130px; }
.pf-cost-cell .input { width: 100px; padding-block: 6px; }
.pf-cost-cell a { display: inline-flex; align-items: center; min-height: 36px; margin-inline-start: 4px; padding-inline: 4px; }
.pf-row-loss { background: #FFF5F5; }
.pf-ok { color: var(--success-ink); font-weight: 700; }
.pf-warn { color: #B54708; font-weight: 700; }
.pf-bad { color: var(--danger-ink); font-weight: 700; }
.pf-q { display: inline-block; padding: 3px 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface-2); }
.pf-q--star { background: #FEF0C7; color: #93370D; }
.pf-q--puzzle { background: #EBE9FE; color: #5925DC; }
.pf-q--plowhorse { background: #D1E9FF; color: #175CD3; }
.pf-q--dog { background: var(--danger-bg); color: var(--danger-ink); }
.pf-units { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 16px; margin-bottom: 16px; }
.pf-units label { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; }
.pf-units .input { width: 90px; }
.pf-disclaimer { margin: 20px 0 0; font-size: 12px; color: var(--ink-500); text-align: center; }
.pf-line-cost { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.pf-line-cost form { margin: 0; }
.pf-add-line { margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.pf-new-ing { margin: 10px 0 14px; padding: 10px 12px 0; border: 1px dashed var(--line); border-radius: var(--r-md); }
.pf-new-ing legend { padding: 0 6px; color: var(--ink-500); }
.pf-ings li { flex-wrap: wrap; }
.pf-reprice { display: flex; align-items: center; gap: 6px; margin: 0 0 0 auto; }
.pf-reprice .input { width: 90px; padding-block: 6px; }
@media (max-width: 640px) {
  .pf-own__row { grid-template-columns: 1fr; }
  .pf-chart { gap: 4px; height: 170px; }
  .pf-chart__val { font-size: 11px; }
  .pf-reprice { margin: 0; }
}

/* DEC-135 — سوق الموردين */
.mk-tabs { margin: 0 0 18px; }
.mk-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-pill); background: var(--brand-ink); color: #fff; font-size: 12px; }
.pf-tabs a.is-active .mk-count { background: #fff; color: var(--brand-ink); }
.mk-area { display: flex; flex-wrap: wrap; gap: 8px; }
.mk-area .input { width: auto; min-width: 180px; }
.mk-where { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; color: var(--ink-600); }
.mk-where .input { width: auto; padding-block: 4px; }
.mk-search { margin-bottom: 14px; }
.mk-search__main { display: flex; gap: 8px; }
.mk-search__main .input-wrap { flex: 1; }
.mk-search__main .input { font-size: 17px; }
.mk-search__more { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 10px; }
.mk-search__more label { display: flex; align-items: center; gap: 8px; color: var(--ink-600); }
.mk-search__more .input { width: auto; min-width: 110px; padding-block: 6px; }
.mk-cats { display: flex; gap: 8px; margin: 0 0 18px; padding-bottom: 4px; overflow-x: auto; scrollbar-width: thin; }
.mk-cats a { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 6px; padding: 8px 14px; border-radius: var(--r-pill); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-700); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.mk-cats a .icon { width: 16px; height: 16px; }
.mk-cats a.is-active { background: var(--ink-900); box-shadow: none; color: #fff; }
.mk-cats small { opacity: .7; }
.mk-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin: 6px 0 12px; font-size: 18px; }
.mk-heading small { font-size: 13px; font-weight: 400; }
.mk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-bottom: 20px; }
.mk-offer { position: relative; display: flex; flex-direction: column; gap: 6px; margin: 0; }
.mk-offer--best { box-shadow: inset 0 0 0 2px var(--success); }
.mk-offer--stale { opacity: .85; }
.mk-ribbon { position: absolute; inset-block-start: -10px; inset-inline-start: 14px; padding: 2px 10px; border-radius: var(--r-pill); background: var(--success); color: #fff; font-size: 12px; font-weight: 700; }
.mk-offer__supplier { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.mk-offer__supplier img, .mk-supplier-head img, .mk-logo img { border-radius: var(--r-md); object-fit: cover; }
.mk-offer__supplier span { display: grid; line-height: 1.3; }
.mk-avatar { display: grid; flex: 0 0 36px; place-items: center; width: 36px; height: 36px; border-radius: var(--r-md); background: var(--brand-100); color: var(--brand-ink); font-weight: 800; }
.mk-avatar--lg { flex-basis: 64px; width: 64px; height: 64px; font-size: 26px; }
.mk-offer__title { margin: 4px 0 0; font-size: 16px; }
.mk-offer__pack { margin: 0; }
.mk-offer__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.mk-offer__price b { font-size: 22px; }
.mk-offer__price span { color: var(--ink-600); }
.mk-offer__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.mk-offer__total { margin: 2px 0; padding: 8px 10px; border-radius: var(--r-md); background: var(--brand-50); color: var(--brand-ink); font-weight: 700; font-size: 14px; }
.mk-offer .hint { margin: 0; }
.mk-add { display: flex; gap: 8px; margin-top: auto; padding-top: 6px; }
.mk-add .input { width: 80px; padding-block: 6px; }
.mk-add .btn { flex: 1; }
.mk-report { margin: 0; }
.mk-report .btn { padding: 0; font-size: 12px; color: var(--ink-500); }
.mk-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 20px; }
.mk-product { display: grid; gap: 4px; margin: 0; color: inherit; text-decoration: none; }
.mk-product:hover { box-shadow: inset 0 0 0 1px var(--brand-500); }
.mk-supplier-head { display: flex; align-items: center; gap: 14px; }
.mk-supplier-head h1 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mk-reviews { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.mk-reviews li { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.mk-reviews li:last-child { border-bottom: 0; }
.mk-reviews p { margin: 6px 0 0; }
.mk-reply { margin: 6px 0 0; padding: 8px 12px; border-inline-start: 3px solid var(--brand-500); background: var(--surface-2); font-size: 14px; }
.mk-reply-form { display: flex; gap: 8px; margin-top: 8px; }
.mk-reply-form .input { flex: 1; }
.mk-group { scroll-margin-top: 80px; }
.mk-lines td { vertical-align: middle; }
.mk-gone { opacity: .55; }
.mk-qty { width: 90px; padding-block: 6px; }
.mk-sum { display: grid; gap: 4px; max-width: 320px; margin: 10px 0 14px auto; }
.mk-sum div { display: flex; justify-content: space-between; gap: 12px; }
.mk-sum dt { color: var(--ink-600); }
.mk-sum dd { margin: 0; font-weight: 600; }
.mk-sum__total { padding-top: 6px; border-top: 1px solid var(--line); font-size: 17px; }
.mk-sum__total dd { font-weight: 800; }
.mk-checkout { padding-top: 12px; border-top: 1px dashed var(--line); }
.mk-checkout__buttons, .mk-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; }
.mk-actions form { margin: 0; }
.mk-action--reason { display: flex; gap: 6px; }
.mk-action--reason .input { min-width: 200px; }
.mk-status { display: inline-block; padding: 3px 10px; border-radius: var(--r-pill); background: var(--surface-2); font-size: 12px; font-weight: 700; white-space: nowrap; }
.mk-status--new, .mk-status--pending { background: var(--warning-bg); color: #8A5A00; }
.mk-status--confirmed, .mk-status--on_way { background: #D1E9FF; color: #175CD3; }
.mk-status--delivered, .mk-status--verified { background: var(--success-bg); color: var(--success-ink); }
.mk-status--rejected, .mk-status--cancelled, .mk-status--suspended { background: var(--danger-bg); color: var(--danger-ink); }
.mk-timeline { display: grid; gap: 8px; margin: 0; padding-inline-start: 18px; }
.mk-stars { display: flex; flex-wrap: wrap; gap: 6px; }
.mk-stars label { cursor: pointer; }
.mk-stars input { position: absolute; opacity: 0; }
.mk-stars span { display: inline-block; padding: 6px 12px; border-radius: var(--r-pill); box-shadow: inset 0 0 0 1px var(--line); color: #F5A524; letter-spacing: 1px; }
.mk-stars input:checked + span { background: #FEF0C7; box-shadow: inset 0 0 0 2px #F5A524; }
.mk-stars input:focus-visible + span { outline: 2px solid var(--brand-500); outline-offset: 2px; }
.mk-logo { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; }
.mk-logo .field { flex: 1 1 220px; margin: 0; }
.mk-checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.mk-zones { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 6px 12px; margin: 8px 0; }
.mk-zone { display: grid; grid-template-columns: 1fr 80px 56px; align-items: center; gap: 6px; padding: 6px 8px; border-radius: var(--r-md); background: var(--surface-2); }
.mk-zone.is-on { background: var(--brand-50); }
.mk-zone .input { padding: 4px 6px; }
.mk-prices td { vertical-align: middle; }
.mk-stale-row { background: #FFFBEB; }
.mk-delete { margin: -6px 0 20px; }
.mk-columns { margin: 0 0 14px; padding-inline-start: 18px; color: var(--ink-600); }
.mk-import select { min-width: 180px; padding-block: 6px; }
.mk-import--ready { background: #F3FBF6; }
.mk-import--check { background: #FFFBEB; }
.mk-import--error { background: #FFF5F5; }
.mk-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.mk-filter .input { width: auto; flex: 1 1 160px; }
.mk-send h2 { color: var(--whatsapp); }
.mk-landing { padding: 8px 0 56px; }
.mk-landing-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.mk-landing__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.mk-landing__card { padding: 24px; border-radius: var(--r-lg); background: var(--surface); box-shadow: 0 1px 0 var(--line), 0 10px 30px rgba(16, 24, 40, .06); }
.mk-landing__card h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 20px; }
.mk-landing__card ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.mk-landing__card li { display: flex; gap: 8px; }
.mk-landing__card li .icon { flex: 0 0 auto; color: var(--success); }
.mk-landing__title { margin: 40px 0 14px; font-size: 22px; }
.mk-landing__cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.mk-landing__cats li { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: var(--r-md); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-weight: 600; }
.mk-landing__cats .icon { color: var(--brand-500); }
.mk-landing__steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.mk-landing__steps li { display: flex; gap: 10px; padding: 14px; border-radius: var(--r-md); background: var(--surface-2); }
.mk-landing__steps b { display: grid; flex: 0 0 30px; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--brand-500); color: #fff; }
.mk-landing__note { margin-top: 18px; }
@media (max-width: 640px) {
  .mk-search__main { flex-direction: column; }
  .mk-grid { grid-template-columns: 1fr; }
  .mk-sum { max-width: none; }
  .mk-action--reason { flex-direction: column; }
  .mk-zone { grid-template-columns: 1fr 70px 50px; }
}

/* DEC-138 — «الطلبات والدفع» */
.od-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin-bottom: 16px; }
.od-choice { cursor: pointer; }
.od-choice input { position: absolute; opacity: 0; }
.od-choice > span { display: grid; gap: 6px; height: 100%; padding: 16px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--surface); transition: border-color .15s, background .15s; }
.od-choice > span .icon { color: var(--ink-600); }
.od-choice small { color: var(--ink-600); font-size: 13px; line-height: 1.6; }
.od-choice input:checked + span { border-color: var(--brand-500); background: var(--brand-50); }
.od-choice input:checked + span .icon { color: var(--brand-500); }
.od-choice input:focus-visible + span { outline: 3px solid var(--brand-500); outline-offset: 2px; }
/* DEC-259: «المنيوهات» (owner/menu-lists.php, owner/menu-list.php, js/menu-list.js) */
.ml-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.ml-card .card-header { gap: 8px; }
.ml-link { display: flex; gap: 8px; align-items: center; }
.ml-link .input { min-width: 0; flex: 1; }
.ml-qr { width: 160px; max-width: 100%; }
.ml-qr svg { display: block; width: 100%; height: auto; }
.ml-slug { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ml-slug .input { flex: 1; min-width: 120px; }
.ml-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 8px 16px; }
.ml-item { align-items: flex-start; }
/* DEC-265: «تعديل الأسعار» (owner/bulk-prices.php, js/bulk-prices.js) */
.bp-form:has(input[name="scope"][value="all"]:checked) .bp-cats { display: none; }   /* the categories only when «أقسام محددة» */
.bp-round { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.bp-flags { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0; padding: 0; list-style: none; }
.bp-flags:empty { display: none; }
.bp-list { display: grid; }
.bp-item { display: grid; gap: 8px; padding-block: 12px; border-block-start: 1px solid var(--line); }
.bp-item:first-child { border-block-start: 0; padding-block-start: 0; }
.bp-item__head { align-items: center; flex-wrap: wrap; gap: 6px 8px; }
.bp-item.is-off .bp-prices { opacity: .45; }
.bp-prices { display: grid; gap: 6px; padding-inline-start: 26px; }
.bp-price { display: grid; grid-template-columns: minmax(0, 1fr) auto auto minmax(88px, 120px) minmax(56px, auto); align-items: center; gap: 4px 10px; }
.bp-price > .badge, .bp-price__compare { grid-column: 1 / -1; justify-self: start; }
.bp-price__label { min-width: 0; overflow-wrap: anywhere; }
.bp-price__old { color: var(--ink-500); white-space: nowrap; }
.bp-price__arrow { width: 16px; height: 16px; color: var(--ink-500); }
.bp-price__new { min-height: 40px; padding-inline: 10px; text-align: end; }
.bp-price__pct { font-size: 13px; color: var(--ink-600); text-align: end; white-space: nowrap; }
.bp-price.is-same .bp-price__pct { color: var(--ink-500); }
.bp-price.is-manual .bp-price__new { border-color: var(--brand-600); box-shadow: 0 0 0 1px var(--brand-600); }
.bp-price__new[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
@media (max-width: 480px) {
  .bp-prices { padding-inline-start: 0; }
  .bp-price { grid-template-columns: auto auto minmax(0, 1fr) auto; }
  .bp-price__label { grid-column: 1 / -1; font-weight: 600; }
}
.bp-save { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bp-history { display: grid; margin: 0; padding: 0; list-style: none; }
.bp-history__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding-block: 12px; border-block-start: 1px solid var(--line); }
.bp-history__row:first-child { border-block-start: 0; padding-block-start: 0; }
.bp-history__what { display: grid; gap: 4px; min-width: 0; }
/* DEC-258: «منيو الفرع» (owner/branch-menu.php, js/branch-menu.js) */
.bm-cat .card-header { flex-wrap: wrap; gap: 8px; }
.bm-price { width: 100%; max-width: 130px; min-height: 40px; }
.bm-cat tr.is-out td { opacity: .55; }
.bm-cat tr.is-out td:nth-child(2) { opacity: 1; }
.bm-save { position: sticky; bottom: 0; z-index: 5; padding: 12px 0; background: linear-gradient(transparent, var(--page) 35%); }
/* DEC-256: «خطوات الطلب ورسالة الواتساب» (owner/ordering.php, js/order-form.js) */
.of-group { display: grid; gap: 10px; min-width: 0; margin: 0; padding: 0; border: 0; }
.of-asks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 12px; }
.of-types { display: grid; gap: 10px; }
.of-type { display: grid; grid-template-columns: minmax(120px, 160px) minmax(0, 1fr); align-items: center; gap: 12px; }
@media (max-width: 480px) { .of-type { grid-template-columns: minmax(0, 1fr); gap: 6px; } }
.of-group .is-muted { opacity: .5; }
.of-type__table { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 220px); align-items: center; gap: 4px 10px; padding-inline-start: 26px; }
.of-type__table .hint { grid-column: 1 / -1; }
.of-checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 6px 16px; }
.of-preview { display: grid; gap: 8px; }
.of-preview[hidden] { display: none; }
.of-preview > .label { display: inline-flex; align-items: center; gap: 6px; }
.of-preview__text { max-height: 360px; margin: 0; padding: 14px 16px; overflow: auto; border: 1px solid var(--line); border-inline-start: 4px solid var(--whatsapp); border-radius: var(--r-md); background: var(--surface-2); color: var(--ink-900); font: inherit; font-size: 14px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.od-cash { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface-2); }
.od-cash > div { display: grid; gap: 2px; }
.od-cash small { color: var(--ink-600); font-size: 13px; }
.od-account { margin-top: 4px; }
.od-keys { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.od-providers { display: flex; flex-wrap: wrap; gap: 8px; }
.od-provider { cursor: pointer; }
.od-provider input { position: absolute; opacity: 0; }
.od-provider > span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border: 1.5px solid var(--line); border-radius: var(--r-pill); background: var(--surface); font-weight: 600; font-size: 14px; }
.od-provider input:checked + span { border-color: var(--brand-500); background: var(--brand-50); color: var(--brand-ink); }
.od-provider input:focus-visible + span { outline: 3px solid var(--brand-500); outline-offset: 2px; }
.od-provider.is-soon { cursor: not-allowed; opacity: .6; }
.od-provider small { padding: 1px 6px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink-600); font-size: 12px; }
.od-remove { margin: 0; }

/* UX review 2026-10-28: a link standing alone in a card header is a finger-sized target on a phone. */
.card-header > a.small { display: inline-flex; align-items: center; min-height: 36px; }

/* DEC-145 — «تطبيق الكابتن»: a captain's phone. One column, the order bar fixed at the bottom, every target ≥ 44px. */
.waiter-body { margin: 0; min-height: 100vh; background: var(--page); }
.waiter-login { max-width: 420px; margin: 0 auto; padding: 32px 16px; display: grid; gap: 16px; }
.waiter-login__head { text-align: center; display: grid; gap: 4px; justify-items: center; }
.waiter-login__head h1 { margin: 0; font-size: 22px; }
.waiter-pin { font-size: 24px; letter-spacing: 8px; text-align: center; }
.waiter { max-width: 640px; margin: 0 auto; padding-bottom: 120px; }
.waiter-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.waiter-bar__who { display: grid; flex: 1; min-width: 0; }
.waiter-bar__who strong, .waiter-bar__title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.waiter-bar__title { margin: 0; font-size: inherit; font-weight: 800; line-height: inherit; }   /* FA-020: the app's heading, same look as before */
.waiter-bar form { margin: 0; }
.waiter-status { margin: 12px 16px 0; }
/* DEC-167: the captain's tables ready in the kitchen */
.waiter-ready { margin: 12px 16px 0; padding: 10px 12px; border-radius: var(--r-md); background: var(--success-bg); border: 1.5px solid var(--success); display: grid; gap: 4px; }
.waiter-ready[hidden] { display: none; }
.waiter-ready__row { margin: 0; font-weight: 800; }
.waiter-cats { display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px; scrollbar-width: none; }
.waiter-chip { flex: none; min-height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); color: var(--ink-700); font: inherit; font-weight: 600; cursor: pointer; }
.waiter-chip.is-on { background: var(--ink-900); border-color: var(--ink-900); color: #fff; }
.waiter-items { display: grid; gap: 8px; padding: 0 16px; }
.waiter-loading { padding: 24px 0; text-align: center; }
.waiter-item { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.waiter-item.is-off { opacity: .55; }
.waiter-item__info { display: grid; flex: 1; min-width: 0; }
.waiter-qty { display: flex; align-items: center; gap: 8px; }
.waiter-qty .btn { min-width: 44px; min-height: 44px; font-size: 20px; padding: 0; justify-content: center; }
.waiter-qty__n { min-width: 24px; text-align: center; font-weight: 700; }
.waiter-recent { padding: 16px; }
.waiter-recent h2 { margin: 0 0 8px; }
.waiter-recent ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
/* DEC-228: the captain's «لوحتي» and the iPhone's install steps */
.waiter-ios { margin: 8px 16px 0; }
.waiter-stats__body { display: grid; gap: 14px; }
.waiter-stats__block h3 { margin: 0 0 6px; font-size: 1rem; }
.waiter-stats__list { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; margin: 0; }
.waiter-stats__list dt { color: var(--ink-600); }
.waiter-stats__list dd { margin: 0; font-weight: 700; text-align: end; }
.waiter-recent__row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 12px; background: var(--surface); border-radius: var(--r-sm); }
.waiter-cart { position: fixed; inset-inline: 0; bottom: 0; z-index: 6; display: flex; align-items: flex-end; gap: 12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: var(--shadow-md); }
.waiter-cart__lines { flex: 1; min-width: 0; }
.waiter-cart__lines summary { min-height: 44px; display: flex; align-items: center; font-weight: 700; cursor: pointer; }
.waiter-cart__lines ul { list-style: none; margin: 0 0 8px; padding: 0; max-height: 40vh; overflow-y: auto; }
.waiter-line { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.waiter-cart > .btn { flex: none; }
.waiter-sheet { width: min(520px, calc(100vw - 32px)); max-height: 85vh; border: 0; border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow-md); }
.waiter-sheet::backdrop { background: rgba(18, 22, 25, .45); }
.waiter-sheet h2 { margin: 0; font-size: 18px; }
.waiter-tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.waiter-tables .btn { min-height: 52px; justify-content: center; font-size: 18px; }
.waiter-opts { border: 0; margin: 0; padding: 0; display: grid; gap: 6px; }
.waiter-opt { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; }
.waiter-opt input { width: 20px; height: 20px; accent-color: var(--brand-500); }

/* DEC-151 — «تطبيق الطيار»: tabs, an order card a thumb can work, and the small map. */
.driver { max-width: 640px; margin: 0 auto; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
.driver-banner { margin: 12px 16px 0; }
.driver-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 12px 16px; }
.driver-tab { min-height: 48px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--ink-700); font: inherit; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; }
.driver-tab.is-on { background: var(--ink-900); border-color: var(--ink-900); color: #fff; }
.driver-tab__n { min-width: 24px; padding: 0 6px; border-radius: var(--r-pill); background: var(--page); color: var(--ink-900); font-size: 13px; line-height: 22px; }
.driver-tab.is-on .driver-tab__n { background: var(--brand-500); color: #fff; }
.driver-map { height: 260px; margin: 0 16px 12px; border-radius: var(--r-md); }
.driver-collected { margin: 0 16px 12px; padding: 12px 14px; border-radius: var(--r-md); background: var(--success-bg); color: var(--success-ink); font-weight: 700; }
/* DEC-221 — «فريق المطعم»: the restaurant's own app for its people */
.team-login { padding-top: 40px; }
.team-brand { display: grid; justify-items: center; gap: 6px; text-align: center; }
.team-brand img { width: 88px; height: 88px; object-fit: contain; border-radius: 22px; background: #fff; border: 1px solid var(--line); padding: 6px; }
.team-brand__mono { display: grid; place-items: center; width: 88px; height: 88px; border-radius: 22px; background: var(--ink-900); color: #fff; font-size: 40px; font-weight: 900; }
.team-brand__mono--sm { width: 44px; height: 44px; border-radius: 12px; font-size: 20px; }
.team-brand h1 { margin: 4px 0 0; font-size: 24px; }
.team-by { text-align: center; }
.team-tiles { display: grid; gap: 10px; }
.team-tile { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); color: var(--ink-900); text-decoration: none; }
.team-tile:hover { border-color: var(--brand-500); }
.team-tile__icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--brand-50); color: var(--brand-ink); }
.team-tile__icon .icon { width: 26px; height: 26px; }
.team-tile__text { display: grid; gap: 2px; }
.team-tile__text strong { font-size: 18px; }
.team-tile__go { font-size: 26px; color: var(--ink-400); }
.team-tile.is-off { opacity: .6; cursor: default; }
.team-tile.is-off:hover { border-color: var(--line); }
.team-tile.is-lan .team-tile__icon { background: var(--ink-900); color: #fff; }
.team-tile.is-opening { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-50); }
.team-auto { justify-self: start; }
.team-card { display: grid; grid-template-columns: 160px 1fr; gap: 18px; align-items: center; margin-bottom: 16px; }
.team-card__qr svg { display: block; width: 160px; height: 160px; background: #fff; border-radius: 12px; padding: 8px; border: 1px solid var(--line); }
@media (max-width: 560px) { .team-card { grid-template-columns: 1fr; justify-items: center; text-align: center; } }
.team-note { margin: 0; }

/* DEC-217 — the driver's shift bar */
.driver-shift { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 16px 0; padding: 10px 14px; border: 1px solid var(--warning-bd, #F5D48A); border-radius: var(--r-md); background: var(--warning-bg, #FFF8E6); color: var(--ink-900); font-weight: 700; }
.driver-shift.is-on { border-color: var(--success-bd, #A6E3BD); background: var(--success-bg); color: var(--success-ink); }
.driver-shift span { display: inline-flex; align-items: center; gap: 6px; }
/* DEC-212 — «حسابي» in the driver app */
a.driver-tab { text-decoration: none; }
.driver-me__big { margin: 0; font-size: 2rem; font-weight: 800; color: var(--ink-900); }
.driver-me__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 12px; }
.driver-me__grid div { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); }
.driver-me__grid dt { font-size: .85rem; color: var(--ink-600); }
.driver-me__grid dd { margin: 4px 0 0; font-weight: 800; color: var(--ink-900); }
@media (min-width: 600px) { .driver-me__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.driver-list { display: grid; gap: 10px; padding: 0 16px; }
.driver-empty { padding: 24px 0; text-align: center; }
.driver-card { display: grid; gap: 6px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.driver-card.is-late { border-color: var(--danger); }
.driver-card__head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.driver-card__head strong { font-size: 18px; }
.driver-card__time { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; color: var(--ink-700); font-size: 14px; }
.driver-card__name { margin: 0; font-weight: 700; }
.driver-card__addr { margin: 0; overflow-wrap: anywhere; }
.driver-card__more summary { min-height: 36px; display: flex; align-items: center; cursor: pointer; color: var(--ink-700); }
.driver-card__more ul { margin: 0 0 6px; padding-inline-start: 18px; }
.driver-card__money { margin: 0; font-weight: 800; font-size: 17px; color: var(--brand-ink); }
.driver-card__money.is-paid { color: var(--success-ink); }
.driver-card__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.driver-card__actions .btn { min-height: 44px; }
.driver-card__main { flex: 1 1 100%; justify-content: center; }
.driver-card__nospot { flex: 1; }
.delivery-map { height: 300px; border-radius: var(--r-md); }
.delivery-road { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }


/* DEC-148 — «الأقسام» and a member's own permissions: a whole row is the switch. */
.module-toggle { align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.module-toggle input { margin-top: 4px; width: 20px; height: 20px; accent-color: var(--brand-500); }
.module-toggle.is-highlight { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-100); }
.perms { border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; }

/* DEC-148 — a small action next to a line (remove, return), and the week's shifts grid. */
form.inline { display: inline; }
.shift-grid { min-width: 720px; }
.shift-grid td { vertical-align: top; min-width: 96px; }
.shift-grid .shift { display: flex; align-items: center; gap: 4px; margin-block-end: 4px; padding: 2px 6px; border-radius: var(--r-pill); background: var(--page); font-size: 13px; }
.shift-grid .shift form { margin: 0; }
.shift-grid th.is-short { color: var(--danger, #b42318); }
.complaint { border-block-end: 1px solid var(--line); padding-block-end: 12px; }
.complaint:last-child { border-block-end: 0; }
.input-narrow { max-width: 120px; }
.signatures { margin-top: 32px; }
/* DEC-148: a production batch's labels — stickers of 58 × 40 mm, as many as asked. */
.prod-labels { display: flex; flex-wrap: wrap; gap: 4mm; justify-content: center; padding: 4mm; }
.prod-label { width: 58mm; min-height: 38mm; padding: 3mm; border: 1px dashed #000; border-radius: 2mm; display: grid; gap: 1mm; align-content: start; font-size: 11px; line-height: 1.35; color: #000; background: #fff; break-inside: avoid; }
.prod-label__name { margin: 0; font-size: 15px; font-weight: 800; overflow-wrap: anywhere; }
.prod-label__exp { justify-self: start; padding: 1mm 2mm; border: 1.5px solid #000; font-size: 13px; font-weight: 800; }
.prod-label dl { display: grid; grid-template-columns: auto 1fr; gap: 0 3mm; margin: 0; }
.prod-label dd { margin: 0; }
@media print { .print-body:has(.prod-labels) { margin: 0; } .prod-label { border-style: solid; } }
/* DEC-401: a store's barcode labels — A4 sheets (3×8, 4×10) or one label a page for a label printer (40×25, 50×30 mm). */
.labels-make { justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.labels-make p { margin: 0; }
.labels-tools { align-items: end; gap: 12px; flex-wrap: wrap; }
@page store-a4 { size: A4; margin: 0; }
@page store-t40 { size: 40mm 25mm; margin: 0; }
@page store-t50 { size: 50mm 30mm; margin: 0; }
.store-labels { display: grid; justify-content: center; color: #000; background: #fff; }
.store-labels--a4-24, .store-labels--a4-40 { page: store-a4; width: 210mm; padding: 8.5mm 0; }
.store-labels--a4-24 { grid-template-columns: repeat(3, 70mm); grid-auto-rows: 35mm; }
.store-labels--a4-40 { grid-template-columns: repeat(4, 52.5mm); grid-auto-rows: 28mm; }
.store-labels--t40x25 { page: store-t40; grid-template-columns: 40mm; grid-auto-rows: 25mm; }
.store-labels--t50x30 { page: store-t50; grid-template-columns: 50mm; grid-auto-rows: 30mm; }
.store-label { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3mm; padding: 1.5mm 2mm; overflow: hidden; text-align: center; line-height: 1.15; font-size: 8pt; break-inside: avoid; outline: 1px dashed #bbb; }
.store-labels--t40x25 .store-label, .store-labels--t50x30 .store-label { break-after: page; outline: 0; }
.store-label p { margin: 0; max-width: 100%; }
.store-label__name { font-weight: 800; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.store-label__variant { font-size: 7.5pt; }
.store-label__price { font-weight: 800; font-size: 10pt; }
.store-label__bars { width: 92%; height: 8.5mm; }
.store-labels--a4-24 .store-label__bars, .store-labels--t50x30 .store-label__bars { height: 11mm; }
.store-labels--t40x25 .store-label { font-size: 7pt; }
.store-labels--t40x25 .store-label__bars { height: 7.5mm; }
.store-label__bars svg { display: block; width: 100%; height: 100%; }
.store-label__code { font-size: 6.5pt; letter-spacing: .3px; white-space: nowrap; }
@media print { .print-body:has(.store-labels) { margin: 0; } .store-label { outline: 0; } }
/* DEC-148: a budget's bar (how much of it is spent). */
progress.progress { width: 100%; height: 10px; border: 0; border-radius: 999px; background: var(--line); overflow: hidden; accent-color: var(--brand-500); }
progress.progress::-webkit-progress-bar { background: var(--line); border-radius: 999px; }
progress.progress::-webkit-progress-value { background: var(--brand-500); border-radius: 999px; }
progress.progress::-moz-progress-bar { background: var(--brand-500); border-radius: 999px; }
/* DEC-148: alerts — a line each, coloured by how grave it is. */
.alerts-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.alerts-list__item a { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: var(--r-md); border: 1px solid var(--line); border-inline-start-width: 4px; color: inherit; text-decoration: none; background: var(--surface); }
.alerts-list__item a:hover, .alerts-list__item a:focus-visible { background: var(--surface-2); }
.alerts-list__item .icon { flex: none; margin-block-start: 2px; }
.alerts-list__item--danger a { border-inline-start-color: #d92d20; }
.alerts-list__item--danger .icon { color: #d92d20; }
.alerts-list__item--warning a { border-inline-start-color: #dc6803; }
.alerts-list__item--warning .icon { color: #dc6803; }
.alerts-list__item--info a { border-inline-start-color: #1570ef; }
.alerts-list__item--info .icon { color: #1570ef; }
/* DEC-181 — «ابدأ هنا»: an app's first steps as a numbered list; a done step is ticked and quieter. */
.app-start { border: 1px solid var(--brand-100); background: var(--brand-50); }
.app-start__steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.app-start__steps a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 6px 10px; border-radius: var(--r-md); color: var(--ink-900); font-weight: 600; text-decoration: none; background: var(--surface); }
.app-start__steps a:hover { box-shadow: inset 0 0 0 1px var(--brand-500); }
.app-start__mark { flex: 0 0 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-500); color: #fff; font-size: 13px; font-weight: 800; }
.app-start__mark .icon { width: 16px; height: 16px; }
.app-start__steps .is-done a { color: var(--ink-500); font-weight: 500; }
.app-start__steps .is-done .app-start__mark { background: var(--success-bg); color: var(--success-ink); }
/* DEC-181: how many of each level, above the three shown — the colour is never the only signal (the word says it). */
.alerts-levels { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.alerts-levels__item { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: var(--r-pill); font-size: 13px; font-weight: 700; }
.alerts-levels__item--danger { background: #fee4e2; color: #b42318; }
.alerts-levels__item--warning { background: #fef0c7; color: #93370d; }
.alerts-levels__item--info { background: #d1e9ff; color: #175cd3; }
/* DEC-156: «رادار التنبيهات الحمراء» — today's, newest first */
.red-list__icon { color: #d92d20; }
.red-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.red-list__item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 12px; border-radius: var(--r-md); border: 1px solid var(--line); border-inline-start: 4px solid #dc6803; background: var(--surface); }
.red-list__item--void_paid, .red-list__item--kitchen_late { border-inline-start-color: #d92d20; }
.red-list__item span { grid-column: 1; font-size: 14px; overflow-wrap: anywhere; }
.red-list__item time { grid-column: 2; grid-row: 1; font-size: 13px; }
/* DEC-148: the room's areas and a table booked for now. */
.pos-tables__area { grid-column: 1 / -1; margin: 8px 0 0; font-size: 14px; color: var(--ink-700); }
.pos-table.is-reserved { border-color: var(--warning); background: var(--warning-bg); }
/* DEC-157 — each table's stage in its colour (text stays dark on the tint: WCAG AA), the bill waited for too long pulses */
.pos-table.is-stage-ordering, .pos-table.is-stage-calling, .pos-legend__item.is-stage-ordering { border-color: #1570ef; background: #eff8ff; }
.pos-table.is-stage-kitchen, .pos-legend__item.is-stage-kitchen { border-color: #dc6803; background: #fffaeb; }
.pos-table.is-stage-served, .pos-legend__item.is-stage-served { border-color: #079455; background: #ecfdf3; }
.pos-table.is-stage-bill, .pos-legend__item.is-stage-bill { border-color: #d92d20; background: #fef3f2; }
.pos-table.is-late { border-width: 3px; animation: pos-late 1.2s ease-in-out infinite; }
@keyframes pos-late { 50% { box-shadow: 0 0 0 4px rgba(217, 45, 32, .25); } }
@media (prefers-reduced-motion: reduce) { .pos-table.is-late { animation: none; } }
.pos-table__stage { font-size: 12px; font-weight: 700; }
.pos-legend { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 4px; padding: 0; list-style: none; }
.pos-legend__item { padding: 2px 10px; border: 1.5px solid; border-radius: 999px; font-size: 12px; font-weight: 700; }
/* DEC-148: the shop's order numbers screen (a TV): being made on one side, ready big on the other. */
.screen-body { margin: 0; min-height: 100vh; background: #101418; color: #fff; }
.order-screen { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr; min-height: 100vh; }
.order-screen__head { grid-column: 1 / -1; padding: 16px 24px; text-align: center; border-bottom: 1px solid #2a323a; }
.order-screen__head h1 { margin: 0; font-size: clamp(22px, 3vw, 40px); }
.order-screen__col { padding: 20px 24px; }
.order-screen__col h2 { margin: 0 0 16px; font-size: clamp(20px, 2.6vw, 36px); color: #c9d1d9; }
.order-screen__col--ready { background: #0f2a1d; }
.order-screen__col--ready h2 { color: #6ee7a8; }
.order-screen__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.order-screen__list li { padding: 14px 8px; border-radius: 14px; background: #1c232b; text-align: center; font-size: clamp(32px, 5vw, 64px); font-weight: 800; }
.order-screen__col--ready .order-screen__list li { background: #14532d; }
.order-screen__empty { font-size: 32px; color: #6b7785; }
@media (max-width: 640px) { .order-screen { grid-template-columns: 1fr; } }

/* DEC-148: a long address (a webhook URL) breaks instead of widening the page. */
.wrap-anywhere { min-width: 0; overflow-wrap: anywhere; }

/* DEC-148: «خريطة الطاولات» — the owner's editor and the cashier's map (columns from the right, as the room reads). */
.floor-board { display: grid; grid-template-columns: repeat(var(--floor-cols, 8), minmax(0, 1fr)); gap: 6px; }
.floor-cell { display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 44px; aspect-ratio: 4 / 3; padding: 2px; border: 1px dashed var(--line); border-radius: var(--r-md); background: var(--surface); cursor: pointer; }
.floor-cell:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; }
.floor-tray { display: flex; flex-wrap: wrap; gap: 6px; min-height: 48px; padding: 6px; border: 1px dashed var(--line); border-radius: var(--r-md); }
.floor-chip { min-width: 40px; min-height: 36px; max-width: 100%; padding: 4px 8px; overflow: hidden; border: 1.5px solid var(--brand-500); border-radius: var(--r-md); background: var(--brand-50); color: inherit; font: inherit; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; cursor: grab; }
.floor-chip[aria-pressed="true"] { outline: 3px solid var(--brand-500); outline-offset: 1px; }
.pos-floor { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(var(--floor-cols, 8), minmax(0, 1fr)); gap: 6px; }
.pos-floor .pos-table { min-width: 0; padding: 6px; }
.pos-floor .pos-table strong { font-size: 15px; }
@media (max-width: 600px) { .floor-board, .pos-floor { gap: 3px; } .floor-chip { min-width: 0; padding: 2px 4px; font-size: 12px; } }
/* DEC-160 — «الهالك» of the week: name and value per line */
.waste-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.waste-list li { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
/* DEC-161 — «تنسيق خروج الأطباق»: a line told to wait, or to start now; the items' minutes on the settings page */
.kitchen-sync { display: inline-block; margin-inline-start: 6px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1.5px solid; }
.kitchen-sync.is-wait { border-color: #dc6803; background: #fffaeb; color: #93370d; }
.kitchen-sync.is-go { border-color: #079455; background: #ecfdf3; color: #05603a; }
.prep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 16px; }
.prep-grid__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; }
.prep-grid__row .input { width: 84px; flex: none; }
/* DEC-163: a slow hour on «نبض النهارده» (the words carry it, the colour only marks it) */
.pulse__slow { padding: 4px 8px; border-radius: var(--r-sm); background: var(--warning-bg); font-size: 13px; }
/* DEC-165 — a campaign's send list: who, his own message, and the button */
.send-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.send-list__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto; gap: 8px 16px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.send-list__row.is-sent { background: var(--surface-2); }
.send-list__who { display: grid; gap: 2px; min-width: 0; }
.send-list__text { margin: 0; overflow-wrap: anywhere; }
.send-list__do { display: flex; gap: 6px; align-items: center; }
@media (max-width: 720px) { .send-list__row { grid-template-columns: minmax(0, 1fr); } }
/* DEC-166 — buying a domain: the name offered, then the restaurant's orders */
.domain-offer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1.5px solid var(--success); border-radius: var(--r-md); background: var(--success-bg); }
.domain-offer__name { font-size: 18px; font-weight: 800; margin-inline-end: 8px; }
.domain-orders { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.domain-orders li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--line); }

/* DEC-170 — «التطبيقات»: the menu as the base, then one card per app */
.app-base { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.app-base__text { display: flex; flex-direction: column; gap: 2px; flex: 1 1 200px; }
.app-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.app-card { display: flex; flex-direction: column; gap: 12px; }
.app-card__head { display: flex; align-items: center; gap: 12px; }
.app-card__head h2 { margin: 0 0 4px; font-size: 1.05rem; }
.app-card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.app-card__price { font-weight: 700; color: var(--ink-900, inherit); }
.app-card.is-highlight { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-50); }
/* DEC-172 — each app's own stage: the buy buttons wrap on a phone, a stopped app is dimmed and says why */
.app-card__price { margin: 0; }
.app-card__foot form, .app-card__manage form { margin: 0; }
.app-card__buy { display: flex; gap: 8px; flex-wrap: wrap; }
.app-card__manage { display: flex; justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 8px; }
.app-card__note { display: flex; gap: 6px; align-items: flex-start; margin: 0; color: var(--ink-600); }
.app-card.is-stopped { background: var(--surface-2); }
/* DEC-175 — the cart and the bundles: lines that wrap on a phone, the total and the pay button at the foot */
.app-cart { margin-bottom: 16px; }
.app-cart__lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.app-cart__lines li { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.app-cart__name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; flex: 1 1 200px; }
.app-cart__amount { font-weight: 700; }
.app-cart__actions { display: flex; align-items: center; gap: 4px; }
.app-cart__actions form, .app-bundle form { margin: 0; }
.app-cart__align { margin: 12px 0 0; }
.app-cart__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.app-bundles { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); margin-bottom: 16px; }
.app-bundle { display: flex; flex-direction: column; gap: 8px; }
.app-bundle h2 { margin: 0; font-size: 1.05rem; }
.app-bundle s { margin-inline-start: 6px; }
.pay-lines { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pay-lines li { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
/* DEC-173 — the admin's view of a restaurant's apps: one line each, wrapping on a phone */
.app-stages { display: flex; flex-wrap: wrap; gap: 8px 16px; list-style: none; padding: 0; margin: 0 0 12px; }
.app-stages li { display: flex; align-items: center; gap: 6px; }
.module-toggle.is-locked { display: flex; background: var(--surface-2); color: var(--ink-600); }
.module-toggle.is-locked > .icon { margin-top: 4px; flex: none; }

/* A keyboard user's first stop: straight to the page's content (hidden until focused). */
.skip-link { position: absolute; inset-inline-start: 12px; top: -64px; z-index: 1000; padding: 10px 16px; border-radius: var(--r-md); background: var(--brand-ink); color: #fff; font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 12px; }
.content:focus { outline: none; }   /* focused by the skip link only, not a control */

/* ---------- Confirm dialog (dashboard.js askConfirm, FA-010) and the error summary (partials/flash, FA-008) ---------- */
.confirm-dialog { width: min(440px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: var(--radius-lg); box-shadow: var(--elev-3); background: var(--color-surface); color: var(--color-text); }
.confirm-dialog::backdrop { background: var(--color-overlay); }
.confirm-dialog__box { display: grid; gap: var(--space-3); padding: var(--space-6); }
.confirm-dialog__title { margin: 0; font-size: var(--text-h2); line-height: var(--lh-h2); }
.confirm-dialog__body { margin: 0; color: var(--color-text-2); font-size: var(--text-body); line-height: var(--lh-body); white-space: pre-line; }
.confirm-dialog__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-block-start: var(--space-2); }
.confirm-dialog__actions .btn { min-height: var(--target-min); }
.error-summary { align-items: flex-start; }
.error-summary__list { display: grid; gap: 2px; margin: var(--space-2) 0 0; padding-inline-start: var(--space-5); }
.error-summary__list a { color: inherit; text-decoration: underline; }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); }

/* ---------- Breadcrumbs (layouts/dashboard.php, FA-003) ---------- */
.breadcrumbs { margin-block-end: var(--space-3); font-size: var(--text-sm); line-height: var(--lh-sm); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); margin: 0; padding: 0; list-style: none; color: var(--color-text-muted); }
.breadcrumbs li { display: inline-flex; align-items: center; gap: var(--space-2); }
.breadcrumbs li + li::before { content: "‹"; color: var(--color-border-strong); }   /* RTL: the step points back towards the start */
.breadcrumbs a { color: var(--color-text-2); }
.breadcrumbs [aria-current="page"] span { color: var(--color-text); font-weight: 700; }
/* The restaurant and branch switches in the top bar (FA-007) */
.topbar-switch { display: flex; align-items: center; min-width: 0; }
.topbar-switch .select { max-width: 200px; min-height: 40px; }
@media (max-width: 640px) { .topbar-switch .select { max-width: 132px; } }

/* ---------- Command menu (Ctrl+K, FA-007) ---------- */
.topbar-search { gap: var(--space-2); }
.topbar-kbd { padding: 0 6px; border: 1px solid var(--color-border); border-radius: 6px; background: var(--color-surface-sunken); color: var(--color-text-muted); font: 600 11px/18px var(--font); direction: ltr; }
@media (max-width: 640px) { .topbar-kbd { display: none; } }
.cmdk { width: min(640px, calc(100vw - 24px)); max-height: min(560px, calc(100vh - 48px)); margin-block-start: 10vh; padding: 0; border: 0; border-radius: var(--radius-lg); box-shadow: var(--elev-3); background: var(--color-surface); color: var(--color-text); }
.cmdk::backdrop { background: var(--color-overlay); }
.cmdk__box { display: flex; flex-direction: column; max-height: inherit; }
.cmdk__field { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-3) var(--space-4); border-block-end: 1px solid var(--color-border); }
.cmdk__field > .icon { color: var(--color-text-muted); }
.cmdk__input { flex: 1; min-width: 0; min-height: var(--target-min); border: 0; background: transparent; font-size: 16px; }
.cmdk__input:focus { outline: none; }   /* the dialog is the focused context; the field keeps the caret */
.cmdk__field:focus-within { box-shadow: inset 0 -2px 0 var(--color-focus); }
.cmdk__list { flex: 1; overflow-y: auto; margin: 0; padding: var(--space-2); list-style: none; }
.cmdk__group { padding: var(--space-3) var(--space-3) var(--space-1); color: var(--color-text-muted); font-size: var(--text-xs); font-weight: 800; }
.cmdk__option { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: var(--target-min); padding: 0 var(--space-3); border-radius: var(--radius-sm); cursor: pointer; }
.cmdk__option[aria-selected="true"] { background: var(--color-brand-50); box-shadow: inset 3px 0 0 var(--color-brand-ink); }
.cmdk__hint { color: var(--color-text-muted); font-size: var(--text-xs); }
.cmdk__empty { margin: 0; padding: var(--space-4); color: var(--color-text-muted); }

/* DEC-282 — the assistant's list («ماذا تريد أن تفعل؟»): a dialog in the middle on wide screens, a bottom sheet on phones. */
.guide { width: min(720px, calc(100vw - 24px)); max-height: min(720px, calc(100dvh - 48px)); padding: 0; border: 0; border-radius: var(--radius-lg); box-shadow: var(--elev-3); background: var(--color-surface); color: var(--color-text); }
.guide::backdrop { background: var(--color-overlay); }
.guide[open] { display: flex; }
.guide__box { display: flex; flex-direction: column; width: 100%; max-height: inherit; min-height: 0; }
.guide__head { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-5) var(--space-5) var(--space-3); }
.guide__mark { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: var(--radius-md); background: var(--color-brand-50); color: var(--color-brand-ink); }
.guide__intro { flex: 1; min-width: 0; }
.guide__title { margin: 0; font-size: var(--text-h2); line-height: var(--lh-h2); }
.guide__lead { margin: var(--space-1) 0 0; color: var(--color-text-2); font-size: var(--text-sm); line-height: var(--lh-sm); }
.guide__close { flex: none; width: var(--target-min); height: var(--target-min); }
.guide__search { display: flex; align-items: center; gap: var(--space-2); margin: 0 var(--space-5) var(--space-3); padding: 0 var(--space-3); border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); color: var(--color-text-muted); }
.guide__search:focus-within { border-color: var(--color-focus); box-shadow: 0 0 0 3px var(--color-brand-100); }
.guide__input { flex: 1; min-width: 0; min-height: var(--target-min); border: 0; background: transparent; color: var(--color-text); font: inherit; font-size: 16px; }   /* 16px: no zoom on iPhone */
.guide__input:focus { outline: none; }
.guide__body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 var(--space-5) var(--space-5); }
.guide__sec { display: grid; gap: var(--space-2); padding-block: var(--space-3); border-block-start: 1px solid var(--color-border); }
.guide__sec:first-child { border-block-start: 0; padding-block-start: 0; }
.guide__sec[hidden], .guide__group[hidden], .guide__list li[hidden] { display: none; }
.guide__sec-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); flex-wrap: wrap; }
.guide__sec-title { margin: 0; color: var(--color-text-muted); font-size: var(--text-xs); font-weight: 800; letter-spacing: 0; }
.guide__sec-lead { margin: 0; color: var(--color-text-2); font-size: var(--text-sm); }
.guide__list { display: grid; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
@media (min-width: 641px) { .guide__list--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.guide__opt { display: flex; align-items: center; gap: var(--space-3); width: 100%; min-height: 56px; padding: var(--space-2) var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); color: var(--color-text); font: inherit; text-align: start; text-decoration: none; cursor: pointer; }
.guide__opt:hover { border-color: var(--color-brand-100); background: var(--color-brand-50); }
.guide__opt:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.guide__opt-icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--color-surface-sunken); color: var(--color-brand-ink); }
.guide__opt-text { display: grid; gap: 2px; min-width: 0; }
.guide__opt-text strong { font-size: var(--text-body); line-height: 1.4; }
.guide__opt-text span { color: var(--color-text-2); font-size: var(--text-sm); line-height: 1.5; }
.guide__group { border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.guide__group[open] { padding-block-end: var(--space-2); }
.guide__group-title { display: flex; align-items: center; gap: var(--space-2); min-height: var(--target-min); padding: 0 var(--space-3); font-weight: 700; cursor: pointer; list-style: none; }
.guide__group-title::-webkit-details-marker { display: none; }
.guide__group-title > span:first-child { flex: 1; }
.guide__group-title .icon { transition: transform .2s; }
.guide__group[open] > .guide__group-title .icon { transform: rotate(180deg); }
.guide__count { min-width: 24px; padding: 0 6px; border-radius: var(--radius-pill); background: var(--color-surface-sunken); color: var(--color-text-muted); font-size: var(--text-xs); text-align: center; }
.guide__group-body { margin: 0 var(--space-3) var(--space-2); color: var(--color-text-2); font-size: var(--text-sm); }
.guide__group > .guide__list { padding: 0 var(--space-2); }
.guide__group-tour { min-height: var(--target-min); margin: var(--space-1) var(--space-3) 0; }
.guide__none { margin: 0; padding: var(--space-4) 0; color: var(--color-text-muted); text-align: center; }
@media (max-width: 640px) {
  .guide { width: 100%; max-width: 100%; max-height: 88dvh; margin: auto 0 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .guide__head { padding: var(--space-4) var(--space-4) var(--space-3); }
  .guide__search { margin: 0 var(--space-4) var(--space-3); }
  .guide__body { padding: 0 var(--space-4) calc(var(--space-4) + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { .guide__group-title .icon { transition: none; } }

/* ---------- «المطلوب منك» on the home page (FA-006) ---------- */
.needs__list { display: grid; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.needs__item { display: flex; align-items: center; gap: var(--space-3); min-height: 52px; padding: var(--space-2) var(--space-3); border: 1px solid var(--color-border); border-inline-start-width: 4px; border-radius: var(--radius-md); background: var(--color-surface); }
.needs__item--danger { border-inline-start-color: var(--color-danger); }
.needs__item--warning { border-inline-start-color: var(--color-warning); }
.needs__item--info { border-inline-start-color: var(--color-info); }
.needs__icon { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: var(--radius-sm); background: var(--color-surface-sunken); color: var(--color-text-2); }
.needs__text { flex: 1; min-width: 0; font-weight: 700; }
.needs__none { display: flex; align-items: center; gap: var(--space-2); margin: 0; color: var(--color-success-ink); font-weight: 700; }
.home-section-title { margin: var(--space-6) 0 var(--space-3); font-size: var(--text-h2); line-height: var(--lh-h2); }

/* ---------- «في هذه الصفحة» on long pages (dashboard.js, FA-014) ---------- */
.page-sections { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0 0 var(--space-4); }   /* DEC-234: the links wrap onto a second line — never a bar to scroll sideways */
.page-sections a { flex: none; display: inline-flex; align-items: center; min-height: 36px; padding: 0 var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-pill); background: var(--color-surface); color: var(--color-text-2); font-size: var(--text-sm); font-weight: 700; text-decoration: none; white-space: nowrap; }
.page-sections a:hover { border-color: var(--color-border-strong); }
:target { scroll-margin-block-start: 88px; }   /* a section reached from those links is not hidden under the sticky top bar */
/* The hub tabs stay one row on phones and scroll sideways, like the other tab rows (FA-001/002). */
@media (max-width: 640px) { .hub-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; } .hub-tabs a { flex: none; white-space: nowrap; } }

/* ---------- UI v2: the shell (layouts/dashboard.php) ---------- */
.topbar-start { gap: 10px; }
.avatar { width: 36px; height: 36px; font-size: 14px; }
.topbar-who strong { font-size: 14px; }
.topbar-who .small { font-size: 12px; }
.topbar-search { min-width: min(340px, 36vw); justify-content: flex-start; gap: 8px; background: #F9FAFB; color: var(--ink-500); font-weight: 600; box-shadow: none; }
.topbar-search:hover { color: var(--ink-900); }
.topbar-search .topbar-kbd { margin-inline-start: auto; }
.topbar-end { gap: 6px; }
.topbar-end .btn { min-height: 36px; min-width: 36px; padding: 0 9px; }
.topbar-end .topbar-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }   /* icon buttons; the name stays for screen readers and in the tooltip */
/* DEC-282: the assistant stands out in the bar — the brand's tint, its name shown where there is room, and a 44px hit area. */
.topbar-end .guide-open { position: relative; border-color: var(--color-brand-100); background: var(--color-brand-50); color: var(--color-brand-ink); }
.topbar-end .guide-open::after { content: ""; position: absolute; inset: -4px; }
@media (min-width: 1025px) { .topbar-end .guide-open .topbar-label { position: static; width: auto; height: auto; overflow: visible; clip: auto; } }
/* «ثبّت التطبيق» is in sight until the app is installed (tour.js): filled with the brand so an owner looking for it finds it. */
.topbar-end [data-app-install] { position: relative; border-color: var(--color-brand-ink, #6D28D9); background: var(--color-brand-ink, #6D28D9); color: #fff; }   /* 5.3:1, as .btn-primary */
.topbar-end [data-app-install]::after { content: ""; position: absolute; inset: -4px; }
@media (min-width: 1025px) { .topbar-end [data-app-install] .topbar-label { position: static; width: auto; height: auto; overflow: visible; clip: auto; } }
@media (max-width: 640px) { .topbar-search { min-width: 0; } .topbar-search .topbar-label { display: none; } }
.sidebar .logo { margin: 0; color: var(--ink-900); }
.content .page-head h1 { font-size: 24px; }
.grid-kpis .kpi { flex-direction: row-reverse; justify-content: space-between; align-items: flex-start; }   /* the number leads; the icon is a small mark at the end */
.card-header h2, .card-header h3 { display: flex; align-items: center; gap: 8px; }
.card-header h2 > .icon, .card-header h3 > .icon { width: 18px; height: 18px; color: var(--ink-500); flex: none; }
.page-sections a { min-height: 32px; padding: 0 10px; border: 0; background: #EEF1F4; color: var(--ink-700); font-size: 13px; }
.page-sections a:hover { background: #E4E7EC; }
/* The platform's own panel keeps Dnairo's colours like every other dashboard (DEC-234: the owner wants no blue); it is told
   apart by its menu («لوحة الأدمن») and the «مدير المنصة» line under the name in the top bar. */

/* ---------- UI v2: the kitchen display (owner/orders-kitchen.php) ----------
   Full screen on a wall or a tablet: dark so the tickets stand out, large lines, the state in the ticket's head band
   (in words too — «متأخر» — never colour alone), the two steps as big buttons. */
.dash--focus:has(.kds), .dash--focus:has(.kds) .main { background: #0F1419; }
.kds { display: grid; gap: 14px; color: #E6E9EE; }
.kds .page-head h1 { color: #fff; font-size: 22px; }
.kds .page-head p, .kds .muted, .kds .small { color: #98A2B3; }
.kds .btn-secondary { background: #1D242C; border-color: #344054; color: #E6E9EE; box-shadow: none; }
.kds .btn-secondary:hover { background: #26303A; border-color: #475467; }
.kds .btn-link { color: #FFB38A; }
.kds .pf-tabs { border-block-end-color: #26303A; }
.kds .pf-tabs a { color: #98A2B3; }
.kds .pf-tabs a.is-active { color: #FFB38A; border-block-end-color: #FF8A4C; }
.kds .kitchen-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.kds .kitchen-ticket { gap: 12px; padding: 0 0 14px; overflow: hidden; background: #161D24; border: 1px solid #26303A; border-top: 0; border-radius: 12px; box-shadow: none; color: #F2F4F7; }
.kds .kitchen-ticket > :not(.kitchen-ticket__head) { margin-inline: 16px; }
.kds .kitchen-ticket__head { padding: 12px 16px; background: #1E3A8A; color: #fff; }
.kds .kitchen-ticket--preparing .kitchen-ticket__head { background: #8A5A00; }
.kds .kitchen-ticket.is-late .kitchen-ticket__head { background: #991B1B; }
.kds .kitchen-ticket.is-late { box-shadow: 0 0 0 2px #EF4444; }
.kds .kitchen-ticket.is-rush { outline: 3px solid #FF8A4C; outline-offset: -3px; }
.kds .kitchen-ticket__head strong { font-size: 28px; }
.kds .kitchen-ticket__time, .kds .kitchen-ticket__time.is-late { color: #fff; }
.kds .kitchen-ticket__lines { font-size: 20px; gap: 10px; }
.kds .kitchen-ticket__lines b { color: #FFB38A; }
.kds .kitchen-ticket__lines small { color: #98A2B3; font-size: 15px; }
.kds .kitchen-ticket__note { color: #FCD34D; }
.kds .kitchen-ticket .btn { min-height: 52px; font-size: 16px; }
.kds .kitchen-ticket .btn-link { min-height: auto; font-size: 14px; }
.kds .empty-state { background: #161D24; border-color: #26303A; color: #98A2B3; }
.dash--focus .breadcrumbs { display: none; }   /* full-screen work (the cashier, the kitchen) leaves by its own button */

/* ---------- UI v2: a list of people (owner/hr.php; reusable) ---------- */
.people-list { display: grid; margin: 0; padding: 0; list-style: none; }
.people-list__row { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-block-end: 1px solid var(--line); }
.people-list__row:last-child { border-block-end: 0; }
.people-list__row.is-inactive { opacity: .6; }
.people-list__avatar { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 50%; background: var(--color-brand-50, #F5F0FF); color: var(--brand-ink); font-weight: 800; }
.people-list__main { display: grid; flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.people-list__main strong { color: var(--ink-900); font-size: 14.5px; }
.people-list__main span { color: var(--ink-500); font-size: 13px; }
.people-list__main:hover strong { color: var(--brand-ink); text-decoration: underline; }
.people-list__tags { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
/* A level bar: how much is left against the minimum (inventory) — the number is in the row, the bar shows it at a glance. */
.level-bar { display: block; width: 100%; min-width: 64px; height: 6px; overflow: hidden; border-radius: 999px; background: #EEF1F4; }
.level-bar > span { display: block; width: var(--pct, 0%); height: 100%; border-radius: inherit; background: var(--warning); }

/* DEC-234 — platform settings in sections: a side list (sticky on a wide screen; two columns of tiles on a phone — never a bar
   that scrolls sideways) and one section at a time (dashboard.js); without JavaScript every section shows, one under another. */
.settings-shell { display: grid; gap: 20px; align-items: start; }
.settings-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.settings-nav__group { display: contents; }
.settings-nav__title { display: none; margin: 0; padding: 0 12px; font-size: 12px; font-weight: 700; color: var(--ink-500); }
.settings-nav__link { position: relative; display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 48px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--ink-700); text-decoration: none; }
.settings-nav__link:hover { border-color: var(--color-border-strong, #D0D5DD); color: var(--ink-900); }
.settings-nav__link .icon { width: 18px; height: 18px; color: var(--ink-500); }
.settings-nav__text { display: grid; gap: 2px; min-width: 0; }
.settings-nav__text b { font-size: 14px; font-weight: 600; line-height: 1.35; }
.settings-nav__desc { display: none; font-size: 12px; line-height: 1.45; color: var(--ink-500); }
.settings-nav__link[aria-current="true"] { border-color: var(--brand-ink); background: var(--color-brand-50, #F5F0FF); color: var(--brand-ink); }
.settings-nav__link[aria-current="true"] .icon { color: var(--brand-ink); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.status-dot--on { background: var(--success); }
.status-dot--off { background: #98A2B3; }
.settings-panels { min-width: 0; }
.settings-panels > .settings-panel + .settings-panel { margin-block-start: 28px; }   /* without JavaScript: the sections one under another */
.settings-shell.is-tabbed .settings-panel:not(.is-active) { display: none; }
.settings-shell.is-tabbed .settings-panels > .settings-panel + .settings-panel { margin-block-start: 0; }
.settings-panel { max-width: 860px; scroll-margin-top: 76px; }
.settings-panel h2[tabindex="-1"]:focus { outline: none; }
@media (min-width: 1100px) {
  .settings-shell { grid-template-columns: 248px minmax(0, 1fr); gap: 28px; }
  .settings-nav { position: sticky; top: 76px; grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .settings-nav__group { display: grid; gap: 2px; }
  .settings-nav__title { display: block; margin-block-end: 4px; }
  .settings-nav__link { border-color: transparent; background: transparent; align-items: start; }
  .settings-nav__link .icon { margin-block-start: 2px; }
  .settings-nav__link:hover { background: #F2F4F7; border-color: transparent; }
  .settings-nav__link[aria-current="true"] { border-color: transparent; }
  .settings-nav__link[aria-current="true"]::before { content: ""; position: absolute; inset-block: 10px; inset-inline-start: 0; width: 3px; border-radius: 3px; background: var(--brand-ink); }
  .settings-nav__desc { display: block; }
  .status-dot { margin-block-start: 6px; }
}
/* A long form told in parts: a quiet title over each group of fields. */
.form-section-title { margin: 8px 0 0; padding-block-start: 16px; border-block-start: 1px solid var(--line); font-size: 14px; font-weight: 700; color: var(--ink-900); }
.card-header + .form-section-title, .card-header + .hint + .form-section-title { margin-block-start: 0; padding-block-start: 0; border: 0; }
/* WhatsApp set-up: numbered steps (1 what to paste from Meta, 2 the template names, 3 try it). */
.wa-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.wa-step { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 14px; align-items: start; }
.wa-steps > .wa-step + .wa-step { margin-block-start: 20px; padding-block-start: 20px; border-block-start: 1px solid var(--line); }
.wa-step__n { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--color-brand-50, #F5F0FF); color: var(--brand-ink); font-weight: 700; font-size: 15px; }
.wa-step__body { min-width: 0; }
.wa-step__body h3 { margin: 4px 0 0; font-size: 15px; }
.settings-fold { border: 1px solid var(--line); border-radius: var(--r-md); background: #F8FAFC; }
.settings-fold > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px; cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--ink-700); list-style: none; }
.settings-fold > summary::-webkit-details-marker { display: none; }
.settings-fold > summary::after { content: ""; margin-inline-start: auto; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform var(--motion-fast, .15s); flex: none; }
.settings-fold[open] > summary::after { transform: rotate(-135deg); }
.settings-fold > summary .icon { width: 16px; height: 16px; color: var(--ink-500); flex: none; }
.settings-fold > :not(summary) { margin: 0; padding: 4px 14px 14px; }
.settings-fold ol { padding-inline-start: 30px; }
.input-with-btn { display: flex; gap: 8px; align-items: stretch; }
.input-with-btn .input { flex: 1; min-width: 0; }
.input-with-btn .btn { flex: none; }
@media (max-width: 480px) { .input-with-btn { flex-direction: column; } }
.settings-danger { border-color: #F5C2C3; }
.settings-danger h3 { margin: 0; color: var(--danger-ink, #A3171A); }
.key-list { list-style: none; margin: 0; padding: 0; display: grid; }
.key-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 10px 0; border-block-end: 1px solid var(--line); }
.key-list li:last-child { border-block-end: 0; }
.key-list li form { margin-inline-start: auto; }
/* DEC-234: a quiet destructive button for a row (a red fill on every row shouted), and a row action folded behind its button. */
.btn-danger-soft { background: var(--surface); color: var(--danger-ink, #A3171A); border: 1px solid #F5C2C3; }
.btn-danger-soft:hover { background: var(--danger-bg); border-color: var(--danger); color: var(--danger-ink, #A3171A); }
.row-fold > summary { list-style: none; display: inline-flex; }
.row-fold > summary::-webkit-details-marker { display: none; }
.row-fold[open] > summary { margin-block-end: 8px; }
.row-fold form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.row-fold .input { min-width: 180px; flex: 1; }
/* DEC-234: a row with two folded actions (the menu's row on the admin restaurant page): an opened one takes the full width. */
.row-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; }
.row-actions > .row-fold[open] { flex-basis: 100%; }
.row-actions form { margin: 0; }
.row-fold input[type="number"] { min-width: 0; flex: 0 0 88px; }
.app-admin__base td { background: var(--color-brand-50, #F5F0FF); }
@media (max-width: 640px) { .table--cards td.app-admin__no-tick { display: none; } }   /* the menu's row has no tick: no empty «تحديد الكل» line on a phone */
/* DEC-236: the restaurants list's ticks — «تحديد الكل», how many, and «حذف المحدد» at the far end. */
.bulk-bar { margin-block-end: 12px; }
.bulk-bar__go { margin-inline-start: auto; }
.bulk-pick { width: 1%; }
.bulk-pick input { width: 20px; height: 20px; accent-color: var(--brand-500); }

/* DEC-239 — the payment page's three steps, and the guide of the method ticked (CSS :has; without it every guide shows). */
.pay-path { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; counter-reset: none; }
.pay-path__step { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.pay-path__step > span:last-child { display: grid; gap: 2px; min-width: 0; }
.pay-path__n { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--page); color: var(--ink-700); font-weight: 800; font-size: 14px; }
.pay-path__step.is-now { border-color: var(--brand-500); background: var(--brand-50); }
.pay-path__step.is-now .pay-path__n { background: var(--brand-ink); color: #fff; }
.pay-guides { display: grid; gap: 10px; }
.pay-guide { padding: 12px 14px; border-radius: var(--r-md); background: var(--page); }
.pay-guide__title { margin: 0 0 6px; display: flex; align-items: center; gap: 6px; font-weight: 800; color: var(--ink-900); font-size: 14px; }
.pay-guide__list { margin: 0; padding-inline-start: 20px; display: grid; gap: 4px; color: var(--ink-700); font-size: 14px; }
@supports selector(:has(*)) {
  .pay-form .pay-guide { display: none; }
  .pay-form:has(input[data-method="card"]:checked) .pay-guide[data-guide="card"],
  .pay-form:has(input[data-method="wallet"]:checked) .pay-guide[data-guide="wallet"],
  .pay-form:has(input[data-method="fawry"]:checked) .pay-guide[data-guide="fawry"] { display: block; }
}
.pay-path { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* On a phone the three steps sit in one short row (number and title); what each method asks for is under the methods. */
@media (max-width: 767px) {
  .pay-path { gap: 6px; }
  .pay-path__step { flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; text-align: center; }
  .pay-path__step .small { display: none; }
  .pay-path__step strong { font-size: 12.5px; line-height: 1.35; }
}

/* DEC-240 — confirm the email after paying: a calm band (nothing is blocked), its two buttons side by side. */
.status-banner--mail { background: #EEF4FF; color: #1D3F8F; }
.status-banner__text { min-width: 0; overflow-wrap: anywhere; }
.status-banner__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.status-banner__actions form { margin: 0; }

/* DEC-239 — the pounds beside the dollars at the total, and on a phone the total and "pay" kept at the bottom of the screen. */
.pay-egp { color: var(--ink-600); font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.pay-sticky { display: none; }
@media (max-width: 767px) {
  .pay-sticky { position: fixed; inset-inline: 0; bottom: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px -12px rgba(16, 24, 40, .35); }
  .pay-sticky__total { display: grid; line-height: 1.3; }
  .pay-sticky__total strong { font-size: 18px; }
  .pay-sticky .btn { min-height: 48px; padding-inline: 22px; }
  .page-narrow:has(.pay-sticky) { padding-bottom: 84px; }
}

/* DEC-242 — help on WhatsApp on the pay page, for an owner who cannot pay: under the form, and beside "pay" on a phone. */
.pay-help { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin-top: 16px; }
.pay-help__icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: #E7F8EE; color: #128C4A; }
.pay-help__text { flex: 1 1 200px; min-width: 0; }
.pay-help__text p { margin: 2px 0 0; }
.pay-help .btn .icon { color: #128C4A; }
.pay-sticky .pay-sticky__help { flex: none; width: 48px; padding: 0; color: #128C4A; }   /* beats .pay-sticky .btn's padding */
.pay-sticky__help .icon { flex: none; width: 24px; height: 24px; }
@media (max-width: 767px) {
  .pay-help .btn { width: 100%; }
  .pay-sticky__total { margin-inline-end: auto; }
}

/* DEC-242 (the owner: the pay page could be dragged left and right on a phone) — on a phone a field never zooms the page in:
   iOS zooms into any field under 16px when it is tapped (the wallet number, a price), and the page is then dragged sideways.
   And nothing wider than the screen can make it draggable either (clip: no scroll box, so sticky bars still stick). */
@media (max-width: 767px) {
  body { overflow-x: clip; }
}
/* The fields' 16px on every touch screen, the tablets too: Safari on an iPad zooms in under 16px just as an iPhone does. */
@media (max-width: 767px), (pointer: coarse) {
  :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]) { font-size: 16px; }
}

/* DEC-283 — a store's home: the latest orders and what is running out, one row each. */
.store-rows { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.store-rows li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 0; border-block-end: 1px solid var(--line); }
.store-rows li:last-child { border-block-end: 0; }
.store-rows__name { display: grid; min-width: 0; flex: 1 1 140px; }
.store-rows__end { display: inline-flex; align-items: center; gap: 8px; margin-inline-start: auto; }
/* DEC-368: a rating's photos and the store's answer, under its row */
.review-extra { flex: 1 1 100%; display: grid; gap: 8px; min-width: 0; }
.review-extra:not(:has(.review-shots)):not(:has(details[open])) { gap: 0; }
.review-shots { display: flex; flex-wrap: wrap; gap: 6px; }
.review-shots img { display: block; width: 56px; height: 56px; object-fit: cover; border-radius: var(--radius-sm, 8px); border: 1px solid var(--line); }
.review-reply summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--brand, currentColor); font-weight: 600; }
.review-reply[open] summary { margin-block-end: 8px; }
/* DEC-368: a real colour for each of a product's colours (a round picker beside its name) */
.colour-swatches { border: 0; padding: 0; margin: 0; min-width: 0; }
.colour-swatches__list { display: flex; flex-wrap: wrap; gap: 8px; }
.colour-swatch { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface, #fff); cursor: pointer; min-height: 44px; }
.colour-swatch input[type="color"] { inline-size: 34px; block-size: 34px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: none; cursor: pointer; }
.colour-swatch input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.colour-swatch input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 50%; }
.colour-swatch input[type="color"]::-moz-color-swatch { border: 0; border-radius: 50%; }
.colour-swatch input[type="color"]:focus-visible { outline: 2px solid var(--brand, currentColor); outline-offset: 2px; }

/* DEC-286 — a store product's extra photos in its form */
.photo-list { display: grid; gap: 10px; margin: 0 0 12px; padding: 0; list-style: none; }
.photo-list__item { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 10px; align-items: center; }
.photo-list__item img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--r-md); border: 1px solid var(--border, #E5E7EB); }
.photo-list__item .stack { gap: 4px; }

/* DEC-287 — a store's visits funnel */
.funnel { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.funnel__step { display: grid; grid-template-columns: minmax(110px, 30%) minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.funnel__label { font-size: 14px; font-weight: 700; color: var(--ink-700); }
.funnel__bar { display: block; height: 12px; border-radius: 6px; background: #EEF1F4; overflow: hidden; }
.funnel__bar span { display: block; width: var(--w); height: 100%; border-radius: 6px; background: var(--brand-500); }
.funnel__n { min-width: 48px; text-align: left; font-variant-numeric: tabular-nums; }

/* DEC-288 — a store product's quantity offers in its form */
.offer-rows { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; }
.offer-row { display: grid; grid-template-columns: 72px auto 64px auto; align-items: center; gap: 8px; justify-content: start; }
.offer-row .input { min-width: 0; text-align: center; }


/* DEC-302: «حمّل تطبيق الإدارة» always in sight with its name — the whole name on a wide screen, «التطبيق» on a phone — and gone
   only inside the installed app itself */
.topbar-end [data-app-install] { flex: none; gap: 6px; }
.topbar-end .btn[data-app-install] { width: auto; padding-inline: 10px; }   /* the phone's 44px square icon buttons: this one keeps its name */
.topbar-end { min-width: 0; }
.topbar-end [data-app-install] .app-install__short { display: none; }
@media (max-width: 1024px) {
  .topbar-end [data-app-install] .app-install__long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .topbar-end [data-app-install] .app-install__short { display: inline; font-size: 13px; font-weight: 700; }
}
.topbar-end [data-app-install].is-installed { border-color: var(--line); background: var(--surface, #fff); color: var(--ink-700, #374151); }
@media (display-mode: standalone) { .topbar-end [data-app-install] { display: none; } }
@media (max-width: 420px) {
  .topbar-end { gap: 4px; }
  .topbar-end .btn[data-app-install] { gap: 4px; padding-inline: 7px; }
  .topbar-end [data-app-install] .app-install__short { font-size: 12px; }
  .topbar-end [data-app-install] .icon { width: 16px; height: 16px; }
}

/* DEC-336: two-step sign-in — the app's QR on white (a dark theme would hide it from the camera), the recovery codes in two columns */
.two-factor-qr { width: 184px; max-width: 100%; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); }
.two-factor-qr svg { display: block; width: 100%; height: auto; }
.two-factor-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 12px; list-style: none; background: var(--surface-2); border: 1px dashed var(--line); border-radius: var(--r-md); }
.two-factor-codes code { font-size: 15px; letter-spacing: .04em; }

/* DEC-346: admin → «دخول الديمو» — an ended or cancelled entry greyed, the one made just now marked, a long link that wraps */
.demo-pass.is-muted { opacity: .65; }
.demo-pass.is-new { box-shadow: 0 0 0 2px var(--brand-500, #16a34a); }
.demo-pass__link { display: block; overflow-wrap: anywhere; }
/* DEC-320 — المبيعات: status filter, contact buttons, the ready message and the lead's history */
.lead-statuses { display: flex; flex-wrap: wrap; gap: 8px; margin-block-end: 16px; }
.lead-status { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); color: var(--ink-700); font-size: 14px; text-decoration: none; }
.lead-status b { font-weight: 700; color: var(--ink-900); }
.lead-status:hover { border-color: var(--brand-500); }
.lead-status:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; }
.lead-status.is-active { border-color: var(--brand-500); background: var(--brand-50); color: var(--brand-ink); }
.lead-status--hot b { color: var(--brand-ink); }
.lead-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-block-start: 8px; }
.lead-actions--wide .btn { flex: 1 1 140px; }
.lead-waiting { margin-block-start: 6px; }
.lead-waiting .icon { width: 14px; height: 14px; }
.leads-table tr.is-new td:first-child { box-shadow: inset -3px 0 0 var(--brand-500); }
.lead-message { border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; background: var(--surface-2); }
.lead-message > summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.lead-message__text { white-space: pre-wrap; font-size: 14px; line-height: 1.7; margin: 10px 0; }
.lead-events { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lead-events li { display: grid; gap: 2px; padding-block-end: 10px; border-block-end: 1px dashed var(--line); font-size: 14px; }
.lead-events li:last-child { border-block-end: 0; padding-block-end: 0; }
.lead-events__note { margin: 4px 0; padding: 8px 10px; border-radius: var(--r-sm); background: var(--surface-2); white-space: pre-wrap; overflow-wrap: anywhere; }

/* DEC-402: «العروض» — each kind shows only its own fields, the scope only its own picker (no script: :has) */
.offer-kinds { display: grid; gap: 8px; border: 0; padding: 0; margin: 0; }
.offer-kind { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius, 12px); cursor: pointer; }
.offer-kind:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, transparent); }
.offer-kind span { display: grid; gap: 2px; }
.offer-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px 12px; max-height: 260px; overflow-y: auto; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm, 8px); }
.offer-form:has([name="kind"][value="sale"]:checked) [data-for]:not([data-for~="sale"]),
.offer-form:has([name="kind"][value="bxgy"]:checked) [data-for]:not([data-for~="bxgy"]),
.offer-form:has([name="kind"][value="pair"]:checked) [data-for]:not([data-for~="pair"]),
.offer-form:has([name="kind"][value="bundle"]:checked) [data-for]:not([data-for~="bundle"]) { display: none; }
/* DEC-432: a price-list rule shows the fields of the way it prices */
.rule-form:has([name="compute"][value="fixed"]:checked) [data-for]:not([data-for~="fixed"]),
.rule-form:has([name="compute"][value="discount"]:checked) [data-for]:not([data-for~="discount"]),
.rule-form:has([name="compute"][value="formula"]:checked) [data-for]:not([data-for~="formula"]) { display: none; }
.offer-form:not(:has([name="scope"] option[value="section"]:checked)) [data-scope="section"],
.offer-form:not(:has([name="scope"] option[value="items"]:checked)) [data-scope="items"] { display: none; }
/* DEC-408: a bundle is always its chosen products, whatever the (hidden) scope says */
.offer-form:has([name="kind"][value="bundle"]:checked) [data-scope="items"] { display: block !important; }
.offer-form:has([name="kind"][value="bundle"]:checked) [data-scope="section"] { display: none !important; }
@media (min-width: 640px) { .offer-kinds { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .offer-kinds { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* DEC-405 — a store's «حركة المخزون»: the tabs scroll on a phone, the scan box is a finger wide, a scanned line flashes once. */
.stock-tabs { margin-block-end: 14px; max-width: 100%; overflow-x: auto; flex-wrap: nowrap; }
.stock-tabs a { white-space: nowrap; }
.stock-scan .input { font-size: 16px; min-height: 46px; }
.stock-results { list-style: none; margin: 6px 0 0; padding: 4px; display: grid; gap: 2px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); max-height: 260px; overflow-y: auto; }
.stock-results .btn { width: 100%; justify-content: flex-start; text-align: start; }
.stock-lines .input.input-sm { max-width: 110px; }
.stock-min { flex-wrap: nowrap; gap: 4px; }
@keyframes stock-bump { from { background: var(--brand-50); } to { background: transparent; } }
.stock-bump > td { animation: stock-bump 1.2s ease-out; }
@media (prefers-reduced-motion: reduce) { .stock-bump > td { animation: none; } }
@media print { .stock-doc-actions, .stock-tabs { display: none !important; } }

/* DEC-409 — a printable gift card: the store, the amount and the code, the size of a bank card when printed. */
.gift-card { max-width: 420px; text-align: center; justify-items: center; gap: 8px; border: 2px dashed var(--line); padding: 22px 18px; }
.gift-card__store { font-size: 18px; }
.gift-card__title { color: var(--ink-600); font-weight: 700; }
.gift-card__amount { font-size: 28px; font-weight: 800; color: var(--ink-900); }
.gift-card__code { font-size: 20px; letter-spacing: .08em; padding: 8px 12px; border-radius: var(--r-md); background: var(--page); word-break: break-all; }
@media print { .gift-card { width: 85.6mm; max-width: none; margin: 0 auto; border-style: solid; } }

/* DEC-375: "what happened?" — the answers as big chips, two to a row (a thumb on a phone), then what was said. */
.lead-outcome__choices { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.lead-outcome__choices > legend { padding: 0; margin-block-end: 8px; }
.lead-choice { position: relative; flex: 1 1 calc(50% - 4px); min-width: 0; }
.lead-choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.lead-choice span { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--ink-700); font-size: 15px; font-weight: 600; text-align: center; }
.lead-choice input:checked + span { border-color: var(--brand-500); background: var(--brand-50); color: var(--brand-ink); box-shadow: inset 0 0 0 1px var(--brand-500); }
.lead-choice input:focus-visible + span { outline: 2px solid var(--brand-500); outline-offset: 2px; }
.lead-last-note { margin: 8px 0 0; padding: 6px 8px; border-inline-start: 3px solid var(--brand-500); border-radius: var(--r-sm); background: var(--surface-2); display: grid; gap: 2px; font-size: 13px; line-height: 1.6; max-width: 34ch; }
.lead-last-note__text { color: var(--ink-900); white-space: pre-line; overflow-wrap: anywhere; }
/* DEC-376: a lead from the WhatsApp message ads — its source in the list, and the form to type it in. */
.lead-source { margin-block-start: 6px; }
.lead-owner-form { margin-block-start: 6px; }   /* DEC-378: "responsible for the leads" under the stop/start button */
.lead-new { max-width: 760px; }
.lead-new__pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
@media (max-width: 640px) { .lead-new__pair { grid-template-columns: minmax(0, 1fr); } }
/* DEC-377: the country and the number side by side, on a phone too. */
.lead-new__phone { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 8px; }   /* the number gets the wider part */
/* DEC-375: the list shows every answer of the lead's form, question then answer, each on its own line. */
.lead-answers { margin: 0; display: grid; gap: 4px; line-height: 1.6; }
.lead-answers > div { display: flex; flex-wrap: wrap; column-gap: 6px; }
.lead-answers dt { color: var(--ink-500); font-weight: 400; }
.lead-answers dt::after { content: ":"; }
.lead-answers dd { margin: 0; color: var(--ink-900); font-weight: 600; overflow-wrap: anywhere; }
/* DEC-375: on a phone the leads' filters sit two to a row, so the first leads show without scrolling past a screen of selects. */
@media (max-width: 640px) {
  .toolbar--leads { padding: 12px; gap: 8px; }
  .toolbar--leads .toolbar__filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
  .toolbar--leads .toolbar__filters > .btn { grid-column: 1 / -1; }
  .lead-last-note { max-width: none; }
}
/* DEC-375: in one column, "what happened?" comes right under the WhatsApp and call buttons, before the form's answers. */
@container content (max-width: 899px) {
  .lead-layout__side { display: contents; }
  .lead-layout__contact { order: 1; }
  .lead-layout__work { order: 2; }
  .lead-layout__answers { order: 3; }
}

/* a store's products list: what ran out stands out */
.col-stat.is-out { color: var(--danger-ink, #CB3134); font-weight: 700; }

/* DEC-433: the term of the package being bought (a year / for life) */
.term-box { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 14px 0 0; padding: 0; border: 0; }
.term-box legend { width: 100%; padding: 0; margin-bottom: 6px; }
.term-box__opt { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-md); font-weight: 700; cursor: pointer; }
.term-box__opt:has(input:checked) { border-color: var(--brand-500); background: var(--brand-50); }
.term-box__opt small { font-weight: 500; }
