/* Shop POS — design system (colours come from the theme the owner picks in Settings). Native-app look (Material 3 inspired): Inter type, line icons, tonal surfaces,
   main colour + accent colour on white / light gray, bottom sheets, ripple, smooth transitions. */
:root {
  /* Aljasiira: "navy" = slate (main colour), "gold" = copper (accent) */
  --navy: #2C4552; --navy-2: #3F6070; --navy-c: #DDE7EC; --on-navy-c: #1B2E37;
  --gold: #C07B4E; --gold-2: #A8653B; --gold-c: #F6E6DA; --on-gold-c: #5C3218; --on-gold: #FFFFFF;
  --navy-rgb: 44, 69, 82; --gold-rgb: 192, 123, 78;
  --bg: #F5F5F5; --surface: #FFFFFF; --surface-2: #F1F4F8; --surface-3: #E9EEF4;
  --ink: #101B2B; --muted: #5E6B7B; --faint: #8A97A6; --line: #E3E8EF;
  --red: #C62828; --red-c: #FDECEC; --green: #18794E; --green-c: #E3F5EC; --amber: #A86200; --amber-c: #FFF3D9;
  --r-sm: 12px; --r: 18px; --r-lg: 24px; --r-xl: 28px;
  --e1: 0 1px 2px rgba(16, 27, 43, .05), 0 1px 3px rgba(16, 27, 43, .07);
  --e2: 0 2px 6px rgba(16, 27, 43, .06), 0 8px 24px rgba(16, 27, 43, .08);
  --e3: 0 12px 40px rgba(var(--navy-rgb), .18);
  --nav-h: 76px; --bar-h: 60px;
  --ease: cubic-bezier(.2, 0, 0, 1); --ease-out: cubic-bezier(.05, .7, .1, 1);
  --font: "Inter", "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { font: 400 15px/1.45 var(--font); font-feature-settings: "cv11", "cv08", "tnum"; background: var(--bg); color: var(--ink);
  -webkit-font-smoothing: antialiased; overscroll-behavior-y: contain; -webkit-user-select: none; user-select: none; }
input, textarea, .selectable { -webkit-user-select: text; user-select: text; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; border: 0; background: none; padding: 0; }
a { color: var(--navy-2); text-decoration: none; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
h2 { font-size: 22px; font-weight: 700; color: var(--ink); }
h3 { font-size: 13px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 20px 4px 8px; }
.hidden { display: none !important; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 13px; } .right { text-align: right; } .center { text-align: center; }
.big { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.red { color: var(--red); } .green { color: var(--green); } .amber { color: var(--amber); } .bold { font-weight: 700; }
.row { display: flex; gap: 10px; align-items: center; } .row > .grow, .grow { flex: 1; min-width: 0; } .wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.spacer { height: 14px; }
svg.i { width: 22px; height: 22px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
svg.i.sm { width: 18px; height: 18px; } svg.i.lg { width: 26px; height: 26px; } svg.i.xl { width: 32px; height: 32px; }

/* ---------- ambient background ---------- */
body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(60vmax 40vmax at 110% -10%, rgba(var(--gold-rgb), .10), transparent 60%),
              radial-gradient(70vmax 50vmax at -20% 0%, rgba(var(--navy-rgb), .07), transparent 60%), var(--bg); }

/* ---------- top app bar ---------- */
#top { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 10px; min-height: var(--bar-h);
  padding: calc(8px + env(safe-area-inset-top)) 12px 8px 14px; background: rgba(245, 245, 245, .82);
  -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px); transition: box-shadow .2s, background .2s; }
#top.scrolled { box-shadow: 0 1px 0 var(--line), 0 6px 20px rgba(16, 27, 43, .06); background: rgba(255, 255, 255, .9); }
#top .emb { width: 38px; height: 38px; border-radius: 12px; background: #fff; box-shadow: var(--e1); display: grid; place-items: center; overflow: hidden; flex: none; }
#top .emb img { width: 34px; height: 34px; }
#top .ttl { flex: 1; min-width: 0; line-height: 1.15; }
#top .ttl b { display: block; font-size: 18px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#top .ttl span { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bizswitch { display: flex; background: var(--surface-3); border-radius: 999px; padding: 3px; }
.bizswitch button { height: 34px; padding: 0 12px; border-radius: 999px; font-weight: 650; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; transition: background .2s var(--ease), color .2s; }
.bizswitch button svg { width: 17px; height: 17px; }
.bizswitch button.on { background: var(--surface); color: var(--navy); box-shadow: var(--e1); }
@media (max-width: 460px) { .bizswitch button span { display: none; } .bizswitch button { padding: 0 11px; } }
.syncdot { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--green); position: relative; }
.syncdot.wait { color: var(--amber); } .syncdot.off { color: var(--red); }
.syncdot .n { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--amber); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.syncdot.off .n { background: var(--red); }
.syncdot.spin svg { animation: sp 1s linear infinite; }
.offline-bar { position: sticky; top: calc(var(--bar-h) + env(safe-area-inset-top)); z-index: 39; margin: 0 12px; border-radius: 12px; background: var(--amber-c); color: var(--amber);
  font-size: 13px; font-weight: 600; padding: 8px 12px; display: flex; gap: 8px; align-items: center; }
#topprog { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; overflow: hidden; opacity: 0; transition: opacity .2s; }
#topprog::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; background: var(--gold); border-radius: 2px; animation: prog 1.1s var(--ease) infinite; }
@keyframes prog { from { left: -40%; } to { left: 100%; } }

/* ---------- page ---------- */
#main { padding: 6px 14px; padding-bottom: calc(var(--nav-h) + 100px + env(safe-area-inset-bottom)); max-width: 980px; margin: 0 auto; min-height: 100vh; }
.page-in { animation: pageIn .26s var(--ease-out) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } }
.phead { display: flex; align-items: center; gap: 10px; margin: 8px 2px 14px; }
.phead h2 { flex: 1; }

/* ---------- bottom navigation (Material 3 navigation bar) ---------- */
#nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 45; display: flex; justify-content: space-around; background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border-top: 1px solid var(--line); padding: 8px 4px calc(10px + env(safe-area-inset-bottom)); }
#nav button { flex: 1; max-width: 110px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); position: relative; padding-top: 2px; }
#nav .ind { width: 60px; height: 32px; border-radius: 16px; display: grid; place-items: center; transition: background .25s var(--ease), color .2s; position: relative; overflow: hidden; }
#nav button.on { color: var(--ink); } #nav button.on .ind { background: var(--gold-c); color: var(--navy); }
#nav button.on .ind svg { stroke-width: 2.1; }
#nav .badge { position: absolute; top: -2px; left: calc(50% + 8px); }
.badge { background: var(--red); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; padding: 0 5px; display: inline-grid; place-items: center; }
@media (min-width: 900px) { #nav { left: 50%; transform: translateX(-50%); bottom: 14px; width: 560px; border-radius: 22px; border: 1px solid var(--line); box-shadow: var(--e2); padding-bottom: 10px; } }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border-radius: var(--r); padding: 16px; box-shadow: var(--e1); margin-bottom: 12px; }
.card.tonal { background: var(--surface-2); box-shadow: none; }
.card.navy { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; box-shadow: 0 10px 30px rgba(var(--navy-rgb), .25); }
.card.navy .muted { color: rgba(255, 255, 255, .75); }
.list { background: var(--surface); border-radius: var(--r); box-shadow: var(--e1); overflow: hidden; margin-bottom: 12px; }
.li { display: flex; align-items: center; gap: 14px; padding: 12px 16px; min-height: 64px; position: relative; overflow: hidden; }
.li + .li::before { content: ''; position: absolute; top: 0; left: 16px; right: 0; height: 1px; background: var(--line); }
.li.lead + .li.lead::before { left: 70px; }
.li.tap { cursor: pointer; } .li.tap:active { background: var(--surface-2); }
.li .main { flex: 1; min-width: 0; } .li .name { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .sub { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.li .chev { color: var(--faint); }
.av { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; flex: none; background: var(--navy-c); color: var(--navy); font-weight: 700; }
.av.gold { background: var(--gold-c); color: var(--on-gold-c); } .av.green { background: var(--green-c); color: var(--green); } .av.red { background: var(--red-c); color: var(--red); } .av.gray { background: var(--surface-3); color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 12px; }
@media (min-width: 700px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--surface); border-radius: var(--r); padding: 14px; box-shadow: var(--e1); display: flex; flex-direction: column; gap: 2px; }
.stat .lbl { font-size: 12px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.stat .lbl svg { width: 16px; height: 16px; }
.stat .val { font-size: 21px; font-weight: 750; color: var(--ink); letter-spacing: -.02em; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 650; background: var(--navy-c); color: var(--on-navy-c); white-space: nowrap; }
.pill.red { background: var(--red-c); color: var(--red); } .pill.green { background: var(--green-c); color: var(--green); } .pill.gold { background: var(--gold-c); color: var(--on-gold-c); } .pill.gray { background: var(--surface-3); color: var(--muted); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; } .tbl th, .tbl td { padding: 10px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.tbl tr:last-child td { border-bottom: 0; } .tbl th { color: var(--muted); font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; }
.tbl td.n, .tbl th.n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; } .tblwrap { overflow-x: auto; margin: 0 -4px; }
.empty { text-align: center; color: var(--muted); padding: 28px 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty svg { width: 40px; height: 40px; color: var(--faint); stroke-width: 1.4; }
.alert { box-shadow: inset 4px 0 0 var(--red), var(--e1); } .alert.amber { box-shadow: inset 4px 0 0 var(--gold), var(--e1); }

/* ---------- buttons ---------- */
.btn { position: relative; overflow: hidden; border-radius: 999px; min-height: 48px; padding: 0 20px; font-weight: 650; font-size: 15px; letter-spacing: .01em;
  background: var(--surface-3); color: var(--navy); display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform .12s var(--ease), box-shadow .2s, filter .2s; }
.btn:active { transform: scale(.97); } .btn[disabled] { opacity: .5; pointer-events: none; }
.btn.primary { background: var(--navy); color: #fff; box-shadow: 0 2px 8px rgba(var(--navy-rgb), .25); }
.btn.gold { background: var(--gold); color: var(--on-gold); box-shadow: 0 2px 8px rgba(229, 168, 0, .3); }
.btn.red { background: var(--red); color: #fff; } .btn.green { background: var(--green); color: #fff; }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.text { background: transparent; padding: 0 12px; }
.btn.block { width: 100%; } .btn.lg { min-height: 56px; font-size: 17px; } .btn.sm { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn svg { width: 20px; height: 20px; }
.fab { position: fixed; right: 16px; bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); z-index: 30; height: 56px; padding: 0 20px 0 16px; border-radius: 18px;
  background: var(--gold); color: var(--on-gold); font-weight: 700; display: flex; align-items: center; gap: 10px; box-shadow: 0 6px 20px rgba(229, 168, 0, .35), var(--e1); overflow: hidden; animation: fabIn .3s var(--ease-out) both; }
@media (min-width: 900px) { .fab { right: calc(50% - 470px); bottom: 110px; } }
@keyframes fabIn { from { transform: scale(.6); opacity: 0; } }
.spin { width: 18px; height: 18px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: sp .7s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }
.ripple { position: absolute; border-radius: 50%; transform: scale(0); background: currentColor; opacity: .16; pointer-events: none; animation: rip .55s var(--ease) forwards; }
@keyframes rip { to { transform: scale(2.6); opacity: 0; } }
.iconbtn { position: relative; overflow: hidden; width: 52px; height: 52px; border-radius: 16px; background: var(--navy); color: #fff; display: grid; place-items: center; flex: none; }
.iconbtn.gold { background: var(--gold); color: var(--on-gold); } .iconbtn.tonal { background: var(--surface-3); color: var(--navy); } .iconbtn.round { border-radius: 50%; width: 44px; height: 44px; }

/* ---------- forms ---------- */
label.f { display: block; margin-bottom: 12px; } label.f > span { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 0 4px 6px; }
.in { width: 100%; min-height: 52px; border: 0; border-radius: 14px; padding: 12px 14px; background: var(--surface-2); font-size: 16px; color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .15s, background .15s; -webkit-appearance: none; appearance: none; }
.in:focus { outline: none; background: #fff; box-shadow: inset 0 0 0 2px var(--navy-2), 0 0 0 4px rgba(10, 74, 140, .1); }
.in[readonly] { color: var(--muted); } textarea.in { min-height: 84px; resize: vertical; }
.in.big { font-size: 26px; font-weight: 750; text-align: right; letter-spacing: -.01em; }
.seg { display: flex; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--line); padding: 3px; gap: 2px; background: var(--surface); flex-wrap: wrap; }
.seg button { flex: 1; min-width: 64px; min-height: 44px; border-radius: 999px; font-weight: 650; font-size: 14px; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background .2s var(--ease), color .2s; position: relative; overflow: hidden; }
.seg button.on { background: var(--navy); color: #fff; }
.seg.gold button.on { background: var(--gold); color: var(--on-gold); }
.seg.tiles4 { border-radius: 16px; display: grid; grid-template-columns: repeat(2, 1fr); padding: 4px; } .seg.tiles4 button { border-radius: 12px; min-height: 54px; }
@media (min-width: 420px) { .seg.tiles4 { grid-template-columns: repeat(4, 1fr); } }
.chk { display: flex; align-items: center; gap: 14px; padding: 12px 2px; min-height: 52px; }
.chk + .chk { border-top: 1px solid var(--line); }
.chk .main { flex: 1; }
.chk input[type=checkbox] { -webkit-appearance: none; appearance: none; width: 46px; height: 28px; border-radius: 14px; background: var(--surface-3); box-shadow: inset 0 0 0 2px #C5CFDA; position: relative; flex: none; transition: background .2s; margin: 0; }
.chk input[type=checkbox]::after { content: ''; position: absolute; top: 6px; left: 6px; width: 16px; height: 16px; border-radius: 50%; background: #8A97A6; transition: all .2s var(--ease); }
.chk input[type=checkbox]:checked { background: var(--navy); box-shadow: none; } .chk input[type=checkbox]:checked::after { left: 22px; top: 4px; width: 20px; height: 20px; background: #fff; }
.searchbar { display: flex; gap: 10px; position: sticky; top: calc(var(--bar-h) + env(safe-area-inset-top)); z-index: 20; padding: 2px 0 12px; }
.search { flex: 1; display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 16px; padding: 0 14px; box-shadow: var(--e1); min-height: 52px; color: var(--muted); }
.search input { flex: 1; border: 0; background: transparent; font-size: 16px; min-height: 50px; outline: none; color: var(--ink); min-width: 0; }
.search input::-webkit-search-cancel-button { display: none; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; } .chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 14px 2px; } .chips.scroll::-webkit-scrollbar { display: none; }
.chip { position: relative; overflow: hidden; border-radius: 10px; height: 36px; padding: 0 14px; font-weight: 600; font-size: 14px; color: var(--ink); background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex: none; transition: background .15s; }
.chip.on { background: var(--navy-c); color: var(--on-navy-c); box-shadow: none; }
.chip svg { width: 16px; height: 16px; }

/* ---------- sell ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
@media (min-width: 600px) { .tiles { grid-template-columns: repeat(4, 1fr); } } @media (min-width: 900px) { .tiles { grid-template-columns: repeat(6, 1fr); } }
.tile { position: relative; background: var(--surface); border-radius: 18px; min-height: 96px; padding: 12px; box-shadow: var(--e1); display: flex; flex-direction: column; justify-content: space-between; text-align: left; overflow: hidden; transition: transform .12s var(--ease); }
.tile:active { transform: scale(.95); }
.tile::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--gold); opacity: .9; }
.tile.low::after { background: var(--red); }
.tile .n { font-weight: 600; font-size: 14px; line-height: 1.25; max-height: 5em; overflow: hidden; padding-right: 20px; }
.tile .p { font-weight: 750; color: var(--navy); font-size: 14px; margin-bottom: 2px; }
.tile .q { position: absolute; top: 8px; right: 8px; background: var(--navy); color: #fff; border-radius: 999px; min-width: 24px; height: 24px; padding: 0 7px; display: grid; place-items: center; font-weight: 750; font-size: 12px; animation: pop .25s var(--ease-out); }
@keyframes pop { from { transform: scale(.4); } }
.cartbar { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); z-index: 35; padding: 0 12px 10px; animation: barIn .3s var(--ease-out) both; }
@keyframes barIn { from { transform: translateY(30px); opacity: 0; } }
.cartbar .inner { max-width: 940px; margin: 0 auto; display: flex; gap: 8px; background: var(--navy); border-radius: 22px; padding: 8px; box-shadow: var(--e3); }
.cartbar .sum { flex: 1; color: #fff; text-align: left; padding: 4px 10px; display: flex; align-items: center; gap: 12px; position: relative; overflow: hidden; border-radius: 16px; }
.cartbar .sum .cnt { min-width: 38px; height: 38px; border-radius: 12px; background: rgba(255, 255, 255, .14); display: grid; place-items: center; font-weight: 750; }
.cartbar .sum b { font-size: 20px; display: block; letter-spacing: -.01em; } .cartbar .sum span { font-size: 12px; opacity: .75; }
.cartbar .pay { min-width: 112px; border-radius: 16px; }
@media (min-width: 900px) { .cartbar { bottom: 100px; } }
.qty { display: flex; align-items: center; gap: 2px; background: var(--surface-2); border-radius: 14px; padding: 3px; }
.qty button { width: 40px; height: 40px; border-radius: 11px; color: var(--navy); display: grid; place-items: center; position: relative; overflow: hidden; }
.qty button:active { background: var(--surface-3); }
.qty b { min-width: 30px; text-align: center; font-size: 16px; }
.totalbox { background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; border-radius: var(--r-lg); padding: 18px; text-align: center; margin-bottom: 14px; box-shadow: 0 10px 30px rgba(var(--navy-rgb), .22); }
.totalbox .t { font-size: 36px; font-weight: 800; color: var(--gold); letter-spacing: -.02em; line-height: 1.1; } .totalbox .u { opacity: .8; font-size: 13px; }
.acct { background: var(--gold-c); border-radius: var(--r); padding: 16px; text-align: center; margin: 10px 0; }
.acct b { font-size: 32px; letter-spacing: 3px; color: var(--navy); display: block; font-weight: 800; }
.changebox { text-align: center; padding: 12px; border-radius: 16px; background: var(--green-c); color: var(--green); font-size: 20px; font-weight: 750; }
.changebox.neg { background: var(--red-c); color: var(--red); }

/* ---------- sheets / dialogs ---------- */
.ov { position: fixed; inset: 0; background: rgba(8, 20, 36, .42); z-index: 100; display: flex; align-items: flex-end; justify-content: center; animation: fade .2s both; }
.ov.closing { animation: fadeOut .18s both; } .ov.closing .sheet { animation: down .2s var(--ease) both; }
@keyframes fade { from { opacity: 0; } } @keyframes fadeOut { to { opacity: 0; } } @keyframes down { to { transform: translateY(40%); } }
.sheet { background: var(--bg); width: 100%; max-width: 640px; max-height: 94vh; border-radius: var(--r-xl) var(--r-xl) 0 0; display: flex; flex-direction: column; animation: up .34s var(--ease-out) both; box-shadow: var(--e3); }
@keyframes up { from { transform: translateY(100%); } }
@media (min-width: 700px) { .ov { align-items: center; } .sheet { border-radius: var(--r-xl); max-height: 88vh; } }
.sheet .hd { padding: 8px 18px 10px; display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: var(--r-xl) var(--r-xl) 0 0; position: relative; }
.sheet .hd::before { content: ''; position: absolute; top: 8px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: #C9D2DC; }
.sheet .hd h2 { flex: 1; font-size: 19px; padding-top: 16px; }
.sheet .x { margin-top: 14px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); background: var(--surface-2); position: relative; overflow: hidden; }
.sheet .bd { padding: 16px 16px 18px; overflow-y: auto; -webkit-overflow-scrolling: touch; flex: 1; }
.sheet .ft { padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--surface); display: flex; gap: 10px; box-shadow: 0 -1px 0 var(--line); }
.sheet .ft .btn { flex: 1; }
#toasts { position: fixed; left: 0; right: 0; top: calc(10px + env(safe-area-inset-top)); z-index: 200; display: flex; flex-direction: column; align-items: center; pointer-events: none; padding: 0 16px; }
.toast { background: #1D2733; color: #fff; padding: 12px 16px; border-radius: 14px; font-weight: 550; font-size: 14px; max-width: 520px; width: fit-content; box-shadow: var(--e3); animation: toastIn .3s var(--ease-out) both; pointer-events: auto; display: flex; align-items: center; gap: 10px; }
.toast svg { width: 20px; height: 20px; flex: none; }
.toast.ok svg { color: #6EE7A8; } .toast.err { background: #8E1F1F; } .toast.warn svg { color: var(--gold); }
@keyframes toastIn { from { transform: translateY(-16px) scale(.96); opacity: 0; } }

/* ---------- login ---------- */
.login { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; padding: calc(14px + env(safe-area-inset-top)) 18px calc(18px + env(safe-area-inset-bottom)); position: relative; overflow: hidden; }
.login::before, .login::after { content: ''; position: absolute; border-radius: 50%; filter: blur(60px); z-index: -1; }
.login::before { width: 340px; height: 340px; background: rgba(var(--gold-rgb), .22); top: -120px; right: -120px; }
.login::after { width: 380px; height: 380px; background: rgba(var(--navy-rgb), .12); bottom: -140px; left: -160px; }
.login .lang { align-self: flex-end; display: flex; background: rgba(255, 255, 255, .7); border-radius: 999px; padding: 3px; box-shadow: var(--e1); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.login .lang button { height: 30px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; font-weight: 650; color: var(--muted); }
.login .lang button.on { background: var(--gold-c); color: var(--on-gold-c); box-shadow: 0 0 0 1px rgba(229, 168, 0, .35); }
.login img.logo { width: min(300px, 74vw); margin: 4px 0 6px; filter: drop-shadow(0 6px 18px rgba(var(--navy-rgb), .08)); }
.login h1 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin: 6px 0 18px; text-align: center; }
.login .box { width: 100%; max-width: 400px; }
#ucard { z-index: 10; }
.lgcard { background: rgba(255, 255, 255, .78); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-radius: var(--r-lg); padding: 14px; box-shadow: var(--e2); margin-bottom: 14px; position: relative; }
.dd { width: 100%; height: 58px; border-radius: 999px; background: var(--surface-2); display: flex; align-items: center; gap: 12px; padding: 0 18px; font-size: 18px; font-weight: 600; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); position: relative; overflow: hidden; }
.dd .ph { color: var(--faint); font-weight: 500; } .dd .grow { text-align: left; } .dd svg.chev { transition: transform .2s var(--ease); color: var(--muted); }
.dd.open svg.chev { transform: rotate(180deg); }
.ddlist { position: absolute; left: 14px; right: 14px; top: 78px; background: #fff; border-radius: 20px; box-shadow: var(--e3); z-index: 5; overflow: hidden; animation: ddIn .2s var(--ease-out) both; transform-origin: top; }
@keyframes ddIn { from { opacity: 0; transform: scaleY(.9) translateY(-6px); } }
.ddlist button { width: 100%; height: 54px; padding: 0 22px 0 56px; text-align: left; font-size: 17px; font-weight: 550; position: relative; overflow: hidden; display: flex; align-items: center; }
.ddlist button:active, .ddlist button.on { background: var(--surface-2); }
.ddlist button.on::before { content: ''; position: absolute; left: 24px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.pinrow { display: flex; align-items: center; gap: 14px; padding: 6px 8px 14px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.pinrow span { color: var(--faint); font-weight: 600; font-size: 15px; }
.pinshow { display: flex; gap: 14px; flex: 1; justify-content: center; padding-right: 30px; }
.pinshow i { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 2px #9AA6B3; transition: all .15s var(--ease); }
.pinshow i.f { background: var(--navy); box-shadow: none; transform: scale(1.15); }
.pinshow.shake { animation: shake .4s; } @keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pad button { height: 62px; border-radius: 999px; background: linear-gradient(180deg, #fff, #F4F6F9); box-shadow: 0 1px 2px rgba(16, 27, 43, .08), 0 3px 8px rgba(16, 27, 43, .06), inset 0 0 0 1px rgba(16, 27, 43, .04);
  font-size: 26px; font-weight: 600; color: var(--ink); position: relative; overflow: hidden; display: grid; place-items: center; transition: transform .1s; }
.pad button:active { transform: scale(.94); background: var(--gold-c); }
.pad button.go { background: linear-gradient(180deg, var(--navy-2), var(--navy)); color: #fff; font-size: 18px; font-weight: 700; box-shadow: 0 4px 14px rgba(var(--navy-rgb), .3); }
.pad button.bk { color: var(--muted); }
.lgerr { min-height: 22px; text-align: center; color: var(--red); font-weight: 600; font-size: 14px; margin-top: 2px; }
.lgfoot { margin-top: auto; padding-top: 14px; font-size: 12px; color: var(--faint); }

/* ---------- home hero ---------- */
.hero { position: relative; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--e2); padding: 18px 18px 16px; margin-bottom: 14px; overflow: hidden; }
.hero::before { content: ''; position: absolute; width: 260px; height: 260px; border-radius: 50%; right: -90px; top: -110px; background: radial-gradient(circle, rgba(var(--gold-rgb), .28), transparent 70%); }
.hero::after { content: ''; position: absolute; width: 280px; height: 280px; border-radius: 50%; left: -120px; bottom: -160px; background: radial-gradient(circle, rgba(var(--navy-rgb), .12), transparent 70%); }
.hero > * { position: relative; z-index: 1; }
.hero img { height: 92px; display: block; margin: 0 auto 6px; }
.hero .hi { text-align: center; color: var(--muted); font-size: 14px; }
.hero .kpi { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.hero .kpi .v { font-size: 30px; font-weight: 800; letter-spacing: -.02em; color: var(--navy); line-height: 1.1; }
.hero .kpi .l { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.camwrap { position: relative; background: #000; border-radius: var(--r); overflow: hidden; aspect-ratio: 4/3; }
.camwrap video { width: 100%; height: 100%; object-fit: cover; display: block; }
.camwrap .aim { position: absolute; left: 10%; right: 10%; top: 33%; bottom: 33%; border: 3px solid var(--gold); border-radius: 14px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .3); }
.camwrap .aim::after { content: ''; position: absolute; left: 6%; right: 6%; top: 50%; height: 2px; background: rgba(var(--gold-rgb), .8); animation: scanl 1.6s ease-in-out infinite alternate; }
@keyframes scanl { from { transform: translateY(-26px); } to { transform: translateY(26px); } }
.camwrap .last { position: absolute; left: 10px; right: 10px; bottom: 10px; background: rgba(0, 31, 62, .85); color: #fff; border-radius: 12px; padding: 9px; text-align: center; font-weight: 650; }
.guide h4 { font-size: 16px; margin: 18px 0 6px; color: var(--navy); } .guide ol, .guide ul { margin: 6px 0; padding-left: 22px; } .guide li { margin: 5px 0; }
.guide .note { background: var(--gold-c); border-radius: 14px; padding: 12px 14px; color: var(--on-gold-c); margin-top: 14px; }
@media print { #top, #nav, .cartbar, .fab, .noprint { display: none !important; } #main { padding: 0; } .card, .list { box-shadow: none; border: 1px solid #ccc; } body::before { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
.card > h3:first-child { margin-top: 0; } .card > h3 { margin-left: 0; }
/* placeholder shown only the very first time a page is opened (afterwards saved data appears instantly) */
.skel { height: 78px; border-radius: var(--r); margin-bottom: 12px; background: linear-gradient(90deg, #ECEFF3 25%, #F6F8FA 50%, #ECEFF3 75%); background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
/* v1.2: cart bar Clear/Park, stock on tiles, shift comparison, insights */
.cartbar .inner { gap: 6px; } .cartbar .sum { padding: 4px 6px; gap: 8px; } .cartbar .sum .cnt { min-width: 30px; height: 30px; }
.cartbar .sum b { font-size: 18px; white-space: nowrap; } .cartbar .pay { min-width: 86px; padding: 0 14px; }
.cartbar .mini { width: 44px; border-radius: 16px; display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, .12); flex: none; position: relative; overflow: hidden; }
.cartbar .mini.x { background: rgba(198, 40, 40, .92); }
.tile .s { font-size: 11.5px; font-weight: 600; color: var(--muted); } .tile .s.low { color: var(--red); }
.cmp td { padding: 9px 4px; } .cmp input { width: 100%; height: 42px; border: 0; border-radius: 10px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); text-align: right; padding: 0 8px; font: inherit; font-weight: 650; font-size: 16px; }
.cmp input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--navy-2); background: #fff; }
.tick { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--green-c); color: var(--green); }
.tick.bad { background: var(--red-c); color: var(--red); } .tick svg { width: 14px; height: 14px; stroke-width: 2.6; }
.toast .tact { margin-left: 6px; color: var(--gold); font-weight: 800; padding: 4px 8px; border-radius: 8px; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; } .bars i { flex: 1; border-radius: 4px 4px 0 0; background: var(--gold); display: block; min-height: 2px; position: relative; }
.bars i.prev { background: #C9D3DF; }
.hm { display: grid; grid-template-columns: 30px repeat(16, 1fr); gap: 2px; font-size: 9.5px; color: var(--muted); align-items: center; } .hm b { height: 15px; border-radius: 3px; display: block; }
.trend { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; display: inline-block; margin-top: 4px; } .trend.up { background: var(--green-c); color: var(--green); } .trend.dn { background: var(--red-c); color: var(--red); }
.meter { height: 10px; border-radius: 6px; background: var(--surface-3); overflow: hidden; } .meter i { display: block; height: 100%; border-radius: 6px; background: var(--gold); }
.danger { box-shadow: inset 0 0 0 1.5px #F3C2C2, var(--e1); }
.grp { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin: 14px 2px 2px; }
.chk .cnt { font-size: 12.5px; color: var(--muted); }
.togs { display: flex; gap: 6px; flex-wrap: wrap; } .togs button { height: 36px; padding: 0 12px; border-radius: 10px; font-weight: 650; font-size: 13.5px; box-shadow: inset 0 0 0 1.5px var(--line); color: var(--muted); background: #fff; }
.togs button.on { background: var(--navy); color: #fff; box-shadow: none; }

/* v1.2.1 login: clear "please wait" while the PIN is checked */
.pad.busy button { opacity: .4; pointer-events: none; transition: opacity .2s; }
.pad.busy button.go { opacity: 1; }
.pad button.go .spin { width: 24px; height: 24px; border-width: 3px; display: inline-block; vertical-align: middle; }
.pinshow.pulse i.f { animation: dotp 1s ease-in-out infinite; }
.pinshow.pulse i.f:nth-child(2) { animation-delay: .12s; } .pinshow.pulse i.f:nth-child(3) { animation-delay: .24s; } .pinshow.pulse i.f:nth-child(4) { animation-delay: .36s; } .pinshow.pulse i.f:nth-child(5) { animation-delay: .48s; } .pinshow.pulse i.f:nth-child(6) { animation-delay: .6s; }
@keyframes dotp { 50% { transform: scale(.6); opacity: .5; } }
.lgwait { display: inline-flex; align-items: center; gap: 8px; background: var(--navy); color: #fff; padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; }
.lgwait .spin { width: 15px; height: 15px; border-width: 2px; }
.busyov { position: fixed; inset: 0; z-index: 9999; background: rgba(10, 22, 40, .45); display: flex; align-items: center; justify-content: center; animation: fade .15s; }
.busyov .bx { background: #fff; border-radius: 22px; padding: 22px 30px; display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 200px; box-shadow: 0 12px 40px rgba(0, 0, 0, .25); }
.busyov .bx .spin { width: 34px; height: 34px; border-width: 3.5px; color: var(--navy); }
.ov.closing { pointer-events: none; }
/* v1.3 expenses + email times */
.li.exp { align-items: flex-start; }
.li.exp .desc { font-size: 14px; color: var(--ink); margin: 2px 0; line-height: 1.35; }
.li.exp .end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; white-space: nowrap; }
.li.exp.gone .name, .li.exp.gone .desc { opacity: .6; }
.strike { text-decoration: line-through; opacity: .55; }
.sub.red { color: var(--red); }
textarea.in { resize: vertical; min-height: 56px; font-family: inherit; line-height: 1.4; padding-top: 10px; }
.when { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.when:last-of-type { border-bottom: 0; }
.when > .av { margin-top: 2px; }
.when b { display: block; margin-bottom: 6px; }
.when .grid2 { gap: 10px; }
.when .f { margin-bottom: 0; }
.when .grid2 { grid-template-columns: 1.7fr 1fr; }
/* v1.4 selling loose (pieces) */
.lz { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 6px; background: var(--navy-c); color: var(--navy); font-size: 10px; font-weight: 800; letter-spacing: .05em; vertical-align: middle; white-space: nowrap; }
.lz.pkt { background: var(--gold-c); color: var(--on-gold-c); }
.qgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.qb { border: 0; border-radius: 16px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); padding: 10px 4px; display: flex; flex-direction: column; align-items: center; gap: 2px; font: inherit; cursor: pointer; }
.qb b { font-size: 20px; color: var(--ink); } .qb span { font-size: 12px; color: var(--muted); font-weight: 600; }
.qb.on { background: var(--navy); box-shadow: none; } .qb.on b, .qb.on span { color: #fff; }
button.pk { width: 100%; border: 0; font: inherit; text-align: left; display: flex; align-items: center; gap: 14px; border-radius: 18px; padding: 14px 16px; background: var(--gold); color: var(--on-gold); margin-bottom: 12px; cursor: pointer; }
button.pk b { font-size: 17px; } button.pk .small { display: block; opacity: .75; } button.pk .av { background: rgba(0, 0, 0, .08); color: var(--on-gold); }
.step { display: flex; align-items: center; gap: 8px; }
.step button { width: 44px; height: 44px; border-radius: 14px; border: 0; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-size: 22px; font-weight: 700; cursor: pointer; }
.step input { width: 70px; height: 44px; text-align: center; border: 0; border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font: inherit; font-size: 20px; font-weight: 750; }
.ptab { width: 100%; border-collapse: collapse; font-size: 14px; }
.ptab th { font-size: 11.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; text-align: left; padding: 4px; }
.ptab td { padding: 5px 4px; border-top: 1px solid var(--line); }
.ptab input { width: 100%; height: 38px; border: 0; border-radius: 10px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); text-align: right; padding: 0 10px; font: inherit; font-weight: 650; }
.ptab .n { text-align: right; } .ptab .pf { color: var(--green); font-weight: 650; text-align: right; white-space: nowrap; font-size: 13px; } .ptab .pf.red { color: var(--red); }
.note { font-size: 12.5px; color: var(--muted); margin: 8px 2px 0; line-height: 1.45; }
.lzcard { margin: 6px 0 12px; padding: 14px 16px; box-shadow: inset 0 0 0 1px var(--line) !important; }
.lzcard.on { box-shadow: 0 0 0 2px var(--gold) !important; }
input.sw { appearance: none; -webkit-appearance: none; width: 46px; height: 28px; border-radius: 999px; background: #C9D3DF; position: relative; flex: none; cursor: pointer; transition: background .15s; margin: 0; }
input.sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: left .15s; }
input.sw:checked { background: var(--navy); } input.sw:checked::after { left: 21px; } input.sw:disabled { opacity: .5; }
.tile .n .lz { margin-left: 2px; }
.ptab [data-del] { width: 32px; height: 32px; border-radius: 10px; background: transparent !important; color: var(--muted) !important; box-shadow: none !important; }
.ptab [data-del]:hover { background: var(--surface-2) !important; color: var(--red) !important; }
/* v1.5 change from Zaad/Edahab, exchange, dollar prices */
.usd { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 6px; background: #E3F4EA; color: #17663A; font-size: 10.5px; font-weight: 800; vertical-align: middle; white-space: nowrap; }
.eff { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.eff > div { flex: 1 1 90px; border-radius: 14px; padding: 10px 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.eff small { display: block; color: var(--muted); font-weight: 650; font-size: 11.5px; letter-spacing: .03em; }
.eff b { font-size: 17px; } .eff .up { color: var(--green); } .eff .dn { color: var(--red); }
.changebox + .eff { margin-top: 10px; }
#sentInfo .changebox { margin-top: 2px; }
.opt { display: flex; gap: 12px; align-items: center; border-radius: 18px; padding: 12px 14px; box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 8px; background: #fff; cursor: pointer; }
.opt.on { box-shadow: 0 0 0 2px var(--navy); background: var(--surface-2); }
.opt .rd { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 2px #B8C4D3; flex: none; }
.opt.on .rd { box-shadow: inset 0 0 0 7px var(--navy); }
.opt b { display: block; font-size: 15px; } .opt .s { font-size: 12.5px; color: var(--muted); }
.eq { font-size: 13px; color: var(--muted); margin: -6px 2px 10px; line-height: 1.5; } .eq b { color: var(--ink); }
#exch h3 { margin: 14px 4px 8px; }
#exch .li.gone .sub { opacity: .6; }
/* v1.6 take money out */
.who { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.who button { border: 0; border-radius: 14px; padding: 10px 2px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font: inherit; font-size: 12.5px; font-weight: 650; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--ink); cursor: pointer; }
.who button.on { background: var(--navy); color: #fff; box-shadow: none; }
.pickc { display: flex; align-items: center; gap: 12px; border-radius: 16px; padding: 10px 12px; box-shadow: 0 0 0 2px var(--gold); background: var(--gold-c); margin-bottom: 4px; }
.pickc .av { background: var(--gold-c); } .pickc b { display: block; } .pickc .s { font-size: 12.5px; color: var(--muted); }
.bal { text-align: center; font-size: 15px; font-weight: 700; margin-top: 8px; padding: 10px; border-radius: 14px; background: #FFF4E5; color: #8A4B00; }
.bal.sup { background: #E8F5EC; color: #17663A; }
.av.amber { background: #FFF4E5; color: #8A4B00; }
.li.mv.gone .sub { opacity: .7; }
#ceff:empty { display: none; }
.li.mv .name { white-space: normal; overflow: visible; text-overflow: clip; }
/* v1.7 part paid */
.split { border-radius: 18px; padding: 12px 14px; box-shadow: inset 0 0 0 1px var(--line); background: #fff; margin-top: 12px; }
.split .rowx { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; font-size: 15px; gap: 10px; }
.split .rowx b { font-size: 17px; white-space: nowrap; }
.split .rowx.t { border-top: 1px dashed var(--line); margin-top: 4px; padding-top: 10px; }
.pp { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 7px; background: #FFF4E5; color: #8A4B00; font-size: 11px; font-weight: 800; vertical-align: middle; }

/* ---------- brand on the login page ---------- */
.lgbrand { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 6px; }
.lgbrand .logo { width: 108px !important; height: 108px; object-fit: contain; border-radius: 28px; background: #fff; box-shadow: var(--e2); padding: 8px; margin: 0 !important; }
.lgbrand .bname { font-size: 22px; font-weight: 800; color: var(--navy); letter-spacing: -.01em; text-align: center; padding: 0 16px; }
#top .emb img { width: 100%; height: 100%; object-fit: contain; }
.hero img[data-brand-logo] { width: 64px; height: 64px; object-fit: contain; border-radius: 18px; background: #fff; box-shadow: var(--e1); padding: 4px; }
/* brand card in Settings */
.brandprev { display: flex; align-items: center; gap: 14px; }
.brandprev img { width: 72px; height: 72px; object-fit: contain; border-radius: 20px; background: #fff; box-shadow: var(--e1); padding: 6px; flex: none; }
.swatches { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.swatch { border: 0; border-radius: 16px; padding: 10px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); display: flex; align-items: center; gap: 8px; font: inherit; font-size: 12px; font-weight: 650; color: var(--ink); cursor: pointer; text-align: left; }
.swatch.on { box-shadow: 0 0 0 2px var(--navy); background: #fff; }
.swatch .dots { display: flex; flex: none; } .swatch .dots i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #fff; display: block; } .swatch .dots i + i { margin-left: -6px; }
.hero .hbn { text-align: center; font-weight: 800; font-size: 17px; color: var(--navy); margin: 2px 0 2px; }
.qrcard .qrimg { width: min(320px, 82vw); height: auto; display: block; margin: 0 auto; border-radius: 18px; }

/* ---------- Built by Jaahuur & Co. ---------- */
:root { --jg: #0F3B36; --jc: #D38A2C; --jcream: #F2EEE5; }
.jcredit { display: flex; align-items: center; gap: 9px; margin: 10px auto 0; padding: 8px 16px; border: 0; border-radius: 999px; background: #fff; box-shadow: var(--e1); color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.jcredit img { height: 24px; }
.jcredit b { color: var(--jg); letter-spacing: .14em; font-weight: 700; }
.jcredit b i, .jwm i { font-style: normal; color: var(--jc); letter-spacing: 0; margin: 0 2px; }
.jmaker { margin: -6px -14px 0; }
.jhero { background: radial-gradient(120% 80% at 50% 0%, #1A5A52 0%, var(--jg) 55%, #0B2E2A 100%); color: var(--jcream); padding: 34px 22px 108px; text-align: center; position: relative; overflow: hidden; }
.jarc { position: absolute; left: 50%; border-radius: 50%; border: 2px solid rgba(211,138,44,.18); pointer-events: none; }
.jmk { height: 110px; position: relative; filter: drop-shadow(0 10px 24px rgba(0,0,0,.35)); }
.jwm { font-size: 30px; letter-spacing: .2em; font-weight: 600; margin-top: 18px; position: relative; }
.jwm span { letter-spacing: 0; }
.jln { width: 46px; height: 3px; background: var(--jc); margin: 14px auto; border-radius: 2px; position: relative; }
.jtg { font-size: 12.5px; letter-spacing: .32em; color: #B9CCC6; position: relative; }
.jcard { background: #fff; border-radius: 26px; box-shadow: var(--e2); margin: -22px 18px 14px; position: relative; padding: 20px 18px; text-align: center; }
.jav { width: 104px; height: 104px; border-radius: 50%; margin: -74px auto 12px; overflow: hidden; background: var(--jg); display: grid; place-items: center; box-shadow: 0 0 0 5px #fff, 0 0 0 8px var(--jc); color: var(--jcream); font-weight: 800; font-size: 28px; letter-spacing: .04em; }
.jcard h2 { margin: 0; font-size: 21px; color: var(--jg); }
.jrole { color: var(--jc); font-weight: 700; font-size: 13px; letter-spacing: .12em; margin-top: 4px; }
.jpills { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin: 10px 0 4px; }
.jpills span { font-size: 11px; letter-spacing: .16em; font-weight: 700; color: var(--jg); background: #E8F0EE; border-radius: 999px; padding: 6px 10px; }
.jcard p { color: var(--muted); font-size: 14px; margin: 12px 4px 16px; line-height: 1.5; }
.jwa, .jcall { display: flex; align-items: center; justify-content: center; gap: 10px; border-radius: 16px; font-weight: 700; text-decoration: none; }
.jwa { background: #1FA855; color: #fff; height: 54px; font-size: 16px; }
.jcall { background: #F1F4F2; color: var(--jg); height: 50px; margin-top: 8px; }
.jfoot { text-align: center; color: var(--faint); font-size: 12px; margin: 8px 0 20px; }
.jli { margin-top: 14px; background: linear-gradient(135deg, var(--jg), #13463F); color: var(--jcream); border-radius: 22px; padding: 14px; display: flex; align-items: center; gap: 14px; box-shadow: var(--e2); cursor: pointer; }
.jli img { width: 48px; height: 48px; border-radius: 14px; background: var(--jg); object-fit: contain; padding: 5px; box-shadow: 0 0 0 1.5px rgba(211,138,44,.6); }
.jli b { display: block; letter-spacing: .12em; }
.jli span { font-size: 12.5px; color: #B9CCC6; }
.jov { position: fixed; inset: 0; z-index: 60; background: var(--bg, #f4f4f4); overflow-y: auto; padding: 14px; animation: fade .18s ease; }
.jov .jx { position: fixed; top: 12px; right: 12px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.16); color: #fff; display: grid; place-items: center; cursor: pointer; }

.jav img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- pharmacy ---------- */
.rx { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 6px; background: #FDE7E7; color: #B42323; font-size: 10.5px; font-weight: 800; font-style: italic; vertical-align: middle; white-space: nowrap; }
.rx.big { height: 34px; min-width: 40px; justify-content: center; font-size: 15px; border-radius: 10px; }
.xp { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 6px; font-size: 10.5px; font-weight: 800; white-space: nowrap; vertical-align: middle; }
.xp.red { background: #FDE7E7; color: #B42323; } .xp.amber { background: #FFF1D6; color: #8A5300; }
.tile .st { font-weight: 500; color: var(--muted); font-size: 12px; }
.tile.exp { box-shadow: inset 0 0 0 2px #E58A8A; }
.rxcard { margin: 0 0 12px; padding: 12px 14px; box-shadow: 0 0 0 2px #F3B4B4 !important; background: #FFF8F8; }
.rxchk { background: #FFF8F8; border-radius: 14px; padding: 10px 12px; margin: 2px 0 10px; }
.batches { margin: 6px 0 12px; padding: 14px 16px; box-shadow: inset 0 0 0 1px var(--line) !important; }
.blist { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.brow { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2, #F4F6F6); }
.brow .right { text-align: right; }
.brow.bw { background: #FFF6E3; } .brow.bx { background: #FDECEC; }
.brow.bx .small b, .brow.bx .small { color: #B42323; }
/* Built-by page: team of two + support for existing clients */
.jteam { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.jteam .jav { width: 96px; height: 96px; margin: -70px auto 10px; }
.jteam h2 { font-size: 15.5px; line-height: 1.25; }
.jteam .jrole { font-size: 10.5px; letter-spacing: .1em; line-height: 1.35; }
.jcard .jpills { margin-top: 14px; }
.jsec { font-size: 11px; font-weight: 800; letter-spacing: .16em; color: var(--jc); margin: 16px 0 -4px; }
.jsup { margin-top: 0; text-align: left; }
.jsup p { text-align: left; margin: 10px 2px 14px; }
.jsh { display: flex; align-items: center; gap: 12px; }
.jsh b { color: var(--jg); font-size: 16px; }
.jsi { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 14px; background: #E8F0EE; color: var(--jg); display: grid; place-items: center; }

/* ---------- Aljasiira ---------- */
.lgbrand .logo { background: #F7F5F0; border-radius: 24px; padding: 6px; }
#top .emb img { background: #F7F5F0; border-radius: 10px; padding: 2px; }
.tiles { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile .u { font-size: 11.5px; font-weight: 700; color: var(--gold-2); }
.tile .p2 { font-size: 12px; color: var(--muted); font-weight: 600; }
.shx { font-size: 12px; color: var(--muted); font-weight: 600; }
.bsw { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 12px; scrollbar-width: none; } .bsw .chip { white-space: nowrap; } .bsw .soon { opacity: .55; }
.al { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; } .al + .al { border-top: 1px solid var(--line); }
.al .ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.al b { font-size: 14.5px; } .al .s { font-size: 12.5px; color: var(--muted); } .al.unread b::after { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); margin-left: 6px; vertical-align: middle; }
.steps { display: flex; gap: 6px; margin: 10px 0 4px; } .steps i { flex: 1; height: 6px; border-radius: 3px; background: var(--surface-3); } .steps i.on { background: var(--gold); }
.qbtn { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-radius: 16px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.stp { display: flex; align-items: center; gap: 10px; } .stp button { width: 44px; height: 44px; border-radius: 12px; background: var(--surface); box-shadow: var(--e1); font-size: 22px; font-weight: 700; color: var(--navy); }
.stp input { width: 74px; text-align: center; font-size: 20px; font-weight: 800; border: 0; background: transparent; }
.pmrow { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; margin-bottom: 8px; }
.pmrow select, .pmrow input { height: 48px; }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 6px 2px; } .kv b { white-space: nowrap; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; } .tbl td, .tbl th { padding: 9px 6px; border-bottom: 1px solid var(--line); text-align: left; } .tbl .r { text-align: right; }
.wordrow { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 12px 2px; border-bottom: 1px solid var(--line); } .wordrow .k { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.wordrow input { height: 44px; } .wordrow.ch input { box-shadow: inset 0 0 0 2px var(--gold); }
.tempPin { font-size: 40px; font-weight: 800; letter-spacing: .3em; text-align: center; color: var(--navy); background: var(--gold-c); border-radius: 18px; padding: 14px; margin: 10px 0; }
/* printing: only the document is printed */
#printArea { display: none; }
@media print {
  body > *:not(#printArea) { display: none !important; }
  #printArea { display: block !important; }
  @page { margin: 10mm; }
  #printArea.thermal { width: 72mm; }
  @page thermal { size: 80mm auto; margin: 3mm; }
}

.wl { display: grid; grid-template-columns: 74px 1fr; align-items: center; gap: 8px; } .wl span { font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }
