/* Qisti prototype, on the same design system as ../landing (landing-page-design skill):
   Readex Pro, named text styles on the Tailwind scale, the spacing table, Tailwind radii,
   flat backgrounds, one easing curve, visible focus. */

/* ---------- font ---------- */
@font-face { font-family: "Readex Pro"; src: url("fonts/readex-pro-latin-400-normal.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+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Readex Pro"; src: url("fonts/readex-pro-arabic-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Readex Pro"; src: url("fonts/readex-pro-latin-500-normal.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+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Readex Pro"; src: url("fonts/readex-pro-arabic-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Readex Pro"; src: url("fonts/readex-pro-latin-600-normal.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+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Readex Pro"; src: url("fonts/readex-pro-arabic-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }

/* ---------- tokens (identical to ../landing/assets/site.css) ---------- */
:root {
  --s-25: 2px; --s-50: 4px; --s-75: 8px; --s-100: 12px; --s-200: 16px; --s-300: 24px;
  --s-400: 32px; --s-500: 40px; --s-600: 48px; --s-700: 64px; --s-800: 80px; --s-900: 96px;
  --r-sm: 2px; --r: 4px; --r-md: 6px; --r-lg: 8px; --r-xl: 12px; --r-2xl: 16px; --r-3xl: 24px; --r-full: 9999px;
  --bg: #FAFAF7; --surface: #FFFFFF; --ink: #0B1210; --ink-2: #39423E; --muted: #5C6661;
  --line: #E4E6E1; --quiet: #F0F1EC;
  --green: #0C6B4E; --green-ink: #08503A; --green-soft: #E8F3EE; --green-light: #A7DCC6;
  --error: #B3261E; --error-soft: #FBE9E7;
  --warn: #7A5300; --warn-soft: #FBF1DC; /* "your turn" states: sign, deliver, buy */
  --ease: cubic-bezier(0.22, 1, 0.36, 1); --t-move: 500ms; --t-fade: 300ms;
  --font: "Readex Pro", system-ui, sans-serif;
}

/* ---------- named text styles (skill B1) ---------- */
.heading-3 { font-size: 36px; line-height: 40px; font-weight: 600; }
.heading-4 { font-size: 30px; line-height: 36px; font-weight: 600; }
.heading-5 { font-size: 24px; line-height: 32px; font-weight: 600; }
.heading-6 { font-size: 20px; line-height: 28px; font-weight: 600; }
.title-2 { font-size: 18px; line-height: 28px; font-weight: 500; }
.title-3 { font-size: 16px; line-height: 24px; font-weight: 500; }
.title-4 { font-size: 14px; line-height: 20px; font-weight: 500; }
.body-1 { font-size: 16px; line-height: 24px; font-weight: 600; }
.body-3 { font-size: 16px; line-height: 24px; font-weight: 400; }
.body-4 { font-size: 14px; line-height: 20px; font-weight: 600; }
.body-6 { font-size: 14px; line-height: 20px; font-weight: 400; }
.button-md { font-size: 16px; line-height: 24px; font-weight: 600; }
.button-sm { font-size: 14px; line-height: 20px; font-weight: 600; }
.caption-1 { font-size: 14px; line-height: 20px; font-weight: 500; }
.caption-2 { font-size: 14px; line-height: 20px; font-weight: 400; }
.caption-3 { font-size: 12px; line-height: 16px; font-weight: 600; }
.caption-4 { font-size: 12px; line-height: 16px; font-weight: 500; }
.caption-5 { font-size: 12px; line-height: 16px; font-weight: 400; }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font-family: var(--font); font-size: 16px; line-height: 24px; -webkit-text-size-adjust: 100%; }
h1, h2, h3, p, ul, ol, table { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
p, li, td { text-wrap: pretty; }
svg { display: block; }
.muted { color: var(--muted); }
.num { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: var(--s-75); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--s-100); }
.stack > * + * { margin-top: var(--s-200); }
.ok-text { color: var(--green-ink); }
.bad-text { color: var(--error); }
.icon { width: 20px; height: 20px; fill: currentColor; flex: none; }
.icon-16 { width: 16px; height: 16px; }
.icon-24 { width: 24px; height: 24px; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.error { color: var(--error); }
.error:empty { display: none; }
.note { display: flex; gap: var(--s-75); align-items: flex-start; padding: var(--s-100) var(--s-200); border-radius: var(--r-xl); background: var(--quiet); color: var(--ink-2); }
.note .icon { margin-top: var(--s-25); color: var(--muted); }
.note.turn { background: var(--warn-soft); color: var(--warn); }
.note.turn .icon { color: var(--warn); }

/* ---------- floating nav ---------- */
.nav-wrap { position: fixed; inset-inline: 0; top: var(--s-200); z-index: 50; display: flex; flex-direction: column; align-items: center; gap: var(--s-75); padding-inline: var(--s-200); pointer-events: none; }
.nav { pointer-events: auto; display: flex; align-items: center; gap: var(--s-200); max-width: 100%; padding: var(--s-75); padding-inline-start: var(--s-200); background: rgba(255, 255, 255, 0.72); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); border: 1px solid rgba(11, 18, 16, 0.08); border-radius: var(--r-full); }
.brand { display: inline-flex; align-items: center; gap: var(--s-75); color: var(--ink); text-decoration: none; flex: none; }
.brand img { width: 28px; height: 28px; }
.roles { display: flex; gap: var(--s-50); overflow-x: auto; scrollbar-width: none; }
.roles::-webkit-scrollbar { display: none; }
.roles a { display: inline-flex; align-items: center; gap: var(--s-50); padding: var(--s-75) var(--s-100); border-radius: var(--r-full); color: var(--ink-2); text-decoration: none; white-space: nowrap; transition: background-color var(--t-fade) var(--ease), color var(--t-fade) var(--ease); }
.roles a:hover { background: rgba(11, 18, 16, 0.05); color: var(--ink); }
.roles a[aria-current="page"] { background: var(--green-soft); color: var(--green-ink); }
.tools { display: flex; align-items: center; gap: var(--s-75); flex: none; }
.tools select { font: inherit; padding: var(--s-75) var(--s-100); border: 1px solid var(--line); border-radius: var(--r-full); background: var(--surface); color: var(--ink); cursor: pointer; }
.demo-chip { pointer-events: auto; display: inline-flex; align-items: center; gap: var(--s-50); padding: var(--s-25) var(--s-100); border-radius: var(--r-full); background: var(--warn-soft); color: var(--warn); }
.demo-chip .icon { width: 16px; height: 16px; }
@media (max-width: 899px) {
  .nav { flex-wrap: wrap; justify-content: space-between; border-radius: var(--r-3xl); gap: var(--s-75); padding-inline-start: var(--s-100); }
  .roles { order: 3; flex-basis: 100%; }
  .tools .reset-label { display: none; }
}

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-75); padding: var(--s-75) var(--s-100); border-radius: var(--r-full); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-family: inherit; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background-color var(--t-fade) var(--ease), border-color var(--t-fade) var(--ease), color var(--t-fade) var(--ease), transform var(--t-move) var(--ease); }
.btn:hover { border-color: var(--ink-2); }
.btn:active { transform: scale(0.98); }
.btn.primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn.primary:hover { background: var(--green-ink); border-color: var(--green-ink); transform: translateY(-1px); }
.btn.primary:active { transform: scale(0.98); }
.btn.danger { color: var(--error); border-color: #EBC3BF; }
.btn.danger:hover { border-color: var(--error); }
.btn.link { border-color: transparent; background: transparent; color: var(--green-ink); padding-inline: 0; }
.btn.link:hover { color: var(--green); }
.btn.block { display: flex; width: 100%; padding: var(--s-100) var(--s-300); margin-top: var(--s-300); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.actions { display: flex; flex-wrap: wrap; gap: var(--s-75); }
/* "Back" points against the reading direction */
.flip-back { transform: scaleX(-1); }
[dir="rtl"] .flip-back { transform: none; }

/* ---------- chips & gates ---------- */
.chip { display: inline-flex; align-items: center; gap: var(--s-50); padding: var(--s-25) var(--s-75); border-radius: var(--r-full); white-space: nowrap; }
.chip.ok { background: var(--green-soft); color: var(--green-ink); }
.chip.bad { background: var(--error-soft); color: var(--error); }
.chip.turn { background: var(--warn-soft); color: var(--warn); }
.chip.info { background: var(--quiet); color: var(--ink-2); }
.gates { display: flex; flex-wrap: wrap; gap: var(--s-75); }
.gate { display: inline-flex; align-items: center; gap: var(--s-50); padding: var(--s-50) var(--s-100); border-radius: var(--r-full); }
.gate .icon { width: 16px; height: 16px; }
.gate.pass { background: var(--green-soft); color: var(--green-ink); }
.gate.fail { background: var(--error-soft); color: var(--error); }
.gate.pending { background: var(--quiet); color: var(--muted); }

/* ---------- forms ---------- */
.field { display: grid; gap: var(--s-75); }
.field > span { color: var(--ink-2); }
.input { display: flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--bg); transition: border-color var(--t-fade) var(--ease); }
.input:focus-within { border-color: var(--green); }
.input input, .input select { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font: inherit; color: var(--ink); padding: var(--s-100) var(--s-200); }
.input .unit { padding-inline: var(--s-200); color: var(--muted); }
.input.code input { letter-spacing: 8px; text-align: center; font-variant-numeric: tabular-nums; }
.form { display: grid; gap: var(--s-200); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-200); }
.check { display: flex; gap: var(--s-100); align-items: flex-start; color: var(--ink-2); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: var(--s-25) 0 0; accent-color: var(--green); flex: none; }
.pills { display: flex; flex-wrap: wrap; gap: var(--s-75); }
.pill { font: inherit; padding: var(--s-50) var(--s-100); border-radius: var(--r-full); border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; transition: background-color var(--t-fade) var(--ease), border-color var(--t-fade) var(--ease), color var(--t-fade) var(--ease); }
.pill:hover { border-color: var(--ink-2); }
.pill[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- segmented tabs ---------- */
.seg { display: inline-flex; gap: var(--s-50); padding: var(--s-50); border-radius: var(--r-full); background: var(--quiet); }
.seg button { font: inherit; border: 0; background: transparent; color: var(--ink-2); padding: var(--s-75) var(--s-200); border-radius: var(--r-full); cursor: pointer; transition: background-color var(--t-fade) var(--ease), color var(--t-fade) var(--ease); }
.seg button:hover { color: var(--ink); }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(11, 18, 16, 0.08); }
.seg.full { display: flex; }
.seg.full button { flex: 1; }

/* ---------- buyer: the phone ---------- */
/* main clears the floating nav; the shell adds one more token below it */
main { padding: var(--s-900) var(--s-200); }
.shell { margin-top: var(--s-300); }
@media (max-width: 899px) { .shell { margin-top: var(--s-800); } }
.phone { width: 100%; max-width: 420px; margin-inline: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3xl); box-shadow: 0 24px 48px rgba(11, 18, 16, 0.08); overflow: hidden; }
.phone-bar { display: flex; justify-content: space-between; align-items: center; padding: var(--s-200) var(--s-300); background: var(--green); color: #fff; }
.phone-bar .who { display: inline-flex; align-items: center; gap: var(--s-50); color: #D2EAE0; }
.phone-nav { padding: var(--s-200) var(--s-300) 0; }
.phone-body { padding: var(--s-300); min-height: 560px; }
.screen-title { margin-bottom: var(--s-75); }

.welcome { text-align: center; padding-top: var(--s-400); }
.welcome img { width: 72px; height: 72px; margin: 0 auto var(--s-300); }
.welcome h1 { margin-bottom: var(--s-300); }
.ticks { list-style: none; padding: 0; display: grid; gap: var(--s-75); text-align: start; }
.ticks li { display: flex; gap: var(--s-100); align-items: center; padding: var(--s-100) var(--s-200); border-radius: var(--r-xl); background: var(--green-soft); color: var(--green-ink); }
.demo-hint { display: inline-flex; align-items: center; gap: var(--s-50); padding: var(--s-25) var(--s-100); border-radius: var(--r-full); background: var(--warn-soft); color: var(--warn); }

.result { padding: var(--s-300); border-radius: var(--r-2xl); text-align: center; }
.result.ok { background: var(--green-soft); }
.result.ok .big { color: var(--green-ink); }
.result.ko { background: var(--error-soft); color: var(--error); }
.big { font-variant-numeric: tabular-nums; }
.section-label { margin: var(--s-300) 0 var(--s-75); color: var(--muted); }

table.list { width: 100%; border-collapse: collapse; }
table.list td { padding: var(--s-75) 0; border-bottom: 1px solid var(--line); }
table.list tr:last-child td { border-bottom: 0; }
table.list td:first-child { color: var(--muted); }
table.list tr.strong td { color: var(--ink); font-weight: 600; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-100); }
@media (max-width: 380px) { .grid { grid-template-columns: 1fr; } }
/* Product card: 16px radius with 8px padding, so the thumb is 16 - 8 = 8px (skill B3). */
.product { font: inherit; text-align: start; display: grid; gap: var(--s-50); padding: var(--s-75); border: 1px solid var(--line); border-radius: var(--r-2xl); background: var(--surface); color: inherit; cursor: pointer; transition: border-color var(--t-fade) var(--ease), transform var(--t-move) var(--ease); }
.product:hover { border-color: var(--green-light); transform: translateY(-2px); }
.product:active { transform: scale(0.98); }
.product:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.product .txt { display: grid; gap: var(--s-25); padding: var(--s-50); }
.thumb { display: grid; place-items: center; height: 80px; border-radius: var(--r-lg); background: var(--green-soft); color: var(--green); }
.thumb .icon { width: 40px; height: 40px; }
.thumb.sm { width: 48px; height: 48px; flex: none; }
.thumb.sm .icon { width: 24px; height: 24px; }
.local { display: inline-flex; align-items: center; gap: var(--s-25); color: var(--green-ink); }
.local .icon { width: 16px; height: 16px; }
.head { display: flex; gap: var(--s-100); align-items: center; }
.dti { padding: var(--s-100) var(--s-200); border-radius: var(--r-xl); }
.dti.ok { background: var(--green-soft); color: var(--green-ink); }
.dti.bad { background: var(--error-soft); color: var(--error); }
.notes { padding-inline-start: var(--s-300); color: var(--muted); display: grid; gap: var(--s-50); }
.docs { list-style: none; padding: 0; }
.docs li { display: flex; justify-content: space-between; align-items: center; gap: var(--s-100); padding: var(--s-100) 0; border-bottom: 1px solid var(--line); }
.docs li:last-child { border-bottom: 0; }
.docs .doc { display: inline-flex; align-items: center; gap: var(--s-75); }
.docs .doc .icon { color: var(--muted); }
.req { font: inherit; display: flex; gap: var(--s-100); align-items: center; width: 100%; text-align: start; padding: var(--s-100); border: 1px solid var(--line); border-radius: var(--r-2xl); background: var(--surface); color: inherit; cursor: pointer; transition: border-color var(--t-fade) var(--ease), transform var(--t-move) var(--ease); }
.req:hover { border-color: var(--green-light); }
.req:active { transform: scale(0.98); }
.req + .req { margin-top: var(--s-75); }
.sign { padding: var(--s-300); border: 2px solid var(--green); border-radius: var(--r-2xl); display: grid; gap: var(--s-200); }
.kpi-one { padding: var(--s-200) var(--s-300); border-radius: var(--r-2xl); background: var(--quiet); }

table.schedule { width: 100%; border-collapse: collapse; }
table.schedule th { text-align: start; color: var(--muted); padding: var(--s-75) var(--s-50); border-bottom: 1px solid var(--line); }
table.schedule td { padding: var(--s-75) var(--s-50); border-bottom: 1px solid var(--line); }
table.schedule .num { text-align: end; }
table.schedule tr.next td { background: var(--warn-soft); }

.timeline { list-style: none; padding: 0; display: grid; gap: var(--s-100); }
.timeline li { display: grid; grid-template-columns: 12px 1fr; gap: var(--s-100); align-items: start; }
.timeline li::before { content: ""; width: 12px; height: 12px; margin-top: var(--s-50); border-radius: var(--r-full); background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.timeline .when { color: var(--muted); }

/* empty state: composed, never a blank panel (skill B9) */
.empty { display: grid; justify-items: center; gap: var(--s-100); padding: var(--s-600) var(--s-300); text-align: center; border: 1px dashed #C9CFCB; border-radius: var(--r-2xl); }
.empty .badge { width: 48px; height: 48px; border-radius: var(--r-full); background: var(--green-soft); color: var(--green); display: grid; place-items: center; }
.empty .btn { margin-top: var(--s-75); }

/* ---------- desks (merchant, BDL, auditor) ---------- */
.desk { max-width: 1152px; margin-inline: auto; }
.desk-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-200); flex-wrap: wrap; }
.desk-head .sub { margin-top: var(--s-50); }
.inline-field { display: inline-flex; align-items: center; gap: var(--s-75); color: var(--muted); }
.inline-field .input { min-width: 200px; }
.inline-field .input select { padding-block: var(--s-75); }
.bar { margin-top: var(--s-300); display: flex; justify-content: space-between; align-items: center; gap: var(--s-200); flex-wrap: wrap; }
.kpis { margin-top: var(--s-300); display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--s-200); }
.kpi { padding: var(--s-200) var(--s-300); border: 1px solid var(--line); border-radius: var(--r-2xl); background: var(--surface); display: grid; gap: var(--s-50); }
.kpi .label { display: inline-flex; align-items: center; gap: var(--s-50); color: var(--muted); }
.kpi .value { font-variant-numeric: tabular-nums; }
.card { border: 1px solid var(--line); border-radius: var(--r-2xl); background: var(--surface); }
.table-card { margin-top: var(--s-300); overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; }
table.data th { text-align: start; color: var(--muted); padding: var(--s-100) var(--s-200); border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td { padding: var(--s-100) var(--s-200); border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data td:first-child { white-space: nowrap; }
table.data tr:last-child td { border-bottom: 0; }
table.data .chip { white-space: normal; }
table.data bdi { white-space: nowrap; }
table.data.clickable tbody tr { cursor: pointer; transition: background-color var(--t-fade) var(--ease); }
table.data.clickable tbody tr:hover td { background: #F6F8F7; }
table.data.clickable tbody tr[aria-selected="true"] td { background: var(--green-soft); }
.split { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(340px, 1fr); gap: var(--s-300); align-items: start; margin-top: var(--s-300); }
.split .table-card { margin-top: 0; }
@media (max-width: 959px) { .split { grid-template-columns: minmax(0, 1fr); } }
.panel { padding: var(--s-300); border: 1px solid var(--line); border-radius: var(--r-3xl); background: var(--surface); display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-200); position: sticky; top: var(--s-900); }
@media (max-width: 959px) { .panel { position: static; } }
.panel .section-label { margin: var(--s-75) 0 0; }
.reject { display: flex; gap: var(--s-75); align-items: flex-end; }
.reject .field { flex: 1; }
.add-form { margin-top: var(--s-300); padding: var(--s-300); display: grid; gap: var(--s-200); grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); align-items: end; }
.audit { margin-top: var(--s-300); display: grid; gap: var(--s-200); }
.audit-card { padding: var(--s-300); display: grid; gap: var(--s-200); }
.audit-card .timeline { padding-top: var(--s-75); }

/* ---------- toast ---------- */
.toast { position: fixed; inset-inline: 0; bottom: var(--s-300); margin-inline: auto; width: fit-content; max-width: calc(100vw - var(--s-400)); display: flex; align-items: center; gap: var(--s-75); padding: var(--s-100) var(--s-200); border-radius: var(--r-xl); background: var(--ink); color: #fff; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2); animation: rise var(--t-move) var(--ease); }
.toast .icon { color: var(--green-light); }

/* ---------- motion: a screen that changes rises into place ---------- */
.enter { animation: rise var(--t-move) var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(var(--s-75)); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .enter, .toast { animation: fade var(--t-fade) var(--ease); }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
  .btn, .product, .req { transition-property: background-color, border-color, color; }
  .btn.primary:hover, .product:hover { transform: none; }
}
@media print {
  .nav-wrap, .no-print, .btn.link { display: none !important; }
  main { padding-top: 0; }
  body { background: #fff; }
  .audit-card { break-inside: avoid; }
}

/* =====================================================================
   Sign-in and registration (every role). Same tokens; motion is transform
   and opacity only, on the base curve, and stops under reduced motion.
   ===================================================================== */

/* stepper + progress */
.stepper { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(var(--steps), minmax(0, 1fr)); gap: var(--s-75); }
.stepper li { display: grid; justify-items: center; gap: var(--s-50); color: var(--muted); text-align: center; }
.stepper .dot { width: 24px; height: 24px; border-radius: var(--r-full); display: grid; place-items: center; border: 1px solid var(--line); background: var(--surface); transition: background-color var(--t-fade) var(--ease), border-color var(--t-fade) var(--ease); }
.stepper .dot .icon { width: 16px; height: 16px; }
.stepper li.done .dot { background: var(--green); border-color: var(--green); color: #fff; }
.stepper li.current { color: var(--ink); }
.stepper li.current .dot { border-color: var(--ink); background: var(--ink); color: #fff; }
.progress { height: 4px; border-radius: var(--r-full); background: var(--quiet); overflow: hidden; margin-top: var(--s-100); }
.progress span { display: block; height: 100%; background: var(--green); border-radius: var(--r-full); transform-origin: left center; transition: transform 700ms var(--ease); }
[dir="rtl"] .progress span { transform-origin: right center; }

/* six-box code entry */
.otp { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s-75); direction: ltr; }
.otp-box { width: 100%; min-width: 0; height: 56px; text-align: center; border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--bg); color: var(--ink); font: inherit; font-size: 24px; line-height: 32px; font-weight: 600; outline: none; transition: border-color var(--t-fade) var(--ease), background-color var(--t-fade) var(--ease); }
.otp-box:focus { border-color: var(--green); background: var(--surface); }
.otp-box.filled { border-color: var(--green-light); animation: pop var(--t-fade) var(--ease); }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.06); } 100% { transform: scale(1); } }
.resend { display: flex; align-items: center; justify-content: space-between; gap: var(--s-75); }

/* PIN dots + keypad */
.pin-dots { display: flex; justify-content: center; gap: var(--s-200); padding: var(--s-200) 0; direction: ltr; }
.pin-dots span { width: 16px; height: 16px; border-radius: var(--r-full); border: 2px solid var(--ink-2); transition: background-color var(--t-fade) var(--ease), border-color var(--t-fade) var(--ease), transform var(--t-fade) var(--ease); }
.pin-dots span.on { background: var(--ink); border-color: var(--ink); transform: scale(1.1); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-75); direction: ltr; }
.keypad button { height: 56px; border: 0; border-radius: var(--r-2xl); background: var(--quiet); color: var(--ink); font: inherit; font-size: 24px; line-height: 32px; font-weight: 500; cursor: pointer; display: grid; place-items: center; transition: background-color var(--t-fade) var(--ease), transform 200ms var(--ease); }
.keypad button:hover { background: #E6E8E2; }
.keypad button:active { transform: scale(0.96); }
.keypad button.ghost { background: transparent; }
.keypad button .icon { width: 24px; height: 24px; }

/* error shake: a short horizontal shudder */
.shake { animation: shake 420ms var(--ease); }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }

/* auth card on the desks */
.auth { display: grid; justify-items: center; }
.auth-card { width: 100%; max-width: 448px; padding: var(--s-400); border: 1px solid var(--line); border-radius: var(--r-3xl); background: var(--surface); box-shadow: 0 24px 48px rgba(11, 18, 16, 0.08); display: grid; gap: var(--s-200); }
.auth-card.wide { max-width: 560px; }
@media (max-width: 479px) { .auth-card { padding: var(--s-300); } }
.auth-badge { width: 48px; height: 48px; border-radius: var(--r-xl); background: var(--green-soft); color: var(--green); display: grid; place-items: center; }
.auth-badge .icon { width: 24px; height: 24px; }
.auth-head { display: grid; gap: var(--s-75); }
.demo-cred { display: flex; align-items: center; gap: var(--s-75); padding: var(--s-75) var(--s-100); border-radius: var(--r-xl); background: var(--warn-soft); color: var(--warn); overflow-wrap: anywhere; }
.demo-cred .icon { width: 16px; height: 16px; }
.divider { display: flex; align-items: center; gap: var(--s-100); color: var(--muted); }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.inline-links { display: flex; justify-content: space-between; align-items: center; gap: var(--s-100); flex-wrap: wrap; }
.secure { display: flex; align-items: center; gap: var(--s-50); color: var(--muted); }
.secure .icon { width: 16px; height: 16px; color: var(--green); }

/* password field + strength */
.pw .toggle { border: 0; background: transparent; color: var(--muted); padding: var(--s-75) var(--s-100); cursor: pointer; display: grid; place-items: center; border-radius: var(--r-lg); }
.pw .toggle:hover { color: var(--ink); }
.strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-50); }
.strength span { height: 4px; border-radius: var(--r-full); background: var(--line); transition: background-color var(--t-fade) var(--ease); }
.strength[data-level="1"] span:nth-child(-n+1) { background: var(--error); }
.strength[data-level="2"] span:nth-child(-n+2) { background: #C98A00; }
.strength[data-level="3"] span:nth-child(-n+3) { background: var(--green-light); }
.strength[data-level="4"] span { background: var(--green); }
.strength-row { display: flex; justify-content: space-between; gap: var(--s-75); color: var(--muted); }

/* simulated upload */
.upbar { width: 96px; height: 4px; border-radius: var(--r-full); background: var(--quiet); overflow: hidden; }
.upbar span { display: block; height: 100%; background: var(--green); transform-origin: left center; animation: grow 800ms var(--ease) forwards; transform: scaleX(0); }
[dir="rtl"] .upbar span { transform-origin: right center; }
@keyframes grow { to { transform: scaleX(1); } }

/* success badge */
.success-badge { position: relative; width: 64px; height: 64px; margin: 0 auto; border-radius: var(--r-full); background: var(--green); color: #fff; display: grid; place-items: center; animation: pop-in var(--t-move) var(--ease) both; }
.success-badge .icon { width: 32px; height: 32px; animation: fade-in var(--t-move) var(--ease) 150ms both; }
.success-badge::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 2px solid var(--green); animation: ring 900ms var(--ease) 200ms both; }
@keyframes pop-in { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: scale(1); } }
@keyframes fade-in { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: none; } }
@keyframes ring { from { opacity: 0.8; transform: scale(1); } to { opacity: 0; transform: scale(1.6); } }
.done-card { text-align: center; display: grid; gap: var(--s-100); padding: var(--s-200) 0; }

/* application status (merchant pending) */
.status-steps { list-style: none; padding: 0; display: grid; gap: var(--s-200); }
.status-steps li { display: grid; grid-template-columns: 24px 1fr; gap: var(--s-100); align-items: center; color: var(--muted); }
.status-steps .st { width: 24px; height: 24px; border-radius: var(--r-full); display: grid; place-items: center; background: var(--quiet); }
.status-steps .st .icon { width: 16px; height: 16px; }
.status-steps li.done { color: var(--ink); }
.status-steps li.done .st { background: var(--green); color: #fff; }
.status-steps li.now { color: var(--ink); }
.status-steps li.now .st { background: var(--warn-soft); color: var(--warn); }
.status-steps li.now .st { animation: breathe 1600ms var(--ease) infinite; }
@keyframes breathe { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

/* review summary */
.summary { display: grid; gap: var(--s-75); padding: var(--s-200); border-radius: var(--r-2xl); background: var(--quiet); margin: 0; }
.summary > div { display: flex; justify-content: space-between; gap: var(--s-200); }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; text-align: end; overflow-wrap: anywhere; }

/* signed-in user chip */
.user-chip { display: inline-flex; align-items: center; gap: var(--s-100); padding: var(--s-50); padding-inline-end: var(--s-75); border: 1px solid var(--line); border-radius: var(--r-full); background: var(--surface); }
.avatar { width: 32px; height: 32px; border-radius: var(--r-full); background: var(--green-soft); color: var(--green-ink); display: grid; place-items: center; flex: none; }
.user-chip .who { display: grid; }
.roles a .on-dot { width: 8px; height: 8px; border-radius: var(--r-full); background: var(--green); }
.phone-bar .signout { border: 0; background: rgba(255, 255, 255, 0.14); color: #fff; border-radius: var(--r-full); padding: var(--s-50) var(--s-75); display: inline-flex; align-items: center; gap: var(--s-50); cursor: pointer; font: inherit; transition: background-color var(--t-fade) var(--ease); }
.phone-bar .signout:hover { background: rgba(255, 255, 255, 0.24); }
.phone-bar .right { display: inline-flex; align-items: center; gap: var(--s-75); }
.welcome .actions-col { display: grid; gap: var(--s-75); margin-top: var(--s-300); }
.welcome .actions-col .btn.block { margin-top: 0; }
.btn.secondary { background: var(--surface); border-color: var(--line); }

@media (prefers-reduced-motion: reduce) {
  .otp-box.filled, .shake, .success-badge, .success-badge .icon, .success-badge::after, .status-steps li.now .st, .upbar span { animation: none; }
  .upbar span { transform: scaleX(1); }
  .progress span { transition: none; }
}

/* leading icon inside an input (email, phone, password, business name) */
.input > .icon { margin-inline-start: var(--s-200); color: var(--muted); }
.input > .icon + .unit { padding-inline-start: var(--s-100); }
