/* ===== 登录页样式 - 杭州表面力科技有限公司 ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --brand-1: #1e6fff;
  --brand-2: #00c6fb;
  --brand-dark: #0a1c3d;
  --text-dark: #1f2d3d;
  --text-muted: #8492a6;
  --border-color: #e4e9f0;
  --error-color: #e64545;
  --bg-body: #eef3fb;
}

html,
body {
  height: 100%;
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg-body);
  color: var(--text-dark);
  -webkit-font-smoothing: antialiased;
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

/* ===== 背景装饰 ===== */
.bg-decoration {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(30, 111, 255, 0.08);
}

.ring-1 {
  width: 600px;
  height: 600px;
  top: -220px;
  right: -160px;
}

.ring-2 {
  width: 420px;
  height: 420px;
  bottom: -140px;
  left: -120px;
}

.ring-3 {
  width: 280px;
  height: 280px;
  bottom: 80px;
  right: 8%;
  border-color: rgba(30, 111, 255, 0.05);
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
}

.glow-1 {
  width: 360px;
  height: 360px;
  background: linear-gradient(135deg, #4facfe, transparent);
  top: -120px;
  right: 8%;
}

.glow-2 {
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, transparent, #00f2fe);
  bottom: -100px;
  left: 5%;
}

/* ===== 登录卡片 ===== */
.login-card {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  max-width: 1040px;
  min-height: 620px;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 24px 80px rgba(22, 34, 58, 0.12), 0 8px 24px rgba(22, 34, 58, 0.06);
  overflow: hidden;
}

/* ===== 左侧品牌区 ===== */
.brand-side {
  flex: 1 1 46%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  color: #ffffff;
  overflow: hidden;
}

.brand-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(79, 172, 254, 0.18), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(0, 242, 254, 0.16), transparent 40%),
    linear-gradient(135deg, #0b1d3d 0%, #123a7a 55%, #1e6fff 100%);
}

.brand-bg::before,
.brand-bg::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-bg::before {
  width: 420px;
  height: 420px;
  top: -80px;
  right: -120px;
}

.brand-bg::after {
  width: 320px;
  height: 320px;
  bottom: -60px;
  left: -80px;
}

.brand-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 360px;
}

.brand-logo {
  margin-bottom: 32px;
  animation: fadeUp 0.8s ease-out both;
}

.brand-logo img {
  max-width: 220px;
  height: auto;
  filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.15));
}

.brand-title {
  margin-bottom: 22px;
  animation: fadeUp 0.8s ease-out 0.1s both;
}

.brand-title h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.brand-title p {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.5px;
}

.brand-divider {
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.85), transparent);
  border-radius: 2px;
  margin: 0 auto 22px;
  animation: fadeUp 0.8s ease-out 0.2s both;
}

.brand-desc {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 4px;
  margin-bottom: 42px;
  animation: fadeUp 0.8s ease-out 0.25s both;
}

.brand-features {
  list-style: none;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  animation: fadeUp 0.8s ease-out 0.35s both;
}

.brand-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.88);
}

.feature-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #00f2fe;
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.6);
}

/* ===== 右侧登录区 ===== */
.form-side {
  flex: 1 1 54%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  background: #ffffff;
}

.form-box {
  width: 100%;
  max-width: 380px;
}

.form-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}

.form-logo img {
  height: 42px;
  width: auto;
  opacity: 0.9;
}

.form-header {
  text-align: center;
  margin-bottom: 32px;
}

.form-header h2 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.form-header p {
  color: var(--text-muted);
  font-size: 14px;
}

.form-item {
  margin-bottom: 22px;
}

.form-item label {
  display: block;
  font-size: 13px;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-dark);
}

.input-wrap {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  fill: var(--text-muted);
  transition: fill 0.2s;
  pointer-events: none;
}

.input-wrap input {
  width: 100%;
  height: 50px;
  padding: 0 48px;
  font-size: 15px;
  color: var(--text-dark);
  background: #f8fafd;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.input-wrap input::placeholder {
  color: #b0bccc;
}

.input-wrap input:focus {
  background: #ffffff;
  border-color: var(--brand-1);
  box-shadow: 0 0 0 4px rgba(30, 111, 255, 0.1);
}

.input-wrap input:focus + .input-icon {
  fill: var(--brand-1);
}

/* 输入框聚焦时，图标颜色跟随变化 */
.input-wrap:focus-within .input-icon {
  fill: var(--brand-1);
}

.toggle-pwd {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  fill: var(--text-muted);
  transition: fill 0.2s, background 0.2s;
}

.toggle-pwd:hover {
  background: #f0f4fa;
  fill: var(--brand-1);
}

.toggle-pwd svg {
  width: 18px;
  height: 18px;
}

.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
  font-size: 13px;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text-muted);
  user-select: none;
  position: relative;
}

.checkbox input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.check-mark {
  width: 16px;
  height: 16px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: #f8fafd;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, background 0.2s;
}

.check-mark::after {
  content: "";
  width: 5px;
  height: 8px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
  opacity: 0;
  transition: opacity 0.15s;
}

.checkbox input:checked + .check-mark {
  background: var(--brand-1);
  border-color: var(--brand-1);
}

.checkbox input:checked + .check-mark::after {
  opacity: 1;
}

.checkbox:hover .check-mark {
  border-color: var(--brand-1);
}

.forgot-link {
  color: var(--brand-1);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s;
}

.forgot-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.btn-login {
  width: 100%;
  height: 50px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--brand-1) 0%, #0d8af0 50%, var(--brand-2) 100%);
  background-size: 200% 100%;
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 4px;
  cursor: pointer;
  transition: box-shadow 0.25s, transform 0.1s, background-position 0.35s;
}

.btn-login:hover {
  background-position: 100% 0;
  box-shadow: 0 8px 22px rgba(30, 111, 255, 0.35);
}

.btn-login:active {
  transform: scale(0.985);
}

.btn-login:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  box-shadow: none;
}

.form-error {
  min-height: 22px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--error-color);
  text-align: center;
}

.form-footer {
  margin-top: 28px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

.form-footer code {
  background: #eef2f8;
  padding: 3px 8px;
  border-radius: 4px;
  font-family: Consolas, monospace;
  color: var(--text-dark);
  font-size: 11px;
}

/* ===== 动画 ===== */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .login-page {
    padding: 16px;
    align-items: flex-start;
  }

  .login-card {
    flex-direction: column;
    min-height: auto;
    border-radius: 20px;
  }

  .brand-side {
    padding: 36px 24px 28px;
  }

  .brand-logo img {
    max-width: 160px;
  }

  .brand-title h1 {
    font-size: 18px;
  }

  .brand-desc {
    margin-bottom: 24px;
    letter-spacing: 2px;
    font-size: 14px;
  }

  .brand-features {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px 20px;
  }

  .form-side {
    padding: 32px 24px 40px;
  }
}

@media (max-width: 480px) {
  .form-header h2 {
    font-size: 22px;
  }

  .brand-features {
    font-size: 12px;
  }

  .form-logo img {
    height: 36px;
  }
}
