/* 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; }
/* أزرار الرأس تنزل لسطر ثانٍ على الجوال بدل أن تدفع الصفحة أعرض من الشاشة */
.head > .between { flex-wrap: wrap; row-gap: 8px; column-gap: 10px; }
.head > .between > .row { flex-wrap: wrap; row-gap: 6px; }
.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); }
.ln-ic { width: 34px; height: 34px; flex: none; border: 1px solid var(--field); border-radius: 50%; margin-inline-start: 6px; color: var(--plum); font-size: 15px; background: var(--white); }
.ln-ic.del { color: var(--err); font-size: 19px; }
.ln-ic:hover { background: var(--sel); }
.sum-card { border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; background: var(--white); }
.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; }
/* الأزرار داخل الصناديق (الاشتراك وغيرها): بحجمها لا بعرض الصندوق، ونصها مقروء */
.banner .btn { width: auto; flex: none; height: 40px; border-radius: 20px; padding: 0 18px; font-size: 14px; color: var(--paper); text-decoration: none; }
.banner .btn.ghost, .banner .btn.text { color: var(--plum); }
.banner .plan-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.banner .plan-box b { display: block; font-size: 14px; margin-bottom: 2px; }

/* ---------- الهيكل العظمي (تحميل) ---------- */
.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 > * { flex-shrink: 0; } /* المحتوى الطويل يمرّر النافذة ولا يضغط الأزرار */
.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 { border-color: #D8D1D6; box-shadow: 0 1px 3px rgba(31, 27, 34, .07); }
.tile.on { border: 2px solid var(--plum); }
.pos-mid, .order .lines { scrollbar-width: thin; }
/* شاشات الكاشير المتوسطة (كمبيوتر لوحي أو شاشة لمس 1024–1279 بعد تكبير ويندوز): لوحة الطلب والأقسام أضيق فتصير الأصناف ثلاثة أعمدة متناسقة بدل عمودين كبيرين */
@media (min-width: 960px) and (max-width: 1279px) {
  .rail-cats { width: 150px; padding: 16px 12px; }
  .rail-cats .rc .nm { font-size: 15px; }
  .pos-mid { padding: 14px 16px; gap: 12px; }
  .pos-body .order { width: 320px; padding: 16px 18px 18px; }
  .tiles { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
  .tile .img { height: 104px; }
  .upsell { padding: 6px 8px; gap: 6px; }
  .upsell button { min-height: 36px; padding: 0 12px; font-size: 13px; }
}
.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; }
.nm2 { display: block; font-size: 12px; font-weight: 500; color: var(--muted); line-height: 1.35; unicode-bidi: isolate; }
.ptree .pit .nm2 { display: inline; margin-inline-start: 6px; }
.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; }
/* نقطة بيع المطاعم والكوفي الجديدة (pos2، تجربة سعد) — مختصرة: الأصناف تبدأ من أعلى وتتمرّر وحدها، أسطح بيضاء بظلال خفيفة بلا حدود ثقيلة */
.p2 { background: #F3F2F5; }
.p2 .pos-top { background: var(--white); border-bottom: 0; box-shadow: 0 1px 0 rgba(31,27,34,.06); height: 54px; }
.p2-body { flex: 1; display: flex; min-height: 0; gap: 12px; padding: 12px 12px 0; }
.p2-order { width: 360px; border: 0; border-radius: 20px; box-shadow: 0 2px 12px rgba(31,27,34,.06); padding: 16px 16px 12px; }
.p2-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.p2-head { display: flex; gap: 8px; align-items: center; flex: none; }
.p2-search { flex: 1; height: 44px; background: var(--white); border: 0; border-radius: 14px; box-shadow: 0 1px 3px rgba(31,27,34,.06); }
.p2-ic { flex: none; width: 44px; height: 44px; border-radius: 14px; background: var(--white); box-shadow: 0 1px 3px rgba(31,27,34,.06); font-size: 18px; display: inline-flex; align-items: center; justify-content: center; }
.p2-ic:hover { background: var(--sel); }
.p2-pills { display: flex; gap: 6px; overflow-x: auto; flex: none; padding: 2px 0 4px; scrollbar-width: none; }
.p2-pills::-webkit-scrollbar { display: none; }
.p2-pill { flex: none; height: 40px; padding: 0 14px 0 14px; border-radius: 20px; background: var(--white); box-shadow: 0 1px 3px rgba(31,27,34,.06); font-size: 14px; font-weight: 700; color: var(--ink2); display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.p2-pill i { width: 28px; height: 28px; border-radius: 50%; background-size: cover; background-position: center; margin-inline-start: -8px; }
.p2-pill.on { background: var(--ink); color: var(--paper); }
.p2-subs { display: flex; gap: 18px; overflow-x: auto; flex: none; border-bottom: 1px solid #E6E3E8; scrollbar-width: none; }
.p2-subs button { height: 34px; font-size: 14px; font-weight: 700; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.p2-subs button.on { color: var(--ink); border-bottom-color: var(--plum); }
.p2-res { font-size: 13px; color: var(--muted); flex: none; }
.p2-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 2px 2px 12px; scrollbar-width: thin; }
.p2-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 10px; }
.p2-tile { background: var(--white); border-radius: 16px; padding: 6px 6px 10px; box-shadow: 0 1px 3px rgba(31,27,34,.06); display: flex; flex-direction: column; gap: 6px; text-align: start; position: relative; transition: transform .08s ease, box-shadow .12s ease; min-width: 0; }
.p2-tile:hover { box-shadow: 0 4px 14px rgba(31,27,34,.10); }
.p2-tile:active { transform: scale(.97); }
.p2-tile.on { box-shadow: 0 0 0 2px var(--plum), 0 4px 14px rgba(94,35,80,.15); }
.p2-tile.off { opacity: .45; }
.p2-img { aspect-ratio: 4 / 3; border-radius: 12px; background: var(--sel) center / cover no-repeat; position: relative; display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 800; color: var(--plum); }
.p2-img b { position: absolute; top: 6px; inset-inline-start: 6px; min-width: 26px; height: 26px; border-radius: 13px; background: var(--plum); color: var(--paper); font: 700 13px var(--mono); display: flex; align-items: center; justify-content: center; padding: 0 6px; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.p2-img em { position: absolute; bottom: 6px; inset-inline-end: 6px; font-style: normal; font-size: 10px; background: var(--ink); color: var(--paper); padding: 2px 6px; border-radius: 8px; }
.p2-nm { padding: 0 4px; font-size: 13px; font-weight: 700; line-height: 1.4; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 36px; }
.p2-nm .nm2 { display: block; font-size: 11px; font-weight: 400; color: var(--muted); }
.p2-pr { padding: 0 4px; font: 700 14px var(--mono); color: var(--plum); margin-top: auto; }
.p2-pr s { font-weight: 400; color: var(--muted); font-size: 11px; margin-inline-end: 4px; }
.p2-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.p2-chip { height: 34px; padding: 0 12px; border-radius: 17px; background: #F3F2F5; font-size: 13px; font-weight: 700; color: var(--ink2); display: inline-flex; align-items: center; gap: 6px; }
.p2-chip.sel { background: var(--sel); color: var(--plum); }
.p2-chip.warn { background: var(--warn-bg); color: var(--warn-ink); }
.p2-chip.ghost { background: transparent; border: 1px dashed var(--line); color: var(--muted); font-weight: 400; }
.p2-order .lines { margin-top: 4px; }
.p2-order .oline { border-bottom-color: #EFEDF0; padding: 10px 0; }
.p2-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 40px 0; color: var(--muted); text-align: center; }
.p2-empty span { font-size: 30px; opacity: .6; } .p2-empty b { color: var(--ink2); font-size: 15px; } .p2-empty small { font-size: 12px; }
.p2-up { margin: 6px 0 0; padding: 8px 10px; border-radius: 12px; font-size: 12px; }
.p2-up button { height: 30px; font-size: 12px; }
.p2-note { padding: 8px 0 4px; text-align: start; font-size: 13px; font-weight: 700; color: var(--plum); }
.p2-sum { border-top: 1px dashed #E3DFE5; padding: 8px 0 10px; display: flex; flex-direction: column; gap: 4px; }
.p2-pay { height: 60px; border-radius: 18px; }
.p2-pay kbd, .p2-bar kbd { font: 600 10px var(--mono); border: 1px solid currentColor; border-radius: 5px; padding: 1px 5px; opacity: .6; margin-inline-start: 6px; }
.p2-bar { flex: none; display: flex; gap: 8px; padding: 10px 12px calc(10px + var(--safe-b, 0px)); }
.p2-bar button { flex: 1; height: 44px; border-radius: 14px; background: var(--white); box-shadow: 0 1px 3px rgba(31,27,34,.06); font-size: 13px; font-weight: 800; color: var(--ink2); display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.p2-bar button b { min-width: 20px; height: 20px; border-radius: 10px; background: var(--plum); color: var(--paper); font: 700 11px var(--mono); display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
.p2-bar button.hot { background: var(--sel); color: var(--plum); }
.p2-alert { display: flex; gap: 12px; align-items: center; background: var(--white); border-radius: 16px; padding: 10px 14px; box-shadow: 0 0 0 2px var(--plum), 0 6px 18px rgba(94,35,80,.15); flex: none; animation: p2pulse 1.4s ease-in-out 3; }
.p2-alert-i { font-size: 24px; }
.p2-alert-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.p2-alert-b b { font-size: 14px; color: var(--plum); } .p2-alert-b em { font-style: normal; font-weight: 700; color: var(--warn-ink); }
.p2-alert-a { display: flex; gap: 6px; flex: none; align-items: center; } .p2-alert-a .btn { height: 40px; width: auto; padding: 0 16px; }
@keyframes p2pulse { 50% { box-shadow: 0 0 0 5px var(--halo), 0 6px 18px rgba(94,35,80,.15); } }
.p2-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.p2-types button { min-height: 60px; border-radius: 14px; background: #F3F2F5; font-size: 14px; font-weight: 800; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 8px; }
.p2-types button span { font-size: 18px; } .p2-types button small { font-size: 11px; font-weight: 400; color: var(--muted); }
.p2-types button.on { background: var(--sel); color: var(--plum); box-shadow: 0 0 0 2px var(--plum); }
.p2-chrow { display: grid; grid-template-columns: 1fr 1fr auto auto; gap: 6px; margin-bottom: 8px; align-items: center; }
.p2-x { width: 36px; height: 36px; border-radius: 18px; color: var(--err); font-size: 20px; }
.p2-tables { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.p2-tables button { min-height: 72px; border-radius: 14px; background: #F3F2F5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.p2-tables button b { font: 800 18px var(--mono); } .p2-tables button small { font-size: 11px; color: var(--muted); } .p2-tables button span { font-size: 12px; font-weight: 700; }
.p2-tables button.busy { background: #FFF1E3; box-shadow: inset 0 0 0 1px #E8A15A; } .p2-tables button.busy b { color: #B4531A; }
.p2-tables button.cur { box-shadow: 0 0 0 2px var(--plum); }
[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; }
/* أسطر فاتورة البقالة: تتمرر داخل مكانها (كانت تنضغط فيختفي ما بعد السطر السابع) */
.rtable.rlines { flex: 0 1 auto; min-height: 140px; overflow-y: auto; scrollbar-width: thin; }
.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: 1180px) { .lgrid4 { grid-template-columns: 1fr 1fr 40px; } .lgrid4 > :first-child { grid-column: 1 / -1; } }
.lgrid5 { display: grid; grid-template-columns: minmax(0, 1fr) 90px 100px 76px 40px; gap: 8px; align-items: end; padding: 8px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 1180px) { .lgrid5 { grid-template-columns: 1fr 1fr 1fr 40px; } .lgrid5 > :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) 44px 92px 96px 40px 88px 104px; 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) 104px 56px 112px; }
.a4-line.nv { grid-template-columns: 24px minmax(0,1fr) 56px 104px 112px; }
.a4-line > span { min-width: 0; overflow-wrap: anywhere; } /* المبالغ الكبيرة تنزل سطرًا ولا تتداخل مع العمود المجاور */ /* منشأة غير مسجّلة: بلا أعمدة الضريبة */
.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; grid-column: 1 / -1; 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.zebra > div:nth-child(odd):not(.h) { background: #F7F3F5; -webkit-print-color-adjust: exact; print-color-adjust: exact; } .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; flex-direction: column; gap: 4px; font-size: 10px; color: var(--muted); line-height: 1.6; }
.a4-foot .brand { display: flex; align-items: center; gap: 6px; color: #3d3640; font-size: 10.5px; } .a4-foot .brand b { color: #5E2350; letter-spacing: .5px; } .a4-foot .brand .logo-mark { flex: none; }
.a4-foot .meta { display: flex; justify-content: space-between; gap: 16px; }
@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: none; color: #000; border: calc(2.5 * var(--u)) solid #000; break-inside: avoid; } /* بلا خلفية سوداء (2026-10-19، طلب المستخدم): رقم كبير بإطار */
.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-table .r-ttl2 { font-size: calc(15 * var(--u)); font-weight: 800; } .r80.t-table .r-name { font-size: calc(16 * var(--u)); }
.r80.t-table .r-call { background: none; color: #000; border: calc(2 * var(--u)) solid #000; }
.r80.t-table .r-grand { background: none; color: #000; border-radius: 0; border-top: calc(2 * var(--u)) solid #000; border-bottom: calc(2 * var(--u)) solid #000; }
.r80.t-table .r-tbl { border-top: 1px dashed #000; padding-top: calc(4 * var(--u)); }
.r80 .r-grid { width: 100%; border-collapse: collapse; font-size: calc(12 * var(--u)); border-top: 1px solid #000; border-bottom: 1px dashed #000; }
.r80 .r-grid th { font-size: calc(11 * var(--u)); font-weight: 700; border-bottom: 1px solid #000; padding: calc(3 * var(--u)) calc(2 * var(--u)); }
.r80 .r-grid td { text-align: center; padding: calc(3 * var(--u)) calc(2 * var(--u)); vertical-align: top; } .r80 .r-grid .n { text-align: start; width: 44%; }
/* الأشكال «مرتّب» و«أنيق» و«بسيط نظيف» (2026-11-03): الأرقام في أعمدة ثابتة بخط ثابت العرض */
.r80 .f-items { display: flex; flex-direction: column; border-top: 1px solid #000; border-bottom: 1px solid #000; padding: calc(2 * var(--u)) 0 calc(4 * var(--u)); }
.r80 .f-ih { display: grid; grid-template-columns: 1fr calc(40 * var(--u)) calc(66 * var(--u)) calc(74 * var(--u)); gap: calc(4 * var(--u)); font-size: calc(11 * var(--u)); font-weight: 700; padding: calc(3 * var(--u)) 0; border-bottom: 1px solid #000; }
.r80 .f-ih > span:not(:first-child) { text-align: center; } .r80 .f-ih > span:last-child { text-align: left; }
.r80 .f-it { padding: calc(4 * var(--u)) 0; border-bottom: 1px dashed #000; break-inside: avoid; } .r80 .f-it:last-child, .r80 .f-it:has(+ .f-cnt) { border-bottom: 0; }
.r80 .f-n { display: block; font-size: calc(13 * var(--u)); font-weight: 700; line-height: 1.45; }
.r80 .f-num { display: grid; grid-template-columns: 1fr calc(40 * var(--u)) calc(66 * var(--u)) calc(74 * var(--u)); gap: calc(4 * var(--u)); font-size: calc(12 * var(--u)); }
.r80 .f-num > span { text-align: center; } .r80 .f-num > span:last-child { text-align: left; font-weight: 700; }
.r80 .f-cnt { display: flex; justify-content: space-between; font-size: calc(11 * var(--u)); padding-top: calc(4 * var(--u)); border-top: 1px solid #000; }
.r80 .f-cells { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid #000; }
.r80 .f-cells > div { display: flex; flex-direction: column; padding: calc(4 * var(--u)) calc(6 * var(--u)); border-bottom: 1px solid #000; min-width: 0; } .r80 .f-cells > div:nth-child(odd) { border-left: 1px solid #000; }
.r80 .f-cells > div:nth-last-child(-n+2):nth-child(odd), .r80 .f-cells > div:last-child { border-bottom: 0; }
.r80 .f-cells span { font-size: calc(10 * var(--u)); } .r80 .f-cells b { font-size: calc(12 * var(--u)); font-weight: 700; overflow-wrap: anywhere; }
.r80 .f-grand { display: flex; justify-content: space-between; align-items: center; gap: calc(8 * var(--u)); border: calc(2 * var(--u)) solid #000; padding: calc(6 * var(--u)) calc(8 * var(--u)); break-inside: avoid; }
.r80 .f-grand > span { font-size: calc(13 * var(--u)); font-weight: 700; } .r80 .f-grand b { font-size: calc(19 * var(--u)); font-weight: 800; } .r80 .f-grand small { font-size: calc(11 * var(--u)); font-weight: 600; }
.r80 .f-dbl { border-top: 1px solid #000; border-bottom: 1px solid #000; height: calc(3 * var(--u)); }
.r80 .f-ttl { display: flex; flex-direction: column; align-items: center; padding: calc(3 * var(--u)) 0; } .r80 .f-ttl b { font-size: calc(15 * var(--u)); font-weight: 800; } .r80 .f-ttl i { font-style: normal; font-size: calc(10 * var(--u)); letter-spacing: .2em; } .r80 .f-ttl .mono { font-size: calc(12 * var(--u)); }
.r80 .f-ih.e, .r80 .f-it.e { display: grid; grid-template-columns: calc(26 * var(--u)) minmax(0, 1fr) calc(66 * var(--u)); gap: calc(5 * var(--u)); align-items: baseline; }
.r80 .f-ih.e > span:last-child { text-align: left; }
.r80 .f-it.e > b.mono { font-size: calc(14 * var(--u)); text-align: center; } .r80 .f-it.e > .mono:last-child { text-align: left; font-weight: 700; font-size: calc(13 * var(--u)); } .r80 .f-ih.e > span:first-child { text-align: center; }
.r80 .f-it.e .f-n { display: flex; flex-direction: column; } .r80 .f-it.e .f-n b { font-size: calc(13 * var(--u)); }
.r80 .f-grand.e { border: 0; padding: calc(5 * var(--u)) 0; }
.r80.t-clean .f-items { border-top: 1px dashed #000; border-bottom: 1px dashed #000; } .r80.t-clean .f-it { border-bottom: 0; }
.r80 .f-grand.c0 { flex-direction: column; border: 0; gap: 0; padding: calc(8 * var(--u)) 0; } .r80 .f-grand.c0 b { font-size: calc(26 * var(--u)); }
.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; }
  /* ملصقات الباركود (labels.js): كل ملصق صفحة بمقاسه، بلا هوامش ولا ظل */
  html.lblroll, html.lblroll body, html.lblroll #app { width: auto; min-height: 0 !important; margin: 0; padding: 0; overflow: visible; background: #fff; }
  html.lblroll .lbls { display: block; padding: 0; margin: 0; gap: 0; }
  html.lblroll .blbl { box-shadow: none; outline: 0; margin: 0; break-inside: avoid; }
  html.lblroll .blbl + .blbl { break-before: page; }
  .lbl-a4 { box-shadow: none; min-height: 0; }
}
/* ملصق الباركود بالمليمتر: أسود على أبيض للطابعة الحرارية */
.lbls { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; padding: 14px; }
.blbl { box-sizing: border-box; background: #fff; color: #000; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; text-align: center; font-family: 'IBM Plex Sans Arabic', system-ui, sans-serif; line-height: 1.2; box-shadow: 0 1px 6px rgba(0,0,0,.14); outline: 1px dashed #c9c3c8; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.lbl-nm { font-weight: 700; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; width: 100%; word-break: break-word; }
.lbl-u { font-weight: 500; }
.lbl-co { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; }
.lbl-pr { font-weight: 800; white-space: nowrap; } .lbl-pr b { font-family: var(--mono); font-weight: 800; } .lbl-pr small { font-weight: 600; }
.lbl-bc { display: flex; justify-content: center; width: 100%; } .lbl-bc svg { display: block; }
.lbl-cd { font-family: var(--mono); letter-spacing: .06em; direction: ltr; }
.lbl-a4 { display: grid !important; grid-template-columns: repeat(4, 48mm); gap: 2mm 2mm; justify-content: center; align-content: start; }
.lbl-a4 .blbl { box-shadow: none; outline: 1px dashed #bbb; break-inside: avoid; }
.lbl-info { max-width: 794px; margin: 0 auto 8px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.lbl-info .warn { color: var(--warn-ink, #8a5a00); }

/* ---------- الحاسوب واللوحي ---------- */
@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: 268px; 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-find { position: relative; margin: 0 0 10px; }
  .side .s-q { width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); padding: 0 12px; padding-inline-end: 52px; font: inherit; font-size: 13px; color: var(--ink); }
  .side .s-q::placeholder { color: var(--ph); }
  .side .s-q:focus { outline: none; border-color: var(--plum); box-shadow: 0 0 0 3px var(--halo); background: #fff; }
  .side .s-find kbd { position: absolute; inset-inline-end: 8px; top: 50%; transform: translateY(-50%); font: 600 10px var(--mono, monospace); color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 2px 5px; background: #fff; pointer-events: none; }
  .side .s-q:focus + kbd { display: none; }
  .side .s-none { font-size: 12px; color: var(--muted); padding: 8px; }
  .side .s-grp { display: flex; flex-direction: column; }
  .side .s-grp + .s-grp { margin-top: 2px; }
  .side .s-h { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink2); font-weight: 700; padding: 8px; min-height: 38px; border-radius: 10px; }
  .side .s-grp.fixed .s-h { font-size: 11.5px; color: var(--muted); min-height: 30px; padding: 12px 8px 4px; }
  .side .s-h .gi { width: 18px; height: 18px; flex: none; color: var(--muted); }
  .side .s-grp.fixed .s-h .gi { width: 15px; height: 15px; }
  .side .s-tog { width: 100%; text-align: inherit; }
  .side .s-tog:hover { background: var(--sel); color: var(--ink); }
  .side .s-grp:not(.shut) .s-tog { color: var(--plum); }
  .side .s-grp:not(.shut) .s-tog .gi { color: var(--plum); }
  .side .s-tog .cnt { margin-inline-start: auto; font-size: 11px; font-weight: 700; color: var(--muted); background: var(--paper); border: 1px solid var(--line); border-radius: 999px; min-width: 22px; padding: 0 6px; text-align: center; line-height: 18px; }
  .side .s-grp:not(.shut) .s-tog .cnt { display: none; }
  .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; flex: none; }
  .side .s-grp:not(.shut) .s-tog .car { margin-inline-start: auto; }
  .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: 1px; }
  .side .s-grp.acc .s-items { margin: 2px 0 8px; margin-inline-start: 16px; padding-inline-start: 8px; border-inline-start: 1.5px solid var(--line); }
  .side .s-grp.acc .s-items a { min-height: 36px; padding: 7px 8px; font-size: 13.5px; }
  .side.finding .s-grp.shut .s-items { display: flex; }
  .side.finding .s-grp .s-tog .cnt { display: none; }
  .side a[hidden], .side .s-grp[hidden] { display: none !important; }
  .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 .s-grp.acc:nth-child(even) > .s-tog:not(:hover), .side .s-items a:nth-child(even):not(:hover):not(.on) { background: #f7f3f6; }
  .side a:hover { background: var(--sel); color: var(--ink); }
  .side .s-h .gl { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: start; }
  .side a .nl { flex: 1; min-width: 0; }
  .side a .fav { flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; font-size: 13px; color: var(--off); opacity: 0; transition: opacity .12s; }
  .side a:hover .fav, .side a .fav.on, .side a:focus-visible .fav { opacity: 1; }
  .side a .fav:hover { color: var(--plum); background: var(--halo); }
  .side a .fav.on { color: #B8860B; }
  .side .s-grp.fav .s-h .star { color: #B8860B; font-size: 13px; width: 15px; text-align: center; }
  .side .s-new { display: flex; align-items: center; justify-content: center; gap: 8px; height: 40px; margin: 0 0 8px; border-radius: 10px; background: var(--plum); color: #fff; font-weight: 800; font-size: 14px; }
  .side .s-new span { font-size: 18px; line-height: 1; }
  .side .s-new:hover { filter: brightness(1.08); }
  .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 { height: calc(56 * var(--u) * var(--ts, 1)); width: auto; 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; }
.therm-pv { display: flex; justify-content: center; align-items: flex-start; padding: 14px 0; background: var(--sel); border-radius: 12px; max-height: 760px; overflow: auto; margin-top: 8px; min-height: 120px; }
.therm-pv img { display: block; height: auto; background: #fff; box-shadow: 0 2px 10px rgba(31, 27, 34, .14); image-rendering: auto; }
.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); }
.kp-grid { display: grid; gap: 8px; margin: 2px 0 4px; break-inside: avoid; }
.kp-grid .kpc { border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; display: flex; flex-direction: column; gap: 3px; min-width: 0; border-top: 3px solid var(--acc, #5E2350); }
.kp-grid .kpc > span { font-size: 10.5px; color: var(--muted); font-weight: 700; } .kp-grid .kpc b { font-size: 17px; font-weight: 800; font-family: var(--mono); line-height: 1.25; } .kp-grid .kpc b .mono { font-size: inherit; color: inherit; } .kp-grid .kpc > small { font-size: 9.5px; color: var(--muted); line-height: 1.4; }
.kp-grid .kpc.kp-ok { border-top-color: #1F7A4D; } .kp-grid .kpc.kp-ok b { color: #1F7A4D; } .kp-grid .kpc.kp-bad { border-top-color: #B42318; } .kp-grid .kpc.kp-bad b { color: #B42318; }
.kp-tips { margin: 4px 22px 6px; padding: 0; font-size: 12.5px; line-height: 1.85; }
@media print { .kp-grid .kpc { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.pd-tbl .nw { white-space: nowrap; } .pd-tbl td small { white-space: nowrap; }
.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; }
.acc-doc > summary { list-style: none; cursor: pointer; }
.acc-doc > summary::-webkit-details-marker { display: none; }
.acc-doc[open] > summary { background: var(--sel); }
.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); }
/* سجل العميل: فقاعات واتساب (0091) والتحويل بين الأقسام */
.ops-wa { padding: 10px 12px; border-radius: 14px; max-width: 86%; overflow-wrap: anywhere; border: 1px solid var(--line); }
.ops-wa.wa_in { align-self: flex-start; background: #e9f9ef; border-color: #bfe8cf; }
.ops-wa.wa_out { align-self: flex-end; background: var(--white, #fff); }
.ops-wa.wa_bot { align-self: flex-end; background: #f4f6fb; color: var(--ink2, #44506a); }
.ops-tr { padding: 10px 12px; border-radius: 12px; background: #fff7e6; border: 1px solid #f3dcaa; overflow-wrap: anywhere; }
.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 em { font-style: normal; font-size: 13px; font-weight: 700; border-radius: 8px; padding: 2px 8px; margin-bottom: 4px; } .ob-car { background: var(--line); color: var(--ink); } .ob-arr { background: #B4531A; color: #fff; animation: obarr 1.2s ease-in-out infinite alternate; } @keyframes obarr { from { opacity: 1; } to { opacity: .55; } }
.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; }
/* خطوات الاشتراك للعميل الجديد (من موقع حلول الغد): بريدك ← شركتك ← الدفع */
.su-steps { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 14px; counter-reset: su; }
.su-steps li { flex: 1; counter-increment: su; font-size: 12.5px; color: var(--muted); border-top: 3px solid var(--line); padding-top: 6px; line-height: 1.4; }
.su-steps li::before { content: counter(su) ' · '; font-weight: 700; }
.su-steps li.done { color: var(--plum); border-color: var(--plum); }
.su-steps li.done::before { content: '✓ '; }
.su-steps li.cur { color: var(--ink); font-weight: 700; border-color: var(--plum); }
.su-more { color: var(--muted); font-weight: 500; }
.su-tag { display: inline-block; font-size: 11.5px; font-weight: 700; color: var(--paper); background: #D80A69; border-radius: 10px; padding: 1px 8px; margin-inline-start: 6px; vertical-align: middle; }
.su-save { display: inline-block; font-size: 11.5px; font-weight: 700; color: #D80A69; background: #fff; border-radius: 9px; padding: 0 7px; margin-inline-start: 6px; }
.seg button:not(.on) .su-save { background: #FCE4EF; }
.su-price { font-size: 17px; font-weight: 800; color: var(--ink); }
.su-guar { display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid #2E7D4F; background: #EEF7F1; color: #1E4D31; border-radius: 12px; padding: 10px 12px; margin-top: 16px; font-size: 13.5px; line-height: 1.6; }
.su-guar b { color: #14361F; }
.su-safe { text-align: center; font-size: 12px; color: var(--muted); margin-top: 8px; }
.su-safe span { display: inline-block; border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; margin: 2px; background: #fff; color: var(--ink2); font-weight: 600; }
/* جداول المدارس (2026-10-12): رأس ثابت، أسطر متناوبة، أعمدة مالية بمحاذاة ثابتة، ويُطبع نظيفًا */
.stbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--white, #fff); }
.stbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.stbl th { text-align: start; font-size: 12px; font-weight: 700; color: var(--ink2); background: var(--field); padding: 9px 10px; white-space: nowrap; position: sticky; top: 0; }
.stbl td { padding: 10px; border-top: 1px solid var(--line); vertical-align: top; }
.stbl tbody tr:nth-child(even) td { background: rgba(0,0,0,.018); }
.stbl tbody tr.go { cursor: pointer; } .stbl tbody tr.go:hover td { background: var(--sel, #F6EEF3); }
.stbl .n { text-align: end; font-family: var(--mono); white-space: nowrap; }
.stbl .sub { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.stbl .tag { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--field); white-space: nowrap; }
.stbl .tag.red { background: var(--err-bg); color: var(--err-ink); } .stbl .tag.amber { background: var(--warn-bg); color: var(--warn-ink); } .stbl .tag.green { background: #E3EDE5; color: var(--ok); } .stbl .tag.plum { background: var(--sel, #F6EEF3); color: var(--plum); }
.stbl tfoot td { font-weight: 800; border-top: 2px solid var(--line); background: var(--field); }
.sch-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin: 0 0 12px; }
.sch-sum button { text-align: start; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--white, #fff); cursor: pointer; }
.sch-sum button.on { border: 2px solid var(--plum); background: var(--sel, #F6EEF3); }
.sch-sum b { display: block; font-size: 20px; font-family: var(--mono); }
@media print { .stbl-wrap { border: 0; overflow: visible; } .stbl th { position: static; -webkit-print-color-adjust: exact; print-color-adjust: exact; } .stbl tbody tr:nth-child(even) td { -webkit-print-color-adjust: exact; print-color-adjust: exact; } .stbl tr { break-inside: avoid; } }
/* لوحات المدارس (2026-10-12): هدوء بصري — رقم بطل لكل لوحة، اللون للحالة فقط، أرقام صحيحة بلا هللات */
.dk { max-width: 1040px; }
.dk-meta { font-size: 13px; color: var(--muted); margin: -4px 0 14px; }
.dk-hero { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; margin-bottom: 14px; }
.dk-hero p { margin: 0 0 12px; font-size: 17px; line-height: 1.75; font-weight: 600; color: var(--ink); }
.dk-hero p b { font-family: var(--mono); font-weight: 800; }
.dk-prog { position: relative; height: 12px; border-radius: 6px; background: #EEE9EC; overflow: visible; display: flex; }
.dk-prog > i { display: block; height: 100%; } .dk-prog > i:first-child { border-radius: 0 6px 6px 0; } .dk-prog > i:last-of-type { border-radius: 6px 0 0 6px; }
.dk-prog > u { position: absolute; top: -5px; bottom: -5px; width: 2px; background: var(--ink); border-radius: 1px; }
.dk-prog > u::after { content: attr(data-t); position: absolute; top: -18px; transform: translateX(50%); font-size: 10.5px; color: var(--ink2); white-space: nowrap; text-decoration: none; }
.dk-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: 12.5px; color: var(--ink2); }
.dk-legend span::before { content: ''; display: inline-block; width: 9px; height: 9px; border-radius: 3px; background: var(--c); margin-inline-end: 6px; }
.dk-legend b { font-family: var(--mono); margin-inline-start: 4px; color: var(--ink); }
.dk-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.dk-kpi { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dk-kpi > span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.dk-kpi > b { font-family: var(--mono); font-size: 26px; font-weight: 800; letter-spacing: -.3px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dk-kpi > b small { font-size: 13px; font-weight: 600; color: var(--muted); margin-inline-start: 3px; }
.dk-kpi > em { font-style: normal; font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.dk-pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 10px; background: #EEE9EC; color: var(--ink2); }
.dk-pill.ok { background: #E3EFE6; color: var(--ok); } .dk-pill.bad { background: var(--err-bg); color: var(--err-ink); } .dk-pill.warn { background: var(--warn-bg); color: var(--warn-ink); }
.dk-kpi.bad > b { color: var(--err); } .dk-kpi.ok > b { color: var(--ok); }
.dk-sec { font-size: 15px; font-weight: 800; margin: 20px 2px 8px; }
.dk-acts { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.dk-acts > button, .dk-acts > div { display: flex; align-items: center; gap: 12px; width: 100%; text-align: start; padding: 12px 16px; background: none; border: 0; border-top: 1px solid var(--line); cursor: pointer; font: inherit; color: inherit; }
.dk-acts > :first-child { border-top: 0; }
.dk-acts .n { flex: none; width: 24px; height: 24px; border-radius: 12px; background: var(--sel); color: var(--plum); font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.dk-acts .t { flex: 1; min-width: 0; } .dk-acts .t b { display: block; font-size: 14px; } .dk-acts .t small { display: block; font-size: 12px; color: var(--muted); }
.dk-acts .go { flex: none; color: var(--plum); font-weight: 700; font-size: 13px; }
.dk-acts .none { color: var(--ok); font-weight: 700; cursor: default; }
.dk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dk-panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px 10px; min-width: 0; }
.dk-panel h3 { margin: 0; font-size: 15px; font-weight: 800; display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.dk-panel h3 small { font-size: 11.5px; font-weight: 500; color: var(--muted); }
.dk-big { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 10px 0 6px; }
.dk-big b { font-family: var(--mono); font-size: 30px; font-weight: 800; line-height: 1.2; }
.dk-big span { font-size: 12.5px; color: var(--muted); } .dk-big b small { font-size: 14px; font-weight: 600; color: var(--muted); margin-inline-start: 4px; }
.dk-big.bad b { color: var(--err); } .dk-big.ok b { color: var(--ok); }
.dk-rows > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid #F0ECEF; font-size: 13.5px; }
.dk-rows > div > span { color: var(--ink2); } .dk-rows > div > b { font-family: var(--mono); font-weight: 700; white-space: nowrap; }
.dk-rows > div > b.bad { color: var(--err); } .dk-rows > div > b.ok { color: var(--ok); }
.dk-panel details { border-top: 1px solid #F0ECEF; padding: 8px 0 4px; font-size: 13px; }
.dk-panel summary { cursor: pointer; color: var(--plum); font-weight: 700; font-size: 12.5px; }
.dk-panel table { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 12.5px; }
.dk-panel td, .dk-panel th { padding: 6px 4px; border-top: 1px solid #F0ECEF; text-align: start; } .dk-panel th { color: var(--muted); font-weight: 600; border-top: 0; }
.dk-panel td.n, .dk-panel th.n { text-align: end; font-family: var(--mono); }
.dk-wide { grid-column: 1 / -1; }
.dk-bars { display: flex; align-items: flex-end; gap: 4px; height: 56px; margin: 8px 0 4px; }
.dk-bars > div { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; }
.dk-bars i { width: 100%; background: #D9CBD5; border-radius: 3px 3px 0 0; } .dk-bars i.on { background: var(--plum); }
.dk-bars span { font-size: 9px; color: var(--muted); }
.dk-links { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0 30px; }
.dk-links button { padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 13px; cursor: pointer; border: 1.5px solid var(--line); background: #fff; color: var(--ink2); }
.dk-links button.pri { border-color: var(--plum); background: var(--plum); color: #fff; }
.dk-foot { font-size: 11.5px; color: var(--muted); margin: -18px 2px 30px; }
@media (max-width: 760px) { .dk-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dk-grid { grid-template-columns: 1fr; } .dk-hero p { font-size: 15.5px; } .dk-kpi > b { font-size: 22px; } .dk-big b { font-size: 26px; } }

/* الشعار الثاني (مثل وزارة التعليم) فوق عنوان المستند */
.cfv-logo2 { display: block; max-height: 42px; max-width: 120px; object-fit: contain; margin: 0 auto 6px; }
/* «اطلب مرة ثانية» أعلى صفحة متابعة الطلب */
.cl-menu { display: block; margin: -4px 0 14px; padding: 12px 14px; border: 1.5px solid #5E2350; border-radius: 24px; color: #5E2350; font-size: 16px; font-weight: 800; text-decoration: none; text-align: center; }
.cl.ready .cl-menu { border-color: currentColor; color: inherit; }
/* فترة التقرير ورأس الطباعة (2026-10-13) */
.rbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin: 0 0 14px; }
.rbar label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
.rbar .input, .rbar .select { min-width: 150px; height: 40px; }
.print-head { display: none; }
@media print {
  .print-head { display: flex; justify-content: space-between; gap: 16px; border-bottom: 2px solid #222; padding-bottom: 8px; margin-bottom: 16px; font-size: 12px; }
  .print-head > div { display: flex; flex-direction: column; gap: 2px; } .print-head > div:last-child { text-align: end; } .print-head b { font-size: 16px; }
  .rbar, .seg, .dk-links, .content .btn { display: none !important; }
  .dk-hero, .dk-kpi, .dk-panel, .dk-acts { break-inside: avoid; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- المستشار الذكي (المحاماة) ---------- */
.cai-log { display: flex; flex-direction: column; gap: 12px; padding: 4px 0 12px; }
.cai-msg { display: flex; flex-direction: column; }
.cai-q { align-items: flex-start; }
.cai-q .cai-b { background: var(--sel); color: var(--ink); border-radius: 14px; padding: 10px 14px; max-width: 85%; font-size: 14.5px; line-height: 1.7; white-space: pre-wrap; }
.cai-a .cai-b { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; font-size: 14.5px; line-height: 1.85; display: flex; flex-direction: column; gap: 4px; }
.cai-a .cai-b.muted { flex-direction: row; align-items: center; gap: 10px; }
.cai-a.err .cai-b { border-color: var(--err); color: var(--err); }
.cai-md h3 { font-size: 15px; font-weight: 800; color: var(--plum); margin: 10px 0 2px; }
.cai-md h3:first-child { margin-top: 0; }
.cai-md p { margin: 2px 0; }
.cai-md ul { margin: 2px 0; padding-inline-start: 20px; }
.cai-md li { margin: 2px 0; }
.cai-md a { color: var(--plum); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.cai-tools { display: flex; gap: 16px; align-items: center; padding: 6px 4px 0; }
.cai-hello { padding: 18px; border: 1px dashed var(--line); border-radius: 14px; }
.cai-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.cai-chips .chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px; font-size: 13px; color: var(--ink2); text-align: start; }
.cai-chips .chip:hover { border-color: var(--plum); color: var(--plum); background: var(--sel); }
.cai-in { display: flex; gap: 10px; align-items: flex-end; position: sticky; bottom: 0; background: var(--paper); padding: 10px 0 calc(10px + var(--tab-h, 0px)); }
.cai-in .textarea { flex: 1; min-height: 52px; resize: vertical; }
.cai-in .btn { width: auto; padding: 0 22px; flex: none; }
@media print {
  body.pr-one .cai-msg:not(.pr-this), body.pr-one .cai-hello, body.pr-one .banner { display: none !important; }
  .cai-a .cai-b { border: 0; padding: 0; }
}
.cai-ask { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 14px; margin: 0 0 14px; border: 1px solid var(--halo); background: var(--sel); color: var(--plum); border-radius: 12px; font-weight: 800; font-size: 14px; text-align: start; }
.cai-ask:hover { border-color: var(--plum); }

/* ---------- لوحة إدارة TRUST (مالك النظام، js/screens/admin.js) ---------- */
.adm .content.adm-c { max-width: 1240px; width: 100%; margin: 0 auto; }
.adm .head { max-width: 1240px; width: 100%; margin: 0 auto; }
.adm-ref { width: 40px; height: 40px; border-radius: 20px; border: 1px solid var(--line); background: var(--white); color: var(--plum); font-size: 20px; line-height: 1; }
.adm-ref:hover { background: var(--sel); }
.adm-link { height: 40px; padding: 0 12px; }
.adm-tabs { margin-bottom: 8px; }
.adm-bar0 { display: flex; justify-content: flex-end; margin: 0 0 12px; }
.adm-tog { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); cursor: pointer; }
.adm-tog input { width: 16px; height: 16px; accent-color: var(--plum); }
.adm-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.adm-kpi { display: flex; flex-direction: column; gap: 4px; text-align: start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); min-width: 0; }
button.adm-kpi:hover { border-color: var(--plum); }
.adm-kpi .ak-l { font-size: 12px; color: var(--muted); font-weight: 700; }
.adm-kpi .ak-v { font-size: 26px; font-weight: 800; line-height: 1.25; }
.adm-kpi .ak-v small { font-size: 13px; font-weight: 500; color: var(--muted); }
.adm-kpi .ak-v .ak-vs { font-size: 18px; }
.adm-kpi .ak-v .sup-chip { font-size: 14px; }
.adm-kpi .ak-s { font-size: 12px; color: var(--ink2); line-height: 1.6; }
.adm-kpi.hero { background: var(--plum); border-color: var(--plum); color: var(--paper); }
.adm-kpi.hero .ak-v { color: var(--paper); }
.adm-kpi.hero .ak-l, .adm-kpi.hero .ak-s, .adm-kpi.hero .ak-v small { color: var(--halo); }
.adm-kpi.warnk { border-color: var(--warn-bg); background: #FBF5E8; }
.adm-kpi.badk { border-color: var(--err-bg); background: #FBEFED; }
.adm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.adm-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.adm-grid .span2 { grid-column: span 2; }
.adm-card { border: 1px solid var(--line); border-radius: 14px; background: var(--white); padding: 14px 16px; min-width: 0; }
.adm-ch { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.adm-ch h3 { margin: 0; font-size: 15px; font-weight: 800; }
.adm-bars { display: flex; align-items: flex-end; gap: 6px; height: calc(var(--h) + 40px); padding-top: 4px; }
.adm-bar { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.adm-bar i { display: block; width: 100%; max-width: 40px; background: var(--halo); border-radius: 6px 6px 2px 2px; max-height: var(--h); }
.adm-bar.cur i { background: var(--plum); }
.adm-bar .bv { font-size: 10px; color: var(--ink2); white-space: nowrap; }
.adm-bar .bl { font-size: 10px; color: var(--muted); white-space: nowrap; }
.adm-hb { display: flex; flex-direction: column; gap: 8px; }
.adm-hr { display: grid; grid-template-columns: minmax(80px, 38%) 1fr auto; align-items: center; gap: 10px; font-size: 13px; }
.adm-hr .hk { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-hr .ht { height: 10px; background: var(--paper); border-radius: 5px; overflow: hidden; }
.adm-hr .ht i { display: block; height: 100%; background: var(--plum); border-radius: 5px; }
.adm-hr .hv small { color: var(--muted); }
.adm-att { display: flex; flex-direction: column; max-height: 420px; overflow: auto; margin: 0 -6px; }
.adm-ai { display: flex; align-items: center; gap: 10px; padding: 10px 6px; border-bottom: 1px solid var(--line); text-align: start; width: 100%; }
.adm-ai:hover { background: var(--sel); }
.adm-ai .adot { flex: none; width: 9px; height: 9px; border-radius: 5px; background: var(--off); }
.adm-ai.s3 .adot { background: var(--err); }
.adm-ai.s2 .adot { background: #C98A12; }
.adm-ai .chev { color: var(--muted); margin-inline-start: auto; }
.adm-allok { display: flex; align-items: center; gap: 10px; padding: 18px 4px; font-size: 14px; color: var(--ok); font-weight: 700; }
.adm-allok span { width: 28px; height: 28px; border-radius: 14px; background: #E3EDE5; display: inline-flex; align-items: center; justify-content: center; }
.adm-ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; max-width: 100%; }
.adm-funnel { display: flex; align-items: stretch; gap: 6px; flex-wrap: wrap; }
.adm-fs { flex: 1 1 110px; display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 12px; background: var(--paper); min-width: 0; }
.adm-fs .fv { font-size: 24px; font-weight: 800; }
.adm-fs .fl { font-size: 12px; color: var(--ink2); }
.adm-fs .fp { font-size: 12px; color: var(--plum); font-weight: 700; }
.adm-fa { align-self: center; color: var(--off); font-size: 18px; }
.adm-mini { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 9px 0; border-bottom: 1px solid var(--line); }
.adm-mini:hover { background: var(--sel); }
.adm-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.adm-tools .search { min-width: 240px; }
.adm-sel select { height: 44px; border: 1px solid var(--field); border-radius: 22px; background: var(--white); padding: 0 14px; font-size: 13px; }
.adm-b { height: 44px; width: auto; padding: 0 18px; font-size: 14px; border-radius: 22px; }
.adm-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.adm-chips button { height: 34px; padding: 0 12px; border-radius: 17px; border: 1px solid var(--line); background: var(--white); font-size: 13px; color: var(--ink2); }
.adm-chips button .num { color: var(--muted); font-size: 12px; }
.adm-chips button.on { background: var(--plum); border-color: var(--plum); color: var(--paper); }
.adm-chips button.on .num { color: var(--halo); }
.adm-tw { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.adm-card .adm-tw { border: 0; border-radius: 0; margin: 0 -16px; }
.adm-t { width: 100%; border-collapse: collapse; font-size: 13px; }
.adm-t th { text-align: start; font-size: 12px; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--paper); white-space: nowrap; }
.adm-t td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.adm-t tbody tr:last-child td { border-bottom: 0; }
.adm-t tbody tr[data-go] { cursor: pointer; }
.adm-t tbody tr[data-go]:hover { background: var(--sel); }
.adm-t td:first-child { max-width: 340px; }
.adm-t .nowrap { white-space: nowrap; }
.adm-co { display: flex; align-items: center; gap: 10px; min-width: 0; }
.adm-co .av { flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--sel); color: var(--plum); font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.adm-tag { display: inline-block; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 6px; background: var(--paper); border: 1px solid var(--line); color: var(--muted); vertical-align: middle; }
.adm-acts { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.adm-kvs { display: flex; flex-direction: column; }
.adm-kvs div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.adm-kvs span { color: var(--muted); }
.adm-kvs b { font-weight: 700; text-align: end; overflow-wrap: anywhere; }
.adm-br { padding: 5px 0; }
@media (max-width: 1000px) { .adm-grid { grid-template-columns: 1fr 1fr; } .adm-grid .span2 { grid-column: 1 / -1; } }
@media (max-width: 680px) {
  .adm-grid, .adm-grid.two { grid-template-columns: 1fr; }
  .adm-kpis { grid-template-columns: 1fr 1fr; gap: 8px; }
  .adm-kpi { padding: 12px; }
  .adm-kpi .ak-v { font-size: 20px; }
  .adm-kpi.hero { grid-column: 1 / -1; }
  .adm-tools .search { min-width: 0; flex-basis: 100%; }
  .adm-bar .bv { display: none; }
  .adm-link { display: none; }
  .adm-fa { display: none; }
}
/* أيقونة اختيار التاريخ والساعة أكبر وأوضح (2026-10-17) */
input[type="date"]::-webkit-calendar-picker-indicator, input[type="time"]::-webkit-calendar-picker-indicator { width: 22px; height: 22px; padding: 4px; cursor: pointer; opacity: .9; }
input[type="date"], input[type="time"] { font-size: 16px; min-height: 48px; }
.sumpick::-webkit-calendar-picker-indicator { display: none; }
/* دليل الحسابات (2026-10-18): شجرة جانبية ولوحة الحساب المفتوح؛ على الجوال اللوحة وحدها */
.coa { display: grid; grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 860px) { .coa { grid-template-columns: minmax(0, 1fr); } .coa-side { display: none; } }
/* دليل الحسابات: تظليل الأسطر بالتناوب وتمييز السطر تحت المؤشر */
.coa-row:nth-child(even){background:#f7f3f6}
.coa-row:hover{background:#efe5ec}

/* شرائح الاختيار في التقارير (2026-10-18، شكل عصري سهل) */
.fchips{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:2px 0 14px}
.fchip{display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:0 12px;border-radius:999px;border:1px solid var(--line);background:var(--paper,#fff);color:var(--ink2);font:inherit;font-size:13px;font-weight:600;max-width:100%;cursor:pointer}
.fchip span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:260px}
.fchip svg{flex:none;color:var(--muted)}
.fchip .car{opacity:.7}
.fchip.on{background:var(--sel);border-color:var(--plum);color:var(--plum)}
.fchip.on svg{color:var(--plum)}
.fchip:hover{border-color:var(--plum)}
.fnote{font-size:12px;color:var(--muted);padding:0 4px}
.pgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0 0 14px}
.pbtn{min-height:42px;border-radius:12px;border:1px solid var(--line);background:var(--paper,#fff);font:inherit;font-size:14px;font-weight:600;color:var(--ink2);cursor:pointer}
.pbtn.on{background:var(--plum);border-color:var(--plum);color:#fff}
.prow{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px;margin:0 0 10px}
.pfield{display:flex;flex-direction:column;gap:4px;font-size:12px;color:var(--muted)}
.pseg{display:flex;border:1px solid var(--line);border-radius:12px;overflow:hidden}
.pseg button{flex:1;min-height:40px;border:0;background:transparent;font:inherit;font-size:13px;font-weight:600;color:var(--ink2);cursor:pointer}
.pseg button+button{border-inline-start:1px solid var(--line)}
.pseg button.on{background:var(--plum);color:#fff}
@media (min-width:700px){.pgrid{grid-template-columns:repeat(4,minmax(0,1fr))}}
/* جدول تقرير بأعمدة كثيرة (دفتر الأستاذ): يأخذ عرض محتواه ويتمرر أفقيًا على الجوال */
.rep-table.wide{min-width:max(var(--repw,560px),100%)}

/* اختيار الشركة (2026-10-18): بطاقات واضحة بحرف أول ملوّن، والفروع أزرار */
.co-search { position: relative; margin: 4px 0 12px; }
.co-search svg { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.co-search .input { padding-inline-start: 40px; border-radius: 12px; }
.co-list { display: flex; flex-direction: column; gap: 10px; }
.co-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 1px 2px rgba(31,27,34,.04); transition: border-color .15s, box-shadow .15s; }
.co-card:hover { border-color: var(--field); box-shadow: 0 3px 10px rgba(31,27,34,.06); }
.co-card.on { border-color: var(--plum); box-shadow: 0 0 0 3px var(--halo); }
.co-card[hidden] { display: none; }
.co-top { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; min-height: 64px; text-align: start; }
.co-av { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; font-size: 18px; color: hsl(var(--h) 45% 32%); background: hsl(var(--h) 55% 93%); }
.co-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.co-name { font-size: 15.5px; font-weight: 700; color: var(--ink); line-height: 1.35; overflow-wrap: anywhere; }
.co-sub { font-size: 12.5px; color: var(--muted); }
.co-check { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--plum); color: #fff; display: grid; place-items: center; }
.co-car { flex: none; color: var(--muted); transition: transform .2s; }
.co-car.up { transform: rotate(180deg); }
.co-brs { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 14px; padding-inline-start: 68px; }
.co-br { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--field); background: #fff; font-size: 14px; font-weight: 600; color: var(--ink2); }
.co-br .mono { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.co-br.on { background: var(--plum); border-color: var(--plum); color: #fff; }
.co-br.on .mono { color: #f1dceb; }
.co-br.off { color: var(--off); border-style: dashed; cursor: not-allowed; }
.co-card.pend { background: #fbf8fa; border-style: dashed; }
.co-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; margin-top: 18px; }
.co-tool { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 14px; border-radius: 12px; background: var(--sel); color: var(--plum); font-weight: 700; font-size: 14px; text-align: start; }
.co-tool:hover { background: var(--halo); }
@media (max-width: 480px) { .co-brs { padding-inline-start: 14px; } }

/* ---------- شركات التنظيف ومكافحة الحشرات (2026-10-18) ---------- */
.cl-tag { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--field); color: var(--ink2); white-space: nowrap; }
.cl-tag.red { background: var(--err-bg); color: var(--err-ink); } .cl-tag.amber { background: var(--warn-bg); color: var(--warn-ink); } .cl-tag.green { background: #E3EDE5; color: var(--ok); } .cl-tag.plum { background: var(--sel); color: var(--plum); }
.cl-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin-bottom: 10px; }
.cl-card.warnb { border-color: var(--warn); }
.cl-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.cl-kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.cl-kv:last-child { border-bottom: 0; } .cl-kv > span { color: var(--muted); font-size: 13px; }
.cl-g2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.cl-job { display: block; width: 100%; text-align: start; background: #fff; border: 1px solid var(--line); border-inline-start: 5px solid var(--c, #5E2350); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; color: var(--ink); }
.cl-job:hover { background: var(--sel); }
.cl-sched { display: grid; gap: 10px; overflow-x: auto; padding-bottom: 8px; }
.cl-col { min-width: 210px; } .cl-colh { border-bottom: 3px solid; padding: 6px 2px; margin-bottom: 8px; }
.cl-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 6px; }
.cl-slot { border: 1px solid var(--line); border-radius: 10px; padding: 8px 4px; text-align: center; background: #fff; font: 700 15px var(--mono); color: var(--ink); cursor: pointer; }
.cl-slot small { display: block; font: 500 11px var(--sans); color: var(--muted); margin-top: 2px; }
.cl-slot.on { background: var(--plum); color: #fff; border-color: var(--plum); } .cl-slot.on small { color: #fff; }
.cl-slot.full { background: var(--stripe); color: var(--off); cursor: not-allowed; }
.cl-slot.out { border-style: dashed; border-color: var(--warn); }
.cl-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cl-ph { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; margin-top: 8px; }
.cl-ph img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: var(--field); cursor: zoom-in; display: block; }
.cl-phi { position: relative; }
.cl-phx { position: absolute; top: 4px; inset-inline-end: 4px; width: 28px; height: 28px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; font-size: 18px; line-height: 28px; text-align: center; }
.cl-sig canvas { width: 100%; height: 170px; border: 2px dashed var(--plum); border-radius: 12px; background: #fff; touch-action: none; display: block; margin-bottom: 4px; }
/* شاشة العامل: أزرار كبيرة وأرقام واضحة */
.cl-w { max-width: 560px; margin: 0 auto; }
.cl-big { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 64px; padding: 12px 16px; border-radius: 16px; font-size: 19px; font-weight: 800; background: var(--plum); color: #fff; margin-bottom: 10px; border: 2px solid var(--plum); text-decoration: none; }
.cl-big .ico { font-size: 26px; } .cl-big[disabled] { opacity: .5; }
.cl-big.ghost { background: #fff; color: var(--plum); }
.cl-big.green { background: var(--ok); border-color: var(--ok); } .cl-big.red { background: #fff; color: var(--err); border-color: var(--err); font-size: 16px; min-height: 52px; }
.cl-steps { display: flex; gap: 4px; margin: 4px 0 14px; } .cl-steps i { flex: 1; height: 7px; border-radius: 4px; background: var(--field); } .cl-steps i.on { background: var(--ok); }
.cl-wcard { display: block; width: 100%; text-align: start; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; margin-bottom: 12px; color: var(--ink); }
.cl-time { font: 800 26px var(--mono); color: var(--plum); }
.cl-units { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; font-size: 15px; } .cl-units b { font-size: 17px; }
.cl-wline { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cl-qty { font: 800 26px var(--mono); white-space: nowrap; } .cl-qty small { font: 600 13px var(--sans); color: var(--muted); }
.cl-stepper { display: flex; align-items: center; gap: 4px; } .cl-stepper button { width: 44px; height: 44px; border-radius: 12px; background: var(--sel); color: var(--plum); font-size: 24px; font-weight: 800; }
.cl-stepper input { width: 74px; height: 44px; border: 1px solid var(--line); border-radius: 10px; text-align: center; font-size: 20px; font-weight: 800; }
.cl-timer { text-align: center; font: 800 20px var(--mono); color: var(--ok); background: #E3EDE5; border-radius: 14px; padding: 14px; margin-bottom: 10px; }
.cl-safe { gap: 10px; }
.cl-stages { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; } .cl-stages span { padding: 6px 10px; border-radius: 999px; background: var(--field); font-size: 12.5px; font-weight: 700; color: var(--muted); }
.cl-stages span.done { background: #E3EDE5; color: var(--ok); } .cl-stages span.on { background: var(--plum); color: #fff; } .cl-stages span.lost { background: var(--err-bg); color: var(--err-ink); }
.cl-stars { display: flex; justify-content: center; gap: 6px; margin: 10px 0; } .cl-stars button { font-size: 38px; color: var(--field); } .cl-stars button.on { color: #E0A100; }
@media (max-width: 600px) { .cl-kv { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- المزارع والمشاريع الزراعية (2026-10-19) ---------- */
.fm-bar { height: 8px; background: var(--field); border-radius: 6px; overflow: hidden; margin: 4px 0 8px; } .fm-bar i { display: block; height: 100%; background: var(--plum); border-radius: 6px; }
.fm-bar.green i { background: var(--ok); } .fm-bar.amber i { background: var(--warn); } .fm-bar.red i { background: var(--err); }
.fm-lbl { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--ink2); margin-top: 6px; }
.fm-proj { display: block; width: 100%; text-align: start; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px; color: var(--ink); cursor: pointer; } .fm-proj:hover { background: var(--sel); }
.fm-sites { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.fm-site { display: flex; flex-direction: column; gap: 3px; text-align: start; background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--ok); border-radius: 14px; padding: 10px 12px; color: var(--ink); cursor: pointer; }
.fm-site.amber { border-top-color: var(--warn); } .fm-site.red { border-top-color: var(--err); background: var(--err-bg); }
.fm-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--warn); } .fm-dot.red { background: var(--err); }
.fm-t { width: 100%; border-collapse: collapse; font-size: 13px; } .fm-t th, .fm-t td { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: start; } .fm-t th { color: var(--muted); font-weight: 700; }
.fm-tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 10px; padding-bottom: 2px; } .fm-tabs button { white-space: nowrap; padding: 8px 12px; border-radius: 999px; background: var(--field); font-weight: 700; font-size: 13px; color: var(--ink2); } .fm-tabs button.on { background: var(--plum); color: #fff; }
.fm-row { display: flex; gap: 8px; align-items: stretch; margin-bottom: 8px; }
.fm-chk { width: 30px; min-width: 30px; border: 2px solid var(--line); border-radius: 8px; background: #fff; } .fm-chk.on { background: var(--plum); border-color: var(--plum); }
.f22 { font-size: 22px; }

/* العبارة الوطنية أعلى الفاتورة المبسطة والإيصال (2026-10-18) */
.r80 .r-ban { display: flex; flex-direction: column; align-items: center; gap: calc(2 * var(--u) * var(--ts, 1)); padding: calc(4 * var(--u)) 0 calc(6 * var(--u)); text-align: center; }
.r80 .r-ban b { font-family: var(--banf, 'Aref Ruqaa'), var(--sans); font-size: calc(25 * var(--u) * var(--ts, 1)); font-weight: 700; line-height: 1.6; }
.r80 .r-ban p { margin: 0; font-family: var(--banf, 'Aref Ruqaa'), var(--sans); font-size: calc(16 * var(--u) * var(--ts, 1)); font-weight: 700; line-height: 1.7; }
.r80 .r-ban span { font-size: calc(11 * var(--u) * var(--ts, 1)); }
.a4-ban { text-align: center; padding: 0 0 10px; margin: 0 0 10px; border-bottom: 1px dashed #bbb; }
.a4-ban b { display: block; font-family: var(--banf, 'Aref Ruqaa'), var(--sans); font-size: 22px; font-weight: 700; }
.a4-ban p { margin: 2px 0; font-family: var(--banf, 'Aref Ruqaa'), var(--sans); font-size: 15px; font-weight: 700; }
.a4-ban span { font-size: 11px; color: #555; }
/* شجرة مهام المزارع والملاحظات (2026-10-19) */
.fm-node { display: flex; gap: 4px; align-items: flex-start; } .fm-tog { width: 26px; min-width: 26px; height: 30px; margin-top: 8px; border-radius: 8px; color: var(--plum); font-size: 15px; font-weight: 800; } button.fm-tog:hover { background: var(--sel); }
.fm-kids { border-inline-start: 2px dashed var(--line); margin: 4px 0 6px; padding-inline-start: 8px; }
.fm-crumbs { font-size: 12.5px; margin-bottom: 2px; } .fm-crumbs a { color: var(--plum); font-weight: 700; }
.fm-note { border-top: 1px solid var(--line); padding: 8px 0; } .fm-noteadd { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; }
/* طريقة العمل في مهام المزارع (2026-10-19) */
.fm-guide summary { cursor: pointer; font-size: 15px; } .fm-steps { margin: 8px 0 4px; padding-inline-start: 22px; } .fm-steps li { margin: 6px 0; font-size: 15px; line-height: 1.6; }
.fm-safe { background: var(--warn-bg); color: var(--warn-ink); border-radius: 12px; padding: 8px 12px; margin-top: 8px; } .fm-safe ul { margin: 4px 0 0; padding-inline-start: 20px; } .fm-safe li { margin: 3px 0; }

/* محادثة الدعم في نفس الصفحة (supchat.js) */
.sup-fab { border: 0; cursor: pointer; }
.sc-box { position: fixed; z-index: 60; inset-inline-end: 16px; bottom: calc(146px + var(--safe-b)); width: min(390px, calc(100vw - 32px)); height: min(580px, calc(100dvh - 180px)); background: var(--paper, #fff); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 18px 50px rgba(31, 27, 34, .22); display: flex; flex-direction: column; overflow: hidden; }
.sc-box[hidden] { display: none; }
@media (min-width: 960px) { .sc-box { bottom: 88px; } }
@media (max-width: 520px) { .sc-box { inset-inline: 8px; width: auto; bottom: calc(142px + var(--safe-b)); height: calc(100dvh - 170px); } }
.sc-head { display: flex; align-items: center; gap: 6px; padding: 12px 14px; background: var(--plum); color: var(--paper); }
.sc-head > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sc-head b { font-size: 15px; }
.sc-head small { font-size: 11.5px; opacity: .85; }
.sc-ic { border: 0; background: transparent; color: inherit; font-size: 20px; width: 34px; height: 34px; border-radius: 10px; cursor: pointer; display: grid; place-items: center; }
.sc-ic:hover { background: rgba(255, 255, 255, .14); }
.sc-form .sc-ic { color: var(--ink2, #555); font-size: 18px; }
.sc-form .sc-ic:hover { background: var(--line); }
.sc-log { flex: 1; overflow-y: auto; padding: 12px; background: var(--bg, #f6f4f1); }
.sc-log .sup-msg { max-width: 88%; font-size: 13.5px; }
.sc-sug { display: flex; flex-wrap: wrap; gap: 6px; }
.sc-sug button { border: 1px solid var(--plum); color: var(--plum); background: var(--paper, #fff); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.sc-note { font-size: 12.5px; line-height: 1.7; padding: 10px 12px; border-radius: 12px; background: var(--info-bg, #eef3fb); }
.sc-note.err { background: var(--err-bg, #fde8e8); color: var(--err, #b42318); }
.sc-acts { display: flex; gap: 6px; padding: 6px 10px 0; flex-wrap: wrap; border-top: 1px solid var(--line); }
.sc-acts button { border: 0; background: transparent; color: var(--plum); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; padding: 4px 6px; }
.sc-thumb { display: flex; align-items: center; gap: 8px; padding: 6px 12px 0; }
.sc-thumb img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }
.sc-form { display: flex; align-items: flex-end; gap: 6px; padding: 10px; }
.sc-form textarea { flex: 1; resize: none; min-height: 40px; max-height: 120px; border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; font: inherit; font-size: 14px; background: var(--paper, #fff); color: inherit; }
.sc-send { border: 0; background: var(--plum); color: var(--paper); border-radius: 12px; padding: 0 16px; height: 40px; font: inherit; font-weight: 700; cursor: pointer; }
.sc-send:disabled, .sc-form textarea:disabled { opacity: .55; }
.sc-tease { position: fixed; z-index: 26; inset-inline-end: 78px; bottom: calc(92px + var(--safe-b)); max-width: min(270px, calc(100vw - 110px)); background: var(--paper, #fff); border: 1px solid var(--line); border-radius: 16px; border-end-end-radius: 4px; box-shadow: 0 10px 28px rgba(31, 27, 34, .18); padding: 12px 14px; font-size: 13px; line-height: 1.6; cursor: pointer; display: flex; flex-direction: column; gap: 2px; animation: scIn .3s ease-out; }
.sc-tease b { font-size: 14px; }
.sc-tx { position: absolute; top: 4px; inset-inline-start: 6px; border: 0; background: transparent; font-size: 16px; color: var(--muted); cursor: pointer; }
@media (min-width: 960px) { .sc-tease { bottom: 32px; } }
@keyframes scIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .sc-tease { animation: none; } }
/* الشاشة فيها زر عائم رئيسي (.fab): زر الدعم ونافذته ورسالته تطلع فوقه بدل ما تغطيه */
.shell:has(.fab, .screen > .actions) .sup-fab { bottom: calc(150px + var(--safe-b)); }
body:has(.shell .fab, .shell .screen > .actions) .sc-tease { bottom: calc(158px + var(--safe-b)); }
body:has(.shell .fab, .shell .screen > .actions) .sc-box { bottom: calc(212px + var(--safe-b)); height: min(560px, calc(100dvh - 240px)); }
@media (min-width: 960px) { .shell:has(.fab, .screen > .actions) .sup-fab { bottom: 96px; } body:has(.shell .fab, .shell .screen > .actions) .sc-tease { bottom: 104px; } body:has(.shell .fab, .shell .screen > .actions) .sc-box { bottom: 160px; height: min(560px, calc(100dvh - 190px)); } }

/* معاينة فاتورة الشراء وغيرها: نافذة أعرض على الشاشات الكبيرة (2026-10-20) */
@media (min-width: 760px) { .sheet.wide { width: min(900px, calc(100vw - 48px)); } }
/* إدارة الفواتير مثل دفترة (2026-10-20): صف لكل فاتورة بلون حالة دفعها، ومؤشرات الفترة قابلة للضغط */
.inv-kpi { text-align: start; cursor: pointer; font: inherit; color: inherit; }
.inv-kpi:hover { border-color: var(--plum); }
.dk-kpi.warn > b { color: var(--warn); }
.inv-list { display: flex; flex-direction: column; gap: 8px; }
.inv-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: start; background: #fff; border: 1px solid var(--line); border-inline-start: 5px solid var(--line); border-radius: 12px; padding: 11px 14px; cursor: pointer; font: inherit; color: inherit; }
.inv-row:hover { background: var(--sel); }
.inv-row.ok { border-inline-start-color: var(--ok); } .inv-row.warn { border-inline-start-color: #D08A00; } .inv-row.bad { border-inline-start-color: var(--err); } .inv-row.draft { border-inline-start-color: var(--plum); border-style: dashed; border-inline-start-style: solid; }
.ir-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.ir-top { font-size: 12px; color: var(--muted); }
.ir-name { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ir-sub { font-size: 12px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ir-amt { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: none; }
.ir-amt > b { font-size: 16px; font-weight: 800; }
.ir-chip { font-size: 11.5px; font-weight: 700; padding: 2px 10px; border-radius: 10px; background: #EEE9EC; color: var(--ink2); }
.ir-chip.ok { background: #E3EFE6; color: var(--ok); } .ir-chip.warn { background: var(--warn-bg); color: var(--warn-ink); } .ir-chip.bad { background: var(--err-bg); color: var(--err-ink); } .ir-chip.draft { background: var(--sel); color: var(--plum); }
.ir-due { font-size: 12px; color: var(--err-ink); }
@media (max-width: 520px) { .inv-row { padding: 10px 11px; } .ir-name { font-size: 14px; } .ir-amt > b { font-size: 15px; } }
.inv-kpi > b { font-size: 21px; }

/* صف القيد في القائمة (2026-10-21): ثلاثة أعمدة على الشاشة الواسعة، وعمود واحد على الجوال */
.je-row:hover { background: var(--sel); border-radius: 8px; }
@media (max-width: 720px) { .je-row { grid-template-columns: 1fr !important; gap: 6px !important; } .je-row > span:last-child { text-align: start !important; } }

/* البطاقة العامة (2026-10-21، «خل شكل الصفحات أنيق»): كانت مستعملة في الشاشات بلا تعريف فتظهر مسطحة */
.card { background: var(--white); border: 1px solid var(--line); border-radius: 12px; }
button.card:hover { border-color: var(--thread); background: var(--sel); }

/* إدارة العملاء والقوالب (2026-10-21): عمودان على الشاشة الكبيرة وعمود واحد على الجوال */
@media (max-width: 760px) { .crm-grid, .tpl-grid { grid-template-columns: 1fr !important; } .crm-grid > .card:first-child { position: static !important; max-height: 50vh !important; } }
/* شاشة المطبخ الجديدة (pos2، تجربة سعد) */
.content.k2 { max-width: none; }
.k2-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.k2-f { height: 40px; padding: 0 14px; border-radius: 20px; border: 1px solid var(--line); background: var(--white); font-size: 14px; font-weight: 800; display: inline-flex; align-items: center; gap: 8px; color: var(--ink2); }
.k2-f b { min-width: 24px; height: 24px; border-radius: 12px; background: var(--sel); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; padding: 0 6px; }
.k2-f.on { background: var(--ink); border-color: var(--ink); color: var(--paper); } .k2-f.on b { background: var(--paper); color: var(--ink); }
.k2-f.late b { background: var(--err-bg); color: var(--err); }
.k2-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; align-items: start; }
.k2-card { border-radius: 16px; background: var(--white); border: 2px solid var(--line); overflow: hidden; display: flex; flex-direction: column; cursor: pointer; }
.k2-card.sel { box-shadow: 0 0 0 3px var(--plum); }
.k2-card header { display: flex; align-items: center; gap: 10px; padding: 10px 12px; color: #fff; flex-wrap: wrap; }
.k2-card header b { font-size: 22px; font-weight: 800; }
.k2-card header .k2-t { background: rgba(0,0,0,.28); border-radius: 8px; padding: 2px 8px; font-size: 15px; font-weight: 700; }
.k2-card header em { font-style: normal; font-size: 13px; font-weight: 700; margin-inline-start: auto; }
.k2-card.new header { background: #D9782B; } .k2-card.cook header { background: #2F5DA8; } .k2-card.ready header { background: #2F7D45; }
.k2-card.late { border-color: var(--err); animation: k2late 1.6s ease-in-out infinite; } .k2-card.late header { background: var(--err); }
@keyframes k2late { 50% { box-shadow: 0 0 0 4px var(--err-bg); } }
.k2-meta { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px 0; font-size: 12px; color: var(--muted); }
.k2-meta span { background: var(--paper); border-radius: 8px; padding: 2px 8px; }
.k2-meta .k2-type { color: var(--ink); font-weight: 800; } .k2-meta .k2-type.app { background: #FFE8D2; color: #8A3B00; }
.k2-meta .k2-arr { background: #E3EDE5; color: var(--ok); font-weight: 800; }
.k2-items { list-style: none; margin: 0; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.k2-items li { font-size: 16px; font-weight: 700; line-height: 1.5; } .k2-items li b { font-weight: 900; margin-inline-end: 4px; }
.k2-items li small { display: block; color: #B4531A; font-size: 13px; font-weight: 800; padding-inline-start: 24px; }
.k2-note { margin: 0 12px 8px; padding: 6px 10px; border-radius: 10px; background: #FFF3E3; color: #8A3B00; font-size: 14px; font-weight: 800; }
.k2-card footer { display: flex; gap: 6px; padding: 0 12px 12px; margin-top: auto; }
.k2-go { flex: 1; height: 48px; border-radius: 12px; background: var(--ink); color: var(--paper); font-size: 15px; font-weight: 800; }
.k2-card.new .k2-go { background: #2F5DA8; } .k2-card.cook .k2-go { background: #2F7D45; }
.k2-back { width: 48px; height: 48px; border-radius: 12px; border: 1px solid var(--line); font-size: 20px; color: var(--muted); }
.k2-keys { display: flex; gap: 18px; justify-content: center; color: var(--muted); font-size: 12px; margin-top: 18px; }
.k2-keys kbd { font: 600 11px var(--mono); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; background: var(--white); margin-inline-end: 3px; }
@media (hover: none) { .k2-keys { display: none; } }
.upsell.p2-up { border: 0; background: #F7F3F6; padding: 6px 8px; gap: 6px; margin: 8px 0 0; }
.upsell.p2-up > span { font-size: 12px; }
.upsell.p2-up button { min-height: 28px; padding: 0 10px; border-radius: 14px; background: var(--white); color: var(--plum); font-size: 12px; box-shadow: 0 1px 2px rgba(31,27,34,.08); }
@media (max-width: 1000px) { .p2-order { width: 300px; } .p2-grid { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); } }

/* نقطة بيع المطاعم والكوفي — التصميم الثالث (p3): شبكة 8 نقاط، لون علامة واحد، حدود هادئة بلا ظلال ثقيلة */
.p3 { background: #F5F5F7; }
.p3 .pos-top { background: var(--white); border-bottom: 1px solid #E8E6EB; height: 52px; padding: 0 16px; }
.p3-body { flex: 1; display: flex; min-height: 0; }
.p3-rail { width: 104px; flex: none; overflow-y: auto; background: var(--white); border-right: 1px solid #E8E6EB; padding: 8px; display: flex; flex-direction: column; gap: 4px; scrollbar-width: none; }
.p3-rail::-webkit-scrollbar { display: none; }
.p3-cat { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; border-radius: 14px; min-height: 88px; text-align: center; color: #4A464E; }
.p3-cat-i { width: 48px; height: 48px; border-radius: 14px; background: #F1EFF3 center / cover no-repeat; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; color: var(--plum); }
.p3-cat-n { font-size: 12px; font-weight: 700; line-height: 1.35; }
.p3-cat:hover { background: #F7F5F8; }
.p3-cat.on { background: var(--sel); color: var(--plum); }
.p3-cat.on .p3-cat-i { box-shadow: 0 0 0 2px var(--plum); }
.p3-menu { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; padding: 16px 16px 0; gap: 12px; }
.p3-head { display: flex; gap: 8px; flex: none; }
.p3-search { flex: 1; height: 48px; display: flex; align-items: center; gap: 8px; padding: 0 14px; background: var(--white); border: 1px solid #E8E6EB; border-radius: 14px; position: relative; }
.p3-search:focus-within { border-color: var(--plum); box-shadow: 0 0 0 3px var(--halo); }
.p3-search input { flex: 1; border: 0; outline: 0; background: transparent; font: inherit; font-size: 15px; min-width: 0; height: 100%; }
.p3-search kbd { font: 600 11px var(--mono); color: var(--muted); border: 1px solid #E8E6EB; border-radius: 6px; padding: 1px 7px; }
.p3-search .clear { font-size: 20px; color: var(--muted); width: 32px; height: 32px; }
.p3-ic { width: 48px; height: 48px; flex: none; border-radius: 14px; background: var(--white); border: 1px solid #E8E6EB; font-size: 18px; display: inline-flex; align-items: center; justify-content: center; }
.p3-ic:hover { border-color: var(--plum); }
.p3-title { display: flex; align-items: baseline; gap: 10px; flex: none; }
.p3-title h2 { font-size: 20px; font-weight: 800; margin: 0; }
.p3-title span { font-size: 13px; color: var(--muted); }
.p3-subs { display: flex; gap: 8px; overflow-x: auto; flex: none; scrollbar-width: none; margin-top: -4px; }
.p3-subs button { height: 36px; padding: 0 16px; border-radius: 18px; background: var(--white); border: 1px solid #E8E6EB; font-size: 13px; font-weight: 700; color: #4A464E; white-space: nowrap; }
.p3-subs button.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.p3-scroll { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 16px; scrollbar-width: thin; }
.p3-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.p3-tile { background: var(--white); border: 1px solid #E8E6EB; border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; text-align: start; position: relative; min-width: 0; transition: transform .08s ease, border-color .12s ease; }
.p3-tile:hover { border-color: #CFCAD3; }
.p3-tile:active { transform: scale(.97); }
.p3-tile.on { border-color: var(--plum); box-shadow: 0 0 0 1px var(--plum); }
.p3-tile.off { opacity: .5; }
.p3-img { aspect-ratio: 16 / 11; background: #F1EFF3 center / cover no-repeat; position: relative; display: flex; align-items: center; justify-content: center; }
.p3-img i { font-style: normal; font-size: 30px; font-weight: 800; color: #CDBFCA; }
.p3-img b { position: absolute; top: 8px; inset-inline-end: 8px; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 14px; background: var(--plum); color: var(--paper); font: 700 14px var(--mono); display: flex; align-items: center; justify-content: center; }
.p3-img em { position: absolute; bottom: 8px; inset-inline-start: 8px; font-style: normal; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 8px; background: rgba(31,27,34,.82); color: #fff; }
.p3-img em.hot { background: #FFF4E5; color: #A04B00; top: 8px; bottom: auto; }
.p3-nm { padding: 10px 12px 0; font-size: 14px; font-weight: 700; line-height: 1.45; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: calc(14px * 1.45 * 2 + 10px); }
.p3-nm .nm2 { display: block; font-size: 11px; font-weight: 400; color: var(--muted); }
.p3-pr { padding: 6px 12px 12px; font: 700 15px var(--mono); color: var(--ink); display: flex; align-items: baseline; gap: 6px; }
.p3-pr s { font-weight: 400; font-size: 12px; color: var(--muted); }
.p3-order { width: 380px; flex: none; background: var(--white); border-left: 1px solid #E8E6EB; display: flex; flex-direction: column; min-height: 0; }
.p3-oh { padding: 16px 16px 12px; border-bottom: 1px solid #F0EEF2; flex: none; }
.p3-pre { font-size: 12px; font-weight: 800; color: var(--plum); background: var(--sel); border-radius: 10px; padding: 6px 10px; margin-bottom: 10px; }
.p3-otitle { display: flex; justify-content: space-between; align-items: baseline; }
.p3-otitle h2 { font-size: 20px; font-weight: 800; margin: 0; }
.p3-otitle > span { font-size: 13px; color: var(--muted); }
.p3-seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; background: #F1EFF3; border-radius: 14px; padding: 4px; margin-top: 12px; }
.p3-seg button { height: 40px; border-radius: 10px; font-size: 13px; font-weight: 800; color: #4A464E; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 4px; }
.p3-seg button.on { background: var(--white); color: var(--plum); box-shadow: 0 1px 3px rgba(31,27,34,.12); }
.p3-ctx { display: flex; gap: 8px; margin-top: 10px; min-height: 40px; align-items: center; }
.p3-ctx button { flex: 1; height: 40px; border-radius: 12px; border: 1px solid #E8E6EB; font-size: 13px; font-weight: 700; color: #4A464E; }
.p3-ctx button.need { border-color: var(--warn); background: var(--warn-bg); color: var(--warn-ink); }
.p3-ctx > span { font-size: 12px; color: var(--muted); }
.p3-lines { flex: 1; min-height: 0; overflow-y: auto; padding: 0 16px; }
.p3-line { display: grid; grid-template-columns: 1fr auto 72px; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid #F0EEF2; }
.p3-ln { text-align: start; min-width: 0; }
.p3-ln b { display: block; font-size: 14px; font-weight: 700; line-height: 1.45; }
.p3-ln small { display: block; font-size: 12px; color: var(--plum); margin-top: 2px; }
.p3-step { display: flex; align-items: center; border: 1px solid #E8E6EB; border-radius: 12px; height: 40px; }
.p3-step button { width: 40px; height: 38px; font-size: 18px; font-weight: 700; color: var(--plum); }
.p3-step span { min-width: 24px; text-align: center; font-weight: 700; font-size: 15px; }
.p3-lt { text-align: end; font-weight: 700; font-size: 15px; }
.p3-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 48px 0 24px; text-align: center; }
.p3-empty b { font-size: 16px; } .p3-empty span { font-size: 13px; color: var(--muted); }
.p3-up { padding: 14px 0 16px; }
.p3-up-h { font-size: 12px; font-weight: 800; color: var(--muted); margin-bottom: 8px; }
.p3-up-row { display: flex; flex-direction: column; gap: 6px; }
.p3-up-row button { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 14px; border: 1px dashed #D9CFD7; text-align: start; }
.p3-up-row button:hover { border-style: solid; border-color: var(--plum); background: #FBF8FA; }
.p3-up-i { width: 44px; height: 44px; border-radius: 10px; background: #F1EFF3 center / cover no-repeat; flex: none; }
.p3-up-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.p3-up-t b { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p3-up-t span { font-size: 12px; color: var(--muted); }
.p3-up-p { width: 32px; height: 32px; border-radius: 10px; background: var(--plum); color: var(--paper); font-size: 20px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; }
.p3-foot { padding: 12px 16px 16px; border-top: 1px solid #F0EEF2; flex: none; display: flex; flex-direction: column; gap: 6px; }
.p3-note { text-align: start; font-size: 13px; color: #4A464E; background: #FFF8E8; border-radius: 10px; padding: 6px 10px; }
.p3-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.p3-pay { margin-top: 6px; height: 64px; border-radius: 16px; background: var(--plum); color: var(--paper); display: flex; align-items: center; justify-content: space-between; padding: 0 20px; font-size: 16px; font-weight: 800; }
.p3-pay b { font-size: 24px; }
.p3-pay:disabled { background: #E9E6EB; color: #9C97A0; }
.p3-acts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.p3-acts button { height: 40px; border-radius: 12px; font-size: 13px; font-weight: 700; color: #4A464E; background: #F5F4F6; }
.p3-acts button:disabled { opacity: .45; }
.p3-bar { flex: none; display: flex; gap: 8px; padding: 8px 16px calc(8px + var(--safe-b, 0px)); background: var(--white); border-top: 1px solid #E8E6EB; }
.p3-bar button { flex: 1; height: 48px; border-radius: 14px; font-size: 14px; font-weight: 700; color: #4A464E; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.p3-bar button:hover { background: #F5F4F6; }
.p3-bar button > span { font-size: 16px; }
.p3-bar button b { min-width: 22px; height: 22px; border-radius: 11px; background: var(--plum); color: var(--paper); font: 700 12px var(--mono); display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; }
.p3-bar button.hot { background: var(--sel); color: var(--plum); }
@media (max-width: 1100px) { .p3-order { width: 330px; } .p3-grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); } .p3-rail { width: 92px; } }
@media (max-width: 900px) { .p3-order { width: 300px; } .p3-bar button { font-size: 12px; } }

/* ---------- صندوق المحادثات (2026-10-23، طلب المستخدم «مرتب وأنيق»): قائمة + محادثة على طريقة واتساب ويب ---------- */
.ib-page { max-width: 1240px; width: 100%; margin: 0 auto; }
.ib-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ib-bar .tabs { padding: 0; border-bottom: 0; }
.ib-search { flex: 1; min-width: 180px; max-width: 320px; min-height: 40px; border-radius: 20px; padding: 0 16px; }
.ib-sync { font-size: 12px; color: var(--muted); margin-top: 6px; }
.ib { display: grid; grid-template-columns: 340px 1fr; height: calc(100dvh - 210px); min-height: 520px; margin-top: 10px; background: var(--white); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.ib-list { border-inline-end: 1px solid var(--line); overflow-y: auto; min-height: 0; }
.ib-row { display: flex; gap: 12px; align-items: center; width: 100%; padding: 12px 14px; border-bottom: 1px solid #F1EDF0; text-align: start; transition: background .12s; }
.ib-row:hover { background: #FAF7F9; }
.ib-row.on { background: var(--sel); }
.ib-row-m { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.ib-row-1 { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.ib-row-n { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-row-t { font-size: 12px; color: var(--muted); flex: none; }
.ib-row.wait .ib-row-t { color: var(--ok); font-weight: 700; }
.ib-row-2 { font-size: 13px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-row-3 { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); min-width: 0; }
.ib-row-3 .sup-chip { font-size: 11px; padding: 2px 8px; }
.ib-ch { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-dot { width: 9px; height: 9px; border-radius: 50%; background: #25A55F; margin-inline-start: auto; flex: none; }
.ib-av { flex: none; width: 42px; height: 42px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 17px; }
.ib-av.big { width: 46px; height: 46px; font-size: 19px; }
.ib-chat { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.ib-head { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--white); }
.ib-head-m { min-width: 0; flex: 1; }
.ib-head-n { font-weight: 800; font-size: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ib-head-s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.ib-head-a { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.ib-hbtn { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border-radius: 17px; border: 1px solid var(--line); background: var(--white); font-size: 13px; color: var(--ink2); white-space: nowrap; }
.ib-hbtn:hover { border-color: var(--plum); color: var(--plum); }
.ib-hbtn.ico { width: 34px; padding: 0; justify-content: center; font-size: 16px; }
.ib-back { display: none; width: 34px; height: 34px; border-radius: 50%; font-size: 18px; color: var(--ink2); }
.ib-chat-in { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.ib-msgs { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 18px; display: flex; flex-direction: column; gap: 4px; background: #F4F0EC; }
.ib-day { align-self: center; margin: 10px 0 6px; }
.ib-day span { display: inline-block; font-size: 12px; color: var(--ink2); background: var(--white); border-radius: 8px; padding: 4px 12px; box-shadow: 0 1px 1px rgba(0,0,0,.06); }
.ib-m { max-width: min(78%, 560px); padding: 7px 11px 5px; border-radius: 12px; box-shadow: 0 1px 1px rgba(0,0,0,.07); overflow-wrap: anywhere; margin-top: 2px; }
.ib-m.in { align-self: flex-start; background: var(--white); border-start-start-radius: 4px; }
.ib-m.out { align-self: flex-end; background: #DFF4E2; border-start-end-radius: 4px; }
.ib-m.bot { align-self: flex-end; background: #ECE8EE; color: var(--ink2); border-start-end-radius: 4px; }
.ib-who { font-size: 12px; font-weight: 700; color: var(--plum); margin-bottom: 2px; }
.ib-m.bot .ib-who { color: var(--muted); }
.ib-body { font-size: 14.5px; line-height: 1.75; }
.ib-time { font-size: 11px; color: var(--muted); text-align: end; margin-top: 2px; }
.ib-note { align-self: center; width: min(88%, 620px); background: #FFF6DE; border: 1px dashed #E2C77E; border-radius: 12px; padding: 8px 12px; margin: 6px 0; }
.ib-note-h { font-size: 12px; font-weight: 700; color: var(--warn-ink); }
.ib-att { display: block; margin-top: 4px; }
.ib-att.wait { font-size: 12px; color: var(--muted); }
.ib-img { display: block; max-width: 280px; max-height: 340px; width: auto; border-radius: 8px; }
.ib-aud { width: 270px; max-width: 100%; height: 40px; }
.ib-empty { padding: 30px 16px; text-align: center; color: var(--muted); font-size: 13px; }
.ib-foot { border-top: 1px solid var(--line); background: #FBFAF9; padding: 8px 12px 10px; display: flex; flex-direction: column; gap: 6px; }
.ib-wait { font-size: 12px; font-weight: 700; color: var(--warn-ink); background: var(--warn-bg); border-radius: 8px; padding: 5px 10px; align-self: flex-start; }
.ib-via { font-size: 12px; color: var(--muted); }
.ib-mode { display: inline-flex; align-self: flex-start; background: #EFEAEE; border-radius: 18px; padding: 3px; gap: 2px; }
.ib-mode button { height: 30px; padding: 0 14px; border-radius: 15px; font-size: 13px; color: var(--ink2); }
.ib-mode button.on { background: var(--white); color: var(--plum); font-weight: 700; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.ib-compose { display: flex; align-items: flex-end; gap: 8px; background: var(--white); border: 1px solid var(--line); border-radius: 24px; padding: 5px 6px; }
.ib-compose.note { background: #FFFBF0; border-color: #E9D6A0; }
.ib-compose.rec { align-items: center; padding: 6px 10px; }
.ib-input { flex: 1; border: 0; outline: 0; resize: none; background: transparent; font-size: 15px; line-height: 1.6; padding: 7px 4px; min-height: 38px; max-height: 140px; field-sizing: content; }
.ib-tools { display: flex; gap: 2px; flex: none; }
.ib-tool { width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); cursor: pointer; }
.ib-tool:hover { background: var(--sel); color: var(--plum); }
.ib-tool.off { opacity: .4; pointer-events: none; }
.ib-send { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--plum); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.ib-send svg { transform: scaleX(-1); }
.ib-send:disabled { opacity: .5; }
.ib-txtbtn { height: 34px; padding: 0 12px; border-radius: 17px; color: var(--ink2); font-size: 13px; }
.ib-recdot { width: 10px; height: 10px; border-radius: 50%; background: #D33; animation: ibpulse 1s infinite; }
.ib-rect { font-size: 14px; font-weight: 700; color: #B22; }
@keyframes ibpulse { 50% { opacity: .3; } }
.ib-status { font-size: 12px; color: var(--muted); }
.ib-late { font-size: 13px; color: var(--ink2); background: var(--warn-bg); border-radius: 10px; padding: 8px 12px; line-height: 1.7; }
.ib-pick { margin: auto; text-align: center; color: var(--ink2); padding: 30px; }
.ib-pick-i { font-size: 42px; margin-bottom: 8px; opacity: .6; }
/* المحادثة داخل صفحة العميل وصفحة العميل المحتمل */
.ib-chat-in.embed { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--white); }
.ib-chat-in.embed .ib-msgs { max-height: 440px; }
/* الجوال: القائمة أو المحادثة، ورجوع للقائمة */
@media (max-width: 820px) {
  .ib { grid-template-columns: 1fr; height: calc(100dvh - 230px); border-radius: 12px; }
  .ib.has-chat .ib-list { display: none; }
  .ib:not(.has-chat) .ib-chat { display: none; }
  .ib-back { display: inline-flex; align-items: center; justify-content: center; }
  .ib-head { padding: 8px 10px; gap: 8px; }
  .ib-head-a .ib-hbtn:not(.ico):not(.tel) { display: none; }
  .ib-head-a .ib-hbtn.tel { width: 34px; padding: 0; justify-content: center; } .ib-hbtn.tel .t { display: none; }
  .ib-m { max-width: 88%; }
  .ib-img { max-width: 220px; }
  .ib-search { max-width: none; }
}
/* زر الدعم العائم أسفل اليسار: لا يغطي زر الإرسال */
.ib-page .ib-foot { padding-inline-end: 72px; }
@media (max-width: 820px) {
  .ib-page .ib-foot { padding-inline-end: 12px; }
  .ib-page.has-chat .ib-bar, .ib-page.has-chat .ib-sync { display: none; }
  .ib-page.has-chat .ib { height: calc(100dvh - var(--tab-h) - var(--safe-b) - 112px); min-height: 380px; margin-top: 0; }
  .ib-page:not(.has-chat) .ib { height: calc(100dvh - var(--tab-h) - var(--safe-b) - 220px); min-height: 360px; }
  body:has(.ib-page.has-chat) .sup-fab { display: none; }
  .ib-compose .ib-tool { width: 34px; height: 34px; }
}

/* الكول سنتر (2026-10-23): بطاقات المكالمات في الخط الزمني، وصفحة الأداء */
.ib-call { align-self: center; display: inline-flex; align-items: center; gap: 8px; max-width: 92%; font-size: 12.5px; color: var(--ink2); background: #EEF4F1; border: 1px solid #D5E5DC; border-radius: 16px; padding: 5px 12px; margin: 4px 0; }
.ib-call.miss { background: #FCEDEE; border-color: #F1CDD1; color: #8E1D2B; font-weight: 700; }
.ib-call.muted { background: #F1EFF0; border-color: var(--line); color: var(--muted); }
.ib-call-i { font-size: 14px; }
.ib-call-t { font-size: 11px; color: var(--muted); font-weight: 400; }
.ib-wait.miss { color: #8E1D2B; background: #FCEDEE; }
.ib-dot.miss { background: #C8323F; }
.cc-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.cc-k { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; border-top: 3px solid var(--line); }
.cc-k.ok { border-top-color: #25A55F; } .cc-k.warn { border-top-color: #D99A1E; } .cc-k.bad { border-top-color: #C8323F; }
.cc-k-l { font-size: 12px; color: var(--muted); }
.cc-k-v { font-size: 24px; font-weight: 800; margin-top: 2px; }
.cc-k-s { font-size: 12px; color: var(--muted); }
.cc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cc-grid .ops-box { margin: 0; min-width: 0; }
.cc-miss { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.cc-miss:last-child { border-bottom: 0; }
.cc-tab { width: 100%; }
.cc-hours { display: flex; gap: 4px; align-items: flex-end; height: 140px; overflow-x: auto; }
.cc-h { flex: 1; min-width: 18px; display: flex; flex-direction: column; align-items: center; height: 100%; }
.cc-h-bar { flex: 1; width: 100%; display: flex; align-items: flex-end; }
.cc-h-bar span { width: 100%; background: #CFE3D8; border-radius: 4px 4px 0 0; display: flex; align-items: flex-end; overflow: hidden; }
.cc-h-bar i { display: block; width: 100%; background: #C8323F; }
.cc-h-n { font-size: 11px; color: var(--muted); margin-top: 3px; }
@media (max-width: 820px) { .cc-grid { grid-template-columns: 1fr; } .cc-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* توزيع المحادثات (2026-10-23) */
.ib-asg { font-size: 11px; color: var(--ink2); background: #EEF1F6; border-radius: 10px; padding: 1px 8px; white-space: nowrap; }
.ib-asg.none { color: #8A5A00; background: #FFF3DA; }
.ib-agent { max-width: 170px; height: 36px; }
.as-modes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 8px; }
.as-mode { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; background: var(--white); }
.as-mode.on { border-color: var(--plum); box-shadow: 0 0 0 1px var(--plum) inset; }
.as-mode input { display: none; }
.as-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; }
.as-chk { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.as-denied td { background: #FCEDEE; }
@media (max-width: 820px) { .as-modes { grid-template-columns: 1fr; } }
.ib-hbtn.on { border-color: var(--plum); color: var(--plum); font-weight: 700; }
.ib-geo { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #F4F8F5; color: var(--ink); text-decoration: none; min-width: 210px; }
.ib-geo span { display: flex; flex-direction: column; }
.ib-geo-i { font-size: 26px; }
/* حساب الأستاذ للعميل والمورد (2026-10-24) */
.pl-bal { text-align: end; font-size: 18px; }
.pl-tab td { vertical-align: top; }
.pl-open td { background: var(--paper); }

/* ---------- المعارض والمؤتمرات (2026-10-25) ---------- */
.ev-box { display: block; width: 100%; text-align: start; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin-bottom: 10px; color: var(--ink); }
.ev-box.warnb { border-color: var(--warn); }
a.ev-box, button.ev-box { cursor: pointer; text-decoration: none; } a.ev-box:hover, button.ev-box:hover { background: var(--sel); }
.ev-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.ev-kpis .dk-kpi > b { font-size: 22px; }
.ev-mini { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 10px 0 4px; }
.ev-mini > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ev-bar { height: 6px; background: var(--field); border-radius: 99px; overflow: hidden; margin: 4px 0; }
.ev-bar i { display: block; height: 100%; background: var(--plum); } .ev-bar.g i { background: var(--ok); }
.ev-dot { display: inline-block; width: 11px; height: 11px; border-radius: 3px; vertical-align: middle; border: 1px solid var(--line); }
.ev-dot.free { background: #EEF6F0; } .ev-dot.hold { background: var(--warn-bg); } .ev-dot.sold { background: var(--plum); }
.ev-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
.ev-booth { border: 1px solid var(--line); border-radius: 10px; padding: 8px 6px; display: flex; flex-direction: column; gap: 2px; text-align: center; font-size: 12px; cursor: pointer; color: var(--ink); min-height: 74px; min-width: 0; }
.ev-booth b { font-size: 14px; } .ev-booth .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.ev-booth.free { background: #EEF6F0; border-color: #B9D8C1; } .ev-booth.hold { background: var(--warn-bg); border-color: var(--warn); } .ev-booth.sold { background: var(--plum); color: #fff; border-color: var(--plum); }
.ev-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.ev-chip { border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; font-size: 13px; background: #fff; cursor: pointer; color: var(--ink); }
.ev-chip.on { background: var(--plum); color: #fff; border-color: var(--plum); }
.ev-result { margin-top: 14px; border-radius: 18px; padding: 22px; text-align: center; display: flex; flex-direction: column; gap: 6px; }
.ev-result.ok { background: #E3EDE5; color: var(--ok); } .ev-result.again { background: var(--warn-bg); color: var(--warn-ink); } .ev-result.bad { background: var(--err-bg); color: var(--err-ink); }
.ev-badges { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 16px; }
.ev-badge { border: 1px dashed #bbb; border-radius: 12px; padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; break-inside: avoid; min-height: 270px; background: #fff; }
.ev-bev { font-size: 12px; color: var(--muted); font-weight: 700; } .ev-bname { font-size: 22px; font-weight: 800; line-height: 1.3; } .ev-borg { font-size: 13px; color: var(--ink2); min-height: 18px; }
.ev-btype { margin-top: auto; width: 100%; padding: 6px; border-radius: 8px; background: var(--plum); color: #fff; font-weight: 800; }
.ev-badge.t-speaker .ev-btype { background: #B54708; } .ev-badge.t-vip .ev-btype { background: #13234A; } .ev-badge.t-media .ev-btype { background: #0E7A43; } .ev-badge.t-staff .ev-btype { background: #5E6B7A; } .ev-badge.t-crew .ev-btype { background: #333; }
@media (max-width: 560px) { .ev-badges { grid-template-columns: 1fr; padding: 0; } .ev-map { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); } }
@media print { .ev-badges { padding: 0; gap: 0; grid-template-columns: repeat(2, 1fr); } .ev-badge { height: 68mm; min-height: 0; border-radius: 0; } .ev-btype, .ev-booth { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* ===== إدارة علاقات العملاء (2026-10-26): لون لكل حالة ===== */
.crm-pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--c); background: color-mix(in srgb, var(--c) 13%, #fff); border: 1px solid color-mix(in srgb, var(--c) 35%, #fff); }
.crm-pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.crm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin-bottom: 12px; }
.crm-card { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; text-align: start; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--c); cursor: pointer; min-width: 0; }
.crm-card span.f13 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crm-card .crm-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); grid-row: 1; }
.crm-card b { grid-column: 1 / -1; font-size: 20px; color: var(--c); margin-top: 4px; }
.crm-card.on { background: color-mix(in srgb, var(--c) 10%, #fff); border-color: var(--c); box-shadow: 0 0 0 1px var(--c) inset; }
.crm-filters { display: grid; grid-template-columns: 1fr 200px 200px; gap: 8px; margin-bottom: 4px; }
.crm-list { display: grid; gap: 8px; }
.crm-row { display: grid; grid-template-columns: minmax(220px, 1.4fr) 1fr 1fr 170px; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--line); border-inline-start: 5px solid var(--c); border-radius: 12px; padding: 12px 14px; }
.crm-main { text-align: start; display: grid; gap: 3px; min-width: 0; cursor: pointer; }
.crm-col { display: grid; gap: 2px; min-width: 0; }
.crm-clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-acts { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
.crm-ic { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); text-decoration: none; background: #fff; }
.crm-head { border-inline-start: 6px solid var(--c); padding: 16px; }
.crm-note { padding: 10px 12px; margin-top: 8px; border-radius: 10px; border-inline-start: 4px solid var(--c); background: color-mix(in srgb, var(--c) 6%, #fff); }
.crm-srow { display: grid; grid-template-columns: 44px 1fr auto auto; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 10px; border-inline-start: 5px solid var(--c); background: color-mix(in srgb, var(--c) 7%, #fff); }
.crm-srow input[type=color] { width: 40px; height: 36px; border: 1px solid var(--line); border-radius: 8px; padding: 2px; background: #fff; }
@media (max-width: 760px) {
  .crm-cards { display: flex; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 4px; }
  .crm-card { flex: 0 0 132px; scroll-snap-align: start; }
  .crm-filters { grid-template-columns: 1fr; }
  .crm-row { grid-template-columns: 1fr 1fr; }
  .crm-main { grid-column: 1 / -1; }
  .crm-acts { grid-column: 1 / -1; }
}

/* تقارير الحسابات العامة: اتجاه الصفحة أفقي عند الطباعة (مثل «اتجاه الصفحة» في دفترة) */
@page land { size: A4 landscape; }
@media print { .a4:has(.land) { page: land; max-width: none; } }

/* شارة «تجريبي» بجانب ميزة جديدة */
.beta { display: inline-block; margin-inline-start: 6px; padding: 0 7px; border-radius: 999px; font-size: 10px; font-weight: 700; line-height: 16px; color: #9a5b00; background: #fff3d6; border: 1px solid #f3d38a; vertical-align: middle; white-space: nowrap; letter-spacing: 0; }
h1 .beta { font-size: 11px; line-height: 18px; }
.side a.hasbeta { position: relative; }
.side a.hasbeta .nl { white-space: nowrap; }
.side a.hasbeta .beta { margin-inline-start: 4px; padding: 0 5px; font-size: 9px; line-height: 14px; }
.side a.hasbeta .fav { position: absolute; inset-inline-end: 4px; }

/* الشاليهات والاستراحات (2026-10-26): تقويم الفترات بالألوان */
.ch-cal { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 480px; }
.ch-cal th { padding: 8px 6px; text-align: start; font-weight: 600; border-bottom: 1px solid var(--line); background: var(--paper); }
.ch-cal td { padding: 4px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ch-day { white-space: nowrap; padding: 6px 8px !important; }
.ch-day.wk { background: #fff8e6; }
.ch-cell { display: block; width: 100%; min-height: 44px; border-radius: 8px; padding: 6px 8px; text-align: start; border: 1px solid transparent; font: inherit; cursor: pointer; }
.ch-cell.free { background: #eefaf3; border-color: #bfe8cf; color: #13704a; }
.ch-cell.busy { background: #fdecec; border-color: #f3c2c2; color: #a3262a; }
.ch-cell.wait { background: #fff4e0; border-color: #f2d29b; color: #8a5300; }
.ch-cell.blk { background: #f0eef2; border-color: #dcd6df; color: #5b5560; }
.ch-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: middle; }
.ch-dot.free { background: #bfe8cf; } .ch-dot.busy { background: #f3c2c2; } .ch-dot.wait { background: #f2d29b; } .ch-dot.blk { background: #dcd6df; }

/* صفحة حجز الشاليه والاستراحة العامة (2026-10-27): كل شي داخل عرض الجوال، الأيام والصور تتمرر داخل نفسها فقط */
.chb .chb-wrap { width: 100%; max-width: 640px; box-sizing: border-box; margin: 0 auto; padding: 0 16px 48px; min-width: 0; overflow-x: hidden; }
.chb-photos { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px; scrollbar-width: none; }
.chb-photos::-webkit-scrollbar { display: none; }
.chb-photos img { flex: 0 0 88%; max-width: 560px; height: 240px; object-fit: cover; border-radius: 16px; scroll-snap-align: center; }
.chb-pcount { font-size: 12px; color: var(--muted); margin-top: 6px; }
.chb-nophoto { height: 120px; border-radius: 16px; margin-top: 12px; display: flex; align-items: center; justify-content: center; font-size: 44px; background: linear-gradient(135deg, var(--sel), #fff); }
.chb-head { margin-top: 14px; }
.chb-head h1 { margin: 0; font-size: 24px; font-weight: 800; line-height: 1.3; }
.chb-co { font-size: 13px; color: var(--muted); margin-top: 2px; }
.chb-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chb-fact { font-size: 13px; padding: 5px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--line); }
.chb-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chb-tags span { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--sel); color: var(--plum); }
.chb-desc { font-size: 14px; line-height: 1.8; white-space: pre-line; color: var(--ink2); margin: 12px 0 0; }
.chb-h { font-size: 16px; font-weight: 800; margin: 22px 0 10px; }
.chb-days { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 8px; scroll-snap-type: x proximity; scrollbar-width: none; }
.chb-days::-webkit-scrollbar { display: none; }
.chb-day { flex: 0 0 74px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 10px 4px; border-radius: 14px; background: #fff; border: 1.5px solid var(--line); color: var(--ink); }
.chb-day .w { font-size: 12px; color: var(--muted); }
.chb-day b { font: 800 22px var(--sans); line-height: 1.2; }
.chb-day .m { font-size: 11px; color: var(--muted); }
.chb-day .p { font-size: 11px; font-weight: 700; color: var(--plum); margin-top: 4px; font-family: var(--mono); }
.chb-day.on { background: var(--plum); border-color: var(--plum); color: #fff; }
.chb-day.on .w, .chb-day.on .m, .chb-day.on .p { color: #fff; }
.chb-day:disabled { opacity: .45; background: transparent; }
.chb-day:disabled .p { color: var(--muted); font-family: var(--sans); }
.chb-list { display: flex; flex-direction: column; gap: 8px; }
.chb-opt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: start; padding: 14px; border-radius: 14px; background: #fff; border: 1.5px solid var(--line); color: var(--ink); min-width: 0; }
.chb-opt.sm { padding: 11px 14px; }
.chb-opt.on { border-color: var(--plum); background: var(--sel); }
.chb-opt:disabled { opacity: .5; }
.chb-radio { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); }
.chb-opt.on .chb-radio { border: 6px solid var(--plum); }
.chb-opt-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.chb-opt-b b { font-size: 15px; }
.chb-why { font-size: 12px; color: var(--plum); }
.chb-price { flex: none; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.chb-price b { font-size: 18px; font-weight: 800; }
.chb-price small { font-size: 11px; color: var(--muted); }
.chb-busy { font-size: 12px; color: var(--muted); padding: 3px 8px; border-radius: 999px; background: #EEECEF; }
.chb-hint { margin-top: 12px; padding: 14px; border-radius: 14px; background: #fff; border: 1px dashed var(--line); font-size: 14px; color: var(--muted); text-align: center; }
.chb-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.chb-sel { font-size: 14px; font-weight: 700; padding-bottom: 10px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.chb-sum { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 5px 0; }
.chb-sum.hi { color: var(--plum); font-size: 15px; }
.chb-form { margin-top: 12px; }
.chb-label { font-size: 13px; font-weight: 700; margin: 6px 0 8px; }
.chb-bank { margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: var(--paper, #F5F3EF); font-size: 13px; }
.chb-notes { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); line-height: 1.7; }
.chb-terms { margin-top: 10px; font-size: 13px; line-height: 1.8; }
.chb-terms summary { font-weight: 700; cursor: pointer; }
.chb-muted { font-size: 13px; color: var(--muted); }
.chb-done { margin-top: 18px; text-align: center; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.chb-done-t { font-size: 20px; font-weight: 800; }
.chb-when { font-size: 14px; font-weight: 700; }
/* مثل جاذر إن (2026-10-27): القسم أولًا، ثم تقويم شهر بسعر كل يوم، وشريط «احجز» ثابت */
.chb .chb-wrap { padding-bottom: 110px; }
.chb-secs { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 8px; }
.chb-sec { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 8px; border-radius: 16px; background: #fff; border: 1.5px solid var(--line); color: var(--ink); text-align: center; }
.chb-sec .ic { font-size: 26px; line-height: 1; }
.chb-sec b { font-size: 14px; }
.chb-sec small { font-size: 11px; color: var(--muted); }
.chb-sec.on { border-color: var(--plum); background: var(--sel); box-shadow: 0 0 0 1px var(--plum) inset; }
.chb-sec.on small { color: var(--plum); }
.chb-sec:disabled { opacity: .45; }
.chb-cal { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px 10px; }
.chb-cal-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.chb-cal-h b { font-size: 16px; }
.chb-nav { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 20px; line-height: 1; color: var(--ink); }
.chb-nav:disabled { opacity: .3; }
.chb-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px 2px; }
.chb-wd { text-align: center; font-size: 11px; color: var(--muted); padding-bottom: 4px; }
.chb-c { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 50px; border-radius: 12px; background: transparent; color: var(--ink); padding: 2px 0; min-width: 0; }
.chb-c b { font-size: 15px; font-weight: 700; }
.chb-c small { font-size: 10px; color: #1f7a4d; font-family: var(--mono); white-space: nowrap; overflow: hidden; max-width: 100%; }
.chb-c.on { background: var(--plum); color: #fff; }
.chb-c.on small { color: #fff; }
.chb-c.full b { color: var(--muted); text-decoration: line-through; }
.chb-c.full small { color: var(--muted); font-family: var(--sans); }
.chb-c.off { color: #C9C3C8; font-size: 14px; }
.chb-legend { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 8px; font-size: 11px; color: var(--muted); }
.chb-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-inline-end: 4px; vertical-align: middle; }
.chb-legend i.a { background: #1f7a4d; } .chb-legend i.b { background: #C9C3C8; }
.chb-bar { position: fixed; inset-inline: 0; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -8px 24px -16px rgba(0,0,0,.25); padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); }
.chb-bar-in { max-width: 640px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.chb-bar-p { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; font-size: 13px; }
.chb-bar-p b { font-size: 20px; font-weight: 800; }
.chb-bar-p small { font-size: 11px; color: var(--muted); }
.chb-bar .btn { width: auto; flex: none; height: 50px; padding: 0 22px; font-size: 15px; }
.chb-bar .btn:disabled { background: #D9D3D8; color: var(--ink2); opacity: 1; }

/* مكاتب المحاماة — طلبات القاضي وملف الموكّل وجاهزية الجلسة (2026-11-01) */
.lt-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.lt-row.done .lt-body .f14 { color: var(--muted); text-decoration: line-through; }
.lt-chk { flex: 0 0 auto; width: 24px; height: 24px; margin-top: 2px; border: 2px solid var(--plum); border-radius: 7px; background: var(--white); color: var(--white); font-size: 14px; font-weight: 700; line-height: 20px; cursor: pointer; }
.lt-chk.on { background: var(--plum); }
.lt-body { flex: 1; min-width: 0; text-align: inherit; background: none; border: 0; padding: 0; cursor: pointer; color: inherit; }
.lt-tag { display: inline-block; font-size: 11px; font-weight: 700; color: var(--plum); border: 1px solid var(--plum); border-radius: 6px; padding: 0 6px; margin-inline-end: 2px; vertical-align: 1px; }
.lt-ready { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; margin: 8px 0 3px; max-width: 280px; }
.lt-ready span { display: block; height: 100%; border-radius: 6px; background: var(--err); }
.lt-ready.mid span { background: var(--warn); }
.lt-ready.ok span { background: var(--ok); }
.lf-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 0 0 14px; }
.lf-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--white); min-width: 0; }
.lf-v { font-size: 22px; font-weight: 700; margin: 2px 0; }
.lf-v.red { color: var(--err); }
.lf-ses { padding: 12px 0; border-bottom: 1px solid var(--line); }
.lf-ses.up { border-inline-start: 3px solid var(--plum); padding-inline-start: 10px; }
.lf-reqs { margin: 6px 0 2px; padding-inline-start: 8px; border-inline-start: 2px solid var(--line); }
.lf-reqs .lt-row { padding: 6px 0; border-bottom: 0; }
.chip-s { border: 1px solid var(--line); background: var(--white); border-radius: 999px; padding: 5px 12px; font-size: 13px; cursor: pointer; color: var(--ink2); }
.chip-s.on { background: var(--plum); border-color: var(--plum); color: var(--white); }

/* لوحة القضايا (2026-11-01) */
.lf-next { display: block; width: 100%; text-align: inherit; cursor: pointer; }
.lf-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 8px; }
.lf-day { text-align: center; }
.lf-day.today .lf-bar { border-color: var(--plum); }
.lf-bar { height: 54px; border: 1px solid var(--line); border-radius: 8px; display: flex; align-items: flex-end; overflow: hidden; background: var(--white); margin-bottom: 3px; }
.lf-bar span { display: block; width: 100%; background: var(--plum); opacity: .75; }
.lf-risk { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-inline-start: 4px solid var(--warn); border-radius: 10px; background: var(--white); margin-bottom: 8px; }
.lf-risk.red { border-inline-start-color: var(--err); }
.lf-ri { font-size: 18px; flex: 0 0 auto; }
.lf-ok { padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); color: var(--ok); font-weight: 700; }
.lf-team { border: 1px solid var(--line); border-radius: 12px; background: var(--white); overflow: hidden; }
.lf-tr { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 6px; padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
.lf-tr:last-child { border-bottom: 0; }
.lf-th { font-size: 12px; color: var(--muted); font-weight: 700; }
.lf-aging { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 6px; }
.lf-ag { border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: var(--white); }
.lf-ag.red { border-color: var(--err); color: var(--err); }

/* الورقة الصفراء: ملاحظات مثبتة على القضية والموكّل (2026-11-01) */
.lf-pins { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin: 6px 0 14px; }
.lf-pin { position: relative; padding: 12px 14px 10px; border-radius: 4px 4px 14px 4px; background: #FFF3A6; color: #3d3410; box-shadow: 0 2px 6px rgba(0,0,0,.10); border-top: 3px solid #E9C93B; }
.lf-pin.red { background: #FFE1DB; color: #5a1c10; border-top-color: #D9573A; }
.lf-pin.blue { background: #DDEBFF; color: #10305a; border-top-color: #4D86D9; }
.lf-pin.green { background: #DDF4E2; color: #12401f; border-top-color: #3E9A5A; }
.lf-pinx { position: absolute; inset-inline-end: 6px; top: 4px; background: none; border: 0; font-size: 13px; opacity: .55; cursor: pointer; color: inherit; }
.lf-pinx:hover { opacity: 1; }
.lf-pin .f14 { padding-inline-end: 16px; }
.lf-pinadd { border: 2px dashed var(--line); border-radius: 10px; background: transparent; color: var(--ink2); font-size: 14px; font-weight: 700; padding: 14px; cursor: pointer; min-height: 64px; }

/* تتبع الفريق الميداني (2026-11-02): صفحة العميل #/tk وخريطة المكتب #/clean/map وشريط العامل */
.tk { min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg, #fff); }
.tk-top { display: flex; align-items: center; gap: 10px; padding: 10px 16px; }
.tk-top img { max-height: 40px; }
.tk-top b { font-size: 17px; }
.tk-map { width: 100%; height: 56vh; min-height: 280px; border-radius: 14px; overflow: hidden; background: #e9eef2; z-index: 0; }
.tk > .tk-map { border-radius: 0; flex: 1 1 auto; }
.tk-info { padding: 14px 16px; border-top: 1px solid var(--line, #e5e5e5); }
.tk-st { font-size: 19px; font-weight: 800; margin-bottom: 4px; }
.tk-st.ok { color: #2E7D32; }
.tk-eta { font-size: 15px; margin: 6px 0; }
.tk-eta b { font-size: 28px; }
.tk-foot { font-size: 12px; color: var(--muted, #777); text-align: center; padding: 0 16px 16px; margin: 0; }
.tk-nomap { display: flex; align-items: center; justify-content: center; height: 100%; color: #777; }
.tk-pin { display: flex; align-items: center; justify-content: center; font-size: 22px; background: #fff; border-radius: 50%; box-shadow: 0 2px 8px rgba(0,0,0,.25); border: 2px solid #5E2350; }
.tk-pin.dest { border-color: #2E7D32; }
.tk-pin.named { width: auto !important; min-width: 40px; padding: 0 8px; border-radius: 20px; gap: 4px; white-space: nowrap; }
.tk-pin.named i { font-style: normal; font-size: 12px; font-weight: 700; }
.tk-on { border: 2px solid #2E7D32; }
.tk-off { border: 2px dashed var(--amber, #c80); }
.tk-dot { width: 12px; height: 12px; border-radius: 50%; background: #2E7D32; animation: tkpulse 1.4s infinite; }
@keyframes tkpulse { 0% { box-shadow: 0 0 0 0 rgba(46,125,50,.6); } 100% { box-shadow: 0 0 0 12px rgba(46,125,50,0); } }
/* صندوق المحادثات (2026-11-04): الوسوم، وزر إغلاق المحادثة، و«⋯» في الجوال */
.ib-lbl { font-size: 11px; color: #4A3A6B; background: #EFEAF8; border-radius: 10px; padding: 1px 8px; white-space: nowrap; }
.ib-lbls { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.ib-hbtn.done { border-color: #13b48a; color: #0d7a5d; }
.ib-head-a .ib-hbtn.ib-more { display: none; }
@media (max-width: 820px) { .ib-head-a .ib-hbtn.ib-more { display: inline-flex; } }
/* رأس المحادثة: الأزرار تنزل سطرًا تحت الاسم بدل ضغطه، وشريط التبويبات يُسحب أفقيًا في الجوال بدل أن يوسّع الصفحة */
.ib-head { flex-wrap: wrap; } .ib-head-m { flex: 1 1 200px; }
.ib-bar .tabs { max-width: 100%; overflow-x: auto; }
@media (max-width: 820px) { .ib-head { flex-wrap: nowrap; } .ib-head-m { flex: 1 1 auto; } .ib-bar .ib-agent { flex: 1 1 130px; max-width: none; } .ib-page { max-width: 100vw; overflow-x: hidden; } }
/* سطر تأكيد التاريخ تحت خانتي الميلادي والهجري (المحاماة) */
.dsum { margin-top: 6px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2, #f4f2f5); font-size: 13px; line-height: 1.7; color: var(--ink, #1f1a24); }
.dsum:empty { display: none; }
.dsum-rel { display: inline-block; margin-inline-start: 6px; padding: 0 8px; border-radius: 999px; background: #e7f3ec; color: #15803d; font-size: 12px; font-weight: 600; }
.dsum-rel.warn { background: #fdf2e3; color: #b45309; }
.dsum-rel.err { background: #fde8e7; color: #9e2a22; }
/* قائمة الاختيار بعد البحث فيها (selFind/find): تُعرض نتائجها كاملة لا مقصوصة في ارتفاع الخانة */
select.select[size]:not([size="0"]):not([size="1"]) { height: auto; padding: 4px 6px; background-image: none; }
select.select[size]:not([size="0"]):not([size="1"]) option { padding: 8px 6px; }
/* ---------- قائمة القضايا (2026-11-05): شريط البحث والترتيب والفلتر، وبطاقات ملوّنة بالإلحاح ومتناوبة الخلفية ---------- */
.cl-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.cl-q { flex: 1 1 280px; margin: 0 !important; }
.cl-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cl-sort { display: flex; gap: 6px; align-items: center; }
.cl-sort .select { width: auto; min-width: 170px; }
.cl-fbtn { width: auto; }
.cl-fbtn.on { border-color: var(--brand, #5b1f4f); color: var(--brand, #5b1f4f); }
.cl-n { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 999px; background: var(--brand, #5b1f4f); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.cl-panel { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px 14px; padding: 14px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper, #fff); }
.cl-rng { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px; align-items: center; }
.cl-rng .input { min-width: 0; width: 100%; }
.cl-meta { display: flex; gap: 6px 8px; align-items: center; flex-wrap: wrap; margin: 4px 0 10px; }
.cl-chip { border: 1px solid var(--line); background: var(--surface-2, #f4f2f5); border-radius: 999px; padding: 3px 10px; font-size: 12px; cursor: pointer; }
.cl-legend { margin-inline-start: auto; display: flex; gap: 4px 10px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--muted, #6b6470); }
.cl-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 3px; vertical-align: -1px; }
.cl-legend i.red, .cl-row.t-red { --tone: #c0392b; } .cl-legend i.amber, .cl-row.t-amber { --tone: #d97706; }
.cl-legend i.green, .cl-row.t-green { --tone: #15803d; } .cl-legend i.gray, .cl-row.t-gray { --tone: #9ca3af; } .cl-row.t-done { --tone: #cbd5e1; }
.cl-legend i { background: var(--tone); }
.cl-list { display: flex; flex-direction: column; gap: 8px; }
.cl-row { display: flex; gap: 12px; justify-content: space-between; align-items: stretch; padding: 12px 14px; border: 1px solid var(--line); border-inline-start: 5px solid var(--tone, #9ca3af); border-radius: 12px; background: var(--paper, #fff); color: inherit; text-decoration: none; transition: box-shadow .15s, transform .15s; }
.cl-list .cl-row:nth-child(odd) { background: #fff; }
.cl-list .cl-row:nth-child(even) { background: #f3eef6; }
.cl-row:hover { box-shadow: 0 2px 10px rgba(0, 0, 0, .07); }
.cl-row:focus-visible { outline: 2px solid var(--brand, #5b1f4f); outline-offset: 2px; }
.cl-main { min-width: 0; flex: 1; }
.cl-t { font-weight: 700; font-size: 15px; line-height: 1.5; }
.cl-s { font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.cl-no { background: var(--surface-2, #f1eef3); border-radius: 6px; padding: 0 6px; font-size: 12px; }
.cl-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.cl-tag { font-size: 11.5px; padding: 1px 8px; border-radius: 999px; background: #eef0f3; color: #374151; }
.cl-tag.red { background: #fde8e7; color: #9e2a22; font-weight: 600; } .cl-tag.amber { background: #fdf2e3; color: #92400e; font-weight: 600; }
.cl-side { flex: 0 0 auto; min-width: 120px; max-width: 42%; text-align: end; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding-inline-start: 10px; border-inline-start: 1px dashed var(--line); }
.cl-when { font-weight: 700; font-size: 14px; color: var(--tone); } .cl-when.muted { color: var(--muted, #6b6470); font-weight: 500; }
.cl-d { font-size: 12px; color: var(--muted, #6b6470); }
@media (max-width: 640px) {
  .cl-row { flex-direction: column; gap: 8px; }
  .cl-side { max-width: none; text-align: start; border-inline-start: 0; border-top: 1px dashed var(--line); padding: 8px 0 0; flex-direction: row; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
  .cl-sort .select { min-width: 0; } .cl-tools { width: 100%; } .cl-sort { flex: 1; } .cl-sort .select { flex: 1; }
  .cl-legend { margin-inline-start: 0; width: 100%; }
}
/* ---------- خطة الأسبوع للمحامين (2026-11-05) ---------- */
.wk-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.wk-nav .btn { width: auto; }
.wk-range { display: flex; flex-direction: column; align-items: center; text-align: center; }
.wk-sum { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 8px; }
.wk-pill { border-radius: 999px; padding: 3px 12px; font-size: 13px; background: #eef0f3; }
.wk-pill.red { background: #fde8e7; color: #9e2a22; font-weight: 700; } .wk-pill.amber { background: #fdf2e3; color: #92400e; font-weight: 700; }
.wk-p { border: 1px solid var(--line); border-radius: 14px; background: var(--paper, #fff); padding: 12px 14px; margin-bottom: 12px; break-inside: avoid; }
.wk-p:nth-of-type(even) { background: #f7f3f9; }
.wk-ph { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.wk-day { padding: 6px 0; }
.wk-day + .wk-day { border-top: 1px dashed var(--line); }
.wk-day.today .wk-dh { color: var(--brand, #5b1f4f); }
.wk-dh { font-weight: 700; font-size: 13.5px; margin: 2px 0 4px; }
.wk-it { display: grid; grid-template-columns: 24px 48px minmax(0, 1fr); gap: 6px; align-items: start; padding: 5px 6px; border-radius: 8px; }
.wk-it.clash { background: #fdecea; }
.wk-ic { text-align: center; } .wk-tm { font-size: 13px; color: var(--muted, #6b6470); padding-top: 1px; }
.wk-bd { min-width: 0; font-size: 14px; line-height: 1.6; } .wk-bd .cl-tag { vertical-align: 1px; }
.wk-sb { display: block; font-size: 12.5px; color: var(--muted, #6b6470); overflow-wrap: anywhere; }
.cl-tag.green { background: #e7f3ec; color: #15803d; font-weight: 600; }
@media print { .wk-p { background: #fff !important; } .wk-it.clash { background: #fdecea !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.wk-pill.green { background: #e7f3ec; color: #15803d; font-weight: 700; }
.wk-score { margin-inline-start: auto; font-size: 12.5px; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.wk-score.g { background: #e7f3ec; color: #15803d; } .wk-score.a { background: #fdf2e3; color: #92400e; } .wk-score.r { background: #fde8e7; color: #9e2a22; }

/* صفحة القضية (2026-11-05): الأطراف، الجلسة القادمة بجاهزيتها، «المطلوب الآن»، شريط الأفعال، والتبويبات */
.cv-chips{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 12px}
.cv-chip{font-size:12px;border-radius:999px;padding:3px 10px;background:#ECEAEC;color:var(--ink2,#3E3A40);border:0;font-family:inherit;line-height:1.6}
.cv-chip.add{border:1px dashed var(--plum);background:transparent;color:var(--plum);font-weight:700;cursor:pointer}
.cv-chip.ok{background:#E4F1E7;color:var(--ok,#2F5D3A);font-weight:700}
.cv-chip.err{background:#FBE4E1;color:var(--err);font-weight:700}
button.cv-chip.mono{cursor:pointer}
.cv-card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:14px;margin-bottom:12px}
.cv-parties{display:grid;grid-template-columns:1fr auto 1fr;gap:8px;align-items:center;text-align:center}
.cv-party{min-width:0}.cv-party b{display:block;font-size:15px;overflow-wrap:anywhere}.cv-party span{font-size:12px;color:var(--muted)}
.cv-vs{font-size:12px;color:#fff;background:var(--plum);border-radius:999px;width:32px;height:32px;display:grid;place-items:center;font-weight:800}
.cv-contact{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;margin-top:12px}
.cv-cbtn{border:1px solid var(--line);border-radius:999px;padding:6px 14px;font-size:13px;background:var(--paper);color:var(--ink);text-decoration:none;font-family:inherit;cursor:pointer}
.cv-cbtn:hover{border-color:var(--plum)}
.cv-meta{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:12px;padding-top:12px;border-top:1px solid var(--line)}
.cv-meta>div{min-width:0}.cv-meta span{display:block;font-size:12px;color:var(--muted);margin-bottom:2px}.cv-meta b{font-size:13px;overflow-wrap:anywhere}
.cv-team{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.cv-av{width:28px;height:28px;border-radius:50%;background:var(--halo);color:var(--plum);display:grid;place-items:center;font-size:10.5px;font-weight:800;border:2px solid #fff;flex:0 0 auto}
.cv-av+.cv-av{margin-inline-start:-12px}
.cv-hero{background:linear-gradient(135deg,#5E2350,#7C3A6C);color:#fff;border-radius:18px;padding:16px;margin-bottom:12px;position:relative;overflow:hidden}
.cv-hero.soon{background:linear-gradient(135deg,#8A3A1E,#B5562A)}
.cv-hero.empty{background:#fff;color:var(--ink);border:1px dashed var(--plum)}
.cv-hero small{opacity:.85;font-size:12px}.cv-big{font-size:28px;font-weight:800;margin:2px 0 4px}
.cv-when{font-size:13.5px;line-height:1.8}.cv-where{font-size:12.5px;opacity:.85;margin-top:2px;line-height:1.7}
.cv-when.r,.cv-where.r{padding-inline-end:84px}
.cv-hero .muted{color:inherit;opacity:.7}.cv-hero .dsum-rel{display:none}
.cv-ring{position:absolute;inset-inline-end:16px;top:16px;width:64px;height:64px;border-radius:50%;display:grid;place-items:center}
.cv-ring i{width:50px;height:50px;border-radius:50%;background:#6A2C5C;display:grid;place-items:center;font-style:normal;font-weight:800;font-size:14px}
.cv-hero.soon .cv-ring i{background:#9B4523}
.cv-ringl{position:absolute;inset-inline-end:8px;top:84px;font-style:normal;font-size:11px;opacity:.85;width:80px;text-align:center}
.cv-hbtns{display:flex;gap:8px;margin-top:14px}
.cv-hbtn{flex:1;text-align:center;border-radius:999px;padding:10px 6px;font-weight:800;font-size:13px;background:#fff;color:var(--plum);border:0;font-family:inherit;cursor:pointer}
.cv-hbtn.o{background:rgba(255,255,255,.14);color:#fff;border:1px solid rgba(255,255,255,.4)}
.cv-hero.empty .cv-hbtn{background:var(--plum);color:#fff;flex:0 0 auto;padding:9px 22px}
.cv-now h3{margin:0 0 6px;font-size:15px;display:flex;align-items:center;gap:6px}
.cv-now.ok h3{margin:0;color:var(--ok,#2F5D3A)}
.cv-cnt{font-size:11px;background:#FFF3D6;color:var(--warn,#8A5A00);padding:1px 8px;border-radius:999px}
.cv-todo{display:flex;gap:10px;align-items:center;padding:10px 0;border-top:1px dashed var(--line)}
.cv-todo:first-of-type{border-top:0}
.cv-dot{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;font-size:13px;flex:0 0 auto;font-weight:800}
.cv-dot.r{background:#FBE4E1;color:var(--err)}.cv-dot.a{background:#FBF0D8;color:var(--warn,#8A5A00)}.cv-dot.g{background:#E4F1E7;color:var(--ok,#2F5D3A)}
.cv-tx{flex:1;min-width:0}.cv-tx b{display:block;font-size:13.5px;line-height:1.6;overflow-wrap:anywhere}.cv-tx span{display:block;font-size:12px;color:var(--muted);line-height:1.6}
.cv-tact{flex:0 0 auto;font-size:12px;font-weight:800;color:var(--plum);border:1px solid var(--halo);border-radius:999px;padding:5px 12px;white-space:nowrap;background:var(--sel);font-family:inherit;cursor:pointer}
.cv-bar{display:flex;background:#fff;border:1px solid var(--line);border-radius:16px;padding:6px;margin-bottom:12px}
.cv-bar button{flex:1;text-align:center;font-size:12px;color:var(--ink2,#3E3A40);background:none;border:0;border-radius:12px;padding:6px 2px;font-family:inherit;cursor:pointer}
.cv-bar button:hover{background:var(--sel)}.cv-bar i{display:block;font-style:normal;font-size:18px;margin-bottom:2px}
.cv-tabs{overflow-x:auto;white-space:nowrap;margin-top:6px}
.cv-out{line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;background:#fff;border:1px solid var(--line);border-radius:10px;padding:8px 10px;margin-top:4px}
.cv-body{min-width:0}
@media (min-width:760px){.cv-big{font-size:32px}}
.cv-more{display:block;margin:8px auto 0}
/* ما دار في الجلسة بصوت المحامي (2026-11-05) */
.vs-mic{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:16px;border-radius:16px;border:2px solid var(--plum);background:#fff;color:var(--plum);font:800 16px var(--sans,inherit);cursor:pointer;margin-top:8px}
.vs-mic span{font-size:22px}
.vs-mic.on{background:var(--err);border-color:var(--err);color:#fff;animation:vsPulse 1.4s ease-in-out infinite}
@keyframes vsPulse{0%,100%{box-shadow:0 0 0 0 rgba(158,42,34,.45)}50%{box-shadow:0 0 0 10px rgba(158,42,34,0)}}
.cv-assign{display:inline-block;margin-top:4px}
.cv-team b{font-size:13px}
@media (max-width:520px){
  .cv-meta{grid-template-columns:1fr;gap:10px}
  .cv-ring{width:54px;height:54px;top:14px}.cv-ring i{width:42px;height:42px;font-size:12.5px}
  .cv-ringl{top:72px;width:64px;font-size:10px;inset-inline-end:11px}
  .cv-when.r,.cv-where.r{padding-inline-end:0}
  .cv-hero small,.cv-big{padding-inline-end:70px}
  .cv-big{font-size:26px}
  .cv-when{margin-top:10px}
  .cv-tabs button{padding-inline:10px}
}
@media (max-width:520px){.cv-ringl{top:70px}.cv-hero.r-on .cv-when{margin-top:22px}}
@media (max-width:520px){.cv-tabs{display:flex;gap:0}.cv-tabs button{flex:1 1 auto;padding:10px 4px;font-size:13px;min-width:0}}
@media (max-width:520px){.cv-tabs{overflow-x:auto;gap:2px;scrollbar-width:none}.cv-tabs::-webkit-scrollbar{display:none}.cv-tabs button{flex:1 0 auto;padding:10px 7px;font-size:12.5px;white-space:nowrap}}
/* أسبوع المكتب (2026-11-05): شريط أيام مثل تقويم الجوال وجدول اليوم المختار */
.wa{background:#fff;border:1px solid var(--line);border-radius:16px;padding:10px;margin-top:8px}
.wa-strip{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}
.wa-day{display:flex;flex-direction:column;align-items:center;gap:2px;padding:8px 0 6px;border:0;border-radius:12px;background:transparent;font-family:inherit;cursor:pointer;color:var(--ink);min-width:0}
.wa-day:hover{background:var(--sel)}
.wa-dn{font-size:11px;color:var(--muted);white-space:nowrap}
.wa-dd{font-size:18px;font-weight:800;line-height:1.2}
.wa-day.today .wa-dd{color:var(--plum)}
.wa-day.empty .wa-dd{color:#B7B0B5}
.wa-day.on{background:var(--plum);color:#fff}.wa-day.on .wa-dn,.wa-day.on .wa-dd{color:#fff}
.wa-dots{display:flex;gap:2px;height:6px;align-items:center}
.wa-dots i{width:5px;height:5px;border-radius:50%;background:var(--plum)}.wa-dots i.v{background:#C98A1B}
.wa-dots b{font-size:9px;line-height:6px;color:var(--muted)}
.wa-day.on .wa-dots i{background:#fff}.wa-day.on .wa-dots i.v{background:#F5C451}
.wa-head{display:flex;justify-content:space-between;align-items:baseline;margin:12px 4px 4px;padding-top:10px;border-top:1px solid var(--line)}
.wa-it{display:flex;align-items:center;gap:10px;width:100%;padding:10px 4px;border:0;border-top:1px dashed var(--line);background:none;font-family:inherit;text-align:start;cursor:pointer;color:var(--ink)}
.wa-it:first-of-type{border-top:0}
.wa-it:hover{background:var(--paper)}
.wa-t{font-size:13px;font-weight:600;width:44px;flex:0 0 auto;color:var(--ink2,#3E3A40)}
.wa-bar{width:3px;align-self:stretch;border-radius:3px;flex:0 0 auto}.wa-bar.s{background:var(--plum)}.wa-bar.v{background:#C98A1B}
.wa-b{flex:1;min-width:0}.wa-b b{display:block;font-size:14px;overflow-wrap:anywhere}.wa-b .f12{display:block;line-height:1.6}
.wa-r{flex:0 0 auto;font-size:12px;font-weight:800;border-radius:999px;padding:3px 9px}
.wa-r.ok{background:#E4F1E7;color:var(--ok,#2F5D3A)}.wa-r.mid{background:#FBF0D8;color:var(--warn,#8A5A00)}.wa-r.low{background:#FBE4E1;color:var(--err)}
.wa-free{padding:14px 4px;color:var(--ok,#2F5D3A);font-size:13px;font-weight:700}
.wa-empty{margin-top:8px;padding:14px;border:1px dashed var(--line);border-radius:14px;background:#fff;color:var(--muted);font-size:13.5px;text-align:center}
/* تقويم الجوال (2026-11-05) */
.cal-steps{margin-top:14px;padding:12px;border-radius:12px;background:var(--paper);border:1px solid var(--line)}
.cal-al{display:flex;gap:8px;flex-wrap:wrap;margin-top:6px}
.cal-chk{display:inline-flex;align-items:center;gap:6px;font-size:13.5px;padding:7px 12px;border:1px solid var(--line);border-radius:999px;background:#fff;cursor:pointer}
.cal-chk input{accent-color:var(--plum)}
.cal-on{padding:12px;border-radius:12px;background:#E4F1E7;color:var(--ok,#2F5D3A);margin-top:8px}
a.cal-a{display:flex;align-items:center;justify-content:center;text-decoration:none}
@media (max-width:520px){.cv-hero:not(.r-on) small,.cv-hero:not(.r-on) .cv-big{padding-inline-end:0}}
/* مراجعة التصميم (2026-11-05) */
.cv-av{display:inline-flex;align-items:center;justify-content:center;line-height:1;overflow:hidden;padding:0;font-size:12px}
.cv-result{margin:0 0 12px;padding:12px 14px;border-radius:14px;background:#EFE6EC;color:var(--ink)}
.cv-result.ok{background:#E4F1E7;color:var(--ok,#2F5D3A)}
.lt-row .mono,.wa-b .mono,.lf-risk .mono{white-space:nowrap}
@media (max-width:520px){.lf-cards{grid-template-columns:1fr 1fr}.lf-card{padding:10px 12px}.lf-v{font-size:20px}}
.lf-next{margin-bottom:10px}
/* فخم عملي (2026-11-05): لون مرافق واحد للبنفسجي — ذهبي عتيق — وبنفسجي أعمق للبطاقة الرئيسية، وأيقونات خطية (js/icons.js) بدل الإيموجي */
:root{--gold:#B08D57;--gold-l:#F3ECDD;--gold-d:#7A5E2E;--plum-d:#4A1B40;--ok-bg:#E4EFE6}
.ic{display:inline-block;vertical-align:-3px;flex:0 0 auto}.ic.gold{color:var(--gold)}
.cv-chip.add{border-color:var(--gold);color:var(--gold-d)}
.cv-chip.ok{background:var(--ok-bg)}
.cv-vs{background:var(--gold-l);color:var(--gold-d);border:1px solid var(--gold)}
.cv-cbtn{display:inline-flex;align-items:center;gap:6px;color:var(--plum);font-weight:700;padding:9px 13px;min-height:40px}
.cv-card{border-radius:18px;box-shadow:0 1px 2px rgba(31,27,34,.04)}
.cv-hero,.cv-hero.soon{background:var(--plum-d);border:1px solid #6B2A5E}
.cv-hero.soon{box-shadow:inset 0 0 0 2px var(--gold)}
.cv-hero small{color:#E9D9B8}.cv-when{color:#F3EAF0}.cv-where{color:#D9C6D3}
.cv-ring i,.cv-hero.soon .cv-ring i{background:var(--plum-d)}.cv-ringl{color:#E9D9B8}
.cv-hbtn{display:inline-flex;align-items:center;justify-content:center;gap:7px;color:var(--plum-d);min-height:44px}
.cv-hbtn.o{border-color:rgba(233,217,184,.55)}
.cv-hero.empty{background:#fff;border:1px dashed var(--gold);box-shadow:none}.cv-hero.empty small{color:var(--gold-d)}.cv-hero.empty .cv-hbtn{background:var(--plum);color:#fff}
.cv-cnt{background:var(--gold-l);color:var(--gold-d)}
.cv-dot{border-radius:10px;width:32px;height:32px}
.cv-dot.r{background:var(--err-bg);color:var(--err)}.cv-dot.a{background:var(--gold-l);color:var(--gold-d)}.cv-dot.g{background:var(--sel);color:var(--plum)}
.cv-tact{background:#fff;border:1px solid var(--line);min-height:40px;padding:8px 14px;display:inline-flex;align-items:center}
.cv-bar i{display:block;color:var(--plum);margin-bottom:4px}.cv-bar i .ic{width:20px;height:20px}
.vs-mic{gap:10px}.vs-mic.on{background:var(--err)}
.btn .ic{margin-inline-end:4px}
.cv-av{display:inline-block;width:30px;height:30px;line-height:30px;text-align:center;font-family:Tahoma,Arial,sans-serif;font-size:13px;font-weight:700;background:var(--plum);color:#fff;border:0;box-shadow:0 0 0 2px #fff;flex:0 0 30px}
.cv-av:nth-child(2n){background:var(--gold)}
.wa-day.on{background:var(--plum-d)}.wa-dots i.v{background:var(--gold)}.wa-day.on .wa-dots i.v{background:#E9D9B8}.wa-bar.v{background:var(--gold)}
.wa-r.mid{background:var(--gold-l);color:var(--gold-d)}
.wa-empty .ic{vertical-align:-4px;margin-inline-end:4px}
.cal-on{background:var(--ok-bg)}.cal-on .ic{vertical-align:-3px}
/* الجدول بالفرق: الفروع، ما فات موعده، الإسناد الذكي، حمولة الفرق (2026-11-06) */
.cl-bchip { padding: 6px 12px; border-radius: 16px; background: #fff; border: 1px solid var(--line); font: inherit; font-size: 13px; cursor: pointer; color: var(--ink); }
.cl-bchip.on { background: #F3E9F1; border-color: #5E2350; color: #5E2350; font-weight: 600; }
.cl-br { font-size: 11px; padding: 2px 8px; border-radius: 10px; background: #EEF3FA; color: #2B417A; font-weight: 600; white-space: nowrap; }
.cl-alert { display: flex; align-items: center; gap: 10px; background: #FDF0EE; border: 1px solid #F1C4BD; border-radius: 14px; padding: 11px 13px; margin-bottom: 12px; font-size: 13px; line-height: 1.6; }
.cl-tray { background: #fff; border: 1px solid var(--line); border-inline-start: 5px solid #C0392B; border-radius: 14px; padding: 12px; margin-bottom: 14px; }
.cl-tray-job { border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-top: 8px; background: #FFFCFB; }
.cl-sug { background: #FFF6E0; border: 1px dashed #E8C27A; border-radius: 10px; padding: 8px 10px; font-size: 12.5px; }
.cl-sug.full { background: #FDF0EE; border-color: #F1C4BD; }
.cl-ai { background: #D80A69; color: #fff; font-size: 10.5px; padding: 1px 7px; border-radius: 8px; margin-inline-start: 4px; }
.cl-why { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.cl-why span { background: #fff; border: 1px solid #F0D9A8; border-radius: 8px; padding: 1px 7px; font-size: 11px; color: #6b4a10; }
.cl-load { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 14px; overflow-x: auto; }
.cl-lgrid { display: grid; gap: 4px; align-items: center; font-size: 11px; min-width: 330px; }
.cl-lgrid .h { text-align: center; color: var(--muted, #7A7279); font-weight: 600; font-size: 10px; line-height: 1.3; overflow: hidden; }
.cl-lgrid .h small { display: block; font-size: 10px; }
.cl-lgrid .h.td { color: #5E2350; }
.cl-lgrid .tn { display: flex; gap: 5px; align-items: center; font-weight: 700; font-size: 11.5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cl-lgrid .tn i, .cl-grp i { width: 9px; height: 9px; border-radius: 50%; flex: none; display: inline-block; }
.cl-cellb { border: 0; padding: 0; background: none; cursor: pointer; font: inherit; }
.cl-cell { height: 32px; border-radius: 8px; background: #F2EFF1; position: relative; overflow: hidden; display: grid; place-items: center; font-weight: 700; }
.cl-cell i { position: absolute; bottom: 0; right: 0; left: 0; background: #1F7A4D; opacity: .25; }
.cl-cell span { position: relative; }
.cl-cell.full { outline: 2px solid #C0392B; } .cl-cell.full i { background: #C0392B; }
.cl-cell.un { color: #C0392B; background: #FDF0EE; }
.cl-cell.off { background: repeating-linear-gradient(45deg, #f2eff1, #f2eff1 4px, #e9e5e8 4px, #e9e5e8 8px); color: #7A7279; font-weight: 500; }
.cl-dayh { display: flex; justify-content: space-between; align-items: baseline; margin: 16px 2px 6px; }
.cl-grp { font-size: 12.5px; font-weight: 700; margin: 8px 2px 6px; display: flex; gap: 6px; align-items: center; }
.cl-empty { display: flex; justify-content: space-between; background: #fff; border: 1px dashed var(--line); border-radius: 12px; padding: 8px 14px; color: #7A7279; font-size: 13px; margin-top: 8px; }
.cl-bar { height: 5px; border-radius: 4px; background: #ECE7EA; margin-top: 5px; overflow: hidden; } .cl-bar i { display: block; height: 100%; background: #1F7A4D; }
.cl-mini { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 8px 2px; border-bottom: 1px solid var(--line); }
.cl-mini a { flex: 1; }
/* قائمة المصروفات وسندات القبض مرتبة (2026-11-06): تصنيفات بمجاميعها، جدول بأعمدة مجمّع باليوم */
.vx-cats { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; }
.vx-cat { position: relative; flex: 0 0 auto; min-width: 140px; text-align: start; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px 10px; display: flex; flex-direction: column; gap: 2px; overflow: hidden; font-size: 13px; }
.vx-cat i { font-style: normal; font-size: 12px; } .vx-cat b { font-size: 14px; }
.vx-cat em { position: absolute; inset-inline-start: 0; bottom: 0; height: 3px; background: var(--brand, #1F6E5A); }
.vx-cat.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink) inset; }
.vx-tbl { margin-top: 6px; }
.vx-hd, .vx-row { display: grid; grid-template-columns: 130px minmax(180px, 2fr) minmax(120px, 1.2fr) minmax(110px, 1fr) minmax(100px, .9fr) 110px; gap: 12px; align-items: center; }
.vx-hd { font-size: 12px; color: #7A7279; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.vx-row { width: 100%; text-align: start; padding: 10px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.vx-row > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vx-row:hover { background: var(--sel); }
.vx-row.off { opacity: .5; }
.vx-no { font-size: 12.5px; } .vx-amt { text-align: end; font-weight: 700; } .vx-acc, .vx-ven, .vx-tr { color: #5E565C; font-size: 12.5px; }
.vx-x { font-size: 11px; background: #F6E3E3; color: #9B2C2C; border-radius: 6px; padding: 1px 6px; }
.vx-day { display: flex; justify-content: space-between; background: #F7F4F6; padding: 6px 10px; font-size: 12.5px; font-weight: 700; margin-top: 8px; border-radius: 8px; }
.vx-day i { font-style: normal; font-weight: 400; }
@media (max-width: 720px) {
  .vx-hd { display: none; }
  .vx-row { grid-template-columns: 1fr auto; grid-template-areas: "note amt" "meta no" "ven ven"; row-gap: 3px; }
  .vx-note { grid-area: note; font-weight: 600; white-space: normal !important; } .vx-amt { grid-area: amt; }
  .vx-no { grid-area: no; text-align: end; color: #7A7279; }
  .vx-acc { grid-area: meta; } .vx-ven { grid-area: ven; } .vx-tr { display: none; }
}
/* البصريات (2026-11-06): جدول الوصفة — العرض والإدخال والطباعة */
.rx-tbl { border-collapse: collapse; font-size: 13px; min-width: 420px; width: 100%; }
.rx-tbl th, .rx-tbl td { border: 1px solid var(--line); padding: 5px 6px; text-align: center; }
.rx-tbl td { direction: ltr; unicode-bidi: plaintext; }
.rx-tbl thead th { background: var(--paper); font-weight: 600; font-size: 12px; }
.rx-tbl tbody th { background: var(--paper); font-weight: 600; white-space: nowrap; }
.rx-tbl.rx-in td { padding: 3px; }
.rx-tbl.rx-in .input, .rx-tbl.rx-in .select { min-height: 34px; text-align: center; }
@media print { .rx-tbl th, .rx-tbl td { border-color: #555; } .rx-tbl thead th, .rx-tbl tbody th { background: #f2f2f2; } }

/* وصل طلبية البصريات (optOrderHtml في print.js، 2026-11-07): اللون من --acc للمنشأة */
.opo{font-size:12.5px;color:#1b1f24}
.opo-top{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;border-bottom:3px solid var(--acc);padding-bottom:12px}
.opo-top .ttl b{font-size:22px;color:var(--acc)}
.opo-top .ttl i{display:block;font-style:normal;letter-spacing:.14em;font-size:11px;color:#667}
.opo-bc{text-align:center}
.opo-bc .mono{font-size:13px;font-weight:700}
.opo-chip{display:inline-block;margin-top:4px;padding:2px 10px;border-radius:99px;background:var(--acc-soft);color:var(--acc);font-weight:700;font-size:11px}
.opo-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:12px 0}
.opo-k{background:var(--acc-soft);border:1px solid var(--acc-line);border-radius:8px;padding:6px 9px}
.opo-k span{display:block;font-size:10.5px;color:#556}
.opo-k i{font-style:normal;color:#99a}
.opo-k b{font-size:13px}
.opo h4{margin:14px 0 6px;font-size:13px;color:var(--acc);border-bottom:1px solid var(--acc-line);padding-bottom:3px}
.opo h4 i{font-style:normal;font-size:10.5px;color:#99a;margin-inline-start:6px;letter-spacing:.08em}
.opo-t{width:100%;border-collapse:collapse}
.opo-t th,.opo-t td{border:1px solid #d7dbe0;padding:5px 6px}
.opo-t thead th{background:var(--acc);color:#fff;font-size:11px;font-weight:700}
.opo-t tbody th{background:#f4f6f8;text-align:start;white-space:nowrap}
.opo-t tbody th small{display:block;font-weight:400;color:#667;font-size:10px}
.opo-t td{text-align:center}
.opo-t td small{display:block;color:#667;font-size:10.5px}
.opo-t td.n{text-align:left;white-space:nowrap}
.opo-t td.c{text-align:center}
.opo-t td:nth-child(2){text-align:start}
.opo-zr{color:var(--acc)!important}
.opo-sub{display:flex;gap:14px;flex-wrap:wrap;margin-top:5px;font-size:11.5px;color:#445}
.opo-tot{display:flex;gap:14px;margin-top:10px;align-items:flex-start}
.opo-tot .w{flex:1;background:#f6f7f9;border-radius:8px;padding:8px 10px;font-size:12px}
.opo-tot table{width:250px;border-collapse:collapse}
.opo-tot td{padding:4px 6px;border-bottom:1px dashed #d7dbe0}
.opo-tot td:last-child{text-align:left}
.opo-tot tr.big td{font-size:15px;font-weight:800;color:var(--acc);border-bottom:2px solid var(--acc)}
.opo-tot tr.due td{font-weight:800;color:#b42318}
.opo-ins{border:1px solid var(--acc-line);border-radius:8px;padding:8px 10px;margin-top:10px;display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
.opo-terms{margin-top:12px;font-size:11px;color:#445;border-top:1px solid #d7dbe0;padding-top:6px}
.opo-terms li{margin:2px 0}
.opo-foot{display:flex;justify-content:space-between;margin-top:16px;font-size:11px;color:#667}
.opo-sign{display:flex;justify-content:space-between;margin-top:22px;font-size:12px}
.opo-sign span{border-top:1px solid #99a;padding-top:4px;min-width:150px;text-align:center}
@media print { .opo-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 640px) { .opo-grid { grid-template-columns: repeat(2, 1fr); } .opo-tot { flex-direction: column; } .opo-tot table { width: 100%; } .opo-ins { grid-template-columns: 1fr 1fr; } }
