/* ============================================================
   登录 / 注册 / 找回密码 / 重置密码  共用样式
   主题：暗黑渐变背景 + 橙色强调色
   ============================================================ */

:root {
  --accent: #ff7a1a;       /* 橙色主色 */
  --accent-2: #ff9a3d;     /* 橙色渐变亮端 */
  --accent-deep: #e5660a;  /* 橙色渐变暗端 / hover */
  --bg-image: url("../images/bg.svg");
  --bg-color: #0a0812;

  --surface: rgba(255, 255, 255, 0.06);
  --surface-strong: rgba(255, 255, 255, 0.09);
  --border: rgba(255, 255, 255, 0.16);
  --border-focus: var(--accent);

  --text: #f2f4f8;
  --text-dim: #a6adbd;
  --input-bg: rgba(255, 255, 255, 0.05);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-color) var(--bg-image) center / cover no-repeat fixed;
}

/* 顶部的通用渐变遮罩，避免内容直接落在图片上太花哨 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(
    1000px 600px at 70% 10%,
    rgba(255, 122, 26, 0.10),
    transparent 55%
  );
}

/* ---------- 顶部标题 ---------- */
.hero {
  margin-top: 82px;
  text-align: center;
}


/* ---------- 登录卡片（双栏） ---------- */
.login-card {
  margin-top: 150px;
  width: 840px;
  max-width: calc(100vw - 32px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  display: flex;
  padding: 44px 0;
  min-height: 380px;
}

/* ---------- 单栏卡片（注册/找回/重置） ---------- */
.auth-card {
  margin-top: 150px;
  width: 440px;
  max-width: calc(100vw - 32px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  padding: 36px 40px 30px;
}

.card-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 28px;
  /*display: flex;*/
  align-items: center;
  gap: 8px;
  text-align: center;
}

/* 左侧扫码区 */
.qr-panel {
  width: 42%;
  padding: 12px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-right: 1px solid var(--border);
}

.qr-tip {
  font-size: 13px;
  color: var(--text);
  margin-bottom: 20px;
}

.qr-box {
  width: 180px;
  height: 180px;
  position: relative;
}

.qr-img {
  width: 180px;
  height: 180px;
  display: block;
  border-radius: 6px;
}

/* 二维码遮罩层 */
.qr-mask {
  position: absolute;
  inset: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.qr-mask[hidden] {
  display: none !important;
}

.qr-mask-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
}

.qr-mask-content[hidden] {
  display: none !important;
}

.qr-mask-title {
  font-size: 15px;
  font-weight: 500;
  color: #333;
  margin: 0;
  line-height: 1.4;
}

.qr-mask-desc {
  font-size: 13px;
  color: #666;
  margin: 6px 0 0;
  line-height: 1.4;
}

.qr-mask-check {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #2ecc71;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  line-height: 1;
}

.qr-refresh-btn {
  margin-top: 14px;
  padding: 8px 18px;
  font-size: 13px;
  color: #333;
  background: #fff;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.qr-refresh-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}


.qr-other {
  margin-top: 28px;
  font-size: 13px;
  color: var(--text-dim);
}

.qr-icons {
  margin-top: 14px;
  display: flex;
  gap: 14px;
}

.icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}

.icon-gitee { background: #ffffff url("../images/gitee.svg") }
.icon-github      { background: #ffffff url("../images/github.svg")}


/* 右侧表单区 */
.form-panel {
  flex: 1;
  padding: 0 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* tabs */
.tabs-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 34px;
}

.tabs {
  display: flex;
  gap: 26px;
}

.tab {
  background: none;
  border: none;
  font-size: 17px;
  color: var(--text-dim);
  cursor: pointer;
  padding: 6px 2px;
  position: relative;
}

.tab.active {
  color: var(--accent);
  font-weight: 600;
}

.tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -11px;
  height: 2px;
  background: var(--accent);
}

.register-link {
  font-size: 14px;
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.register-link:hover {
  text-decoration: underline;
}

/* 表单字段 */
.login-form {
  display: none;
  flex-direction: column;
  gap: 20px;
}

.login-form.active {
  display: flex;
}

form.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 14px;
  height: 48px;
  background: var(--input-bg);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(255, 122, 26, 0.15);
}

/* 校验错误态 */
.field.error {
  border-color: #ff5a4e;
  box-shadow: 0 0 0 3px rgba(255, 90, 78, 0.15);
}

.field-error {
  display: block;
  color: #ff7a72;
  font-size: 12px;
  line-height: 1.4;
  margin: -10px 2px 2px;
}

/* 表单级错误 / 成功提示 */
.form-error,
.form-success {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 4px;
}

.form-error {
  background: rgba(255, 77, 70, 0.14);
  border: 1px solid rgba(255, 77, 70, 0.4);
  color: #ff8a80;
}

.form-success {
  background: rgba(50, 213, 153, 0.14);
  border: 1px solid rgba(50, 213, 153, 0.4);
  color: #7ee2b8;
}

.form-error::before {
  content: "!";
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ff5a4e;
  color: #fff;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

.form-success::before {
  content: "✓";
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #32d599;
  color: #0b2a1e;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

/* 协议行错误态 */
.privacy-row.error {
  color: #ff8a80;
}

.privacy-row.error a {
  color: #ff8a80;
}

.label-text {
  width: 62px;
  font-size: 14px;
  color: var(--text);
  flex-shrink: 0;
}

.field input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  height: 100%;
  color: var(--text);
}

.field input::placeholder {
  color: #8a90a2;
}

/* 密码容器（JS 自动包裹）与验证码容器 */
.pw-wrap,
.code-wrap {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  min-width: 0;
}

.pw-wrap input,
.code-wrap input {
  flex: 1;
  min-width: 0;
}

/* 可见性图标 */
.eye {
  background: none;
  border: none;
  color: #8a90a2;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

.eye:hover {
  color: var(--text);
}

.code-btn {
  border: none;
  background: none;
  color: var(--accent);
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  padding: 8px 0 8px 12px;
  flex-shrink: 0;
}

.code-btn:hover {
  text-decoration: underline;
}

/* 记住我 / 忘记密码 */
.options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.remember {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-dim);
  cursor: pointer;
}

.remember input {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
  cursor: pointer;
}

.forgot {
  font-size: 14px;
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.forgot:hover {
  text-decoration: underline;
}

/* 提交按钮（橙色） */
.submit {
  height: 48px;
  border: none;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.2s, transform 0.05s;
  margin-top: 4px;
}

.submit:hover {
  filter: brightness(1.06);
}

.submit:active {
  transform: translateY(1px);
}

/* 隐私政策复选框行 */
.privacy-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
}

.privacy-row input {
  width: 15px;
  height: 15px;
  margin-top: 2px;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.privacy-row a {
  color: var(--accent);
  text-decoration: none;
}

.privacy-row a:hover {
  text-decoration: underline;
}

/* 页脚辅助链接 */
.alt {
  margin-top: 22px;
  text-align: center;
  font-size: 14px;
  color: var(--text-dim);
}

.alt a {
  color: var(--accent);
  text-decoration: none;
}

.alt a:hover {
  text-decoration: underline;
}

/* ---------- 底部版权 ---------- */
.footer {
  margin-top: auto;
  padding: 40px 16px 30px;
  text-align: center;
}

.footer p {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.6;
}

/* ---------- 授权确认页 ---------- */
.auth-desc {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 20px;
}

.auth-desc strong {
  color: var(--text);
  font-weight: 600;
}

.app-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 22px;
}

.app-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.app-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.app-desc {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 3px;
}

/* 权限列表 */
.scope-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 22px;
}

.scope-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--input-bg);
}

.scope-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.scope-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 122, 26, 0.14);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.scope-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.scope-title {
  font-size: 14px;
  color: var(--text);
}

.scope-desc {
  font-size: 12px;
  color: var(--text-dim);
}

/* 协议确认行 */
.agree-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 22px;
  cursor: pointer;
}

.agree-row input {
  width: 15px;
  height: 15px;
  margin-top: 2px;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.agree-row a {
  color: var(--accent);
  text-decoration: none;
}

.agree-row a:hover {
  text-decoration: underline;
}

/* 同意 / 拒绝 按钮组 */
.btn-row {
  display: flex;
  gap: 14px;
}

.submit.primary {
  flex: 1;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.submit.secondary {
  flex: 1;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.submit.secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: none;
}

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .login-card {
    flex-direction: column;
    width: 100%;
  }
  .qr-panel {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 12px;
  }
  .form-panel {
    padding: 20px 20px 8px;
  }
  .hero-title {
    font-size: 28px;
  }
  .auth-card {
    padding: 28px 24px 22px;
  }
}
