/* ==========================================================================
   登录页独立样式（不依赖后台原有布局）
   ========================================================================== */

:root {
  --brand: #0056b3;
  --brand-dark: #003d82;
  --brand-accent: #0a6bc4;
  --brand-grad: linear-gradient(135deg, #003d82 0%, #0056b3 55%, #0a6bc4 100%);
  --ink-900: #0f172a;
  --ink-700: #374151;
  --ink-500: #6b7280;
  --ink-400: #9aa5b1;
  --line: #e6ebf3;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: #f4f7fc;
  color: var(--ink-700);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
}

/* ============ 整体布局：左侧品牌 + 右侧表单 ============ */
.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  min-height: 100vh;
}

/* ============ 左侧品牌区 ============ */
.login-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 56px 64px;
  color: #fff;
  background: linear-gradient(150deg, #002b5c 0%, #003d82 46%, #0a6bc4 100%);
}

.login-brand::before {
  content: "";
  position: absolute;
  top: -180px;
  right: -140px;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, 0) 68%);
  pointer-events: none;
}

.login-brand::after {
  content: "";
  position: absolute;
  left: -160px;
  bottom: -220px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(110, 180, 255, .18) 0%, rgba(110, 180, 255, 0) 70%);
  pointer-events: none;
}

.brand-inner {
  position: relative;
  z-index: 1;
  max-width: 520px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 72px;
}

/* 站点 logo：深色品牌区使用白色卡片承托，保证彩色 logo 清晰可见 */
.brand-logo-img {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 6px 12px;
  background: #fff;
  border-radius: 12px;
}

.brand-logo-img img {
  display: block;
  height: 28px;
  width: auto;
}

.brand-logo strong {
  display: block;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .5px;
}

.brand-logo span {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  letter-spacing: .4px;
  color: rgba(255, 255, 255, .58);
}

.login-brand h1 {
  margin: 0 0 20px;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 1px;
}

.brand-desc {
  max-width: 460px;
  margin: 0 0 42px;
  font-size: 15px;
  line-height: 1.9;
  color: rgba(255, 255, 255, .76);
}

.brand-points {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.brand-points li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, .9);
}

.point-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  color: #b9dcff;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 6px;
}

.brand-foot {
  position: relative;
  z-index: 1;
  font-size: 12px;
  letter-spacing: .3px;
  color: rgba(255, 255, 255, .48);
}

/* ============ 右侧表单区 ============ */
.login-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  background: #fff;
}

.login-box {
  width: 100%;
  max-width: 400px;
}

.login-eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  color: var(--brand);
}

.login-head h2 {
  margin: 0 0 10px;
  font-size: 28px;
  font-weight: 700;
  color: var(--ink-900);
  letter-spacing: .5px;
}

.login-head p {
  margin: 0 0 32px;
  font-size: 14px;
  color: var(--ink-400);
}

/* 提示信息 */
.login-alert {
  margin-bottom: 20px;
  padding: 12px 16px;
  font-size: 13.5px;
  line-height: 1.7;
  border-radius: 10px;
}

.login-alert.is-success {
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}

.login-alert.is-error {
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.login-alert ul {
  margin: 0;
  padding-left: 18px;
}

/* 表单字段 */
.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-700);
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.label-row a {
  font-size: 12.5px;
  color: var(--brand);
  transition: color .2s ease;
}

.label-row a:hover {
  color: var(--brand-dark);
}

.control {
  position: relative;
  display: flex;
  align-items: center;
}

.control-icon {
  position: absolute;
  left: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-size: 17px;
  line-height: 1;
  color: var(--ink-400);
  pointer-events: none;
}

.control input {
  width: 100%;
  height: 50px;
  padding: 0 16px 0 48px;
  font-size: 14.5px;
  color: var(--ink-900);
  background: #f7f9fc;
  border: 1px solid #dde3ec;
  border-radius: 10px;
  outline: none;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}

/* 带密码可见性切换的输入框，右侧留出按钮空间 */
.control.has-toggle input {
  padding-right: 48px;
}

.control input::placeholder {
  color: #aab4c0;
}

.control input:focus {
  background: #fff;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 86, 179, .1);
}

.control input.is-invalid {
  border-color: #ef4444;
}

.toggle-password {
  position: absolute;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--ink-400);
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}

.toggle-password:hover {
  color: var(--brand);
  background: #eef3fa;
}

.toggle-password i {
  font-size: 17px;
  line-height: 1;
}

/* 默认显示“睁眼”图标，点击切换为“闭眼” */
.toggle-password .ri-eye-off-line {
  display: none;
}

.toggle-password.is-visible .ri-eye-line {
  display: none;
}

.toggle-password.is-visible .ri-eye-off-line {
  display: inline-flex;
}

.field-error {
  margin: 8px 0 0;
  font-size: 12.5px;
  color: #dc2626;
}

/* 记住登录状态 */
.remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 26px;
  font-size: 13px;
  color: var(--ink-500);
  cursor: pointer;
  user-select: none;
}

.remember input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--brand);
}

/* 提交按钮 */
.btn-login {
  width: 100%;
  height: 50px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1px;
  color: #fff;
  background: var(--brand-grad);
  border: 0;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0, 86, 179, .24);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

.btn-login:hover,
.btn-login:focus {
  filter: brightness(1.05);
  box-shadow: 0 14px 28px rgba(0, 86, 179, .3);
  transform: translateY(-1px);
}

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

/* 底部链接 */
.login-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 26px;
  padding-top: 22px;
  font-size: 13px;
  color: var(--ink-500);
  border-top: 1px solid #eef2f7;
}

.auth-note {
  flex: 1 1 100%;
  line-height: 1.7;
  color: var(--ink-400);
}

.login-foot a {
  color: var(--brand);
  font-weight: 600;
  transition: color .2s ease;
}

.login-foot a:hover {
  color: var(--brand-dark);
}

.back-home {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 400 !important;
  color: var(--ink-500) !important;
}

.back-home:hover {
  color: var(--brand) !important;
}

/* ============ 其他认证页公共元素 ============ */
.auth-text {
  margin: 0 0 24px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--ink-500);
}

.auth-actions {
  display: grid;
  gap: 12px;
  margin-top: 4px;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 46px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-700);
  background: #fff;
  border: 1px solid #dde3ec;
  border-radius: 10px;
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.btn-ghost:hover,
.btn-ghost:focus {
  color: var(--brand);
  background: #f7faff;
  border-color: var(--brand);
}

/* ============ 响应式 ============ */
@media (max-width: 991.98px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-brand {
    padding: 32px 36px;
  }

  .brand-logo {
    margin-bottom: 26px;
  }

  .login-brand h1 {
    font-size: 28px;
  }

  .brand-desc {
    margin-bottom: 0;
    font-size: 14px;
  }

  .brand-points,
  .brand-foot {
    display: none;
  }

  .login-main {
    padding: 40px 24px 56px;
  }
}

@media (max-width: 575.98px) {
  .login-brand {
    padding: 26px 22px;
  }

  .brand-logo strong {
    font-size: 16px;
  }

  .login-brand h1 {
    font-size: 23px;
  }

  .login-main {
    padding: 32px 20px 44px;
  }

  .login-head h2 {
    font-size: 24px;
  }

  .login-foot {
    flex-direction: column;
    align-items: flex-start;
  }
}
