.ssa-box { --ssa-c: var(--primary_color, #184b49); max-width: 420px; margin: 0 auto; }
.ssa-box [hidden] { display: none !important; }
.ssa-box .input-container { margin-bottom: 12px; }
.ssa-box label { display: block; margin-bottom: 4px; font-weight: 600; }
.ssa-box input[type="text"] { width: 100%; }
.ssa-box .ssa-step-1 input[type="text"] {
    box-sizing: border-box !important; height: 52px !important; padding: 0 14px !important; margin: 0 !important;
    border: 1.5px solid #d5d9dd !important; border-radius: 12px !important; background: #fff !important;
    font-size: 16px !important; box-shadow: none !important; outline: none; transition: border-color .15s, box-shadow .15s;
}
.ssa-box .ssa-step-1 input[type="text"]:focus { border-color: var(--ssa-c) !important; box-shadow: 0 0 0 3px rgba(24, 75, 73, .15) !important; }
.ssa-box .ssa-step-1 input[name="ssa_mobile"],
.ssa-box .ssa-step-1 input[name="ssa_national_id"] { font-size: 19px !important; font-weight: 600; letter-spacing: .14em; text-align: left !important; }
.ssa-box .ssa-step-1 input::placeholder { direction: rtl; text-align: right; font-size: 14px; font-weight: 400; letter-spacing: normal; color: #aab0b5; }
.ssa-box input.ssa-rtl { direction: rtl !important; text-align: right !important; }
.ssa-box .ssa-note { display: block; margin-top: 4px; color: #777; font-size: 12px; line-height: 1.8; }
.ssa-box .ssa-terms { display: flex; align-items: center; gap: 8px; margin: 4px 0 10px; font-size: 14px; font-weight: 400; cursor: pointer; }
.ssa-box .ssa-terms input { width: 18px !important; height: 18px !important; margin: 0 !important; flex: 0 0 18px; accent-color: var(--ssa-c); cursor: pointer; }
.ssa-box .ssa-terms a { color: var(--ssa-c); font-weight: 700; text-decoration: underline; }
.ssa-box .button { box-sizing: border-box; width: 100%; margin-top: 6px; }

/* مرحله دوم: کد تایید */
.ssa-box .ssa-step-title { margin: 0 0 4px; font-weight: 700; font-size: 16px; }
.ssa-box .ssa-sent-to { margin: 0 0 16px; color: #555; font-size: 13px; line-height: 1.8; }
.ssa-box .ssa-otp { display: flex; justify-content: center; gap: 10px; margin: 0 0 14px; direction: ltr; }
.ssa-box input.ssa-otp-digit {
    width: 52px !important; height: 56px; padding: 0 !important; flex: 0 0 52px;
    border: 1.5px solid #d5d9dd !important; border-radius: 12px !important; background: #fff !important;
    text-align: center !important; font-size: 22px !important; font-weight: 700; line-height: 56px;
    box-shadow: none !important; outline: none; transition: border-color .15s, box-shadow .15s;
}
.ssa-box input.ssa-otp-digit:focus { border-color: var(--ssa-c) !important; box-shadow: 0 0 0 3px rgba(24, 75, 73, .15) !important; }
.ssa-box input.ssa-otp-digit.ssa-otp-err { border-color: #c62828 !important; }
.ssa-box .ssa-edit { display: inline-block; margin-bottom: 14px; color: var(--ssa-c); font-size: 13px; font-weight: 600; text-decoration: none; }
.ssa-box .ssa-edit::before { content: "✎"; margin-left: 4px; }
.ssa-box .ssa-timer-row { margin-bottom: 8px; text-align: center; font-size: 13px; }
.ssa-box .ssa-timer { color: #777; }
.ssa-box .ssa-resend { padding: 0; border: 0; background: none; color: var(--ssa-c); cursor: pointer; font: inherit; font-weight: 600; }
.ssa-box .ssa-resend:disabled { color: #999; cursor: default; }

/* پیام موفقیت */
.ssa-box .ssa-done { padding: 18px 0 6px; text-align: center; }
.ssa-box .ssa-done-icon { width: 72px; height: 72px; margin: 0 auto 14px; }
.ssa-box .ssa-done-icon svg { width: 100%; height: 100%; fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ssa-box .ssa-done-icon circle { stroke: #2e7d32; fill: #e8f5e9; }
.ssa-box .ssa-done-icon path { stroke: #2e7d32; stroke-dasharray: 40; stroke-dashoffset: 40; animation: ssa-check .5s .15s ease-out forwards; }
.ssa-box .ssa-done-title { margin: 0 0 6px; color: #2e7d32; font-size: 18px; font-weight: 700; }
.ssa-box .ssa-done-text { margin: 0; color: #555; font-size: 14px; line-height: 1.9; }
@keyframes ssa-check { to { stroke-dashoffset: 0; } }

.ssa-box .ssa-msg { min-height: 1em; margin-top: 10px; font-size: 13px; line-height: 1.8; }
.ssa-box .ssa-msg.ssa-err { color: #c62828; }
.ssa-box .ssa-msg.ssa-ok { color: #2e7d32; }

@media (max-width: 400px) {
    .ssa-box .ssa-otp { gap: 6px; }
    .ssa-box input.ssa-otp-digit { width: 44px !important; height: 50px; flex-basis: 44px; font-size: 20px !important; line-height: 50px; }
}
