/* GoldFlow — design system (v28). One warm neutral palette, one accent (gold), IBM Plex Sans Arabic, soft depth, calm motion. */
@font-face { font-family: "Plex Arabic"; src: url(/fonts/plex-arabic-400.woff2) format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E, U+2010-2011, U+204F, U+2E41; }
@font-face { font-family: "Plex Arabic"; src: url(/fonts/plex-arabic-500.woff2) format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E, U+2010-2011, U+204F, U+2E41; }
@font-face { font-family: "Plex Arabic"; src: url(/fonts/plex-arabic-600.woff2) format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E, U+2010-2011, U+204F, U+2E41; }
@font-face { font-family: "Plex Arabic"; src: url(/fonts/plex-arabic-700.woff2) format("woff2"); font-weight: 700 800; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E, U+2010-2011, U+204F, U+2E41; }
@font-face { font-family: "Plex Arabic"; src: url(/fonts/plex-latin-400.woff2) format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: "Plex Arabic"; src: url(/fonts/plex-latin-500.woff2) format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: "Plex Arabic"; src: url(/fonts/plex-latin-600.woff2) format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: "Plex Arabic"; src: url(/fonts/plex-latin-700.woff2) format("woff2"); font-weight: 700 800; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }

:root {
  --bg: #f6f4ef; --surface: #ffffff; --surface-2: #faf8f4; --surface-3: #f2efe8;
  --ink: #1d1b17; --ink-2: #3b3730; --muted: #6e675a; --faint: #a39b8b; --line: #e9e4da; --line-2: #dcd5c6;
  --gold: #a47a1e; --gold-hi: #c39a3e; --gold-soft: #f7efdc; --gold-ink: #5a420c;
  --side: #1a1916; --side-2: #24221e; --side-3: #2f2c26; --side-ink: #e7e1d3; --side-muted: #8f887a;
  --ok: #1f7a4d; --ok-soft: #e6f4ec; --danger: #b2342a; --danger-soft: #fbecea; --warn: #8a5c00; --warn-soft: #fcf2db; --info: #2b5b88; --info-soft: #e8f0f8;
  --radius: 14px; --radius-sm: 10px; --radius-xs: 8px;
  --shadow: 0 1px 2px rgba(45,35,15,.05), 0 0 0 1px rgba(45,35,15,.02);
  --shadow-2: 0 18px 40px -18px rgba(45,35,15,.22), 0 2px 6px rgba(45,35,15,.05);
  --ease: cubic-bezier(.16,1,.3,1); --ease-in: cubic-bezier(.4,0,1,1);
  --font: "Plex Arabic", "Segoe UI", Tahoma, "Noto Sans Arabic", system-ui, sans-serif;
  --side-w: 252px; --top-h: 64px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--ink); font: 15px/1.65 var(--font); direction: rtl; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
::selection { background: var(--gold-soft); color: var(--gold-ink); }
.num, td.n, .money { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
a { color: var(--gold-ink); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold); }
h1 { font-size: 22px; font-weight: 700; letter-spacing: -.01em; margin: 0 0 2px; line-height: 1.35; }
h2 { font-size: 16.5px; font-weight: 700; margin: 0 0 12px; } h3 { font-size: 15px; font-weight: 600; margin: 0 0 8px; }
.sub { color: var(--muted); font-size: 13px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
kbd { font: 600 11px/1 var(--font); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 2px 5px; color: var(--muted); background: var(--surface); direction: ltr; }

/* icons & logo */
.ic { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: -4px; }
.ic-xs { width: 14px; height: 14px; vertical-align: -2px; } .ic-lg { width: 32px; height: 32px; }
.logo-mark { width: 34px; height: 34px; flex: none; display: block; filter: drop-shadow(0 4px 10px rgba(164,122,30,.28)); }
.logo-mark.md { width: 36px; height: 36px; } .logo-mark.lg { width: 46px; height: 46px; } .logo-mark.xl { width: 64px; height: 64px; }
.logo-mark .logo-shine { opacity: 0; }
.logo-mark.anim .logo-g { stroke-dasharray: 100; animation: gDraw 1.4s var(--ease) infinite; }
.logo-mark.anim .logo-shine { opacity: 1; animation: shine 1.4s ease-in-out infinite; }
.logo-mark.anim { animation: breathe 1.4s ease-in-out infinite; }
@keyframes gDraw { 0% { stroke-dashoffset: 100; } 55%, 100% { stroke-dashoffset: 0; } }
@keyframes shine { 0% { transform: translateX(0) rotate(18deg); } 100% { transform: translateX(95px) rotate(18deg); } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }

/* ── layout ── */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--side); color: var(--side-ink); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; border-inline-start: 1px solid #000; }
.brand { display: flex; align-items: center; gap: 12px; padding: 20px 18px 16px; color: inherit; }
.brand:hover { color: inherit; }
.brand b { font-size: 16.5px; font-weight: 700; letter-spacing: .01em; color: #fff; display: block; line-height: 1.2; }
.brand small { display: block; color: var(--side-muted); font-size: 12px; max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { flex: 1; overflow-y: auto; padding: 4px 10px 12px; scrollbar-width: thin; scrollbar-color: #3a362f transparent; }
.nav-sep { color: var(--side-muted); font-size: 11.5px; font-weight: 600; padding: 14px 10px 6px; letter-spacing: .02em; }
.nav-group:first-child .nav-sep { padding-top: 4px; }
.nav a { position: relative; display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 9px; color: var(--side-ink); font-size: 14px; font-weight: 500; transition: background .2s var(--ease), color .2s; }
.nav a .ic { color: var(--side-muted); width: 19px; height: 19px; transition: color .2s, transform .3s var(--ease); }
.nav a:hover { background: var(--side-2); color: #fff; }
.nav a:hover .ic { color: var(--side-ink); transform: translateX(-2px); }
.nav a.active { background: var(--side-3); color: #fff; }
.nav a.active .ic { color: var(--gold-hi); }
.nav a.active::before { content: ''; position: absolute; inset-inline-start: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold-hi); }
.side-foot { padding: 10px; border-top: 1px solid var(--side-2); }
.side-user { width: 100%; display: flex; align-items: center; gap: 10px; background: transparent; border: 0; color: var(--side-ink); padding: 8px; border-radius: 10px; cursor: pointer; text-align: start; }
.side-user:hover { background: var(--side-2); }
.who-txt { display: grid; min-width: 0; flex: 1; line-height: 1.3; }
.who-txt b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-txt small { font-size: 11.5px; color: var(--side-muted); }
.avatar { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 13px;
  background: linear-gradient(135deg, #3a352c, #2a2721); color: var(--gold-hi); box-shadow: inset 0 0 0 1px rgba(201,162,74,.35); }
.avatar.lg { width: 42px; height: 42px; font-size: 15px; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { height: var(--top-h); display: flex; align-items: center; gap: 12px; padding: 0 28px; position: sticky; top: 0; z-index: 20;
  background: rgba(246,244,239,.82); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid rgba(220,213,198,.7); }
.top-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; color: var(--ink-2); min-width: 0; }
.top-title .ic { color: var(--gold); }
.top-title span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-pill { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; min-width: 240px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--faint); cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.search-pill:hover { border-color: var(--gold-hi); box-shadow: 0 0 0 4px rgba(195,154,62,.12); }
.search-pill span { flex: 1; text-align: start; font-size: 13.5px; color: var(--muted); }
.branch-pill { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line-2); color: var(--ink-2); font-size: 13.5px; font-weight: 600; }
.branch-pill .ic { color: var(--gold); width: 18px; height: 18px; }
.branch-pill select { border: 0; background: transparent; font-weight: 600; outline: none; cursor: pointer; max-width: 180px; padding: 0 2px; }
.branch-pill:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(164,122,30,.25); }
.top-user { display: flex; align-items: center; gap: 9px; background: transparent; border: 0; padding: 4px 6px 4px 10px; border-radius: 12px; cursor: pointer; }
.top-user:hover { background: var(--surface-3); }
.top-user .who-txt small { color: var(--muted); }
.top-user .avatar { background: var(--ink); }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; }
.menu-btn { display: none; }
.content { padding: 26px 32px 64px; width: 100%; max-width: 1360px; }
.tabbar { display: none; }

/* page enter: the whole page rises in, its sections one after another */
.content.page-in > * { animation: rise .55s var(--ease) both; }
.content.page-in > *:nth-child(2) { animation-delay: .04s; } .content.page-in > *:nth-child(3) { animation-delay: .08s; }
.content.page-in > *:nth-child(4) { animation-delay: .12s; } .content.page-in > *:nth-child(5) { animation-delay: .16s; }
.content.page-in > *:nth-child(n+6) { animation-delay: .2s; }
.content.page-in .grid > * { animation: rise .6s var(--ease) both; }
.content.page-in .grid > *:nth-child(2) { animation-delay: .05s; } .content.page-in .grid > *:nth-child(3) { animation-delay: .1s; } .content.page-in .grid > *:nth-child(4) { animation-delay: .15s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* route loader: the mark over a skeleton of the page */
.route-loader { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 26px 0 8px; animation: fade .25s ease both; }
.route-loader .sub { font-weight: 600; letter-spacing: .3em; font-size: 11px; color: var(--muted); }
.skeleton-page { display: grid; gap: 14px; opacity: .9; }
.sk { border-radius: 12px; background: linear-gradient(90deg, var(--surface-3) 0%, #fbfaf7 45%, var(--surface-3) 90%); background-size: 220% 100%; animation: shimmer 1.3s linear infinite; }
.sk-title { height: 26px; width: 34%; } .sk-sub { height: 14px; width: 22%; margin-top: -6px; }
.sk-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; } .sk-card { height: 104px; } .sk-block { height: 240px; }
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.state-box { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 48px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.state-box.err .ic { color: var(--danger); } .state-box span { color: var(--muted); max-width: 52ch; }

/* ── surfaces ── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
a.card, .card.click { transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .2s; }
a.card:hover, .card.click:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--line-2); color: inherit; }
.grid { display: grid; gap: 16px; }
.grid > * { min-width: 0; }   /* wide children (tables, tag previews) scroll inside, never widen the page */
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0,1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .row.between { justify-content: space-between; }
.stack > * + * { margin-top: 14px; }
.kpi { position: relative; overflow: hidden; }
.kpi .label { color: var(--muted); font-size: 13px; font-weight: 500; } .kpi .value { font-size: 26px; font-weight: 700; margin-top: 4px; letter-spacing: -.01em; line-height: 1.3; } .kpi .hint { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.grid.g4 > .kpi:first-child::after { content: ''; position: absolute; inset-inline: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--gold-hi), var(--gold)); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 + .sub, .page-head .sub { margin-top: 2px; }

/* tables */
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: right; font-weight: 600; color: var(--muted); font-size: 12.5px; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
thead th:first-child { border-start-start-radius: 8px; } thead th:last-child { border-start-end-radius: 8px; }
td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: #fcfbf8; }
tr:last-child td { border-bottom: 0; }
tbody tr.click { cursor: pointer; } tbody tr.click:hover { background: var(--gold-soft); }
td.n, th.n { text-align: left; }
td.num, td .num { white-space: nowrap; }   /* barcodes and numbers never break mid-value */
tfoot td { font-weight: 700; border-top: 2px solid var(--line-2); background: var(--surface-2); }

/* badges & alerts */
.badge { display: inline-flex; align-items: center; gap: 4px; border-radius: 99px; padding: 2px 10px; font-size: 12px; font-weight: 600; background: var(--surface-3); color: var(--muted); white-space: nowrap; line-height: 1.6; }
.badge.ok { background: var(--ok-soft); color: var(--ok); } .badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.warn { background: var(--warn-soft); color: var(--warn); } .badge.info { background: var(--info-soft); color: var(--info); } .badge.gold { background: var(--gold-soft); color: var(--gold-ink); }
.alert { border-radius: var(--radius-sm); padding: 12px 16px; font-size: 14px; border: 1px solid transparent; }
.alert.danger { background: var(--danger-soft); color: var(--danger); border-color: #f1cdc8; }
.alert.warn { background: var(--warn-soft); color: var(--warn); border-color: #f0dcae; }
.alert.info { background: var(--info-soft); color: var(--info); border-color: #cddcec; }
.alert.ok { background: var(--ok-soft); color: var(--ok); border-color: #c2e1cf; }
.empty { color: var(--muted); text-align: center; padding: 32px 10px; }

/* forms */
label.f { display: block; font-size: 13px; font-weight: 500; color: var(--ink-2); margin-bottom: 6px; }
.input, select.input, textarea.input { width: 100%; height: 44px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: #fff; padding: 0 13px; outline: none; transition: border-color .2s, box-shadow .2s, background .2s; }
.input:hover { border-color: #cdc5b3; }
textarea.input { height: auto; padding: 10px 13px; }
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(195,154,62,.16); }
.input::placeholder { color: var(--faint); }
.input.num { text-align: left; }
.input.big { height: 56px; font-size: 20px; border-radius: 12px; }
.btn { height: 44px; padding: 0 18px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: #fff; cursor: pointer; font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  transition: background .2s, border-color .2s, box-shadow .25s var(--ease), transform .12s var(--ease); color: var(--ink); }
.btn:hover { background: var(--surface-2); border-color: #cdc5b3; color: var(--ink); text-decoration: none; }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn .ic { width: 18px; height: 18px; }
.btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); } .btn.primary:hover { background: #33302a; color: #fff; }
.btn.gold { background: linear-gradient(180deg, #9a7219, #86630f); color: #fff; border-color: #7a5a0c; box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 6px 16px -8px rgba(164,122,30,.7); }
.btn.gold:hover { background: linear-gradient(180deg, #8d6814, #7a5a0c); color: #fff; }
.btn.danger { color: var(--danger); border-color: #edc3be; } .btn.danger:hover { background: var(--danger-soft); color: var(--danger); }
.btn.big { height: 56px; font-size: 17px; padding: 0 28px; border-radius: 12px; }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn.busy { pointer-events: none; opacity: .7; } .btn.busy .ic { animation: breathe .8s ease-in-out infinite; }
.seg { display: inline-flex; background: var(--surface-3); border-radius: 12px; padding: 4px; gap: 4px; border: 1px solid var(--line); }
.seg button { border: 0; background: transparent; border-radius: 9px; padding: 8px 18px; cursor: pointer; font-weight: 600; color: var(--muted); transition: background .25s var(--ease), color .2s, box-shadow .25s; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(45,35,15,.12); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line-2); background: #fff; border-radius: 99px; padding: 5px 13px; font-size: 13px; font-weight: 500; cursor: pointer; transition: all .2s var(--ease); }
.chip:hover { border-color: var(--gold-hi); }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* POS */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 20px; align-items: start; }
.pos .panel { position: sticky; top: calc(var(--top-h) + 16px); }
.cart-line { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 14px 0; border-bottom: 1px dashed var(--line-2); }
.cart-line.fresh { animation: rise .4s var(--ease) both; }
.cart-line:last-child { border-bottom: 0; }
.cart-line .meta { color: var(--muted); font-size: 12.5px; }
.cart-line .breakdown { grid-column: 1 / -1; display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); background: var(--surface-2); border-radius: 10px; padding: 8px 12px; }
.cart-line .breakdown b { color: var(--ink); font-weight: 600; }
.total-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.total-row.grand { font-size: 23px; font-weight: 800; border-top: 2px solid var(--ink); margin-top: 8px; padding-top: 12px; }
.tag-in { color: var(--ok); } .tag-out { color: var(--gold-ink); }
.kbd { font-size: 11px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; color: var(--muted); background: #fff; }

/* modal, toast, popover */
.overlay { position: fixed; inset: 0; background: rgba(26,25,22,.42); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 50; padding: 16px; animation: fade .2s ease both; }
.overlay.out { animation: fade .18s ease reverse both; pointer-events: none; }
.modal { position: relative; background: #fff; border-radius: 18px; width: min(540px, 100%); max-height: 90vh; overflow: auto; padding: 24px; box-shadow: 0 30px 80px -20px rgba(26,25,22,.45); animation: pop .35s var(--ease) both; }
.overlay.out .modal { animation: pop .18s var(--ease-in) reverse both; }
.modal.wide { width: min(780px, 100%); }
.modal h2:first-of-type { padding-inline-end: 36px; }
.modal-x { position: absolute; inset-inline-end: 14px; top: 14px; width: 34px; height: 34px; border-radius: 9px; border: 0; background: var(--surface-3); color: var(--muted); display: grid; place-items: center; cursor: pointer; z-index: 1; }
.modal-x:hover { background: var(--line); color: var(--ink); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
.toasts { position: fixed; bottom: 20px; left: 20px; z-index: 60; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 12px; box-shadow: 0 16px 40px -12px rgba(0,0,0,.4); max-width: 420px; font-size: 14px; animation: toastIn .45s var(--ease) both; }
.toast .ic { color: #7fd1a5; width: 18px; height: 18px; } .toast.err { background: #8f2a22; } .toast.err .ic { color: #ffc7c0; }
.toast.out { animation: toastOut .25s var(--ease-in) both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px) scale(.97); } }
.pop { position: fixed; z-index: 55; min-width: 240px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-2); padding: 6px; animation: pop .25s var(--ease) both; }
.pop-head { display: flex; align-items: center; gap: 10px; padding: 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.pop-head b { display: block; font-size: 14px; } .pop-head small { color: var(--muted); font-size: 12px; }
.pop button { width: 100%; display: flex; align-items: center; gap: 10px; background: transparent; border: 0; padding: 10px; border-radius: 9px; cursor: pointer; text-align: start; font-weight: 500; }
.pop button:hover { background: var(--surface-2); } .pop button.danger { color: var(--danger); }
.pop .avatar { background: var(--ink); }

/* quick search */
.palette-modal { padding: 0; width: min(600px, 100%); overflow: hidden; align-self: start; margin-top: 12vh; }
.palette-modal .modal-x { display: none; }
.palette-in { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.palette-in .ic { color: var(--faint); } .palette-in .input { border: 0; height: 40px; padding: 0; font-size: 16px; box-shadow: none; }
.palette-list { max-height: 50vh; overflow: auto; padding: 6px; }
.palette-list a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--ink); font-weight: 500; }
.palette-list a .ic { color: var(--muted); } .palette-list a small { margin-inline-start: auto; color: var(--muted); font-size: 12px; }
.palette-list a.on, .palette-list a:hover { background: var(--gold-soft); color: var(--gold-ink); } .palette-list a.on .ic { color: var(--gold); }
.palette-foot { padding: 10px 18px; border-top: 1px solid var(--line); display: flex; gap: 6px; align-items: center; background: var(--surface-2); }

/* login */
.login { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 1.05fr 1fr; }
.login .art { position: relative; overflow: hidden; background: radial-gradient(120% 80% at 85% 10%, #3a3122 0%, #1c1a16 55%, #141310 100%); color: var(--side-ink); padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; }
.login .art::after { content: ''; position: absolute; inset: auto -20% -40% auto; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(201,162,74,.22), transparent 65%); pointer-events: none; }
.login .art .brand { padding: 0; } .login .art .brand small { color: var(--side-muted); }
.login .art h1 { font-size: 38px; line-height: 1.35; margin-top: 40px; color: #fff; letter-spacing: -.015em; } .login .art p { color: #b9b1a1; max-width: 440px; font-size: 15.5px; }
.login .form { display: grid; place-items: center; padding: 32px; position: relative; background: var(--bg); }
.login .box { width: min(400px, 100%); animation: rise .6s var(--ease) both; }
.login .box h1 { font-size: 26px; }
.demo-accounts { margin-top: 18px; font-size: 13px; }
.demo-accounts button { width: 100%; justify-content: flex-start; margin-top: 6px; }

/* receipt */
.receipt { font-size: 13px; } .receipt h2 { text-align: center; margin-bottom: 2px; } .receipt .center { text-align: center; }
.receipt table td, .receipt table th { padding: 5px 4px; }

@media print {
  body { background: #fff; } .side, .top, .no-print, .toasts { display: none !important; }
  .overlay { position: static; background: none; padding: 0; } .modal { box-shadow: none; width: 80mm; padding: 0; max-height: none; }
  .app { display: block; } .content { padding: 0; }
}
/* ── barcode tags: sized in mm, black on white, left-to-right ── */
.tag { box-sizing: border-box; direction: ltr; background: #fff; color: #000; overflow: hidden; display: flex; font-family: Arial, "Segoe UI", Tahoma, sans-serif; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.tag.tail { flex-direction: row; }
.tag .flag { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: .5mm .8mm; min-width: 0; gap: .2mm; }
.tag-bc { width: 100%; height: calc(var(--h) * .55); }
.tag-bc svg { display: block; width: 100%; height: 100%; fill: #000; }
.tag-code { font: 700 min(calc(var(--h) * .18), 3.4mm)/1 "Courier New", Arial, monospace; letter-spacing: .15mm; white-space: nowrap; }
.tag-logo { display: block; max-width: 100%; max-height: calc(var(--h) * .5); object-fit: contain; filter: grayscale(1) contrast(1.4); }
.tag-info { font: 700 min(calc(var(--h) * .17), 3mm)/1.1 Arial, sans-serif; white-space: nowrap; }
.tag-txt { font: 700 min(calc(var(--h) * .15), 2.8mm)/1.15 "Segoe UI", Tahoma, sans-serif; direction: rtl; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tag-bad { font-size: 2mm; color: #000; }
.tag.flat { flex-direction: column; align-items: center; justify-content: space-between; padding: 1.2mm 1.6mm; }
.tag.flat .tag-bc { height: calc(var(--h) * .36); }
.tag-head { display: flex; align-items: center; justify-content: center; gap: 1mm; max-width: 100%; height: calc(var(--h) * .24); }
.tag.flat .tag-logo { max-height: 100%; }
.tag-preview { padding: 14px; background: var(--surface-2); border: 1px dashed var(--line-2); border-radius: 10px; overflow-x: auto; display: flex; justify-content: center; }
.tag-preview .tag { outline: 1px solid #bbb; zoom: 2; }
.tag-preview .tail-gap { background: repeating-linear-gradient(45deg, #f1ede3 0 1px, #fff 1px 3px); }
.logo-box { height: 120px; display: grid; place-items: center; background: #fff; border: 1px dashed var(--line-2); border-radius: 10px; }
.logo-box img { max-height: 100px; max-width: 90%; }
#tagPrint { display: none; }
@media print {
  body.print-tags #root, body.print-tags .toasts, body.print-tags #overlay { display: none !important; }
  body.print-tags { background: #fff; margin: 0; }
  body.print-tags #tagPrint { display: block; }
  #tagPrint .tag { break-after: page; page-break-after: always; }
  #tagPrint .tag:last-child { break-after: auto; page-break-after: auto; }
}

/* ── drawer bits (hidden on desktop) ── */
.scrim { display: none; }
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ── laptop / small desktop ── */
@media (max-width: 1180px) {
  .search-pill { min-width: 0; } .search-pill span, .search-pill kbd { display: none; }
  .top-user .who-txt { display: none; }
}
@media (max-width: 1100px) {
  .pos { grid-template-columns: minmax(0, 1fr) 340px; }
  .content { padding: 22px 22px 64px; }
}

/* ── tablet: the sidebar becomes a drawer ── */
@media (max-width: 900px) {
  :root { --top-h: 58px; }
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 0 0 auto; width: min(300px, 86vw); height: 100%; z-index: 45; transform: translateX(105%); transition: transform .38s var(--ease), visibility .38s; visibility: hidden; border-radius: 18px 0 0 18px; }
  .side.open { transform: none; visibility: visible; box-shadow: -20px 0 50px rgba(0,0,0,.35); }
  .scrim { display: block; position: fixed; inset: 0; background: rgba(26,25,22,.45); backdrop-filter: blur(2px); z-index: 44; opacity: 0; pointer-events: none; transition: opacity .3s; }
  .side.open + .scrim { opacity: 1; pointer-events: auto; }
  body.drawer-open { overflow: hidden; }
  .menu-btn { display: inline-grid; }
  .top { padding: 0 14px; gap: 8px; }
  .top-title { flex: 1; font-size: 15.5px; }
  .search-pill { margin: 0; height: 40px; width: 40px; padding: 0; justify-content: center; }
  .branch-pill { height: 40px; } .branch-pill select { max-width: 110px; } .branch-pill.static span { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .top-user { display: none; }
  .pos { grid-template-columns: 1fr; } .pos .panel { position: static; }
  .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g3 { grid-template-columns: 1fr; }
  .sk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login { grid-template-columns: 1fr; } .login .art { display: none; }
  /* phone tab bar: the main pages under the thumb */
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; inset: auto 0 0 0; z-index: 30; padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.9); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px); border-top: 1px solid var(--line); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border: 0; background: transparent; color: var(--muted); font-size: 11px; font-weight: 600; border-radius: 12px; cursor: pointer; transition: color .2s; }
  .tabbar .ic { width: 22px; height: 22px; transition: transform .35s var(--ease); }
  .tabbar a.active { color: var(--gold-ink); } .tabbar a.active .ic { color: var(--gold); transform: translateY(-2px); }
  .tabbar a.active::after { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--gold); margin-top: 1px; }
  .tabbar a:active, .tabbar button:active { background: var(--surface-3); }
  .content { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .toasts { bottom: calc(84px + env(safe-area-inset-bottom)); }
}

/* ── phone ── */
@media (max-width: 700px) {
  body { font-size: 15px; }
  .content { padding: 16px 14px calc(96px + env(safe-area-inset-bottom)); }
  h1 { font-size: 21px; }
  .card { padding: 16px; border-radius: 14px; }
  .g2 { grid-template-columns: 1fr; }
  .grid { gap: 12px; }
  .kpi .value { font-size: 20px; }
  .card.kpi { padding: 14px; }
  .g4, .g3:has(> .kpi) { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .page-head .sub:has(.kbd) { display: none; }
  .sk-block { height: 160px; } .sk-card { height: 86px; }

  /* headers: actions go full width under the title */
  .page-head { align-items: stretch; margin-bottom: 16px; }
  .page-head > div:first-child { flex: 1 1 100%; }
  .page-head > .btn, .page-head > a.btn { width: 100%; justify-content: center; }
  .page-head > .row { width: 100%; } .page-head > .row > .btn { flex: 1 1 auto; }

  /* touch-friendly controls; 16px inputs stop iOS from zooming the page */
  .input, select.input, textarea.input { height: 48px; font-size: 16px; }
  .input.big { height: 56px; font-size: 20px; }
  .btn { height: 48px; } .btn.sm { height: 40px; padding: 0 14px; } .btn.big { height: 56px; }
  .seg { display: flex; width: 100%; } .seg button { flex: 1; padding: 10px 4px; }
  .row > .input { min-width: 0; }

  /* tables → one compact card per row: first column is the title, the rest sit in two columns (label above value) */
  .tbl-wrap { overflow: visible; }
  /* a card that only frames a table: on phones the rows are the cards, so the frame steps back */
  .card:has(> .tbl-wrap > table.rt):not(:has(form, .input)) { background: transparent; border: 0; box-shadow: none; padding: 0; }
  table.rt, table.rt tbody, table.rt tfoot { display: block; width: 100%; }
  table.rt thead { display: none; }
  table.rt tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px 14px 8px; margin-bottom: 10px; box-shadow: var(--shadow); }
  table.rt tbody tr:hover { background: var(--surface); }
  table.rt tbody tr.click:active { background: var(--gold-soft); }
  table.rt td { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; border: 0; padding: 6px 0; text-align: right; word-break: break-word; min-width: 0; }
  table.rt td.n, table.rt td.num { align-items: flex-end; text-align: right; }
  table.rt td:first-child.n, table.rt td:first-child.num { flex-direction: row-reverse; }
  table.rt td::before { content: attr(data-label); color: var(--muted); font-size: 11.5px; font-weight: 500; }
  table.rt td[data-label=""]::before { display: none; }
  table.rt td[data-label=""] { grid-column: 1 / -1; }
  table.rt td[data-label=""] > .btn { width: 100%; }
  table.rt td { overflow-wrap: anywhere; } table.rt td.num { white-space: normal; }
  table.rt td:first-child { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; font-weight: 700; font-size: 15px; border-bottom: 1px solid var(--line); padding: 10px 0; margin-bottom: 2px; }
  table.rt td:first-child::before { font-size: 12px; }
  table.rt td .input { width: 100%; max-width: none; height: 46px; }
  table.rt td:first-child .input { flex: 0 1 65%; }
  table.rt td:empty { display: none; }
  table.rt tfoot tr { background: var(--gold-soft); border-color: #ead9b0; }
  table.rt tfoot td { font-weight: 700; background: transparent; }
  table.rt tfoot td:first-child { border-bottom: 0; }

  /* dialogs are sheets that slide up from the bottom */
  .overlay { place-items: end center; padding: 0; }
  .modal, .modal.wide { width: 100%; max-height: 92vh; border-radius: 22px 22px 0 0; padding: 26px 16px calc(18px + env(safe-area-inset-bottom)); animation: sheet .4s var(--ease) both; }
  .overlay.out .modal { animation: sheet .2s var(--ease-in) reverse both; }
  .modal::before { content: ''; position: absolute; top: 8px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: var(--line-2); }
  .modal-x { top: 12px; }
  .modal.palette-modal { margin-top: 0; align-self: end; border-radius: 22px 22px 0 0; padding: 22px 0 env(safe-area-inset-bottom); }
  .palette-modal .modal-x { display: grid; } .palette-in { padding-inline-end: 56px; } .palette-foot { display: none; }
  @keyframes sheet { from { transform: translateY(100%); } to { transform: none; } }
  .modal .row > div[style*="flex"] { flex: 1 1 100% !important; }
  .modal .row > .btn { flex: 1; }

  /* on phones messages appear at the top, so they never cover the payment fields or the confirm button */
  .toasts { left: 12px; right: 12px; top: calc(var(--top-h) + 10px); bottom: auto; }
  .toast { max-width: none; }
  .total-row.grand { font-size: 21px; }
  .tag-preview .tag { zoom: 1.15; }
  .tag-side { order: -1; }
}

/* sign-up, trial bar, onboarding (v10) */
.signup-cta { text-align: center; padding: 12px; border: 1px dashed var(--gold); border-radius: var(--radius); background: var(--gold-soft); font-size: 14px; }
.perks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; color: #d8d1c2; max-width: 440px; }
.perks li { padding-right: 28px; position: relative; } .perks li::before { content: ''; position: absolute; right: 4px; top: .45em; width: 6px; height: 11px; border: solid #d9b45a; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; opacity: 0; pointer-events: none; }
.trial-bar { background: var(--gold-soft); border: 1px solid #e6d3a6; color: var(--gold-ink); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 16px; gap: 10px; flex-wrap: wrap; }
.alert.row { gap: 10px; flex-wrap: wrap; }
.onboard { border-color: var(--gold); }
.onboard .progress { width: 160px; height: 8px; background: #eee9de; border-radius: 99px; overflow: hidden; } .onboard .progress div { height: 100%; background: var(--gold); }
.onboard .steps { display: grid; gap: 6px; margin-top: 12px; }
.onboard .step { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius); color: inherit; border: 1px solid transparent; }
.onboard .step:hover { text-decoration: none; background: var(--surface-2); }
.onboard .step > span:nth-child(2) { flex: 1; display: grid; } .onboard .step small { color: var(--muted); font-size: 12.5px; }
.onboard .step .dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #eee9de; font-weight: 700; flex: none; }
.onboard .step.done { opacity: .55; } .onboard .step.done .dot { background: var(--ok-soft); color: var(--ok); }
.onboard .step.next { border-color: #e6d3a6; background: var(--gold-soft); } .onboard .step.next .dot { background: var(--gold); color: #fff; }
@media (max-width: 700px) { .onboard .progress { width: 100%; margin-top: 8px; } .onboard .row.between { flex-wrap: wrap; } }

/* POS scrap lines (v13): fields get the full width, totals underneath */
.scrap-line { padding: 12px 0; border-bottom: 1px dashed var(--line-2); display: grid; gap: 10px; }
.scrap-line:last-child { border-bottom: 0; }
.scrap-head { display: flex; align-items: center; gap: 10px; } .scrap-head .btn { margin-inline-start: auto; }
.scrap-fields { display: grid; grid-template-columns: minmax(100px, .8fr) 1fr 1fr 1fr; gap: 10px; }
.scrap-fields .f { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scrap-sum { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--muted); background: var(--surface-2); border-radius: 8px; padding: 8px 12px; }
.scrap-sum b { color: var(--ink); } .scrap-sum .scrap-val { margin-inline-start: auto; font-size: 14px; }
@media (max-width: 1100px) { .scrap-fields { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .scrap-fields > div:first-child { grid-column: 1 / -1; } }

/* v14: choice cards, lot progress */
.choice { display: grid; gap: 6px; text-align: start; padding: 18px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); cursor: pointer; font: inherit; color: inherit; }
.choice:hover { border-color: var(--gold); background: var(--gold-soft); } .choice b { font-size: 17px; } .choice span { color: var(--muted); font-size: 13px; }
.lot-bar { width: 110px; height: 8px; background: #eee9de; border-radius: 99px; overflow: hidden; } .lot-bar div { height: 100%; background: var(--gold); }

/* v16: phone camera scanner */
.cam-btn { white-space: nowrap; }
.cam-overlay { position: fixed; inset: 0; z-index: 1000; background: #000; display: flex; flex-direction: column; }
.cam-box { position: relative; flex: 1; overflow: hidden; }
.cam-box video { width: 100%; height: 100%; object-fit: cover; }
.cam-frame { position: absolute; left: 10%; right: 10%; top: 35%; height: 30%; border: 3px solid #d9b45a; border-radius: 14px; box-shadow: 0 0 0 100vmax rgba(0,0,0,.35); }
.cam-hint { position: absolute; top: 16px; left: 0; right: 0; text-align: center; color: #fff; font-weight: 600; text-shadow: 0 1px 3px #000; }
.cam-bar { display: flex; gap: 10px; align-items: center; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: #1f1d19; }
.cam-list { flex: 1; display: flex; gap: 6px; flex-wrap: wrap; min-height: 28px; }
@media (min-width: 901px) { .cam-overlay { inset: 5vh 20vw; border-radius: 16px; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,.4); } }
@media (max-width: 700px) { form.row:has(.cam-btn) { flex-wrap: wrap; } form.row:has(.cam-btn) > input:first-child { flex: 1 1 100% !important; } form.row:has(.cam-btn) > .btn { flex: 1; } }
/* ── repairs (v17) ── */
.rp-photo { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line-2); }
.rp-photo.big { width: 100%; height: auto; max-height: 320px; object-fit: contain; background: #f6f3ec; }
.rp-bc { direction: ltr; margin: 8px auto; max-width: 62mm; }
.rp-bc svg { display: block; width: 100%; height: 14mm; fill: #000; }
.rp-tag { margin-top: 16px; border: 1px dashed var(--line-2); border-radius: 8px; padding: 6px; display: grid; gap: 2px; justify-items: center; font-size: 12px; max-width: 64mm; }
.rp-tag .rp-bc svg { height: 10mm; }
.timeline { display: grid; gap: 10px; } .tl { border-inline-start: 3px solid var(--gold); padding-inline-start: 10px; }
.row.wrap { flex-wrap: wrap; }
@media print { .rp-tag { break-before: page; page-break-before: always; border: 0; } }
.kpi > span { display: block; color: var(--muted); font-size: 13px; } .kpi > b { display: block; font-size: 22px; margin-top: 2px; } .kpi > small { color: var(--muted); font-size: 12px; }
/* ── reports (v18) ── */
.kpi .up { color: #1e7a46; font-size: 12px; } .kpi .down { color: #b3261e; font-size: 12px; }
td.neg, b.neg { color: #b3261e; }
tr.sum td { font-weight: 700; border-top: 1px solid var(--line-2); } tr.sum.grand td { font-size: 16px; }
.seg.wrap { flex-wrap: wrap; }
/* ── accounting (v19) ── */
tr.acc-group td { font-weight: 700; background: #faf7f0; }
tr.muted td { opacity: .55; }
table.tb th.c { text-align: center; }
@media print { tr.acc-group td { background: none; } }
table.tb { min-width: 760px; }
.card:has(> .tbl-wrap > table.tb) { overflow: hidden; } .tbl-wrap { max-width: 100%; }
/* ── financial statements (v20) ── */
table.fs { width: 100%; } table.fs tr.fs-h td { font-weight: 700; font-size: 15px; padding-top: 18px; border-bottom: 2px solid var(--line-2); }
table.fs .up { color: #1e7a46; } table.fs .down { color: #b3261e; }
/* v23: role editor */
.perm-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; max-height: 55vh; overflow: auto; }
.perm-group { border: 1px solid var(--line, #e5e0d6); border-radius: 10px; padding: 8px 10px; margin: 0; min-width: 0; }
.perm-group legend { font-weight: 700; padding: 0 4px; }
.perm-group .perm { gap: 6px; padding: 3px 0; align-items: flex-start; }
/* v26: a precious stone in the stones editor */
.stone-row { border: 1px solid var(--line, #e5e1d8); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
/* v27: a weight input with its scale button */
.with-scale { display: flex; gap: 6px; align-items: stretch; }
.with-scale > .input { flex: 1; min-width: 0; }
.btn.scale-btn { padding: 0 10px; min-width: 40px; font-size: 18px; line-height: 1; }

/* phones: a floating total over the tab bar while selling */
.pos-float { display: none; }
@media (max-width: 900px) {
  .pos-float { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: fixed; inset-inline: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 25;
    background: var(--ink); color: #fff; border-radius: 16px; padding: 10px 12px 10px 16px; box-shadow: 0 18px 40px -14px rgba(0,0,0,.55); }
  body:has(.pos-float) .toasts { top: calc(var(--top-h) + 10px); bottom: auto; }   /* messages never cover the pay button */
  .pos-float small { display: block; color: #bdb5a5; font-size: 11.5px; } .pos-float b { font-size: 19px; }
  .pos-float .btn { height: 44px; } .pos-float .btn .ic { transform: none; }
  body:has(.pos-float) .content { padding-bottom: calc(170px + env(safe-area-inset-bottom)); }
}
/* ── نادي GoldFlow (v29) ── */
.club-hero { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px 24px; margin-bottom: 14px; border-radius: 18px; color: #fff;
  background: radial-gradient(120% 140% at 0% 0%, #3b3123 0%, #1c1a16 60%); box-shadow: var(--shadow-2); position: relative; overflow: hidden; }
.club-hero::after { content: ''; position: absolute; inset: -60% -10% auto auto; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(circle, rgba(201,162,74,.25), transparent 65%); pointer-events: none; }
.club-hero-in { display: flex; align-items: center; gap: 14px; position: relative; } .club-hero h1 { color: #fff; margin: 0; }
.club-hero .sub { color: #c4bcab; }
.club-kicker { color: var(--gold-hi); font-size: 12px; font-weight: 700; letter-spacing: .08em; }
.club-stats { display: flex; align-items: center; gap: 16px; position: relative; }
.club-stats > div { display: grid; text-align: center; } .club-stats b { font-size: 24px; color: #fff; } .club-stats span { font-size: 12px; color: #c4bcab; }
.club-stats .btn { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.18); } .club-stats .btn:hover { background: rgba(255,255,255,.14); color: #fff; }
.club-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; scrollbar-width: none; }
.club-tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 12px; color: var(--ink-2); font-weight: 600; font-size: 14px; white-space: nowrap; border: 1px solid transparent; transition: background .2s, border-color .2s; }
.club-tabs a .ic { width: 18px; height: 18px; color: var(--muted); } .club-tabs a:hover { background: var(--surface); border-color: var(--line); color: var(--ink); }
.club-tabs a.on { background: var(--ink); color: #fff; } .club-tabs a.on .ic { color: var(--gold-hi); }
.club-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.club-search { position: relative; flex: 1; min-width: 200px; max-width: 360px; margin-inline-start: auto; }
.club-search .ic { position: absolute; inset-inline-start: 12px; top: 12px; color: var(--faint); width: 18px; height: 18px; } .club-search .input { padding-inline-start: 38px; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.switch input { appearance: none; width: 38px; height: 22px; border-radius: 99px; background: var(--line-2); position: relative; cursor: pointer; transition: background .2s; margin: 0; }
.switch input::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .25s var(--ease); }
.switch input:checked { background: var(--gold); } .switch input:checked::after { transform: translateX(-16px); }
.btn.danger-solid { background: var(--danger); color: #fff; border-color: #962a21; } .btn.danger-solid:hover { background: #962a21; color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); } .btn.ghost:hover { background: var(--surface-3); }
.club-feed { display: grid; gap: 12px; }
.club-post { display: grid; grid-template-columns: auto 1fr; gap: 16px; padding: 16px; }
.club-post.alert-open { border-color: #efc6c1; box-shadow: inset 4px 0 0 var(--danger), var(--shadow); }
.club-post:not(:has(.club-photo)) { grid-template-columns: 1fr; }
.club-photo { width: 120px; height: 120px; object-fit: cover; border-radius: 12px; cursor: zoom-in; background: var(--surface-3); }
.club-post h3 { margin: 6px 0 4px; font-size: 16px; } .club-post p { margin: 6px 0; color: var(--ink-2); white-space: pre-line; }
.club-facts { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); } .club-facts b { color: var(--ink); }
.club-post-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line-2); }
.club-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }
.stars { display: inline-flex; gap: 2px; vertical-align: middle; } .stars i { width: 13px; height: 13px; background: var(--line-2);
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); } .stars i.on { background: var(--gold-hi); }
.vendor-list { display: grid; gap: 10px; }
.vendor { padding: 16px; display: grid; gap: 10px; } .vendor-main { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.vendor-score { display: grid; justify-items: end; gap: 2px; } .vendor-score b { font-size: 20px; line-height: 1; } .vendor-score small { color: var(--muted); font-size: 12px; }
.vendor-comments { display: grid; gap: 6px; font-size: 13px; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; } .vendor-comments span { color: var(--ink-2); }
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.member { display: flex; gap: 12px; align-items: flex-start; padding: 16px; } .member .avatar { background: var(--ink); width: 42px; height: 42px; }
.invite-box { display: flex; gap: 8px; } .invite-box .input { direction: ltr; font-size: 13px; }
.rules { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.rules ol, .rules-list { margin: 8px 0; padding-inline-start: 20px; display: grid; gap: 6px; font-size: 13.5px; color: var(--ink-2); }
.rate-pick { display: grid; gap: 6px; } .rate-pick label { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.rate-pick label:has(input:checked) { border-color: var(--gold); background: var(--gold-soft); } .rate-pick .stars i { width: 18px; height: 18px; }
.seg label { flex: 1; } .seg label span { display: block; text-align: center; border-radius: 9px; padding: 8px 18px; cursor: pointer; font-weight: 600; color: var(--muted); }
.seg label input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(45,35,15,.12); }
.club-join { display: grid; grid-template-columns: 1fr 1.1fr; gap: 20px; align-items: start; }
.club-join-art { padding: 28px; border-radius: 18px; color: #fff; background: radial-gradient(120% 120% at 100% 0%, #3b3123 0%, #1a1916 60%); display: grid; gap: 10px; align-content: start; }
.club-join-art h1 { color: #fff; font-size: 28px; } .club-join-art p { color: #c4bcab; margin: 0; }
.club-perks { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 14px; }
.club-perks li { display: flex; gap: 12px; color: #d9d2c3; font-size: 14px; } .club-perks .ic { color: var(--gold-hi); margin-top: 2px; } .club-perks b { color: #fff; }
.club-join-form { padding: 22px; }
.club-warn { width: 100%; display: flex; align-items: center; gap: 10px; text-align: start; border: 1px solid #efc6c1; background: var(--danger-soft); color: var(--danger); border-radius: 10px; padding: 10px 12px; cursor: pointer; font: inherit; font-size: 13.5px; animation: rise .4s var(--ease) both; }
.club-warn span { flex: 1; }
@media (max-width: 900px) { .club-join { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
  .club-hero { padding: 18px; } .club-stats { width: 100%; justify-content: space-between; }
  .club-post { grid-template-columns: 1fr; } .club-photo { width: 100%; height: 180px; }
  .club-search { max-width: none; margin: 0; flex-basis: 100%; }
  .club-tools > .btn { flex: 1; }
}
/* login extras */
.login .art-mark { position: absolute; inset-inline-start: -90px; bottom: -110px; width: 420px; height: 420px; opacity: .07; transform: rotate(-12deg); pointer-events: none; }
.login .art-mark .logo-mark { width: 100%; height: 100%; filter: none; }
.login .art > * { position: relative; z-index: 1; }
.form-brand { display: none; padding: 0 0 8px; }
.form-brand b { color: var(--ink); font-size: 18px; } .form-brand small { color: var(--muted); }
@media (max-width: 900px) { .form-brand { display: flex; } }
.trial-bar > span.row { flex-wrap: nowrap; align-items: flex-start; } .trial-bar > span.row > .ic { margin-top: 3px; }
/* empty states get a quiet mark */
.empty::before { content: ''; display: block; width: 44px; height: 44px; margin: 0 auto 10px; border-radius: 14px; background: var(--surface-3) center / 22px no-repeat
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a39b8b' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 13h4l1.5 3h5L16 13h4'/%3E%3Cpath d='M5.5 6h13L20 13v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-5z'/%3E%3C/svg%3E"); }
.receipt .empty::before, td .empty::before, .palette-list .empty::before { display: none; }
/* first load: the mark alone on the page */
.boot-splash { min-height: 100vh; min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 12px; background: var(--bg); }
.boot-splash span { font-weight: 700; letter-spacing: .35em; font-size: 12px; color: var(--faint); }
/* ── v28 refinements of older parts ── */
.trial-bar { background: linear-gradient(90deg, var(--gold-soft), #fbf6ea); border: 1px solid #ecdcb5; color: var(--gold-ink); border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 18px; }
.trial-bar .ic { color: var(--gold); }
.kpi > span { display: block; color: var(--muted); font-size: 13px; font-weight: 500; } .kpi > b { display: block; font-size: 24px; margin-top: 4px; letter-spacing: -.01em; } .kpi > small { color: var(--muted); font-size: 12.5px; }
.onboard .step .dot .ic { width: 15px; height: 15px; }
.cam-btn .ic { width: 20px; height: 20px; }
.with-scale .btn.scale-btn { padding: 0; width: 44px; min-width: 44px; }
.btn.scale-btn .ic { width: 22px; height: 22px; }
.stone-row { background: var(--surface-2); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .logo-mark.anim .logo-g { stroke-dashoffset: 0; }
}
@media print {
  .tabbar, .top, .side, .route-loader, .modal-x { display: none !important; }
  .content.page-in > * { animation: none !important; }
  .overlay { backdrop-filter: none; }
}

/* ── نادي GoldFlow: the social club (v30) ── */
.phone-only { display: none !important; }
@media (max-width: 900px) { .phone-only { display: inline-flex !important; } .hide-phone { display: none !important; } }
.flip { transform: scaleX(-1); }
.logo-mark.sm { width: 26px; height: 26px; filter: none; }
.nav-badge { min-width: 19px; height: 19px; padding: 0 6px; border-radius: 99px; background: var(--danger); color: #fff; font: 700 11px/19px var(--font); font-style: normal; text-align: center; margin-inline-start: auto; font-variant-numeric: tabular-nums; }
.tabbar a { position: relative; } .tabbar a .nav-badge { position: absolute; top: 2px; inset-inline-end: 18%; margin: 0; min-width: 17px; height: 17px; line-height: 17px; font-size: 10px; padding: 0 4px; }
.club-tabs a .nav-badge { margin-inline-start: 2px; }
a.club-stat { display: grid; text-align: center; color: inherit; padding: 2px 8px; border-radius: 10px; transition: background .2s; } a.club-stat:hover { background: rgba(255,255,255,.06); color: inherit; }
.club-stats .btn.gold { background: linear-gradient(180deg, #d0aa52, #a47a1e); color: #1d1b17; border-color: #8f6a1d; }
.club-hint { display: flex; gap: 10px; align-items: flex-start; background: var(--gold-soft); color: var(--gold-ink); border-radius: 12px; padding: 10px 14px; font-size: 13.5px; margin-bottom: 14px; }
.club-hint .ic { width: 18px; height: 18px; margin-top: 2px; }
.club-feed { max-width: 720px; margin-inline: auto; } .club-feed.single { margin-top: 10px; }
.club-tools, .club-hint, .composer { max-width: 720px; margin-inline: auto; }
.more-btn { display: flex; margin: 14px auto 0; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; margin-bottom: 10px; }
/* avatars */
.sp-av { width: 42px; height: 42px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: var(--gold-ink);
  background: linear-gradient(145deg, #f8eccd, #e9d29b); border: 1px solid #e3cf9e; } a.sp-av:hover { color: var(--gold-ink); filter: brightness(.97); }
.sp-av.gold { background: var(--ink); border-color: var(--ink); } .sp-av.xs { width: 28px; height: 28px; font-size: 11px; } .sp-av.xl { width: 72px; height: 72px; font-size: 24px; }
/* composer */
.composer { padding: 14px 16px 8px; margin-bottom: 14px; }
.composer-row { display: flex; gap: 12px; align-items: center; }
.composer-in { flex: 1; text-align: start; border: 1px solid var(--line-2); background: var(--surface-2); border-radius: 99px; padding: 10px 16px; color: var(--muted); cursor: pointer; transition: background .2s, border-color .2s; }
.composer-in:hover { background: #fff; border-color: var(--gold-hi); }
.composer-acts { display: flex; gap: 4px; margin-top: 10px; padding-top: 6px; border-top: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.composer-acts button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 10px; border: 0; background: transparent; border-radius: 10px; color: var(--ink-2); font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap; }
.composer-acts button .ic { color: var(--gold); width: 19px; height: 19px; } .composer-acts button.danger .ic { color: var(--danger); }
.composer-acts button:hover { background: var(--surface-2); }
/* a post */
.sp { padding: 0; overflow: hidden; }
.sp.alert-open { border-color: #efc6c1; box-shadow: inset 4px 0 0 var(--danger), var(--shadow); }
.sp-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 6px; }
.sp-who { flex: 1; min-width: 0; display: grid; line-height: 1.35; } .sp-who b { color: var(--ink); font-size: 14.5px; } .sp-who small { color: var(--muted); font-size: 12px; }
.sp-kind { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.icon-btn.sm { width: 32px; height: 32px; border-color: transparent; background: transparent; color: var(--muted); } .icon-btn.sm:hover { background: var(--surface-3); }
.sp-body { padding: 4px 16px 10px; }
.sp-title { font-size: 16px; margin: 4px 0 6px; }
.sp-text { margin: 4px 0 10px; color: var(--ink-2); white-space: pre-line; overflow-wrap: anywhere; }
.sp-facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; } .sp-facts span { background: var(--surface-3); border-radius: 8px; padding: 2px 9px; font-size: 13px; color: var(--ink-2); } .sp-facts b { color: var(--ink); }
.sp-photo { display: block; width: calc(100% + 32px); margin: 6px -16px 0; max-height: 520px; object-fit: cover; background: var(--surface-3); cursor: zoom-in; }
.sp-photo.sm { width: 100%; margin: 6px 0 0; max-height: 300px; border-radius: 10px; }
.sp-shared { display: block; border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; margin-top: 6px; color: inherit; background: var(--surface-2); }
.sp-shared:hover { color: inherit; border-color: var(--gold-hi); } .sp-shared.gone { color: var(--muted); text-align: center; }
.sp-shared-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; } .sp-shared-head small { color: var(--muted); margin-inline-start: auto; }
.sp-stats { display: flex; gap: 14px; flex-wrap: wrap; padding: 4px 16px 8px; font-size: 12.5px; color: var(--muted); } .sp-stats b { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.gold-txt { color: var(--gold-ink) !important; font-weight: 600; } .gold-txt b { color: var(--gold) !important; }
.btn.wide { display: flex; width: calc(100% - 32px); margin: 0 16px 8px; justify-content: center; }
.btn.gold-soft { background: var(--gold-soft); color: var(--gold-ink); border-color: #ead9ae; }
.sp-actions { display: flex; border-top: 1px solid var(--line); padding: 4px 8px; }
.sp-actions button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 6px; border: 0; background: transparent; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: 13.5px; cursor: pointer; transition: background .2s, color .2s; }
.sp-actions button:hover { background: var(--surface-2); color: var(--ink); }
.sp-actions button.on { color: var(--danger); } .sp-actions button.on .ic path { fill: currentColor; }
.sp-actions button.on .ic { animation: pulse .35s var(--ease); }
@keyframes pulse { 50% { transform: scale(1.25); } }
.sp-comments { border-top: 1px solid var(--line); padding: 10px 16px 12px; background: var(--surface-2); display: grid; gap: 10px; }
.cm { display: flex; gap: 8px; align-items: flex-start; }
.cm-b { flex: 1; min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 6px 12px; }
.cm-h { display: flex; align-items: center; gap: 8px; } .cm-h b { font-size: 13px; color: var(--ink); } .cm-h small { color: var(--muted); font-size: 11.5px; }
.cm-b p { margin: 2px 0 0; font-size: 14px; white-space: pre-line; overflow-wrap: anywhere; }
.cm-x { margin-inline-start: auto; border: 0; background: transparent; color: var(--faint); cursor: pointer; padding: 2px; border-radius: 6px; } .cm-x:hover { color: var(--danger); background: var(--danger-soft); }
.cm-x .ic { width: 14px; height: 14px; }
.cm-form { display: flex; gap: 8px; } .cm-form .input { border-radius: 99px; }
/* who has the piece */
.offer-list { display: grid; gap: 10px; }
.offer { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.offer-b { flex: 1; min-width: 0; display: grid; } .offer-b small { color: var(--muted); } .offer-b p { margin: 4px 0 0; color: var(--ink-2); }
.offer-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
/* messages */
.thread-list { padding: 6px; max-width: 720px; margin-inline: auto; }
.thread { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; color: inherit; transition: background .2s; }
.thread:hover { background: var(--surface-2); color: inherit; }
.thread-b { flex: 1; min-width: 0; } .thread-h { display: flex; justify-content: space-between; gap: 8px; } .thread-h small { color: var(--muted); font-size: 12px; }
.thread-l { color: var(--muted); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread.unread .thread-l { color: var(--ink); font-weight: 600; }
.chat { max-width: 760px; margin-inline: auto; display: flex; flex-direction: column; height: calc(100dvh - var(--top-h) - 70px); min-height: 380px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #fff; }
.chat-who { display: grid; line-height: 1.3; } .chat-who b { color: var(--ink); } .chat-who small { color: var(--muted); font-size: 12px; }
.chat-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 6px; background: var(--surface-2); overscroll-behavior: contain; }
.chat-empty { margin: auto; color: var(--muted); text-align: center; }
.msg-day { text-align: center; margin: 8px 0; } .msg-day span { background: var(--surface-3); color: var(--muted); font-size: 11.5px; padding: 3px 10px; border-radius: 99px; }
.msg { max-width: min(78%, 480px); align-self: flex-end; background: #fff; border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; padding: 7px 12px 5px; }
.msg.new { animation: msgIn .25s var(--ease) both; }
.msg.mine { align-self: flex-start; background: var(--gold-soft); border-color: #ecdcb2; border-radius: 16px 16px 4px 16px; }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } }
.msg p { margin: 0; white-space: pre-line; overflow-wrap: anywhere; } .msg time { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.msg-photo { display: block; max-width: 100%; max-height: 320px; border-radius: 10px; margin: 2px 0 4px; cursor: zoom-in; }
.msg-post { display: flex; gap: 8px; align-items: center; background: rgba(0,0,0,.04); border-radius: 10px; padding: 6px; margin-bottom: 6px; color: inherit; }
.msg-post img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; } .msg-post span { display: grid; line-height: 1.3; } .msg-post small { color: var(--muted); font-size: 11px; }
.chat-compose { display: flex; align-items: flex-end; gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: #fff; flex-wrap: wrap; }
.chat-compose textarea { flex: 1; resize: none; min-height: 42px; max-height: 140px; border-radius: 20px; padding-block: 9px; }
.chat-compose .icon-btn { cursor: pointer; }
.chat-send { width: 44px; height: 42px; padding: 0; justify-content: center; border-radius: 50%; }
.chat-ctx { width: 100%; display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--gold-ink); background: var(--gold-soft); border-radius: 8px; padding: 4px 10px; }
.chat-ctx button { margin-inline-start: auto; border: 0; background: transparent; cursor: pointer; color: inherit; }
.chat-thumb { display: contents; } .chat-thumb img { width: 52px; height: 52px; object-fit: cover; border-radius: 10px; }
.chat-thumb button { border: 0; background: transparent; cursor: pointer; color: var(--muted); align-self: flex-start; }
/* a shop's page */
.shop-card { display: flex; gap: 18px; align-items: center; padding: 20px; max-width: 720px; margin: 0 auto 14px; flex-wrap: wrap; }
.shop-b { flex: 1; min-width: 220px; } .shop-b h1 { font-size: 20px; } .shop-acts { margin-top: 10px; gap: 8px; flex-wrap: wrap; }
.shop-card ~ .alert, .shop-card ~ .club-feed { max-width: 720px; margin-inline: auto; }
@media (max-width: 900px) {
  .club-hero { padding: 16px; gap: 12px; } .club-hero .logo-mark.lg { width: 38px; height: 38px; } .club-hero h1 { font-size: 18px; }
  .club-stats { width: 100%; justify-content: space-between; } .club-stats b { font-size: 20px; }
  .sp-head { padding: 12px 12px 4px; } .sp-body { padding: 4px 12px 8px; } .sp-photo { width: calc(100% + 24px); margin-inline: -12px; }
  .sp-stats { padding-inline: 12px; } .btn.wide { width: calc(100% - 24px); margin-inline: 12px; } .sp-actions { padding-inline: 2px; }
  .sp-actions button span { font-size: 12.5px; } .composer-acts button span { font-size: 12.5px; }
  .chat { height: calc(100dvh - var(--top-h) - var(--tabbar-h, 72px) - 34px - env(safe-area-inset-bottom)); border-radius: 14px; margin-inline: -4px; }
  .msg { max-width: 86%; }
}
@media (max-width: 520px) { .composer-acts button { flex: none; } .sp-actions button span { display: none; } .sp-actions button { padding: 11px 6px; } }
.sp-comments[hidden] { display: none; }
@media (max-width: 520px) { .offer { flex-wrap: wrap; } .offer-acts { width: 100%; justify-content: flex-start; padding-inline-start: 54px; } }

.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px; }
label:has(> .vh:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ── v32: the club like Facebook (phone first) ── */
.composer-row { gap: 10px; }
.composer-pic { width: 42px; height: 42px; border-radius: 50%; border: 0; background: transparent; color: var(--ok); display: grid; place-items: center; cursor: pointer; flex: none; }
.composer-pic:hover { background: var(--surface-3); } .composer-pic .ic { width: 24px; height: 24px; }
.sp-stats { justify-content: space-between; align-items: center; }
.sp-stats.empty { display: none; }
.sp-likes { display: inline-flex; align-items: center; gap: 5px; }
.heart-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--danger); display: grid; place-items: center; font-style: normal; }
.heart-dot .ic { width: 11px; height: 11px; color: #fff; } .heart-dot .ic path { fill: #fff; }
.sp-cs { margin-inline-start: auto; }
.sp-stats .gold-txt { margin-inline-start: 8px; }
/* the composer dialog */
.fbc { display: flex; flex-direction: column; min-height: 100%; }
.fbc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin: -6px 0 12px; }
.fbc-head b { font-size: 17px; flex: 1; text-align: center; }
.fbc-x { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--surface-3); display: grid; place-items: center; cursor: pointer; color: var(--ink-2); }
.fbc-who { display: flex; align-items: center; gap: 10px; } .fbc-who > div { display: grid; line-height: 1.35; } .fbc-who small { color: var(--muted); font-size: 12px; display: inline-flex; gap: 4px; align-items: center; }
.fbc-text { width: 100%; border: 0; outline: 0; resize: none; min-height: 140px; font-size: 20px; line-height: 1.5; padding: 14px 2px; background: transparent; }
.fbc-text::placeholder { color: var(--faint); }
.fbc-photo .club-thumb { display: block; width: 100%; height: auto; max-height: 50vh; object-fit: cover; border-radius: 12px; margin-bottom: 10px; }
.fbc-bar { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); border-radius: 12px; padding: 8px 12px; margin-top: auto; }
.fbc-bar > span { flex: 1; font-weight: 600; font-size: 14px; }
.fbc-tool { width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--ok); }
.fbc-tool:hover { background: var(--surface-2); } .fbc-tool .ic { width: 23px; height: 23px; }
.fbc-tool:nth-of-type(2) { color: var(--gold); } .fbc-tool.danger { color: var(--danger); }
.fbc-modal .modal-x { display: none; } .fbc-modal::before { display: none; }
@media (max-width: 700px) {
  /* edge to edge, separated by grey bands — the Facebook feed */
  .club-page { margin: -16px -14px 0; }
  .club-page .club-feed { gap: 8px; max-width: none; }
  .club-page .composer, .club-page .sp, .club-page .thread-list, .club-page .card.vendor, .club-page .card.member { border-radius: 0; border-inline: 0; box-shadow: none; }
  .club-page .composer { margin: 0 0 8px; padding: 12px 14px; border-top: 0; }
  .club-page .composer-acts { margin-top: 10px; padding-top: 10px; gap: 8px; }
  .club-page .composer-acts button { flex: none; border: 1px solid var(--line-2); border-radius: 99px; padding: 6px 12px; background: #fff; }
  .club-page .club-tabs { background: #fff; margin: 0 0 8px; padding: 0 6px; gap: 0; border-bottom: 1px solid var(--line); }
  .club-page .club-tabs a { border-radius: 0; padding: 13px 12px 11px; border: 0; border-bottom: 3px solid transparent; background: transparent !important; color: var(--muted); }
  .club-page .club-tabs a .ic { display: none; }
  .club-page .club-tabs a.on { color: var(--gold-ink); border-bottom-color: var(--gold); }
  .club-page .club-tools, .club-page .club-hint, .club-page > .empty, .club-page .vendor-list, .club-page .member-grid { padding-inline: 12px; }
  .club-page .club-tools { margin-bottom: 8px; }
  .club-page .sp-photo { width: calc(100% + 24px); max-height: min(125vw, 640px); }
  .club-page .sp-actions { padding: 2px 4px; }
  .club-page .vendor-list, .club-page .member-grid { padding-inline: 0; gap: 8px; }
  .modal.fbc-modal { position: fixed; inset: 0; width: 100%; max-height: none; height: 100dvh; border-radius: 0; padding: calc(14px + env(safe-area-inset-top)) 16px calc(14px + env(safe-area-inset-bottom)); animation: rise .3s var(--ease) both; }
}
@media (max-width: 520px) { .sp-actions button span { display: inline !important; font-size: 12.5px; } .sp-actions button { padding: 10px 4px; gap: 5px; } }
.sp-likes.zero { visibility: hidden; }
@media (max-width: 700px) {
  .club-page .club-tools { flex-wrap: nowrap; gap: 10px; }
  .club-page .club-search { min-width: 0; flex: 1; max-width: none; } .club-page .club-search .input { height: 38px; border-radius: 99px; }
  .club-page .club-search .ic { top: 10px; }
  .club-page .club-tools .switch span { white-space: nowrap; font-size: 13px; }
  .club-page .club-tools .btn { flex: none; padding-inline: 12px; }
}

/* ── صفحة المحل الأونلاين (v33) ── */
.sp-live { display: grid; gap: 12px; margin-bottom: 16px; padding: 18px; } .sp-live-l { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.slug-in { display: flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; background: #fff; }
.slug-in span { padding: 0 10px; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); font-size: 13px; white-space: nowrap; }
.slug-in .input { border: 0; border-radius: 0; min-width: 0; }
.pg-items { display: grid; gap: 8px; }
.pg-item { display: flex; gap: 12px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 12px; }
.pg-item img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; background: var(--surface-3); flex: none; }
.pg-item.off img { opacity: .4; } .pg-item-b { flex: 1; min-width: 0; display: grid; } .pg-item-b small { color: var(--muted); }
.pg-item-a { display: flex; gap: 2px; } .icon-btn.sm.danger { color: var(--danger); }

/* ── GoldFlow Supply (v35) ── */
.sx { display: flex; flex-direction: column; gap: 20px; }
.sx-nav { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; overflow-x: auto; scrollbar-width: none; }
.sx-nav a { padding: 8px 14px; border-radius: 10px; color: var(--ink-2); font-weight: 600; font-size: 14px; white-space: nowrap; }
.sx-nav a:hover { background: var(--surface); } .sx-nav a.on { background: var(--ink); color: #fff; }
.sx-nav a.sx-brand { font-weight: 700; font-size: 17px; color: var(--ink); margin-inline-end: 10px; padding-inline: 0; } .sx-nav a.sx-brand b { color: var(--gold); }
.sx-kick { color: var(--gold-hi); font-size: 13px; font-weight: 700; letter-spacing: .03em; } .sx-kick.dark { color: var(--gold); }
.sx-hero { display: flex; flex-wrap: wrap; border-radius: 22px; overflow: hidden; color: #fff; background: radial-gradient(120% 140% at 0% 0%, #3b3123 0%, #1c1a16 62%); box-shadow: var(--shadow-2); }
.sx-hero-t { flex: 1 1 440px; padding: 40px 40px 36px; display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.sx-hero h1 { color: #fff; font-size: clamp(28px, 3.6vw, 42px); line-height: 1.25; margin: 0; } .sx-hero p { margin: 0; color: #d6ccb9; font-size: 16px; line-height: 1.8; max-width: 540px; }
.sx-hero.small .sx-hero-t { padding: 30px 32px; } .sx-hero.small h1 { font-size: 30px; }
.sx-hero-img { flex: 1 1 340px; min-height: 300px; position: relative; display: block; color: inherit; }
.sx-hero-img img, .sx-hero-img .sx-noimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sx-hero-img > span:last-child { position: absolute; inset: auto 18px 18px auto; background: rgba(255,255,255,.95); color: var(--ink); border-radius: 14px; padding: 10px 14px; display: grid; gap: 1px; box-shadow: 0 18px 40px -18px rgba(0,0,0,.6); max-width: 70%; }
.sx-hero-img small { color: var(--muted); font-size: 12px; } .sx-hero-img i { font-style: normal; color: var(--ok); font-size: 13px; font-weight: 600; }
.sx-hero-acts { display: flex; gap: 10px; flex-wrap: wrap; }
.btn.ghostw { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); } .btn.ghostw:hover { background: rgba(255,255,255,.08); color: #fff; }
.btn.dark { background: var(--ink); color: #fff; border-color: var(--ink); } .btn.dark:disabled { opacity: .55; cursor: not-allowed; }
.sx-search { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 14px; padding: 6px 6px 6px 6px; max-width: 580px; border: 1px solid var(--line-2); }
.sx-search .ic { color: var(--faint); margin-inline-start: 8px; } .sx-search input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 15px; padding: 8px 4px; background: transparent; color: var(--ink); }
.sx-search.wide { max-width: none; }
.sx-sec { display: flex; flex-direction: column; gap: 12px; } .sx-h { display: flex; justify-content: space-between; align-items: end; gap: 10px; } .sx-h h2 { margin: 0; font-size: 19px; }
.sx-cats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.sx-cat { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; color: var(--ink); display: flex; flex-direction: column; transition: transform .25s var(--ease), box-shadow .25s; }
.sx-cat:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); color: var(--ink); } .sx-cat.sx-zero { opacity: .7; }
.sx-cat img, .sx-cat .sx-noimg { width: 100%; height: 110px; object-fit: cover; }
.sx-cat > span:last-child { padding: 10px 12px; display: flex; justify-content: space-between; align-items: center; } .sx-cat small { color: var(--muted); font-size: 12px; }
.sx-noimg { display: grid; place-items: center; background: linear-gradient(145deg, #f7efdc, #e9d29b); color: #8f6a1d; } .sx-noimg .ic { width: 34px; height: 34px; opacity: .7; }
.sx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.sx-card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .25s, transform .25s var(--ease); }
.sx-card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); } .sx-card.off { opacity: .78; }
.sx-card-img { position: relative; display: block; aspect-ratio: 1; background: var(--surface-3); } .sx-card-img img, .sx-card-img .sx-noimg { width: 100%; height: 100%; object-fit: cover; }
.sx-st { position: absolute; top: 10px; inset-inline-start: 10px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; }
.sx-st.ok { background: var(--ok-soft); color: var(--ok); } .sx-st.out { background: var(--surface-3); color: var(--muted); } .sx-st.held { background: var(--warn-soft); color: var(--warn); }
.sx-st.big { position: static; align-self: flex-start; font-size: 13px; padding: 4px 12px; }
.sx-new { position: absolute; bottom: 10px; inset-inline-start: 10px; background: var(--ink); color: var(--gold-hi); font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 99px; }
.sx-fav { position: absolute; top: 8px; inset-inline-end: 8px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255,255,255,.94); display: grid; place-items: center; cursor: pointer; color: var(--danger); box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.sx-fav.on .ic path, .sx-fav2.on .ic path { fill: currentColor; } .sx-fav2 { color: var(--danger); flex: none !important; }
.sx-card-b { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 5px; flex: 1; } .sx-card-b > a:first-child { color: var(--ink); } .sx-card-b b { font-size: 15px; }
.sx-sup { font-size: 12.5px; color: var(--muted); } .sx-ver { color: var(--ok); font-weight: 700; white-space: nowrap; }
.sx-facts { display: flex; gap: 6px; flex-wrap: wrap; font-size: 12.5px; } .sx-facts span { background: var(--surface-3); border-radius: 8px; padding: 2px 8px; }
.sx-mk { font-size: 13px; color: var(--gold-ink); font-weight: 600; } .sx-go { margin-top: auto; align-self: stretch; justify-content: center; }
.sx-empty { display: grid; justify-items: center; gap: 8px; background: #fff; border: 1px dashed var(--line-2); border-radius: 16px; } .sx-empty .ic-lg { color: var(--gold); }
.sx-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } .sx-steps > div { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; display: grid; gap: 4px; } .sx-steps span { color: var(--muted); font-size: 13.5px; }
.sx-note { margin: 0; font-size: 12.5px; color: var(--muted); }
.sx-title { margin: 0; }
.sx-browse { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.sx-filters { flex: 1 1 250px; max-width: 290px; display: flex; flex-direction: column; gap: 14px; position: sticky; top: calc(var(--top-h) + 14px); }
.sx-filters .f { display: flex; flex-direction: column; gap: 6px; } .linkish { border: 0; background: none; color: var(--gold-ink); cursor: pointer; font: inherit; font-size: 13px; }
.sx-seg { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: 6px; } .sx-seg input { position: absolute; opacity: 0; }
.sx-seg span { display: block; text-align: center; padding: 7px 0; border: 1px solid var(--line-2); border-radius: 10px; font-size: 13px; cursor: pointer; }
.sx-seg input:checked + span { background: var(--gold-soft); border-color: var(--gold-hi); color: var(--gold-ink); font-weight: 700; } .sx-seg input:focus-visible + span { outline: 2px solid var(--gold); }
.sx-apply { display: none; }
.sx-results { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 12px; } .sx-count { color: var(--muted); } .sx-count b { color: var(--ink); }
.sx-chips { display: flex; gap: 6px; flex-wrap: wrap; } .sx-chip { border: 1px solid var(--line-2); background: #fff; border-radius: 99px; padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.sx-chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.sx-crumb { font-size: 13.5px; color: var(--muted); }
.sx-prod { display: flex; flex-wrap: wrap; gap: 26px; align-items: flex-start; }
.sx-gal { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.sx-gal-main { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 20px; background: var(--surface-3); cursor: zoom-in; }
.sx-thumbs { display: flex; gap: 10px; flex-wrap: wrap; } .sx-thumbs button { width: 84px; height: 84px; padding: 0; border: 2px solid transparent; border-radius: 12px; overflow: hidden; cursor: pointer; background: none; }
.sx-thumbs button.on { border-color: var(--gold); } .sx-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.sx-info { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 14px; } .sx-info h1 { margin: 0; font-size: 28px; }
.sx-supbox { display: flex; gap: 12px; align-items: center; padding: 12px 14px; color: var(--ink); } .sx-supbox > span:nth-child(2) { flex: 1; display: grid; } .sx-supbox small { color: var(--muted); font-size: 13px; } .sx-more { font-size: 13px; font-weight: 600; color: var(--gold-ink); }
.sx-av { width: 44px; height: 44px; border-radius: 12px; background: var(--ink); color: #f2dc9c; display: grid; place-items: center; font-weight: 700; flex: none; }
.sx-av.xl { width: 92px; height: 92px; border-radius: 22px; font-size: 30px; border: 4px solid #fff; box-shadow: 0 14px 30px -16px rgba(0,0,0,.6); }
.sx-spec { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .sx-spec div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.sx-spec dt { font-size: 12px; color: var(--muted); } .sx-spec dd { margin: 0; font-weight: 700; }
.sx-desc { margin: 0; color: var(--ink-2); white-space: pre-line; }
.sx-pieces, .sx-terms { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.sx-wchips { display: flex; flex-wrap: wrap; gap: 6px; } .sx-wchips span { border: 1px solid var(--line-2); border-radius: 10px; padding: 6px 12px; font-size: 13px; background: var(--surface-2); }
.sx-actrow { display: flex; gap: 10px; flex-wrap: wrap; } .sx-actrow .btn { flex: 1 1 160px; justify-content: center; }
.sx-terms > div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; } .sx-terms > div span:first-child { color: var(--muted); }
.sx-store { padding: 0; overflow: hidden; } .sx-cover { height: 160px; background: #1c1a16; } .sx-cover img { width: 100%; height: 100%; object-fit: cover; opacity: .6; }
.sx-store-h { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; padding: 0 24px 20px; margin-top: -44px; position: relative; }
.sx-store-t { flex: 1 1 300px; } .sx-store-t h1 { margin: 0 0 2px; font-size: 26px; }
.sx-side { flex: 1 1 280px; max-width: 340px; display: flex; flex-direction: column; gap: 12px; } .sx-side .card { padding: 16px 18px; display: grid; gap: 8px; } .sx-side p { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.8; }
.sx-tags { display: flex; gap: 6px; flex-wrap: wrap; } .sx-tags span { background: var(--gold-soft); color: var(--gold-ink); border-radius: 8px; padding: 2px 9px; font-size: 12.5px; }
.sx-dirf { display: flex; gap: 10px; flex-wrap: wrap; } .sx-dirf .sx-search { flex: 1 1 360px; } .sx-dirf select { width: auto; min-width: 180px; }
.sx-sups { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.sx-supcard { padding: 0; overflow: hidden; color: var(--ink); display: flex; flex-direction: column; transition: box-shadow .25s, transform .25s var(--ease); } .sx-supcard:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); color: var(--ink); }
.sx-supcover { height: 110px; background: linear-gradient(145deg, #3b3123, #1c1a16); display: block; } .sx-supcover img { width: 100%; height: 100%; object-fit: cover; opacity: .7; }
.sx-supcard-b { padding: 0 16px 16px; margin-top: -24px; display: grid; gap: 4px; } .sx-supcard-b .sx-av { border: 3px solid #fff; } .sx-supcard-b small { color: var(--muted); }
.sx-kpis { margin: 0; } .sx-orders-soon { display: flex; gap: 10px; align-items: center; padding: 14px 18px; background: var(--info-soft); border-color: #cfe0f0; color: var(--info); }
.sx-stock { display: grid; gap: 8px; } .sx-srow { display: flex; gap: 12px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 12px; flex-wrap: wrap; }
.sx-sthumb { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex: none; } .sx-srow-b { flex: 1 1 220px; display: grid; } .sx-srow-b small { color: var(--muted); }
.sx-phedit { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; } .sx-phedit > span { position: relative; } .sx-phedit img { width: 76px; height: 76px; object-fit: cover; border-radius: 10px; }
.sx-phedit button { position: absolute; top: -6px; inset-inline-end: -6px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--danger); color: #fff; display: grid; place-items: center; cursor: pointer; }
.sx-phadd { width: 76px; height: 76px; border: 1.5px dashed var(--gold-hi); border-radius: 10px; display: grid; place-items: center; align-content: center; gap: 2px; color: var(--gold-ink); font-size: 12px; cursor: pointer; background: var(--gold-soft); }
.sx-apply-w { display: flex; flex-direction: column; gap: 16px; } .sx-applyf { max-width: 760px; }
@media (max-width: 900px) {
  .sx-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sx-steps { grid-template-columns: 1fr; }
  .sx-hero-t { padding: 26px 20px; } .sx-filters { position: static; max-width: none; } .sx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .sx-card-b { padding: 10px; } .sx-card-b b { font-size: 14px; } .sx-hero-img { min-height: 220px; }
}
.sx-store-t { padding-top: 52px; }
@media (max-width: 900px) { .sx-cats { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; } .sx-cat { flex: 0 0 40%; scroll-snap-align: start; } .sx-cat img, .sx-cat .sx-noimg { height: 96px; } }

/* ── v36: GoldFlow Supply orders ── */
.sx-wchips button { border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 14px; font: inherit; font-size: 14px; background: var(--surface-2); cursor: pointer; min-height: 40px; transition: background .15s, border-color .15s; }
.sx-wchips button:hover { border-color: var(--gold); }
.sx-wchips button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.sx-wchips button.on::before { content: '✓ '; }
.sx-resv { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 10px; margin-top: 12px; }
.sx-orders-soon { text-decoration: none; } .sx-orders-soon .sx-more { margin-inline-start: auto; font-weight: 600; }
.sx-nav a .nav-badge { position: static; margin-inline-start: 6px; display: inline-grid; vertical-align: middle; }
.so-list { display: grid; gap: 14px; }
.so-card { padding: 16px 18px; display: grid; gap: 12px; }
.so-card.act { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.so-card.rejected, .so-card.cancelled, .so-card.expired { opacity: .78; }
.so-top { display: flex; gap: 14px; align-items: flex-start; }
.so-img { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; flex: none; display: grid; place-items: center; }
.so-h { flex: 1; min-width: 0; display: grid; gap: 4px; } .so-h small { color: var(--muted); }
.so-facts { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; color: var(--ink-2, var(--ink)); }
.so-ws { display: flex; flex-wrap: wrap; gap: 6px; } .so-ws span { font-size: 12.5px; border: 1px solid var(--line); border-radius: 8px; padding: 3px 9px; background: var(--surface-2); }
.so-quote { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; background: var(--gold-soft); border-radius: 12px; padding: 10px 14px; }
.so-quote b.num { font-size: 18px; } .so-quote small { flex-basis: 100%; color: var(--muted); }
.so-note { font-size: 13.5px; } .so-note small { color: var(--muted); }
.so-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.so-steps li { display: grid; justify-items: center; text-align: center; gap: 3px; font-size: 12.5px; color: var(--muted); position: relative; }
.so-steps li i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-2); background: #fff; z-index: 1; }
.so-steps li::before { content: ''; position: absolute; top: 6px; inset-inline-start: 50%; width: 100%; height: 2px; background: var(--line-2); }
.so-steps li:last-child::before { display: none; }
.so-steps li.done i { background: var(--ok); border-color: var(--ok); } .so-steps li.done::before { background: var(--ok); }
.so-steps li.now i { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); } .so-steps li.now { color: var(--ink); font-weight: 600; }
.so-steps small { font-size: 11px; font-weight: 400; }
.so-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.so-sum { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px 14px; background: var(--surface-2); }
.so-sum div { display: grid; gap: 2px; } .so-sum span { font-size: 12.5px; color: var(--muted); }
@media (max-width: 640px) {
  .sx-resv { grid-template-columns: 1fr; }
  .so-card { padding: 14px; } .so-img { width: 56px; height: 56px; }
  .so-steps small { display: none; } .so-steps li { font-size: 11px; }
  .so-acts .btn { flex: 1 1 auto; }
}

/* ── v37: requests for pieces, offers, ratings, disputes ── */
.stars { color: var(--gold-hi); letter-spacing: 1px; font-size: 14px; } .stars i { font-style: normal; color: var(--line-2); }
.sx-rate { font-size: 12.5px; color: var(--gold-ink); white-space: nowrap; } .sx-rate small { color: var(--muted); }
.sx-rev { display: grid; gap: 10px; }
.sx-rev-avg { display: flex; align-items: center; gap: 8px; } .sx-rev-avg .num { font-size: 26px; font-weight: 700; } .sx-rev-avg small { color: var(--muted); }
.sx-rev-i { border-top: 1px solid var(--line); padding-top: 8px; } .sx-rev-i p { margin: 4px 0; font-size: 14px; } .sx-rev-i small { color: var(--muted); font-size: 12px; }
.rfq-ph { display: flex; align-items: center; gap: 12px; border: 1.5px dashed var(--gold-hi); border-radius: 14px; padding: 12px; background: #fbf7ee; cursor: pointer; }
.rfq-ph:focus-within { outline: 2px solid var(--gold); outline-offset: 2px; }
.rfq-ph-i { width: 54px; height: 54px; border-radius: 12px; background: var(--gold-soft); display: grid; place-items: center; color: var(--gold); flex: none; overflow: hidden; }
.rfq-ph-i img { width: 100%; height: 100%; object-fit: cover; } .rfq-ph small { color: var(--muted); }
.rfq-offers { display: grid; gap: 8px; }
.rfq-offer { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 6px; background: var(--surface-2); }
.rfq-offer.declined { opacity: .6; } .rfq-offer.accepted { border-color: var(--ok); background: var(--ok-soft); }
.rfq-offer-h { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; } .rfq-offer-h small { color: var(--muted); }
.rfq-offer-p { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; } .rfq-offer-p b { font-size: 17px; }
.so-disp { margin: 0; } .so-disp .sub { margin-top: 4px; }
.so-pick { display: grid; gap: 6px; max-height: 300px; overflow: auto; margin-top: 8px; }
.so-pick label { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; cursor: pointer; min-height: 44px; }
.so-pick label:has(input:checked) { border-color: var(--gold); background: var(--gold-soft); }
.so-pick span { display: grid; } .so-pick small { color: var(--muted); font-size: 12px; }
.rate-in { border: 0; padding: 0; margin: 0; display: flex; flex-direction: row-reverse; justify-content: center; gap: 4px; }
.rate-in input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rate-in label { font-size: 38px; color: var(--line-2); cursor: pointer; line-height: 1; padding: 2px; }
.rate-in input:checked ~ label, .rate-in label:hover, .rate-in label:hover ~ label { color: var(--gold-hi); }
.rate-in input:focus-visible + label { outline: 2px solid var(--gold); border-radius: 6px; }

/* ── v39: scrap payment ── */
.so-scrap { display: grid; gap: 4px; background: var(--surface-3); border-radius: 12px; padding: 10px 14px; font-size: 13.5px; }
.so-scrap .badge { justify-self: start; }

/* ── Phase 9: API keys ── */
.api-docs { margin-top: 16px; display: grid; gap: 10px; }
.api-docs table td { padding: 6px 8px; vertical-align: top; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.api-docs code, .api-docs pre { direction: ltr; unicode-bidi: embed; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; background: var(--surface-3); border-radius: 6px; padding: 2px 6px; }
.api-docs pre { padding: 10px 12px; overflow-x: auto; white-space: pre; margin: 0; }
.api-scopes { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }

/* v41 cashier: one cart */
.pos-rates { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.pos-rates span { font-size: 12.5px; color: var(--muted); background: var(--surface-3); border-radius: 99px; padding: 3px 10px; }
.pos-rates span.on { background: var(--gold-soft); color: var(--gold-ink); }
.pos-find { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.pos-find .pos-search { flex: 1 1 280px; }
.pos-search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; background: #fff; border: 2px solid var(--gold-hi); border-radius: 14px; padding: 0 14px; height: 54px; box-shadow: 0 0 0 4px var(--gold-soft); }
.pos-search .ic { color: var(--gold); flex: none; }
.pos-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 16px; }
.pos-find .btn { height: 54px; border-radius: 14px; }
.pos-scrap-btn { border-style: dashed; }
.pos-sec { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; }
.pos-line { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto 36px; gap: 6px 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.pos-sec > .row + .pos-line { border-top: 0; }
.pos-line.fresh { animation: rise .4s var(--ease) both; }
.pos-ic, .pos-k { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold); }
.pos-k { background: var(--ink); color: #ead08a; font-weight: 700; }
.pos-l-b { display: flex; flex-direction: column; min-width: 0; } .pos-l-b .sub { font-size: 12.5px; }
.pos-l-p { font-size: 16px; white-space: nowrap; }
.pos-x { width: 32px; height: 32px; padding: 0; }
.pos-line .breakdown, .pos-line .scrap-fields, .pos-line .club-warn { grid-column: 1 / -1; }
.pos-line .breakdown { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font-size: 12.5px; color: var(--muted); background: var(--surface-2); border-radius: 10px; padding: 8px 12px; }
.pos-line .breakdown b { color: var(--ink); font-weight: 600; }
.pos-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 32px 20px; }
.pos-empty > .ic { color: var(--gold); } .pos-empty .sub { max-width: 460px; }
.pos-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; width: 100%; margin-top: 8px; }
.pos-tiles button { height: 76px; border-radius: 14px; border: 1px solid var(--line-2); background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; font: inherit; transition: all .15s var(--ease); }
.pos-tiles button:hover { border-color: var(--gold-hi); } .pos-tiles button small { color: var(--muted); font-size: 12px; }
.pos-tiles button.on { background: var(--ink); border-color: var(--ink); color: #fff; } .pos-tiles button.on small { color: #d9d2c3; }
.pos-res { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-top: 8px; }
.pos-res button { text-align: start; border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 12px; font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.pos-res button:hover:not(:disabled) { border-color: var(--gold-hi); background: var(--surface-2); }
.pos-res button.on { border: 2px solid var(--gold-hi); background: #fbf7ee; cursor: default; }
.pos-res .pos-w { font-size: 20px; } .pos-res .money { color: var(--gold-ink); }
.pos-findm #posRes { display: flex; flex-direction: column; gap: 6px; }
.pos-panel { display: flex; flex-direction: column; gap: 14px; }
.pos-cust { display: flex; align-items: center; gap: 10px; border: 1px dashed var(--line-2); background: var(--surface-2); border-radius: 12px; padding: 10px 12px; font: inherit; cursor: pointer; text-align: start; color: var(--muted); }
.pos-cust b { color: var(--ink); } .pos-cust > span:nth-child(2) { flex: 1; } .pos-cust [data-act=clearParty] { font-size: 18px; padding: 0 6px; }
.pos-sum > div { display: flex; justify-content: space-between; padding: 4px 0; font-size: 14px; color: var(--muted); } .pos-sum b { color: var(--ink); }
.pos-agreed { display: flex; flex-direction: column; gap: 6px; background: var(--ink); color: #fff; border-radius: 16px; padding: 12px 14px; }
.pos-agreed label { color: #ead08a; font-weight: 600; font-size: 14px; }
.pos-agreed input { background: #2f2c26; border: 0; border-radius: 10px; color: #fff; font: inherit; font-size: 26px; font-weight: 700; height: 52px; padding: 0 12px; outline: 0; }
.pos-agreed input:focus { box-shadow: 0 0 0 2px var(--gold-hi); } .pos-agreed input::placeholder { color: #8f887a; }
.pos-agreed .sub { color: #cfc7b6; font-size: 12.5px; }
.pos-chip { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; border-radius: 99px; padding: 3px 10px; font-size: 12.5px; }
.pos-chip.ok { background: #1f4a33; color: #b9ecd0; } .pos-chip.warn { background: #4a3a14; color: #ffd98a; }
.pos-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 2px solid var(--ink); padding-top: 12px; }
.pos-total span { font-size: 14px; color: var(--muted); } .pos-total b { font-size: 28px; }
.pos-ways { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 8px; }
.pos-ways button { height: 56px; border-radius: 14px; border: 1px solid var(--line-2); background: #fff; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; }
.pos-ways button.on { background: var(--ink); border-color: var(--ink); color: #ead08a; }
.pos-got { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: center; }
.pos-got label { font-size: 13.5px; color: var(--muted); } .pos-got .input { font-size: 18px; font-weight: 700; }
#posChange { grid-column: 1 / -1; } #posChange:not(:empty) { display: flex; justify-content: space-between; background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: 8px 12px; }
.pos-go { height: 62px; font-size: 18px; border-radius: 16px; }
.pos-karats { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pos-karats legend { margin-bottom: 8px; }
.pos-karats button { height: 74px; border-radius: 16px; border: 1px solid var(--line-2); background: #fff; font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.pos-karats button b { font-size: 24px; } .pos-karats button small { font-size: 12px; color: var(--muted); }
.pos-karats button.on { background: var(--ink); border-color: var(--ink); color: #fff; } .pos-karats button.on b { color: #ead08a; } .pos-karats button.on small { color: #d9d2c3; }
.input.big { height: 60px; font-size: 26px; font-weight: 700; }
.pos-scrapval { display: flex; justify-content: space-between; align-items: center; background: var(--ok-soft); color: var(--ok); border-radius: 14px; padding: 12px 16px; } .pos-scrapval b { font-size: 24px; }
@media (max-width: 1100px) { .pos2 { grid-template-columns: minmax(0, 1fr); } .pos2 .panel { position: static; } }
@media (max-width: 700px) {
  .pos-find { flex-wrap: wrap; } .pos-find .pos-search { flex: 1 1 calc(100% - 62px); }
  .pos-find > .btn:not(.cam-btn) { flex: 1; }
  .pos-find .btn span { display: inline; }
  .pos-line { grid-template-columns: 40px minmax(0, 1fr) auto 32px; }
  .pos-line > [data-act=posOpen] { grid-column: 2; justify-self: start; grid-row: 2; padding: 0; height: auto; }
  .pos-rates > span:not(.on) { display: none; }
}

/* v42: sellers, PIN, held sales, the customer's screen */
.pos-tools { flex-wrap: wrap; }
.pos-seller { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); background: #fff; border-radius: 12px; padding: 4px 10px 4px 6px; font: inherit; cursor: pointer; text-align: start; }
.pos-seller:hover { border-color: var(--gold-hi); }
.pos-seller .avatar { width: 32px; height: 32px; } .pos-seller small { display: block; font-size: 11px; color: var(--muted); } .pos-seller b { font-size: 13.5px; }
.pos-seller .ic { transform: rotate(90deg); width: 14px; color: var(--muted); }
.pos-more { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 8px; }
.pin-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.pin-people button { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line-2); background: #fff; border-radius: 14px; padding: 10px; font: inherit; cursor: pointer; text-align: start; }
.pin-people button small { display: block; color: var(--muted); font-size: 12px; } .pin-people button.on { border: 2px solid var(--ink); }
.pin-people button:disabled { opacity: .5; cursor: not-allowed; }
.pin-pad { display: flex; flex-direction: column; align-items: center; gap: 12px; position: relative; }
.pin-dots { display: flex; gap: 14px; } .pin-dots span { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #c9c1b0; }
.pin-dots span.on { background: var(--ink); border-color: var(--ink); }
.pin-dots.err { animation: shake .35s; } .pin-dots.err span { border-color: var(--danger); }
.pin-err { color: var(--danger); font-size: 13.5px; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.pin-keys { display: grid; grid-template-columns: repeat(3, 72px); gap: 8px; }
.pin-keys button { height: 56px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); font: inherit; font-size: 22px; font-weight: 600; cursor: pointer; }
.pin-keys button:active { background: var(--gold-soft); }
.pin-hidden { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.hold-list { display: flex; flex-direction: column; gap: 8px; }
.hold-list button { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 12px; font: inherit; cursor: pointer; text-align: start; }
.hold-list button > span:first-child { flex: 1; } .hold-list small { display: block; color: var(--muted); font-size: 12.5px; }
.hold-list button:hover { border-color: var(--gold-hi); }
.wa-preview { white-space: pre-wrap; font: inherit; font-size: 13.5px; background: #e7f6ec; border-radius: 12px; padding: 12px 14px; margin: 0; max-height: 280px; overflow: auto; }
/* the customer's screen */
.cd { min-height: 100vh; box-sizing: border-box; background: #1a1916; color: #fff; display: flex; flex-direction: column; gap: 18px; padding: 32px 40px; }
.cd header { display: flex; justify-content: space-between; align-items: baseline; color: #ead08a; font-size: 22px; } .cd header span { color: #bdb5a5; font-size: 16px; }
.cd-lines { flex: 1; display: flex; flex-direction: column; gap: 4px; overflow: auto; }
.cd-lines > div { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid #34302a; font-size: 22px; }
.cd-lines small { display: block; color: #bdb5a5; font-size: 15px; } .cd-lines .in .money { color: #7fd1a5; }
.cd-disc { display: flex; justify-content: space-between; font-size: 20px; color: #ffb4a8; }
.cd-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 2px solid #ead08a; padding-top: 16px; font-size: 24px; color: #d9d2c3; }
.cd-total b { font-size: 56px; color: #fff; }
.cd-idle, .cd-done { align-items: center; justify-content: center; text-align: center; } .cd-idle h1, .cd-done h1 { color: #fff; font-size: 44px; margin: 10px 0 0; }
.cd-idle p, .cd-done p { color: #bdb5a5; font-size: 22px; margin: 0; }
.cd-rates { display: flex; gap: 14px; margin-top: 24px; } .cd-rates span { display: flex; flex-direction: column; gap: 4px; background: #2a2722; border-radius: 16px; padding: 14px 22px; color: #bdb5a5; font-size: 16px; }
.cd-rates b { color: #ead08a; font-size: 26px; }
.cd-done .cd-total { border: 0; flex-direction: column; align-items: center; gap: 6px; } .cd-change { font-size: 26px; color: #ffd98a; }
@media (max-width: 700px) { .pos-tools .btn span { display: none; } .pos-tools { gap: 6px; } .pos-more { grid-auto-flow: row; } }

/* v43: the owner's board */
.dh-head h1 { font-size: 30px; margin: 2px 0 0; }
.dh-price { display: grid; grid-template-columns: 1.3fr 1fr .85fr .85fr; gap: 14px; align-items: stretch; margin-bottom: 16px; padding: 20px 22px; border-radius: 20px; color: #fff;
  background: radial-gradient(120% 160% at 100% 0%, #3b3123 0%, #1c1a16 60%); box-shadow: var(--shadow-2); }
.dh-pi { display: flex; flex-direction: column; gap: 6px; justify-content: center; } .dh-pi b { color: #ead08a; font-size: 15px; } .dh-pi span { color: #bdb5a5; font-size: 13px; }
.dh-pi a { align-self: flex-start; color: #ead08a; font-size: 13.5px; font-weight: 600; border: 1px solid #5a4a2a; border-radius: 10px; padding: 5px 12px; margin-top: 4px; }
.dh-k { background: rgba(255,255,255,.05); border-radius: 16px; padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; }
.dh-k.big { border: 1px solid rgba(234,208,138,.35); background: rgba(255,255,255,.07); }
.dh-k > span { font-size: 13px; color: #cfc7b6; } .dh-k b { font-size: 26px; } .dh-k.big b { font-size: 32px; }
.dh-k small { font-size: 12.5px; color: #bdb5a5; } .dh-k .up, .dh-kpi .up { color: #2f9e65; } .dh-k .up { color: #9fe0bd; } .dh-k .down { color: #ffb4a8; } .dh-kpi .down { color: var(--danger); }
.dh-day { display: flex; align-items: center; gap: 10px 22px; flex-wrap: wrap; padding: 14px 18px; margin-bottom: 16px; }
.dh-day > b { font-size: 16px; }
.dh-t { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--ink); }
.dh-t i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; flex: none; }
.dh-t.ok { color: var(--ok); } .dh-t.ok i { background: var(--ok-soft); }
.dh-t.todo i { background: var(--danger-soft); color: var(--danger); } .dh-t.todo { font-weight: 600; }
.dh-t.wait { color: var(--warn); } .dh-t.wait i { background: var(--warn-soft); } a.dh-t:hover { text-decoration: underline; }
.dh-t.warn { color: var(--danger); } .dh-t.warn i { background: var(--danger-soft); }
.dh-acts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.dh-acts a { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; color: var(--ink); transition: border-color .15s var(--ease), transform .15s var(--ease); }
.dh-acts a:hover { border-color: var(--gold-hi); transform: translateY(-1px); }
.dh-acts .ic { width: 44px; height: 44px; padding: 11px; box-sizing: border-box; border-radius: 12px; background: var(--gold-soft); color: var(--gold); flex: none; }
.dh-acts span { display: flex; flex-direction: column; } .dh-acts small { color: var(--muted); font-size: 12.5px; }
.dh-kpis { display: grid; grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.dh-kpi { display: flex; flex-direction: column; gap: 4px; position: relative; overflow: hidden; }
.dh-kpi.main::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, #ead08a, #a47a1e); }
.dh-kpi .label, .dh-bal .label { font-size: 14px; color: var(--muted); } .dh-kpi b { font-size: 28px; } .dh-kpi.main b { font-size: 34px; }
.dh-kpi b small { font-size: 15px; font-weight: 500; } .dh-kpi > small, .dh-kpi div small { display: block; font-size: 13px; color: var(--muted); }
.dh-bars { display: flex; align-items: flex-end; gap: 5px; height: 56px; } .dh-bars span { width: 12px; border-radius: 4px; background: #efe6d1; } .dh-bars span.on { background: var(--gold); }
.dh-bal { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 12px; }
.dh-bal .card { display: flex; flex-direction: column; gap: 4px; color: inherit; } .dh-bal b { font-size: 22px; } .dh-bal small { color: var(--muted); font-size: 12.5px; }
.dh-two { display: grid; grid-template-columns: 1.2fr 1fr; gap: 12px; margin-top: 4px; }
.dh-recent a { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.dh-recent a:last-child { border-bottom: 0; } .dh-recent small { display: block; color: var(--muted); font-size: 12.5px; } .dh-recent a:hover b:first-child { color: var(--gold-ink); }
.dh-stock td, .dh-stock th { padding: 8px 4px; }
.dh-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 34px 20px; border-style: dashed; margin-bottom: 12px; }
.dh-empty > .ic { color: var(--gold-hi); }
.dh-setup { margin-bottom: 16px; display: flex; flex-direction: column; gap: 14px; }
.dh-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.dh-step { border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.dh-step i { font-style: normal; width: 32px; height: 32px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; font-weight: 700; }
.dh-step small { color: var(--muted); font-size: 13px; } .dh-step .btn { margin-top: auto; align-self: flex-start; }
.dh-step.done { border-color: #cfe7da; background: #f3faf6; } .dh-step.done i { background: var(--ok); color: #fff; } .dh-step.done small { color: #3b5a48; }
.dh-step.next { border: 2px solid var(--gold-hi); background: #fffdf8; } .dh-step.next i { background: var(--ink); color: #ead08a; }
.dh-trust { display: flex; align-items: center; gap: 8px 22px; flex-wrap: wrap; margin-top: 16px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 18px; font-size: 13.5px; color: #3b3730; }
.dh-trust > a { margin-inline-start: auto; font-weight: 600; }
.dh-live { display: inline-flex; align-items: center; gap: 6px; } .dh-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(31,122,77,.5); animation: live 2.4s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 8px rgba(31,122,77,0); } 100% { box-shadow: 0 0 0 0 rgba(31,122,77,0); } }
.dh-bad { color: var(--danger); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .dh-live i { animation: none; } }
@media (max-width: 1100px) { .dh-price { grid-template-columns: 1fr 1fr; } .dh-pi { grid-column: 1 / -1; } .dh-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dh-kpi.main { grid-column: 1 / -1; } .dh-two { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 700px) {
  .dh-head h1 { font-size: 23px; } .dh-price { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 16px; } .dh-k.big { grid-column: 1 / -1; }
  .dh-acts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dh-acts small { display: none; } .dh-acts a { flex-direction: column; align-items: flex-start; }
  .dh-day { flex-direction: column; align-items: flex-start; } .dh-trust > a { margin-inline-start: 0; }
}

/* v44: the professional stock screen */
.sv-sum { display: grid; grid-template-columns: 1.4fr repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.sv-val { border-radius: 18px; padding: 16px 18px; color: #fff; display: flex; flex-direction: column; gap: 4px; background: radial-gradient(120% 160% at 100% 0%, #3b3123 0%, #1c1a16 60%); box-shadow: var(--shadow-2); }
.sv-val > span { color: #ead08a; font-size: 13.5px; font-weight: 600; } .sv-val b { font-size: 28px; } .sv-val b small { font-size: 14px; font-weight: 500; } .sv-val > small { color: #bdb5a5; font-size: 12.5px; }
.sv-k, .sv-aged { display: flex; flex-direction: column; gap: 3px; text-align: start; font: inherit; color: inherit; cursor: pointer; transition: border-color .15s var(--ease); }
.sv-k > span, .sv-aged > span { font-size: 13.5px; color: var(--muted); } .sv-k b, .sv-aged b { font-size: 22px; } .sv-k b small, .sv-aged b small { font-size: 13px; font-weight: 500; } .sv-k > small, .sv-aged > small { color: var(--muted); font-size: 12.5px; }
.sv-k:hover, .sv-aged:hover { border-color: var(--gold-hi); } .sv-k.on { border: 2px solid var(--ink); }
.sv-aged { background: var(--warn-soft); border-color: #f0dcae; } .sv-aged > span, .sv-aged > small { color: var(--warn); } .sv-aged.on { border: 2px solid var(--warn); }
.sv-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.sv-search { flex: 1 1 260px; display: flex; align-items: center; gap: 8px; height: 44px; background: #fff; border: 1px solid var(--line-2); border-radius: 12px; padding: 0 12px; }
.sv-search .ic { color: var(--gold); } .sv-search input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; background: transparent; }
.sv-sel { width: auto; height: 44px; border-radius: 12px; max-width: 220px; }
.sv-list { padding: 0; overflow: hidden; }
.sv-bulk { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 16px; background: var(--ink); color: #fff; font-size: 14px; }
.sv-bulk > span { color: #bdb5a5; } .sv-bulk-acts { margin-inline-start: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.sv-bulk-acts button { height: 34px; border-radius: 10px; border: 1px solid #4a443a; background: transparent; color: #fff; padding: 0 12px; font: inherit; font-size: 13.5px; cursor: pointer; } .sv-bulk-acts button:hover { border-color: #ead08a; }
.sv-head, .sv-row { display: grid; grid-template-columns: 32px 46px minmax(0, 2fr) .6fr .9fr .9fr .9fr 1fr; gap: 0 12px; align-items: center; padding: 10px 16px; }
.sv-list:has(.sv-head > :nth-child(9)) .sv-head, .sv-list:has(.sv-head > :nth-child(9)) .sv-row { grid-template-columns: 32px 46px minmax(0, 2fr) .6fr .9fr .9fr .9fr 1fr .9fr; }
.sv-head { font-size: 12.5px; color: var(--muted); border-bottom: 1px solid var(--line); }
.sv-row { border-bottom: 1px solid var(--line); cursor: pointer; font-size: 14px; transition: background .12s; } .sv-row:hover { background: var(--surface-2); }
.sv-row.sel { background: #fbf7ee; } .sv-row.open { box-shadow: inset -3px 0 0 var(--gold); background: #fbf7ee; }
.sv-ck { display: grid; place-items: center; } .sv-ck input { width: 18px; height: 18px; accent-color: var(--gold); cursor: pointer; }
.sv-ic { width: 42px; height: 42px; border-radius: 10px; background: var(--gold-soft); color: var(--gold); display: grid; place-items: center; } .sv-ic .ic { width: 20px; height: 20px; }
.sv-ic.lot { background: var(--info-soft); color: var(--info); font-size: 11.5px; font-weight: 700; }
.sv-name { display: flex; flex-direction: column; min-width: 0; } .sv-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .sv-name small { color: var(--muted); font-size: 12px; }
.sv-row b small { font-size: 12px; font-weight: 500; color: var(--muted); }
.sv-old { color: var(--warn); font-weight: 600; } .sv-est { color: var(--warn); }
.sv-foot { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; font-size: 13px; color: var(--muted); }
.sv-drawer { position: fixed; top: calc(var(--top-h) + 12px); bottom: 12px; inset-inline-end: 12px; width: min(380px, calc(100vw - 24px)); z-index: 40; overflow: auto;
  background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 30px 80px -20px rgba(26,25,22,.45); padding: 18px; display: flex; flex-direction: column; gap: 14px; animation: pop .25s var(--ease) both; }
.sv-drawer h2 { margin: 0; font-size: 18px; }
.sv-dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 13.5px; } .sv-dl > span:nth-child(odd) { color: var(--muted); }
.sv-price { display: flex; justify-content: space-between; align-items: baseline; background: var(--surface-2); border-radius: 12px; padding: 12px; } .sv-price span { color: var(--muted); font-size: 13.5px; } .sv-price b { font-size: 22px; }
.sv-acts { display: flex; flex-wrap: wrap; gap: 8px; } .sv-acts .btn { flex: 1 1 140px; }
.sv-tl { display: flex; flex-direction: column; gap: 0; } .sv-tl > b { margin-bottom: 8px; }
.sv-tl > div { display: flex; gap: 10px; font-size: 13.5px; position: relative; padding-bottom: 12px; }
.sv-tl > div::before { content: ''; position: absolute; inset-inline-start: 3.5px; top: 14px; bottom: 0; width: 1px; background: var(--line-2); } .sv-tl > div.last::before { display: none; }
.sv-tl i { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); margin-top: 6px; flex: none; } .sv-tl small { display: block; color: var(--muted); font-size: 12px; }
/* opening balance grid */
.ob-grid { padding: 0; overflow: auto; margin: 14px 0; }
.ob-head, .ob-row { display: grid; grid-template-columns: 34px minmax(180px, 1.6fr) minmax(110px, 1fr) minmax(110px, 1fr) minmax(90px, .8fr) minmax(130px, 1.2fr) 40px; gap: 8px; align-items: center; padding: 8px 14px; min-width: 820px; }
.ob-head { font-size: 12.5px; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line); padding-block: 10px; }
.ob-row { border-bottom: 1px solid var(--line); } .ob-row .input { height: 40px; } .ob-w { font-weight: 700; }
.ob-est::placeholder { color: var(--warn); opacity: .9; } .ob-est { border-style: dashed; background: #fffdf8; }
.ob-row.err { background: var(--danger-soft); } .ob-err { grid-column: 2 / -1; color: var(--danger); font-size: 12.5px; }
.ob-tools { display: flex; gap: 8px; align-items: center; padding: 10px 14px; min-width: 820px; } .ob-tools .sub { margin-inline-end: auto; }
.ob-bar { position: sticky; bottom: 12px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; background: var(--ink); color: #fff; border-radius: 18px; padding: 14px 18px; box-shadow: var(--shadow-2); }
.ob-bar > span { display: flex; flex-direction: column; } .ob-bar small { color: #bdb5a5; font-size: 12px; } .ob-bar b { font-size: 20px; } .ob-bar .ob-estnote { color: #ead08a; }
.ob-print { display: flex; align-items: center; gap: 8px; color: #e7e1d3; font-size: 14px; } .ob-print input { width: 18px; height: 18px; accent-color: var(--gold-hi); }
.ob-bar .btn { margin-inline-start: auto; }
@media (max-width: 1100px) { .sv-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sv-val { grid-column: 1 / -1; } }
@media (max-width: 800px) {
  .sv-head { display: none; }
  .sv-row, .sv-list:has(.sv-head > :nth-child(9)) .sv-row { grid-template-columns: 28px 44px minmax(0, 1fr) auto; grid-template-areas: 'ck ic name price' 'ck ic meta st'; gap: 2px 10px; }
  .sv-row > .sv-ck { grid-area: ck; } .sv-row > .sv-ic { grid-area: ic; } .sv-row > .sv-name { grid-area: name; }
  .sv-row > :nth-child(4), .sv-row > :nth-child(6), .sv-row > :nth-child(9) { display: none; }
  .sv-row > :nth-child(5) { grid-area: meta; font-size: 12.5px; } .sv-row > :nth-child(7) { grid-area: st; justify-self: end; } .sv-row > :nth-child(8) { grid-area: price; }
  .sv-sel { flex: 1 1 45%; max-width: none; } .ob-bar .btn { width: 100%; }
}

/* v45: the accounting area */
.acc-nav { display: flex; gap: 4px; border-bottom: 1px solid var(--line-2); margin-bottom: 14px; overflow-x: auto; }
.acc-nav button { border: 0; background: transparent; font: inherit; padding: 10px 16px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.acc-nav button.on { color: var(--ink); font-weight: 700; border-bottom-color: var(--gold); } .acc-nav button:hover { color: var(--ink); }
.acc-sub { margin-bottom: 14px; }
.acc-cash { display: grid; grid-template-columns: 1.3fr repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.acc-cash-main { border-radius: 18px; padding: 16px 18px; color: #fff; display: flex; flex-direction: column; gap: 4px; background: radial-gradient(120% 160% at 100% 0%, #3b3123 0%, #1c1a16 60%); box-shadow: var(--shadow-2); }
.acc-cash-main > span { color: #ead08a; font-size: 13.5px; font-weight: 600; } .acc-cash-main b { font-size: 30px; } .acc-cash-main b small { font-size: 14px; font-weight: 500; }
.acc-cash-main .up { color: #9fe0bd; } .acc-cash-main .down { color: #ffb4a8; } .acc-cash-main small { font-size: 12.5px; }
.acc-cbox { display: flex; flex-direction: column; gap: 4px; text-align: start; font: inherit; color: inherit; cursor: pointer; } .acc-cbox:hover { border-color: var(--gold-hi); }
.acc-cbox > span { font-size: 13.5px; color: var(--muted); } .acc-cbox b { font-size: 22px; } .acc-cbox small { font-size: 12px; color: var(--muted); min-height: 1em; }
.acc-two { display: grid; grid-template-columns: 1.5fr 1fr; gap: 12px; margin-bottom: 12px; } .acc-two.eq { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.acc-two h2 { margin: 0; font-size: 16px; }
.acc-pl { display: flex; flex-direction: column; gap: 12px; }
.acc-pl-top { display: flex; gap: 28px; align-items: flex-end; flex-wrap: wrap; } .acc-pl-top > div { display: flex; flex-direction: column; }
.acc-pl-top b { font-size: 32px; } .acc-pl-top small { font-size: 13px; color: var(--muted); } .acc-pl-parts { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; }
.acc-months { display: flex; align-items: flex-end; gap: 14px; height: 130px; padding-top: 10px; border-top: 1px solid var(--line); }
.acc-months > span { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; }
.acc-months i { display: block; width: 100%; max-width: 46px; border-radius: 6px; background: #efe6d1; } .acc-months i.on { background: var(--gold); } .acc-months i.neg { background: var(--danger-soft); outline: 1px solid #e8b4ae; }
.acc-months small { font-size: 12px; color: var(--muted); }
.up { color: var(--ok); } .down { color: var(--danger); }
.acc-gold { display: flex; flex-direction: column; gap: 12px; } .acc-gl { display: grid; grid-template-columns: 1fr auto; gap: 10px; font-size: 14px; }
.acc-gold-net { margin-top: auto; display: flex; justify-content: space-between; align-items: baseline; border-top: 2px solid var(--ink); padding-top: 10px; } .acc-gold-net b:last-child { font-size: 22px; }
.acc-ar { display: flex; flex-direction: column; gap: 10px; } .acc-ar > .row b { font-size: 18px; }
.acc-age { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: var(--surface-3); }
.acc-age .ok { background: var(--ok); } .acc-age .warn { background: #d39b2a; } .acc-age .bad { background: var(--danger); }
.acc-age-l { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); } .acc-age-l b { color: var(--ink); }
.acc-top a { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); color: var(--ink); font-size: 14px; } .acc-top a:hover span:first-child { color: var(--gold-ink); }
.acc-att { display: flex; align-items: center; gap: 10px 22px; flex-wrap: wrap; font-size: 13.5px; }
.acc-att button { border: 0; background: transparent; font: inherit; cursor: pointer; padding: 0; } .acc-att .ok { color: var(--ok); } .acc-att .warn { color: var(--warn); } .acc-att .bad { color: var(--danger); }
.acc-att button:hover { text-decoration: underline; }
.acc-reports { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; align-items: start; }
.acc-rlist { display: flex; flex-direction: column; gap: 8px; position: sticky; top: calc(var(--top-h) + 16px); }
.acc-rlist small { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: 6px; }
.acc-rlist button, .acc-rlist a { display: flex; flex-direction: column; gap: 2px; text-align: start; font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 11px 14px; cursor: pointer; }
.acc-rlist button span, .acc-rlist a span { font-size: 12.5px; color: var(--muted); } .acc-rlist button:hover, .acc-rlist a:hover { border-color: var(--gold-hi); }
.acc-rlist button.on { background: var(--ink); border-color: var(--ink); color: #fff; } .acc-rlist button.on span { color: #cfc7b6; }
.acc-rbody { min-width: 0; }
a.acc-drill { color: inherit; text-decoration: underline dotted rgba(90,66,12,.45); text-underline-offset: 3px; } a.acc-drill:hover { color: var(--gold-ink); }
.acc-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; } .acc-filters .row input[type=date] { width: auto; height: 44px; }
.acc-drafts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; } .acc-drafts > span { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.acc-book { padding: 0; overflow: hidden; }
.acc-bh, .acc-br { display: grid; grid-template-columns: 90px 170px minmax(0, 1fr) 200px 130px; gap: 0 12px; align-items: center; padding: 11px 16px; }
.acc-bh { font-size: 12.5px; color: var(--muted); border-bottom: 1px solid var(--line); }
.acc-br { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: #fff; font: inherit; text-align: start; cursor: pointer; color: var(--ink); }
.acc-br:hover { background: var(--surface-2); } .acc-br.open { background: #fbf7ee; box-shadow: inset -3px 0 0 var(--gold); } .acc-br.muted { opacity: .65; }
.acc-memo { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-lines { width: 100%; font-size: 13.5px; } .acc-lines td, .acc-lines th { padding: 7px 6px; }
.acc-glines { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; } .acc-glines > span { display: flex; justify-content: space-between; }
.acc-coa { padding: 0; overflow: hidden; margin-bottom: 8px; }
.acc-ch, .acc-cr { display: grid; grid-template-columns: minmax(0, 1fr) 130px 170px 48px; gap: 0 12px; align-items: center; padding: 9px 16px; }
.acc-ch { font-size: 12.5px; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.acc-cr { border-bottom: 1px solid var(--line); font-size: 14px; } .acc-cr.grp { background: #fcfaf5; } .acc-cr.d0 { background: #f7f3ea; } .acc-cr.muted { opacity: .6; }
.acc-cr > a { color: var(--ink); } .acc-cr > a:hover { color: var(--gold-ink); text-decoration: underline; }
.acc-tg { border: 0; background: transparent; width: 22px; font: inherit; cursor: pointer; color: var(--muted); } .acc-tg-sp { display: inline-block; width: 22px; }
@media (max-width: 1100px) { .acc-cash { grid-template-columns: repeat(2, minmax(0, 1fr)); } .acc-cash-main { grid-column: 1 / -1; } .acc-two, .acc-two.eq { grid-template-columns: minmax(0, 1fr); }
  .acc-reports { grid-template-columns: minmax(0, 1fr); } .acc-rlist { position: static; flex-direction: row; overflow-x: auto; } .acc-rlist small { display: none; } .acc-rlist button, .acc-rlist a { flex: none; } .acc-rlist button span, .acc-rlist a span { display: none; } }
@media (max-width: 800px) {
  .acc-bh { display: none; } .acc-br { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'memo amt' 'meta src'; gap: 2px 10px; }
  .acc-br > :nth-child(1) { display: none; } .acc-br > :nth-child(2) { grid-area: meta; font-size: 12px; } .acc-br > :nth-child(3) { grid-area: memo; } .acc-br > :nth-child(4) { grid-area: src; justify-self: end; } .acc-br > :nth-child(5) { grid-area: amt; }
  .acc-ch, .acc-cr { grid-template-columns: minmax(0, 1fr) auto 36px; } .acc-ch > :nth-child(2), .acc-cr > :nth-child(2) { display: none; }
}

/* ── v46: ابدأ في 5 دقايق ── */
.qs-choose { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.qs-ch-h { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 2px; } .qs-ch-h b { font-size: 18px; }
.qs-opt { display: flex; gap: 14px; align-items: flex-start; text-align: start; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 18px; padding: 16px; font: inherit; cursor: pointer; transition: border-color .15s var(--ease), transform .15s var(--ease); }
.qs-opt:hover { border-color: var(--gold-hi); transform: translateY(-1px); }
.qs-opt.main { background: var(--ink); color: #fff; border-color: var(--ink); } .qs-opt.main small { color: #d9d2c3; }
.qs-opt .ic { width: 46px; height: 46px; padding: 12px; box-sizing: border-box; border-radius: 14px; background: var(--gold-soft); color: var(--gold); flex: none; }
.qs-opt.main .ic { background: #2f2c26; color: #ead08a; }
.qs-opt span { display: flex; flex-direction: column; gap: 4px; } .qs-opt b { font-size: 16.5px; } .qs-opt small { color: var(--muted); font-size: 13px; line-height: 1.6; }
.qs-resume { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; border-inline-start: 4px solid var(--gold); }
.qs-resume > span { flex: 1; display: flex; flex-direction: column; } .qs-resume small { color: var(--muted); }
.qs-nudges { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.qs-nudge { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; }
.qs-nudge .ic { width: 36px; height: 36px; padding: 9px; box-sizing: border-box; border-radius: 10px; background: var(--gold-soft); color: var(--gold); flex: none; }
.qs-nudge > span { flex: 1 1 220px; display: flex; flex-direction: column; } .qs-nudge small { color: var(--muted); }
.qs { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.qs h1 { margin: 0; font-size: 24px; } .qs > p { margin: 0; }
.qs-top { display: flex; align-items: center; gap: 10px; }
.qs-back { width: 36px; height: 36px; border-radius: 10px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink); cursor: pointer; font: inherit; }
.qs-prog { flex: 1; display: flex; gap: 6px; } .qs-prog span { flex: 1; height: 6px; border-radius: 99px; background: var(--line-2); } .qs-prog span.on { background: var(--gold); }
.qs-kinds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.qs-kind { border: 1px solid var(--line); background: #fff; border-radius: 16px; overflow: hidden; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.qs-chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.qs-chips button { min-height: 44px; border-radius: 12px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); font: inherit; font-size: 14px; padding: 0 6px; cursor: pointer; }
.qs-chips button.on { background: var(--gold); border-color: var(--gold); color: #fff; font-weight: 600; }
.qs-picked-h { padding-top: 4px; } .qs-picked-h b { font-size: 15px; }
.qs-k-t b { font-size: 16px; } .qs-k-st { font-size: 12px; font-weight: 600; color: var(--ok, #1f6b45); }
.qs-kind.on.miss { border: 2px solid var(--danger); } .qs-kind.miss .qs-k-st, .qs-k-err { color: var(--danger, #b42318); }
.qs-kind.miss .qs-rate .input { border: 2px solid var(--danger, #b42318); background: var(--danger-soft); }
.qs-k-err { font-size: 12.5px; } .qs-rate .input { flex: 1; } .qs-rate span { min-width: 64px; }
.qs-kind.on { border: 2px solid var(--gold-hi); }
.qs-kind.on .qs-karats { display: flex; gap: 6px; } .qs-karats button { flex: 1; height: 36px; border-radius: 10px; border: 1px solid var(--line-2); background: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.qs-karats button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.qs-rate { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); } .qs-rate .input { width: 90px; min-width: 0; height: 38px; } .qs-rate small { font-size: 12px; }
.qs-foot { display: flex; flex-direction: column; gap: 8px; }
.qs-big { font-size: 30px; font-weight: 700; height: 64px; }
.qs-calc { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.qs-calc > span { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; } .qs-calc > span.on { border-color: var(--gold-hi); background: var(--gold-soft); }
.qs-calc small { color: var(--muted); } .qs-calc.empty { display: block; }
.qs-spread { display: flex; align-items: center; gap: 6px; } .qs-spread .input { width: 70px; height: 34px; }
.qs-ways { display: flex; flex-direction: column; gap: 12px; }
.qs-way { display: flex; gap: 14px; align-items: flex-start; text-align: start; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px; font: inherit; color: var(--ink); cursor: pointer; }
.qs-way:hover { border-color: var(--gold-hi); } .qs-way.dark { background: var(--ink); color: #fff; border-color: var(--ink); } .qs-way.dark small { color: #d9d2c3; } .qs-way.dark em { color: #ead08a; }
.qs-way .ic { width: 46px; height: 46px; padding: 12px; box-sizing: border-box; border-radius: 14px; background: var(--gold-soft); color: var(--gold); flex: none; } .qs-way.dark .ic { background: #2f2c26; color: #ead08a; }
.qs-way span { display: flex; flex-direction: column; gap: 4px; } .qs-way b { font-size: 17px; } .qs-way small { color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.qs-way em { font-style: normal; font-size: 12.5px; font-weight: 600; color: var(--gold-ink); }
.qs-note { text-align: center; }
.qs-lots { display: flex; flex-direction: column; gap: 8px; }
.qs-lot { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.qs-lot > span { flex: 1; display: flex; flex-direction: column; min-width: 0; } .qs-lot small { color: var(--muted); font-size: 12px; }
.qs-lot .input { width: 100px; height: 46px; font-size: 20px; font-weight: 700; }
.qs-total { display: flex; justify-content: space-between; align-items: baseline; } .qs-total b { font-size: 18px; }
.qp-fs { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; } .qp-tiles { max-height: 260px; overflow: auto; }
.qp-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.qp-tiles button { min-height: 50px; border-radius: 14px; border: 1px solid var(--line-2); background: #fff; font: inherit; font-weight: 600; cursor: pointer; padding: 6px; }
.qp-tiles button.on { background: var(--ink); color: #fff; border: 2px solid var(--ink); }
.qp-calc { background: var(--surface-3); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.qp-calc > span { display: flex; justify-content: space-between; } .qp-calc .t { border-top: 1px solid var(--line-2); padding-top: 6px; font-size: 15px; }
.qp-lot { gap: 8px; font-size: 13.5px; align-items: center; } .qp-lot input { width: 18px; height: 18px; accent-color: var(--gold); }
@media (max-width: 640px) { .qs-choose, .qs-kinds { grid-template-columns: minmax(0, 1fr); } .qs-chips { grid-template-columns: repeat(3, minmax(0, 1fr)); } .qp-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ── v47: photos ── */
.ph-th, .ph-fill { display: block; object-fit: cover; background: var(--surface-3); }
.ph-none { display: grid; place-items: center; color: var(--faint); } .ph-none .ic { width: 22px; height: 22px; }
.ph-fill { width: 100%; height: 100%; }
.ph-tag { position: absolute; top: 6px; inset-inline-start: 6px; background: rgba(255,255,255,.92); color: var(--ink-2); border-radius: 8px; padding: 0 7px; font-size: 11px; line-height: 20px; }
.pos-res button { padding: 0; overflow: hidden; } .pos-res button > :not(.pos-res-ph) { padding-inline: 12px; } .pos-res button > :last-child { padding-bottom: 12px; }
.pos-res-ph { position: relative; display: block; height: 130px; background: var(--surface-3); }
.pos-tile-ph { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; }
.pos-tiles button:has(.pos-tile-ph) { height: 96px; }
.pos-th { object-fit: cover; padding: 0; background: var(--surface-3); }
.pos-th-add { border: 1.5px dashed var(--line-2); background: #fff; color: var(--muted); cursor: pointer; padding: 0; }
.pos-th-add:hover { border-color: var(--gold-hi); color: var(--gold); } .pos-th-add .ic { width: 20px; height: 20px; }
.sv-th { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; }
.ph-gal { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 14px; }
.ph-main { position: relative; height: 220px; border-radius: 16px; background: var(--surface-3); overflow: hidden; display: grid; place-items: center; }
.ph-main img { width: 100%; height: 100%; object-fit: contain; }
.ph-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--muted); } .ph-empty .ic { color: var(--faint); }
.ph-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ph-cell { position: relative; height: 78px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-3); }
.ph-cell.on { border: 2px solid var(--gold); } .ph-cell img { width: 100%; height: 100%; object-fit: cover; }
.ph-badge { position: absolute; bottom: 4px; inset-inline-start: 50%; transform: translateX(50%); background: var(--gold); color: #fff; border-radius: 6px; padding: 0 6px; font-size: 10.5px; white-space: nowrap; }
.ph-mk { position: absolute; bottom: 0; inset-inline: 0; border: 0; background: rgba(29,27,23,.62); color: #fff; font: inherit; font-size: 10.5px; padding: 3px 0; cursor: pointer; }
.ph-x { position: absolute; top: 4px; inset-inline-end: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(29,27,23,.68); color: #fff; font: inherit; font-size: 12px; cursor: pointer; display: grid; place-items: center; padding: 0; }
.ph-add { height: 78px; border-radius: 12px; border: 1.5px dashed var(--gold-hi); background: #fff; color: var(--gold-ink); font: inherit; font-weight: 600; font-size: 12.5px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; }
.ph-add.wide { flex: 1; flex-direction: row; gap: 8px; height: 64px; } .ph-add .ic { width: 22px; height: 22px; color: var(--gold); }
.qp-phbox { display: flex; flex-direction: column; gap: 8px; }
.qp-ph { display: flex; gap: 8px; } .qp-ph-th { position: relative; width: 64px; height: 64px; border-radius: 12px; overflow: hidden; flex: none; } .qp-ph-th img { width: 100%; height: 100%; object-fit: cover; }
.ob-head, .ob-row { grid-template-columns: 34px minmax(180px, 1.6fr) minmax(110px, 1fr) minmax(110px, 1fr) minmax(90px, .8fr) minmax(130px, 1.2fr) 48px 40px; min-width: 880px; }
.ob-ph { position: relative; width: 44px; height: 40px; border-radius: 8px; overflow: hidden; } .ob-ph img { width: 100%; height: 100%; object-fit: cover; }
.ob-ph .ph-x { width: 20px; height: 20px; top: 2px; inset-inline-end: 2px; font-size: 10px; } .ob-cam .ic { width: 18px; height: 18px; }
.cat-ph { display: inline-flex; align-items: center; gap: 10px; } .cat-th { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; flex: none; }
.cat-phbox { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 14px; padding: 10px; }
.cat-big { width: 96px; height: 96px; border-radius: 12px; overflow: hidden; flex: none; background: var(--surface-3); display: block; } .cat-big .ph-none { width: 100%; height: 100%; }
.cd-wrap { min-height: 100vh; } .cd-wrap.ph { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); background: #1a1916; }
.cd-th { width: 72px; height: 72px; border-radius: 14px; object-fit: cover; margin-inline-end: 16px; flex: none; }
.cd-lines > div > span { flex: 1; }
.cd-ph { margin: 0; position: relative; background: #f1ebe0; display: grid; place-items: center; min-height: 100vh; }
.cd-ph img { max-width: 100%; max-height: 100vh; object-fit: contain; }
.cd-ph figcaption { position: absolute; bottom: 24px; background: rgba(29,27,23,.78); color: #fff; border-radius: 99px; padding: 6px 18px; font-size: 18px; }
@media (max-width: 900px) { .cd-wrap.ph { grid-template-columns: minmax(0, 1fr); } .cd-ph { min-height: 40vh; } }
.sv-drawer > * { flex-shrink: 0; }
.content.page-in > #svDrawer { animation: none; }   /* a fixed panel inside an animated wrapper would scroll with the page */
.pos-th-add.has { position: relative; overflow: hidden; border-style: solid; } .pos-th-add.has img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.pos-th-add.has .ic { position: relative; color: var(--ink); background: rgba(255,255,255,.85); border-radius: 50%; padding: 3px; width: 24px; height: 24px; box-sizing: border-box; }

/* ── v48: open doors (visitors) ── */
.gx { min-height: 100vh; background: var(--bg); color: var(--ink); }
.gx-brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; } .gx-brand span { display: flex; flex-direction: column; line-height: 1.3; } .gx-brand small { font-size: 12px; opacity: .7; }
.gx-login { font-weight: 600; color: var(--gold-ink); }
.gx-doors { background: #1d1b17; color: #fff; display: grid; place-items: start center; }
.gx-dwrap { width: min(560px, 100%); box-sizing: border-box; padding: 28px 18px 26px; display: flex; flex-direction: column; gap: 18px; min-height: 100vh; }
.gx-dtop { display: flex; align-items: center; justify-content: space-between; } .gx-doors .gx-login { color: #ead08a; }
.gx-dh h1 { margin: 10px 0 6px; font-size: 30px; line-height: 1.4; } .gx-dh p { margin: 0; color: #bdb5a5; }
.gx-dgrid { display: flex; flex-direction: column; gap: 12px; }
.gx-door { display: flex; gap: 14px; align-items: flex-start; border-radius: 20px; padding: 18px; background: #2a2722; border: 1px solid #3a362f; color: #fff; transition: transform .15s var(--ease), border-color .15s; }
.gx-door:hover { transform: translateY(-2px); border-color: #c79b3b; }
.gx-door.light { background: #f6f4ef; color: var(--ink); border-color: #f6f4ef; } .gx-door.light small { color: var(--ink-2); } .gx-door.light em { color: #8a5c00; }
.gx-door .ic { width: 48px; height: 48px; padding: 12px; box-sizing: border-box; border-radius: 14px; background: #3a362f; color: #ead08a; flex: none; }
.gx-door.light .ic { background: var(--gold-soft); color: var(--gold); }
.gx-door > span { display: flex; flex-direction: column; gap: 4px; } .gx-door b { font-size: 18px; } .gx-door small { color: #d9d2c3; font-size: 14px; line-height: 1.6; } .gx-door em { font-style: normal; font-size: 13px; font-weight: 600; color: #ead08a; }
.gx-look { margin-top: auto; display: flex; flex-direction: column; gap: 8px; } .gx-look > span { color: #bdb5a5; font-size: 14px; }
.gx-look > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.gx-look a { height: 54px; border-radius: 14px; border: 1px solid #4a453c; color: #fff; display: grid; place-items: center; font-weight: 600; } .gx-look a:hover { border-color: #c79b3b; }
.gx-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 10px 18px; background: #1d1b17; color: #fff; flex-wrap: wrap; }
.gx-top .gx-brand small { color: #bdb5a5; opacity: 1; } .gx-top .gx-login { color: #ead08a; margin-inline-start: auto; }
.gx-guest { font-size: 13px; color: #bdb5a5; }
.gx-main { width: min(1100px, 100%); box-sizing: border-box; margin: 0 auto; padding: 18px 16px 28px; display: flex; flex-direction: column; gap: 14px; }
.gx-h h1 { margin: 0; font-size: 26px; } .gx-h p { margin: 4px 0 0; color: var(--muted); }
.gx-search { display: flex; gap: 8px; flex-wrap: wrap; } .gx-search label { flex: 1 1 240px; display: flex; align-items: center; gap: 8px; height: 48px; background: #fff; border: 1px solid var(--line-2); border-radius: 14px; padding: 0 12px; }
.gx-search input { flex: 1; border: 0; font: inherit; outline: none; min-width: 0; background: none; } .gx-search select { height: 48px; border: 1px solid var(--line-2); border-radius: 14px; padding: 0 10px; font: inherit; background: #fff; }
.gx-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; } .gx-chips button { flex: none; height: 36px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line-2); background: #fff; font: inherit; cursor: pointer; }
.gx-chips button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.gx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.gx-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; }
.gx-ph { position: relative; height: 170px; border: 0; padding: 0; background: var(--surface-3); cursor: pointer; display: grid; place-items: center; }
.gx-ph img { width: 100%; height: 100%; object-fit: cover; } .gx-new { position: absolute; top: 8px; inset-inline-start: 8px; background: var(--ink); color: #fff; border-radius: 8px; padding: 1px 8px; font-size: 12px; }
.gx-cb { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; } .gx-cb b { font-size: 15px; } .gx-cb small { font-size: 12.5px; }
.gx-ver { color: #1f7a4d; font-weight: 600; } .gx-fresh { background: #fff4dd; color: #7a4f00; border-radius: 6px; padding: 0 6px; font-size: 11.5px; font-weight: 600; }
.gx-lockbtn { margin-top: 6px; height: 38px; border-radius: 10px; border: 0; background: var(--gold-soft); color: var(--gold-ink); font: inherit; font-weight: 600; font-size: 13px; display: flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; }
.gx-invite { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: #1d1b17; color: #fff; border-radius: 18px; padding: 16px 18px; margin-top: 6px; }
.gx-invite > span { flex: 1 1 260px; display: flex; flex-direction: column; gap: 4px; } .gx-invite small { color: #d9d2c3; line-height: 1.6; }
.gx-wall { align-items: stretch; } .gx-wall h2 { margin: 0; line-height: 1.5; } .gx-wall p { margin: 0; }
.gx-lock { width: 52px; height: 52px; border-radius: 16px; background: var(--gold-soft); color: var(--gold); display: grid; place-items: center; } .gx-lock .ic { width: 26px; height: 26px; }
.gx-perks { margin: 0; padding: 12px 14px 12px 14px; background: var(--surface-2); border-radius: 14px; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.gx-perks li::before { content: '✓'; color: #1f7a4d; font-weight: 700; margin-inline-end: 8px; }
.gx-prev-ph { width: 100%; max-height: 320px; object-fit: contain; border-radius: 14px; background: var(--surface-3); } .gx-prev h2 { margin: 0; }
.gx-club-h { background: #1d1b17; color: #fff; border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.gx-club-h small { color: #ead08a; font-weight: 600; } .gx-club-h h1 { margin: 0; font-size: 24px; line-height: 1.5; }
.gx-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .gx-counts span { background: #2a2722; border-radius: 12px; padding: 10px; display: flex; flex-direction: column; } .gx-counts b { font-size: 22px; } .gx-counts small { color: #bdb5a5; font-weight: 400; }
.gx-sections { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px; }
.gx-sec { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: flex; gap: 12px; align-items: center; text-align: start; font: inherit; color: inherit; cursor: pointer; }
.gx-sec.col { flex-direction: column; align-items: stretch; cursor: default; } .gx-sec > span:not(.gx-ic) { flex: 1; display: flex; flex-direction: column; gap: 3px; } .gx-sec small { color: var(--ink-2); line-height: 1.6; }
.gx-sec > .ic { color: var(--muted); }
.gx-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; } .gx-ic.danger { background: #fdecea; color: #a1321f; } .gx-ic.info { background: #e8f0f8; color: #23476b; }
.gx-mk { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; } .gx-mk small { color: var(--muted); flex: none; }
.gx-safe { margin: 0; text-align: center; } .gx-cta { align-self: center; width: min(420px, 100%); }
.gx-as { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; background: var(--surface-3); padding: 4px; border-radius: 14px; }
.gx-as a { height: 42px; border-radius: 11px; display: grid; place-items: center; color: var(--ink-2); font-weight: 600; } .gx-as a.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.gx-pending { display: flex; gap: 10px; align-items: flex-start; line-height: 1.7; }
@media (max-width: 640px) { .gx-top { padding: 10px 14px; } .gx-guest { display: none; } .gx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .gx-ph { height: 130px; } }
.gx-fresh { white-space: nowrap; } .gx-soon { margin: 0; color: #d9d2c3; }
.gx-ph { overflow: hidden; flex: none; width: 100%; } .gx-ph img { display: block; }

/* ── v49: operator board, branch board, plan limit ── */
.pf-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; } .pf-kpis.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pf-k { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 3px; }
.pf-k span { font-size: 13px; color: var(--muted); } .pf-k b { font-size: 24px; } .pf-k small { font-size: 12.5px; color: var(--ink-2); }
.pf-k.dark { background: var(--ink); color: #fff; border-color: var(--ink); } .pf-k.dark span { color: #ead08a; } .pf-k.dark small { color: #bdb5a5; }
.pf-k.bad { background: #fff4f2; border-color: #f0c7c0; } .pf-k.bad span, .pf-k.bad b, .pf-k.bad small { color: var(--danger); }
.pf-list { padding: 0; overflow: hidden; } .pf-bar { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.pf-search { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; height: 38px; border: 1px solid var(--line-2); border-radius: 10px; padding: 0 10px; width: min(260px, 100%); }
.pf-search input { border: 0; font: inherit; outline: none; flex: 1; min-width: 0; background: none; } .pf-search .ic { width: 16px; height: 16px; color: var(--muted); }
.pf-head, .pf-row { display: grid; grid-template-columns: 2fr 1.1fr 1.3fr .7fr 1.3fr 1.7fr; gap: 12px; padding: 11px 16px; align-items: center; }
.pf-head { font-size: 12.5px; color: var(--muted); background: var(--surface-2); } .pf-row { border-top: 1px solid var(--line); font-size: 14px; }
.pf-row > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .pf-row .badge { align-self: flex-start; }
.pf-n a { color: var(--ink); } .pf-n small { color: var(--muted); font-size: 12.5px; } .pf-full { color: #7a4f00; font-weight: 700; }
.pf-use { flex-direction: row !important; align-items: center; gap: 8px !important; } .pf-use i { flex: 1; height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.pf-use i b { display: block; height: 100%; background: var(--gold); } .pf-use small { white-space: nowrap; font-size: 12px; }
.pf-acts { flex-direction: row !important; gap: 6px !important; justify-content: flex-end; flex-wrap: wrap; }
.pf-two { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 14px; } .pf-two h2 { margin-top: 0; }
.pf-bad { color: var(--danger); } .pf-ok { color: #1f6f4a; font-weight: 600; }
.pf-pays { display: flex; flex-direction: column; } .pf-pays > span { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.pf-pays > span:first-child { border-top: 0; } .pf-pays > span > span { display: flex; flex-direction: column; }
.pf-months { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pf-months button { height: 64px; border-radius: 14px; border: 1px solid var(--line-2); background: #fff; font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.pf-months button.on { background: var(--ink); color: #fff; border-color: var(--ink); } .pf-months small { font-size: 12px; }
.pf-planopt { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; } .pf-planopt > span { display: flex; flex-direction: column; }
.dh-scope { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; align-items: center; }
.dh-scope button { height: 32px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line-2); background: #fff; font: inherit; font-size: 13px; cursor: pointer; }
.dh-scope button.on { background: var(--ink); color: #fff; border-color: var(--ink); } .dh-scope a { font-size: 13px; font-weight: 600; margin-inline-start: 4px; }
.bb-total { background: var(--ink); color: #fff; border-radius: 20px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.bb-total > span { color: #ead08a; font-size: 13px; } .bb-total b { font-size: 32px; } .bb-total b small { font-size: 15px; font-weight: 500; } .bb-total > small { color: #bdb5a5; }
.bb-total .up { color: #7fd1a5; } .bb-total .down { color: #ffb4a8; }
.bb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-bottom: 12px; }
.bb-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 10px; } .bb-card.warn { border-color: #ead08a; }
.bb-name { font-size: 17px; } .bb-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.bb-nums > span { display: flex; flex-direction: column; gap: 1px; } .bb-nums small { font-size: 11.5px; color: var(--muted); } .bb-nums b { font-size: 17px; }
.bb-nums .up { color: #1f6f4a; } .bb-nums .down { color: var(--danger); }
.bb-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--ink-2); }
.bb-alert { font-size: 12.5px; background: #fff4dd; color: #7a4f00; border-radius: 10px; padding: 6px 10px; } .bb-card .btn { align-self: flex-start; }
.pl-sheet { align-items: stretch; } .pl-sheet h2 { margin: 0; } .pl-sheet p { margin: 0; }
.pl-cmp { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .pl-cmp > div { border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.pl-cmp > div.on { border: 2px solid var(--gold-hi); background: #fbf6ea; } .pl-cmp small { color: var(--muted); font-size: 12px; }
@media (max-width: 900px) { .pf-kpis, .pf-kpis.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pf-two { grid-template-columns: minmax(0, 1fr); }
  .pf-head { display: none; } .pf-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .pf-acts { grid-column: 1 / -1; justify-content: flex-start; } }
.bb-nums small { overflow-wrap: anywhere; }
.bb-grid { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }

/* v50: مساحة المورد */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.grow { flex: 1; min-width: 0; }
.tr-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.tr-kpis .dh-kpi b { font-size: 24px; } .tr-kpis .dh-kpi.main b { font-size: 28px; }
.tr-owe { background: var(--gold-soft); border-color: #ecd9a8; color: inherit; }
a.tr-owe:hover { border-color: var(--gold-hi); color: inherit; }
.tr-empty { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; border: 1px dashed var(--gold-hi); }
.tr-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); color: inherit; }
.tr-row .grow { display: flex; flex-direction: column; }
.tr-click { cursor: pointer; } .tr-click:hover td { background: var(--surface-2); }
.tr-void td { color: var(--faint); } .tr-void td b { text-decoration: line-through; }
.ok-t { color: var(--ok); }
.tr-flow { background: var(--ink); color: #efe9dc; border-radius: var(--radius); padding: 14px 20px; display: flex; flex-wrap: wrap; gap: 10px 30px; align-items: center; font-size: 14px; margin-top: 14px; }
.tr-flow > b { color: #ead08a; }
.tr-bar { display: inline-block; width: 70px; height: 7px; border-radius: 7px; background: var(--surface-3); overflow: hidden; vertical-align: middle; margin-left: 6px; }
.tr-bar.wide { width: 100%; height: 8px; margin: 4px 0; } .tr-bar i { display: block; height: 100%; background: var(--gold); }
.tr-bar.near i { background: var(--warn); } .tr-bar.over i { background: var(--danger); }
.tr-age { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; text-align: center; font-size: 12.5px; }
.tr-age span { background: var(--surface-3); border-radius: 8px; padding: 6px 2px; display: flex; flex-direction: column; color: var(--muted); }
.tr-age span b { font-size: 14px; color: var(--ink); } .tr-age .warn { background: var(--warn-soft); } .tr-age .bad { background: var(--danger-soft); }
.tr-inv { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.tr-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.tr-shopnow { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; }
.tr-scan { border-style: dashed; border-color: #c9b98f; background: #fffcf4; }
.tr-results { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow: auto; }
.tr-res { display: flex; justify-content: space-between; gap: 10px; text-align: right; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 10px 12px; cursor: pointer; min-height: 44px; }
.tr-res:hover { border-color: var(--gold-hi); background: var(--gold-soft); }
.tr-rate { width: 100px; text-align: center; padding: 6px 8px; }
.tr-totals { display: flex; flex-wrap: wrap; gap: 8px 26px; justify-content: flex-end; font-size: 14px; padding-top: 6px; }
.tr-pay { position: sticky; top: calc(var(--top-h) + 12px); }
.tr-ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
.tr-ways button { padding: 9px 4px; }
.tr-sub { background: var(--surface-2); border-radius: 10px; padding: 10px; }
.tr-after { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.tr-after > span { display: flex; justify-content: space-between; gap: 10px; } .tr-after .sep { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; }
.tr-after1 { font-size: 14px; padding: 4px 2px; }
.tr-collect { max-width: 520px; margin: 0 auto; }
.tr-big { font-size: 22px; font-weight: 700; min-height: 54px; }
.tr-alloc { display: flex; flex-direction: column; gap: 6px; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; }
.tr-biz { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.tr-biz button { text-align: right; border: 2px solid var(--line); background: var(--surface); border-radius: 12px; padding: 12px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; font: inherit; }
.tr-biz button span { font-size: 13px; color: var(--muted); line-height: 1.6; } .tr-biz button.on { border-color: var(--gold); background: var(--gold-soft); }
@media (max-width: 1100px) { .tr-inv { grid-template-columns: 1fr; } .tr-pay { position: static; } }
@media (max-width: 900px) { .tr-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tr-biz { grid-template-columns: 1fr; } }
@media print { .tr-click:hover td { background: none; } }
.tr-collect label:not(.row), .tr-pay label:not(.row) { display: flex; flex-direction: column; gap: 4px; }
.tr-collect .sub, .tr-pay .sub { display: block; }
td.nowrap, .nowrap { white-space: nowrap; }
@media (max-width: 900px) { .tr-main form.row { flex-wrap: wrap; } .tr-main form.row label.grow { flex-basis: 100%; } }

/* 051: lifetime */
.pf-k.gold { background: var(--gold-soft); border-color: #ecd9a8; }
.pf-sub { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.pf-fee .row { padding: 4px 0; } .pf-fee .row.wrap { margin-top: 8px; }
.sub-life { background: var(--ink); color: #efe9dc; border-radius: 16px; padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }
.sub-life small { color: #ead08a; } .sub-life b { font-size: 26px; } .sub-life .sub { color: #bdb3a0; }
.sub-fee { background: var(--gold-soft); border-color: #ecd9a8; } .sub-fee .row { padding: 3px 0; }
.grid[hidden], .pf-sub [hidden] { display: none !important; }

/* ── v52: البيع من غير نت ── */
#netbar { position: fixed; top: 0; inset-inline: 0; z-index: 90; display: flex; align-items: center; gap: 10px; padding: 8px 16px; min-height: 44px; box-sizing: border-box;
  font-size: 14px; background: #3a2f17; color: #f5e7c4; flex-wrap: wrap; }
#netbar[hidden] { display: none; }
#netbar.ok { background: #e5f1e6; color: #1f4d29; }
#netbar.warn { background: #fff1cc; color: #4f3a0b; }
#netbar .ic { width: 20px; height: 20px; flex: none; }
#netbar .nb-t { flex: 1 1 260px; min-width: 0; }
#netbar .nb-pill { background: var(--gold, #a47a1e); color: #fff; border-radius: 99px; padding: 4px 12px; font-weight: 700; white-space: nowrap; }
#netbar .btn.sm { min-height: 34px; }
body.has-netbar { padding-top: var(--nb, 44px); }
body.has-netbar .side, body.has-netbar .top { top: var(--nb, 44px); }
body.has-netbar .side { height: calc(100vh - var(--nb, 44px)); }
body.has-netbar .pos .panel { top: calc(var(--top-h) + var(--nb, 44px) + 16px); }
.off-pos .panel .total-row.big { font-size: 20px; }
.off-q .row { font-size: 14px; }
.off-conf .alert { margin: 0; }
.kpi.danger .value { color: var(--danger); }

/* ── v53: شهادة القطعة ── */
.cert-block { margin-top: 12px; padding: 10px; border: 1.5px solid var(--gold, #a47a1e); border-radius: 12px; display: flex; flex-direction: column; gap: 6px; }
.cert-block .sub { font-size: 12px; }
.cert-qrs { display: flex; flex-wrap: wrap; gap: 10px; }
.cert-qr { display: flex; align-items: center; gap: 8px; font-size: 12px; line-height: 1.5; }
.cert-qr .qr { width: 84px; height: 84px; flex: none; display: block; }
.cert-qr .qr svg { width: 100%; height: 100%; display: block; }
.cert-line { grid-column: 1 / -1; display: flex; gap: 8px; align-items: flex-start; background: #eef6ef; color: #1f4d29; border-radius: 10px; padding: 8px 10px; font-size: 13px; line-height: 1.7; }
.cert-line.bad { background: #fbecea; color: #6d2416; }
.cert-line .ic { flex: none; width: 18px; height: 18px; margin-top: 3px; }
.cert-line .btn { margin-inline-start: auto; }
.danger-t { color: var(--danger, #a3341f); }
@media print { .cert-qr .qr { width: 26mm; height: 26mm; } }

/* ── v54: قارن محلك بالسوق ── */
.mk-join { max-width: 720px; }
.mk-table td { vertical-align: middle; }
.mk-bar { position: relative; display: block; height: 10px; border-radius: 99px; background: var(--surface-3, #efe9dc); margin-bottom: 4px; width: 100%; max-width: 260px; }
@media (min-width: 901px) { .mk-bar { min-width: 160px; } }
.mk-band { position: absolute; top: 0; bottom: 0; border-radius: 99px; background: #d9c38d; }
.mk-me { position: absolute; top: -4px; width: 4px; height: 18px; border-radius: 2px; background: var(--ink, #1d1b17); margin-inline-start: -2px; }
.mk-table .sub { white-space: normal; display: block; overflow-wrap: anywhere; }

/* ── v56: العين ── */
.eye-list { gap: 10px; }
.eye-card { display: flex; flex-direction: column; gap: 4px; text-align: start; cursor: pointer; font: inherit; color: inherit; width: 100%; }
.eye-card.high { border-color: #f1c9c4; } .eye-card.review { border-color: #ecd9a8; }
.eye-body { font-size: 14px; line-height: 1.75; color: var(--ink-2, #4a443a); }
.eye-ev { padding: 8px 0; border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.eye-ev:first-child { border-top: 0; }

/* v57: المساعد */
.ast { height: calc(100dvh - var(--top-h) - 170px); }
.ast-a p { line-height: 1.85; }
.msg.mine.ast-q { background: var(--ink, #1d1b17); border-color: var(--ink, #1d1b17); } .msg.mine.ast-q p { color: #efe9dc; }
.ast-src { display: block; font-size: 12.5px; color: var(--muted); margin: 4px 0 2px; } .ast-src a { color: var(--gold-ink, #7a5a12); }
.ast-prop { align-self: flex-end; max-width: min(88%, 480px); display: flex; flex-direction: column; gap: 8px; margin: 2px 0 4px; padding: 10px; border-radius: 12px; background: #fff8e8; border: 1px solid #ecd9a8; }
.ast-prop .btn { min-height: 44px; flex: 1; } .ast-prop.done { background: var(--surface-2); border-color: var(--line); }
.ast-wait p { color: var(--muted); animation: astPulse 1.2s ease-in-out infinite; } @keyframes astPulse { 50% { opacity: .45; } }
.ast-chips { display: flex; gap: 6px; padding: 8px 10px 0; overflow-x: auto; background: #fff; border-top: 1px solid var(--line); scrollbar-width: none; }
.ast-chips .chip { white-space: nowrap; min-height: 36px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line); background: #fff; font: inherit; font-size: 13px; cursor: pointer; }
.ast-list { margin: 0; padding-inline-start: 20px; line-height: 1.9; }
@media (prefers-reduced-motion: reduce) { .ast-wait p { animation: none; } }

/* v59: مركز الدهب */
.gold-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 12px; align-items: start; }
.gold-hero { background: #1d1b17; color: #efe9dc; border-color: #1d1b17; display: flex; flex-direction: column; gap: 6px; }
.gold-hero > span { color: #cbbf9f; font-size: 13.5px; } .gold-hero > span b { color: #efe9dc; }
.gold-hero > b { font-size: 34px; line-height: 1.2; } .gold-hero small { font-size: 15px; font-weight: 500; color: #cbbf9f; }
.gold-row { padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.gold-note { background: #fff8e8; border-color: #ecd9a8; display: flex; flex-direction: column; gap: 2px; line-height: 1.8; }
.gold-bar { height: 12px; border-radius: 99px; overflow: hidden; background: #4a6b8a; } .gold-bar span { display: block; height: 100%; background: #a47a1e; }
.gold-chart { width: 100%; height: 110px; display: block; }
.gold-periods { gap: 6px; } .gold-periods .chip { min-height: 38px; flex: 1; } .gold-periods .chip.on { background: var(--ink, #1d1b17); color: #fff; border-color: var(--ink, #1d1b17); }
.gold-target { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 12px; line-height: 1.8; background: #eef6ef; border: 1px solid #cfe3d1; }
.gold-target.over, .gold-target.under { background: #fff8e8; border-color: #ecd9a8; }
.gold-row .ok-t { color: #1f5a2c; }

/* v60: حساب المورد */
.sup-terms { align-items: center; gap: 8px; } .sup-terms .chip.on { background: #fff1cc; color: #6b4700; border-color: #ecd9a8; font-weight: 600; }
.sup-st { display: grid; gap: 12px; }
.sup-st .card > b:first-child { display: block; margin-bottom: 8px; font-size: 15px; }
.sup-before { background: #efe9dc; border-color: #e0d6c2; } .sup-before .row, .sup-now .row { padding: 4px 0; }
.sup-now { background: #1d1b17; color: #efe9dc; border-color: #1d1b17; }
.btn.wa { background: #1f7a4d; border-color: #1f7a4d; color: #fff; }
@media print { .sup-now { background: #fff; color: #000; border: 2px solid #000; } .sup-before { background: #fff; } }

/* v61: مصنعية المورد + مكسبك */
.cp-box { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 12px; gap: 8px; }
.cp-box legend { padding: 0 6px; } .cp-box label.row { gap: 8px; align-items: flex-start; line-height: 1.7; }
.cp-box input[type=radio] { margin-top: 6px; accent-color: #a47a1e; }

/* v62: المورد بيكسّبك ولا لا */
.sup-rank { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 12px; }
.sup-card { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: inherit; }
.sup-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; font-size: 12px; color: var(--muted); }
.sup-kpis b { display: block; font-size: 15px; color: var(--ink); margin-top: 2px; }
.sup-bar { height: 8px; border-radius: 99px; background: #efe9dc; overflow: hidden; } .sup-bar span { display: block; height: 100%; background: #a47a1e; }

/* v63: فاتورة البيع الملونة */
@font-face { font-family: "Amiri"; src: url(/fonts/amiri-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
.inv { --d: #1d1b17; --a: #c9a24a; --s: #fbf3df; --i: #6b4a0d; background: #fffdf8; color: #1d1b17; font-family: inherit; display: flex; flex-direction: column; border-radius: 8px; overflow: hidden;
  -webkit-print-color-adjust: exact; print-color-adjust: exact; font-size: 12px; position: relative; }
.inv-head { background: var(--d); color: #fff; padding: 18px 22px 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 4px solid var(--a); }
.inv-shop { display: flex; gap: 12px; align-items: center; min-width: 0; } .inv-shop > span { display: flex; flex-direction: column; min-width: 0; }
.inv-logo { width: 52px; height: 52px; object-fit: contain; background: #fff; border-radius: 10px; padding: 4px; }
.inv-mark { width: 52px; height: 52px; border-radius: 12px; background: var(--a); color: var(--d); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 22px; flex: none; }
.inv-name { font-family: 'Amiri', 'Plex Arabic', serif; font-weight: 700; font-size: 24px; line-height: 1.15; } .inv-shop small { font-size: 11px; opacity: .85; }
.inv-no { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; } .inv-no b { font-size: 20px; color: var(--a); } .inv-no small { font-size: 11px; opacity: .85; }
.inv-void { position: absolute; top: 90px; left: 50%; transform: translateX(-50%) rotate(-12deg); border: 3px solid #a3341f; color: #a3341f; font-size: 28px; font-weight: 700; padding: 2px 18px; border-radius: 8px; opacity: .8; }
.inv-meta { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 22px 6px; color: #4a443a; } .inv-meta b { color: #1d1b17; }
.inv-tbl { width: calc(100% - 44px); margin: 4px 22px 0; border-collapse: separate; border-spacing: 0; }
.inv-tbl th { background: var(--s); color: var(--i); font-size: 11px; text-align: start; padding: 7px 8px; } .inv-tbl th:first-child { border-radius: 0 8px 8px 0; } .inv-tbl th:last-child { border-radius: 8px 0 0 8px; text-align: end; }
.inv-tbl td { padding: 9px 8px; border-bottom: 1px solid #eee6d6; vertical-align: top; } .inv-tbl td:last-child { text-align: end; }
.inv-tbl td small { display: block; color: #6b6355; font-size: 10.5px; } .inv-tbl .inv-in td { color: #4a443a; }
.inv-sum { display: flex; gap: 14px; align-items: flex-start; padding: 14px 22px 0; }
.inv-notes { flex: 1; display: flex; flex-direction: column; gap: 4px; color: #4a443a; } .inv-notes b { color: #1d1b17; }
.inv-total { width: 190px; flex: none; border-radius: 12px; background: var(--d); color: #fff; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; border: 2px solid var(--a); }
.inv-total b { font-size: 26px; color: var(--a); line-height: 1.15; } .inv-total small { font-size: 11px; opacity: .85; }
.inv-cert { margin: 14px 22px 0; padding: 10px 12px; border: 1px dashed var(--a); border-radius: 12px; display: flex; gap: 12px; align-items: center; background: var(--s); color: var(--i); font-size: 11.5px; line-height: 1.7; }
.inv-qrs { display: flex; gap: 6px; } .inv-qrs .qr { width: 60px; height: 60px; background: #fff; border-radius: 4px; display: block; }
.inv-qrs .qr svg, .inv-qrs .qr img, .inv-qrs .qr canvas { width: 100%; height: 100%; }
.inv-foot { margin-top: 16px; padding: 10px 22px 14px; display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; font-size: 10.5px; color: #6b6355; border-top: 1px solid #eee6d6; }
.inv-foot b { font-family: 'Amiri', serif; font-weight: 700; font-size: 16px; color: var(--i); }
.inv-preview { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; max-width: 560px; }
.inv-swatches { display: flex; gap: 8px; flex-wrap: wrap; } .inv-sw { cursor: pointer; } .inv-sw input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.inv-sw span { display: block; width: 52px; height: 44px; border-radius: 10px; border: 2px solid var(--line); } .inv-sw input:checked + span { border: 3px solid #a47a1e; box-shadow: 0 0 0 2px #fff inset; }
.inv-sw input:focus-visible + span { outline: 2px solid #a47a1e; outline-offset: 2px; }
#invPrint { display: none; }
@media print {
  body.print-invoice #root, body.print-invoice .toasts, body.print-invoice #overlay { display: none !important; }
  body.print-invoice { background: #fff; margin: 0; }
  body.print-invoice #invPrint { display: block; } body.print-invoice #invPrint .inv { border-radius: 0; min-height: calc(100vh - 1px); }
}
@media screen and (max-width: 560px) { .inv-sum { flex-direction: column; } .inv-total { width: 100%; box-sizing: border-box; } }

/* v65: المصانع والماركات */
.mk-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.mk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.mk-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.mk-stats > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mk-stats b { font-size: 16px; }
@media (max-width: 640px) { .mk-grid { grid-template-columns: minmax(0, 1fr); } .mk-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pur-tbl select.input { min-width: 150px; }
/* v66: نوع الدهب */
.org-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; }
.org-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; align-items: center; gap: 8px; }
@media (max-width: 640px) { .org-grid { grid-template-columns: minmax(0, 1fr); } }
.pur-tbl select.org-sel { min-width: 110px; }
/* v67: تعديل القطع */
.fx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.fx-diff { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; align-items: baseline; }
.fx-ok { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
@media (max-width: 640px) { .fx-grid { grid-template-columns: minmax(0, 1fr); } }

/* v68: الفاتورة الإلكترونية */
.er-block { margin-top: 12px; border-top: 1px dashed var(--line, #ddd); padding-top: 10px; display: grid; gap: 8px; }
.er-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.er-body { display: flex; gap: 10px; align-items: center; }
.er-qr { width: 96px; height: 96px; flex: none; display: block; } .er-qr svg { width: 100%; height: 100%; }
.er-uuid { font-size: 11px; direction: ltr; unicode-bidi: isolate; }
.er-err { color: var(--danger); font-size: 13px; overflow-wrap: anywhere; }
.er-start { margin-top: 12px; align-items: center; }
.er-form { margin-top: 12px; padding: 12px; border: 1px solid var(--line, #ddd); border-radius: 12px; background: var(--surface-2, #faf8f3); }
.er-branch { border-top: 1px solid var(--line, #eee); padding-top: 12px; }
@media print { .er-block .badge { border: 1px solid #000; background: none; color: #000; } }

/* v69: وجّهني */
.gf-guide { position: fixed; bottom: 20px; left: 20px; z-index: 29; display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px 10px 14px; border-radius: 999px;
  border: 0; background: var(--ink, #1d1b17); color: #fff; box-shadow: 0 10px 30px rgba(26,25,22,.28); cursor: pointer; font: inherit; }
.gf-guide svg { width: 22px; height: 22px; color: var(--gold, #c9a24a); }
.gf-guide span { display: grid; text-align: start; line-height: 1.15; } .gf-guide b { font-size: 15px; } .gf-guide small { font-size: 11px; opacity: .75; }
.gf-guide:focus-visible { outline: 3px solid var(--gold, #c9a24a); outline-offset: 3px; }
body.has-guide .toasts { bottom: 84px; }
@media (max-width: 900px) { .gf-guide { bottom: calc(76px + env(safe-area-inset-bottom)); left: 12px; padding: 8px 14px 8px 12px; } body.has-guide .toasts { bottom: calc(140px + env(safe-area-inset-bottom)); } }
@media print { .gf-guide, .gf-coach { display: none !important; } }
.gd { display: grid; gap: 14px; } .gd h2 { margin: 0; } .gd > .sub { margin: -6px 0 0; }
.gd-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.gd-steps li { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line, #e7e2d6); border-radius: 14px; background: #fff; }
.gd-steps li.done { opacity: .62; } .gd-steps li.now { border-color: var(--gold, #c9a24a); background: var(--gold-soft, #fbf3df); }
.gd-dot { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--surface-2, #f3efe6); color: var(--ink, #1d1b17); }
.gd-steps li.done .gd-dot { background: var(--ok-soft, #e6f4ea); color: var(--ok, #1e7b45); } .gd-dot svg { width: 16px; height: 16px; }
.gd-steps li.now .gd-dot { background: var(--ink, #1d1b17); color: #fff; }
.gd-t { flex: 1; display: grid; gap: 3px; min-width: 0; } .gd-t small { color: var(--muted, #6b665c); font-size: 12px; display: flex; align-items: center; gap: 6px; }
.gd-bar { display: inline-block; width: 90px; height: 6px; border-radius: 6px; background: var(--surface-2, #eee); overflow: hidden; } .gd-bar i { display: block; height: 100%; background: var(--gold, #c9a24a); }
.gd-help { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--surface-2, #f6f3ec); }
.gd-help > svg { width: 22px; height: 22px; flex: none; } .gd-help > span { flex: 1; display: grid; gap: 2px; } .gd-help small { color: var(--muted, #6b665c); }
@media (max-width: 520px) { .gd-help { flex-wrap: wrap; } .gd-help .btn { width: 100%; } }
.gf-coach-on { outline: 3px solid var(--gold, #c9a24a) !important; outline-offset: 3px; border-radius: 10px; animation: gfPulse 1.6s ease-in-out infinite; position: relative; z-index: 2; }
@keyframes gfPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(201,162,74,.55); } 50% { box-shadow: 0 0 0 10px rgba(201,162,74,0); } }
@media (prefers-reduced-motion: reduce) { .gf-coach-on { animation: none; } }
.gf-coach { position: fixed; z-index: 35; max-width: min(320px, calc(100vw - 16px)); display: flex; gap: 10px; align-items: flex-start; padding: 12px 12px 12px 14px;
  border-radius: 14px; background: var(--ink, #1d1b17); color: #fff; font-size: 14px; line-height: 1.5; box-shadow: 0 12px 32px rgba(26,25,22,.3); }
.gf-coach::before { content: ''; position: absolute; top: -7px; left: calc(var(--ax, 50%) - 7px); width: 14px; height: 14px; background: inherit; transform: rotate(45deg); border-radius: 3px; }
.gf-coach.up::before { top: auto; bottom: -7px; }
.gf-coach span { flex: 1; } .gf-coach button { flex: none; border: 0; background: rgba(255,255,255,.14); color: #fff; width: 26px; height: 26px; border-radius: 50%; cursor: pointer; font-size: 16px; line-height: 1; }
.pf-start { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 4px; }

/* v70: قارئ RFID */
.rf-kpis { display: flex; gap: 10px; } .rf-kpis span { display: grid; text-align: center; padding: 10px 16px; border-radius: 12px; background: var(--surface-2, #f6f3ec); min-width: 110px; }
.rf-kpis b { font-size: 22px; } .rf-kpis small { color: var(--muted, #6b665c); font-size: 12px; } .rf-kpis .warn { background: var(--warn-soft, #fff4dc); }
.rf-code { direction: ltr; unicode-bidi: isolate; font-size: 13px; overflow-wrap: anywhere; max-width: 260px; }
.rf-steps { display: flex; gap: 8px; flex-wrap: wrap; } .rf-steps span { padding: 8px 14px; border-radius: 999px; background: var(--surface-2, #f3efe6); color: var(--muted, #6b665c); font-size: 14px; }
.rf-steps span.on { background: var(--ink, #1d1b17); color: #fff; } .rf-steps span.done { background: var(--ok-soft, #e6f4ea); color: var(--ok, #1e7b45); }
.rf-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rf-log li { display: flex; gap: 8px; align-items: flex-start; padding: 8px 12px; border-radius: 10px; font-size: 14px; background: var(--ok-soft, #e6f4ea); }
.rf-log li.bad { background: var(--danger-soft, #fdecec); } .rf-log svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
body.has-guide .content { padding-bottom: 96px; }   /* the guide button never sits over the last field */

/* v71: تطبيق المحل */
.sapp-o.is-new { border-color: var(--gold, #c9a24a); box-shadow: 0 0 0 2px rgba(201,162,74,.18); }
.sapp-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; } .sapp-items li { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.sapp-qr { width: 120px; height: 120px; flex: none; display: block; } .sapp-qr svg { width: 100%; height: 100%; }
.sapp-link { overflow-wrap: anywhere; direction: ltr; unicode-bidi: isolate; font-size: 13px; color: var(--gold-ink, #6b4a0d); }
.kpi.warn { background: var(--warn-soft, #fff4dc); }
/* v72: a shop app that is still off says so, with one button */
.sapp-off { border: 1px solid color-mix(in srgb, var(--gold, #b08d4a) 45%, transparent); background: color-mix(in srgb, var(--gold, #b08d4a) 7%, var(--card, #fff)); }
.sapp-off-ic { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--gold, #b08d4a) 18%, transparent); color: var(--gold, #b08d4a); flex: none; }
.sapp-off .btn.lg { min-height: 50px; font-size: 16px; }
.sapp-switch input { width: 20px; height: 20px; }

/* v77: where the discount stands — one box under the agreed amount */
.pos-disc { display: flex; flex-direction: column; gap: 6px; border-radius: 14px; padding: 12px 14px; font-size: 13.5px; line-height: 1.6; border: 1px solid transparent; }
.pos-disc.ok { flex-direction: row; align-items: center; gap: 8px; background: var(--ok-soft); color: var(--ok); }
.pos-disc.need { background: var(--warn-soft); color: #5c3d00; border-color: #f0dcae; }
.pos-disc.need > b { color: var(--warn); font-size: 14.5px; }
.pos-disc.bad { background: var(--danger-soft); color: var(--danger); border-color: #f2cdc8; }
.pos-disc .row { gap: 8px; margin-top: 4px; }
/* v77: customer profile */
.cust-more { border: 1px dashed var(--line-2); border-radius: 12px; padding: 10px 12px; }
.cust-more > summary { cursor: pointer; font-weight: 600; color: var(--gold-ink); font-size: 13.5px; }
.cust-more[open] > summary { margin-bottom: 10px; }
.cust-more .vip-row { gap: 8px; margin-bottom: 10px; }
.badge.vip { font-weight: 700; }
.cust-chips { gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.occ-list { display: grid; gap: 8px; }
.occ { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.occ > div { flex: 1; min-width: 0; }
.occ-ic { font-size: 22px; }
/* v77: language */
.lang-btn { min-width: 40px; height: 36px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 700; font-size: 13px; cursor: pointer; font-family: inherit; }
.lang-btn.on-dark { background: transparent; color: #e9d3a0; border-color: rgba(233,211,160,.4); margin-inline-start: auto; }
.brand:has(.lang-btn) { display: flex; align-items: center; gap: 12px; }
/* English reads left to right — the whole layout follows (the sheet is mostly logical properties) */
html[dir=ltr] body { direction: ltr; }
html[dir=ltr] .toasts { left: auto; right: 20px; }
html[dir=ltr] th, html[dir=ltr] .tr-res, html[dir=ltr] .tr-biz button { text-align: left; }
html[dir=ltr] .perks li { padding-right: 0; padding-left: 28px; } html[dir=ltr] .perks li::before { right: auto; left: 4px; }
html[dir=ltr] .gf-guide { left: auto; right: 20px; }
@media (max-width: 900px) { html[dir=ltr] .gf-guide { left: auto; right: 12px; } }
@media (max-width: 720px) { html[dir=ltr] table.rt td, html[dir=ltr] table.rt td.n, html[dir=ltr] table.rt td.num { text-align: left; } }

/* v79: RFID readers */
.rd-kpis { display: flex; gap: 10px; flex-wrap: wrap; }
.rd-kpis span { display: grid; text-align: center; padding: 10px 16px; border-radius: 12px; background: var(--surface-2); min-width: 110px; }
.rd-kpis b { font-size: 22px; } .rd-kpis small { color: var(--muted); font-size: 12px; }
.rd-kpis .ok { background: var(--ok-soft); color: var(--ok); } .rd-kpis .warn { background: var(--warn-soft); color: var(--warn); }
.rd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.rd { border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: grid; gap: 8px; background: var(--surface); transition: border-color .3s var(--ease), box-shadow .3s var(--ease); }
.rd.on { border-color: #bfe0cb; box-shadow: 0 0 0 3px var(--ok-soft); }
.rd-stats { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); } .rd-stats b { color: var(--ink); }
.rd-empty { display: grid; gap: 4px; padding: 18px; border: 1px dashed var(--line-2); border-radius: 14px; text-align: center; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-inline-end: 6px; vertical-align: middle; animation: rd-pulse 1.6s ease-in-out infinite; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); animation: rd-pulse 1.2s ease-in-out infinite; }
@keyframes rd-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.8); } }
@media (prefers-reduced-motion: reduce) { .dot, .pulse { animation: none; } }
.sig { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; vertical-align: middle; margin-inline-start: 4px; }
.sig i { width: 4px; border-radius: 1px; background: var(--line-2); } .sig i:nth-child(1) { height: 25%; } .sig i:nth-child(2) { height: 50%; } .sig i:nth-child(3) { height: 75%; } .sig i:nth-child(4) { height: 100%; }
.sig i.on { background: var(--ok); }
.rd-livebox { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: grid; gap: 10px; background: var(--surface-2); }
.rd-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 320px; overflow: auto; }
.rd-feed li { display: flex; gap: 12px; align-items: center; padding: 6px 10px; border-radius: 10px; background: var(--surface); font-size: 14px; animation: rd-in .35s var(--ease); }
.rd-feed time { margin-inline-start: auto; color: var(--muted); font-size: 12px; }
@keyframes rd-in { from { opacity: 0; transform: translateY(-4px); } }
.rd-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.rd-choice { text-align: start; display: grid; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; font: inherit; transition: border-color .2s, box-shadow .25s var(--ease), transform .2s var(--ease); }
.rd-choice:hover { border-color: var(--gold-hi); box-shadow: 0 0 0 3px var(--gold-soft); transform: translateY(-1px); }
.rd-choice span { color: var(--muted); font-size: 13px; } .rd-choice small { color: var(--gold-ink); font-size: 11.5px; direction: ltr; text-align: start; }
.rd-zones { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.rd-zone { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.rd-zone input { justify-self: start; } .rd-zone span { color: var(--muted); font-size: 12.5px; }
.rd-zone:has(input:checked) { border-color: var(--gold-hi); background: var(--gold-soft); }
.copy { display: flex; gap: 8px; align-items: center; } .copy code { flex: 1; min-width: 0; overflow-wrap: anywhere; direction: ltr; text-align: left; background: var(--surface-3); padding: 8px 10px; border-radius: 8px; font-size: 13px; }
.rd-pre { direction: ltr; text-align: left; background: #1d1b17; color: #f3e6c4; padding: 12px; border-radius: 10px; font-size: 12.5px; overflow: auto; margin: 0; }

/* v80: the live gold price, the held price, and the barcode field on a phone */
.live-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: #2f7a4f; background: #e6f4ec; border-radius: 99px; padding: 3px 10px; }
.live-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: liveBeat 1.6s ease-in-out infinite; }
.live-dot.off { color: #8a6d1e; background: var(--gold-soft); } .live-dot.off::before { animation: none; }
@keyframes liveBeat { 50% { opacity: .3; } }
.pos-rates i.up, .pos-rates i.down { font-style: normal; font-size: 10px; margin-inline-start: 3px; }
.pos-rates i.up { color: #2f7a4f; } .pos-rates i.down { color: var(--danger); }
.pos-rates span.flash { animation: rateFlash 1.2s ease-out; }
@keyframes rateFlash { from { background: #fff3cf; } }
.pos-hold:empty { display: none; }
.pos-hold { margin-top: 6px; }
.hold-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--gold-ink); background: var(--gold-soft); border: 1px solid var(--gold-hi); border-radius: 99px; padding: 3px 10px; }
.hold-chip.end { color: var(--danger); border-color: var(--danger); background: #fdeeea; }
.live-now { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-bottom: 10px; font-size: 13.5px; }
.live-now .bad, .live-card .bad { color: var(--danger); }
.live-card h2 { display: flex; align-items: center; gap: 8px; }
.live-spot { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 10px 14px; border-radius: 12px; background: var(--surface-3); font-size: 13.5px; }
.live-rules .sm-in { width: 96px; height: 36px; }
@media (prefers-reduced-motion: reduce) { .live-dot::before, .pos-rates span.flash { animation: none; } }

/* the barcode field: one frame (the field's own ring and the guide's highlight go on the frame, not inside it) */
.pos-search input { align-self: stretch; height: auto; }
.pos-search input:focus, .pos-search input:focus-visible { outline: none; box-shadow: none; }
.pos-search:focus-within { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(195,154,62,.28); }
.pos-search input.gf-coach-on { outline: none !important; animation: none; border-radius: 0; }
.pos-search:has(.gf-coach-on) { outline: 3px solid var(--gold, #c9a24a); outline-offset: 3px; animation: gfPulse 1.6s ease-in-out infinite; }
@media (max-width: 700px) {
  /* the scan field first, right under the bar, and it stays there while the invoice grows */
  .pos-find { position: sticky; top: var(--top-h); z-index: 6; background: var(--bg); padding-block: 8px; margin-block: -8px 4px; }
  body.has-netbar .pos-find { top: calc(var(--top-h) + var(--nb, 44px)); }
  .pos-find .pos-search { height: 52px; }
  .pos-tools { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; width: 100%; padding-bottom: 2px; }
  .pos-tools::-webkit-scrollbar { display: none; }
  .pos-tools > * { flex: none; min-height: 44px; }
  .pos-tools .pos-seller { flex: 1 1 auto; min-width: 0; }
  .pos-tools .pos-seller > span:not(.avatar) { min-width: 0; } .pos-tools .pos-seller b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
  .pos-head h1 { font-size: 22px; }
}
@media (max-width: 700px) { .pos-rates > span.live-dot { display: inline-flex !important; } }

/* v82: the Kuwaiti sales invoice (A4, ministry layout, prints in black and white) */
.kw-inv { background: #fff; color: #111; font-size: 12.5px; line-height: 1.45; padding: 6mm 7mm; display: flex; flex-direction: column; gap: 9px; position: relative; }
.kw-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.kw-shop { display: grid; gap: 2px; text-align: center; flex: 1; } .kw-shop b { font-size: 26px; font-weight: 800; } .kw-shop small { font-size: 12px; color: #444; }
.kw-logo { max-height: 70px; max-width: 160px; object-fit: contain; }
.kw-top { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; }
.kw-title { border: 2px solid #111; padding: 6px 22px; font-size: 18px; font-weight: 800; text-align: center; }
.kw-f { display: flex; border: 1.5px solid #111; min-height: 30px; align-items: stretch; }
.kw-f > span { padding: 4px 8px; border-inline-end: 1.5px solid #111; background: #f2f2f2; white-space: nowrap; font-weight: 700; display: flex; align-items: center; }
.kw-f > b { padding: 4px 8px; flex: 1; display: flex; align-items: center; font-weight: 700; }
.kw-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 6px 10px; }
.kw-tbl { width: 100%; border-collapse: collapse; } .kw-tbl th, .kw-tbl td { border: 1.5px solid #111; padding: 5px 4px; text-align: center; font-size: 12px; }
.kw-tbl th { background: #e9e9e9; font-weight: 800; } .kw-tbl th small { display: block; font-weight: 600; font-size: 10px; }
.kw-tbl td:first-child { text-align: start; } .kw-tbl tfoot td { background: #f2f2f2; font-weight: 800; }
.kw-words { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: stretch; }
.kw-words > span { border: 1.5px solid #111; padding: 6px 10px; font-weight: 700; display: flex; align-items: center; }
.kw-words .kw-f b { font-size: 15px; min-width: 110px; justify-content: center; }
.kw-pay { display: grid; gap: 4px; } .kw-pay > span { font-weight: 800; text-decoration: underline; } .kw-pay > b { border: 1.5px solid #111; padding: 6px; text-align: center; font-size: 15px; direction: ltr; }
.kw-kyc { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: start; }
.kw-q { display: grid; gap: 8px; } .kw-q > div { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.kw-l { font-weight: 800; } .kw-o { display: inline-flex; gap: 5px; align-items: center; }
.kw-box { display: inline-grid; place-items: center; width: 15px; height: 15px; border: 1.5px solid #111; font-style: normal; font-size: 11px; line-height: 1; }
.kw-line { flex: 1; min-width: 180px; border-bottom: 1.5px dotted #111; padding: 0 6px; }
.kw-card { display: grid; gap: 6px; } .kw-card img { width: 62mm; max-height: 40mm; object-fit: contain; border: 1px solid #999; filter: grayscale(1); }
.kw-sign { display: flex; justify-content: space-between; gap: 20px; margin-top: 16px; font-weight: 700; }
.kw-foot { margin-top: auto; display: grid; gap: 6px; text-align: center; border-top: 1.5px solid #111; padding-top: 8px; }
.kw-foot > b { font-size: 14px; } .kw-contact { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 22px; direction: ltr; font-weight: 700; }
.kw-terms { margin: 4px 0 0; padding-inline-start: 18px; text-align: start; font-size: 11px; font-weight: 700; }
@media print { body.print-invoice #invPrint .kw-inv { min-height: calc(100vh - 1px); } }
/* v85: the supplier purchase invoice */
.sup-box { display: grid; grid-template-columns: 1.6fr 1fr; gap: 6px 10px; }
.sup-inv .kw-f > span { font-size: 11.5px; } .sup-pay > b { direction: rtl; font-size: 13px; }

/* the cashier's customer details for the Kuwaiti invoice */
.kyc { border: 1px solid var(--gold-hi); border-radius: 14px; padding: 10px 12px; margin: 10px 0; background: #fffbef; }
.kyc summary { cursor: pointer; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; list-style: none; }
.kyc summary::-webkit-details-marker { display: none; }
.kyc[open] summary { margin-bottom: 10px; } .kyc .grid { gap: 8px; margin-bottom: 8px; } .kyc .input { height: 40px; }
.kyc .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kyc-checks, .kyc-pep { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 4px 0 8px; font-size: 13.5px; } .kyc-pep span { font-weight: 600; }
.kyc-checks label, .kyc-pep label { display: inline-flex; gap: 5px; align-items: center; cursor: pointer; }
.kyc-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.kyc-card { border: 1.5px dashed var(--line-2); border-radius: 12px; min-height: 74px; display: grid; place-items: center; cursor: pointer; overflow: hidden; background: #fff; color: var(--muted); font-size: 13px; }
.kyc-card.on { border-style: solid; border-color: var(--ok, #2f7a4f); color: var(--ok, #2f7a4f); } .kyc-card img { width: 100%; height: 74px; object-fit: cover; }
.kyc-card span { display: inline-flex; gap: 6px; align-items: center; }
@media (max-width: 560px) { .kyc .g4 { grid-template-columns: 1fr 1fr; } }
/* v86: entry tables (purchase, purchase return, gold purchase, lots, wholesale…) — every box sized for what is typed in it */
td > .input, td > select.input { min-width: 96px; width: 100%; }
td > select.input { min-width: 140px; }
td > .input.sm-in { min-width: 70px; }
td .with-scale { min-width: 150px; }
td .with-scale > .input { min-width: 100px; }
td > input.input[data-k="barcode"], td > input.input[data-k="costAmount"], td > input.input[data-k="makingAmount"] { min-width: 130px; }
td > input.input[data-k="stoneWeight"], td > input.input[data-oninput="purRowMk"] { min-width: 90px; }
.pur-tbl td, .pur-tbl th { white-space: nowrap; vertical-align: middle; }
.pur-tbl th { font-size: 12.5px; }
.pur-tbl td > small, .pur-tbl td > .sub { white-space: normal; display: block; max-width: 160px; }
/* v86: a wide entry table as one card per row — the column's name above each box, boxes wrap to the next line */
table.entry-cards { border-collapse: separate; border-spacing: 0 10px; width: 100%; }
table.entry-cards thead { display: none; }
table.entry-cards tbody, table.entry-cards tr { display: block; }
table.entry-cards tr { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 12px; align-items: end;
  background: var(--surface, #fff); border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 10px; }
table.entry-cards td { display: flex; flex-direction: column; gap: 4px; padding: 0; border: 0; min-width: 0; white-space: normal; }
table.entry-cards td::before { content: attr(data-label); font-size: 12px; font-weight: 700; color: var(--muted, #6b6455); }
table.entry-cards td:not([data-label])::before, table.entry-cards td[data-label=""]::before { content: none; }
table.entry-cards td > .input, table.entry-cards td > select.input, table.entry-cards td .with-scale { min-width: 0; width: 100%; }
table.entry-cards td:first-child { grid-column: span 2; }
table.entry-cards td:last-child:has(> .btn.danger) { align-self: end; }
.tbl-wrap:has(> table.entry-cards) { overflow: visible; }
@media (max-width: 520px) { table.entry-cards tr { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } table.entry-cards td:first-child { grid-column: 1 / -1; } }
/* v87: the simple layout — daily tools, the advanced ones folded, «كل الأدوات» */
.nav-adv { margin-top: 10px; border-top: 1px solid var(--side-3); padding-top: 8px; }
.nav-adv-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; padding: 8px 10px; border-radius: 9px;
  background: transparent; border: 1px dashed #3d3a33; color: #cfc7b6; font-size: 13.5px; cursor: pointer; transition: background .2s var(--ease); }
.nav-adv-btn:hover { background: var(--side-2); color: #fff; }
.nav-adv-btn small { color: var(--side-muted); font-size: 12px; }
.nav-adv-btn .ic { width: 16px; height: 16px; color: var(--gold-hi); transform: rotate(-90deg); transition: transform .3s var(--ease); }
.nav-adv.open .nav-adv-btn .ic { transform: rotate(90deg); }
.nav-adv-list { display: none; padding-top: 4px; }
.nav-adv.open .nav-adv-list { display: block; }
.nav-adv-list a { font-size: 13.5px; padding: 7px 10px; color: #c9c1b0; }
.nav a.nav-all { margin-top: 10px; background: var(--side-2); }
.today-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 12px; margin: 4px 0 18px; }
.today-card { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.today-card.gold { border-color: #ecd9a8; } .today-card.warn { border-color: #f0dcaa; }
.today-card .tc-ic { width: 42px; height: 42px; flex: none; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: 700; background: var(--surface-3); color: var(--ink-2); }
.today-card.gold .tc-ic { background: var(--gold-soft); color: var(--gold); } .today-card.warn .tc-ic { background: var(--warn-soft); color: var(--warn); } .today-card.info .tc-ic { background: var(--info-soft); color: var(--info); }
.today-card .tc-t { flex: 1; min-width: 0; display: flex; flex-direction: column; } .today-card .tc-t b { font-size: 15px; } .today-card .tc-t small { color: var(--muted); font-size: 13px; }
.today-card .btn { min-height: 44px; }
.today-done { display: flex; align-items: center; gap: 8px; color: var(--ok); background: var(--ok-soft); border-radius: var(--radius); padding: 12px 16px; margin: 4px 0 18px; font-weight: 600; }
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.tools-grid section { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.tools-grid h2 { color: var(--gold-ink); font-size: 15.5px; margin: 0 0 6px; }
.tool-row { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--surface-3); padding: 6px 2px; }
.tool-row a { flex: 1; min-width: 0; display: flex; gap: 10px; align-items: center; color: var(--ink); padding: 4px 0; }
.tool-row a .ic { color: var(--muted); } .tool-row a span { display: flex; flex-direction: column; line-height: 1.4; } .tool-row a small { color: var(--muted); font-size: 12.5px; }
.tool-star { width: 40px; height: 40px; flex: none; border-radius: 10px; border: 0; background: transparent; color: var(--line-2); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.tool-star.on { color: var(--gold-hi); } .tool-star.on .ic { fill: currentColor; } .tool-star:hover { background: var(--surface-3); }
.tool-row.daily a b::after { content: 'يومي'; font-size: 11px; font-weight: 600; color: var(--gold-ink); background: var(--gold-soft); border-radius: 999px; padding: 1px 7px; margin-inline-start: 8px; }
.ui-try { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--gold-soft); border: 1px solid #ecd9a8; border-radius: var(--radius); padding: 12px 16px; margin: 0 0 16px; color: var(--gold-ink); }
.ui-try .grow { flex: 1; min-width: 220px; }
.nav-place { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, 72px); align-items: center; border-top: 1px solid var(--surface-3); padding: 6px 2px; }
.nav-place.head { color: var(--muted); font-size: 12.5px; border-top: 0; } .nav-place.head span { text-align: center; } .nav-place.head span:first-child { text-align: start; }
.nav-place input { justify-self: center; width: 20px; height: 20px; accent-color: var(--gold); }
.logo-mark.brand-logo { object-fit: contain; filter: none; border-radius: 10px; background: transparent; }
/* v88: partners (الوكلاء) */
.pt-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 16px; }
.pt-card { display: grid; gap: 16px; }
.pt-top { display: flex; gap: 14px; align-items: center; }
.pt-top > div { flex: 1; min-width: 0; }
.pt-top h2 { margin: 0; font-size: 18px; }
.pt-logo { width: 52px; height: 52px; border-radius: 14px; object-fit: contain; background: var(--surface-3); flex: none; }
.pt-ph { display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 22px; background: var(--gold); }
.pt-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-block: 1px solid var(--line); }
.pt-nums > div { padding: 12px 10px; display: grid; gap: 2px; }
.pt-nums > div + div { border-inline-start: 1px solid var(--line); }
.pt-nums span, .pt-meta span { font-size: 12.5px; color: var(--muted); }
.pt-nums b { font-size: 20px; }
.pt-nums small { font-size: 12px; color: var(--muted); }
.pt-meta { display: grid; gap: 8px; }
.pt-meta > div { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.pt-meta code { background: var(--surface-3); border-radius: 6px; padding: 2px 8px; font-size: 13px; }
/* v89: لوحة الوكيل */
.pt-head { display: flex; gap: 14px; align-items: center; }
.pt-head h1 { margin: 0; }
.pt-share { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; margin-block: 16px; }
.pt-share > div:first-child { flex: 1 1 280px; display: grid; gap: 4px; }
.pt-link { display: block; padding: 8px 12px; background: var(--surface-3); border-radius: 10px; font-size: 13.5px; overflow-wrap: anywhere; margin-top: 4px; }
.chips + .table-wrap, .chips + .card { margin-top: 12px; }
.chip input[type=radio] { margin: 0 0 0 4px; }
