/* 基础样式重置与变量表 */
:root {
  --primary-color: #409eff;
  /* 贴合设计稿按钮蓝 */
  --primary-hover: #66b1ff;
  --bg-dark: #2b3243;
  /* 左侧深色背景 */
  --bg-light: #ffffff;
  /* 右侧白色背景 */
  --text-main: #303133;
  --text-secondary: #909399;
  --text-inverse: #ffffff;
  --input-border: #dcdfe6;
  --input-bg: #ffffff;
  --error-color: #f56c6c;
  --success-color: #67c23a;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  color: var(--text-main);
  min-height: 100vh;
  margin: 0;
}

/* 左右分栏外框架 */
.login-split-wrapper {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* ================= 左侧深色面板 ================= */
.login-left-panel {
  flex: 1;
  /* 占据一半空间 */
  background-color: var(--bg-dark);
  color: var(--text-inverse);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: 40px;
}

.panel-header {
  position: absolute;
  top: 40px;
  left: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background-color: #fff;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #00bcd4;
  /* 图标中常见的青色点缀 */
}

.logo-text {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 2px;
}

.panel-illustration {
  width: 100%;
  max-width: 500px;
  /* 限制最大宽度，保持视觉中心 */
  margin-bottom: 60px;
  transition: transform 0.3s ease;
}

.panel-illustration img {
  width: 100%;
  height: auto;
  display: block;
}

.panel-footer {
  text-align: left;
  width: 100%;
  max-width: 500px;
  /* 与图片保持对齐 */
}

.panel-footer h2 {
  font-size: 32px;
  font-weight: 500;
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.panel-footer p {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.7);
}


/* ================= 右侧表单面板 ================= */
.login-right-panel {
  flex: 1;
  /* 占据一半空间 */
  background-color: var(--bg-light);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}

.panel-tools {
  position: absolute;
  top: 30px;
  right: 40px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.tool-btn {
  background: none;
  border: none;
  color: #606266;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.tool-btn:hover {
  background-color: #f4f4f5;
  color: var(--primary-color);
}

.tool-btn svg {
  width: 20px;
  height: 20px;
}

.form-container {
  width: 100%;
  max-width: 440px;
  /* 原 400px，增加 10% */
  padding: 40px;
}

.form-title {
  font-size: 32px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 40px;
  letter-spacing: 2px;
}

.input-group {
  margin-bottom: 24px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.prefix-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: #c0c4cc;
  pointer-events: none;
  transition: color 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.suffix-btn {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  color: #c0c4cc;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  transition: color 0.3s;
}

.suffix-btn:hover {
  color: #909399;
}

.suffix-btn svg {
  width: 18px;
  height: 18px;
}

.hidden {
  display: none !important;
}

.input-wrapper input {
  width: 100%;
  height: 53px;
  /* 原 48px，增加 ~10% */
  padding: 0 40px;
  /* 为左右图标留出空间 */
  border: 1px solid var(--input-border);
  border-radius: 4px;
  font-size: 16px;
  /* 略微放大字号配合高度 */
  background-color: var(--input-bg);
  transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
  color: var(--text-main);
  outline: none;
}

.input-wrapper input::placeholder {
  color: #c0c4cc;
}

.input-wrapper input:hover {
  border-color: #c0c4cc;
}

.input-wrapper input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
}

/* 输入框聚焦时，前缀图标提亮 */
.input-wrapper input:focus~.prefix-icon {
  color: var(--primary-color);
}

/* 辅助操作区 (记住我 / 忘记密码) */
.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  font-size: 14px;
}

.remember-me {
  display: flex;
  align-items: center;
  cursor: pointer;
  color: var(--primary-color);
  /* 设计稿中“记住我”也是蓝色 */
}

.remember-me input {
  margin-right: 6px;
  cursor: pointer;
  accent-color: var(--primary-color);
  width: 16px;
  height: 16px;
}

.forgot-password {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s;
}

.forgot-password:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* 登录按钮 */
.login-submit-btn {
  width: 100%;
  height: 53px;
  /* 原 48px，增加 ~10% */
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 18px;
  /* 原 16px，略微放大 */
  font-weight: 500;
  letter-spacing: 4px;
  /* 让文字撑开一些，显得大气 */
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
  position: relative;
  overflow: hidden;
}

.login-submit-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(64, 158, 255, 0.3);
}

.login-submit-btn:active {
  transform: translateY(1px);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.login-submit-btn:disabled {
  background: #a0cfff;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Loading 动画 */
.btn-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
  display: none;
}

.login-submit-btn.loading .btn-text {
  display: none;
}

.login-submit-btn.loading .btn-spinner {
  display: block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 吐司提示 - 改为从上方滑出 */
.toast {
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: #fff;
  padding: 12px 24px;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
  opacity: 0;
  z-index: 100;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.success {
  border-left: 4px solid var(--success-color);
  color: var(--success-color);
}

.toast.error {
  border-left: 4px solid var(--error-color);
  color: var(--error-color);
}

/* 响应式调整 - 针对小屏幕设备回退为上下布局 */
@media (max-width: 600px) {

  /* 原 900px，降低触发断点，防止缩放时提前折叠 */
  .login-split-wrapper {
    flex-direction: column;
  }

  .login-left-panel {
    display: none;
    /* 较小屏幕下直接隐藏左侧插画，节省空间 */
  }

  .login-right-panel {
    flex: 1;
    /* 右侧占满 toàn 屏 */
  }

  .form-container {
    padding: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    background: #fff;
  }
}