/* TRC Gateway / USDTPAY (session USDTPAY-1) — one stylesheet for landing, checkout, dashboard and docs. */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f3f4f6;
  --surface-3: #e9ebef;
  --text: #0b1220;
  --text-2: #3f4a5c;
  --muted: #6b7486;
  --border: #e5e7eb;
  --border-2: #d3d7de;
  --ink: #0b1220;
  --on-ink: #ffffff;
  --brand: #12b76a;
  --brand-strong: #039855;
  --brand-soft: #e8f8f0;
  --brand-ink: #05603a;
  --warn: #b54708;
  --warn-soft: #fff7e6;
  --danger: #d92d20;
  --danger-soft: #fef1f0;
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 1px 3px rgba(16, 24, 40, .07), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-lg: 0 24px 48px -16px rgba(16, 24, 40, .22), 0 2px 6px rgba(16, 24, 40, .05);
  --ring: 0 0 0 4px rgba(18, 183, 106, .18);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0d14;
    --surface: #10151f;
    --surface-2: #161c28;
    --surface-3: #1e2534;
    --text: #f1f3f7;
    --text-2: #c3c9d4;
    --muted: #8b94a6;
    --border: #212938;
    --border-2: #2e3749;
    --ink: #f1f3f7;
    --on-ink: #0a0d14;
    --brand: #32d583;
    --brand-strong: #12b76a;
    --brand-soft: rgba(50, 213, 131, .12);
    --brand-ink: #6ce9a6;
    --warn: #fdb022;
    --warn-soft: rgba(253, 176, 34, .1);
    --danger: #f97066;
    --danger-soft: rgba(249, 112, 102, .12);
    --shadow-sm: none;
    --shadow: 0 0 0 1px rgba(255, 255, 255, .02);
    --shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, .6);
    --ring: 0 0 0 4px rgba(50, 213, 131, .2);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; text-underline-offset: 3px; }
a:hover { color: var(--brand-strong); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.02em; font-weight: 650; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }
p { margin: 0 0 .8em; }
code, pre, kbd { font-family: var(--mono); font-size: .86em; }
code { background: var(--surface-2); padding: .1em .35em; border-radius: 5px; }
pre { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r); padding: 14px 16px; overflow-x: auto; line-height: 1.6; }
pre code { background: none; padding: 0; }
.muted { color: var(--muted); }
.mt { margin-top: 20px; }
.small { font-size: .86rem; }
.mono { font-family: var(--mono); }
.error { color: var(--danger); background: var(--danger-soft); padding: 10px 12px; border-radius: var(--r-sm); font-size: .92rem; }
[hidden] { display: none !important; }
::selection { background: var(--brand-soft); }
.ico { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ── brand mark ── */
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.02em; text-decoration: none; color: var(--text); }
.logo:hover { color: var(--text); }
.logo-mark {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none;
  background: var(--ink); color: var(--brand); font-weight: 800; font-size: 17px; line-height: 1;
}

/* ── buttons & forms ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
  height: 38px; padding: 0 14px; border-radius: 10px; font: inherit; font-size: .93rem; font-weight: 600;
  border: 1px solid var(--border-2); background: var(--surface); color: var(--text); cursor: pointer;
  text-decoration: none; box-shadow: var(--shadow-sm); transition: background .15s, border-color .15s, opacity .15s, transform .05s;
}
.btn:hover { border-color: var(--muted); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.btn.primary:hover { opacity: .88; color: var(--on-ink); }
.btn.brand { background: var(--brand); border-color: var(--brand); color: #04281a; }
.btn.brand:hover { background: var(--brand-strong); border-color: var(--brand-strong); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { border-color: var(--danger); color: var(--danger); }
.btn.sm { height: 30px; padding: 0 10px; font-size: .84rem; border-radius: 8px; }
.btn.lg { height: 46px; padding: 0 20px; font-size: 1rem; border-radius: 12px; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
label { display: block; font-weight: 550; font-size: .88rem; color: var(--text-2); }
input, select, textarea {
  display: block; width: 100%; margin-top: 6px; height: 40px; padding: 0 12px; font: inherit; font-size: .95rem;
  color: var(--text); background: var(--surface); border: 1px solid var(--border-2); border-radius: 10px;
  transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; padding: 10px 12px; }
input::placeholder { color: var(--muted); opacity: .8; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.stack > * + * { margin-top: 14px; }
.hint { font-weight: 400; color: var(--muted); font-size: .8rem; margin-top: 5px; line-height: 1.45; }

/* ── badges ── */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: .76rem; font-weight: 600; background: var(--surface-2); color: var(--muted); text-transform: capitalize; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.paid, .badge.delivered, .badge.active, .badge.matched { background: var(--brand-soft); color: var(--brand-ink); }
.badge.pending, .badge.unmatched { background: var(--warn-soft); color: var(--warn); }
.badge.failed, .badge.suspended, .badge.cancelled { background: var(--danger-soft); color: var(--danger); }

/* ═════════════════════════ CHECKOUT ═════════════════════════ */
.co-page { min-height: 100vh; display: flex; align-items: flex-start; justify-content: center; padding: 32px 16px; }
.checkout {
  width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg); overflow: hidden;
}
.checkout.embed { border: 0; box-shadow: none; max-width: none; border-radius: 0; }
.embed-page { background: var(--surface); padding: 0; }
.co-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.checkout.embed .co-head { padding-right: 52px; } /* room for the overlay's close button */
.co-avatar { width: 38px; height: 38px; border-radius: 11px; background: var(--ink); color: var(--on-ink); display: grid; place-items: center; font-weight: 700; flex: none; }
.co-who { flex: 1; min-width: 0; }
.co-who .muted { font-size: .78rem; line-height: 1.2; }
.co-merchant { display: block; font-size: 1rem; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lang { font-size: .78rem; font-weight: 600; color: var(--muted); text-decoration: none; border: 1px solid var(--border); padding: 4px 9px; border-radius: 999px; white-space: nowrap; }
.lang:hover { color: var(--text); border-color: var(--border-2); }
.co-section { padding: 20px; }
.co-section + .co-section { border-top: 1px solid var(--border); }
.co-desc { color: var(--text-2); font-size: .92rem; margin: 0 0 14px; }
.co-title { font-size: 1.2rem; margin-bottom: 4px; }
.co-label { font-size: .76rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.co-amount-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; }
.co-amount { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 2.1rem; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.co-amount .unit { font-size: .95rem; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.timer { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; color: var(--text-2); background: var(--surface-2); padding: 5px 10px; border-radius: 999px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.timer .ico { width: 14px; height: 14px; }
.copy {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  font: inherit; font-size: .8rem; font-weight: 600; height: 30px; padding: 0 11px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--border-2); background: var(--surface); color: var(--text);
}
.copy .ico { width: 14px; height: 14px; }
.copy:hover { border-color: var(--muted); }
.copy.done { background: var(--brand-soft); color: var(--brand-ink); border-color: transparent; }
.note { display: flex; gap: 8px; background: var(--brand-soft); color: var(--brand-ink); padding: 10px 12px; border-radius: 10px; font-size: .85rem; margin: 12px 0 0; line-height: 1.45; }
.note .ico { width: 16px; height: 16px; margin-top: 1px; }
.co-fee { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.co-pay { display: grid; grid-template-columns: 132px 1fr; gap: 16px; align-items: center; }
.co-qr { background: #fff; border-radius: 12px; padding: 8px; border: 1px solid var(--border); }
.co-qr svg { display: block; width: 100%; height: auto; }
.co-addr-box { min-width: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); }
.chip.tron::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #ef0027; }
.co-addr { font-family: var(--mono); font-size: .82rem; word-break: break-all; line-height: 1.5; margin: 8px 0; color: var(--text); }
.co-status { display: flex; align-items: center; gap: 12px; padding: 14px 20px; background: var(--surface-2); }
.pulse { position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); flex: none; }
.pulse::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--brand); opacity: 0; animation: pulse 1.6s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(.4); opacity: .8; } 100% { transform: scale(1.4); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pulse::after { animation: none; } }
.co-status strong { display: block; font-size: .9rem; }
.co-status .muted { font-size: .8rem; line-height: 1.35; }
details.co-tips { padding: 0 20px 16px; background: var(--surface-2); }
details.co-tips summary { cursor: pointer; font-size: .82rem; font-weight: 600; color: var(--warn); list-style: none; display: flex; align-items: center; gap: 6px; }
details.co-tips summary::-webkit-details-marker { display: none; }
details.co-tips summary .ico { width: 15px; height: 15px; }
details.co-tips ul { margin: 8px 0 0; padding-left: 18px; font-size: .82rem; color: var(--text-2); }
details.co-tips li + li { margin-top: 4px; }
.co-done { text-align: center; padding: 36px 24px; }
.co-done h1 { font-size: 1.3rem; margin-top: 4px; }
.co-done p { color: var(--text-2); }
.big-check { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-strong); display: grid; place-items: center; animation: pop .35s ease-out; }
.big-check .ico { width: 32px; height: 32px; stroke-width: 2.4; }
.big-x { background: var(--surface-2); color: var(--muted); }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.co-foot { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 20px; border-top: 1px solid var(--border); font-size: .74rem; color: var(--muted); text-align: center; }
.co-foot .ico { width: 14px; height: 14px; }
.co-foot a { color: var(--text-2); font-weight: 600; text-decoration: none; }
#simulate { width: 100%; margin-top: 12px; border-style: dashed; }
.co-page .btn.primary { background: var(--brand); border-color: var(--brand); color: #04281a; }
.co-page .btn.primary:hover { background: var(--brand-strong); color: #fff; opacity: 1; }
@media (max-width: 380px) { .co-pay { grid-template-columns: 1fr; } .co-qr { max-width: 180px; margin: 0 auto; } }

/* ═════════════════════════ LANDING ═════════════════════════ */
.land-page { background: var(--surface); }
.lp { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.lp-nav { display: flex; justify-content: space-between; align-items: center; height: 68px; gap: 12px; }
.lp-nav nav { display: flex; gap: 6px; align-items: center; }
.lp-nav nav a.link { padding: 8px 10px; color: var(--text-2); text-decoration: none; font-weight: 550; font-size: .93rem; border-radius: 8px; }
.lp-nav nav a.link:hover { color: var(--text); background: var(--surface-2); }
.lp-hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding: 56px 0 72px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 600; color: var(--brand-ink); background: var(--brand-soft); padding: 5px 12px; border-radius: 999px; margin-bottom: 18px; }
.lp-hero h1 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); line-height: 1.05; letter-spacing: -.035em; font-weight: 750; margin-bottom: 18px; }
.lp-hero h1 em { font-style: normal; color: var(--brand-strong); }
.lead { font-size: 1.12rem; color: var(--text-2); max-width: 540px; line-height: 1.6; }
.lp-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.lp-trust { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 26px; font-size: .86rem; color: var(--muted); }
.lp-trust span { display: inline-flex; align-items: center; gap: 6px; }
.lp-trust .ico { width: 16px; height: 16px; color: var(--brand-strong); }
.lp-mock { position: relative; }
.lp-mock .checkout { margin-left: auto; transform: rotate(1.2deg); }
.lp-mock::before { content: ""; position: absolute; inset: 8% -4% -6% 10%; border-radius: 28px; background: var(--brand-soft); z-index: -1; transform: rotate(-3deg); }
.lp-section { padding: 72px 0; border-top: 1px solid var(--border); }
.lp-section h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -.03em; margin-bottom: 10px; }
.lp-section > .lp > p.muted { max-width: 620px; font-size: 1.02rem; }
.lp-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; counter-reset: step; }
.lp-step { padding: 22px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--bg); }
.lp-step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--ink); color: var(--on-ink); font-weight: 700; font-size: .9rem; margin-bottom: 14px; }
.lp-step h3 { margin-bottom: 6px; }
.lp-step p { color: var(--text-2); margin: 0; font-size: .93rem; }
.lp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 32px; }
.lp-feature { padding: 22px; border-radius: var(--r-lg); border: 1px solid var(--border); }
.lp-feature .fi { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-strong); margin-bottom: 14px; }
.lp-feature p { color: var(--text-2); font-size: .92rem; margin: 0; }
.lp-dev { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: center; }
.lp-dev pre { background: #0b1220; color: #d7deea; border: 0; font-size: .82rem; box-shadow: var(--shadow-lg); }
.lp-dev pre .c { color: #7c879a; }
.lp-dev pre .g { color: #6ce9a6; }
.lp-dev ul { padding-left: 0; list-style: none; margin: 18px 0 0; }
.lp-dev li { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; color: var(--text-2); }
.lp-dev li .ico { color: var(--brand-strong); margin-top: 2px; }
.lp-price { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 32px; }
.price-card { padding: 28px; border-radius: var(--r-lg); border: 1px solid var(--border); }
.price-card.main { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.price-card.main .muted { color: inherit; opacity: .7; }
.price-big { font-size: 3rem; font-weight: 750; letter-spacing: -.04em; line-height: 1; margin: 10px 0; }
.price-card ul { list-style: none; padding: 0; margin: 18px 0 0; }
.price-card li { display: flex; gap: 10px; margin: 9px 0; font-size: .94rem; }
.price-card li .ico { color: var(--brand); }
.lp-faq { margin-top: 24px; max-width: 760px; }
.lp-faq details { border-bottom: 1px solid var(--border); padding: 16px 0; }
.lp-faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.lp-faq summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 1.3rem; line-height: 1; }
.lp-faq details[open] summary::after { content: "–"; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq p { color: var(--text-2); margin: 10px 0 0; }
.lp-final { text-align: center; padding: 80px 0; border-top: 1px solid var(--border); }
.lp-final h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); letter-spacing: -.03em; }
.lp-foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 28px 0 40px; border-top: 1px solid var(--border); font-size: .85rem; color: var(--muted); }
.lp-foot a { color: var(--muted); margin-left: 16px; text-decoration: none; }
@media (max-width: 920px) {
  .lp-hero, .lp-dev { grid-template-columns: 1fr; gap: 36px; }
  .lp-mock .checkout { margin: 0 auto; transform: none; }
  .lp-mock::before, [dir="rtl"] .lp-mock::before { inset: 6% 0 -4% 0; transform: none; }
  .lp-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .lp-nav nav a.link:not(.keep) { display: none; }
  .lp-nav nav .btn.ghost { display: none; }
  .lp-steps, .lp-grid, .lp-price { grid-template-columns: 1fr; }
  .lp-hero { padding: 28px 0 48px; }
  .lp-section { padding: 52px 0; }
}

/* ═════════════════════════ DASHBOARD ═════════════════════════ */
.dash { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { background: var(--surface); border-right: 1px solid var(--border); padding: 16px 12px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .logo { padding: 4px 10px 18px; }
.side .nav-label { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 14px 10px 6px; }
.side a.nav { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--text-2); text-decoration: none; font-weight: 550; font-size: .92rem; }
.side a.nav:hover { background: var(--surface-2); color: var(--text); }
.side a.nav.active { background: var(--surface-2); color: var(--text); }
.side a.nav.active .ico { color: var(--brand-strong); }
.side a.nav .count { margin-left: auto; font-size: .72rem; font-weight: 700; background: var(--warn-soft); color: var(--warn); padding: 1px 7px; border-radius: 999px; }
.side .spacer { flex: 1; }
.side .who { display: flex; align-items: center; gap: 10px; padding: 10px; border-top: 1px solid var(--border); margin-top: 8px; }
.side .who .co-avatar { width: 32px; height: 32px; border-radius: 9px; font-size: .85rem; flex: none; }
.side .who div { min-width: 0; flex: 1; }
.side .who strong { display: block; font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side .who span { display: block; font-size: .76rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar { display: none; }
.main { padding: 28px 32px 48px; max-width: 1120px; width: 100%; min-width: 0; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { margin: 0; font-size: 1.55rem; }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: .92rem; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 18px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow-sm); }
.stat-label { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--muted); font-weight: 550; }
.stat-label .ico { width: 16px; height: 16px; }
.stat-value { font-size: 1.65rem; font-weight: 700; margin-top: 8px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: .8rem; color: var(--muted); margin-top: 2px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 22px; margin-bottom: 18px; box-shadow: var(--shadow-sm); }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-head h2 { margin: 0; }
.panel > p.muted { font-size: .9rem; }
.table-wrap { overflow-x: auto; margin: 0 -22px; padding: 0 22px; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
tbody tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--surface-2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.empty { text-align: center; padding: 28px 12px; color: var(--muted); }
.empty .ico { width: 28px; height: 28px; margin-bottom: 8px; opacity: .6; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.row > * { flex: 1 1 180px; }
.row > .btn, .row > .badge { flex: 0 0 auto; }
.onboard { display: grid; gap: 2px; }
.onboard-item { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 12px; text-decoration: none; color: inherit; }
.onboard-item:hover { background: var(--surface-2); color: inherit; }
.onboard-item .dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border-2); display: grid; place-items: center; flex: none; color: transparent; }
.onboard-item.done .dot { background: var(--brand); border-color: var(--brand); color: #fff; }
.onboard-item .dot .ico { width: 14px; height: 14px; stroke-width: 3; }
.onboard-item div { flex: 1; min-width: 0; }
.onboard-item strong { display: block; font-size: .93rem; }
.onboard-item.done strong { color: var(--muted); text-decoration: line-through; }
.onboard-item span { font-size: .82rem; color: var(--muted); }
.progress { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin: 4px 0 10px; }
.progress > i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.secret { display: flex; gap: 8px; align-items: center; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 8px 8px 12px; }
.secret code { flex: 1; word-break: break-all; background: none; padding: 0; }
.banner { display: flex; align-items: center; gap: 10px; background: var(--warn-soft); color: var(--warn); padding: 11px 14px; border-radius: 12px; margin-bottom: 16px; font-size: .9rem; font-weight: 550; }
.banner a { color: inherit; font-weight: 700; }
.banner.bad { background: var(--danger-soft); color: var(--danger); }
.banner .ico { width: 18px; height: 18px; }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 10px 16px; font-size: .9rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-all; }
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-box { width: 100%; max-width: 400px; }
.auth-box > .logo { margin-bottom: 26px; }
.auth .panel { padding: 28px; box-shadow: var(--shadow-lg); }
.auth h1 { font-size: 1.4rem; }
.auth .foot { text-align: center; margin-top: 18px; font-size: .9rem; color: var(--muted); }
.auth .foot a { color: var(--text); font-weight: 600; }
.modal-bg { position: fixed; inset: 0; background: rgba(10, 13, 20, .55); backdrop-filter: blur(2px); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; z-index: 50; overflow-y: auto; animation: fade .15s ease-out; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 24px; width: 100%; max-width: 620px; box-shadow: var(--shadow-lg); animation: rise .18s ease-out; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 12px; }
.modal-head h2 { margin: 0; }
.modal h3 { margin-top: 20px; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; background: var(--ink); color: var(--on-ink); padding: 11px 16px; border-radius: 12px; z-index: 60; font-weight: 600; font-size: .9rem; box-shadow: var(--shadow-lg); max-width: calc(100% - 32px); }
.toast .ico { width: 16px; height: 16px; color: var(--brand); }
.toast.bad { background: var(--danger); color: #fff; }
.toast.bad .ico { color: #fff; }
@media (max-width: 860px) {
  .dash { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 270px; z-index: 40; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .side.open { transform: none; }
  .topbar { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; top: 0; z-index: 30; }
  .main { padding: 20px 16px 40px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dt { margin-top: 10px; }
  .table-wrap { margin: 0 -22px; padding: 0 22px; }
}

/* ═════════════════════════ DOCS ═════════════════════════ */
.docs { max-width: 880px; margin: 0 auto; padding: 0 20px 72px; }
.docs h1 { font-size: 2.2rem; letter-spacing: -.035em; margin-top: 24px; }
.docs h2 { margin-top: 2.4em; padding-top: 1em; border-top: 1px solid var(--border); font-size: 1.35rem; }
.docs table { border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; border-collapse: separate; border-spacing: 0; }
.docs table td, .docs table th { white-space: normal; }
.docs .toc { columns: 2; font-size: .93rem; background: var(--surface-2); border-radius: var(--r); padding: 16px 16px 16px 36px; }
.docs .toc a { text-decoration: none; color: var(--text-2); }
.docs .toc a:hover { color: var(--brand-strong); }
.land-foot { margin-top: 40px; color: var(--muted); font-size: .85rem; }
@media (max-width: 600px) { .docs .toc { columns: 1; } }

/* ═════════════════════════ LANGUAGE MENU (compact pill + dropdown) ═════════════════════════ */
.lang-menu { position: relative; }
.lang-menu > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px;
  border-radius: 999px; background: var(--ink); color: var(--on-ink); font-size: .82rem; font-weight: 600; user-select: none;
}
.lang-menu > summary::-webkit-details-marker { display: none; }
.lang-menu > summary .ico { width: 15px; height: 15px; }
.lang-menu > summary .ico:last-child { width: 13px; height: 13px; opacity: .8; transition: transform .15s; }
.lang-menu[open] > summary .ico:last-child { transform: rotate(180deg); }
.lang-list {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 70; min-width: 190px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg);
}
.lang-list a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: 9px; color: var(--text); text-decoration: none; font-size: .93rem; }
.lang-list a:hover { background: var(--surface-2); color: var(--text); }
.lang-list a.sel { color: var(--brand-strong); font-weight: 600; }
.lang-list a .ico { width: 16px; height: 16px; }
.lang-menu.up .lang-list { top: auto; bottom: calc(100% + 8px); inset-inline-end: auto; inset-inline-start: 0; }
.co-head .lang-menu > summary { height: 30px; padding: 0 10px; background: var(--surface-2); color: var(--text-2); }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 26px; }
.auth-top .logo { margin: 0; }
.side-lang { padding: 6px 10px; }

/* ═════════════════════════ RIGHT-TO-LEFT (Arabic) ═════════════════════════ */
[dir="rtl"] .flip { transform: scaleX(-1); }
[dir="rtl"] th, [dir="rtl"] td { text-align: right; }
[dir="rtl"] td.num, [dir="rtl"] th.num { text-align: left; }
[dir="rtl"] .side { border-right: 0; border-left: 1px solid var(--border); }
[dir="rtl"] .lp-mock .checkout { margin-left: 0; margin-right: auto; transform: rotate(-1.2deg); }
[dir="rtl"] .lp-mock::before { inset: 8% 10% -6% -4%; transform: rotate(3deg); }
[dir="rtl"] .lp-foot a { margin-left: 0; margin-right: 16px; }
[dir="rtl"] details.co-tips ul, [dir="rtl"] .docs .toc { padding-left: 0; padding-right: 18px; }
[dir="rtl"] .co-addr, [dir="rtl"] code, [dir="rtl"] pre { direction: ltr; unicode-bidi: embed; }
[dir="rtl"] .co-addr { text-align: right; }
@media (max-width: 860px) {
  [dir="rtl"] .side { inset: 0 0 0 auto; transform: translateX(100%); }
  [dir="rtl"] .side.open { transform: none; }
}
label.check { display: flex; align-items: center; gap: 10px; font-weight: 500; color: var(--text); cursor: pointer; }
label.check input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--brand-strong); box-shadow: none; }
