/* ===== 用户端登录/注册模板（对标 IDC 云主机风格） ===== */
:root {
  --auth-primary: #1890ff;
  --auth-primary-hover: #40a9ff;
  --auth-text: #333;
  --auth-muted: #999;
  --auth-border: #e8e8e8;
}

* { box-sizing: border-box; }

body.auth-page {
  min-height: 100vh;
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
  display: flex;
  flex-direction: column;
  background: #0d47a1;
  color: var(--auth-text);
}

/* 顶部白栏 */
.auth-topbar {
  position: relative;
  z-index: 10;
  height: 56px;
  background: #fff;
  box-shadow: 0 1px 8px rgba(0, 0, 0, .06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  flex-shrink: 0;
}
.auth-topbar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--auth-text);
  font-size: 18px;
  font-weight: 700;
}
.auth-topbar .brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: linear-gradient(135deg, #ff6b35, #ff9f43);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}
.auth-topbar .back-home {
  color: var(--auth-muted);
  font-size: 14px;
  text-decoration: none;
  transition: color .2s;
}
.auth-topbar .back-home:hover { color: var(--auth-primary); }

/* 等距服务器背景 */
.auth-scene {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px 24px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(64, 169, 255, .35) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(24, 144, 255, .25) 0%, transparent 45%),
    linear-gradient(160deg, #1565c0 0%, #0d47a1 35%, #0a3d8f 70%, #062e6e 100%);
}
.auth-scene::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='800' height='600' viewBox='0 0 800 600'%3E%3Cg fill='none' stroke='rgba(100,181,246,0.15)' stroke-width='1'%3E%3Cpath d='M120 420 L200 380 L200 320 L120 360 Z' fill='rgba(33,150,243,0.12)'/%3E%3Cpath d='M200 380 L280 420 L280 360 L200 320 Z' fill='rgba(25,118,210,0.18)'/%3E%3Cpath d='M120 360 L200 320 L280 360 L200 400 Z' fill='rgba(66,165,245,0.1)'/%3E%3Cpath d='M140 340 L140 300 L180 280 L180 320 Z' fill='rgba(100,181,246,0.2)'/%3E%3Cpath d='M400 380 L480 340 L480 280 L400 320 Z' fill='rgba(33,150,243,0.12)'/%3E%3Cpath d='M480 340 L560 380 L560 320 L480 280 Z' fill='rgba(25,118,210,0.18)'/%3E%3Cpath d='M400 320 L480 280 L560 320 L480 360 Z' fill='rgba(66,165,245,0.1)'/%3E%3Cpath d='M420 300 L420 260 L460 240 L460 280 Z' fill='rgba(100,181,246,0.2)'/%3E%3Cpath d='M600 450 L680 410 L680 350 L600 390 Z' fill='rgba(33,150,243,0.1)'/%3E%3Cpath d='M680 410 L760 450 L760 390 L680 350 Z' fill='rgba(25,118,210,0.15)'/%3E%3C/g%3E%3Cg fill='rgba(144,202,249,0.4)'%3E%3Ccircle cx='200' cy='200' r='3'/%3E%3Ccircle cx='350' cy='150' r='2'/%3E%3Ccircle cx='500' cy='220' r='3'/%3E%3Ccircle cx='650' cy='180' r='2'/%3E%3Ccircle cx='280' cy='280' r='2'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  background-position: center;
  opacity: .9;
  pointer-events: none;
}

/* 卡片 */
.auth-card-v2 {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, .18);
  padding: 32px 36px 28px;
}

.auth-tabs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--auth-border);
  padding-bottom: 0;
  gap: 12px;
  flex-wrap: wrap;
}
.auth-tabs {
  display: flex;
  gap: 24px;
}
.auth-tabs button {
  background: none;
  border: none;
  padding: 0 0 12px;
  font-size: 16px;
  color: var(--auth-muted);
  cursor: pointer;
  position: relative;
  font-family: inherit;
  transition: color .2s;
}
.auth-tabs button:hover { color: var(--auth-text); }
.auth-tabs button.active {
  color: var(--auth-primary);
  font-weight: 600;
}
.auth-tabs button.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--auth-primary);
  border-radius: 1px;
}
.auth-switch-link {
  font-size: 13px;
  color: var(--auth-muted);
  text-decoration: none;
  white-space: nowrap;
}
.auth-switch-link b { color: var(--auth-primary); font-weight: 500; }
.auth-switch-link:hover b { text-decoration: underline; }

/* 表单 */
.auth-panel { display: none; }
.auth-panel.active { display: block; }

.auth-field { margin-bottom: 20px; }
.auth-field label {
  display: block;
  font-size: 14px;
  color: var(--auth-text);
  margin-bottom: 8px;
  font-weight: 500;
}
.auth-field input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--auth-border);
  border-radius: 4px;
  font-size: 14px;
  color: var(--auth-text);
  transition: border-color .2s, box-shadow .2s;
  font-family: inherit;
}
.auth-field input::placeholder { color: #bfbfbf; }
.auth-field input:focus {
  outline: none;
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 2px rgba(24, 144, 255, .12);
}

.auth-row-2 {
  display: flex;
  gap: 10px;
}
.auth-row-2 input { flex: 1; }
.auth-row-2 .btn-code {
  flex-shrink: 0;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--auth-primary);
  background: #fff;
  color: var(--auth-primary);
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: all .2s;
}
.auth-row-2 .btn-code:hover { background: #e6f7ff; }
.auth-row-2 .btn-code:disabled { opacity: .5; cursor: not-allowed; }

.auth-extra {
  display: flex;
  justify-content: space-between;
  margin: -8px 0 20px;
  font-size: 13px;
}
.auth-extra a { color: var(--auth-muted); text-decoration: none; }
.auth-extra a:hover { color: var(--auth-primary); }

.auth-agree {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--auth-muted);
  line-height: 1.5;
}
.auth-agree input { margin-top: 3px; accent-color: var(--auth-primary); }
.auth-agree a { color: var(--auth-primary); text-decoration: none; }
.auth-agree a:hover { text-decoration: underline; }

.btn-auth-submit {
  width: 100%;
  height: 44px;
  border: none;
  border-radius: 4px;
  background: var(--auth-primary);
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background .2s, box-shadow .2s;
}
.btn-auth-submit:hover {
  background: var(--auth-primary-hover);
  box-shadow: 0 4px 12px rgba(24, 144, 255, .35);
}
.btn-auth-submit:disabled { opacity: .6; cursor: not-allowed; }

/* 第三方登录 */
.auth-social {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--auth-border);
  text-align: center;
}
.auth-social p {
  font-size: 13px;
  color: var(--auth-muted);
  margin-bottom: 16px;
}
.auth-social-icons {
  display: flex;
  justify-content: center;
  gap: 20px;
}
.auth-social-icons a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--auth-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
}
.auth-social-icons a:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(24, 144, 255, .4);
}

/* 消息提示 */
.auth-msg {
  padding: 10px 14px;
  border-radius: 4px;
  margin-bottom: 16px;
  font-size: 13px;
}
.auth-msg.error { background: #fff2f0; color: #ff4d4f; border: 1px solid #ffccc7; }
.auth-msg.ok { background: #f6ffed; color: #52c41a; border: 1px solid #b7eb8f; }

/* 底部 */
.auth-footer-bar {
  position: relative;
  z-index: 10;
  background: #fff;
  border-top: 1px solid #f0f0f0;
  padding: 16px 24px;
  text-align: center;
  font-size: 12px;
  color: var(--auth-muted);
  line-height: 1.8;
  flex-shrink: 0;
}
.auth-footer-bar a {
  color: var(--auth-muted);
  text-decoration: none;
  margin: 0 6px;
}
.auth-footer-bar a:hover { color: var(--auth-primary); }

@media (max-width: 520px) {
  .auth-topbar { padding: 0 16px; }
  .auth-card-v2 { padding: 24px 20px 20px; }
  .auth-tabs-row { flex-direction: column; align-items: flex-start; }
}
