/* ═══ 小余SaaS — 登录/注册页 V3（RuoYi 左右分栏风格）═══ */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #1a1a2e;
  overflow: hidden;
  /* 统一渐变背景：从左到右深蓝→亮蓝→浅白 */
  background: linear-gradient(to right, #1e3a5f 0%, #2563eb 35%, #60a5fa 60%, #bfdbfe 80%, #f8fafc 100%);
}

/* ═══ 全屏左右分栏 ═══ */
.login-layout {
  display: flex;
  width: 100vw;
  height: 100vh;
}

/* ═══ 左侧：品牌展示区 ═══ */
.login-left {
  flex: 0 0 42%;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* 左侧装饰圆 */
.login-left::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  border: 60px solid rgba(255,255,255,.04);
  top: -160px; right: -200px;
}
.login-left::after {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  border-radius: 50%;
  border: 40px solid rgba(255,255,255,.05);
  bottom: -80px; left: -100px;
}

/* 左侧品牌内容 */
.brand-left {
  text-align: center;
  position: relative;
  z-index: 1;
}
.brand-left .logo {
  width: 72px; height: 72px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-left .logo img {
  width: 100%; height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,.28));
}
.brand-left .name {
  font-size: 30px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 4px;
  margin-bottom: 12px;
}
.brand-left .divider {
  width: 40px; height: 3px;
  background: rgba(255,255,255,.4);
  border-radius: 2px;
  margin: 0 auto 16px;
}
.brand-left .desc {
  font-size: 14px;
  color: rgba(255,255,255,.7);
  letter-spacing: 1px;
  line-height: 1.8;
}
.brand-left .features {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.brand-left .feature-item {
  font-size: 13px;
  color: rgba(255,255,255,.6);
  letter-spacing: 1px;
}
.brand-left .feature-item::before {
  content: '· ';
  color: rgba(255,255,255,.9);
}

/* ═══ 右侧：登录表单区 ═══ */
.login-right {
  flex: 1;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 右侧登录卡片 */
.login-card {
  width: 380px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,.04);
  padding: 40px 36px 32px;
}

.login-card .card-title {
  font-size: 20px;
  font-weight: 600;
  color: #1a1a2e;
  text-align: center;
  margin-bottom: 8px;
}
.login-card .card-subtitle {
  font-size: 13px;
  color: #94a3b8;
  text-align: center;
  margin-bottom: 28px;
}

/* ═══ Tab 切换 ═══ */
.tabs {
  display: flex;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 24px;
}
.tab {
  flex: 1;
  text-align: center;
  padding: 10px 0 12px;
  font-size: 15px;
  font-weight: 500;
  color: #94a3b8;
  cursor: pointer;
  user-select: none;
  position: relative;
  transition: color .2s;
}
.tab:hover { color: #64748b; }
.tab.active {
  color: #3b82f6;
  font-weight: 600;
}
.tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px; height: 3px;
  background: #3b82f6;
  border-radius: 2px;
}

/* ═══ 表单 ═══ */
.form-panel { display: none; }
.form-panel.active { display: block; }

/* 输入框 */
.field { margin-bottom: 20px; }
.field input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  font-size: 15px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  outline: none;
  font-family: inherit;
  color: #333;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}
.field .inline-err {
  font-size: 12px;
  color: #ef4444;
  margin-top: 5px;
  display: none;
}

/* 下拉菜单 — 和输入框完全一致 */
.field select {
  width: 100%;
  height: 44px;
  padding: 0 36px 0 14px;
  font-size: 15px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  outline: none;
  font-family: inherit;
  color: #333;
  background: #fff;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2394a3b8' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
}
.field select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}

/* 数字输入框去掉默认箭头（可选） */
.field input[type="number"] {
  -moz-appearance: textfield;
}
.field input[type="number"]::-webkit-outer-spin-button,
.field input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

/* 提示区 */
.msg {
  font-size: 13px;
  text-align: center;
  margin-bottom: 14px;
  min-height: 20px;
}
.msg.error { color: #ef4444; }
.msg.success { color: #10b981; }

/* 按钮 */
.btn {
  width: 100%;
  height: 44px;
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  background: #3b82f6;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 4px;
  transition: background .2s, box-shadow .2s;
}
.btn:hover {
  background: #2563eb;
  box-shadow: 0 4px 16px rgba(59,130,246,.3);
}
.btn:disabled {
  background: #93c5fd;
  pointer-events: none;
  box-shadow: none;
}

/* 底部链接 */
.switch-link {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: #94a3b8;
}
.switch-link a {
  color: #3b82f6;
  cursor: pointer;
  text-decoration: none;
}
.switch-link a:hover { text-decoration: underline; }

/* ═══ 注册成功弹窗 ═══ */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.45);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.overlay.show { display: flex; }
.overlay.show .modal { animation: successModalIn .38s cubic-bezier(.22,.9,.32,1.15) both; }
.modal.success-modal {
  position: relative;
  overflow: hidden;
  background: #fff;
  border-radius: 22px;
  padding: 38px 44px 32px;
  text-align: center;
  min-width: 320px;
  box-shadow: 0 24px 70px rgba(15,23,42,.18);
}
.modal.success-modal::before {
  content: '';
  position: absolute;
  top: -70px;
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  height: 140px;
  background: radial-gradient(closest-side, rgba(59,130,246,.12), transparent);
  pointer-events: none;
}
.success-visual { position: relative; width: 96px; height: 96px; margin: 0 auto 20px; }
.success-ring .ring-bg { fill: none; stroke: #eef2f7; stroke-width: 6; }
.success-ring .ring-fg {
  fill: none;
  stroke: url(#successGrad);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 264;
  stroke-dashoffset: 264;
  transform: rotate(-90deg);
  transform-origin: 48px 48px;
  animation: successRing .7s ease .1s forwards;
}
.success-ring .success-check {
  fill: none;
  stroke: #fff;
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: successCheck .35s ease .65s forwards;
}
.spark { position: absolute; opacity: 0; font-size: 15px; color: #fbbf24; animation: sparkPop .45s ease forwards; }
.spark.s1 { top: -2px; right: 6px; animation-delay: .5s; }
.spark.s2 { top: 24px; left: -12px; font-size: 12px; color: #60a5fa; animation-delay: .72s; }
.spark.s3 { bottom: 4px; right: -10px; font-size: 12px; color: #34d399; animation-delay: .92s; }
.modal .modal-title { font-size: 19px; font-weight: 700; color: #0f172a; margin-bottom: 8px; }
.modal .modal-sub { font-size: 14px; color: #64748b; margin-bottom: 6px; }
.modal .modal-tip { font-size: 12px; color: #94a3b8; margin-bottom: 20px; }
.modal .modal-btn {
  padding: 11px 44px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 6px 18px rgba(59,130,246,.28);
  transition: transform .15s, box-shadow .15s;
}
.modal .modal-btn:hover { transform: translateY(-1px); box-shadow: 0 9px 22px rgba(59,130,246,.34); }
@keyframes successModalIn { from { opacity: 0; transform: scale(.92) translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes successRing { to { stroke-dashoffset: 0; } }
@keyframes successCheck { to { stroke-dashoffset: 0; } }
@keyframes sparkPop { from { opacity: 0; transform: scale(0) rotate(-25deg); } to { opacity: 1; transform: scale(1) rotate(0); } }

/* ═══ 左侧 Hero：数字赋能 ═══ */
.login-hero { margin-top: 34px; }

.hero-title {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 18px;
}
.hero-title .ht-digit,
.hero-title .ht-word {
  font-size: 58px;
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(180deg, #ffffff 0%, #cfe8ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-family: 'Outfit', -apple-system, sans-serif;
}
.hero-sub {
  font-size: 14px;
  color: rgba(255,255,255,.72);
  letter-spacing: 1px;
}

/* ═══ 注册页：省市级联选择器 ═══ */
.cascader { position: relative; }
.cascader-trigger {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 15px;
  color: #94a3b8;
  transition: border-color .2s, box-shadow .2s;
  font-family: inherit;
}
.cascader-trigger:hover { border-color: #3b82f6; }
.cascader-trigger.has-value { color: #333; }
#regionValue.has-value { color: #333; }
.cascader-arrow { font-size: 12px; color: #94a3b8; }
.cascader-panel {
  position: absolute;
  top: 48px;
  left: 0;
  right: 0;
  z-index: 60;
  display: none;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 12px 36px rgba(15,23,42,.12);
  overflow: hidden;
}
.cascader-panel[style*="flex"] { display: flex; }
.cascader-cols { display: flex; width: 100%; }
.cascader-col {
  flex: 1;
  max-height: 220px;
  overflow-y: auto;
  padding: 6px;
  border-right: 1px solid #f1f5f9;
}
.cascader-col:last-child { border-right: 0; }
.cascader-item {
  padding: 8px 10px;
  font-size: 13px;
  color: #475569;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cascader-item:hover { background: #f1f5f9; }
.cascader-item.active { background: #3b82f6; color: #fff; font-weight: 600; }
.cascader-empty { padding: 20px 10px; font-size: 12px; color: #94a3b8; text-align: center; }

/* ═══ 登录页入场动画（文字 + 卡片）═══ */
.login-left .name, .hero-title, .hero-sub, .desc, .features { opacity: 0; }
.login-left .name { animation: lgFadeUp .5s ease .05s forwards; }
.hero-title { animation: lgFadeUp .55s ease .12s forwards; }
.hero-title .ht-digit, .hero-title .ht-word { display: inline-block; animation: lgPop .5s ease both; }
.hero-title .ht-digit:nth-child(1) { animation-delay: .22s; }
.hero-title .ht-digit:nth-child(2) { animation-delay: .29s; }
.hero-title .ht-word:nth-child(3) { animation-delay: .36s; }
.hero-title .ht-word:nth-child(4) { animation-delay: .43s; }
.hero-sub { animation: lgFadeUp .5s ease .5s forwards; }
.desc { animation: lgFadeUp .5s ease .6s forwards; }
.features { animation: lgFadeUp .5s ease .7s forwards; }
.login-card { animation: lgCardIn .62s cubic-bezier(.22,.9,.32,1.12) .18s both; }
@keyframes lgFadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes lgPop { from { opacity: 0; transform: scale(.55) translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes lgCardIn { from { opacity: 0; transform: translateY(24px) scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .login-left .name, .hero-title, .hero-sub, .desc, .features, .login-card { opacity: 1; animation: none; }
}

/* 登录页底部：隐私政策 + 备案（固定显示，不被布局裁掉） */
.login-footer {
  position: fixed;
  bottom: 14px;
  left: 20px;
  right: auto;
  text-align: left;
  z-index: 20;
  color: rgba(255,255,255,.78);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: .3px;
}
.login-footer a { color: rgba(255,255,255,.78); text-decoration: underline; text-underline-offset: 2px; }
.login-footer a:hover { color: #fff; }
