/**
 * AegisAuth 端用户登录页样式
 * 风格：青玉（主色 #2B6C6F），移动端优先响应式
 * 依赖：static/common/css/theme.css（提供 CSS 变量）
 */

/* ============ 页面背景（移动端优先） ============ */
.auth-page-user {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: linear-gradient(160deg, #2B6C6F 0%, #1F5052 100%);
  background-attachment: fixed;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text-primary, rgba(0, 0, 0, 0.85));
}

/* ============ 登录卡片容器 ============ */
.auth-page-user .auth-container {
  width: 100%;
  max-width: 100%;
}

.auth-page-user .auth-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25), 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 28px 20px 24px;
}

/* ============ 品牌区 ============ */
.auth-page-user .auth-brand {
  text-align: center;
  margin-bottom: 20px;
}

.auth-page-user .auth-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #1a3a3d;
}

.auth-page-user .auth-brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2B6C6F, #3A8A8D);
  color: #ffffff;
  font-weight: 700;
  font-size: 20px;
  overflow: hidden;
  flex-shrink: 0;
}

.auth-page-user .auth-brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-page-user .auth-brand-name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* ============ 标题区 ============ */
.auth-page-user .auth-header {
  text-align: center;
  margin-bottom: 22px;
}

.auth-page-user .auth-title {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 600;
  color: #1a3a3d;
}

.auth-page-user .auth-subtitle {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary, rgba(0, 0, 0, 0.45));
}

/* ============ 表单 ============ */
.auth-page-user .auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-page-user .auth-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-page-user .auth-form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-regular, rgba(0, 0, 0, 0.65));
}

.auth-page-user .auth-form-control {
  width: 100%;
  height: 46px; /* 移动端加大触控区 */
  padding: 0 14px;
  font-size: 16px; /* >=16px 避免 iOS 自动缩放 */
  color: var(--text-primary, rgba(0, 0, 0, 0.85));
  background: #ffffff;
  border: 1px solid var(--border-base, #DCDFE6);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.auth-page-user .auth-form-control::placeholder {
  color: var(--text-placeholder, rgba(0, 0, 0, 0.25));
}

.auth-page-user .auth-form-control:focus {
  border-color: #2B6C6F;
  box-shadow: 0 0 0 3px rgba(43, 108, 111, 0.15);
}

/* ============ 验证码区 ============ */
.auth-page-user .auth-captcha-group .captcha-widget-container {
  min-height: 40px;
}

/* ============ 错误提示 ============ */
.auth-page-user .auth-error {
  padding: 10px 14px;
  font-size: 13px;
  color: #ffffff;
  background: var(--color-error, #FF4D4F);
  border-radius: 8px;
  line-height: 1.5;
  word-break: break-word;
}

/* ============ 提交按钮 ============ */
.auth-page-user .auth-btn {
  width: 100%;
  height: 48px; /* 移动端加大触控区 */
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.05s;
  -webkit-appearance: none;
  appearance: none;
}

.auth-page-user .auth-btn-primary {
  background: linear-gradient(135deg, #2B6C6F, #3A8A8D);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(43, 108, 111, 0.3);
}

.auth-page-user .auth-btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #3A8A8D, #2B6C6F);
  box-shadow: 0 6px 16px rgba(43, 108, 111, 0.4);
}

.auth-page-user .auth-btn-primary:active:not(:disabled) {
  transform: translateY(1px);
}

.auth-page-user .auth-btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* ============ 页脚 ============ */
.auth-page-user .auth-footer {
  text-align: center;
  margin-top: 20px;
}

.auth-page-user .auth-back-home {
  font-size: 13px;
  color: var(--text-secondary, rgba(0, 0, 0, 0.45));
  text-decoration: none;
  transition: color 0.2s;
}

.auth-page-user .auth-back-home:hover {
  color: #2B6C6F;
}

/* ============ 响应式：平板/桌面端放宽 ============ */
@media (min-width: 481px) {
  .auth-page-user {
    padding: 24px 16px;
  }

  .auth-page-user .auth-container {
    max-width: 400px;
  }

  .auth-page-user .auth-card {
    padding: 36px 32px 28px;
    border-radius: 14px;
  }

  .auth-page-user .auth-title {
    font-size: 22px;
  }

  .auth-page-user .auth-brand-name {
    font-size: 18px;
  }

  .auth-page-user .auth-form-control {
    height: 42px;
    font-size: 14px;
  }

  .auth-page-user .auth-btn {
    height: 44px;
    font-size: 15px;
  }
}

/* ============ 内联样式迁移工具类 ============ */
/* 登录错误提示默认隐藏，由 JS 在显示时移除该类 */
.auth-error.is-hidden {
  display: none;
}
