/* ============================================================
   法通达官网 · 登录 / 注册 页样式
   复用深色科技主题令牌
   ============================================================ */

.auth-page {
  min-height: 100vh;
  background: var(--bg-darkest);
  display: flex;
  align-items: stretch;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 90px 0 40px;
}
.auth-page::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 80% 10%, rgba(7,160,255,0.18), transparent 55%),
    radial-gradient(ellipse at 10% 90%, rgba(58,129,245,0.18), transparent 55%);
  pointer-events: none;
}
.auth-page::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 50%, #000 35%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, #000 35%, transparent 80%);
  pointer-events: none;
}

.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 960px;
  margin: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid var(--card-border-dark);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.45);
}

/* ---------- 左侧品牌面板 ---------- */
.auth-brand {
  padding: 48px 44px;
  background: linear-gradient(160deg, rgba(58,129,245,0.18), rgba(7,160,255,0.06) 60%, transparent);
  border-right: 1px solid var(--card-border-dark);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.auth-brand::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle, rgba(7,160,255,0.35), transparent 70%);
  filter: blur(30px);
}
.auth-brand-logo {
  display: flex; align-items: center; gap: 11px;
  margin-bottom: 48px;
  position: relative; z-index: 1;
}
.auth-brand-logo .logo-zh { font-size: 19px; }
.auth-brand-content {
  margin-top: auto;
  position: relative; z-index: 1;
}
.auth-brand h2 {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.3;
  color: #fff;
  margin-bottom: 18px;
}
.auth-brand h2 span {
  background: var(--brand-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.auth-brand p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-soft);
  margin-bottom: 28px;
}
.auth-brand-points {
  display: flex; flex-direction: column; gap: 12px;
}
.auth-brand-points li {
  display: flex; align-items: center; gap: 10px;
  font-size: 13.5px; color: var(--text-soft);
}
.auth-brand-points li::before {
  content: '✓';
  width: 20px; height: 20px; flex-shrink: 0;
  border-radius: 50%;
  background: rgba(7,160,255,0.18);
  color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}

/* ---------- 右侧表单面板 ---------- */
.auth-form-panel {
  padding: 44px 48px;
  display: flex;
  flex-direction: column;
}
.auth-form-head { margin-bottom: 28px; }
.auth-form-head h1 {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}
.auth-form-head .auth-sub {
  font-size: 14px;
  color: var(--text-dim);
}
.auth-form-head .auth-sub a {
  color: var(--accent);
  font-weight: 600;
  margin-left: 4px;
}
.auth-form-head .auth-sub a:hover { text-decoration: underline; }

/* ---------- Tabs（仅登录页：验证码 / 密码） ---------- */
.auth-tabs {
  display: flex;
  gap: 4px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--card-border-dark);
  border-radius: var(--radius-pill);
  padding: 4px;
  margin-bottom: 24px;
}
.auth-tab {
  flex: 1;
  text-align: center;
  padding: 9px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dim);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all .25s ease;
}
.auth-tab.active {
  background: var(--brand-grad);
  color: #fff;
  box-shadow: 0 4px 14px rgba(58,129,245,0.35);
}

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

.field { display: flex; flex-direction: column; gap: 7px; }
.field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  letter-spacing: 0.02em;
}
.field-row {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--card-border-dark);
  border-radius: var(--radius);
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.field-row:focus-within {
  border-color: var(--brand);
  background: rgba(58,129,245,0.06);
  box-shadow: 0 0 0 3px rgba(58,129,245,0.15);
}
.field-row.invalid {
  border-color: #ef4444;
  background: rgba(239,68,68,0.05);
}
.field-icon {
  padding: 0 14px;
  color: var(--text-dim);
  display: flex;
  flex-shrink: 0;
}
.field-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 13px 14px 13px 0;
  color: #fff;
  font-size: 15px;
  font-family: inherit;
}
.field-input::placeholder { color: var(--text-dim); }
.field-input:-webkit-autofill {
  -webkit-text-fill-color: #fff;
  -webkit-box-shadow: 0 0 0 1000px rgba(20,30,60,0.9) inset;
}

.field-code-btn {
  align-self: stretch;
  margin: 6px 6px 6px 0;
  padding: 0 16px;
  background: rgba(7,160,255,0.14);
  color: var(--accent);
  border: 1px solid rgba(7,160,255,0.30);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all .2s ease;
  min-width: 110px;
}
.field-code-btn:hover:not(:disabled) {
  background: rgba(7,160,255,0.24);
}
.field-code-btn:disabled {
  color: var(--text-dim);
  background: rgba(255,255,255,0.04);
  border-color: var(--card-border-dark);
  cursor: not-allowed;
}

.field-error {
  font-size: 12.5px;
  color: #f87171;
  min-height: 0;
  display: none;
}
.field-error.show { display: block; }

/* 协议复选框 */
.auth-agree {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.6;
  cursor: pointer;
  user-select: none;
}
.auth-agree input {
  margin-top: 2px;
  width: 16px; height: 16px;
  accent-color: var(--brand);
  flex-shrink: 0;
}
.auth-agree a { color: var(--accent); }
.auth-agree a:hover { text-decoration: underline; }

.auth-submit {
  margin-top: 6px;
  width: 100%;
  padding: 14px;
  font-size: 15px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 24px 0 18px;
  color: var(--text-dim);
  font-size: 12px;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px;
  background: var(--card-border-dark);
}

.auth-foot {
  margin-top: auto;
  padding-top: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
}
.auth-foot a { color: var(--accent); font-weight: 600; }
.auth-foot a:hover { text-decoration: underline; }

/* ---------- Toast ---------- */
.auth-toast {
  position: fixed;
  top: 24px; left: 50%;
  transform: translateX(-50%) translateY(-120%);
  z-index: 1000;
  min-width: 240px;
  max-width: 90vw;
  padding: 14px 22px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: rgba(4,9,26,0.95);
  border: 1px solid var(--card-border-dark);
  box-shadow: 0 12px 36px rgba(0,0,0,0.5);
  display: flex; align-items: center; gap: 10px;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .35s ease;
  opacity: 0;
}
.auth-toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.auth-toast.success { border-color: rgba(34,197,94,0.4); }
.auth-toast.success .auth-toast-icon { background: #22c55e; }
.auth-toast.error   { border-color: rgba(239,68,68,0.4); }
.auth-toast.error .auth-toast-icon   { background: #ef4444; }
.auth-toast-icon {
  width: 20px; height: 20px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}

/* ---------- Back-to-home ---------- */
.auth-back {
  position: fixed;
  top: 26px; left: 28px;
  z-index: 50;
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 500;
  transition: color .2s ease;
}
.auth-back:hover { color: #fff; }

/* ---------- 响应式 ---------- */
@media (max-width: 820px) {
  .auth-card { grid-template-columns: 1fr; max-width: 460px; }
  .auth-brand { display: none; }
  .auth-page { padding: 70px 16px 32px; }
  .auth-form-panel { padding: 36px 28px; }
}
@media (max-width: 480px) {
  .auth-form-panel { padding: 30px 20px; }
  .auth-form-head h1 { font-size: 22px; }
  .field-code-btn { min-width: 96px; padding: 0 12px; font-size: 12.5px; }
}
