/**
 * احراز هویت هوشمند تیمیکا — کانال‌ها، WebOTP، اتصال پیام‌رسان
 */
.tmk-sa-channels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    margin: 0.85rem 0 0.35rem;
    text-align: right;
}
.tmk-sa-channels__title {
    grid-column: 1 / -1;
    font-size: 0.82rem;
    font-weight: 800;
    color: #334155;
    margin: 0 0 0.15rem;
}
.tmk-sa-channel {
    border: 1.5px solid #e2e8f0;
    background: #fff;
    border-radius: 14px;
    padding: 0.7rem 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    font-family: inherit;
    text-align: right;
    color: #0f172a;
}
.tmk-sa-channel:hover {
    border-color: #94a3b8;
}
.tmk-sa-channel.is-active {
    border-color: #0ea5e9;
    background: linear-gradient(135deg, #f0f9ff, #fff);
    box-shadow: 0 8px 22px -16px rgba(14, 165, 233, 0.55);
}
.tmk-sa-channel.is-needs-link {
    border-style: dashed;
}
.tmk-sa-channel__ico {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    background: #f1f5f9;
    color: #0369a1;
    flex-shrink: 0;
}
.tmk-sa-channel[data-channel="sms"] .tmk-sa-channel__ico { color: #047857; background: #ecfdf5; }
.tmk-sa-channel[data-channel="telegram"] .tmk-sa-channel__ico { color: #0284c7; background: #e0f2fe; }
.tmk-sa-channel[data-channel="bale"] .tmk-sa-channel__ico { color: #0f766e; background: #ccfbf1; }
.tmk-sa-channel[data-channel="email"] .tmk-sa-channel__ico { color: #7c3aed; background: #f5f3ff; }
.tmk-sa-channel__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.tmk-sa-channel__body strong {
    font-size: 0.84rem;
    font-weight: 800;
}
.tmk-sa-channel__body small {
    font-size: 0.7rem;
    color: #64748b;
    line-height: 1.4;
}
.tmk-sa-channel__badge {
    margin-right: auto;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: #fef3c7;
    color: #b45309;
    white-space: nowrap;
}
.tmk-sa-channel.is-active .tmk-sa-channel__badge {
    background: #dbeafe;
    color: #1d4ed8;
}

.tmk-sa-connect {
    margin-top: 0.75rem;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    background: linear-gradient(135deg, #ecfeff, #f0fdfa);
    border: 1px solid rgba(14, 165, 233, 0.25);
    text-align: center;
}
.tmk-sa-connect[hidden] { display: none !important; }
.tmk-sa-connect__title {
    font-size: 0.9rem;
    font-weight: 800;
    color: #0f766e;
    margin: 0 0 0.35rem;
}
.tmk-sa-connect__desc {
    font-size: 0.78rem;
    color: #475569;
    margin: 0 0 0.75rem;
    line-height: 1.6;
}
.tmk-sa-connect__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: center;
}
.tmk-sa-connect__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 0;
    border-radius: 12px;
    padding: 0.55rem 0.95rem;
    font-weight: 800;
    font-size: 0.82rem;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
}
.tmk-sa-connect__btn--ghost {
    background: #fff;
    color: #0f766e;
    border: 1px solid #99f6e4;
}
.tmk-sa-connect__status {
    margin-top: 0.65rem;
    font-size: 0.78rem;
    color: #0369a1;
    font-weight: 700;
}
.tmk-sa-connect__status.is-ok { color: #047857; }
.tmk-sa-connect__code {
    margin-top: 0.5rem;
    font-family: ui-monospace, monospace;
    letter-spacing: 0.12em;
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    direction: ltr;
}

.tmk-sa-otp-hint {
    font-size: 0.75rem;
    color: #64748b;
    margin: 0.35rem 0 0;
    line-height: 1.55;
}
.tmk-sa-otp-hint[hidden] { display: none !important; }
.tmk-sa-otp-hint i { color: #0ea5e9; margin-left: 0.25rem; }

.tmk-sa-send-wrap {
    margin: 1rem 0 0.5rem;
    text-align: center;
}
.tmk-sa-send-wrap .submit-btn {
    width: 100%;
}
.tmk-sa-send-hint {
    margin: 0.55rem 0 0;
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.55;
}

/* WebOTP single field (alongside digit boxes) */
.tmk-sa-otp-autofill {
    position: absolute;
    opacity: 0.01;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.otp-inputs {
    position: relative;
}

@media (max-width: 520px) {
    .tmk-sa-channels { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════
   بازیابی رمز عبور هوشمند — wizard
═══════════════════════════════════════════ */
.tmk-rp-modal {
    position: fixed;
    inset: 0;
    z-index: 10040;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: tmkRpFade 0.28s ease;
    overflow-y: auto;
}
.tmk-rp-modal[hidden],
.tmk-rp-modal[style*="display: none"] { display: none !important; }
@keyframes tmkRpFade {
    from { opacity: 0; }
    to { opacity: 1; }
}
.tmk-rp-card {
    width: min(440px, 100%);
    margin: auto;
    border-radius: 24px;
    background:
        radial-gradient(120% 80% at 100% 0%, rgba(14, 165, 233, 0.12), transparent 55%),
        radial-gradient(100% 70% at 0% 100%, rgba(16, 185, 129, 0.1), transparent 50%),
        #fff;
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow:
        0 28px 70px -28px rgba(15, 23, 42, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.6) inset;
    padding: 1.5rem 1.4rem 1.35rem;
    position: relative;
    animation: tmkRpUp 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes tmkRpUp {
    from { opacity: 0; transform: translateY(22px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.tmk-rp-close {
    position: absolute;
    top: 0.85rem;
    left: 0.85rem;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 12px;
    background: #f1f5f9;
    color: #64748b;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background 0.15s, color 0.15s, transform 0.2s;
}
.tmk-rp-close:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: rotate(90deg);
}

.tmk-rp-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 0.15rem 0 1.25rem;
    padding: 0 0.5rem;
}
.tmk-rp-progress__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    min-width: 72px;
}
.tmk-rp-progress__dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.72rem;
    font-weight: 800;
    background: #f1f5f9;
    color: #94a3b8;
    border: 2px solid #e2e8f0;
    transition: all 0.25s;
}
.tmk-rp-progress__item.is-active .tmk-rp-progress__dot {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 8px 20px -8px rgba(14, 165, 233, 0.7);
}
.tmk-rp-progress__item.is-done .tmk-rp-progress__dot {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: transparent;
    color: #fff;
}
.tmk-rp-progress__label {
    font-size: 0.68rem;
    font-weight: 700;
    color: #94a3b8;
}
.tmk-rp-progress__item.is-active .tmk-rp-progress__label,
.tmk-rp-progress__item.is-done .tmk-rp-progress__label {
    color: #0f172a;
}
.tmk-rp-progress__line {
    flex: 1;
    height: 2px;
    max-width: 48px;
    background: #e2e8f0;
    margin: 0 0.15rem 1.1rem;
    border-radius: 999px;
    align-self: flex-start;
    margin-top: 15px;
}
.tmk-rp-progress__line.is-done {
    background: linear-gradient(90deg, #10b981, #0ea5e9);
}

.tmk-rp-head {
    text-align: center;
    margin-bottom: 1.15rem;
}
.tmk-rp-head__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 0.75rem;
    border-radius: 20px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #0ea5e9, #0369a1);
    color: #fff;
    font-size: 1.45rem;
    box-shadow: 0 14px 32px -14px rgba(14, 165, 233, 0.75);
    position: relative;
    overflow: hidden;
}
.tmk-rp-head__icon::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.25) 50%, transparent 70%);
    animation: tmkRpShine 2.8s ease-in-out infinite;
}
@keyframes tmkRpShine {
    0%, 100% { transform: translateX(-120%); }
    55% { transform: translateX(120%); }
}
.tmk-rp-head h2 {
    margin: 0 0 0.35rem;
    font-size: 1.2rem;
    font-weight: 800;
    color: #0f172a;
}
.tmk-rp-head p {
    margin: 0;
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.65;
}

.tmk-rp-step { animation: tmkRpFade 0.28s ease; }
.tmk-rp-step[hidden] { display: none !important; }

.tmk-rp-field { margin-bottom: 0.9rem; text-align: right; }
.tmk-rp-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 0.4rem;
}
.tmk-rp-input {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.7rem 0.9rem;
    border-radius: 14px;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.tmk-rp-input:focus-within {
    border-color: rgba(14, 165, 233, 0.55);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}
.tmk-rp-input i { color: #94a3b8; }
.tmk-rp-input input {
    flex: 1;
    border: 0;
    background: transparent;
    outline: none;
    font-family: inherit;
    font-size: 0.92rem;
    color: #0f172a;
    min-width: 0;
}
.tmk-rp-input .password-toggle {
    border: 0;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.2rem;
}

.tmk-rp-channels {
    margin: 0.35rem 0 0.75rem;
}
.tmk-rp-connect {
    margin-bottom: 0.75rem;
}

.tmk-rp-btn {
    width: 100%;
    border: 0;
    border-radius: 14px;
    padding: 0.85rem 1rem;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    color: #fff;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    box-shadow: 0 12px 28px -14px rgba(14, 165, 233, 0.75);
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
    position: relative;
}
.tmk-rp-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 16px 32px -14px rgba(14, 165, 233, 0.85);
}
.tmk-rp-btn:disabled { opacity: 0.65; cursor: not-allowed; }
.tmk-rp-btn--ghost {
    background: #fff;
    color: #475569;
    border: 1.5px solid #e2e8f0;
    box-shadow: none;
    margin-top: 0.55rem;
}
.tmk-rp-btn--ghost:hover:not(:disabled) {
    border-color: #cbd5e1;
    background: #f8fafc;
    box-shadow: none;
}
.tmk-rp-btn .loading {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: tmkRpSpin 0.7s linear infinite;
}
.tmk-rp-btn--ghost .loading {
    border-color: rgba(100,116,139,0.25);
    border-top-color: #64748b;
}
@keyframes tmkRpSpin {
    to { transform: rotate(360deg); }
}
.tmk-rp-btn.is-loading .btn-text { display: none; }
.tmk-rp-btn.is-loading .loading { display: block; }

.tmk-rp-hint {
    margin: 0.65rem 0 0;
    font-size: 0.75rem;
    color: #94a3b8;
    text-align: center;
    line-height: 1.55;
}

.tmk-rp-strength {
    margin-top: 0.55rem;
}
.tmk-rp-strength__bar {
    height: 6px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}
.tmk-rp-strength__fill {
    height: 100%;
    width: 0;
    border-radius: inherit;
    transition: width 0.25s, background 0.25s;
}
.tmk-rp-strength__fill.is-weak { width: 28%; background: #f87171; }
.tmk-rp-strength__fill.is-fair { width: 55%; background: #fbbf24; }
.tmk-rp-strength__fill.is-good { width: 78%; background: #34d399; }
.tmk-rp-strength__fill.is-strong { width: 100%; background: #10b981; }
.tmk-rp-strength__label {
    margin-top: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
}

.tmk-rp-otp-wrap .otp-inputs {
    justify-content: center;
    margin: 0.5rem 0;
}
.tmk-rp-timer {
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #0369a1;
    margin: 0.55rem 0 0.35rem;
}
.tmk-rp-resend {
    display: none;
    width: 100%;
    margin-top: 0.35rem;
    border: 0;
    background: transparent;
    color: #0284c7;
    font-family: inherit;
    font-weight: 800;
    font-size: 0.82rem;
    cursor: pointer;
    padding: 0.45rem;
}
.tmk-rp-resend:hover { text-decoration: underline; }

@media (max-width: 480px) {
    .tmk-rp-card { padding: 1.25rem 1rem 1.15rem; border-radius: 20px; }
    .tmk-rp-progress__label { font-size: 0.62rem; }
    .tmk-rp-progress__item { min-width: 58px; }
}
