body {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 55%, #0A6B9E 100%);
  display: flex;
  flex-direction: column;
}

nav {
  background: rgba(6, 36, 68, 0.6);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.auth-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 24px 60px;
  position: relative;
  z-index: 1;
}

.auth-card {
  width: 100%;
  max-width: 460px;
  background: rgba(255,255,255,0.97);
  border-radius: 20px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.28);
  overflow: hidden;
}

/* Tab */
.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--gray-100);
}

.auth-tab {
  flex: 1;
  padding: 20px;
  text-align: center;
  font-size: 15px;
  font-weight: 500;
  color: var(--gray-400);
  cursor: pointer;
  border: none;
  background: none;
  position: relative;
  transition: color 0.2s;
  font-family: var(--font-sans);
}

.auth-tab::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 20%;
  right: 20%;
  height: 2px;
  background: var(--azure);
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.2s;
}

.auth-tab.active { color: var(--navy); font-weight: 600; }
.auth-tab.active::after { opacity: 1; }

/* Panel */
.auth-panel { display: none; padding: 36px 40px 40px; }
.auth-panel.active { display: block; }

.auth-panel-title { font-size: 22px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.auth-panel-sub   { font-size: 13px; color: var(--gray-400); margin-bottom: 32px; font-weight: 300; }

/* Form */
.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-600);
  margin-bottom: 8px;
}

.form-input-wrap { position: relative; }

.form-input-wrap > svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  fill: var(--gray-400);
  pointer-events: none;
  transition: fill 0.2s;
}

.form-input-wrap:focus-within > svg { fill: var(--azure); }

.form-input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  border: 1.5px solid var(--gray-100);
  border-radius: 10px;
  font-size: 14px;
  font-family: var(--font-sans);
  color: var(--gray-800);
  background: var(--gray-50);
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.form-input:focus {
  border-color: var(--azure);
  background: white;
  box-shadow: 0 0 0 3px rgba(20,115,200,0.1);
}

.form-input.has-toggle { padding-right: 44px; }

.input-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: grid;
  place-items: center;
}

.input-toggle svg {
  width: 18px;
  height: 18px;
  fill: var(--gray-400);
  transition: fill 0.2s;
}

.input-toggle:hover svg { fill: var(--azure); }

.form-error {
  display: none;
  font-size: 12px;
  color: #e53e3e;
  margin-top: 6px;
}

.form-group.has-error .form-input {
  border-color: #e53e3e;
  box-shadow: 0 0 0 3px rgba(229,62,62,0.1);
}

.form-group.has-error .form-error { display: block; }

.form-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  margin-top: -8px;
}

.form-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray-600);
  cursor: pointer;
  user-select: none;
}

.form-checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--azure);
  cursor: pointer;
}

.form-link {
  font-size: 13px;
  color: var(--azure);
  text-decoration: none;
  font-weight: 500;
}

.form-link:hover { color: var(--sky); text-decoration: underline; }

.btn-auth {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--azure), var(--sky));
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(20,115,200,0.38);
  transition: transform 0.15s, box-shadow 0.15s;
  letter-spacing: 0.5px;
}

.btn-auth:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(20,115,200,0.48);
}

.btn-auth:active { transform: translateY(0); }

/* 密码强度 */
.pwd-strength { margin-top: 8px; display: none; }

.pwd-strength-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 6px;
}

.pwd-strength-bar span {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--gray-100);
  transition: background 0.3s;
}

.pwd-strength-label { font-size: 11px; color: var(--gray-400); }

.form-agree {
  font-size: 12px;
  color: var(--gray-400);
  line-height: 1.8;
  margin-top: 16px;
  text-align: center;
}

.form-agree a { color: var(--azure); text-decoration: none; }

/* 成功状态 */
.auth-success { display: none; text-align: center; padding: 48px 40px; }

.auth-success-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
  background: linear-gradient(135deg, var(--azure), var(--sky));
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.auth-success-icon svg { width: 36px; height: 36px; fill: white; }

.auth-success h2 { font-size: 22px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }

.auth-success p {
  font-size: 14px;
  color: var(--gray-400);
  font-weight: 300;
  line-height: 1.8;
  margin-bottom: 32px;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 13px;
  color: var(--gray-400);
}

.auth-footer button {
  background: none;
  border: none;
  color: var(--azure);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-sans);
  padding: 0;
}

.auth-footer button:hover { color: var(--sky); text-decoration: underline; }

/* 背景装饰 */
.auth-bg-deco {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.auth-bg-deco::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(41,168,224,0.15) 0%, transparent 70%);
  top: -200px; right: -100px;
}

.auth-bg-deco::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,188,212,0.1) 0%, transparent 70%);
  bottom: -100px; left: -80px;
}

.auth-page-footer {
  text-align: center;
  padding: 20px;
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  position: relative;
  z-index: 1;
}

@media (max-width: 520px) {
  .auth-panel { padding: 28px 24px 32px; }
  .auth-success { padding: 36px 24px; }
}
