/* Partner panel and API documentation (templates/partners/). Its own small file: nothing of the shop's styles applies here. */
:root { --bg: #0b0f19; --panel: #141a2a; --panel2: #1b2336; --line: rgba(255, 255, 255, .08); --text: #f1f4fb; --muted: #97a1b8; --blue: #4f7bff; --green: #2fce96; --red: #f87171; --yellow: #fbbf24;
        --ease: cubic-bezier(.22, .8, .24, 1); }
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; animation-timing-function: var(--ease); }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.8 'Yekan Bakh', Tahoma, sans-serif; }
a { color: #8fb0ff; text-decoration: none; transition: color .16s var(--ease); }
a:hover { color: #b9ceff; }
h1 { margin: 8px 0 16px; font-size: 1.5rem; }
h2 { margin: 0 0 10px; font-size: 1.05rem; }
h3 { margin: 18px 0 6px; font-size: .95rem; }
code { font-family: ui-monospace, Consolas, monospace; font-size: .86em; }
.muted, small { color: var(--muted); }
.muted { font-size: .88rem; }
.strong { font-weight: 700; }

.progress { position: fixed; inset: 0 0 auto; z-index: 20; height: 2px; background: var(--blue); transform: scaleX(0); transform-origin: right; opacity: 0; }
.progress.run { opacity: 1; transform: scaleX(.85); transition: transform 1.2s var(--ease); }
.support-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 14px; padding: 7px 16px; background: rgba(251, 191, 36, .14); color: var(--yellow); font-size: .86rem; }
.support-bar form { margin: 0; }
.support-bar button { padding: 1px 12px; border: 1px solid currentColor; border-radius: 7px; background: none; color: inherit; font: inherit; cursor: pointer; }

.top { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; padding: 10px 20px; background: rgba(11, 15, 25, .86); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
.brand { display: flex; flex-direction: column; max-width: 220px; line-height: 1.3; color: var(--text); font-weight: 800; }
.brand span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.brand small { font-weight: 400; font-size: .72rem; }
.top nav { display: flex; flex-wrap: wrap; gap: 2px; flex: 1; }
.top nav a { position: relative; padding: 5px 12px; border-radius: 8px; color: var(--muted); font-size: .9rem; transition: color .18s var(--ease), background-color .18s var(--ease); }
.top nav a:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.top nav a.on { background: var(--panel2); color: var(--text); }
.out { margin: 0; }
.out button { border: 0; background: none; color: var(--muted); font: inherit; font-size: .88rem; cursor: pointer; transition: color .16s; }
.out button:hover { color: var(--text); }
main { max-width: 1080px; margin: 0 auto; padding: 22px 16px 60px; animation: rise .32s var(--ease) both; }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.card, .stat { animation: rise .36s var(--ease) both; }
.stats .stat:nth-child(2), .two > :nth-child(2) { animation-delay: .04s; }
.stats .stat:nth-child(3) { animation-delay: .08s; }
.stats .stat:nth-child(4) { animation-delay: .12s; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin-bottom: 16px; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.row h1, .row h2 { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { display: flex; flex-direction: column; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; color: var(--text); transition: transform .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease); }
a.stat:hover { transform: translateY(-2px); border-color: rgba(79, 123, 255, .45); box-shadow: 0 8px 22px rgba(0, 0, 0, .25); color: var(--text); }
.stat span { color: var(--muted); font-size: .82rem; }
.stat strong { font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.big { margin: 2px 0 0; font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.big small { font-size: .9rem; font-weight: 400; }

.steps { list-style: none; margin: 10px 0 0; padding: 0; }
.steps li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.steps li > div { flex: 1; display: flex; flex-direction: column; line-height: 1.5; }
.steps small { font-size: .8rem; }
.dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--muted); flex: none; transition: background-color .2s, border-color .2s; }
.steps li.done .dot { background: var(--green); border-color: var(--green); }

table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th { text-align: right; color: var(--muted); font-weight: 500; font-size: .8rem; }
th, td { padding: 8px 6px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background-color .14s; }
tbody tr:hover { background: rgba(255, 255, 255, .025); }
.scroll { overflow-x: auto; }
.nowrap { white-space: nowrap; }
td.in { color: var(--green); }
td.out { color: var(--red); }
.facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 18px; margin: 0 0 12px; font-size: .9rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }

.btn { display: inline-block; padding: 8px 18px; border: 0; border-radius: 9px; background: var(--blue); color: #fff; font: inherit; font-weight: 700; cursor: pointer; transition: transform .14s var(--ease), filter .16s, box-shadow .2s var(--ease); }
.btn:hover { filter: brightness(1.08); color: #fff; box-shadow: 0 6px 16px rgba(79, 123, 255, .28); }
.btn:active { transform: scale(.97); }
.btn.is-busy { opacity: .7; pointer-events: none; }
.btn.ghost { background: var(--panel2); color: var(--text); }
.btn.ghost:hover { box-shadow: none; }
.btn.small { padding: 3px 12px; font-size: .84rem; font-weight: 500; }
.tag { display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: .76rem; white-space: nowrap; background: var(--panel2); color: var(--muted); }
.tag.ok, .tag.completed { background: rgba(47, 206, 150, .14); color: var(--green); }
.tag.pending { background: rgba(251, 191, 36, .14); color: var(--yellow); }
.tag.cancelled { background: rgba(248, 113, 113, .14); color: var(--red); }

.flash { position: fixed; inset-block-end: 20px; inset-inline-start: 20px; z-index: 30; max-width: min(420px, calc(100vw - 40px)); margin: 0; box-shadow: 0 12px 30px rgba(0, 0, 0, .4); }
.note { padding: 11px 14px; margin-bottom: 14px; border-radius: 10px; background: var(--panel2); font-size: .9rem; }
.note.ok { background: rgba(47, 206, 150, .12); }
.note.bad { background: rgba(248, 113, 113, .13); }
.flash { animation: rise .3s var(--ease) both; transition: opacity .4s var(--ease), transform .4s var(--ease); }
.flash.gone { opacity: 0; transform: translateY(10px); pointer-events: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chips a { padding: 2px 12px; border-radius: 999px; background: var(--panel2); color: var(--muted); font-size: .84rem; transition: background-color .16s, color .16s; }
.chips a:hover { color: var(--text); }
.chips a.on { background: var(--blue); color: #fff; }
.pager { display: flex; gap: 14px; justify-content: center; margin-top: 10px; }
.back { display: inline-block; margin-bottom: 8px; font-size: .86rem; }

.form { display: flex; flex-direction: column; gap: 12px; }
.form label { display: flex; flex-direction: column; gap: 4px; font-size: .88rem; }
.form small { font-size: .78rem; }
input, select { width: 100%; padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px; background: rgba(0, 0, 0, .28); color: var(--text); font: inherit; transition: border-color .16s, box-shadow .16s; }
input:focus, select:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(79, 123, 255, .2); }
.inline { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.inline input { flex: 1 1 200px; width: auto; }
.gap { margin-top: 10px; }
.narrow { max-width: 420px; margin: 5vh auto 0; }
.center { text-align: center; margin: 12px 0 0; }

.cred { margin-top: 8px; }
.cred > div { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); }
.cred > div:first-child { border-top: 0; }
.cred span { width: 44px; color: var(--muted); font-size: .82rem; flex: none; }
.cred code { flex: 1; min-width: 0; overflow-wrap: anywhere; text-align: left; }
.cred button { flex: none; padding: 2px 10px; border: 0; border-radius: 7px; background: var(--panel2); color: var(--text); font: inherit; font-size: .8rem; cursor: pointer; transition: background-color .16s; }
.cred button:hover { background: #26304a; }

.field { display: flex; flex-direction: column; gap: 5px; font-size: .88rem; }
.field > span:first-child { font-weight: 700; }
.pass { position: relative; display: block; }
.pass input { padding-inline-end: 62px; }
.show-pass { position: absolute; inset-block: 5px; inset-inline-end: 6px; padding: 0 10px; border: 0; border-radius: 7px; background: var(--panel2); color: var(--muted); font: inherit; font-size: .78rem; cursor: pointer; }
.btn.wide { display: block; width: 100%; padding-block: 11px; text-align: center; }

.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); max-width: 920px; min-height: min(620px, calc(100vh - 80px)); margin: 4vh auto 0; overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 30px 70px rgba(0, 0, 0, .4); animation: rise .45s var(--ease) both; }
.auth-side { position: relative; display: flex; flex-direction: column; justify-content: center; padding: 36px; overflow: hidden; background: linear-gradient(150deg, #1d2a5e, #101528 62%); }
.auth-glow { position: absolute; inset: -30% -30% auto auto; width: 340px; height: 340px; border-radius: 50%; background: radial-gradient(closest-side, rgba(79, 123, 255, .55), transparent); animation: drift 9s ease-in-out infinite alternate; pointer-events: none; }
.auth-side > :not(.auth-glow) { position: relative; }
.auth-brand { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 26px; color: var(--text); font-weight: 800; font-size: 1.05rem; }
.auth-side h2 { margin: 0 0 8px; font-size: 1.5rem; }
.auth-side p { margin: 0 0 22px; color: #b6c0da; font-size: .92rem; }
.auth-side ul { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.auth-side li { display: flex; flex-direction: column; padding-inline-start: 14px; border-inline-start: 2px solid rgba(143, 176, 255, .45); line-height: 1.6; }
.auth-side li span { color: #aab5d1; font-size: .82rem; }
.auth-main { display: flex; flex-direction: column; justify-content: center; padding: 36px; }
.auth-main h1 { margin: 0 0 4px; }
.auth-main .form { margin-top: 18px; }
.auth-main .note { margin: 14px 0 0; }
.auth-row { text-align: left; font-size: .84rem; }
@keyframes drift { from { transform: translate(0, 0); } to { transform: translate(-40px, 30px); } }

.wallet-top { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 16px; }
.wallet-hero { position: relative; overflow: hidden; padding: 24px; border-radius: 18px; background: linear-gradient(140deg, #3451d1, #5b3fd6 58%, #2b2f73); box-shadow: 0 18px 40px rgba(52, 81, 209, .28); animation: rise .4s var(--ease) both; }
.wallet-glow { position: absolute; inset: -40% auto auto -20%; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, .22), transparent); animation: drift 10s ease-in-out infinite alternate; pointer-events: none; }
.wallet-hero > :not(.wallet-glow) { position: relative; }
.wallet-hero > span { color: rgba(255, 255, 255, .78); font-size: .88rem; }
.wallet-hero p { margin: 4px 0 18px; }
.wallet-hero strong { font-size: clamp(1.9rem, 5vw, 2.5rem); font-weight: 900; font-variant-numeric: tabular-nums; }
.wallet-hero p small { color: rgba(255, 255, 255, .78); }
.wallet-sums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.wallet-sums > div { display: flex; flex-direction: column; padding: 9px 10px; border-radius: 11px; background: rgba(255, 255, 255, .12); backdrop-filter: blur(6px); }
.wallet-sums span { color: rgba(255, 255, 255, .76); font-size: .74rem; }
.wallet-sums b { overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.topup { margin-bottom: 0; }
.amounts { display: flex; flex-wrap: wrap; gap: 6px; }
.amounts button { padding: 3px 11px; border: 1px solid var(--line); border-radius: 999px; background: none; color: var(--muted); font: inherit; font-size: .8rem; cursor: pointer; transition: color .16s, border-color .16s, background-color .16s; }
.amounts button:hover { color: var(--text); border-color: var(--blue); }
.amounts button.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.pay-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.pay-card { position: relative; cursor: pointer; }
.pay-card input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.pay-card-face { display: flex; flex-direction: column; gap: 10px; min-height: 72px; padding: 10px 12px; border: 2px solid transparent; border-radius: 12px; background: linear-gradient(135deg, var(--c1, #2a3350), var(--c2, #1b2336)); color: #fff; font-size: .8rem; opacity: .72; transition: opacity .18s, border-color .18s, transform .18s var(--ease); }
.pay-card-face code { margin-top: auto; text-align: left; }
.pay-card input:checked + .pay-card-face { opacity: 1; border-color: #fff; transform: translateY(-1px); }
.pay-card input:focus-visible + .pay-card-face { outline: 2px solid var(--blue); outline-offset: 2px; }
.ledger { margin: 0; padding: 0; list-style: none; }
.ledger li { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-top: 1px solid var(--line); transition: background-color .14s; }
.ledger li:first-child { border-top: 0; }
.ledger li:hover { background: rgba(255, 255, 255, .02); }
.ledger-mark { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; font-weight: 800; }
.ledger-mark.in { background: rgba(47, 206, 150, .14); color: var(--green); }
.ledger-mark.out { background: rgba(248, 113, 113, .13); color: var(--red); }
.ledger-body { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.6; }
.ledger-body small { overflow-wrap: anywhere; }
.ledger-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.6; }
.ledger-side b { font-variant-numeric: tabular-nums; }
.ledger-side b.in { color: var(--green); } .ledger-side b.out { color: var(--red); }
.ledger-side small { font-size: .74rem; }

.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 8px; }
.cat { display: flex; align-items: center; gap: 12px; padding: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; animation: rise .36s var(--ease) both; transition: transform .2s var(--ease), border-color .2s; }
.cat:hover { transform: translateY(-2px); border-color: rgba(79, 123, 255, .45); }
.cat-mark { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, #4f7bff, #7c5cff); color: #fff; font-weight: 800; }

.lang-btns { display: flex; gap: 2px; margin-inline-start: 8px; direction: ltr; }
.lang-btns button { padding: 1px 9px; border: 0; border-radius: 6px; background: none; color: var(--muted); font: inherit; font-size: .74rem; cursor: pointer; transition: color .16s, background-color .16s; }
.lang-btns button:hover { color: var(--text); }
.lang-btns button.on { background: var(--blue); color: #fff; }

.docs { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 32px; align-items: start; }
.docs aside { position: sticky; top: 76px; display: flex; flex-direction: column; font-size: .88rem; }
.docs aside span { margin: 12px 0 4px; color: var(--muted); font-size: .74rem; }
.docs aside a { padding: 3px 10px; border-inline-start: 2px solid var(--line); color: var(--muted); transition: color .16s, border-color .16s; }
.docs aside a:hover, .docs aside a.on { color: var(--text); border-color: var(--blue); }
.docs article { min-width: 0; }
.docs section { padding-top: 12px; margin-top: 24px; border-top: 1px solid var(--line); scroll-margin-top: 64px; }
.docs section:first-of-type { border-top: 0; margin-top: 0; }
.docs h2 { margin: 8px 0 10px; font-size: 1.2rem; }
.lead { color: var(--muted); }
.facts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.facts-grid > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.facts-grid span { color: var(--muted); font-size: .78rem; }
.facts-grid code { overflow-wrap: anywhere; text-align: left; }
.spec { margin: 10px 0 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; border-collapse: separate; border-spacing: 0; overflow: hidden; }
.spec th, .spec td { padding: 9px 12px; vertical-align: top; }
.spec tbody th { width: 120px; color: var(--text); font-weight: 700; }
.ep { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 18px 0 8px; padding: 9px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; direction: ltr; }
.ep code { color: var(--text); font-size: .88rem; overflow-wrap: anywhere; }
.ep-title { margin-inline-start: auto; direction: rtl; color: var(--muted); font-size: .84rem; }
.verb { padding: 1px 9px; border-radius: 6px; font: 700 .72rem ui-monospace, Consolas, monospace; }
.verb.get { background: rgba(47, 206, 150, .14); color: var(--green); }
.verb.post { background: rgba(79, 123, 255, .18); color: #9db8ff; }
.verb.delete { background: rgba(248, 113, 113, .14); color: var(--red); }
.code { margin: 10px 0 14px; overflow: hidden; background: #0d1220; border: 1px solid var(--line); border-radius: 12px; }
.code figcaption { display: flex; align-items: center; gap: 8px; padding: 6px 12px; background: var(--panel); border-bottom: 1px solid var(--line); font-size: .8rem; color: var(--muted); }
.code figcaption em { padding: 0 7px; border-radius: 5px; background: var(--panel2); font-style: normal; font-size: .7rem; direction: ltr; }
.code-copy { margin-inline-start: auto; padding: 1px 10px; border: 1px solid var(--line); border-radius: 7px; background: none; color: var(--muted); font: inherit; font-size: .76rem; cursor: pointer; transition: color .16s, border-color .16s; }
.code-copy:hover { color: var(--text); border-color: var(--blue); }
.code pre { margin: 0; padding: 12px 14px; overflow-x: auto; text-align: left; line-height: 1.65; }
.code pre code { font-size: .82rem; color: #d6def0; white-space: pre; }
.two-code { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 12px; align-items: start; }

@media (max-width: 820px) {
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .two, .docs, .two-code { grid-template-columns: minmax(0, 1fr); }
    .auth, .wallet-top { grid-template-columns: minmax(0, 1fr); }
    .auth-side { padding: 24px; }
    .auth-side ul { display: none; }
    .auth-main { padding: 24px; }
    .code figcaption { flex-wrap: wrap; }
    .facts-grid { grid-template-columns: minmax(0, 1fr); }
    .docs aside { position: static; flex-direction: row; flex-wrap: wrap; gap: 4px; }
    .docs aside span { display: none; }
    .docs aside a { border: 0; padding: 2px 8px; background: var(--panel2); border-radius: 7px; }
}
@media (prefers-reduced-motion: reduce) {
    *, ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
}
