/* ==========================================================================
   Tech-Nav · 登录 / 初始化页面样式（延续 index.html 的科技风格）
   说明：:root 变量定义在 css/common.css
   ========================================================================== */

html,
body {
  height: 100%;
}

body.auth-body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  font-family: "Noto Sans SC", sans-serif;
  color: var(--text-color);
  background-color: var(--bg-color);
  background-image: radial-gradient(circle at 1px 1px, rgba(139, 148, 158, 0.1) 1px, transparent 0);
  background-size: 30px 30px;
  overflow-x: hidden;
}

.auth-shell {
  width: 100%;
  max-width: 460px;
  position: relative;
  z-index: 1;
  animation: authIn 0.5s ease-out both;
}

@keyframes authIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-card {
  position: relative;
  border-radius: 1rem;
  padding: 32px 28px 24px;
  background-color: rgba(22, 27, 34, 0.86);
  backdrop-filter: blur(10px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.auth-head {
  text-align: center;
  margin-bottom: 24px;
}

.auth-logo {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(88, 166, 255, 0.18), rgba(6, 182, 212, 0.12));
  border: 1px solid rgba(88, 166, 255, 0.35);
  box-shadow: var(--accent-glow);
  color: var(--accent-color);
}

.auth-logo i,
.auth-logo svg {
  width: 28px;
  height: 28px;
}

.auth-title {
  margin: 0;
  font-family: "Exo 2", sans-serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: linear-gradient(90deg, #58a6ff, #7ee7ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth-sub {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--text-secondary-color);
}

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

.auth-field {
  display: block;
}

.auth-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #a9b4c0;
  margin-bottom: 6px;
  font-family: "Exo 2", sans-serif;
  letter-spacing: 0.03em;
}

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

.auth-input-wrap > i,
.auth-input-wrap > svg {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: #6e7681;
  pointer-events: none;
}

.auth-input-wrap input {
  width: 100%;
  padding: 11px 12px 11px 38px;
  font-size: 14px;
  font-family: inherit;
  background-color: #0d1117;
  border: 1px solid #30363d;
  border-radius: 10px;
  color: var(--text-color);
  transition: all 0.25s ease;
}

.auth-input-wrap input::placeholder {
  color: #586069;
}

.auth-input-wrap input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.18);
}

.auth-eye {
  position: absolute;
  right: 8px;
  padding: 6px;
  border: none;
  background: transparent;
  color: #6e7681;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  transition: color 0.2s ease;
}

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

.auth-eye i,
.auth-eye svg {
  width: 16px;
  height: 16px;
}

.auth-captcha {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.auth-captcha .auth-input-wrap {
  flex: 1;
}

.auth-captcha-img {
  width: 168px;
  height: 54px;
  border-radius: 10px;
  border: 1px solid #30363d;
  background-color: #0d1117;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}

.auth-captcha-img:hover {
  border-color: var(--accent-color);
  box-shadow: 0 0 12px rgba(88, 166, 255, 0.35);
}

.auth-error {
  min-height: 18px;
  margin: 0;
  font-size: 13px;
  color: #f87171;
  line-height: 1.4;
}

.auth-error.ok {
  color: #4ade80;
}

.auth-submit {
  width: 100%;
  margin-top: 4px;
  font-size: 15px;
  letter-spacing: 0.2em;
}

.auth-submit.loading {
  opacity: 0.7;
  pointer-events: none;
}

.auth-foot {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  font-size: 12px;
  color: #6e7681;
  text-align: center;
  line-height: 1.7;
}

.auth-foot code {
  color: #7ee787;
  font-family: Consolas, Monaco, monospace;
}

.auth-hint {
  font-size: 12px;
  color: #6e7681;
  margin: 6px 0 0;
}

.auth-hint.strong {
  color: #f0b429;
}

.auth-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 12px;
  color: #6e7681;
}

.auth-steps .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #30363d;
}

.auth-steps .dot.on {
  background: var(--accent-color);
  box-shadow: 0 0 8px rgba(88, 166, 255, 0.8);
}

.password-strength {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.password-strength span {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: #30363d;
  transition: background 0.25s ease;
}

.password-strength[data-level="1"] span:nth-child(1) {
  background: #ef4444;
}
.password-strength[data-level="2"] span:nth-child(-n + 2) {
  background: #f59e0b;
}
.password-strength[data-level="3"] span:nth-child(-n + 3) {
  background: #22c55e;
}
.password-strength[data-level="4"] span {
  background: #22c55e;
}

@media (max-width: 460px) {
  .auth-card {
    padding: 26px 20px 20px;
  }
  .auth-captcha {
    flex-direction: column;
  }
  .auth-captcha-img {
    width: 100%;
  }
}
