/**
 * 登录页面样式 - 极简黑白灰风格（支持深色模式）
 */

.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--page-bg);
  padding: 20px;
}

.login-card {
  background: var(--bg-white);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  padding: 40px;
  width: 100%;
  max-width: 400px;
}

.login-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.login-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

/* Tab切换 */
.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.auth-tab {
  flex: 1;
  padding: 12px;
  background: none;
  border: none;
  font-size: 15px;
  color: var(--text-light);
  cursor: pointer;
  transition: color 0.2s;
  position: relative;
}

.auth-tab:hover {
  color: var(--text);
}

.auth-tab.active {
  color: var(--text);
  font-weight: 500;
}

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

/* 表单 */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 13px;
  color: var(--text-light);
}

.form-group input {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  background: var(--bg-white);
  color: var(--text);
  transition: border-color 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--text-light);
}

.btn-submit {
  margin-top: 8px;
  padding: 14px;
  background: var(--text);
  color: var(--bg-white);
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-submit:hover {
  opacity: 0.85;
}

.btn-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 错误提示 */
.error-msg {
  margin-top: 16px;
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: #dc2626;
  font-size: 13px;
  text-align: center;
  display: none;
}

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

/* 返回链接 */
.back-link {
  display: block;
  margin-top: 24px;
  text-align: center;
  color: var(--text-light);
  font-size: 13px;
  text-decoration: none;
}

.back-link:hover {
  color: var(--text);
}

/* 注册关闭提示 */
.register-closed-notice {
  text-align: center;
  padding: 32px 20px;
  background: var(--bg);
  border-radius: 8px;
  color: var(--text-light);
}

.register-closed-notice p {
  font-size: 15px;
  margin: 0;
}

/* 深色模式调整 */
:root.dark .login-card {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
}

:root.dark .error-msg {
  background: rgba(220, 38, 38, 0.1);
  border-color: rgba(220, 38, 38, 0.3);
}

/* 响应式 */
@media (max-width: 480px) {
  .login-card {
    padding: 30px 24px;
  }
  
  .login-title {
    font-size: 20px;
  }
}
