/* ============================================================
   大陶匠 · 登录/注册弹窗组件
   说明：全站统一登录注册弹窗
   ============================================================ */

.login-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  padding: 16px;
}

.login-modal-overlay.active {
  display: flex;
}

.login-modal {
  background: #fff;
  border-radius: 20px;
  padding: 30px 24px 24px;
  width: 100%;
  max-width: 380px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-modal .login-close {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  transition: color 0.2s;
  line-height: 1;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-modal .login-close:hover {
  color: #333;
}

.login-modal h3 {
  font-size: 28px;
  color: #8B4513;
  text-align: center;
  margin-bottom: 12px;
  font-weight: 700;
}

.login-modal .login-error {
  color: #d32f2f;
  font-size: 13px;
  margin-bottom: 12px;
  text-align: center;
  min-height: 18px;
}

/* 输入框组 */
.login-input-group {
  position: relative;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
}

.login-input-group .login-input-icon {
  position: absolute;
  left: 14px;
  color: #8B4513;
  display: flex;
  align-items: center;
  pointer-events: none;
}

.login-input-group input {
  width: 100%;
  height: 44px;
  padding: 10px 14px 10px 44px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  background: #fafafa;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.login-input-group input:focus {
  border-color: #8B4513;
  background: #fff;
}

.login-input-group input::placeholder {
  color: #999;
}

.login-code-btn {
  padding: 10px 16px;
  height: 44px;
  line-height: 1.2;
  background: #8B4513;
  color: #fff;
  border: 1px solid transparent;
  box-sizing: border-box;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.login-code-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .login-input-group input {
    height: 44px;
    padding: 10px 14px 10px 44px;
    font-size: 14px;
  }
  .login-code-btn {
    height: 44px;
    padding: 10px 12px;
    font-size: 13px;
  }
}

/* 密码可见切换 */
.login-password-toggle {
  position: absolute;
  right: 16px;
  color: #999;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.login-password-toggle:hover {
  color: #8B4513;
}

/* 底部行：注册链接+忘记密码 */
.login-footer-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  text-align: center;
  font-size: 14px;
  color: #666;
}

.login-footer-row .login-forgot-link a {
  color: #8B4513;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
}

.login-footer-row .login-forgot-link a:hover {
  text-decoration: underline;
}

/* 提交按钮 */
.login-submit {
  width: 100%;
  padding: 12px;
  background: #8B4513;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  margin-bottom: 16px;
}

.login-submit:hover:not(.disabled) {
  opacity: 0.9;
}

.login-submit.disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* 协议勾选 */
.login-agreement {
  margin-bottom: 16px;
  display: flex;
  justify-content: center;
}

.login-checkbox {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 13px;
  color: #666;
  line-height: 1.5;
}

.login-checkbox input[type="checkbox"] {
  display: none;
}

.login-checkbox-custom {
  width: 16px;
  height: 16px;
  border: 1.5px solid #ccc;
  border-radius: 4px;
  margin-right: 8px;
  margin-top: 1px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  position: relative;
}

.login-checkbox input[type="checkbox"]:checked + .login-checkbox-custom {
  background: #8B4513;
  border-color: #8B4513;
}

.login-checkbox input[type="checkbox"]:checked + .login-checkbox-custom::after {
  content: '';
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  position: absolute;
  top: 2px;
}

.login-agreement-text a {
  color: #8B4513;
  text-decoration: none;
}

.login-agreement-text a:hover {
  text-decoration: underline;
}

/* 切换链接 */
.login-switch {
  text-align: center;
  font-size: 14px;
  color: #666;
}

.login-switch a {
  color: #8B4513;
  cursor: pointer;
  text-decoration: none;
  font-weight: 500;
}

.login-switch a:hover {
  text-decoration: underline;
}




/* ============================================================
   登录tab切换
   ============================================================ */

.login-tabs {
  display: flex;
  margin-bottom: 16px;
  border-bottom: 1px solid #e0e0e0;
}

.login-tab {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  font-size: 15px;
  color: #999;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}

.login-tab.active {
  color: #8B4513;
  font-weight: 600;
}

.login-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 2px;
  background: #8B4513;
  border-radius: 1px;
}

.login-tab-content {
  margin-bottom: 0;
}

/* 无图标输入框（验证码等） */
.login-input-group input.no-icon {
  padding-left: 16px;
  padding-right: 16px;
}


/* ============================================================
   新版登录弹窗样式补充
   ============================================================ */

/* 无图标输入框（验证码等） */
.login-input-group input.no-icon {
  padding-left: 16px;
  padding-right: 16px;
}



/* 滑动验证 */
.login-slider { margin: 0 0 16px; }
.login-slider-track {
  position: relative;
  height: 44px;
  background: #f0f0f0;
  border-radius: 8px;
  overflow: hidden;
  user-select: none;
}
.login-slider-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0;
  background: #8B4513;
  opacity: 0.3;
}
.login-slider-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 14px;
  pointer-events: none;
}
.login-slider-handle {
  position: absolute;
  left: 0; top: 0;
  width: 44px; height: 44px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8B4513;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.login-slider.verified .login-slider-track { background: #e8f5e9; }
.login-slider.verified .login-slider-fill { width: 100% !important; background: #4caf50; opacity: 1; }
.login-slider.verified .login-slider-text { color: #2e7d32; font-weight: 500; }
.login-slider.verified .login-slider-handle { display: none; }
.login-code-btn.disabled, .login-submit.disabled {
  background: #ccc !important;
  cursor: not-allowed;
  pointer-events: none;
}
