/* OTP auth — same split shell as password login */
body:has(.rt-otp-page) {
  background: #f4f6fb !important;
}
body:has(.rt-otp-page) header#top,
body:has(.rt-otp-page) footer,
body:has(.rt-otp-page) .o_footer,
body:has(.rt-otp-page) .rtm-bar,
body:has(.rt-otp-page) .rtm-tab,
body:has(.rt-otp-page) .o_footer_copyright {
  display: none !important;
}
#wrap:has(.rt-otp-page) {
  margin: 0 !important;
  padding: 0 !important;
}

.rt-otp-page .rt-auth-card {
  text-align: center;
  direction: rtl;
}

.rt-otp-steps {
  list-style: none;
  margin: 0 0 1.15rem;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}
.rt-otp-steps li {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid #ebe6f8;
  background: #f8f7fc;
  color: #8a84a4;
  font-size: 0.82rem;
  font-weight: 600;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.rt-otp-steps li i {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  font-size: 0.75rem;
  background: #e8e4f5;
  color: #6b6588;
}
.rt-otp-steps li.is-on {
  background: #f0ebff;
  border-color: #d4c8ff;
  color: #3d3470;
}
.rt-otp-steps li.is-on i {
  background: #6d4dff;
  color: #fff;
}
.rt-otp-steps li.is-done {
  background: #eefbf4;
  border-color: #c6edd8;
  color: #1f6b45;
}
.rt-otp-steps li.is-done i {
  background: #2f9e6b;
  color: #fff;
}

.rt-otp {
  text-align: start;
}
.rt-otp-field {
  display: block;
  margin-bottom: 0.95rem;
}
.rt-otp-field > span:first-child {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #3d355c;
  text-align: right;
}
.rt-otp-phone {
  display: flex;
  align-items: stretch;
  border: 1px solid #e6e2f2;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.rt-otp-phone:focus-within {
  border-color: #6d4dff;
  box-shadow: 0 0 0 3px rgba(109, 77, 255, .12);
}
.rt-otp-phone em {
  display: flex;
  align-items: center;
  padding: 0 0.85rem;
  font-style: normal;
  font-weight: 700;
  color: #6b6588;
  background: #f7f5ff;
  border-inline-end: 1px solid #ebe6f8;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  direction: ltr;
}
.rt-otp-phone input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  min-height: 50px;
  padding: 0.7rem 0.95rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: #1b1633;
  letter-spacing: 0.04em;
  direction: ltr;
  text-align: left;
}
.rt-otp-code {
  width: 100%;
  min-height: 56px;
  border: 1px solid #e6e2f2;
  border-radius: 14px;
  background: #fff;
  padding: 0.7rem 0.95rem;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: 0.45em;
  text-align: center;
  color: #1b1633;
  direction: ltr;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.rt-otp-code:focus {
  outline: 0;
  border-color: #6d4dff;
  box-shadow: 0 0 0 3px rgba(109, 77, 255, .12);
}

.rt-otp-btn {
  display: block;
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 14px;
  background: #6d4dff;
  color: #fff;
  font-weight: 800;
  font-size: 0.98rem;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
  box-shadow: 0 10px 24px rgba(109, 77, 255, .22);
}
.rt-otp-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(109, 77, 255, .28);
}
.rt-otp-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.rt-otp-sent {
  margin: 0 0 0.85rem;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  background: #f0ebff;
  color: #3d3470;
  font-size: 0.88rem;
  line-height: 1.55;
  text-align: right;
}
.rt-otp-sent strong {
  font-weight: 800;
  direction: ltr;
  unicode-bidi: isolate;
}

.rt-otp-resend-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.9rem;
}
.rt-otp-link {
  border: 0;
  background: transparent;
  color: #6d4dff;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.25rem 0;
  cursor: pointer;
}
.rt-otp-link:disabled {
  color: #9b96b0;
  cursor: default;
}

.rt-otp-err {
  background: #fff1f1;
  color: #9b1c1c;
  border: 1px solid #ffd0d0;
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  margin-bottom: 0.9rem;
  font-size: 0.88rem;
  text-align: right;
}

.rt-otp-foot {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #f0ecf8;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: #8b86a3;
}
.rt-otp-foot a {
  color: #6d4dff;
  font-weight: 700;
  text-decoration: none;
}
.rt-otp-foot a:hover {
  text-decoration: underline;
}

[data-rt-otp-step] {
  animation: rt-otp-in .28s ease;
}
@keyframes rt-otp-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 980px) {
  .rt-otp-page .rt-auth-panel {
    min-height: 100vh;
  }
}
