/* 
 * Authentication Pages Shared Styles
 * 用于登录、注册、忘记密码、重置密码页面的共享样式
 */

:root {
  --brand-color: #1b5d65;
  --brand-hover: #154a51;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
}

/* 页面容器 */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* 卡片容器 */
.auth-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 448px;
  overflow: hidden;
  position: relative;
}

/* 卡片顶部背景区域 */
.auth-card-header {
  height: 212px;
  position: relative;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Logo */
.auth-logo {
  position: relative;
  z-index: 2;
  max-width: 180px;
  height: auto;
}

/* 表单区域 */
.auth-form-container {
  padding: 32px;
}

.auth-title {
  font-size: 24px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 8px 0;
  text-align: center;
}

.auth-subtitle {
  font-size: 14px;
  color: #666;
  margin: 0 0 24px 0;
  text-align: center;
}

/* 表单元素 */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  height: 48px;
  padding: 12px 16px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 15px;
  transition: all 0.2s;
  background: white;
}

.form-input:focus {
  outline: none;
  border-color: var(--brand-color);
  box-shadow: 0 0 0 3px rgba(27, 93, 101, 0.1);
}

.form-input::placeholder {
  color: #aaa;
}

/* 复选框 */
.checkbox-label {
  display: flex;
  align-items: center;
  color: #666;
  cursor: pointer;
  font-size: 14px;
}

.checkbox-label input {
  margin-right: 8px;
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--brand-color);
  flex-shrink: 0;
}

.checkbox-label a {
  color: var(--brand-color);
  text-decoration: none;
}

.checkbox-label a:hover {
  text-decoration: underline;
}

/* 主按钮 */
.btn-primary {
  width: 100%;
  height: 48px;
  background: var(--brand-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  margin-bottom: 16px;
}

.btn-primary:hover {
  background: var(--brand-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(27, 93, 101, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

/* 底部链接 */
.back-link,
.register-link,
.login-link {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: #717182;
}

.back-link a,
.register-link a,
.login-link a {
  color: var(--brand-color);
  text-decoration: none;
  font-weight: 600;
  margin-left: 4px;
}

.back-link a:hover,
.register-link a:hover,
.login-link a:hover {
  text-decoration: underline;
}

/* 消息提示 */
.message {
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 14px;
  display: none;
}

.message.show {
  display: block;
}

.message.error,
.error-message {
  background: #fee;
  color: #c33;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 14px;
  display: none;
}

.error-message.show {
  display: block;
}

.message.success,
.success-message {
  background: #efe;
  color: #3a3;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 14px;
  display: none;
}

.success-message.show {
  display: block;
}

/* 响应式 */
@media (max-width: 768px) {
  .auth-card {
    margin: 0;
  }

  .auth-form-container {
    padding: 24px;
  }

  .auth-title {
    font-size: 20px;
  }
}

/* Tab切换样式 */
.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-bottom: 2px solid #e0e0e0;
}

.auth-tab {
  flex: 1;
  padding: 12px 20px;
  background: none;
  border: none;
  color: #666;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}

.auth-tab.active {
  color: var(--brand-color);
}

.auth-tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--brand-color);
}

.auth-tab:hover {
  color: var(--brand-color);
  background: rgba(27, 93, 101, 0.05);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* 验证码输入组 */
.code-input-group {
  display: flex;
  gap: 8px;
}

.code-input-group .form-input {
  flex: 1;
}

.btn-send-code {
  height: 48px;
  padding: 0 20px;
  background: var(--brand-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
}

.btn-send-code:hover {
  background: var(--brand-hover);
}

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

.required {
  color: #c33;
  margin-left: 2px;
}