/* ===========================================================
   万物绿洲 · 后台登录页样式
   设计：清新自然 · 专业信赖
   =========================================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
  background: linear-gradient(135deg, #F0FDF4 0%, #ECFDF5 30%, #F8FAFC 70%, #FFF7ED 100%);
  padding: 20px;
}

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

.bg-decoration .circle {
  position: absolute;
  border-radius: 50%;
}

.bg-decoration .circle:nth-child(1) {
  width: 500px;
  height: 500px;
  top: -15%;
  right: -10%;
  background: radial-gradient(circle, rgba(5, 150, 105, 0.08), transparent);
}

.bg-decoration .circle:nth-child(2) {
  width: 400px;
  height: 400px;
  bottom: -10%;
  left: -8%;
  background: radial-gradient(circle, rgba(217, 119, 6, 0.06), transparent);
}

.bg-decoration .circle:nth-child(3) {
  width: 200px;
  height: 200px;
  top: 40%;
  left: 60%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.05), transparent);
}

/* 登录容器 */
.login-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
}

/* 品牌信息 */
.brand {
  text-align: center;
  margin-bottom: 32px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.brand-logo .logo-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #059669, #10B981);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.2);
}

.brand-logo .logo-text {
  text-align: left;
}

.brand-logo .logo-text h1 {
  font-size: 22px;
  font-weight: 700;
  color: #0F172A;
  letter-spacing: -0.5px;
}

.brand-logo .logo-text span {
  font-size: 11px;
  color: #64748B;
  letter-spacing: 1px;
}

.brand p {
  font-size: 14px;
  color: #94A3B8;
  margin-top: 4px;
}

/* 登录卡片 */
.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02), 0 10px 30px rgba(0, 0, 0, 0.04);
  border: 1px solid #E2E8F0;
}

/* 登录方式切换标签 */
.login-tabs {
  display: flex;
  gap: 4px;
  background: #F1F5F9;
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 28px;
}

.login-tab {
  flex: 1;
  padding: 10px 12px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #64748B;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  text-align: center;
}

.login-tab i {
  margin-right: 6px;
  font-size: 12px;
}

.login-tab:hover {
  color: #059669;
}

.login-tab.active {
  background: #fff;
  color: #059669;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* 登录表单 */
.login-form {
  display: none;
}

.login-form.active {
  display: block;
}

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

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #475569;
  margin-bottom: 6px;
}

.input-wrap {
  position: relative;
}

.input-wrap .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94A3B8;
  font-size: 14px;
  pointer-events: none;
  transition: color 0.3s;
}

.input-wrap input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  font-size: 14px;
  color: #0F172A;
  font-family: inherit;
  outline: none;
  transition: all 0.3s ease;
}

.input-wrap input:focus {
  border-color: #059669;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.08);
}

.input-wrap input:focus ~ .input-icon {
  color: #059669;
}

.input-wrap input::placeholder {
  color: #94A3B8;
}

/* 验证码 */
.captcha-row {
  display: flex;
  gap: 12px;
}

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

.captcha-row .captcha-img {
  width: 120px;
  height: 44px;
  border-radius: 10px;
  cursor: pointer;
  border: 1.5px solid #E2E8F0;
  overflow: hidden;
  flex-shrink: 0;
}

.captcha-row .captcha-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 短信验证码行 */
.sms-row {
  display: flex;
  gap: 12px;
}

.sms-row .input-wrap {
  flex: 1;
}

.btn-sms {
  padding: 12px 16px;
  background: linear-gradient(135deg, #059669, #10B981);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  font-family: inherit;
  flex-shrink: 0;
}

.btn-sms:hover {
  background: linear-gradient(135deg, #047857, #059669);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2);
}

.btn-sms:disabled {
  background: #94A3B8;
  cursor: not-allowed;
  box-shadow: none;
}

/* 登录按钮 */
.btn-submit {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #059669, #10B981);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.2);
  margin-top: 4px;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(5, 150, 105, 0.25);
}

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

.btn-submit i {
  margin-right: 8px;
}

/* 错误提示 */
.error-msg {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #DC2626;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}

.error-msg.show {
  display: block;
}

/* 页脚信息 */
.login-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 13px;
  color: #94A3B8;
}

.login-footer a {
  color: #059669;
  font-weight: 500;
}

.login-footer a:hover {
  color: #047857;
}

/* 加载遮罩 */
.loading-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.8);
  border-radius: 16px;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.loading-overlay.show {
  display: flex;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #E2E8F0;
  border-top-color: #059669;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 切换动画 */
.fade-enter {
  animation: fadeSlideIn 0.3s ease;
}

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

/* ===========================================================
   RESPONSIVE
   =========================================================== */
@media (max-width: 480px) {
  .login-card {
    padding: 28px 24px;
  }

  .login-tabs {
    flex-wrap: wrap;
  }

  .login-tab {
    font-size: 12px;
    padding: 8px 6px;
  }

  .login-tab i {
    display: none;
  }

  .captcha-row {
    flex-direction: column;
  }

  .captcha-row .captcha-img {
    width: 100%;
    height: 44px;
  }

  .sms-row {
    flex-direction: column;
  }
}
