.hq-auth-mask {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.hq-auth-dialog {
  position: relative;
  width: min(780px, 100%);
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
  padding: 40px 44px 30px;
  box-sizing: border-box;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #18191c;
  animation: hqAuthPop 0.18s ease-out;
}

@keyframes hqAuthPop {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.hq-auth-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #9499a0;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.hq-auth-close:hover {
  background: #f1f2f3;
  color: #18191c;
}

.hq-auth-grid {
  display: grid;
  grid-template-columns: 236px 1px 1fr;
  gap: 0 36px;
  align-items: start;
}

.hq-auth-qr-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 2px;
}

.hq-auth-qr-title {
  font-size: 18px;
  font-weight: 500;
  color: #18191c;
  margin: 0 0 18px;
}

.hq-auth-qr-box {
  position: relative;
  width: 176px;
  height: 176px;
  padding: 8px;
  border: 1px solid #e3e5e7;
  border-radius: 10px;
  background: #ffffff;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hq-auth-qr-box img,
.hq-auth-qr-box svg {
  display: block;
  width: 100%;
  height: 100%;
}

.hq-auth-qr-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.94);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  text-align: center;
}

.hq-auth-qr-overlay.is-ok .hq-auth-qr-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #0c7263;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
}

.hq-auth-qr-overlay b {
  font-size: 14px;
  color: #18191c;
}

.hq-auth-qr-overlay small {
  font-size: 12px;
  color: #61666d;
}

.hq-auth-qr-refresh {
  border: 0;
  background: #0c7263;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
}

.hq-auth-qr-refresh:hover {
  background: #0a5c51;
}

.hq-auth-pair-code {
  margin-top: 10px;
  font-size: 12px;
  color: #61666d;
  letter-spacing: 0.5px;
}

.hq-auth-pair-code b {
  color: #18191c;
  font-variant-numeric: tabular-nums;
}

.hq-auth-qr-tip {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: #61666d;
}

.hq-auth-qr-tip strong {
  color: #0c7263;
  font-weight: 600;
}

.hq-auth-divider {
  width: 1px;
  min-height: 256px;
  background: #e3e5e7;
  align-self: stretch;
}

.hq-auth-form-col {
  min-width: 0;
}

.hq-auth-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 20px;
}

.hq-auth-tab {
  position: relative;
  border: 0;
  background: transparent;
  font-size: 18px;
  font-weight: 500;
  color: #505050;
  padding: 4px 2px;
  cursor: pointer;
  transition: color 0.15s;
}

.hq-auth-tab.on {
  color: #0c7263;
  font-weight: 600;
}

.hq-auth-tabs .hq-auth-tab-sep {
  width: 1px;
  height: 18px;
  background: #e3e5e7;
}

.hq-auth-group {
  border: 1px solid #e3e5e7;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.hq-auth-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  box-sizing: border-box;
}

.hq-auth-row + .hq-auth-row {
  border-top: 1px solid #e3e5e7;
}

.hq-auth-row label {
  flex: 0 0 54px;
  font-size: 14px;
  color: #212121;
  font-weight: 500;
}

.hq-auth-row input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
  color: #18191c;
  padding: 10px 0;
}

.hq-auth-row input::placeholder {
  color: #9499a0;
}

.hq-auth-eye {
  border: 0;
  background: transparent;
  color: #9499a0;
  cursor: pointer;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hq-auth-eye:hover {
  color: #0c7263;
}

.hq-auth-inline-btn {
  flex: none;
  border: 0;
  background: transparent;
  color: #0c7263;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 0 4px 10px;
  border-left: 1px solid #e3e5e7;
  white-space: nowrap;
}

.hq-auth-inline-btn:disabled {
  color: #9499a0;
  cursor: not-allowed;
}

.hq-auth-reg-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.hq-auth-reg-grid .hq-auth-field-full {
  grid-column: 1 / -1;
}

.hq-auth-reg-input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #e3e5e7;
  border-radius: 8px;
  font-size: 13px;
  color: #18191c;
  background: #ffffff;
  box-sizing: border-box;
  outline: none;
}

.hq-auth-reg-input:focus {
  border-color: #0c7263;
}

.hq-auth-reg-code {
  display: flex;
  gap: 8px;
}

.hq-auth-reg-code .hq-auth-reg-input {
  flex: 1;
}

.hq-auth-reg-send {
  flex: none;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #d0d7de;
  border-radius: 8px;
  background: #f8fafc;
  color: #0c7263;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.hq-auth-reg-send:disabled {
  color: #9499a0;
  cursor: not-allowed;
}

.hq-auth-err {
  min-height: 18px;
  margin-top: 8px;
  font-size: 12px;
  color: #dc2626;
}

.hq-auth-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.hq-auth-btn-sub {
  height: 40px;
  border-radius: 8px;
  border: 1px solid #e3e5e7;
  background: #ffffff;
  color: #18191c;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.hq-auth-btn-sub:hover {
  background: #f6f7f8;
  border-color: #c9ccd0;
}

.hq-auth-btn-main {
  height: 40px;
  border-radius: 8px;
  border: 0;
  background: #0c7263;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.hq-auth-btn-main:hover:not(:disabled) {
  background: #0a5c51;
}

.hq-auth-btn-main:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.hq-auth-foot {
  margin: 22px 0 0;
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
  color: #9499a0;
  position: relative;
  z-index: 2;
}

.hq-auth-foot span {
  color: #0c7263;
}

.hq-auth-mascot {
  position: absolute;
  bottom: -6px;
  width: 92px;
  height: auto;
  pointer-events: none;
  user-select: none;
  opacity: 0.94;
}

.hq-auth-mascot.left {
  left: -4px;
  transform: rotate(8deg);
}

.hq-auth-mascot.right {
  right: -4px;
  transform: rotate(-8deg);
}

@media (max-width: 720px) {
  .hq-auth-dialog {
    padding: 28px 20px 22px;
  }
  .hq-auth-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .hq-auth-divider {
    display: none;
  }
  .hq-auth-mascot {
    width: 68px;
  }
}
