/**
 * 登录页共用：SaaS 左列布局 + 玻璃拟态卡片 + 品牌字体层级（admin / user）。
 * 与 Tabler、admin-theme 协同；船图层见 brand-login.css。
 */

/* ---------- 左列布局：桌面左对齐占约 28%–35% 区带，小屏恢复居中 ---------- */
.auth-shell {
  position: relative;
  z-index: 2;
  box-sizing: border-box;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: clamp(1.75rem, 4vw, 4rem);
  padding-right: 1.25rem;
  background: transparent;
}

/* 登录框最大宽度：与 33vw 解耦，避免过窄 */
.auth-shell .container-tight {
  max-width: 420px;
}

body.brand-login-page .auth-shell .container.container-tight {
  width: 100%;
  max-width: 420px;
  margin: 0;
}

@media (max-width: 768px) {
  .auth-shell {
    justify-content: center;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  body.brand-login-page .auth-shell .container.container-tight {
    max-width: min(28rem, 100%);
    margin-left: auto;
    margin-right: auto;
  }
}

/* ---------- 玻璃拟态卡片（覆盖 admin-theme 实色 card） ---------- */
body.brand-login-page .auth-card.card {
  width: 100%;
  background: rgba(7, 16, 32, 0.48) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 20px !important;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35) !important;
  overflow: hidden;
}

body.brand-login-page .auth-card .card-body {
  padding: 1.35rem 1.5rem 1.25rem;
}

body.brand-login-page .auth-card .card-footer.auth-footer {
  min-height: 3.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.25rem;
  background: rgba(6, 14, 28, 0.38) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
}

/* ---------- 登录页品牌区：放大为第一视觉焦点（与侧栏比例独立） ---------- */
body.brand-login-page h1.auth-brand {
  margin: 0 0 0.75rem;
  padding: 0;
  font-size: inherit;
  font-weight: inherit;
  line-height: 1;
  gap: 0.875rem;
}

/* 身份副标题：比主标题小一级 */
body.brand-login-page .auth-header .auth-subtitle {
  color: #e2e8f0;
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.02em;
  opacity: 0.75;
}

/* ---------- 表单：Tabler 控件 + 自定义密码字段 ---------- */
body.brand-login-page .auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

body.brand-login-page .auth-form .form-label,
body.brand-login-page .auth-form .auth-label {
  display: inline-block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: rgba(226, 232, 240, 0.9);
}

body.brand-login-page .auth-form .form-control,
body.brand-login-page .auth-form .auth-input {
  min-height: 48px;
  padding: 0.75rem 1rem;
  background-color: #020617 !important;
  background-image: none !important;
  color: #e5e7eb !important;
  border: 1px solid rgba(148, 163, 184, 0.28) !important;
  box-shadow: none !important;
  -webkit-text-fill-color: #e5e7eb !important;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 9999s ease-in-out 0s;
}

.auth-field {
  margin: 0;
}

.password-field {
  position: relative;
}

.password-field__input {
  padding-right: 3rem !important;
}

.password-field__toggle {
  position: absolute;
  top: 50%;
  right: 0.875rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(148, 163, 184, 0.9);
  transform: translateY(-50%);
  cursor: pointer;
  appearance: none;
}

.password-field__toggle:hover {
  color: #22c55e;
}

.password-field__toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.24);
}

.password-field__toggle .ti {
  font-size: 1.05rem;
  line-height: 1;
}

/* 错误提示区占位（替代内联 style） */
#msg,
#adminMsg {
  min-height: 1.25rem;
}

.auth-form .form-control:focus,
.auth-form .auth-input:focus,
.password-field:focus-within .password-field__input {
  background-color: #020617 !important;
  border-color: #22c55e !important;
  box-shadow: 0 0 0 0.18rem rgba(34, 197, 94, 0.18) !important;
}

/* 记住登录与按钮的纵向节奏 + Tabler 感 checkbox */
.auth-form .form-check,
.auth-check {
  margin: 0;
}

.form-footer {
  margin-top: 0.25rem;
}

.form-check-input {
  background-color: #0b1220;
  border-color: rgba(255, 255, 255, 0.15);
}

.form-check-input:checked {
  background-color: #22c55e;
  border-color: #22c55e;
}

/* 主按钮：品牌绿 + 轻微 glow（与 btn-success 一致） */
body.brand-login-page .auth-card .btn-success {
  min-height: 46px;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow:
    0 2px 0 rgba(0, 0, 0, 0.22),
    0 4px 16px rgba(16, 185, 129, 0.32),
    0 0 28px rgba(16, 185, 129, 0.18) !important;
}

body.brand-login-page .auth-card .btn-success:hover {
  box-shadow:
    0 2px 0 rgba(0, 0, 0, 0.22),
    0 6px 20px rgba(16, 185, 129, 0.38),
    0 0 32px rgba(16, 185, 129, 0.22) !important;
}

.auth-footer a {
  text-decoration: none;
  font-weight: 500;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.auth-form .auth-input,
.auth-form .auth-input:not(:placeholder-shown),
.auth-form .auth-input:-webkit-autofill,
.auth-form .auth-input:-webkit-autofill:hover,
.auth-form .auth-input:-webkit-autofill:focus {
  background-color: #020617 !important;
  background-image: none !important;
  color: #e5e7eb !important;
  border-color: rgba(148, 163, 184, 0.28) !important;
  box-shadow: none !important;
  -webkit-text-fill-color: #e5e7eb !important;
  transition: background-color 9999s ease-in-out 0s;
}

.auth-form .auth-input::placeholder {
  color: rgba(148, 163, 184, 0.75);
}

.auth-form .auth-input:focus {
  border-color: #22c55e !important;
  box-shadow: 0 0 0 0.16rem rgba(34, 197, 94, 0.22) !important;
}
