/* SimShomos design system: Tajawal, light teal/mint surfaces, navy text, gold accents. */
:root {
  --navy: #0b1f3a;
  --navy-2: #1c3355;
  --muted: #5d7188;
  --soft: #8a9bb0;
  --teal: #0fa896;
  --teal-d: #0b8678;
  --teal-l: #d9f3ee;
  --mint: #eef9f6;
  --bg: #f3fbf8;
  --card: #ffffff;
  --line: #d6ebe5;
  --gold: #e8b64a;
  --gold-d: #b98a1f;
  --gold-l: #fdf3d9;
  --red: #d64545;
  --red-l: #fdeaea;
  --green: #12a05c;
  --green-l: #e3f6ec;
  --amber: #e39b19;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(11, 31, 58, .05), 0 6px 18px rgba(11, 31, 58, .06);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Tajawal", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  background: var(--bg);
  color: var(--navy);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
a { color: var(--teal-d); text-decoration: none; }
.ic { width: 1.15em; height: 1.15em; vertical-align: -0.2em; flex: none; }
.sar { display: inline-block; width: .8em; height: 1em; vertical-align: -.12em; color: var(--soft); margin-inline-start: .2em; font-size: .85em; }
.sar svg { width: 100%; height: 100%; display: block; }
.d-none { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.fw { font-weight: 700; }
.ltr { direction: ltr; unicode-bidi: plaintext; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  border: 1px solid transparent; border-radius: 12px; padding: .55rem 1.05rem;
  font-weight: 700; cursor: pointer; background: var(--teal); color: #fff; line-height: 1.3;
  transition: background .15s, box-shadow .15s, transform .05s;
}
.btn:hover { background: var(--teal-d); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-light { background: #fff; color: var(--navy); border-color: var(--line); }
.btn-light:hover { background: var(--mint); }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: #dba838; }
.btn-danger { background: var(--red-l); color: var(--red); border-color: #f3c7c7; }
.btn-danger:hover { background: #fadada; }
.btn-block { width: 100%; }
.btn-lg { padding: .8rem 1.2rem; font-size: 1.05rem; border-radius: 14px; }
.btn-sm { padding: .3rem .7rem; font-size: .85rem; border-radius: 10px; }

/* forms */
label.lbl { display: block; font-weight: 700; margin-bottom: .3rem; font-size: .9rem; }
.input, select.input, textarea.input {
  width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 12px;
  padding: .6rem .8rem; outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(15, 168, 150, .15); }
.field { margin-bottom: 1rem; }
.phone-row { display: flex; gap: .5rem; direction: ltr; }
.phone-row select { width: 10.5rem; flex: none; }
.phone-row input { flex: 1; text-align: left; }
.alert { border-radius: 12px; padding: .65rem .9rem; margin-bottom: 1rem; font-size: .92rem; }
.alert-err { background: var(--red-l); color: #9d2b2b; }
.alert-ok { background: var(--green-l); color: #0c6b3d; }
.alert-warn { background: var(--gold-l); color: #7a5a10; }

/* auth */
.auth-body { min-height: 100vh; display: flex; flex-direction: column; background:
  radial-gradient(1000px 500px at 100% -10%, #d9f3ee 0%, transparent 60%),
  radial-gradient(800px 400px at -10% 110%, #fdf3d9 0%, transparent 55%), var(--bg); }
.auth-top { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.4rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.25rem; color: var(--navy); }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(135deg, var(--teal), #2cc7b4); display: grid; place-items: center; color: #fff; }
.brand-mark .ic { width: 20px; height: 20px; }
.auth-main { flex: 1; display: grid; place-items: center; padding: 1rem; }
.auth-card { width: 100%; max-width: 430px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 2rem 1.7rem; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 1.5rem; margin: 0 0 1.2rem; }
.auth-foot { text-align: center; margin-top: 1.1rem; color: var(--muted); font-size: .92rem; }

/* app shell */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 248px; flex: none; background: var(--navy); color: #cfe0f2; padding: 1rem .8rem; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .brand { color: #fff; padding: .4rem .6rem 1rem; }
.nav a { display: flex; align-items: center; gap: .7rem; padding: .62rem .8rem; border-radius: 11px; color: #cfe0f2; font-weight: 600; margin-bottom: 2px; }
.nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav a.active { background: var(--teal); color: #fff; }
.nav .sep { height: 1px; background: rgba(255, 255, 255, .1); margin: .6rem .4rem; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { background: #fff; border-bottom: 1px solid var(--line); padding: .7rem 1.3rem; display: flex; align-items: center; gap: 1rem; position: sticky; top: 0; z-index: 20; }
.topbar .shop { font-weight: 800; }
.topbar .grow { flex: 1; }
.pill { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .65rem; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--teal-l); color: var(--teal-d); }
.pill.gold { background: var(--gold-l); color: var(--gold-d); }
.pill.red { background: var(--red-l); color: var(--red); }
.content { padding: 1.4rem; max-width: 1280px; width: 100%; }
.menu-btn { display: none; }
.sub-banner { background: var(--gold-l); color: #7a5a10; padding: .55rem 1.3rem; font-weight: 600; font-size: .92rem; display: flex; gap: .6rem; align-items: center; justify-content: space-between; }
.sub-banner.red { background: var(--red-l); color: #9d2b2b; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: 1.2rem; }
.page-title { font-size: 1.45rem; font-weight: 800; margin: 0; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 .8rem; font-size: 1.02rem; display: flex; align-items: center; gap: .5rem; }
.grid { display: grid; gap: 1rem; }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g2 { grid-template-columns: 5fr 7fr; }
.stat { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem; }
.stat .lab { color: var(--muted); font-size: .88rem; font-weight: 600; }
.stat .num { font-size: 1.6rem; font-weight: 800; line-height: 1.25; }
.stat .sub { color: var(--soft); font-size: .8rem; }
.stat .ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--teal-l); color: var(--teal-d); flex: none; }
.stat .ico.gold { background: var(--gold-l); color: var(--gold-d); }
.stat .ico.red { background: var(--red-l); color: var(--red); }
.stat .ico.green { background: var(--green-l); color: var(--green); }
.num.red { color: var(--red); } .num.green { color: var(--green); }
.empty { text-align: center; color: var(--soft); padding: 1.6rem .5rem; }
.empty .ic { width: 2rem; height: 2rem; display: block; margin: 0 auto .4rem; opacity: .6; }
.bars .row { display: flex; align-items: center; gap: .7rem; margin-bottom: .75rem; }
.bars .name { width: 4.5rem; font-weight: 600; font-size: .9rem; }
.bars .track { flex: 1; height: 12px; background: var(--mint); border-radius: 999px; overflow: hidden; }
.bars .fill { height: 100%; border-radius: 999px; background: var(--teal); }
.bars .fill.hold { background: var(--amber); } .bars .fill.ready { background: var(--green); }
.bars .cnt { width: 2rem; text-align: left; font-weight: 800; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: start; color: var(--muted); font-size: .82rem; font-weight: 700; padding: .5rem .6rem; border-bottom: 1px solid var(--line); }
.tbl td { padding: .6rem; border-bottom: 1px solid #eaf4f0; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .e { text-align: end; }

/* ===== POS ===== */
.pos-body { height: 100vh; overflow: hidden; display: flex; flex-direction: column; background: var(--bg); }
.pos-bar { background: #fff; border-bottom: 1px solid var(--line); padding: .55rem .9rem; display: flex; align-items: center; gap: .6rem; flex: none; }
.pos-bar .search { flex: 1; max-width: 460px; position: relative; }
.pos-bar .search .ic { position: absolute; inset-inline-start: .75rem; top: 50%; transform: translateY(-50%); color: var(--soft); }
.pos-bar .search input { padding-inline-start: 2.3rem; }
.pos-bar .grow { flex: 1; }
.pos-main { flex: 1; min-height: 0; display: grid; grid-template-columns: 360px 1fr; }
.pos-main .pos-right { order: -1; }
.pos-left { overflow-y: auto; padding: .9rem; }
.pos-right { background: #fff; border-inline-start: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip { padding: .38rem .95rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 700; cursor: pointer; font-size: .9rem; user-select: none; }
.chip:hover { border-color: var(--teal); }
.chip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.seg { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.seg label { padding: .3rem .95rem; border-radius: 999px; cursor: pointer; font-weight: 700; font-size: .9rem; }
.seg input { display: none; }
.seg input:checked + span { color: #fff; }
.seg label:has(input:checked) { background: var(--teal); color: #fff; }
.filters { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .7rem; margin-bottom: .9rem; }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: .65rem; }
.item { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: .8rem .6rem .7rem; text-align: center; cursor: pointer; user-select: none; transition: border-color .12s, box-shadow .12s, transform .05s; min-height: 84px; display: flex; flex-direction: column; justify-content: center; gap: .15rem; }
.item:hover { border-color: var(--teal); box-shadow: var(--shadow); }
.item:active { transform: scale(.98); }

.item .nm { font-weight: 700; }
.item .pr { color: var(--teal-d); font-weight: 800; }
.item .badge { position: absolute; top: -7px; inset-inline-start: -7px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; background: var(--gold); color: var(--navy); font-weight: 800; font-size: .8rem; display: grid; place-items: center; }
.lines { flex: 1; min-height: 0; overflow-y: auto; padding: .5rem; }
.pos-empty { text-align: center; color: var(--soft); padding: 3rem 1rem; }
.pos-empty .ic { width: 2.6rem; height: 2.6rem; display: block; margin: 0 auto .5rem; opacity: .5; }
.line { display: flex; align-items: center; gap: .55rem; padding: .55rem .6rem; border-radius: 12px; border: 1px solid transparent; }
.line + .line { margin-top: 2px; }
.line.sel { background: var(--mint); border-color: var(--line); }
.line .info { flex: 1; min-width: 0; }
.line .ln { font-weight: 700; }
.line .ls { color: var(--muted); font-size: .8rem; }
.line .lt { font-weight: 800; white-space: nowrap; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.qty button { width: 28px; height: 30px; border: 0; background: #fff; cursor: pointer; display: grid; place-items: center; }
.qty button:hover { background: var(--mint); }
.qty span { min-width: 30px; text-align: center; font-weight: 800; }
.rm { border: 0; background: transparent; color: var(--soft); cursor: pointer; padding: 4px; border-radius: 8px; }
.rm:hover { color: var(--red); background: var(--red-l); }
.order-foot { border-top: 1px solid var(--line); padding: .8rem .9rem; display: grid; gap: .6rem; background: #fff; }
.actions2 { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.act { display: flex; align-items: center; justify-content: center; gap: .45rem; padding: .55rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; font-weight: 700; font-size: .9rem; }
.act:hover { background: var(--mint); }
.act.has { background: var(--teal-l); border-color: var(--teal); color: var(--teal-d); }
.act .bal { background: var(--gold-l); color: var(--gold-d); border-radius: 999px; padding: 0 .5rem; font-size: .78rem; }
.totals > div { display: flex; justify-content: space-between; font-size: .92rem; padding: 1px 0; }
.totals .grand { font-size: 1.2rem; font-weight: 800; border-top: 1px dashed var(--line); margin-top: .3rem; padding-top: .4rem; }
.disc-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.disc-row input { width: 6rem; padding: .25rem .5rem; text-align: left; }
.paybtn { width: 100%; }

/* modal */
.modal { position: fixed; inset: 0; background: rgba(11, 31, 58, .5); display: none; align-items: center; justify-content: center; z-index: 100; padding: 1rem; }
.modal.open { display: flex; }
.modal-box { background: #fff; border-radius: 18px; width: 100%; max-width: 480px; max-height: 92vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 60px rgba(11, 31, 58, .3); }
.modal-box.wide { max-width: 980px; height: 86vh; }
.modal-head { display: flex; align-items: center; gap: .6rem; padding: .85rem 1.1rem; border-bottom: 1px solid var(--line); }
.modal-head h4 { margin: 0; font-size: 1.1rem; flex: 1; }
.modal-body { padding: 1.1rem; overflow-y: auto; flex: 1; min-height: 0; }
.modal-foot { padding: .8rem 1.1rem; border-top: 1px solid var(--line); display: flex; gap: .5rem; }
.modal-foot .btn { flex: 1; }
.x { border: 0; background: transparent; cursor: pointer; padding: 6px; border-radius: 9px; color: var(--muted); }
.x:hover { background: var(--mint); }
.crow { display: flex; align-items: center; gap: .7rem; padding: .6rem .7rem; border-radius: 12px; cursor: pointer; }
.crow:hover { background: var(--mint); }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--teal-l); color: var(--teal-d); display: grid; place-items: center; font-weight: 800; flex: none; }
.crow .cn { font-weight: 700; } .crow .cm { color: var(--muted); font-size: .82rem; }
.crow .grow { flex: 1; min-width: 0; }
.addon-row { display: flex; align-items: center; gap: .7rem; padding: .65rem .4rem; border-bottom: 1px solid #eaf4f0; cursor: pointer; }
.addon-row input { width: 18px; height: 18px; accent-color: var(--teal); }
.addon-row .nm { flex: 1; font-weight: 600; }
.paygrid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.paybig { font-size: 2.4rem; font-weight: 800; text-align: center; color: var(--teal-d); padding: .6rem 0 .2rem; }
.payline { display: flex; justify-content: space-between; padding: .35rem 0; border-bottom: 1px dashed var(--line); }
.methods { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-bottom: .8rem; }
.method { padding: .7rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; font-weight: 800; display: flex; justify-content: center; align-items: center; gap: .45rem; }
.method.on { background: var(--teal); color: #fff; border-color: var(--teal); }
.numpad { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; margin-top: .8rem; }
.numpad button { padding: .75rem 0; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-weight: 800; font-size: 1.1rem; cursor: pointer; }
.numpad button:hover { background: var(--mint); }
.numpad button.q { background: var(--gold-l); border-color: #f0dca4; color: #7a5a10; }
.inv-split { display: grid; grid-template-columns: 1fr 380px; height: 100%; }
.inv-listcol { display: flex; flex-direction: column; min-height: 0; border-inline-end: 1px solid var(--line); }
.inv-tools { padding: .8rem; display: grid; gap: .6rem; border-bottom: 1px solid var(--line); }
.inv-body { flex: 1; overflow-y: auto; padding: .4rem; min-height: 0; }
.inv-card { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .7rem .8rem; border-radius: 12px; cursor: pointer; border-inline-start: 4px solid var(--line); margin-bottom: 4px; background: #fff; }
.inv-card:hover { background: var(--mint); }
.inv-card.sel { background: var(--teal-l); }
.inv-card.st-Open { border-inline-start-color: var(--teal); }
.inv-card.st-Hold { border-inline-start-color: var(--amber); }
.inv-card.st-Ready { border-inline-start-color: var(--green); }
.inv-card.st-Delivered { border-inline-start-color: var(--navy); }
.inv-card.st-Cancelled { border-inline-start-color: var(--red); opacity: .75; }
.inv-detailcol { display: flex; flex-direction: column; min-height: 0; background: var(--bg); }
.inv-detail { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.inv-detail .scroll { flex: 1; overflow-y: auto; padding: .9rem; }
.inv-actions { border-top: 1px solid var(--line); background: #fff; padding: .8rem; display: grid; gap: .5rem; }
.inv-placeholder { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; color: var(--soft); text-align: center; padding: 2rem; }
.inv-placeholder .ic { width: 2.6rem; height: 2.6rem; opacity: .5; }
.toast { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; padding: .6rem 1.1rem; border-radius: 12px; z-index: 300; font-weight: 700; box-shadow: var(--shadow); }
.toast.err { background: var(--red); }

/* receipt (thermal 80mm) */
.thermal { width: 80mm; max-width: 100%; margin: 0 auto; background: #fff; color: #000; font-family: Tajawal, "IBM Plex Sans Arabic", sans-serif; font-size: 12px; line-height: 1.5; padding: 8px 10px; direction: rtl; }
.thermal-stage { background: #eef0f3; padding: 16px; display: flex; justify-content: center; }
.thermal-stage .thermal { box-shadow: 0 4px 24px rgba(0,0,0,.12); border-radius: 6px; }
.t-head { text-align: center; }
.t-shop { font-size: 16px; font-weight: 800; line-height: 1.25; }
.t-sub { font-size: 11px; }
.t-invno { font-size: 22px; font-weight: 900; letter-spacing: .5px; margin-top: 6px; direction: ltr; }
.t-sep { border-top: 1px dashed #000; margin: 6px 0; }
.t-meta > div, .t-totals > div { display: flex; justify-content: space-between; gap: 8px; }
.t-meta span:first-child { color: #333; }
.t-items { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.t-items th { font-weight: 700; border-bottom: 1px solid #000; padding: 2px 0; text-align: start; }
.t-items td { padding: 3px 0; vertical-align: top; }
.t-items td:first-child, .t-items th:first-child { width: 100%; }
.t-items .c { text-align: center; white-space: nowrap; }
.t-items .e { text-align: end; white-space: nowrap; padding-inline-start: 6px; }
.t-items small { display: block; color: #555; font-size: 10px; }
.t-totals { font-size: 12px; }
.t-grand { font-size: 15px; font-weight: 800; border-top: 1px solid #000; margin-top: 4px; padding-top: 4px; }
.t-sar { font-style: normal; font-size: .7em; font-weight: 700; }
.t-foot { text-align: center; font-size: 11px; }
#printMount { display: none; }
@media print {
  body.printing > *:not(#printMount) { display: none !important; }
  body.printing #printMount { display: block !important; }
  body.printing #printMount .thermal { width: 76mm; max-width: 76mm; margin: 0 auto; padding: 2mm 0; box-shadow: none; border-radius: 0; }
  @page { size: 80mm auto; margin: 0; }
}

@media (max-width: 1000px) {
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .g2 { grid-template-columns: 1fr; }
  .paygrid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .sidebar { position: fixed; inset-inline-start: -260px; top: 0; z-index: 60; transition: inset-inline-start .2s; }
  .sidebar.open { inset-inline-start: 0; }
  .menu-btn { display: inline-flex; }
  .content { padding: 1rem; }
}

.receipt-pair { display: flex; flex-direction: column; gap: 14px; align-items: center; width: 100%; }
.receipt-pair > div { width: 100%; }
.thermal.en { direction: ltr; text-align: left; }
.thermal.en .t-items th, .thermal.en .t-items td { text-align: left; }
.thermal.en .t-items .c { text-align: center; } .thermal.en .t-items .e { text-align: right; }
.lang-sw { font-weight: 700; }
.pill + .pill { margin-inline-start: .2rem; }
.btn .pill { padding: 0 .35rem; font-size: .7rem; }
.search-box { position: relative; }
.search-box .ic { position: absolute; inset-inline-start: .8rem; top: 50%; transform: translateY(-50%); color: var(--soft); pointer-events: none; }
.search-box .input { padding-inline-start: 2.4rem; }
.lang-sw { display: inline-flex; align-items: center; gap: .35rem; background: transparent; border: 1px solid #aab4bf; color: #4b5b6b; font-weight: 600; }
.udrop { position: relative; }
.udrop summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .35rem; }
.udrop summary::-webkit-details-marker { display: none; }
.caret { border-top: 5px solid currentColor; border-inline: 4px solid transparent; display: inline-block; }
.udrop-menu { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .4rem; box-shadow: 0 10px 30px rgba(11, 31, 58, .15); z-index: 60; min-width: 120px; }

/* POS parity layout */
.menu-wrap { position: relative; }
.pos-menu { display: none; position: absolute; inset-inline-end: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: .6rem; z-index: 30; min-width: 190px; flex-direction: column; gap: .5rem; align-items: stretch; }
.pos-menu.open { display: flex; }
.pos-menu .udrop-menu { position: static; box-shadow: none; border: 0; padding: .4rem 0 0; }
.chip .ic { width: 1em; height: 1em; vertical-align: -2px; margin-inline-end: .25rem; }
.chip.on { background: var(--teal); border-color: var(--teal); color: #fff; }
.item { border-bottom: 3px solid var(--teal); text-align: center; }
.item .badge { top: auto; bottom: 6px; inset-inline-start: 8px; min-width: 22px; height: 22px; border-radius: 6px; background: var(--navy); color: #fff; font-size: .72rem; }
.line .qb { min-width: 26px; height: 26px; border-radius: 7px; background: var(--teal-l); color: var(--teal-d); font-weight: 800; display: grid; place-items: center; font-size: .85rem; }
.line .lt .sar { font-size: .7rem; margin-inline-start: .15rem; }
.line .rm { color: var(--red); }
.line { cursor: pointer; }
.kp { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; }
.kb { padding: .55rem 0; border-radius: 10px; border: 1px solid var(--line); background: #fff; font: inherit; font-weight: 700; font-size: 1rem; cursor: pointer; color: var(--navy); display: grid; place-items: center; }
.kb:hover { background: var(--mint); }
.kb.mode { font-size: .85rem; color: var(--teal-d); }
.kb.mode.on, .kb#lockBtn.on { background: var(--teal); border-color: var(--teal); color: #fff; }
.kb .ic { width: 1.1rem; height: 1.1rem; }

.pos-brand { display: none; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; }
.pos-brand .pb-name { font-family: "Tajawal", sans-serif; font-weight: 800; font-size: 1.9rem; color: var(--teal-d); letter-spacing: -.02em; }
.pos-brand .pb-tag { color: var(--teal-d); font-weight: 800; font-size: 1.3rem; }
.pos-right.is-empty .pos-brand { display: flex; }
.pos-right.is-empty .lines, .pos-right.is-empty .order-foot { display: none; }

/* POS cart details (parity with the original) */
.totals3 { display: grid; gap: .35rem; }
.totals3 .t-row { display: flex; align-items: center; justify-content: space-between; gap: .6rem; min-height: 2rem; }
.totals3 .tg { display: inline-flex; gap: .9rem; font-size: .92rem; }
.totals3 .grand { display: inline-flex; align-items: center; gap: .9rem; font-size: 1.15rem; font-weight: 800; border: 0; padding: 0; margin: 0; }
.totals3 .gv { display: inline-flex; gap: .25rem; align-items: baseline; }
.disc-box { flex-direction: row; justify-content: space-between; align-items: center; gap: .8rem; min-width: 9.5rem; padding: .3rem .8rem; }
.lines { padding: 0; }
.line { border-radius: 0; border: 0; border-bottom: 1px solid var(--line); border-inline-end: 3px solid transparent; padding: .7rem .8rem; margin: 0 !important; gap: .7rem; }
.line.sel { background: var(--teal-l); border-inline-end-color: var(--teal); }
.line .ln { font-weight: 800; }
.line .lt { font-size: 1.02rem; }
.line .rm { order: 5; }
.kb .ic.bs, .kb[data-k="bs"] { color: var(--red); }
.kb { font-weight: 500; border-radius: 8px; }
.kb.mode { font-weight: 700; }
.pb-name { font-family: "Tajawal", sans-serif !important; }

.disc-box { display: flex; border: 1.5px dashed var(--line); background: #fff; border-radius: 10px; cursor: pointer; font: inherit; color: var(--muted); font-size: .85rem; white-space: nowrap; }
.disc-box > span:first-child { display: inline-flex; align-items: center; gap: .3rem; }
.disc-box > span:last-child { font-weight: 800; color: var(--navy); }
.disc-box.on { border-color: var(--teal); background: var(--mint); }
.totals3 .t-row > * { min-width: 0; }

.inv-list { display: grid; gap: .6rem; }
.inv-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; border-inline-start: 4px solid var(--teal); }
.inv-card.st-Hold { border-inline-start-color: var(--gold); }
.inv-card.st-Cancelled { border-inline-start-color: var(--red); }
.inv-card .inv-no { display: flex; align-items: center; gap: .5rem; font-weight: 800; }
.inv-card .inv-right { display: flex; align-items: center; gap: 1rem; }
.inv-card .inv-amount { font-weight: 800; text-align: end; }
.inv-card .inv-amount small { display: block; font-weight: 600; font-size: .75rem; }
.inv-card .inv-amount small.green { color: var(--green); }
.inv-card .inv-amount small.red { color: var(--red); }
.lines { flex: 1 1 auto !important; min-height: 0; overflow-y: auto; }
[hidden] { display: none !important; }
.thermal, .thermal th, .thermal td { color: #000; }
.t-items th, .t-items td { font-weight: 700; font-size: 11.5px; text-transform: none; letter-spacing: 0; background: transparent; }
.t-items small { font-weight: 400; color: #555; }
.thermal .t-meta span:first-child { color: #333; }

/* typography parity with the reference app (computed sizes/weights) */
body { font-size: 16px; font-weight: 400; }
.brand { font-size: 17.6px; font-weight: 800; }
.nav a, .nav a.active { font-size: 15.04px; font-weight: 400; }
.sidebar .shop, .shop { font-size: 16px; font-weight: 700; }
.top .btn, .topbar .btn, header .btn { font-size: 14px; font-weight: 400; }
.btn { font-size: 16px; font-weight: 400; }
.btn-sm, .btn.btn-sm, a.btn.btn-light.btn-sm { font-size: 14px; font-weight: 400; }
.btn-lg { font-size: 16px; font-weight: 400; }
.page-title { font-size: 24px; font-weight: 800; }
.muted.small, .small, p.muted, .sub, .stat .sub { font-size: 14px; font-weight: 400; }
.lab { font-size: 13.6px; font-weight: 500; }
.num { font-size: 27.2px; font-weight: 800; }
.num .sar { font-size: 19px; }
.card h3, h3 { font-size: 16px; font-weight: 500; }
.tbl th, th { font-size: 14px; font-weight: 700; }
.tbl td, td { font-size: 16px; font-weight: 400; }
.tbl td.fw, .tbl .fw, td .fw, .fw { font-size: 16px; font-weight: 600; }
.pill, summary.pill { font-size: 12px; font-weight: 700; }
.lbl, label.lbl { font-size: 16px; font-weight: 400; }
label.lbl.small { font-size: 14px; font-weight: 400; }
.inv-card .inv-no { font-size: 16px; font-weight: 700; }
.inv-card .inv-cust { font-size: 13.6px; font-weight: 400; }
.inv-card .inv-amount { font-size: 19.2px; font-weight: 700; }
.inv-card .inv-amount small { font-size: 11.2px; font-weight: 500; }
.chip { font-size: 12.8px; font-weight: 600; }
.item .nm { font-size: 14.4px; font-weight: 700; }
.item .pr { font-size: 13.12px; font-weight: 600; }
.pos-bar .btn { font-size: 14.4px; font-weight: 600; }
.pos-brand .pb-name { font-size: 24px; font-weight: 800; }
.pos-brand .pb-tag { font-size: 16px; font-weight: 800; }
.pos-brand .pb-name, .pos-brand .pb-tag { font-family: Tajawal, sans-serif !important; }
.items { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 9.6px; }
.item { padding: 13.6px 8px; gap: 4px; min-height: 0; border-radius: 14px; border-bottom-width: 3px; line-height: 1.5; justify-content: flex-start; }
.item .nm, .item .pr { line-height: 1.5; }
.chip { padding: 4px 11.2px; line-height: 1.5; gap: 4.8px; }
.chips { gap: 5.6px; }
.pos-bar { padding: 0 14.4px; height: 56px; gap: 12px; }
.pos-bar .btn { padding: 7.2px 16px; border-radius: 9px; line-height: 1.5; }
.pos-brand { padding: 32px 24px; gap: 17.6px; }
.pos-brand svg { width: 120px; height: 120px; }
.pos-brand .pb-name { line-height: 36px; letter-spacing: 0; }
.pos-right.is-empty .pos-brand { justify-content: center; align-items: center; min-height: 0; }
.pos-brand .pb-name { color: var(--teal-d); }
.pos-brand .pb-tag { font-size: 14px; font-weight: 500; color: var(--muted); }
.pos-bar .btn .ic { width: 15px; height: 15px; }
.pos-bar .btn:not(.btn-light) .ic { width: 18px; height: 18px; }
.pos-bar .btn-light { font-weight: 600; border: 1px solid var(--line); }

/* ---- design tokens and layout metrics measured from the reference app ---- */
:root { --teal: #039ca8; --teal-d: #03818b; --teal-l: #e4f4f5; --mint: #edf5f6; --bg: #fbfcfc; --line: #dbe6e7; --gold: #f0a73c; --navy: #0e1e20; --muted: #5c7073; --soft: #6f8385;
  --radius: 14px; --shadow: 0 1px 2px rgba(15,23,42,.04); }
body { background: #fbfcfc; color: #0e1e20; }
.sidebar { width: 240px; background: #024e57; color: #cbd5e1; padding: 0; }
.sidebar .brand { padding: 20px; gap: 10.4px; width: 100%; border-bottom: 1px solid rgba(255,255,255,.06); letter-spacing: -.2px; font-size: 17.6px; }
.nav { padding: 12px; display: flex; flex-direction: column; gap: 2.4px; }
.nav a { padding: 11.2px 14.4px; border-radius: 12px; gap: 10.4px; margin: 0; color: #cbd5e1; font-size: 15.04px; font-weight: 400; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.active { background: #039ca8; color: #fff; box-shadow: 0 6px 16px rgba(3,156,168,.35); }
.topbar { height: 64px; padding: 0 20px; background: rgba(255,255,255,.85); backdrop-filter: blur(20px); border-bottom: 1px solid #edf5f6; gap: 16px; }
.topbar .btn { gap: 6px; }
.content { padding: 24px; max-width: none; }
.page-title { margin: 0 0 20px; letter-spacing: -.4px; }
.card { border: 1px solid #edf5f6; border-radius: 18px; padding: 20px; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.card h3 { margin: 0 0 16px; }
.stat { padding: 20px; border-radius: 18px; }
.stat .lab { color: #6f8385; }
.stat .num { letter-spacing: -.5px; line-height: 1.5; }
.stat .ico { width: 48px; height: 48px; border-radius: 12px; background: #e4f4f5; color: #039ca8; font-size: 20.8px; }
.stat .ico .ic { width: 1.3rem; height: 1.3rem; }
.inv-list { gap: 9.6px; }
.inv-card { padding: 14.4px 17.6px; border-radius: 18px; border: 1px solid #edf5f6; border-inline-start: 4px solid #cbd5e1; box-shadow: 0 1px 2px rgba(15,23,42,.04); flex-direction: row; }
.inv-card.st-Open { border-inline-start-color: #039ca8; } .inv-card.st-Hold { border-inline-start-color: #f59e0b; } .inv-card.st-Ready { border-inline-start-color: #06b6d4; } .inv-card.st-Delivered { border-inline-start-color: #10b981; } .inv-card.st-Cancelled { border-inline-start-color: #cbd5e1; }
.inv-card .inv-left { display: flex; flex-direction: column; gap: 2.4px; }
.inv-card .inv-cust { color: #6b7280; }
.inv-card .inv-right { flex-direction: column; align-items: flex-end; gap: 9.6px; }
.inv-card .inv-amount small { color: #9ca3af; }
/* bootstrap-equivalent control metrics */
.btn { padding: 6px 12px; border-radius: 6px; border: 1px solid transparent; line-height: 1.5; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn-sm { padding: 4px 8px; border-radius: 4px; }
.btn-lg { padding: 8px 16px; border-radius: 8px; }
.btn-light { background: #fff; border-color: #dee2e6; color: #212529; }
.input, select.input, textarea.input { padding: 6px 12px; border-radius: 6px; border: 1px solid #dee2e6; font-size: 16px; line-height: 1.5; }
.input:focus { border-color: #06aebb; box-shadow: 0 0 0 .25rem rgba(3,156,168,.15); }
.tbl th, .tbl td { padding: 8px; }
.tbl th { color: #212529; border-bottom: 1px solid #dee2e6; }
.tbl td { border-bottom: 1px solid #dee2e6; }
.tbl tr:last-child td { border-bottom: 0; }
.pill { padding: 5.6px 9.6px; border-radius: 6px; }
.pill { padding: 4.2px 7.8px; }
.page-head { align-items: flex-start; margin-bottom: 16px; }
.page-head .page-title { margin: 0; }
.dash-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-inline-end: 6.4px; vertical-align: middle; }
.dash-split { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 220px; }
.dash-split .legend { flex: 1; }
.dash-split .lrow { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid #edf5f6; font-size: 14px; }
.dash-split .lrow:last-child { border-bottom: 0; }
.dash-split .lrow b { font-weight: 700; }
.dash-split .donut { width: 172px; height: 172px; border-radius: 50%; flex: none; -webkit-mask: radial-gradient(circle, transparent 54%, #000 55%); mask: radial-gradient(circle, transparent 54%, #000 55%); }
.grid.g4 { gap: 16px; } .grid.g2 { gap: 16px; }
.exp-top { display: grid; grid-template-columns: 5fr 7fr; gap: 16px; margin-bottom: 16px; align-items: stretch; }
@media (max-width: 860px) { .exp-top { grid-template-columns: 1fr; } }
.br-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 860px) { .br-grid { grid-template-columns: 1fr; } }
.br-head { display: flex; align-items: center; gap: 12px; }
.br-head .ico { width: 48px; height: 48px; border-radius: 12px; background: #e4f4f5; color: #039ca8; display: grid; place-items: center; }
.br-head .ico .ic { width: 1.3rem; height: 1.3rem; }
.br-name { font-size: 16px; }
.btn-outline { background: #fff; color: #039ca8; border-color: #039ca8; }
.btn-outline:hover { background: #039ca8; color: #fff; }
.btn-outline-gray { background: #fff; color: #6c757d; border-color: #6c757d; }
.btn-outline-gray:hover { background: #6c757d; color: #fff; }
.btn-outline-red { background: #fff; color: #dc3545; border-color: #dc3545; }
.btn-outline-red:hover { background: #dc3545; color: #fff; }
.aud-list { display: grid; gap: 9.6px; }
.aud-card { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid #edf5f6; border-radius: 18px; padding: 14px 17.6px; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.aud-card .ico { width: 40px; height: 40px; border-radius: 12px; background: #e4f4f5; color: #039ca8; display: grid; place-items: center; flex: none; }
.aud-meta { color: #9ca3af; font-size: 12px; display: flex; gap: 12px; margin-top: 2px; }
.aud-meta .ic { width: 12px; height: 12px; }
.empty { padding: 36px 16px; text-align: center; color: #6f8385; font-size: 14px; }
.empty .ic { width: 40px; height: 40px; display: block; margin: 0 auto 12px; opacity: .45; }

.set-wrap { max-width: 820px; }
.tab-r { display: none; }
.set-tabs { display: flex; flex-wrap: wrap; gap: 5.6px; margin-bottom: 16px; }
.set-tabs label { color: #6f8385; font-weight: 600; border-radius: 10px; padding: 8.8px 16px; border: 1px solid transparent; background: #fff; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: 16px; }
.set-tabs label:hover { color: #039ca8; background: #e4f4f5; }
.set-p { display: none; }
#st1:checked ~ .p1, #st2:checked ~ .p2, #st3:checked ~ .p3 { display: block; }
#st1:checked ~ .set-tabs .t1, #st2:checked ~ .set-tabs .t2, #st3:checked ~ .set-tabs .t3 { background: #039ca8; color: #fff; box-shadow: 0 6px 14px rgba(3,156,168,.28); }
.set-head { display: flex; align-items: center; gap: 12px; padding-bottom: 14.4px; margin-bottom: 16px; border-bottom: 1px solid #edf5f6; }
.set-head .si { color: #039ca8; } .set-head .si .ic { width: 1.4rem; height: 1.4rem; }
.set-head .title { font-weight: 700; font-size: 16px; line-height: 1.2; }
.set-head .subtitle { font-size: 12.8px; color: #6f8385; line-height: 1.2; }
.tax-toggle { padding: 16px 20px; background: #e4f4f5; border-radius: 12px; border: 1px solid #b8d9dc; display: flex; align-items: center; gap: 12px; font-size: 16px; }
.sw { position: relative; display: inline-block; width: 48px; height: 25.6px; flex: none; }
.sw input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 2; }
.sw i { position: absolute; inset: 0; background: #cbd5e1; border-radius: 99px; transition: background .15s; }
.sw i::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 19.6px; height: 19.6px; border-radius: 50%; background: #fff; transition: inset-inline-start .15s; }
.sw input:checked + i { background: #039ca8; }
.sw input:checked + i::after { inset-inline-start: 25px; }
.pill.gray { background: #f8f9fa; color: #212529; border: 1px solid #e9ecef; }
.udrop > summary.uchip { background: none; border: 0; padding: 4px 6px; font-size: 14px; font-weight: 400; color: #212529; cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 5px; }
.udrop > summary.uchip::-webkit-details-marker { display: none; }

/* ---------- mobile ---------- */
html { max-width: 100%; overflow-x: hidden; }
body { max-width: 100%; overflow-x: clip; }
.main, .content, .card, .grid > *, .g2 > *, .g4 > * { min-width: 0; }
@media (max-width: 860px) {
  .content { padding: 12px; }
  .page-head .page-title { font-size: 20px; }
  .topbar { padding-inline: 10px; gap: 6px; }
  .topbar .shop { font-size: 15px; }
  .card { overflow-x: auto; }
  table.tbl { min-width: 0; }
  .tbl th, .tbl td { padding: 8px 6px; font-size: 14px; white-space: nowrap; }
  .tbl td.fw, .tbl .fw { white-space: normal; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 12px; gap: 6px; }
  .stat .num { font-size: 20px; }
  .stat .lab { font-size: 12.5px; }
  .stat .ico { width: 38px; height: 38px; }
  .set-tabs label { padding: 8px 10px; font-size: 14px; }
  .exp-top, .br-grid { grid-template-columns: 1fr; }
  .form-grid, .row2, .fg2 { grid-template-columns: 1fr !important; }
  .set-card, .set-wrap { max-width: 100%; }
  .modal { max-width: 96vw; }
  .pos-card, .item { min-width: 0; }
}
@media (max-width: 600px) {
  .page-head { flex-direction: row; }
  .page-head .btn { padding: 6px 10px; }
  .pos-main { grid-template-columns: 1fr; grid-template-rows: auto auto; overflow-y: auto; }
  .pos-main .pos-right { order: 2; min-height: 52vh; }
  .pos-right.is-empty { min-height: 0; }
  .pos-right.is-empty .pos-brand { padding: 16px; }
  .pos-right.is-empty .pos-brand svg { width: 64px; height: 64px; }
  .lines { max-height: 38vh; }
  .appbar { gap: 6px; padding: 8px; }
}

/* POS category chips: single row, inline icon, like the original */
.chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; flex: 1 1 auto; min-width: 0; }
.chips::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 4.8px; white-space: nowrap; flex: none; font-size: 12.8px; font-weight: 600; padding: 4px 11.2px; line-height: 1.5; border: 1px solid #edf5f6; color: #5c7073; }
.chip .ic { width: 14.4px; height: 14.4px; margin: 0; vertical-align: 0; }
.chip.on { background: #039ca8; border-color: transparent; color: #fff; box-shadow: 0 4px 12px rgba(3,156,168,.25); }
.filters { flex-wrap: nowrap; gap: 8px; margin-bottom: 9px; align-items: center; }
.seg { flex: none; }
@media (max-width: 600px) {
  .filters { flex-wrap: wrap; row-gap: 8px; margin-bottom: 8px; }
  .chips { flex: 1 1 100%; }
  .pos-left { padding: 10px; }
}

/* POS on phones: plain stacked page (items, then cart), nothing overlaps */
@media (max-width: 1000px) {
  .pos-body { height: auto !important; min-height: 100vh; overflow: visible !important; display: block; }
  .pos-main { display: block !important; grid-template-columns: none; grid-template-rows: none; overflow: visible; }
  .pos-left { overflow: visible; height: auto; }
  .pos-main .pos-right { order: 0; display: flex; position: relative; min-height: 0; height: auto; border-top: 1px solid var(--line); border-inline-start: 0; }
  .pos-right .lines { max-height: 40vh; flex: none !important; }
  .pos-right.is-empty { display: none; }
}
@media (max-width: 1000px) {
  .pos-main .pos-right:not(.is-empty) { position: sticky; bottom: 0; z-index: 20; max-height: 58vh; overflow-y: auto; box-shadow: 0 -8px 24px rgba(0,0,0,.12); }
  .pos-left { padding-bottom: 24px; }
}

/* receipt modal fits phones */
@media (max-width: 600px) {
  .modal { padding: 12px; }
  .modal-box { max-width: 100%; min-width: 0; }
  .thermal-stage { padding: 12px !important; }
  .thermal { width: 100%; max-width: 302px; box-sizing: border-box; }
  #mReceipt .modal-foot { flex-wrap: wrap; padding: .7rem; gap: 8px; }
  #mReceipt .modal-foot .btn { flex: 1 1 calc(50% - 8px); min-width: 0; padding-inline: 8px; white-space: nowrap; justify-content: center; }
  #mReceipt #rcNew { flex: 1 1 100%; order: -1; }
}

/* mobile POS polish: match the original's phone layout */
@media (max-width: 600px) {
  .items { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
  .item { min-height: 103px; padding: 22px 10px 18px; border-radius: 16px; justify-content: center; gap: 6px; }
  .item .nm { font-size: 16px; }
  .item .pr { font-size: 14px; }
  .pos-left { padding: 12px 14px 20px; }
}
@media (max-width: 1000px) {
  .pos-bar { position: sticky; top: 0; z-index: 40; height: 64px; padding: 0 14px; gap: 10px; }
  .pos-bar .grow { display: none; }
  .pos-bar .search { flex: 1 1 0; min-width: 0; max-width: none; }
  .pos-bar .menu-wrap { order: 5; }
  .pos-right.is-empty { display: flex !important; position: static; height: auto; border: 0; background: transparent; box-shadow: none; }
  .pos-right.is-empty .order-foot, .pos-right.is-empty .lines { display: none; }
  .pos-right.is-empty .pos-brand { padding: 28px 16px 40px; }
  .pos-right.is-empty .pos-brand svg { width: 150px; height: 150px; }
}
@media (max-width: 600px) {
  .modal-foot { flex-wrap: wrap; }
  .modal-foot .btn { min-width: 0; }
  .modal-box { max-height: calc(100vh - 24px); }
  .modal-head { padding: .75rem .9rem; }
  .modal-body { padding: .9rem; }
}

@media (max-width: 1000px) {
  .inv-split { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
}

/* phone modals: bottom sheets with stacked, tappable fields */
@media (max-width: 600px) {
  .modal { align-items: flex-end; padding: 0 !important; }
  .modal-box { max-width: 100% !important; width: 100%; border-radius: 20px 20px 0 0; max-height: 92vh; box-shadow: 0 -10px 40px rgba(11,31,58,.25); }
  .modal-box.wide { height: 92vh; }
  .modal-body form [style*="grid-template-columns"], .modal-body [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  .modal-body .field { margin-bottom: 0; }
  .modal-body .input, .modal-body select.input { min-height: 46px; font-size: 16px; }
  .modal-body .btn, .modal-foot .btn { min-height: 46px; }
  .modal-body form > .btn, .modal-body form > a.btn { display: flex; width: 100%; justify-content: center; margin-top: 8px; }
  .modal-body form > .btn[type="submit"] { margin-top: 12px; }
  .modal-head .x { width: 40px; height: 40px; display: grid; place-items: center; }
  #mReceipt .modal-box, #mPay .modal-box { border-radius: 20px 20px 0 0; }
}
@media (max-width: 600px) {
  .modal-body [style*="grid-template-columns"] { gap: .95rem !important; }
  .modal-body .lbl { margin-bottom: 4px; display: block; }
}

/* sidebar scrolls without a visible scrollbar */
.sidebar { scrollbar-width: none; -ms-overflow-style: none; }
.sidebar::-webkit-scrollbar { display: none; width: 0; height: 0; }

/* two-column detail pages stack on narrow screens */
@media (max-width: 860px) {
  .grid[style*="grid-template-columns:minmax"], .grid[style*="grid-template-columns:repeat(2"] { grid-template-columns: minmax(0, 1fr) !important; }
}

.inv-back { display: none; }
@media (max-width: 1000px) {
  .inv-split { grid-template-columns: 1fr; grid-template-rows: 1fr; position: relative; overflow: hidden; }
  .inv-split .inv-detailcol { display: none; }
  .inv-split.detail-open .inv-listcol { display: none; }
  .inv-split.detail-open .inv-detailcol { display: flex; }
  .inv-back { display: flex; align-items: center; gap: .4rem; border: 0; border-bottom: 1px solid var(--line); background: #fff; padding: .7rem .9rem; font: inherit; font-weight: 700; min-height: 46px; color: var(--ink, #0b1f3a); }
  .inv-tools .chips { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; }
  .inv-tools .chips::-webkit-scrollbar { display: none; }
  .inv-tools .chip { flex: 0 0 auto; white-space: nowrap; }
  .inv-listcol { border-inline-end: 0; }
}
[dir="ltr"] .inv-back svg, .en .inv-back svg { transform: scaleX(-1); }

/* subscription page */
.sub-status { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; padding: 1rem 1.2rem; margin-bottom: 1rem; }
.sub-h { font-size: 1.15rem; margin: 1.2rem 0 .8rem; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 380px)); gap: 1rem; }
.plan-card { padding: 1.2rem; }
.plan-name { font-size: 1.3rem; font-weight: 800; margin-bottom: .2rem; }
.plan-price { font-weight: 700; margin-bottom: .7rem; }
.plan-row { display: flex; align-items: center; gap: .4rem; color: #475569; font-size: .92rem; margin-bottom: .25rem; }
.plan-note { margin-top: .8rem; padding: .6rem; text-align: center; border: 1px solid var(--line); border-radius: 8px; color: #94a3b8; font-size: .9rem; }

/* pos bar: search on the right, dashboard + language + user inline */
.pos-bar .udrop-menu { display: flex; flex-direction: column; gap: 6px; min-width: 150px; }
.pos-bar .udrop-menu a, .pos-bar .udrop-menu button { width: 100%; justify-content: flex-start; }
.udrop-menu a.btn { display: flex; align-items: center; gap: 6px; text-decoration: none; margin-bottom: 4px; }
@media (max-width: 860px) { .pos-bar { flex-wrap: wrap; height: auto; padding: 8px 12px; } .pos-bar .search { flex: 1 1 100%; max-width: none; } }
/* user menu: one line per item */
.udrop-menu { display: flex; flex-direction: column; gap: 6px; min-width: 170px; width: max-content; padding: 6px; }
.udrop-menu form { margin: 0; }
.udrop-menu .btn, .udrop-menu a.btn { display: flex; align-items: center; justify-content: flex-start; gap: 8px; width: 100%; white-space: nowrap; margin: 0; }
/* pos bar: buttons on the right, search beside them */
.pos-bar .search { flex: 0 1 340px; max-width: 340px; }
@media (max-width: 860px) { .pos-bar .search { flex: 1 1 100%; max-width: none; order: 5; } }
/* pos empty-state logo: generous size */
@media (min-width: 861px) {
  .pos-brand svg, .pos-brand .pb-mark { width: 200px; height: 200px; }
  .pos-brand .pb-name { font-size: 30px; line-height: 40px; }
  .pos-brand .pb-tag { font-size: 18px; }
  .pos-brand { gap: 22px; }
}
@media (max-width: 860px) { .pos-right.is-empty .pos-brand svg { width: 96px; height: 96px; } }

/* shop logo */
.sidebar .brand.brand-has-logo { justify-content: center; }
.brand-logo { max-width: 100%; max-height: 64px; object-fit: contain; background: #fff; border-radius: 10px; padding: 5px 8px; }
.pos-brand .pb-logo { object-fit: contain; width: auto; height: auto; max-width: 200px; max-height: 200px; }
.t-logo { display: block; margin: 0 auto 4px; max-width: 60%; max-height: 22mm; object-fit: contain; filter: grayscale(1) contrast(1.2); }

/* site footer */
.site-footer { margin: auto 0 0; padding: 20px 14px 16px; text-align: center; }
.sf-mark { font-weight: 800; font-size: 22px; color: #0e2236; letter-spacing: .01em; }
.sf-mark span { color: #0f9f8e; }
.sf-copy { margin: 6px 0 0; font-size: 13px; color: #4b6577; }
@media print { .site-footer { display: none; } }

/* settings parity */
.set-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.set-grid .lbl .ic { width: 1em; height: 1em; margin-inline-end: 4px; color: #5b7578; vertical-align: -2px; }
.lockbox { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 42px; padding: 0 12px; border: 1px solid #dfe9ea; border-radius: 10px; background: #f6f9f9; color: #3d5558; }
.lockbox .ic { width: 14px; height: 14px; color: #3d5558; }
.inpre { display: flex; direction: ltr; }
.inpre span { display: grid; place-items: center; padding: 0 12px; background: #f1f6f6; border: 1px solid #dfe9ea; border-inline-end: 0; border-radius: 10px 0 0 10px; color: #3d5558; }
.inpre .input { border-radius: 0 10px 10px 0; direction: ltr; }
.cbx { position: relative; display: inline-block; width: 28px; height: 28px; flex: none; }
.cbx input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 2; }
.cbx i { position: absolute; inset: 0; border-radius: 7px; border: 2px solid #9db8bb; background: #fff; display: grid; place-items: center; color: #fff; }
.cbx i .ic { width: 16px; height: 16px; opacity: 0; }
.cbx input:checked + i { background: #039ca8; border-color: #039ca8; }
.cbx input:checked + i .ic { opacity: 1; }
.pill.green { background: #d5f0e0; color: #14804a; } .pill.gray { background: #eef1f2; color: #5b6b6e; }
@media (max-width: 700px) { .set-grid, .set-grid[style] { grid-template-columns: 1fr !important; } }

/* dial code / phone inside locked boxes */
.bidi-ltr { direction: ltr; unicode-bidi: isolate; }
/* primary button text contrast */
.btn:not(.btn-light):not(.btn-gold):not(.btn-danger):not(.btn-outline):not(.btn-outline-gray):not(.btn-outline-red) { color: #fff; font-weight: 600; }
.btn:not(.btn-light):not(.btn-gold):not(.btn-danger):not(.btn-outline):not(.btn-outline-gray):not(.btn-outline-red):hover { color: #fff; }
/* settings tweaks: LTR dial code, save button on the left */
.lockbox .bidi-ltr { flex: 1; text-align: left; direction: ltr; unicode-bidi: isolate; }
.form-save-left { display: flex; justify-content: flex-start; direction: ltr; }
.form-save-left .btn { direction: rtl; }
/* switch drawn as a split button: half colored, half dimmed; off = disabled look */
.sw { width: 48px; height: 25.6px; }
.sw i { position: absolute; inset: 0; display: block; border-radius: 6px; background: #e9eef0; border: 1px solid #cfd8dc; box-sizing: border-box; overflow: hidden; opacity: .7; transition: all .15s; }
.sw i::before { content: none !important; }
.sw i::after { content: ""; position: absolute; top: 0; bottom: 0; inset-inline-start: 0; width: 50%; height: auto; border-radius: 0; background: #adb5bd; transition: inset-inline-start .15s, background .15s; }
.sw input:checked + i { background: #e3f4f5; border-color: #039ca8; opacity: 1; }
.sw input:checked + i::after { inset-inline-start: 50%; background: #039ca8; }
/* split switch: physical sides (flipped), off = dim half on the left, on = colored half on the right */
.sw i::after { inset-inline-start: auto; right: auto; left: 0; transition: left .15s, right .15s, background .15s; }
.sw input:checked + i::after { inset-inline-start: auto; left: auto; right: 0; }
/* localized file picker */
.filepick { position: relative; display: flex; align-items: center; gap: 10px; padding: 6px 10px; border: 1px solid #dfe9ea; border-radius: 10px; background: #fff; min-height: 44px; }
.filepick input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 2; }
.filepick .fp-btn { flex: none; padding: 6px 14px; border-radius: 6px; background: #eef4f5; border: 1px solid #cfdcde; color: #0f3d43; font-weight: 600; font-size: 14px; }
.filepick .fp-name { color: #5b6b6e; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* POS discount code */
.cp-row { margin: 8px 0 6px; }
.cp-in { display: flex; align-items: center; gap: 8px; border: 1.5px dashed var(--line); border-radius: 10px; background: #fff; padding: 3px 10px; }
.cp-in .ic { width: 15px; height: 15px; color: var(--muted); flex: none; }
.cp-in input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: .9rem; padding: 6px 2px; text-transform: uppercase; }
.cp-in input::placeholder { text-transform: none; }
.cp-in button { flex: none; border: 0; border-radius: 6px; background: var(--teal); color: #fff; font: inherit; font-weight: 600; font-size: .85rem; padding: 6px 14px; cursor: pointer; }
.cp-on { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--teal); background: var(--mint); border-radius: 10px; padding: 6px 12px; }
.cp-on.d-none, .cp-in.d-none { display: none; }
.cp-name { display: inline-flex; align-items: center; gap: 6px; flex: 1; color: var(--navy); }
.cp-name .ic { width: 14px; height: 14px; }
.cp-amt { font-weight: 800; color: var(--navy); }
.cp-on button { border: 0; background: transparent; color: #b42318; font-size: 1.3rem; line-height: 1; cursor: pointer; padding: 0 4px; }

/* ---- receipt: tracking number + ZATCA QR ---- */
.thermal .t-track { text-align: center; font-size: 12px; line-height: 1.5; }
.thermal .t-track b { display: block; font-size: 15px; letter-spacing: .04em; }
.thermal .t-track small { display: block; color: #555; font-size: 10.5px; }
.thermal .t-qr { display: flex; justify-content: center; margin-top: 6px; }
.thermal .t-qr svg { width: 34mm; height: 34mm; display: block; }

/* ---- public landing page + order tracking ---- */
body.lp { background: #fff; }
.lp-wrap { max-width: 1120px; margin: 0 auto; padding: 0 1.2rem; }
.lp-top { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .94); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.lp-top-in { display: flex; align-items: center; gap: 1.2rem; min-height: 64px; }
.lp-brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.2rem; color: var(--navy); }
.lp-brand img { width: 38px; height: 38px; border-radius: 10px; box-shadow: 0 0 0 1px var(--line); }
.lp-nav { display: flex; gap: 1.2rem; margin-inline-start: 1rem; flex: 1; }
.lp-nav a { color: var(--navy-2); font-weight: 500; }
.lp-nav a:hover { color: var(--teal-d); }
.lp-acts { display: flex; align-items: center; gap: .5rem; }
.lp-hero { background: linear-gradient(180deg, var(--mint), #fff); padding: 3.2rem 0 3rem; }
.lp-hero-in { display: grid; grid-template-columns: 1.15fr 1fr; gap: 2.4rem; align-items: center; }
.lp-pill { display: inline-block; background: var(--teal-l); color: var(--teal-d); border-radius: 999px; padding: .25rem .9rem; font-size: .85rem; font-weight: 700; }
.lp-hero h1 { font-size: 2.5rem; line-height: 1.25; margin: .9rem 0 .7rem; color: var(--navy); }
.lp-hero p { color: var(--muted); font-size: 1.08rem; margin: 0 0 1.3rem; }
.lp-cta { display: flex; gap: .7rem; flex-wrap: wrap; }
.lp-chips { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1.3rem; }
.lp-chips span { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .2rem .8rem; font-size: .85rem; color: var(--navy-2); }
.lp-hero-side { display: grid; gap: 1rem; }
.lp-track-box { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 1.3rem; box-shadow: var(--shadow); }
.lp-track-box h2 { margin: .3rem 0 .2rem; font-size: 1.3rem; }
.lp-track-box p { margin: 0 0 .8rem; color: var(--muted); font-size: .95rem; }
.lp-track-ic { width: 42px; height: 42px; border-radius: 12px; background: var(--teal-l); color: var(--teal-d); display: grid; place-items: center; }
.lp-track-form { display: flex; gap: .5rem; }
.lp-track-form .input { flex: 1; min-width: 0; text-align: center; letter-spacing: .06em; font-size: 1.05rem; }
.lp-dash { background: var(--navy); color: #fff; border-radius: 18px; padding: 1rem 1.1rem; }
.lp-dash-h { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: .7rem; }
.lp-dash-h i { font-style: normal; font-weight: 400; font-size: .75rem; color: #9fb4cc; }
.lp-dash-g { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.lp-dash-g div { background: rgba(255, 255, 255, .08); border-radius: 10px; padding: .55rem .6rem; }
.lp-dash-g small { display: block; color: #9fb4cc; font-size: .72rem; }
.lp-dash-g b { font-size: 1.15rem; }
.lp-sec { padding: 3.6rem 0; }
.lp-sec.alt { background: var(--bg); }
.lp-h2 { font-size: 1.9rem; text-align: center; margin: 0 0 .5rem; }
.lp-h2.s { text-align: start; }
.lp-sub { color: var(--muted); margin: 0 0 1rem; }
.lp-sub.c { text-align: center; margin-bottom: 2rem; }
.lp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.lp-feat { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 1.2rem; }
.lp-feat h3 { margin: .7rem 0 .3rem; font-size: 1.05rem; }
.lp-feat p { margin: 0; color: var(--muted); font-size: .93rem; }
.lp-fic { width: 42px; height: 42px; border-radius: 12px; background: var(--teal-l); color: var(--teal-d); display: grid; place-items: center; }
.lp-fic .ic { width: 22px; height: 22px; }
.lp-two { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center; }
.lp-list { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .55rem; }
.lp-list li { position: relative; padding-inline-start: 1.7rem; }
.lp-list li::before { content: ""; position: absolute; inset-inline-start: 0; top: .45em; width: .9rem; height: .9rem; border-radius: 50%; background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='white' d='M12.7 4l-6 6.4L3.3 7l-1 1 4.4 4.4 7-7.4z'/%3E%3C/svg%3E") center/80% no-repeat; }
.lp-pos { display: grid; grid-template-columns: 1.2fr 1fr; gap: .8rem; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 1rem; box-shadow: var(--shadow); }
.lp-pos-items { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; align-content: start; }
.lp-pos-items span { border: 1px solid var(--line); border-bottom: 3px solid var(--teal); border-radius: 12px; padding: .7rem .4rem; text-align: center; font-weight: 700; }
.lp-pos-items b { display: block; color: var(--teal-d); font-size: .85rem; }
.lp-pos-cart, .lp-rc { background: var(--mint); border-radius: 14px; padding: .9rem; }
.lp-pos-h { font-weight: 800; margin-bottom: .5rem; }
.lp-pos .r, .lp-rc .r { display: flex; justify-content: space-between; padding: .25rem 0; border-bottom: 1px dashed var(--line); font-size: .92rem; }
.lp-pos .r.tot, .lp-rc .r.tot { font-weight: 800; border-bottom: 0; font-size: 1.02rem; }
.lp-two.rev .lp-rc { order: 0; }
.lp-rc { background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); max-width: 340px; margin-inline: auto; width: 100%; }
.lp-rc-h { text-align: center; margin-bottom: .5rem; }
.lp-rc-h b { display: block; font-size: 1.1rem; }
.lp-rc-h small { color: var(--muted); }
.lp-rc-qr { display: flex; justify-content: center; margin-top: .6rem; }
.lp-rc-qr svg { width: 130px; height: 130px; }
.lp-ex { display: block; text-align: center; color: var(--soft); margin-top: .3rem; }
.lp-steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.lp-steps3 > div { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 1.3rem; text-align: center; }
.lp-steps3 .n { width: 40px; height: 40px; border-radius: 50%; background: var(--teal); color: #fff; display: inline-grid; place-items: center; font-weight: 800; }
.lp-steps3 h3 { margin: .7rem 0 .3rem; }
.lp-steps3 p { margin: 0; color: var(--muted); }
.lp-plans { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.lp-plan { background: #fff; border: 2px solid var(--teal); border-radius: 18px; padding: 1.5rem; width: 100%; max-width: 340px; text-align: center; box-shadow: var(--shadow); }
.lp-plan h3 { margin: 0 0 .5rem; }
.lp-plan .pr b { font-size: 2.2rem; }
.lp-plan .per { color: var(--muted); margin-bottom: .6rem; }
.lp-plan .lp-list { text-align: start; margin-bottom: 1.2rem; }
.lp-final { background: linear-gradient(135deg, var(--teal-d), var(--teal)); color: #fff; text-align: center; padding: 3rem 0; }
.lp-final h2 { margin: 0 0 1rem; font-size: 1.8rem; }
.lp-track-page { padding: 3rem 1.2rem; min-height: 60vh; }
.lp-track-card { max-width: 560px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 1.6rem; box-shadow: var(--shadow); }
.lp-track-card h1 { margin: 0 0 .3rem; font-size: 1.6rem; }
.lp-track-card .alert { margin-top: 1rem; }
.lp-order { margin-top: 1.3rem; border-top: 1px solid var(--line); padding-top: 1.1rem; }
.lp-order-head { display: flex; justify-content: space-between; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.lp-shop { font-weight: 800; font-size: 1.1rem; }
.lp-code { color: var(--muted); letter-spacing: .05em; }
.lp-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.lp-steps li { position: relative; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: .7rem; padding: .7rem 0; color: var(--soft); }
.lp-steps li:not(:last-child)::after { content: ""; position: absolute; inset-inline-start: 16px; top: 2.5rem; bottom: -.7rem; width: 2px; background: var(--line); }
.lp-steps li.done:not(:last-child)::after { background: var(--teal); }
.lp-steps .dot { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; background: #fff; color: #fff; }
.lp-steps li.done .dot, .lp-steps li.now .dot { background: var(--teal); border-color: var(--teal); }
.lp-steps li.done, .lp-steps li.now { color: var(--navy); }
.lp-steps li.now .lbl { font-weight: 800; color: var(--teal-d); }
.lp-steps .when { font-size: .82rem; color: var(--muted); }
.lp-cancel { background: var(--red-l); color: #9d2b2b; border-radius: 12px; padding: .9rem; text-align: center; }
@media (max-width: 860px) {
  .lp-hero-in, .lp-two { grid-template-columns: 1fr; }
  .lp-hero h1 { font-size: 1.9rem; }
  .lp-grid, .lp-steps3 { grid-template-columns: 1fr; }
  .lp-nav { display: none; }
  .lp-top-in { justify-content: space-between; }
  .lp-reg { display: none; }
}
@media print { .lp-top, .site-footer { display: none; } }

.pay-disc { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; }
.pay-disc .input { flex: 1; min-width: 0; text-align: end; }
.pay-disc label { white-space: nowrap; display: inline-flex; align-items: center; gap: .3rem; }
.pay-disc ~ .cp-row { margin: 0 0 .7rem; }

/* payment dialog: no visible scrollbar, and compact enough to fit short screens */
#mPay .modal-body { scrollbar-width: none; -ms-overflow-style: none; }
#mPay .modal-body::-webkit-scrollbar { display: none; width: 0; height: 0; }
@media (min-width: 861px) and (max-height: 900px) {
  #mPay .modal-body { padding: .7rem 1rem; }
  #mPay .paygrid { gap: .8rem; }
  #mPay .paybig { font-size: 2rem; padding: .2rem 0; }
  #mPay .payline { padding: .22rem 0; }
  #mPay .method { padding: .45rem; }
  #mPay .methods { margin-bottom: .5rem; }
  #mPay .numpad { gap: .3rem; margin-top: .5rem; }
  #mPay .numpad button { padding: .4rem 0; font-size: 1rem; }
  #mPay .pay-disc { margin-bottom: .35rem; }
  #mPay .pay-disc .input { padding: .3rem .6rem; }
  #mPay .cp-row { margin-bottom: .5rem; }
  #mPay #pCust { margin-bottom: .4rem !important; }
}

/* payment keypad: one joined block like the original (quick amounts tinted green, backspace tinted red) */
#mPay .numpad { gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-top: .7rem; background: #fff; }
#mPay .numpad button { border: 0; border-radius: 0; border-inline-start: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 0; height: 52px; background: #fff; font-weight: 500; font-size: 1.15rem; color: var(--navy); }
#mPay .numpad button:nth-child(4n+1) { border-inline-start: 0; }
#mPay .numpad button:nth-last-child(-n+4) { border-bottom: 0; }
#mPay .numpad button:hover { background: var(--mint); }
#mPay .numpad button.q { background: #eaf8f1; color: var(--teal-d); font-weight: 600; }
#mPay .numpad button.bsk { background: #fdeeee; color: var(--red); }
@media (min-width: 861px) and (max-height: 900px) { #mPay .numpad button { height: 40px; padding: 0; } }

/* payment: discount and coupon code side by side */
#mPay .pay-dc { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-bottom: .7rem; align-items: stretch; }
#mPay .pay-dc .pay-disc { margin: 0; border: 1.5px dashed var(--line); border-radius: 10px; padding: 3px 10px; background: #fff; min-width: 0; }
#mPay .pay-dc .pay-disc .input { border: 0; box-shadow: none; padding: 6px 2px; background: transparent; min-width: 0; }
#mPay .pay-dc .cp-row { margin: 0; min-width: 0; }
#mPay .pay-dc .cp-in, #mPay .pay-dc .cp-on { height: 100%; padding: 3px 8px; }
#mPay .pay-dc .cp-in .ic { display: none; }
#mPay .pay-dc .cp-in button { padding: 6px 10px; }
#mPay .numpad button { direction: ltr; unicode-bidi: isolate; }
.kb[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }

/* delivery-date toggle in payment dialog: pill switch, first in reading order (right side in RTL) */
.dlv-row { display: flex; align-items: center; gap: .6rem; font-weight: 600; margin: .1rem 0 .2rem; cursor: pointer; }
.dlv-row .sw { width: 44px; height: 24px; }
.dlv-row .sw i { border-radius: 99px; background: #cbd5e1; border: 0; opacity: 1; overflow: visible; }
.dlv-row .sw i::after { top: 3px; bottom: auto; width: 18px; height: 18px; border-radius: 50%; background: #fff; inset-inline-start: auto; right: auto; left: 3px; transition: left .15s; }
.dlv-row .sw input:checked + i { background: #039ca8; border: 0; }
.dlv-row .sw input:checked + i::after { left: 23px; right: auto; background: #fff; }
html[dir=rtl] .dlv-row .sw i::after { left: auto; right: 3px; transition: right .15s; }
html[dir=rtl] .dlv-row .sw input:checked + i::after { left: auto; right: 23px; }

/* no visible scrollbars anywhere (scrolling still works) */
* { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { display: none; width: 0; height: 0; }

/* POS totals: three stacked rows, label at the start, smaller numbers that never break the panel */
.totals3 { display: grid; gap: .25rem; }
.totals3 .t-row { display: flex; align-items: center; justify-content: space-between; gap: .6rem; min-height: 1.6rem; font-size: .85rem; }
.totals3 .t-row .tv { display: inline-flex; align-items: baseline; gap: .25rem; min-width: 0; max-width: 70%; direction: ltr; font-variant-numeric: tabular-nums; font-weight: 600; overflow-wrap: anywhere; text-align: end; }
.totals3 .tg-final { margin-top: .2rem; padding: .45rem .7rem; background: var(--teal-l); border-radius: 10px; font-size: .95rem; font-weight: 800; }
.totals3 .tg-final .tv { font-size: 1.05rem; font-weight: 800; }

/* cart list keeps a visible scrollbar so the cashier sees there are more items */
.lines { scrollbar-width: thin; scrollbar-color: #9fb3b8 transparent; overflow-y: auto; }
.lines::-webkit-scrollbar { display: block; width: 6px; height: auto; }
.lines::-webkit-scrollbar-thumb { background: #9fb3b8; border-radius: 99px; }
.lines::-webkit-scrollbar-track { background: transparent; }

/* POS totals: clean card, hairline dividers, grand total emphasised by colour and size */
.totals3 { gap: 0; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: .15rem .8rem; overflow: hidden; }
.totals3 .t-row { min-height: 2rem; padding: .25rem 0; border-bottom: 1px solid var(--line); font-size: .85rem; }
.totals3 .t-row .muted { color: var(--muted); font-weight: 500; }
.totals3 .t-row .tv { color: var(--navy); font-weight: 700; }
.totals3 .tg-final { margin: 0; padding: .45rem 0 .4rem; background: transparent; border-radius: 0; border-bottom: 0; font-size: .95rem; color: var(--navy); }
.totals3 .tg-final .tv { font-size: 1.1rem; font-weight: 800; color: var(--teal); }

/* compact cart rows */
.lines .line { padding: .3rem .8rem !important; gap: .5rem; min-height: 0; line-height: 1.25; }
.lines .line .ln, .lines .line .lt { line-height: 1.2; }
.lines .line .lt { font-size: .95rem; }
.lines .line small, .lines .line .muted { line-height: 1.15; }
.lines .line > * { margin-top: 0; margin-bottom: 0; }

/* slightly smaller type in the POS cart and totals */
.lines .line .ln { font-size: .88rem; }
.lines .line .ls { font-size: .74rem; }
.lines .line .lt { font-size: .88rem; }
.lines .line .qb { font-size: .78rem; min-width: 24px; height: 24px; }
.totals3 .t-row { font-size: .78rem; }
.totals3 .tg-final { font-size: .88rem; }
.totals3 .tg-final .tv { font-size: .98rem; }

/* compact lower section of the POS side panel: more room for the cart list */
.order-foot { padding: .5rem .7rem; gap: .35rem; }
.order-foot .kp { gap: .25rem; }
.order-foot .kb { padding: 0; min-height: 34px; height: 34px; font-size: .92rem; }
.order-foot .kb[style*="span 2"] { height: auto; }
.order-foot .kb.mode { font-size: .78rem; }
.order-foot .kb .ic { width: 1rem; height: 1rem; }
.order-foot .actions2 { gap: .3rem; }
.order-foot .act { padding: .3rem; min-height: 32px; font-size: .84rem; border-radius: 10px; }
.order-foot .paybtn { min-height: 40px; padding: .35rem .8rem; font-size: .95rem; }
.totals3 .t-row { min-height: 1.6rem; padding: .15rem 0; }

/* payment dialog like the original: controls column on the right, totals on the left with label and amount close together */
@media (min-width: 1001px) {
  #mPay .paygrid > :first-child { order: 2; align-self: center; width: 100%; max-width: 320px; margin-inline: auto; }
  #mPay .paygrid > :last-child { order: 1; }
}

/* POS totals sized like the original: rows 14px, grand total 20px/800 */
.totals3 { padding: .2rem .9rem; }
.totals3 .t-row { font-size: .875rem; min-height: 2rem; padding: .25rem 0; }
.totals3 .t-row .tv { font-size: .875rem; font-weight: 600; }
.totals3 .tg-final { font-size: 1.25rem; font-weight: 800; padding: .4rem 0 .35rem; }
.totals3 .tg-final .tv { font-size: 1.25rem; font-weight: 800; }

/* delivery date sits beside the toggle label */
.dlv-wrap { display: flex; align-items: center; gap: .8rem; margin-top: .1rem; }
.dlv-wrap .dlv-row { flex: none; margin: 0; }
.dlv-wrap #dlv { flex: 1 1 auto; min-width: 0; max-width: 12rem; margin: 0 !important; padding: .3rem .6rem; height: 34px; }
.dp-pop { position: fixed; z-index: 400; width: 268px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgba(11,31,58,.18); padding: .6rem; font-family: inherit; }
.dp-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: .4rem; }
.dp-h b { font-weight: 800; font-size: .95rem; }
.dp-h button { width: 30px; height: 30px; border: 0; background: var(--mint); border-radius: 8px; font-size: 1.2rem; cursor: pointer; color: var(--navy); }
.dp-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.dp-w { font-size: .75rem; color: var(--muted); font-weight: 700; padding: .25rem 0; }
.dp-g button { height: 32px; border: 0; background: transparent; border-radius: 8px; cursor: pointer; font: inherit; font-size: .85rem; color: var(--navy); }
.dp-g button:hover { background: var(--teal-l); }
.dp-g button.tod { box-shadow: inset 0 0 0 1px var(--teal); }
.dp-g button.sel { background: var(--teal); color: #fff; font-weight: 800; }
.dp-f { display: flex; justify-content: space-between; margin-top: .4rem; padding-top: .4rem; border-top: 1px solid var(--line); }
.dp-f button { border: 0; background: transparent; color: var(--teal-d); font: inherit; font-weight: 700; cursor: pointer; padding: .2rem .5rem; }

/* date fields: formatted text + calendar icon */
.dp-field { position: relative; display: block; }
.dp-field.d-none { display: none !important; }
.dp-field .input { width: 100%; padding-inline-end: 40px; background: #fff; }
.dp-ico { position: absolute; inset-inline-end: 10px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; background: none; color: #6b7a8a; cursor: pointer; }
.dp-ico:hover { color: var(--teal, #0fa896); }

.pend-note{display:flex;align-items:center;gap:.8rem;background:#fffaf0;border:1px solid #f3e1b5;border-inline-start:4px solid #f2b632;border-radius:12px;padding:.65rem .9rem;margin:0 0 1rem;box-shadow:0 2px 10px rgba(122,82,0,.06);color:#7a5200}
.pend-note .pn-ico{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:50%;background:#fdecc0;color:#a06b00;flex:none}
.pend-note .pn-ico svg{width:18px;height:18px}
.pend-note .pn-txt{flex:1;font-weight:600}
.pend-note .pn-num{display:inline-block;min-width:1.5rem;text-align:center;background:#f2b632;color:#fff;border-radius:999px;padding:0 .45rem;margin-inline-end:.3rem}
@media(max-width:560px){.pend-note{flex-wrap:wrap}.pend-note .pn-txt{flex-basis:calc(100% - 50px)}}

.adm-nav{display:flex;gap:.35rem;flex-wrap:wrap;background:#fff;border:1px solid var(--line);border-radius:16px;padding:.4rem;margin:0 0 1.1rem;box-shadow:0 2px 12px rgba(2,78,87,.06)}
.adm-tab{display:inline-flex;align-items:center;gap:.45rem;padding:.5rem .95rem;border-radius:11px;color:var(--navy-2,#1c3355);font-weight:600;font-size:14px;text-decoration:none;transition:background .15s,color .15s}
.adm-tab svg{width:16px;height:16px;opacity:.7;flex:none}
.adm-tab:hover{background:var(--teal-l)}
.adm-tab.on{background:var(--teal);color:#fff;box-shadow:0 2px 8px rgba(3,156,168,.3)}
.adm-tab.on svg{opacity:1}
.adm-badge{background:#f2b632;color:#fff;border-radius:999px;font-size:11px;min-width:18px;height:18px;line-height:18px;text-align:center;padding:0 5px}
@media(max-width:700px){.adm-nav{flex-wrap:nowrap;overflow-x:auto}.adm-tab{white-space:nowrap}}

.pg-tabs{display:flex;gap:.3rem;flex-wrap:wrap;border-bottom:1px solid var(--line);margin:0 0 1rem}
.pg-tab{background:none;border:0;border-bottom:3px solid transparent;margin-bottom:-1px;padding:.65rem 1rem;font:inherit;font-weight:700;color:var(--muted);cursor:pointer;border-radius:10px 10px 0 0;transition:color .15s,background .15s}
.pg-tab:hover{background:var(--teal-l);color:var(--navy-2,#1c3355)}
.pg-tab.on{color:var(--teal-d);border-bottom-color:var(--teal);background:#fff}
.pg-tab.danger{margin-inline-start:auto;color:#b4443f}
.pg-tab.danger.on{color:#b4443f;border-bottom-color:#b4443f}
.pg-pane[hidden]{display:none}
.pg-pane>.card{max-width:760px}
.pg-pane[data-pane=hist]>.card,.pg-pane[data-pane=users]>.card{max-width:none}

.acc-dlg{border:1px solid var(--line);border-radius:16px;padding:1.2rem 1.3rem;width:min(420px,92vw);box-shadow:0 20px 50px rgba(2,40,46,.25);color:var(--navy)}
.acc-dlg::backdrop{background:rgba(2,40,46,.45)}

.rc-dlg{width:min(720px,94vw)}.rc-body{background:#f3f7f8;border-radius:12px;min-height:200px;display:flex;align-items:center;justify-content:center;overflow:auto;max-height:70vh}.rc-body img{max-width:100%;max-height:70vh;display:block}.rc-body iframe{width:100%;height:68vh;border:0}

/* shop subscription page */
.sb-hero{padding:1.2rem 1.4rem;margin-bottom:1.1rem;border-radius:16px;box-shadow:0 2px 12px rgba(2,78,87,.06);border-inline-start:5px solid var(--teal)}
.sb-hero.sb-bad{border-inline-start-color:#d64545;background:#fffafa}.sb-hero.sb-trial{border-inline-start-color:#f2b632;background:#fffdf7}
.sb-main{display:flex;align-items:center;gap:.8rem;flex-wrap:wrap;margin-bottom:.9rem}
.sb-plan{display:inline-flex;align-items:center;gap:.4rem}.sb-plan svg{width:16px;height:16px;opacity:.7}
.sb-stats{display:flex;gap:2.2rem;flex-wrap:wrap;align-items:flex-end}
.sb-lab{color:var(--muted);font-size:.85rem;margin-bottom:.15rem}
.sb-big{display:flex;align-items:baseline;gap:.35rem}.sb-num{font-size:2.4rem;font-weight:800;line-height:1;color:var(--teal-d)}.sb-bad .sb-num{color:#c0392b}.sb-unit{font-weight:700;color:var(--navy)}
.sb-date{display:inline-flex;align-items:center;gap:.45rem;font-weight:700;font-size:1.15rem;color:var(--navy)}.sb-date svg,.sb-cal{color:var(--teal);flex:none}
.sb-bar{height:8px;background:#e6eff0;border-radius:99px;margin-top:1rem;overflow:hidden}.sb-bar i{display:block;height:100%;background:linear-gradient(90deg,var(--teal),#35c2c9);border-radius:99px}
.sb-msg{display:flex;align-items:center;gap:.5rem;margin-top:.9rem;padding:.6rem .8rem;border-radius:10px;background:#f1f7f8;color:#35575b;font-size:.92rem}.sb-bad .sb-msg{background:#fdeeee;color:#a33}.sb-trial .sb-msg{background:#fdf3d8;color:#7a5200}
.sb-req{padding:1.3rem 1.4rem;margin-bottom:1.1rem;border-radius:16px;box-shadow:0 2px 12px rgba(2,78,87,.06)}
.sb-req-head{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;flex-wrap:wrap}.sb-req-head h3{margin:.5rem 0 .2rem}.sb-req-head .sb-date{font-size:.95rem;font-weight:600;color:var(--muted)}
.sb-sum{display:flex;gap:1.5rem;flex-wrap:wrap;color:#475569;margin:.3rem 0 1rem}
.sb-steps{display:flex;gap:.6rem;list-style:none;padding:0;margin:0 0 1.1rem;flex-wrap:wrap}
.sb-steps li{flex:1 1 170px;display:flex;align-items:center;gap:.55rem;padding:.55rem .7rem;border:1px solid var(--line);border-radius:12px;color:#8a9b9d;font-size:.9rem;background:#fafcfc}
.sb-dot{display:inline-grid;place-items:center;width:26px;height:26px;border-radius:50%;background:#e6eff0;color:#7d9193;font-weight:700;font-size:.85rem;flex:none}.sb-dot svg{width:14px;height:14px}
.sb-steps li.done{color:#0b6a73;background:var(--teal-l);border-color:#bfe3e6}.sb-steps li.done .sb-dot{background:var(--teal);color:#fff}
.sb-steps li.cur{color:#7a5200;background:#fff7e1;border-color:#f3e1b5;font-weight:700}.sb-steps li.cur .sb-dot{background:#f2b632;color:#fff}
.sb-bank{padding:1rem;margin:0 0 1rem;background:#f6fafb;border:1px solid var(--line);border-radius:12px;line-height:1.9}
.sb-file{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;margin-bottom:.5rem;font-size:.92rem}.sb-file svg{width:15px;height:15px;color:var(--teal)}
.sb-cash{display:flex;align-items:center;gap:.5rem;margin-top:.8rem;padding:.6rem .8rem;border-radius:10px;background:#f1f7f8;color:#35575b;font-size:.9rem}.sb-cash svg{width:17px;height:17px;flex:none}
.plan-card{position:relative;border-radius:16px;transition:box-shadow .15s,border-color .15s}.plan-card:hover{box-shadow:0 6px 20px rgba(2,78,87,.1)}
.plan-card.cur{border-color:var(--teal);box-shadow:0 0 0 1px var(--teal)}
.sb-curpill{position:absolute;top:.9rem;inset-inline-end:.9rem;background:var(--teal-l);color:var(--teal-d)}
.sb-after{margin-top:.5rem;padding-top:.6rem;border-top:1px dashed var(--line);font-size:.88rem}.sb-after b{color:var(--navy)}

.rcb{display:inline-flex;align-items:center;justify-content:center;gap:.4rem;height:34px;min-width:84px;padding:0 .85rem;box-sizing:border-box;font:inherit;font-size:.88rem;font-weight:600;line-height:1;text-decoration:none;vertical-align:middle;white-space:nowrap}.rcb svg{width:15px;height:15px;flex:none}
/* subscription durations: one ladder used by shop page, landing page; admin plans uses .ap-* */
.plan-grid{align-items:start}
.plan-card{padding:1.3rem;display:flex;flex-direction:column;gap:.45rem}
.plan-card .plan-name{font-size:1.15rem;font-weight:800;margin:0 0 .15rem}
.plan-card .plan-row{display:flex;align-items:center;gap:.45rem;color:#52666a;font-size:.9rem;margin:0}
.plan-cta{width:100%;margin-top:.9rem;padding:.7rem 1rem}
.tm-list{display:grid;gap:.55rem;margin-top:.7rem;text-align:start}
.tm{display:block;position:relative;cursor:pointer}
.tm.static{cursor:default}
.tm input{position:absolute;opacity:0;pointer-events:none}
.tm-box{display:grid;grid-template-columns:1fr auto;gap:.2rem .7rem;align-items:center;border:1.5px solid #d9e2e4;border-radius:12px;padding:.7rem .85rem;position:relative;background:#fff;transition:border-color .15s,box-shadow .15s,background .15s}
.tm:not(.static):hover .tm-box{border-color:var(--teal)}
.tm input:checked+.tm-box{border-color:var(--teal);box-shadow:0 0 0 1px var(--teal);background:#f1fafa}
.tm input:focus-visible+.tm-box{outline:2px solid var(--teal);outline-offset:2px}
.tm.best{margin-top:.35rem}
.tm.best .tm-box{border-color:#e0a82e;background:linear-gradient(180deg,#fffaf0,#fff);box-shadow:0 0 0 1px #e8b84a}
.tm.best input:checked+.tm-box{border-color:#d4900f;box-shadow:0 0 0 2px #e8b84a;background:linear-gradient(180deg,#fff6e0,#fff)}
.tm-badge{position:absolute;top:-.65rem;inset-inline-start:.85rem;background:#d4900f;color:#fff;font-size:.72rem;font-weight:700;line-height:1;padding:.28rem .65rem;border-radius:99px}
.tm-n{font-weight:700;font-size:1rem}
.tm-p{text-align:end;white-space:nowrap;display:flex;align-items:baseline;justify-content:flex-end;gap:.3rem}
.tm-p b{font-size:1.2rem;font-weight:800}
.tm-p s{color:#8a979a;font-size:.8rem}
.tm-sub{grid-column:1/-1;display:flex;gap:.6rem;align-items:center;flex-wrap:wrap;font-size:.82rem;color:#52666a;min-height:0}
.tm-sub:empty{display:none}
.tm-mo b{font-weight:700}
.tm-save{font-style:normal;display:inline-block;background:#e3f6ea;color:#15803d;border-radius:99px;padding:.12rem .55rem;font-weight:700;font-size:.74rem;line-height:1.3}
.tm-end{grid-column:1/-1;font-size:.76rem;color:#6b7c80;border-top:1px dashed #e3eaec;padding-top:.3rem;margin-top:.15rem}
.lp-plan{max-width:380px}
.lp-plan h3{font-size:1.25rem}
.lp-plan .tm-list{margin:.5rem 0 1rem}
/* admin plans: one compact card */
.ap-card{padding:1.1rem 1.2rem;margin-bottom:1rem}
.ap-top{display:flex;align-items:center;justify-content:space-between;gap:1rem}
.ap-top h3{margin:0;font-size:1.15rem}
.ap-act{white-space:nowrap;display:flex;gap:.4rem;align-items:center;font-weight:600}
.ap-hint{margin:.3rem 0 .9rem}
.ap-row{display:grid;grid-template-columns:2.2fr repeat(4,1fr) .8fr .8fr auto;gap:.6rem;align-items:end}
.ap-f .lbl{display:block;margin-bottom:.3rem;font-weight:700}
.ap-f .input{text-align:center;font-weight:700}
.ap-fname .input{text-align:start;font-weight:600}
.ap-f.best .lbl{color:#b87a0a}
.ap-f.best .input{border-color:#e0a82e;background:#fffaf0}
.ap-save{min-width:90px}
@media(max-width:1000px){.ap-row{grid-template-columns:repeat(4,1fr)}.ap-fname{grid-column:1/-1}.ap-save{grid-column:1/-1}}
.lp-plan .lp-list li{justify-content:flex-start;text-align:start}
.lp-plan .btn{width:100%;padding:.7rem 1rem}
.lp-plan h3{margin-bottom:.2rem}

/* square duration cards */
.plan-grid:has(.plan-wide){grid-template-columns:minmax(0,1fr)}
.plan-wide{padding:1.6rem 1.6rem 1.5rem;border-radius:20px;box-shadow:0 10px 30px rgba(2,78,87,.08);gap:.6rem}
.plan-wide .plan-name{font-size:1.3rem}
.plan-chips{display:flex;gap:.5rem;flex-wrap:wrap}
.plan-chips .plan-row{background:#f0f6f7;border-radius:99px;padding:.25rem .8rem;font-size:.85rem;color:#3e5559}
.plan-chips .plan-row b{color:#024e57}
.tc-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:1rem;margin-top:1.4rem;padding-top:.6rem}
.tc{display:block;position:relative;cursor:pointer;transition:transform .18s}
.tc:hover{transform:translateY(-3px)}
.tc input{position:absolute;opacity:0;pointer-events:none}
.tc-box{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.3rem;text-align:center;min-height:178px;border:1.5px solid #dbe5e7;border-radius:20px;padding:1.5rem .6rem 1.1rem;background:#fff;position:relative;box-shadow:0 2px 8px rgba(2,78,87,.05);transition:border-color .18s,box-shadow .18s,background .18s}
.tc:hover .tc-box{border-color:#7fc4c9;box-shadow:0 10px 24px rgba(2,78,87,.12)}
.tc-check{position:absolute;top:.7rem;inset-inline-end:.7rem;width:20px;height:20px;border-radius:50%;border:1.5px solid #c5d3d6;background:#fff;transition:all .18s}
.tc input:checked+.tc-box{border-color:var(--teal);background:linear-gradient(180deg,#eefafa,#fff);box-shadow:0 0 0 3px rgba(11,159,170,.18),0 14px 28px rgba(2,78,87,.14)}
.tc input:checked+.tc-box .tc-check{background:var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5l3 3 6-6.5'/%3E%3C/svg%3E") center/70% no-repeat;border-color:var(--teal)}
.tc input:checked~.tc-box,.tc input:checked+.tc-box{transform:none}
.tc:has(input:checked){transform:translateY(-4px)}
.tc input:focus-visible+.tc-box{outline:2px solid var(--teal);outline-offset:3px}
.tc-n{font-weight:700;font-size:.95rem;color:#52666a;letter-spacing:.01em}
.tc-p{display:flex;align-items:baseline;gap:.3rem;white-space:nowrap;margin:.15rem 0}
.tc-p b{font-size:2.15rem;font-weight:800;line-height:1.05;color:#024e57;letter-spacing:-.01em}
.tc-p .sar{color:#6b7c80;font-size:.9rem}
.tc-save{min-height:1.6rem;display:flex;align-items:center}
.tc-save em{font-style:normal;background:#e3f6ea;color:#15803d;border-radius:99px;padding:.18rem .7rem;font-weight:700;font-size:.75rem;box-shadow:inset 0 0 0 1px #bfe8cd}
.tc-mo{font-size:.8rem;color:#6b7c80;min-height:1.2rem}
.tc-mo b{color:#34484c}
/* year: premium */
.tc.best .tc-box{border:1.5px solid #d9a63a;background:radial-gradient(120% 90% at 50% 0%,#0f8a93 0%,#055b66 55%,#033f48 100%);box-shadow:0 10px 26px rgba(3,63,72,.28)}
.tc.best:hover .tc-box{border-color:#f0c35c;box-shadow:0 16px 34px rgba(3,63,72,.38)}
.tc.best .tc-n{color:#cfe9ec}
.tc.best .tc-p b{background:linear-gradient(180deg,#ffe9a8,#f2b93b);-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}
.tc.best .tc-p .sar{color:#f2c75c}
.tc.best .tc-save em{background:linear-gradient(180deg,#ffe29a,#f0b53a);color:#5a3a00;box-shadow:none}
.tc.best .tc-mo{color:#bfe0e4}.tc.best .tc-mo b{color:#fff}
.tc.best .tc-check{background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.5)}
.tc.best input:checked+.tc-box{border-color:#f5c95a;background:radial-gradient(120% 90% at 50% 0%,#12a0a9 0%,#066673 55%,#033f48 100%);box-shadow:0 0 0 3px rgba(245,201,90,.45),0 18px 36px rgba(3,63,72,.4)}
.tc.best input:checked+.tc-box .tc-check{background-color:#f2b93b;border-color:#f2b93b;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%235a3a00' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5l3 3 6-6.5'/%3E%3C/svg%3E")}
.tc-badge{position:absolute;top:-.8rem;left:50%;transform:translateX(-50%);background:linear-gradient(180deg,#ffe29a,#efb232);color:#5a3a00;font-size:.75rem;font-weight:800;line-height:1;padding:.4rem .9rem;border-radius:99px;white-space:nowrap;box-shadow:0 4px 10px rgba(180,120,10,.35)}
.tc-ends{margin-top:1.1rem;text-align:center}
.tc-end{display:inline-block;font-size:.9rem;color:#3e5559;background:#f0f6f7;border-radius:99px;padding:.4rem 1rem}
.tc-end b{color:#024e57}
.tc-end[hidden]{display:none}
.plan-wide .plan-cta{margin-top:1rem;padding:.85rem 1rem;font-size:1.05rem;border-radius:14px;box-shadow:0 8px 18px rgba(11,159,170,.25)}
@media(max-width:640px){.tc-grid{grid-template-columns:1fr 1fr;gap:.8rem}.tc-box{min-height:150px;padding-top:1.3rem}.tc-p b{font-size:1.8rem}}

/* read-only cards (landing page, pending request) */
.tc-view{cursor:default}
.tc-view:hover{transform:none}
.tc-view:hover .tc-box{border-color:#dbe5e7;box-shadow:0 2px 8px rgba(2,78,87,.05)}
.tc-view.best:hover .tc-box{border-color:#d9a63a;box-shadow:0 10px 26px rgba(3,63,72,.28)}
.tc-view .tc-check{display:none}
.tc-view.sel .tc-check{display:block}
.tc-view.sel .tc-box{border-color:var(--teal);background:linear-gradient(180deg,#eefafa,#fff);box-shadow:0 0 0 3px rgba(11,159,170,.18),0 14px 28px rgba(2,78,87,.14)}
.tc-view.sel .tc-check{background:var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5l3 3 6-6.5'/%3E%3C/svg%3E") center/70% no-repeat;border-color:var(--teal)}
.tc-view.best.sel .tc-box{border-color:#f5c95a;background:radial-gradient(120% 90% at 50% 0%,#12a0a9 0%,#066673 55%,#033f48 100%);box-shadow:0 0 0 3px rgba(245,201,90,.45),0 18px 36px rgba(3,63,72,.4)}
.tc-view.best.sel .tc-check{background-color:#f2b93b;border-color:#f2b93b}
.sb-req .tc-grid{margin-bottom:.4rem}
.lp-plan.lp-wide{max-width:860px;width:100%;padding:1.8rem 1.6rem}
.lp-plan.lp-wide .lp-list{display:grid;grid-template-columns:1fr 1fr;gap:.55rem 1.5rem;margin:1.4rem 0 1.4rem}
.lp-plan.lp-wide .btn{width:auto;min-width:220px}
@media(max-width:640px){.lp-plan.lp-wide .lp-list{grid-template-columns:1fr}.lp-plan.lp-wide .btn{width:100%}}

/* payment method dialog */
.pay-dlg{width:min(460px,92vw)}
.pay-opts{display:grid;grid-template-columns:1fr 1fr;gap:.8rem;margin-top:.9rem}
.pay-opt{display:block;cursor:pointer;position:relative}
.pay-opt input{position:absolute;opacity:0;pointer-events:none}
.pay-box{display:flex;flex-direction:column;align-items:center;gap:.35rem;text-align:center;border:1.5px solid #dbe5e7;border-radius:16px;padding:1.1rem .7rem;transition:all .18s;background:#fff;min-height:140px;justify-content:center}
.pay-box svg{width:28px;height:28px;color:var(--teal)}
.pay-box b{font-size:1.1rem}
.pay-box span{font-size:.8rem;color:#6b7c80;line-height:1.5}
.pay-opt:hover .pay-box{border-color:#7fc4c9;box-shadow:0 8px 20px rgba(2,78,87,.1)}
.pay-opt input:checked+.pay-box{border-color:var(--teal);background:linear-gradient(180deg,#eefafa,#fff);box-shadow:0 0 0 3px rgba(11,159,170,.18)}
.pay-opt input:focus-visible+.pay-box{outline:2px solid var(--teal);outline-offset:2px}
.sb-cash-big{margin-top:.8rem}

.sub-banner.warn { background: linear-gradient(90deg,#fff6dc,#ffeeba); color: #6b4d08; border-bottom: 1px solid #f0d78a; }
.sub-banner.warn .sb-ic { display: inline-flex; width: 1.5rem; height: 1.5rem; flex: none; color: #b8860b; }
.sub-banner.warn .sb-ic svg { width: 100%; height: 100%; }
.sub-banner.warn .sb-tx { flex: 1; }

.sb-hero.sb-warn,.sb-hero.sb-trial{border-inline-start-color:#f2b632;background:#fffdf7}
.sb-warn .sb-num,.sb-trial .sb-num{color:#b07a00}
.sb-warn .sb-bar,.sb-trial .sb-bar{background:#fbefc9}.sb-warn .sb-bar i,.sb-trial .sb-bar i{background:linear-gradient(90deg,#f2b632,#f7d46b)}
.sb-warn .sb-msg{background:#fdf3d8;color:#7a5200}
.sb-bad .sb-bar{background:#f9dcdc}.sb-bad .sb-bar i{background:linear-gradient(90deg,#d64545,#ec7a7a)}
.sub-banner.red .sb-ic { display: inline-flex; width: 1.5rem; height: 1.5rem; flex: none; color: #c0392b; }
.sub-banner.red .sb-ic svg { width: 100%; height: 100%; }
.sub-banner.red .sb-tx { flex: 1; }
.sub-banner.red { background: linear-gradient(90deg,#fde8e8,#f9d0d0); border-bottom: 1px solid #efb3b3; }
.exp-actions{display:flex;gap:.6rem;align-items:center;flex-wrap:wrap}
.exp-tabs{display:inline-flex;background:#fff;border:1px solid var(--line);border-radius:999px;padding:3px;gap:2px}
.exp-tab{display:inline-flex;align-items:center;gap:.45rem;padding:.4rem 1.1rem;border-radius:999px;font-weight:700;font-size:.9rem;color:var(--navy)}
.exp-tab.on{background:var(--teal);color:#fff}

.cur { display: inline-block; color: var(--soft); margin-inline-start: .3em; font-size: .8em; font-weight: 700; }
.num .cur { font-size: 15px; }
.line .lt .cur { font-size: .7rem; }

.exp-tab .ic{width:1.05em;height:1.05em}
button.exp-tab{border:0;font-family:inherit;cursor:pointer}
.cat-acts{display:inline-flex;gap:.35rem;align-items:center}

/* top action buttons: same pill style as "تصنيف جديد" */
.page-head > .btn, .page-head .btn, .page-head span > .btn { display: inline-flex; align-items: center; gap: .45rem; background: var(--teal); color: #fff; border: 0; border-radius: 999px; padding: .4rem 1.1rem; font-weight: 700; font-size: .9rem; margin: 4px; box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--line); font-family: inherit; cursor: pointer; }
.page-head .btn:hover { background: var(--teal-d); color: #fff; }
.page-head .btn .ic { width: 1.05em; height: 1.05em; }
.page-head .btn.btn-sm { padding: .4rem 1.1rem; }
.stopt.sel { background: var(--teal); color: #fff; border-color: var(--teal); }

/* POS bar and public header buttons: same pill style as "تصنيف جديد" */
.pos-bar .btn, .lp-acts .btn { display: inline-flex; align-items: center; gap: .45rem; background: var(--teal); color: #fff; border: 0; border-radius: 999px; padding: .4rem 1.1rem; font-weight: 700; font-size: .9rem; line-height: normal; margin: 0 4px; box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--line); font-family: inherit; cursor: pointer; }
.pos-bar .btn:hover, .lp-acts .btn:hover { background: var(--teal-d); color: #fff; }
.pos-bar .btn .ic, .pos-bar .btn:not(.btn-light) .ic, .lp-acts .btn .ic { width: 1.05em; height: 1.05em; }

/* admin panel: every button in the "تصنيف جديد" pill style (danger keeps red) */
body.admin .btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; background: var(--teal); color: #fff; border: 0; border-radius: 999px; padding: .4rem 1.1rem; font-weight: 700; font-size: .9rem; line-height: normal; box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--line); margin: 4px; font-family: inherit; cursor: pointer; }
body.admin .btn:hover { background: var(--teal-d); color: #fff; }
body.admin .btn.btn-danger { background: var(--red-l); color: var(--red); }
body.admin .btn .ic, body.admin .btn svg { width: 1.05em; height: 1.05em; }
body.admin .btn.btn-sm { padding: .3rem .9rem; font-size: .85rem; }
