/* ==========================================================================
   登录 / 注册页
   ========================================================================== */
.auth-layout {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 100vh;
}

/* -------------------------------- 左侧品牌 ------------------------------- */
.auth-aside {
  position: relative;
  overflow: hidden;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  background: linear-gradient(150deg, #2b4bcf 0%, #4f7cff 45%, #6f9bff 100%);
}

.auth-aside::before,
.auth-aside::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  pointer-events: none;
}

.auth-aside::before {
  width: 460px;
  height: 460px;
  right: -160px;
  top: -140px;
}

.auth-aside::after {
  width: 320px;
  height: 320px;
  left: -120px;
  bottom: -140px;
  background: rgba(255, 255, 255, 0.07);
}

.aside-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  position: relative;
  z-index: 1;
}

.aside-brand .logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  display: grid;
  place-items: center;
}

.aside-main {
  position: relative;
  z-index: 1;
  max-width: 420px;
}

.aside-main h1 {
  font-size: 34px;
  line-height: 1.25;
  margin: 0 0 14px;
  letter-spacing: -0.4px;
}

.aside-main p {
  margin: 0 0 28px;
  font-size: 14.5px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.82);
}

.aside-points {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.aside-points li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
}

.aside-points .tick {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: grid;
  place-items: center;
  margin-top: 1px;
}

.aside-foot {
  position: relative;
  z-index: 1;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

/* -------------------------------- 右侧表单 ------------------------------- */
.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: var(--surface);
}

.auth-card {
  width: 100%;
  max-width: 380px;
}

.auth-mobile-brand {
  display: none;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 26px;
  color: var(--text);
}

.auth-mobile-brand .logo-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--primary-soft);
  color: var(--primary);
  display: grid;
  place-items: center;
}

.auth-head h2 {
  font-size: 24px;
  margin: 0 0 6px;
  letter-spacing: -0.3px;
}

.auth-head p {
  margin: 0 0 24px;
  color: var(--text-muted);
  font-size: 13.5px;
}

/* 分段切换 登录 / 注册 */
.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: var(--surface-3);
  border-radius: 10px;
  margin-bottom: 22px;
}

.segmented button {
  height: 34px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.segmented button.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* 输入框内图标 */
.input-wrap {
  position: relative;
}

.input-wrap .input {
  padding-left: 38px;
  height: 42px;
}

.input-wrap .input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #9aa4b5;
  pointer-events: none;
  display: flex;
}

.input-wrap.has-suffix .input {
  padding-right: 42px;
}

.input-suffix {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: #9aa4b5;
  cursor: pointer;
  border-radius: 6px;
  display: grid;
  place-items: center;
}

.input-suffix:hover {
  background: var(--surface-3);
  color: var(--text-secondary);
}

/* 密码强度 */
.strength {
  display: flex;
  gap: 4px;
  margin-top: 2px;
}

.strength span {
  height: 3px;
  flex: 1;
  border-radius: 3px;
  background: var(--border);
  transition: background 0.2s;
}

.strength[data-level="1"] span:nth-child(1) {
  background: var(--danger);
}
.strength[data-level="2"] span:nth-child(-n + 2) {
  background: var(--warning);
}
.strength[data-level="3"] span:nth-child(-n + 3) {
  background: #58b368;
}
.strength[data-level="4"] span {
  background: var(--success);
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 18px;
  font-size: 13px;
  color: var(--text-secondary);
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  user-select: none;
}

.checkbox input {
  width: 15px;
  height: 15px;
  accent-color: var(--primary);
  margin: 0;
  cursor: pointer;
}

.auth-submit {
  height: 44px;
  font-size: 15px;
}

.auth-foot {
  margin-top: 22px;
  font-size: 12.5px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.7;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 18px;
  color: var(--text-muted);
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* -------------------------------- 响应式 --------------------------------- */
@media (max-width: 900px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-aside {
    display: none;
  }

  .auth-main {
    min-height: 100vh;
    background: var(--surface);
    padding: 32px 20px;
  }

  .auth-mobile-brand {
    display: flex;
  }
}

@media (max-width: 480px) {
  .auth-head h2 {
    font-size: 21px;
  }
}
