/* TRUST — الأنماط. القيم من DESIGN.md (حزمة التصميم المعتمدة) ولا تُقرَّب. */
:root {
  --paper: #F6F4F1; --ink: #1F1B22; --ink2: #3E3A40; --muted: #5E5A60; --line: #E3DEE2; --thread: #D9D3D8;
  --field: #CFC8CD; --ph: #77727A; --off: #A9A1A8; --plum: #5E2350; --halo: #E7D9E3; --sel: #EFE6EC; --plum-dark: #C58BB5;
  --err: #9E2A22; --err-bg: #F6DCD8; --err-ink: #7A1F18; --warn: #8A5A00; --warn-bg: #F4E7C8; --warn-ink: #5A3D00; --ok: #2F5D3A;
  --white: #FFFFFF; --stripe: repeating-linear-gradient(135deg, #ECE8EA 0 6px, #F4F1F2 6px 12px);
  --mono: 'IBM Plex Mono', 'Almarai', Tahoma, ui-monospace, monospace; --sans: 'Almarai', Tahoma, sans-serif;
  --gutter: 22px; --tab-h: 64px; --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); -webkit-text-size-adjust: 100%; }
body { min-height: 100dvh; overflow-x: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
a { color: var(--plum); text-decoration: none; }
:focus-visible { outline: 2px solid var(--plum); outline-offset: 2px; border-radius: 6px; }
.mono { font-family: var(--mono); }
.num { font-family: var(--mono); unicode-bidi: isolate; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.muted { color: var(--muted); }
.ink2 { color: var(--ink2); }
.plum { color: var(--plum); }
.ok { color: var(--ok); }
.warn { color: var(--warn); }
.errc { color: var(--err); }
.b { font-weight: 700; }
.xb { font-weight: 800; }
.hide { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.grow { flex: 1; }
.row { display: flex; align-items: center; gap: 10px; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.stack { display: flex; flex-direction: column; }
.gap6 { gap: 6px; } .gap8 { gap: 8px; } .gap10 { gap: 10px; } .gap12 { gap: 12px; } .gap14 { gap: 14px; } .gap18 { gap: 18px; }
.mt4 { margin-top: 4px; } .mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt18 { margin-top: 18px; } .mb10 { margin-bottom: 10px; } .mb18 { margin-bottom: 18px; }
.f12 { font-size: 12px; } .f13 { font-size: 13px; } .f14 { font-size: 14px; } .f15 { font-size: 15px; } .f16 { font-size: 16px; } .f18 { font-size: 18px; }
.lh { line-height: 1.8; }

/* ---------- الهيكل ---------- */
#app { min-height: 100dvh; }
.shell { min-height: 100dvh; display: flex; }
.side { display: none; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 100dvh; }
.screen { flex: 1; display: flex; flex-direction: column; min-height: 0; position: relative; }
.screen.with-tabs { padding-bottom: calc(var(--tab-h) + var(--safe-b)); }
.topbar { padding: 14px var(--gutter) 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; }
.head { padding: 10px var(--gutter) 14px; display: flex; flex-direction: column; gap: 4px; }
.head .back { font-size: 13px; color: var(--muted); align-self: flex-start; min-height: 32px; display: inline-flex; align-items: center; gap: 6px; }
.head .back:hover { color: var(--plum); }
.head h1 { margin: 0; font-size: 22px; font-weight: 800; line-height: 1.3; }
.head h1.sm { font-size: 19px; }
.head .sub { font-size: 12px; color: var(--muted); line-height: 1.6; }
.content { flex: 1; padding: 0 var(--gutter) 22px; display: flex; flex-direction: column; min-width: 0; }
.content.pad-fab { padding-bottom: 96px; }
.actions { position: sticky; bottom: 0; z-index: 5; background: linear-gradient(to top, var(--paper) 78%, rgba(246,244,241,0)); padding: 14px 16px calc(14px + var(--safe-b)); display: grid; gap: 10px; }
.with-tabs .actions { bottom: calc(var(--tab-h) + var(--safe-b)); }
.actions.two { grid-template-columns: 1fr 1fr; }
.actions.two-wide { grid-template-columns: 1fr 1.6fr; }
.actions.two-wider { grid-template-columns: 1fr 1.8fr; }
.fab { position: fixed; left: 16px; right: 16px; bottom: calc(var(--tab-h) + var(--safe-b) + 12px); z-index: 6; }
.fab .btn { box-shadow: 0 10px 24px -12px rgba(94,35,80,.6); }

/* شريط التنقّل السفلي */
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; display: flex; justify-content: space-around; padding: 10px 0 calc(12px + var(--safe-b)); border-top: 1px solid var(--line); background: var(--paper); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); min-width: 56px; min-height: 44px; justify-content: center; }
.tabbar a i { width: 6px; height: 6px; border-radius: 50%; background: transparent; }
.tabbar a.on { color: var(--plum); font-weight: 700; }
.tabbar a.on i { background: var(--plum); }

/* ---------- الشعار ---------- */
.logo-mark { display: inline-block; flex: none; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand .word { display: flex; flex-direction: column; }
.brand .word b { font-size: 34px; font-weight: 800; line-height: 1.1; letter-spacing: .04em; }
.brand .word span { font-size: 13px; font-weight: 700; color: var(--plum); }

/* ---------- الأزرار ---------- */
.btn { height: 56px; border-radius: 28px; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 16px; font-weight: 800; background: var(--plum); color: var(--paper); width: 100%; padding: 0 18px; transition: opacity .15s, transform .05s; white-space: nowrap; }
.btn:active { transform: scale(.99); }
.btn.ghost { background: transparent; border: 2px solid var(--plum); color: var(--plum); }
.btn.text { height: 44px; background: transparent; color: var(--plum); font-size: 14px; }
.btn.text.muted { color: var(--muted); }
.btn.sm { height: 48px; border-radius: 24px; font-size: 15px; }
.btn.posbtn { height: 64px; border-radius: 32px; font-size: 17px; }
.btn.pay { height: 72px; border-radius: 36px; justify-content: space-between; padding: 0 28px; font-size: 18px; }
.btn.danger { background: var(--err); }
.btn[disabled], .btn.is-disabled { background: var(--line); color: var(--ph); border-color: transparent; cursor: not-allowed; }
.btn.text[disabled] { background: transparent; color: var(--off); }
.btn.busy { opacity: .75; cursor: progress; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; animation: spin .7s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.link { color: var(--plum); font-weight: 800; font-size: 13px; min-height: 44px; display: inline-flex; align-items: center; }
.link.f14 { font-size: 14px; }
.linkrow { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; font-weight: 800; color: var(--plum); }
.linkrow button { min-height: 36px; color: var(--plum); font-weight: 800; }

/* ---------- الحقول ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .lbl { font-size: 12px; font-weight: 700; color: var(--ink2); }
.input, .select, .textarea { min-height: 48px; border: 1px solid var(--field); border-radius: 10px; padding: 0 14px; font-size: 14px; background: var(--white); width: 100%; outline: none; }
.textarea { padding: 12px 14px; min-height: 88px; resize: vertical; line-height: 1.7; }
.input:focus, .select:focus, .textarea:focus { border: 2px solid var(--plum); padding: 0 13px; }
.textarea:focus { padding: 11px 13px; }
.input.mono { font-family: var(--mono); }
.input::placeholder, .textarea::placeholder { color: var(--ph); }
.field.err .input, .field.err .select, .field.err .textarea { border: 2px solid var(--err); padding: 0 13px; }
.field .hint { font-size: 12px; color: var(--muted); line-height: 1.6; }
.field .msg { font-size: 12px; color: var(--err); line-height: 1.6; }
.picker { min-height: 48px; border: 1px solid var(--field); border-radius: 10px; padding: 0 14px; font-size: 14px; background: var(--white); width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.picker .ph { color: var(--ph); }
.select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%235E5A60' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-position: 14px center; background-size: 12px 8px; background-repeat: no-repeat; padding-left: 36px; }
[dir="ltr"] .select { background-position: calc(100% - 14px) center; padding-right: 36px; padding-left: 14px; }
.search { height: 44px; border: 1px solid var(--field); border-radius: 22px; background: var(--white); padding: 0 16px; display: flex; align-items: center; gap: 10px; font-size: 13px; }
.search:focus-within { border: 2px solid var(--plum); padding: 0 15px; }
.search input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 0; height: 100%; font-size: 14px; }
.search input::placeholder { color: var(--ph); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.search .lens { width: 12px; height: 12px; border: 2px solid var(--ph); border-radius: 50%; flex: none; }
.search .clear { color: var(--muted); font-size: 18px; min-width: 28px; min-height: 28px; }
.seg { display: flex; border: 1px solid var(--plum); border-radius: 20px; overflow: hidden; font-size: 13px; font-weight: 700; flex: none; }
.seg button { flex: 1; text-align: center; padding: 9px; color: var(--plum); min-height: 38px; }
.seg button.on { background: var(--plum); color: var(--paper); }
.switch { width: 48px; height: 28px; border-radius: 14px; background: var(--field); position: relative; flex: none; transition: background .15s; }
.switch::after { content: ''; position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--white); transition: right .15s; }
.switch.on { background: var(--plum); }
.switch.on::after { right: 23px; }
[dir="ltr"] .switch::after { right: auto; left: 3px; transition: left .15s; }
[dir="ltr"] .switch.on::after { left: 23px; }
.radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--off); flex: none; }
.radio.on { border: 6px solid var(--plum); }
.check { width: 18px; height: 18px; border: 2px solid var(--off); border-radius: 4px; flex: none; display: inline-flex; align-items: center; justify-content: center; }
.check.on { background: var(--plum); border-color: var(--plum); }
.check.on::after { content: ''; width: 8px; height: 4px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px,-1px); }
.optrow { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); width: 100%; min-height: 48px; }
.optrow.disabled { color: #77727A; cursor: not-allowed; }
.optlist { border-top: 1px solid var(--line); }
.stepper { display: grid; grid-template-columns: 36px 32px 36px; align-items: center; text-align: center; border: 1px solid var(--field); border-radius: 18px; height: 36px; background: var(--white); font: 600 14px var(--mono); flex: none; }
.stepper button { height: 100%; font: 600 16px var(--mono); }
.stepper.lg { grid-template-columns: 44px 30px 44px; border-radius: 22px; height: 44px; font-size: 15px; }
.stepper button[disabled] { color: var(--off); }

/* ---------- القوائم: صفوف لا بطاقات ---------- */
.tabs { display: flex; gap: 18px; padding: 0 var(--gutter); border-bottom: 1px solid var(--line); font-size: 13px; overflow-x: auto; scrollbar-width: none; flex: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { padding: 10px 0; color: var(--muted); white-space: nowrap; min-height: 44px; border-bottom: 2px solid transparent; }
.tabs button.on { color: var(--ink); font-weight: 800; border-bottom-color: var(--plum); }
.tabs.lg { gap: 24px; font-size: 15px; padding: 0; }
.tabs.lg button { padding: 12px 0; border-bottom-width: 3px; }
.group-h { font-size: 12px; color: var(--muted); font-weight: 700; padding: 14px 0 2px; }
.lrow { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); width: 100%; text-align: inherit; }
button.lrow:hover, a.lrow:hover { background: linear-gradient(to left, transparent, rgba(239,230,236,.55), transparent); }
.lrow .t { font-size: 15px; font-weight: 700; line-height: 1.5; text-wrap: pretty; }
.lrow .s { font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.lrow .amt { text-align: left; flex: none; }
[dir="ltr"] .lrow .amt { text-align: right; }
.lrow .amt .v { font: 600 15px var(--mono); }
.lrow .amt .st { font-size: 11px; color: var(--muted); margin-top: 4px; }
.lrow .amt .st.plum { color: var(--plum); } .lrow .amt .st.warn { color: var(--warn); } .lrow .amt .st.err { color: var(--err); }
.nav-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; width: 100%; min-height: 48px; }
.nav-row .chev { color: var(--muted); }
.nav-row.locked { color: var(--muted); }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; font-size: 13px; color: var(--ink2); }
.kv.total { font-size: 15px; font-weight: 800; color: var(--ink); border-top: 1px solid var(--ink); padding-top: 8px; margin-top: 4px; }
.kv .num { flex: none; }
.big { font: 700 40px var(--mono); line-height: 1.2; }
.big.b36 { font-size: 36px; } .big.b32 { font-size: 32px; line-height: 1.1; } .big.b38 { font-size: 38px; line-height: 1; }
.big small { font: 400 13px var(--sans); margin-inline-start: 6px; }
.sec-h { font-size: 14px; font-weight: 800; margin-bottom: 10px; }
/* التقارير: صفوف بفاصل لا جداول؛ الأعمدة الكثيرة تتمرر أفقيًا داخل حاويتها فقط */
.rep-scroll { overflow-x: auto; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); }
.rep-table.wide { min-width: 560px; }
.rep-row { display: grid; gap: 10px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; width: 100%; text-align: start; }
button.rep-row:hover { background: var(--sel); }
.rep-row .n { text-align: end; white-space: nowrap; }
.rep-row.ind > :first-child { padding-inline-start: 18px; }
.rep-head { font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--ink); padding: 6px 0; }
.rep-sec { font-size: 12px; font-weight: 800; color: var(--plum); padding: 14px 0 4px; }
.rep-row.sub { font-weight: 800; border-top: 1px solid var(--ink); }
.rep-row.grand { font-weight: 800; font-size: 15px; border-top: 1px solid var(--ink); border-bottom: 3px double var(--ink); }
.vat-card { display: flex; flex-direction: column; gap: 6px; width: 100%; text-align: start; padding: 4px 0 14px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.more-btn { margin: 14px auto 0; }

/* ---------- السلسلة ---------- */
.chain { display: flex; flex-direction: column; }
.node { display: grid; grid-template-columns: 22px 1fr; gap: 12px; }
.node > .rail { display: flex; flex-direction: column; align-items: center; padding-top: 2px; }
.node > .rail .dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.node > .rail .thr { flex: 1; width: 2px; background: var(--thread); margin-top: 4px; }
.node > .body { padding-bottom: 14px; min-width: 0; }
.node.last > .rail .thr { display: none; }
.node.last > .body { padding-bottom: 0; }
.node.nb > .body { padding-bottom: 18px; }
.dot.done { background: var(--plum); }
.dot.cur { width: 20px !important; height: 20px !important; background: var(--plum); box-shadow: 0 0 0 4px var(--halo); }
.dot.rel { border: 2px solid var(--plum); background: var(--paper); }
.dot.pend { border: 2px solid var(--warn); background: var(--warn-bg); }
.dot.fail { background: var(--err); }
.dot.todo { border: 2px solid var(--off); }
.dot.next { border: 2px dashed var(--plum); }
button.node, a.node { width: 100%; text-align: inherit; }

/* ---------- التنبيهات ---------- */
.banner { margin: 0 16px 12px; padding: 12px 14px; border-radius: 12px; font-size: 13px; line-height: 1.7; }
.banner.err { background: var(--err-bg); color: var(--err-ink); }
.banner.warn { background: var(--warn-bg); color: var(--warn-ink); }
.banner.info { background: var(--sel); color: var(--plum); }
.banner.ok { background: #E3EDE5; color: var(--ok); }
.banner.inline { margin: 0 0 12px; }
.banner button { color: inherit; font-weight: 800; text-decoration: underline; }

/* ---------- الهيكل العظمي (تحميل) ---------- */
.sk { display: flex; justify-content: space-between; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.sk .l { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.sk .r { width: 64px; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.sk span { display: block; height: 12px; border-radius: 6px; background: var(--line); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }

/* ---------- حالات خاصة ---------- */
.empty { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 24px 0; }
.lock-ic { width: 56px; height: 56px; border: 3px solid var(--ink); border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.lock-ic span { width: 16px; height: 16px; border-radius: 50%; background: var(--plum); }
.qr { width: 64px; height: 64px; flex: none; background: repeating-linear-gradient(135deg, #E3DEE2 0 4px, #F1EEEF 4px 8px); font: 8px var(--mono); color: var(--muted); display: flex; align-items: flex-end; padding: 3px; }
.qr.real { background: #fff; padding: 2px; align-items: stretch; }
.qr.real canvas, .qr.real img, .qr.real svg { width: 100%; height: 100%; image-rendering: pixelated; }

/* ---------- النوافذ (لوح سفلي) ---------- */
.scrim { position: fixed; inset: 0; background: rgba(31,27,34,.55); z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.sheet { background: var(--paper); border-radius: 24px 24px 0 0; padding: 14px 22px calc(26px + var(--safe-b)); display: flex; flex-direction: column; gap: 14px; width: 100%; max-height: 92dvh; overflow: auto; animation: up .2s ease-out; }
.sheet .grip { width: 40px; height: 4px; border-radius: 2px; background: var(--field); align-self: center; flex: none; }
.sheet h2 { margin: 0; font-size: 20px; font-weight: 800; line-height: 1.5; }
.sheet .p { font-size: 14px; color: var(--ink2); line-height: 1.8; margin: 0; }
.sheet .sumrow { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
@keyframes up { from { transform: translateY(30px); opacity: .4; } }
@keyframes fade { from { opacity: 0; } }
.scrim.shown, .scrim.shown > * { animation: none; }

/* ---------- الإشعار العابر ---------- */
.toasts { position: fixed; left: 16px; right: 16px; bottom: calc(var(--tab-h) + var(--safe-b) + 84px); z-index: 80; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 14px; font-size: 14px; line-height: 1.6; max-width: 520px; box-shadow: 0 12px 30px -14px rgba(0,0,0,.5); animation: up .2s; pointer-events: auto; display: flex; gap: 10px; align-items: center; }
.toast.err { background: var(--err); }
.toast.warn { background: var(--warn); }
.toast.ok::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--plum-dark); flex: none; }

/* ---------- البحث المنسدل ---------- */
.dd { position: relative; }
.dd-list { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30; background: var(--white); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 40px -24px rgba(31,27,34,.35); max-height: 320px; overflow: auto; }
.dd-list button { display: flex; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); width: 100%; font-size: 14px; }
.dd-list button.on, .dd-list button:hover { background: var(--sel); }
.dd-list .empty-row { padding: 14px; font-size: 13px; color: var(--muted); }
mark { background: var(--halo); color: inherit; border-radius: 3px; }

/* ---------- نقطة البيع ---------- */
.pos { height: 100dvh; display: flex; flex-direction: column; background: var(--paper); overflow: hidden; }
.pos-top { height: 60px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; border-bottom: 1px solid var(--line); gap: 12px; }
.pos-top .ttl { font-size: 17px; font-weight: 800; display: flex; align-items: center; gap: 12px; min-height: 44px; }
.pos-top .meta { display: flex; align-items: center; gap: 22px; font-size: 13px; color: var(--muted); }
.pos-top .meta button { color: var(--muted); min-height: 44px; }
.conn { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--ok); }
.conn i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.conn.off { color: var(--warn); }
.pos-body { flex: 1; display: flex; min-height: 0; }
.rail-cats { width: 176px; flex: none; border-left: 1px solid var(--line); padding: 18px; overflow: auto; }
[dir="ltr"] .rail-cats { border-left: 0; border-right: 1px solid var(--line); }
.rail-cats .rc { display: grid; grid-template-columns: 20px 1fr; gap: 10px; min-height: 66px; width: 100%; text-align: inherit; padding-bottom: 10px; align-items: stretch; }
.rail-cats .rc .rl { display: flex; flex-direction: column; align-items: center; padding-top: 4px; }
.rail-cats .rc .rl .d { flex: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--plum); background: var(--paper); }
.rail-cats .rc .rl .t2 { flex: 1; width: 2px; background: var(--thread); margin-top: 4px; }
.rail-cats .rc:last-child .rl .t2 { display: none; }
.rail-cats .rc:last-child { min-height: 44px; }
.rail-cats .rc.on .rl .d { width: 18px; height: 18px; border: 0; background: var(--plum); box-shadow: 0 0 0 4px var(--halo); }
.rail-cats .rc .nm { font-size: 16px; font-weight: 700; color: var(--ink2); display: block; }
.rail-cats .rc.on .nm { font-weight: 800; color: var(--ink); }
.rail-cats .rc .ct { font-size: 12px; color: var(--muted); }
.pos-mid { flex: 1; min-width: 0; padding: 16px 22px 16px; display: flex; flex-direction: column; gap: 14px; overflow: auto; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(144px, 1fr)); gap: 12px; }
.tile { background: var(--white); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; position: relative; min-width: 0; text-align: inherit; }
.tile.on { border: 2px solid var(--plum); }
.tile.off { opacity: .45; cursor: not-allowed; }
.tile .img { height: 112px; flex: none; background: var(--stripe); display: flex; align-items: flex-end; padding: 6px 8px; font: 10px var(--mono); color: var(--ph); background-size: cover; background-position: center; }
.tile .img.has { background-color: #eee; }
.tile .img.has span { display: none; }
.tile .bd { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.tile .nm { font-size: 14px; font-weight: 700; line-height: 1.45; text-wrap: pretty; }
.tile .pr { margin-top: auto; font: 600 15px var(--mono); }
.tile .pr small { font: 400 11px var(--sans); color: var(--muted); }
.tile .badge { position: absolute; top: 8px; left: 8px; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 15px; background: var(--plum); color: var(--paper); font: 700 14px var(--mono); display: flex; align-items: center; justify-content: center; }
.tile .stop { position: absolute; top: 8px; right: 8px; font-size: 11px; background: var(--ink); color: var(--paper); padding: 3px 8px; border-radius: 10px; }
.order { width: 392px; flex: none; border-right: 1px solid var(--line); background: var(--white); display: flex; flex-direction: column; padding: 18px 22px 22px; min-height: 0; }
[dir="ltr"] .order { border-right: 0; border-left: 1px solid var(--line); }
.order .lines { flex: 1; overflow: auto; min-height: 60px; }
.oline { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.oline .nm { flex: 1; min-width: 0; text-align: inherit; }
.oline .nm b { display: block; font-size: 15px; font-weight: 700; line-height: 1.45; }
.oline .nm small { display: block; font-size: 12px; color: var(--plum); margin-top: 2px; }
.oline .nm small.none { color: var(--muted); }
.oline .lt { font: 600 15px var(--mono); width: 64px; text-align: left; flex: none; }
[dir="ltr"] .oline .lt { text-align: right; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.keypad button { height: 52px; border-radius: 12px; background: var(--white); border: 1px solid var(--line); font: 600 20px var(--mono); }
.keypad button:active { background: var(--sel); }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.quick button { height: 48px; border-radius: 12px; border: 1px solid var(--field); background: var(--white); font: 700 14px var(--mono); }
.quick button.on { background: var(--plum); color: var(--paper); border-color: var(--plum); }
.quick button.word { font-family: var(--sans); }
.amount-box { height: 64px; border: 2px solid var(--plum); border-radius: 12px; background: var(--white); display: flex; align-items: center; justify-content: flex-end; padding: 0 18px; font: 700 30px var(--mono); direction: ltr; }
.dialog-pay { background: var(--paper); border-radius: 24px; padding: 28px 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 32px; width: min(720px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; animation: up .2s; }
.ptree .pcat { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-weight: 800; font-size: 15px; width: 100%; min-height: 44px; }
.ptree .pcat .d { width: 12px; height: 12px; border-radius: 50%; background: var(--plum); flex: none; }
.ptree .pcat.closed { color: var(--muted); font-weight: 400; }
.ptree .pcat.closed .d { background: transparent; border: 2px solid var(--off); }
.ptree .pcat .c { color: var(--muted); font-weight: 400; font-size: 12px; }
.ptree .kids { margin-inline-start: 5px; border-inline-start: 2px solid var(--thread); padding-inline-start: 17px; font-size: 15px; }
.ptree .sub { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-weight: 700; font-size: 14px; width: 100%; min-height: 40px; }
.ptree .sub .d { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--plum); flex: none; }
.ptree .sub.closed { color: var(--muted); font-weight: 400; }
.ptree .kids .kids { margin-inline-start: 4px; padding-inline-start: 14px; }
.ptree .pit { display: flex; justify-content: space-between; padding: 8px 0; width: 100%; min-height: 40px; align-items: center; color: var(--ink2); text-align: inherit; }
.ptree .pit.in { color: var(--ink); }
.ptree .pit b { color: var(--plum); }
.ptree .pit.off { opacity: .45; }

/* شبكة البقالة */
.scan { height: 64px; border: 2px solid var(--plum); border-radius: 14px; background: var(--white); display: flex; align-items: center; gap: 14px; padding: 0 18px; }
.scan input { border: 0; outline: 0; flex: 1; font-size: 18px; background: transparent; min-width: 0; height: 100%; }
.scan .bars { display: flex; gap: 2px; flex: none; }
.scan .bars i { height: 26px; background: var(--ink); display: block; }
.rgrid { display: grid; grid-template-columns: 36px 1fr 110px 80px 90px; gap: 14px; align-items: center; }
.rtable { background: var(--white); border-radius: 14px; border: 1px solid var(--line); overflow: hidden; }
.rtable .rr { padding: 14px 18px; border-bottom: 1px solid var(--line); width: 100%; text-align: inherit; }
.rtable .rr.on { background: var(--sel); box-shadow: inset -4px 0 0 var(--plum); }
.rtable .rr:last-child { border-bottom: 0; }
.fnkeys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.fnkeys button { height: 56px; border-radius: 12px; background: var(--white); border: 1px solid var(--line); font-size: 14px; font-weight: 700; }
.fnkeys button[disabled] { color: var(--ph); }
.paybtns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.paybtns .btn { height: 64px; border-radius: 14px; }

/* شجرة إدارة القائمة */
.mtree .mrow { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; width: 100%; text-align: inherit; min-height: 44px; }
.mtree .mrow.on { background: var(--sel); }
.mtree .mrow.drop-before { box-shadow: inset 0 3px 0 var(--plum); }
.mtree .mrow.drop-in { outline: 2px dashed var(--plum); outline-offset: -2px; }
.mtree .mrow.dragging { opacity: .4; }
.mtree .grip { color: var(--off); font-size: 14px; letter-spacing: -2px; flex: none; cursor: grab; }
.mtree .d { flex: none; width: 12px; height: 12px; border-radius: 50%; }
.mtree .d.top { background: var(--plum); }
.mtree .d.cat { border: 2px solid var(--plum); }
.mtree .d.catfull { background: var(--plum); }
.mtree .d.item { width: 8px; height: 8px; border-radius: 2px; background: var(--off); }
.mtree .d.item.on { background: var(--plum); }
.mtree .nm { font-size: 15px; flex: 1; min-width: 0; }
.mtree .nm.cat { font-weight: 800; }
.mtree .ct { font-size: 12px; color: var(--muted); }
.mtree .add { font-size: 13px; color: var(--plum); font-weight: 800; min-height: 32px; }
.imgdrop { height: 110px; border-radius: 12px; border: 2px dashed var(--field); background: repeating-linear-gradient(135deg, #F1EEEF 0 6px, #F8F6F7 6px 12px); display: flex; align-items: center; justify-content: center; text-align: center; font: 11px var(--mono); color: var(--ph); padding: 8px; background-size: cover; background-position: center; position: relative; width: 100%; }
.imgdrop.over { border-color: var(--plum); }
.imgdrop.has { border-style: solid; }

/* أسطر النماذج (قيد يدوي، مشتريات): الحساب/الصنف بعرض كامل على الجوال */
.lgrid4 { display: grid; grid-template-columns: minmax(0, 1fr) 100px 100px 40px; gap: 8px; align-items: end; padding: 8px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 600px) { .lgrid4 { grid-template-columns: 1fr 1fr 40px; } .lgrid4 > :first-child { grid-column: 1 / -1; } }

/* شريط التقدم (المستخلص) */
.bar { flex: 1; height: 6px; border-radius: 3px; background: var(--line); position: relative; overflow: hidden; }
.bar i { position: absolute; top: 0; right: 0; bottom: 0; background: var(--plum); }
[dir="ltr"] .bar i { right: auto; left: 0; }
.kgrid { display: grid; grid-template-columns: 1fr 120px 200px 130px; gap: 18px; align-items: center; }
.pct-in { width: 64px; height: 36px; border: 1px solid var(--field); border-radius: 8px; text-align: center; font: 600 13px var(--mono); background: #fff; }
.pct-in:focus { outline: 2px solid var(--plum); border-color: var(--plum); }

/* البريد */
.mail { background: #ECE9E4; border-radius: 16px; padding: 16px 0 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.mail .hdr { width: calc(100% - 32px); font-size: 12px; color: var(--muted); line-height: 1.7; }
.mail .card { width: calc(100% - 32px); background: #fff; border-radius: 12px; overflow: hidden; }
.mail .card .top { padding: 18px 24px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.mail .card .bd { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 14px; }
.mail .card .ft { padding: 14px 24px; background: var(--paper); font-size: 11px; color: var(--muted); line-height: 1.8; }
.mail .kvr { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.mail .kvr span:first-child { color: var(--muted); }
.mail .kvr span:last-child { font-weight: 700; text-align: left; }
.mail .cta { align-self: flex-start; height: 48px; padding: 0 28px; border-radius: 24px; background: var(--plum); color: var(--paper); display: flex; align-items: center; font-size: 15px; font-weight: 800; }

/* أدوات التطوير */
.devfab { position: fixed; bottom: calc(var(--tab-h) + var(--safe-b) + 84px); left: 12px; z-index: 90; background: #111; color: #fff; border-radius: 20px; padding: 8px 12px; font: 600 11px var(--mono); opacity: .8; }
.devpanel { position: fixed; bottom: 16px; left: 16px; z-index: 95; background: #111; color: #eee; border-radius: 14px; padding: 14px; width: min(300px, calc(100vw - 32px)); font-size: 13px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 20px 40px rgba(0,0,0,.4); }
.devpanel label { display: flex; gap: 8px; align-items: center; min-height: 32px; }
.devpanel button { background: #333; color: #fff; border-radius: 8px; padding: 8px; font-size: 12px; text-align: center; }
.devpanel select { background: #222; color: #fff; border-radius: 8px; padding: 6px; border: 1px solid #444; }

/* الطباعة */
.print-doc { background: #fff; color: #111; padding: 32px; max-width: 820px; margin: 0 auto; font-size: 13px; line-height: 1.7; }
.print-doc table { width: 100%; border-collapse: collapse; margin: 14px 0; }
.print-doc th, .print-doc td { border-bottom: 1px solid #ddd; padding: 8px 6px; text-align: start; vertical-align: top; }
.print-doc th { font-size: 11px; color: #555; border-bottom: 1px solid #111; }
.print-doc td.n, .print-doc th.n { text-align: end; font-family: var(--mono); }
.print-bar { display: flex; gap: 10px; padding: 12px 16px; justify-content: center; flex-wrap: wrap; position: sticky; top: 0; background: var(--paper); border-bottom: 1px solid var(--line); z-index: 3; }
.print-bar .btn { width: auto; min-width: 140px; height: 48px; }
/* ---------- المستندات والتقارير بعد التنزيل (D1–D7): A4 عمودي بهامش 48 ---------- */
.a4 { background: #fff; color: var(--ink); width: 100%; max-width: 794px; margin: 18px auto; padding: 48px; display: flex; flex-direction: column; gap: 18px; box-shadow: 0 20px 40px -26px rgba(0,0,0,.35); font-size: 12px; line-height: 1.6; }
.a4 .mono { font-family: var(--mono); }
.a4 .lb { display: flex; flex-direction: column; gap: 1px; } .a4 .lb b { font-size: 11px; font-weight: 700; } .a4 .lb i { font-style: normal; font-size: 9px; color: var(--muted); }
.a4 .f11 { font-size: 11px; line-height: 1.8; color: var(--ink2); } .a4 .f10 { font-size: 10px; } .a4 .muted { color: var(--muted); }
.a4-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.a4-head .seller { display: flex; flex-direction: column; gap: 2px; } .a4-head .seller b { font-size: 17px; font-weight: 800; } .a4-head .seller i { font-style: normal; font-size: 11px; color: var(--ink2); } .a4-head .seller span { font-size: 11px; color: var(--muted); line-height: 1.6; }
.a4-head .ttl { display: flex; flex-direction: column; gap: 4px; } .a4-head.doc .ttl { align-items: flex-end; text-align: left; } .a4-head .ttl b { font-size: 24px; font-weight: 800; } .a4-head .ttl i { font-style: normal; font-size: 13px; letter-spacing: .12em; color: var(--muted); }
.a4-head .badge { font-size: 11px; font-weight: 700; color: var(--plum); }
.a4-head.rep { padding-bottom: 14px; border-bottom: 2px solid var(--ink); } .a4-head.rep .ttl b { font-size: 22px; } .a4-head.rep .ttl i { font-size: 12px; letter-spacing: .06em; } .a4-head.rep .ttl span { font-size: 12px; color: var(--ink2); }
.a4-head .ent { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: left; } .a4-head .ent b { font-size: 14px; font-weight: 800; } .a4-head .ent span { font-size: 11px; color: var(--muted); }
.a4-meta { display: grid; gap: 8px; } .a4-meta > div { display: flex; flex-direction: column; gap: 3px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; } .a4-meta .v { font: 600 13px var(--mono); }
.a4-box { padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; } .a4-box.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } .a4-box > div { display: flex; flex-direction: column; gap: 4px; } .a4-box .bn { font-size: 13px; font-weight: 800; } .a4-box i { font-style: normal; font-size: 11px; color: var(--ink2); } .a4-box .bd { font-size: 11px; color: var(--ink2); line-height: 1.6; gap: 3px; } .a4-box .bd1 { font-size: 12px; color: var(--ink2); }
.a4-line { display: grid; grid-template-columns: 24px minmax(0,1fr) 40px 64px 76px 36px 64px 80px; gap: 8px; padding: 10px; border-bottom: 1px solid var(--line); align-items: start; font: 500 12px var(--mono); }
.a4-line.p { grid-template-columns: 24px minmax(0,1fr) 96px 56px 104px; }
.a4-line.nv { grid-template-columns: 24px minmax(0,1fr) 56px 88px 96px; } /* منشأة غير مسجّلة: بلا أعمدة الضريبة */
.a4-line.h { background: #F1ECEF; border-radius: 6px; border: 0; padding: 8px 10px; font-family: var(--sans); }
.a4-line .d { font-family: var(--sans); display: flex; flex-direction: column; gap: 2px; } .a4-line .d b { font-size: 12px; font-weight: 700; line-height: 1.5; } .a4-line .d i { font-style: normal; font-size: 10px; color: var(--muted); } .a4-line .b { font-weight: 700; }
.a4-bottom { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: start; }
.a4-bottom .qrw { display: flex; gap: 14px; align-items: flex-start; }
.a4-tot > div, .a4-sum > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 5px 10px; border-bottom: 1px solid var(--line); } .a4-tot > div > span, .a4-sum > div > span { font: 600 13px var(--mono); }
.a4-tot .g { background: var(--plum); color: var(--paper); border-radius: 6px; margin-top: 4px; padding: 8px 10px; border: 0; } .a4-tot .g .lb b { font-size: 13px; } .a4-tot .g .lb i { color: var(--paper); } .a4-tot .g > span { font-size: 17px; font-weight: 700; }
.a4-sum { max-width: 360px; margin-inline-start: auto; } .a4-sum .g { font-weight: 800; border-top: 1px solid var(--ink); }
.a4-grid > div { display: grid; grid-template-columns: inherit; gap: 10px; padding: 7px 10px; border-bottom: 1px solid var(--line); } .a4-grid { display: grid; } .a4-grid > .h { background: #F1ECEF; border-radius: 6px; border: 0; } .a4-grid .n { text-align: left; font-family: var(--mono); }
.a4-rep > div { display: grid; gap: 10px; padding: 7px 10px; border-bottom: 1px solid var(--line); font-size: 12px; } .a4-rep .n { text-align: left; font-family: var(--mono); white-space: nowrap; }
.a4-rep > .h { background: #F1ECEF; border-radius: 6px; border: 0; font-size: 11px; font-weight: 700; padding: 8px 10px; }
.a4-rep > .sec { display: block; font-size: 12px; font-weight: 800; color: var(--plum); padding: 12px 10px 4px; border: 0; }
.a4-rep > .ind > :first-child { padding-inline-start: 18px; }
.a4-rep > .sub { font-weight: 800; background: #FAF8F9; } .a4-rep > .grand { font-weight: 800; font-size: 13px; border-top: 1px solid var(--ink); border-bottom: 3px double var(--ink); }
.a4-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; font-size: 10px; color: var(--muted); line-height: 1.6; }
@media (max-width: 820px) {
  .a4 { padding: 20px 16px; margin: 0; box-shadow: none; overflow-x: auto; }
  .a4-meta { grid-template-columns: 1fr 1fr !important; } .a4-box.two, .a4-bottom { grid-template-columns: 1fr; }
  .a4-line, .a4-rep, .a4-grid { min-width: 600px; }
}
/* D2 إيصال حراري 80 مم: الورقة 80 مم والمساحة المطبوعة 72 مم (حشوة 4 مم)، نص أسود صرف (الرمادي يبهت في الطابعات الحرارية) */
.r80 { box-sizing: border-box; background: #fff; color: #000; --u: 1px; width: calc(302 * var(--u)); margin: 18px auto; padding: calc(15 * var(--u) * var(--ts, 1)) calc(15 * var(--u) * var(--ts, 1)) calc(23 * var(--u) * var(--ts, 1)); font-size: calc(13 * var(--u) * var(--ts, 1)); line-height: 1.55; display: flex; flex-direction: column; gap: calc(7 * var(--u) * var(--ts, 1)); box-shadow: 0 calc(2 * var(--u) * var(--ts, 1)) calc(12 * var(--u) * var(--ts, 1)) rgba(0,0,0,.12); }
.r80 .c { display: flex; flex-direction: column; align-items: center; text-align: center; gap: calc(1 * var(--u) * var(--ts, 1)); } .r80 .c.t b { font-size: calc(14 * var(--u) * var(--ts, 1)); } .r80 .c.t i { font-style: normal; font-size: calc(11 * var(--u) * var(--ts, 1)); letter-spacing: .08em; }
.r80 .r-head { gap: calc(2 * var(--u) * var(--ts, 1)); font-size: calc(12 * var(--u) * var(--ts, 1)); } .r80 .r-name { font-size: calc(18 * var(--u) * var(--ts, 1)); font-weight: 800; line-height: 1.35; } .r80 .r-en { font-size: calc(12 * var(--u) * var(--ts, 1)); font-weight: 600; }
.r80 .r-ttl { border-top: 2px solid #000; border-bottom: 2px solid #000; padding: calc(5 * var(--u) * var(--ts, 1)) 0; text-align: center; display: flex; flex-direction: column; } .r80 .r-ttl b { font-size: calc(15 * var(--u) * var(--ts, 1)); font-weight: 800; } .r80 .r-ttl i { font-style: normal; font-size: calc(10 * var(--u) * var(--ts, 1)); letter-spacing: .12em; }
.r80 .row { display: flex; justify-content: space-between; align-items: baseline; gap: calc(8 * var(--u) * var(--ts, 1)); } .r80 .row > :last-child { text-align: end; white-space: nowrap; } .r80 .row.b { font-weight: 800; font-size: calc(14 * var(--u) * var(--ts, 1)); }
.r80 .r-meta { font-size: calc(12 * var(--u) * var(--ts, 1)); display: flex; flex-direction: column; gap: calc(1 * var(--u) * var(--ts, 1)); }
.r80 .r-box { border: 1px solid #000; border-radius: calc(4 * var(--u) * var(--ts, 1)); padding: calc(5 * var(--u) * var(--ts, 1)) calc(7 * var(--u) * var(--ts, 1)); font-size: calc(12 * var(--u) * var(--ts, 1)); }
.r80 .r-items { border-top: 1px dashed #000; border-bottom: 1px dashed #000; padding: calc(4 * var(--u) * var(--ts, 1)) 0 calc(6 * var(--u) * var(--ts, 1)); display: flex; flex-direction: column; gap: calc(5 * var(--u) * var(--ts, 1)); }
.r80 .r-ih { display: flex; justify-content: space-between; font-size: calc(11 * var(--u) * var(--ts, 1)); font-weight: 700; border-bottom: 1px solid #000; padding-bottom: calc(3 * var(--u) * var(--ts, 1)); }
.r80 .r-it .row b { font-weight: 700; } .r80 .r-sub { font-size: calc(11 * var(--u) * var(--ts, 1)); }
.r80 .r-tot, .r80 .r-pay { display: flex; flex-direction: column; gap: calc(1 * var(--u) * var(--ts, 1)); }
.r80 .r-grand { display: flex; justify-content: space-between; align-items: center; gap: calc(8 * var(--u) * var(--ts, 1)); background: #000; color: #fff; padding: calc(7 * var(--u) * var(--ts, 1)) calc(8 * var(--u) * var(--ts, 1)); border-radius: calc(4 * var(--u) * var(--ts, 1)); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.r80 .r-grand span { font-size: calc(13 * var(--u) * var(--ts, 1)); font-weight: 700; } .r80 .r-grand b { font-size: calc(19 * var(--u) * var(--ts, 1)); font-weight: 800; } .r80 .r-grand small { font-size: calc(11 * var(--u) * var(--ts, 1)); font-weight: 600; }
.r80 .r-qr { margin: calc(6 * var(--u) * var(--ts, 1)) 0 calc(2 * var(--u) * var(--ts, 1)); } .r80 .r-foot { border-top: 1px dashed #000; padding-top: calc(6 * var(--u) * var(--ts, 1)); font-size: calc(12 * var(--u) * var(--ts, 1)); }
.r80 .ln { border-top: 1px dashed #000; border-bottom: 1px dashed #000; padding: calc(4 * var(--u) * var(--ts, 1)) 0; }
.r80 .muted { color: #000; font-size: calc(12 * var(--u) * var(--ts, 1)); } .r80 .f10 { font-size: calc(11 * var(--u) * var(--ts, 1)); } .r80 .mono { font-family: var(--mono); }
/* رقم الطلب للنداء (الإيصال وورقة المطبخ) وأشكال الإيصال الأربعة: --ts مضاعف الحجم (يبقى مع الطباعة) */
.r80 .r-call { display: flex; flex-direction: column; align-items: center; gap: 0; padding: calc(6 * var(--u) * var(--ts, 1)) calc(8 * var(--u) * var(--ts, 1)); border-radius: calc(6 * var(--u)); background: #000; color: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; break-inside: avoid; }
.r80 .r-call span { font-size: calc(12 * var(--u) * var(--ts, 1)); font-weight: 700; }
.r80 .r-call b { font-size: calc(46 * var(--u) * var(--ts, 1)); font-weight: 800; line-height: 1.1; }
.r80 .r-call i { font-style: normal; font-size: calc(13 * var(--u) * var(--ts, 1)); font-weight: 700; }
.r80 .r-call.k, .r80.t-classic .r-call { background: none; color: #000; border: calc(2 * var(--u)) solid #000; }
.r80.t-classic .r-grand { background: none; color: #000; border-radius: 0; border-top: calc(2 * var(--u)) solid #000; border-bottom: calc(4 * var(--u)) double #000; }
.r80.t-compact { --ts: .86; gap: calc(4 * var(--u)); }
.r80.t-compact .r-ttl i, .r80.t-compact .r-dev, .r80.t-compact .r-en, .r80.t-compact .r-foot span { display: none; }
.r80.t-compact .r-call b { font-size: calc(34 * var(--u)); }
.r80.t-large { --ts: 1.14; }
.r80.t-large .r-call b { font-size: calc(64 * var(--u)); }
/* ترقيم الصفحات (المعمول به في فواتير وكشوف الأنظمة الكبرى): «صفحة س من ص» ورقم المستند في كل صفحة، ورأس مختصر (الشركة — المستند) من الصفحة الثانية،
   ورؤوس الجداول تتكرر تلقائيًا. القيم من شاشة الطباعة (--pg-doc، --pg-head، --pg-at على عنصر html). */
@page { size: A4; margin: 14mm 0 12mm;
  @top-center { content: var(--pg-head, ""); font: 9px Almarai, sans-serif; color: #5E5A60; }
  @bottom-center { content: "صفحة " counter(page) " من " counter(pages); font: 9px Almarai, sans-serif; color: #5E5A60; }
  @bottom-left { content: var(--pg-doc, ""); font: 9px 'IBM Plex Mono', monospace; color: #5E5A60; margin-left: 12mm; }
  @bottom-right { content: var(--pg-at, ""); font: 9px Almarai, sans-serif; color: #5E5A60; margin-right: 12mm; } }
@page :first { margin-top: 0; @top-center { content: none; } }
@page receipt { size: 80mm 200mm; margin: 0; @top-center { content: none; } @bottom-center { content: none; } @bottom-left { content: none; } @bottom-right { content: none; } }
@media print {
  .print-bar, .tabbar, .side, .toasts, .devfab, .devpanel, .no-print, .head, .topbar { display: none !important; }
  body, html { background: #fff; }
  .a4 { box-shadow: none; margin: 0 auto; max-width: none; min-height: 285mm; }
  .a4-foot .pg { display: none; }
  .r80 { page: receipt; margin: 0; box-shadow: none; }
  /* الإيصال يملأ عرض الورقة أيًّا كان عرض الصفحة الذي يعتمده جهاز الطباعة (بعضها يتجاهل مقاس @page ويصغّر الصفحة إلى الورقة): كل المقاسات بوحدة --u = عرض الصفحة ÷ 302 */
  html.roll, html.roll body { width: auto; min-height: 0 !important; margin: 0; padding: 0; overflow: visible; }
  html.roll #app { container-type: inline-size; width: 100%; min-height: 0 !important; }
  html.roll #app > .r80 { --u: calc(100cqw / 302); width: 100%; }
  html.roll #app > .r80 + .r80 { break-before: page; }
  html.roll #app > .r80.pr-skip { display: none !important; }
  .r80 .r-qr .qr { width: calc(132 * var(--u)) !important; height: calc(132 * var(--u)) !important; }
  .r80 .row, .r80 .r-it, .r80 .r-grand, .r80 .r-ttl { break-inside: avoid; }
}

/* ---------- الحاسوب واللوحي ---------- */
@media (min-width: 960px) {
  :root { --gutter: 40px; --tab-h: 0px; }
  .tabbar { display: none; }
  .screen.with-tabs { padding-bottom: 0; }
  .side { display: flex; flex-direction: column; width: 248px; flex: none; border-left: 1px solid var(--line); padding: 22px 16px; position: sticky; top: 0; height: 100dvh; overflow: auto; gap: 2px; scrollbar-width: thin; scrollbar-color: var(--thread) transparent; }
  .side .topbar-dup { display: none; }
  .main .topbar .logo-mark { visibility: hidden; }
  [dir="ltr"] .side { border-left: 0; border-right: 1px solid var(--line); }
  .side .s-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 18px; }
  .side .s-brand b { font-size: 20px; font-weight: 800; letter-spacing: .04em; }
  .side .s-org { padding: 10px 8px 14px; margin-bottom: 8px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); line-height: 1.6; text-align: inherit; }
  .side .s-org b { display: block; color: var(--ink); font-size: 13px; }
  .side .s-org .chg { color: var(--plum); font-weight: 800; }
  .side .s-h { font-size: 11px; color: var(--muted); font-weight: 700; padding: 14px 8px 4px; }
  .side .s-tog { display: flex; align-items: center; justify-content: space-between; width: 100%; text-align: inherit; min-height: 32px; border-radius: 8px; }
  .side .s-tog:hover { color: var(--ink); }
  .side .s-tog .car { width: 7px; height: 7px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); margin: 0 4px 3px; transition: transform .15s; }
  .side .s-grp.shut .s-tog .car { transform: rotate(45deg); margin-bottom: 0; }
  [dir="ltr"] .side .s-grp.shut .s-tog .car { transform: rotate(-135deg); }
  .side .s-grp.shut .s-items { display: none; }
  .side .s-items { display: flex; flex-direction: column; gap: 2px; }
  .side a { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 10px; font-size: 14px; color: var(--ink2); min-height: 40px; }
  .side a i { width: 6px; height: 6px; border-radius: 50%; background: transparent; flex: none; }
  .side a.on { color: var(--plum); font-weight: 800; background: var(--sel); }
  .side a.on i { background: var(--plum); }
  .side a.locked { color: var(--off); }
  .side a .lk { margin-inline-start: auto; font-size: 11px; }
  .side .s-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
  .head { padding-top: 26px; }
  .head h1 { font-size: 26px; }
  .actions { padding-inline: var(--gutter); justify-items: start; }
  .actions > * { max-width: 420px; }
  .actions.two, .actions.two-wide, .actions.two-wider { grid-template-columns: repeat(2, minmax(0, 260px)); }
  .actions.two-wide, .actions.two-wider { grid-template-columns: 220px 300px; }
  .fab { position: sticky; left: auto; right: auto; bottom: 20px; padding: 0 var(--gutter); display: flex; justify-content: flex-end; }
  [dir="ltr"] .fab { justify-content: flex-end; }
  .fab .btn { width: 300px; }
  .content.pad-fab { padding-bottom: 20px; }
  .toasts { bottom: 28px; }
  .devfab { bottom: 20px; }
  .scrim { align-items: center; }
  .sheet { border-radius: 24px; width: min(560px, calc(100vw - 48px)); max-height: 88dvh; }
  .sheet .grip { display: none; }
  .split { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr); gap: 40px; align-items: start; }
  .split > .aside { position: sticky; top: 20px; }
  .cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
}
@media (min-width: 1400px) { :root { --gutter: 56px; } }

/* نقطة البيع على الشاشات الضيقة */
@media (max-width: 699px) {
  .dialog-pay { grid-template-columns: 1fr; gap: 18px; padding: 20px 18px; border-radius: 24px 24px 0 0; width: 100%; max-height: 94dvh; align-self: flex-end; }
}
/* الجهاز اللوحي عموديًا (آيباد 768–959): شاشة المطعم بالفئات والصور والطلب جنبًا إلى جنب، بأعمدة أضيق */
@media (min-width: 700px) and (max-width: 959px) and (min-height: 600px) {
  .dialog-pay { padding: 22px 20px; gap: 22px; }
  .rail-cats { width: 128px; padding: 14px 10px; }
  .rail-cats .rc { gap: 6px; grid-template-columns: 16px 1fr; }
  .rail-cats .rc .nm { font-size: 14px; }
  .pos-mid { padding: 12px 12px; gap: 10px; }
  .pos-mid .search { width: 100% !important; }
  .pos-mid > .between { flex-wrap: wrap; gap: 8px; }
  .tiles { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; }
  .tile .img { height: 92px; }
  .order { width: 300px; padding: 14px 16px 16px; }
  .oline { flex-wrap: wrap; row-gap: 8px; justify-content: space-between; }
  .oline .nm { flex-basis: 100%; }
  .btn.pay { padding: 0 18px; font-size: 16px; }
}
@media (max-width: 959px) {
  .pos-top { padding: 0 var(--gutter); height: 56px; }
  .pos-top .meta { gap: 12px; }
  .kgrid { grid-template-columns: 1fr 96px; row-gap: 8px; }
  .kgrid .kg-bar { grid-column: 1 / -1; }
  .kgrid .kg-val { display: none; }
  .rgrid { grid-template-columns: 24px 1fr 70px 76px; gap: 10px; }
  .rgrid .rg-price { display: none; }
}
@media (max-width: 959px) { .hide-sm { display: none !important; } }
@media (max-width: 420px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- أشكال الفواتير وعروض الأسعار (تختارها الشركة) ----------
   كل شكل يغيّر الترتيب والألوان فقط؛ الحقول النظامية نفسها في كل الأشكال. --acc لون العلامة التجارية. */
.a4 { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.a4[class*="tpl-"] .a4-tot .g { background: var(--acc); }
.a4[class*="tpl-"] .a4-head .badge { color: var(--acc); }
.a4[class*="tpl-"] .a4-line.h { background: var(--acc-soft); }
/* عصري: رأس ملوّن وزوايا ناعمة */
.a4.tpl-modern .a4-head.doc { background: var(--acc); color: #fff; margin: -48px -48px 0; padding: 30px 48px 26px; }
.a4.tpl-modern .a4-head.doc .seller span, .a4.tpl-modern .a4-head.doc .seller i, .a4.tpl-modern .a4-head.doc .ttl i { color: rgba(255,255,255,.85); }
.a4.tpl-modern .a4-head.doc .badge { color: #fff; }
.a4.tpl-modern .a4-meta > div, .a4.tpl-modern .a4-box { border: 0; background: var(--acc-soft); border-radius: 12px; }
.a4.tpl-modern .a4-line.h { background: var(--acc); color: #fff; border-radius: 10px; }
.a4.tpl-modern .a4-line.h .lb i { color: rgba(255,255,255,.8); }
.a4.tpl-modern .a4-tot .g { border-radius: 12px; }
/* بسيط: بلا مربعات وخطوط رفيعة */
.a4.tpl-minimal .a4-meta > div, .a4.tpl-minimal .a4-box { border: 0; border-radius: 0; padding: 4px 0; }
.a4.tpl-minimal .a4-meta { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 8px 0; }
.a4.tpl-minimal .a4-head .ttl b { color: var(--acc); font-weight: 700; }
.a4.tpl-minimal .a4-line.h { background: transparent; border-bottom: 2px solid var(--ink); border-radius: 0; }
.a4.tpl-minimal .a4-tot .g { background: transparent; color: var(--ink); border-top: 2px solid var(--acc); border-bottom: 2px solid var(--acc); border-radius: 0; }
.a4.tpl-minimal .a4-tot .g .lb i { color: var(--muted); } .a4.tpl-minimal .a4-tot .g > span { color: var(--acc); }
/* رسمي: عنوان في الوسط وجدول بحدود كاملة */
.a4.tpl-formal .a4-head.doc { flex-direction: column; align-items: center; text-align: center; gap: 10px; border-bottom: 3px double var(--ink); padding-bottom: 14px; }
.a4.tpl-formal .a4-head.doc .ttl { order: -1; align-items: center; text-align: center; }
.a4.tpl-formal .a4-head.doc .seller { align-items: center; }
.a4.tpl-formal .a4-meta > div, .a4.tpl-formal .a4-box { border-radius: 0; border-color: var(--ink); }
.a4.tpl-formal .a4-line { border: 1px solid var(--ink); border-top: 0; }
.a4.tpl-formal .a4-line.h { border: 1px solid var(--ink); border-radius: 0; }
.a4.tpl-formal .a4-tot > div { border: 1px solid var(--ink); border-top: 0; }
.a4.tpl-formal .a4-tot > div:first-child { border-top: 1px solid var(--ink); }
.a4.tpl-formal .a4-tot .g { border-radius: 0; margin-top: 0; }
@media (max-width: 600px) { .a4.tpl-modern .a4-head.doc { margin: -20px -16px 0; padding: 20px 16px; } }
/* معاينة الأشكال في الإعدادات */
.tpl-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tpl-pick button { text-align: start; border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 4px; background: var(--paper); }
.tpl-pick button.on { border: 2px solid var(--plum); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatches button { width: 36px; height: 36px; border-radius: 50%; border: 2px solid transparent; }
.swatches button.on { border-color: var(--ink); box-shadow: 0 0 0 2px var(--paper) inset; }
.tpl-preview { border: 1px solid var(--line); border-radius: 12px; overflow: auto; background: #EEE9EC; padding: 8px; max-height: 70vh; }
.tpl-preview .a4 { margin: 0 auto; }
/* شعار الشركة على المستندات */
.a4-head .sel-w { display: flex; align-items: center; gap: 14px; }
.a4 .doc-logo { max-height: 64px; max-width: 170px; object-fit: contain; }
.a4.tpl-modern .doc-logo { background: #fff; border-radius: 10px; padding: 5px; }
.a4.tpl-formal .a4-head .sel-w { flex-direction: column; }
.r80 .r-logo { max-height: calc(56 * var(--u) * var(--ts, 1)); max-width: calc(180 * var(--u) * var(--ts, 1)); object-fit: contain; margin-bottom: calc(4 * var(--u) * var(--ts, 1)); }
.logo-box { display: flex; align-items: center; gap: 14px; padding: 10px 0; }
.logo-box img { max-height: 64px; max-width: 170px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; padding: 4px; background: #fff; }

/* ---------- الدخول و«حسابي» (Supabase) ---------- */
.auth-col { padding-top: 56px; max-width: 460px; width: 100%; margin: 0 auto; gap: 14px; }
.auth-wide { max-width: 560px; width: 100%; margin: 0 auto; }
.auth-h { margin: 8px 0 0; font-size: 22px; font-weight: 800; line-height: 1.3; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin: 4px 0; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.btn.oauth { background: var(--white); color: var(--ink); border: 1px solid var(--field); font-weight: 700; font-size: 15px; }
.btn.oauth:hover { border-color: var(--ink2); }
.btn.oauth svg { flex: none; }
.danger-zone { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.btn.danger-ghost { background: transparent; border: 2px solid var(--err); color: var(--err); }

/* ---------- الدعم الفني ---------- */
.sup-fab { position: fixed; z-index: 25; inset-inline-end: 16px; bottom: calc(84px + var(--safe-b)); width: 52px; height: 52px; border-radius: 50%; background: var(--plum); color: var(--paper); display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(31, 27, 34, .22); }
.sup-fab svg { width: 26px; height: 26px; }
.sup-fab:hover { opacity: .92; }
@media (min-width: 960px) { .sup-fab { bottom: 24px; } }
.sup-hero { padding: 14px 16px; border-radius: 14px; background: var(--sel); margin-bottom: 12px; }
.sup-compose { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.sup-compose .btn { width: auto; height: 46px; padding: 0 22px; }
.sup-compose .btn.text { height: 46px; }
.sup-small { width: auto !important; height: 40px !important; padding: 0 14px !important; font-size: 14px !important; }
.sup-thumb { display: flex; align-items: center; gap: 10px; }
.sup-thumb img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.sup-list { display: flex; flex-direction: column; }
.sup-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--line); width: 100%; text-align: start; }
.sup-row:hover { background: var(--sel); }
.sup-ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sup-chip { flex: none; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 12px; background: var(--sel); color: var(--plum); white-space: nowrap; }
.sup-chip.warn { background: var(--warn-bg); color: var(--warn-ink); }
.sup-chip.red { background: var(--err-bg); color: var(--err-ink); }
.sup-chip.muted { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.sup-thread { display: flex; flex-direction: column; gap: 10px; padding: 8px 0; }
.sup-msg { max-width: 82%; padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.75; background: var(--white, #fff); border: 1px solid var(--line); align-self: flex-start; overflow-wrap: anywhere; }
.sup-msg.me { align-self: flex-end; background: var(--plum); color: var(--paper); border-color: var(--plum); }
.sup-msg.me a { color: inherit; text-decoration: underline; }
.sup-msg.note { align-self: stretch; max-width: none; background: var(--warn-bg); color: var(--warn-ink); border-style: dashed; }
.sup-msg.ai .sup-who::before { content: '✦ '; }
.sup-who { font-size: 12px; font-weight: 800; opacity: .8; margin-bottom: 2px; }
.sup-at { font-size: 11px; opacity: .65; margin-top: 4px; }
.sup-img { display: block; max-width: 240px; max-height: 240px; border-radius: 10px; margin: 4px 0; }
.sup-sys { align-self: center; font-size: 12px; color: var(--muted); text-align: center; padding: 2px 8px; }
.sup-typing { align-self: flex-start; font-size: 13px; color: var(--muted); padding: 8px 14px; border-radius: 16px; border: 1px solid var(--line); }
.sup-typing span { display: inline-block; width: 5px; height: 5px; margin-inline-start: 3px; border-radius: 50%; background: var(--muted); animation: supdot 1.2s infinite; }
.sup-typing span:nth-child(2) { animation-delay: .2s; } .sup-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes supdot { 0%, 80%, 100% { opacity: .2; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sup-typing span { animation: none; } }
.sup-card { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--white, #fff); margin-top: 10px; }
.sup-stars { display: flex; gap: 6px; margin-top: 6px; }
.sup-stars button { font-size: 28px; color: var(--off); line-height: 1; min-width: 40px; min-height: 40px; }
.sup-stars button:hover, .sup-stars button:focus-visible { color: #E0A100; }
.sup-meta { padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.sup-sel { width: auto; min-height: 40px; display: inline-block; margin-inline-start: 4px; }
.tpl-receipt { display: flex; justify-content: center; padding: 6px 0; background: var(--sel); border-radius: 12px; }
.tpl-receipt .r80 { box-shadow: 0 2px 10px rgba(31, 27, 34, .12); }
/* سند القبض والصرف (التخليص): نسختان في صفحة — الأصل للعميل ونسخة المكتب */
.cfv { border: 1.5px solid var(--acc, #5E2350); border-radius: 10px; padding: 10px 16px 8px; position: relative; break-inside: avoid; }
.cfv-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.cfv-co { display: flex; gap: 10px; align-items: center; } .cfv-co img { max-height: 44px; max-width: 110px; object-fit: contain; }
.cfv-co > div { display: flex; flex-direction: column; gap: 1px; } .cfv-co b { font-size: 16px; font-weight: 800; } .cfv-co i { font-style: normal; font-size: 11px; color: var(--ink2); } .cfv-co span { font-size: 11px; color: var(--ink2); }
.cfv-ttl { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 150px; }
.cfv-ttl b { font-size: 21px; font-weight: 800; color: var(--acc, #5E2350); border-bottom: 2px solid var(--acc, #5E2350); padding: 0 10px 2px; }
.cfv-ttl i { font-style: normal; font-size: 10px; letter-spacing: 2px; color: var(--ink2); }
.cfv-copy { margin-top: 3px; font-size: 10px; font-weight: 700; padding: 1px 8px; border-radius: 10px; background: color-mix(in srgb, var(--acc, #5E2350) 12%, transparent); color: var(--acc, #5E2350); }
.cfv-band { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 8px; margin: 8px 0 2px; }
.cfv-band > div { border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; display: flex; flex-direction: column; gap: 2px; }
.cfv-band span { font-size: 11px; color: var(--ink2); } .cfv-band span i { font-style: normal; font-size: 9px; } .cfv-band b { font-size: 14px; }
.cfv-band .cfv-amt { background: var(--acc, #5E2350); border-color: var(--acc, #5E2350); color: #fff; } .cfv-band .cfv-amt span { color: #ffffffcc; } .cfv-band .cfv-amt b { font-size: 19px; } .cfv-amt small { font-size: 12px; font-weight: 600; }
.cfv-ln { display: flex; align-items: baseline; gap: 10px; padding: 4px 0 1px; }
.cfv-k { flex: 0 0 128px; font-size: 12px; font-weight: 700; display: flex; flex-direction: column; } .cfv-k i { font-style: normal; font-size: 9px; font-weight: 400; color: var(--ink2); }
.cfv-v { flex: 1; font-size: 13px; border-bottom: 1px dotted #8a8f9c; padding-bottom: 3px; min-height: 20px; } .cfv-v small { font-size: 11px; color: var(--ink2); }
.cfv-chk { margin-inline-end: 10px; white-space: nowrap; }
.cfv-note { font-size: 10px; color: var(--ink2); margin: 5px 0 0; }
.cfv-sign { display: grid; grid-template-columns: 1fr 1fr 110px; gap: 18px; margin-top: 4px; align-items: end; }
.cfv-sign > div { display: flex; flex-direction: column; font-size: 11px; font-weight: 700; } .cfv-sign i { font-style: normal; font-size: 9px; font-weight: 400; color: var(--ink2); }
.cfv-sign em { display: block; border-bottom: 1px solid #333; height: 26px; } .cfv-sign .st { align-items: center; } .cfv-sign u { display: block; width: 58px; height: 58px; border: 1.5px dashed #9aa0ac; border-radius: 50%; margin-top: 4px; }
.cfv-cut { position: relative; border-top: 1.5px dashed #9aa0ac; margin: 12px 0; } .cfv-cut span { position: absolute; top: -11px; inset-inline-start: 12px; background: #fff; padding: 0 4px; font-size: 14px; color: #9aa0ac; }
@media print { .cfv-band .cfv-amt { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
/* صفحة ملف التخليص (2026-10-10): رأس بالحالة والخطوة التالية، مراحل أفقية، تبويبات، عمود «ينتظرك». لون لكل قسم:
   الشحنة أزرق، المستندات كهرماني، المبالغ أخضر، الأتعاب بنفسجي العلامة، السجل رمادي. */
.cfx { max-width: 1180px; --c-ship: #185FA5; --c-ship-bg: #EAF2FB; --c-docs: #8A5A00; --c-docs-bg: #FAF1DE; --c-money: #2F5D3A; --c-money-bg: #E7F1E9; --c-fees: var(--plum); --c-fees-bg: var(--sel); --c-log: var(--muted); --c-log-bg: #EFECEE; }
.cfx-card { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin: 0 0 12px; }
.cfx-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin: 0 0 12px; }
.cfx-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.cfx-chip { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--c-log-bg); color: var(--ink2); }
.cfx-chip.blue { background: var(--c-ship-bg); color: var(--c-ship); } .cfx-chip.amber { background: var(--warn-bg); color: var(--warn-ink); } .cfx-chip.red { background: var(--err-bg); color: var(--err-ink); }
.cfx-cta .btn { width: auto; min-width: 200px; height: 46px; font-size: 15px; }
.cfx-steps { display: grid; gap: 6px; }
.cfx-step { display: flex; flex-direction: column; gap: 3px; text-align: center; min-width: 0; }
.cfx-step i { display: block; height: 6px; border-radius: 3px; background: var(--thread); }
.cfx-step b { font-size: 12px; font-weight: 700; color: var(--muted); line-height: 1.4; }
.cfx-step span { font-size: 11px; color: var(--muted); }
.cfx-step.done i { background: var(--c-money); } .cfx-step.done b { color: var(--c-money); }
.cfx-step.cur i { background: var(--c-ship); } .cfx-step.cur b { color: var(--c-ship); font-weight: 800; }
.cfx-step.hold i { background: var(--err); } .cfx-step.hold b { color: var(--err); font-weight: 800; }
.cfx-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; grid-template-rows: auto 1fr; gap: 0 12px; align-items: start; }
.cfx-main { grid-column: 1; grid-row: 1 / span 2; } .cfx-todos { grid-column: 2; grid-row: 1; } .cfx-aside { grid-column: 2; grid-row: 2; }
.cfx-tabs { display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--line); margin: 0 0 12px; scrollbar-width: none; }
.cfx-tabs button { padding: 10px 14px; font-size: 14px; font-weight: 700; color: var(--muted); border-bottom: 2.5px solid transparent; white-space: nowrap; }
.cfx-tabs button.on { color: var(--plum); border-bottom-color: var(--plum); }
.cfx-n { font-family: var(--mono); font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--c-log-bg); color: var(--ink2); margin-inline-start: 4px; }
.cfx-n.amber { background: var(--warn-bg); color: var(--warn-ink); }
.cfx-sec { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: -14px -16px 6px; padding: 10px 16px; border-radius: 14px 14px 0 0; }
.cfx-sec h3 { margin: 0; font-size: 15px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.cfx-sec h3::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.cfx-ship .cfx-sec { background: var(--c-ship-bg); color: var(--c-ship); } .cfx-docs .cfx-sec { background: var(--c-docs-bg); color: var(--c-docs); }
.cfx-money .cfx-sec { background: var(--c-money-bg); color: var(--c-money); } .cfx-fees .cfx-sec { background: var(--c-fees-bg); color: var(--c-fees); }
.cfx-log .cfx-sec { background: var(--c-log-bg); color: var(--ink2); }
.cfx-sec .link { color: inherit; }
.cfx-card > :last-child { margin-bottom: 0; }
.cfx-card .between:last-child { border-bottom: 0 !important; }
.cfx-h { margin: 0 0 8px; font-size: 14px; font-weight: 800; }
.cfx-todo { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 0; font-size: 13px; border-bottom: 1px solid var(--line); text-align: start; }
.cfx-todo:last-child { border-bottom: 0; }
.cfx-todo i { flex: 0 0 8px; height: 8px; border-radius: 50%; background: var(--warn); } .cfx-todo.red i { background: var(--err); }
.cfx-todo:hover { color: var(--plum); }
.cfx-bar { height: 7px; border-radius: 4px; background: var(--c-log-bg); overflow: hidden; } .cfx-bar span { display: block; height: 100%; background: var(--c-docs); border-radius: 4px; }
.cfx-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.cfx-kpis > div { background: var(--paper); border-radius: 10px; padding: 7px 8px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cfx-kpis span { font-size: 11px; color: var(--muted); } .cfx-kpis b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.cfx-links { display: flex; flex-direction: column; gap: 8px; font-size: 13px; } .cfx-links .link { text-align: start; }
.cfx .banner.inline { margin: 0 0 12px; }
@media (max-width: 900px) {
  .cfx-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; } .cfx-todos, .cfx-main, .cfx-aside { grid-column: 1; grid-row: auto; } .cfx-todos { order: -1; }
  .cfx-cta, .cfx-cta .btn { width: 100%; }
  .cfx-steps { overflow-x: auto; scrollbar-width: none; } .cfx-step { min-width: 76px; }
}
/* إطار مستندات التخليص الورقية (2026-10-10) — يكمّل أنماط سند القبض cfv-* */
.pdoc { font-size: 12px; } .pdoc .cfv-top { margin-bottom: 2px; }
.pd-sec { display: flex; align-items: baseline; gap: 8px; margin: 12px 0 6px; padding: 4px 10px; background: color-mix(in srgb, var(--acc, #5E2350) 9%, #fff); border-inline-start: 3px solid var(--acc, #5E2350); border-radius: 0; }
.pd-sec b { font-size: 13px; font-weight: 800; color: var(--acc, #5E2350); } .pd-sec i { font-style: normal; font-size: 10px; color: var(--muted); letter-spacing: .5px; }
.pd-tbl { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; font-size: 12px; }
.pd-tbl th { background: color-mix(in srgb, var(--acc, #5E2350) 7%, #fff); text-align: start; font-weight: 800; padding: 6px 8px; font-size: 11.5px; border-bottom: 1px solid var(--line); vertical-align: bottom; }
.pd-tbl th i { display: block; font-style: normal; font-weight: 400; font-size: 9.5px; color: var(--muted); }
.pd-tbl td { padding: 5px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.pd-tbl tbody tr:nth-child(even) td { background: #FAF8F9; } .pd-tbl tbody tr:last-child td { border-bottom: 0; }
.pd-tbl .n { text-align: end; font-family: var(--mono); white-space: nowrap; } .pd-tbl .c { text-align: center; width: 64px; white-space: nowrap; }
.pd-tbl tfoot td { font-weight: 800; background: color-mix(in srgb, var(--acc, #5E2350) 11%, #fff); padding: 7px 8px; border-top: 1.5px solid var(--acc, #5E2350); }
.pd-tbl small, .cfv-v small { font-size: 10.5px; color: var(--muted); }
.pd-grid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.pd-grid > div { background: #fff; padding: 6px 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pd-grid span { font-size: 10.5px; color: var(--muted); } .pd-grid span i { font-style: normal; font-size: 9px; } .pd-grid b { font-size: 12.5px; font-weight: 700; overflow-wrap: anywhere; }
.pd-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.pd-tot { margin: 10px 0 0; margin-inline-start: auto; width: 52%; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.pd-tot > div { display: flex; justify-content: space-between; gap: 10px; padding: 6px 10px; border-bottom: 1px solid var(--line); font-size: 12px; }
.pd-tot > div:last-child { border: 0; background: var(--acc, #5E2350); color: #fff; font-weight: 800; font-size: 13.5px; } .pd-tot b { font-family: var(--mono); }
.pd-note { font-size: 11px; line-height: 1.8; color: var(--ink2); margin: 10px 0 0; }
.pd-hold { border: 1.5px solid var(--err); color: var(--err-ink); background: var(--err-bg); border-radius: 8px; padding: 7px 10px; margin: 8px 0; }
.pd-box { border: 1px dashed #9aa0ac; border-radius: 8px; min-height: 56px; }
.pdoc .cfv-sign { margin-top: 18px; }
@media print { .pd-sec, .pd-tbl th, .pd-tbl tfoot td, .pd-tot > div:last-child, .cfv-band .cfv-amt, .pd-tbl tbody tr:nth-child(even) td { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.pdoc .cfv-co { flex: 1 1 auto; min-width: 0; } .pdoc .cfv-ttl { flex: 0 0 auto; max-width: 48%; } .pdoc .cfv-ttl b { white-space: nowrap; font-size: 19px; } .pd-tbl, .pd-grid, .pd-tot, .cfv-sign, .pd-two { break-inside: avoid; } .pd-sec { break-after: avoid; }

.pd-tbl thead { display: table-header-group; } .pd-tbl tfoot { display: table-footer-group; } .pd-tbl tr { break-inside: avoid; }
/* عمليات حلول الغد: اللوحة والمهام (أعمدة) والعملاء المحتملون */
.ops-nav { margin-bottom: 12px; }
.ops-hi { margin: 2px 0 10px; }
.ops-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.ops-stat { display: flex; flex-direction: column; gap: 2px; text-align: start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--white, #fff); }
.ops-stat:hover { background: var(--sel); }
.ops-stat .f24 { font-size: 24px; line-height: 1.3; }
.ops-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.ops-box { padding: 4px 0; min-width: 0; }
.ops-tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.ops-tbl th, .ops-tbl td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: start; }
.ops-tbl th { font-size: 12px; color: var(--muted); font-weight: 700; }
.ops-board { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 8px; }
.ops-col { background: var(--sel); border-radius: 12px; padding: 8px; min-height: 180px; display: flex; flex-direction: column; gap: 8px; transition: outline-color .15s; outline: 2px dashed transparent; }
.ops-col.over { outline-color: var(--plum); }
.ops-colh { font-size: 13px; font-weight: 800; padding: 2px 4px; }
.ops-card { display: flex; flex-direction: column; gap: 3px; text-align: start; padding: 10px 12px; border-radius: 10px; background: var(--white, #fff); border: 1px solid var(--line); cursor: grab; overflow-wrap: anywhere; }
.ops-card:hover { border-color: var(--plum); }
.ops-card.drag { opacity: .5; }
.ops-tl { display: flex; flex-direction: column; gap: 8px; margin: 6px 0; }
.ops-log { font-size: 12px; color: var(--muted); padding-inline-start: 10px; border-inline-start: 2px solid var(--line); }
.ops-cm { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--white, #fff); overflow-wrap: anywhere; }
.sup-chip.ok { background: #E3EDE5; color: var(--ok); }
@media (max-width: 760px) { .ops-board { grid-template-columns: repeat(4, 78vw); } }

/* ---------- شاشة الطلبات: التجهيز للموظفين (ob) والعرض للعملاء على التلفزيون (tv) ---------- */
.ob-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 760px) { .ob-cols { grid-template-columns: 1fr; } }
.ob-col { border-radius: 16px; padding: 12px; background: var(--card, #fff); border: 1px solid var(--line); min-height: 160px; }
.ob-col.ready { border-color: #1E7A3C; }
.ob-h { font-size: 16px; font-weight: 800; margin: 2px 4px 10px; display: flex; gap: 8px; align-items: center; } .ob-h .mono { background: var(--sel); border-radius: 10px; padding: 0 8px; font-size: 14px; }
.ob-col.ready .ob-h { color: #1E7A3C; }
.ob-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ob-card { display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; border: 2px solid var(--line); background: var(--paper); }
.ob-card.ready { border-color: #1E7A3C; background: #EAF6EE; } .ob-card.late { border-color: #B4531A; }
.ob-main { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 8px; min-height: 120px; width: 100%; text-align: center; }
.ob-main b { font-size: 44px; font-weight: 800; line-height: 1.1; color: var(--ink); } .ob-card.ready .ob-main b { color: #1E7A3C; }
.ob-main span { font-size: 13px; color: var(--muted); } .ob-card.late .ob-main span { color: #B4531A; font-weight: 700; }
.ob-main i { font-style: normal; font-size: 12px; font-weight: 700; color: var(--plum); margin-top: 4px; }
.ob-undo { font-size: 12px; color: var(--muted); padding: 8px; border-top: 1px solid var(--line); width: 100%; }
.ob-empty { color: var(--muted); font-size: 14px; padding: 30px 8px; text-align: center; }
.ob-link { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--line); }
.tv { position: fixed; inset: 0; background: #0E0D10; color: #F4F2F5; display: flex; flex-direction: column; font-family: var(--sans); overflow: hidden; z-index: 50; }
.tv-top { display: flex; align-items: center; gap: 1.4vw; padding: 1.6vh 2.4vw; border-bottom: 1px solid #2A2730; }
.tv-top img { height: 6vh; max-width: 14vw; object-fit: contain; background: #fff; border-radius: 8px; padding: 4px; }
.tv-top div { display: flex; flex-direction: column; flex: 1; } .tv-top b { font-size: 3.2vh; font-weight: 800; } .tv-top span { font-size: 2vh; color: #A9A3AE; }
.tv-top time { font-size: 4vh; font-weight: 700; color: #D7D2DA; }
.tv-cols { flex: 1; display: grid; grid-template-columns: 1.35fr 1fr; min-height: 0; }
.tv-col { padding: 2.2vh 2.4vw; display: flex; flex-direction: column; min-height: 0; }
.tv-col + .tv-col { border-right: 2px solid #2A2730; }
.tv-col h2 { margin: 0 0 2vh; font-size: 4.2vh; font-weight: 800; display: flex; align-items: baseline; gap: 1vw; } .tv-col h2 i { font-style: normal; font-size: 2.2vh; color: #A9A3AE; font-weight: 600; }
.tv-col.ready h2 { color: #3DDC84; } .tv-col.prep h2 { color: #F2C14E; }
.tv-nums { display: flex; flex-wrap: wrap; gap: 1.6vh 1.6vw; align-content: flex-start; overflow: hidden; }
.tv-nums p { color: #6E6873; font-size: 5vh; margin: 0; }
.tv-col.ready .tv-nums b { font-size: 11vh; font-weight: 800; line-height: 1; color: #0E0D10; background: #3DDC84; border-radius: 2vh; padding: 1.2vh 2vw; min-width: 15vw; text-align: center; }
.tv-col.prep .tv-nums b { font-size: 6.5vh; font-weight: 700; line-height: 1; color: #F4F2F5; background: #232027; border: 2px solid #3A3640; border-radius: 1.6vh; padding: 1vh 1.4vw; min-width: 9vw; text-align: center; }
.tv-nums b.flash { animation: tvflash 1s ease-in-out 8; }
@keyframes tvflash { 0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(61, 220, 132, .0); } 50% { transform: scale(1.08); box-shadow: 0 0 0 1.2vh rgba(61, 220, 132, .35); } }
@media (prefers-reduced-motion: reduce) { .tv-nums b.flash { animation: none; outline: .6vh solid #fff; } }
.tv-foot { padding: 1.4vh 2.4vw; font-size: 2.2vh; color: #A9A3AE; border-top: 1px solid #2A2730; text-align: center; } .tv-off { color: #F2994A; font-weight: 700; }
.tv-msg { margin: auto; font-size: 3.4vh; color: #D7D2DA; text-align: center; padding: 0 6vw; line-height: 1.7; }
.tv-start { position: absolute; inset: 0; background: rgba(14, 13, 16, .82); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.4vh; }
.tv-start b { font-size: 6vh; font-weight: 800; background: #3DDC84; color: #0E0D10; padding: 2vh 4vw; border-radius: 2vh; } .tv-start span { font-size: 2.6vh; color: #D7D2DA; }
@media (orientation: portrait) { .tv-cols { grid-template-columns: 1fr; grid-template-rows: 1.3fr 1fr; } .tv-col + .tv-col { border-right: 0; border-top: 2px solid #2A2730; } .tv-col.ready .tv-nums b { min-width: 26vw; } .tv-col.prep .tv-nums b { min-width: 18vw; } }
/* صفحة النداء على جوال العميل */
.cl { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px 16px; background: #F6F4F1; color: #1F1B22; font-family: var(--sans); transition: background .4s; }
.cl.ready { background: #1E7A3C; }
.cl-card { width: min(420px, 100%); background: #fff; border-radius: 24px; padding: 28px 20px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; box-shadow: 0 18px 40px -24px rgba(0,0,0,.4); }
.cl-logo { max-height: 56px; max-width: 160px; object-fit: contain; }
.cl-co { font-size: 20px; font-weight: 800; } .cl-br { font-size: 13px; color: #5E5A60; margin-bottom: 10px; }
.cl-lb { font-size: 14px; color: #5E5A60; } .cl-n { font-size: 96px; font-weight: 800; line-height: 1; color: #5E2350; }
.cl.ready .cl-n { color: #1E7A3C; }
.cl-st { margin-top: 8px; font-size: 18px; font-weight: 800; color: #8A5A00; display: flex; align-items: center; gap: 6px; } .cl.ready .cl-st { color: #1E7A3C; font-size: 22px; }
.cl-dots { display: inline-flex; gap: 3px; } .cl-dots i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: cldot 1.2s infinite; } .cl-dots i:nth-child(2) { animation-delay: .2s; } .cl-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes cldot { 0%, 80%, 100% { opacity: .2; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .cl-dots i { animation: none; opacity: .6; } }
.cl-btn { margin-top: 14px; width: 100%; height: 56px; border-radius: 28px; background: #5E2350; color: #fff; font-size: 18px; font-weight: 800; }
.cl-note { font-size: 13px; color: #5E5A60; line-height: 1.7; margin: 8px 0 0; } .cl-off { color: #B4531A; font-size: 13px; font-weight: 700; margin: 6px 0 0; }
.cl-msg { font-size: 16px; line-height: 1.8; color: #3E3A40; padding: 10px 0; } .cl-foot { font-size: 12px; color: #8A858C; margin: 0; } .cl.ready .cl-foot { color: #D9F2E1; }
/* المسار التسويقي: أشرطة المسار ومعاينة الرسالة */
.ops-funnel { display: flex; flex-direction: column; gap: 6px; }
.ops-fbar { display: grid; grid-template-columns: minmax(130px, 200px) 1fr 48px 44px; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; text-align: start; width: 100%; }
.ops-fbar:hover, .ops-fbar.on { background: var(--sel); }
.ops-ftrack { height: 14px; border-radius: 7px; background: var(--sel); overflow: hidden; }
.ops-ffill { display: block; height: 100%; border-radius: 7px; background: var(--plum); }
.ops-fnum { text-align: end; } .ops-fpct { text-align: end; }
.ops-mk { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--white, #fff); margin-bottom: 8px; }
.ops-pvf { width: 100%; height: 70vh; border: 1px solid var(--line); border-radius: 12px; background: #F3F5FA; margin-bottom: 8px; }
@media (max-width: 560px) { .ops-fbar { grid-template-columns: 1fr 44px 40px; } .ops-ftrack { grid-column: 1 / -1; grid-row: 2; } }
/* البيع المقترح في نقطة بيع المطعم: الأقسام التالية التي لم يطلب منها العميل بعد */
.upsell { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; margin: 8px 0 2px; border-radius: 12px; background: var(--plum-s, #F4ECF2); border: 1px dashed var(--plum); }
.upsell > span { font-size: 13px; font-weight: 800; color: var(--plum); }
.upsell button { min-height: 40px; padding: 0 16px; border-radius: 20px; background: var(--plum); color: var(--paper); font-size: 14px; font-weight: 700; }
/* صفحة الطلب المسبق للعميل (#/order) */
.po { min-height: 100dvh; background: var(--paper); padding-bottom: 96px; }
.po-msg { padding: 60px 24px; text-align: center; font-size: 16px; color: var(--ink2); line-height: 1.8; }
.po-head { display: flex; align-items: center; gap: 12px; padding: 16px; background: var(--card, #fff); border-bottom: 1px solid var(--line); }
.po-head img { width: 52px; height: 52px; object-fit: contain; border-radius: 12px; }
.po-head b { display: block; font-size: 18px; font-weight: 800; } .po-head span { font-size: 13px; color: var(--muted); }
.po-cats { display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px; position: sticky; top: 0; background: var(--paper); z-index: 2; scrollbar-width: none; }
.po-cats button { flex: none; padding: 9px 16px; border-radius: 20px; border: 1px solid var(--line); background: var(--card, #fff); font-size: 14px; font-weight: 700; }
.po-cats button.on { background: var(--plum); color: var(--paper); border-color: var(--plum); }
.po-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; padding: 4px 16px 16px; }
.po-item { position: relative; display: flex; flex-direction: column; gap: 4px; text-align: start; background: var(--card, #fff); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; padding: 0 0 10px; }
.po-img { display: block; aspect-ratio: 4 / 3; background: #EEE9E4 center / cover no-repeat; margin-bottom: 6px; }
.po-item b { font-size: 14px; padding: 0 10px; line-height: 1.4; } .po-item .mono { font-size: 14px; padding: 0 10px; color: var(--plum); font-weight: 700; } .po-item small { font-size: 11px; color: var(--muted); font-weight: 400; }
.po-item i { position: absolute; top: 8px; inset-inline-start: 8px; font-style: normal; background: var(--plum); color: var(--paper); border-radius: 12px; padding: 2px 9px; font-size: 13px; font-weight: 800; }
.po-bar { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(14px + var(--safe-b)); background: linear-gradient(to top, var(--paper) 70%, rgba(246,244,241,0)); }
.po-bar .btn { display: flex; justify-content: space-between; padding: 0 22px; }

.po-loc { display: block; margin: 12px 16px 0; padding: 10px 14px; border-radius: 12px; background: var(--plum-s, #F4ECF2); color: var(--ink); font-size: 14px; text-decoration: none; }
