/* ===== 登录页:左右分栏(左侧柔和浅蓝渐变 + Yeti 动画头像,右侧表单)=====
   头像动画改编自 Darin Senneff 的经典作品。接入本系统安全登录链路(CSRF + 两步验证)。 */

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  color: #0f172a;
  background: #fff;
}

.page {
  position: relative;
  display: flex;
  min-height: 100vh;
}

/* ---------- 左侧:柔和浅蓝渐变(与 Yeti 同色系)+ 头像 ---------- */
.left {
  position: relative;
  flex: 1 1 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #17506b;
  background: linear-gradient(160deg, #eaf6fd 0%, #c3e6f5 58%, #9bd3ee 100%);
}

.brand {
  position: absolute;
  top: 28px;
  left: 32px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.brand .brandIcon {
  width: 26px;
  height: 26px;
  display: block;
}

.avatarWrap {
  width: 260px;
  max-width: 60%;
}
.svgContainer {
  position: relative;
  width: 100%;
  border-radius: 50%;
  overflow: hidden;
  pointer-events: none;
  box-shadow: 0 18px 40px -16px rgba(33, 112, 147, 0.45);
}
.svgContainer > div {
  position: relative;
  width: 100%;
  height: 0;
  overflow: hidden;
  padding-bottom: 100%;
}
.svgContainer .mySVG {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ---------- 右侧:表单 ---------- */
.right {
  flex: 1 1 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

form {
  width: 100%;
  max-width: 360px;
}

.welcome {
  text-align: center;
  font-size: 30px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 6px;
}
.subtitle {
  text-align: center;
  font-size: 14px;
  color: #94a3b8;
  margin-bottom: 30px;
}

.field { margin-bottom: 18px; }
.field > label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 7px;
}

.inputGroup { position: relative; }

input[type="text"],
input[type="password"] {
  display: block;
  width: 100%;
  height: 52px;
  padding: 0 16px;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  font-size: 16px; /* ≥16px:避免 iOS Safari 聚焦时自动放大 */
  font-weight: 500;
  color: #0f172a;
  font-family: inherit;
  -webkit-appearance: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
input::placeholder { color: #cbd5e1; font-weight: 400; }
input[type="text"]:focus,
input[type="password"]:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

/* 密码显隐按钮 */
.pwWrap input { padding-right: 48px; }
.pwToggle {
  position: absolute;
  top: 0;
  right: 0;
  width: 48px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  padding: 0;
}
.pwToggle:hover { color: #475569; }
.pwToggle svg { width: 20px; height: 20px; }
.pwToggle .iconOff { display: none; }
.pwToggle.showing .iconOn { display: none; }
.pwToggle.showing .iconOff { display: block; }

/* 错误态 */
form.error input[type="text"],
form.error input[type="password"] {
  border-color: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

/* 登录按钮 */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 52px;
  margin-bottom: 14px;
  border-radius: 9999px;
  border: 1.5px solid transparent;
  background: #2563eb;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.18s ease, box-shadow 0.18s ease;
}
.btn:hover { background: #1d4ed8; box-shadow: 0 8px 18px -8px rgba(37, 99, 235, 0.6); }
.btn:active { background: #1e40af; }
.btn:disabled { opacity: 0.6; cursor: default; }

.message {
  min-height: 1.2em;
  margin: -4px 0 12px;
  text-align: center;
  font-size: 13.5px;
  color: #ef4444;
  font-weight: 600;
}
.message.err { color: #ef4444; }

.demoHint {
  text-align: center;
  font-size: 12.5px;
  color: #94a3b8;
  margin-top: 16px;
}

/* ---------- 响应式:窄屏堆叠 ---------- */
@media (max-width: 860px) {
  .page { flex-direction: column; }
  .left {
    flex: none;
    flex-direction: column;
    gap: 18px;
    padding: 26px 22px 24px;
  }
  .brand { position: static; font-size: 17px; }
  .avatarWrap { width: 150px; }
  .right { padding: 30px 22px 40px; }
  .welcome { font-size: 26px; }
  .subtitle { margin-bottom: 24px; }
}

/* 超窄屏(小手机):进一步压缩头像与间距 */
@media (max-width: 380px) {
  .left { gap: 14px; padding: 22px 18px 20px; }
  .avatarWrap { width: 128px; }
  .right { padding: 26px 18px 34px; }
}
