/* =========================================================
   登录 / 注册页 —— 中式质感 · 磨砂玻璃 · 精致版
   ========================================================= */

.auth-page {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(1200px 400px at 80% -10%, #ff7a6b 0%, transparent 60%),
    radial-gradient(800px 380px at -10% 30%, #ffb4aa 0%, transparent 55%),
    linear-gradient(175deg, #d32f2f 0%, #a11d1d 55%, #7a1212 100%);
  padding-bottom: calc(32px + var(--safe-bottom));
  overflow-x: hidden;   /* 仅限横向，保留纵向滚动 */
  overflow-y: visible;
  isolation: isolate;
}

/* 祥云底纹 */
.auth-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'><g fill='none' stroke='%23ffffff' stroke-width='1' stroke-opacity='0.08'><path d='M20 50 Q30 35 50 40 T90 45 Q110 50 120 40 T160 45'/><path d='M40 120 Q55 105 75 115 T115 120 Q135 125 155 115'/><path d='M10 160 Q25 145 55 155 T105 160'/></g></svg>");
  background-size: 260px 260px;
  opacity: .6;
  pointer-events: none;
  z-index: 0;
}

/* 顶部金线装饰 */
.auth-page::after {
  content: '';
  position: absolute;
  top: calc(var(--safe-top) + 0px);
  left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #f5d27a 20%, #f7dfa0 50%, #f5d27a 80%, transparent);
  box-shadow: 0 0 12px rgba(247,223,160,.6);
  z-index: 1;
}

/* ---------------- 顶部品牌区 ---------------- */
.auth-brand {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: calc(44px + var(--safe-top)) 24px 20px;
  color: #fff;
}

/* 印章徽记 */
.auth-seal {
  display: inline-flex;
  width: 72px;
  height: 72px;
  border-radius: 14px;
  background: linear-gradient(145deg, #c1272d, #8c1a1e);
  color: #ffe9b7;
  font-family: "STKaiti", "楷体", "KaiTi", serif;
  font-size: 36px;
  font-weight: 700;
  align-items: center;
  justify-content: center;
  letter-spacing: -2px;
  border: 2px solid #f5d27a;
  box-shadow:
    inset 0 0 0 2px rgba(0,0,0,.12),
    0 8px 20px rgba(0,0,0,.35),
    0 0 0 6px rgba(255,255,255,.04);
  transform: rotate(-3deg);
  position: relative;
}
.auth-seal::before {
  content: '';
  position: absolute;
  inset: -10px;
  border: 1px dashed rgba(245,210,122,.45);
  border-radius: 18px;
  transform: rotate(3deg);
}

.auth-title {
  margin-top: 18px;
  font-family: "STSong", "SongTi SC", "Songti SC", "SimSun", serif;
  font-size: clamp(28px, 8.5vw, 36px);
  font-weight: 700;
  letter-spacing: 10px;
  padding-left: 10px; /* 抵消字距的视觉偏移 */
  color: #fff6e0;
  text-shadow: 0 3px 0 rgba(0,0,0,.15), 0 6px 18px rgba(0,0,0,.3);
}

.auth-sub {
  margin-top: 6px;
  font-size: 12px;
  letter-spacing: 4px;
  color: rgba(255, 230, 200, .9);
}

/* 中式分隔线（◆ 在细线中央） */
.auth-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 16px auto 0;
  color: #f5d27a;
  font-size: 10px;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #f5d27a);
}
.auth-divider::after {
  background: linear-gradient(90deg, #f5d27a, transparent);
}

/* ---------------- 卡片 ---------------- */
.auth-card {
  position: relative;
  z-index: 2;
  margin-top: 22px;
  margin-left: max(18px, var(--safe-left));
  margin-right: max(18px, var(--safe-right));
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  box-shadow:
    0 24px 60px rgba(70, 0, 0, .32),
    0 8px 16px rgba(0, 0, 0, .12),
    inset 0 1px 0 rgba(255, 255, 255, .9);
  padding: 26px 22px 22px;
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
}

/* 卡片四角中式装饰 */
.auth-card::before,
.auth-card::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  border: 2px solid #d32f2f;
  opacity: .55;
}
.auth-card::before {
  top: 10px; left: 10px;
  border-right: none;
  border-bottom: none;
  border-top-left-radius: 8px;
}
.auth-card::after {
  bottom: 10px; right: 10px;
  border-left: none;
  border-top: none;
  border-bottom-right-radius: 8px;
}

.auth-tabs {
  display: flex;
  gap: 22px;
  margin-bottom: 6px;
}
.auth-tab {
  position: relative;
  padding-bottom: 10px;
  font-size: 17px;
  font-weight: 700;
  color: #9ca3af;
  cursor: pointer;
  transition: color .2s;
}
.auth-tab.active {
  color: #1f2937;
}
.auth-tab.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, #e53935, #c42a27);
}
.auth-tab.disabled { color: #cbd5e1; cursor: not-allowed; }

.auth-lead {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 18px;
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.auth-lead svg { width: 14px; height: 14px; color: #15803d; flex-shrink: 0; }

/* ---------------- 输入字段 ---------------- */
.field {
  position: relative;
  margin-bottom: 14px;
}
.field-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #475569;
  margin-bottom: 6px;
  letter-spacing: .5px;
}
.field-wrap {
  position: relative;
  display: flex;
  align-items: center;
  height: 48px;
  background: #f6f7f9;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 0 12px;
  transition: border-color .18s, background .18s, box-shadow .18s;
}
.field-wrap:focus-within {
  background: #fff;
  border-color: #d32f2f;
  box-shadow: 0 0 0 3px rgba(211, 47, 47, .12);
}
.field-wrap .ico {
  width: 18px; height: 18px;
  color: #94a3b8;
  flex-shrink: 0;
  margin-right: 10px;
}
.field-wrap:focus-within .ico { color: #d32f2f; }

.field-wrap input {
  flex: 1;
  height: 100%;
  font-size: 15px;
  color: #1f2937;
  background: transparent;
  border: none;
  outline: none;
  min-width: 0;
  -webkit-appearance: none;
  appearance: none;
}
@supports (-webkit-touch-callout: none) {
  .field-wrap input { font-size: 16px; } /* iOS 禁缩放 */
}
.field-wrap input::placeholder { color: #9ca3af; }

/* 尾部控件（眼睛 / 验证码 / 自定义按钮） */
.field-suffix {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: 8px;
  gap: 6px;
}
.eye-btn {
  width: 28px; height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  border-radius: 6px;
}
.eye-btn:hover { color: #d32f2f; }
.eye-btn svg { width: 18px; height: 18px; }

.captcha-img {
  height: 36px;
  width: 96px;
  border-radius: 6px;
  background: #eee;
  cursor: pointer;
  object-fit: cover;
  border: 1px solid rgba(0,0,0,.06);
}

/* ---------------- 第二行：记住我 / 忘记密码 ---------------- */
.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #64748b;
  margin: 4px 0 14px;
}
.check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}
.check input { display: none; }
.check .box {
  width: 15px; height: 15px;
  border: 1.5px solid #cbd5e1;
  border-radius: 4px;
  position: relative;
  transition: .15s;
}
.check input:checked + .box {
  background: #d32f2f;
  border-color: #d32f2f;
}
.check input:checked + .box::after {
  content: '';
  position: absolute;
  left: 3px; top: 0px;
  width: 5px; height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.auth-row a { color: #d32f2f; }

/* ---------------- 主按钮 ---------------- */
.auth-submit {
  margin-top: 6px;
  width: 100%;
  height: 50px;
  border-radius: 100px;
  background: linear-gradient(90deg, #e53935 0%, #c42a27 50%, #a01c1c 100%);
  color: #fff;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 6px;
  padding-left: 6px;
  position: relative;
  box-shadow:
    0 12px 24px rgba(196, 42, 39, .35),
    inset 0 1px 0 rgba(255, 255, 255, .3);
  transition: transform .12s, box-shadow .2s, opacity .2s;
}
.auth-submit:active {
  transform: translateY(1px);
  box-shadow: 0 6px 14px rgba(196, 42, 39, .35);
}
.auth-submit:disabled {
  opacity: .6;
  cursor: not-allowed;
}

/* 小径提示 */
.auth-secure {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  color: #64748b;
  letter-spacing: .5px;
}
.auth-secure svg { width: 12px; height: 12px; color: #15803d; }

/* ---------------- 分隔 + 辅助链接 ---------------- */
.auth-split {
  position: relative;
  text-align: center;
  color: #94a3b8;
  font-size: 12px;
  margin: 20px 0 12px;
}
.auth-split::before, .auth-split::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 35%;
  height: 1px;
  background: #e5e7eb;
}
.auth-split::before { left: 0; }
.auth-split::after  { right: 0; }

.auth-switch {
  text-align: center;
  font-size: 13px;
  color: #64748b;
}
.auth-switch a {
  color: #d32f2f;
  font-weight: 600;
  margin-left: 6px;
}
.auth-switch a::after {
  content: '›';
  margin-left: 2px;
}

/* ============================= 小屏适配 ============================= */
@media (max-width: 360px) {
  .auth-brand { padding-top: calc(32px + var(--safe-top)); padding-bottom: 14px; }
  .auth-seal  { width: 62px; height: 62px; font-size: 30px; border-radius: 12px; }
  .auth-title { letter-spacing: 7px; }
  .auth-card  { padding: 22px 16px 18px; margin-top: 16px; }
  .field-wrap { height: 44px; padding: 0 10px; }
  .field-wrap .ico { margin-right: 8px; }
  .auth-submit { height: 46px; font-size: 16px; letter-spacing: 4px; }
  .captcha-img { width: 84px; height: 32px; }
}

@media (max-height: 680px) {
  .auth-brand { padding-top: calc(28px + var(--safe-top)); padding-bottom: 10px; }
  .auth-seal  { width: 58px; height: 58px; font-size: 28px; }
  .auth-title { margin-top: 12px; font-size: 26px; }
  .auth-sub   { margin-top: 2px; }
  .auth-divider { margin-top: 8px; }
  .auth-card  { margin-top: 14px; padding: 18px 18px 16px; }
  .field      { margin-bottom: 10px; }
}

/* 底部版权栏样式已迁移到 common.css */
