/* Okaisse. Same look as the PROPHONE POS used-phones screens. */
:root {
  --accent:#0c8a5f; --accent-ink:#fff; --accent-soft:#e2f3ec; --side:#10231c; --side-ink:#e8eef0; --side-muted:#93a8b0; --side-hover:rgba(255,255,255,.08);
  --bg:#f2f5f6; --panel:#fff; --panel-2:#f6f8f9; --text:#10212a; --muted:#61717a; --line:#e2e8eb; --line-2:#cdd6da;
  --danger:#c62828; --danger-soft:#fdecec; --ok:#1b7a3d; --ok-soft:#e6f4ea; --warn:#a15c00; --warn-soft:#fff3dc; --wa:#25d366;
  --radius:12px; --r-sm:8px; --shadow:0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06); --shadow-lg:0 12px 32px rgba(16,24,40,.16);
  --font:system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Arabic", Tahoma, sans-serif;
  color-scheme:light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg:#0e1417; --panel:#162024; --panel-2:#1c282d; --text:#e8eef0; --muted:#94a5ac; --line:#26353b; --line-2:#34464d; --accent-soft:#11372a;
    --danger:#ef6b6b; --danger-soft:#3a1f22; --ok:#4cc27a; --ok-soft:#173022; --warn:#e2a23b; --warn-soft:#382a14;
    --shadow:0 1px 2px rgba(0,0,0,.4); --shadow-lg:0 12px 32px rgba(0,0,0,.5); color-scheme:dark;
  }
}
* { box-sizing:border-box; }
html, body { min-height:100%; }
body { margin:0; font:15px/1.45 var(--font); background:var(--bg); color:var(--text); -webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; }
button, input, select, textarea { font:inherit; color:inherit; }
h1 { font-size:24px; margin:0; letter-spacing:-.01em; } h2, h3 { letter-spacing:-.01em; } h3 { font-size:16px; }
button { border:1px solid var(--line); background:var(--panel); padding:8px 14px; border-radius:var(--r-sm); cursor:pointer; transition:background .12s, border-color .12s; }
button:hover { border-color:var(--line-2); background:var(--panel-2); }
button:disabled { opacity:.6; cursor:default; }
button.primary { background:var(--accent); color:var(--accent-ink); border-color:var(--accent); font-weight:600; }
button.primary:hover { filter:brightness(1.07); background:var(--accent); }
button.danger { color:var(--danger); }
button.big { padding:12px; font-size:16px; }
button.link { border:0; background:none; color:var(--muted); text-decoration:underline; padding:4px; }
button.wa, a.wa { border-color:var(--wa); color:#128c4b; font-weight:600; } button.wa:hover { background:#e9fbf0; }
@media (prefers-color-scheme: dark) { button.wa { color:#4ade80; } button.wa:hover { background:#123222; } }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline:2px solid var(--accent); outline-offset:1px; }
input, select, textarea { border:1px solid var(--line); border-radius:var(--r-sm); padding:9px 11px; background:var(--panel); width:100%; min-width:0; }
input:disabled { background:var(--panel-2); color:var(--muted); }
/* Numbers stay left-to-right in Arabic */
[dir=rtl] input[type=tel], [dir=rtl] input[inputmode=tel], [dir=rtl] input[inputmode=numeric], [dir=rtl] input[inputmode=decimal], [dir=rtl] input[type=number], [dir=rtl] input[type=date] { direction:ltr; text-align:right; }
.muted { color:var(--muted); } .small { font-size:12.5px; } .grow { flex:1; min-width:0; } .warn-text { color:var(--warn); font-weight:600; }
.mono { font-family:ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing:.02em; }
[hidden] { display:none !important; }
body:not(.owner) .owner-only, body:not(.admin) .admin-only, body.admin .shop-only { display:none !important; }
.btn { display:inline-flex; align-items:center; gap:6px; border:1px solid var(--line); background:var(--panel); padding:8px 14px; border-radius:var(--r-sm); color:var(--text); text-decoration:none; }
.btn:hover { background:var(--panel-2); }
.badge { display:inline-block; font-size:11px; padding:1px 8px; border-radius:20px; background:var(--accent-soft); color:var(--accent); font-weight:600; vertical-align:middle; }
.badge.sold { background:var(--danger-soft); color:var(--danger); } .badge.ok { background:var(--ok-soft); color:var(--ok); }
.badge.warn { background:var(--warn-soft); color:var(--warn); } .badge.plain { background:var(--panel-2); color:var(--muted); }
.empty { color:var(--muted); padding:30px 0; text-align:center; grid-column:1 / -1; }

/* ---------- shell: side menu + content ---------- */
body.signed-in { display:grid; grid-template-columns:232px minmax(0, 1fr); min-height:100vh; }
.side { background:var(--side); color:var(--side-ink); display:flex; flex-direction:column; gap:18px; padding:18px 12px; position:sticky; top:0; height:100vh; }
.brand { display:flex; align-items:center; gap:10px; padding:4px 8px; font-weight:700; font-size:16px; min-height:40px; }
.brand img { max-height:38px; max-width:150px; object-fit:contain; border-radius:8px; }
.side nav { display:flex; flex-direction:column; gap:2px; }
.side nav button { display:flex; align-items:center; gap:12px; width:100%; text-align:start; background:transparent; border:0; color:var(--side-muted); padding:10px 12px; font-weight:500; }
.side nav button svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; flex:none; }
.side nav button:hover { background:var(--side-hover); color:var(--side-ink); }
.side nav button.active { background:var(--accent); color:var(--accent-ink); }
.who { margin-top:auto; display:flex; align-items:center; gap:10px; padding:10px 8px 0; border-top:1px solid rgba(255,255,255,.08); font-size:14px; }
.who > span:last-child { display:flex; flex-direction:column; }
.who .link { color:var(--side-muted); padding:0; text-align:start; font-size:13px; }
.avatar { width:36px; height:36px; border-radius:50%; background:var(--accent-soft); color:var(--accent); display:grid; place-items:center; font-weight:700; flex:none; font-size:13px; }
.who .avatar { background:var(--side-hover); color:var(--side-ink); }
.lang-pick { width:auto; }
.side .lang-pick { background:transparent; color:var(--side-ink); border-color:var(--side-hover); margin:0 8px; }
.side .lang-pick option, .mobile-head .lang-pick option { color:#111827; background:#fff; }
main { padding:24px 28px 40px; min-width:0; }
.view { display:none; } .view.active { display:block; animation:fade .18s ease-out; }
@keyframes fade { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:none; } }
.pagehead { display:flex; justify-content:space-between; align-items:flex-end; gap:16px; flex-wrap:wrap; margin-bottom:18px; }
.quick { display:flex; gap:8px; flex-wrap:wrap; }
.panel { background:var(--panel); border:1px solid var(--line); border-radius:var(--radius); padding:16px; box-shadow:var(--shadow); }
.panel h3 { margin:0 0 10px; }
.mobile-head { display:none; align-items:center; gap:10px; padding:10px 12px; padding-top:max(10px, env(safe-area-inset-top)); background:var(--side); color:var(--side-ink); font-weight:700; position:sticky; top:0; z-index:25; }
.mobile-head img { max-height:30px; max-width:120px; object-fit:contain; border-radius:6px; }
.mobile-head .link { color:var(--side-muted); }
.mobile-head .lang-pick { margin-inline-start:auto; padding:4px 6px; font-size:13px; background:transparent; color:var(--side-ink); border-color:var(--side-hover); }
#m-brand { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* ---------- numbers ---------- */
.kpis { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:14px; margin-bottom:14px; }
.kpi { background:var(--panel); border:1px solid var(--line); border-radius:var(--radius); padding:14px 16px; box-shadow:var(--shadow); min-width:0; }
.kpi .k { color:var(--muted); font-size:13px; font-weight:500; display:flex; align-items:center; gap:8px; }
.kpi .k svg { width:18px; height:18px; fill:none; stroke:var(--accent); stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; flex:none; }
.kpi .v { font-size:24px; font-weight:700; margin-top:4px; letter-spacing:-.02em; font-variant-numeric:tabular-nums; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.kpi .d { font-size:12.5px; margin-top:2px; color:var(--muted); }
.report-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; align-items:start; }
.report-grid .wide { grid-column:1 / -1; }
.chart svg { width:100%; height:200px; display:block; overflow:visible; direction:ltr; margin-bottom:6px; }
.chart .gridline { stroke:var(--line); stroke-width:1; } .chart .axis { fill:var(--muted); font-size:11px; }
.chart .col { fill:var(--accent); } .chart .hit { fill:transparent; } .chart g:hover .col { filter:brightness(1.15); }

/* ---------- lists ---------- */
.toolbar { display:flex; gap:8px; align-items:center; margin-bottom:14px; flex-wrap:wrap; }
.toolbar label { display:flex; gap:6px; align-items:center; font-size:13px; color:var(--muted); }
.toolbar label input { width:auto; }
.scan { display:flex; gap:8px; }
.toolbar .scan { min-width:240px; }
.cam-btn { flex:none; display:inline-grid; place-items:center; padding:0 12px; }
.cam-btn svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linejoin:round; }
.seg { display:inline-flex; border:1px solid var(--line); border-radius:var(--r-sm); overflow:hidden; background:var(--panel); }
.seg button { border:0; border-radius:0; border-inline-start:1px solid var(--line); white-space:nowrap; } .seg button:first-child { border-inline-start:0; }
.seg button.active { background:var(--accent-soft); color:var(--accent); font-weight:600; }
.table { width:100%; border-collapse:separate; border-spacing:0; background:var(--panel); border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; }
.table th, .table td { text-align:start; padding:10px 12px; border-bottom:1px solid var(--line); vertical-align:top; }
.table tr:last-child td { border-bottom:0; }
.table th { background:var(--panel-2); font-size:12px; color:var(--muted); font-weight:600; text-transform:uppercase; letter-spacing:.04em; white-space:nowrap; }
.table td.num, .table th.num { text-align:end; white-space:nowrap; font-variant-numeric:tabular-nums; }
.table.compact th, .table.compact td { padding:7px 10px; font-size:14px; }
.panel .table { border-radius:var(--r-sm); }
.table tr.click { cursor:pointer; } .table tr.click:hover td { background:var(--panel-2); }
.table tr.cancelled td, .table tr.off td { opacity:.6; }
.scroll-x { overflow-x:auto; border-radius:var(--radius); }
.rows { display:flex; flex-direction:column; gap:8px; }
.row-card { display:flex; align-items:center; gap:12px; padding:12px 14px; background:var(--panel); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); }
.row-card.off { opacity:.6; }
.row-actions, .row-btns { display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end; align-items:center; }
.row-actions button, .row-actions .btn { padding:6px 10px; }
.row-btns { justify-content:flex-start; }

/* ---------- phones ---------- */
.phone-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(240px, 1fr)); gap:14px; }
.phone-card { display:flex; flex-direction:column; background:var(--panel); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); overflow:hidden; min-width:0; }
.phone-photo { position:relative; border:0; border-radius:0; padding:0; aspect-ratio:4/3; background:var(--panel-2); display:grid; place-items:center; overflow:hidden; width:100%; }
.phone-photo img { width:100%; height:100%; object-fit:cover; }
.no-photo svg { width:46px; height:46px; fill:none; stroke:var(--line-2); stroke-width:1.4; stroke-linecap:round; display:block; }
.sell-phone .no-photo svg { width:30px; height:30px; }
.phone-photo .count { position:absolute; bottom:8px; inset-inline-end:8px; background:rgba(0,0,0,.6); color:#fff; font-size:12px; font-weight:600; padding:2px 8px; border-radius:20px; }
.phone-body { padding:12px 14px 14px; display:flex; flex-direction:column; gap:4px; flex:1; min-width:0; }
.phone-title { font-weight:700; font-size:16px; overflow-wrap:anywhere; }
.tags { display:flex; gap:6px; flex-wrap:wrap; margin:2px 0; }
.phone-foot { display:flex; align-items:center; justify-content:space-between; margin-top:auto; padding-top:6px; gap:8px; }
.phone-foot strong { font-size:19px; white-space:nowrap; }
.phone-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:6px; }
.photos { display:flex; gap:8px; flex-wrap:wrap; }
.ph-item, .ph-add { width:84px; height:84px; border-radius:var(--r-sm); flex:none; }
.ph-item { position:relative; border:1px solid var(--line); overflow:hidden; background:var(--panel-2); }
.ph-item img { width:100%; height:100%; object-fit:cover; }
.ph-item button { position:absolute; top:3px; inset-inline-end:3px; width:26px; height:26px; padding:0; border-radius:50%; background:rgba(0,0,0,.6); color:#fff; border:0; font-size:12px; line-height:1; }
.form .ph-add { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:0; border:2px dashed var(--line-2); color:var(--muted); cursor:pointer; font-size:24px; }
.ph-add span { font-size:11.5px; } .ph-add input { display:none; }
.ph-add:hover { border-color:var(--accent); color:var(--accent); }
.imei-state { font-size:12.5px; min-height:0; }
.imei-state:empty { display:none; }
.imei-state.ok { color:var(--ok); } .imei-state.ok::before { content:'✓ '; }
.imei-state.warn { color:var(--warn); } .imei-state.warn::before, .imei-state.bad::before { content:'⚠ '; }
.imei-state.bad { color:var(--danger); font-weight:600; }
details.seller { border:1px solid var(--line); border-radius:var(--r-sm); padding:10px 12px; background:var(--panel-2); }
details.seller summary { cursor:pointer; font-weight:600; color:var(--text); }
details.seller[open] { display:flex; flex-direction:column; gap:10px; }
.hint { font-size:12px; color:var(--muted); }
.sell-phone { display:flex; gap:12px; align-items:center; padding:10px; border-radius:var(--radius); background:var(--accent-soft); margin-bottom:14px; }
.sell-phone img, .sell-phone .ph { width:64px; height:64px; object-fit:cover; border-radius:var(--r-sm); background:var(--panel); display:grid; place-items:center; font-weight:800; color:var(--muted); flex:none; }
.pay { display:grid; grid-template-columns:repeat(3, 1fr); gap:8px; }
.form .pay label { flex-direction:row; justify-content:center; align-items:center; border:1px solid var(--line); border-radius:var(--r-sm); padding:12px 6px; cursor:pointer; color:var(--text); font-size:15px; background:var(--panel); text-align:center; }
.pay label.on { border-color:var(--accent); background:var(--accent-soft); color:var(--accent); font-weight:600; box-shadow:0 0 0 1px var(--accent) inset; }
.pay input { position:absolute; opacity:0; pointer-events:none; }
.field-label { font-size:13px; color:var(--muted); margin-bottom:-6px; }
.price-input { font-size:20px; font-weight:700; }

/* ---------- forms, dialogs ---------- */
.form { display:flex; flex-direction:column; gap:12px; } .form label { display:flex; flex-direction:column; gap:4px; font-size:13px; color:var(--muted); }
.form label > input, .form label > select, .form label > textarea, .form label > .scan { color:var(--text); font-size:15px; }
.two { display:grid; grid-template-columns:1fr 1fr; gap:12px; } .three { display:grid; grid-template-columns:repeat(3, 1fr); gap:12px; }
.settings-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(340px, 1fr)); gap:16px; align-items:start; }
.settings-grid h3, #shop-add h3, .dialog-block h3 { margin:0; }
.actions { display:flex; gap:8px; justify-content:flex-end; margin-top:6px; flex-wrap:wrap; }
.photo-row { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.logo-preview { max-width:120px; max-height:70px; object-fit:contain; border:1px solid var(--line); border-radius:var(--r-sm); background:#fff; padding:4px; }
.form .photo-btn { flex-direction:row; align-items:center; cursor:pointer; border:1px solid var(--line); border-radius:var(--r-sm); padding:8px 14px; color:var(--text); background:var(--panel); font-size:15px; }
.photo-btn input { display:none; }
.sup-add, .team-add { display:grid; grid-template-columns:2fr 1.3fr 1.3fr auto; gap:8px; margin-bottom:10px; }
.sup-search { margin-bottom:10px; }
dialog { border:0; border-radius:calc(var(--radius) + 4px); padding:0; width:min(620px, 94vw); max-height:92vh; box-shadow:var(--shadow-lg); background:var(--panel); color:var(--text); }
dialog.wide { width:min(880px, 96vw); }
dialog::backdrop { background:rgba(8,20,26,.55); backdrop-filter:blur(2px); }
#modal-body { padding:22px; } #modal-body > h3, #modal-body > form > h3:first-child { margin:0 0 14px; padding-inline-end:44px; }
.modal-x { position:sticky; top:10px; float:inline-end; z-index:5; margin:10px 10px -50px 0; margin-inline:0 10px; width:40px; height:40px; min-height:0; padding:0; border-radius:50%; font-size:24px; line-height:1; display:grid; place-items:center; background:var(--panel-2); border:1px solid var(--line); color:var(--muted); }
.modal-x:hover { color:var(--text); background:var(--line); }
#toast { position:fixed; bottom:24px; left:50%; transform:translateX(-50%); background:var(--text); color:var(--bg); padding:10px 16px; border-radius:10px; opacity:0; transition:opacity .2s; pointer-events:none; max-width:92vw; z-index:60; box-shadow:var(--shadow-lg); text-align:center; }
#toast.show { opacity:1; } #toast.err { background:var(--danger); color:#fff; }

/* ---------- camera ---------- */
dialog.camera { width:min(560px, 96vw); overflow:hidden; }
.cam-head, .cam-foot { display:flex; align-items:center; gap:10px; padding:12px 16px; }
.cam-view { position:relative; background:#000; aspect-ratio:4/3; overflow:hidden; }
.cam-view video { width:100%; height:100%; object-fit:cover; display:block; }
.cam-aim { position:absolute; left:8%; right:8%; top:34%; bottom:34%; border:3px solid rgba(255,255,255,.9); border-radius:12px; box-shadow:0 0 0 999px rgba(0,0,0,.35); }
#cam-msg { font-size:13.5px; color:var(--muted); }
.mod-list { display:grid; gap:4px; }
.id-photos { display:grid; gap:6px; } .id-photos .field-label { margin:0; }
.cam-found { display:grid; gap:8px; padding:14px 16px 0; text-align:center; }
.cam-code { font-size:22px; font-weight:700; letter-spacing:.04em; word-break:break-all; }
.cam-found .imei-state { justify-self:center; }
.cam-found .actions { display:flex; gap:10px; } .cam-found .actions button { flex:1; min-height:48px; }

/* model list under the Model field */
.suggest { max-height:230px; margin-bottom:10px; overflow-y:auto; border:1px solid var(--line); border-radius:var(--r-sm); background:var(--panel); margin-top:-6px; box-shadow:0 6px 18px rgba(0,0,0,.08); }
.suggest button { display:flex; justify-content:space-between; align-items:center; gap:8px; width:100%; padding:10px 12px; border:0; border-bottom:1px solid var(--line); border-radius:0; background:none; text-align:start; font-weight:500; min-height:44px; }
.suggest button:last-child { border-bottom:0; }
.suggest button:hover, .suggest button:focus-visible { background:var(--accent-soft); }
.suggest small { color:var(--muted); font-weight:400; }

/* ---------- sign in ---------- */
.login { min-height:100vh; display:grid; place-items:center; padding:16px; background:radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--accent) 45%, var(--side)), var(--side) 62%); }
.login form { width:min(390px, 100%); padding:26px; box-shadow:var(--shadow-lg); }
.login h2 { margin:0; font-size:22px; }
.login-brand { display:flex; gap:12px; align-items:center; margin-bottom:4px; } .login-brand img { border-radius:10px; }
.login-foot { display:flex; justify-content:space-between; align-items:center; gap:8px; }

/* ---------- invoice (A4) ---------- */
.print-only { display:none; }
.inv-preview { background:#fff; color:#111; border:1px solid var(--line); border-radius:var(--r-sm); padding:28px; max-height:64vh; overflow:auto; }
.inv { position:relative; font:13px/1.45 Arial, Helvetica, "Noto Sans Arabic", Tahoma, sans-serif; color:#111; background:#fff; display:flex; flex-direction:column; gap:16px; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
.inv .pre { white-space:pre-line; }
.inv-head { display:flex; justify-content:space-between; gap:20px; align-items:flex-start; padding-bottom:14px; border-bottom:3px solid var(--inv, #111); }
.inv-shop { display:flex; gap:12px; align-items:flex-start; }
.inv-shop img { max-width:110px; max-height:70px; object-fit:contain; }
.inv.logo-s .inv-shop img { max-width:70px; max-height:45px; } .inv.logo-l .inv-shop img { max-width:170px; max-height:105px; }
.inv-store { font-size:20px; font-weight:800; }
.inv-title { text-align:end; white-space:nowrap; }
.inv-word { font-size:26px; font-weight:800; letter-spacing:.08em; color:var(--inv, #111); }
.inv[dir="rtl"] .inv-word, .inv[dir="rtl"] .inv-label, .inv[dir="rtl"] .inv-table th { letter-spacing:0; }
.inv-label { font-size:11px; text-transform:uppercase; letter-spacing:.08em; color:#666; margin-bottom:3px; font-weight:700; }
.inv-client { padding:10px 14px; background:#f3f5f6; border-radius:6px; }
.inv-table { width:100%; border-collapse:collapse; }
.inv-table th { text-align:start; font-size:11px; text-transform:uppercase; letter-spacing:.06em; background:var(--inv, #111); color:#fff; padding:8px 10px; }
.inv-table td { padding:10px; border-bottom:1px solid #ddd; vertical-align:top; }
.inv-table .num { text-align:end; white-space:nowrap; }
.inv-sub { color:#555; font-size:12px; margin-top:2px; }
.inv-total { align-self:flex-end; min-width:250px; }
.inv-total > div:first-child { display:flex; justify-content:space-between; gap:20px; align-items:baseline; border-top:2px solid var(--inv, #111); padding-top:8px; }
.inv-total strong { font-size:20px; }
.inv-box { border:1px solid #ccc; border-radius:6px; padding:10px 14px; }
.inv-sign { display:grid; grid-template-columns:1fr 1fr; gap:30px; margin-top:10px; }
.inv-sign div { border-top:1px solid #999; padding-top:6px; min-height:70px; font-size:12px; color:#555; }
.inv-foot { text-align:center; color:#555; font-size:12px; border-top:1px solid #ddd; padding-top:8px; }
.inv-stamp { position:absolute; top:150px; left:50%; transform:translateX(-50%) rotate(-14deg); border:5px solid #c62828; color:#c62828; font-size:46px; font-weight:900; letter-spacing:.1em; padding:4px 22px; border-radius:10px; opacity:.75; pointer-events:none; }
.inv-actions .danger { margin-inline-end:auto; }
/* logo centered on top */
.inv.layout-center .inv-head { flex-direction:column; align-items:center; text-align:center; gap:10px; }
.inv.layout-center .inv-shop { flex-direction:column; align-items:center; }
.inv.layout-center .inv-title { text-align:center; display:flex; gap:6px 16px; flex-wrap:wrap; justify-content:center; align-items:baseline; }
/* A5: half an A4 page, everything a little smaller */
.inv.paper-a5 { font-size:11px; gap:10px; }
.inv.paper-a5 .inv-head { gap:12px; padding-bottom:10px; } .inv.paper-a5 .inv-store { font-size:16px; } .inv.paper-a5 .inv-word { font-size:19px; }
.inv.paper-a5 .inv-shop img { max-width:80px; max-height:52px; } .inv.paper-a5.logo-s .inv-shop img { max-width:52px; max-height:34px; } .inv.paper-a5.logo-l .inv-shop img { max-width:125px; max-height:78px; }
.inv.paper-a5 .inv-client, .inv.paper-a5 .inv-box { padding:7px 10px; } .inv.paper-a5 .inv-table th { padding:6px 8px; font-size:9.5px; } .inv.paper-a5 .inv-table td { padding:7px 8px; }
.inv.paper-a5 .inv-table .mono { font-size:10px; } .inv.paper-a5 .inv-sub, .inv.paper-a5 .inv-foot, .inv.paper-a5 .inv-sign div { font-size:10px; }
.inv.paper-a5 .inv-total { min-width:190px; } .inv.paper-a5 .inv-total strong { font-size:16px; }
.inv.paper-a5 .inv-sign { gap:18px; margin-top:4px; } .inv.paper-a5 .inv-sign div { min-height:44px; } .inv.paper-a5 .inv-stamp { font-size:32px; top:110px; }
.inv-preview .inv.paper-a5 { max-width:500px; margin:0 auto; }
.inv-paper { margin-bottom:10px; }
/* invoice color picker */
.swatches { display:flex; gap:10px; flex-wrap:wrap; }
.swatch { position:relative; width:38px; height:38px; border-radius:50%; background:var(--c); border:2px solid var(--line); cursor:pointer; flex:none; }
.swatch input[type=radio] { position:absolute; opacity:0; inset:0; margin:0; cursor:pointer; }
.swatch:has(input:checked) { outline:3px solid var(--accent); outline-offset:2px; }
.swatch.custom { background:conic-gradient(#e11d48, #f59e0b, #16a34a, #0ea5e9, #7c3aed, #e11d48); }
.swatch.custom:has(input:checked) { background:var(--c); }
.swatch input[type=color] { position:absolute; inset:0; width:100%; height:100%; opacity:0; cursor:pointer; border:0; padding:0; }
@media print {
  body, body.signed-in { background:#fff; display:block; padding:0; }
  .no-print, .mobile-head, dialog { display:none !important; }
  .print-only { display:block !important; }
}

/* ---------- smaller screens: menu at the bottom ---------- */
@media (max-width: 1100px) { .kpis { grid-template-columns:repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .report-grid { grid-template-columns:minmax(0, 1fr); } }
@media (max-width: 760px) {
  body.signed-in { display:block; padding-bottom:calc(64px + env(safe-area-inset-bottom)); }
  body.signed-in .mobile-head { display:flex; }
  .side { position:fixed; bottom:0; left:0; right:0; top:auto; height:auto; padding:0 0 env(safe-area-inset-bottom); z-index:30; flex-direction:row; gap:0; }
  .side .brand, .side .who, .side .lang-pick { display:none; }
  .side nav { flex-direction:row; width:100%; overflow-x:auto; scrollbar-width:none; }
  .side nav button { flex:1 0 62px; min-width:0; flex-direction:column; gap:2px; padding:8px 1px 9px; font-size:10.5px; border-radius:0; text-align:center; }
  .side nav button span { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .side nav button.active { background:transparent; color:var(--side-ink); box-shadow:inset 0 3px 0 var(--accent); }
  .side nav button.active svg { stroke:var(--accent); }
  main { padding:14px 12px 24px; }
  h1 { font-size:20px; }
  .pagehead { flex-direction:column; align-items:stretch; gap:10px; margin-bottom:14px; } .pagehead .quick, .pagehead .quick button { flex:1; } .pagehead .quick button { padding:12px; }
  .kpis { gap:8px; } .kpi { padding:10px 12px; } .kpi .v { font-size:19px; } .kpi .d { font-size:11.5px; }
  .toolbar > * { flex:1 1 100%; } .toolbar label { flex:1 1 40%; } .toolbar label input { flex:1; }
  .seg { width:100%; } .seg button { flex:1; padding:9px 4px; font-size:13px; }
  .phone-grid { grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px; }
  .phone-body { padding:10px; } .phone-title { font-size:14.5px; } .phone-foot strong { font-size:16px; }
  .phone-actions { grid-template-columns:1fr; gap:6px; } .phone-actions button { padding:9px 4px; }
  .two, .three { grid-template-columns:1fr; }
  .settings-grid { grid-template-columns:minmax(0, 1fr); }
  .sup-add, .team-add { grid-template-columns:1fr 1fr; } .sup-add input[name=name], .team-add input[name=password] { grid-column:1 / -1; } .sup-add button, .team-add button { grid-column:1 / -1; }
  .row-card { flex-wrap:wrap; } .row-actions { width:100%; justify-content:flex-start; }
  .table th, .table td { padding:8px; font-size:14px; } .hide-sm { display:none; }
  dialog, dialog.wide { width:100vw; max-width:100vw; max-height:94vh; margin:auto 0 0; border-radius:16px 16px 0 0; }
  #modal-body { padding:16px 14px calc(16px + env(safe-area-inset-bottom)); }
  input, select, textarea, .form label > input { font-size:16px; } /* stops iOS zooming into fields */
  #toast { bottom:calc(84px + env(safe-area-inset-bottom)); }
  .inv-preview { padding:10px; max-height:58vh; }
  .inv-preview .inv { font-size:11.5px; gap:12px; } .inv-preview .inv-head { flex-direction:column; gap:8px; } .inv-preview .inv-title { text-align:start; }
  .inv-preview .inv-table th, .inv-preview .inv-table td { padding:6px; } .inv-preview .inv-table .mono { word-break:break-all; font-size:10.5px; }
  .inv-preview .inv-total { min-width:0; align-self:stretch; } .inv-preview .inv-stamp { font-size:30px; top:120px; }
  .inv-actions button { flex:1 1 30%; } .inv-actions .danger { flex-basis:100%; order:9; }
  dialog.camera { width:100vw; } .cam-view { aspect-ratio:3/4; }
}

/* ---------- till (Till & Stock module) ---------- */
.till { display:grid; grid-template-columns:minmax(0, 1fr) 360px; gap:16px; align-items:start; }
.till-scan { margin-bottom:10px; } .till-scan input { font-size:16px; padding:11px 13px; }
.chips { display:flex; gap:6px; overflow-x:auto; padding-bottom:6px; margin-bottom:8px; scrollbar-width:thin; }
.chips button { display:inline-flex; align-items:center; gap:6px; white-space:nowrap; border-radius:20px; padding:6px 12px; font-size:14px; flex:none; }
.chips button.active { background:var(--accent); color:var(--accent-ink); border-color:var(--accent); }
.chips .count { font-size:11.5px; opacity:.7; }
.dot { width:9px; height:9px; border-radius:50%; display:inline-block; flex:none; }
.tile-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(140px, 1fr)); gap:10px; }
.tile { position:relative; display:flex; flex-direction:column; align-items:stretch; gap:3px; padding:8px; text-align:start; min-width:0; border-radius:var(--radius); box-shadow:var(--shadow); }
.tile .pthumb { width:100%; height:88px; border-radius:var(--r-sm); object-fit:cover; margin-bottom:4px; font-size:20px; }
.tile.out { opacity:.5; }
.tile-name { font-weight:600; font-size:14px; line-height:1.25; overflow-wrap:anywhere; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.tile-meta { font-size:12px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tile-price { font-weight:700; margin-top:auto; }
.tile-stock { position:absolute; top:12px; inset-inline-start:12px; background:rgba(0,0,0,.62); color:#fff; font-size:11.5px; font-weight:700; padding:1px 7px; border-radius:20px; }
.tile .fav, .star-btn { position:absolute; top:8px; inset-inline-end:8px; font-size:18px; line-height:1; color:#c9a200; background:rgba(255,255,255,.85); border-radius:50%; width:28px; height:28px; display:grid; place-items:center; }
.tile .fav:not(.on) { color:#888; }
.star-btn { position:static; display:inline-grid; border:0; padding:0; width:24px; height:24px; background:none; font-size:16px; color:var(--muted); } .star-btn.on { color:#c9a200; }
.pthumb { width:44px; height:44px; border-radius:var(--r-sm); object-fit:cover; flex:none; background:var(--panel-2); }
.pthumb.ph, .ph { display:grid; place-items:center; font-weight:800; color:var(--muted); background:var(--panel-2); }
.more { text-align:center; margin:12px 0; }
.cart { position:sticky; top:16px; display:flex; flex-direction:column; gap:10px; max-height:calc(100vh - 40px); }
.cart-head { display:flex; align-items:center; gap:8px; } .cart-head h3 { margin:0; }
.cart-lines { overflow-y:auto; min-height:80px; display:flex; flex-direction:column; }
.cart-lines .empty { padding:20px 0; }
.cart-line { display:flex; gap:10px; padding:10px 0; border-bottom:1px solid var(--line); align-items:flex-start; }
.cart-line .mini { width:38px; height:38px; border-radius:var(--r-sm); object-fit:cover; background:var(--panel-2); display:grid; place-items:center; font-size:12px; font-weight:700; color:var(--muted); flex:none; }
.cart-right { display:flex; flex-direction:column; align-items:flex-end; gap:4px; white-space:nowrap; }
.qty { display:flex; align-items:center; gap:4px; } .qty button:not(.link) { width:30px; height:30px; padding:0; border-radius:50%; font-size:16px; }
.qty span { min-width:20px; text-align:center; font-weight:600; }
.disc-btn { font-size:12.5px; padding:2px 0 !important; } .disc-btn.on { color:var(--ok) !important; font-weight:600; }
.cart-sum { border-top:1px solid var(--line); padding-top:8px; display:flex; flex-direction:column; gap:6px; }
.cart-sum .r { display:flex; justify-content:space-between; align-items:center; gap:10px; font-size:14px; color:var(--muted); }
.cart-sum .r input { width:110px; padding:6px 8px; }
.cart-sum .total { font-size:20px; color:var(--text); } .cart-sum .total strong { font-size:24px; }
.cart-fab { display:none; }
.change { font-size:22px; color:var(--ok); }
.serial-list { display:flex; flex-direction:column; gap:6px; margin-top:12px; max-height:45vh; overflow-y:auto; }
.serial-list > div, .serial-list > button { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:9px 12px; border:1px solid var(--line); border-radius:var(--r-sm); background:var(--panel); text-align:start; }
.serial-list > button span:last-child { color:var(--accent); font-weight:600; }
.rc-row { width:100%; text-align:start; } .rc-row strong { white-space:nowrap; }
/* stock */
#stock-cat { width:auto; max-width:280px; }
.receive { display:flex; align-items:center; gap:12px; margin-bottom:14px; flex-wrap:wrap; padding:12px 14px; }
.pcell { display:flex; align-items:center; gap:10px; }
.pthumb-btn { padding:0; border:0; background:none; border-radius:var(--r-sm); }
.table tr.group td { background:var(--panel-2); padding:7px 12px; } .table tr.group .dot { margin-inline-end:6px; }
.table .sel { width:34px; } .table .sel input { width:18px; height:18px; }
.stock-btns { flex-wrap:nowrap; justify-content:flex-end; } .stock-btns button { padding:6px 10px; white-space:nowrap; }
.imei-find { margin-top:16px; display:flex; flex-direction:column; gap:10px; } .imei-find h3 { margin:0; }
.errors { color:var(--danger); font-size:13.5px; } .errors:empty { display:none; }
.qty-in { width:80px; }
.rep-title { font-size:19px; margin:26px 0 12px; }
/* receipt (80 mm) */
.rcpt-preview { background:#fff; color:#111; border:1px solid var(--line); border-radius:var(--r-sm); padding:14px; max-height:56vh; overflow:auto; display:flex; justify-content:center; }
.rcpt { width:72mm; max-width:100%; font:12px/1.4 ui-monospace, "Courier New", "Noto Sans Arabic", monospace; color:#000; }
.rcpt .c { text-align:center; } .rcpt .big { font-size:15px; font-weight:800; } .rcpt .pre { white-space:pre-line; }
.rcpt .r { display:flex; justify-content:space-between; gap:8px; } .rcpt .r > :last-child { white-space:nowrap; } .rcpt hr { border:0; border-top:1px dashed #000; margin:6px 0; }
.rcpt .rlogo { max-width:46mm; max-height:22mm; object-fit:contain; margin-bottom:4px; }
.rcpt.cancelled { color:#555; }
/* price labels */
.label-preview { display:flex; justify-content:center; padding:12px; background:var(--panel-2); border-radius:var(--r-sm); }
.plabel { box-sizing:border-box; background:#fff; color:#000; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; overflow:hidden; padding:1.2mm 2mm; font:8pt/1.15 Arial, Helvetica, sans-serif; break-inside:avoid; }
.label-preview .plabel { outline:1px dashed #999; }
.plabel .l-store { font-size:6.5pt; text-transform:uppercase; letter-spacing:.04em; }
.plabel .l-name { font-weight:700; max-height:2.4em; overflow:hidden; } .plabel .l-price { font-size:12pt; font-weight:800; }
.plabel .bars { height:8mm; display:block; margin-top:.6mm; } .plabel .bars rect { fill:#000; } .plabel .l-code { font-size:6.5pt; letter-spacing:.05em; }
.plabel.small .bars { height:5mm; } .plabel.small .l-price { font-size:10pt; }
@media print { .labels .plabel { break-after:page; page-break-after:always; } .labels .plabel:last-child { break-after:auto; page-break-after:auto; } }
@media (max-width: 1100px) { .till { grid-template-columns:minmax(0, 1fr) 320px; } }
@media (max-width: 860px) {
  .till { grid-template-columns:minmax(0, 1fr); }
  .cart { position:static; max-height:none; }
  .cart-fab { display:flex; justify-content:space-between; align-items:center; gap:10px; position:fixed; left:12px; right:12px; bottom:calc(72px + env(safe-area-inset-bottom)); z-index:26;
    background:var(--accent); color:var(--accent-ink); border:0; border-radius:14px; padding:13px 16px; font-size:15px; box-shadow:var(--shadow-lg); }
  .cart-fab[hidden] { display:none !important; }
  .cart-fab .go { font-weight:700; background:rgba(255,255,255,.18); padding:4px 12px; border-radius:20px; }
  .cart-fab.bump { animation:bump .25s ease-out; }
  #view-till.active { padding-bottom:70px; }
}
@media (min-width: 861px) { .cart-fab { display:none !important; } }
@keyframes bump { 50% { transform:scale(1.04); } }
@media (max-width: 760px) {
  .tile-grid { grid-template-columns:repeat(2, minmax(0, 1fr)); gap:8px; } .tile .pthumb { height:74px; }
  .receive { flex-direction:column; align-items:stretch; } #stock-cat { max-width:none; }
  .pcell .pthumb { width:40px; height:40px; }
  #stock-table thead { display:none; }
  #stock-table tbody tr:not(.group) { display:grid; grid-template-columns:30px minmax(0, 1fr) auto; grid-template-areas:"sel prod prod" ". price qty" ". act act"; gap:6px 8px; padding:10px 10px 12px; border-bottom:1px solid var(--line); }
  #stock-table tbody tr:not(.group) td { border:0; padding:0; text-align:start; }
  #stock-table .sel { grid-area:sel; width:auto; } #stock-table .c-prod { grid-area:prod; } #stock-table .c-price { grid-area:price; font-weight:700; }
  #stock-table .c-qty { grid-area:qty; text-align:end; } #stock-table .c-act { grid-area:act; }
  #stock-table tr.group td { display:block; }
  #stock-table td.empty { grid-column:1 / -1; }
  .stock-btns { justify-content:flex-start; flex-wrap:wrap; gap:6px; } .stock-btns button { flex:1; padding:7px 8px; font-size:13px; }
}
.m-only { display:none; }
@media (max-width: 760px) { .m-only { display:inline; }
}

/* repairs */
.repair-row { width:100%; text-align:start; display:grid; grid-template-columns:62px minmax(0, 2fr) minmax(0, 1.4fr) 110px 120px 130px; align-items:center; gap:12px; cursor:pointer; }
.repair-row:hover { border-color:var(--accent); }
.repair-row > span { display:flex; flex-direction:column; gap:2px; min-width:0; }
.repair-row .r-main span, .repair-row .r-client span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.repair-row .r-no { color:var(--muted); font-size:13px; } .repair-row .r-total { text-align:end; align-items:flex-end; } .repair-row .r-status { align-items:flex-end; }
.chips.wrap { flex-wrap:wrap; overflow:visible; margin:-4px 0 0; } .chips.wrap button { padding:4px 10px; font-size:13px; }
.checks { display:flex; flex-wrap:wrap; gap:6px 16px; margin-top:8px; }
.rd-head h3 { margin:0 0 4px; display:flex; align-items:center; gap:8px; flex-wrap:wrap; } .rd-head { margin-bottom:12px; }
.seg.steps { display:flex; align-items:stretch; margin-bottom:14px; } .seg.steps button { flex:1; }
.rd-info { display:grid; grid-template-columns:repeat(auto-fill, minmax(220px, 1fr)); gap:8px 18px; margin-bottom:12px; }
.rd-info > div { display:flex; flex-direction:column; gap:1px; } .rd-info .k { font-size:12px; color:var(--muted); }
.rd-sub { margin:16px 0 6px; }
.rd-parts .num-in { width:110px; text-align:end; }
.rd-totals { display:flex; flex-direction:column; gap:4px; margin:12px 0; padding:12px 14px; background:var(--panel-2); border-radius:var(--r-sm); }
.rd-totals > div { display:flex; justify-content:space-between; gap:12px; } .rd-totals .big { font-size:17px; }
.actions.wrap { flex-wrap:wrap; }
.sp-list { max-height:50vh; overflow-y:auto; } .sp-item { width:100%; text-align:start; gap:10px; cursor:pointer; } .sp-item .grow { flex:1; min-width:0; }
@media (max-width: 860px) {
  .repair-row { grid-template-columns:minmax(0, 1fr) auto; grid-template-areas:"main status" "client total" "no when"; gap:4px 10px; }
  .repair-row .r-main { grid-area:main; } .repair-row .r-status { grid-area:status; } .repair-row .r-client { grid-area:client; }
  .repair-row .r-total { grid-area:total; } .repair-row .r-no { grid-area:no; } .repair-row .r-when { grid-area:when; text-align:end; align-items:flex-end; }
  .seg.steps button { font-size:12px; padding:8px 2px; white-space:normal; }
}

/* clients */
.client-row { width:100%; text-align:start; display:grid; grid-template-columns:36px minmax(0, 1.3fr) minmax(0, 1.5fr) auto; align-items:center; gap:12px; cursor:pointer; }
.client-row:hover, .hist-row:hover { border-color:var(--accent); }
.client-row .c-main { display:flex; flex-direction:column; gap:2px; min-width:0; } .client-row .c-stats { min-width:0; } .client-row .c-debt { text-align:end; }
.kpis.mini { grid-template-columns:repeat(3, minmax(0, 1fr)); }
.pay-debt { margin:4px 0 8px; } .pay-debt h4 { margin:0; }
.hist-row { width:100%; text-align:start; display:grid; grid-template-columns:minmax(0, 1fr) auto auto; gap:12px; align-items:center; cursor:pointer; padding:10px 12px; }
.hist-row .h-label, .hist-row .h-total { display:flex; flex-direction:column; gap:2px; min-width:0; } .hist-row .h-total { align-items:flex-end; }
.pay-row { padding:8px 12px; } .pay-row .grow { flex:1; min-width:0; }
.credit-box { display:flex; flex-direction:column; gap:10px; padding:10px 12px; border:1px dashed var(--line-2); border-radius:var(--r-sm); }
.inv-credit { margin-top:6px; font-size:13px; } .inv-credit .r { display:flex; justify-content:space-between; gap:16px; } .inv-credit .big { font-weight:700; font-size:15px; }
@media (max-width: 760px) {
  .client-row { grid-template-columns:36px minmax(0, 1fr) auto; } .client-row .c-stats { grid-column:2 / -1; grid-row:2; }
  .kpis.mini { grid-template-columns:repeat(3, minmax(0, 1fr)); }
  .hist-row { grid-template-columns:minmax(0, 1fr) auto; } .hist-row > .muted { grid-column:1; grid-row:2; } .hist-row .h-total { grid-row:1 / 3; grid-column:2; }
}

/* subscription banner, first steps, platform admin */
.sub-banner { display:flex; align-items:center; gap:10px 14px; flex-wrap:wrap; padding:10px 14px; border-radius:var(--radius); margin-bottom:14px; background:var(--accent-soft); color:var(--accent); font-weight:600; }
.support-bar { position:sticky; top:0; z-index:30; display:flex; align-items:center; gap:10px 14px; flex-wrap:wrap; padding:10px 14px; border-radius:var(--radius); margin-bottom:14px; background:#7c3aed; color:#fff; font-weight:600; }
.support-bar span { flex:1; min-width:200px; } .support-bar button { background:#fff; color:#5b21b6; border-color:#fff; }
.sub-banner span { flex:1; min-width:200px; } .sub-banner button { background:var(--panel); }
.sub-banner.warn { background:var(--warn-soft); color:var(--warn); } .sub-banner.bad { background:var(--danger-soft); color:var(--danger); }
.welcome { margin-bottom:14px; } .welcome-shop { margin-top:14px; padding-top:14px; border-top:1px solid var(--line); max-width:560px; } .welcome-shop h4 { margin:0; } .welcome-shop p { margin:0; } .welcome-head { display:flex; justify-content:space-between; align-items:center; gap:8px; } .welcome h3 { margin:0; }
.steps { list-style:none; padding:0; margin:10px 0 0; display:grid; grid-template-columns:repeat(auto-fit, minmax(210px, 1fr)); gap:8px; counter-reset:step; }
.steps button { width:100%; height:100%; text-align:start; display:flex; gap:10px; align-items:center; }
.steps button::before { counter-increment:step; content:counter(step); width:24px; height:24px; border-radius:50%; background:var(--accent-soft); color:var(--accent); display:grid; place-items:center; font-weight:700; flex:none; font-size:13px; }
.steps .done button { color:var(--muted); } .steps .done button::before { content:'✓'; background:var(--ok); color:#fff; }
.form label.check { flex-direction:row; align-items:center; gap:10px; color:var(--text); font-size:15px; } .form label.check input { width:auto; flex:none; }
.hp { position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden; }
.platform-line { margin:-4px 0 14px; }
.note-line { margin-top:4px; padding:4px 8px; border-radius:6px; background:var(--warn-soft); color:var(--text); display:inline-block; }
.dialog-block { margin:16px 0; padding:14px; border:1px solid var(--line); border-radius:var(--radius); background:var(--panel-2); }
#signup-form { width:min(480px, 100%); }
@media (max-width: 760px) {
  #shop-filter { overflow-x:auto; } #shop-filter button { flex:none; padding:9px 10px; }
  .steps { grid-template-columns:1fr 1fr; } .steps button { font-size:13px; padding:8px; gap:8px; }
}

/* Today screen and day summary */
.dash-h { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.dash-h button.link { font-size:13px; font-weight:500; }
.dash-att { display:flex; flex-wrap:wrap; gap:8px; margin:-2px 0 14px; }
.dash-att .badge { border:0; font-size:13px; padding:6px 12px; cursor:pointer; }
.dash-list { display:flex; flex-direction:column; }
.dash-row { display:flex; align-items:center; gap:10px; padding:9px 2px; border:0; border-top:1px solid var(--line); background:none; color:inherit; text-align:start; width:100%; font:inherit; border-radius:0; }
.dash-list > :first-child { border-top:0; }
button.dash-row { cursor:pointer; } button.dash-row:hover { background:var(--panel-2); }
.dash-row .grow { display:flex; flex-direction:column; min-width:0; }
.dash-row .grow > * { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dash-row strong { white-space:nowrap; font-variant-numeric:tabular-nums; }
.dash-row .wa { border:1px solid var(--wa); color:#128c4b; border-radius:20px; padding:2px 10px; font-weight:600; }
.dash-owed { margin-bottom:6px; } .dash-owed strong { font-size:20px; }
.delta { font-weight:700; } .delta.up { color:var(--ok); } .delta.down { color:var(--danger); }
.ds-table tfoot th { border-top:2px solid var(--line); padding-top:8px; }
.ds-facts { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:12px 0; }
.ds-facts > div { display:flex; justify-content:space-between; gap:8px; background:var(--panel-2); border-radius:var(--r-sm); padding:8px 10px; }
@media (max-width: 600px) { .ds-facts { grid-template-columns:1fr; } }
.form label.check.off { opacity:.55; } .form label.check.sub { margin-inline-start:28px; font-size:13.5px; }
/* on-screen number pad (till) */
.pad-toggle { padding:3px 10px; font-size:13px; font-weight:700; border-radius:20px; } .pad-toggle.on { background:var(--accent); color:var(--accent-ink); border-color:var(--accent); }
.numpad { display:grid; grid-template-columns:repeat(3, 1fr); gap:6px; }
.numpad button { height:46px; font-size:20px; font-weight:700; padding:0; font-variant-numeric:tabular-nums; touch-action:manipulation; }
.numpad [data-k="enter"] { grid-column:span 2; }
#pay-pad { max-width:320px; }
.examples-note { display:flex; align-items:center; gap:14px; margin-bottom:14px; border-color:var(--warn); background:var(--warn-soft); }
@media (max-width: 600px) { .examples-note { flex-direction:column; align-items:stretch; } }

/* loyalty program */
.badge.vip.silver { background:#e6e9ee; color:#475467; } .badge.vip.gold { background:#fdf0c4; color:#8a5a00; }
:root[data-theme="dark"] .badge.vip.silver { background:#2b333b; color:#cdd5df; } :root[data-theme="dark"] .badge.vip.gold { background:#3a2f0e; color:#f3c96b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .badge.vip.silver { background:#2b333b; color:#cdd5df; } :root:not([data-theme="light"]) .badge.vip.gold { background:#3a2f0e; color:#f3c96b; } }
.loyal-card { display:flex; align-items:center; gap:10px 14px; flex-wrap:wrap; margin:12px 0 4px; padding:12px 14px; border-radius:var(--radius); background:var(--panel-2); border:1px solid var(--line); }
.loyal-card.gold { border-color:#e8c766; } .loyal-card.silver { border-color:#c3cad4; }
.loyal-pts { font-size:20px; margin:2px 0; }
.loyal-moves { margin:6px 0 12px; gap:0; } .loyal-move { display:flex; gap:10px; padding:6px 2px; border-bottom:1px solid var(--line); } .loyal-move:last-child { border-bottom:0; }
.loyal-move .pos { color:var(--ok); } .loyal-move .neg { color:var(--danger); }
.pay-points { margin-top:10px; padding:10px 12px; border-radius:var(--r-sm); background:var(--accent-soft); }
.pay-points label.check { font-weight:600; }
