/* n'ana — ordering app & cashier screen (shares tokens with style.css) */
:root {
  --c-forest-deep: #1A311E; --c-forest: #2C4D32; --c-olive: #3E6411; --c-mint: #8BAF4D;
  --c-cream: #FFF6EB; --c-sand: #F8DEBD; --c-cinnamon: #B96737; --c-copper: #9D6232;
  --c-burgundy: #6C2720; --c-espresso: #4C2B08;
  --card: #FBEBD5; --ink: #1A311E; --ink-soft: #4E5F50; --line: rgba(26, 49, 30, .12);
  --ok: #3E6411; --warn: #B96737; --danger: #9B2C22;
  --f-display: 'Cairo', system-ui, sans-serif;  /* UI text in the apps */
  --f-head: 'Cairo', system-ui, sans-serif;     /* headings (bold) */
  --f-body: 'Cairo', system-ui, sans-serif;
  --f-latin: 'Economica', 'Cairo', system-ui, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --r: 18px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--f-body); color: var(--ink); background: var(--c-cream); line-height: 1.7; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--c-cinnamon); outline-offset: 2px; border-radius: 8px; }
.icon { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.num { font-family: var(--f-latin); font-weight: 700; letter-spacing: .03em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 52px; padding: 0 1.4em; border-radius: 999px;
  font-family: var(--f-display); font-weight: 500; font-size: 1rem;
  border: 1.5px solid transparent; transition: transform .15s, background-color .25s, opacity .25s;
}
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--c-forest); color: var(--c-cream); }
.btn--primary:hover { background: var(--c-forest-deep); }
.btn--accent { background: var(--c-cinnamon); color: #fff; }
.btn--line { border-color: var(--line); color: var(--ink); background: #fff; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ---------- App header ---------- */
.app-head {
  position: sticky; top: 0; z-index: 30; background: var(--c-forest-deep); color: var(--c-cream);
  padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
}
.app-head__in { max-width: 680px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.app-head__logo img { width: 64px; height: auto; }
.app-head__title { font-family: var(--f-display); font-weight: 400; font-size: 1.05rem; flex: 1; text-align: center; }
.chip-btn { min-width: 44px; height: 44px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(255, 246, 235, .2); font-family: var(--f-display); }
.demo-banner { background: var(--c-sand); color: var(--c-espresso); text-align: center; font-size: .82rem; padding: 6px 12px; }

.wrap { max-width: 680px; margin: 0 auto; padding: 16px 16px 140px; }

/* ---------- Order type picker ---------- */
.types { display: grid; gap: 12px; margin-top: 8px; }
.type {
  display: flex; align-items: center; gap: 16px; text-align: start; width: 100%;
  padding: 18px; border-radius: var(--r); background: #fff; border: 1.5px solid var(--line);
  transition: border-color .2s, transform .2s;
}
.type:hover { border-color: var(--c-forest); transform: translateY(-2px); }
.type__ic { width: 52px; height: 52px; border-radius: 14px; background: var(--card); display: grid; place-items: center; color: var(--c-forest); flex: none; }
.type__ic .icon { width: 28px; height: 28px; }
.type h3 { font-family: var(--f-display); font-weight: 500; font-size: 1.1rem; }
.type p { color: var(--ink-soft); font-size: .9rem; line-height: 1.5; }
.lead-title { font-family: var(--f-display); font-weight: 300; font-size: clamp(1.8rem, 7vw, 2.4rem); line-height: 1.25; margin: 12px 0 4px; }
.lead-sub { color: var(--ink-soft); }

/* ---------- Menu ---------- */
.ctx { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--card); margin-bottom: 12px; }
.ctx b { font-family: var(--f-display); font-weight: 500; }
.ctx button { color: var(--c-copper); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; min-height: 44px; padding: 0 4px; }
.cats {
  position: sticky; top: 64px; z-index: 20; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  margin: 0 -16px 8px; padding: 10px 16px; background: var(--c-cream);
}
.cats::-webkit-scrollbar { display: none; }
.cat { flex: none; min-height: 40px; padding: 0 16px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-family: var(--f-display); font-size: .92rem; color: var(--ink-soft); white-space: nowrap; }
.cat.is-on { background: var(--c-forest); border-color: var(--c-forest); color: var(--c-cream); }
.cat-title { font-family: var(--f-display); font-weight: 500; font-size: 1.2rem; margin: 22px 0 10px; scroll-margin-top: 130px; }
.item { display: grid; grid-template-columns: 92px 1fr; gap: 14px; padding: 12px; border-radius: var(--r); background: #fff; margin-bottom: 10px; align-items: center; }
.item__img { width: 92px; height: 92px; border-radius: 14px; overflow: hidden; background: var(--card); }
.item__img img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; filter: brightness(1.05); }
.item__name { font-family: var(--f-display); font-weight: 500; line-height: 1.4; }
.item__desc { font-size: .84rem; color: var(--ink-soft); line-height: 1.55; margin: 2px 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.price { font-family: var(--f-latin); font-weight: 700; font-size: 1.08rem; color: #86562E; white-space: nowrap; } /* 5.3:1 on cards */

.stepper { display: inline-flex; align-items: center; gap: 4px; background: var(--card); border-radius: 999px; padding: 3px; }
.stepper button { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--c-forest); font-size: 1.3rem; line-height: 1; }
.stepper button:active { transform: scale(.92); }
.stepper .q { min-width: 26px; text-align: center; font-family: var(--f-latin); font-weight: 700; font-size: 1.1rem; }
.add { min-height: 40px; padding: 0 16px; border-radius: 999px; background: var(--c-forest); color: var(--c-cream); font-family: var(--f-display); font-size: .92rem; display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Cart bar ---------- */
.cartbar {
  position: fixed; inset: auto 0 0; z-index: 40; padding: 12px 16px; padding-bottom: max(12px, env(safe-area-inset-bottom));
  background: linear-gradient(transparent, var(--c-cream) 30%);
  transform: translateY(120%); transition: transform .45s var(--ease);
}
.cartbar.is-on { transform: none; }
.cartbar button {
  max-width: 680px; margin: 0 auto; width: 100%; min-height: 60px; border-radius: 999px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 22px;
  background: var(--c-forest); color: var(--c-cream); font-family: var(--f-display); font-size: 1.02rem;
  box-shadow: 0 16px 40px -14px rgba(26, 49, 30, .7);
}
.cartbar .count { background: var(--c-cinnamon); color: #fff; min-width: 30px; height: 30px; border-radius: 999px; display: inline-grid; place-items: center; font-family: var(--f-latin); font-weight: 700; padding: 0 8px; }

/* ---------- Checkout sheet ---------- */
.sheet { border: 0; padding: 0; margin: 0; width: 100%; max-width: 100%; height: 100%; max-height: 100%; background: transparent; }
.sheet::backdrop { background: rgba(13, 26, 16, .55); }
.sheet[open] { display: flex; align-items: flex-end; justify-content: center; }
.sheet__panel {
  width: min(680px, 100%); max-height: 94vh; overflow-y: auto; background: var(--c-cream);
  border-radius: 26px 26px 0 0; padding: 8px 18px 24px; padding-bottom: max(24px, env(safe-area-inset-bottom));
  animation: up .45s var(--ease);
}
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet__grip { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 6px auto 10px; }
.sheet__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.sheet__head h2 { font-family: var(--f-display); font-weight: 400; font-size: 1.4rem; }
.x { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #fff; }
.block { background: #fff; border-radius: var(--r); padding: 14px; margin-top: 12px; }
.block h3 { font-family: var(--f-display); font-weight: 500; font-size: 1rem; margin-bottom: 10px; }
.line { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; }
.line__name { flex: 1; font-size: .95rem; line-height: 1.4; }
.total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 14px; font-family: var(--f-display); font-size: 1.1rem; }
.total .price { font-size: 1.4rem; }

.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field label { font-size: .9rem; font-weight: 500; }
.field label small { color: var(--ink-soft); font-weight: 400; }
.field input, .field textarea, .field select {
  width: 100%; min-height: 50px; padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--c-cream); font-size: 16px;
}
.field textarea { min-height: 70px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--c-forest); background: #fff; }
.field.has-error input { border-color: var(--danger); }
.field .err { color: var(--danger); font-size: .84rem; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.plate { direction: ltr; text-align: center; font-family: var(--f-latin); font-weight: 700; font-size: 1.2rem !important; letter-spacing: .12em; text-transform: uppercase; }

.pay { display: grid; gap: 8px; }
.pay label { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; border: 1.5px solid var(--line); cursor: pointer; }
.pay input { width: 20px; height: 20px; accent-color: var(--c-forest); }
.pay label:has(input:checked) { border-color: var(--c-forest); background: var(--card); }
.pay label.is-off { opacity: .5; cursor: not-allowed; }
.pay small { display: block; color: var(--ink-soft); font-size: .82rem; }
.soon { margin-inline-start: auto; font-size: .75rem; background: var(--c-sand); padding: 3px 10px; border-radius: 999px; }
.form-error { color: var(--danger); text-align: center; margin-top: 10px; font-size: .92rem; }
.consent { display: grid; gap: 10px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: .9rem; line-height: 1.6; cursor: pointer; }
.check input { width: 22px; height: 22px; margin-top: 2px; flex: none; accent-color: var(--c-forest); }
.check a { color: var(--c-copper); font-weight: 600; }
.consent .err { color: var(--danger); font-size: .84rem; }
.fine { text-align: center; color: var(--ink-soft); font-size: .8rem; margin-top: 10px; }

/* ---------- Status ---------- */
.status { text-align: center; padding-top: 10px; }
.status__no { font-family: var(--f-latin); font-weight: 700; font-size: 4.6rem; line-height: 1; color: var(--c-forest); margin: 10px 0 2px; }
.status__lbl { color: var(--ink-soft); }
.status h2 { font-family: var(--f-display); font-weight: 400; font-size: 1.5rem; margin: 18px 0 6px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 22px 0; }
.step { padding-top: 14px; border-top: 4px solid var(--line); font-size: .86rem; color: var(--ink-soft); transition: border-color .4s, color .4s; }
.step.is-on { border-color: var(--c-forest); color: var(--ink); font-weight: 600; }
.step.is-now { border-color: var(--c-cinnamon); }
.arrive { margin-top: 6px; }
.status .block { text-align: start; }
.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }

/* ==========================================================================
   CASHIER
   ========================================================================== */
.cashier { background: #EFE6D8; min-height: 100vh; }
.cashier .app-head__in, .cashier .wrap-wide { max-width: 1600px; }
.wrap-wide { margin: 0 auto; padding: 16px; }
.login { max-width: 380px; margin: 10vh auto; background: #fff; border-radius: 24px; padding: 28px; text-align: center; }
.login img { width: 110px; margin: 0 auto 14px; filter: brightness(0) saturate(100%) invert(22%) sepia(16%) saturate(1200%) hue-rotate(84deg); }
.login h1 { font-family: var(--f-display); font-weight: 400; font-size: 1.4rem; margin-bottom: 18px; }
.login .field { text-align: start; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.stat { background: #fff; border-radius: 14px; padding: 8px 14px; font-size: .9rem; }
.stat b { font-family: var(--f-latin); font-size: 1.3rem; margin-inline-start: 6px; }
.toolbar .spacer { flex: 1; }
.sound-off { background: var(--c-cinnamon); color: #fff; }
.board { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .board { grid-template-columns: repeat(3, 1fr); align-items: start; } }
.col { background: rgba(255, 255, 255, .5); border-radius: 20px; padding: 10px; min-height: 120px; }
.col__h { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 10px; font-family: var(--f-display); font-weight: 500; }
.col__h span { font-family: var(--f-latin); font-weight: 700; background: #fff; border-radius: 999px; padding: 0 10px; }
.col--new .col__h { color: var(--c-burgundy); }
.empty { text-align: center; color: var(--ink-soft); font-size: .9rem; padding: 24px 8px; }

.ticket { background: #fff; border-radius: 16px; padding: 14px; margin-bottom: 10px; border-inline-start: 6px solid var(--c-forest); box-shadow: 0 6px 20px -14px rgba(0, 0, 0, .4); }
.ticket.is-new { border-inline-start-color: var(--c-burgundy); animation: flash 1s ease 3; }
.ticket.is-arrived { box-shadow: 0 0 0 3px var(--c-cinnamon), 0 6px 20px -14px rgba(0, 0, 0, .4); }
@keyframes flash { 50% { background: #FCE9D9; } }
.ticket__top { display: flex; align-items: center; gap: 10px; }
.ticket__no { font-family: var(--f-latin); font-weight: 700; font-size: 2rem; line-height: 1; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: .82rem; font-weight: 600; background: var(--card); }
.badge--car { background: #E3ECD5; color: var(--c-olive); }
.badge--table { background: #F3DCCB; color: var(--c-copper); }
.badge--arr { background: var(--c-cinnamon); color: #fff; }
.ticket__time { margin-inline-start: auto; font-size: .84rem; color: var(--ink-soft); white-space: nowrap; }
.ticket__time.late { color: var(--danger); font-weight: 700; }
.carbox { margin-top: 10px; display: flex; gap: 10px; align-items: center; background: var(--c-cream); border-radius: 12px; padding: 8px 12px; }
.carbox .plate-big { font-family: var(--f-latin); font-weight: 700; font-size: 1.5rem; letter-spacing: .12em; direction: ltr; background: #fff; border: 2px solid var(--ink); border-radius: 6px; padding: 0 10px; }
.carbox small { display: block; color: var(--ink-soft); }
.who { margin-top: 8px; font-size: .92rem; }
.who a { color: var(--c-copper); font-weight: 600; text-decoration: none; direction: ltr; unicode-bidi: isolate; }
.ticket ul { list-style: none; padding: 0; margin: 10px 0 0; border-top: 1px dashed var(--line); }
.ticket li { display: flex; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: .95rem; }
.ticket li .q { font-family: var(--f-latin); font-weight: 700; min-width: 30px; }
.ticket li .p { margin-inline-start: auto; color: var(--ink-soft); font-family: var(--f-latin); }
.note { margin-top: 8px; background: #FFF3C4; border-radius: 10px; padding: 6px 10px; font-size: .9rem; }
.ticket__sum { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: .9rem; }
.ticket__sum .price { font-size: 1.25rem; }
.ticket__acts { display: flex; gap: 8px; margin-top: 12px; }
.ticket__acts .btn { min-height: 48px; flex: 1; }
.ticket__acts .btn--x { flex: 0 0 48px; padding: 0; background: #F6E3E0; color: var(--danger); }
.done-list { margin-top: 16px; }
.done-list summary { cursor: pointer; font-family: var(--f-display); padding: 10px; min-height: 44px; }
.done-row { display: flex; gap: 12px; align-items: center; background: #fff; border-radius: 12px; padding: 10px 14px; margin-bottom: 6px; font-size: .9rem; }
.done-row .num { font-size: 1.2rem; }
.done-row .st { margin-inline-start: auto; }

/* ---------- Cashier safety UI ---------- */
.offline-banner { position: sticky; top: 0; z-index: 35; background: var(--danger); color: #fff; text-align: center; padding: 10px 16px; font-weight: 600; }
.shift { position: fixed; inset: 0; z-index: 90; background: rgba(13, 26, 16, .88); display: grid; place-items: center; padding: 20px; }
.shift__box { background: var(--c-forest-deep); color: var(--c-cream); border-radius: 28px; padding: 36px 28px; text-align: center; display: grid; justify-items: center; gap: 14px; max-width: 420px; }
.shift__box h2 { font-family: var(--f-display); font-weight: 300; font-size: 2rem; }
.shift__box .btn { min-height: 64px; padding: 0 2.4em; font-size: 1.2rem; }
.shift__box p { color: var(--c-sand); }
.toast { position: fixed; z-index: 95; inset: auto 16px 20px; margin: 0 auto; max-width: 520px; background: var(--c-forest-deep); color: var(--c-cream); padding: 14px 18px; border-radius: 14px; text-align: center; box-shadow: 0 16px 40px -14px rgba(0,0,0,.5); }
.mismatch { display: flex; gap: 8px; align-items: center; margin-top: 8px; background: #F6DAD6; color: #8A2219; border-radius: 10px; padding: 8px 10px; font-size: .88rem; font-weight: 600; }
.ticket li.bad { color: var(--danger); }

/* ==========================================================================
   STAFF SHELL — tab bar shared by Orders / Dashboard / Storage
   ========================================================================== */
.staff-head .app-head__in { max-width: 1600px; flex-wrap: wrap; row-gap: 8px; }
.staff-nav { display: flex; gap: 4px; background: rgba(255, 246, 235, .08); border-radius: 999px; padding: 4px; order: 3; width: 100%; }
@media (min-width: 760px) { .staff-nav { order: 0; width: auto; margin-inline: auto; } }
.staff-nav a {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px;
  border-radius: 999px; text-decoration: none; font-family: var(--f-display); font-size: .95rem; color: rgba(255, 246, 235, .75); white-space: nowrap;
}
.staff-nav a[aria-current="page"] { background: var(--c-cream); color: var(--c-forest-deep); }
.staff-nav a:not([aria-current="page"]):hover { color: var(--c-cream); background: rgba(255, 246, 235, .08); }
.staff-nav .icon { width: 1.1em; height: 1.1em; }
html[lang="ar"] .en, html[lang="en"] .ar { display: none; }
.staff-actions { display: flex; gap: 8px; }
.page-title { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin: 6px 0 18px; }
.page-title h1 { font-family: var(--f-display); font-weight: 300; font-size: clamp(1.7rem, 4vw, 2.4rem); line-height: 1.2; }
.page-title p { color: var(--ink-soft); }
.seg { display: inline-flex; background: #fff; border-radius: 999px; padding: 4px; gap: 2px; }
.seg button { min-height: 40px; padding: 0 16px; border-radius: 999px; font-family: var(--f-display); font-size: .92rem; color: var(--ink-soft); }
.seg button[aria-pressed="true"] { background: var(--c-forest); color: var(--c-cream); }
.panel { background: #fff; border-radius: 22px; padding: 18px; }
.panel__h { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.panel__h h2 { font-family: var(--f-display); font-weight: 500; font-size: 1.05rem; }
.panel__h a, .link { color: var(--c-copper); font-weight: 600; font-size: .9rem; text-decoration: none; }

/* ---------- Dashboard ---------- */
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); margin-bottom: 14px; }
@media (min-width: 900px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { background: #fff; border-radius: 20px; padding: 16px 18px; }
.kpi__l { font-size: .88rem; color: var(--ink-soft); display: flex; align-items: center; gap: 8px; }
.kpi__l .icon { color: var(--c-cinnamon); }
.kpi__v { font-family: var(--f-latin); font-weight: 700; font-size: clamp(2rem, 4vw, 2.6rem); line-height: 1.1; margin-top: 6px; color: var(--ink); }
.kpi__v small { font-size: .45em; color: var(--ink-soft); margin-inline-start: 4px; }
.delta { display: inline-flex; align-items: center; gap: 4px; font-size: .82rem; font-weight: 600; margin-top: 4px; }
.delta--up { color: var(--ok); } .delta--down { color: var(--danger); } .delta--flat { color: var(--ink-soft); }
.delta .icon { width: 1em; height: 1em; }
.grid2 { display: grid; gap: 14px; margin-bottom: 14px; }
@media (min-width: 1000px) { .grid2 { grid-template-columns: 1.4fr 1fr; } .grid2--even { grid-template-columns: 1fr 1fr; } }

.bars { position: relative; display: flex; align-items: flex-end; gap: 6px; height: 220px; padding-top: 22px; border-bottom: 1px solid var(--line); }
.bars--hours { gap: 3px; height: 180px; }
.bar { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; cursor: default; }
.bar span { display: block; width: 100%; max-width: 44px; background: var(--c-forest); border-radius: 4px 4px 0 0; min-height: 2px; transition: height .6s var(--ease), background-color .2s; }
.bar:hover span, .bar:focus-visible span { background: var(--c-olive); }
.bar.is-today span { background: var(--c-cinnamon); }
.bar b { position: absolute; bottom: calc(var(--h) + 4px); font-family: var(--f-latin); font-size: .85rem; color: var(--ink); white-space: nowrap; }
.xlabels { display: flex; gap: 6px; margin-top: 6px; }
.xlabels span { flex: 1; text-align: center; font-size: .78rem; color: var(--ink-soft); white-space: nowrap; overflow: hidden; }
.bars--hours + .xlabels { gap: 3px; }
.grid-line { position: absolute; inset-inline: 0; border-top: 1px dashed var(--line); pointer-events: none; }
.grid-line i { position: absolute; inset-inline-end: 0; top: -9px; font-style: normal; font-size: .72rem; color: var(--ink-soft); background: #fff; padding-inline-start: 4px; font-family: var(--f-latin); }
.tip { position: fixed; z-index: 99; pointer-events: none; background: var(--c-forest-deep); color: var(--c-cream); padding: 6px 10px; border-radius: 8px; font-size: .85rem; white-space: nowrap; transform: translate(-50%, -110%); opacity: 0; transition: opacity .12s; }
.tip.is-on { opacity: 1; }

.hbar { display: grid; grid-template-columns: 110px 1fr auto; align-items: center; gap: 10px; padding: 8px 0; }
.hbar__track { height: 12px; background: var(--c-cream); border-radius: 0 6px 6px 0; overflow: hidden; }
html[dir="rtl"] .hbar__track { border-radius: 6px 0 0 6px; }
.hbar__fill { height: 100%; background: var(--c-forest); border-radius: inherit; transition: width .6s var(--ease); }
.hbar__v { font-family: var(--f-latin); font-weight: 700; min-width: 64px; text-align: end; }
.hbar__v small { color: var(--ink-soft); font-weight: 400; margin-inline-start: 4px; }
.top { display: grid; grid-template-columns: 24px 48px 1fr auto; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.top:last-child { border-bottom: 0; }
.top__rank { font-family: var(--f-latin); font-weight: 700; color: var(--ink-soft); text-align: center; }
.top img { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; background: var(--card); mix-blend-mode: multiply; }
.top__name { font-family: var(--f-display); font-weight: 500; line-height: 1.35; }
.top__name small { display: block; color: var(--ink-soft); font-family: var(--f-body); font-weight: 400; }
.top__v { font-family: var(--f-latin); font-weight: 700; font-size: 1.1rem; text-align: end; }
.top__v small { display: block; font-size: .78rem; color: var(--ink-soft); font-weight: 400; }
.alert-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.alert-row:last-child { border-bottom: 0; }
.alert-row .q { margin-inline-start: auto; font-family: var(--f-latin); font-weight: 700; white-space: nowrap; }
.live { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.live a { text-decoration: none; background: var(--c-cream); border-radius: 16px; padding: 14px; text-align: center; }
.live b { display: block; font-family: var(--f-latin); font-size: 2rem; line-height: 1.1; }
.live span { font-size: .85rem; color: var(--ink-soft); }
.empty-note { color: var(--ink-soft); text-align: center; padding: 18px 0; font-size: .92rem; }
.demo-tools { margin-top: 18px; text-align: center; }

/* ---------- Status pill (stock) — icon + label, never colour alone ---------- */
.st { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.st .icon { width: 1em; height: 1em; stroke-width: 2.4; }
.st--ok { background: #E3ECD5; color: #2F4F0B; }
.st--low { background: #FBE3CC; color: #7A3E12; }
.st--out { background: #F6DAD6; color: #8A2219; }

/* ---------- Storage ---------- */
.tabsline { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tabsline button { min-height: 46px; padding: 0 16px; font-family: var(--f-display); color: var(--ink-soft); border-bottom: 3px solid transparent; white-space: nowrap; }
.tabsline button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--c-cinnamon); }
.inv-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.inv-tools input[type="search"] { flex: 1; min-width: 200px; min-height: 48px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-size: 16px; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.filters button { min-height: 38px; padding: 0 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: .88rem; }
.filters button[aria-pressed="true"] { background: var(--c-forest); color: var(--c-cream); border-color: var(--c-forest); }
.filters b { font-family: var(--f-latin); margin-inline-start: 4px; }
.inv { background: #fff; border-radius: 22px; overflow: hidden; }
.inv-row { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.inv-row:last-child { border-bottom: 0; }
@media (min-width: 760px) { .inv-row { grid-template-columns: minmax(180px, 1.4fr) 110px minmax(120px, 1fr) auto; } }
.inv-row__name { font-family: var(--f-display); font-weight: 500; line-height: 1.35; }
.inv-row__name small { display: block; font-family: var(--f-body); font-weight: 400; color: var(--ink-soft); font-size: .82rem; }
.inv-row__qty { font-family: var(--f-latin); font-weight: 700; font-size: 1.5rem; line-height: 1; }
.inv-row__qty small { font-size: .55em; color: var(--ink-soft); font-weight: 400; margin-inline-start: 3px; }
.level { height: 8px; background: var(--c-cream); border-radius: 4px; overflow: hidden; }
.level i { display: block; height: 100%; background: var(--c-mint); border-radius: 4px; }
.level--low i { background: var(--c-cinnamon); } .level--out i { background: var(--danger); }
.inv-row__meta { display: flex; align-items: center; gap: 8px; }
.inv-acts { display: flex; gap: 6px; align-items: center; }
.qbtn { width: 44px; height: 44px; border-radius: 12px; background: var(--c-cream); display: grid; place-items: center; font-size: 1.3rem; color: var(--c-forest); }
.qbtn:hover { background: var(--card); }
.qbtn--more { font-size: 1rem; }
@media (max-width: 759px) { .inv-row__bar { grid-column: 1 / -1; } .inv-row__meta { grid-column: 1 / -1; justify-content: space-between; } }
.avail { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.avail label { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 16px; padding: 10px 14px; cursor: pointer; }
.avail img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; background: var(--card); mix-blend-mode: multiply; }
.avail .nm { flex: 1; font-family: var(--f-display); line-height: 1.35; }
.avail .nm small { display: block; color: var(--ink-soft); font-family: var(--f-body); font-size: .8rem; }
.avail.is-out { }
.switch { position: relative; width: 52px; height: 30px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: #D9CFC0; transition: background-color .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input:checked + span { background: var(--c-forest); }
html[dir="ltr"] .switch input:checked + span::after { transform: translateX(22px); }
html[dir="rtl"] .switch input:checked + span::after { transform: translateX(-22px); }
.switch input:focus-visible + span { outline: 2px solid var(--c-cinnamon); outline-offset: 2px; }
.log-row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); background: #fff; }
.log-row:first-child { border-radius: 16px 16px 0 0; } .log-row:last-child { border-radius: 0 0 16px 16px; border-bottom: 0; }
.log-row time { font-size: .8rem; color: var(--ink-soft); white-space: nowrap; font-family: var(--f-latin); }
.log-row .d { font-family: var(--f-latin); font-weight: 700; white-space: nowrap; }
.log-row .d.plus { color: var(--ok); } .log-row .d.minus { color: var(--danger); }
.log-row small { display: block; color: var(--ink-soft); }
.modal { border: 0; padding: 0; border-radius: 24px; width: min(460px, calc(100vw - 32px)); background: var(--c-cream); }
.modal::backdrop { background: rgba(13, 26, 16, .55); }
.modal form { padding: 20px; }
.modal h2 { font-family: var(--f-display); font-weight: 400; font-size: 1.35rem; margin-bottom: 14px; }
.modal .acts { display: flex; gap: 8px; margin-top: 8px; }
.modal .acts .btn { flex: 1; }
.modal .danger { color: var(--danger); margin-top: 12px; min-height: 44px; width: 100%; font-weight: 600; }
.kind { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 12px; }
.kind label { text-align: center; padding: 10px 6px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; font-size: .88rem; }
.kind input { position: absolute; opacity: 0; }
.kind label:has(input:checked) { border-color: var(--c-forest); background: var(--card); font-weight: 600; }
.kind label:has(input:focus-visible) { outline: 2px solid var(--c-cinnamon); }
.item.is-out .item__img, .item.is-out .item__name, .item.is-out .item__desc, .item.is-out .price { opacity: .5; }
.soldout { font-size: .8rem; font-weight: 600; color: var(--danger); background: #F6DAD6; padding: 4px 10px; border-radius: 999px; }

/* ==========================================================================
   QR PRINT PAGE
   ========================================================================== */
.qr-page { background: #EFE6D8; }
.qr-tools { max-width: 1100px; margin: 0 auto; padding: 16px; display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.qr-tools .field { margin: 0; min-width: 260px; flex: 1; }
.qr-grid { max-width: 1100px; margin: 0 auto; padding: 0 16px 40px; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.qr-card {
  background: var(--c-forest); color: var(--c-cream); border-radius: 22px; padding: 22px 18px; text-align: center;
  display: grid; justify-items: center; gap: 10px; break-inside: avoid;
}
.qr-card img.logo { width: 120px; }
.qr-card .qr { background: #fff; padding: 12px; border-radius: 14px; width: 190px; height: 190px; }
.qr-card .qr img, .qr-card .qr svg { width: 100%; height: 100%; }
.qr-card h3 { font-family: var(--f-display); font-weight: 400; font-size: 1.35rem; line-height: 1.3; }
.qr-card p { font-size: .88rem; color: var(--c-sand); line-height: 1.4; }
.qr-card .tag { font-family: var(--f-latin); font-weight: 700; letter-spacing: .14em; background: var(--c-cinnamon); padding: 2px 14px; border-radius: 999px; font-size: 1.05rem; }
@media print {
  .qr-page { background: #fff; }
  .qr-tools, .app-head { display: none !important; }
  .qr-grid { grid-template-columns: repeat(2, 1fr); padding: 0; }
  .qr-card { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Headings use the brand display face (Reem Kufi); everything else stays in Plex for legibility. */
.lead-title, .status h2, .status__no, .page-title h1, .sheet__head h2, .login h1, .modal h2, .qr-card h3, .cat-title, .item__name, .type h3, .shift__box h2, .doc h1, .doc h2, .app-head__title { font-family: var(--f-head); font-weight: 700; }
.status__no { font-family: var(--f-latin); font-weight: 700; }
