/**
 * 居民端认证页 PC 适配（login / register / forget / audit）
 * 仅被 view/index 认证相关页引入，不改 moblie.css，不影响员工端
 * 断点：min-width 992px 启用左右分屏
 */
:root {
  --gov-primary: #1677ff;
  --gov-primary-dark: #0958d9;
  --gov-primary-light: #69b1ff;
  --gov-text-1: #1f2937;
  --gov-text-2: #4b5563;
  --gov-text-3: #9ca3af;
  --gov-border: #e5e7eb;
  --gov-error: #ef4444;
  --gov-success: #10b981;
  --gov-warning: #f59e0b;
  --gov-radius: 8px;
  --gov-wechat: #07c160;
}

/* —— 宽屏解除 750 壳（仅本页引入时生效） —— */
@media (min-width: 992px) {
  html.gov-auth,
  html.gov-auth body {
    max-width: none !important;
    margin: 0 !important;
    width: 100% !important;
    min-height: 100%;
    height: auto;
  }
}

html.gov-auth,
html.gov-auth body {
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
}

html.gov-auth body {
  background: #e8f4ff !important;
  min-height: 100vh;
}

.gov-auth-wrap {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
}

.gov-auth-left {
  display: none;
}

.gov-auth-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0.6rem 0.4rem 0.8rem;
  box-sizing: border-box;
  width: 100%;
}

.gov-auth-panel {
  width: 100%;
  max-width: 420px;
  box-sizing: border-box;
}

.gov-auth-title {
  font-size: 0.44rem;
  font-weight: 700;
  color: var(--gov-text-1);
  margin: 0 0 0.36rem;
  line-height: 1.3;
}

.gov-auth-tabs {
  display: flex;
  gap: 0.16rem;
  margin: 0 0 0.32rem;
}

.gov-auth-tab {
  flex: 1;
  height: 0.72rem;
  border: 1px solid var(--gov-border);
  border-radius: 999px;
  background: #fff;
  color: var(--gov-text-2);
  font-size: 0.26rem;
  font-family: inherit;
  cursor: pointer;
  line-height: 1;
}

.gov-auth-tab.on {
  color: #fff;
  background: var(--gov-primary);
  border-color: var(--gov-primary);
  box-shadow: 0 2px 8px rgba(22, 119, 255, 0.25);
}

.gov-auth-sub {
  font-size: 0.24rem;
  color: var(--gov-text-3);
  margin: -0.2rem 0 0.36rem;
  line-height: 1.5;
}

.gov-auth-field {
  margin-bottom: 0.28rem;
}

.gov-auth-label {
  display: block;
  font-size: 0.26rem;
  color: var(--gov-text-1);
  margin-bottom: 0.1rem;
  font-weight: 500;
}

.gov-auth-label .req {
  color: var(--gov-error);
  margin-left: 2px;
}

.gov-auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.gov-auth-input-wrap input {
  width: 100%;
  height: 0.88rem;
  padding: 0 0.28rem;
  border: 1px solid var(--gov-border);
  border-radius: var(--gov-radius);
  font-size: 0.28rem;
  color: var(--gov-text-1);
  background: #fff;
  outline: none;
  box-sizing: border-box;
  margin: 0;
  display: block;
}

.gov-auth-input-wrap.has-icon input {
  padding-left: 0.8rem;
}

.gov-auth-icon {
  position: absolute;
  left: 0.28rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gov-text-3);
  font-size: 0.32rem;
  line-height: 1;
  pointer-events: none;
  z-index: 1;
}

.gov-auth-input-wrap input:focus {
  border-color: var(--gov-primary);
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.1);
}

.gov-auth-input-wrap input::placeholder {
  color: var(--gov-text-3);
}

.gov-auth-input-wrap.has-action input {
  padding-right: 2.2rem;
}

.gov-auth-action {
  position: absolute;
  right: 0.12rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: var(--gov-primary);
  color: #fff;
  font-size: 0.24rem;
  height: 0.64rem;
  padding: 0 0.2rem;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  line-height: 0.64rem;
}

.gov-auth-action:disabled,
.gov-auth-action.disabled {
  background: var(--gov-text-3);
  color: #fff;
  cursor: not-allowed;
  pointer-events: none;
}

/* 兼容旧 class：获取验证码 */
.gov-auth-input-wrap .btn_code,
.gov-auth-input-wrap .code_btn {
  position: absolute;
  right: 0.12rem;
  top: 50%;
  transform: translateY(-50%);
  flex-shrink: 0;
  border: none;
  background: var(--gov-primary);
  color: #fff !important;
  font-size: 0.24rem;
  height: 0.64rem;
  line-height: 0.64rem;
  padding: 0 0.2rem;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
}

.gov-auth-input-wrap .btn_code.disabled,
.gov-auth-input-wrap .code_btn:disabled {
  background: var(--gov-text-3);
  color: #fff !important;
  cursor: not-allowed;
}

.gov-auth-toggle-pwd {
  position: absolute;
  right: 0.24rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.3rem;
  color: var(--gov-text-3);
  cursor: pointer;
  user-select: none;
  background: none;
  border: none;
  padding: 0;
  line-height: 1;
  z-index: 1;
}

.gov-auth-toggle-pwd:hover {
  color: var(--gov-primary);
}

/* 隐藏 Edge/IE 自带密码「小眼睛」，避免与自定义切换按钮重叠 */
.gov-auth-input-wrap input[type="password"]::-ms-reveal,
.gov-auth-input-wrap input[type="password"]::-ms-clear,
.gov-auth-input-wrap input[type="text"]::-ms-reveal,
.gov-auth-input-wrap input[type="text"]::-ms-clear {
  display: none;
  width: 0;
  height: 0;
}

/* H5：微信授权登录；PC 隐藏（改用扫码区） */
.gov-auth-wx-area {
  display: block;
}

/* PC 扫码区默认隐藏，宽屏再显示 */
.gov-auth-wx-qr {
  display: none;
}

.gov-auth-qr-box {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 0 auto;
  border: 1px solid #e5e6eb;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.gov-auth-qr-box img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

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

.gov-auth-qr-mask p {
  margin: 0;
  font-size: 13px;
  color: #646a73;
}

.gov-auth-qr-refresh {
  border: none;
  background: var(--gov-primary);
  color: #fff;
  border-radius: 4px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
}

.gov-auth-qr-hint {
  margin: 12px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--gov-text-2);
}

.gov-auth-bind-tip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: -12px 0 20px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f0fff5;
  border: 1px solid #b7eb8f;
  color: #389e0d;
  font-size: 13px;
  line-height: 1.5;
}

.gov-auth-bind-tip i {
  color: #07c160;
  font-size: 16px;
  margin-top: 1px;
  flex-shrink: 0;
}

.gov-auth-btn {
  width: 100%;
  height: 0.88rem;
  margin-top: 0.16rem;
  border: none;
  border-radius: var(--gov-radius);
  background: var(--gov-primary);
  color: #fff;
  font-size: 0.3rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  line-height: 0.88rem;
  box-shadow: none;
  box-sizing: border-box;
}

.gov-auth-btn:hover {
  background: var(--gov-primary-dark);
}

.gov-auth-btn-wx {
  width: 100%;
  height: 0.84rem;
  margin-top: 0.2rem;
  border: 1px solid var(--gov-wechat);
  border-radius: var(--gov-radius);
  background: #fff;
  color: var(--gov-wechat);
  font-size: 0.28rem;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  line-height: 0.84rem;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
}

.gov-auth-btn-wx i {
  font-size: 0.36rem;
}

.gov-auth-btn-wx:hover {
  background: #f0fff5;
}

.gov-auth-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.28rem;
  font-size: 0.26rem;
}

.gov-auth-links a {
  color: var(--gov-primary);
  text-decoration: none;
}

.gov-auth-links a.secondary {
  color: var(--gov-text-2);
}

.gov-auth-links a:hover {
  text-decoration: underline;
  color: var(--gov-primary-dark);
}

.gov-auth-divider {
  display: flex;
  align-items: center;
  margin: 0.32rem 0 0.2rem;
  color: var(--gov-text-3);
  font-size: 0.24rem;
}

.gov-auth-divider::before,
.gov-auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--gov-border);
}

.gov-auth-divider span {
  padding: 0 0.24rem;
}

.gov-auth-agree {
  display: flex;
  align-items: flex-start;
  gap: 0.12rem;
  margin: 0.28rem 0 0.1rem;
  font-size: 0.24rem;
  color: var(--gov-text-2);
  line-height: 1.5;
}

.gov-auth-agree input {
  margin-top: 0.04rem;
}

.gov-auth-agree a {
  color: var(--gov-primary);
}

.gov-auth-status {
  text-align: center;
  padding: 0.4rem 0.2rem;
}

.gov-auth-status-icon {
  width: 1.2rem;
  height: 1.2rem;
  margin: 0 auto 0.32rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.48rem;
  line-height: 1;
}

.gov-auth-status-icon.pending {
  background: #fff7e6;
  color: var(--gov-warning);
}

.gov-auth-status-icon.info {
  background: #f0f5ff;
  color: var(--gov-primary);
}

.gov-auth-status h3 {
  font-size: 0.36rem;
  color: var(--gov-text-1);
  margin: 0 0 0.16rem;
}

.gov-auth-status p {
  font-size: 0.26rem;
  color: var(--gov-text-2);
  line-height: 1.7;
  margin: 0 0 0.12rem;
}

.gov-auth-tip {
  margin-top: 0.28rem;
  padding: 0.2rem 0.24rem;
  background: #f0f9ff;
  border-left: 3px solid var(--gov-primary);
  border-radius: 4px;
  font-size: 0.24rem;
  color: var(--gov-text-2);
  line-height: 1.6;
  text-align: left;
}

/* 注册协议弹层：PC 居中卡片 */
.gov-auth-mask {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 99;
}

.gov-auth-dialog {
  display: none;
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 480px;
  background: #fff;
  border-radius: var(--gov-radius);
  z-index: 100;
  padding: 0.4rem;
  max-height: 70vh;
  overflow: auto;
  box-sizing: border-box;
}

.gov-auth-dialog h3 {
  font-size: 0.34rem;
  text-align: center;
  margin: 0 0 0.3rem;
  color: var(--gov-text-1);
}

.gov-auth-dialog .body {
  font-size: 0.26rem;
  color: var(--gov-text-2);
  line-height: 1.6;
}

.gov-auth-dialog .ok {
  margin-top: 0.4rem;
  text-align: center;
  color: var(--gov-primary);
  font-size: 0.3rem;
  cursor: pointer;
}

/* —— PC 左右分屏 —— */
@media (min-width: 992px) {
  html.gov-auth body {
    background-color: #e8f4ff !important;
    background-image: none !important;
  }

  html.gov-auth body::before {
    display: none;
  }

  .gov-auth-wrap {
    flex-direction: row;
    min-height: 100vh;
  }

  .gov-auth-left {
    display: flex;
    flex: 1;
    min-width: 420px;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 140px 60px 80px;
    position: relative;
    z-index: 2;
    box-sizing: border-box;
    overflow: hidden;
  }

  /* 左侧实景图：挂在左栏，避免 body 背景被覆盖/未部署导致空白 */
  .gov-auth-left-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: #cfe6ff url("/static/index/images/gov/login-bg.jpg") no-repeat left center;
    background-size: cover;
  }

  .gov-auth-left-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
      to right,
      rgba(232, 244, 255, 0.2) 0%,
      rgba(255, 255, 255, 0.35) 70%,
      rgba(255, 255, 255, 0.55) 100%
    );
  }

  .gov-auth-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 1;
  }

  .gov-auth-logo-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(22, 119, 255, 0.12);
    border: 2px solid rgba(22, 119, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--gov-primary);
    font-size: 34px;
    font-weight: 700;
    line-height: 1;
  }

  .gov-auth-logo-icon i {
    font-size: 34px;
    color: var(--gov-primary);
  }

  .gov-auth-wx-area {
    display: none !important;
  }

  .gov-auth-wx-qr {
    display: block;
    margin-top: 8px;
  }

  .gov-auth-reg-qr {
    margin-bottom: 20px;
  }

  .gov-auth-logo-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .gov-auth-logo-text .zh {
    font-size: 22px;
    font-weight: 700;
    color: var(--gov-primary-dark);
    line-height: 1.25;
    letter-spacing: 0.5px;
    white-space: nowrap;
  }

  .gov-auth-logo-text .en {
    font-size: 13px;
    color: var(--gov-primary);
    letter-spacing: 3px;
    text-transform: uppercase;
    line-height: 1.3;
    white-space: nowrap;
  }

  .gov-auth-right {
    flex: 1;
    min-width: 420px;
    background: rgba(255, 255, 255, 0.56);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    justify-content: center;
    padding: 60px 40px;
    position: relative;
  }

  .gov-auth-title {
    font-size: 28px;
    margin-bottom: 36px;
  }

  .gov-auth-sub {
    font-size: 14px;
    margin: -24px 0 28px;
  }

  .gov-auth-field {
    margin-bottom: 22px;
  }

  .gov-auth-label {
    font-size: 14px;
    margin-bottom: 8px;
  }

  .gov-auth-input-wrap input {
    height: 48px;
    padding: 0 14px;
    font-size: 15px;
  }

  .gov-auth-input-wrap.has-icon input {
    padding-left: 44px;
  }

  .gov-auth-icon {
    left: 15px;
    font-size: 17px;
  }

  .gov-auth-input-wrap.has-action input {
    padding-right: 110px;
  }

  .gov-auth-input-wrap.has-pwd input {
    padding-right: 42px;
  }

  .gov-auth-toggle-pwd {
    right: 14px;
    font-size: 16px;
  }

  .gov-auth-action,
  .gov-auth-input-wrap .btn_code,
  .gov-auth-input-wrap .code_btn {
    height: 36px;
    line-height: 36px;
    font-size: 13px;
    padding: 0 14px;
  }

  .gov-auth-btn {
    height: 48px;
    line-height: 48px;
    font-size: 16px;
    margin-top: 8px;
  }

  .gov-auth-btn-wx {
    height: 46px;
    line-height: 46px;
    font-size: 15px;
  }

  .gov-auth-links {
    font-size: 14px;
    margin-top: 18px;
  }

  .gov-auth-divider {
    margin: 24px 0;
    font-size: 13px;
  }

  .gov-auth-agree {
    font-size: 13px;
  }

  .gov-auth-status-icon {
    width: 80px;
    height: 80px;
    font-size: 36px;
    margin-bottom: 24px;
  }

  .gov-auth-status h3 {
    font-size: 20px;
  }

  .gov-auth-status p {
    font-size: 14px;
  }

  .gov-auth-tip {
    font-size: 13px;
    padding: 12px 16px;
  }
}
