/* static/css/auth-login.css */
/* استایل صفحه‌ی ورود خریدار و تأمین‌کننده */

:root {
    --navy: #16324F;
    --navy-2: #224A71;
    --teal: #0F6668;
    --teal-2: #198084;
    --gold: #C99635;
    --bg: #F5F6F8;
    --surface: #FFFFFF;
    --surface-soft: #F8FAFB;
    --muted: #667085;
    --muted-2: #7D8895;
    --text: #1F2937;
    --border: #DCE4EA;
    --border-soft: #EDF2F6;
    --error: #C74747;
    --success: #1F8A5B;
    --shadow: 0 22px 54px rgba(15, 23, 42, .08);
}

* {
    box-sizing: border-box
}

html,
body {
    margin: 0;
    min-height: 100%
}

body {
    font-family: "Vazirmatn", Tahoma, Arial, sans-serif;
    direction: rtl;
    background:
        radial-gradient(circle at 100% 0%, rgba(22, 50, 79, .05), transparent 26%),
        radial-gradient(circle at 0% 100%, rgba(15, 102, 104, .05), transparent 22%),
        linear-gradient(180deg, #F9FAFB 0%, #F4F6F8 100%);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button,
input {
    font: inherit
}

button {
    cursor: pointer
}

a {
    color: inherit;
    text-decoration: none
}

.hidden {
    display: none !important
}

.page {
    min-height: 100vh;
    display: grid;
    grid-template-rows: 70px 1fr auto
}

.topbar {
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(220, 228, 234, .9);
    display: flex;
    align-items: center;
}

.topbar-inner {
    width: min(1180px, calc(100% - 32px));
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.logo-wrap img {
    width: 156px;
    height: 54px;
    object-fit: contain;
    display: block;
    mix-blend-mode: multiply;
    transition: .15s ease;
}

.logo-wrap a:hover img {
    transform: scale(1.015)
}

.logo-fallback {
    font-size: 23px;
    font-weight: 900;
    color: var(--navy)
}

.back-link {
    border: 0;
    background: transparent;
    color: #5D6A77;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
}

.back-link:hover {
    background: #F1F4F7;
    color: var(--navy)
}

.stage {
    width: min(1180px, calc(100% - 32px));
    margin: auto;
    padding: 24px 0;
    display: grid;
    place-items: center
}

.auth-shell {
    width: 100%;
    max-width: 1100px;
    min-height: 650px;
    display: grid;
    grid-template-columns: 46% 54%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

/* ---------- Context panel ---------- */
.context-panel {
    position: relative;
    padding: 34px 34px 28px;
    overflow: hidden;
    color: #fff
}

.context-panel.buyer {
    background: linear-gradient(155deg, var(--navy) 0%, #173B5A 55%, var(--navy-2) 100%)
}

.context-panel.supplier {
    background: linear-gradient(155deg, #0D5F61 0%, var(--teal) 58%, var(--teal-2) 100%)
}

.context-panel:before {
    content: "";
    position: absolute;
    inset: auto auto -120px -120px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .06)
}

.context-panel:after {
    content: "";
    position: absolute;
    inset: 24px -90px auto auto;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .08)
}

.context-inner {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 22px
}

.panel-top {
    display: grid;
    gap: 8px
}

.eyebrow {
    width: max-content;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    background: rgba(255, 255, 255, .12);
    color: rgba(255, 255, 255, .92)
}

.context-panel h1 {
    margin: 0;
    font-size: 25px;
    line-height: 1.8;
    font-weight: 900
}

.context-panel p.lead {
    margin: 0;
    font-size: 13px;
    line-height: 2;
    color: rgba(255, 255, 255, .82)
}

.info-card {
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 18px;
    padding: 18px 16px;
    backdrop-filter: blur(4px)
}

.info-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px
}

.info-title strong {
    font-size: 14px;
    font-weight: 900
}

.info-title span {
    font-size: 11px;
    color: rgba(255, 255, 255, .72)
}

.flow-grid {
    display: grid;
    gap: 10px
}

.flow-step {
    position: relative;
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 10px;
    align-items: flex-start
}

.flow-step:not(:last-child)::after {
    content: "";
    position: absolute;
    right: 16px;
    top: 34px;
    width: 2px;
    height: 26px;
    background: rgba(255, 255, 255, .2)
}

.flow-num {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 900;
    color: #fff;
    background: rgba(255, 255, 255, .13);
    border: 1px solid rgba(255, 255, 255, .15)
}

.flow-body strong {
    display: block;
    font-size: 13px;
    line-height: 1.8;
    font-weight: 900;
    margin-top: -1px
}

.flow-body span {
    display: block;
    font-size: 11.5px;
    line-height: 1.9;
    color: rgba(255, 255, 255, .78)
}

.context-foot {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, .12);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px
}

.metric {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 12px;
    padding: 10px 10px 9px
}

.metric strong {
    display: block;
    font-size: 15px;
    font-weight: 900
}

.metric span {
    display: block;
    font-size: 10.5px;
    line-height: 1.8;
    color: rgba(255, 255, 255, .72)
}

/* ---------- Form panel ---------- */
.form-panel {
    background: var(--surface);
    padding: 38px 48px;
    display: flex;
    align-items: center
}

.form-box {
    width: 100%;
    max-width: 440px;
    margin: auto
}

.role-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    background: #F2F5F7;
    padding: 5px;
    border-radius: 12px;
    margin-bottom: 22px
}

.role-tabs button {
    border: 0;
    background: transparent;
    border-radius: 9px;
    padding: 10px 10px;
    font-size: 13px;
    font-weight: 800;
    color: #6B7785
}

.role-tabs button.active {
    background: #fff;
    color: var(--navy);
    box-shadow: 0 4px 12px rgba(15, 23, 42, .06)
}

.supplier-view .role-tabs button.active {
    color: var(--teal)
}

.form-box h2 {
    margin: 0 0 6px;
    font-size: 24px;
    line-height: 1.7;
    font-weight: 900;
    color: #1F3244
}

.form-subtitle {
    margin: 0 0 20px;
    font-size: 13px;
    line-height: 2;
    color: var(--muted)
}

.field {
    display: grid;
    gap: 7px;
    margin-bottom: 14px
}

.field label {
    font-size: 13px;
    font-weight: 800;
    color: #344250
}

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field .input {
    width: 100%;
    height: 49px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface-soft);
    padding: 10px 13px;
    font-size: 14px;
    color: var(--text);
    outline: none;
}

.field input:focus {
    background: #fff;
    border-color: #8BA3B6;
    box-shadow: 0 0 0 3px rgba(22, 50, 79, .05)
}

.supplier-view .field input:focus {
    border-color: #7FA8AA;
    box-shadow: 0 0 0 3px rgba(15, 102, 104, .05)
}

.field-help {
    font-size: 11.5px;
    line-height: 1.8;
    color: var(--muted-2)
}

.primary-btn {
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 11px;
    color: #fff;
    font-size: 14px;
    font-weight: 900;
    margin-top: 4px;
    background: var(--navy);
    transition: .15s ease;
}

.primary-btn:hover {
    filter: brightness(1.06)
}

.supplier-view .primary-btn {
    background: var(--teal)
}

.secondary-entry {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 800;
    color: #546170;
}

.secondary-entry:hover {
    background: #FAFBFC
}

.alt {
    margin-top: 15px;
    text-align: center;
    font-size: 12.5px;
    line-height: 1.9;
    color: var(--muted)
}

.alt a {
    font-weight: 800;
    color: var(--navy)
}

.supplier-view .alt a {
    color: var(--teal)
}

.divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px 0;
    color: #98A3AF;
    font-size: 11px
}

.divider:before,
.divider:after {
    content: "";
    height: 1px;
    background: #E8ECEF;
    flex: 1
}

.errorbox {
    display: none;
    margin-top: 10px;
    background: #FDEEEE;
    border: 1px solid #F2CACA;
    color: #A53D3D;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 12px;
    line-height: 1.8
}

.errorbox.show {
    display: block
}

.errorbox ul {
    margin: 6px 0 0;
    padding: 0 18px 0 0
}

.security-note {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #EEF1F4;
    font-size: 11.5px;
    line-height: 1.8;
    color: #7A8694
}

.security-icon {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    background: #F3F5F7;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    font-size: 11px
}

/* ---------- Copyright ---------- */
.copyright-bar {
    padding: 14px 20px 18px;
    text-align: center;
    font-size: 12px;
    color: #8A95A2;
}

.copyright-bar a {
    color: var(--navy);
    font-weight: 800;
    text-decoration: none;
}

.copyright-bar a:hover {
    text-decoration: underline;
    color: var(--navy-2)
}

.supplier-view~.copyright-bar a {
    color: var(--teal)
}

@media(max-width:980px) {
    .auth-shell {
        grid-template-columns: 1fr;
        max-width: 680px
    }

    .form-panel {
        padding: 34px 30px
    }

    .context-foot {
        grid-template-columns: 1fr 1fr 1fr
    }
}

@media(max-width:640px) {
    .page {
        grid-template-rows: 62px 1fr auto
    }

    .topbar-inner,
    .stage {
        width: min(calc(100% - 20px), 1180px)
    }

    .stage {
        padding: 14px 0
    }

    .auth-shell {
        min-height: auto;
        border-radius: 16px
    }

    .context-panel {
        padding: 24px 20px
    }

    .context-panel h1 {
        font-size: 22px
    }

    .context-panel p.lead {
        font-size: 12.5px
    }

    .form-panel {
        padding: 24px 18px
    }

    .form-box h2 {
        font-size: 21px
    }

    .context-foot {
        grid-template-columns: 1fr
    }

    .logo-wrap img {
        width: 128px;
        height: 46px
    }
}

/* static/css/auth-login.css */
/* استایل صفحه‌ی ورود، ثبت‌نام و وضعیت‌های خریدار/تأمین‌کننده */

:root {
    --navy: #16324F;
    --navy-2: #224A71;
    --teal: #0F6668;
    --teal-2: #198084;
    --gold: #C99635;
    --bg: #F5F6F8;
    --surface: #FFFFFF;
    --surface-soft: #F8FAFB;
    --muted: #667085;
    --muted-2: #7D8895;
    --text: #1F2937;
    --border: #DCE4EA;
    --border-soft: #EDF2F6;
    --error: #C74747;
    --success: #1F8A5B;
    --shadow: 0 22px 54px rgba(15, 23, 42, .08);
}

* {
    box-sizing: border-box
}

html,
body {
    margin: 0;
    min-height: 100%
}

body {
    font-family: "Vazirmatn", Tahoma, Arial, sans-serif;
    direction: rtl;
    background:
        radial-gradient(circle at 100% 0%, rgba(22, 50, 79, .05), transparent 26%),
        radial-gradient(circle at 0% 100%, rgba(15, 102, 104, .05), transparent 22%),
        linear-gradient(180deg, #F9FAFB 0%, #F4F6F8 100%);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
    font: inherit
}

button {
    cursor: pointer
}

a {
    color: inherit;
    text-decoration: none
}

.hidden {
    display: none !important
}

.page {
    min-height: 100vh;
    display: grid;
    grid-template-rows: 70px 1fr auto
}

.topbar {
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(220, 228, 234, .9);
    display: flex;
    align-items: center;
}

.topbar-inner {
    width: min(1180px, calc(100% - 32px));
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.logo-wrap img {
    width: 156px;
    height: 54px;
    object-fit: contain;
    display: block;
    mix-blend-mode: multiply;
    transition: .15s ease;
}

.logo-wrap a:hover img {
    transform: scale(1.015)
}

.logo-fallback {
    font-size: 23px;
    font-weight: 900;
    color: var(--navy)
}

.back-link {
    border: 0;
    background: transparent;
    color: #5D6A77;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
}

.back-link:hover {
    background: #F1F4F7;
    color: var(--navy)
}

.stage {
    width: min(1180px, calc(100% - 32px));
    margin: auto;
    padding: 24px 0;
    display: grid;
    place-items: center
}

/* ---------- Auth shell ---------- */
.auth-shell {
    width: 100%;
    max-width: 1100px;
    min-height: 650px;
    display: grid;
    grid-template-columns: 46% 54%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

/* حالت تک‌ستونه برای pending/rejected */
.auth-shell.single {
    max-width: 640px;
    min-height: auto;
    grid-template-columns: 1fr;
}

/* ---------- Context panel ---------- */
.context-panel {
    position: relative;
    padding: 34px 34px 28px;
    overflow: hidden;
    color: #fff
}

.context-panel.buyer {
    background: linear-gradient(155deg, var(--navy) 0%, #173B5A 55%, var(--navy-2) 100%)
}

.context-panel.supplier {
    background: linear-gradient(155deg, #0D5F61 0%, var(--teal) 58%, var(--teal-2) 100%)
}

.context-panel.success {
    background: linear-gradient(155deg, #0D5F61 0%, var(--teal) 58%, var(--teal-2) 100%)
}

.context-panel.warning {
    background: linear-gradient(155deg, #7A5C13 0%, var(--gold) 60%, #D4A84A 100%)
}

.context-panel:before {
    content: "";
    position: absolute;
    inset: auto auto -120px -120px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .06)
}

.context-panel:after {
    content: "";
    position: absolute;
    inset: 24px -90px auto auto;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .08)
}

.context-inner {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 22px
}

.panel-top {
    display: grid;
    gap: 8px
}

.eyebrow {
    width: max-content;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    background: rgba(255, 255, 255, .12);
    color: rgba(255, 255, 255, .92)
}

.context-panel h1 {
    margin: 0;
    font-size: 25px;
    line-height: 1.8;
    font-weight: 900
}

.context-panel p.lead {
    margin: 0;
    font-size: 13px;
    line-height: 2;
    color: rgba(255, 255, 255, .82)
}

.info-card {
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 18px;
    padding: 18px 16px;
    backdrop-filter: blur(4px)
}

.info-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px
}

.info-title strong {
    font-size: 14px;
    font-weight: 900
}

.info-title span {
    font-size: 11px;
    color: rgba(255, 255, 255, .72)
}

.flow-grid {
    display: grid;
    gap: 10px
}

.flow-step {
    position: relative;
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 10px;
    align-items: flex-start
}

.flow-step:not(:last-child)::after {
    content: "";
    position: absolute;
    right: 16px;
    top: 34px;
    width: 2px;
    height: 26px;
    background: rgba(255, 255, 255, .2)
}

.flow-num {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 900;
    color: #fff;
    background: rgba(255, 255, 255, .13);
    border: 1px solid rgba(255, 255, 255, .15)
}

.flow-body strong {
    display: block;
    font-size: 13px;
    line-height: 1.8;
    font-weight: 900;
    margin-top: -1px
}

.flow-body span {
    display: block;
    font-size: 11.5px;
    line-height: 1.9;
    color: rgba(255, 255, 255, .78)
}

.context-foot {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, .12);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px
}

.metric {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 12px;
    padding: 10px 10px 9px
}

.metric strong {
    display: block;
    font-size: 15px;
    font-weight: 900
}

.metric span {
    display: block;
    font-size: 10.5px;
    line-height: 1.8;
    color: rgba(255, 255, 255, .72)
}

/* ---------- Form panel ---------- */
.form-panel {
    background: var(--surface);
    padding: 38px 48px;
    display: flex;
    align-items: center
}

.form-panel.center {
    justify-content: center;
    padding: 44px 32px
}

.form-box {
    width: 100%;
    max-width: 440px;
    margin: auto
}

.role-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    background: #F2F5F7;
    padding: 5px;
    border-radius: 12px;
    margin-bottom: 22px
}

.role-tabs button {
    border: 0;
    background: transparent;
    border-radius: 9px;
    padding: 10px 10px;
    font-size: 13px;
    font-weight: 800;
    color: #6B7785
}

.role-tabs button.active {
    background: #fff;
    color: var(--navy);
    box-shadow: 0 4px 12px rgba(15, 23, 42, .06)
}

.supplier-view .role-tabs button.active {
    color: var(--teal)
}

.form-box h2 {
    margin: 0 0 6px;
    font-size: 24px;
    line-height: 1.7;
    font-weight: 900;
    color: #1F3244
}

.form-subtitle {
    margin: 0 0 20px;
    font-size: 13px;
    line-height: 2;
    color: var(--muted)
}

.field {
    display: grid;
    gap: 7px;
    margin-bottom: 14px
}

.field label {
    font-size: 13px;
    font-weight: 800;
    color: #344250
}

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="number"],
.field input[type="tel"],
.field select,
.field textarea,
.field .input {
    width: 100%;
    height: 49px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface-soft);
    padding: 10px 13px;
    font-size: 14px;
    color: var(--text);
    outline: none;
}

.field textarea {
    height: auto;
    min-height: 100px;
    resize: vertical;
    padding: 12px 13px;
    line-height: 1.9
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    background: #fff;
    border-color: #8BA3B6;
    box-shadow: 0 0 0 3px rgba(22, 50, 79, .05)
}

.supplier-view .field input:focus,
.supplier-view .field select:focus,
.supplier-view .field textarea:focus {
    border-color: #7FA8AA;
    box-shadow: 0 0 0 3px rgba(15, 102, 104, .05)
}

.field-help {
    font-size: 11.5px;
    line-height: 1.8;
    color: var(--muted-2)
}

.field-error {
    font-size: 11.5px;
    line-height: 1.8;
    color: #C74747;
    font-weight: 700
}

.primary-btn {
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 11px;
    color: #fff;
    font-size: 14px;
    font-weight: 900;
    margin-top: 4px;
    background: var(--navy);
    transition: .15s ease;
}

.primary-btn:hover {
    filter: brightness(1.06)
}

.supplier-view .primary-btn {
    background: var(--teal)
}

.secondary-btn {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 800;
    color: #546170;
    transition: .15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.secondary-btn:hover {
    background: #FAFBFC
}

.secondary-entry {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 800;
    color: #546170;
    display: flex;
    align-items: center;
    justify-content: center;
}

.secondary-entry:hover {
    background: #FAFBFC
}

.alt {
    margin-top: 15px;
    text-align: center;
    font-size: 12.5px;
    line-height: 1.9;
    color: var(--muted)
}

.alt a {
    font-weight: 800;
    color: var(--navy)
}

.supplier-view .alt a {
    color: var(--teal)
}

.divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px 0;
    color: #98A3AF;
    font-size: 11px
}

.divider:before,
.divider:after {
    content: "";
    height: 1px;
    background: #E8ECEF;
    flex: 1
}

.errorbox {
    display: none;
    margin-bottom: 14px;
    background: #FDEEEE;
    border: 1px solid #F2CACA;
    color: #A53D3D;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 12px;
    line-height: 1.8
}

.errorbox.show {
    display: block
}

.errorbox ul {
    margin: 6px 0 0;
    padding: 0 18px 0 0
}

.security-note {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #EEF1F4;
    font-size: 11.5px;
    line-height: 1.8;
    color: #7A8694
}

.security-icon {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    background: #F3F5F7;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    font-size: 11px
}

/* ---------- Signup specifics ---------- */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px
}

.category-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 14px;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 11px;
    background: var(--surface-soft);
    font-size: 12.5px;
    color: #44505C;
    cursor: pointer;
    transition: .15s ease;
}

.category-item:hover {
    border-color: #8BA3B6;
    background: #fff
}

.category-item input[type="checkbox"] {
    accent-color: var(--teal)
}

.file-drop {
    border: 1.5px dashed #BFCBDA;
    background: #FAFCFE;
    border-radius: 12px;
    padding: 18px;
    text-align: center;
}

.file-drop input[type="file"] {
    display: none
}

.file-drop label {
    font-weight: 800;
    color: var(--navy);
    cursor: pointer;
    font-size: 13px;
}

.file-drop small {
    display: block;
    color: var(--muted);
    margin-top: 6px;
    font-size: 11.5px
}

/* ---------- Progress (supplier signup steps) ---------- */
.step-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0 22px;
}

.step-dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #E9EDF1;
    color: #8A95A2;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 900;
    flex: 0 0 auto;
}

.step-dot.active {
    background: var(--teal);
    color: #fff
}

.step-dot.done {
    background: var(--success);
    color: #fff
}

.step-line {
    flex: 1;
    height: 2px;
    background: #E9EDF1;
    border-radius: 999px;
}

.step-line.done {
    background: var(--success)
}

.step-label {
    font-size: 12px;
    color: var(--muted);
    text-align: center;
    margin-bottom: 18px
}

/* ---------- Action row ---------- */
.action-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.action-row .secondary-btn,
.action-row .primary-btn {
    width: auto;
    min-width: 130px;
    height: 46px;
    margin-top: 0
}

.action-row .secondary-btn {
    padding: 0 20px
}

.action-row .primary-btn {
    padding: 0 22px
}

/* ---------- Copyright ---------- */
.copyright-bar {
    padding: 14px 20px 18px;
    text-align: center;
    font-size: 12px;
    color: #8A95A2;
}

.copyright-bar a {
    color: var(--navy);
    font-weight: 800;
    text-decoration: none;
}

.copyright-bar a:hover {
    text-decoration: underline;
    color: var(--navy-2)
}

@media(max-width:980px) {
    .auth-shell {
        grid-template-columns: 1fr;
        max-width: 680px
    }

    .form-panel {
        padding: 34px 30px
    }

    .context-foot {
        grid-template-columns: 1fr 1fr 1fr
    }
}

@media(max-width:640px) {
    .page {
        grid-template-rows: 62px 1fr auto
    }

    .topbar-inner,
    .stage {
        width: min(calc(100% - 20px), 1180px)
    }

    .stage {
        padding: 14px 0
    }

    .auth-shell {
        min-height: auto;
        border-radius: 16px
    }

    .context-panel {
        padding: 24px 20px
    }

    .context-panel h1 {
        font-size: 22px
    }

    .context-panel p.lead {
        font-size: 12.5px
    }

    .form-panel {
        padding: 24px 18px
    }

    .form-box h2 {
        font-size: 21px
    }

    .context-foot {
        grid-template-columns: 1fr
    }

    .grid-2 {
        grid-template-columns: 1fr
    }

    .category-grid {
        grid-template-columns: 1fr
    }

    .logo-wrap img {
        width: 128px;
        height: 46px
    }

    .action-row {
        flex-direction: column;
        align-items: stretch
    }

    .action-row .secondary-btn,
    .action-row .primary-btn {
        width: 100%
    }
}

/* ============================================================
   OTP Row — ۶ خانه‌ی کد یکبار مصرف
   ============================================================ */
.otp-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin: 12px 0 6px;
    direction: ltr;
}

.otp-row input {
    width: 100%;
    aspect-ratio: 1 / 1;
    min-height: 52px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    background: var(--surface-soft);
    text-align: center;
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    font-family: "Vazirmatn", Tahoma, sans-serif;
    font-variant-numeric: tabular-nums;
}

.otp-row input:focus {
    background: #fff;
    border-color: var(--teal);
    box-shadow: 0 0 0 4px rgba(15, 102, 104, 0.1);
}

.otp-row input:not(:placeholder-shown) {
    background: #fff;
    border-color: var(--navy);
}

/* ============================================================
   Resend — ارسال مجدد کد
   ============================================================ */
.resend {
    text-align: center;
    color: var(--muted);
    font-size: 12px;
    margin: 14px 0 18px;
}

.resend-btn {
    border: 0;
    background: none;
    color: var(--teal);
    font-weight: 800;
    cursor: pointer;
    padding: 4px 6px;
    font-family: inherit;
    font-size: 12px;
    border-radius: 6px;
    transition: background 0.15s ease;
}

.resend-btn:hover:not(:disabled) {
    background: var(--teal-soft);
}

.resend-btn:disabled {
    color: var(--muted-2);
    cursor: not-allowed;
    font-weight: 600;
}

/* ============================================================
   Signup Links — دکمه‌های ثبت‌نام در مرحله ورود
   ============================================================ */
.signup-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 4px;
}

.signup-links .secondary-entry {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

@media (max-width: 480px) {
    .signup-links {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   Hidden input در فرم (برای OTP)
   ============================================================ */
input[type="hidden"] {
    display: none !important;
}

/* ============================================================
   OTP Form — فاصله‌گذاری بهتر
   ============================================================ */
#otp-form .primary-btn {
    margin-top: 6px;
}

#otp-form .secondary-entry {
    margin-top: 10px;
}

/* ============================================================
   Autofocus و focus visible
   ============================================================ */
.otp-row input:focus-visible {
    outline: none;
}

.otp-row input::selection {
    background: transparent;
}

/* ============================================================
   Type Grid — انتخاب نوع حساب/تأمین‌کننده (کارتی)
   ============================================================ */
.type-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 6px;
}

/* برای سه گزینه (تأمین‌کننده) */
.type-grid.has-3 {
    grid-template-columns: repeat(3, 1fr);
}

.type-card {
    display: block;
    border: 1.5px solid var(--border);
    border-radius: 14px;
    padding: 14px;
    cursor: pointer;
    background: #fbfcfd;
    transition: all 0.18s ease;
    min-height: 110px;
    position: relative;
}

.type-card:hover {
    border-color: var(--teal);
    background: #fff;
}

.type-card.active {
    border: 2px solid var(--teal);
    background: var(--teal-soft);
    box-shadow: 0 0 0 4px rgba(15, 102, 104, 0.08);
}

/* مخفی کردن radio native */
.type-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.type-card b {
    display: block;
    font-size: 13.5px;
    font-weight: 800;
    margin-bottom: 6px;
    color: var(--text);
}

.type-card span {
    font-size: 11px;
    color: var(--muted);
    line-height: 1.75;
    display: block;
}

/* رنگ تأمین‌کننده (تیل) */
.context-panel.supplier~.form-panel .type-card.active {
    border-color: var(--teal);
    background: var(--teal-soft);
}

/* رنگ خریدار (نیلی) */
.context-panel.buyer~.form-panel .type-card:hover {
    border-color: var(--navy);
}

.context-panel.buyer~.form-panel .type-card.active {
    border-color: var(--navy);
    background: #eef3f8;
    box-shadow: 0 0 0 4px rgba(22, 50, 79, 0.08);
}

/* در موبایل تک‌ستونه */
@media (max-width: 640px) {

    .type-grid,
    .type-grid.has-3 {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   Check Box — موافقت با شرایط
   ============================================================ */
.check {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 8px 0 18px;
    color: #5f7080;
    font-size: 12px;
    line-height: 1.9;
    cursor: pointer;
}

.check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 3px;
    flex-shrink: 0;
    accent-color: var(--teal);
    cursor: pointer;
}

.check a {
    color: var(--teal);
    font-weight: 700;
    text-decoration: none;
}

.check a:hover {
    text-decoration: underline;
}

/* رنگ خریدار (نیلی) */
.context-panel.buyer~.form-panel .check input[type="checkbox"] {
    accent-color: var(--navy);
}

.context-panel.buyer~.form-panel .check a {
    color: var(--navy);
}

/* خطای terms */
.check+.field-error {
    margin-top: -12px;
    margin-bottom: 12px;
}