/*
    همکاران — فرمِ ثبت‌نام، ورود با کدِ پیامکی، و صفحه‌ی عملکرد.

    توکن‌ها از base.css می‌آیند و این فایل هیچ رنگِ تازه‌ای تعریف نمی‌کند: یک
    هگزِ دستی اینجا یعنی صفحه‌ای که در حالتِ تیره یا در بازطراحیِ بعدی جا می‌ماند.

    بازاریاب این صفحه‌ها را سرِ پا و روی گوشی باز می‌کند — بینِ دو مغازه. پس
    موبایل حالتِ اصلی است، ورودی‌ها بلندتر از ۴۴ پیکسل‌اند، و جدول‌ها روی صفحه‌ی
    باریک به فهرست تبدیل می‌شوند.
*/

.pt-page {
    min-height: 100dvh;
    background: var(--am-bg);
    color: var(--am-text);
    font-family: var(--am-font);

    /* ۱۶ پیکسل: زیرِ این، سافاریِ iOS هر ورودی را بزرگ‌نمایی می‌کند */
    font-size: var(--am-text-md);
    line-height: 1.7;
}

.pt-wrap {
    max-width: 640px;
    margin: 0 auto;
    padding: var(--am-space-6) var(--am-space-4) 64px;
}

.pt-wrap--wide { max-width: 960px; }

/* ── سربرگ ──────────────────────────────────────────────────────────────── */

.pt-head {
    display: flex;
    align-items: center;
    gap: var(--am-space-3);
    margin-bottom: var(--am-space-5);
}

.pt-head__text { flex: 1; min-width: 0; }

.pt-mark {
    width: 40px;
    height: 40px;
    flex: none;
    color: var(--am-primary);
}

.pt-title {
    margin: 0;
    font-size: var(--am-text-xl);
    font-weight: 700;
}

.pt-sub {
    margin: 2px 0 0;
    color: var(--am-muted);
    font-size: var(--am-text-sm);
}

/* ── کارت ───────────────────────────────────────────────────────────────── */

.pt-card {
    background: var(--am-surface);
    border: 1px solid var(--am-border-soft);
    border-radius: var(--am-radius-lg);
    box-shadow: var(--am-shadow-sm);
    padding: var(--am-space-5);
    margin-bottom: var(--am-space-4);
}

.pt-card__title {
    margin: 0 0 var(--am-space-3);
    font-size: var(--am-text-lg);
    font-weight: 600;
}

.pt-lead {
    margin: 0 0 var(--am-space-4);
    color: var(--am-muted);
}

.pt-points {
    margin: 0 0 var(--am-space-4);
    padding-inline-start: var(--am-space-5);
}

.pt-points li + li { margin-top: var(--am-space-2); }

.pt-note {
    margin: var(--am-space-4) 0 0;
    color: var(--am-muted);
    font-size: var(--am-text-sm);
}

/* یادداشتِ کوچک و پاراگرافِ بعدی، دو حرفِ جدا — نه یک بلوکِ چسبیده */
.pt-note + .pt-lead { margin-top: var(--am-space-4); }

.pt-note a { color: var(--am-primary); }

/* ── فرم ────────────────────────────────────────────────────────────────── */

.pt-form {
    display: flex;
    flex-direction: column;
    gap: var(--am-space-4);
}

.pt-fieldset {
    border: 0;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--am-space-4);
}

.pt-legend {
    padding: 0;
    margin-bottom: var(--am-space-1);
    font-weight: 600;
    font-size: var(--am-text-md);
}

.pt-field {
    display: flex;
    flex-direction: column;
    gap: var(--am-space-1);
    min-width: 0;
}

.pt-label {
    font-size: var(--am-text-sm);
    font-weight: 500;
}

.pt-required {
    color: var(--am-negative);
    margin-inline-start: 2px;
}

.pt-input,
.pt-select,
.pt-textarea {
    font: inherit;
    font-size: var(--am-text-md);
    color: var(--am-text);
    background: var(--am-surface);
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius);
    min-height: 48px;
    padding: 0 var(--am-space-3);
    width: 100%;
    box-sizing: border-box;
}

.pt-textarea {
    min-height: 88px;
    padding: var(--am-space-2) var(--am-space-3);
    resize: vertical;
}

.pt-input:hover,
.pt-select:hover,
.pt-textarea:hover { border-color: var(--am-primary); }

/* شماره، شبا و کد لاتین‌اند؛ در جریانِ راست‌به‌چپ از چپ خوانده می‌شوند */
.pt-ltr {
    direction: ltr;
    text-align: left;
    font-family: var(--am-font-mono);
    letter-spacing: 0.02em;
}

.pt-input--invalid {
    border-color: var(--am-negative);
    background: var(--am-negative-soft);
}

.pt-help {
    font-size: var(--am-text-xs);
    color: var(--am-muted);
}

/* خطا زیرِ همان فیلد، با نشانه‌ی متنی — رنگ تنها نشانه نیست */
.pt-error {
    font-size: var(--am-text-sm);
    color: var(--am-negative);
}

.pt-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--am-space-4);
}

@media (min-width: 560px) {
    .pt-row { grid-template-columns: 1fr 1fr; }
}

/*
    تله‌ی ربات. از دیدِ آدم و صفحه‌خوان بیرون است (aria-hidden و tabindex منفی
    روی خودِ ورودی)؛ ربات‌ها پرش می‌کنند. display:none نه، چون بعضی ربات‌ها
    فیلدِ پنهان با آن را می‌شناسند و رد می‌شوند.
*/
.pt-trap {
    position: absolute;
    inset-inline-start: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ── دکمه ───────────────────────────────────────────────────────────────── */

.pt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--am-space-2);
    min-height: 48px;
    padding: 0 var(--am-space-5);
    font: inherit;
    font-weight: 600;
    color: var(--am-text);
    background: var(--am-surface);
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius);
    cursor: pointer;
    text-decoration: none;
    box-sizing: border-box;
}

.pt-btn:hover {
    background: var(--am-sunken);
    text-decoration: none;
}

.pt-btn--primary {
    background: var(--am-primary);
    border-color: var(--am-primary);
    color: var(--am-on-primary);
}

.pt-btn--primary:hover { background: var(--am-primary-hover); }

.pt-btn--block { width: 100%; }

.pt-btn--sm {
    min-height: 36px;
    padding: 0 var(--am-space-3);
    font-size: var(--am-text-sm);
}

.pt-inline { display: inline; }

/* ── پیام ───────────────────────────────────────────────────────────────── */

.pt-flash {
    display: flex;
    align-items: flex-start;
    gap: var(--am-space-2);
    padding: var(--am-space-3) var(--am-space-4);
    border-radius: var(--am-radius);
    margin-bottom: var(--am-space-4);
    font-size: var(--am-text-sm);
}

.pt-flash--bad {
    background: var(--am-negative-soft);
    border: 1px solid var(--am-negative);
    color: var(--am-negative);
}

.pt-flash--ok {
    background: var(--am-positive-soft);
    border: 1px solid var(--am-positive);
    color: var(--am-positive);
}

.pt-flash__icon {
    width: 18px;
    height: 18px;
    flex: none;
    margin-top: 3px;
}

.pt-flash ul {
    margin: var(--am-space-1) 0 0;
    padding-inline-start: var(--am-space-4);
}

.pt-flash a { color: inherit; }

/* ── عدد‌ها ─────────────────────────────────────────────────────────────── */

.pt-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--am-space-3);
    margin-bottom: var(--am-space-4);
}

@media (min-width: 720px) {
    .pt-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.pt-stat {
    background: var(--am-surface);
    border: 1px solid var(--am-border-soft);
    border-radius: var(--am-radius-lg);
    padding: var(--am-space-3) var(--am-space-4);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pt-stat__label {
    color: var(--am-muted);
    font-size: var(--am-text-sm);
}

.pt-stat__value {
    font-size: var(--am-text-xl);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.pt-stat__note {
    color: var(--am-muted);
    font-size: var(--am-text-xs);
}

.pt-stat--accent .pt-stat__value { color: var(--am-primary); }

/* ── کدِ همکاری ─────────────────────────────────────────────────────────── */

.pt-code {
    margin: 0 0 var(--am-space-2);
    direction: ltr;
    text-align: center;
    font-family: var(--am-font-mono);
    font-size: var(--am-text-2xl);
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--am-primary);
}

.pt-link {
    display: block;
    direction: ltr;
    text-align: center;
    word-break: break-all;
    font-size: var(--am-text-sm);
    color: var(--am-muted);
}

/* ── جدول ───────────────────────────────────────────────────────────────── */

.pt-table-wrap { overflow-x: auto; }

.pt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--am-text-sm);
}

.pt-table th,
.pt-table td {
    padding: var(--am-space-2) var(--am-space-3);
    border-bottom: 1px solid var(--am-border-soft);
    text-align: start;
    vertical-align: top;
}

.pt-table thead th {
    color: var(--am-muted);
    font-weight: 500;
    white-space: nowrap;
}

/* ستونِ مبلغ: راست‌چین در جریانِ راست‌به‌چپ یعنی «انتها»، با ارقامِ هم‌پهنا */
.pt-num {
    text-align: end;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.pt-table th.pt-num,
.pt-table td.pt-num { text-align: end; }

.pt-empty {
    margin: 0;
    color: var(--am-muted);
    text-align: center;
    padding: var(--am-space-4) 0;
}

/*
    روی گوشی، هر ردیف یک کارتِ کوچک می‌شود: جدولِ پنج‌ستونه در ۳۶۰ پیکسل یا
    لغزشِ افقی می‌خواهد یا ستون‌هایی که یک حرف در هر خط دارند.
*/
@media (max-width: 559px) {
    .pt-table--stack thead { display: none; }

    .pt-table--stack tr {
        display: block;
        padding: var(--am-space-2) 0;
        border-bottom: 1px solid var(--am-border-soft);
    }

    .pt-table--stack th,
    .pt-table--stack td {
        display: flex;
        justify-content: space-between;
        gap: var(--am-space-3);
        border: 0;
        padding: 2px 0;
    }

    .pt-table--stack td::before {
        content: attr(data-label);
        color: var(--am-muted);
    }
}

/* ── برچسبِ وضعیت ───────────────────────────────────────────────────────── */

.pt-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--am-space-1);
    padding: 0 var(--am-space-2);
    border-radius: 999px;
    font-size: var(--am-text-xs);
    line-height: 22px;
    white-space: nowrap;
    background: var(--am-sunken);
    color: var(--am-muted);
}

.pt-pill--ok {
    background: var(--am-positive-soft);
    color: var(--am-positive);
}

.pt-pill--wait {
    background: var(--am-warning-soft);
    color: var(--am-warning);
}

/* ── پانویس ─────────────────────────────────────────────────────────────── */

.pt-foot {
    margin-top: var(--am-space-5);
    color: var(--am-muted);
    font-size: var(--am-text-sm);
    text-align: center;
}

.pt-foot a { color: var(--am-primary); }

.pt-dl {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: var(--am-space-2) var(--am-space-4);
    margin: 0;
    font-size: var(--am-text-sm);
}

.pt-dl dt { color: var(--am-muted); }

.pt-dl dd { margin: 0; min-width: 0; word-break: break-word; }


/* ── ابزارِ فروش: کیوآر و متنِ آماده ────────────────────────────────────── */

.pt-kit {
    display: flex;
    flex-wrap: wrap;
    gap: var(--am-space-4);
    align-items: center;
    margin-bottom: var(--am-space-4);
}

.pt-kit__text {
    flex: 1 1 14rem;
    min-width: 0;
}

/* پس‌زمینه‌ی سفید حتی در حالتِ تیره: دوربینِ گوشی کیوآرِ معکوس را دیرتر می‌خواند. */
.pt-qr {
    display: block;
    width: 12.5rem;
    height: 12.5rem;
    padding: var(--am-space-2);
    border-radius: var(--am-radius);
    background: var(--am-paper);
}

/* ── مسیرِ مغازه‌ها ────────────────────────────────────────────────────── */

.pt-funnel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
    gap: var(--am-space-2);
}

.pt-funnel__step {
    display: flex;
    flex-direction: column;
    gap: var(--am-space-1);
    padding: var(--am-space-3);
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius);
}

.pt-funnel__step--ok {
    border-color: var(--am-positive);
}

.pt-funnel__value {
    font-size: var(--am-text-xl);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.pt-funnel__label {
    font-size: var(--am-text-sm);
    color: var(--am-muted);
}

/* ── کارتِ چاپی ────────────────────────────────────────────────────────── */

.pt-print {
    max-width: 22rem;
    margin: 0 auto;
    padding: var(--am-space-6);
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius-lg);
    background: var(--am-paper);
    color: var(--am-ink);
    text-align: center;
}

.pt-print__brand {
    margin: 0;
    font-size: var(--am-text-2xl);
    font-weight: 800;
}

.pt-print__pitch {
    margin: var(--am-space-2) 0 var(--am-space-4);
    line-height: 1.8;
}

.pt-print .pt-qr {
    margin: 0 auto var(--am-space-3);
}

.pt-print__by {
    margin: var(--am-space-3) 0 0;
    font-size: var(--am-text-sm);
}

@media print {
    .pt-noprint {
        display: none !important;
    }

    .pt-print {
        border: 0;
    }
}
