/* ============================================================================
 * ATQ POS shared styles — sourced from D:\Projects\Claude\mockups\pos\_shared.css
 * Used by PosLayout, PosHome, PosRegister, PosReceipts, PosHeld, PosSettings.
 * All classes are .pos-* prefixed — no conflict with Tailwind or app.css.
 * ========================================================================== */

:root {
    --pos-bg:           #020617;  /* slate-950   — page bg */
    --pos-panel:        #0f172a;  /* slate-900   — topbar / nav / cards */
    --pos-tile:         #1e293b;  /* slate-800   — buttons, tiles, KPIs */
    --pos-tile-hover:   #334155;  /* slate-700 */
    --pos-border:       #334155;  /* slate-700 */
    --pos-text:         #f1f5f9;  /* slate-100 */
    --pos-text-muted:   #94a3b8;  /* slate-400 */
    --pos-accent:       #6366f1;  /* indigo-500 */
    --pos-accent-hover: #4f46e5;
    --pos-success:      #10b981;  /* emerald-500 */
    --pos-warning:      #f59e0b;  /* amber-500 */
    --pos-danger:       #ef4444;  /* red-500 */
    --pos-info:         #3b82f6;  /* blue-500 */
    --pos-touch:        3rem;     /* 48px touch target */
    --pos-radius:       0.75rem;  /* 12px */
}

/* ── Shell + layout ─────────────────────────────────────────────────────── */
.pos-shell      { height: 100vh; display: flex; flex-direction: column; overflow: hidden; background: var(--pos-bg); color: var(--pos-text); font-family: 'Inter', system-ui, -apple-system, sans-serif; }
/* Arabic (RTL) uses the same self-hosted Droid Arabic Kufi as the ERP (@font-face in tailwind-input.css). */
[dir="rtl"] .pos-shell { font-family: 'Droid Arabic Kufi', 'Tajawal', system-ui, sans-serif; }
.pos-main       { flex: 1; display: flex; min-height: 0; }
/* Page host — flex column so pages either fill it (register) or scroll inside it (home/receipts). */
.pos-main-body  { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.pos-content    { flex: 1; min-height: 0; padding: 1.25rem; overflow: auto; }

/* ── Topbar ─────────────────────────────────────────────────────────────── */
.pos-topbar         { height: 64px; flex-shrink: 0; background: var(--pos-panel); border-bottom: 1px solid var(--pos-border); display: flex; align-items: center; padding: 0 1rem; gap: 1rem; }
.pos-topbar-brand   { display: flex; align-items: center; gap: .75rem; font-weight: 600; font-size: 18px; color: var(--pos-text); }
.pos-topbar-brand .pos-logo { width: 40px; height: 40px; border-radius: 8px; background: linear-gradient(135deg, var(--pos-accent), #8b5cf6); display: grid; place-items: center; color: white; font-weight: 700; }
.pos-topbar-brand .pos-tenant-muted { color: var(--pos-text-muted); font-weight: 400; }
.pos-topbar-actions { margin-inline-start: auto; display: flex; gap: .5rem; align-items: center; }

.pos-shift-pill         { display: inline-flex; align-items: center; gap: .5rem; padding: .375rem .75rem; border-radius: 999px; background: rgba(16,185,129,.15); border: 1px solid rgba(16,185,129,.4); color: var(--pos-success); font-size: 13px; font-weight: 500; }
.pos-shift-pill .dot    { width: 8px; height: 8px; border-radius: 50%; background: var(--pos-success); animation: pos-pulse 2s infinite; }
.pos-shift-pill.closed  { background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.35); color: var(--pos-danger); }
.pos-shift-pill.closed .dot { background: var(--pos-danger); animation: none; }
@keyframes pos-pulse { 0%,100% { opacity: 1; } 50% { opacity: .5; } }

.pos-user-chip       { display: flex; align-items: center; gap: .5rem; padding: 0 .5rem; }
.pos-user-chip .avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--pos-accent); display: grid; place-items: center; font-weight: 600; color: white; font-size: 13px; }
.pos-user-chip .who   { font-size: 13px; line-height: 1.3; }
.pos-user-chip .who .name { color: var(--pos-text); }
.pos-user-chip .who .sub  { color: var(--pos-text-muted); font-size: 11px; }

/* ── Icon button (square 48px) ──────────────────────────────────────────── */
.pos-icon-btn { width: var(--pos-touch); height: var(--pos-touch); border-radius: var(--pos-radius); background: var(--pos-tile); border: 1px solid var(--pos-border); color: var(--pos-text); display: grid; place-items: center; cursor: pointer; transition: background .15s; }
.pos-icon-btn:hover { background: var(--pos-tile-hover); }

/* ── Buttons (touch-sized) ──────────────────────────────────────────────── */
.pos-btn        { height: var(--pos-touch); min-width: var(--pos-touch); padding: 0 1.25rem; border-radius: var(--pos-radius); background: var(--pos-tile); border: 1px solid var(--pos-border); color: var(--pos-text); font-size: 15px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; transition: background .15s, transform .1s; cursor: pointer; font-family: inherit; }
.pos-btn:hover  { background: var(--pos-tile-hover); }
.pos-btn:active { transform: scale(.97); }
.pos-btn:disabled, .pos-btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.pos-btn-accent  { background: var(--pos-accent); border-color: var(--pos-accent); color: white; }
.pos-btn-accent:hover { background: var(--pos-accent-hover); }
.pos-btn-success { background: var(--pos-success); border-color: var(--pos-success); color: white; }
.pos-btn-success:hover { filter: brightness(1.1); }
.pos-btn-danger  { background: var(--pos-danger); border-color: var(--pos-danger); color: white; }
.pos-btn-warning { background: var(--pos-warning); border-color: var(--pos-warning); color: #1e293b; }
.pos-btn-ghost   { background: transparent; }
.pos-btn-lg      { height: 4rem; padding: 0 1.5rem; font-size: 17px; }
.pos-btn-xl      { height: 5rem; padding: 0 2rem; font-size: 19px; font-weight: 600; }
.pos-btn-cta     { height: 64px; font-size: 20px; font-weight: 700; }

/* ── Nav rail (vertical icon strip) ────────────────────────────────────── */
.pos-navrail        { width: 88px; flex-shrink: 0; background: var(--pos-panel); border-inline-end: 1px solid var(--pos-border); display: flex; flex-direction: column; padding: .75rem .5rem; gap: .5rem; }
.pos-navrail-item   { width: 100%; aspect-ratio: 1; border-radius: var(--pos-radius); background: transparent; border: none; color: var(--pos-text-muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem; font-size: 11px; cursor: pointer; transition: background .15s, color .15s; font-family: inherit; }
.pos-navrail-item:hover  { background: var(--pos-tile); color: var(--pos-text); }
.pos-navrail-item.active { background: var(--pos-accent); color: white; }
.pos-navrail-item svg    { width: 28px; height: 28px; }
.pos-navrail-item.pinned-bottom { margin-top: auto; }

/* ── Cards + tiles ──────────────────────────────────────────────────────── */
.pos-card { background: var(--pos-panel); border: 1px solid var(--pos-border); border-radius: var(--pos-radius); padding: 1.25rem; }
.pos-tile { background: var(--pos-tile); border: 1px solid var(--pos-border); border-radius: var(--pos-radius); padding: 1rem; min-height: 96px; display: flex; flex-direction: column; cursor: pointer; transition: all .15s; }
.pos-tile:hover    { background: var(--pos-tile-hover); border-color: var(--pos-accent); }
.pos-tile.selected { background: rgba(99,102,241,.15); border-color: var(--pos-accent); }

.pos-section-title { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--pos-text-muted); font-weight: 600; margin-bottom: .75rem; }
.pos-field-label   { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--pos-text-muted); margin-bottom: .35rem; }

/* ── KPI card (used by PosHome) ────────────────────────────────────────── */
.pos-kpi { background: var(--pos-tile); border-radius: var(--pos-radius); padding: 1rem; }
.pos-kpi .label  { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--pos-text-muted); }
.pos-kpi .value  { font-size: 26px; font-weight: 700; margin-top: .25rem; }
.pos-kpi .delta  { font-size: 12px; color: var(--pos-success); margin-top: .25rem; }
.pos-kpi .delta.muted   { color: var(--pos-text-muted); }
.pos-kpi .delta.warn    { color: var(--pos-warning); }

/* ── Quick-action tile (used by PosHome) ───────────────────────────────── */
.pos-qa-tile { background: var(--pos-tile); border: 1px solid var(--pos-border); border-radius: var(--pos-radius); padding: 1.25rem; text-align: center; cursor: pointer; transition: all .15s; min-height: 120px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: .5rem; color: var(--pos-text); }
.pos-qa-tile:hover    { border-color: var(--pos-accent); background: var(--pos-tile-hover); }
.pos-qa-tile svg      { width: 36px; height: 36px; color: var(--pos-accent); }
.pos-qa-tile span     { font-size: 14px; font-weight: 500; }
.pos-qa-tile.disabled { opacity: .45; cursor: not-allowed; }
.pos-qa-tile.disabled:hover { background: var(--pos-tile); border-color: var(--pos-border); }

/* ── Receipt row (used by PosHome side panel) ──────────────────────────── */
.pos-receipt-row { display: flex; justify-content: space-between; padding: .75rem 0; border-bottom: 1px solid var(--pos-border); font-size: 14px; }
.pos-receipt-row:last-child { border-bottom: none; }
.pos-receipt-row .num   { color: var(--pos-text-muted); font-family: monospace; }
.pos-receipt-row .total { font-weight: 600; }

/* ── Register (mockup 07) ──────────────────────────────────────────────── */
.pos-reg-root      { display: flex; flex-direction: column; flex: 1; min-height: 0; background: var(--pos-bg); }
.pos-reg-statusbar { display: flex; align-items: center; gap: .75rem; padding: .4rem 1rem; background: var(--pos-panel); border-bottom: 1px solid var(--pos-border); flex-shrink: 0; font-size: 12px; color: var(--pos-text-muted); }
.pos-reg-layout    { flex: 1; min-height: 0; display: grid; grid-template-columns: 176px 1fr 384px; }

/* category rail */
.pos-cat-rail       { background: var(--pos-panel); border-inline-end: 1px solid var(--pos-border); padding: .6rem .55rem; overflow-y: auto; display: flex; flex-direction: column; gap: .45rem; }
.pos-cat-rail-label { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--pos-text-muted); font-weight: 600; padding: .15rem .25rem .25rem; }
.pos-cat            { padding: .7rem .5rem; background: var(--pos-tile); border: 1px solid var(--pos-border); border-radius: var(--pos-radius); cursor: pointer; text-align: center; transition: all .15s; min-height: 72px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: .3rem; color: var(--pos-text); font-family: inherit; }
.pos-cat:hover      { background: var(--pos-tile-hover); }
.pos-cat.active     { background: var(--pos-accent); border-color: var(--pos-accent); color: white; }
.pos-cat .cat-thumb { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, #475569, #1e293b); display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #fff; }
.pos-cat.active .cat-thumb { background: rgba(255,255,255,.2); }
.pos-cat .cat-name  { font-size: 12.5px; font-weight: 500; line-height: 1.2; }

/* catalog column */
.pos-catalog        { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.pos-scan-row       { padding: .6rem 1rem; border-bottom: 1px solid var(--pos-border); flex-shrink: 0; }
.pos-scan-box       { background: var(--pos-bg); border: 2px solid var(--pos-accent); border-radius: var(--pos-radius); padding: 0 1rem; height: 46px; display: flex; align-items: center; gap: .75rem; box-shadow: 0 0 0 4px rgba(99,102,241,.12); }
.pos-scan-box input { background: transparent; border: none; outline: none; color: var(--pos-text); font-size: 16px; flex: 1; font-family: inherit; }
.pos-scan-box .hint { font-size: 11px; color: var(--pos-text-muted); white-space: nowrap; }
.pos-item-grid      { padding: 1rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .7rem; overflow-y: auto; align-content: start; flex: 1; min-height: 0; }
.pos-item-tile      { background: var(--pos-tile); border: 1px solid var(--pos-border); border-radius: var(--pos-radius); padding: .65rem; cursor: pointer; transition: all .1s; display: flex; flex-direction: column; gap: .35rem; min-height: 128px; text-align: start; color: var(--pos-text); font-family: inherit; }
.pos-item-tile:hover  { background: var(--pos-tile-hover); border-color: var(--pos-accent); transform: translateY(-1px); }
.pos-item-tile:active { transform: scale(.97); }
.pos-item-tile .thumb { height: 58px; background: linear-gradient(135deg, #334155, #1e293b); border-radius: 6px; display: grid; place-items: center; font-size: 22px; font-weight: 700; color: #cbd5e1; overflow: hidden; }
.pos-item-tile .thumb img { width: 100%; height: 100%; object-fit: cover; }
.pos-item-tile .name  { font-size: 12.5px; font-weight: 500; line-height: 1.25; min-height: 30px; }
.pos-item-tile .meta  { font-size: 11px; color: var(--pos-text-muted); }
.pos-item-tile .price { font-size: 14px; font-weight: 700; color: var(--pos-accent); margin-top: auto; font-variant-numeric: tabular-nums; }
.pos-catalog-footer { display: flex; align-items: center; gap: .5rem; padding: .5rem 1rem; border-top: 1px solid var(--pos-border); flex-shrink: 0; }

/* cart column */
.pos-cart           { background: var(--pos-panel); border-inline-start: 1px solid var(--pos-border); display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; }
.pos-cart-header    { padding: .8rem 1.1rem; border-bottom: 1px solid var(--pos-border); display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; }
.pos-cart-header .title { font-weight: 600; font-size: 16px; }
.pos-cart-header .sub   { font-size: 12px; color: var(--pos-text-muted); }
.pos-cart-lines     { flex: 1; min-height: 0; overflow-y: auto; }
.pos-cart-empty     { padding: 1rem 1.1rem; font-size: 13px; color: var(--pos-text-muted); }
.pos-cart-line      { padding: .6rem 1.1rem; display: grid; grid-template-columns: 40px 1fr auto; gap: .6rem; border-bottom: 1px solid var(--pos-border); align-items: center; }
.pos-cart-line .thumb   { width: 40px; height: 40px; border-radius: 6px; background: linear-gradient(135deg, #334155, #1e293b); display: grid; place-items: center; font-size: 15px; font-weight: 700; color: #cbd5e1; }
.pos-cart-line .ci-name { font-size: 13.5px; font-weight: 500; }
.pos-cart-line .ci-meta { font-size: 11px; color: var(--pos-text-muted); margin-top: 1px; }
.pos-cart-line .ci-right { text-align: end; }
.pos-cart-line .ci-price { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pos-qty-row   { display: flex; align-items: center; gap: .3rem; margin-top: .25rem; justify-content: flex-end; }
.pos-qty-btn   { width: 28px; height: 28px; border-radius: 6px; background: var(--pos-tile); border: 1px solid var(--pos-border); color: var(--pos-text); font-size: 15px; cursor: pointer; font-family: inherit; }
.pos-qty-btn.danger { background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.3); color: var(--pos-danger); }
.pos-qty-val   { min-width: 22px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13px; }

/* totals + actions + pay (pinned at the bottom of the cart) */
.pos-totals-region { padding: .7rem 1.1rem; border-top: 1px solid var(--pos-border); background: var(--pos-bg); flex-shrink: 0; }
.pos-trow       { display: flex; justify-content: space-between; padding: .2rem 0; font-size: 13px; }
.pos-trow.grand { font-size: 22px; font-weight: 700; border-top: 1px solid var(--pos-border); padding-top: .5rem; margin-top: .25rem; }
.pos-cart-actions { padding: .7rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; flex-shrink: 0; }
.pos-cart-actions .pos-btn { font-size: 13px; height: 42px; padding: 0 .25rem; }
.pos-pay-btn    { margin: 0 .7rem .7rem; height: 64px; font-size: 20px; font-weight: 700; flex-shrink: 0; }

/* ── Held sales (mockup 09) ────────────────────────────────────────────── */
.pos-held-grid       { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.pos-held-card       { background: var(--pos-panel); border: 1px solid var(--pos-border); border-radius: var(--pos-radius); padding: 1.25rem; display: flex; flex-direction: column; gap: .75rem; transition: all .15s; }
.pos-held-card:hover { border-color: var(--pos-accent); transform: translateY(-2px); }
.pos-held-card .head { display: flex; justify-content: space-between; align-items: baseline; }
.pos-held-card .ref  { font-family: monospace; font-size: 12px; color: var(--pos-text-muted); }
.pos-held-card .age  { font-size: 11px; padding: .15rem .5rem; border-radius: 999px; background: var(--pos-tile); color: var(--pos-text-muted); white-space: nowrap; }
.pos-held-card .age.warn { background: rgba(245,158,11,.15); color: var(--pos-warning); }
.pos-held-card .customer { font-size: 16px; font-weight: 600; }
.pos-held-card .meta { font-size: 12px; color: var(--pos-text-muted); }
.pos-held-card .items { font-size: 13px; line-height: 1.5; max-height: 132px; overflow: hidden; background: var(--pos-bg); padding: .5rem .75rem; border-radius: 6px; }
.pos-held-card .items .row { display: flex; justify-content: space-between; padding: .15rem 0; gap: .5rem; }
.pos-held-card .items .row .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pos-held-card .items .more { color: var(--pos-text-muted); padding-top: .25rem; }
.pos-held-card .total-row { display: flex; justify-content: space-between; font-size: 16px; font-weight: 600; padding-top: .5rem; border-top: 1px solid var(--pos-border); }
.pos-held-card .actions { display: grid; grid-template-columns: 1fr auto; gap: .5rem; }

/* ── Returns (mockup 16) ───────────────────────────────────────────────── */
.pos-ret-layout   { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 400px; }
.pos-ret-main     { padding: 1.25rem; overflow: auto; min-width: 0; }
.pos-ret-side     { background: var(--pos-panel); border-inline-start: 1px solid var(--pos-border); display: flex; flex-direction: column; overflow-y: auto; }
.pos-find-bar     { display: flex; gap: .5rem; margin-bottom: 1.25rem; }
.pos-find-box     { flex: 1; background: var(--pos-panel); border: 1px solid var(--pos-border); border-radius: var(--pos-radius); padding: 0 1rem; height: 52px; display: flex; align-items: center; gap: .75rem; }
.pos-find-box input { background: transparent; border: none; outline: none; color: var(--pos-text); font-size: 16px; flex: 1; font-family: inherit; }
.pos-orig-invoice { background: var(--pos-panel); border: 1px solid var(--pos-border); border-radius: var(--pos-radius); overflow: hidden; }
.pos-orig-head    { padding: 1rem 1.25rem; border-bottom: 1px solid var(--pos-border); display: flex; justify-content: space-between; align-items: center; background: var(--pos-bg); gap: 1rem; }
.pos-orig-head .inv  { font-size: 18px; font-weight: 700; }
.pos-orig-head .meta { font-size: 12px; color: var(--pos-text-muted); margin-top: .15rem; }
.pos-orig-head .badge { padding: .2rem .65rem; border-radius: 999px; font-size: 11px; background: rgba(16,185,129,.15); color: var(--pos-success); white-space: nowrap; }
.pos-ret-line     { padding: .85rem 1.25rem; display: grid; grid-template-columns: 1fr auto auto auto; gap: .85rem; align-items: center; border-bottom: 1px solid var(--pos-border); }
.pos-ret-line:last-child { border-bottom: none; }
.pos-ret-line.selected { background: rgba(245,158,11,.08); }
.pos-ret-line.disabled { opacity: .4; }
.pos-ret-line .nm   { font-weight: 500; font-size: 14px; }
.pos-ret-line .sub  { font-size: 11px; color: var(--pos-text-muted); margin-top: .15rem; }
.pos-ret-line .sold { text-align: center; font-size: 12px; color: var(--pos-text-muted); }
.pos-ret-line .amt  { font-weight: 700; min-width: 80px; text-align: end; font-variant-numeric: tabular-nums; }
.pos-ret-line .qty-in { width: 64px; background: var(--pos-bg); border: 1px solid var(--pos-border); border-radius: 6px; padding: .4rem; color: var(--pos-text); text-align: end; font-family: inherit; }
.pos-side-section { padding: 1.25rem; border-bottom: 1px solid var(--pos-border); }
.pos-side-section h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--pos-text-muted); margin: 0 0 .75rem; font-weight: 600; }
.pos-input, .pos-select { background: var(--pos-bg); border: 1px solid var(--pos-border); border-radius: 8px; padding: .65rem .75rem; color: var(--pos-text); width: 100%; font-size: 14px; font-family: inherit; }
.pos-summary-row  { display: flex; justify-content: space-between; padding: .35rem 0; font-size: 14px; }
.pos-summary-row.grand { font-size: 24px; font-weight: 700; color: var(--pos-warning); border-top: 2px solid var(--pos-border); padding-top: .75rem; margin-top: .5rem; }
.pos-tender-opt   { padding: .75rem; background: var(--pos-tile); border: 2px solid var(--pos-border); border-radius: 8px; display: flex; align-items: center; gap: .5rem; font-size: 14px; }
.pos-tender-opt.active   { border-color: var(--pos-accent); background: rgba(99,102,241,.1); }
.pos-tender-opt.disabled { opacity: .45; }
.pos-refund-bar   { padding: 1.25rem; margin-top: auto; }
.pos-refund-bar button { width: 100%; height: 64px; font-size: 20px; font-weight: 700; }

/* ── Receipt detail drawer (mockup 06) ─────────────────────────────────── */
.pos-drawer-backdrop { position: fixed; inset: 0; background: rgba(2,6,23,.6); backdrop-filter: blur(2px); z-index: 30; }
.pos-drawer       { position: fixed; top: 0; inset-inline-end: 0; bottom: 0; width: min(560px, 95vw); background: var(--pos-panel); border-inline-start: 1px solid var(--pos-border); box-shadow: -20px 0 40px rgba(0,0,0,.4); display: flex; flex-direction: column; z-index: 31; }
.pos-drawer-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--pos-border); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.pos-drawer-header .inv-no { font-size: 22px; font-weight: 700; }
.pos-drawer-header .inv-meta { color: var(--pos-text-muted); font-size: 13px; margin-top: .15rem; }
.pos-drawer-body  { flex: 1; overflow: auto; padding: 1.25rem; }
.pos-drawer-footer { padding: 1rem 1.25rem; border-top: 1px solid var(--pos-border); display: flex; gap: .5rem; flex-wrap: wrap; flex-shrink: 0; }
.pos-rd-line      { display: grid; grid-template-columns: 1fr auto auto; gap: .75rem; padding: .6rem 0; border-bottom: 1px dashed var(--pos-border); align-items: baseline; font-size: 14px; }
.pos-rd-line:last-child { border-bottom: none; }
.pos-rd-line .qty   { font-variant-numeric: tabular-nums; color: var(--pos-text-muted); }
.pos-rd-line .amount { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 90px; text-align: end; }

/* ── Payment dialog (mockup 08) ────────────────────────────────────────── */
.pos-modal-backdrop2 { position: fixed; inset: 0; background: rgba(2,6,23,.8); backdrop-filter: blur(8px); display: grid; place-items: center; z-index: 50; }
.pos-modal2          { background: var(--pos-panel); border: 1px solid var(--pos-border); border-radius: var(--pos-radius); width: 900px; max-width: 95vw; max-height: 92vh; display: flex; flex-direction: column; box-shadow: 0 25px 50px rgba(0,0,0,.5); }
.pos-modal2-header   { padding: 1rem 1.25rem; border-bottom: 1px solid var(--pos-border); display: flex; align-items: center; justify-content: space-between; }
.pos-modal2-title    { font-size: 18px; font-weight: 600; }
.pos-modal2-body     { padding: 1.25rem; overflow: auto; }
.pos-modal2-footer   { padding: 1rem 1.25rem; border-top: 1px solid var(--pos-border); }
.pos-keypad          { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.pos-key             { height: 3.5rem; border-radius: var(--pos-radius); background: var(--pos-tile); border: 1px solid var(--pos-border); color: var(--pos-text); font-size: 22px; font-weight: 600; cursor: pointer; font-family: inherit; transition: background .1s; }
.pos-key:hover       { background: var(--pos-tile-hover); }
.pos-key:active      { background: var(--pos-accent); color: white; }
.pos-key.danger      { background: rgba(239,68,68,.15); color: var(--pos-danger); border-color: rgba(239,68,68,.3); }
.pos-pay-grid        { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1.25rem; }
.pos-tender-tabs     { display: grid; grid-template-columns: repeat(auto-fit, minmax(86px, 1fr)); gap: .5rem; margin-bottom: 1rem; }
.pos-tender-tab      { padding: .75rem .4rem; background: var(--pos-tile); border: 2px solid var(--pos-border); border-radius: var(--pos-radius); cursor: pointer; text-align: center; transition: all .15s; color: var(--pos-text); font-family: inherit; }
.pos-tender-tab:hover  { background: var(--pos-tile-hover); }
.pos-tender-tab.active { background: var(--pos-accent); border-color: var(--pos-accent); color: white; }
.pos-tender-tab .icon  { font-size: 22px; display: block; margin-bottom: .2rem; }
.pos-tender-tab .lbl   { font-size: 12.5px; font-weight: 500; line-height: 1.2; }
.pos-amount-display  { background: var(--pos-bg); border: 1px solid var(--pos-border); border-radius: var(--pos-radius); padding: .85rem 1.1rem; margin-bottom: .75rem; display: flex; justify-content: space-between; align-items: baseline; }
.pos-amount-display .label { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--pos-text-muted); }
.pos-amount-display .value { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pos-quick-amts      { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin-bottom: .75rem; }
.pos-quick-amt       { padding: .55rem; background: var(--pos-tile); border: 1px solid var(--pos-border); border-radius: 8px; font-size: 14px; cursor: pointer; color: var(--pos-text); font-family: inherit; }
.pos-quick-amt:hover { background: var(--pos-tile-hover); }
.pos-balance-row     { display: flex; justify-content: space-between; padding: .4rem 0; font-size: 15px; border-bottom: 1px dashed var(--pos-border); }
.pos-balance-row:last-of-type { border-bottom: none; }
.pos-balance-row.due { font-size: 22px; font-weight: 700; padding: .75rem 0 .5rem; border-bottom: 2px solid var(--pos-border); }
.pos-balance-row.change    { font-size: 19px; font-weight: 700; color: var(--pos-success); }
.pos-balance-row.remaining { color: var(--pos-warning); font-weight: 600; }
.pos-tender-item     { display: flex; justify-content: space-between; align-items: center; padding: .5rem .75rem; background: var(--pos-tile); border-radius: 8px; margin-bottom: .25rem; font-size: 14px; }

/* ── Language toggle (topbar) — modern two-segment pill ────────────────── */
.pos-lang-toggle { display: inline-flex; align-items: center; gap: 2px; height: 40px; padding: 3px; background: var(--pos-tile); border: 1px solid var(--pos-border); border-radius: 999px; }
.pos-lang-toggle button { border: none; background: transparent; color: var(--pos-text-muted); border-radius: 999px; height: 100%; min-width: 42px; padding: 0 .9rem; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; transition: background .15s, color .15s; }
.pos-lang-toggle button:hover { color: var(--pos-text); }
.pos-lang-toggle button.active { background: var(--pos-accent); color: #fff; }
.pos-lang-toggle button.ar { font-family: 'Droid Arabic Kufi', 'Tajawal', system-ui, sans-serif; }

/* ── Settings (mockup 14) ──────────────────────────────────────────────── */
.pos-settings-shell { display: grid; grid-template-columns: 240px 1fr; max-width: 1280px; margin: 0 auto; gap: 1.5rem; }
.pos-settings-nav   { display: flex; flex-direction: column; gap: .25rem; align-self: start; position: sticky; top: 0; }
.pos-settings-nav .nav-section { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--pos-text-muted); padding: .75rem .75rem .25rem; font-weight: 600; }
.pos-settings-nav button { display: flex; align-items: center; gap: .5rem; padding: .65rem .75rem; border-radius: var(--pos-radius); background: transparent; border: none; color: var(--pos-text); font-size: 14px; cursor: pointer; text-align: start; width: 100%; font-family: inherit; }
.pos-settings-nav button:hover  { background: var(--pos-tile); }
.pos-settings-nav button.active { background: var(--pos-accent); color: white; }
.pos-card-section { background: var(--pos-panel); border: 1px solid var(--pos-border); border-radius: var(--pos-radius); margin-bottom: 1rem; }
.pos-card-head    { padding: 1rem 1.25rem; border-bottom: 1px solid var(--pos-border); display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.pos-card-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.pos-card-body    { padding: 1.25rem; }
.pos-status-pill  { font-size: 12px; padding: .15rem .65rem; border-radius: 999px; display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap; }
.pos-status-pill.green { background: rgba(16,185,129,.15); color: var(--pos-success); }
.pos-status-pill.red   { background: rgba(239,68,68,.15); color: var(--pos-danger); }
.pos-status-pill.amber { background: rgba(245,158,11,.15); color: var(--pos-warning); }
.pos-row-form     { display: grid; grid-template-columns: 200px 1fr; gap: 1rem; align-items: center; padding: .5rem 0; }
.pos-row-form label  { font-size: 13px; color: var(--pos-text-muted); }
.pos-row-form .val   { font-size: 14px; }
.pos-row-form .val.mono { font-family: monospace; word-break: break-all; }
.pos-bridge-offline { display: grid; grid-template-columns: auto 1fr; gap: 1rem; padding: 1rem; background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.25); border-radius: var(--pos-radius); align-items: center; }

/* ── Customer Lookup drawer (mockup 20) — Phase D ──────────────────────── */
.pos-cust-pill { display: inline-flex; align-items: center; gap: .5rem; height: 32px; padding: 0 .85rem; background: var(--pos-tile); border: 1px solid var(--pos-border); border-radius: 999px; font-size: 13px; cursor: pointer; color: var(--pos-text); font-family: inherit; max-width: 100%; }
.pos-cust-pill:hover { background: var(--pos-tile-hover); border-color: var(--pos-accent); }
.pos-cust-pill .av { width: 22px; height: 22px; border-radius: 50%; background: var(--pos-accent); color: #fff; font-weight: 700; font-size: 11px; display: grid; place-items: center; flex: 0 0 auto; }
.pos-cust-pill .av.cash { background: var(--pos-text-muted); }
.pos-cust-pill .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pos-cust-pill .close { margin-inline-start: .25rem; background: transparent; border: none; color: var(--pos-text-muted); cursor: pointer; padding: 0; line-height: 1; font-size: 16px; }
.pos-cust-pill .close:hover { color: var(--pos-danger); }

.pos-drawer { position: fixed; top: 0; inset-inline-end: 0; bottom: 0; width: min(520px, 96vw); background: var(--pos-panel); border-inline-start: 1px solid var(--pos-border); box-shadow: -20px 0 40px rgba(0,0,0,.4); display: flex; flex-direction: column; z-index: 50; }
.pos-drawer-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--pos-border); display: flex; justify-content: space-between; align-items: center; }
.pos-drawer-header .title { font-size: 18px; font-weight: 600; }
.pos-drawer-body { flex: 1; overflow: auto; padding: 1.25rem; }
.pos-drawer-footer { padding: 1rem 1.25rem; border-top: 1px solid var(--pos-border); display: flex; gap: .5rem; }
.pos-drawer-footer button { flex: 1; height: 52px; font-size: 15px; font-weight: 600; }

.pos-cust-search { background: var(--pos-bg); border: 1px solid var(--pos-border); border-radius: var(--pos-radius); padding: 0 1rem; height: 52px; display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.pos-cust-search input { background: transparent; border: none; outline: none; color: var(--pos-text); font-size: 16px; flex: 1; min-width: 0; font-family: inherit; }
.pos-cust-search:focus-within { border-color: var(--pos-accent); }

.pos-cust-divider { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--pos-text-muted); margin: 1.5rem 0 .75rem; font-weight: 600; }
.pos-cust-divider:first-child { margin-top: 0; }

.pos-cust-card { padding: 1rem; background: var(--pos-bg); border: 1px solid var(--pos-border); border-radius: var(--pos-radius); margin-bottom: .5rem; display: grid; grid-template-columns: 48px 1fr auto; gap: .85rem; align-items: center; cursor: pointer; transition: border-color .15s, background .15s; text-align: start; width: 100%; color: inherit; font-family: inherit; }
.pos-cust-card:hover { border-color: var(--pos-accent); }
.pos-cust-card.selected { border-color: var(--pos-accent); background: rgba(99,102,241,.08); }
.pos-cust-card .av { width: 48px; height: 48px; border-radius: 50%; background: var(--pos-accent); display: grid; place-items: center; font-weight: 700; font-size: 18px; color: #fff; }
.pos-cust-card .av.b2b { background: var(--pos-info, #3b82f6); }
.pos-cust-card .nm { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.pos-cust-card .meta { font-size: 12px; color: var(--pos-text-muted); margin-top: .15rem; }
.pos-cust-card .right { text-align: end; font-size: 12px; color: var(--pos-text-muted); }
.pos-cust-tier { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.pos-cust-tier.b2b { background: rgba(59,130,246,.2); color: #60a5fa; }
.pos-cust-tier.walk { background: rgba(148,163,184,.18); color: #cbd5e1; }
.pos-cust-empty { text-align: center; color: var(--pos-text-muted); padding: 2rem 1rem; font-size: 14px; }

/* ── Hardware Bridge (mockup 14) — Phase D ─────────────────────────────── */
.pos-bridge-banner { display:grid; grid-template-columns:auto 1fr auto; gap:1rem; padding:1rem; border-radius:var(--pos-radius); align-items:center; margin-bottom:1rem; border:1px solid; }
.pos-bridge-banner.green { background:rgba(16,185,129,.08);  border-color:rgba(16,185,129,.25); }
.pos-bridge-banner.amber { background:rgba(245,158,11,.08);  border-color:rgba(245,158,11,.25); }
.pos-bridge-banner.red   { background:rgba(239,68,68,.08);   border-color:rgba(239,68,68,.25); }
.pos-bridge-banner .pulse { width:12px; height:12px; border-radius:50%; }
.pos-bridge-banner.green .pulse { background:var(--pos-success); animation:pulse 2s infinite; }
.pos-bridge-banner.amber .pulse { background:var(--pos-warning); animation:pulse 1s infinite; }
.pos-bridge-banner.red   .pulse { background:var(--pos-danger); }
.pos-bridge-banner .info strong { display:block; font-size:15px; }
.pos-bridge-banner .info .meta  { font-size:12px; color:var(--pos-text-muted); margin-top:.25rem; }

@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:.35; } }

.pos-bridge-toggle { width:44px; height:24px; background:var(--pos-border); border-radius:999px; position:relative; cursor:pointer; transition:background .15s; flex:0 0 auto; }
.pos-bridge-toggle::after { content:""; width:18px; height:18px; border-radius:50%; background:#fff; position:absolute; top:3px; left:3px; transition:left .2s; }
.pos-bridge-toggle.on { background:var(--pos-success); }
.pos-bridge-toggle.on::after { left:23px; }
[dir="rtl"] .pos-bridge-toggle::after { left:auto; right:3px; transition:right .2s; }
[dir="rtl"] .pos-bridge-toggle.on::after { right:23px; left:auto; }

.pos-bridge-hw-list { display:flex; flex-direction:column; gap:.5rem; }
.pos-bridge-hw      { padding:.75rem; background:var(--pos-tile); border:1px solid var(--pos-border); border-radius:8px;
                      display:grid; grid-template-columns:28px 1fr auto auto; gap:.75rem; align-items:center; font-size:14px; }
.pos-bridge-hw.offline { opacity:.55; }
.pos-bridge-hw .icon  { font-size:22px; }
.pos-bridge-hw .meta  { font-size:11px; color:var(--pos-text-muted); margin-top:.15rem; }

.pos-bridge-log     { background:var(--pos-bg); border:1px solid var(--pos-border); border-radius:8px; padding:.75rem;
                      font-family:monospace; font-size:12px; color:var(--pos-text-muted); margin-top:.75rem; max-height:160px; overflow-y:auto; line-height:1.7; }
.pos-bridge-log .ok  { color:var(--pos-success); }
.pos-bridge-log .err { color:var(--pos-danger); }
.pos-bridge-log .info { color:var(--pos-text-muted); }

/* ── Scrollbar tweak (POS pages only — scoped via .pos-shell ancestor) ── */
.pos-shell ::-webkit-scrollbar { width: 10px; height: 10px; }
.pos-shell ::-webkit-scrollbar-thumb { background: var(--pos-border); border-radius: 5px; }
.pos-shell ::-webkit-scrollbar-thumb:hover { background: var(--pos-tile-hover); }
.pos-shell ::-webkit-scrollbar-track { background: var(--pos-bg); }
