/* ========================================
   豪森软件 - 登录注册页面样式
   主题色: 橙红色 #E7492C
   ======================================== */

/* CSS 变量定义 */
:root {
  /* 主题色 - 豪森软件蓝 */
  --primary-color: #2979f2;
  --primary-hover: #1565c0;
  --primary-light: #e3f2fd;
  --primary-gradient: linear-gradient(135deg, #2979f2 0%, #42a5f5 100%);

  /* 中性色 */
  --text-primary: #1a1a1a;
  --text-secondary: #666666;
  --text-muted: #999999;
  --text-placeholder: #bfbfbf;

  /* 背景色 */
  --bg-white: #ffffff;
  --bg-light: #f8f9fa;
  --bg-gray: #f5f5f5;

  /* 边框色 */
  --border-color: #e8e8e8;
  --border-focus: #e7492c;
  --border-error: #ff4d4f;

  /* 阴影 */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);

  /* 圆角 */
  --radius-md: 8px;
  --radius-lg: 12px;

  /* 动画 */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.4s ease;

  /* 字体 */
  --font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif,
    "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";

  /* 补充缺失变量 (用于 forgot-password.html) */
  --border-light: #e0e0e0;
  --success-color: #10b981;
}

/* 暗黑模式适配 */
html.dark {
  --primary-color: #2979f2;
  --primary-hover: #4096ff;
  --primary-light: rgba(41, 121, 242, 0.15);
  --primary-gradient: linear-gradient(135deg, #1565c0 0%, #2979f2 100%);

  --text-primary: #e5e7eb;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --text-placeholder: #4b5563;

  --bg-white: #1f2937;
  --bg-light: #111827;
  --bg-gray: #374151;

  --border-color: #374151;
  --border-focus: #2979f2;
  --border-error: #ef4444;
  --border-light: #4b5563;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* 基础重置 */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

*:focus-visible {
  outline: none;
}

/* 隐藏IE/Edge原生的密码查看按钮 */
input::-ms-reveal,
input::-ms-clear {
  display: none;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-white);
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
}

input,
select {
  font-family: inherit;
  font-size: inherit;
  outline: none;
  border: none;
}

/* ========================================
   主容器布局
   ======================================== */
.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100%;
  padding: 10px 20px;
  background: var(--bg-gray);
}

/* 整体卡片容器 */
.auth-card {
  display: flex;
  flex-direction: row;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  max-width: 1200px;
  width: 100%;
  min-height: 600px;
}

/* 左侧表单区域 */
.auth-form-section {
  flex: 0 0 45%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 50px;
  background: var(--bg-white);
}

.auth-form-wrapper {
  width: 100%;
  max-width: 400px;
}

/* 右侧插图区域 */
.auth-illustration-section {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-light);
  padding: 0;
  position: relative;
  overflow: hidden;
}

/* ========================================
   标题样式
   ======================================== */
.auth-title {
  font-size: 28px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 32px;
  letter-spacing: -0.5px;
}

/* ========================================
   Tab 切换
   ======================================== */
.auth-tabs {
  display: flex;
  gap: 32px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0;
}

.auth-tab {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0 0 12px 0;
  position: relative;
  transition: color var(--transition-fast);
  background: none;
}

.auth-tab::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary-color);
  transform: scaleX(0);
  transition: transform var(--transition-normal);
}

.auth-tab:hover {
  color: var(--text-primary);
}

.auth-tab.active {
  color: var(--text-primary);
  font-weight: 600;
}

.auth-tab.active::after {
  transform: scaleX(1);
}

/* ========================================
   表单样式
   ======================================== */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-form.hidden {
  display: none;
}

.form-group {
  position: relative;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.form-label.required::before {
  content: "*";
  color: var(--primary-color);
  margin-right: 4px;
}

/* 输入框包装器 */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  transition: border-color var(--transition-fast);
}

.input-wrapper:focus-within {
  border-color: var(--primary-color);
}

.input-wrapper.highlight {
  border-color: var(--primary-color);
}

.input-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-right: 12px;
}

.input-wrapper input,
.input-wrapper select {
  flex: 1;
  height: 48px;
  font-size: 14px;
  color: var(--text-primary);
  background: transparent;
}

.input-wrapper input::placeholder {
  color: var(--text-placeholder);
}

/* 密码显示切换按钮 */
.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text-placeholder);
  transition: color var(--transition-fast);
  display: flex;
  /* 确保图片居中 */
  align-items: center;
  justify-content: center;
}

.toggle-password:hover {
  color: var(--text-secondary);
}

/* 音效/消息提示样式 */
.error-message {
  margin-bottom: 20px;
  padding: 12px;
  background: #fff2f0;
  border: 1px solid #ffccc7;
  border-radius: 4px;
  color: #ff4d4f;
  font-size: 14px;
}

.success-message {
  margin-bottom: 20px;
  padding: 12px;
  background: #f6ffed;
  border: 1px solid #b7eb8f;
  border-radius: 4px;
  color: #52c41a;
  font-size: 14px;
}

/* CSS控制图标切换 */
/* 默认状态（密码隐藏）：显示 eye-off（斜杠眼） */
.toggle-password .icon-reveal {
  display: none;
}

/* 激活状态（密码显示）：显示 eye（睁眼），隐藏 eye-off */
.toggle-password.active .icon-reveal {
  display: block;
}

.toggle-password.active .icon-hide {
  display: none;
}

/* 密码强度条 */
.password-strength-bar {
  margin-top: 8px;
  display: none;
}

.password-strength-bar.show {
  display: block;
}

.password-strength-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.password-strength-progress {
  flex: 1;
  height: 6px;
  background: transparent;
  border: none;
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

html.dark .password-strength-progress {
  background: transparent;
  border-color: transparent;
}

.password-strength-fill {
  height: 100%;
  transition:
    width 0.3s ease,
    background-color 0.3s ease;
  border-radius: 2px;
}

.password-strength-fill.weak {
  background: #ff5555; /* 高饱和度鲜红色 */
}

.password-strength-fill.medium {
  background: #ffaa00; /* 高饱和度鲜橙色 */
}

.password-strength-fill.strong {
  background: #00dd88; /* 高饱和度鲜绿色 */
}

.password-strength-text {
  font-size: 13px;
  font-weight: 500;
  min-width: 40px;
  text-align: right;
}

.password-strength-text.weak {
  color: #ff5555; /* 高饱和度鲜红色 */
}

.password-strength-text.medium {
  color: #ffaa00; /* 高饱和度鲜橙色 */
}

.password-strength-text.strong {
  color: #00dd88; /* 高饱和度鲜绿色 */
}

/* 暗黑模式下的密码强度条 */
html.dark .password-strength-fill.weak {
  background: #f87171; /* 稍浅的红色 */
}

html.dark .password-strength-fill.medium {
  background: #fbbf24; /* 稍浅的橙色 */
}

html.dark .password-strength-fill.strong {
  background: #34d399; /* 稍浅的绿色 */
}

html.dark .password-strength-text.weak {
  color: #f87171; /* 稍浅的红色 */
}

html.dark .password-strength-text.medium {
  color: #fbbf24; /* 稍浅的橙色 */
}

html.dark .password-strength-text.strong {
  color: #34d399; /* 稍浅的绿色 */
}

/* 带按钮的输入框 */
.input-with-button {
  position: relative;
}

.input-with-button input {
  padding-right: 100px;
}

.btn-get-code {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--primary-color);
  font-weight: 500;
  transition: opacity var(--transition-fast);
  white-space: nowrap;
}

.btn-get-code:hover {
  opacity: 0.8;
}

.btn-get-code:disabled {
  color: var(--text-muted);
  cursor: not-allowed;
}

/* 下拉选择框 */
.select-wrapper {
  position: relative;
}

.select-wrapper select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 32px;
}

.select-arrow {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* ========================================
   可编辑下拉框 (Combobox)
   ======================================== */
.combobox-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  transition: border-color var(--transition-fast);
}

.combobox-wrapper:focus-within {
  border-color: var(--primary-color);
}

.combobox-input {
  flex: 1;
  height: 48px;
  padding: 0;
  font-size: 14px;
  color: var(--text-primary);
  background: transparent;
  border: none;
  cursor: text;
}

.combobox-input:focus {
  outline: none;
}

.combobox-input::placeholder {
  color: var(--text-placeholder);
}

.combobox-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--text-muted);
  transition: all var(--transition-fast);
  cursor: pointer;
  flex-shrink: 0;
}

.combobox-toggle:hover {
  color: var(--text-secondary);
}

.combobox-toggle svg {
  transition: transform var(--transition-fast);
}

.combobox-wrapper.open .combobox-toggle svg {
  transform: rotate(180deg);
}

.combobox-dropdown {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 240px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow-y: auto;
  z-index: 1000;
}

.combobox-option {
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.combobox-option:hover {
  background: var(--bg-light);
}

.combobox-option.selected {
  background: var(--primary-light);
  color: var(--primary-color);
  font-weight: 500;
}

.combobox-option.hidden {
  display: none;
}

/* 滚动条样式 */
.combobox-dropdown::-webkit-scrollbar {
  width: 6px;
}

.combobox-dropdown::-webkit-scrollbar-track {
  background: var(--bg-light);
  border-radius: 3px;
}

.combobox-dropdown::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.combobox-dropdown::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ========================================
   表单选项（记住密码等）
   ======================================== */
.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.checkbox-wrapper input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.checkmark {
  width: 16px;
  height: 16px;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  margin-right: 8px;
  position: relative;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-label {
  font-size: 14px;
  color: var(--text-secondary);
}

.form-links {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.link-secondary {
  color: var(--text-secondary);
}

.link-secondary:hover {
  color: var(--text-primary);
}

.link-primary {
  color: var(--primary-color);
}

.link-primary:hover {
  opacity: 0.8;
}

.divider {
  color: var(--border-color);
}

/* ========================================
   主按钮
   ======================================== */
.btn-primary {
  width: 100%;
  height: 48px;
  background: var(--primary-color);
  color: white;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 4px;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  margin-top: 12px;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(231, 73, 44, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  background: var(--bg-gray);
  color: var(--text-muted);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ========================================
   联系信息
   ======================================== */
.contact-info {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}

.contact-item svg {
  color: var(--text-muted);
}

/* ========================================
   注册页面特殊样式
   ======================================== */
.register-page {
  justify-content: center;
  background: var(--bg-gray);
}

.register-form-section {
  width: 100%;
  max-width: 960px;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 28px 64px;
}

.register-form-wrapper {
  width: 100%;
}

.register-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 40px;
}

.back-link {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.back-link:hover {
  color: var(--text-primary);
}

.register-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin-left: 0;
}

/* 表单网格布局 */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 48px;
  margin-bottom: 32px;
}

.form-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* 协议区域 */
.agreement-section {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.agreement-text {
  font-size: 14px;
  color: var(--text-secondary);
}

.btn-register {
  max-width: 400px;
  margin: 0 auto;
  display: block;
}

/* ========================================
   右侧插图样式
   ======================================== */
.illustration-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.illustration-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 主插图 */
.main-illustration {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.illustration-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* 浮动标签装饰 */
.floating-tags {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
}

.float-tag {
  position: absolute;
  background: white;
  padding: 12px 20px;
  border-radius: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: floatUpDown 3s ease-in-out infinite;
  transition: transform 0.3s ease;
}

.float-tag:hover {
  transform: translateY(-4px) scale(1.05);
}

.tag-icon {
  font-size: 20px;
}

.tag-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.tag-1 {
  top: 15%;
  left: 10%;
  animation-delay: 0s;
}

.tag-2 {
  top: 50%;
  right: 8%;
  animation-delay: 1s;
}

.tag-3 {
  bottom: 20%;
  left: 12%;
  animation-delay: 2s;
}

@keyframes floatUpDown {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-12px);
  }
}

/* 品牌水印 */
.brand-watermark {
  position: absolute;
  bottom: 20px;
  right: 20px;
  text-align: right;
  opacity: 0.95;
  /* 删除 transform: rotate(-2deg); */
  z-index: 10;
}

.brand-watermark .brand-name {
  display: block;
  font-size: 22px;
  font-weight: 700;
  font-style: italic;
  /* 添加这行 - 斜体效果 */
  color: var(--primary-color);
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  text-shadow: 0 2px 8px rgba(255, 255, 255, 0.9);
}

.brand-watermark .brand-slogan {
  display: block;
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
  text-shadow: 0 1px 4px rgba(255, 255, 255, 0.9);
}

/* ========================================
   响应式设计
   ======================================== */

/* 平板横屏 */
@media (max-width: 1200px) {
  .auth-card {
    max-width: 1000px;
  }

  .auth-form-section {
    padding: 50px 40px;
  }
}

/* 平板竖屏及以下 */
@media (max-width: 992px) {
  .auth-container {
    padding: 20px 15px;
  }

  .auth-card {
    flex-direction: column;
    min-height: auto;
  }

  .auth-form-section {
    flex: none;
    width: 100%;
    padding: 40px 32px;
  }

  /* 小屏：图片移至表单上方，固定高度 */
  .auth-illustration-section {
    display: flex;
    flex: none;
    width: 100%;
    height: 220px;
    order: -1;
  }

  .auth-illustration-section .illustration-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }

  .auth-illustration-section .brand-watermark {
    bottom: 12px;
    right: 12px;
  }

  .auth-illustration-section .brand-watermark .brand-name {
    font-size: 16px;
  }

  .auth-illustration-section .brand-watermark .brand-slogan {
    font-size: 11px;
  }

  .register-form-section {
    padding: 32px 24px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* 手机竖屏 */
@media (max-width: 576px) {
  .auth-container {
    padding: 10px;
  }

  .auth-card {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
  }

  .auth-form-section {
    padding: 32px 24px;
  }

  .auth-title {
    font-size: 22px;
    margin-bottom: 24px;
  }

  .auth-tabs {
    gap: 24px;
    margin-bottom: 24px;
  }

  .auth-tab {
    font-size: 14px;
  }

  .form-group {
    margin-bottom: 16px;
  }

  .input-wrapper input,
  .input-wrapper select {
    height: 44px;
    font-size: 14px;
  }

  .btn-primary {
    height: 44px;
    font-size: 15px;
    letter-spacing: 2px;
  }

  .contact-info {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
    margin-top: 24px;
    padding-top: 20px;
  }

  .contact-item {
    font-size: 13px;
  }

  /* 注册页面移动端优化 */
  .register-form-section {
    padding: 24px 20px;
    border-radius: 0;
    min-height: 100vh;
  }

  .register-header {
    margin-bottom: 20px;
  }

  .register-title {
    font-size: 20px;
  }

  .form-grid {
    gap: 16px;
  }

  .form-label {
    font-size: 13px;
  }

  .agreement-section {
    margin-bottom: 20px;
  }

  .agreement-text {
    font-size: 13px;
  }
}

/* 超小屏幕 */
@media (max-width: 375px) {
  .auth-form-section {
    padding: 24px 16px;
  }

  .auth-title {
    font-size: 20px;
  }

  .form-options {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .form-links {
    width: 100%;
    justify-content: space-between;
  }
}

/* ========================================
   加载动画
   ======================================== */
.btn-primary.loading {
  position: relative;
  color: transparent;
}

.btn-primary.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid white;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ========================================
   表单验证样式
   ======================================== */
.input-wrapper.error {
  border-color: var(--border-error);
}

.input-wrapper.error input {
  color: var(--border-error);
}

.form-error {
  font-size: 12px;
  color: var(--border-error);
  margin-top: 4px;
  display: none;
}

.form-group.has-error .form-error {
  display: block;
}

.form-group.has-error .input-wrapper {
  border-color: var(--border-error);
}

/* ========================================
   消息提示 - 统一使用全局 Toast (window.Toast)
   淡雅无边框卡片设计
   ======================================== */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100%);
  padding: 16px 22px;
  border: none;
  border-radius: 12px;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.06),
    0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 99999;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* 淡雅配色 */
.toast.success {
  background-color: #f0fdf4;
  color: #22c55e;
}

.toast.warning {
  background-color: #fffbeb;
  color: #fbbf24;
}

.toast.error {
  background-color: #fef2f2;
  color: #f87171;
}

/* ========================================
   节流限制样式
   ======================================== */

/* 节流状态的提交按钮 */
.btn-primary.btn-throttled {
  background: var(--bg-gray);
  color: var(--text-muted);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  position: relative;
  overflow: hidden;
  letter-spacing: 1px;
}

.btn-primary.btn-throttled::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: throttle-shimmer 2s infinite;
}

@keyframes throttle-shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

.btn-primary.btn-throttled:hover {
  background: var(--bg-gray);
  transform: none;
  box-shadow: none;
}

/* 节流错误提示样式 */
.error-message.throttle-error {
  background: #fff7e6;
  border: 1px solid #ffd591;
  color: #d46b08;
}

/* 暗黑模式下的节流样式 */
html.dark .btn-primary.btn-throttled {
  background: #374151;
  color: #6b7280;
}

html.dark .btn-primary.btn-throttled::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
}

html.dark .btn-primary.btn-throttled:hover {
  background: #374151;
}

html.dark .error-message.throttle-error {
  background: rgba(217, 119, 6, 0.1);
  border-color: rgba(217, 119, 6, 0.3);
  color: #fbbf24;
}

/* 暗黑模式下的错误/成功提示优化 */
html.dark .error-message {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

html.dark .success-message {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
  color: #4ade80;
}

/* 暗黑模式下的 Toast 提示优化 */
html.dark .toast.success {
  background-color: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

html.dark .toast.warning {
  background-color: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
}

html.dark .toast.error {
  background-color: rgba(248, 113, 113, 0.15);
  color: #f87171;
}

/* ========================================
   暗黑模式 - SVG图标反色适配
   img标签嵌入的SVG不继承CSS color，需要用filter反色
   ======================================== */
html.dark .input-icon img,
html.dark .toggle-password img,
html.dark .back-link img,
html.dark .combobox-toggle img,
html.dark .contact-item img {
  filter: invert(1) brightness(0.7);
}

/* ========================================
   暗黑模式 - 浏览器自动填充背景色覆盖
   Chrome/Edge/Safari 自动填充会强制白色背景
   ======================================== */
html.dark input:-webkit-autofill,
html.dark input:-webkit-autofill:hover,
html.dark input:-webkit-autofill:focus,
html.dark input:-webkit-autofill:active,
html.dark select:-webkit-autofill,
html.dark select:-webkit-autofill:hover,
html.dark select:-webkit-autofill:focus,
html.dark select:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #1f2937 inset !important;
  -webkit-text-fill-color: #e5e7eb !important;
  transition: background-color 5000s ease-in-out 0s;
  caret-color: #e5e7eb;
}
