﻿@font-face {
    font-family: Yekan;
    src: url('/font/iranyekan/iranyekanwebregularfanum.woff') format('woff');
    font-display: swap
}

@font-face {
    font-family: Yekan;
    src: url('/font/iranyekan/iranyekanwebboldfanum.woff') format('woff');
    font-weight: 700;
    font-display: swap
}

:root {
    --brand: #1273eb;
    --brand2: #3d8ef5;
    --ink: #172039;
    --muted: #6e7690;
    --line: #e7e9f3;
    --soft: #f5f6fb;
    --ok: #16875b;
    --shadow: 0 24px 70px rgba(14,48,100,.14);
    --radius: 16px;
    --radius-sm: 12px
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    min-height: 100vh;
    background: #f7f8fc;
    color: var(--ink);
    font-family: Yekan,Tahoma,sans-serif;
    direction: rtl
}

button, input, select, textarea {
    font: inherit
}

.reg-shell {
    min-height: 100vh;
    display: grid;
    /*grid-template-columns: minmax(320px,1fr) minmax(520px,1.35fr)*/
}

.reg-aside {
    position: relative;
    overflow: hidden;
    padding: 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 34px;
    color: #fff;
    background: linear-gradient(145deg,#0b4fae,#1273eb 52%,#3d8ef5);
    background-image: radial-gradient(circle at 18% 88%,rgba(255,255,255,.16) 0,transparent 45%), radial-gradient(rgba(255,255,255,.16) 1.4px,transparent 1.4px), linear-gradient(145deg,#0b4fae,#1273eb 52%,#3d8ef5);
    background-size: auto,22px 22px,auto;
    background-position: 0 0,0 0,0 0
}

    .reg-aside:before, .reg-aside:after {
        content: "";
        position: absolute;
        border-radius: 50%;
        background: rgba(255,255,255,.08)
    }

    .reg-aside:before {
        width: 520px;
        height: 520px;
        left: -230px;
        top: -220px
    }

    .reg-aside:after {
        width: 330px;
        height: 330px;
        right: -170px;
        bottom: 70px
    }

.aside-ring {
    position: absolute;
    z-index: 0;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.14)
}

    .aside-ring.r1 {
        width: 260px;
        height: 260px;
        right: 8%;
        top: 14%
    }

    .aside-ring.r2 {
        width: 140px;
        height: 140px;
        left: 10%;
        bottom: 26%;
        border-style: dashed
    }

.brand, .aside-copy, .aside-features, .aside-quote, .trust-list {
    position: relative;
    z-index: 1
}

.aside-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 480px
}

.aside-feature {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 15px 16px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: var(--radius);
    backdrop-filter: blur(8px);
    transition: .2s
}

    .aside-feature:hover {
        background: rgba(255,255,255,.13);
        transform: translateY(-2px)
    }

.aside-feature-ico {
    flex: none;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    font-size: 18px;
    background: rgba(255,255,255,.16);
}

.aside-feature b {
    display: block;
    font-size: 13.5px;
    margin-bottom: 3px
}

.aside-feature small {
    display: block;
    font-size: 11.5px;
    line-height: 1.8;
    color: rgba(255,255,255,.75)
}

.aside-quote {
    max-width: 480px;
    padding: 16px 18px;
    font-size: 13px;
    line-height: 2;
    color: rgba(255,255,255,.92);
    background: rgba(255,255,255,.07);
    border-inline-start: 3px solid rgba(255,255,255,.55);
}

.brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 13px;
    font-size: 22px;
    font-weight: 700
}

.brand-mark {
    width: 46px;
    height: 46px;
    background: #fff;
    color: var(--brand);
    display: grid;
    place-items: center;
    box-shadow: 0 9px 24px rgba(9,40,90,.2)
}

    .brand-mark svg {
        width: 27px
    }

.aside-copy {
    position: relative;
    z-index: 1;
    max-width: 480px
}

    .aside-copy h1 {
        font-size: clamp(30px,4vw,52px);
        line-height: 1.55;
        margin: 0 0 16px
    }

    .aside-copy p {
        line-height: 2;
        font-size: 15px;
        color: rgba(255,255,255,.78);
        margin: 0
    }

.trust-list {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px
}

.trust-pill {
    padding: 9px 12px;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.1);
    border-radius: 999px;
    font-size: 12px;
    backdrop-filter: blur(8px)
}

.reg-main {
    padding: 36px clamp(24px,5vw,72px);
    display: flex;
    align-items: center;
    justify-content: center
}

.reg-card {
    width: min(720px,100%)
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px
}

.login-link {
    color: var(--brand);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    padding: 10px 14px;
    background: #eaf3fe;
    border-radius: 999px;
    transition: .2s
}

    .login-link:hover {
        background: #d6e8fd
    }

.secure-note {
    color: var(--muted);
    font-size: 12px
}

.progress-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 12px
}

    .progress-head strong {
        font-size: 13px
    }

    .progress-head span {
        font-size: 12px;
        color: var(--muted)
    }

.progress-track {
    height: 8px;
    background: #e6ebf3;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: inset 0 1px 2px rgba(23,32,57,.06)
}

.progress-fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg,var(--brand),#4c9bf7);
    transition: width .35s ease
}

/* هیچ مرحله‌ای پیش از اجرای register-intro.js دیده نمی‌شود (قبلاً تا آن لحظه هر سه مرحله روی هم نمایش داده می‌شدند)؛
   showStep فقط مرحلهٔ جاری را با style نمایش می‌دهد. */
.reg-card .stage {
    display: none;
}

.stage {
    background: #fff;
    border: 1px solid rgba(223,224,237,.85);
    border-radius: var(--radius);
    padding: clamp(24px,4vw,42px);
    box-shadow: var(--shadow);
    animation: stageIn .35s ease
}

.reg-disabled-card {
    position: relative;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(223,224,237,.85);
    border-radius: var(--radius);
    padding: clamp(40px,6vw,56px) clamp(24px,4vw,42px);
    box-shadow: var(--shadow);
    text-align: center;
    animation: stageIn .35s ease
}

    .reg-disabled-card::before {
        content: "";
        position: absolute;
        top: -120px;
        inset-inline-start: 50%;
        transform: translateX(-50%);
        width: 360px;
        height: 240px;
        background: radial-gradient(closest-side,rgba(18,115,235,.16),rgba(18,115,235,0));
        pointer-events: none
    }

.reg-disabled-eyebrow {
    position: relative;
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .02em;
    color: var(--brand);
    background: #edf5fe;
    padding: 5px 14px;
    border-radius: 999px;
    margin-bottom: 18px
}

.reg-disabled-icon {
    position: relative;
    width: 72px;
    height: 72px;
    margin: 0 auto 22px;
    border-radius: 50%;
    background: linear-gradient(135deg,var(--brand),var(--brand2));
    box-shadow: 0 14px 28px rgba(18,115,235,.3);
    color: #fff;
    display: grid;
    place-items: center;
    animation: regDisabledPulse 2.6s ease-in-out infinite
}

    .reg-disabled-icon svg {
        width: 32px;
        height: 32px
    }

@keyframes regDisabledPulse {
    0%, 100% {
        box-shadow: 0 14px 28px rgba(18,115,235,.3),0 0 0 0 rgba(18,115,235,.22)
    }

    50% {
        box-shadow: 0 14px 28px rgba(18,115,235,.3),0 0 0 10px rgba(18,115,235,0)
    }
}

.reg-disabled-card h2 {
    position: relative;
    font-size: 23px;
    margin: 0 0 10px
}

.reg-disabled-card .lead {
    position: relative;
    max-width: 380px;
    margin: 0 auto 28px
}

.reg-disabled-actions {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px
}

.reg-disabled-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    padding-inline: 36px
}

.ajax-loading {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(24, 30, 61, .22);
    backdrop-filter: blur(5px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}

    .ajax-loading.is-visible {
        opacity: 1;
        pointer-events: all;
    }

.ajax-loading-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 24px;
    border: 1px solid rgba(255,255,255,.65);
    background: rgba(255,255,255,.94);
    color: #26345f;
    box-shadow: 0 18px 55px rgba(47, 59, 117, .22);
    font-weight: 700;
}

.ajax-loading-texts {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .ajax-loading-texts small {
        color: #6b7394;
        font-size: 12.5px;
        font-weight: 500;
    }

        .ajax-loading-texts small:empty {
            display: none;
        }

.ajax-loading.is-success .ajax-loading-texts [data-loading-text] {
    color: #15803d;
}

.ajax-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #dbe9fd;
    border-top-color: #1273eb;
    border-radius: 50%;
    animation: ajaxSpin .75s linear infinite;
}

@keyframes ajaxSpin {
    to {
        transform: rotate(360deg);
    }
}

.terms-accept {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 14px 0;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.9;
}

    .terms-accept input[type="checkbox"] {
        flex: none;
        width: 17px;
        height: 17px;
        margin-top: 2px;
        accent-color: var(--brand);
    }

    .terms-accept label {
        cursor: pointer;
    }

.terms-more-link {
    display: inline;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--brand);
    font-weight: 700;
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
}

.terms-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}

    .terms-modal.is-open {
        opacity: 1;
        pointer-events: all;
    }

.terms-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(24, 30, 61, .45);
    backdrop-filter: blur(3px);
}

.terms-modal-dialog {
    position: relative;
    width: min(560px, 100%);
    max-height: min(640px, 90vh);
    display: flex;
    flex-direction: column;
    background: #fff;
    box-shadow: 0 24px 70px rgba(14, 48, 100, .28);
}

.terms-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--line);
}

    .terms-modal-header h3 {
        margin: 0;
        font-size: 15px;
        color: var(--ink);
    }

.terms-modal-close {
    flex: none;
    width: 30px;
    height: 30px;
    border: 0;
    background: var(--soft);
    color: var(--muted);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

    .terms-modal-close:hover {
        background: #e6f1fe;
        color: var(--brand);
    }

.terms-modal-body {
    padding: 18px 22px;
    overflow-y: auto;
    font-size: 13px;
    line-height: 2;
    color: var(--ink);
}

@keyframes stageIn {
    from {
        opacity: 0;
        transform: translateY(9px)
    }

    to {
        opacity: 1;
        transform: none
    }
}

.eyebrow {
    font-size: 12px;
    font-weight: 700;
    color: var(--brand);
    margin-bottom: 8px
}

.stage h2 {
    font-size: 24px;
    margin: 0 0 8px
}

.lead {
    font-size: 13px;
    line-height: 2;
    color: var(--muted);
    margin: 0 0 26px
}

.reg-field {
    margin-bottom: 18px
}

    .reg-field.spaced {
        margin-top: 18px
    }

    .reg-field label {
        display: flex;
        justify-content: space-between;
        font-size: 13px;
        font-weight: 700;
        margin-bottom: 8px
    }

.optional {
    font-weight: 400;
    color: #9aa0b5;
    font-size: 11px
}

.reg-input, .reg-select, .reg-textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #f9fbff;
    color: var(--ink);
    padding: 13px 15px;
    outline: 0;
    transition: .2s;
    direction: rtl
}

.ltr {
    direction: ltr;
    text-align: left
}

.reg-input:focus, .reg-select:focus, .reg-textarea:focus {
    border-color: var(--brand);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(18,115,235,.1)
}

.reg-textarea {
    min-height: 88px;
    resize: vertical
}

.hint {
    font-size: 11px;
    color: var(--muted);
    line-height: 1.8
}

.actions {
    display: flex;
    gap: 10px;
    margin-top: 24px
}

.reg-btn {
    border: 0;
    border-radius: var(--radius-sm);
    padding: 13px 20px;
    cursor: pointer;
    font-weight: 700;
    transition: .2s
}

.reg-btn-primary {
    color: #fff;
    /* همان آبی دکمه‌های اصلی بقیهٔ پروژه (btn-primary) */
    background: #1273eb;
    box-shadow: 0 10px 20px rgba(18,115,235,.25);
    flex: 1
}

    .reg-btn-primary:hover {
        transform: translateY(-1px);
        background: #0f63cc;
        box-shadow: 0 13px 26px rgba(18,115,235,.32)
    }

.reg-btn-secondary {
    color: var(--ink);
    background: #f1f2f7
}

.reg-btn-link {
    color: var(--brand);
    background: transparent;
    padding-inline: 8px
}

.reg-btn.full {
    width: 100%
}

.reg-alert {
    padding: 12px 14px;
    font-size: 12px;
    line-height: 1.8;
    margin-bottom: 18px;
}

.reg-alert-error {
    color: #9e243c;
    background: #fff0f3;
    border: 1px solid #ffd6de;
    border-radius: var(--radius-sm);
    padding: 10px;
}

.reg-alert-success {
    color: #08734a;
    background: #ecfbf5;
    border: 1px solid #c7f1df;
    border-radius: var(--radius-sm);
    padding: 10px;
}

.phone-preview {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px 12px;
    padding: 12px 14px;
    background: var(--soft);
    border-radius: var(--radius-sm);
    margin-bottom: 18px
}

.phone-preview-label {
    grid-column: 1;
    justify-self: start;
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
}

.phone-preview-number {
    grid-column: 2;
    justify-self: center;
    min-width: 0;
    direction: ltr;
    unicode-bidi: plaintext;
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
    white-space: nowrap;
}

.phone-preview-edit {
    grid-column: 3;
    justify-self: end;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .phone-preview {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .phone-preview-label,
    .phone-preview-number,
    .phone-preview-edit {
        grid-column: 1;
        justify-self: center;
    }

    /* فاصلهٔ حروف فقط روی شماره؛ روی متن فارسی اتصال حروف را می‌شکست و فونت ناآشنا دیده می‌شد */
    .phone-preview-number {
        letter-spacing: 3px;
    }
}

.otp-grid {
    display: flex;
    direction: ltr;
    justify-content: center;
    gap: 10px;
    margin: 24px 0
}

/* هفت خانه همیشه در عرض کارت جا می‌شوند: در صفحهٔ کوچک باریک‌تر می‌شوند به‌جای بیرون زدن از دو طرف */
.otp-box {
    flex: 1 1 0;
    min-width: 0;
    max-width: 56px;
    width: 56px;
    height: 62px;
    padding: 0;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #f9fbff;
    outline: 0
}

    .otp-box:focus {
        border-color: var(--brand);
        box-shadow: 0 0 0 4px rgba(18,115,235,.1);
        background: #fff
    }

.otp-source {
    position: absolute !important;
    opacity: 0 !important;
    pointer-events: none !important
}

.otp-tools {
    display: flex;
    justify-content: center;
    gap: 6px;
    align-items: center;
    font-size: 12px;
    color: var(--muted)
}

.otp-countdown {
    font-size: 11px;
    color: var(--muted);
    direction: ltr
}

.reg-btn:disabled {
    opacity: .55;
    cursor: not-allowed
}

.reg-btn-link:disabled {
    background: transparent;
    color: #b7bccf
}

.choice-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px
}

.choice {
    position: relative
}

    .choice input {
        position: absolute;
        opacity: 0
    }

    .choice label {
        display: block;
        border: 1px solid var(--line);
        border-radius: var(--radius-sm);
        padding: 17px;
        cursor: pointer;
        transition: .2s;
        background: #fff
    }

    .choice strong {
        display: block;
        margin-bottom: 5px
    }

    .choice small {
        color: var(--muted);
        line-height: 1.8
    }

    .choice input:checked + label {
        border-color: var(--brand);
        background: #f2f7ff;
        box-shadow: inset 0 0 0 1px var(--brand)
    }

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px
}

.legal-fields {
    display: none;
    margin-top: 18px
}

.summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px
}

.summary-item {
    padding: 13px 14px;
    background: var(--soft);
    border-radius: var(--radius-sm)
}

    .summary-item span {
        display: block;
        color: var(--muted);
        font-size: 11px;
        margin-bottom: 4px
    }

    .summary-item b {
        font-size: 13px
    }

.verify-banner {
    display: flex;
    gap: 11px;
    align-items: center;
    padding: 14px;
    background: #ecfbf5;
    color: #08734a;
    border-radius: var(--radius-sm);
    margin-bottom: 20px
}

.verify-icon {
    width: 38px;
    height: 38px;
    background: #fff;
    display: grid;
    place-items: center;
    font-size: 19px
}

.verify-banner b {
    display: block;
    font-size: 13px
}

.verify-banner small {
    opacity: .78
}

.info-box {
    padding: 14px;
    border: 1px dashed #c3dbfa;
    border-radius: var(--radius-sm);
    background: #f7faff;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.9;
    margin-bottom: 18px
}

    .info-box b {
        display: block;
        color: var(--ink)
    }

.done {
    text-align: center
}

.done-mark {
    width: 76px;
    height: 76px;
    margin: 0 auto 18px;
    background: #e9fbf3;
    color: var(--ok);
    display: grid;
    place-items: center;
    font-size: 36px
}

.done-link {
    display: inline-block;
    text-decoration: none;
    margin-top: 14px
}

.footer-note {
    text-align: center;
    color: #9aa0b5;
    font-size: 11px;
    margin-top: 18px
}

@media(max-width:980px) {
    .reg-shell {
        display: block
    }

    .reg-aside {
        min-height: auto;
        padding: 24px
    }

    .aside-copy, .aside-features, .aside-quote, .aside-ring {
        display: none
    }

    .trust-list {
        margin-top: 30px
    }

    .reg-main {
        padding: 28px 18px
    }

    .reg-card {
        max-width: 680px;
        margin: auto
    }
}

@media(max-width:560px) {
    .reg-aside {
        padding: 18px 20px
    }

    .trust-pill:nth-child(n+3) {
        display: none
    }

    .topbar {
        margin-bottom: 18px
    }

    .stage {
        padding: 24px 18px;
    }

        .stage h2 {
            font-size: 21px
        }

    .grid-2, .summary, .choice-grid {
        grid-template-columns: 1fr
    }

    .otp-grid {
        gap: 6px
    }

    .otp-box {
        height: 54px;
        font-size: 22px
    }

    .actions {
        flex-wrap: wrap
    }

    .reg-btn-secondary {
        order: 2
    }

    .secure-note {
        display: none
    }
}

/* درخواستِ صریحِ کاربر: هیچ گوشه‌ای در کل صفحاتِ پیش‌ثبت‌نام نباید گرد باشد. این override به‌جای
   صفر کردنِ تک‌تکِ قانون‌های border-radius (که همیشه یکی جا می‌ماند)، همه را یک‌جا خنثی می‌کند. */
* {
    border-radius: 0 !important;
}

/* شمارش معکوسِ محدودیت‌های زمانی روی دکمه (js/register-cooldown.js) */
.is-cooling-down {
    cursor: not-allowed !important;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
