:root {
    --g:      #00703C;
    --g2:     #005a30;
    --p:      #5B2D8E;
    --bg:     #f0f7f4;
    --radius: 16px;
}

* { box-sizing: border-box; }

#ts-wrap {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    max-width: 520px;
    margin: 40px auto;
    padding: 0 16px;
    direction: rtl;
}

/*── Progress bar ── */
.ts-progress-bar {
    height: 6px;
    background: #ddd;
    border-radius: 99px;
    margin-bottom: 20px;
    overflow: hidden;
}
.ts-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--g), var(--p));
    border-radius: 99px;
    transition: width .4s ease;
    width: 0%;
}

/* ── Card ── */
.ts-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 4px 24px rgba(0,0,0,.10);
    padding: 36px 28px;
    min-height: 340px;
}

/* ── Steps ── */
.ts-step { display: none; }
.ts-step.active { display: block; animation: ts-fade .3s ease; }

@keyframes ts-fade {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Icon / headings ── */
.ts-icon {
    font-size: 48px;
    text-align: center;
    margin-bottom: 12px;
}

h2 {
    text-align: center;
    font-size: 1.3rem;
    color: #1a1a1a;
    margin: 0 0 6px;
}

.ts-sub {
    text-align: center;
    color: #666;
    font-size: .9rem;
    margin: 0 0 20px;
}

/* ── Option buttons ── */
.ts-opts {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.ts-opts label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    font-size: .95rem;
}

.ts-opts label:hover {
    border-color: var(--g);
    background: #f0faf5;
}

.ts-opts input[type="radio"] {
    accent-color: var(--g);width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.ts-opts label.selected {
    border-color: var(--g);
    background: #e8f5ee;
}

/* ── Buttons ── */
.ts-btn {
    display: block;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--g), var(--p));
    color: #fff;
    font-size:1rem;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .2s, transform .15s;
    text-align: center;
    text-decoration: none;
    margin-top: 8px;
}

.ts-btn:hover  { opacity: .9; transform: translateY(-1px); }
.ts-btn:active { transform: translateY(0); }
.ts-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
    transform: none;
}

.ts-btn-ghost {
    background: transparent;
    border: 2px solid #ccc;
    color: #555;
    margin-top: 10px;
}
.ts-btn-ghost:hover { border-color: var(--g); color: var(--g); }

/* ── Text fields ── */
.ts-field-group {
    margin-bottom: 16px;
}
.ts-field-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: .9rem;
    color: #333;
}
.ts-field-group input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    font-size: .95rem;
    transition: border-color .2s;outline: none;
}
.ts-field-group input:focus {
    border-color: var(--g);
}

/* ── OTP row ── */
.otp-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
    direction: ltr;
}

.otp-row input {
    width: 52px;
    height: 60px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: inherit;
    outline: none;
    transition: border-color .2s;
}

.otp-row input:focus {
    border-color: var(--g);
}

.otp-row input.filled {
    border-color: var(--g);
    background: #e8f5ee;
}

/* ── Messages ── */
.ts-msg {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: .9rem;
    margin: 10px 0;
    text-align: center;
}
.ts-msg.success { background: #d4edda; color: #155724; }
.ts-msg.error   { background: #f8d7da; color: #721c24; }
.ts-msg.info    { background: #d1ecf1; color: #0c5460; }

/* ── Final screen ── */
.ts-final {
    text-align: center;
    padding: 16px 0;
}
.ts-final-icon {
    font-size: 72px;
    margin-bottom: 16px;
    animation: ts-bounce .6s ease;
}
@keyframes ts-bounce {
    0%   { transform: scale(0.5); opacity: 0; }
    70%  { transform: scale(1.1); }
    100% { transform: scale(1);   opacity: 1; }
}
.ts-final h2 { font-size: 1.5rem; color: var(--g2); margin-bottom: 12px; }
.ts-final p  { color: #444; line-height: 1.7; margin-bottom: 10px; }
.ts-final .ts-btn { max-width: 280px; margin: 20px auto 0; }

/* ── Responsive ── */
@media (max-width: 480px) {
    .ts-card { padding: 24px 16px; }
    .otp-row input { width: 44px; height: 52px; font-size: 1.25rem; }
}
.ts-icon,
.ts-final-icon { display: none; }
