/* ========================================
   login.css · 登录页 v2.0(遵循设计规范)
   来源:docs/design-guidelines.md
   ======================================== */

/* === 登录视图 === */
.login-view {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
  overflow: hidden;
  background: #0A1830;
  /* 让背景图作为锚点 */
  isolation: isolate;
}

/* === 海报背景(全屏 cover) === */
.login-view__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: -3;
  pointer-events: none;
}

/* === 三层 Scrim(让海报元素与文字/按钮和谐) === */
/* Layer 1:全屏暗化(让整体更聚焦) */
.login-view::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(5, 14, 31, 0.25);
  z-index: -2;
  pointer-events: none;
}

/* Layer 2:底部强暗化(让按钮区有充分背景) */
.login-view::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 60%;
  background: linear-gradient(
    180deg,
    rgba(5, 14, 31, 0) 0%,
    rgba(5, 14, 31, 0.55) 40%,
    rgba(5, 14, 31, 0.92) 100%
  );
  z-index: -1;
  pointer-events: none;
}

/* === 顶部状态条(海报顶端,留 16px 视觉缓冲) === */
.login-view__top {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 56px 24px 0;
  flex-shrink: 0;
}

/* === 中央品牌区(锚点 · 主焦点 60%) === */
.login-brand {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  margin-top: 80px;
  padding: 0 24px;
  width: 100%;
}

.login-brand__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  background: rgba(255, 211, 106, 0.18);
  border: 1px solid rgba(255, 211, 106, 0.6);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.25em;
  color: var(--color-gold);
  margin-bottom: 40px;
  backdrop-filter: blur(12px);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
.login-brand__year {
  font-weight: 700;
  font-family: var(--font-num);
  letter-spacing: 0.05em;
}
.login-brand__divider {
  width: 1px;
  height: 10px;
  background: rgba(255, 211, 106, 0.5);
}
.login-brand__tag {
  font-weight: 600;
  letter-spacing: 0.15em;
}

.login-brand__title {
  margin-bottom: 24px;
}
.login-brand__title-line {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.06em;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5), 0 0 4px rgba(0, 0, 0, 0.3);
  margin-bottom: 4px;
}
.login-brand__title-line--gold {
  color: var(--color-gold);
  font-size: 38px;
  letter-spacing: 0.08em;
  text-shadow: 0 2px 20px rgba(255, 211, 106, 0.4), 0 0 6px rgba(0, 0, 0, 0.4);
}
.login-brand__title-sub {
  font-size: 13px;
  color: rgba(255, 211, 106, 0.95);
  margin-top: 16px;
  letter-spacing: 0.4em;
  font-weight: 600;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

.login-brand__subtitle {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.2em;
  padding: 8px 20px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 999px;
  display: inline-block;
  backdrop-filter: blur(12px);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* === 主焦点:2 个大按钮(底部聚焦区) === */
.login-actions {
  position: relative;
  z-index: 3;
  margin-top: auto;
  margin-bottom: 56px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 400px;
  padding: 0 24px;
}

/* === 主按钮(60% 视觉权重 · Primary CTA) === */
.login-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  border-radius: 16px;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s ease-out, box-shadow 0.2s ease-out, background 0.2s;
  text-align: left;
  border: 1px solid transparent;
  width: 100%;
  position: relative;
}
.login-btn:active {
  transform: scale(0.98);
}

.login-btn__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-btn__text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.login-btn__title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.3;
}
.login-btn__desc {
  font-size: 12px;
  letter-spacing: 0.03em;
  opacity: 0.85;
  font-weight: 400;
}

/* 主按钮:56px 高 · 强阴影 · 蓝青渐变 */
.login-btn--primary {
  height: 64px;
  background: linear-gradient(135deg, #00A3FF 0%, #0B6CFF 100%);
  color: #fff;
  box-shadow:
    0 8px 24px rgba(0, 163, 255, 0.4),
    0 2px 8px rgba(11, 108, 255, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.login-btn--primary .login-btn__icon {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}
.login-btn--primary:active {
  box-shadow:
    0 4px 12px rgba(0, 163, 255, 0.35),
    0 1px 4px rgba(11, 108, 255, 0.25);
}

/* 次按钮:62px 高(原 52px · +20%) · 半透明 + 描边 */
.login-btn--secondary {
  height: 62px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 211, 106, 0.4);
  backdrop-filter: blur(16px);
}
.login-btn--secondary .login-btn__icon {
  background: rgba(255, 211, 106, 0.2);
  color: var(--color-gold);
}
.login-btn--secondary .login-btn__desc {
  color: rgba(255, 211, 106, 0.85);
}
.login-btn--secondary:active {
  background: rgba(255, 211, 106, 0.12);
  border-color: rgba(255, 211, 106, 0.6);
}

/* 临时测试登入(第三个按钮 · 透明样式 · 高度与 secondary 同步 +20%) */
.login-btn--demo {
  height: 62px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px dashed rgba(25, 211, 255, 0.4) !important;
  color: #19D3FF !important;
}
.login-btn--demo .login-btn__icon {
  background: rgba(25, 211, 255, 0.15) !important;
  color: #19D3FF !important;
}
.login-btn--demo .login-btn__title {
  color: #19D3FF !important;
}
.login-btn--demo .login-btn__desc {
  color: rgba(25, 211, 255, 0.7) !important;
}
.login-btn--demo:active {
  background: rgba(25, 211, 255, 0.1) !important;
}

/* === 4 角角标(精简为顶部 2 个) === */
.login-view .corner-mark {
  z-index: 4;
  color: rgba(255, 255, 255, 0.7);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  font-size: 10px;
  letter-spacing: 0.15em;
}
.login-view .corner-mark--tr {
  color: rgba(255, 211, 106, 0.85);
}

/* ============================================== */
/* === 登录 Modal v2.0(顶部海报 hero + 字段表单) === */
/* ============================================== */
.lm {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.lm.show {
  opacity: 1;
  pointer-events: auto;
}
.lm__sheet {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 92vh;
  background: linear-gradient(180deg, #0E2952 0%, #0A2540 100%);
  border-radius: 24px 24px 0 0;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  border: 1px solid rgba(25, 211, 255, 0.2);
  border-bottom: none;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.4);
  /* 隐藏滚动条 */
  scrollbar-width: none;
}
.lm__sheet::-webkit-scrollbar {
  display: none;
}
.lm.show .lm__sheet {
  transform: translateY(0);
}

/* 关闭按钮 */
.lm__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.lm__close:active { background: rgba(255, 255, 255, 0.3); }

/* === 顶部海报 Hero(弹窗顶部品牌区) === */
.lm__hero {
  position: relative;
  height: 160px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.lm__hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  z-index: 0;
}
.lm__hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(5, 14, 31, 0.3) 0%,
    rgba(5, 14, 31, 0.6) 50%,
    rgba(14, 41, 82, 0.95) 100%
  );
  z-index: 1;
}
.lm__hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 0 24px 20px;
}
.lm__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(255, 211, 106, 0.2);
  border: 1px solid rgba(255, 211, 106, 0.6);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-gold);
  letter-spacing: 0.15em;
  margin-bottom: 10px;
  backdrop-filter: blur(12px);
}
.lm__title {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.lm__sub {
  font-size: 13px;
  color: rgba(255, 211, 106, 0.9);
  letter-spacing: 0.05em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* === 表单主体 === */
.lm__body {
  padding: 28px 24px 32px;
}

/* === 区块分组(身份验证 + 信息收集) === */
.lm-section {
  margin-bottom: 28px;
}
.lm-section__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-gold);
  letter-spacing: 0.15em;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.lm-section__title::before {
  content: "";
  width: 16px;
  height: 2px;
  background: var(--color-gold);
  border-radius: 1px;
}
.lm-section__hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

/* === 字段 === */
.lm-field {
  margin-bottom: 16px;
}
.lm-field:last-child {
  margin-bottom: 0;
}
.lm-field__label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: 0.03em;
}
.lm-field__input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(234, 246, 255, 0.15);
  border-radius: 12px;
  font-size: 15px;
  color: var(--text-primary);
  letter-spacing: 0.02em;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  font-family: inherit;
}
.lm-field__input::placeholder {
  color: var(--text-tertiary);
  font-weight: 400;
}
.lm-field__input:focus {
  border-color: var(--color-cyan-light);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(25, 211, 255, 0.15);
  outline: none;
}
.lm-field__input--phone {
  letter-spacing: 0.1em;
  font-family: var(--font-num);
}
.lm-field__hint {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 6px;
  padding-left: 2px;
  letter-spacing: 0.02em;
}

/* === 提交按钮 === */
.lm-submit {
  margin-top: 32px;
  width: 100%;
  height: 56px;
  background: linear-gradient(135deg, #E33A2C 0%, #FF6A3A 100%);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.2em;
  border-radius: 14px;
  box-shadow:
    0 6px 24px rgba(227, 58, 44, 0.45),
    0 2px 6px rgba(227, 58, 44, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.15s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lm-submit:active {
  transform: scale(0.98);
  box-shadow:
    0 3px 12px rgba(227, 58, 44, 0.4),
    0 1px 3px rgba(227, 58, 44, 0.25);
}
.lm-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

/* === 底部联系提示 === */
.lm-footer-tip {
  margin-top: 20px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  line-height: 1.6;
}
.lm-footer-tip strong {
  color: var(--color-cyan-light);
  font-weight: 600;
  font-family: var(--font-num);
  letter-spacing: 0.05em;
}

/* === 移动端适配(< 380px) === */
@media (max-width: 380px) {
  .login-brand__title-line { font-size: 26px; }
  .login-brand__title-line--gold { font-size: 32px; }
  .login-btn--primary { height: 58px; }
  .login-btn--secondary { height: 58px; }
  .login-btn--demo { height: 58px; }
}
/* ============================================
   登录弹窗 · 2 步流程(组织验证 → 验证码)
   ============================================ */
.lm-field select.lm-field__input {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255,255,255,0.06) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23FFD36A' stroke-width='2.5' stroke-linecap='round'><polyline points='6 9 12 15 18 9'/></svg>") no-repeat right 12px center;
  background-size: 12px;
  padding-right: 32px;
  cursor: pointer;
}
.lm-field select.lm-field__input option {
  background: #0F172A;
  color: #fff;
}

/* 步骤 1 切换到步骤 2 */
.lm__body.hidden { display: none; }

/* 已确认组织条 */
.lm-org-confirmed {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(255,211,106,0.12), rgba(255,106,58,0.05));
  border: 1.5px solid rgba(255,211,106,0.4);
  border-radius: 12px;
  position: relative;
}
.lm-org-confirmed__icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFD36A, #E0B348);
  color: #0A1830;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800;
  flex-shrink: 0;
}
.lm-org-confirmed__org {
  font-family: var(--font-yahei);
  font-size: 15px; font-weight: 700;
  color: #FFD36A;
  letter-spacing: 0.04em;
  line-height: 1.3;
}
.lm-org-confirmed__inviter {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  margin-top: 2px;
}
.lm-org-confirmed__change {
  position: absolute;
  right: 12px; top: 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.75);
  font-size: 11px; font-weight: 500;
  padding: 3px 10px;
  border-radius: 100px;
  cursor: pointer;
  font-family: inherit;
}
.lm-org-confirmed__change:active {
  background: rgba(255,211,106,0.2);
  color: #FFD36A;
}

/* 手机号行 + 验证码按钮 */
.lm-field__phone-row {
  display: flex;
  gap: 8px;
}
.lm-field__phone-row .lm-field__input--phone { flex: 1; }
.lm-sms-btn {
  flex-shrink: 0;
  padding: 0 12px;
  background: rgba(25, 211, 255, 0.12);
  border: 1px solid rgba(25, 211, 255, 0.35);
  border-radius: 8px;
  color: #19D3FF;
  font-size: 12px; font-weight: 600;
  font-family: var(--font-yahei);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}
.lm-sms-btn:hover {
  background: rgba(25, 211, 255, 0.2);
}
.lm-sms-btn:disabled {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.4);
  cursor: not-allowed;
}
