/* --- 全局变量和重置 --- */
:root {
  --primary-color: #4ecdc4; /* 管理员主题色，与登录入口保持一致 */
  --primary-color-light: #44a08d;
  --merchant-primary: #ff6b6b;
  --merchant-primary-light: #ee5a24;
  --card-bg-color: rgba(255, 255, 255, 0.95);
  --input-bg-color: #f0f2f5;
  --text-color: #333;
  --border-color: #dcdfe6;
  --background-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body, html {
  height: 100%;
  font-family: 'Microsoft YaHei', Arial, sans-serif;
  color: var(--text-color);
}
body {
    background: var(--background-gradient);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

/* 主题色覆盖 */
.merchant-theme {
  --primary-color: var(--merchant-primary);
  --primary-color-light: var(--merchant-primary-light);
}

.admin-theme {
  --primary-color: #4ecdc4;
  --primary-color-light: #44a08d;
}

/* --- 背景动画 (与首页保持一致) --- */
.bg-decoration {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    overflow: hidden;
}
.bg-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}
.circle-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -100px;
}
.circle-2 {
    width: 200px;
    height: 200px;
    bottom: -50px;
    left: -50px;
}
.circle-3 {
    width: 150px;
    height: 150px;
    top: 200px;
    left: 100px;
}
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-30px) rotate(120deg); }
    66% { transform: translateY(30px) rotate(240deg); }
}


/* --- 登录页面主布局 --- */
.login-page {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: 100vh;
  padding: 0 50px;
  position: relative;
  z-index: 2;
}

/* --- 左侧内容区域 --- */
.login-left {
  flex: 1;
  max-width: 500px;
  color: white;
  text-align: left;
  padding-right: 50px;
}

.login-left h1 {
  font-size: 3em;
  font-weight: 600;
  margin-bottom: 20px;
  line-height: 1.2;
}

.login-left p {
  font-size: 1.2em;
  line-height: 1.6;
  margin-bottom: 30px;
  opacity: 0.9;
}

/* --- 登录表单卡片布局 --- */
.login-wrapper {
  width: 400px;
  padding: 40px;
  border-radius: 20px;
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
}

.login-header {
  margin-bottom: 30px;
}

.icon-wrapper.login-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 15px;
  line-height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-color-light));
  color: #fff;
  font-size: 32px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.icon-wrapper.login-icon .iconfont{
  font-size: 32px;
}

.login-header h2 {
  font-weight: 600;
  color: var(--text-color);
  font-size: 20px;
  margin: 0;
}

/* --- 表单元素样式 --- */
.login-form {
  margin-bottom: 20px;
}

.login-form .input-group {
  position: relative;
  margin-bottom: 25px;
}

.login-form input {
  width: 100%;
  height: 42px;
  padding: 0 40px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  background-color: #fafafa;
  transition: all 0.3s ease;
  box-shadow: none;
  line-height: 40px;
  box-sizing: border-box;
}

.login-form input:focus {
  border-color: var(--primary-color);
  background-color: #fff;
  box-shadow: 0 0 0 2px rgba(78, 205, 196, 0.1);
  outline: none;
}

.input-group .iconfont {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #8a8a8a;
  font-size: 18px;
  display: block;
}

/* --- 表单操作区样式 --- */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
  font-size: 14px;
}

.form-options .remember-me {
  display: flex;
  align-items: center;
  color: #666;
}

.form-options .remember-me input {
  margin-right: 8px;
  width: auto;
  padding: 0;
  background-color: transparent;
}

.form-options .forgot-password a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s;
}

.form-options .forgot-password a:hover {
  color: var(--primary-color-light);
}

.login-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background-color: var(--primary-color);
  background: var(--primary-color);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  margin-top: 10px;
}

.login-btn:hover {
  background-color: var(--primary-color-light);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  transform: none;
}

.login-btn:active {
  transform: scale(0.98);
}

/* --- 加载状态 --- */
.login-btn .loading-icon {
  display: none;
  vertical-align: middle;
  margin-right: 8px;
  animation: spin 1s linear infinite;
}

.login-btn.loading .btn-text {
  visibility: hidden;
}

.login-btn.loading .loading-icon {
  display: inline-block;
}

/* --- 图片验证码样式 --- */
.captcha-group {
    display: flex;
    gap: 10px;
    margin-bottom: 0px;
    align-items: stretch;
}

.captcha-input {
    flex: 1;
    margin-bottom: 0;
}

.captcha-input input {
    height: 42px;
    box-sizing: border-box;
}

.captcha-img-wrapper {
    flex-shrink: 0;
    width: 120px;
    height: 42px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background-color: #fafafa;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.captcha-img-wrapper:hover {
    border-color: var(--primary-color);
}

.captcha-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}


/* --- 第三方登录样式 --- */
.third-party-login {
    margin-top: 0;
    text-align: center;
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
}
.third-party-login .divider {
    position: relative;
    font-size: 13px;
    color: #999;
    margin-bottom: 15px;
    height: 1px;
    background-color: #e0e0e0;
    line-height: 0;
    overflow: visible;
    border: none;
}
.third-party-login .divider::before,
.third-party-login .divider::after {
    display: none;
}
.third-party-login .divider {
    display: block;
    content: '其他方式登录';
    background-color: transparent;
    color: #999;
    font-size: 13px;
    padding: 0 10px;
    margin: 0 auto 15px;
    height: auto;
}
.third-party-login-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}
.third-party-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.third-party-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.third-party-login-btn .iconfont {
    font-size: 22px;
    position: relative;
    z-index: 2;
}
.third-party-login .wechat-login-btn {
    background-color: #07c160;
}
.third-party-login .wechat-login-btn:hover {
    background-color: #06ad56;
}
.third-party-login .qq-login-btn {
    background-color: #12B7F5;
}
.third-party-login .qq-login-btn:hover {
    background-color: #00a0e9;
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* --- 响应式设计 --- */
@media (max-width: 992px) {
    .login-page {
        justify-content: center;
        padding: 0 20px;
    }
    
    .login-left {
        display: none;
    }
    
    .login-wrapper {
        width: 100%;
        max-width: 400px;
    }
}

@media (max-width: 480px) {
    .login-page {
        padding: 0 15px;
    }
    
    .login-wrapper {
        padding: 30px 20px;
    }
    
    .login-form .input-group {
        margin-bottom: 20px;
    }
}