/* ============================================================
   Zpro Design System — پایه (نسخه 1.0.0)
   RTL-first · موبایل‌اول · بدون هیچ وابستگی خارجی
   ============================================================ */

:root {
    /* رنگ‌ها */
    --bg:            #f4f6fa;
    --card:          #ffffff;
    --text:          #17233b;
    --muted:         #5c6b84;
    --line:          #e3e8f0;
    --primary:       #2563eb;
    --primary-dark:  #1d4ed8;
    --primary-soft:  #eaf0fe;
    --ok:            #16a34a;
    --ok-soft:       #e8f8ee;
    --err:           #dc2626;
    --err-soft:      #fdecec;
    --warn:          #b45309;
    --warn-soft:     #fdf3e3;

    /* شکل */
    --radius:   14px;
    --radius-s: 10px;
    --shadow:   0 1px 3px rgba(23, 35, 59, .07), 0 10px 28px rgba(23, 35, 59, .06);

    /* تایپوگرافی */
    --font: "Vazirmatn", Vazirmatn, Tahoma, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 15.5px;
    line-height: 1.75;
    background: var(--bg);
    color: var(--text);
}

/* ---------- چیدمان ---------- */

.page {
    max-width: 780px;
    margin: 0 auto;
    padding: 28px 16px 48px;
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 26px;
    margin-bottom: 18px;
}

.center { text-align: center; }

/* ---------- تایپوگرافی ---------- */

h1 { font-size: 1.45rem; margin: 0 0 6px; }
h2 { font-size: 1.15rem; margin: 0 0 8px; }
p  { margin: 8px 0; }

.muted { color: var(--muted); }
.small { font-size: .85rem; }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* ---------- دکمه‌ها ---------- */

.btn {
    display: inline-block;
    padding: 10px 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-s);
    background: var(--card);
    color: var(--text);
    font-family: inherit;
    font-size: .95rem;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}

.btn:hover { background: #f6f8fc; }

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }

.btn-outline {
    background: transparent;
    border-color: var(--primary);
    color: var(--primary);
}

.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); }

.btn[disabled] {
    opacity: .55;
    cursor: not-allowed;
}

/* ---------- فرم‌ها ---------- */

.field { margin-bottom: 14px; }

.field label {
    display: block;
    font-size: .9rem;
    margin-bottom: 4px;
    font-weight: 600;
}

.field input,
.field select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-s);
    font-family: inherit;
    font-size: .95rem;
    background: #fbfcfe;
    color: var(--text);
}

.field input:focus {
    outline: 2px solid var(--primary-soft);
    border-color: var(--primary);
}

/* تله‌ی ربات — از دید انسان پنهان */
.hp {
    position: absolute;
    right: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ---------- پیام‌ها ---------- */

.flash {
    border-radius: var(--radius-s);
    padding: 10px 14px;
    margin: 10px 0;
    font-size: .92rem;
}

.flash-error { background: var(--err-soft);  color: var(--err);  border: 1px solid #f6caca; }
.flash-ok    { background: var(--ok-soft);   color: var(--ok);   border: 1px solid #bfe8cd; }
.flash-warn  { background: var(--warn-soft); color: var(--warn); border: 1px solid #f0d9ab; }

/* ---------- چک‌لیست نصب ---------- */

.checklist {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
}

.checklist td {
    padding: 8px 6px;
    border-bottom: 1px solid var(--line);
    font-size: .93rem;
}

.checklist tr:last-child td { border-bottom: none; }

.check {
    width: 34px;
    text-align: center;
    font-weight: 700;
    border-radius: 8px;
}

.check-ok  { color: var(--ok); }
.check-bad { color: var(--err); }

/* ---------- خلاصه‌ی نصب ---------- */

.summary {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
}

.summary td {
    padding: 8px 6px;
    border-bottom: 1px solid var(--line);
    font-size: .93rem;
}

.summary tr:last-child td { border-bottom: none; }
.summary td:first-child { color: var(--muted); width: 130px; }

/* ---------- گام‌های نصب ---------- */

.steps {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
}

.step {
    flex: 1;
    text-align: center;
    font-size: .82rem;
    padding: 7px 4px;
    border-radius: 999px;
    background: #e9edf5;
    color: var(--muted);
}

.step.active {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
}

.step.done {
    background: var(--ok-soft);
    color: var(--ok);
}

/* ---------- اجزای خاص ---------- */

.hero { padding: 36px 20px; }

.logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 10px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.err-code {
    font-size: 3.6rem;
    font-weight: 800;
    color: #c6cede;
    line-height: 1.2;
}

.big-ok {
    width: 72px;
    height: 72px;
    margin: 4px auto 10px;
    border-radius: 50%;
    background: var(--ok-soft);
    color: var(--ok);
    font-size: 2.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.token-box {
    direction: ltr;
    text-align: center;
    font-family: Consolas, Monaco, monospace;
    font-size: .95rem;
    background: #101a2e;
    color: #9fe8b5;
    border-radius: var(--radius-s);
    padding: 14px 10px;
    margin: 10px 0 14px;
    user-select: all;
    word-break: break-all;
}

/* ---------- موبایل ---------- */

@media (max-width: 480px) {
    .card { padding: 18px; }
    .steps { flex-direction: column; }
}

/* ---------- مرکز به‌روزرسانی ---------- */

.row-between {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.field input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 1px dashed var(--line);
    border-radius: var(--radius-s);
    background: #fbfcfe;
    font-family: inherit;
}

/* جدول نتایج تست خودکار */
.tests {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
}

.tests td {
    padding: 9px 8px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
    font-size: .93rem;
}

.tests tr:last-child td { border-bottom: none; }

.t-icon {
    width: 36px;
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
}

.t-pass { color: var(--ok); }
.t-fail { color: var(--err); }
.t-warn { color: var(--warn); }

/* ---------- کپچا ---------- */

.captcha-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.captcha-row img {
    border: 1px solid var(--line);
    border-radius: var(--radius-s);
    background: var(--bg);
}

.captcha-row input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-s);
    font-family: inherit;
    font-size: .95rem;
    background: #fbfcfe;
}
