/* Luồng tài khoản mới: đăng ký bằng QR, kích hoạt, đăng nhập thiết bị mới, quên mật khẩu, trạng thái phê duyệt */

/* ---------- thẻ đăng nhập nhiều chặng ---------- */
.af-pane[hidden] {
  display: none;
}
.af-steps {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
}
.af-steps li {
  flex: 1;
  display: grid;
  justify-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  position: relative;
}
.af-steps li:not(:last-child):after {
  content: '';
  position: absolute;
  top: 13px;
  left: calc(50% + 18px);
  right: calc(-50% + 18px);
  height: 2px;
  background: var(--line);
}
.af-steps li.done:not(:last-child):after {
  background: #17864f;
}
.af-steps i {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-style: normal;
  font-weight: 800;
  font-size: 12px;
  background: var(--bg);
  color: var(--ink-2);
  border: 1.5px solid var(--line);
}
.af-steps li.on i {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.af-steps li.on {
  color: var(--ink);
  font-weight: 700;
}
.af-steps li.done i {
  background: #e9f7ef;
  border-color: #17864f;
  color: #17864f;
}
.af-who {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin: 0 0 16px;
  padding: 12px 14px;
  background: var(--bg);
  border-radius: 12px;
  font-size: 14px;
}
.af-who span {
  color: var(--muted);
}
.af-who b {
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.af-who em {
  flex-basis: 100%;
  font-style: normal;
  font-weight: 700;
  color: var(--ink-2);
}
.af-note {
  margin-top: 14px;
  text-align: center;
}
.af-alert {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fff8e6;
  border: 1px solid #f3dca6;
  color: #7a5200;
  font-size: 14px;
  font-weight: 600;
}
.af-rules {
  list-style: none;
  margin: -6px 0 16px;
  padding: 0;
  display: grid;
  gap: 5px;
  font-size: 13.5px;
  color: var(--muted);
}
.af-rules li {
  padding-left: 22px;
  position: relative;
}
.af-rules li:before {
  content: '○';
  position: absolute;
  left: 2px;
  top: 0;
}
.af-rules li.ok {
  color: #166534;
}
.af-rules li.ok:before {
  content: '✓';
  font-weight: 800;
}
.af-center {
  text-align: center;
}
.af-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 4px auto 12px;
  font-size: 28px;
}
.af-icon.warn {
  background: #fff1f0;
  color: var(--red);
}
.af-icon.ok {
  background: #e9f7ef;
  color: #17864f;
  font-weight: 800;
}
.af-count {
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  margin: 12px 0 18px;
}
.af-center .btn + .btn {
  margin-top: 10px;
}
.af-list {
  text-align: left;
  margin: 14px 0 20px;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  font-size: 14px;
  color: var(--ink-2);
}
.af-sim {
  margin: 12px 0 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
}
.af-sim .link {
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
  padding: 0;
}
.af-eye {
  white-space: nowrap;
}
#forgot {
  display: block;
  text-align: center;
  margin-top: 12px;
}

/* ---------- đăng ký trên máy tính: quốc tịch → chống bot → mã QR ---------- */
.rq-gate[hidden],
.rq-form[hidden],
.rq-box[hidden] {
  display: none;
}
.rq-lead {
  margin: 0 0 16px;
}
.rq-block {
  margin: 0 0 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #fff1f0;
  border: 1px solid #f5c2c0;
  color: #9f1c1c;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}
.rq-flow {
  list-style: none;
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  font-size: 14px;
  color: var(--ink-2);
}
.rq-flow li {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--bg);
}
.rq-flow li i {
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  background: #fff;
  border: 1.5px solid var(--line);
  color: var(--muted);
}
.rq-flow li.on {
  background: #eef4ff;
  color: #1e3a8a;
  font-weight: 700;
}
.rq-flow li.on i {
  border-color: #1e3a8a;
  color: #1e3a8a;
}
.rq-flow li.done {
  color: #166534;
}
.rq-flow li.done i {
  background: #e9f7ef;
  border-color: #17864f;
  color: #17864f;
}
.rq-direct {
  margin-top: 14px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}
.rq-token {
  margin: 0 0 16px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #eef4ff;
  color: #1e3a8a;
  font-size: 13.5px;
  font-weight: 600;
}

/* ---------- trang Tài khoản: trạng thái phê duyệt, VA, thiết bị ---------- */
.ap-card {
  border-radius: 18px;
  padding: 20px;
  background: #fff;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.ap-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 6px;
}
.ap-head h2 {
  font-size: 19px;
  margin: 0;
  flex: 1;
  min-width: 200px;
}
.ap-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  background: #fff8e6;
  color: #7a5200;
  border: 1px solid #f3dca6;
}
.ap-badge.ok {
  background: #e9f7ef;
  color: #166534;
  border-color: #b7e3c7;
}
.ap-badge.no {
  background: #fff1f0;
  color: #9f1c1c;
  border-color: #f5c2c0;
}
.ap-msg {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--ink-2);
}
.ap-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 14px;
  background: var(--bg);
}
.ap-qr {
  width: 132px;
  height: 132px;
  background: #fff;
  border-radius: 10px;
  padding: 6px;
}
.ap-qr svg {
  display: block;
  width: 100%;
  height: 100%;
}
.ap-va {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.ap-va small {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.ap-va b {
  font-size: 22px;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}
.ap-va span {
  font-size: 13.5px;
  color: var(--ink-2);
}
.ap-rows {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}
.ap-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 14px;
}
.ap-row b {
  flex: 1;
  min-width: 150px;
}
.ap-row .ap-badge {
  padding: 3px 10px;
  font-size: 12px;
}
.ap-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.ap-actions .btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}
.ap-lock {
  font-size: 13px;
  color: var(--muted);
  align-self: center;
}
.ap-demo {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.ap-demo button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 4px 12px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  color: var(--ink-2);
}
.dv-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.dv-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.dv-item div {
  flex: 1;
  min-width: 170px;
  display: grid;
  gap: 2px;
}
.dv-item small {
  color: var(--muted);
  font-size: 12.5px;
}
.dv-item em {
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
  color: #166534;
  background: #e9f7ef;
  border-radius: 999px;
  padding: 2px 9px;
}

/* hộp thoại xác nhận lại (mật khẩu + OTP, đổi TKNT thêm khuôn mặt) */
#stepup-dlg {
  /* style.css đặt margin: 0 cho mọi phần tử nên phải khai lại để hộp nằm chính giữa màn hình */
  position: fixed;
  inset: 0;
  margin: auto;
  height: fit-content;
  max-height: 92vh;
  overflow: auto;
  border: 0;
  border-radius: 18px;
  padding: 0;
  width: min(440px, 94vw);
  box-shadow: 0 24px 70px rgba(13, 29, 51, 0.3);
}
#stepup-dlg::backdrop {
  background: rgba(13, 29, 51, 0.5);
}
.su-body {
  padding: 22px;
}
.su-body h2 {
  font-size: 19px;
  margin: 0 0 6px;
}
.su-body .muted {
  margin: 0 0 16px;
  font-size: 14px;
}
.su-body .btn + .btn {
  margin-top: 10px;
}

@media (max-width: 600px) {
  .af-steps span {
    font-size: 11px;
  }
  .ap-grid {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
}

.rq-direct .link {
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
  padding: 0;
}
.ap-actions .is-locked {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ---------- CAPTCHA tự dựng: kéo mảnh ghép vào ô vuông ---------- */
.cp {
  width: min(100%, 332px);
  margin: 0 auto 14px;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #fafbfc;
  user-select: none;
  -webkit-user-select: none;
}
.cp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.cp-head b {
  font-size: 14.5px;
}
.cp-new {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  color: var(--ink-2);
}
.cp-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 300/120;
  border-radius: 10px;
  overflow: hidden;
  background: #e5e8ee;
}
.cp-stage img {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.cp-piece {
  position: absolute;
  left: 0;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.28);
  border: 2px solid #fff;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 4px 12px rgba(0, 0, 0, 0.4);
  box-sizing: border-box;
  pointer-events: none;
}
.cp-done {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  background: rgba(22, 101, 52, 0.82);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
}
.cp-track {
  position: relative;
  height: 40px;
  margin-top: 10px;
  border-radius: 999px;
  background: #eceff4;
  border: 1px solid var(--line);
  overflow: hidden;
}
.cp-track span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 13px;
  color: var(--muted);
  pointer-events: none;
  padding-left: 36px;
}
.cp-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: #dbe7ff;
}
.cp-knob {
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 38px;
  border-radius: 999px;
  border: 0;
  background: var(--red);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  cursor: grab;
  touch-action: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  z-index: 1;
}
.cp.drag .cp-knob {
  cursor: grabbing;
}
.cp.drag .cp-track span,
.cp.ok .cp-track span {
  opacity: 0;
}
.cp-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.cp-msg {
  margin: 8px 0 0;
  min-height: 18px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
.cp-msg.bad {
  color: #b91c1c;
  font-weight: 600;
}
.cp.load .cp-stage {
  opacity: 0.55;
}
.cp.load .cp-knob,
.cp.off .cp-knob,
.cp.ok .cp-knob {
  pointer-events: none;
}
.cp.ok {
  border-color: #17864f;
  background: #f3fbf6;
}
.cp.ok .cp-done {
  display: grid;
}
.cp.ok .cp-knob {
  background: #17864f;
}
.cp.ok .cp-fill {
  background: #c9efd8;
  width: 100% !important;
}
.cp.ok .cp-new,
.cp.off .cp-new {
  visibility: hidden;
}
.cp.off {
  opacity: 0.6;
}

/* ---------- đăng ký theo BRD R-02: quốc tịch cố định, đồng ý dữ liệu, CCCD, TKNT, điều khoản ---------- */
.rq-nation {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg);
  font-size: 14px;
}
.rq-nation span {
  color: var(--muted);
}
.rq-nation small {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 12.5px;
}
.rq-have {
  margin: 0 0 14px;
  padding: 14px;
  border-radius: 12px;
  background: #fff8e6;
  border: 1px solid #f3dca6;
  color: #7a5200;
  font-size: 14px;
}
.rq-have p {
  margin: 6px 0 12px;
}
.rq-terms {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  gap: 8px;
  font-size: 14px;
  color: var(--ink-2);
}
.rq-terms li {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg);
}
.rq-terms b {
  display: block;
  color: var(--ink);
  margin-bottom: 2px;
}
.rq-stop {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff1f0;
  border: 1px solid #f5c2c0;
  color: #9f1c1c;
  font-size: 14px;
}
.rq-card {
  margin: 14px 0 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 6px;
  font-size: 14px;
}
.rq-card b {
  color: #166534;
}
.rq-card p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
}
.rq-card p span {
  color: var(--muted);
}
.rq-card p strong {
  text-align: right;
}
.rq-card small {
  color: var(--muted);
  font-size: 12.5px;
}
.rq-pay {
  margin: 0 0 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.rq-pay-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-weight: 700;
}
.rq-pay-head .link {
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
}
.rq-pay .field:last-child {
  margin-bottom: 0;
}
.rq-agree {
  display: grid;
  gap: 12px;
  margin-bottom: 6px;
}
.rq-agree em {
  font-style: normal;
  font-size: 12px;
  color: var(--red);
  font-weight: 700;
  margin-left: 4px;
}
.rq-agree .opt em {
  color: var(--muted);
}

/* Hộp thư của tài khoản trên thẻ trạng thái */
.ap-notices {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}
.ap-notices > b {
  font-size: 13.5px;
}
.ap-notice {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: inherit;
  text-decoration: none;
}
.ap-notice span {
  font-weight: 700;
  font-size: 13.5px;
}
.ap-notice small {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.ap-notice em {
  grid-column: 1/-1;
  font-style: normal;
  font-size: 12.5px;
  color: var(--ink-2);
}
