/* ثبت‌نام سرویس‌کار iOS — هم‌تراز اپ اندروید */

body.ios-sp-register-body {
    background: #F8F6FA !important;
    overflow-x: hidden;
    min-height: 100vh;
}

body.ios-sp-register-body .ios-sp-login-orb {
    display: none;
}

.ios-sp-register-wrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 12px 16px 88px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── کارت هدر ── */
.sp-reg-header-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #E4E9F2;
    box-shadow: 0 4px 16px rgba(7, 27, 176, 0.08);
    overflow: hidden;
    flex-shrink: 0;
}

.sp-reg-header-blue {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    background: linear-gradient(315deg, #061894 0%, #071BB0 50%, #2D5AE8 100%);
    color: #fff;
}

.sp-reg-back {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    border-radius: 50%;
    flex-shrink: 0;
}

.sp-reg-back:active {
    background: rgba(255, 255, 255, 0.12);
}

.sp-reg-header-logo {
    width: 38px;
    height: 38px;
    object-fit: contain;
    flex-shrink: 0;
}

.sp-reg-header-text {
    flex: 1;
    min-width: 0;
    padding-inline-start: 6px;
}

.sp-reg-header-text h1 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
}

.sp-reg-header-text p {
    margin: 2px 0 0;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.88);
}

.sp-reg-header-body {
    padding: 12px 14px 14px;
}

.sp-reg-step-counter {
    font-size: 12px;
    font-weight: 700;
    color: #071BB0;
    margin-bottom: 8px;
}

.sp-reg-progress-track {
    height: 6px;
    background: #E8ECF4;
    border-radius: 99px;
    overflow: hidden;
}

.sp-reg-progress-fill {
    height: 100%;
    width: 8.33%;
    background: #FF6B35;
    border-radius: 99px;
    transition: width 0.25s ease;
}

.sp-reg-step-row {
    display: flex;
    align-items: stretch;
    gap: 6px;
    margin-top: 12px;
}

.sp-reg-step-box {
    flex: 1;
    min-height: 52px;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 6px;
    text-align: center;
    min-width: 0;
}

.sp-reg-step-icon {
    font-size: 14px;
    line-height: 1;
    margin-bottom: 2px;
}

.sp-reg-step-num {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}

.sp-reg-step-label {
    font-size: 10px;
    margin-top: 2px;
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sp-reg-step-placeholder {
    background: #F8F9FC;
    border: 1px dashed #DDE3EE;
    color: #6C757D;
}

.sp-reg-step-done {
    background: #E8F5EC;
    border: 1px solid #B8DFC4;
    color: #2E7D32;
}

.sp-reg-step-current {
    background: #EEF2FF;
    border: 2px solid #FF6B35;
    box-shadow: 0 2px 8px rgba(7, 27, 176, 0.1);
}

.sp-reg-step-current .sp-reg-step-num {
    color: #071BB0;
}

.sp-reg-step-current .sp-reg-step-label {
    color: #FF6B35;
    font-weight: 700;
}

.sp-reg-step-current .sp-reg-step-icon {
    color: #FF6B35;
}

.sp-reg-step-adjacent {
    background: #F4F6FC;
    border: 1px solid #E4E9F2;
    color: #6C757D;
}

/* ── هشدار ── */
.sp-reg-alert {
    display: none;
    margin: 12px 0 4px;
    padding: 14px;
    border-radius: 12px;
    font-size: 14px;
    background: #fff;
    border: 1px solid #f5c6cb;
    color: #c62828;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.sp-reg-alert.show {
    display: block;
}

.sp-reg-alert.success {
    border-color: #c3e6cb;
    color: #155724;
    background: #f0fff4;
}

.sp-reg-alert.danger {
    border-color: #f5c6cb;
    color: #c62828;
    background: #fff5f5;
}

/* ── محتوای مرحله ── */
.sp-reg-scroll {
    flex: 1;
    margin-top: 8px;
    min-height: 0;
}

.sp-reg-step-card {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(7, 27, 176, 0.08);
    border: 1px solid #EEF0F4;
    min-height: 220px;
}

.sp-step {
    display: none;
}

.sp-step.active {
    display: block;
    animation: spRegStepIn 0.25s ease-out;
}

@keyframes spRegStepIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.sp-step h3 {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 4px;
    border: none;
    padding: 0;
    display: block;
}

.sp-step .sp-step-hint {
    font-size: 12px;
    color: #6C757D;
    margin-bottom: 16px;
}

.sp-form-group {
    margin-bottom: 1.1rem;
}

.sp-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: #333;
    font-size: 14px;
}

.sp-form-group .form-control {
    border-radius: 12px;
    border: 1px solid #E4E9F2;
    padding: 0.65rem 1rem;
    font-size: 16px !important;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.sp-form-group .form-control:focus {
    border-color: #071BB0;
    box-shadow: 0 0 0 3px rgba(7, 27, 176, 0.12);
}

.sp-otp-inputs {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin: 1rem 0;
    direction: ltr;
}

.sp-otp-inputs input {
    width: 44px;
    height: 48px;
    text-align: center;
    font-size: 16px !important;
    font-weight: 700;
    border-radius: 12px;
    border: 1px solid #E4E9F2;
}

.sp-otp-inputs input:focus {
    border-color: #071BB0;
    outline: none;
    box-shadow: 0 0 0 3px rgba(7, 27, 176, 0.12);
}

.sp-reg-resend-otp {
    display: inline-block;
    margin-top: 12px;
    padding: 8px;
    border: none;
    background: none;
    color: #071BB0;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
}

.sp-reg-resend-otp:disabled {
    color: #94a3b8;
}

.sp-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.sp-category-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.sp-category-card {
    border: 1.5px solid #E8E4ED;
    border-radius: 14px;
    background: #fff;
    padding: 1rem 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 108px;
}

.sp-category-card.selected {
    border-color: #071BB0;
    background: #EEF2FF;
    box-shadow: 0 4px 12px rgba(7, 27, 176, 0.12);
}

.sp-category-icon { font-size: 1.75rem; margin-bottom: 0.35rem; }
.sp-category-title { font-weight: 700; color: #071BB0; font-size: 0.95rem; }
.sp-category-sub { font-size: 0.75rem; color: #6C757D; margin-top: 0.2rem; }

.sp-category-hint {
    display: none;
    margin-top: 0.85rem;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    background: #EEF2FF;
    color: #071BB0;
    font-size: 0.85rem;
}

.sp-category-hint.show { display: block; }

#addressMap {
    height: 220px;
    border-radius: 12px;
    border: 1px solid #E4E9F2;
}

/* ── نوار دکمه پایین ── */
.sp-reg-bottom-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    gap: 8px;
    padding: 16px 20px calc(16px + env(safe-area-inset-bottom, 0px));
    background: #fff;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

.sp-reg-btn-prev,
.sp-reg-btn-next {
    flex: 1;
    height: 48px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.sp-reg-btn-prev {
    background: #fff;
    color: #071BB0;
    border: 2px solid #071BB0;
}

.sp-reg-btn-prev.hidden {
    visibility: hidden;
    pointer-events: none;
}

.sp-reg-btn-next {
    background: linear-gradient(135deg, #FF8C5A 0%, #FF6B35 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.35);
}

.sp-reg-btn-next:disabled {
    opacity: 0.65;
}

@media (max-width: 576px) {
    .sp-row-2 { grid-template-columns: 1fr; }
    .ios-sp-register-wrap { padding-inline: 12px; }
}
