/* ============================================================
   认易云 ERP — 登录 / 门户页（统一翡翠绿设计语言）
   依赖 theme.css (--sp-* 设计令牌) + Bootstrap 4.6
   左右分栏式登录卡片，移动端自动堆叠为单栏
   ============================================================ */

/* ===== 页面底色：浅翠绿渐变，干净不刺眼 ===== */
body.login-page {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(1200px 600px at 8% -10%, #E6FBF4 0%, rgba(230, 251, 244, 0) 60%),
    radial-gradient(1000px 520px at 112% 112%, #D6F3EA 0%, rgba(214, 243, 234, 0) 55%),
    #F4FBF8;
  font-family: var(--sp-font-sans, "Microsoft YaHei", "PingFang SC", sans-serif);
  color: var(--sp-text, #212529);
}

/* ===== 居中卡片容器 ===== */
.login-wrapper {
  width: 100%;
  max-width: 880px;
}

/* ===== 登录卡片：左品牌 / 右表单 ===== */
.login-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0, 120, 90, 0.18);
  min-height: 480px;
  animation: loginCardIn .45s cubic-bezier(.21, .78, .36, 1) both;
}

@keyframes loginCardIn {
  from { opacity: 0; transform: translateY(14px) scale(.99); }
  to   { opacity: 1; transform: none; }
}

/* ===== 左侧品牌面板 ===== */
.login-brand {
  position: relative;
  padding: 40px 36px;
  color: #fff;
  background: linear-gradient(150deg, #00C896 0%, #00A878 55%, #009E74 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

/* 装饰光斑，增加层次 */
.login-brand::before,
.login-brand::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  pointer-events: none;
}
.login-brand::before { width: 220px; height: 220px; top: -70px; right: -60px; }
.login-brand::after  { width: 160px; height: 160px; bottom: -50px; left: -40px; background: rgba(255, 255, 255, 0.08); }

.login-brand-top { position: relative; z-index: 1; }
.login-brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.login-brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  backdrop-filter: blur(2px);
}
.login-brand-name { font-size: 22px; font-weight: 700; letter-spacing: .5px; }
.login-brand-tag {
  margin-top: 28px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.5;
}
.login-brand-desc {
  margin-top: 10px;
  font-size: 13px;
  opacity: .9;
  line-height: 1.7;
}

/* 品牌面板底部特性列表 */
.login-feats {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 0;
  list-style: none;
}
.login-feats li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 5px 0;
  opacity: .95;
}
.login-feats i { font-size: 15px; }

/* ===== 右侧表单面板 ===== */
.login-form-panel {
  padding: 44px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--sp-text, #212529);
  margin-bottom: 4px;
}
.login-subtitle {
  color: var(--sp-text-muted, #495057);
  font-size: 13px;
  margin-bottom: 22px;
}

.login-form .form-group { margin-bottom: 16px; }
.login-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--sp-text-muted, #495057);
  margin-bottom: 6px;
}
.login-form .form-control {
  height: 42px;
  border-radius: 8px;
  border-color: var(--sp-border, #DEE2E6);
  font-size: 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.login-form .form-control:focus {
  border-color: var(--sp-primary, #00C896);
  box-shadow: 0 0 0 .2rem rgba(0, 200, 150, .18);
}
.login-form .btn-primary {
  width: 100%;
  height: 44px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 2px;
  margin-top: 4px;
}

/* 验证码：输入框 + 图片一行 */
.login-captcha-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.login-form .captcha-input {
  flex: 1;
  width: auto !important;
}
.login-form .captcha-img {
  height: 42px;
  width: 110px;
  border-radius: 8px;
  border: 1px solid var(--sp-border, #DEE2E6);
  cursor: pointer;
  object-fit: cover;
  flex-shrink: 0;
  transition: opacity .15s ease;
}
.login-form .captcha-img:hover { opacity: .85; }

/* ===== 页脚 ===== */
.login-footer {
  margin-top: 16px;
  color: var(--sp-text-muted, #6c757d);
  font-size: 12px;
  text-align: center;
  line-height: 1.8;
}
.login-footer a { color: var(--sp-primary-dark, #00A878); text-decoration: none; }
.login-footer a:hover { text-decoration: underline; }

/* ===== 响应式：窄屏单栏，隐藏品牌面板 ===== */
@media (max-width: 720px) {
  .login-card { grid-template-columns: 1fr; min-height: 0; }
  .login-brand { display: none; }
  .login-form-panel { padding: 32px 24px; }
  body.login-page { padding: 16px; }
}

/* ===== 无障碍：键盘焦点可见 ===== */
.login-form .form-control:focus-visible,
.login-form .btn-primary:focus-visible,
.login-form .captcha-img:focus-visible {
  outline: 2px solid var(--sp-primary-dark, #00A878);
  outline-offset: 2px;
}

/* ===== 尊重减弱动效偏好 ===== */
@media (prefers-reduced-motion: reduce) {
  .login-card { animation: none; }
  * { transition: none !important; }
}
