/* Layout concept: one fixed demo shell; each surface keeps the identity it has in its own source.
   Shell + ERP: OrderTech tokens (tenant portal + ordertech_ai_agent + MuK navbar).
   Restaurant: storefront "mansaf" template tokens. POS: pos_themes Modern Purple. KDS: pos_preparation_display stages.
   Single light theme by choice: these are operational screens; colours are set explicitly everywhere. */
@font-face { font-family: 'KDS Mono'; src: url('../assets/fonts/Inconsolata.otf') format('opentype'); font-display: swap; }

:root {
  color-scheme: light;
  /* One calm family. Brand indigo comes from the ERP navbar (#373080); every other hue is muted to sit beside it. */
  --ink: #232136; --ink-2: #3d3a57; --dim: #6a6684; --faint: #a19db5;
  --line: #e7e5ef; --line-2: #d6d3e3; --paper: #f6f5f9; --soft: #efeef5; --surface: #ffffff; --surface-2: #fbfafd;
  --brand: #373080; --brand-2: #4a439f; --accent: #5b51c4; --accent-strong: #4a439f; --accent-tint: #eeecf8; --accent-line: #d6d2ef;
  --navy: #373080; --warm: #a8792f; --warm-tint: #f7f0e2; --warm-line: #e3cfa5;
  /* semantic, muted */
  --ok: #2f7a57; --ok-tint: #e6f1eb; --ok-line: #bfdccb;
  --info: #3b679e; --info-tint: #e7edf6; --info-line: #c3d3e9;
  --warn: #87601a; --warn-tint: #f7efdf; --warn-line: #dfc896;
  --danger: #ad4149; --danger-tint: #f8e8e9; --danger-line: #e8c3c6;
  --neutral-tint: #ecebf2;
    /* restaurant: same indigo family as the ERP; its own voice comes from Amiri/DM Serif type and a brass accent */
  --sf-bg: #f6f5f9; --sf-card: #ffffff; --sf-ink: #232136; --sf-muted: #6a6684; --sf-line: #e7e5ef; --sf-soft: #efeef5;
  --sf-primary: #2f2a6e; --sf-primary-ink: #ffffff; --sf-accent: #8f6a2e; --sf-brass: #b08a4f;
  /* POS + ERP + KDS read from the same family */
  --p-accent: var(--accent); --p-accent-h: var(--brand-2); --p-text: var(--ink); --p-muted: var(--dim); --p-line: var(--line); --p-bg: var(--paper); --p-bg2: var(--surface-2); --p-tint: var(--accent-tint);
  --k-bg: var(--paper); --k-new: #6a6684; --k-prog: #a8792f; --k-ready: #3b679e; --k-done: #2f7a57;
  --o-nav: var(--brand); --o-bg: var(--paper); --o-line: var(--line); --o-text: var(--ink); --o-soft: var(--dim);
  /* type */
  --f-display: 'Manrope', 'Noto Sans Arabic', system-ui, sans-serif;
  --f-body: 'Work Sans', 'Noto Sans Arabic', system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', monospace;
  --f-sf-display: 'DM Serif Display', 'Amiri', Georgia, serif;
  --f-sf-body: 'Noto Sans Arabic', 'Work Sans', system-ui, sans-serif;
  --f-kds: 'KDS Mono', 'JetBrains Mono', ui-monospace, monospace;
  --bar-h: 108px;
}
:lang(ar) { --f-display: 'Noto Sans Arabic', 'Manrope', system-ui, sans-serif; --f-body: 'Noto Sans Arabic', 'Work Sans', system-ui, sans-serif; --f-sf-display: 'Amiri', 'DM Serif Display', Georgia, serif; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.5 var(--f-body); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled, [aria-disabled="true"] { cursor: not-allowed; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { margin: 0; }
code { font-family: var(--f-mono); font-size: .86em; background: var(--accent-tint); color: var(--accent-strong); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--dim); }
.small { font-size: 13px; }
.center { text-align: center; }
.d-block { display: block; }
[hidden] { display: none !important; }
.ic { width: 18px; height: 18px; flex: none; }
.ic.big { width: 40px; height: 40px; opacity: .55; }
[dir="rtl"] .ic.flip { transform: scaleX(-1); }
[dir="ltr"] .ic.flip-back { transform: scaleX(-1); }
.row-end { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.row-center { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

/* ============ buttons, pills, tags (shell) ============ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; text-decoration: none; color: var(--ink); }
.btn:hover { border-color: var(--accent); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-2); }
.btn-ghost { background: transparent; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; color: inherit; }
.icon-btn:hover { background: rgba(127, 120, 160, .14); }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 1.6; }
.st-new { background: var(--neutral-tint); color: var(--ink-2); }
.st-accepted { background: var(--accent-tint); color: var(--brand); }
.st-preparing { background: var(--warn-tint); color: var(--warn); }
.st-ready { background: var(--info-tint); color: var(--info); }
.st-delivered { background: var(--neutral-tint); color: var(--ink-2); }
.st-cancelled { background: var(--danger-tint); color: var(--danger); }
.pay-unpaid { background: transparent; color: var(--dim); box-shadow: inset 0 0 0 1px var(--line-2); }
.pay-paid { background: var(--ok-tint); color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok-line); }
.pay-failed { background: var(--danger); color: #fff; }
.pay-processing { background: var(--info-tint); color: var(--info); }
.tag { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 5px; font-size: 11px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; margin-inline-end: 6px; vertical-align: middle; }
.tag-exists { background: var(--ok-tint); color: var(--ok); }
.tag-separate { background: var(--info-tint); color: var(--info); }
.tag-proposed { background: var(--warn-tint); color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn-line); }
.tag-sim { background: var(--neutral-tint); color: var(--ink-2); }
.tag-config { background: var(--neutral-tint); color: var(--ink-2); }
.spin { width: 15px; height: 15px; border-radius: 50%; border: 2px solid currentColor; border-inline-end-color: transparent; display: inline-block; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ shell ============ */
.shell { min-height: 100dvh; display: flex; flex-direction: column; }
/* Header: brand | three role segments (overview, customer, restaurant team) | tools.
   Every role keeps the same width with its label, so switching never shifts the bar. */
.demo-return { position: sticky; top: 0; z-index: 41; height: 44px; background: var(--surface-2); padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px)); }
.demo-home { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding-inline: 8px; border-radius: 8px; color: var(--brand); font-size: 13px; font-weight: 700; text-decoration: none; }
.demo-home:hover { background: var(--accent-tint); }
.bar { position: sticky; top: 44px; z-index: 40; height: calc(var(--bar-h) - 44px); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; background: var(--surface); color: var(--ink); padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px)); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; min-width: 0; border-radius: 10px; }
.brand img { width: 32px; height: auto; flex: none; }
.brand-t { display: grid; gap: 3px; line-height: 1.1; min-width: 0; }
.brand-row { display: flex; align-items: center; gap: 8px; }
.brand-t b { font-family: 'Manrope', var(--f-display); font-weight: 800; font-size: 17px; letter-spacing: .01em; color: var(--brand); }
.demo-tag { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; color: var(--warn); background: var(--warm-tint); border: 1px solid var(--warn-line); border-radius: 5px; padding: 0 6px; line-height: 1.6; }
:lang(ar) .demo-tag { letter-spacing: 0; }
.brand-t small { font-size: 11px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.roles { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; }
.rgroup { display: flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--soft); }
.rdiv { display: none; }
.role { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; width: 76px; height: 48px; padding: 0 4px; border: 0; border-radius: 9px; background: transparent; color: var(--dim); font-size: 11.5px; font-weight: 600; white-space: nowrap; transition: background .15s, color .15s; }
.role .ic { width: 19px; height: 19px; }
.role span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.role:hover { color: var(--ink); background: #e4e2ee; }
.role.on { background: var(--surface); color: var(--brand); box-shadow: 0 1px 2px rgba(35, 33, 54, .08), 0 0 0 1px var(--line); }
.role.on .ic { color: var(--brand); }
.role-pick { display: none; }
.bar-tools { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.tb { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; min-width: 36px; padding: 0 10px; border-radius: 9px; border: 1px solid transparent; background: transparent; color: var(--ink-2); font-size: 13px; font-weight: 600; white-space: nowrap; }
.tb:hover { background: var(--soft); color: var(--ink); }
.tb.on { background: var(--accent-tint); border-color: var(--accent-line); color: var(--brand); }
.lang-seg { display: inline-flex; padding: 2px; border-radius: 9px; background: var(--soft); }
.lang-seg button { min-width: 34px; height: 30px; border: 0; border-radius: 7px; background: transparent; color: var(--dim); font-size: 13px; font-weight: 700; }
.lang-seg button:hover:not(.on) { color: var(--ink); }
.lang-seg button.on { background: var(--surface); color: var(--brand); box-shadow: 0 1px 2px rgba(35, 33, 54, .1); }
.tdiv { width: 1px; height: 24px; background: var(--line); margin-inline: 2px; }
.tb-reset { color: var(--danger); border-color: var(--danger-line); }
.tb-reset:hover { background: var(--danger-tint); color: var(--danger); }

/* Context strip: shared facts on one side, the guided next step on the other. */
.ctx { display: flex; align-items: center; gap: 20px; padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.ctx-facts { display: flex; align-items: stretch; margin: 0; min-width: 0; flex: 1 1 auto; overflow-x: auto; scrollbar-width: none; }
.fact { display: grid; align-content: center; gap: 2px; min-height: 40px; padding-inline: 18px; border-inline-start: 1px solid var(--line); white-space: nowrap; }
.fact:first-child { padding-inline-start: 0; border-inline-start: 0; }
.fact dt { font-size: 11px; font-weight: 600; color: var(--dim); }
:lang(en) .fact dt { text-transform: uppercase; letter-spacing: .05em; font-size: 10.5px; }
.fact dd { margin: 0; display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--ink); line-height: 1.4; }
.fact-empty { font-weight: 500; color: var(--dim); }
.fact-link { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; }
.fact-link b { color: var(--accent-strong); text-decoration: underline; text-decoration-color: rgba(90, 63, 214, .35); text-underline-offset: 3px; }
.fact-link:hover b { text-decoration-color: currentColor; }
.ctx-next { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; flex: 0 1 640px; min-width: 0; min-height: 50px; padding-block: 6px; padding-inline: 14px 6px; border-radius: 12px; border: 1px solid var(--accent-line); background: var(--surface); color: var(--ink); text-align: start; }
.ctx-next:hover { border-color: var(--accent); }
.cn-prog { display: grid; gap: 5px; }
.cn-prog b { font-size: 16px; line-height: 1; color: var(--brand); }
.cn-prog small { font-size: 11px; font-weight: 600; color: var(--dim); }
.cn-prog i { display: block; width: 44px; height: 4px; border-radius: 2px; background: var(--accent-line); overflow: hidden; }
.cn-prog s { display: block; height: 100%; background: var(--brand); text-decoration: none; }
.cn-text { display: grid; gap: 1px; min-width: 0; }
.cn-text small { font-size: 11px; font-weight: 600; color: var(--dim); }
.cn-hint { font-size: 13.5px; font-weight: 600; line-height: 1.4; white-space: normal; overflow-wrap: anywhere; }
.cn-go { display: inline-flex; align-items: center; gap: 4px; height: 38px; padding: 0 14px; border-radius: 9px; background: var(--brand); color: #fff; font-size: 13px; font-weight: 700; }
.ctx-next:hover .cn-go { background: var(--brand-2); }
.ctx-done { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); font-size: 13.5px; font-weight: 600; }
.view { flex: 1; outline: none; min-width: 0; }

.drawer { position: fixed; z-index: 60; top: calc(var(--bar-h) + 8px); inset-inline-end: 12px; width: min(400px, calc(100vw - 24px)); max-height: calc(100dvh - var(--bar-h) - 20px); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 24px 60px -20px rgba(23, 21, 31, .45); padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.drawer-h, .sheet-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-family: var(--f-display); font-size: 16px; }
.drawer-note { font-size: 12.5px; color: var(--dim); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--paper); border-radius: 10px; }
.seg button { min-height: 38px; border: 0; border-radius: 8px; background: transparent; font-size: 13px; font-weight: 600; color: var(--dim); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.steps li { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 8px; border-radius: 10px; font-size: 13.5px; }
.steps .dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); border: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--dim); }
.steps .dot .ic { width: 14px; height: 14px; }
.steps li.done { color: var(--dim); }
.steps li.done .dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.steps li.now { background: var(--accent-tint); }
.steps li.now .dot { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
.go { min-height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--accent-strong); background: var(--surface); color: var(--accent-strong); font-size: 12.5px; font-weight: 700; }
.steps li.now .go { background: var(--accent-strong); color: #fff; }
.sim-row { display: flex; gap: 10px; align-items: center; min-height: 40px; font-size: 14px; }
.sim-row input { width: 20px; height: 20px; accent-color: var(--accent-strong); }
.sim-qr { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px; background: var(--paper); border-radius: 10px; font-size: 13.5px; }
.sim-more { font-size: 13px; color: var(--dim); }
.sim-more ul { margin: 6px 0 0; padding-inline-start: 18px; }
.sheet-scrim { position: fixed; inset: 0; z-index: 55; background: rgba(23, 21, 31, .45); }
.sheet { position: fixed; z-index: 60; inset: auto 0 0 0; background: var(--surface); border-radius: 18px 18px 0 0; padding: 14px max(16px, env(safe-area-inset-right, 0px)) calc(18px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); max-height: 85dvh; overflow: auto; }
.sheet-list { display: grid; gap: 6px; }
.sheet-group { margin: 14px 2px 6px; font-size: 12px; font-weight: 700; color: var(--dim); }
.sheet-role .sr-check { margin-inline-start: auto; width: 18px; height: 18px; }
.sheet-role { display: flex; gap: 12px; align-items: center; min-height: 56px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-align: start; }
.sheet-role span { display: flex; flex-direction: column; }
.sheet-role small { color: var(--dim); font-size: 12.5px; }
.sheet-role.on { border-color: var(--accent-strong); background: var(--accent-tint); }
.sheet-role .ic { width: 22px; height: 22px; color: var(--accent-strong); }
.sheet-note { margin-top: 12px; font-size: 12.5px; color: var(--dim); }
.sheet-tools { display: none; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.confirm { position: fixed; z-index: 70; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(420px, calc(100vw - 32px)); background: var(--surface); border-radius: 16px; padding: 20px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .5); display: grid; gap: 12px; }
.confirm b { font-family: var(--f-display); font-size: 18px; }
.confirm p { color: var(--dim); font-size: 14px; }
.toasts { position: fixed; z-index: 80; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); display: grid; gap: 8px; width: min(440px, calc(100vw - 32px)); pointer-events: none; }
.toast { background: #2c2a40; color: #fff; padding: 11px 14px; border-radius: 12px; font-size: 14px; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .5); border-inline-start: 4px solid #a9a2e6; animation: tin .25s ease-out; }
.toast-ok { border-inline-start-color: #7cc4a0; }
.toast-warn { border-inline-start-color: #dcb873; }
@keyframes tin { from { transform: translateY(8px); opacity: 0; } }

/* ============ map ============ */
.mobile-map, .mobile-sheet-reset, .mobile-intro, .mobile-context-toggle { display: none; }
.map-wrap { max-width: 1240px; margin: 0 auto; padding: 24px max(16px, env(safe-area-inset-right, 0px)) 48px max(16px, env(safe-area-inset-left, 0px)); display: grid; gap: 22px; }
.map-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.map-head > div:first-child { max-width: 760px; display: grid; gap: 8px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); }
:lang(ar) .eyebrow { letter-spacing: 0; }
.map-head h1, .spec-head h1 { font-family: var(--f-display); font-size: clamp(26px, 3.4vw, 40px); font-weight: 800; line-height: 1.15; letter-spacing: -.01em; }
.lede { color: var(--dim); font-size: 16px; max-width: 66ch; }
.legend { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--dim); }
.eco-scroll { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 8px; }
.eco { width: 100%; min-width: 900px; height: auto; display: block; }
.eco text { font-family: var(--f-body); text-anchor: middle; }
.eco .lane { font-size: 13px; font-weight: 700; fill: var(--dim); letter-spacing: .04em; }
.mn rect { fill: #fff; stroke: var(--line-2); stroke-width: 1.5; transition: fill .15s; }
.mn { cursor: pointer; outline: none; }
.mn:hover rect, .mn:focus-visible rect { fill: var(--accent-tint); stroke: var(--accent-strong); stroke-width: 2.5; }
.mn-proposed rect { stroke: #c4a265; stroke-dasharray: 6 5; fill: #fdfaf3; }
.mn-separate rect { stroke: #9fb3d3; }
.mn-t { font-size: 15px; font-weight: 700; fill: var(--ink); }
.mn-s { font-size: 12px; fill: var(--dim); }
.mn-tag { font-size: 11px; font-weight: 700; fill: var(--ok); }
.mn-proposed .mn-tag { fill: var(--warn); }
.mn-separate .mn-tag { fill: var(--info); }
.core > rect:first-child { fill: #f8f7fc; stroke: var(--accent-line); stroke-width: 2; }
.core-t { font-size: 15px; font-weight: 800; fill: var(--brand); }
.mm rect { fill: #fff; stroke: var(--line); }
.mm-t { font-size: 13.5px; font-weight: 700; fill: var(--ink); }
.mm-s { font-size: 11px; fill: var(--dim); }
.state-bar { fill: var(--brand); }
.state-t { fill: #ffffff; font-size: 13px; font-weight: 700; }
.ext rect { fill: var(--soft); stroke: var(--line); }
.ext-t { font-size: 12.5px; fill: var(--ink-2); font-weight: 600; }
.me { fill: none; stroke: var(--faint); stroke-width: 1.8; }
.me-prop { stroke: #c4a265; stroke-dasharray: 6 5; }
.me-soft { stroke: var(--line-2); stroke-dasharray: 2 4; }
.me-head { fill: var(--faint); }
.me-l { font-size: 11px; fill: var(--brand); font-weight: 700; }
.journeys { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 14px; }
.jcard { position: relative; display: grid; gap: 10px; align-content: start; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.jcard h2 { font-family: var(--f-display); font-size: 20px; font-weight: 800; }
.jcard p { color: var(--dim); font-size: 14px; }
.jcard .btn { justify-self: start; }
.jcard-a { background: var(--accent-tint); border-color: var(--accent-line); }
.jcard-a h2 { color: var(--brand); }
.jcard-a p { color: var(--ink-2); }
.jtime { font-size: 12px; font-weight: 700; color: var(--warm); }
.jcard-a .jtime { color: var(--brand); }
.sec-h { font-family: var(--f-display); font-size: 20px; font-weight: 800; }
.tbl-scroll { overflow-x: auto; max-width: 100%; }
.evidence { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: 12px; overflow: hidden; font-size: 13.5px; min-width: 720px; }
.evidence th, .evidence td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.evidence th { background: var(--paper); font-size: 12px; color: var(--dim); }

/* ============ spec ============ */
.spec, .map-wrap { grid-template-columns: minmax(0, 1fr); }
.spec > *, .map-wrap > * { min-width: 0; }
.spec-sec li { overflow-wrap: anywhere; }
.spec-sec, .jcard, .osheet, .rv-form, .rv-sum, .acc-list, .acc-detail { grid-template-columns: minmax(0, 1fr); }
.spec { max-width: 1040px; margin: 0 auto; padding: 24px max(16px, env(safe-area-inset-right, 0px)) 56px max(16px, env(safe-area-inset-left, 0px)); display: grid; gap: 22px; }
.spec-head { display: grid; gap: 8px; }
.spec-sec { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: grid; gap: 12px; }
.spec-sec h2 { font-family: var(--f-display); font-size: 19px; font-weight: 800; }
.spec-sec ul { margin: 0; padding-inline-start: 20px; display: grid; gap: 8px; font-size: 14.5px; max-width: 80ch; }
.spec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 10px; }
.spec-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 4px; }
.spec-card { min-width: 0; }
.spec-card p { font-size: 13.5px; color: var(--dim); overflow-wrap: anywhere; }
.flow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.flow .pill { font-size: 13px; padding: 4px 12px; }
.flow-arr { color: var(--dim); display: inline-flex; }

/* ============ restaurant storefront ============ */
.sf { position: relative; background: var(--sf-bg); color: var(--sf-ink); font-family: var(--f-sf-body); min-height: 100%; }
.v-site .sf, .v-account .sf { min-height: calc(100dvh - var(--bar-h) - 50px); }
.sf :focus-visible { outline-color: var(--accent); }
.sf-head { position: sticky; top: var(--bar-h); z-index: 20; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); background: var(--sf-card); border-bottom: 1px solid var(--sf-line); }
.phone .sf-head { top: 0; }
.sf-brand { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; text-align: start; padding: 0; color: inherit; }
.sf-brand span { display: flex; flex-direction: column; line-height: 1.2; }
.sf-brand b { font-family: var(--f-sf-display); font-size: 21px; font-weight: 700; color: var(--sf-primary); }
.sf-brand small { font-size: 12px; color: var(--sf-muted); }
.rh-ring { fill: var(--sf-primary); }
.rh-stem { stroke: var(--sf-brass); stroke-width: 2; fill: none; }
.rh-leaf { fill: #ead9b6; }
.sf-method { display: inline-flex; padding: 3px; gap: 3px; background: var(--sf-soft); border-radius: 99px; }
.sf-method button { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 99px; border: 0; background: transparent; color: var(--sf-ink); font-weight: 600; font-size: 14px; }
.sf-method button.on { background: var(--sf-primary); color: var(--sf-primary-ink); }
.sf-method.in-form { margin-block: 6px; }
.sf-branch { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px; border: 1px solid var(--sf-line); border-radius: 10px; background: var(--sf-card); }
.sf-branch select { border: 0; background: transparent; min-height: 40px; font-weight: 600; color: var(--sf-ink); max-width: 150px; }
.sf-head-end { margin-inline-start: auto; display: flex; gap: 8px; }
.sf-icon, .sf-cart-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; min-height: 44px; border-radius: 12px; border: 1px solid var(--sf-line); background: var(--sf-card); color: var(--sf-ink); font-weight: 700; }
.sf-cart-btn { background: var(--sf-primary); color: var(--sf-primary-ink); border-color: var(--sf-primary); padding: 0 12px; }
.sf-tablebar, .sf-infobar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px)); background: var(--sf-primary); color: var(--sf-primary-ink); font-size: 13.5px; }
.sf-infobar { background: var(--sf-soft); color: var(--sf-ink); }
.sf-tablebar .ic, .sf-infobar .ic { width: 16px; height: 16px; }
.sf-tablebar-end { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 5px; opacity: .9; }
.sf-body { max-width: 1180px; margin: 0 auto; padding: 16px max(16px, env(safe-area-inset-right, 0px)) 110px max(16px, env(safe-area-inset-left, 0px)); display: grid; gap: 16px; }
.sf-hero { position: relative; border-radius: 20px; overflow: hidden; min-height: 220px; display: grid; }
.sf-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sf-hero-text { position: relative; align-self: end; padding: 26px; background: linear-gradient(0deg, rgba(31, 28, 66, .84), rgba(31, 28, 66, 0)); color: #ffffff; display: grid; gap: 4px; }
.sf-hero-text p { color: #e4e1f0; font-size: 14px; }
.sf-hero-text h1 { font-family: var(--f-sf-display); font-size: clamp(26px, 4vw, 42px); font-weight: 700; line-height: 1.15; }
.sf-welcome { display: grid; gap: 4px; padding: 6px 0; }
.sf-welcome h1 { font-family: var(--f-sf-display); font-size: 26px; color: var(--sf-primary); }
.sf-welcome p { color: var(--sf-muted); font-size: 14px; }
.sf-cats { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-block: 2px; }
.sf-cats button { flex: none; min-height: 42px; padding: 0 16px; border-radius: 99px; border: 1px solid var(--sf-line); background: var(--sf-card); color: var(--sf-ink); font-weight: 600; font-size: 14px; }
.sf-cats button.on { background: var(--sf-ink); color: var(--sf-card); border-color: var(--sf-ink); }
.sf-search { display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 14px; border: 1px solid var(--sf-line); border-radius: 12px; background: var(--sf-card); color: var(--sf-muted); }
.sf-search input { flex: 1; min-width: 0; border: 0; background: transparent; min-height: 44px; color: var(--sf-ink); outline: none; }
.sf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 14px; }
.phone .sf-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
.sf-card { display: flex; flex-direction: column; background: var(--sf-card); border: 1px solid var(--sf-line); border-radius: 16px; overflow: hidden; box-shadow: 0 8px 28px rgba(35, 33, 54, .07); }
.sf-card.off { opacity: .72; }
.sf-card-hit { display: flex; flex-direction: column; border: 0; padding: 0; background: transparent; text-align: start; color: inherit; flex: 1; }
.sf-card-media { position: relative; aspect-ratio: 4 / 3; max-width: 100%; background: var(--sf-soft); overflow: hidden; }
.sf-img { width: 100%; height: 100%; object-fit: cover; }
.sf-img.cutout, .pd-img.cutout { object-fit: contain; padding: 8%; background: radial-gradient(circle at 50% 60%, #f7f6fb, var(--sf-soft)); }
.tile { width: 100%; height: 100%; display: grid; place-content: center; text-align: center; gap: 4px; padding: 12px; }
.tile span { font-family: var(--f-sf-display); font-size: 20px; }
.tile small { font-size: 10.5px; opacity: .7; }
.tile-mint { background: radial-gradient(circle at 30% 30%, #f3f6ee, #dfe6d3); color: #3f4a37; }
.tile-orange { background: radial-gradient(circle at 30% 30%, #fbf1e1, #efd6ad); color: #6a4a1c; }
.tile-cream { background: radial-gradient(circle at 30% 30%, #faf9fc, #e6e3ee); color: #3d3a57; }
.sold { position: absolute; inset-block-start: 10px; inset-inline-start: 10px; background: var(--sf-ink); color: var(--sf-card); font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 99px; }
.sf-card-text { padding: 12px 14px 4px; display: grid; gap: 4px; }
.sf-card-text h3 { font-family: var(--f-sf-display); font-size: 18px; color: var(--sf-primary); line-height: 1.25; }
.sf-card-text p { font-size: 13px; color: var(--sf-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.phone .sf-card-text h3 { font-size: 15px; }
.phone .sf-card-text p { display: none; }
.sf-card-foot { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px 12px; gap: 8px; }
.price { font-weight: 700; white-space: nowrap; }
.sf-add { width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--sf-primary); color: var(--sf-primary-ink); display: grid; place-items: center; }
.sf-add:disabled { background: var(--sf-line); color: var(--sf-muted); }
.sf-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--sf-line); background: var(--sf-card); color: var(--sf-ink); font-weight: 700; font-size: 15px; }
.sf-btn-primary { background: var(--sf-primary); border-color: var(--sf-primary); color: var(--sf-primary-ink); }
.sf-btn-primary:hover:not(:disabled) { background: #3d379a; }
.sf-btn-primary:disabled { background: #b4b1c8; border-color: #b4b1c8; }
.sf-btn-ghost { background: transparent; border-style: dashed; }
.sf-btn-sm { min-height: 38px; padding: 0 12px; font-size: 13.5px; }
.sf-btn.block { width: 100%; }
.sf-btn.grow { flex: 1; }
.sf-btn.is-busy { opacity: .85; }
.sf-state { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 40px 16px; color: var(--sf-muted); }
.sf-state h2, .sf-state h3 { font-family: var(--f-sf-display); color: var(--sf-primary); font-size: 22px; }
.sf-state.small { padding: 28px 8px; }
.sf-loading { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.phone .sf-loading { grid-template-columns: 1fr 1fr; }
.sk-card { background: var(--sf-card); border-radius: 16px; padding: 0 0 12px; overflow: hidden; display: grid; gap: 8px; }
.sk-img { aspect-ratio: 4/3; background: var(--sf-soft); }
.sk-line { height: 12px; margin-inline: 12px; border-radius: 6px; background: var(--sf-soft); }
.sk-line.short { width: 50%; }
.sk-img, .sk-line { animation: pulse 1.2s ease-in-out infinite alternate; }
@keyframes pulse { to { opacity: .45; } }
.sf-alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--warn-tint); color: var(--warn); font-size: 14px; }
.sf-alert-err { background: var(--danger-tint); color: var(--danger); }
.sf-alert b { display: block; }
.sf-alert p { margin-block: 2px 8px; }

.sf-scrim { position: fixed; inset: 0; z-index: 45; background: rgba(31, 28, 66, .42); }
.sf-sheet { position: fixed; z-index: 50; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 24px)); max-height: min(88dvh, 820px); display: flex; flex-direction: column; background: var(--sf-card); border-radius: 20px; overflow: hidden; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .5); }
.sf-x { position: absolute; inset-block-start: 10px; inset-inline-end: 10px; z-index: 2; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .94); color: var(--sf-ink); display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }
.sf-drawer-h .sf-x, .ai-h .sf-x { position: static; box-shadow: none; background: var(--sf-soft); }
.pd-media { aspect-ratio: 16 / 9; max-width: 100%; flex: none; background: var(--sf-soft); }
.pd-img { width: 100%; height: 100%; object-fit: cover; }
.pd-body { overflow: auto; padding: 16px 18px; display: grid; gap: 12px; flex: 1; }
.pd-body h2 { font-family: var(--f-sf-display); font-size: 26px; color: var(--sf-primary); }
.pd-desc { color: var(--sf-muted); }
.pd-price { font-weight: 800; font-size: 18px; }
.pd-group { border: 1px solid var(--sf-line); border-radius: 14px; padding: 10px 12px 12px; margin: 0; display: grid; gap: 8px; }
.pd-group.bad { border-color: var(--danger); background: var(--danger-tint); }
.pd-group legend { display: flex; gap: 8px; align-items: center; padding: 0 4px; }
.req { font-size: 12px; padding: 1px 8px; border-radius: 99px; background: var(--sf-soft); color: var(--sf-muted); }
.req.is-req { background: var(--sf-ink); color: var(--sf-card); }
.pd-err { color: var(--danger); font-size: 13px; font-weight: 600; }
.pd-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { display: inline-flex; flex-direction: column; align-items: flex-start; min-height: 46px; justify-content: center; padding: 6px 14px; border-radius: 12px; border: 1.5px solid var(--sf-line); background: var(--sf-card); color: var(--sf-ink); font-weight: 600; font-size: 14px; text-align: start; }
.opt small { font-weight: 500; color: var(--sf-muted); font-size: 12px; }
.opt.on { border-color: var(--sf-primary); background: #eeecf8; box-shadow: inset 0 0 0 1px var(--sf-primary); }
.opt:disabled { opacity: .45; }
.pd-note { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.pd-note textarea, .fld input, .fld textarea { width: 100%; border: 1px solid var(--sf-line); border-radius: 12px; padding: 10px 12px; background: #fff; min-height: 46px; resize: vertical; color: var(--sf-ink); }
.pd-tax { font-size: 12.5px; color: var(--sf-muted); }
.pd-foot { display: flex; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--sf-line); background: var(--sf-card); align-items: center; }
.qty { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--sf-line); border-radius: 12px; padding: 2px; background: #fff; }
.qty button { width: 42px; height: 42px; border: 0; border-radius: 10px; background: transparent; display: grid; place-items: center; color: var(--sf-ink); }
.qty button:disabled { opacity: .35; }
.qty span { min-width: 22px; text-align: center; font-weight: 700; }
.qty-sm button { width: 36px; height: 36px; }
.qty-sm .ic { width: 16px; height: 16px; }
.sf-drawer { position: fixed; z-index: 50; inset-block: 0; inset-inline-end: 0; width: min(420px, 100vw); background: var(--sf-card); display: flex; flex-direction: column; gap: 12px; padding: calc(14px + env(safe-area-inset-top, 0px)) 16px calc(16px + env(safe-area-inset-bottom, 0px)); overflow: auto; box-shadow: 0 0 60px rgba(0, 0, 0, .3); }
.sf-drawer-h { display: flex; justify-content: space-between; align-items: center; }
.sf-drawer-h h2 { font-family: var(--f-sf-display); font-size: 24px; color: var(--sf-primary); }
.cl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.cl { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--sf-line); }
.cl-main { display: grid; gap: 2px; min-width: 0; }
.cl-main small { color: var(--sf-muted); font-size: 12.5px; }
.cl-note { font-style: italic; }
.cl-issue { color: var(--danger) !important; display: inline-flex; gap: 4px; align-items: center; font-weight: 600; }
.cl-issue .ic { width: 14px; height: 14px; }
.cl-bad { background: var(--danger-tint); border-radius: 8px; padding-inline: 8px; }
.cl-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.by-ai { display: inline-flex; align-items: center; gap: 4px; width: fit-content; font-size: 11.5px !important; font-weight: 700; color: var(--brand) !important; background: var(--accent-tint); padding: 1px 8px; border-radius: 99px; font-style: normal !important; }
.by-ai .ic { width: 12px; height: 12px; }
.totals { margin: 0; display: grid; gap: 6px; padding-top: 6px; }
.totals div { display: flex; justify-content: space-between; gap: 12px; }
.totals dt { color: var(--sf-muted); }
.totals dd { margin: 0; font-weight: 600; }
.totals .grand { border-top: 1px solid var(--sf-line); padding-top: 8px; font-size: 17px; }
.totals .grand dt { color: inherit; font-weight: 700; }
.totals .grand dd { font-weight: 800; }
.sf-review { display: grid; gap: 14px; }
.sf-review h1, .sf-success h1 { font-family: var(--f-sf-display); font-size: 30px; color: var(--sf-primary); }
.sf-back { display: inline-flex; align-items: center; gap: 6px; width: fit-content; min-height: 40px; border: 0; background: transparent; color: var(--sf-accent); font-weight: 700; padding: 0; }
.rv-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.phone .rv-grid { grid-template-columns: 1fr; }
.rv-form, .rv-sum { background: var(--sf-card); border: 1px solid var(--sf-line); border-radius: 18px; padding: 16px; display: grid; gap: 12px; }
.rv-sum h2 { font-family: var(--f-sf-display); font-size: 22px; color: var(--sf-primary); }
.rv-row { display: grid; gap: 4px; }
.rv-table { display: flex; gap: 12px; align-items: center; padding: 12px; background: var(--sf-soft); border-radius: 12px; }
.rv-table div { display: grid; }
.fld { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.fld.bad input, .fld.bad textarea { border-color: var(--danger); background: var(--danger-tint); }
.fld small { color: var(--danger); font-weight: 600; }
.sf-success { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 30px 8px; }
.ok-mark { width: 72px; height: 72px; border-radius: 50%; background: var(--sf-primary); color: var(--sf-primary-ink); display: grid; place-items: center; }
.ok-mark .ic { width: 36px; height: 36px; }
.ref-label { color: var(--sf-muted); font-size: 13px; margin-top: 6px; }
.ref { font-family: var(--f-mono); font-size: clamp(30px, 6vw, 44px); font-weight: 700; color: var(--sf-ink); letter-spacing: .02em; }
.succ-status { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; }

/* customer AI */
.ai-launch { position: fixed; z-index: 30; inset-block-end: calc(18px + env(safe-area-inset-bottom, 0px)); inset-inline-end: max(18px, env(safe-area-inset-right, 0px)); display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 18px; border-radius: 99px; border: 0; background: var(--sf-primary); color: #fff; font-weight: 700; box-shadow: 0 14px 34px -10px rgba(0, 0, 0, .55); }
.ai-launch .ic { color: #ead9b6; }
.ai-launch.on { display: none; }
.ai-panel { position: fixed; z-index: 35; inset-block-end: 16px; inset-inline-end: 16px; width: min(400px, calc(100vw - 32px)); height: min(640px, calc(100dvh - var(--bar-h) - 40px)); display: flex; flex-direction: column; background: #fff; color: var(--sf-primary); border-radius: 20px; box-shadow: 0 30px 80px -24px rgba(0, 0, 0, .55); border: 1px solid var(--sf-line); overflow: hidden; font-family: var(--f-body); }
.ai-h { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--sf-line); }
.ai-h > div { flex: 1; display: grid; line-height: 1.25; }
.ai-h small { color: var(--sf-muted); font-size: 12px; }
.ai-av, .sai-av { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--sf-primary); color: #ffffff; }
.ai-cart { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 99px; background: var(--sf-soft); font-size: 13px; font-weight: 700; }
.ai-cart .ic { width: 14px; height: 14px; }
.ai-log { flex: 1; overflow: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 10px; background: #faf9fc; }
.msg { max-width: 92%; display: grid; gap: 8px; }
.msg p { padding: 9px 12px; border-radius: 14px; font-size: 14px; line-height: 1.55; }
.msg.ai p { background: #fff; border: 1px solid var(--sf-line); border-start-start-radius: 4px; }
.msg.me { align-self: flex-end; }
.msg.me p { background: var(--sf-primary); color: #fff; border-start-end-radius: 4px; }
.typing { display: flex; flex-direction: row; gap: 4px; padding: 12px; background: #fff; border: 1px solid var(--sf-line); border-radius: 14px; width: fit-content; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--sf-muted); animation: blink 1s infinite alternate; }
.typing span:nth-child(2) { animation-delay: .2s; } .typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { to { opacity: .25; } }
.clar, .prop { background: #fff; border: 1px solid var(--sf-line); border-radius: 14px; padding: 10px 12px; display: grid; gap: 10px; }
.clar-q { display: grid; gap: 6px; font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-opt { min-height: 38px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--sf-line); background: #fff; font-size: 13px; font-weight: 600; color: var(--sf-primary); }
.chip-opt small { color: var(--sf-muted); font-weight: 500; }
.chip-opt.on { background: var(--sf-primary); color: #fff; border-color: var(--sf-primary); }
.chip-opt.on small { color: #d9d6ee; }
.prop ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.prop li { display: grid; grid-template-columns: 24px 1fr auto; gap: 8px; align-items: start; font-size: 13.5px; }
.prop li div { display: grid; }
.prop li small { color: var(--sf-muted); font-size: 12px; }
.op { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; font-weight: 800; }
.op-add { background: var(--ok-tint); color: var(--ok); }
.op-rm { background: var(--danger-tint); color: var(--danger); }
.prop-delta { display: flex; justify-content: space-between; font-size: 13.5px; border-top: 1px dashed var(--sf-line); padding-top: 8px; }
.prop-st { font-size: 12.5px; font-weight: 700; color: var(--ok); }
.prop-cancelled .prop-st, .prop-stale .prop-st, .prop-replaced .prop-st { color: var(--warn); }
.prop-cancelled, .prop-stale, .prop-replaced { opacity: .75; }
.ai-sugg { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px 2px; border-top: 1px solid var(--sf-line); background: #fff; max-height: 132px; overflow-y: auto; }
.ai-sugg button { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 4px 12px; border-radius: 99px; border: 1px solid var(--accent-line); background: #fff; font-size: 13px; font-weight: 600; color: var(--sf-primary); text-align: start; line-height: 1.3; }
.ai-sugg button:hover { background: var(--accent-tint); }
.ai-sugg .sugg-review { background: var(--sf-primary); border-color: var(--sf-primary); color: #fff; }
.ai-sugg .sugg-review .ic { width: 16px; height: 16px; }
.ai-sugg .sugg-review:hover { background: #3d379a; }
.ai-compose { display: flex; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); align-items: center; }
.ai-compose input { flex: 1; min-width: 0; min-height: 46px; border: 1px solid var(--sf-line); border-radius: 99px; padding: 0 16px; background: var(--sf-soft); }
.mic, .send { width: 46px; height: 46px; flex: none; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--sf-soft); color: var(--sf-primary); }
.send { background: var(--sf-primary); color: #fff; }
.mic.on { background: var(--danger); color: #fff; }
.voice-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--sf-primary); color: #fff; font-size: 13px; }
.voice-bar > span:nth-child(2) { flex: 1; }
.voice-bar .sf-btn { min-height: 32px; background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.v-error { background: var(--danger); }
.wave { display: inline-flex; gap: 3px; align-items: center; height: 20px; }
.wave i { width: 3px; height: 6px; background: #ead9b6; border-radius: 2px; }
.v-listening .wave i, .v-speaking .wave i { animation: wave .9s ease-in-out infinite; }
.wave i:nth-child(2) { animation-delay: .1s; } .wave i:nth-child(3) { animation-delay: .2s; } .wave i:nth-child(4) { animation-delay: .3s; } .wave i:nth-child(5) { animation-delay: .4s; }
@keyframes wave { 50% { height: 18px; } }

/* QR view */
.qr-view { max-width: 1240px; margin: 0 auto; padding: 22px max(16px, env(safe-area-inset-right, 0px)) 40px max(16px, env(safe-area-inset-left, 0px)); display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 28px; align-items: start; }
.qr-side { display: grid; gap: 14px; }
.table-card { background: var(--sf-primary); color: var(--sf-primary-ink); border-radius: 22px; padding: 22px; display: grid; justify-items: center; gap: 6px; text-align: center; box-shadow: 0 20px 50px -24px rgba(35, 33, 54, .45); font-family: var(--f-sf-body); }
.tc-top { display: flex; align-items: center; gap: 8px; font-family: var(--f-sf-display); font-size: 18px; }
.tc-top .rh-ring { fill: #ffffff; } .tc-top .rh-leaf { fill: #2f2a6e; }
.tc-table { font-family: var(--f-sf-display); font-size: 44px; line-height: 1; margin-top: 6px; }
.tc-branch { color: #cfcbe6; font-size: 14px; }
.qr { width: 200px; height: 200px; margin: 10px 0; }
.qr rect { fill: #1f1c42; }
.qr .qr-bg { fill: #ffffff; }
.qr .qr-gap { fill: #ffffff; }
.tc-cta { font-weight: 700; }
.tc-note { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; color: #f5cf86; }
.tc-note .ic { width: 14px; height: 14px; }
.qr-spec { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; font-size: 13.5px; }
.qr-spec summary { cursor: pointer; font-weight: 700; min-height: 32px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.qr-spec ol { margin: 8px 0; padding-inline-start: 18px; display: grid; gap: 6px; }
.qr-session { margin: 0; display: grid; gap: 4px; font-size: 13px; }
.qr-session div { display: flex; justify-content: space-between; gap: 10px; }
.qr-session dt { color: var(--dim); }
.qr-session dd { margin: 0; }
.qr-phone { display: grid; justify-items: center; }
.phone { width: 390px; max-width: 100%; height: min(800px, calc(100dvh - 150px)); min-height: 600px; border-radius: 46px; border: 10px solid #2c2a3c; background: var(--sf-bg); overflow: hidden; transform: translateZ(0); box-shadow: 0 40px 80px -30px rgba(23, 21, 31, .6); }
.phone-screen { height: 100%; overflow: auto; overscroll-behavior: contain; }
.phone .sf-body { padding: 12px 12px 100px; }
.phone .sf-sheet { top: auto; left: 0; right: 0; bottom: 0; transform: none; width: 100%; max-height: 92%; border-radius: 22px 22px 0 0; }
.phone .sf-drawer { inset-block: auto 0; inset-inline: 0; width: 100%; max-height: 88%; border-radius: 22px 22px 0 0; }
.phone .ai-panel { inset: auto 6px 6px 6px; width: auto; height: 86%; }
.phone .ai-launch { inset-block-end: 14px; inset-inline-end: 14px; }
.phone-idle { height: 100%; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 30px; text-align: center; color: var(--sf-muted); }

/* account */
.acc-login { max-width: 440px; margin: 30px auto; display: grid; justify-items: center; text-align: center; gap: 12px; background: var(--sf-card); padding: 28px 22px; border-radius: 20px; border: 1px solid var(--sf-line); }
.acc-login h1 { font-family: var(--f-sf-display); color: var(--sf-primary); font-size: 26px; }
.acc-login p { color: var(--sf-muted); font-size: 14px; }
.acc { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 18px; align-items: start; }
.acc-list, .acc-detail { background: var(--sf-card); border: 1px solid var(--sf-line); border-radius: 18px; padding: 16px; display: grid; gap: 12px; }
.acc-list h2, .acc-detail h3 { font-family: var(--f-sf-display); color: var(--sf-primary); font-size: 20px; }
.acc-who { display: flex; gap: 10px; align-items: center; }
.acc-who > div { flex: 1; display: grid; }
.acc-who small { color: var(--sf-muted); }
.acc-orders { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.acc-orders button { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; text-align: start; padding: 12px; border-radius: 12px; border: 1px solid var(--sf-line); background: #fff; color: var(--sf-ink); }
.acc-orders button.on { border-color: var(--sf-primary); box-shadow: inset 0 0 0 1px var(--sf-primary); }
.ref-s { font-family: var(--f-mono); font-weight: 700; }
.acc-orders .muted { grid-column: 1 / -1; font-size: 12.5px; color: var(--sf-muted); }
.acc-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.ad-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.ad-head h2 { font-family: var(--f-mono); font-size: 28px; }
.ad-head .muted { color: var(--sf-muted); font-size: 13px; }
.ad-meta { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 10px; }
.ad-meta div { background: var(--sf-soft); border-radius: 10px; padding: 8px 10px; }
.ad-meta dt { font-size: 12px; color: var(--sf-muted); }
.ad-meta dd { margin: 0; font-weight: 600; font-size: 14px; }
.track { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.track li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; position: relative; padding-bottom: 14px; }
.track li::before { content: ""; position: absolute; inset-inline-start: 14px; top: 28px; bottom: 0; width: 2px; background: var(--sf-line); }
.track li:last-child::before { display: none; }
.track .dot { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--sf-line); background: #fff; display: grid; place-items: center; z-index: 1; }
.track .dot .ic { width: 15px; height: 15px; }
.track li.done .dot { background: var(--sf-primary); border-color: var(--sf-primary); color: #fff; }
.track li.done::before { background: var(--sf-primary); }
.track li.now .dot { background: var(--sf-brass); border-color: var(--sf-brass); color: #fff; box-shadow: 0 0 0 5px rgba(176, 138, 79, .22); }
.track li div { display: grid; padding-top: 4px; }
.track li small { color: var(--sf-muted); font-size: 12px; }
.track li:not(.done):not(.now) b { color: var(--sf-muted); font-weight: 500; }
.ad-pay { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 12px; background: var(--sf-soft); }
.ad-pay div { display: grid; }
.ad-pay small { color: var(--sf-muted); }
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13.5px; }
.feed li { display: grid; grid-template-columns: 48px 80px 1fr; gap: 8px; align-items: baseline; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.feed li > span { color: var(--dim); font-size: 12.5px; }
.feed li b { font-weight: 500; }
.only-narrow { display: none !important; }

/* ============ POS ============ */
.pos { background: var(--p-bg); color: var(--p-text); min-height: calc(100dvh - var(--bar-h) - 50px); display: flex; flex-direction: column; }
.pos-nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px)); background: #fff; border-bottom: 1px solid var(--p-line); }
.pos-logo { display: inline-flex; gap: 8px; align-items: center; font-weight: 800; font-family: 'Manrope', var(--f-display); }
.pos-tabs { display: flex; gap: 4px; margin-inline-start: 10px; }
.pos-tabs button { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 10px; border: 0; background: transparent; font-weight: 700; color: var(--p-muted); }
.pos-tabs button.on { background: var(--p-tint); color: var(--p-accent-h); }
.badge { background: var(--danger); color: #fff; border-radius: 99px; font-size: 11.5px; padding: 0 7px; line-height: 1.6; }
.pos-branch select, .kds-branch select { min-height: 40px; border-radius: 10px; border: 1px solid var(--p-line); background: var(--p-bg2); padding: 0 10px; font-weight: 600; }
.pos-session { font-size: 13px; color: var(--p-muted); margin-inline-start: auto; }
.pos-user { display: inline-flex; gap: 6px; align-items: center; font-size: 13.5px; font-weight: 600; }
.pos-alert { display: flex; align-items: center; gap: 10px; padding: 8px max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px)); background: var(--warn-tint); color: var(--warn); font-weight: 600; font-size: 14px; border-bottom: 1px solid var(--warn-line); }
.pos-alert span { flex: 1; }
.pos-main { flex: 1; display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); min-height: 0; }
.pos-list { border-inline-end: 1px solid var(--p-line); background: var(--p-bg2); display: flex; flex-direction: column; min-height: 0; }
.pos-filter { display: flex; gap: 4px; padding: 10px; }
.pos-filter button { flex: 1; min-height: 38px; border-radius: 9px; border: 1px solid var(--p-line); background: #fff; font-size: 13px; font-weight: 600; color: var(--p-muted); }
.pos-filter button.on { background: var(--p-accent); color: #fff; border-color: var(--p-accent); }
.pos-cards { flex: 1; overflow: auto; padding: 0 10px 10px; display: grid; gap: 8px; align-content: start; max-height: calc(100dvh - 230px); }
.pcard { display: grid; gap: 8px; text-align: start; padding: 12px; border-radius: 14px; border: 1px solid var(--p-line); background: #fff; color: var(--p-text); }
.pcard:hover { border-color: var(--accent-line); }
.pcard.on { border-color: var(--p-accent); box-shadow: inset 0 0 0 1px var(--p-accent), 0 6px 18px -10px rgba(109, 90, 230, .6); }
.pcard.is-ctx:not(.on) { border-inline-start: 4px solid var(--p-accent); }
.pcard-top, .pcard-mid, .pcard-bot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pcard-top .muted, .pos-detail .muted { color: var(--p-muted); font-size: 12.5px; }
.pcard-bot .price { margin-inline-start: auto; }
b.track { font-family: var(--f-mono); font-size: 18px; font-weight: 800; }
.preset { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; white-space: nowrap; box-shadow: inset 0 0 0 1px currentColor; }
.preset-dinein { background: var(--ok-tint); color: var(--ok); }
.preset-pickup { background: var(--warm-tint); color: var(--warn); }
.preset-delivery { background: var(--info-tint); color: var(--info); }
.src { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; background: var(--p-tint); color: var(--p-accent-h); box-shadow: inset 0 0 0 1px var(--warn-line); }
.src .ic { width: 13px; height: 13px; }
.pos-legend { font-size: 12px; color: var(--p-muted); padding: 8px 10px; }
.pos-detail { padding: 18px max(20px, env(safe-area-inset-right, 0px)) 24px 20px; display: grid; gap: 14px; align-content: start; overflow: auto; max-height: calc(100dvh - 160px); }
.pd-h { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.track-lg { font-family: var(--f-mono); font-size: 34px; font-weight: 800; line-height: 1; }
.pd-h-tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pd-cust { display: flex; gap: 10px; align-items: flex-start; padding: 12px; background: #fff; border: 1px solid var(--p-line); border-radius: 12px; }
.pd-cust > div { flex: 1; display: grid; gap: 2px; }
.pd-cust small { color: var(--p-muted); display: inline-flex; gap: 4px; align-items: center; }
.pd-cust small .ic { width: 14px; height: 14px; }
.pos-lines { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid var(--p-line); }
.pos-lines td { padding: 10px 12px; border-bottom: 1px solid var(--p-line); vertical-align: top; }
.pos-lines td small { display: flex; align-items: center; gap: 4px; color: var(--p-muted); font-size: 12.5px; }
.pos-lines .note { color: var(--warn); font-weight: 600; }
.pos-lines .note .ic { width: 13px; height: 13px; }
.pos-lines .q { width: 40px; font-weight: 800; font-size: 16px; }
.pos-lines .price { text-align: end; }
.pos-note { display: flex; gap: 6px; align-items: center; color: var(--warn); font-size: 14px; }
.pos-totals { background: #fff; border-radius: 12px; padding: 10px 12px; border: 1px solid var(--p-line); }
.pos-totals dt { color: var(--p-muted); }
.pos-info { display: flex; gap: 8px; align-items: center; color: var(--p-muted); font-size: 14px; }
.pos-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pbtn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--p-line); background: #fff; color: var(--p-text); font-weight: 700; }
.pbtn:hover:not(:disabled) { border-color: var(--p-accent); }
.pbtn:disabled { opacity: .5; }
.pbtn-primary { background: var(--p-accent); border-color: var(--p-accent); color: #fff; }
.pbtn-primary:hover:not(:disabled) { background: var(--p-accent-h); }
.pbtn-pay { background: var(--ok); border-color: var(--ok); color: #fff; }
.pbtn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.pbtn-ghost { background: transparent; }
.pbtn-lg { min-height: 54px; font-size: 15.5px; padding: 0 20px; }
.pbtn-sm { min-height: 36px; font-size: 13px; padding: 0 12px; }
.pbtn-block { width: 100%; }
.inline-confirm { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 6px 10px; background: var(--danger-tint); border-radius: 10px; font-weight: 600; font-size: 14px; }
.pos-empty { display: grid; place-items: center; text-align: center; gap: 8px; padding: 50px 16px; color: var(--p-muted); }
.floor { padding: 18px max(16px, env(safe-area-inset-right, 0px)) 30px max(16px, env(safe-area-inset-left, 0px)); display: grid; gap: 14px; }
.floor-h { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.floor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 14px; padding: 18px; background: repeating-linear-gradient(45deg, var(--soft) 0 2px, var(--paper) 2px 14px); border-radius: 18px; border: 1px solid var(--p-line); }
.ftable { min-height: 130px; border-radius: 16px; border: 2px solid var(--line-2); background: #fff; display: grid; place-content: center; justify-items: center; gap: 4px; padding: 10px; color: var(--p-text); font-size: 12.5px; }
.ftable.round { border-radius: 50%; aspect-ratio: 1; min-height: 0; max-width: 100%; }
.ftable .fnum { font-size: 22px; font-weight: 800; }
.ftable small { color: var(--p-muted); }
.ftable.busy { border-color: var(--p-accent); background: var(--p-tint); }
.ftable.st-b-ready { border-color: var(--info); background: var(--info-tint); }
.ftable.st-b-preparing { border-color: var(--warm); background: var(--warn-tint); }
.ftable[aria-disabled="true"] { cursor: default; }
.pos-overlay { position: fixed; inset: 0; z-index: 65; background: rgba(35, 32, 58, .55); display: grid; place-items: center; padding: 16px; }
.payscr { width: min(520px, 100%); background: #fff; border-radius: 20px; padding: 16px; display: grid; gap: 14px; max-height: calc(100dvh - 32px); overflow: auto; }
.pay-h { display: flex; justify-content: space-between; align-items: center; }
.pay-body { display: grid; gap: 12px; }
.pay-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pay-methods button { display: inline-flex; gap: 8px; align-items: center; justify-content: center; min-height: 56px; border-radius: 12px; border: 1.5px solid var(--p-line); background: var(--p-bg2); font-weight: 700; }
.pay-methods button.on { border-color: var(--p-accent); background: var(--p-tint); color: var(--p-accent-h); }
.pay-due { text-align: center; padding: 14px; background: var(--p-bg); border-radius: 14px; }
.pay-due small { color: var(--p-muted); }
.pay-due p { font-family: var(--f-mono); font-size: 42px; font-weight: 800; line-height: 1.1; }
.rcpt-wrap { display: grid; gap: 12px; max-height: calc(100dvh - 32px); overflow: auto; }
.rcpt { width: min(320px, 100%); margin: 0 auto; background: #fff; padding: 18px 16px; font-family: var(--f-kds); font-size: 14px; color: #111; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); display: grid; gap: 4px; mask: radial-gradient(circle 6px at 50% 100%, transparent 98%, #000) 0 0 / 14px 100%; }
.rcpt hr { border: 0; border-top: 1px dashed #999; margin: 6px 0; width: 100%; }
.rc-c { text-align: center; }
.rc-demo { background: #111; color: #fff; padding: 2px 4px; font-size: 12px; }
.rc-row { display: flex; justify-content: space-between; gap: 10px; }
.rc-sub { font-size: 12px; color: #555; padding-inline-start: 12px; }
.rc-big { font-size: 17px; font-weight: 800; }

/* ============ KDS ============ */
.kds { background: var(--k-bg); min-height: calc(100dvh - var(--bar-h) - 50px); display: flex; flex-direction: column; color: var(--ink); }
.kds-h { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); background: var(--surface); border-bottom: 1px solid var(--line); color: var(--ink); }
.kds-title { display: grid; line-height: 1.25; }
.kds-title b { font-size: 17px; }
.kds-title span { font-size: 12px; color: var(--dim); font-family: var(--f-mono); }
.kds-counts { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.kc { display: inline-flex; align-items: center; gap: 8px; padding-block: 4px; padding-inline: 4px 12px; border-radius: 99px; background: var(--soft); color: var(--ink-2); font-size: 13.5px; font-weight: 600; }
.kc b { min-width: 28px; height: 28px; border-radius: 99px; display: grid; place-items: center; color: #fff; font-family: var(--f-kds); font-size: 17px; }
.kc.k-new b { background: var(--k-new); } .kc.k-prog b { background: var(--k-prog); } .kc.k-ready b { background: var(--k-ready); }
.kds-branch select { background: var(--soft); color: var(--ink); border-color: var(--line); }
.kds-cols { flex: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 12px max(12px, env(safe-area-inset-right, 0px)) 12px max(12px, env(safe-area-inset-left, 0px)); align-items: start; }
.kcol { background: var(--surface-2); border-radius: 14px; overflow: hidden; border-top: 6px solid var(--k-new); min-width: 0; }
.kcol.k-prog { border-top-color: var(--k-prog); } .kcol.k-ready { border-top-color: var(--k-ready); }
.kcol h2 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; font-size: 16px; border-bottom: 1px solid var(--line); }
.kcol h2 small { font-size: 11.5px; font-weight: 500; color: var(--dim); }
.kcol h2 b { margin-inline-start: auto; font-family: var(--f-kds); font-size: 20px; }
.kcol-body { padding: 10px; display: grid; gap: 10px; }
.k-empty { color: var(--faint); text-align: center; padding: 26px 0; font-size: 14px; }
.kcard { background: #fff; border-radius: 12px; box-shadow: 0 2px 6px rgba(35, 33, 54, .06); overflow: hidden; border: 1px solid var(--line); }
.kcard.is-ctx { box-shadow: 0 0 0 2px var(--accent), 0 8px 20px -10px rgba(91, 81, 196, .45); }
.kcard header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; background: var(--soft); }
.kcard header > b { font-family: var(--f-kds); font-size: 24px; }
.ktable { font-size: 13px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: #fff; box-shadow: inset 0 0 0 1px var(--warn-line); }
.ktable b { font-family: var(--f-kds); font-size: 16px; }
.ktime { margin-inline-start: auto; display: inline-flex; gap: 4px; align-items: center; font-family: var(--f-kds); font-size: 17px; padding: 2px 8px; border-radius: 8px; background: #fff; }
.ktime .ic { width: 15px; height: 15px; }
.ktime.late { background: var(--danger); color: #fff; }
.ksrc { padding: 6px 12px 0; font-size: 12px; color: var(--dim); }
.kcard ul { list-style: none; margin: 0; padding: 8px 12px; display: grid; gap: 8px; }
.kcard li { display: grid; grid-template-columns: 38px 1fr; gap: 6px; font-size: 16px; }
.kcard li b { font-family: var(--f-kds); font-size: 18px; }
.kcard li div { display: grid; }
.kcard li small { color: var(--dim); font-size: 13px; }
.knote { color: var(--warn) !important; font-weight: 700; background: var(--warn-tint); border-radius: 6px; padding: 1px 6px; width: fit-content; }
.kgen { margin: 0 12px 8px; font-size: 13.5px; }
.kcard footer { padding: 10px 12px 12px; }
.kbtn { width: 100%; min-height: 52px; border-radius: 10px; border: 0; background: var(--k-prog); color: #fff; font-size: 16px; font-weight: 800; display: inline-flex; gap: 8px; align-items: center; justify-content: center; }
.kbtn-ready { background: var(--k-ready); }
.kwait { display: block; text-align: center; font-size: 13.5px; color: var(--info); font-weight: 700; padding: 8px 0; }
.kds-foot { padding: 0 max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px)); font-size: 12.5px; color: var(--dim); max-width: 120ch; }

/* ============ ERP ============ */
.erp { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "nav" "cp" "body"; grid-template-rows: auto auto 1fr; background: var(--o-bg); color: var(--o-text); min-height: calc(100dvh - var(--bar-h) - 50px); font-family: var(--f-body); }
.erp.ai-on { grid-template-columns: minmax(0, 1fr) 390px; grid-template-areas: "nav nav" "cp sai" "body sai"; }
/* ERP header: light, same family as the demo shell; navy stays as the brand colour of the app tile and the active item. */
.erp-nav { grid-area: nav; display: flex; align-items: stretch; gap: 14px; min-height: 56px; padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px)); background: var(--surface); border-bottom: 1px solid var(--line); color: var(--ink); }
.erp-app { display: flex; align-items: center; gap: 10px; flex: none; padding-inline-end: 14px; border-inline-end: 1px solid var(--line); }
.erp-app-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--brand); color: #fff; }
.erp-app-ic .ic { width: 17px; height: 17px; }
.erp-app-t { display: grid; line-height: 1.2; }
.erp-app-t b { font-size: 15px; font-weight: 800; color: var(--brand); }
.erp-app-t small { font-size: 11px; color: var(--dim); }
.erp-menu { display: flex; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.erp-menu button { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 0 10px; border: 0; border-radius: 0; background: transparent; color: var(--dim); font-size: 13.5px; font-weight: 600; box-shadow: inset 0 -2px 0 transparent; transition: color .15s, box-shadow .15s; }
.erp-menu button .ic { width: 16px; height: 16px; }
.erp-menu button:hover { color: var(--ink); box-shadow: inset 0 -2px 0 var(--line-2); }
.erp-menu button.on { color: var(--brand); box-shadow: inset 0 -2px 0 var(--brand); }
.erp-tabsel { display: none; }
.erp-sys { display: flex; align-items: center; gap: 8px; flex: none; }
.erp-co { display: inline-flex; gap: 6px; align-items: center; height: 34px; padding: 0 10px; border-radius: 8px; background: var(--soft); color: var(--ink-2); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.erp-co .ic { width: 15px; height: 15px; color: var(--dim); }
.erp-ai-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--accent-line); background: var(--surface); color: var(--brand); font-size: 13px; font-weight: 700; white-space: nowrap; }
.erp-ai-btn .ic { width: 16px; height: 16px; color: var(--warm); }
.erp-ai-btn:hover { background: var(--accent-tint); }
.erp-ai-btn.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.erp-ai-btn.on .ic { color: #ecd9b0; }
.erp-user { display: flex; align-items: center; gap: 8px; }
.erp-avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-tint); color: var(--brand); font-weight: 800; box-shadow: inset 0 0 0 1px var(--accent-line); }
.erp-user-t { display: grid; line-height: 1.2; }
.erp-user-t b { font-size: 12.5px; }
.erp-user-t small { font-size: 11px; color: var(--dim); }
.erp-cp { grid-area: cp; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 14px max(18px, env(safe-area-inset-left, 0px)) 0; background: var(--o-bg); font-size: 15px; }
.crumb { color: var(--o-soft); }
.crumb b { color: var(--o-text); font-size: 17px; }
.erp-cp-meta { font-size: 12px; color: var(--dim); }
.erp-body { grid-area: body; padding: 16px max(18px, env(safe-area-inset-right, 0px)) 40px max(18px, env(safe-area-inset-left, 0px)); display: grid; gap: 16px; align-content: start; min-width: 0; }
.erp-impact { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: 10px; background: var(--ok-tint); color: var(--ok); border: 1px solid var(--ok-line); font-weight: 600; font-size: 14px; }
.erp-impact span { flex: 1; min-width: 200px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.kpi { background: #fff; border: 1px solid var(--o-line); border-radius: 12px; padding: 14px 16px; display: grid; gap: 4px; border-top: 3px solid var(--accent-line); }
.kpi.good { border-top-color: var(--ok-line); } .kpi.warn { border-top-color: var(--warn-line); }
.kpi span { font-size: 13px; color: var(--o-soft); font-weight: 600; }
.kpi b { font-size: 24px; font-weight: 800; font-family: 'Manrope', var(--f-display); }
.kpi small { font-size: 12px; color: var(--o-soft); }
.erp-2col { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 14px; align-items: start; }
.osheet { background: #fff; border: 1px solid var(--o-line); border-radius: 12px; padding: 16px; display: grid; gap: 12px; min-width: 0; }
.osheet h1 { font-size: 26px; font-family: var(--f-mono); }
.osheet h2 { font-size: 16px; font-weight: 700; }
.osheet h3 { font-size: 14px; font-weight: 700; color: var(--o-soft); }
.osheet.wide { grid-column: 1 / -1; }
.osheet.honest { max-width: 900px; }
.osheet.honest > p { max-width: 75ch; font-size: 14.5px; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bars li { display: grid; grid-template-columns: 110px 1fr auto; gap: 10px; align-items: center; font-size: 13.5px; }
.bt { height: 12px; background: var(--soft); border-radius: 6px; overflow: hidden; }
.bt i { display: block; height: 100%; background: var(--accent); border-radius: 6px; transition: inline-size .4s; }
.br { font-size: 13px; }
.olist { width: 100%; border-collapse: collapse; background: #fff; font-size: 13.5px; }
.erp-body > .tbl-scroll > .olist { border: 1px solid var(--o-line); border-radius: 12px; min-width: 860px; }
.olist th { text-align: start; font-size: 12px; color: var(--o-soft); font-weight: 700; padding: 9px 10px; border-bottom: 1px solid var(--o-line); background: var(--paper); white-space: nowrap; }
.olist td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.olist .r { text-align: end; }
.olist tbody tr[data-act] { cursor: pointer; }
.olist tbody tr[data-act]:hover { background: var(--soft); }
.olist tr.is-ctx { background: var(--accent-tint); }
.olist tfoot td { border-top: 2px solid var(--o-line); background: var(--paper); }
.olist.mini td, .olist.mini th { padding: 6px 8px; }
.src-col { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 12px; font-weight: 700; }
.src-col.src-pos { background: var(--info-tint); color: var(--info); }
.src-col.src-ot { background: var(--ok-tint); color: var(--ok); }
.oform { display: grid; gap: 14px; }
.oform-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.statusbar { display: flex; flex-wrap: wrap; border: 1px solid var(--o-line); border-radius: 8px; overflow: hidden; background: #fff; }
.statusbar span { padding: 6px 12px; font-size: 12.5px; color: var(--o-soft); border-inline-end: 1px solid var(--o-line); }
.statusbar span:last-child { border-inline-end: 0; }
.statusbar .past { color: var(--o-text); }
.statusbar .on { background: var(--o-nav); color: #fff; font-weight: 700; }
.statusbar .on.cancel { background: var(--danger); }
.ofields { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 8px 20px; }
.ofields div { display: grid; grid-template-columns: 130px 1fr; gap: 8px; align-items: baseline; padding: 4px 0; border-bottom: 1px solid var(--line); }
.ofields dt { font-size: 12.5px; color: var(--o-soft); font-weight: 600; }
.ofields dd { margin: 0; font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.olines { min-width: 560px; }
.chatter { background: #fff; border: 1px solid var(--o-line); border-radius: 12px; padding: 14px 16px; display: grid; gap: 8px; }
.chatter h2 { font-size: 15px; }
.obtn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--o-line); background: #fff; color: var(--o-text); font-weight: 600; font-size: 13.5px; }
.obtn-primary { background: var(--o-nav); border-color: var(--o-nav); color: #fff; }
.obtn-ghost { background: transparent; }
.obtn-sm { min-height: 34px; padding: 0 10px; font-size: 12.5px; }
.lnk { border: 0; background: transparent; color: var(--o-nav); font-weight: 700; padding: 0; text-decoration: underline; text-underline-offset: 2px; font-size: inherit; }
.report header { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.rep-kv { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 8px; }
.rep-kv div { background: var(--paper); padding: 8px 10px; border-radius: 8px; display: grid; }
.rep-kv dt { font-size: 12px; color: var(--o-soft); }
.rep-kv dd { margin: 0; font-weight: 800; font-size: 16px; }
.br-h { display: flex; gap: 10px; align-items: flex-start; }
.br-h > div { flex: 1; display: grid; }
.switch { width: 50px; height: 30px; border-radius: 99px; border: 0; background: var(--line-2); position: relative; padding: 0; }
.switch i { position: absolute; top: 3px; inset-inline-start: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: inset-inline-start .15s; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.switch.on { background: var(--ok); }
.switch.on i { inset-inline-start: 23px; }
.price-edit { display: inline-flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.price-edit input { width: 90px; min-height: 34px; border: 1px solid var(--o-line); border-radius: 6px; padding: 0 8px; text-align: end; }
.dotc { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-inline-end: 8px; }
.ok-line { color: var(--ok); font-weight: 700; }
.bad-line { color: var(--danger); font-weight: 700; }

/* staff AI (ordertech_ai_agent tokens) */
.sai { grid-area: sai; position: sticky; top: var(--bar-h); height: calc(100dvh - var(--bar-h)); display: flex; flex-direction: column; background: #fff; border-inline-start: 1px solid var(--line-2); color: var(--ink); z-index: 5; }
.sai-h { display: flex; align-items: center; gap: 6px; padding: 10px 10px 10px 12px; background: color-mix(in srgb, #373080 4%, #fff); border-bottom: 1px solid color-mix(in srgb, #373080 14%, #fff); }
.sai-h > div { flex: 1; display: grid; line-height: 1.25; }
.sai-h small { color: var(--dim); font-size: 12px; }
.sai-av { background: var(--brand); color: #fff; }
.sai-log { flex: 1; overflow: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.smsg { max-width: 94%; display: grid; gap: 6px; }
.smsg p { padding: 9px 12px; border-radius: 12px; font-size: 14px; line-height: 1.55; }
.smsg.ai p { background: color-mix(in srgb, #373080 6%, #fff); }
.smsg.me { align-self: flex-end; }
.smsg.me p { background: #373080; color: #fff; }
.smsg.typing { flex-direction: row; display: flex; gap: 4px; background: var(--soft); padding: 12px; border-radius: 12px; width: fit-content; }
.smsg.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); animation: blink 1s infinite alternate; }
.tool { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--dim); }
.tool .ic { width: 13px; height: 13px; }
.tool code { background: var(--soft); color: #373080; }
.acard { border: 1px solid var(--warn-line); background: #fdfaf3; border-radius: 12px; padding: 10px 12px; display: grid; gap: 8px; }
.acard-h { display: flex; gap: 6px; align-items: center; font-size: 13.5px; flex-wrap: wrap; }
.acard table { width: 100%; font-size: 13.5px; border-collapse: collapse; }
.acard td { padding: 4px; }
.acard .old { text-decoration: line-through; color: var(--dim); }
.acard .new { font-weight: 800; color: var(--ok); }
.acard-st { font-size: 12.5px; font-weight: 700; color: var(--ok); display: flex; gap: 6px; align-items: center; }
.acard-cancelled { border-color: #ddd; background: #f7f7f9; }
.acard-cancelled .acard-st { color: var(--dim); }
.sai-sugg { display: flex; gap: 6px; overflow-x: auto; padding: 8px 12px 0; scrollbar-width: none; }
.sai-sugg button { flex: none; min-height: 36px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--soft); font-size: 12.5px; color: #373080; font-weight: 600; }
.sai-compose { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px calc(12px + env(safe-area-inset-bottom, 0px)); }
.sai-compose textarea { flex: 1; min-width: 0; min-height: 46px; max-height: 120px; border: 1px solid var(--line-2); border-radius: 12px; padding: 11px 12px; resize: none; }
.sai-compose .send { background: #373080; }

/* ============ responsive ============ */
@media (max-width: 1100px) {
  .erp.ai-on { grid-template-columns: minmax(0, 1fr); grid-template-areas: "nav" "cp" "body"; }
  .sai { position: fixed; inset: var(--bar-h) 0 0 auto; width: min(420px, 100vw); height: auto; box-shadow: -10px 0 40px rgba(0, 0, 0, .2); z-index: 50; }
  [dir="rtl"] .sai { inset: var(--bar-h) auto 0 0; }
  .erp-menu span { display: none; }
  .erp-menu button.on span { display: inline; }
  .qr-view { grid-template-columns: 1fr; }
  .qr-view.is-open .qr-side { order: 2; }
}
@media (max-width: 860px) {
  .pos-main { grid-template-columns: 1fr; }
  .pos-main.has-sel .pos-list { display: none; }
  .pos-main:not(.has-sel) .pos-detail { display: none; }
  .pos-cards, .pos-detail { max-height: none; }
  .only-narrow { display: inline-flex !important; }
  .acc { grid-template-columns: 1fr; }
  .acc.has-open .acc-list { display: none; }
  .acc-empty { display: none !important; }
  .kds-cols { grid-template-columns: 1fr; }
  .rv-grid { grid-template-columns: 1fr; }
  .erp-menu { display: none; }
  .erp-tabsel { display: block; flex: 1; }
  .erp-tabsel { align-self: center; }
  .erp-tabsel select { width: 100%; min-height: 40px; border-radius: 8px; border: 1px solid var(--line); padding: 0 10px; font-weight: 700; color: var(--ink); background: var(--soft); }
  .erp-cp-meta { display: none; }
  .erp-co, .pos-session { display: none; }
}
@media (max-width: 760px) {
  .phone { width: 100%; height: auto; min-height: 0; border: 0; border-radius: 0; box-shadow: none; transform: none; background: transparent; overflow: visible; }
  .phone-screen { height: auto; overflow: visible; }
  .phone .sf-head { top: var(--bar-h); }
  .qr-view { padding-inline: 0; gap: 16px; padding-top: 0; }
  .qr-side { padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px)); }
  .qr-view.is-open .table-card { display: none; }
  .phone .sf-sheet, .phone .sf-drawer, .phone .ai-panel { position: fixed; }
  .phone .ai-panel { inset: auto 0 0 0; height: 86dvh; border-radius: 20px 20px 0 0; }
  .ai-panel { inset: auto 0 0 0; width: 100%; height: 86dvh; border-radius: 20px 20px 0 0; }
  .sf-sheet { top: auto; left: 0; bottom: 0; transform: none; width: 100%; max-height: 92dvh; border-radius: 22px 22px 0 0; }
  .sf-drawer { inset-block: auto 0; inset-inline: 0; width: 100%; max-height: 88dvh; border-radius: 22px 22px 0 0; }
  .sf-head { gap: 8px; }
  .sf-method button { padding: 0 10px; font-size: 13px; }
  .sf-branch select { max-width: 110px; }
  .sf-hero { min-height: 180px; }
  .bars li { grid-template-columns: 80px 1fr auto; }
  .feed li { grid-template-columns: 44px 1fr; }
  .feed li > span { display: none; }
  .ofields div { grid-template-columns: 1fr; gap: 0; }
  .erp-app-t, .erp-user-t { display: none; }
  .erp-app { padding-inline-end: 10px; }
  .erp-ai-btn span { display: none; }
  .erp-ai-btn { width: 36px; padding: 0; justify-content: center; }
  .kds-counts { order: 3; flex-basis: 100%; }
}
@media (max-width: 400px) {
  .phone .sf-grid, .sf-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .sf-card-text p { display: none; }
  .sf-card-text h3 { font-size: 15px; }
  .sf-card-foot { padding: 6px 10px 10px; flex-wrap: wrap; }
  .sf-add { width: 40px; height: 40px; }
  .pay-due p { font-size: 34px; }
  .track-lg { font-size: 28px; }
}
@media (max-width: 340px) {
  .sf-grid, .phone .sf-grid { grid-template-columns: 1fr; }
}

/* ---- header + context responsive ---- */
@media (max-width: 1360px) {
  .brand-t small { display: none; }
  .role { width: 68px; }
  .tb-guide span, .tb-sim span { display: none; }
  .tb-guide, .tb-sim { padding: 0; width: 36px; }
}
@media (max-width: 1100px) {
  .roles { display: none; }
  .role-pick { display: flex; align-items: center; gap: 10px; justify-self: start; width: 100%; max-width: 320px; min-width: 0; height: 46px; padding-block: 0; padding-inline: 8px 10px; border-radius: 11px; border: 1px solid var(--line); background: var(--soft); color: var(--ink); text-align: start; }
  .role-pick:hover { border-color: var(--accent-line); }
  .rp-ic { flex: none; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--surface); color: var(--brand); box-shadow: 0 0 0 1px var(--line); }
  .rp-t { display: grid; min-width: 0; line-height: 1.2; }
  .rp-t small { font-size: 10.5px; color: var(--dim); font-weight: 600; }
  .rp-t b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .rp-chev { margin-inline-start: auto; opacity: .7; }
}
@media (max-width: 900px) {
  .ctx { flex-wrap: wrap; gap: 10px; }
  .ctx-next { flex: 1 1 100%; }
}
@media (max-width: 760px) {
  .bar { gap: 10px; }
  .brand-t { display: none; }
  .tb span { display: none; }
  .tb { width: 40px; height: 40px; padding: 0; }
  .lang-seg button { height: 34px; }
  .fact { padding-inline: 12px; }
}
@media (max-width: 420px) {
  .bar { gap: 8px; }
  .tb-guide, .tb-sim, .tdiv { display: none; }
  .sheet-tools { display: grid; }
  .rp-t small { display: none; }
  .cn-prog i { display: none; }
  .cn-go { padding: 0 10px; }
  .ctx-next { gap: 10px; padding-inline: 10px 6px; }
}
@media (max-width: 340px) {
  .lang-seg button { min-width: 28px; }
  .role-pick { padding-inline: 6px; }
}
@media (max-width: 760px) {
}
@media (max-width: 360px) {
  .rp-ic { display: none; }
  .role-pick { gap: 6px; padding-inline: 10px 8px; }
}

.tile-missing { background: var(--soft); color: var(--dim); display: grid; place-content: center; justify-items: center; gap: 4px; text-align: center; padding: 12px; }
.tile-missing .ic { width: 22px; height: 22px; opacity: .6; }
.tile-missing small { font-size: 12px; }
@media (max-width: 1360px) { .erp-user-t { display: none; } }

/* ============ costs, profit, inventory (proposed) ============ */
.fc-ok { background: var(--ok-tint); color: var(--ok); }
.fc-warn { background: var(--warn-tint); color: var(--warn); }
.fc-bad { background: var(--danger-tint); color: var(--danger); }
.val-pos { color: var(--ok); }
.val-neg { color: var(--danger); }
.sheet-h2 { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.cost-note { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-size: 13.5px; }
.cost-note.ok { color: var(--ok); border-color: var(--ok-line); background: var(--ok-tint); }
.cost-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
.cost-layout.has-open { grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); }
.cost-tbl { min-width: 820px; }
.recipe { position: sticky; top: calc(var(--bar-h) + 12px); }
.recipe h3 { margin-top: 4px; }
.fx-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.fx-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; background: var(--paper); font-size: 13px; }
.fx-list li > span:first-child { display: grid; min-width: 0; }
.fx-list small { color: var(--dim); font-size: 12px; }
.cost-box { border: 1px solid var(--accent-line); border-radius: 12px; padding: 12px 14px; background: var(--surface-2); display: grid; gap: 10px; }
.cost-box header { display: flex; align-items: center; gap: 8px; }
.cost-box h3 { color: var(--ink); font-size: 15px; }
.cost-kv { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 10px; }
.cost-kv div { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; display: grid; gap: 2px; }
.cost-kv dt { font-size: 12px; color: var(--dim); }
.cost-kv dd { margin: 0; font-weight: 800; font-size: 16px; display: block; }
.cost-kv dd small { display: block; font-weight: 500; font-size: 12px; color: var(--dim); }
.cost-stock { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); }
.cost-stock.done { color: var(--ok); }
.cost-cons summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--brand); min-height: 32px; display: flex; align-items: center; }
.cost-cons ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 4px 16px; font-size: 13px; }
.cost-cons li { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dashed var(--line); padding: 3px 0; }
.inv-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.seg-o { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--soft); }
.seg-o button { min-height: 36px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; color: var(--dim); font-weight: 600; font-size: 13.5px; }
.seg-o button.on { background: var(--surface); color: var(--brand); box-shadow: 0 1px 2px rgba(35, 33, 54, .1); }
.inv-rule { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); flex-wrap: wrap; }
.inv-total { margin-inline-start: auto; font-size: 13px; color: var(--dim); }
.inv-total b { color: var(--ink); font-size: 15px; }
.inv-alerts { display: grid; gap: 8px; }
.inv-alert { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--warn-line); background: var(--warn-tint); color: var(--warn); }
.inv-alert.out { border-color: var(--danger-line); background: var(--danger-tint); color: var(--danger); }
.inv-alert > div { flex: 1; min-width: 200px; display: grid; }
.inv-alert small { color: var(--ink-2); font-size: 12.5px; }
.inv-alert .obtn .ic { color: var(--warm); }
.moves { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: 13px; }
.moves li { display: grid; grid-template-columns: 44px 88px 1fr auto; gap: 8px; align-items: baseline; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.moves li small { grid-column: 3 / -1; color: var(--dim); font-size: 11.5px; margin-top: -4px; }
.lnk-plain { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; padding: 4px 0; color: inherit; font: inherit; }
.lnk-plain .ic { width: 14px; height: 14px; color: var(--faint); }
.lnk-plain:hover .ic { color: var(--brand); }
.honest-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
@media (max-width: 1100px) { .cost-layout.has-open { grid-template-columns: minmax(0, 1fr); } .recipe { position: static; } }
@media (max-width: 760px) { .inv-total { margin-inline-start: 0; flex-basis: 100%; } .moves li { grid-template-columns: 44px 1fr auto; } .moves li .lnk { display: none; } }
.fx-list li > span:last-child, .cost-tbl td.r, .moves b { white-space: nowrap; }

/* ============ order + warehouse cycle ============ */
.cycle { list-style: none; margin: 0; padding: 0; display: flex; gap: 0; overflow-x: auto; scrollbar-width: thin; }
.cycle li { position: relative; flex: 1 0 128px; min-width: 128px; display: grid; justify-items: center; text-align: center; gap: 6px; padding: 0 6px 4px; }
.cycle li::before { content: ""; position: absolute; top: 15px; inset-inline-start: calc(-50% + 18px); inset-inline-end: calc(50% + 18px); height: 2px; background: var(--line-2); }
.cycle li:first-child::before { display: none; }
.cycle li.cy-done::before { background: var(--accent); }
.cy-dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--line-2); color: var(--faint); z-index: 1; }
.cy-dot .ic { width: 16px; height: 16px; }
.cycle li > div { display: grid; gap: 1px; }
.cycle b { font-size: 13px; }
.cycle small { font-size: 11.5px; color: var(--dim); line-height: 1.35; }
.cycle .cy-at { color: var(--ink-2); font-weight: 600; }
.cy-done .cy-dot { background: var(--accent); border-color: var(--accent); color: #fff; }
.cy-now .cy-dot { border-color: var(--warm); color: var(--warm); box-shadow: 0 0 0 4px var(--warm-tint); }
.cy-warn .cy-dot { background: var(--danger-tint); border-color: var(--danger); color: var(--danger); }
.cy-todo b { color: var(--dim); font-weight: 600; }
.cy-stock.cy-done .cy-dot { background: var(--ok); border-color: var(--ok); }
.cy-stock b { color: var(--ok); }
.cy-stock.cy-todo b { color: var(--dim); }
.cycle-flow .cy-dot { background: var(--accent-tint); border-color: var(--accent-line); color: var(--brand); }
.cycle-flow li::before { background: var(--accent-line); }
.cycle-flow .cy-rule .cy-dot { background: var(--ok); border-color: var(--ok); color: #fff; box-shadow: 0 0 0 4px var(--ok-tint); }
.cycle-flow .cy-rule .cy-at { color: var(--ok); }
.cycle-flow .cy-stock .cy-dot { background: var(--ok-tint); border-color: var(--ok-line); color: var(--ok); }
.cycle-h { font-size: 14px; color: var(--ink); margin-top: 4px; }
.cycle-sm li { flex-basis: 96px; min-width: 96px; }
.cycle-sm .cy-dot { width: 26px; height: 26px; }
.cycle-sm .cy-dot .ic { width: 13px; height: 13px; }
.cycle-sm li::before { top: 12px; inset-inline-start: calc(-50% + 15px); inset-inline-end: calc(50% + 15px); }
.cycle-sm b { font-size: 12px; }
.cycle-sm small { font-size: 11px; }
.pos-cycle { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.pos-cycle > b { font-size: 13px; color: var(--ink-2); }
@media (max-width: 760px) {
  .cycle:not(.cycle-sm) { flex-direction: column; overflow: visible; gap: 0; }
  .cycle:not(.cycle-sm) li { flex: none; min-width: 0; grid-template-columns: 32px 1fr; justify-items: start; text-align: start; gap: 10px; padding: 0 0 14px; }
  .cycle:not(.cycle-sm) li::before { top: -14px; bottom: auto; height: 14px; width: 2px; inset-inline-start: 15px; inset-inline-end: auto; }
}

/* ============ cashier: counter order + customer display ============ */
.badge-soft { background: var(--accent-tint); color: var(--brand); }
.pos-disp-btn { margin-inline-start: auto; }
.pos-disp-btn.on { background: var(--accent-tint); border-color: var(--accent-line); color: var(--brand); }
.pos-session { margin-inline-start: 0; }
.pn { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 380px); min-height: 0; }
.pn.with-display { grid-template-columns: minmax(0, 1fr) minmax(320px, 370px) minmax(260px, 300px); }
.pn-products { display: flex; flex-direction: column; min-width: 0; padding: 12px; gap: 10px; }
.pn-search { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--dim); }
.pn-search input { flex: 1; min-width: 0; border: 0; background: transparent; min-height: 42px; outline: none; color: var(--ink); }
.pn-grid { flex: 1; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; align-content: start; overflow: auto; max-height: calc(100dvh - 300px); }
.pn-card { display: grid; grid-template-rows: auto auto auto; text-align: start; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; color: var(--ink); }
.pn-card:hover:not(.off) { border-color: var(--accent); box-shadow: 0 4px 14px -8px rgba(91, 81, 196, .5); }
.pn-card.off { opacity: .55; }
.pn-media { position: relative; aspect-ratio: 4 / 3; max-width: 100%; background: var(--soft); overflow: hidden; display: block; }
.pn-img { width: 100%; height: 100%; object-fit: cover; }
.pn-img.cutout { object-fit: contain; padding: 8%; }
.pn-media .tile span { font-size: 15px; }
.pn-media .tile small { display: none; }
.pn-count { position: absolute; inset-block-start: 6px; inset-inline-end: 6px; min-width: 26px; height: 26px; border-radius: 99px; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 800; font-size: 13px; }
.pn-flag { position: absolute; inset-block-end: 6px; inset-inline-start: 6px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--ink); color: #fff; }
.pn-name { padding: 8px 10px 0; font-weight: 700; font-size: 13.5px; line-height: 1.3; }
.pn-price { padding: 2px 10px 10px; font-size: 13px; color: var(--brand); font-weight: 700; }
.pn-cats { display: flex; gap: 6px; overflow-x: auto; padding-top: 4px; border-top: 1px solid var(--line); scrollbar-width: none; }
.pn-cats button { flex: none; min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: 14px; color: var(--ink-2); }
.pn-cats button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.pn-order { display: flex; flex-direction: column; gap: 10px; padding: 12px; background: var(--surface); border-inline-start: 1px solid var(--line); min-width: 0; }
.pn-type { display: grid; gap: 8px; }
.pn-type .seg-o { width: 100%; }
.pn-type .seg-o button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; }
.pn-field { display: grid; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--dim); }
.pn-field select, .pn-field input { min-height: 42px; border: 1px solid var(--line); border-radius: 9px; padding: 0 10px; background: var(--surface); color: var(--ink); font-size: 14px; }
.pn-field.bad select { border-color: var(--danger); background: var(--danger-tint); }
.pn-lines { flex: 1; overflow: auto; display: grid; align-content: start; gap: 2px; min-height: 120px; max-height: calc(100dvh - 520px); }
.pn-line { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 8px 4px; border-bottom: 1px dashed var(--line); }
.pn-line.bad { background: var(--danger-tint); border-radius: 8px; }
.pn-line-main { display: grid; gap: 1px; min-width: 0; }
.pn-line-main small { color: var(--dim); font-size: 12px; }
.pn-line-main .note { color: var(--warn); }
.pos-qty { background: var(--surface); }
.pn-empty { padding: 26px 8px; }
.pn-err { display: flex; gap: 6px; align-items: center; color: var(--danger); background: var(--danger-tint); border-radius: 9px; padding: 8px 10px; font-size: 13px; font-weight: 600; }
.pn-totals { margin: 0; }
.pn-actions { display: grid; gap: 6px; }
.pn-sent { display: grid; grid-template-columns: auto 1fr; gap: 8px 10px; align-items: center; padding: 12px; border-radius: 12px; background: var(--ok-tint); border: 1px solid var(--ok-line); color: var(--ok); }
.pn-sent > div:nth-child(2) { display: grid; }
.pn-sent small { color: var(--ink-2); font-size: 12.5px; }
.pn-sent-act { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.pn-display { display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--paper); border-inline-start: 1px solid var(--line); min-width: 0; }
.pn-display header { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.pn-display header b { display: inline-flex; gap: 6px; align-items: center; }
.lnk-small { font-size: 12px; color: var(--brand); font-weight: 600; }
.pos-pick .sf-sheet h2 { font-family: var(--f-body); font-size: 22px; color: var(--ink); }
/* customer display */
.cdisp { display: flex; flex-direction: column; gap: 14px; background: var(--surface); border-radius: 16px; border: 6px solid #2c2a3c; padding: 16px; min-height: 420px; color: var(--ink); font-family: var(--f-sf-body); }
.cdisp-sm { min-height: 360px; padding: 12px; border-width: 5px; gap: 10px; }
.cd-head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.cd-head div { display: grid; line-height: 1.2; }
.cd-head b { font-family: var(--f-sf-display); font-size: 20px; color: var(--sf-primary); }
.cdisp-sm .cd-head b { font-size: 16px; }
.cd-head small { color: var(--dim); font-size: 12px; }
.cd-order { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.cd-title { font-weight: 800; color: var(--brand); }
.cd-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cd-lines li { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: baseline; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.cd-lines li div { display: grid; }
.cd-lines small { color: var(--dim); font-size: 12px; }
.cd-q { font-weight: 800; color: var(--brand); }
.cd-total { margin-top: auto; display: flex; justify-content: space-between; align-items: baseline; padding: 12px; border-radius: 12px; background: var(--brand); color: #fff; }
.cd-total b { font-size: 24px; }
.cdisp-sm .cd-total b { font-size: 19px; }
.cd-note { font-size: 11.5px; color: var(--dim); text-align: center; }
.cd-thanks { flex: 1; display: grid; place-content: center; justify-items: center; text-align: center; gap: 6px; color: var(--ink-2); }
.cd-thanks .ic.big { color: var(--ok); opacity: 1; }
.cd-big { font-family: var(--f-sf-display); font-size: 26px; color: var(--sf-primary); }
.cdisp-sm .cd-big { font-size: 21px; }
.cd-sum { color: var(--dim); font-size: 13px; }
.cd-welcome { flex: 1; display: grid; gap: 10px; align-content: start; }
.cd-welcome img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; }
.cd-welcome div { text-align: center; display: grid; gap: 4px; color: var(--dim); }
.cd-foot { text-align: center; font-size: 11px; color: var(--faint); font-family: var(--f-body); }
.cdisp-page { max-width: 760px; margin: 0 auto; padding: 24px max(16px, env(safe-area-inset-right, 0px)) 40px max(16px, env(safe-area-inset-left, 0px)); display: grid; gap: 12px; }
.cdisp-page .cdisp { min-height: 560px; }
.cdisp-hint { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
@media (max-width: 1280px) { .pn.with-display { grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); } .pn.with-display .pn-display { grid-column: 1 / -1; border-inline-start: 0; border-top: 1px solid var(--line); } .pn-display .cdisp { max-width: 520px; } }
@media (max-width: 860px) {
  .pn, .pn.with-display { grid-template-columns: 1fr; }
  .pn-order { border-inline-start: 0; border-top: 1px solid var(--line); }
  .pn-grid { max-height: none; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .pn-lines { max-height: none; }
  .pos-disp-btn { margin-inline-start: 0; }
}
@media (max-width: 400px) { .pn-grid { grid-template-columns: 1fr 1fr; } }

.seg { grid-template-columns: repeat(3, 1fr); }
.seg button { font-size: 12.5px; padding: 0 4px; }

.pos-tabs button { white-space: nowrap; }
.pn-jump { display: none; }
@media (max-width: 860px) {
  .pn-jump { position: sticky; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 12px 10px; min-height: 52px; padding: 0 16px; border: 0; border-radius: 14px; background: var(--brand); color: #fff; font-weight: 700; box-shadow: 0 12px 28px -12px rgba(35, 33, 54, .6); }
  .pn-jump span { display: inline-flex; align-items: center; gap: 6px; }
  .pn-order { scroll-margin-top: calc(var(--bar-h) + 8px); }
}

@media (max-width: 560px) {
  .pos-tabs { flex: 1 1 100%; margin-inline-start: 0; order: 3; }
  .pos-tabs button { flex: 1 1 0; min-width: 0; justify-content: center; padding: 0 6px; font-size: 13px; gap: 4px; }
  .pos-tabs button .ic { width: 16px; height: 16px; flex: none; }
  .pos-nav { gap: 8px; }
}
@media (max-width: 360px) { .pos-tabs button .ic { display: none; } }

/* ============ tutorial ============ */
.tb-tour { background: var(--brand); color: #fff; border-color: var(--brand); }
.tb-tour:hover { background: var(--brand-2); color: #fff; }
.tb-tour.on { background: var(--surface); color: var(--brand); border-color: var(--accent-line); }
.ctx-tour { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 12px; background: var(--accent-tint); color: var(--brand); font-size: 13px; font-weight: 700; }
.sheet-tour { margin-top: 12px; }
.tour-layer { position: fixed; inset: 0; z-index: 75; pointer-events: none; }
.tour-spot { position: fixed; border-radius: 12px; box-shadow: 0 0 0 3px var(--accent), 0 0 0 200vmax rgba(23, 21, 40, .38); pointer-events: none; transition: top .2s, left .2s, width .2s, height .2s; animation: tourPulse 1.6s ease-in-out infinite; }
@keyframes tourPulse { 50% { box-shadow: 0 0 0 6px rgba(91, 81, 196, .55), 0 0 0 200vmax rgba(23, 21, 40, .38); } }
.tour-bubble { position: fixed; pointer-events: auto; width: min(380px, calc(100vw - 24px)); background: var(--surface); color: var(--ink); border-radius: 16px; padding: 14px 16px 12px; box-shadow: 0 24px 60px -16px rgba(23, 21, 40, .55); border: 1px solid var(--accent-line); display: grid; gap: 8px; font-family: var(--f-body); }
.tour-center { left: 50% !important; top: auto !important; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); }
.tb-head { display: flex; align-items: center; gap: 8px; }
.tb-eyebrow { font-size: 11.5px; font-weight: 700; color: var(--brand); }
.tb-count { margin-inline-start: auto; font-size: 12px; font-weight: 800; color: var(--dim); }
.tb-x { width: 32px; height: 32px; }
.tb-bar { height: 4px; border-radius: 2px; background: var(--accent-tint); overflow: hidden; }
.tb-bar i { display: block; height: 100%; background: var(--brand); border-radius: 2px; }
.tour-bubble h3 { font-size: 17px; font-weight: 800; color: var(--ink); display: flex; gap: 8px; align-items: center; }
.tour-bubble p { font-size: 14px; color: var(--ink-2); line-height: 1.6; }
.tb-why { display: flex; gap: 6px; align-items: flex-start; font-size: 13px !important; color: var(--brand) !important; background: var(--accent-tint); padding: 8px 10px; border-radius: 10px; }
.tb-why .ic { width: 15px; height: 15px; flex: none; margin-top: 3px; color: var(--warm); }
.tb-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tb-hint { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--dim); font-weight: 600; margin-inline-end: auto; }
.tb-hint .ic { width: 15px; height: 15px; color: var(--accent); }
.tour-done h3 .ic { color: var(--ok); }
.tour-scrim { z-index: 76; }
.tour-pick { position: fixed; z-index: 77; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(620px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); overflow: auto; background: var(--surface); border-radius: 20px; padding: 22px; display: grid; gap: 10px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .5); }
.tour-pick h2 { font-family: var(--f-display); font-size: 22px; font-weight: 800; }
.tp-x { position: absolute; inset-block-start: 10px; inset-inline-end: 10px; }
.tp-cards { display: grid; gap: 10px; margin-top: 6px; }
.tp-card { display: grid; gap: 6px; text-align: start; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); }
.tp-card:hover { border-color: var(--accent); background: var(--accent-tint); }
.tp-card.is-started { border-color: var(--accent-line); box-shadow: inset 0 0 0 1px var(--accent-line); }
.tp-card b { font-size: 15px; }
.tp-card small { color: var(--dim); font-size: 12.5px; }
.tp-bar { height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; }
.tp-bar i { display: block; height: 100%; background: var(--brand); }
.tp-cta { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--brand); }
.tp-skip { justify-self: center; }
@media (max-width: 760px) {
  .tour-bubble:not(.tour-center) { left: 12px !important; width: calc(100vw - 24px) !important; }
  .tb-tour span { display: none; }
}
@media (max-width: 420px) { .tb-tour { width: 40px; } }
@media (max-width: 1500px) {
  .tb-guide span, .tb-sim span { display: none; }
  .tb-guide, .tb-sim { padding: 0; width: 36px; }
}

@media (max-width: 1400px) { .role { width: 62px; font-size: 11px; } .rgroup { padding: 2px; } }
@media (max-width: 1280px) {
  .roles { display: none; }
  .role-pick { display: flex; align-items: center; gap: 10px; justify-self: start; width: 100%; max-width: 320px; min-width: 0; height: 46px; padding-block: 0; padding-inline: 8px 10px; border-radius: 11px; border: 1px solid var(--line); background: var(--soft); color: var(--ink); text-align: start; }
  .rp-ic { flex: none; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--surface); color: var(--brand); box-shadow: 0 0 0 1px var(--line); }
  .rp-t { display: grid; min-width: 0; line-height: 1.2; }
  .rp-t small { font-size: 10.5px; color: var(--dim); font-weight: 600; }
  .rp-t b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .rp-chev { margin-inline-start: auto; opacity: .7; }
}

/* ============ one tour at a time / steps in order ============ */
.steps li.locked { opacity: .55; }
.steps li.locked .dot .ic { width: 13px; height: 13px; }
.seg button.locked { color: var(--faint); }
.seg button .ic { width: 13px; height: 13px; vertical-align: -2px; margin-inline-end: 3px; }
.lock-panel { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 18px 10px; border: 1px dashed var(--line-2); border-radius: 12px; color: var(--ink-2); font-size: 14px; }
.lock-panel .ic.big { width: 30px; height: 30px; color: var(--faint); opacity: 1; }
.lock-note { display: flex; gap: 6px; align-items: flex-start; font-size: 13px; color: var(--dim); background: var(--soft); padding: 10px 12px; border-radius: 10px; }
.jcard-a .lock-note { background: var(--surface); }
.lock-note .ic { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.tp-card.is-locked { opacity: .7; background: var(--soft); cursor: not-allowed; }
.tp-card.is-locked b { display: inline-flex; gap: 6px; align-items: center; color: var(--dim); }
.tp-card.is-locked b .ic { width: 15px; height: 15px; }

.tour-between { border-color: var(--ok-line); }
.tour-between h3 .ic { color: var(--ok); }
.tb-done { font-size: 13px !important; color: var(--dim) !important; text-decoration: line-through; text-decoration-color: var(--line-2); }
.tb-next { display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; background: var(--accent-tint); }
.tb-next small { font-size: 11.5px; font-weight: 700; color: var(--brand); }
.tb-next b { font-size: 14.5px; color: var(--ink); line-height: 1.5; }

/* steps list: four tours in a tidy 2 x 2 */
.seg.seg-4 { grid-template-columns: 1fr 1fr; }
/* Three-language selector (ع · EN · ES): on headers that show the role picker, keep the
   selector close to the width the two-language control used (targets stay >= 24px wide). */
@media (max-width: 1280px) { .lang-seg button { min-width: 26px; padding-inline: 4px; } }
@media (max-width: 420px) { .lang-seg button { min-width: 24px; padding-inline: 3px; font-size: 12px; } }
/* Spanish product sheet: the longer add-to-cart label may wrap, while the price and JOD always stay
   whole. They share one line when it fits; otherwise the whole price moves under the label. */
html[lang="es"] .pd-foot .sf-btn.grow { min-width: 0; flex-wrap: wrap; column-gap: 10px; row-gap: 0; padding-block: 6px; line-height: 1.25; text-align: center; }
html[lang="es"] .pd-add-l { min-width: 0; }
html[lang="es"] .pd-add-p { white-space: nowrap; }
