/**
 * PC管理后台登录页样式
 *
 * 设计说明：
 * 1. 左右分栏布局，左侧品牌展示，右侧登录表单
 * 2. 唐风美学配色（青绿+金色）
 * 3. 大气专业，符合后台管理系统的调性
 */

/* ===== CSS变量 ===== */
:root {
  --primary: #2d5a5a;
  --primary-dark: #1a3a3a;
  --primary-light: #4a8080;
  --accent-gold: #d4a574;
  --accent-gold-dark: #c49464;
  --bg-primary: #f5f3f0;
  --bg-white: #ffffff;
  --text-primary: #1a1a1a;
  --text-secondary: #666666;
  --text-muted: #999999;
  --border: #e0d8cc;
  --error: #f5222d;
  --success: #52c41a;
}

/* ===== 基础重置 ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
}

/* ===== 登录页容器 ===== */
.login-page {
  min-height: 100vh;
  display: flex;
}

/* ===== 左侧品牌展示区 ===== */
.login-left {
  flex: 1;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 60px;
  color: white;
  position: relative;
  overflow: hidden;
}

/* 背景装饰图案 */
.login-left::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(212,165,116,0.2) 0%, transparent 70%);
  border-radius: 50%;
}

.login-left::after {
  content: '';
  position: absolute;
  bottom: -150px;
  left: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
  border-radius: 50%;
}

.brand-section {
  text-align: center;
  position: relative;
  z-index: 1;
}

.logo {
  width: 120px;
  height: 120px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
  margin: 0 auto 30px;
  border: 3px solid rgba(255,255,255,0.2);
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.brand-name {
  font-size: 42px;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: 8px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.brand-slogan {
  font-size: 18px;
  color: rgba(255,255,255,0.8);
  letter-spacing: 2px;
}

/* 功能特点 */
.features {
  margin-top: 80px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
  z-index: 1;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 16px;
  color: rgba(255,255,255,0.9);
  padding: 16px 24px;
  background: rgba(255,255,255,0.1);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
}

.feature-icon {
  font-size: 24px;
}

.copyright {
  position: absolute;
  bottom: 30px;
  font-size: 14px;
  color: rgba(255,255,255,0.5);
}

/* ===== 右侧登录表单区 ===== */
.login-right {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--bg-primary);
  padding: 60px;
}

.login-box {
  width: 100%;
  max-width: 420px;
  background: white;
  border-radius: 20px;
  padding: 50px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.08);
}

.login-title {
  font-size: 28px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  text-align: center;
}

.login-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 40px;
}

/* ===== 表单样式 ===== */
.login-form {
  margin-bottom: 30px;
}

.form-item {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 16px;
  font-size: 18px;
  color: var(--text-muted);
}

.form-input {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 48px;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fafafa;
  transition: all 0.3s ease;
  outline: none;
}

.form-input:focus {
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 3px rgba(45,90,90,0.1);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.toggle-password {
  position: absolute;
  right: 16px;
  cursor: pointer;
  font-size: 16px;
  color: var(--text-muted);
  user-select: none;
}

.toggle-password:hover {
  color: var(--text-secondary);
}

/* 选项区域 */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.checkbox {
  display: none;
}

.checkmark {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 4px;
  margin-right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.checkbox:checked + .checkmark {
  background: var(--primary);
  border-color: var(--primary);
}

.checkbox:checked + .checkmark::after {
  content: '✓';
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.checkbox-text {
  font-size: 14px;
  color: var(--text-secondary);
}

/* 登录按钮 */
.login-btn {
  width: 100%;
  height: 50px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px rgba(45,90,90,0.3);
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(45,90,90,0.35);
}

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

.login-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 登录提示 */
.login-tips {
  padding-top: 24px;
  border-top: 1px dashed var(--border);
}

.login-tips p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ===== 提示框 ===== */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 16px 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.toast.show {
  opacity: 1;
  visibility: visible;
}

.toast-icon {
  font-size: 20px;
}

/* ===== 响应式适配 ===== */
@media (max-width: 992px) {
  .login-left {
    display: none;
  }

  .login-right {
    flex: 1;
    padding: 30px;
  }

  .login-box {
    padding: 40px 30px;
  }
}

@media (max-width: 576px) {
  .login-box {
    padding: 30px 24px;
    border-radius: 16px;
  }

  .login-title {
    font-size: 24px;
  }
}
