* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #1677ff;
  --primary-hover: #4096ff;
  --text-color: rgba(0, 0, 0, 0.85);
  --text-secondary: rgba(0, 0, 0, 0.45);
  --border-color: #d9d9d9;
  --border-radius: 8px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5715;
  background: #f0f2f5;
  color: var(--text-color);
}

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

/* 左侧品牌区 - 黄金分割 61.8% */
.login-left {
  flex: 0 0 61.8%;
  background: linear-gradient(135deg, #1677ff 0%, #0050b3 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  position: relative;
  overflow: hidden;
}

/* 右侧登录区 - 38.2% */
.login-right {
  flex: 0 0 38.2%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: white;
}

.login-left::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
  animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.3; }
}

.brand-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: white;
}

.brand-icon {
  width: 100px;
  height: 100px;
  margin-bottom: 20px;
  animation: bounce 2s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.brand-title {
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 8px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.brand-subtitle {
  font-size: 16px;
  opacity: 0.9;
  margin-bottom: 32px;
}

.brand-features {
  display: flex;
  gap: 24px;
  justify-content: center;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

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

.feature-item span:last-child {
  font-size: 13px;
  opacity: 0.9;
}

.login-card {
  width: 100%;
  max-width: 360px;
}

.login-header {
  margin-bottom: 24px;
  text-align: center;
}

.login-header h2 {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 8px;
}

.login-header p {
  color: var(--text-secondary);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.form-item label {
  font-size: 14px;
  color: var(--text-color);
  font-weight: 500;
}

.form-item input[type="text"],
.form-item input[type="password"] {
  height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 14px;
  transition: all 0.3s;
}

.form-item input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.1);
}

.form-item.remember {
  flex-direction: row;
  align-items: center;
}

.form-item.remember label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: normal;
}

.form-item.remember input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.login-btn {
  height: 44px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}

.login-btn:hover {
  background: var(--primary-hover);
}

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

.error-message {
  padding: 12px;
  background: #fff2f0;
  border: 1px solid #ffccc7;
  border-radius: var(--border-radius);
  color: #ff4d4f;
  font-size: 14px;
  text-align: center;
}

.login-footer {
  margin-top: 24px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 12px;
}

/* ========== 响应式设计 ========== */
@media (max-width: 1024px) {
  .login-left {
    flex: 0 0 55%;
  }
  .login-right {
    flex: 0 0 45%;
  }
}

@media (max-width: 768px) {
  .login-page {
    flex-direction: column;
  }

  .login-left {
    flex: none;
    min-height: 35vh;
    padding: 30px 20px;
  }

  .login-right {
    flex: none;
    width: 100%;
    padding: 30px 20px;
  }

  .brand-icon {
    width: 80px;
    height: 80px;
  }

  .brand-title {
    font-size: 26px;
  }

  .brand-subtitle {
    font-size: 14px;
    margin-bottom: 24px;
  }

  .brand-features {
    flex-direction: row;
    gap: 20px;
  }

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

  .feature-item span:last-child {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .login-left {
    min-height: 30vh;
    padding: 20px 16px;
  }

  .login-right {
    padding: 24px 16px;
  }

  .brand-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
  }

  .brand-title {
    font-size: 22px;
  }

  .brand-subtitle {
    font-size: 13px;
    margin-bottom: 20px;
  }

  .brand-features {
    gap: 16px;
  }

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

  .feature-item span:last-child {
    font-size: 11px;
  }

  .login-header h2 {
    font-size: 20px;
  }

  .login-form {
    gap: 14px;
  }

  .form-item input[type="text"],
  .form-item input[type="password"] {
    height: 38px;
    font-size: 14px;
  }

  .login-btn {
    height: 42px;
    font-size: 15px;
  }
}

/* ========== 后台管理布局样式 - 移动端 ========== */
.admin-layout {
  min-height: 100vh;
}

/* 移动端隐藏侧边栏 */
.admin-layout .ant-layout-sider {
  position: fixed !important;
  left: 0;
  top: 0;
  bottom: 0;
  height: 100vh;
  overflow: auto;
  background: #fff !important;
  z-index: 100;
  box-shadow: 2px 0 8px rgba(0,0,0,0.1);
  transform: translateX(-100%);
  transition: transform 0.2s;
}

.admin-layout .ant-layout-sider.visible {
  transform: translateX(0);
}

.admin-layout .ant-layout-sider .ant-layout-sider-children {
  display: flex;
  flex-direction: column;
}

.admin-layout .ant-layout-header {
  background: #fff !important;
  padding: 0 16px !important;
  box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px !important;
  line-height: 56px !important;
}

.admin-layout .ant-layout-content {
  margin-left: 0 !important;
  padding: 16px;
  min-height: calc(100vh - 56px);
  background: #f0f2f5;
  transition: margin-left 0.2s;
}

.admin-sider {
  padding: 0;
}

.admin-sider .logo {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  color: white;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  background: linear-gradient(135deg, #1677ff 0%, #0050b3 100%);
}

.admin-sider .logo span:first-child {
  font-size: 24px;
  margin-right: 8px;
}

.admin-sider .ant-menu {
  background: transparent !important;
  border: none !important;
  flex: 1;
}

.admin-sider .ant-menu-light {
  background: transparent !important;
}

.admin-sider .ant-menu-item {
  margin: 4px 8px !important;
  border-radius: 6px !important;
}

.admin-sider .ant-menu-item:hover {
  background: rgba(22, 119, 255, 0.08) !important;
}

.admin-sider .ant-menu-item-selected {
  background: rgba(22, 119, 255, 0.15) !important;
  color: #1677ff !important;
}

.admin-sider .ant-menu-item-selected .anticon {
  color: #1677ff !important;
}

.admin-header {
  display: flex;
  align-items: center;
  width: 100%;
}

.admin-header .trigger-btn {
  font-size: 18px;
  cursor: pointer;
  padding: 0 8px;
  color: rgba(0, 0, 0, 0.65);
  transition: color 0.3s;
}

.admin-header .trigger-btn:hover {
  color: #1677ff;
}

.admin-header .header-title {
  flex: 1;
  font-size: 16px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.85);
}

.admin-header .user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-header .user-avatar {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #1677ff 0%, #0050b3 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
}

.admin-content {
  padding: 0;
}

.admin-content .content-wrapper {
  background: #fff;
  padding: 16px;
  border-radius: 8px;
  min-height: calc(100vh - 56px - 32px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

/* 菜单项图标 */
.ant-menu-item .anticon {
  font-size: 16px;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .admin-layout .ant-layout-content {
    margin-left: 0 !important;
    padding: 12px;
  }

  .admin-layout .ant-layout-sider {
    position: fixed !important;
    transform: translateX(-100%);
    transition: transform 0.2s;
  }

  .admin-layout .ant-layout-sider.visible {
    transform: translateX(0);
  }

  /* 移动端隐藏侧边栏遮罩 */
  .ant-layout-sider::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s;
    z-index: -1;
  }

  .ant-layout-sider.visible::after {
    opacity: 1;
    visibility: visible;
  }
}

/* 移动端优化 */
@media (max-width: 576px) {
  .admin-layout .ant-layout-header {
    padding: 0 12px !important;
  }

  .admin-header .header-title {
    font-size: 14px;
  }

  .admin-layout .ant-layout-content {
    padding: 12px;
  }
}
